Dynamic Workflows
Author JavaScript orchestrator-backed factories and relate dynamic workflow APIs to Factory configuration.
Orchestrator Identity
The live FactoryOrchestrator definition is the authored orchestrator identity on one factory. Dynamic workflows use kind JAVASCRIPT with javascript configuration instead of Petri graph fields. When orchestrator is omitted, existing Petri factories load through compatibility defaulting to PETRI. Exhaustive Factory field inventories stay on the full schema and API reference pages.FactoryOrchestrator
objectAuthored orchestrator identity for one factory. When omitted, existing Petri factories load through compatibility defaulting to orchestrator.kind = PETRI.
- additionalProperties
false (closed)
Fields
JavaScript-specific orchestrator configuration. Required when kind = JAVASCRIPT.
Petri-specific orchestrator configuration. Required only when kind = PETRI and additional Petri options are authored.
JavaScript Orchestrator Configuration
The live FactoryOrchestratorJavaScriptConfig fragment carries workflow source identity, metadata, argsSchema, defaultPolicy, and optional inline source for JavaScript factories. Source-resolution knobs on the CLI and Model Context Protocol (MCP) surfaces resolve into this shared configuration shape rather than inventing a separate dynamic-workflow contract.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
- agents
agentsOptionalobjectNamed child-agent roles and their operator worker preset defaults.
- additionalProperties
/$defs/FactoryOrchestratorJavaScriptAgent
- additionalProperties
- argsSchema
argsSchemaOptionalobjectJSON Schema object describing workflow invocation arguments.
- additionalProperties
true (open)
- additionalProperties
- defaultPolicy
defaultPolicyOptionalobjectDefault JavaScript workflow policy object applied when no runtime override exists.
- additionalProperties
true (open)
- additionalProperties
- dialect
dialectOptionalstringOptional JavaScript dialect label for the authored workflow source.
- entrypoint
entrypointOptionalstringOptional exported entrypoint or phase name used to start the workflow.
Inline workflow source when the factory carries source text directly.
Free-form JavaScript orchestrator metadata for authoring and diagnostics.
- sourceHash
sourceHashOptionalstringOptional content hash for the resolved workflow source.
- sourceRef
sourceRefOptionalstringFactory-relative or authored reference to the workflow source file.
Invocation Signature
The live FactoryInvocationSignature fragment is the callable argument contract CLI, API, dashboard, and packaged-factory surfaces share when invoking one factory. Teaching embeds show the signature shape; exhaustive operation inventories and OpenAPI catalogs stay on the full schema and API reference pages.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
Optional customer-facing hint for the factory's primary output shape.
Declared invocation parameters keyed by canonical parameter name.
- unknownNamedArgumentPolicy
unknownNamedArgumentPolicyOptionalFactoryInvocationUnknownNamedArgumentPolicyPolicy for named inputs that do not match any declared parameter binding.
API And Configuration Relationship
Dynamic workflows use the shared Factory Session API surface. Call the CLI workflow path to validate source and start or inspect a durable JavaScript Factory Session. Call Model Context Protocol (MCP) Factory Session tools from an MCP host. Read the same session through durable list, show, events, and preview style lookups. There is no separate dynamic-workflow resource type — every live run is still a Factory Session. Configuration covers two jobs: resolve JavaScript orchestrator source from a project root, and choose how an MCP host launches you mcp serve.Use the you workflow CLI path for JavaScript Factory Session work. Validate source before execution, start a durable session, then inspect status and result for that same Factory Session id. Full MCP tool catalogs and OpenAPI operation inventories stay on the API reference.| Command | Purpose |
|---|---|
| you workflow validate | Resolve and validate JavaScript workflow source without creating a Factory Session. |
| you workflow start | Start one durable Factory Session asynchronously and return inspection links. |
| you workflow status | Read durable Factory Session lifecycle status and progress. |
| you workflow result | Read the durable Factory Session final or partial result. |
| Knob | Purpose |
|---|---|
| --dir / project root | Project root used for ordered workflow source lookup. you workflow validate defaults --dir to factory. |
| --kind WORKFLOW_NAME | Resolve a named workflow from the project root. Pair with --value for the workflow name. |
| --kind INLINE_WORKFLOW | Validate inline orchestrator source text. Pair with --inline for the JavaScript or TypeScript source. |
| --args-schema | Optional orchestrator.javascript argsSchema JSON for validation and start contracts. |
| --requested-policy | Optional requested policy override JSON applied through the shared validation and preview contract. |
| Mode | Launch args | Purpose |
|---|---|---|
| Fixture-backed (default) | mcp serve | Deterministic durable session fixture catalog for install smoke, fixture-driven polling, and offline host validation. |
| Runtime-backed | mcp serve --runtime | Shared durable JavaScript runtime for live INLINE_WORKFLOW execution with real async start, status polling, and result reads. |