dotFactory
Documentation / Reference

Adapters

Reference

The four extension points, what a deployment implements, and how to read the reference.

Nothing with behaviour is built into the core. A deployment is a set of adapters plus authored factories, and a factory names adapters by kind:. This is why the same factory file can be runnable in one deployment and not in another.

The four extension points

point selected by what it supplies
trigger kind kind: on a trigger fires and emits the trigger's out ports
runner kind kind: on a runner executes a leaf unit: consumes its in:, produces its out:
external port external port name takes typed params, returns one typed value
effect kind kind: on a step an external action with its own interface (comment, upload, merge, …)

A runner may perform an external effect; that is the adapter's concern, not a separate node. What a step does — including whether it succeeds — is the adapter's decision. The engine only knows whether the graph reached quiescence, was aborted, or failed.

The kind catalogue

This is the complete inventory of names a factory can write after kind:, plus the external ports it can call. The generated reference at /reference/<kind> lists every field, port and config key; the sections below build the prose explanation. A table row tells you the kind exists; the #### <kind> section tells you when to use it and what it needs.

Trigger kinds

kind fires when reference
manual a person submits the trigger form or an API request supplies a seed /reference/manual
cron a five-field schedule is due; schedule_key lets a deployment override it /reference/cron
github a verified GitHub webhook delivery matches the trigger's event, actions, workflow, branch and conclusion filters /reference/github
http an authenticated POST /api/hooks/<factory_id>/<trigger> arrives with a conforming JSON body /reference/http

Runner kinds

kind runs reference
opencode an agent step inside a machine the deployment provisions; the model token is a secret input /reference/opencode
codex-cloud an agent step on the OpenAI-managed Codex harness with an OpenAI-hosted sandbox /reference/codex-cloud
container a protocol-speaking OCI image through a deployment container backend /reference/container
docker a leaf unit in a container /reference/docker
sandbox a leaf unit on a machine of its own, through the configured machine provider /reference/sandbox
sprite a leaf on a Sprites VM /reference/sprite
codex-cloud-session the cleanup step that deletes one hosted Codex session /reference/codex-cloud-session

Effect kinds

kind does reference
file writes JSON to a path /reference/file
github_comment posts a comment or review on a pull request /reference/github_comment
github_issue opens an issue, comments on one, or releases its claim label /reference/github_issue
github_merge posts a review body and merges the reviewed commit after re-checking the gates /reference/github_merge
github_pull_request opens a pull request from one branch into another /reference/github_pull_request
s3 writes a body to an object in an S3 bucket, with the firing's identity as metadata /reference/s3

External ports

Ports are not kind: steps: a factory calls them from a binding. They are part of the same adapter inventory because a deployment supplies them.

port returns reference
credential a stored secret resolved through the run's factory, user and organization scopes /reference/credential
aws_assume_role temporary AWS credentials from a role ARN and external ID /reference/aws_assume_role
config a stored, readable configuration value with the factory's default /reference/config
github_token a short-lived GitHub App installation token, scoped to one repository and the requested permissions /reference/github_token
pr_context a pull request's description, discussion and changed files /reference/pr_context
ci_status the newest workflow run for a workflow, branch and event /reference/ci_status

Reading the reference

The adapter catalogue is at /api/reference and rendered at /reference/<kind> — each entry lists its fields, ports, configuration, and a one-line description. The names on the page are the names to write after kind:.

To see what this deployment implements, use GET /api/capabilities. The response separates:

  • implemented — the runner, trigger, effect and port kinds the deployment bound;
  • declared — what the selected factory declares, with each adapter's supported flag and the declared types its ports carry.

Implemented vs. runnable

Uploading validates a factory's shape: references resolve, types conform and blocks are closed. That check does not require the adapters to exist here. A factory that names an unknown runner kind still uploads and still renders its flow, definition and types — it is marked not runnable and the factory page lists the missing kinds.

That separation matters for repository factories: a repository can be reviewed, diffed and versioned on a deployment that cannot execute it yet. When a deployment with the adapter serves the same factory, it runs unchanged.

The executors

The deployment's FCT_EXEC setting selects how leaf steps execute:

  • dry-run runs the scheduling and reports the commands that would have run. It is the safe way to exercise a graph while authoring it.
  • local executes leaf steps on this machine, using the adapters the deployment wired.

With no container or machine backend, runners that need one (an agent, a container, a sandbox) are unimplemented rather than silently degraded. The factory's problems list says which.

The agent runners

Two agent implementations ship as examples, and a deployment pins the one it trusts per step:

  • opencode provisions a machine we run (a Sprite), installs OpenCode in it and drives the in-VM server. It needs a machine backend (FCT_SANDBOX_PROVIDER=sprite, FCT_SPRITE_TOKEN) and a model token bound as the step's token secret.
  • codex-cloud runs the model on the OpenAI-managed Codex harness with an OpenAI-hosted sandbox. There is no machine and no environment key; the only credential is the OpenAI API key. Its config is hosted-native: files uploads workspace files, setup runs ordered shell commands after them, packages/network/container_size configure the sandbox, and the working directory is always /workspace. The hosted environment has no clone primitive, so a repository is a setup command. The step exposes its session id as the reserved session output, and the codex-cloud-session kind deletes one on request: the platform keeps no record of a session that lives on the customer's account.

Both turn a step's out: into a JSON schema the model must satisfy, so an agent leaf is portable between them even though their deployment requirements differ.

Adapter kinds are deployment names

A kind: is a name, not an import. Two deployments may implement agent differently, and a factory that hard-codes agent is portable to any deployment that binds that name with the same interface. The interface is part of the factory: declare a leaf's in:/out: types, and the adapter's fields are checked against them.

The spec's extension points section is the formal statement; this page is how the app presents it.

Your factories

Your factories will appear here. Create one and open it beside this guide.