Contracts¶
This component page maps the shared contract package that keeps OMEGA network payloads,
persisted artifacts, scenario profiles, task graph truth, WorkerExecutionReport records, planning records,
worker execution artifacts, public evidence, and operator/monitoring views behind source-owned
Pydantic models.
Concept Model¶
Contracts are the shared language for anything that crosses a service boundary or becomes a
persisted mission artifact. They keep network payloads, ScenarioId/ScenarioProfile,
task graph nodes, mission snapshots, WorkerExecutionReport lifecycle records, planning diagnostics, runtime artifact
pointers, public evidence projections, and monitoring read models behind source-owned
Pydantic definitions instead of prose-only conventions.
The package separates mission authority from diagnostic views. TaskNode is the compiled
atomic work unit; TaskOutputRef is resolved by the orchestrator before worker dispatch.
Planner envelopes and planning traces are preserved for diagnostics and read models. Mission
state snapshots represent current authority, while event logs and artifact wrappers preserve
history. Worker execution contracts describe requests and ordered WorkerExecutionReport
records, while runtime
artifacts are pointers or summaries rather than worker-private implementation details.
Worker-owned MCP operation DTOs preserve skill_id + public worker identity identity below
the public worker boundary.
Implementation Flow¶
Services import stable names from omega_contracts and validate data at package seams.
The orchestrator accepts mission submit models, canonicalizes scenario profile inputs,
persists schema-versioned mission artifacts, stores the authoritative task graph, resolves
TaskOutputRef values into literal slots, and updates mission-state snapshots. Worker
dispatch uses the shared ExecuteSkill request and worker-report models. Public A2A route
constants define the repo-owned worker route surface that adapters consume.
Read-side projections derive from the same model families. Monitoring API models project summaries, timelines, reports, task graphs, and planning views without taking over mission authority. The operator read model projects canonical mission, worker, worker MCP operation, task-output, resolved-slot, artifact, and diagnostic facts. Public evidence helpers guard which strings, slot maps, output maps, and logical artifact URIs can leave source-owned surfaces. Docs point readers to model families and public source paths, while the field-level schema remains owned by the Pydantic source files.
Contract Authority Diagram¶
This diagram shows which contract families carry current shipped truth across service boundaries and persisted artifacts.
flowchart LR
Contracts["packages/contracts"]
subgraph RuntimeTruth["Executable mission truth"]
ScenarioProfile["ScenarioId / ScenarioProfile"]
TaskNode["TaskNode"]
TaskOutputRef["TaskOutputRef"]
MissionState["MissionStateSnapshot"]
WorkerReport["WorkerExecutionReport records"]
end
subgraph Diagnostics["Diagnostic and read projections"]
PublicEvidence["public evidence policy"]
OperatorRead["operator read model"]
PlannerTrace["Planner input / planning trace"]
MonitoringViews["Monitoring API views"]
EventLog["Mission event timeline"]
end
subgraph Services["Service owners"]
Orchestrator["apps/orchestrator"]
Worker["apps/worker_agent"]
PrivateMcpConfig["packages/worker_private_config / omega_worker_private_config"]
end
Contracts --> TaskNode
Contracts --> ScenarioProfile
Contracts --> TaskOutputRef
Contracts --> MissionState
Contracts --> WorkerReport
Contracts --> PublicEvidence
Contracts --> OperatorRead
Contracts --> PlannerTrace
Contracts --> MonitoringViews
Contracts --> EventLog
TaskNode --> Orchestrator
MissionState --> Orchestrator
WorkerReport --> Worker
WorkerReport --> Orchestrator
PlannerTrace -. diagnostic not executable graph .-> Orchestrator
PrivateMcpConfig -. private schema and preflight below public contracts .-> Worker
Responsibility¶
Define shared Pydantic models, route constants, scenario profile models, mission/task/worker artifact payload families, public evidence helpers, monitoring and operator read views, planner diagnostics, and exported package APIs used by the orchestrator, worker, runtime service adapters, operator-facing reads, and package integrations.
Owns¶
- Source-owned Pydantic model definitions for cross-service payloads and persisted artifacts.
- Stable package exports consumed by orchestrator, worker, runtime, and package integrations.
- Public A2A route constants and project-owned domain truth behind SDK adapters.
- Retrieval pointers for durable model families such as
TaskNode,MissionSubmitRequest,TaskOutputRef,ScenarioProfile,MissionStateSnapshot,MissionArtifact,MissionOperatorReadModel, andWorkerTaskSnapshotwhen those names cross package or service boundaries.
Does Not Own¶
- Worker-local execution policy.
- Deploy topology or service settings.
- Worker-private
mcp_skill_implementations[skill_id], privatemcp_servers, runner selection, container wiring, checkpoint paths, service URLs, or implementation fields. - Validation harness behavior beyond the contracts it validates.
- A duplicated schema reference outside the Pydantic source files.
Current Status¶
Shipped. packages/contracts/ is the current shared-model authority for the shipped
MVP-to-runtime baseline and current OMEGA contract facts. Docs name model families and
package seams so readers can find the source-owned truth; they do not restate payload
structures.
Source Of Truth¶
Pydantic models, route constants, artifact schemas, and exported package APIs remain
canonical in packages/contracts/.
Key Source Paths¶
| Path | Purpose |
|---|---|
packages/contracts/ |
Package root for shared contract code. |
packages/contracts/src/omega_contracts/__init__.py |
Exported package API for stable model, enum, and constant imports. |
packages/contracts/src/omega_contracts/a2a_protocol.py |
Public A2A route constants, task-state constants, and canonical route checks. |
packages/contracts/src/omega_contracts/scenario_profiles.py |
ScenarioId, ScenarioProfile, and scenario fixture selection contracts. |
packages/contracts/src/omega_contracts/task_graph.py |
TaskNode and retry-policy task graph authority for atomic scheduled work. |
packages/contracts/src/omega_contracts/task_graph.py |
TaskOutputRef reference model resolved by the orchestrator before worker dispatch. |
packages/contracts/src/omega_contracts/mission_api.py |
MissionSubmitRequest and mission submission acknowledgement models. |
packages/contracts/src/omega_contracts/mission_state.py |
MissionStateSnapshot, mission/node status authority, and terminal-status helpers. |
packages/contracts/src/omega_contracts/mission_artifacts.py |
MissionArtifact wrappers for persisted mission submit, state, event, discovery, task graph, planner, and worker-report artifacts. |
packages/contracts/src/omega_contracts/public_evidence.py |
Public evidence policy for segments, slot maps, output maps, and logical artifact URIs. |
packages/contracts/src/omega_contracts/operator_read_model.py |
Canonical operator read model, worker MCP operation projection, task-output projection, and resolved-slot binding projection. |
packages/contracts/src/omega_contracts/worker_execution.py |
Worker execution requests, WorkerExecutionReport, runtime artifact pointers, and worker error taxonomy. |
packages/contracts/src/omega_contracts/monitoring_api.py |
Mission read and timeline view models used by northbound monitoring APIs. |
packages/skill_specs/src/omega_skill_specs/ |
Authored skill catalog projections that feed planner skill cards, runtime constraints, and public worker capability snapshots. |
packages/worker_private_config/src/omega_worker_private_config/ |
Worker-private MCP config schema, loader, compatibility coverage, and deploy preflight authority outside the shared public contracts package. |
apps/worker_agent/src/omega_worker_agent/mcp/operation.py |
Worker-private McpStartOperationRequest, MCP operation snapshot, and skill_id + public worker identity operation identity models. |
packages/worker_boundary/src/omega_worker_boundary/transport.py |
WorkerTaskSnapshot transport snapshot retrieval pointer at the worker boundary. |
Source Authority¶
Contract behavior is owned by the source paths above. Use them for current public contracts, A2A constants, task graph models, mission reads, worker reports, and result projection authority.
Out Of Scope¶
This page does not copy contract model internals, route payload schemas, SDK adapter details,
deploy configuration, mcp_skill_implementations bodies, or mission-level realtime transport contracts.
Related Pages¶
docs/reference/contracts-index.mddocs/reference/routes.mddocs/components/worker-boundary.mddocs/components/worker-agent.mddocs/guides/add-scenario.md