Events
Reference for the factory event stream.
This is a reference for the factory event stream. Every event a session emits is a FactoryEvent: one shared envelope, and a payload chosen by the event type. The lifecycle below lists those types in the order a session emits them — the run opens, the factory declares its structure, work is created, a workstation dispatches it, a worker executes, the orchestrator advances, artifacts land — and each type links to its payload.
Event lifecycle
Every published FactoryEvent type, in the order one session emits them. Each type links to its payload below.
Session
The outer lifecycle of one run: the request that opens it, the pause and resume controls that interrupt it, the result as it is revised, and the response that closes it.
Factory structure
What the factory is, declared at session start and amended while the session runs — the topology a graph is drawn from.
Work
Work entering the factory and moving between the states its work type declares.
Workstation dispatch
A workstation handing work to a worker: the request, the queue it waits in, the worker session it binds to, and the outcome — including the interruption and reconciliation paths.
Worker execution
What a worker does once dispatched: model and inference round trips, script execution, and the result of a child agent run.
Orchestrator
How the run advances between phases and where it checkpoints, for both the Petri-net default and the JavaScript orchestrator.
Artifacts
Durable output attached to the run. Anything the stages above did not claim is listed here.
FactoryEvent envelope
Shared envelope fields for every canonical SSE frame. The type discriminator selects a payload schema; payload-only schemas below are not complete envelopes.
FactoryEvent
objectVersioned Agent Factory event message. This is the intended canonical schema for customer event streams, history projection, record/replay artifacts, and runtime diagnostics. New fields use camelCase even when older REST resource schemas still contain legacy snake_case fields.
- additionalProperties
false (closed)
Fields
- schemaVersionRequiredstring
Version of the factory event envelope schema.
- enum
"agent-factory.event.v1"
- enum
- idRequiredstring
Stable event identifier. Record/replay artifacts must preserve this value.
- payloadRequiredoneOf
FactoryEvent envelope example
Corpus-constructed examplejsonComplete FactoryEvent envelope with type RUN_REQUEST and a RunRequestEventPayload payload body. Field names and enums come from packaged OpenAPI; nested values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"schemaVersion": "agent-factory.event.v1",
"id": "example-id",
"type": "RUN_REQUEST",
"context": {
"sequence": 1,
"tick": 0,
"eventTime": "1970-01-01T00:00:00.000Z"
},
"payload": {
"recordedAt": "1970-01-01T00:00:00.000Z",
"factory": {
"name": "example-factory"
}
}
}
Envelope components
Component schemas referenced by the FactoryEvent envelope fields. These shapes come from packaged OpenAPI — the same corpus as the envelope above.
FactoryEventType (envelope.type)
FactoryEventType
stringCanonical event vocabulary for customer-visible runtime changes. Work entering the factory is represented as WORK_REQUEST, including single-work submissions that are normalized into one-work requests.
- enum
"RUN_REQUEST" | "INITIAL_STRUCTURE_REQUEST" | "FACTORY_CHANGE" | "WORK_REQUEST" | "RELATIONSHIP_CHANGE_REQUEST" | "DISPATCH_REQUEST" | "DISPATCH_WORKER_SESSION_ASSOCIATION" | "MODEL_REQUEST" | "MODEL_RESPONSE" | "INFERENCE_REQUEST" | "INFERENCE_RESPONSE" | "SCRIPT_REQUEST" | "SCRIPT_RESPONSE" | "AGENT_RUN_RESPONSE" | "DISPATCH_RESPONSE" | "WORK_STATE_CHANGE" | "FACTORY_STATE_RESPONSE" | "RUN_RESPONSE" | "SESSION_STARTED" | "SESSION_PAUSED" | "SESSION_RESUMED" | "SESSION_RESULT_UPDATED" | "SESSION_COMPLETED" | "SESSION_LIFECYCLE_CONTROL" | "ORCHESTRATOR_PHASE_CHANGED" | "ORCHESTRATOR_CHECKPOINT_WRITTEN" | "DISPATCH_QUEUED" | "DISPATCH_INTERRUPTED" | "DISPATCH_RECONCILED" | "JAVASCRIPT_CHECKPOINT_REF" | "JAVASCRIPT_PHASE_CHANGE" | "ARTIFACT_CREATED"
FactoryEventContext (envelope.context)
FactoryEventContext
object- additionalProperties
false (closed)
Fields
- sequenceRequiredinteger
Append-only event-log sequence number.
- minimum
0
- minimum
- tickRequiredinteger
Logical engine tick observed by the runtime.
- minimum
0
- minimum
- eventTimeRequiredstringformat: date-time
Wall-clock event timestamp for customer explanation and diagnostics. ISO8601 timestamp.
- sessionIdOptionalstring
Canonical factory session identity for session-scoped events; payloads must not restate it.
- sessionSequenceOptionalinteger
Monotonic per-session ordering used for replay deduplication within one session.
- minimum
0
- minimum
Canonical orchestrator kind for session-scoped events; payloads must not restate it.
- orchestratorDialectOptionalstring
Optional JavaScript workflow dialect when orchestrator.kind = JAVASCRIPT.
- phaseIdOptionalstring
Canonical workflow phase identifier; payloads must not restate it.
- phaseNameOptionalstring
Canonical workflow phase name for customer-visible diagnostics.
- checkpointIdOptionalstring
Canonical checkpoint identifier for checkpoint-scoped events; payloads must not restate it.
- requestIdOptionalstring
Canonical request identity for all request-scoped events; payload metadata must not restate it.
- traceIdsOptionalarray
Canonical trace identifiers that contributed to this event; payloads must not restate them.
- workIdsOptionalarray
Canonical work identities correlated to this event; payloads must not restate them.
- dispatchIdOptionalstring
Canonical dispatch identity for dispatch and inference events; payloads must not restate it.
- currentChainingTraceIdOptionalstring
Canonical chaining-trace identifier for the dispatch currently represented by this event context.
- previousChainingTraceIdsOptionalarray
Canonical predecessor chaining traces consumed by the dispatch in deterministic order.
- sourceOptionalstring
Human-readable source such as api, filewatcher, replay, cron, or worker.
Session
The outer lifecycle of one run: the request that opens it, the pause and resume controls that interrupt it, the result as it is revised, and the response that closes it.
RUN_REQUEST
Payload RunRequestEventPayload
RunRequestEventPayload example
Corpus-constructed examplejsonPayload-only RunRequestEventPayload body. Mapped from FactoryEvent type RUN_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"recordedAt": "1970-01-01T00:00:00.000Z",
"factory": {
"name": "example-factory"
}
}
RunRequestEventPayload
object- additionalProperties
false (closed)
Fields
- recordedAtRequiredstringformat: date-time
SESSION_STARTED
Payload SessionStartedEventPayload
SessionStartedEventPayload example
Corpus-constructed examplejsonPayload-only SessionStartedEventPayload body. Mapped from FactoryEvent type SESSION_STARTED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"startedAt": "1970-01-01T00:00:00.000Z"
}
SessionStartedEventPayload
objectSession execution start recorded on the canonical factory event stream. Session and orchestrator identity live in FactoryEvent.context; this payload carries replay-safe factory and source facts only.
- additionalProperties
false (closed)
Fields
- factoryIdOptionalstring
Stable factory identifier for the session runtime.
- sourceRefOptionalstring
Authored workflow or factory source reference when applicable.
- sourceHashOptionalstring
Stable hash of the authored source material.
- policyHashOptionalstring
Stable hash of the effective orchestrator policy.
- argsDigestOptionalstring
Stable digest of effective session arguments.
- startedAtRequiredstringformat: date-time
When durable session execution started.
SESSION_LIFECYCLE_CONTROL
Payload SessionLifecycleControlEventPayload
SessionLifecycleControlEventPayload example
Corpus-constructed examplejsonPayload-only SessionLifecycleControlEventPayload body. Mapped from FactoryEvent type SESSION_LIFECYCLE_CONTROL. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"operation": "APPROVE",
"outcome": "ACCEPTED",
"previousStatus": "QUEUED",
"newStatus": "QUEUED",
"occurredAt": "1970-01-01T00:00:00.000Z"
}
SessionLifecycleControlEventPayload
objectDurable Factory Session lifecycle control recorded on the canonical factory event stream. Session identity lives in FactoryEvent.context; this payload carries replay-safe control facts only.
- additionalProperties
false (closed)
Fields
- occurredAtRequiredstringformat: date-time
When the lifecycle control took effect.
- reasonOptionalstring
Optional operator-provided reason for the control request.
SESSION_PAUSED
Payload SessionPausedEventPayload
SessionPausedEventPayload example
Corpus-constructed examplejsonPayload-only SessionPausedEventPayload body. Mapped from FactoryEvent type SESSION_PAUSED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"status": "QUEUED",
"pausedAt": "1970-01-01T00:00:00.000Z"
}
SessionPausedEventPayload
objectFactory Session lifecycle pause recorded on the canonical factory event stream. Session identity lives in FactoryEvent.context; this payload carries replay-safe control-transition facts only.
- additionalProperties
false (closed)
Fields
Lifecycle status after a successful pause control.
- pausedAtRequiredstringformat: date-time
When the Factory Session entered PAUSED.
SESSION_RESUMED
Payload SessionResumedEventPayload
SessionResumedEventPayload example
Corpus-constructed examplejsonPayload-only SessionResumedEventPayload body. Mapped from FactoryEvent type SESSION_RESUMED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"status": "QUEUED",
"resumedAt": "1970-01-01T00:00:00.000Z"
}
SessionResumedEventPayload
objectFactory Session lifecycle resume recorded on the canonical factory event stream. Session identity lives in FactoryEvent.context; this payload carries replay-safe control-transition facts only.
- additionalProperties
false (closed)
Fields
Lifecycle status after a successful resume control.
- resumedAtRequiredstringformat: date-time
When the Factory Session returned to RUNNING.
SESSION_RESULT_UPDATED
Payload SessionResultUpdatedEventPayload
SessionResultUpdatedEventPayload example
Corpus-constructed examplejsonPayload-only SessionResultUpdatedEventPayload body. Mapped from FactoryEvent type SESSION_RESULT_UPDATED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"resultStatus": "NOT_READY"
}
SessionResultUpdatedEventPayload
objectPartial or final session result availability on the canonical factory event stream. Identity and ordering live in FactoryEvent.context.
- additionalProperties
false (closed)
Fields
- artifactIdsOptionalarray
Artifact identifiers associated with this result update.
Bounded customer-visible result summary without raw prompts or secrets.
SESSION_COMPLETED
Payload SessionCompletedEventPayload
SessionCompletedEventPayload example
Corpus-constructed examplejsonPayload-only SessionCompletedEventPayload body. Mapped from FactoryEvent type SESSION_COMPLETED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"finalStatus": "QUEUED",
"completedAt": "1970-01-01T00:00:00.000Z"
}
SessionCompletedEventPayload
objectAuthoritative terminal session lifecycle marker on the canonical factory event stream. Session identity lives in FactoryEvent.context.
- additionalProperties
false (closed)
Fields
- completedAtRequiredstringformat: date-time
When durable session execution reached a terminal state.
- durationMillisOptionalintegerformat: int64
Total session execution duration in milliseconds.
- artifactIdsOptionalarray
Artifact identifiers associated with the terminal session outcome.
Dispatch queue, running, and completed counts at terminal completion.
Canonical failure details when the session completed unsuccessfully.
RUN_RESPONSE
Payload RunResponseEventPayload
RunResponseEventPayload example
Corpus-constructed examplejsonPayload-only RunResponseEventPayload body. Mapped from FactoryEvent type RUN_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
RunResponseEventPayload
object- additionalProperties
false (closed)
Fields
- reasonOptionalstring
Factory structure
What the factory is, declared at session start and amended while the session runs — the topology a graph is drawn from.
INITIAL_STRUCTURE_REQUEST
Payload InitialStructureRequestEventPayload
InitialStructureRequestEventPayload example
Corpus-constructed examplejsonPayload-only InitialStructureRequestEventPayload body. Mapped from FactoryEvent type INITIAL_STRUCTURE_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"factory": {
"name": "example-factory"
}
}
InitialStructureRequestEventPayload
objectRuntime topology snapshot before work moves.
- additionalProperties
false (closed)
Fields
- sourceDirectoryOptionalstring
FACTORY_CHANGE
Payload FactoryChangeEventPayload
FactoryChangeEventPayload example
Corpus-constructed examplejsonPayload-only FactoryChangeEventPayload body. Mapped from FactoryEvent type FACTORY_CHANGE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"factory": {
"name": "example-factory"
}
}
FactoryChangeEventPayload
objectRuntime topology snapshot after a live factory definition change replaces the running factory.
- additionalProperties
false (closed)
Fields
- sourceDirectoryOptionalstring
RELATIONSHIP_CHANGE_REQUEST
Payload RelationshipChangeRequestEventPayload
RelationshipChangeRequestEventPayload example
Corpus-constructed examplejsonPayload-only RelationshipChangeRequestEventPayload body. Mapped from FactoryEvent type RELATIONSHIP_CHANGE_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"relation": {
"type": "DEPENDS_ON",
"sourceWorkName": "example-sourceWorkName",
"targetWorkName": "example-targetWorkName"
}
}
RelationshipChangeRequestEventPayload
object- additionalProperties
false (closed)
Fields
FACTORY_STATE_RESPONSE
Payload FactoryStateResponseEventPayload
FactoryStateResponseEventPayload example
Corpus-constructed examplejsonPayload-only FactoryStateResponseEventPayload body. Mapped from FactoryEvent type FACTORY_STATE_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"state": "IDLE"
}
FactoryStateResponseEventPayload
object- additionalProperties
false (closed)
Fields
- reasonOptionalstring
Work
Work entering the factory and moving between the states its work type declares.
WORK_REQUEST
Payload WorkRequestEventPayload
WorkRequestEventPayload example
Corpus-constructed examplejsonPayload-only WorkRequestEventPayload body. Mapped from FactoryEvent type WORK_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"type": "FACTORY_REQUEST_BATCH"
}
WorkRequestEventPayload
objectNormalized work request entering the factory. Single-work submissions accepted by POST /work are converted into this one-work request shape before an event is emitted.
- additionalProperties
false (closed)
Fields
- sourceOptionalstring
- parentLineageOptionalarray
WORK_STATE_CHANGE
Payload WorkStateChangeEventPayload
WorkStateChangeEventPayload example
Corpus-constructed examplejsonPayload-only WorkStateChangeEventPayload body. Mapped from FactoryEvent type WORK_STATE_CHANGE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"workId": "example-workId",
"workTypeName": "example-workTypeName",
"fromState": "example-fromState",
"toState": "example-toState",
"fromPlaceId": "example-fromPlaceId",
"toPlaceId": "example-toPlaceId",
"source": "api"
}
WorkStateChangeEventPayload
objectCanonical Petri marking position change for work items in Petri-backed factories. JavaScript workflow progress is represented by JAVASCRIPT_PHASE_CHANGE events instead of WORK_STATE_CHANGE. Operator moves use source api or cli; automatic cascade propagation uses cascading-failure. FactoryEvent.context carries workIds and optional requestId for operator idempotency.
- additionalProperties
false (closed)
Fields
- workIdRequiredstring
- workTypeNameRequiredstring
- fromStateRequiredstring
Authored state name before the move.
- toStateRequiredstring
Authored state name after the move.
- fromPlaceIdRequiredstring
Marking place identifier before the move.
- toPlaceIdRequiredstring
Marking place identifier after the move.
- triggerWorkIdOptionalstring
Optional work identifier that triggered a cascade move.
- reasonOptionalstring
Optional human-readable reason for the move.
Workstation dispatch
A workstation handing work to a worker: the request, the queue it waits in, the worker session it binds to, and the outcome — including the interruption and reconciliation paths.
DISPATCH_REQUEST
Payload DispatchRequestEventPayload
DispatchRequestEventPayload example
Corpus-constructed examplejsonPayload-only DispatchRequestEventPayload body. Mapped from FactoryEvent type DISPATCH_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"transitionId": "example-transitionId",
"inputs": []
}
DispatchRequestEventPayload
objectCustomer-visible dispatch start event. FactoryEvent.context owns dispatch, request, trace, and work identity. This payload keeps only non-derived dispatch facts first known when execution starts; workstation and worker topology must be reconstructed from the initial structure and the retained transition identifier. Ordered inputs carry consumed work references only; work type, trace, display, and other work facts must be rebuilt from prior work-request history.
- additionalProperties
false (closed)
Fields
- transitionIdRequiredstring
- currentChainingTraceIdOptionalstring
Deprecated compatibility copy of the dispatch chaining-trace identifier; prefer FactoryEvent.context.currentChainingTraceId.
- previousChainingTraceIdsOptionalarray
Deprecated compatibility copy of predecessor chaining traces; prefer FactoryEvent.context.previousChainingTraceIds.
DISPATCH_QUEUED
Payload DispatchQueuedEventPayload
DispatchQueuedEventPayload example
Corpus-constructed examplejsonPayload-only DispatchQueuedEventPayload body. Mapped from FactoryEvent type DISPATCH_QUEUED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"dispatchKind": "PETRI_TRANSITION"
}
DispatchQueuedEventPayload
objectDispatch queued for execution on the canonical factory event stream. Dispatch identity lives in FactoryEvent.context and Petri transition fields are not required for JavaScript workflow dispatches.
- additionalProperties
false (closed)
Fields
- labelOptionalstring
Customer-visible dispatch label.
- coordinationRefOptionalstring
Optional coordination reference for grouped child work.
- runnerIdOptionalstring
Selected runner identifier when applicable.
- presetIdOptionalstring
Resolved operator worker preset identifier when one was selected.
- modelProviderOptionalstring
Resolved canonical model-provider identifier when applicable.
- modelOptionalstring
Selected model identifier when applicable.
- reasoningEffortOptionalstring
Resolved canonical reasoning effort when applicable.
- providerOptionalstring
Selected provider identifier when applicable.
- parentDispatchIdOptionalstring
Parent dispatch identifier when this dispatch was spawned from another dispatch.
- retryOfDispatchIdOptionalstring
Prior dispatch identifier when this dispatch is a retry.
- queuePositionOptionalinteger
Queue position when known.
- minimum
0
- minimum
- promptDigestOptionalstring
Stable digest of rendered prompt material.
- schemaDigestOptionalstring
Stable digest of the output schema when applicable.
- inputArtifactIdsOptionalarray
Input artifact identifiers consumed by the dispatch.
- inputWorkIdsOptionalarray
Input work identifiers consumed by the dispatch.
DISPATCH_WORKER_SESSION_ASSOCIATION
Payload DispatchWorkerSessionAssociationEventPayload
DispatchWorkerSessionAssociationEventPayload example
Corpus-constructed examplejsonPayload-only DispatchWorkerSessionAssociationEventPayload body. Mapped from FactoryEvent type DISPATCH_WORKER_SESSION_ASSOCIATION. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"workerSessionId": "example-"
}
DispatchWorkerSessionAssociationEventPayload
objectCanonical association between one Factory dispatch and the Worker Session allocated to execute it. Dispatch identity remains authoritative in FactoryEvent.context.dispatchId and is not repeated in this payload.
- additionalProperties
false (closed)
Fields
- workerSessionIdRequiredstring
Non-empty Worker Session identity allocated for the dispatch.
- minLength
1
- minLength
DISPATCH_INTERRUPTED
Payload DispatchInterruptedEventPayload
DispatchInterruptedEventPayload example
Corpus-constructed examplejsonPayload-only DispatchInterruptedEventPayload body. Mapped from FactoryEvent type DISPATCH_INTERRUPTED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"reason": "example-reason",
"observedStatus": "QUEUED",
"interruptedAt": "1970-01-01T00:00:00.000Z",
"retryPlanned": false
}
DispatchInterruptedEventPayload
objectDispatch interruption recorded on the canonical factory event stream. Dispatch identity lives in FactoryEvent.context.
- additionalProperties
false (closed)
Fields
- reasonRequiredstring
Customer-visible interruption reason.
- interruptedAtRequiredstringformat: date-time
When the interruption was observed.
- retryPlannedRequiredboolean
Whether a retry dispatch is planned.
Related provider-session reference when applicable.
Related checkpoint reference when applicable.
DISPATCH_RECONCILED
Payload DispatchReconciledEventPayload
DispatchReconciledEventPayload example
Corpus-constructed examplejsonPayload-only DispatchReconciledEventPayload body. Mapped from FactoryEvent type DISPATCH_RECONCILED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"reconciledStatus": "QUEUED",
"reconciliationSource": "STREAM_REPLAY",
"replayed": false
}
DispatchReconciledEventPayload
objectDispatch reconciliation recorded on the canonical factory event stream. Dispatch identity lives in FactoryEvent.context.
- additionalProperties
false (closed)
Fields
- replayedRequiredboolean
Whether reconciliation facts were emitted during stream replay.
Usage summary after reconciliation when available.
Result artifact reference without raw artifact bodies.
- artifactIdsOptionalarray
Artifact identifiers produced or updated by reconciliation.
Canonical failure details when reconciliation failed.
DISPATCH_RESPONSE
Payload DispatchResponseEventPayload
DispatchResponseEventPayload example
Corpus-constructed examplejsonPayload-only DispatchResponseEventPayload body. Mapped from FactoryEvent type DISPATCH_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"transitionId": "example-transitionId",
"outcome": "ACCEPTED"
}
DispatchResponseEventPayload
objectCustomer-visible dispatch completion event. Output work is represented with the same Work schema used by request submission rather than token or marking-mutation internals. FactoryEvent.context owns dispatch, trace, and work identity; workstation and worker topology must be derived from the matching dispatch-request event plus the initial structure. Provider-attempt session and safe diagnostic facts stay on inference response events instead of being copied onto dispatch completion payloads.
- additionalProperties
false (closed)
Fields
- completionIdOptionalstring
- transitionIdRequiredstring
- currentChainingTraceIdOptionalstring
Deprecated compatibility copy of the dispatch chaining-trace identifier; prefer FactoryEvent.context.currentChainingTraceId.
- previousChainingTraceIdsOptionalarray
Deprecated compatibility copy of predecessor chaining traces; prefer FactoryEvent.context.previousChainingTraceIds.
- outputOptionalstring
- errorOptionalstring
- feedbackOptionalstring
- selectedClassificationLabelOptionalstring
- durationMillisOptionalintegerformat: int64
Worker execution
What a worker does once dispatched: model and inference round trips, script execution, and the result of a child agent run.
MODEL_REQUEST
Payload ModelRequestEventPayload
ModelRequestEventPayload example
Corpus-constructed examplejsonPayload-only ModelRequestEventPayload body. Mapped from FactoryEvent type MODEL_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"modelRequestId": "example-modelRequestId",
"attempt": 1,
"operation": "example-operation",
"worker": "example-worker",
"model": "example-model",
"providerLocality": "example-providerLocality"
}
ModelRequestEventPayload
objectRequest details captured immediately before a model-backed worker invocation enters resource, load, and execution boundaries. FactoryEvent.context owns dispatch, request, trace, and work identity, and the matching dispatch-request event owns the transition identifier.
- additionalProperties
false (closed)
Fields
- modelRequestIdRequiredstring
Stable identifier correlating this model execution request with its response.
- attemptRequiredinteger
One-based model execution attempt number for this dispatch.
- minimum
1
- minimum
- operationRequiredstring
Uppercase model operation requested by the workstation, such as TTS.
- workerRequiredstring
Runtime worker name selected for the invocation.
- modelRequiredstring
Concrete model identity resolved for this invocation.
- providerLocalityRequiredstring
Worker-declared model locality, such as LOCAL or CLOUD.
Concrete resources attached to the model worker execution path.
Deterministically resolved operation-slot bindings used for invocation.
- workingDirectoryOptionalstring
Working directory resolved for the model execution when present.
- worktreeOptionalstring
Worktree path resolved for the model execution when present.
MODEL_RESPONSE
Payload ModelResponseEventPayload
ModelResponseEventPayload example
Corpus-constructed examplejsonPayload-only ModelResponseEventPayload body. Mapped from FactoryEvent type MODEL_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"modelRequestId": "example-modelRequestId",
"attempt": 1,
"operation": "example-operation",
"worker": "example-worker",
"model": "example-model",
"providerLocality": "example-providerLocality",
"outcome": "SUCCEEDED",
"durationMillis": 0
}
ModelResponseEventPayload
objectResponse details captured after a model-backed worker invocation returns, including resource wait, local load, binding-resolution, output, and failure evidence correlated to the matching model request event. Large binary audio must remain represented through content references or bounded previews instead of unbounded inline payloads.
- additionalProperties
false (closed)
Fields
- modelRequestIdRequiredstring
Identifier from the matching model request event.
- attemptRequiredinteger
One-based model execution attempt number for this dispatch.
- minimum
1
- minimum
- operationRequiredstring
Uppercase model operation requested by the workstation, such as TTS.
- workerRequiredstring
Runtime worker name selected for the invocation.
- modelRequiredstring
Concrete model identity resolved for this invocation.
- providerLocalityRequiredstring
Worker-declared model locality, such as LOCAL or CLOUD.
- durationMillisRequiredintegerformat: int64
End-to-end model invocation duration in milliseconds.
- minimum
0
- minimum
Concrete resources attached to the model worker execution path.
Deterministically resolved operation-slot bindings used for invocation.
- resourceWaitMillisOptionalintegerformat: int64
Time spent waiting for local model resources before acquisition.
- minimum
0
- minimum
- resourceAcquiredOptionalboolean
Whether the invocation acquired the required local model resources.
- loadRequestedOptionalboolean
Whether this invocation asked the managed local-model runtime to load a handle.
- loadReusedOptionalboolean
Whether an already-loaded local model handle was reused instead of loading again.
- loadDurationMillisOptionalintegerformat: int64
Duration of the managed local-model load call when one occurred.
- minimum
0
- minimum
- outputPreviewOptionalstring
Bounded output preview for non-binary model responses when present.
INFERENCE_REQUEST
Payload InferenceRequestEventPayload
InferenceRequestEventPayload example
Corpus-constructed examplejsonPayload-only InferenceRequestEventPayload body. Mapped from FactoryEvent type INFERENCE_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"inferenceRequestId": "example-inferenceRequestId",
"attempt": 1,
"workingDirectory": "example-workingDirectory",
"worktree": "example-worktree",
"prompt": "example-prompt"
}
InferenceRequestEventPayload
objectRequest details captured immediately before a model-worker provider attempt is invoked. FactoryEvent.context owns dispatch, request, trace, and work identity, and the matching dispatch-request event owns the transition identifier. Prompt content is intentionally present and should be treated as sensitive in recordings and diagnostics.
- additionalProperties
false (closed)
Fields
- inferenceRequestIdRequiredstring
Stable identifier correlating this provider request with its response.
- attemptRequiredinteger
One-based provider attempt number for this dispatch.
- minimum
1
- minimum
- workingDirectoryRequiredstring
Working directory resolved for the provider attempt.
- worktreeRequiredstring
Worktree path resolved for the provider attempt.
- promptRequiredstring
Rendered prompt sent to the provider.
INFERENCE_RESPONSE
Payload InferenceResponseEventPayload
InferenceResponseEventPayload example
Corpus-constructed examplejsonPayload-only InferenceResponseEventPayload body. Mapped from FactoryEvent type INFERENCE_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"inferenceRequestId": "example-inferenceRequestId",
"attempt": 1,
"outcome": "SUCCEEDED",
"durationMillis": 0
}
InferenceResponseEventPayload
objectResponse details captured after a model-worker provider attempt returns, including success and failure outcomes correlated to the request event. FactoryEvent.context owns dispatch identity, and the matching dispatch request owns the transition identifier for this provider attempt. Safe provider diagnostics and provider-session identifiers stay on this provider-boundary event instead of being copied onto DispatchResponse.
- additionalProperties
false (closed)
Fields
- inferenceRequestIdRequiredstring
Identifier from the matching inference request event.
- attemptRequiredinteger
One-based provider attempt number for this dispatch.
- minimum
1
- minimum
- responseOptionalstring
Provider response text when present.
- durationMillisRequiredintegerformat: int64
Provider call duration in milliseconds.
- minimum
0
- minimum
- exitCodeOptionalinteger
Process exit code when the provider failure exposes one.
SCRIPT_REQUEST
Payload ScriptRequestEventPayload
ScriptRequestEventPayload example
Corpus-constructed examplejsonPayload-only ScriptRequestEventPayload body. Mapped from FactoryEvent type SCRIPT_REQUEST. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"scriptRequestId": "example-scriptRequestId",
"dispatchId": "example-dispatchId",
"transitionId": "example-transitionId",
"attempt": 1,
"command": "example-command",
"args": []
}
ScriptRequestEventPayload
objectRequest details captured immediately before a script-backed worker invokes a concrete command. Raw environment values and raw stdin content are intentionally excluded from the public script event contract.
- additionalProperties
false (closed)
Fields
- scriptRequestIdRequiredstring
Stable identifier correlating this script request with its response.
- dispatchIdRequiredstring
- transitionIdRequiredstring
- attemptRequiredinteger
One-based script attempt number for this dispatch.
- minimum
1
- minimum
- commandRequiredstring
Concrete command name executed for this script attempt.
- argsRequiredarray
Fully resolved command arguments passed to the script command runner.
SCRIPT_RESPONSE
Payload ScriptResponseEventPayload
ScriptResponseEventPayload example
Corpus-constructed examplejsonPayload-only ScriptResponseEventPayload body. Mapped from FactoryEvent type SCRIPT_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"scriptRequestId": "example-scriptRequestId",
"dispatchId": "example-dispatchId",
"transitionId": "example-transitionId",
"attempt": 1,
"outcome": "SUCCEEDED",
"stdout": "example-stdout",
"stderr": "example-stderr",
"durationMillis": 0
}
ScriptResponseEventPayload
objectResponse details captured after a script-backed worker command returns or fails before a normal exit code. Raw environment values and raw stdin content are intentionally excluded from the public script event contract.
- additionalProperties
false (closed)
Fields
- scriptRequestIdRequiredstring
Identifier from the matching script request event.
- dispatchIdRequiredstring
- transitionIdRequiredstring
- attemptRequiredinteger
One-based script attempt number for this dispatch.
- minimum
1
- minimum
- stdoutRequiredstring
Captured stdout text from the script execution boundary.
- stderrRequiredstring
Captured stderr text from the script execution boundary.
- durationMillisRequiredintegerformat: int64
Script execution duration in milliseconds.
- minimum
0
- minimum
- exitCodeOptionalinteger
Process exit code when the command returned one.
AGENT_RUN_RESPONSE
Payload AgentRunResponseEventPayload
AgentRunResponseEventPayload example
Corpus-constructed examplejsonPayload-only AgentRunResponseEventPayload body. Mapped from FactoryEvent type AGENT_RUN_RESPONSE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"agentRunId": "example-agentRunId",
"outcome": "ACCEPTED",
"durationMillis": 0
}
AgentRunResponseEventPayload
objectResponse details captured after an AGENT_RUN workstation completes an agent loop. Final output stays on DispatchResponse; bounded agent-run diagnostics and transcript metadata stay on this agent-boundary event instead of being copied onto provider-session inspection surfaces.
- additionalProperties
false (closed)
Fields
- agentRunIdRequiredstring
Stable identifier for this agent-run boundary event.
- durationMillisRequiredintegerformat: int64
Agent-loop execution duration in milliseconds.
- minimum
0
- minimum
Orchestrator
How the run advances between phases and where it checkpoints, for both the Petri-net default and the JavaScript orchestrator.
ORCHESTRATOR_PHASE_CHANGED
Payload OrchestratorPhaseChangedEventPayload
OrchestratorPhaseChangedEventPayload example
Corpus-constructed examplejsonPayload-only OrchestratorPhaseChangedEventPayload body. Mapped from FactoryEvent type ORCHESTRATOR_PHASE_CHANGED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"phaseStatus": "ACTIVE"
}
OrchestratorPhaseChangedEventPayload
objectOrchestrator workflow phase transition recorded on the canonical factory event stream. Current phase identity lives in FactoryEvent.context.
- additionalProperties
false (closed)
Fields
- previousPhaseIdOptionalstring
Previous workflow phase identifier when available.
- previousPhaseNameOptionalstring
Previous workflow phase name when available.
- startedAtOptionalstringformat: date-time
When the current phase started, when applicable.
- completedAtOptionalstringformat: date-time
When the previous phase completed, when applicable.
- progressSummaryOptionalstring
Bounded customer-visible phase progress summary.
ORCHESTRATOR_CHECKPOINT_WRITTEN
Payload OrchestratorCheckpointWrittenEventPayload
OrchestratorCheckpointWrittenEventPayload example
Corpus-constructed examplejsonPayload-only OrchestratorCheckpointWrittenEventPayload body. Mapped from FactoryEvent type ORCHESTRATOR_CHECKPOINT_WRITTEN. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"label": "example-label",
"resumabilityStatus": "RESUMABLE"
}
OrchestratorCheckpointWrittenEventPayload
objectOrchestrator checkpoint reference recorded on the canonical factory event stream. Checkpoint identity lives in FactoryEvent.context and raw VM bodies remain orchestrator-owned.
- additionalProperties
false (closed)
Fields
- labelRequiredstring
Customer-visible checkpoint label.
- timestampOptionalstringformat: date-time
When the checkpoint was recorded.
- sourceHashOptionalstring
Stable hash of the authored workflow source at checkpoint time.
- runtimeSnapshotDigestOptionalstring
Stable digest of replay-safe runtime snapshot metadata.
Checkpoint artifact reference without raw VM checkpoint bodies.
Customer-visible checkpoint warnings.
JAVASCRIPT_PHASE_CHANGE
Payload JavaScriptPhaseChangeEventPayload
JavaScriptPhaseChangeEventPayload example
Corpus-constructed examplejsonPayload-only JavaScriptPhaseChangeEventPayload body. Mapped from FactoryEvent type JAVASCRIPT_PHASE_CHANGE. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"phase": "example-phase",
"phases": [],
"scriptStatus": "IDLE",
"childDispatchCounts": {
"queued": 0,
"running": 0,
"completed": 0
}
}
JavaScriptPhaseChangeEventPayload
objectJavaScript workflow phase transition recorded on the canonical factory event stream. JavaScript workflow progress is represented through phase changes, not Petri WORK_STATE_CHANGE marking events.
- additionalProperties
false (closed)
Fields
- phaseRequiredstring
Current JavaScript workflow phase name after this event.
- phasesRequiredarray
Ordered phase names visible in the session runtime.
- argsDigestOptionalstring
Stable digest of the effective workflow arguments.
JAVASCRIPT_CHECKPOINT_REF
Payload JavaScriptCheckpointRefEventPayload
JavaScriptCheckpointRefEventPayload example
Corpus-constructed examplejsonPayload-only JavaScriptCheckpointRefEventPayload body. Mapped from FactoryEvent type JAVASCRIPT_CHECKPOINT_REF. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"checkpointId": "example-checkpointId",
"artifactRef": {
"id": "example-id",
"kind": "FINAL_RESULT",
"visibility": "PUBLIC"
}
}
JavaScriptCheckpointRefEventPayload
objectCustomer-visible JavaScript checkpoint reference recorded on the canonical factory event stream. Raw VM checkpoint bodies remain orchestrator-owned and are not included in this payload.
- additionalProperties
false (closed)
Fields
- checkpointIdRequiredstring
Stable checkpoint identifier referenced by the session runtime.
- labelOptionalstring
Customer-visible checkpoint label.
- timestampOptionalstringformat: date-time
When the checkpoint was recorded.
- summaryOptionalstring
Short customer-visible checkpoint summary without raw VM state.
Artifacts
Durable output attached to the run. Anything the stages above did not claim is listed here.
ARTIFACT_CREATED
Payload ArtifactCreatedEventPayload
ArtifactCreatedEventPayload example
Corpus-constructed examplejsonPayload-only ArtifactCreatedEventPayload body. Mapped from FactoryEvent type ARTIFACT_CREATED. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"artifact": {
"id": "example-id",
"kind": "FINAL_RESULT",
"visibility": "PUBLIC"
}
}
ArtifactCreatedEventPayload
objectCustomer-visible artifact creation recorded on the canonical factory event stream. Artifact bodies remain orchestrator-owned and are not included in this payload.
- additionalProperties
false (closed)
Fields
- capturedAtOptionalstringformat: date-time
When the artifact payload was captured.
Ephemeral observation — not canonical FactoryEvent replay state
FactoryResponseEvent envelope
Shared envelope fields for every ephemeral response-event frame, including schemaVersion, eventId/sequence, kind, phase, provenance, payload, and optional correlation identifiers. Payload-only shapes below are not complete envelopes.
FactoryResponseEvent
objectProvider-neutral envelope for transient agent activity observed during one Factory Session run. Unlike canonical factory events, these records are ephemeral observation records and must not derive canonical work state after replay.
- additionalProperties
false (closed)
Fields
- schemaVersionRequiredstring
Version of the FactoryResponseEvent envelope schema.
- enum
"agent-factory.response-event.v1"
- enum
- eventIdRequiredstring
Stable identifier for this response event within the session stream.
- sequenceRequiredintegerformat: int64
Monotonic session-scoped cursor for published events. Sequence zero is reserved for synthetic out-of-band read markers such as retention gaps; those markers do not consume or reuse a published sequence.
- minimum
0
- minimum
- recordedAtRequiredstringformat: date-time
Wall-clock timestamp when the response event was recorded.
- factorySessionIdRequiredstring
Factory Session identity that owns this response-event stream.
- runIdRequiredstring
Run identity within the Factory Session that produced this event.
- dispatchIdOptionalstring
Optional dispatch correlation identifier.
- turnIdOptionalstring
Optional turn correlation identifier.
- itemIdOptionalstring
Optional stable item correlation identifier.
- parentItemIdOptionalstring
Optional parent item correlation identifier.
- providerSessionRefOptionalstring
Optional provider session reference for diagnostics.
FactoryResponseEvent envelope example
Corpus-constructed examplejsonComplete FactoryResponseEvent envelope with kind SESSION and a FactoryResponseEventSessionPayload payload body. Field names and enums come from packaged OpenAPI; nested values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"schemaVersion": "agent-factory.response-event.v1",
"eventId": "example-eventId",
"sequence": 1,
"recordedAt": "1970-01-01T00:00:00.000Z",
"factorySessionId": "example-factorySessionId",
"runId": "example-runId",
"kind": "SESSION",
"phase": "STARTED",
"provenance": {
"provider": "example-provider",
"nativeEventType": "example-nativeEventType",
"delivery": "NATIVE_STREAM",
"representation": "DELTA",
"fidelity": "LOSSLESS"
},
"payload": {}
}
Response event dimensions
Kind, phase, provenance, and payload are independent dimensions. Consumers select a payload variant using envelope kind and phase together with structural decoding. Not every kind × phase × payload combination is valid — allowed combinations are validated before publication.
This matrix does not claim a full Cartesian product of dimensions.
Kind (FactoryResponseEventKind)
ERRORFILE_CHANGEMESSAGEPLANPROGRESSREASONINGRUNSESSIONSTREAM_GAPTOOLTURNUSAGE
FactoryResponseEventKind
stringSemantic category of one FactoryResponseEvent. Response events are ephemeral observation records and must not derive canonical factory replay state.
- enum
"SESSION" | "RUN" | "TURN" | "MESSAGE" | "REASONING" | "TOOL" | "FILE_CHANGE" | "PLAN" | "PROGRESS" | "USAGE" | "ERROR" | "STREAM_GAP"
Phase (FactoryResponseEventPhase)
CANCELEDCOMPLETEDDELTAFAILEDSTARTEDUPDATED
FactoryResponseEventPhase
stringLifecycle position of one FactoryResponseEvent within its kind. Allowed phase/kind combinations are validated before publication.
- enum
"STARTED" | "DELTA" | "UPDATED" | "COMPLETED" | "FAILED" | "CANCELED"
Provenance (FactoryResponseEventProvenance)
Provider-neutral fidelity metadata. Diagnostic identity only — does not promote provider-native schemas into the public vocabulary.
FactoryResponseEventProvenance
objectProvider-neutral fidelity metadata for one response event. Exposes diagnostic identity without promoting provider-native schemas into the public vocabulary.
- additionalProperties
false (closed)
Fields
- providerRequiredstring
Provider identifier for the originating adapter session.
- nativeEventTypeRequiredstring
Provider-native event type label retained for diagnostics only.
- nativeEventSubtypeOptionalstring
Optional provider-native event subtype label retained for diagnostics only.
Payload (FactoryResponseEventPayload)
Typed oneOf union with 14 addressable shapes. Full schema-backed fields are listed in the payload catalog below.
FactoryResponseEventPayload
Public typed payload union for FactoryResponseEvent. Variants align with envelope kind and phase semantics from the Story 01 vocabulary. MESSAGE and TOOL kinds use distinct snapshot and delta payload shapes; consumers select the variant using envelope kind and phase together with structural decoding.
oneOf
- /components/schemas/FactoryResponseEventSessionPayload
- /components/schemas/FactoryResponseEventRunPayload
- /components/schemas/FactoryResponseEventTurnPayload
- /components/schemas/FactoryResponseEventMessagePayload
- /components/schemas/FactoryResponseEventMessageDeltaPayload
- /components/schemas/FactoryResponseEventReasoningPayload
- /components/schemas/FactoryResponseEventToolPayload
- /components/schemas/FactoryResponseEventToolDeltaPayload
- /components/schemas/FactoryResponseEventFileChangePayload
- /components/schemas/FactoryResponseEventPlanPayload
- /components/schemas/FactoryResponseEventProgressPayload
- /components/schemas/FactoryResponseEventUsagePayload
- /components/schemas/FactoryResponseEventErrorPayload
- /components/schemas/FactoryResponseEventStreamGapPayload
- FactoryResponseEventErrorPayload
- FactoryResponseEventFileChangePayload
- FactoryResponseEventMessageDeltaPayload
- FactoryResponseEventMessagePayload
- FactoryResponseEventPlanPayload
- FactoryResponseEventProgressPayload
- FactoryResponseEventReasoningPayload
- FactoryResponseEventRunPayload
- FactoryResponseEventSessionPayload
- FactoryResponseEventStreamGapPayload
- FactoryResponseEventToolDeltaPayload
- FactoryResponseEventToolPayload
- FactoryResponseEventTurnPayload
- FactoryResponseEventUsagePayload
FactoryResponseEvent payload catalog
Schema-backed fields for each payload oneOf shape. These are payload-only schemas on an ephemeral stream — the shared FactoryResponseEvent envelope fields remain above, and none of these are canonical FactoryEvent replay state.
Event catalog
FactoryResponseEventErrorPayload
FactoryResponseEventErrorPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventErrorPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"code": "example-code",
"message": "example-message"
}
FactoryResponseEventErrorPayload
objectProvider-neutral error payload with optional retry metadata.
- additionalProperties
false (closed)
Fields
- codeRequiredstring
Stable provider-neutral error code.
- messageRequiredstring
Human-readable error message.
- retryableOptionalboolean
Whether the error may be retried.
- retryAfterSecondsOptionalintegerformat: int64
Suggested retry delay in seconds when retryable.
- minimum
0
- minimum
- retryAttemptOptionalintegerformat: int32
Retry attempt count when applicable.
- minimum
0
- minimum
Event catalog
FactoryResponseEventFileChangePayload
FactoryResponseEventFileChangePayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventFileChangePayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"path": "example-path",
"operation": "example-operation"
}
FactoryResponseEventFileChangePayload
objectObserved file mutation payload.
- additionalProperties
false (closed)
Fields
- pathRequiredstring
Observed file path relative to the workspace or artifact root.
- operationRequiredstring
Observed file operation such as create, update, or delete.
- summaryOptionalstring
Optional human-readable summary of the mutation.
Event catalog
FactoryResponseEventMessageDeltaPayload
FactoryResponseEventMessageDeltaPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventMessageDeltaPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"contentBlockIndex": 0,
"contentBlockKind": "TEXT"
}
FactoryResponseEventMessageDeltaPayload
objectIncremental message content delta for one content block.
- additionalProperties
false (closed)
Fields
- contentBlockIndexRequiredintegerformat: int32
Zero-based index of the content block receiving the delta.
- minimum
0
- minimum
- textDeltaOptionalstring
Incremental text appended to the targeted content block.
Event catalog
FactoryResponseEventMessagePayload
FactoryResponseEventMessagePayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventMessagePayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"role": "example-role",
"contentBlocks": []
}
FactoryResponseEventMessagePayload
objectMessage snapshot payload with typed content blocks.
- additionalProperties
false (closed)
Fields
- roleRequiredstring
Message role such as assistant or user.
Ordered typed content blocks for the message snapshot.
- minItems
1
- minItems
- partialOptionalboolean
When true, the snapshot carries bounded timeout or cancellation capture and must not be treated as an authoritative final response.
Event catalog
FactoryResponseEventPlanPayload
FactoryResponseEventPlanPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventPlanPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
FactoryResponseEventPlanPayload
objectPublished plan update payload.
- additionalProperties
false (closed)
Fields
Ordered plan steps when emitting a plan snapshot.
- summaryOptionalstring
Optional plan summary text.
Event catalog
FactoryResponseEventProgressPayload
FactoryResponseEventProgressPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventProgressPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"label": "example-label"
}
FactoryResponseEventProgressPayload
objectCoarse progress notification payload.
- additionalProperties
false (closed)
Fields
- labelRequiredstring
Short progress label for UI or CLI consumers.
- messageOptionalstring
Optional longer progress message.
- percentCompleteOptionalnumberformat: double
Optional completion percentage when known.
- minimum
0 - maximum
100
- minimum
Event catalog
FactoryResponseEventReasoningPayload
FactoryResponseEventReasoningPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventReasoningPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
FactoryResponseEventReasoningPayload
objectReasoning summary snapshot or delta payload.
- additionalProperties
false (closed)
Fields
- summaryOptionalstring
Full reasoning summary text when emitting a snapshot.
- summaryDeltaOptionalstring
Incremental reasoning summary text when emitting a delta.
Event catalog
FactoryResponseEventRunPayload
FactoryResponseEventRunPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventRunPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
FactoryResponseEventRunPayload
objectRun-scoped lifecycle metadata payload.
- additionalProperties
false (closed)
Fields
- statusOptionalstring
Run lifecycle status when applicable.
Event catalog
FactoryResponseEventSessionPayload
FactoryResponseEventSessionPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventSessionPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
FactoryResponseEventSessionPayload
objectSession-scoped lifecycle and capability metadata payload.
- additionalProperties
false (closed)
Fields
- statusOptionalstring
Session lifecycle status when applicable.
Event catalog
FactoryResponseEventStreamGapPayload
FactoryResponseEventStreamGapPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventStreamGapPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"fromSequence": 0,
"toSequence": 0,
"firstAvailableSequence": 1
}
FactoryResponseEventStreamGapPayload
Discontinuity marker for either unavailable retained response-event sequences or an affected provider item whose lifecycle could not be fully observed. Retention gaps include fromSequence, toSequence, and firstAvailableSequence; item-scoped gaps include affectedItemId and reason. The alternatives are exclusive so empty, partial, and mixed payloads are rejected.
Event catalog
FactoryResponseEventToolDeltaPayload
FactoryResponseEventToolDeltaPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventToolDeltaPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"toolCallId": "example-toolCallId",
"outputDelta": "example-outputDelta"
}
FactoryResponseEventToolDeltaPayload
objectIncremental tool output delta payload.
- additionalProperties
false (closed)
Fields
- toolCallIdRequiredstring
Stable tool call identifier receiving output.
- outputDeltaRequiredstring
Incremental tool output text.
Event catalog
FactoryResponseEventToolPayload
FactoryResponseEventToolPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventToolPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{
"toolCallId": "example-toolCallId",
"toolName": "example-toolName"
}
FactoryResponseEventToolPayload
objectTool lifecycle metadata with bounded argument and result summaries.
- additionalProperties
false (closed)
Fields
- toolCallIdRequiredstring
Stable tool call identifier within the run.
- toolNameRequiredstring
Declared tool name for the invocation.
- statusOptionalstring
Tool lifecycle status when applicable.
- argumentsSummaryOptionalobject
Bounded summary of tool arguments. Not a raw provider protocol payload.
- additionalProperties
true (open)
- additionalProperties
- resultSummaryOptionalobject
Bounded summary of tool results. Not a raw provider protocol payload.
- additionalProperties
true (open)
- additionalProperties
Event catalog
FactoryResponseEventTurnPayload
FactoryResponseEventTurnPayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventTurnPayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
FactoryResponseEventTurnPayload
objectTurn-scoped lifecycle metadata payload.
- additionalProperties
false (closed)
Fields
- turnIndexOptionalintegerformat: int32
Zero-based turn index within the run when applicable.
- minimum
0
- minimum
- statusOptionalstring
Turn lifecycle status when applicable.
Event catalog
FactoryResponseEventUsagePayload
FactoryResponseEventUsagePayload example
Corpus-constructed examplejsonPayload-only FactoryResponseEventUsagePayload body. Field names and enums come from packaged OpenAPI; values are minimal corpus-constructed placeholders when OpenAPI omits an authored example.
{}
FactoryResponseEventUsagePayload
objectToken or model usage accounting payload.
- additionalProperties
false (closed)
Fields
- inputTokensOptionalintegerformat: int64
Reported input token count when available.
- minimum
0
- minimum
- outputTokensOptionalintegerformat: int64
Reported output token count when available.
- minimum
0
- minimum
- totalTokensOptionalintegerformat: int64
Reported total token count when available.
- minimum
0
- minimum
- modelOptionalstring
Model identifier associated with the usage report.
Linked component schemas
Nested component schemas referenced from the FactoryEvent and FactoryResponseEvent catalogs above. These shapes come from packaged OpenAPI so deep links and SchemaRefLinks resolve on this page.
AgentRunToolDiagnosticEntry
AgentRunToolDiagnosticEntry
objectBounded summary for one agent tool lifecycle event.
- additionalProperties
false (closed)
Fields
- toolNameOptionalstring
Tool name invoked by the agent loop.
- phaseOptionalstring
Tool lifecycle phase such as start, success, failure, or denied.
- detailOptionalstring
Safe diagnostic detail without raw process output or secrets.
AgentRunTranscriptEntry
AgentRunTranscriptEntry
objectBounded transcript metadata for one agent-loop message without exposing full prompt bodies.
- additionalProperties
false (closed)
Fields
- roleOptionalstring
Message role such as system, user, assistant, or tool.
- summaryOptionalstring
Bounded summary of the message content for inspection.
AgentWorkerToolPolicy
AgentWorkerToolPolicy
stringExplicit tool execution policy for AGENT_WORKER agent loops. DISABLED runs the harness in no-tools mode. READ_ONLY exposes bounded filesystem read tools. ENABLED adds bounded filesystem write capability for the first supported tool set.
- enum
"DISABLED" | "READ_ONLY" | "ENABLED"
AgentWorkerToolsConfig
AgentWorkerToolsConfig
objectExplicit agent-loop tool policy for AGENT_WORKER definitions. Tool execution stays disabled unless this block is present with a non-DISABLED policy.
- additionalProperties
false (closed)
Fields
Required executor policy for agent-loop tool use on this worker.
BundledFile
BundledFile
objectOne explicit portable bundled file entry carried by the factory portability manifest. SCRIPT files target factory/scripts/..., DOC files target factory/docs/..., INPUT files target factory/inputs/<work-type>/<channel>/..., and ROOT_HELPER files target supported project-root helper paths such as Makefile only when declared explicitly in bundledFiles. Export and flatten do not auto-discover project-root helpers. In v1 shared-factory exports, INPUT entries encode a share-time snapshot of starter work that is copied into the recipient factory as detached seeded work.
- additionalProperties
false (closed)
Fields
- idOptionalstring
Durable bundled-file identifier used by portable layout and graph editor references. When omitted on input, the canonical targetPath is materialized as the stable identifier.
- typeRequiredstring
Portable file class. SCRIPT entries target factory/scripts/..., DOC entries target factory/docs/..., INPUT entries target factory/inputs/<work-type>/<channel>/..., and ROOT_HELPER entries target supported project-root helper files such as Makefile only when explicitly declared in bundledFiles. Shared-factory INPUT entries snapshot current source inputs at share time instead of creating a live link.
- enum
"SCRIPT" | "DOC" | "INPUT" | "ROOT_HELPER"
- enum
- targetPathRequiredstring
Canonical factory-relative restoration target for the bundled file. Absolute paths, backslash-separated paths, and paths that require dot-segment normalization are rejected.
BundledFileContent
BundledFileContent
objectInline content payload for a portable bundled file.
- additionalProperties
false (closed)
Fields
- encodingRequiredstring
Declared content encoding for the inline payload. V1 bundled files use UTF-8 text content.
- enum
"utf-8"
- enum
- inlineRequiredstring
Inline bundled file content carried in the manifest. SCRIPT and DOC files under factory/scripts/ and factory/docs/ may be discovered during flatten, but supported root helper paths such as Makefile are bundled only when they appear as explicit ROOT_HELPER entries in bundledFiles.
CheckpointResumabilityStatus
CheckpointResumabilityStatus
stringWhether a recorded checkpoint can be used to resume session execution.
- enum
"RESUMABLE" | "NOT_RESUMABLE" | "UNKNOWN"
ClassificationRoute
ClassificationRoute
object- additionalProperties
false (closed)
Fields
- labelRequiredstring
Case-sensitive classifier label that must match the trimmed classifier output exactly.
One or more authored destinations emitted when this classifier label is selected.
Diagnostics
Diagnostics
object- additionalProperties
false (closed)
Fields
- notesOptionalarray
- workersOptionalobject
- additionalProperties
/components/schemas/SafeWorkDiagnostics
- additionalProperties
DispatchConsumedWorkRef
DispatchConsumedWorkRef
objectOrdered reference to one consumed work item on a dispatch boundary. Dispatch-request payloads keep only the consumed work identity here; work type, trace, display, and other work facts must be derived from prior WORK_REQUEST events plus FactoryEvent.context.
- additionalProperties
false (closed)
Fields
- workIdRequiredstring
Canonical work identity for one consumed dispatch input.
DispatchReconciliationSource
DispatchReconciliationSource
stringSource that produced a dispatch reconciliation fact.
- enum
"STREAM_REPLAY" | "PROVIDER_SESSION" | "DURABLE_STATE" | "RUNTIME_RECONCILER"
DispatchRequestEventMetadata
DispatchRequestEventMetadata
objectOptional non-identity dispatch metadata retained on dispatch-request events. Request, trace, work, and dispatch identity must remain on FactoryEvent.context rather than reappearing here.
- additionalProperties
false (closed)
Fields
- replayKeyOptionalstring
Stable replay correlation key for recorded dispatch reconstruction.
Factory
Factory
objectTop-level factory.json contract. Declare the work types, resources, portability resources, workers, and workstations that make up one authored factory here. Guarded loop breakers should be authored as guarded LOGICAL_MOVE workstations using VISIT_COUNT guards instead of a top-level exhaustion-rules field.
- additionalProperties
false (closed)
Fields
Optional localized customer-facing explanation of this Factory.
- idOptionalstring
Factory identifier used as the factory-level template context fallback.
Default runner selection for the factory when a workstation does not declare its own runner override.
- factoryDirectoryOptionalstring
Directory that contained the factory.json used for this serialized runtime config.
- sourceDirectoryOptionalstring
Original source directory for record/replay and drift diagnostics.
Server-managed current-factory version metadata. Clients should echo this value on complete replacement saves when they want stale-write detection, but durable factory configuration does not treat it as customer-authored topology.
Free-form factory-level metadata carried through runtime serialization and replay diagnostics.
Authored orchestrator identity for this factory. When omitted, existing Petri factories load through compatibility defaulting to orchestrator.kind = PETRI.
Named input kinds accepted by the factory. The default input type is implicit and must not be declared.
Optional factory-authored invocation primary-result policy shared by CLI and API entrypoints. When omitted, runtimes use the SUBMITTED_WORK_TERMINAL fallback and return the first terminal content for the work item originally submitted by the invocation.
Optional canonical callable argument contract shared by CLI, API, dashboard, docs, and packaged factories. When omitted, callers use the factory's compatibility invocation behavior.
Ordered runnable invocation examples. Canonical Factory documents write examples here; legacy invocationSignature.examples are accepted only by the Factory input compatibility mapper.
Root-level guards that apply across the factory instead of one specific workstation or input.
Customer-authored work item categories and the lifecycle states each one can occupy.
Shared capacity pools that workers or workstations can consume while work is executing.
Optional portability manifest for validation-only external tools and portable bundled files. During v1 factory sharing, bundled INPUT files represent a share-time snapshot of the source factory's current inputs work so recipients restore detached starter-work copies that no longer sync back to the original factory. This contract is distinct from runtime-capacity resources.
Optional non-executable graph editor layout metadata keyed by canonical graph node and edge ids.
Reusable worker definitions that workstations reference by name when dispatching work.
Processing steps that consume work, invoke workers, and emit the next work states.
FactoryArtifact
FactoryArtifact
object- additionalProperties
false (closed)
Fields
- idRequiredstring
Stable artifact identifier referenced by session projections.
- labelOptionalstring
Customer-visible artifact label.
- summaryOptionalstring
Customer-visible artifact summary.
- contentHashOptionalstring
Stable hash of the stored artifact payload.
- sizeBytesOptionalintegerformat: int64
Stored artifact payload size in bytes.
FactoryArtifactAuditMode
FactoryArtifactAuditMode
stringAudit mode applied when one factory artifact was captured.
- enum
"NONE" | "REDACTED" | "FULL"
FactoryArtifactCaptureMetadata
FactoryArtifactCaptureMetadata
object- additionalProperties
false (closed)
Fields
- capturedAtOptionalstringformat: date-time
Timestamp when the artifact payload was captured.
- sourceDispatchIdOptionalstring
Dispatch identifier that produced the artifact when applicable.
- mimeTypeOptionalstring
MIME type of the stored artifact payload when known.
FactoryArtifactKind
FactoryArtifactKind
stringCanonical factory artifact kind for session-owned outputs.
- enum
"FINAL_RESULT" | "CHILD_RESULT" | "FINDING" | "PATCH" | "LOG" | "DATASET" | "CHECKPOINT" | "WORKTREE_SUMMARY"
FactoryArtifactRedactionCounts
FactoryArtifactRedactionCounts
object- additionalProperties
false (closed)
Fields
- secretsOptionalintegerformat: int32
- minimum
0
- minimum
- pathsOptionalintegerformat: int32
- minimum
0
- minimum
- tokensOptionalintegerformat: int32
- minimum
0
- minimum
FactoryArtifactRef
FactoryArtifactRef
object- additionalProperties
false (closed)
Fields
- idRequiredstring
Stable artifact identifier referenced by session projections.
- contentHashOptionalstring
Stable hash of the stored artifact payload.
- sizeBytesOptionalintegerformat: int64
Stored artifact payload size in bytes.
FactoryArtifactVisibility
FactoryArtifactVisibility
stringVisibility boundary for one factory artifact projection.
- enum
"PUBLIC" | "INTERNAL_CHECKPOINT"
FactoryDispatchKind
FactoryDispatchKind
stringCanonical dispatch kind shared across Petri transitions and JavaScript workflow tasks.
- enum
"PETRI_TRANSITION" | "JAVASCRIPT_AGENT" | "JAVASCRIPT_VERIFY" | "JAVASCRIPT_SYNTHESIZE" | "JAVASCRIPT_TOOL" | "JAVASCRIPT_SCRIPT" | "JAVASCRIPT_SYSTEM"
FactoryDispatchStatus
FactoryDispatchStatus
stringCanonical dispatch lifecycle status shared across orchestrators.
- enum
"QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "INTERRUPTED"
FactoryDispatchUsage
FactoryDispatchUsage
object- additionalProperties
false (closed)
Fields
- inputTokensOptionalintegerformat: int64
- minimum
0
- minimum
- outputTokensOptionalintegerformat: int64
- minimum
0
- minimum
- totalTokensOptionalintegerformat: int64
- minimum
0
- minimum
- costUsdOptionalnumberformat: double
- minimum
0
- minimum
- durationMillisOptionalintegerformat: int64
- minimum
0
- minimum
- retryCountOptionalintegerformat: int32
- minimum
0
- minimum
FactoryDispatchWarning
FactoryDispatchWarning
object- additionalProperties
false (closed)
Fields
- codeRequiredstring
Stable warning code for the dispatch projection.
- messageRequiredstring
Customer-visible warning message.
FactoryEventSessionResultStatus
FactoryEventSessionResultStatus
stringCustomer-visible session result availability for result update events.
- enum
"NOT_READY" | "PARTIAL" | "FINAL" | "FAILED_WITH_PARTIAL" | "UNAVAILABLE"
FactoryGuard
FactoryGuard
objectFactory-level guard attached at the root factory definition.
- additionalProperties
false (closed)
Fields
Factory-level guard condition to evaluate before dispatch-ready transitions can proceed.
Provider whose inference-throttle history controls this factory-level guard.
- modelOptionalstring
Optional model name to scope throttling more narrowly than the provider-level window.
- refreshWindowRequiredstring
Duration string that controls how long the factory should keep re-checking throttle history before allowing the lane again.
FactoryGuardType
FactoryGuardType
stringFactory-level guard condition attached at the root factory definition.
- enum
"INFERENCE_THROTTLE_GUARD"
FactoryInvocationArguments
FactoryInvocationArguments
objectStructured Factory invocation arguments keyed by parameter name, external name, or alias. Each value is either one string or an ordered array of strings.
- additionalProperties
true (open)
FactoryInvocationExample
FactoryInvocationExample
objectOne example invocation for docs, help, and packaged-factory inspection.
- additionalProperties
false (closed)
Fields
- nameRequiredstring
Stable example name.
- minLength
1
- minLength
Localized customer-facing explanation of what the example does.
Structured invocation arguments; values are never parsed or executed while loading the Factory.
FactoryInvocationOutputContract
FactoryInvocationOutputContract
objectCustomer-facing output hint for a factory invocation signature.
- additionalProperties
false (closed)
Fields
High-level output contract mode exposed to callers.
- pathParameterOptionalstring
Parameter name that controls the destination path when the factory writes output to disk.
- contentTypeOptionalstring
Output media type hint for docs, API consumers, and dashboard affordances.
- fileExtensionOptionalstring
Suggested file extension when the output mode writes a file.
- descriptionOptionalstring
Human-readable summary of the primary output contract.
FactoryInvocationOutputContractMode
FactoryInvocationOutputContractMode
stringHigh-level output shape hint exposed by a factory invocation signature.
- enum
"INLINE" | "FILE" | "JSON"
FactoryInvocationParameter
FactoryInvocationParameter
objectOne canonical invocation parameter declared on a factory.
- additionalProperties
false (closed)
Fields
- nameRequiredstring
Internal canonical parameter name used for normalized argument maps and interpolation.
- descriptionOptionalstring
Customer-facing description rendered in help, docs, and form controls.
- externalNameOptionalstring
Preferred named-argument key shown to callers, such as `output`.
- aliasesOptionalarray
Additional accepted named-argument keys that normalize to this parameter.
String-first hint that guides parsing, docs, and dashboard form selection.
Declares whether the parameter consumes one value, repeated values, variadic values, or file contents.
- requiredOptionalboolean
When true, invocation normalization must reject requests that omit this parameter.
- sensitiveOptionalboolean
When true, diagnostics must preserve names and source metadata but redact concrete values.
- choicesOptionalarray
Optional allowed string values for this parameter.
- defaultValueOptionalstring
Default string value used when an omitted parameter resolves to one effective value.
- defaultValuesOptionalarray
Default string values used when an omitted parameter resolves to multiple effective values.
Accepted invocation bindings for this parameter across positional, named, and stdin sources.
FactoryInvocationParameterBinding
FactoryInvocationParameterBinding
objectOne public binding that exposes a parameter to callers.
- additionalProperties
false (closed)
Fields
Binding kind used to route invocation input into the parameter.
- positionOptionalinteger
1-based positional slot used when kind is POSITIONAL.
- minimum
1
- minimum
FactoryInvocationParameterBindingKind
FactoryInvocationParameterBindingKind
stringPublic invocation binding kinds supported by factory signatures.
- enum
"POSITIONAL" | "NAMED" | "STDIN" | "NAMED_REST"
FactoryInvocationParameterTypeHint
FactoryInvocationParameterTypeHint
stringString-first parsing and UI hint for one factory invocation parameter.
- enum
"STRING" | "PATH" | "FILE_PATH" | "DIRECTORY_PATH" | "NUMBER_STRING" | "BOOLEAN_STRING"
FactoryInvocationParameterValueMode
FactoryInvocationParameterValueMode
stringDeclares how one invocation parameter consumes one or more string values.
- enum
"EXACT" | "REPEATED" | "VARIADIC" | "FILE_CONTENTS"
FactoryInvocationSignature
FactoryInvocationSignature
objectCanonical callable argument contract for invoking one factory. When present, CLI, API, dashboard, docs, and packaged-factory surfaces should discover and normalize invocation inputs from this shared schema instead of transport- or factory-specific argument definitions.
- additionalProperties
false (closed)
Fields
Declared invocation parameters keyed by canonical parameter name.
Policy for named inputs that do not match any declared parameter binding.
Optional customer-facing hint for the factory's primary output shape.
FactoryInvocationUnknownNamedArgumentPolicy
FactoryInvocationUnknownNamedArgumentPolicy
stringPolicy for named inputs that do not match any declared parameter binding.
- enum
"REJECT" | "ALLOW" | "COLLECT"
FactoryLayout
FactoryLayout
objectNon-executable portable graph editor layout metadata keyed by canonical graph ids.
- additionalProperties
false (closed)
Fields
- schemaVersionRequiredintegerformat: int32
Portable layout contract schema version. Version 1 is the initial public layout contract.
- minimum
1
- minimum
Optional authored graph node geometry keyed by canonical graph node id.
Optional authored graph edge geometry keyed by canonical graph edge id.
Optional flat background groups keyed independently from topology.
Optional inert positioned notes and embedded-raster images that decorate the canvas without becoming graph topology.
FactoryLayoutAnnotation
FactoryLayoutAnnotation
objectInert positioned canvas annotation. Its kind selects either note or image content; annotations never identify graph nodes or edges, and connection-like fields are invalid.
- additionalProperties
false (closed)
Fields
- idRequiredstring
Stable annotation identifier unique within this layout.
- pattern
\S - minLength
1
- pattern
FactoryLayoutAnnotationKind
FactoryLayoutAnnotationKind
stringThe inert annotation content variant.
- enum
"NOTE" | "IMAGE"
FactoryLayoutAnnotationPosition
FactoryLayoutAnnotationPosition
objectExplicit finite annotation position in canvas units. Each coordinate is bounded to keep portable layout metadata safe to render.
- additionalProperties
false (closed)
Fields
- xRequirednumber
Horizontal canvas coordinate between -100,000 and 100,000 inclusive.
- minimum
-100000 - maximum
100000
- minimum
- yRequirednumber
Vertical canvas coordinate between -100,000 and 100,000 inclusive.
- minimum
-100000 - maximum
100000
- minimum
FactoryLayoutAnnotationSize
FactoryLayoutAnnotationSize
objectOptional finite annotation dimensions in canvas units. Image annotations require this size; note annotations may omit it.
- additionalProperties
false (closed)
Fields
- widthRequirednumber
Positive authored width no greater than 10,000 canvas units.
- minimum
0 - maximum
10000
- minimum
- heightRequirednumber
Positive authored height no greater than 10,000 canvas units.
- minimum
0 - maximum
10000
- minimum
FactoryLayoutBounds
FactoryLayoutBounds
objectAuthored rectangular bounds in graph canvas units.
- additionalProperties
false (closed)
Fields
- xRequirednumber
Left graph layout coordinate.
- yRequirednumber
Top graph layout coordinate.
- widthRequirednumber
Authored group width.
- heightRequirednumber
Authored group height.
FactoryLayoutEdge
FactoryLayoutEdge
objectPortable graph edge layout keyed by canonical graph edge id.
- additionalProperties
false (closed)
Fields
- idRequiredstring
Canonical graph edge id such as workstation-output:workstation:review->work-state:task:done.
Optional authored intermediate edge points in graph canvas space.
FactoryLayoutEmptyState
FactoryLayoutEmptyState
objectInert presentation content for one canonical topology node when it has no live activity. It is definition metadata only and does not create events or runtime behavior.
- additionalProperties
false (closed)
Fields
- textOptionalstring
Literal empty-state text. It is not rendered as HTML or Markdown.
- pattern
\S - minLength
1 - maxLength
500
- pattern
FactoryLayoutGroup
FactoryLayoutGroup
objectPortable background grouping metadata for graph canvas presentation.
- additionalProperties
false (closed)
Fields
- idRequiredstring
Stable authored group id for future layout editing.
- labelOptionalstring
Optional visible group label.
- nodeIdsRequiredarray
Canonical graph node ids visually contained by this group.
- parentGroupIdOptionalstringnullable
Reserved for future nested groups. Omit or set null for flat groups.
- colorOptionalstring
Optional authored group accent or fill color.
- lockedOptionalboolean
Optional authored group lock flag for future editor affordances.
FactoryLayoutImage
FactoryLayoutImage
objectInert embedded-raster image content with required alternative text.
- additionalProperties
false (closed)
Fields
- alternativeTextRequiredstring
Literal alternative text for the embedded image.
- pattern
\S - minLength
1 - maxLength
500
- pattern
FactoryLayoutImageSource
FactoryLayoutImageSource
objectExtensible discriminated image-source shape. Version 1 supports only embedded raster data.
- additionalProperties
false (closed)
Fields
- kindRequiredstring
Source variant discriminator. EMBEDDED carries portable base64 raster data.
- enum
"EMBEDDED"
- enum
- mediaTypeRequiredstring
Declared media type for the embedded raster.
- enum
"image/png" | "image/jpeg" | "image/webp"
- enum
- dataRequiredstringformat: byte
Strict padded base64 payload for the embedded raster source, limited to 2 MiB after decoding.
- minLength
4 - maxLength
2796204
- minLength
FactoryLayoutNode
FactoryLayoutNode
objectPortable graph node layout keyed by canonical graph node id.
- additionalProperties
false (closed)
Fields
- idRequiredstring
Canonical graph node id such as workstation:<workstationId>.
- pattern
\S - minLength
1
- pattern
- lockedOptionalboolean
Optional authored node lock flag for future editor affordances.
FactoryLayoutNote
FactoryLayoutNote
objectLiteral plain-text note content. Line breaks are preserved as authored text and are not interpreted as Markdown or HTML.
- additionalProperties
false (closed)
Fields
- titleOptionalstring
Optional literal plain-text note title.
- maxLength
160
- maxLength
- bodyRequiredstring
Required literal plain-text note body.
- pattern
\S - minLength
1 - maxLength
4000
- pattern
FactoryLayoutNoteTone
FactoryLayoutNoteTone
stringPresentation-only tone for a note annotation.
- enum
"NEUTRAL" | "ACCENT" | "INFO" | "SUCCESS" | "WARNING" | "DANGER"
FactoryLayoutPoint
FactoryLayoutPoint
objectTwo-dimensional authored graph layout coordinate.
- additionalProperties
false (closed)
Fields
- xRequirednumber
Horizontal graph layout coordinate in authored canvas space.
- yRequirednumber
Vertical graph layout coordinate in authored canvas space.
FactoryLayoutPreferences
FactoryLayoutPreferences
objectPortable graph display defaults that do not alter factory topology.
- additionalProperties
false (closed)
Fields
- directionOptionalstring
Preferred authored graph direction for portable layout rendering.
- enum
"UP" | "DOWN" | "LEFT" | "RIGHT"
- enum
FactoryLayoutSize
FactoryLayoutSize
objectAuthored node size in graph canvas units.
- additionalProperties
false (closed)
Fields
- widthRequirednumber
Authored node width.
- heightRequirednumber
Authored node height.
FactoryLayoutViewport
FactoryLayoutViewport
objectShared authored graph camera position.
- additionalProperties
false (closed)
Fields
- xRequirednumber
Authored viewport horizontal offset.
- yRequirednumber
Authored viewport vertical offset.
- zoomRequirednumber
Authored viewport zoom factor.
FactoryName
FactoryName
stringCustomer-facing identifier for one stored named factory. `GET /factory-sessions/~default/factory` may also return the reserved `UNDEFINED` identifier when the active runtime is still the default root factory and no durable current-factory pointer exists. Semantic validation failures return `INVALID_FACTORY_NAME`, including attempts to activate a named factory with the reserved identifier.
- pattern
^(UNDEFINED|[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)$ - minLength
1
FactoryOrchestrator
FactoryOrchestrator
objectAuthored orchestrator identity for one factory. When omitted, existing Petri factories load through compatibility defaulting to orchestrator.kind = PETRI.
- additionalProperties
false (closed)
Fields
Petri-specific orchestrator configuration. Required only when kind = PETRI and additional Petri options are authored.
JavaScript-specific orchestrator configuration. Required when kind = JAVASCRIPT.
FactoryOrchestratorJavaScriptAgent
FactoryOrchestratorJavaScriptAgent
objectDefault worker selection for one named JavaScript child-agent role.
- additionalProperties
false (closed)
Fields
- presetRequiredstring
Operator worker preset inherited by child calls using this agent id.
- minLength
1
- minLength
FactoryOrchestratorJavaScriptConfig
FactoryOrchestratorJavaScriptConfig
objectJavaScript-specific orchestrator configuration. JavaScript factories do not require Petri graph fields and instead declare workflow source identity, metadata, args schema, and default policy here.
- additionalProperties
false (closed)
Fields
- dialectOptionalstring
Optional JavaScript dialect label for the authored workflow source.
- sourceRefOptionalstring
Factory-relative or authored reference to the workflow source file.
Inline workflow source when the factory carries source text directly.
- sourceHashOptionalstring
Optional content hash for the resolved workflow source.
- entrypointOptionalstring
Optional exported entrypoint or phase name used to start the workflow.
Free-form JavaScript orchestrator metadata for authoring and diagnostics.
- argsSchemaOptionalobject
JSON Schema object describing workflow invocation arguments.
- additionalProperties
true (open)
- additionalProperties
- defaultPolicyOptionalobject
Default JavaScript workflow policy object applied when no runtime override exists.
- additionalProperties
true (open)
- additionalProperties
- agentsOptionalobject
Named child-agent roles and their operator worker preset defaults.
- additionalProperties
/components/schemas/FactoryOrchestratorJavaScriptAgent
- additionalProperties
FactoryOrchestratorJavaScriptInlineSource
FactoryOrchestratorJavaScriptInlineSource
objectInline JavaScript workflow source carried directly in the factory definition.
- additionalProperties
false (closed)
Fields
- encodingRequiredstring
Declared content encoding for the inline workflow source.
- enum
"utf-8"
- enum
- inlineRequiredstring
Inline JavaScript workflow source text.
FactoryOrchestratorKind
FactoryOrchestratorKind
stringAuthored orchestration engine for one factory. PETRI factories use the existing Petri graph semantics. JAVASCRIPT factories use workflow source identity and policy instead of Petri graph fields.
- enum
"PETRI" | "JAVASCRIPT"
FactoryOrchestratorPetriConfig
FactoryOrchestratorPetriConfig
objectPetri-specific orchestrator configuration. Existing Petri factories may omit this block and rely on compatibility defaulting to orchestrator.kind = PETRI.
- additionalProperties
false (closed)
FactoryResponseEventCapabilities
FactoryResponseEventCapabilities
objectDeclares which response-event features a provider session supports. Adapters publish capability flags so consumers can interpret fidelity and phase availability without depending on provider-native schemas.
- additionalProperties
false (closed)
Fields
- nativeStreamingRequiredboolean
Provider session exposes native streaming observation.
- messageDeltasRequiredboolean
Provider session can emit incremental message deltas.
- messageSnapshotsRequiredboolean
Provider session can emit message snapshots.
- reasoningSummariesRequiredboolean
Provider session can emit reasoning summaries or deltas.
- toolLifecycleRequiredboolean
Provider session can emit tool lifecycle metadata.
- toolOutputDeltasRequiredboolean
Provider session can emit incremental tool output deltas.
- fileChangesRequiredboolean
Provider session can emit observed file changes.
- plansRequiredboolean
Provider session can emit plan updates.
- usageRequiredboolean
Provider session can emit usage accounting.
- stableItemIdsRequiredboolean
Provider session assigns stable item identifiers across events.
- providerReconnectRequiredboolean
Provider session supports reconnect after stream interruption.
FactoryResponseEventContentBlock
FactoryResponseEventContentBlock
One typed slice of assistant-visible message content. Discriminated by the content block kind field.
oneOf
- /components/schemas/FactoryResponseEventTextContentBlock
- /components/schemas/FactoryResponseEventReasoningSummaryContentBlock
- /components/schemas/FactoryResponseEventToolRequestContentBlock
- /components/schemas/FactoryResponseEventImageRefContentBlock
- /components/schemas/FactoryResponseEventResourceRefContentBlock
- /components/schemas/FactoryResponseEventStructuredOutputContentBlock
Discriminator: kind
TEXT/components/schemas/FactoryResponseEventTextContentBlockREASONING_SUMMARY/components/schemas/FactoryResponseEventReasoningSummaryContentBlockTOOL_REQUEST/components/schemas/FactoryResponseEventToolRequestContentBlockIMAGE_REF/components/schemas/FactoryResponseEventImageRefContentBlockRESOURCE_REF/components/schemas/FactoryResponseEventResourceRefContentBlockSTRUCTURED_OUTPUT/components/schemas/FactoryResponseEventStructuredOutputContentBlock
FactoryResponseEventContentBlockKind
FactoryResponseEventContentBlockKind
stringIdentifies one provider-neutral message content block kind.
- enum
"TEXT" | "REASONING_SUMMARY" | "TOOL_REQUEST" | "IMAGE_REF" | "RESOURCE_REF" | "STRUCTURED_OUTPUT"
FactoryResponseEventImageRefContentBlock
FactoryResponseEventImageRefContentBlock
objectImage reference content block.
- additionalProperties
false (closed)
Fields
- enum
"IMAGE_REF"
- enum
- imageRefRequiredstring
Reference to an image artifact or URL.
FactoryResponseEventPlanStep
FactoryResponseEventPlanStep
objectOne step in a published plan snapshot.
- additionalProperties
false (closed)
Fields
- idRequiredstring
Stable plan step identifier.
- descriptionRequiredstring
Human-readable step description.
- statusOptionalstring
Plan step status when applicable.
FactoryResponseEventProvenanceDelivery
FactoryResponseEventProvenanceDelivery
stringHow the response event entered the Factory vocabulary.
- enum
"NATIVE_STREAM" | "NATIVE_FINAL" | "SYNTHESIZED" | "REPLAY"
FactoryResponseEventProvenanceFidelity
FactoryResponseEventProvenanceFidelity
stringHow closely the public payload preserves provider detail.
- enum
"LOSSLESS" | "NORMALIZED" | "LOSSY" | "FINAL_ONLY" | "LIFECYCLE_ONLY"
FactoryResponseEventProvenanceRepresentation
FactoryResponseEventProvenanceRepresentation
stringShape fidelity model used for the public payload.
- enum
"DELTA" | "SNAPSHOT" | "NOTIFICATION"
FactoryResponseEventReasoningSummaryContentBlock
FactoryResponseEventReasoningSummaryContentBlock
objectReasoning summary text content block.
- additionalProperties
false (closed)
Fields
- enum
"REASONING_SUMMARY"
- enum
- textRequiredstring
Reasoning summary text.
FactoryResponseEventResourceRefContentBlock
FactoryResponseEventResourceRefContentBlock
objectFactory resource reference content block.
- additionalProperties
false (closed)
Fields
- enum
"RESOURCE_REF"
- enum
- resourceRefRequiredstring
Reference to a factory resource or artifact.
FactoryResponseEventStructuredOutputContentBlock
FactoryResponseEventStructuredOutputContentBlock
objectStructured JSON output content block.
- additionalProperties
false (closed)
Fields
- enum
"STRUCTURED_OUTPUT"
- enum
- structuredOutputRequiredobject
Structured JSON output value.
- additionalProperties
true (open)
- additionalProperties
FactoryResponseEventTextContentBlock
FactoryResponseEventTextContentBlock
objectInline text content block.
- additionalProperties
false (closed)
Fields
- enum
"TEXT"
- enum
- textRequiredstring
Inline text content.
FactoryResponseEventToolRequestContentBlock
FactoryResponseEventToolRequestContentBlock
objectTool invocation request content block with bounded argument summary.
- additionalProperties
false (closed)
Fields
- enum
"TOOL_REQUEST"
- enum
- toolCallIdRequiredstring
Stable tool call identifier within the message.
- toolNameRequiredstring
Declared tool name for the invocation request.
- argumentsSummaryOptionalobject
Bounded summary of tool arguments. Not a raw provider protocol payload.
- additionalProperties
true (open)
- additionalProperties
FactorySessionDurableLifecycleStatus
FactorySessionDurableLifecycleStatus
stringDurable factory-session lifecycle status returned by execution start routes and later session read models. Live-session runtime statuses remain separate on the existing FactorySessionStatus schema.
- enum
"QUEUED" | "AWAITING_APPROVAL" | "RUNNING" | "PAUSED" | "RESUMING" | "SUCCEEDED" | "FAILED" | "CANCELING" | "CANCELED" | "TIMED_OUT" | "INTERRUPTED" | "TERMINATED"
FactorySessionJavaScriptCheckpointRef
FactorySessionJavaScriptCheckpointRef
object- additionalProperties
false (closed)
Fields
- idRequiredstring
Stable checkpoint identifier referenced by the session runtime.
- labelOptionalstring
Customer-visible checkpoint label.
- timestampOptionalstringformat: date-time
When the checkpoint was recorded.
- summaryOptionalstring
Short customer-visible checkpoint summary without raw VM state.
Orchestrator-owned checkpoint artifact metadata without raw VM state.
FactorySessionJavaScriptChildDispatchCounts
FactorySessionJavaScriptChildDispatchCounts
object- additionalProperties
false (closed)
Fields
- queuedRequiredinteger
Child dispatches waiting to start.
- minimum
0
- minimum
- runningRequiredinteger
Child dispatches currently executing.
- minimum
0
- minimum
- completedRequiredinteger
Child dispatches that have completed.
- minimum
0
- minimum
FactorySessionJavaScriptScriptStatus
FactorySessionJavaScriptScriptStatus
stringJavaScript workflow script runtime status for one factory session.
- enum
"IDLE" | "RUNNING" | "PAUSED" | "FINISHED" | "FAILED"
FactorySessionLifecycleControlKind
FactorySessionLifecycleControlKind
stringDurable factory-session lifecycle control operation requested by the client.
- enum
"APPROVE" | "PAUSE" | "RESUME" | "CANCEL" | "TERMINATE" | "RETRY_DISPATCH" | "INTERRUPT_DISPATCH"
FactorySessionLifecycleControlOutcome
FactorySessionLifecycleControlOutcome
stringTyped lifecycle-control outcome. ACCEPTED means the control request was accepted and may complete asynchronously. NO_OP means the session was already in the requested end state. INVALID_STATE means the current session state does not allow the requested control. TERMINAL_SESSION means the session is already terminal and cannot accept the requested control. CONFLICT means another in-flight or incompatible control prevents the request.
- enum
"ACCEPTED" | "NO_OP" | "INVALID_STATE" | "TERMINAL_SESSION" | "CONFLICT"
FactoryState
FactoryState
stringLifecycle state of the running factory.
- enum
"IDLE" | "RUNNING" | "PAUSED" | "COMPLETED" | "FAILED"
FactoryStopDispatchSummary
FactoryStopDispatchSummary
object- additionalProperties
false (closed)
Fields
- dispatchIdRequiredstring
Stable dispatch identifier that most directly explains the stopped state.
- workstationNameOptionalstring
Customer-authored workstation name when one existing workstation run explains the stop.
Failure or interruption detail from the latest relevant dispatch when available.
FactoryStopKind
FactoryStopKind
stringCanonical inspect classification for stopped automation on existing Factory Session and Work surfaces.
- enum
"PAUSED" | "BLOCKED" | "NEEDS_HUMAN" | "INTERRUPTED"
FactoryStopSummary
FactoryStopSummary
object- additionalProperties
false (closed)
Fields
- sessionIdRequiredstring
Stable Factory Session identifier that owns the stopped work.
- workIdOptionalstring
Relevant work identifier when one work item best explains the stop.
- workNameOptionalstring
Relevant work name when one work item best explains the stop.
- workTypeNameOptionalstring
Relevant work type name when one work item best explains the stop.
- workStateOptionalstring
Current authored work state label such as `goal:blocked` when one work item best explains the stop.
Session lifecycle-control status when the stop is explained by pause or another session-level lifecycle condition.
- latestResultSummaryOptionalstring
Short operator-readable summary of the latest relevant result when one explains the stop better than a dispatch identifier alone.
- suggestedRecoverySurfaceOptionalstring
Existing operator surface to use next, expressed with current Factory Session and Work vocabulary rather than a goal-specific control route.
- suggestedRecoveryActionOptionalstring
Human-readable next step that names the existing work or session action the operator should take to recover or continue automation.
FailureDetail
FailureDetail
object- additionalProperties
false (closed)
Fields
- messageRequiredstring
Customer-safe, actionable explanation of the failure.
- minLength
1
- minLength
GuardMatchConfig
GuardMatchConfig
object- additionalProperties
false (closed)
Fields
- inputKeyRequiredstring
Field selector resolved against each candidate input, such as `.Name` or `.Tags["_last_output"]`.
- minLength
1
- minLength
HostedLinearWorkerClaim
HostedLinearWorkerClaim
objectOptional claim-related configuration that v1 hosted Linear workers explicitly allow.
- additionalProperties
false (closed)
Fields
- assigneeFieldOptionalstring
Linear issue field name to use when deriving optional assignee claim metadata.
HostedLinearWorkerConfig
HostedLinearWorkerConfig
objectProvider-specific poller configuration for the built-in hosted Linear worker.
- additionalProperties
false (closed)
Fields
- pollIntervalOptionalstring
Optional Go duration that controls how often the hosted Linear worker polls for updates.
- teamIdsOptionalarray
Optional Linear team identifiers that bound the poll source.
- stateIdsOptionalarray
Optional Linear issue-state identifiers that bound the poll source.
Deterministic mapping fields for canonical work submission generation.
Optional claim-related configuration that v1 hosted Linear polling allows.
HostedLinearWorkerMapping
HostedLinearWorkerMapping
objectDeterministic issue-to-work mapping fields owned by a hosted Linear worker.
- additionalProperties
false (closed)
Fields
- workTypeOptionalstring
Canonical submitted work type emitted for matched Linear issues.
- stateOptionalstring
Canonical submitted work state emitted for matched Linear issues.
HostedWorkerAuth
HostedWorkerAuth
objectHosted-worker authentication contract. V1 hosted workers accept only secret references rather than inline credentials or OAuth-style fields.
- additionalProperties
false (closed)
Fields
- secretRefOptionalstring
Referenced secret name that resolves the hosted provider API key at runtime.
HostedWorkerProvider
HostedWorkerProvider
stringBuilt-in repository-owned hosted worker providers supported by the public factory-config contract.
- enum
"LINEAR"
HybridLogicalTimestamp
HybridLogicalTimestamp
object- additionalProperties
false (closed)
Fields
- logicalRequiredstringformat: int64
Monotonic Lamport-style logical component derived from the persisted factory definition version. Serialized as a decimal string so JavaScript clients can round-trip the 64-bit value without precision loss.
- pattern
^[0-9]+$
- pattern
- physicalRequiredstringformat: date-time
UTC physical timestamp component for the persisted factory definition version.
InferenceOutcome
InferenceOutcome
stringResult category returned by a provider inference attempt.
- enum
"SUCCEEDED" | "FAILED"
InputGuard
InputGuard
objectGuard attached to one specific workstation input.
- additionalProperties
false (closed)
Fields
Guard condition to evaluate for this input-level attachment.
- workstationOptionalstring
For `VISIT_COUNT` guards, the workstation whose visits are counted.
- maxVisitsOptionalinteger
For `VISIT_COUNT` guards, the visit threshold.
- minimum
1
- minimum
For `MATCHES_FIELDS` guards, the field-selector configuration used to compare candidate inputs.
- parentInputOptionalstring
For parent-aware input guards, the parent workType name from another input in the same workstation.
- matchInputOptionalstring
For `SAME_NAME` and `SAME_TRACE_ID` input guards, the peer input workType name from another input in the same workstation.
- spawnedByOptionalstring
For dynamic fanout input guards, the workstation that spawns the children for count tracking.
InputGuardType
InputGuardType
stringGuard condition attached to one specific workstation input.
- enum
"VISIT_COUNT" | "ALL_CHILDREN_COMPLETE" | "ANY_CHILD_FAILED" | "SAME_NAME" | "SAME_TRACE_ID"
InputKind
InputKind
stringKinds of input. `DEFAULT` passes opaque input through to workstations as-is.
- enum
"DEFAULT"
InputType
InputType
objectDeclared types of inputs. Used to force the inputs of a certain work type to be of a certain shape, like a specific JSON structure.
- additionalProperties
false (closed)
Fields
- nameRequiredstring
Input type name. The reserved name "default" is implicit.
InvocationDiagnostic
InvocationDiagnostic
object- additionalProperties
false (closed)
Fields
- signatureHashOptionalstring
InvocationParameterDiagnostic
InvocationParameterDiagnostic
object- additionalProperties
false (closed)
Fields
- nameOptionalstring
- sourceKindsOptionalarray
- valueCountOptionalintegerformat: int64
- minimum
0
- minimum
- redactedOptionalboolean
InvocationReturn
InvocationReturn
objectFactory-authored policy for selecting the primary result returned by CLI and API invocations. When omitted from a Factory, runtimes use the documented SUBMITTED_WORK_TERMINAL fallback.
- additionalProperties
false (closed)
Fields
Return selection policy for this factory.
- workTypeNameOptionalstring
Work type name used by EXPLICIT policy selection.
- terminalStateOptionalstring
Authored terminal state name used by EXPLICIT policy selection.
- workNameOptionalstring
Optional authored work name filter used by EXPLICIT policy selection.
InvocationReturnPolicy
InvocationReturnPolicy
stringPrimary-result selection policy for factory invocation responses. SUBMITTED_WORK_TERMINAL traces the work submitted by the invocation until it reaches its first terminal output. EXPLICIT selects configured work content from the invocation submit scope.
- enum
"SUBMITTED_WORK_TERMINAL" | "EXPLICIT"
LoadableProviderSessionKind
LoadableProviderSessionKind
stringCanonical provider-session identifier kind for provider-session detail requests that can be loaded by the API.
- enum
"session_id"
LoadableProviderSessionProvider
LoadableProviderSessionProvider
stringCanonical provider value for provider-session detail requests that can be loaded by the API.
- enum
"codex" | "cursor"
LoadableProviderSessionRef
LoadableProviderSessionRef
object- additionalProperties
false (closed)
Fields
- idRequiredstring
Provider-session identifier to resolve. This is an identifier, not a filesystem path.
ModelOperation
ModelOperation
objectOne provider-agnostic operation exposed by a model worker, such as `TTS`.
- additionalProperties
false (closed)
Fields
Named operation input slots this worker can consume.
Named operation output slots this worker can produce.
ModelOperationContentType
ModelOperationContentType
stringUppercase content-part categories supported by worker model-operation capability slots.
- enum
"TEXT" | "IMAGE" | "AUDIO" | "JSON" | "BINARY"
ModelOperationName
ModelOperationName
stringUppercase public operation identifier such as `TTS`, `ASR`, or `EMBED`.
- pattern
^[A-Z][A-Z0-9_]*$
ModelOperationSlot
ModelOperationSlot
objectOne named capability slot declared by a model operation.
- additionalProperties
false (closed)
Fields
- nameRequiredstring
Stable slot name used by workstation-side bindings and diagnostics.
Uppercase content types accepted or produced by this slot.
- minItems
1
- minItems
- requiredOptionalboolean
Whether this input slot must be resolved before invocation starts. Output slots omit this field when not needed.
ModelResourceSummary
ModelResourceSummary
objectFields
- nameRequiredstring
Factory-authored resource name.
- capacityRequiredinteger
Declared factory capacity for this resource.
- minimum
0
- minimum
- modelOptionalstring
Concrete model identifier when the resource is model-specific.
- backendOptionalstring
Local runtime backend identifier for model resources.
- loadPolicyOptionalstring
Local load-policy metadata for model resources.
- providerOptionalstring
Cloud provider identity when the resource models quota or routing.
NameValue
NameValue
objectA customer-facing value with a required base fallback and optional exact locale overrides. Locale tags must use their canonical BCP 47 spelling.
- additionalProperties
false (closed)
Fields
- typeRequiredstring
Discriminator for localized customer-facing metadata.
- enum
"LOCALIZABLE_ASSET"
- enum
- valueRequiredstring
Required base value returned when no exact locale override exists.
- minLength
1
- minLength
- localesOptionalarray
Canonical BCP 47 locales for which the base value was authored.
- uniqueItems
true
- uniqueItems
- valuesOptionalobject
Exact canonical BCP 47 locale tags mapped to localized overrides.
- additionalProperties
true (open)
- additionalProperties
- idOptionalstring
Optional stable metadata identifier; consumers must not render it as display copy.
OrchestratorPhaseStatus
OrchestratorPhaseStatus
stringCanonical workflow phase lifecycle status for orchestrator phase events.
- enum
"ACTIVE" | "COMPLETED" | "SKIPPED"
ProviderDiagnostic
ProviderDiagnostic
object- additionalProperties
false (closed)
Fields
- providerOptionalstring
- modelOptionalstring
ProviderFailureMetadata
ProviderFailureMetadata
object- additionalProperties
false (closed)
Fields
ProviderIdentity
ProviderIdentity
stringOpen provider identity used by authored modelProvider fields. Extension identities use lowercase letters and digits separated by dots or hyphens. Built-in identities and documented legacy aliases remain accepted compatibility spellings. For example, `customer.provider` is a valid extension identity.
- pattern
^(?:[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*|ANTIGRAVITY|ANTHROPIC|CLAUDE|CODEX|OPENAI)$ - minLength
1 - maxLength
128
ProviderSessionMetadata
ProviderSessionMetadata
object- additionalProperties
false (closed)
Fields
- providerOptionalstring
- kindOptionalstring
- idOptionalstring
ReasoningEffort
ReasoningEffort
stringOptional provider-neutral reasoning effort. Surrounding whitespace and letter case are normalized. Omit the field to preserve the selected provider and model default. Factory definitions may use an exact invocation-parameter placeholder such as `${executorReasoningEffort}`.
- pattern
^(?:[ - - ]*(?:[mM][iI][nN][iI][mM][aA][lL]|[lL][oO][wW]|[mM][eE][dD][iI][uU][mM]|[hH][iI][gG][hH]|[xX][hH][iI][gG][hH]|[mM][aA][xX])?[ - - ]*|\$\{[A-Za-z0-9_.-]+\})$
Relation
Relation
object- additionalProperties
false (closed)
Fields
- targetWorkIdOptionalstring
- targetWorkNameRequiredstring
- sourceWorkNameRequiredstring
- requiredStateOptionalstring
RelationType
RelationType
stringRelationship category between two pieces of work.
- enum
"DEPENDS_ON" | "PARENT_CHILD" | "SPAWNED_BY"
RenderedPromptDiagnostic
RenderedPromptDiagnostic
object- additionalProperties
false (closed)
Fields
- systemPromptHashOptionalstring
- userMessageHashOptionalstring
RequiredTool
RequiredTool
objectOne declarative external tool dependency for a portable factory.
- additionalProperties
false (closed)
Fields
- nameRequiredstring
Human-readable tool name used in manifests and validation output.
- commandRequiredstring
Executable lookup token that must resolve on PATH.
- purposeOptionalstring
Optional explanation of why the portable factory requires this tool.
- versionArgsOptionalarray
Optional argument vector used by future validation flows to probe the tool version without changing the executable lookup token.
ResolvedModelOperationBinding
ResolvedModelOperationBinding
object- additionalProperties
false (closed)
Fields
- slotRequiredstring
Stable input slot name declared by the worker capability.
Resolved content bound to the slot.
ResolvedModelOperationBindingSource
ResolvedModelOperationBindingSource
stringSource used to resolve one invocation slot binding.
- enum
"INPUT" | "CONFIG" | "DEFAULT" | "OMITTED"
Resource
Resource
objectShared capacity that limits how much work the factory can run at once, such as worker slots or external service quotas.
- additionalProperties
false (closed)
Fields
- idOptionalstring
Optional durable public identifier for this resource. When present, graph and layout references should use this id instead of the mutable name.
- nameRequiredstring
Resource name referenced from worker requirements and workstation resourceUsage entries.
Optional uppercase resource family, such as `MODEL`, `PROVIDER_QUOTA`, or `INVOCATION_SLOT`.
- capacityRequiredinteger
Total units of this resource available to the factory at one time.
- minimum
1
- minimum
- modelOptionalstring
Stable managed runtime identity for `MODEL` resources, such as `OMNIVOICE_Q4_K_M`. Packaged and authored factories declare the same managed-runtime dependency through this field plus matching `MODEL_WORKER.model` values.
- backendOptionalstring
Managed runtime backend identifier for `MODEL` resources, such as `LLAMACPP`. Backend selection stays provider-agnostic in customer-facing factory config.
- loadPolicyOptionalstring
Managed runtime load policy for `MODEL` resources, such as `ON_DEMAND` or `EAGER`.
- providerOptionalstring
Provider identity associated with this resource, especially for `PROVIDER_QUOTA` resources.
ResourceManifest
ResourceManifest
objectCanonical portability manifest for Agent Factory bundles. Required tools are validation-only PATH dependencies; bundled files carry portable content for restoration inside the factory boundary.
- additionalProperties
false (closed)
Fields
Declarative external tools that must already resolve on PATH. These entries are validated but not embedded or installed.
Portable bundled files that belong inside the factory boundary. Entries are explicit only, use factory-relative target paths, and must stay under the canonical script, docs, or inputs roots for SCRIPT, DOC, or INPUT entries, or match the supported root-helper allowlist for ROOT_HELPER entries. Export, share, flatten, and materialize flows auto-discover SCRIPT and DOC files under the documented factory subtrees, but ROOT_HELPER entries such as Makefile are opt-in manifest entries that travel only when explicitly declared here. In v1 shared-factory flows, INPUT entries capture the source factory's current starter work at share time and are restored as independent recipient copies.
ResourceRequirement
ResourceRequirement
object- additionalProperties
false (closed)
Fields
- nameRequiredstring
- capacityRequiredinteger
- minimum
1
- minimum
ResourceType
ResourceType
stringUppercase resource families supported by the public factory-config contract.
- enum
"MODEL" | "PROVIDER_QUOTA" | "INVOCATION_SLOT"
RunnerID
RunnerID
stringStable built-in runner identifiers supported by factory and workstation runner selection.
- enum
"codex" | "claude" | "antigravity"
RunnerSelectionSource
RunnerSelectionSource
stringConfiguration layer that supplied the resolved built-in runner selection for a dispatch.
- enum
"workstation" | "factory" | "legacy_provider" | "default"
SafeAgentRunDiagnostic
SafeAgentRunDiagnostic
objectDashboard-safe agent-run inspection metadata distinct from provider-session transcript ownership.
- additionalProperties
false (closed)
Fields
- executionBehaviorOptionalstring
Stable execution behavior marker for agent-loop runs.
- enum
"agent_run"
- enum
- failureClassOptionalstring
Stable agent-run failure class when execution failed.
- recoveryActionOptionalstring
Customer-visible recovery guidance for actionable agent-run failures.
- toolPolicyOptionalstring
Effective agent tool policy for the run.
- toolCallCountOptionalintegerformat: int32
Number of recorded tool lifecycle events for the run.
- minimum
0
- minimum
Bounded tool diagnostics separate from final agent output.
Bounded transcript metadata separate from tool diagnostics and final output.
SafeWorkDiagnostics
SafeWorkDiagnostics
objectDashboard-facing execution diagnostics that omit raw prompts, command stdin, and command environment values.
- additionalProperties
false (closed)
Fields
ScriptExecutionOutcome
ScriptExecutionOutcome
stringResult category returned by one public script execution boundary.
- enum
"SUCCEEDED" | "FAILED_EXIT_CODE" | "TIMED_OUT" | "PROCESS_ERROR"
ScriptFailureType
ScriptFailureType
stringStable failure classification for script responses without a normal process exit code.
- enum
"TIMEOUT" | "PROCESS_ERROR"
StringMap
StringMap
object- additionalProperties
true (open)
WallClock
WallClock
object- additionalProperties
false (closed)
Fields
- startedAtOptionalstringformat: date-time
- finishedAtOptionalstringformat: date-time
Work
Work
objectA piece of work.
- additionalProperties
false (closed)
Fields
- nameRequiredstring
A human readable name for the work, not unique
- workIdOptionalstring
Unique identifier for the work
- requestIdOptionalstring
Identifier for the original request that created this work, if applicable
- workTypeNameOptionalstring
Configured work type name from factory.json for this submitted work item.
Current lifecycle state for this work item when returned by read APIs. Submit requests use the state's name when an explicit initial state is provided.
- chainingTraceDepthOptionalinteger
Current chaining depth for this work item when the runtime already knows its upstream lineage.
- minimum
1
- minimum
- currentChainingTraceIdOptionalstring
Explicit chaining-trace identifier for this submitted work item.
- previousChainingTraceIdsOptionalarray
Explicit predecessor chaining traces that directly caused this work item.
- traceIdOptionalstring
Legacy trace identifier retained for compatibility; prefer currentChainingTraceId.
Optional canonical ordered work content parts for this work item.
- payloadOptional
Opaque work payload forwarded as raw JSON, or a binary data, or whatever else.
Key-value pairs for storing arbitrary metadata about the work. Both keys and values are strings.
Current outbound relationships attached to this listed source work item when returned by read APIs.
Canonical stopped-state summary for existing work inspection reads when this work item explains paused, blocked, needs-human, or interrupted automation.
WorkAudioContentPart
WorkAudioContentPart
objectOrdered audio content for one work item.
allOf
Fields
- enum
"AUDIO"
- enum
WorkBinaryContentPart
WorkBinaryContentPart
objectOrdered binary content for one work item.
allOf
Fields
- enum
"BINARY"
- enum
WorkContent
WorkContent
arrayOrdered canonical content parts for one work item.
WorkContentCommonFields
WorkContentCommonFields
objectFields
- slotOptionalstring
Optional slot name used by model-operation binding selectors and diagnostics.
- labelOptionalstring
Optional caller-defined label for slot binding or diagnostics.
- roleOptionalstring
Optional semantic role for model-operation authoring.
- contentTypeOptionalstring
Optional MIME content type for file-backed or structured parts.
- artifactIdOptionalstring
Optional artifact identifier for externally materialized content.
WorkContentDeprecatedFileProperty
WorkContentDeprecatedFileProperty
stringDeprecated host-local file path. Use url instead. Legacy values may be normalized to url at ingest during migration.
WorkContentMetadata
WorkContentMetadata
objectOptional metadata attached to one work content part.
- additionalProperties
true (open)
WorkContentPart
WorkContentPart
One ordered canonical content part on a work item.
oneOf
WorkContentPartType
WorkContentPartType
stringSupported canonical work content part types. Legacy lowercase text and image values remain accepted for backward compatibility.
- enum
"text" | "image" | "TEXT" | "IMAGE" | "AUDIO" | "JSON" | "BINARY"
WorkContentURLProperty
WorkContentURLProperty
stringCanonical content reference for file-backed parts. Supported schemes are file://, http://, https://, data:, and you-artifact:// for session-scoped factory artifact refs.
- minLength
1
Worker
Worker
objectA reusable worker definition that tells the factory how a workstation should execute work, such as through a model-backed agent or a script.
- additionalProperties
false (closed)
Fields
- idOptionalstring
Optional durable public identifier for this worker. When present, graph and layout references should use this id instead of the mutable name.
- nameRequiredstring
Worker name referenced by Workstation.worker.
Optional localized customer-facing explanation of this worker.
Worker implementation family to instantiate for this definition.
Built-in hosted provider identity when this worker uses repository-owned hosted execution.
- modelOptionalstring
Model identifier to request from the configured model provider when this worker uses model execution.
- modelProviderOptionaloneOf
Canonical provider identity used for model routing and provider diagnostics, or an exact invocation-parameter placeholder such as `${modelProvider}`. For `executorProvider: ACP`, this names the configured ACP integration, such as `cursor-acp`. Extension identities use lowercase standardized syntax; built-in values such as `CLAUDE` and `CODEX` remain compatibility conveniences.
Provider locality for this model capability declaration. Use `LOCAL` for embedded or host-managed inference and `CLOUD` for remote provider execution.
Execution mechanism. Use `ACP` for ACP-backed workers and put the configured integration identity (for example `cursor-acp`) in modelProvider. `SCRIPT_WRAP` remains the command-wrapper compatibility value; legacy named executor identities remain accepted during migration.
Provider-agnostic model operations that this worker can execute, including named input and output slots.
- commandOptionalstring
Command to execute when this worker runs through a command or script provider.
- argsOptionalarray
Additional command arguments passed to the configured command.
Resource capacity this worker requires before it can be dispatched.
- timeoutOptionalstring
Optional Go duration that caps one worker execution attempt.
- stopTokenOptionalstring
Marker that tells model-oriented workers where to stop generated output when the provider supports it.
- skipPermissionsOptionalboolean
When true, bypasses permission checks for providers that support permission gating.
Hosted-worker authentication contract. V1 hosted workers accept only auth.secretRef.
Provider-specific configuration for the built-in hosted LINEAR worker.
Explicit agent-loop tool policy for AGENT_WORKER definitions. Omit or set policy DISABLED to run agent loops without advertising or executing tools.
- bodyOptionalstring
Inline worker instructions or script body when the worker is authored directly in factory config.
WorkerModelLocality
WorkerModelLocality
stringProvider locality for a model worker capability declaration.
- enum
"LOCAL" | "CLOUD"
WorkerProvider
WorkerProvider
stringWorker execution mechanism. Canonical values are ACP and SCRIPT_WRAP; extensible lowercase identities remain accepted for compatibility with existing factories.
- pattern
^(?:ACP|SCRIPT_WRAP|\$\{[A-Za-z0-9_.-]+\}|[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*)$ - minLength
1 - maxLength
128
WorkerType
WorkerType
stringWorker implementation families supported by the public factory-config contract.
- enum
"INFERENCE_WORKER" | "AGENT_WORKER" | "SCRIPT_WORKER" | "POLLER_WORKER" | "MODEL_WORKER" | "HOSTED_WORKER"
WorkFailureFamily
WorkFailureFamily
stringStable machine-readable failure family used to decide retry and routing behavior for failed work.
- enum
"terminal" | "retryable" | "throttle"
WorkFailureType
WorkFailureType
stringStable machine-readable failure type used to classify failed work across providers and runtimes.
- enum
"auth_failure" | "permanent_bad_request" | "throttled" | "internal_server_error" | "timeout" | "unknown" | "misconfigured" | "missing_executable" | "command_line_too_long"
WorkImageContentPart
WorkImageContentPart
objectOrdered image content for one work item.
allOf
Fields
- enum
"image" | "IMAGE"
- enum
WorkJsonContentPart
WorkJsonContentPart
objectOrdered JSON content for one work item.
allOf
Fields
- enum
"JSON"
- enum
- jsonRequired
Arbitrary JSON value preserved in canonical part order.
WorkMetrics
WorkMetrics
object- additionalProperties
false (closed)
Fields
- durationMillisOptionalintegerformat: int64
- minimum
0
- minimum
- costOptionalnumberformat: double
- retryCountOptionalinteger
WorkOutcome
WorkOutcome
stringResult category returned by a workstation execution.
- enum
"ACCEPTED" | "CONTINUE" | "REJECTED" | "FAILED"
WorkPropagation
WorkPropagation
objectOptional workstation policy for how downstream work receives payload content after this workstation completes. When omitted, downstream work uses the workstation output payload.
- additionalProperties
false (closed)
Fields
Propagation mode for downstream work payload selection after this workstation succeeds.
WorkPropagationMode
WorkPropagationMode
stringWork payload propagation mode for a workstation. OUTPUT_AS_PAYLOAD uses the workstation output as the downstream work payload. PRESERVE_INPUT keeps the consumed input payload for downstream work instead of replacing it with the workstation output.
- enum
"OUTPUT_AS_PAYLOAD" | "PRESERVE_INPUT"
WorkRequestType
WorkRequestType
stringKind of work request accepted by the factory.
- enum
"FACTORY_REQUEST_BATCH"
WorkState
WorkState
objectA lifecycle state that a work item can occupy inside one work type.
- additionalProperties
false (closed)
Fields
- idOptionalstring
Optional durable public identifier for this state within its work type. When present, graph and layout references should use this id instead of the mutable name.
- nameRequiredstring
Customer-authored state name referenced by workstation inputs and outputs.
Lifecycle category for this state, such as initial, processing, terminal, or failed.
WorkStateChangeSource
WorkStateChangeSource
stringOrigin of a WORK_STATE_CHANGE event.
- enum
"api" | "cli" | "cascading-failure"
WorkStateType
WorkStateType
stringCategories of work states. The factory runtime treats these categories differently for lifecycle tracking and metrics purposes. Initial: The work is waiting to be picked up by a workstation. Processing: The work has been partially processed, and is continuing through its lifecycle. Terminal: The work has completed successfully. Failed: The work has failed.
- enum
"INITIAL" | "PROCESSING" | "TERMINAL" | "FAILED"
Workstation
Workstation
objectA processing step in the factory graph. Workstations consume authored work states, run a worker or logical move, and emit the next work states.
- additionalProperties
false (closed)
Fields
- idOptionalstring
Optional durable public identifier for this workstation. Graph and layout references should use this id instead of the mutable name.
- nameRequiredstring
Customer-authored workstation name used by guards, diagnostics, and authored references.
Optional localized customer-facing explanation of this workstation.
Scheduling behavior for this workstation, such as STANDARD, REPEATER, or CRON execution.
Runtime workstation implementation type, equivalent to the workstation AGENTS.md frontmatter type.
Uppercase provider-agnostic operation requested by `MODEL_INVOKE` workstations, such as `TTS`.
Optional workstation-authored slot bindings that resolve operation inputs from runtime content or static config content.
- workerRequiredstring
Name of a worker declared in the workers list.
Optional workstation-specific runner override. When omitted, dispatch falls back to the factory runner, then worker modelProvider compatibility when no explicit runner is configured, then the default codex runner.
- promptFileOptionalstring
Path to a prompt template file loaded for model-oriented workstation execution.
- outputSchemaOptionalstring
JSON schema string used to validate or parse structured model output when configured.
Optional worker-output parsing mode for model workstations. When set to `decision-envelope`, agent output is parsed as a reviewer/checker JSON envelope that maps directly onto WorkResult outcome, feedback, output, and optional recorded output work instead of stop-token routing.
Retry and execution ceilings applied to this workstation.
Optional policy for whether downstream work uses the workstation output payload or preserves the consumed input payload.
- bodyOptionalstring
Inline workstation instructions or script body when authored directly in factory config.
Cron trigger configuration for workstations whose behavior is CRON.
Work states this workstation can consume before it dispatches.
Work states emitted after a non-classifier workstation succeeds. Classifier workstations must use classificationRoutes instead of normal success outputs.
Explicit label-to-destination routing used only by CLASSIFIER_WORKSTATION definitions. Each route must declare a unique non-empty label and one or more outputs.
Optional destination emitted when the workstation makes partial progress and should continue iterating. Classifier workstations must not declare onContinue.
Optional destination emitted when the worker rejects the current work without a hard failure. Classifier workstations must not declare onRejection.
Optional destination emitted when the workstation fails permanently.
Resource capacity this workstation consumes while one dispatch is in flight.
- copyReferencedScriptsOptionalboolean
Copy supported referenced script files into the expanded workstation layout when config expand runs.
Guarded loop breakers should use `VISIT_COUNT` guards here with a `LOGICAL_MOVE` workstation instead of top-level exhaustion rules.
- stopWordsOptionalarray
Stop words authored on the topology entry for model-oriented dispatches.
- workingDirectoryOptionalstring
Go template resolved from token tags at dispatch time.
- worktreeOptionalstring
Go template resolved and passed as the worktree path to CLI dispatchers.
Environment variables added to the workstation execution context.
WorkstationCron
WorkstationCron
objectTrigger timing for scheduled workstations. Provide exactly one of a five-field cron schedule or a positive duration in every; Factory validation enforces the exclusive choice.
- additionalProperties
false (closed)
Fields
- scheduleOptionalstring
Standard five-field cron expression used to produce internal time work while the factory service is running.
- everyOptionalstring
Positive Go duration interval, such as 30s, 5m, 1h, or 1h30m, used instead of schedule.
- triggerAtStartOptionalboolean
When true, service startup submits one immediate internal time work item before waiting for the next scheduled cron fire.
Defaultfalse - jitterOptionalstring
Non-negative Go duration used as the maximum deterministic delay added to scheduled time tokens. Defaults to "0s".
- expiryWindowOptionalstring
Positive Go duration after due_at before a stale cron time token expires and can be consumed by the system expiry transition. Defaults to the duration until the next scheduled cron fire when omitted.
WorkstationGuard
WorkstationGuard
objectGuard attached to a workstation as a whole.
- additionalProperties
false (closed)
Fields
Guard condition to evaluate for this workstation-level attachment.
- workstationOptionalstring
For `VISIT_COUNT` guards, the workstation whose visits are counted.
- maxVisitsOptionalinteger
For `VISIT_COUNT` guards, the fixed visit ceiling.
- minimum
1
- minimum
- maxVisitsArgumentOptionalstring
Optional invocation argument whose positive integer value tightens the fixed visit ceiling.
For `MATCHES_FIELDS` guards, the field-selector configuration used to compare candidate inputs.
- parentInputOptionalstring
For parent-aware input guards, the parent workType name from another input in the same workstation.
- matchInputOptionalstring
For `SAME_NAME` and `SAME_TRACE_ID` input guards, the peer input workType name from another input in the same workstation.
- spawnedByOptionalstring
For dynamic fanout input guards, the workstation that spawns the children for count tracking.
WorkstationGuardType
WorkstationGuardType
stringGuard condition attached to a workstation as a whole.
- enum
"VISIT_COUNT" | "MATCHES_FIELDS"
WorkstationIO
WorkstationIO
objectOne authored work-state reference consumed or emitted by a workstation.
- additionalProperties
false (closed)
Fields
- workTypeRequiredstring
Name of the work type consumed or emitted at this edge of the workstation.
- stateRequiredstring
Name of the work state consumed or emitted for the referenced work type.
Per-input guards that must pass before this specific input can be used.
WorkstationKind
WorkstationKind
stringScheduling kind for a workstation, which determines how the engine schedules and dispatches work to it. Standard workstations are scheduled as soon as their inputs are ready, and can have multiple work items in-flight at the same time. Repeater workstations are triggered whenever their inputs change, and will reloop the outputs on rejection back to the initial place. Cron workstations create internal time work and dispatch their configured worker when time and input guards are satisfied. Poller workstations bind a poller-capable worker that the service runtime supervises as a long-lived ingress loop.
"STANDARD"- enum
"STANDARD" | "REPEATER" | "CRON" | "POLLER"
WorkstationLimits
WorkstationLimits
objectRetry and execution ceilings applied to one workstation definition.
- additionalProperties
false (closed)
Fields
- maxRetriesOptionalinteger
Maximum number of retry attempts after a failed dispatch before the workstation gives up.
- maxExecutionTimeOptionalstring
Go duration limit for one dispatch attempt before it times out.
- maxGeneratedWorkItemsOptionalinteger
Fixed maximum number of Work items one accepted worker-emitted FACTORY_REQUEST_BATCH may contain.
- minimum
1
- minimum
- maxGeneratedWorkItemsArgumentOptionalstring
Optional invocation argument whose positive integer value tightens the fixed generated-Work ceiling.
- maxGeneratedWorkItemsArgumentOffsetOptionalinteger
Offset added to the invocation argument before applying the generated-Work ceiling.
- minimum
0
- minimum
WorkstationOperationBinding
WorkstationOperationBinding
objectOne workstation-authored binding for a provider-agnostic model-operation input slot.
- additionalProperties
false (closed)
Fields
- slotRequiredstring
Stable input slot name declared by the worker operation.
Ordered runtime-input selector used before falling back to config or default content.
Static authored content bound directly or used as the first fallback when runtime input does not match.
Optional final fallback content when neither runtime input nor config content resolves the slot.
WorkstationOperationBindingSelector
WorkstationOperationBindingSelector
objectSelector fields used to resolve one content part from ordered runtime input.
- additionalProperties
false (closed)
Fields
- slotOptionalstring
Match a content part by its authored slot field.
- labelOptionalstring
Match a content part by its label field.
Match a content part by its uppercase public type.
- roleOptionalstring
Match a content part by its role field.
WorkstationOutcomeFormat
WorkstationOutcomeFormat
stringOptional worker-output parsing mode for model workstations. When set to `decision-envelope`, agent output is parsed as a reviewer/checker JSON envelope that maps directly onto WorkResult outcome, feedback, output, and optional recorded output work instead of stop-token routing.
- enum
"decision-envelope"
WorkstationType
WorkstationType
stringRuntime workstation implementation types supported by the public factory-config contract.
- enum
"INFERENCE_RUN" | "AGENT_RUN" | "SCRIPT_RUN" | "POLLER_RUN" | "MODEL_WORKSTATION" | "MODEL_INVOKE" | "LOGICAL_MOVE" | "CLASSIFIER_WORKSTATION"
WorkTextContentPart
WorkTextContentPart
objectOrdered inline text content for one work item.
allOf
Fields
- enum
"text" | "TEXT"
- enum
- textRequiredstring
Inline text content preserved in canonical part order.
WorkType
WorkType
objectA named category of work that can move through the factory. Each work type declares the lifecycle states its work items can occupy.
- additionalProperties
false (closed)
Fields
- idOptionalstring
Optional durable public identifier for this work type. When present, graph and layout references should use this id instead of the mutable name.
- nameRequiredstring
Customer-authored work type name referenced by workstation inputs, outputs, and submitted work.
Optional localized customer-facing explanation of this work type.
Lifecycle states available for work items of this type.
Optional CLI routing markers for this work type. Factories used with you run --factory must declare handlingBehavior DEFAULT on exactly one work type.
WorkTypeHandlingBehavior
WorkTypeHandlingBehavior
stringDeclares how the CLI should route simplified one-shot prompt submissions for this work type. DEFAULT marks the single work type that receives positional prompts from you run --factory.
- enum
"DEFAULT"
Event stream operations
Canonical, ephemeral, and compatibility-only SSE operations from packaged OpenAPI. The global GET /events stream is never preferred.
Canonical session-scoped FactoryEvent stream
get
/factory-sessions/{session_id}/eventsCanonicalPreferred- Payload root
- FactoryEvent
- Operation
- getEventsBySessionId
- Schema anchor
- #components-schemas-FactoryEvent
Ephemeral FactoryResponseEvent stream
get
/factory-sessions/{session_id}/response-eventsEphemeralNot preferredNot canonical replay- Payload root
- FactoryResponseEvent
- Operation
- getFactoryResponseEventsBySessionId
- Schema anchor
- #components-schemas-FactoryResponseEvent
Ephemeral observation only — do not treat response events as canonical FactoryEvent replay state.
Reconnect, identity, and lifecycle
Client-facing recovery contracts for the canonical session event stream. Does not open a live Factory connection or re-implement the API OpenAPI UI.
Reconnect cursors
Canonical session stream /factory-sessions/{session_id}/events (getEventsBySessionId).
When both after_event_id and after_sequence are present, after_event_id wins.
For session-scoped streams, after_sequence prefers FactoryEvent.context.sessionSequence when that field is present; otherwise it falls back to FactoryEvent.context.sequence. Omitting both cursors starts replay from the beginning of the session's currently retained history.
after_event_idquery · string · optionalSession-scoped reconnect cursor identifying the last acknowledged FactoryEvent.id. The stream replays only events recorded after this stable event identifier. When both after_event_id and after_sequence are present on GET /factory-sessions/{session_id}/events, after_event_id wins.
after_sequencequery · integer · optionalSession-scoped reconnect cursor identifying the last acknowledged ordering point. Session-scoped FactoryEvent streams prefer FactoryEvent.context.sessionSequence when present and otherwise fall back to FactoryEvent.context.sequence. When both after_event_id and after_sequence are present on GET /factory-sessions/{session_id}/events, after_event_id wins. Cursors that no longer match the retained history boundary surface as cursor_stale on JSON reconnect probes or invalid-cursor 400 responses on SSE open.
Identity handshake
Compare X-Factory-Session-* handshake headers with the latest sync-preflight or session-read identity set before reusing a persisted reconnect cursor. A changed streamGenerationId / X-Factory-Session-Stream-Generation-Id invalidates prior cursors even when factorySessionId is unchanged.
X-Factory-Session-Backend-Scope-IdStable backend scope identifier for the current live Factory Session event history. Compare this handshake header with session-sync or preflight `backendScopeId` values before reusing reconnect cursors or stream-derived projections.
X-Factory-Session-Logical-Session-Key-IdStable logical session key for the resolved Factory Session target within the current backend scope. Compare this handshake header with session-sync or preflight `logicalSessionKeyId` values before reusing reconnect cursors or stream-derived projections.
X-Factory-Session-Factory-Session-IdResolved UUID Factory Session identifier for the current live event history. Compare this handshake header with session-sync or preflight `factorySessionId` values before reusing reconnect cursors or stream-derived projections.
X-Factory-Session-Stream-Generation-IdOpaque invalidation token for the current live Factory Session event history. Compare this handshake header with session-sync or preflight `streamGenerationID` values before reusing reconnect cursors or stream-derived projections.
A changed X-Factory-Session-Stream-Generation-Id means the current stream generation invalidates prior cursors even when the factory session id is unchanged.
Stream lifecycle
Retained-history catch-up, live continuation, keepalive waiting, gap behavior, and stale-cursor recovery for event-stream clients.
- Retained history then live
- The server sends retained history first in ascending tick order, then continues on the same connection with live FactoryEvent records.
- Keepalive waiting state
- Successful SSE responses use Connection keep-alive. Idle periods while waiting for new canonical events are normal waiting state, not terminal stream completion, unless the HTTP connection closes.
- Gap behavior (
STREAM_GAP) - On the ephemeral response-events stream, when a cursor predates retained history the first emitted record is STREAM_GAP and describes the lost range rather than silently skipping events.
- Stale-cursor recovery
- Cursors that no longer match the retained history boundary return typed invalid-cursor handling (400 on SSE open, CURSOR_STALE on the JSON reconnect probe) rather than silently skipping events.
JSON reconnect probe
Same route as the canonical SSE open (/factory-sessions/{session_id}/events). Request Accept: application/json to receive FactorySessionEventStreamRecovery instead of text/event-stream.
When Accept includes application/json, the canonical session events route acts as a reconnect probe and returns FactorySessionEventStreamRecovery instead of opening Server-Sent Events. CURSOR_STALE tells clients to retry with omitAfterEventId and omitAfterSequence set. UNKNOWN_SESSION means the selector does not resolve to a live or durable session and never falls back to the default session. STREAM_READY means the probe succeeded and the client may open the SSE stream.
Recovery outcomes
CURSOR_STALEINTERNAL_ERRORSTREAM_READYUNKNOWN_SESSION
Retry guidance fields
omitAfterEventId— True when the next reconnect must omit after_event_id and replay from the start of the session stream.omitAfterSequence— True when the next reconnect must omit after_sequence and replay from the start of the session stream.
Dual-Accept / HTTP transport ownership (handshake response wiring, status codes, and the full OpenAPI operation UI) remains on the API operation page. See API transport summary.
Static SSE frame and reconnect examples
Copyable wire shapes for id: / event: / data: frames and reconnect usage. Examples never open a live Factory connection, EventSource, or proxy route.
FactoryEvent SSE frame
Illustrative static fixturetextIllustrative text/event-stream frame shape for the canonical session stream. The data body uses real envelope field names; nested values are placeholders — decode full payloads from the FactoryEvent catalog.
id: <decimal-or-stable-event-id>
event: FactoryEvent
data: {"schemaVersion":"agent-factory.event.v1","id":"<event-id>","type":"RUN_REQUEST","context":{"…":"see FactoryEvent catalog"},"payload":{"…":"see payload variant for type"}}
SSE keepalive comment
Illustrative static fixturetextIllustrative keepalive comment line. Idle periods are normal waiting state, not terminal stream completion, unless the HTTP connection closes.
: keepalive
Canonical SSE reconnect request
Illustrative static fixturehttpIllustrative reconnect request for the canonical session stream. Query cursor names and identity handshake headers match the documented contracts; values are placeholders.
GET /factory-sessions/<session-id>/events?after_event_id=<last-acknowledged-id> HTTP/1.1 Accept: text/event-stream Connection: keep-alive X-Factory-Session-Backend-Scope-Id: <compare-with-preflight-value> X-Factory-Session-Logical-Session-Key-Id: <compare-with-preflight-value> X-Factory-Session-Factory-Session-Id: <compare-with-preflight-value> X-Factory-Session-Stream-Generation-Id: <compare-with-preflight-value> # Cursor precedence: when both after_event_id and after_sequence are present, after_event_id wins. # Compare handshake response headers before reusing a persisted cursor. # This is a static example — docs never open EventSource or fetch a Factory host.
JSON reconnect-probe response
OpenAPI authored examplejsonAuthored OpenAPI example for FactorySessionEventStreamRecovery on Accept: application/json. Dual-Accept HTTP transport ownership remains on the API operation page.
{
"factorySessionId": "session-alpha",
"outcome": "CURSOR_STALE",
"retry": {
"omitAfterEventId": true,
"omitAfterSequence": true
}
}