generated

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package generated provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r *mux.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r *mux.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options GorillaServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type BadRequest

type BadRequest = ErrorResponse

BadRequest defines model for BadRequest.

type BundledFile

type BundledFile struct {
	// Content Inline content payload for a portable bundled file.
	Content BundledFileContent `json:"content"`

	// TargetPath Canonical factory-relative restoration target for the bundled file. Absolute paths, backslash-separated paths, and paths that require dot-segment normalization are rejected.
	TargetPath string `json:"targetPath"`

	// Type Portable file class. SCRIPT entries target factory/scripts/..., DOC entries target factory/docs/..., and ROOT_HELPER entries target supported project-root helper files such as Makefile.
	Type BundledFileType `json:"type"`
}

BundledFile One explicit portable bundled file entry carried by the factory portability manifest. SCRIPT files target factory/scripts/..., DOC files target factory/docs/..., and ROOT_HELPER files target supported project-root helper paths such as Makefile.

type BundledFileContent

type BundledFileContent struct {
	// Encoding Declared content encoding for the inline payload. V1 bundled files use UTF-8 text content.
	Encoding BundledFileContentEncoding `json:"encoding"`

	// Inline Inline bundled file content carried in the manifest. Files under factory/scripts/, factory/docs/, and supported root helper paths are only bundled when they appear in bundledFiles.
	Inline string `json:"inline"`
}

BundledFileContent Inline content payload for a portable bundled file.

type BundledFileContentEncoding

type BundledFileContentEncoding string

BundledFileContentEncoding Declared content encoding for the inline payload. V1 bundled files use UTF-8 text content.

const (
	Utf8 BundledFileContentEncoding = "utf-8"
)

Defines values for BundledFileContentEncoding.

type BundledFileType

type BundledFileType string

BundledFileType Portable file class. SCRIPT entries target factory/scripts/..., DOC entries target factory/docs/..., and ROOT_HELPER entries target supported project-root helper files such as Makefile.

const (
	DOC        BundledFileType = "DOC"
	ROOTHELPER BundledFileType = "ROOT_HELPER"
	SCRIPT     BundledFileType = "SCRIPT"
)

Defines values for BundledFileType.

type CommandDiagnostic

type CommandDiagnostic struct {
	Args          *[]string  `json:"args,omitempty"`
	Command       *string    `json:"command,omitempty"`
	DurationNanos *int64     `json:"durationNanos,omitempty"`
	Env           *StringMap `json:"env,omitempty"`
	ExitCode      *int       `json:"exitCode,omitempty"`
	Stderr        *string    `json:"stderr,omitempty"`
	Stdin         *string    `json:"stdin,omitempty"`
	Stdout        *string    `json:"stdout,omitempty"`
	TimedOut      *bool      `json:"timedOut,omitempty"`
	WorkingDir    *string    `json:"workingDir,omitempty"`
}

CommandDiagnostic defines model for CommandDiagnostic.

type CreateFactoryBadRequest

type CreateFactoryBadRequest = ErrorResponse

CreateFactoryBadRequest defines model for CreateFactoryBadRequest.

type CreateFactoryConflict

type CreateFactoryConflict = ErrorResponse

CreateFactoryConflict defines model for CreateFactoryConflict.

type CreateFactoryJSONRequestBody

type CreateFactoryJSONRequestBody = Factory

CreateFactoryJSONRequestBody defines body for CreateFactory for application/json ContentType.

type CurrentFactoryNotFound

type CurrentFactoryNotFound = ErrorResponse

CurrentFactoryNotFound defines model for CurrentFactoryNotFound.

type Diagnostics

type Diagnostics struct {
	Notes   *[]string                       `json:"notes,omitempty"`
	Workers *map[string]SafeWorkDiagnostics `json:"workers,omitempty"`
}

Diagnostics defines model for Diagnostics.

type DispatchConsumedWorkRef

type DispatchConsumedWorkRef struct {
	// WorkId Canonical work identity for one consumed dispatch input.
	WorkId string `json:"workId"`
}

DispatchConsumedWorkRef Ordered 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.

type DispatchRequestEventMetadata

type DispatchRequestEventMetadata struct {
	// ReplayKey Stable replay correlation key for recorded dispatch reconstruction.
	ReplayKey *string `json:"replayKey,omitempty"`
}

DispatchRequestEventMetadata Optional non-identity dispatch metadata retained on dispatch-request events. Request, trace, work, and dispatch identity must remain on FactoryEvent.context rather than reappearing here.

type DispatchRequestEventPayload

type DispatchRequestEventPayload struct {
	// CurrentChainingTraceId Deprecated compatibility copy of the dispatch chaining-trace identifier; prefer FactoryEvent.context.currentChainingTraceId.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	CurrentChainingTraceId *string                   `json:"currentChainingTraceId,omitempty"`
	Inputs                 []DispatchConsumedWorkRef `json:"inputs"`

	// Metadata Optional non-identity dispatch metadata retained on dispatch-request events. Request, trace, work, and dispatch identity must remain on FactoryEvent.context rather than reappearing here.
	Metadata *DispatchRequestEventMetadata `json:"metadata,omitempty"`

	// PreviousChainingTraceIds Deprecated compatibility copy of predecessor chaining traces; prefer FactoryEvent.context.previousChainingTraceIds.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PreviousChainingTraceIds *[]string   `json:"previousChainingTraceIds,omitempty"`
	Resources                *[]Resource `json:"resources,omitempty"`
	TransitionId             string      `json:"transitionId"`
}

DispatchRequestEventPayload Customer-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.

type DispatchResponseEventPayload

type DispatchResponseEventPayload struct {
	CompletionId *string `json:"completionId,omitempty"`

	// CurrentChainingTraceId Deprecated compatibility copy of the dispatch chaining-trace identifier; prefer FactoryEvent.context.currentChainingTraceId.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	CurrentChainingTraceId *string      `json:"currentChainingTraceId,omitempty"`
	DurationMillis         *int64       `json:"durationMillis,omitempty"`
	Error                  *string      `json:"error,omitempty"`
	FailureMessage         *string      `json:"failureMessage,omitempty"`
	FailureReason          *string      `json:"failureReason,omitempty"`
	Feedback               *string      `json:"feedback,omitempty"`
	Metadata               *StringMap   `json:"metadata,omitempty"`
	Metrics                *WorkMetrics `json:"metrics,omitempty"`

	// Outcome Result category returned by a workstation execution.
	Outcome         WorkOutcome `json:"outcome"`
	Output          *string     `json:"output,omitempty"`
	OutputResources *[]Resource `json:"outputResources,omitempty"`
	OutputWork      *[]Work     `json:"outputWork,omitempty"`

	// PreviousChainingTraceIds Deprecated compatibility copy of predecessor chaining traces; prefer FactoryEvent.context.previousChainingTraceIds.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PreviousChainingTraceIds *[]string                `json:"previousChainingTraceIds,omitempty"`
	ProviderFailure          *ProviderFailureMetadata `json:"providerFailure,omitempty"`
	TransitionId             string                   `json:"transitionId"`
}

DispatchResponseEventPayload Customer-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.

type ErrorFamily

type ErrorFamily string

ErrorFamily Stable machine-readable error family for broader client grouping.

const (
	ErrorFamilyBadRequest          ErrorFamily = "BAD_REQUEST"
	ErrorFamilyConflict            ErrorFamily = "CONFLICT"
	ErrorFamilyInternalServerError ErrorFamily = "INTERNAL_SERVER_ERROR"
	ErrorFamilyNotFound            ErrorFamily = "NOT_FOUND"
)

Defines values for ErrorFamily.

type ErrorResponse

type ErrorResponse struct {
	// Code Stable machine-readable error code.
	Code ErrorResponseCode `json:"code"`

	// Family Stable machine-readable error family for broader client grouping.
	Family  ErrorFamily `json:"family"`
	Message string      `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type ErrorResponseCode

type ErrorResponseCode string

ErrorResponseCode Stable machine-readable error code.

const (
	BADREQUEST           ErrorResponseCode = "BAD_REQUEST"
	FACTORYALREADYEXISTS ErrorResponseCode = "FACTORY_ALREADY_EXISTS"
	FACTORYNOTIDLE       ErrorResponseCode = "FACTORY_NOT_IDLE"
	INTERNALERROR        ErrorResponseCode = "INTERNAL_ERROR"
	INVALIDFACTORY       ErrorResponseCode = "INVALID_FACTORY"
	INVALIDFACTORYNAME   ErrorResponseCode = "INVALID_FACTORY_NAME"
	NOTFOUND             ErrorResponseCode = "NOT_FOUND"
)

Defines values for ErrorResponseCode.

type Factory

type Factory struct {
	// FactoryDirectory Directory that contained the factory.json used for this serialized runtime config.
	FactoryDirectory *string `json:"factoryDirectory,omitempty"`

	// Guards Root-level guards that apply across the factory instead of one specific workstation or input.
	Guards *[]FactoryGuard `json:"guards,omitempty"`

	// Id Factory identifier used as the factory-level template context fallback.
	Id *string `json:"id,omitempty"`

	// InputTypes Named input kinds accepted by the factory. The default input type is implicit and must not be declared.
	InputTypes *[]InputType `json:"inputTypes,omitempty"`
	Metadata   *StringMap   `json:"metadata,omitempty"`

	// Name Customer-facing identifier for one stored named factory. `GET /factory/~current` 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.
	Name FactoryName `json:"name"`

	// Resources Shared capacity pools that workers or workstations can consume while work is executing.
	Resources *[]Resource `json:"resources,omitempty"`

	// SourceDirectory Original source directory for record/replay and drift diagnostics.
	SourceDirectory *string `json:"sourceDirectory,omitempty"`

	// SupportingFiles Canonical portability manifest for Agent Factory bundles. Required tools are validation-only PATH dependencies; bundled files carry portable content for restoration inside the factory boundary.
	SupportingFiles *ResourceManifest `json:"supportingFiles,omitempty"`

	// WorkTypes Customer-authored work item categories and the lifecycle states each one can occupy.
	WorkTypes *[]WorkType `json:"workTypes,omitempty"`

	// Workers Reusable worker definitions that workstations reference by name when dispatching work.
	Workers *[]Worker `json:"workers,omitempty"`

	// Workstations Processing steps that consume work, invoke workers, and emit the next work states.
	Workstations *[]Workstation `json:"workstations,omitempty"`
}

Factory Top-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.

type FactoryEvent

type FactoryEvent struct {
	Context FactoryEventContext `json:"context"`

	// Id Stable event identifier. Record/replay artifacts must preserve this value.
	Id      string               `json:"id"`
	Payload FactoryEvent_Payload `json:"payload"`

	// SchemaVersion Version of the factory event envelope schema.
	SchemaVersion FactoryEventSchemaVersion `json:"schemaVersion"`

	// Type Canonical 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.
	Type FactoryEventType `json:"type"`
}

FactoryEvent Versioned 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.

type FactoryEventContext

type FactoryEventContext struct {
	// CurrentChainingTraceId Canonical chaining-trace identifier for the dispatch currently represented by this event context.
	CurrentChainingTraceId *string `json:"currentChainingTraceId,omitempty"`

	// DispatchId Canonical dispatch identity for dispatch and inference events; payloads must not restate it.
	DispatchId *string `json:"dispatchId,omitempty"`

	// EventTime Wall-clock event timestamp for customer explanation and diagnostics. ISO8601 timestamp.
	EventTime time.Time `json:"eventTime"`

	// PreviousChainingTraceIds Canonical predecessor chaining traces consumed by the dispatch in deterministic order.
	PreviousChainingTraceIds *[]string `json:"previousChainingTraceIds,omitempty"`

	// RequestId Canonical request identity for all request-scoped events; payload metadata must not restate it.
	RequestId *string `json:"requestId,omitempty"`

	// Sequence Append-only event-log sequence number.
	Sequence int `json:"sequence"`

	// Source Human-readable source such as api, filewatcher, replay, cron, or worker.
	Source *string `json:"source,omitempty"`

	// Tick Logical engine tick observed by the runtime.
	Tick int `json:"tick"`

	// TraceIds Canonical trace identifiers that contributed to this event; payloads must not restate them.
	TraceIds *[]string `json:"traceIds,omitempty"`

	// WorkIds Canonical work identities correlated to this event; payloads must not restate them.
	WorkIds *[]string `json:"workIds,omitempty"`
}

FactoryEventContext defines model for FactoryEventContext.

type FactoryEventSchemaVersion

type FactoryEventSchemaVersion string

FactoryEventSchemaVersion Version of the factory event envelope schema.

const (
	AgentFactoryEventV1 FactoryEventSchemaVersion = "agent-factory.event.v1"
)

Defines values for FactoryEventSchemaVersion.

type FactoryEventType

type FactoryEventType string

FactoryEventType Canonical 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.

const (
	FactoryEventTypeDispatchRequest           FactoryEventType = "DISPATCH_REQUEST"
	FactoryEventTypeDispatchResponse          FactoryEventType = "DISPATCH_RESPONSE"
	FactoryEventTypeFactoryStateResponse      FactoryEventType = "FACTORY_STATE_RESPONSE"
	FactoryEventTypeInferenceRequest          FactoryEventType = "INFERENCE_REQUEST"
	FactoryEventTypeInferenceResponse         FactoryEventType = "INFERENCE_RESPONSE"
	FactoryEventTypeInitialStructureRequest   FactoryEventType = "INITIAL_STRUCTURE_REQUEST"
	FactoryEventTypeRelationshipChangeRequest FactoryEventType = "RELATIONSHIP_CHANGE_REQUEST"
	FactoryEventTypeRunRequest                FactoryEventType = "RUN_REQUEST"
	FactoryEventTypeRunResponse               FactoryEventType = "RUN_RESPONSE"
	FactoryEventTypeScriptRequest             FactoryEventType = "SCRIPT_REQUEST"
	FactoryEventTypeScriptResponse            FactoryEventType = "SCRIPT_RESPONSE"
	FactoryEventTypeWorkRequest               FactoryEventType = "WORK_REQUEST"
)

Defines values for FactoryEventType.

type FactoryEvent_Payload

type FactoryEvent_Payload struct {
	// contains filtered or unexported fields
}

FactoryEvent_Payload defines model for FactoryEvent.Payload.

func (FactoryEvent_Payload) AsDispatchRequestEventPayload

func (t FactoryEvent_Payload) AsDispatchRequestEventPayload() (DispatchRequestEventPayload, error)

AsDispatchRequestEventPayload returns the union data inside the FactoryEvent_Payload as a DispatchRequestEventPayload

func (FactoryEvent_Payload) AsDispatchResponseEventPayload

func (t FactoryEvent_Payload) AsDispatchResponseEventPayload() (DispatchResponseEventPayload, error)

AsDispatchResponseEventPayload returns the union data inside the FactoryEvent_Payload as a DispatchResponseEventPayload

func (FactoryEvent_Payload) AsFactoryStateResponseEventPayload

func (t FactoryEvent_Payload) AsFactoryStateResponseEventPayload() (FactoryStateResponseEventPayload, error)

AsFactoryStateResponseEventPayload returns the union data inside the FactoryEvent_Payload as a FactoryStateResponseEventPayload

func (FactoryEvent_Payload) AsInferenceRequestEventPayload

func (t FactoryEvent_Payload) AsInferenceRequestEventPayload() (InferenceRequestEventPayload, error)

AsInferenceRequestEventPayload returns the union data inside the FactoryEvent_Payload as a InferenceRequestEventPayload

func (FactoryEvent_Payload) AsInferenceResponseEventPayload

func (t FactoryEvent_Payload) AsInferenceResponseEventPayload() (InferenceResponseEventPayload, error)

AsInferenceResponseEventPayload returns the union data inside the FactoryEvent_Payload as a InferenceResponseEventPayload

func (FactoryEvent_Payload) AsInitialStructureRequestEventPayload

func (t FactoryEvent_Payload) AsInitialStructureRequestEventPayload() (InitialStructureRequestEventPayload, error)

AsInitialStructureRequestEventPayload returns the union data inside the FactoryEvent_Payload as a InitialStructureRequestEventPayload

func (FactoryEvent_Payload) AsRelationshipChangeRequestEventPayload

func (t FactoryEvent_Payload) AsRelationshipChangeRequestEventPayload() (RelationshipChangeRequestEventPayload, error)

AsRelationshipChangeRequestEventPayload returns the union data inside the FactoryEvent_Payload as a RelationshipChangeRequestEventPayload

func (FactoryEvent_Payload) AsRunRequestEventPayload

func (t FactoryEvent_Payload) AsRunRequestEventPayload() (RunRequestEventPayload, error)

AsRunRequestEventPayload returns the union data inside the FactoryEvent_Payload as a RunRequestEventPayload

func (FactoryEvent_Payload) AsRunResponseEventPayload

func (t FactoryEvent_Payload) AsRunResponseEventPayload() (RunResponseEventPayload, error)

AsRunResponseEventPayload returns the union data inside the FactoryEvent_Payload as a RunResponseEventPayload

func (FactoryEvent_Payload) AsScriptRequestEventPayload

func (t FactoryEvent_Payload) AsScriptRequestEventPayload() (ScriptRequestEventPayload, error)

AsScriptRequestEventPayload returns the union data inside the FactoryEvent_Payload as a ScriptRequestEventPayload

func (FactoryEvent_Payload) AsScriptResponseEventPayload

func (t FactoryEvent_Payload) AsScriptResponseEventPayload() (ScriptResponseEventPayload, error)

AsScriptResponseEventPayload returns the union data inside the FactoryEvent_Payload as a ScriptResponseEventPayload

func (FactoryEvent_Payload) AsWorkRequestEventPayload

func (t FactoryEvent_Payload) AsWorkRequestEventPayload() (WorkRequestEventPayload, error)

AsWorkRequestEventPayload returns the union data inside the FactoryEvent_Payload as a WorkRequestEventPayload

func (*FactoryEvent_Payload) FromDispatchRequestEventPayload

func (t *FactoryEvent_Payload) FromDispatchRequestEventPayload(v DispatchRequestEventPayload) error

FromDispatchRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided DispatchRequestEventPayload

func (*FactoryEvent_Payload) FromDispatchResponseEventPayload

func (t *FactoryEvent_Payload) FromDispatchResponseEventPayload(v DispatchResponseEventPayload) error

FromDispatchResponseEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided DispatchResponseEventPayload

func (*FactoryEvent_Payload) FromFactoryStateResponseEventPayload

func (t *FactoryEvent_Payload) FromFactoryStateResponseEventPayload(v FactoryStateResponseEventPayload) error

FromFactoryStateResponseEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided FactoryStateResponseEventPayload

func (*FactoryEvent_Payload) FromInferenceRequestEventPayload

func (t *FactoryEvent_Payload) FromInferenceRequestEventPayload(v InferenceRequestEventPayload) error

FromInferenceRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided InferenceRequestEventPayload

func (*FactoryEvent_Payload) FromInferenceResponseEventPayload

func (t *FactoryEvent_Payload) FromInferenceResponseEventPayload(v InferenceResponseEventPayload) error

FromInferenceResponseEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided InferenceResponseEventPayload

func (*FactoryEvent_Payload) FromInitialStructureRequestEventPayload

func (t *FactoryEvent_Payload) FromInitialStructureRequestEventPayload(v InitialStructureRequestEventPayload) error

FromInitialStructureRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided InitialStructureRequestEventPayload

func (*FactoryEvent_Payload) FromRelationshipChangeRequestEventPayload

func (t *FactoryEvent_Payload) FromRelationshipChangeRequestEventPayload(v RelationshipChangeRequestEventPayload) error

FromRelationshipChangeRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided RelationshipChangeRequestEventPayload

func (*FactoryEvent_Payload) FromRunRequestEventPayload

func (t *FactoryEvent_Payload) FromRunRequestEventPayload(v RunRequestEventPayload) error

FromRunRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided RunRequestEventPayload

func (*FactoryEvent_Payload) FromRunResponseEventPayload

func (t *FactoryEvent_Payload) FromRunResponseEventPayload(v RunResponseEventPayload) error

FromRunResponseEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided RunResponseEventPayload

func (*FactoryEvent_Payload) FromScriptRequestEventPayload

func (t *FactoryEvent_Payload) FromScriptRequestEventPayload(v ScriptRequestEventPayload) error

FromScriptRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided ScriptRequestEventPayload

func (*FactoryEvent_Payload) FromScriptResponseEventPayload

func (t *FactoryEvent_Payload) FromScriptResponseEventPayload(v ScriptResponseEventPayload) error

FromScriptResponseEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided ScriptResponseEventPayload

func (*FactoryEvent_Payload) FromWorkRequestEventPayload

func (t *FactoryEvent_Payload) FromWorkRequestEventPayload(v WorkRequestEventPayload) error

FromWorkRequestEventPayload overwrites any union data inside the FactoryEvent_Payload as the provided WorkRequestEventPayload

func (FactoryEvent_Payload) MarshalJSON

func (t FactoryEvent_Payload) MarshalJSON() ([]byte, error)

func (*FactoryEvent_Payload) MergeDispatchRequestEventPayload

func (t *FactoryEvent_Payload) MergeDispatchRequestEventPayload(v DispatchRequestEventPayload) error

MergeDispatchRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided DispatchRequestEventPayload

func (*FactoryEvent_Payload) MergeDispatchResponseEventPayload

func (t *FactoryEvent_Payload) MergeDispatchResponseEventPayload(v DispatchResponseEventPayload) error

MergeDispatchResponseEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided DispatchResponseEventPayload

func (*FactoryEvent_Payload) MergeFactoryStateResponseEventPayload

func (t *FactoryEvent_Payload) MergeFactoryStateResponseEventPayload(v FactoryStateResponseEventPayload) error

MergeFactoryStateResponseEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided FactoryStateResponseEventPayload

func (*FactoryEvent_Payload) MergeInferenceRequestEventPayload

func (t *FactoryEvent_Payload) MergeInferenceRequestEventPayload(v InferenceRequestEventPayload) error

MergeInferenceRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided InferenceRequestEventPayload

func (*FactoryEvent_Payload) MergeInferenceResponseEventPayload

func (t *FactoryEvent_Payload) MergeInferenceResponseEventPayload(v InferenceResponseEventPayload) error

MergeInferenceResponseEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided InferenceResponseEventPayload

func (*FactoryEvent_Payload) MergeInitialStructureRequestEventPayload

func (t *FactoryEvent_Payload) MergeInitialStructureRequestEventPayload(v InitialStructureRequestEventPayload) error

MergeInitialStructureRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided InitialStructureRequestEventPayload

func (*FactoryEvent_Payload) MergeRelationshipChangeRequestEventPayload

func (t *FactoryEvent_Payload) MergeRelationshipChangeRequestEventPayload(v RelationshipChangeRequestEventPayload) error

MergeRelationshipChangeRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided RelationshipChangeRequestEventPayload

func (*FactoryEvent_Payload) MergeRunRequestEventPayload

func (t *FactoryEvent_Payload) MergeRunRequestEventPayload(v RunRequestEventPayload) error

MergeRunRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided RunRequestEventPayload

func (*FactoryEvent_Payload) MergeRunResponseEventPayload

func (t *FactoryEvent_Payload) MergeRunResponseEventPayload(v RunResponseEventPayload) error

MergeRunResponseEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided RunResponseEventPayload

func (*FactoryEvent_Payload) MergeScriptRequestEventPayload

func (t *FactoryEvent_Payload) MergeScriptRequestEventPayload(v ScriptRequestEventPayload) error

MergeScriptRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided ScriptRequestEventPayload

func (*FactoryEvent_Payload) MergeScriptResponseEventPayload

func (t *FactoryEvent_Payload) MergeScriptResponseEventPayload(v ScriptResponseEventPayload) error

MergeScriptResponseEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided ScriptResponseEventPayload

func (*FactoryEvent_Payload) MergeWorkRequestEventPayload

func (t *FactoryEvent_Payload) MergeWorkRequestEventPayload(v WorkRequestEventPayload) error

MergeWorkRequestEventPayload performs a merge with any union data inside the FactoryEvent_Payload, using the provided WorkRequestEventPayload

func (*FactoryEvent_Payload) UnmarshalJSON

func (t *FactoryEvent_Payload) UnmarshalJSON(b []byte) error

type FactoryGuard

type FactoryGuard struct {
	// Model Optional model name to scope throttling more narrowly than the provider-level window.
	Model *string `json:"model,omitempty"`

	// ModelProvider Provider whose inference-throttle history controls this factory-level guard.
	ModelProvider WorkerModelProvider `json:"modelProvider"`

	// RefreshWindow Duration string that controls how long the factory should keep re-checking throttle history before allowing the lane again.
	RefreshWindow string `json:"refreshWindow"`

	// Type Factory-level guard condition to evaluate before dispatch-ready transitions can proceed.
	Type GuardType `json:"type"`
}

FactoryGuard Factory-level guard attached at the root factory definition.

type FactoryName

type FactoryName = string

FactoryName Customer-facing identifier for one stored named factory. `GET /factory/~current` 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.

type FactoryState

type FactoryState string

FactoryState Lifecycle state of the running factory.

const (
	FactoryStateCompleted FactoryState = "COMPLETED"
	FactoryStateFailed    FactoryState = "FAILED"
	FactoryStateIdle      FactoryState = "IDLE"
	FactoryStatePaused    FactoryState = "PAUSED"
	FactoryStateRunning   FactoryState = "RUNNING"
)

Defines values for FactoryState.

type FactoryStateResponseEventPayload

type FactoryStateResponseEventPayload struct {
	// PreviousState Lifecycle state of the running factory.
	PreviousState *FactoryState `json:"previousState,omitempty"`
	Reason        *string       `json:"reason,omitempty"`

	// State Lifecycle state of the running factory.
	State FactoryState `json:"state"`
}

FactoryStateResponseEventPayload defines model for FactoryStateResponseEventPayload.

type FactoryWorldMutationView

type FactoryWorldMutationView struct {
	FromPlace *string                `json:"fromPlace,omitempty"`
	Reason    *string                `json:"reason,omitempty"`
	ToPlace   *string                `json:"toPlace,omitempty"`
	Token     *FactoryWorldTokenView `json:"token,omitempty"`
	TokenId   string                 `json:"tokenId"`
	Type      string                 `json:"type"`
}

FactoryWorldMutationView defines model for FactoryWorldMutationView.

type FactoryWorldProviderDiagnostic

type FactoryWorldProviderDiagnostic struct {
	Model            *string    `json:"model,omitempty"`
	Provider         *string    `json:"provider,omitempty"`
	RequestMetadata  *StringMap `json:"requestMetadata,omitempty"`
	ResponseMetadata *StringMap `json:"responseMetadata,omitempty"`
}

FactoryWorldProviderDiagnostic defines model for FactoryWorldProviderDiagnostic.

type FactoryWorldRenderedPromptDiagnostic

type FactoryWorldRenderedPromptDiagnostic struct {
	SystemPromptHash *string    `json:"systemPromptHash,omitempty"`
	UserMessageHash  *string    `json:"userMessageHash,omitempty"`
	Variables        *StringMap `json:"variables,omitempty"`
}

FactoryWorldRenderedPromptDiagnostic defines model for FactoryWorldRenderedPromptDiagnostic.

type FactoryWorldScriptRequestView

type FactoryWorldScriptRequestView struct {
	Args            *[]string `json:"args,omitempty"`
	Attempt         *int      `json:"attempt,omitempty"`
	Command         *string   `json:"command,omitempty"`
	ScriptRequestId *string   `json:"scriptRequestId,omitempty"`
}

FactoryWorldScriptRequestView defines model for FactoryWorldScriptRequestView.

type FactoryWorldScriptResponseView

type FactoryWorldScriptResponseView struct {
	Attempt         *int    `json:"attempt,omitempty"`
	DurationMillis  *int64  `json:"durationMillis,omitempty"`
	ExitCode        *int    `json:"exitCode,omitempty"`
	FailureType     *string `json:"failureType,omitempty"`
	Outcome         *string `json:"outcome,omitempty"`
	ScriptRequestId *string `json:"scriptRequestId,omitempty"`
	Stderr          *string `json:"stderr,omitempty"`
	Stdout          *string `json:"stdout,omitempty"`
}

FactoryWorldScriptResponseView defines model for FactoryWorldScriptResponseView.

type FactoryWorldTokenView

type FactoryWorldTokenView struct {
	CurrentChainingTraceId   *string    `json:"currentChainingTraceId,omitempty"`
	Name                     *string    `json:"name,omitempty"`
	PlaceId                  string     `json:"placeId"`
	PreviousChainingTraceIds *[]string  `json:"previousChainingTraceIds,omitempty"`
	Tags                     *StringMap `json:"tags,omitempty"`
	TokenId                  string     `json:"tokenId"`
	TraceId                  *string    `json:"traceId,omitempty"`
	WorkId                   *string    `json:"workId,omitempty"`
	WorkTypeId               *string    `json:"workTypeId,omitempty"`
}

FactoryWorldTokenView defines model for FactoryWorldTokenView.

type FactoryWorldWorkDiagnostics

type FactoryWorldWorkDiagnostics struct {
	Provider       *FactoryWorldProviderDiagnostic       `json:"provider,omitempty"`
	RenderedPrompt *FactoryWorldRenderedPromptDiagnostic `json:"renderedPrompt,omitempty"`
}

FactoryWorldWorkDiagnostics defines model for FactoryWorldWorkDiagnostics.

type FactoryWorldWorkItemRef

type FactoryWorldWorkItemRef struct {
	CurrentChainingTraceId   *string   `json:"currentChainingTraceId,omitempty"`
	DisplayName              *string   `json:"displayName,omitempty"`
	PreviousChainingTraceIds *[]string `json:"previousChainingTraceIds,omitempty"`
	TraceId                  *string   `json:"traceId,omitempty"`
	WorkId                   string    `json:"workId"`
	WorkTypeId               *string   `json:"workTypeId,omitempty"`
}

FactoryWorldWorkItemRef defines model for FactoryWorldWorkItemRef.

type FactoryWorldWorkstationRequestCountView

type FactoryWorldWorkstationRequestCountView struct {
	DispatchedCount int `json:"dispatchedCount"`
	ErroredCount    int `json:"erroredCount"`
	RespondedCount  int `json:"respondedCount"`
}

FactoryWorldWorkstationRequestCountView defines model for FactoryWorldWorkstationRequestCountView.

type FactoryWorldWorkstationRequestProjectionSlice

type FactoryWorldWorkstationRequestProjectionSlice struct {
	WorkstationRequestsByDispatchId *map[string]FactoryWorldWorkstationRequestView `json:"workstationRequestsByDispatchId,omitempty"`
}

FactoryWorldWorkstationRequestProjectionSlice Additive dashboard read-model contract slice that publishes workstation-request projections keyed by dispatch ID without reintroducing removed `/dashboard` endpoints.

type FactoryWorldWorkstationRequestRequestView

type FactoryWorldWorkstationRequestRequestView struct {
	ConsumedTokens           *[]FactoryWorldTokenView       `json:"consumedTokens,omitempty"`
	CurrentChainingTraceId   *string                        `json:"currentChainingTraceId,omitempty"`
	InputWorkItems           *[]FactoryWorldWorkItemRef     `json:"inputWorkItems,omitempty"`
	InputWorkTypeIds         *[]string                      `json:"inputWorkTypeIds,omitempty"`
	Model                    *string                        `json:"model,omitempty"`
	PreviousChainingTraceIds *[]string                      `json:"previousChainingTraceIds,omitempty"`
	Prompt                   *string                        `json:"prompt,omitempty"`
	Provider                 *string                        `json:"provider,omitempty"`
	RequestMetadata          *StringMap                     `json:"requestMetadata,omitempty"`
	RequestTime              *string                        `json:"requestTime,omitempty"`
	ScriptRequest            *FactoryWorldScriptRequestView `json:"scriptRequest,omitempty"`
	StartedAt                *string                        `json:"startedAt,omitempty"`
	TraceIds                 *[]string                      `json:"traceIds,omitempty"`
	WorkingDirectory         *string                        `json:"workingDirectory,omitempty"`
	Worktree                 *string                        `json:"worktree,omitempty"`
}

FactoryWorldWorkstationRequestRequestView defines model for FactoryWorldWorkstationRequestRequestView.

type FactoryWorldWorkstationRequestResponseView

type FactoryWorldWorkstationRequestResponseView struct {
	Diagnostics      *FactoryWorldWorkDiagnostics    `json:"diagnostics,omitempty"`
	DurationMillis   *int64                          `json:"durationMillis,omitempty"`
	EndTime          *string                         `json:"endTime,omitempty"`
	ErrorClass       *string                         `json:"errorClass,omitempty"`
	FailureMessage   *string                         `json:"failureMessage,omitempty"`
	FailureReason    *string                         `json:"failureReason,omitempty"`
	Feedback         *string                         `json:"feedback,omitempty"`
	Outcome          *string                         `json:"outcome,omitempty"`
	OutputMutations  *[]FactoryWorldMutationView     `json:"outputMutations,omitempty"`
	OutputWorkItems  *[]FactoryWorldWorkItemRef      `json:"outputWorkItems,omitempty"`
	ProviderSession  *ProviderSessionMetadata        `json:"providerSession,omitempty"`
	ResponseMetadata *StringMap                      `json:"responseMetadata,omitempty"`
	ResponseText     *string                         `json:"responseText,omitempty"`
	ScriptResponse   *FactoryWorldScriptResponseView `json:"scriptResponse,omitempty"`
}

FactoryWorldWorkstationRequestResponseView defines model for FactoryWorldWorkstationRequestResponseView.

type FactoryWorldWorkstationRequestView

type FactoryWorldWorkstationRequestView struct {
	Counts          FactoryWorldWorkstationRequestCountView     `json:"counts"`
	DispatchId      string                                      `json:"dispatchId"`
	Request         FactoryWorldWorkstationRequestRequestView   `json:"request"`
	Response        *FactoryWorldWorkstationRequestResponseView `json:"response,omitempty"`
	TransitionId    string                                      `json:"transitionId"`
	WorkstationName *string                                     `json:"workstationName,omitempty"`
}

FactoryWorldWorkstationRequestView defines model for FactoryWorldWorkstationRequestView.

type GorillaServerOptions

type GorillaServerOptions struct {
	BaseURL          string
	BaseRouter       *mux.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type Guard

type Guard struct {
	// MatchConfig For `MATCHES_FIELDS` guards, the field-selector configuration used to compare candidate inputs.
	MatchConfig *GuardMatchConfig `json:"matchConfig,omitempty"`

	// MatchInput For `SAME_NAME` input guards, the peer input workType name from another input in the same workstation.
	MatchInput *string `json:"matchInput,omitempty"`

	// MaxVisits For `VISIT_COUNT` guards, the visit threshold.
	MaxVisits *int `json:"maxVisits,omitempty"`

	// ParentInput For parent-aware input guards, the parent workType name from another input in the same workstation.
	ParentInput *string `json:"parentInput,omitempty"`

	// SpawnedBy For dynamic fanout input guards, the workstation that spawns the children for count tracking.
	SpawnedBy *string `json:"spawnedBy,omitempty"`

	// Type Guard condition to evaluate for this workstation-level or input-level attachment.
	Type GuardType `json:"type"`

	// Workstation For `VISIT_COUNT` guards, the workstation whose visits are counted.
	Workstation *string `json:"workstation,omitempty"`
}

Guard Shared guard attached either to a workstation as a whole or to one specific workstation input.

type GuardMatchConfig

type GuardMatchConfig struct {
	// InputKey Field selector resolved against each candidate input, such as `.Name` or `.Tags["_last_output"]`.
	InputKey string `json:"inputKey"`
}

GuardMatchConfig defines model for GuardMatchConfig.

type GuardType

type GuardType string

GuardType Guard condition attached to a workstation or one of its specific inputs.

const (
	GuardTypeAllChildrenComplete GuardType = "ALL_CHILDREN_COMPLETE"
	GuardTypeAnyChildFailed      GuardType = "ANY_CHILD_FAILED"
	GuardTypeInferenceThrottle   GuardType = "INFERENCE_THROTTLE_GUARD"
	GuardTypeMatchesFields       GuardType = "MATCHES_FIELDS"
	GuardTypeSameName            GuardType = "SAME_NAME"
	GuardTypeVisitCount          GuardType = "VISIT_COUNT"
)

Defines values for GuardType.

type InferenceOutcome

type InferenceOutcome string

InferenceOutcome Result category returned by a provider inference attempt.

const (
	InferenceOutcomeFailed    InferenceOutcome = "FAILED"
	InferenceOutcomeSucceeded InferenceOutcome = "SUCCEEDED"
)

Defines values for InferenceOutcome.

type InferenceRequestEventPayload

type InferenceRequestEventPayload struct {
	// Attempt One-based provider attempt number for this dispatch.
	Attempt int `json:"attempt"`

	// InferenceRequestId Stable identifier correlating this provider request with its response.
	InferenceRequestId string `json:"inferenceRequestId"`

	// Prompt Rendered prompt sent to the provider.
	Prompt string `json:"prompt"`

	// WorkingDirectory Working directory resolved for the provider attempt.
	WorkingDirectory string `json:"workingDirectory"`

	// Worktree Worktree path resolved for the provider attempt.
	Worktree string `json:"worktree"`
}

InferenceRequestEventPayload Request 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.

type InferenceResponseEventPayload

type InferenceResponseEventPayload struct {
	// Attempt One-based provider attempt number for this dispatch.
	Attempt int `json:"attempt"`

	// Diagnostics Dashboard-facing execution diagnostics that omit raw prompts, command stdin, and command environment values.
	Diagnostics *SafeWorkDiagnostics `json:"diagnostics,omitempty"`

	// DurationMillis Provider call duration in milliseconds.
	DurationMillis int64 `json:"durationMillis"`

	// ErrorClass Stable failure classification when available.
	ErrorClass *string `json:"errorClass,omitempty"`

	// ExitCode Process exit code when the provider failure exposes one.
	ExitCode *int `json:"exitCode,omitempty"`

	// InferenceRequestId Identifier from the matching inference request event.
	InferenceRequestId string `json:"inferenceRequestId"`

	// Outcome Result category returned by a provider inference attempt.
	Outcome         InferenceOutcome         `json:"outcome"`
	ProviderSession *ProviderSessionMetadata `json:"providerSession,omitempty"`

	// Response Provider response text when present.
	Response *string `json:"response,omitempty"`
}

InferenceResponseEventPayload Response 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.

type InitialStructureRequestEventPayload

type InitialStructureRequestEventPayload struct {
	// Factory Top-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.
	Factory         Factory    `json:"factory"`
	Metadata        *StringMap `json:"metadata,omitempty"`
	SourceDirectory *string    `json:"sourceDirectory,omitempty"`
}

InitialStructureRequestEventPayload Runtime topology snapshot before work moves.

type InputKind

type InputKind string

InputKind Kinds of input. `DEFAULT` passes opaque input through to workstations as-is.

const (
	InputKindDefault InputKind = "DEFAULT"
)

Defines values for InputKind.

type InputType

type InputType struct {
	// Name Input type name. The reserved name "default" is implicit.
	Name string `json:"name"`

	// Type Kinds of input. `DEFAULT` passes opaque input through to workstations as-is.
	Type InputKind `json:"type"`
}

InputType Declared types of inputs. Used to force the inputs of a certain work type to be of a certain shape, like a specific JSON structure.

type IntegerMap

type IntegerMap map[string]int

IntegerMap defines model for IntegerMap.

type InternalError

type InternalError = ErrorResponse

InternalError defines model for InternalError.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListWorkParams

type ListWorkParams struct {
	// MaxResults Optional positive page size. Omit to use the default page size; non-positive values fall back to the default after successful integer binding.
	MaxResults *MaxResults `form:"maxResults,omitempty" json:"maxResults,omitempty"`

	// NextToken Optional base64-encoded token ID cursor.
	NextToken *NextToken `form:"nextToken,omitempty" json:"nextToken,omitempty"`
}

ListWorkParams defines parameters for ListWork.

type ListWorkResponse

type ListWorkResponse struct {
	PaginationContext *PaginationContext `json:"paginationContext,omitempty"`
	Results           []TokenResponse    `json:"results"`
}

ListWorkResponse defines model for ListWorkResponse.

type MaxResults

type MaxResults = int

MaxResults defines model for MaxResults.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NextToken

type NextToken = string

NextToken defines model for NextToken.

type NotFound

type NotFound = ErrorResponse

NotFound defines model for NotFound.

type PaginationContext

type PaginationContext struct {
	MaxResults int     `json:"maxResults"`
	NextToken  *string `json:"nextToken,omitempty"`
}

PaginationContext defines model for PaginationContext.

type PanicDiagnostic

type PanicDiagnostic struct {
	Message *string `json:"message,omitempty"`
	Stack   *string `json:"stack,omitempty"`
}

PanicDiagnostic defines model for PanicDiagnostic.

type ProviderDiagnostic

type ProviderDiagnostic struct {
	Model            *string    `json:"model,omitempty"`
	Provider         *string    `json:"provider,omitempty"`
	RequestMetadata  *StringMap `json:"requestMetadata,omitempty"`
	ResponseMetadata *StringMap `json:"responseMetadata,omitempty"`
}

ProviderDiagnostic defines model for ProviderDiagnostic.

type ProviderFailureMetadata

type ProviderFailureMetadata struct {
	Family *string `json:"family,omitempty"`
	Type   *string `json:"type,omitempty"`
}

ProviderFailureMetadata defines model for ProviderFailureMetadata.

type ProviderSessionMetadata

type ProviderSessionMetadata struct {
	Id       *string `json:"id,omitempty"`
	Kind     *string `json:"kind,omitempty"`
	Provider *string `json:"provider,omitempty"`
}

ProviderSessionMetadata defines model for ProviderSessionMetadata.

type Relation

type Relation struct {
	RequiredState  *string `json:"requiredState,omitempty"`
	SourceWorkName string  `json:"sourceWorkName"`
	TargetWorkId   *string `json:"targetWorkId,omitempty"`
	TargetWorkName string  `json:"targetWorkName"`

	// Type Relationship category between two pieces of work.
	Type RelationType `json:"type"`
}

Relation defines model for Relation.

type RelationType

type RelationType string

RelationType Relationship category between two pieces of work.

const (
	RelationTypeDependsOn   RelationType = "DEPENDS_ON"
	RelationTypeParentChild RelationType = "PARENT_CHILD"
	RelationTypeSpawnedBy   RelationType = "SPAWNED_BY"
)

Defines values for RelationType.

type RelationshipChangeRequestEventPayload

type RelationshipChangeRequestEventPayload struct {
	Relation Relation `json:"relation"`
}

RelationshipChangeRequestEventPayload defines model for RelationshipChangeRequestEventPayload.

type RenderedPromptDiagnostic

type RenderedPromptDiagnostic struct {
	SystemPromptHash *string    `json:"systemPromptHash,omitempty"`
	UserMessageHash  *string    `json:"userMessageHash,omitempty"`
	Variables        *StringMap `json:"variables,omitempty"`
}

RenderedPromptDiagnostic defines model for RenderedPromptDiagnostic.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RequiredTool

type RequiredTool struct {
	// Command Executable lookup token that must resolve on PATH.
	Command string `json:"command"`

	// Name Human-readable tool name used in manifests and validation output.
	Name string `json:"name"`

	// Purpose Optional explanation of why the portable factory requires this tool.
	Purpose *string `json:"purpose,omitempty"`

	// VersionArgs Optional argument vector used by future validation flows to probe the tool version without changing the executable lookup token.
	VersionArgs *[]string `json:"versionArgs,omitempty"`
}

RequiredTool One declarative external tool dependency for a portable factory.

type Resource

type Resource struct {
	// Capacity Total units of this resource available to the factory at one time.
	Capacity int `json:"capacity"`

	// Name Resource name referenced from worker requirements and workstation resourceUsage entries.
	Name string `json:"name"`
}

Resource Shared capacity that limits how much work the factory can run at once, such as worker slots or external service quotas.

type ResourceManifest

type ResourceManifest struct {
	// BundledFiles 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 or docs roots for SCRIPT or DOC entries, or match the supported root-helper allowlist for ROOT_HELPER entries.
	BundledFiles *[]BundledFile `json:"bundledFiles,omitempty"`

	// RequiredTools Declarative external tools that must already resolve on PATH. These entries are validated but not embedded or installed.
	RequiredTools *[]RequiredTool `json:"requiredTools,omitempty"`
}

ResourceManifest Canonical portability manifest for Agent Factory bundles. Required tools are validation-only PATH dependencies; bundled files carry portable content for restoration inside the factory boundary.

type ResourceRequirement

type ResourceRequirement struct {
	Capacity int    `json:"capacity"`
	Name     string `json:"name"`
}

ResourceRequirement defines model for ResourceRequirement.

type ResourceUsage

type ResourceUsage struct {
	Available int    `json:"available"`
	Name      string `json:"name"`
	Total     int    `json:"total"`
}

ResourceUsage defines model for ResourceUsage.

type RunRequestEventPayload

type RunRequestEventPayload struct {
	Diagnostics *Diagnostics `json:"diagnostics,omitempty"`

	// Factory Top-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.
	Factory    Factory    `json:"factory"`
	RecordedAt time.Time  `json:"recordedAt"`
	WallClock  *WallClock `json:"wallClock,omitempty"`
}

RunRequestEventPayload defines model for RunRequestEventPayload.

type RunResponseEventPayload

type RunResponseEventPayload struct {
	Diagnostics *Diagnostics `json:"diagnostics,omitempty"`
	Reason      *string      `json:"reason,omitempty"`

	// State Lifecycle state of the running factory.
	State     *FactoryState `json:"state,omitempty"`
	WallClock *WallClock    `json:"wallClock,omitempty"`
}

RunResponseEventPayload defines model for RunResponseEventPayload.

type SafeWorkDiagnostics

type SafeWorkDiagnostics struct {
	Provider       *ProviderDiagnostic       `json:"provider,omitempty"`
	RenderedPrompt *RenderedPromptDiagnostic `json:"renderedPrompt,omitempty"`
}

SafeWorkDiagnostics Dashboard-facing execution diagnostics that omit raw prompts, command stdin, and command environment values.

type ScriptExecutionOutcome

type ScriptExecutionOutcome string

ScriptExecutionOutcome Result category returned by one public script execution boundary.

const (
	ScriptExecutionOutcomeFailedExitCode ScriptExecutionOutcome = "FAILED_EXIT_CODE"
	ScriptExecutionOutcomeProcessError   ScriptExecutionOutcome = "PROCESS_ERROR"
	ScriptExecutionOutcomeSucceeded      ScriptExecutionOutcome = "SUCCEEDED"
	ScriptExecutionOutcomeTimedOut       ScriptExecutionOutcome = "TIMED_OUT"
)

Defines values for ScriptExecutionOutcome.

type ScriptFailureType

type ScriptFailureType string

ScriptFailureType Stable failure classification for script responses without a normal process exit code.

const (
	ScriptFailureTypeProcessError ScriptFailureType = "PROCESS_ERROR"
	ScriptFailureTypeTimeout      ScriptFailureType = "TIMEOUT"
)

Defines values for ScriptFailureType.

type ScriptRequestEventPayload

type ScriptRequestEventPayload struct {
	// Args Fully resolved command arguments passed to the script command runner.
	Args []string `json:"args"`

	// Attempt One-based script attempt number for this dispatch.
	Attempt int `json:"attempt"`

	// Command Concrete command name executed for this script attempt.
	Command    string `json:"command"`
	DispatchId string `json:"dispatchId"`

	// ScriptRequestId Stable identifier correlating this script request with its response.
	ScriptRequestId string `json:"scriptRequestId"`
	TransitionId    string `json:"transitionId"`
}

ScriptRequestEventPayload Request 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.

type ScriptResponseEventPayload

type ScriptResponseEventPayload struct {
	// Attempt One-based script attempt number for this dispatch.
	Attempt    int    `json:"attempt"`
	DispatchId string `json:"dispatchId"`

	// DurationMillis Script execution duration in milliseconds.
	DurationMillis int64 `json:"durationMillis"`

	// ExitCode Process exit code when the command returned one.
	ExitCode *int `json:"exitCode,omitempty"`

	// FailureType Stable failure classification for script responses without a normal process exit code.
	FailureType *ScriptFailureType `json:"failureType,omitempty"`

	// Outcome Result category returned by one public script execution boundary.
	Outcome ScriptExecutionOutcome `json:"outcome"`

	// ScriptRequestId Identifier from the matching script request event.
	ScriptRequestId string `json:"scriptRequestId"`

	// Stderr Captured stderr text from the script execution boundary.
	Stderr string `json:"stderr"`

	// Stdout Captured stdout text from the script execution boundary.
	Stdout       string `json:"stdout"`
	TransitionId string `json:"transitionId"`
}

ScriptResponseEventPayload Response 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.

type ServerInterface

type ServerInterface interface {
	// Stream factory events
	// (GET /events)
	GetEvents(w http.ResponseWriter, r *http.Request)
	// Create factory
	// (POST /factory)
	CreateFactory(w http.ResponseWriter, r *http.Request)
	// Get current factory
	// (GET /factory/~current)
	GetCurrentFactory(w http.ResponseWriter, r *http.Request)
	// Get runtime status
	// (GET /status)
	GetStatus(w http.ResponseWriter, r *http.Request)
	// List work
	// (GET /work)
	ListWork(w http.ResponseWriter, r *http.Request, params ListWorkParams)
	// Submit work
	// (POST /work)
	SubmitWork(w http.ResponseWriter, r *http.Request)
	// Upsert work request
	// (PUT /work-requests/{request_id})
	UpsertWorkRequest(w http.ResponseWriter, r *http.Request, requestId string)
	// Get work token
	// (GET /work/{id})
	GetWork(w http.ResponseWriter, r *http.Request, id WorkOrTokenID)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CreateFactory

func (siw *ServerInterfaceWrapper) CreateFactory(w http.ResponseWriter, r *http.Request)

CreateFactory operation middleware

func (*ServerInterfaceWrapper) GetCurrentFactory

func (siw *ServerInterfaceWrapper) GetCurrentFactory(w http.ResponseWriter, r *http.Request)

GetCurrentFactory operation middleware

func (*ServerInterfaceWrapper) GetEvents

func (siw *ServerInterfaceWrapper) GetEvents(w http.ResponseWriter, r *http.Request)

GetEvents operation middleware

func (*ServerInterfaceWrapper) GetStatus

func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request)

GetStatus operation middleware

func (*ServerInterfaceWrapper) GetWork

GetWork operation middleware

func (*ServerInterfaceWrapper) ListWork

func (siw *ServerInterfaceWrapper) ListWork(w http.ResponseWriter, r *http.Request)

ListWork operation middleware

func (*ServerInterfaceWrapper) SubmitWork

func (siw *ServerInterfaceWrapper) SubmitWork(w http.ResponseWriter, r *http.Request)

SubmitWork operation middleware

func (*ServerInterfaceWrapper) UpsertWorkRequest

func (siw *ServerInterfaceWrapper) UpsertWorkRequest(w http.ResponseWriter, r *http.Request)

UpsertWorkRequest operation middleware

type StatusCategories

type StatusCategories struct {
	Failed     int `json:"failed"`
	Initial    int `json:"initial"`
	Processing int `json:"processing"`
	Terminal   int `json:"terminal"`
}

StatusCategories defines model for StatusCategories.

type StatusResponse

type StatusResponse struct {
	Categories    StatusCategories `json:"categories"`
	FactoryState  string           `json:"factoryState"`
	Resources     *[]ResourceUsage `json:"resources,omitempty"`
	RuntimeStatus string           `json:"runtimeStatus"`
	TotalTokens   int              `json:"totalTokens"`
}

StatusResponse defines model for StatusResponse.

type StringMap

type StringMap map[string]string

StringMap defines model for StringMap.

type SubmitRelation

type SubmitRelation struct {
	// RequiredState Required target state before the dependency can proceed.
	RequiredState *string `json:"requiredState,omitempty"`

	// TargetWorkId Target runtime work identifier for the relation.
	TargetWorkId string `json:"targetWorkId"`

	// Type Relationship category between two pieces of work.
	Type RelationType `json:"type"`
}

SubmitRelation defines model for SubmitRelation.

type SubmitWorkJSONRequestBody

type SubmitWorkJSONRequestBody = SubmitWorkRequest

SubmitWorkJSONRequestBody defines body for SubmitWork for application/json ContentType.

type SubmitWorkRequest

type SubmitWorkRequest struct {
	// CurrentChainingTraceId Explicit chaining-trace identifier for the submitted work.
	CurrentChainingTraceId *string `json:"currentChainingTraceId,omitempty"`
	Name                   *string `json:"name,omitempty"`

	// Payload Opaque work payload forwarded as raw JSON.
	Payload interface{} `json:"payload,omitempty"`

	// Relations Optional token-level runtime relations preserved on the submitted work item.
	Relations *[]SubmitRelation `json:"relations,omitempty"`
	Tags      *StringMap        `json:"tags,omitempty"`

	// TraceId Legacy trace identifier retained for compatibility; prefer currentChainingTraceId.
	TraceId *string `json:"traceId,omitempty"`

	// WorkTypeName Configured work type name from factory.json to submit to.
	WorkTypeName string `json:"workTypeName"`
}

SubmitWorkRequest defines model for SubmitWorkRequest.

type SubmitWorkResponse

type SubmitWorkResponse struct {
	TraceId string `json:"traceId"`
}

SubmitWorkResponse defines model for SubmitWorkResponse.

type TokenHistory

type TokenHistory struct {
	ConsecutiveFailures *IntegerMap `json:"consecutiveFailures,omitempty"`
	LastError           *string     `json:"lastError,omitempty"`
	PlaceVisits         *IntegerMap `json:"placeVisits,omitempty"`
	TotalVisits         *IntegerMap `json:"totalVisits,omitempty"`
}

TokenHistory defines model for TokenHistory.

type TokenResponse

type TokenResponse struct {
	CreatedAt time.Time     `json:"createdAt"`
	EnteredAt time.Time     `json:"enteredAt"`
	History   *TokenHistory `json:"history,omitempty"`
	Id        string        `json:"id"`
	Name      *string       `json:"name,omitempty"`
	PlaceId   string        `json:"placeId"`
	Tags      *StringMap    `json:"tags,omitempty"`
	TraceId   string        `json:"traceId"`
	WorkId    string        `json:"workId"`
	WorkType  string        `json:"workType"`
}

TokenResponse defines model for TokenResponse.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Transition

type Transition struct {
	// From Source workstation name.
	From string `json:"from"`

	// To Destination workstation name.
	To string `json:"to"`
}

Transition defines model for Transition.

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpsertWorkRequestJSONRequestBody

type UpsertWorkRequestJSONRequestBody = WorkRequest

UpsertWorkRequestJSONRequestBody defines body for UpsertWorkRequest for application/json ContentType.

type UpsertWorkRequestResponse

type UpsertWorkRequestResponse struct {
	RequestId string `json:"requestId"`
	TraceId   string `json:"traceId"`
}

UpsertWorkRequestResponse defines model for UpsertWorkRequestResponse.

type WallClock

type WallClock struct {
	FinishedAt *time.Time `json:"finishedAt,omitempty"`
	StartedAt  *time.Time `json:"startedAt,omitempty"`
}

WallClock defines model for WallClock.

type Work

type Work struct {
	// CurrentChainingTraceId Explicit chaining-trace identifier for this submitted work item.
	CurrentChainingTraceId *string `json:"currentChainingTraceId,omitempty"`

	// Name A human readable name for the work, not unique
	Name string `json:"name"`

	// Payload Opaque work payload forwarded as raw JSON, or a binary data, or whatever else.
	Payload interface{} `json:"payload,omitempty"`

	// PreviousChainingTraceIds Explicit predecessor chaining traces that directly caused this work item.
	PreviousChainingTraceIds *[]string `json:"previousChainingTraceIds,omitempty"`

	// RequestId Identifier for the original request that created this work, if applicable
	RequestId *string `json:"requestId,omitempty"`

	// State Explicit initial state for the submitted work item. Omit this to use the configured initial state for the work type.
	State *string    `json:"state,omitempty"`
	Tags  *StringMap `json:"tags,omitempty"`

	// TraceId Legacy trace identifier retained for compatibility; prefer currentChainingTraceId.
	TraceId *string `json:"traceId,omitempty"`

	// WorkId Unique identifier for the work
	WorkId *string `json:"workId,omitempty"`

	// WorkTypeName Configured work type name from factory.json for this submitted work item.
	WorkTypeName *string `json:"workTypeName,omitempty"`
}

Work A piece of work.

type WorkDiagnostics

type WorkDiagnostics struct {
	Command        *CommandDiagnostic        `json:"command,omitempty"`
	Metadata       *StringMap                `json:"metadata,omitempty"`
	Panic          *PanicDiagnostic          `json:"panic,omitempty"`
	Provider       *ProviderDiagnostic       `json:"provider,omitempty"`
	RenderedPrompt *RenderedPromptDiagnostic `json:"renderedPrompt,omitempty"`
}

WorkDiagnostics defines model for WorkDiagnostics.

type WorkMetrics

type WorkMetrics struct {
	Cost          *float64 `json:"cost,omitempty"`
	DurationNanos *int64   `json:"durationNanos,omitempty"`
	RetryCount    *int     `json:"retryCount,omitempty"`
}

WorkMetrics defines model for WorkMetrics.

type WorkOrTokenID

type WorkOrTokenID = string

WorkOrTokenID defines model for WorkOrTokenID.

type WorkOutcome

type WorkOutcome string

WorkOutcome Result category returned by a workstation execution.

const (
	WorkOutcomeAccepted WorkOutcome = "ACCEPTED"
	WorkOutcomeContinue WorkOutcome = "CONTINUE"
	WorkOutcomeFailed   WorkOutcome = "FAILED"
	WorkOutcomeRejected WorkOutcome = "REJECTED"
)

Defines values for WorkOutcome.

type WorkRequest

type WorkRequest struct {
	// CurrentChainingTraceId Optional default chaining-trace identifier applied to submitted work items that omit it.
	CurrentChainingTraceId *string `json:"currentChainingTraceId,omitempty"`

	// Relations Relationships between various work items.
	Relations *[]Relation `json:"relations,omitempty"`

	// RequestId Stable client-provided request identifier used for idempotent batch submission.
	RequestId string `json:"requestId"`

	// Type Kind of work request accepted by the factory.
	Type WorkRequestType `json:"type"`

	// Works A batch of work items to be submitted together.
	Works *[]Work `json:"works,omitempty"`
}

WorkRequest defines model for WorkRequest.

type WorkRequestEventPayload

type WorkRequestEventPayload struct {
	ParentLineage *[]string   `json:"parentLineage,omitempty"`
	Relations     *[]Relation `json:"relations,omitempty"`
	Source        *string     `json:"source,omitempty"`

	// Type Kind of work request accepted by the factory.
	Type  WorkRequestType `json:"type"`
	Works *[]Work         `json:"works,omitempty"`
}

WorkRequestEventPayload Normalized 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.

type WorkRequestType

type WorkRequestType string

WorkRequestType Kind of work request accepted by the factory.

const (
	WorkRequestTypeFactoryRequestBatch WorkRequestType = "FACTORY_REQUEST_BATCH"
)

Defines values for WorkRequestType.

type WorkState

type WorkState struct {
	// Name Customer-authored state name referenced by workstation inputs and outputs.
	Name string `json:"name"`

	// Type Categories 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.
	Type WorkStateType `json:"type"`
}

WorkState A lifecycle state that a work item can occupy inside one work type.

type WorkStateType

type WorkStateType string

WorkStateType Categories 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.

const (
	WorkStateTypeFAILED     WorkStateType = "FAILED"
	WorkStateTypeINITIAL    WorkStateType = "INITIAL"
	WorkStateTypePROCESSING WorkStateType = "PROCESSING"
	WorkStateTypeTERMINAL   WorkStateType = "TERMINAL"
)

Defines values for WorkStateType.

type WorkType

type WorkType struct {
	// Name Customer-authored work type name referenced by workstation inputs, outputs, and submitted work.
	Name string `json:"name"`

	// States Lifecycle states available for work items of this type.
	States []WorkState `json:"states"`
}

WorkType A named category of work that can move through the factory. Each work type declares the lifecycle states its work items can occupy.

type Worker

type Worker struct {
	// Args Additional command arguments passed to the configured command.
	Args *[]string `json:"args,omitempty"`

	// Body Inline worker instructions or script body when the worker is authored directly in factory config.
	Body *string `json:"body,omitempty"`

	// Command Command to execute when this worker runs through a command or script provider.
	Command *string `json:"command,omitempty"`

	// ExecutorProvider Concrete worker-provider wrappers supported by the public factory-config contract.
	ExecutorProvider *WorkerProvider `json:"executorProvider,omitempty"`

	// Model Model identifier to request from the configured model provider when this worker uses model execution.
	Model *string `json:"model,omitempty"`

	// ModelProvider Canonical model-provider identifiers supported by model workers in factory config.
	ModelProvider *WorkerModelProvider `json:"modelProvider,omitempty"`

	// Name Worker name referenced by Workstation.worker.
	Name string `json:"name"`

	// Resources Resource capacity this worker requires before it can be dispatched.
	Resources *[]ResourceRequirement `json:"resources,omitempty"`

	// SkipPermissions When true, bypasses permission checks for providers that support permission gating.
	SkipPermissions *bool `json:"skipPermissions,omitempty"`

	// StopToken Marker that tells model-oriented workers where to stop generated output when the provider supports it.
	StopToken *string `json:"stopToken,omitempty"`

	// Timeout Optional Go duration that caps one worker execution attempt.
	Timeout *string `json:"timeout,omitempty"`

	// Type Worker implementation families supported by the public factory-config contract.
	Type *WorkerType `json:"type,omitempty"`
}

Worker A reusable worker definition that tells the factory how a workstation should execute work, such as through a model-backed agent or a script.

type WorkerModelProvider

type WorkerModelProvider string

WorkerModelProvider Canonical model-provider identifiers supported by model workers in factory config.

const (
	WorkerModelProviderClaude WorkerModelProvider = "CLAUDE"
	WorkerModelProviderCodex  WorkerModelProvider = "CODEX"
)

Defines values for WorkerModelProvider.

type WorkerProvider

type WorkerProvider string

WorkerProvider Concrete worker-provider wrappers supported by the public factory-config contract.

const (
	WorkerProviderScriptWrap WorkerProvider = "SCRIPT_WRAP"
)

Defines values for WorkerProvider.

type WorkerType

type WorkerType string

WorkerType Worker implementation families supported by the public factory-config contract.

const (
	WorkerTypeModelWorker  WorkerType = "MODEL_WORKER"
	WorkerTypeScriptWorker WorkerType = "SCRIPT_WORKER"
)

Defines values for WorkerType.

type Workstation

type Workstation struct {
	// Behavior Scheduling 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.
	Behavior *WorkstationKind `json:"behavior,omitempty"`

	// Body Inline workstation instructions or script body when authored directly in factory config.
	Body *string `json:"body,omitempty"`

	// CopyReferencedScripts Copy supported referenced script files into the expanded workstation layout when config expand runs.
	CopyReferencedScripts *bool `json:"copyReferencedScripts,omitempty"`

	// Cron Trigger timing for cron workstations. Cron workstations use a schedule expression; interval triggers are not supported.
	Cron *WorkstationCron `json:"cron,omitempty"`
	Env  *StringMap       `json:"env,omitempty"`

	// Guards Guarded loop breakers should use `VISIT_COUNT` guards here with a `LOGICAL_MOVE` workstation instead of top-level exhaustion rules.
	Guards *[]Guard `json:"guards,omitempty"`

	// Id Optional stable identifier for this workstation in serialized runtime and replay payloads.
	Id *string `json:"id,omitempty"`

	// Inputs Work states this workstation can consume before it dispatches.
	Inputs []WorkstationIO `json:"inputs"`

	// Limits Retry and execution ceilings applied to one workstation definition.
	Limits *WorkstationLimits `json:"limits,omitempty"`

	// Name Customer-authored workstation name used by guards, diagnostics, and authored references.
	Name string `json:"name"`

	// OnContinue Optional destination emitted when the workstation makes partial progress and should continue iterating.
	OnContinue *[]WorkstationIO `json:"onContinue,omitempty"`

	// OnFailure Optional destination emitted when the workstation fails permanently.
	OnFailure *[]WorkstationIO `json:"onFailure,omitempty"`

	// OnRejection Optional destination emitted when the worker rejects the current work without a hard failure.
	OnRejection *[]WorkstationIO `json:"onRejection,omitempty"`

	// OutputSchema JSON schema string used to validate or parse structured model output when configured.
	OutputSchema *string `json:"outputSchema,omitempty"`

	// Outputs Work states emitted after this workstation succeeds.
	Outputs []WorkstationIO `json:"outputs"`

	// PromptFile Path to a prompt template file loaded for model-oriented workstation execution.
	PromptFile *string `json:"promptFile,omitempty"`

	// Resources Resource capacity this workstation consumes while one dispatch is in flight.
	Resources *[]ResourceRequirement `json:"resources,omitempty"`

	// StopWords Stop words authored on the topology entry for model-oriented dispatches.
	StopWords *[]string `json:"stopWords,omitempty"`

	// Type Runtime workstation implementation types supported by the public factory-config contract.
	Type *WorkstationType `json:"type,omitempty"`

	// Worker Name of a worker declared in the workers list.
	Worker string `json:"worker"`

	// WorkingDirectory Go template resolved from token tags at dispatch time.
	WorkingDirectory *string `json:"workingDirectory,omitempty"`

	// Worktree Go template resolved and passed as the worktree path to CLI dispatchers.
	Worktree *string `json:"worktree,omitempty"`
}

Workstation A processing step in the factory graph. Workstations consume authored work states, run a worker or logical move, and emit the next work states.

type WorkstationCron

type WorkstationCron struct {
	// ExpiryWindow 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.
	ExpiryWindow *string `json:"expiryWindow,omitempty"`

	// Jitter Non-negative Go duration used as the maximum deterministic delay added to scheduled time tokens. Defaults to "0s".
	Jitter *string `json:"jitter,omitempty"`

	// Schedule Standard five-field cron expression used to produce internal time work while the factory service is running.
	Schedule string `json:"schedule"`

	// TriggerAtStart When true, service startup submits one immediate internal time work item before waiting for the next scheduled cron fire.
	TriggerAtStart *bool `json:"triggerAtStart,omitempty"`
}

WorkstationCron Trigger timing for cron workstations. Cron workstations use a schedule expression; interval triggers are not supported.

type WorkstationIO

type WorkstationIO struct {
	// Guards Per-input guards that must pass before this specific input can be used.
	Guards *[]Guard `json:"guards,omitempty"`

	// State Name of the work state consumed or emitted for the referenced work type.
	State string `json:"state"`

	// WorkType Name of the work type consumed or emitted at this edge of the workstation.
	WorkType string `json:"workType"`
}

WorkstationIO One authored work-state reference consumed or emitted by a workstation.

type WorkstationKind

type WorkstationKind string

WorkstationKind Scheduling 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.

const (
	WorkstationKindCron     WorkstationKind = "CRON"
	WorkstationKindRepeater WorkstationKind = "REPEATER"
	WorkstationKindStandard WorkstationKind = "STANDARD"
)

Defines values for WorkstationKind.

type WorkstationLimits

type WorkstationLimits struct {
	// MaxExecutionTime Go duration limit for one dispatch attempt before it times out.
	MaxExecutionTime *string `json:"maxExecutionTime,omitempty"`

	// MaxRetries Maximum number of retry attempts after a failed dispatch before the workstation gives up.
	MaxRetries *int `json:"maxRetries,omitempty"`
}

WorkstationLimits Retry and execution ceilings applied to one workstation definition.

type WorkstationType

type WorkstationType string

WorkstationType Runtime workstation implementation types supported by the public factory-config contract.

const (
	WorkstationTypeLogicalMove      WorkstationType = "LOGICAL_MOVE"
	WorkstationTypeModelWorkstation WorkstationType = "MODEL_WORKSTATION"
)

Defines values for WorkstationType.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL