agent-workflow-contracts 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_workflow_contracts-1.0.0/PKG-INFO +38 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/README.md +28 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/__init__.py +297 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/context_refs.py +93 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/admitted-data-ref.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/admitted-task.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/agent-completion-envelope.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/agent-operation-ref.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/agent-workflow-contracts.d.ts +898 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/agent-workflow-contracts.schema-bundle.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/canonical-projection.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/capability-bind.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/capability-ids.ts +44 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/capability-resolution-codes.ts +35 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/content-handle.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/contract-ref.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope-truncated.golden.json +43 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope-truncated.golden.ts +46 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope-v1-historical.golden.json +61 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope-v1-historical.golden.ts +64 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope.golden.json +43 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope.golden.ts +46 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-envelope.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/delivery-settlement.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/dependency-acceptance-policy.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/logical-task-ref.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/outcome-policy.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/parent-result-materialization.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/parent-result-policy.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/published-output-ref.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/published-output.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/requested-data-ref.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/requested-data-selector.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/result-requirement.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/task-result.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/workflow-delivery-spec.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/workflow-result.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/workflow-view.schema.json +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/models.py +2574 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/research_file_contract.py +87 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/schema.py +135 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/ticker_contract.py +192 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts/tool_registration.py +810 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts.egg-info/PKG-INFO +38 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts.egg-info/SOURCES.txt +48 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts.egg-info/dependency_links.txt +1 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts.egg-info/requires.txt +2 -0
- agent_workflow_contracts-1.0.0/agent_workflow_contracts.egg-info/top_level.txt +1 -0
- agent_workflow_contracts-1.0.0/pyproject.toml +26 -0
- agent_workflow_contracts-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-workflow-contracts
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Shared frozen wire contracts for agent workflows
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: pydantic
|
|
9
|
+
Requires-Dist: hank-model-authority<2,>=1.6.1
|
|
10
|
+
|
|
11
|
+
# agent_workflow_contracts
|
|
12
|
+
|
|
13
|
+
Dependency-neutral frozen pydantic wire models shared by the gateway, the
|
|
14
|
+
product agent runtimes, and any external consumer. No gateway imports —
|
|
15
|
+
that is the point of the split.
|
|
16
|
+
|
|
17
|
+
`AgentOperationSnapshot.execution_class` records the operation's work-kind.
|
|
18
|
+
Optional `role` and `effort` declarations participate in its semantic identity;
|
|
19
|
+
they do not resolve a model here. Both fields are omitted when `None`, preserving
|
|
20
|
+
historical snapshot dumps and sealed admitted-task digests.
|
|
21
|
+
|
|
22
|
+
`awaiting_approval` is an attempt settlement awaiting a human decision, not
|
|
23
|
+
success or failure. It retains the exact admitted task identity, provenance,
|
|
24
|
+
and observed usage, with a reason but no analytical outcome or result values.
|
|
25
|
+
Executable approval binding and continuation belong to the gateway approval
|
|
26
|
+
owner, not these wire contracts.
|
|
27
|
+
|
|
28
|
+
| File | What it is |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `models.py` | Frozen `WireModel` contracts including `CapabilityBind`, `AdmittedTask`, `TaskResult`, `DeliveryEnvelopeV1`/`V2`, `WorkflowView`, `PublishedOutput`, and `ContentHandle` |
|
|
31
|
+
| `ticker_contract.py`, `research_file_contract.py` | the two typed identifier contracts |
|
|
32
|
+
| `context_refs.py` | exact door-readback ref minter and declared-context renderer shared by pipeline stages and named children |
|
|
33
|
+
| `schema.py` | `public_json_schemas()` / `public_schema_bundle()` / `export_public_json_schemas()` |
|
|
34
|
+
| `generated/` | **build output** — JSON Schemas, `agent-workflow-contracts.d.ts`, the schema bundle, and delivery-envelope goldens. Regenerate from the checkout with `.venv/bin/python3 scripts/generate_agent_workflow_contracts.py`; do not hand-edit. |
|
|
35
|
+
|
|
36
|
+
Consumers and lifecycle: `../../agent-gateway/docs/api-reference.md` (section "Workflow Delivery Contracts")
|
|
37
|
+
The embedding application owns the workflow executor that admits and persists
|
|
38
|
+
these contracts.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# agent_workflow_contracts
|
|
2
|
+
|
|
3
|
+
Dependency-neutral frozen pydantic wire models shared by the gateway, the
|
|
4
|
+
product agent runtimes, and any external consumer. No gateway imports —
|
|
5
|
+
that is the point of the split.
|
|
6
|
+
|
|
7
|
+
`AgentOperationSnapshot.execution_class` records the operation's work-kind.
|
|
8
|
+
Optional `role` and `effort` declarations participate in its semantic identity;
|
|
9
|
+
they do not resolve a model here. Both fields are omitted when `None`, preserving
|
|
10
|
+
historical snapshot dumps and sealed admitted-task digests.
|
|
11
|
+
|
|
12
|
+
`awaiting_approval` is an attempt settlement awaiting a human decision, not
|
|
13
|
+
success or failure. It retains the exact admitted task identity, provenance,
|
|
14
|
+
and observed usage, with a reason but no analytical outcome or result values.
|
|
15
|
+
Executable approval binding and continuation belong to the gateway approval
|
|
16
|
+
owner, not these wire contracts.
|
|
17
|
+
|
|
18
|
+
| File | What it is |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `models.py` | Frozen `WireModel` contracts including `CapabilityBind`, `AdmittedTask`, `TaskResult`, `DeliveryEnvelopeV1`/`V2`, `WorkflowView`, `PublishedOutput`, and `ContentHandle` |
|
|
21
|
+
| `ticker_contract.py`, `research_file_contract.py` | the two typed identifier contracts |
|
|
22
|
+
| `context_refs.py` | exact door-readback ref minter and declared-context renderer shared by pipeline stages and named children |
|
|
23
|
+
| `schema.py` | `public_json_schemas()` / `public_schema_bundle()` / `export_public_json_schemas()` |
|
|
24
|
+
| `generated/` | **build output** — JSON Schemas, `agent-workflow-contracts.d.ts`, the schema bundle, and delivery-envelope goldens. Regenerate from the checkout with `.venv/bin/python3 scripts/generate_agent_workflow_contracts.py`; do not hand-edit. |
|
|
25
|
+
|
|
26
|
+
Consumers and lifecycle: `../../agent-gateway/docs/api-reference.md` (section "Workflow Delivery Contracts")
|
|
27
|
+
The embedding application owns the workflow executor that admits and persists
|
|
28
|
+
these contracts.
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
"""Dependency-neutral wire contracts for agent and workflow execution."""
|
|
2
|
+
|
|
3
|
+
from .models import (
|
|
4
|
+
ActivityHandle,
|
|
5
|
+
AdmittedDataRef,
|
|
6
|
+
AdmittedInputBinding,
|
|
7
|
+
AdmittedPlanRef,
|
|
8
|
+
AdmittedTask,
|
|
9
|
+
AdmittedToolRoute,
|
|
10
|
+
AdmittedWorkflowNodeIdentity,
|
|
11
|
+
AgentExecutionSnapshot,
|
|
12
|
+
AgentCompletionEnvelope,
|
|
13
|
+
AgentOperationRef,
|
|
14
|
+
AgentOperationSnapshot,
|
|
15
|
+
EvidencePort,
|
|
16
|
+
AgentResumeMechanics,
|
|
17
|
+
AnalyticalOutcome,
|
|
18
|
+
AttemptRef,
|
|
19
|
+
AuthoredDeliverySummary,
|
|
20
|
+
AuthoredSummaryWithResultHandle,
|
|
21
|
+
CanonicalProjection,
|
|
22
|
+
CapabilityBinding,
|
|
23
|
+
COMMON_CHILD_OPERATION_INSTRUCTIONS,
|
|
24
|
+
ChildEvidenceProjection,
|
|
25
|
+
CitationEvidenceRef,
|
|
26
|
+
ContentEvidenceRef,
|
|
27
|
+
ContentHandle,
|
|
28
|
+
ContentReadContextView,
|
|
29
|
+
ContentReadGrant,
|
|
30
|
+
ContextMaterialization,
|
|
31
|
+
ContextSourceRef,
|
|
32
|
+
ContextView,
|
|
33
|
+
ContextViewPolicy,
|
|
34
|
+
ContinuationState,
|
|
35
|
+
ContractRef,
|
|
36
|
+
CatalogToolEntry,
|
|
37
|
+
DELIVERY_PREVIEW_MAX_BYTES,
|
|
38
|
+
DELIVERY_PREVIEW_POLICY_VERSION,
|
|
39
|
+
DeliveryAdditionalOutput,
|
|
40
|
+
DeliveryEnvelope,
|
|
41
|
+
DeliveryEnvelopeV1,
|
|
42
|
+
DeliveryEnvelopeV2,
|
|
43
|
+
DeliveryFailure,
|
|
44
|
+
DeliveryPreview,
|
|
45
|
+
DeliveryPrimary,
|
|
46
|
+
DeliveryPrimaryV2,
|
|
47
|
+
DeliverySettlement,
|
|
48
|
+
DeliveryWarning,
|
|
49
|
+
DependencyAcceptancePolicy,
|
|
50
|
+
DurableArtifactSelector,
|
|
51
|
+
EvidenceObservation,
|
|
52
|
+
EvidenceRef,
|
|
53
|
+
ExecuteTaskDisposition,
|
|
54
|
+
ExecutionIdentity,
|
|
55
|
+
ExecutionSettlement,
|
|
56
|
+
GrantContentPageAuthorization,
|
|
57
|
+
InlineExactContextView,
|
|
58
|
+
InvocationArgumentSelector,
|
|
59
|
+
LiteralSelector,
|
|
60
|
+
LiveToolCapabilityBinding,
|
|
61
|
+
LogicalTaskRef,
|
|
62
|
+
NamedArtifact,
|
|
63
|
+
NodeValueSelector,
|
|
64
|
+
NonExecutionReason,
|
|
65
|
+
ObservedSourceEvidenceRef,
|
|
66
|
+
OperationUnavailable,
|
|
67
|
+
OrdinaryDelegationTaskRef,
|
|
68
|
+
OutcomePolicy,
|
|
69
|
+
OutcomeRequirement,
|
|
70
|
+
OutcomeRoute,
|
|
71
|
+
OwnerBinding,
|
|
72
|
+
ParentResultMaterialization,
|
|
73
|
+
ParentResultPolicy,
|
|
74
|
+
PhaseOutputSelector,
|
|
75
|
+
PipelineStageTaskRef,
|
|
76
|
+
PlatformToolCatalog,
|
|
77
|
+
ProviderToolDefinition,
|
|
78
|
+
ProjectionInline,
|
|
79
|
+
ProjectionRequirement,
|
|
80
|
+
PUBLISHED_OUTPUT_INLINE_MAX_BYTES,
|
|
81
|
+
PublishedInlineView,
|
|
82
|
+
PublishedOutput,
|
|
83
|
+
PublishedOutputPageAuthorization,
|
|
84
|
+
PublishedOutputRef,
|
|
85
|
+
RequestedDataRef,
|
|
86
|
+
RequestedDataSelector,
|
|
87
|
+
ResolvedAuthority,
|
|
88
|
+
ResultHandle,
|
|
89
|
+
ResultRequirement,
|
|
90
|
+
SELECTED_CONTENT_UTF8_CONTRACT,
|
|
91
|
+
SelectedContentSelector,
|
|
92
|
+
SemanticCapabilityRequirement,
|
|
93
|
+
SemanticExcerptContextView,
|
|
94
|
+
SettleWithoutExecutionDisposition,
|
|
95
|
+
SettlementProjection,
|
|
96
|
+
TaskObservation,
|
|
97
|
+
TaskResult,
|
|
98
|
+
TaskResultProvenance,
|
|
99
|
+
TaskResultRef,
|
|
100
|
+
TaskResultValues,
|
|
101
|
+
TaskExecutionDisposition,
|
|
102
|
+
TaskSettlementAcceptancePolicy,
|
|
103
|
+
TERMINAL_NARRATIVE_CONTRACT,
|
|
104
|
+
TerminalNarrativeInlineExact,
|
|
105
|
+
TerminalPhaseRevision,
|
|
106
|
+
ToolGrant,
|
|
107
|
+
ToolGrantEntry,
|
|
108
|
+
TranscriptHandle,
|
|
109
|
+
TypedInputCapabilityBinding,
|
|
110
|
+
UnsatisfiedCapability,
|
|
111
|
+
UsageObservation,
|
|
112
|
+
ValidationVerdictAcceptancePolicy,
|
|
113
|
+
WORKFLOW_CONTENT_MAX_SEQUENCE,
|
|
114
|
+
WORKFLOW_CONTENT_PAGE_MAX_BYTES,
|
|
115
|
+
WorkflowContentCursor,
|
|
116
|
+
WorkflowContentError,
|
|
117
|
+
WorkflowContentIntegrityError,
|
|
118
|
+
WorkflowContentNotFoundError,
|
|
119
|
+
WorkflowContentPage,
|
|
120
|
+
WorkflowContentPageAuthorization,
|
|
121
|
+
WorkflowContentView,
|
|
122
|
+
WorkflowAnomalyView,
|
|
123
|
+
WorkflowAuthorFailureView,
|
|
124
|
+
WorkflowContinuationAcceptedView,
|
|
125
|
+
WorkflowDeliverySpec,
|
|
126
|
+
WorkflowDeliverySpecV1,
|
|
127
|
+
WorkflowDeliverySpecV2,
|
|
128
|
+
WorkflowNodeTaskRef,
|
|
129
|
+
WorkflowOutputReadRecipe,
|
|
130
|
+
WorkflowRecoveryHint,
|
|
131
|
+
WorkflowResult,
|
|
132
|
+
WorkflowView,
|
|
133
|
+
WorkflowViewNodeState,
|
|
134
|
+
WorkflowViewPhase,
|
|
135
|
+
WorkspaceGrant,
|
|
136
|
+
canonical_json_bytes,
|
|
137
|
+
compose_operation_instructions,
|
|
138
|
+
parse_delivery_envelope,
|
|
139
|
+
parse_workflow_delivery_spec,
|
|
140
|
+
sha256_digest,
|
|
141
|
+
terminal_task_result,
|
|
142
|
+
verified_text,
|
|
143
|
+
)
|
|
144
|
+
from .schema import (
|
|
145
|
+
SCHEMA_BUNDLE_VERSION,
|
|
146
|
+
export_public_json_schemas,
|
|
147
|
+
public_json_schemas,
|
|
148
|
+
public_schema_bundle,
|
|
149
|
+
public_schema_bundle_json,
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
__all__ = [
|
|
153
|
+
"ActivityHandle",
|
|
154
|
+
"AdmittedDataRef",
|
|
155
|
+
"AdmittedInputBinding",
|
|
156
|
+
"AdmittedPlanRef",
|
|
157
|
+
"AdmittedTask",
|
|
158
|
+
"AdmittedToolRoute",
|
|
159
|
+
"AdmittedWorkflowNodeIdentity",
|
|
160
|
+
"AgentExecutionSnapshot",
|
|
161
|
+
"AgentCompletionEnvelope",
|
|
162
|
+
"AgentOperationRef",
|
|
163
|
+
"AgentOperationSnapshot",
|
|
164
|
+
"EvidencePort",
|
|
165
|
+
"AgentResumeMechanics",
|
|
166
|
+
"AnalyticalOutcome",
|
|
167
|
+
"AttemptRef",
|
|
168
|
+
"AuthoredDeliverySummary",
|
|
169
|
+
"AuthoredSummaryWithResultHandle",
|
|
170
|
+
"CanonicalProjection",
|
|
171
|
+
"CapabilityBinding",
|
|
172
|
+
"COMMON_CHILD_OPERATION_INSTRUCTIONS",
|
|
173
|
+
"CatalogToolEntry",
|
|
174
|
+
"ChildEvidenceProjection",
|
|
175
|
+
"CitationEvidenceRef",
|
|
176
|
+
"ContentEvidenceRef",
|
|
177
|
+
"ContentHandle",
|
|
178
|
+
"ContentReadContextView",
|
|
179
|
+
"ContentReadGrant",
|
|
180
|
+
"ContextMaterialization",
|
|
181
|
+
"ContextSourceRef",
|
|
182
|
+
"ContextView",
|
|
183
|
+
"ContextViewPolicy",
|
|
184
|
+
"ContinuationState",
|
|
185
|
+
"ContractRef",
|
|
186
|
+
"DELIVERY_PREVIEW_MAX_BYTES",
|
|
187
|
+
"DELIVERY_PREVIEW_POLICY_VERSION",
|
|
188
|
+
"DeliveryAdditionalOutput",
|
|
189
|
+
"DeliveryEnvelope",
|
|
190
|
+
"DeliveryEnvelopeV1",
|
|
191
|
+
"DeliveryEnvelopeV2",
|
|
192
|
+
"DeliveryFailure",
|
|
193
|
+
"DeliveryPreview",
|
|
194
|
+
"DeliveryPrimary",
|
|
195
|
+
"DeliveryPrimaryV2",
|
|
196
|
+
"DeliverySettlement",
|
|
197
|
+
"DeliveryWarning",
|
|
198
|
+
"DependencyAcceptancePolicy",
|
|
199
|
+
"DurableArtifactSelector",
|
|
200
|
+
"EvidenceObservation",
|
|
201
|
+
"EvidenceRef",
|
|
202
|
+
"ExecuteTaskDisposition",
|
|
203
|
+
"ExecutionIdentity",
|
|
204
|
+
"ExecutionSettlement",
|
|
205
|
+
"GrantContentPageAuthorization",
|
|
206
|
+
"InlineExactContextView",
|
|
207
|
+
"InvocationArgumentSelector",
|
|
208
|
+
"LiteralSelector",
|
|
209
|
+
"LiveToolCapabilityBinding",
|
|
210
|
+
"LogicalTaskRef",
|
|
211
|
+
"NamedArtifact",
|
|
212
|
+
"NodeValueSelector",
|
|
213
|
+
"NonExecutionReason",
|
|
214
|
+
"ObservedSourceEvidenceRef",
|
|
215
|
+
"OperationUnavailable",
|
|
216
|
+
"OrdinaryDelegationTaskRef",
|
|
217
|
+
"OutcomePolicy",
|
|
218
|
+
"OutcomeRequirement",
|
|
219
|
+
"OutcomeRoute",
|
|
220
|
+
"OwnerBinding",
|
|
221
|
+
"ParentResultMaterialization",
|
|
222
|
+
"ParentResultPolicy",
|
|
223
|
+
"PhaseOutputSelector",
|
|
224
|
+
"PipelineStageTaskRef",
|
|
225
|
+
"PlatformToolCatalog",
|
|
226
|
+
"ProviderToolDefinition",
|
|
227
|
+
"ProjectionInline",
|
|
228
|
+
"ProjectionRequirement",
|
|
229
|
+
"PUBLISHED_OUTPUT_INLINE_MAX_BYTES",
|
|
230
|
+
"PublishedInlineView",
|
|
231
|
+
"PublishedOutput",
|
|
232
|
+
"PublishedOutputPageAuthorization",
|
|
233
|
+
"PublishedOutputRef",
|
|
234
|
+
"RequestedDataRef",
|
|
235
|
+
"RequestedDataSelector",
|
|
236
|
+
"ResolvedAuthority",
|
|
237
|
+
"ResultHandle",
|
|
238
|
+
"ResultRequirement",
|
|
239
|
+
"SCHEMA_BUNDLE_VERSION",
|
|
240
|
+
"SELECTED_CONTENT_UTF8_CONTRACT",
|
|
241
|
+
"SelectedContentSelector",
|
|
242
|
+
"SemanticCapabilityRequirement",
|
|
243
|
+
"SemanticExcerptContextView",
|
|
244
|
+
"SettleWithoutExecutionDisposition",
|
|
245
|
+
"SettlementProjection",
|
|
246
|
+
"TaskObservation",
|
|
247
|
+
"TaskResult",
|
|
248
|
+
"TaskResultProvenance",
|
|
249
|
+
"TaskResultRef",
|
|
250
|
+
"TaskResultValues",
|
|
251
|
+
"TaskExecutionDisposition",
|
|
252
|
+
"TaskSettlementAcceptancePolicy",
|
|
253
|
+
"TERMINAL_NARRATIVE_CONTRACT",
|
|
254
|
+
"TerminalNarrativeInlineExact",
|
|
255
|
+
"TerminalPhaseRevision",
|
|
256
|
+
"ToolGrant",
|
|
257
|
+
"ToolGrantEntry",
|
|
258
|
+
"TranscriptHandle",
|
|
259
|
+
"TypedInputCapabilityBinding",
|
|
260
|
+
"UnsatisfiedCapability",
|
|
261
|
+
"UsageObservation",
|
|
262
|
+
"ValidationVerdictAcceptancePolicy",
|
|
263
|
+
"WORKFLOW_CONTENT_MAX_SEQUENCE",
|
|
264
|
+
"WORKFLOW_CONTENT_PAGE_MAX_BYTES",
|
|
265
|
+
"WorkflowContentCursor",
|
|
266
|
+
"WorkflowContentError",
|
|
267
|
+
"WorkflowContentIntegrityError",
|
|
268
|
+
"WorkflowContentNotFoundError",
|
|
269
|
+
"WorkflowContentPage",
|
|
270
|
+
"WorkflowContentPageAuthorization",
|
|
271
|
+
"WorkflowContentView",
|
|
272
|
+
"WorkflowAnomalyView",
|
|
273
|
+
"WorkflowAuthorFailureView",
|
|
274
|
+
"WorkflowContinuationAcceptedView",
|
|
275
|
+
"WorkflowDeliverySpec",
|
|
276
|
+
"WorkflowDeliverySpecV1",
|
|
277
|
+
"WorkflowDeliverySpecV2",
|
|
278
|
+
"WorkflowNodeTaskRef",
|
|
279
|
+
"WorkflowOutputReadRecipe",
|
|
280
|
+
"WorkflowRecoveryHint",
|
|
281
|
+
"WorkflowResult",
|
|
282
|
+
"WorkflowView",
|
|
283
|
+
"WorkflowViewNodeState",
|
|
284
|
+
"WorkflowViewPhase",
|
|
285
|
+
"WorkspaceGrant",
|
|
286
|
+
"canonical_json_bytes",
|
|
287
|
+
"compose_operation_instructions",
|
|
288
|
+
"export_public_json_schemas",
|
|
289
|
+
"parse_delivery_envelope",
|
|
290
|
+
"parse_workflow_delivery_spec",
|
|
291
|
+
"public_json_schemas",
|
|
292
|
+
"public_schema_bundle",
|
|
293
|
+
"public_schema_bundle_json",
|
|
294
|
+
"sha256_digest",
|
|
295
|
+
"terminal_task_result",
|
|
296
|
+
"verified_text",
|
|
297
|
+
]
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""Exact workflow refs shared by pipeline stages and named child admission.
|
|
2
|
+
|
|
3
|
+
The producer's readback mints artifact refs. Consumers do not paste that bag:
|
|
4
|
+
a granted content handle is the transport, and one owner renders the lines.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from collections.abc import Mapping
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def read_back_refs(primary_fms_result: Mapping[str, Any]) -> dict[str, Any]:
|
|
14
|
+
"""Name a door's exact refs, including the three-field skill-artifact ref.
|
|
15
|
+
|
|
16
|
+
The consumer's own door validates the ref. Skill artifact sidecar fields are
|
|
17
|
+
not part of its identity and must not travel in the minted ref. A door that
|
|
18
|
+
published a ModelVersion names it as ``model_version_ref``, so a later
|
|
19
|
+
publication replaces an earlier one and a consumer prices the version the
|
|
20
|
+
workflow published last; the build report also names the SourceBundle it
|
|
21
|
+
compiled as ``source_bundle_id``.
|
|
22
|
+
|
|
23
|
+
A skill-artifact read (``get_skill_artifact``) returns the sidecar the caller
|
|
24
|
+
selected at ``artifact``; it names only that artifact's three-field ref. Its
|
|
25
|
+
``*_ref`` keys and published ModelVersion are what the artifact recorded when
|
|
26
|
+
it was written, not what the workflow holds now, so they are not minted.
|
|
27
|
+
"""
|
|
28
|
+
artifact = primary_fms_result.get("artifact")
|
|
29
|
+
refs: dict[str, Any] = _skill_artifact_ref(artifact) if isinstance(artifact, Mapping) else {}
|
|
30
|
+
readback = primary_fms_result.get("readback")
|
|
31
|
+
if not isinstance(readback, Mapping):
|
|
32
|
+
return refs
|
|
33
|
+
refs.update(
|
|
34
|
+
(str(key), value)
|
|
35
|
+
for key, value in readback.items()
|
|
36
|
+
if str(key).endswith("_ref") and value is not None
|
|
37
|
+
)
|
|
38
|
+
refs.update(_skill_artifact_ref(readback))
|
|
39
|
+
refs.update(_published_model_version_refs(readback))
|
|
40
|
+
return refs
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _skill_artifact_ref(sidecar: Mapping[str, Any]) -> dict[str, Any]:
|
|
44
|
+
"""``<skill>_ref`` as exactly ``{skill, artifact_id, content_sha256}``."""
|
|
45
|
+
skill = sidecar.get("skill")
|
|
46
|
+
artifact_id = sidecar.get("artifact_id")
|
|
47
|
+
content_sha256 = sidecar.get("content_sha256")
|
|
48
|
+
if not (
|
|
49
|
+
isinstance(skill, str)
|
|
50
|
+
and skill
|
|
51
|
+
and isinstance(artifact_id, str)
|
|
52
|
+
and artifact_id
|
|
53
|
+
and isinstance(content_sha256, str)
|
|
54
|
+
and content_sha256
|
|
55
|
+
):
|
|
56
|
+
return {}
|
|
57
|
+
return {
|
|
58
|
+
f"{skill.replace('-', '_')}_ref": {
|
|
59
|
+
"skill": skill,
|
|
60
|
+
"artifact_id": artifact_id,
|
|
61
|
+
"content_sha256": content_sha256,
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def _published_model_version_refs(readback: Mapping[str, Any]) -> dict[str, Any]:
|
|
67
|
+
"""The exact ModelVersion a door published, and the build's SourceBundle.
|
|
68
|
+
|
|
69
|
+
Two producers publish a ModelVersion: the build-model report door, whose
|
|
70
|
+
``run-bound/1`` typed payload names the build's version and SourceBundle (its
|
|
71
|
+
failed arm names neither), and a model-writer door, whose sidecar provenance
|
|
72
|
+
names the successor it published with ``write_target: model_version``.
|
|
73
|
+
"""
|
|
74
|
+
refs: dict[str, Any] = {}
|
|
75
|
+
typed_outputs = readback.get("typed_outputs")
|
|
76
|
+
if isinstance(typed_outputs, Mapping) and typed_outputs.get("schema_version") == "run-bound/1":
|
|
77
|
+
model_version = typed_outputs.get("model_version")
|
|
78
|
+
if isinstance(model_version, Mapping):
|
|
79
|
+
refs["model_version_ref"] = {
|
|
80
|
+
"model_id": model_version.get("model_id"),
|
|
81
|
+
"version": model_version.get("version"),
|
|
82
|
+
}
|
|
83
|
+
source = typed_outputs.get("source")
|
|
84
|
+
if isinstance(source, Mapping) and source.get("bundle_id") is not None:
|
|
85
|
+
refs["source_bundle_id"] = source.get("bundle_id")
|
|
86
|
+
provenance = readback.get("provenance")
|
|
87
|
+
if isinstance(provenance, Mapping) and provenance.get("write_target") == "model_version":
|
|
88
|
+
refs["model_version_ref"] = {
|
|
89
|
+
"model_id": provenance.get("model_id"),
|
|
90
|
+
"version": provenance.get("model_version"),
|
|
91
|
+
}
|
|
92
|
+
return refs
|
|
93
|
+
|
agent_workflow_contracts-1.0.0/agent_workflow_contracts/generated/admitted-data-ref.schema.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"$defs":{"ContentHandle":{"additionalProperties":false,"properties":{"content_bytes":{"minimum":0,"title":"Content Bytes","type":"integer"},"content_chars":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Content Chars"},"content_id":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Content Id","type":"string"},"content_sha256":{"pattern":"^[0-9a-f]{64}$","title":"Content Sha256","type":"string"},"contract":{"$ref":"#/$defs/ContractRef"},"encoding":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Encoding"},"media_type":{"maxLength":255,"minLength":1,"title":"Media Type","type":"string"},"retention":{"enum":["durable","workflow","session","transient"],"title":"Retention","type":"string"}},"required":["content_id","content_sha256","content_bytes","contract","media_type","retention"],"title":"ContentHandle","type":"object"},"ContentReadGrant":{"additionalProperties":false,"properties":{"content_id":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Content Id","type":"string"},"grant_id":{"maxLength":512,"minLength":1,"title":"Grant Id","type":"string"},"kind":{"const":"content_read_grant","default":"content_read_grant","title":"Kind","type":"string"},"principal_id":{"maxLength":512,"minLength":1,"title":"Principal Id","type":"string"},"scope":{"enum":["this_task","direct_parent"],"title":"Scope","type":"string"}},"required":["grant_id","content_id","scope","principal_id"],"title":"ContentReadGrant","type":"object"},"ContextViewPolicy":{"additionalProperties":false,"properties":{"max_bytes":{"minimum":1,"title":"Max Bytes","type":"integer"},"on_overflow":{"enum":["content_read","semantic_excerpt","fail"],"title":"On Overflow","type":"string"},"preferred":{"enum":["inline_exact","semantic_excerpt","content_read"],"title":"Preferred","type":"string"}},"required":["preferred","max_bytes","on_overflow"],"title":"ContextViewPolicy","type":"object"},"ContractRef":{"additionalProperties":false,"properties":{"digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Digest","type":"string"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"},"namespace":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Namespace","type":"string"},"version":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$","title":"Version","type":"string"}},"required":["namespace","name","version","digest"],"title":"ContractRef","type":"object"},"DurableArtifactSelector":{"additionalProperties":false,"properties":{"artifact_id":{"maxLength":512,"minLength":1,"title":"Artifact Id","type":"string"},"kind":{"const":"durable_artifact_selector","default":"durable_artifact_selector","title":"Kind","type":"string"}},"required":["artifact_id"],"title":"DurableArtifactSelector","type":"object"},"InvocationArgumentSelector":{"additionalProperties":false,"properties":{"argument_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Argument Name","type":"string"},"kind":{"const":"invocation_argument_selector","default":"invocation_argument_selector","title":"Kind","type":"string"}},"required":["argument_name"],"title":"InvocationArgumentSelector","type":"object"},"JsonValue":{},"LiteralSelector":{"additionalProperties":false,"properties":{"kind":{"const":"literal_selector","default":"literal_selector","title":"Kind","type":"string"},"value":{"$ref":"#/$defs/JsonValue"}},"required":["value"],"title":"LiteralSelector","type":"object"},"NodeValueSelector":{"additionalProperties":false,"properties":{"artifact_name":{"anyOf":[{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},{"type":"null"}],"default":null,"title":"Artifact Name"},"kind":{"const":"node_value_selector","default":"node_value_selector","title":"Kind","type":"string"},"node_id":{"maxLength":512,"minLength":1,"title":"Node Id","type":"string"},"projection_path":{"default":[],"items":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"title":"Projection Path","type":"array"},"value_kind":{"enum":["narrative","projection","artifact"],"title":"Value Kind","type":"string"}},"required":["node_id","value_kind"],"title":"NodeValueSelector","type":"object"},"OwnerBinding":{"additionalProperties":false,"properties":{"invocation_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Invocation Id"},"session_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Session Id"},"tenant_id":{"maxLength":512,"minLength":1,"title":"Tenant Id","type":"string"},"workflow_run_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Workflow Run Id"}},"required":["tenant_id"],"title":"OwnerBinding","type":"object"},"PhaseOutputSelector":{"additionalProperties":false,"properties":{"kind":{"const":"phase_output_selector","default":"phase_output_selector","title":"Kind","type":"string"},"output_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Output Name","type":"string"},"phase_number":{"minimum":1,"title":"Phase Number","type":"integer"},"revision":{"minimum":1,"title":"Revision","type":"integer"}},"required":["phase_number","revision","output_name"],"title":"PhaseOutputSelector","type":"object"},"RequestedDataRef":{"additionalProperties":false,"properties":{"context_policy":{"anyOf":[{"$ref":"#/$defs/ContextViewPolicy"},{"type":"null"}],"default":null},"expected_contract":{"$ref":"#/$defs/ContractRef"},"kind":{"const":"requested_data","default":"requested_data","title":"Kind","type":"string"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"},"selector":{"discriminator":{"mapping":{"durable_artifact_selector":"#/$defs/DurableArtifactSelector","invocation_argument_selector":"#/$defs/InvocationArgumentSelector","literal_selector":"#/$defs/LiteralSelector","node_value_selector":"#/$defs/NodeValueSelector","phase_output_selector":"#/$defs/PhaseOutputSelector","selected_content_selector":"#/$defs/SelectedContentSelector"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/InvocationArgumentSelector"},{"$ref":"#/$defs/LiteralSelector"},{"$ref":"#/$defs/SelectedContentSelector"},{"$ref":"#/$defs/NodeValueSelector"},{"$ref":"#/$defs/PhaseOutputSelector"},{"$ref":"#/$defs/DurableArtifactSelector"}],"title":"Selector"}},"required":["name","selector","expected_contract"],"title":"RequestedDataRef","type":"object"},"SelectedContentSelector":{"additionalProperties":false,"properties":{"input_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Input Name","type":"string"},"kind":{"const":"selected_content_selector","default":"selected_content_selector","title":"Kind","type":"string"}},"required":["input_name"],"title":"SelectedContentSelector","type":"object"}},"additionalProperties":false,"properties":{"actual_contract":{"$ref":"#/$defs/ContractRef"},"content":{"$ref":"#/$defs/ContentHandle"},"kind":{"const":"admitted_data","default":"admitted_data","title":"Kind","type":"string"},"logical_source_id":{"maxLength":512,"minLength":1,"title":"Logical Source Id","type":"string"},"owner":{"$ref":"#/$defs/OwnerBinding"},"read_grant":{"anyOf":[{"$ref":"#/$defs/ContentReadGrant"},{"type":"null"}],"default":null},"request":{"$ref":"#/$defs/RequestedDataRef"},"source_kind":{"enum":["invocation_argument","literal","selected_content","node_value","phase_output","durable_artifact"],"title":"Source Kind","type":"string"}},"required":["request","source_kind","logical_source_id","owner","actual_contract","content"],"title":"AdmittedDataRef","type":"object"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"$defs":{"AdmittedContextWire":{"additionalProperties":false,"description":"Everything `admit` derives for one spawned job (execution-boundary design §3.2).","properties":{"approval_route":{"enum":["durable_local","parent_delegated","no_approval_route"],"title":"Approval Route","type":"string"},"budget_share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Budget Share"},"capability_bind":{"$ref":"#/$defs/CapabilityBind"},"children":{"items":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"title":"Children","type":"array"},"env_projection":{"items":{"maxLength":512,"minLength":1,"type":"string"},"title":"Env Projection","type":"array"},"handle_grants":{"items":{"maxLength":512,"minLength":1,"type":"string"},"title":"Handle Grants","type":"array"},"lineage":{"$ref":"#/$defs/AdmittedLineage"},"placement":{"enum":["in_process","local_stub","hosted_stub"],"title":"Placement","type":"string"},"research_binding":{"$ref":"#/$defs/AdmittedResearchBinding"},"selection_provenance":{"anyOf":[{"$ref":"#/$defs/SelectionProvenance"},{"type":"null"}],"default":null},"selection_snapshot":{"anyOf":[{"additionalProperties":{"$ref":"#/$defs/JsonValue"},"type":"object"},{"type":"null"}],"default":null,"title":"Selection Snapshot"},"tenant":{"anyOf":[{"$ref":"#/$defs/AdmittedTenant"},{"type":"null"}]},"tool_grant":{"items":{"maxLength":512,"minLength":1,"type":"string"},"title":"Tool Grant","type":"array"},"withheld_tools":{"default":[],"items":{"type":"string"},"title":"Withheld Tools","type":"array"}},"required":["tenant","research_binding","capability_bind","children","tool_grant","budget_share","env_projection","approval_route","handle_grants","placement","lineage"],"title":"AdmittedContextWire","type":"object"},"AdmittedDataRef":{"additionalProperties":false,"properties":{"actual_contract":{"$ref":"#/$defs/ContractRef"},"content":{"$ref":"#/$defs/ContentHandle"},"kind":{"const":"admitted_data","default":"admitted_data","title":"Kind","type":"string"},"logical_source_id":{"maxLength":512,"minLength":1,"title":"Logical Source Id","type":"string"},"owner":{"$ref":"#/$defs/OwnerBinding"},"read_grant":{"anyOf":[{"$ref":"#/$defs/ContentReadGrant"},{"type":"null"}],"default":null},"request":{"$ref":"#/$defs/RequestedDataRef"},"source_kind":{"enum":["invocation_argument","literal","selected_content","node_value","phase_output","durable_artifact"],"title":"Source Kind","type":"string"}},"required":["request","source_kind","logical_source_id","owner","actual_contract","content"],"title":"AdmittedDataRef","type":"object"},"AdmittedInputBinding":{"additionalProperties":false,"properties":{"context":{"discriminator":{"mapping":{"content_read":"#/$defs/ContentReadContextView","inline_exact":"#/$defs/InlineExactContextView","semantic_excerpt":"#/$defs/SemanticExcerptContextView"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/InlineExactContextView"},{"$ref":"#/$defs/SemanticExcerptContextView"},{"$ref":"#/$defs/ContentReadContextView"}],"title":"Context"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"},"source":{"$ref":"#/$defs/AdmittedDataRef"}},"required":["name","source","context"],"title":"AdmittedInputBinding","type":"object"},"AdmittedLineage":{"additionalProperties":false,"properties":{"depth":{"minimum":0,"title":"Depth","type":"integer"},"parent_job_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"title":"Parent Job Id"}},"required":["parent_job_id","depth"],"title":"AdmittedLineage","type":"object"},"AdmittedResearchBinding":{"additionalProperties":false,"description":"The research file and ticker a job is bound to, or none.","properties":{"research_file_id":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Research File Id"},"ticker":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Ticker"}},"title":"AdmittedResearchBinding","type":"object"},"AdmittedTenant":{"additionalProperties":false,"description":"The tenant a job acts for; a child always holds its parent's.","properties":{"role":{"enum":["owner","invite"],"title":"Role","type":"string"},"storage_id":{"title":"Storage Id","type":"string"},"tenant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Tenant Id"}},"required":["storage_id","role"],"title":"AdmittedTenant","type":"object"},"AdmittedToolRoute":{"additionalProperties":false,"description":"The exact physical route retained with one admitted tool grant.","properties":{"origin":{"enum":["local","mcp"],"title":"Origin","type":"string"},"server_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"title":"Server Id"},"tool_id":{"maxLength":512,"minLength":1,"title":"Tool Id","type":"string"}},"required":["tool_id","origin","server_id"],"title":"AdmittedToolRoute","type":"object"},"AdmittedWorkflowNodeIdentity":{"additionalProperties":false,"properties":{"item_key":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Item Key"},"node_id":{"maxLength":512,"minLength":1,"title":"Node Id","type":"string"},"phase_number":{"minimum":1,"title":"Phase Number","type":"integer"},"plan_id":{"maxLength":512,"minLength":1,"title":"Plan Id","type":"string"},"revision":{"minimum":1,"title":"Revision","type":"integer"},"workflow_run_id":{"maxLength":512,"minLength":1,"title":"Workflow Run Id","type":"string"}},"required":["workflow_run_id","plan_id","phase_number","revision","node_id"],"title":"AdmittedWorkflowNodeIdentity","type":"object"},"AgentExecutionSnapshot":{"additionalProperties":false,"description":"Exact prompt and mechanics consumed by one admitted child attempt.","properties":{"admission_date":{"pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Admission Date","type":"string"},"admitted_context":{"anyOf":[{"$ref":"#/$defs/AdmittedContextWire"},{"type":"null"}],"default":null},"client_timeout_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Recorded history from runs admitted before TC9; no runtime code reads this value.","title":"Client Timeout Seconds"},"cost_observation_threshold_usd":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}],"default":null,"description":"Telemetry-only runaway-cost observation threshold. This value never authorizes, admits, interrupts, gates, or settles execution.","title":"Cost Observation Threshold Usd"},"max_budget_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Max Budget Usd"},"max_tokens":{"minimum":1,"title":"Max Tokens","type":"integer"},"max_turns":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"title":"Max Turns"},"persisted_methodology_state":{"anyOf":[{"$ref":"#/$defs/JsonValue"},{"type":"null"}]},"provider_tool_definitions":{"anyOf":[{"items":{"$ref":"#/$defs/ProviderToolDefinition"},"type":"array"},{"type":"null"}],"default":null,"title":"Provider Tool Definitions"},"result_instructions":{"minLength":1,"title":"Result Instructions","type":"string"},"resume_instruction":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Resume Instruction"},"resume_mechanics":{"$ref":"#/$defs/AgentResumeMechanics"},"system_prompt":{"minLength":1,"title":"System Prompt","type":"string"},"temperature":{"anyOf":[{"maximum":2.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"title":"Temperature"},"timeout_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}],"default":null,"title":"Timeout Seconds"},"top_p":{"anyOf":[{"maximum":1.0,"minimum":0.0,"type":"number"},{"type":"null"}],"default":null,"title":"Top P"}},"required":["system_prompt","admission_date","persisted_methodology_state","result_instructions","max_tokens","resume_mechanics"],"title":"AgentExecutionSnapshot","type":"object"},"AgentOperationRef":{"additionalProperties":false,"description":"Full immutable identity of an executable operation.","properties":{"digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Digest","type":"string"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"},"namespace":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Namespace","type":"string"},"version":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$","title":"Version","type":"string"}},"required":["namespace","name","version","digest"],"title":"AgentOperationRef","type":"object"},"AgentOperationSnapshot":{"additionalProperties":false,"properties":{"children":{"default":[],"items":{"type":"string"},"title":"Children","type":"array"},"description":{"maxLength":2048,"minLength":1,"title":"Description","type":"string"},"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Effort"},"evidence_ports":{"default":[],"items":{"$ref":"#/$defs/EvidencePort"},"maxItems":4,"title":"Evidence Ports","type":"array"},"execution_class":{"maxLength":512,"minLength":1,"title":"Execution Class","type":"string"},"instructions":{"minLength":1,"title":"Instructions","type":"string"},"methodology":{"$ref":"#/$defs/ContractRef"},"operation":{"$ref":"#/$defs/AgentOperationRef"},"projection_contracts":{"default":[],"items":{"$ref":"#/$defs/ContractRef"},"title":"Projection Contracts","type":"array"},"prompt":{"$ref":"#/$defs/ContractRef"},"required_capabilities":{"default":[],"items":{"$ref":"#/$defs/SemanticCapabilityRequirement"},"title":"Required Capabilities","type":"array"},"required_context":{"default":[],"items":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"maxItems":8,"title":"Required Context","type":"array"},"result_modes":{"items":{"type":"string"},"minItems":1,"title":"Result Modes","type":"array"},"result_requires_persist":{"default":false,"title":"Result Requires Persist","type":"boolean"},"resumable":{"default":false,"title":"Resumable","type":"boolean"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Role"},"terminal_on_persist":{"default":true,"title":"Terminal On Persist","type":"boolean"},"workspace_scope":{"enum":["read_only","workspace_write","model_write"],"title":"Workspace Scope","type":"string"}},"required":["operation","methodology","prompt","description","instructions","execution_class","workspace_scope","result_modes"],"title":"AgentOperationSnapshot","type":"object"},"AgentResumeMechanics":{"additionalProperties":false,"description":"Exact admitted continuation mechanics for one logical child task.","properties":{"control_message_strategy":{"const":"admitted_exact","title":"Control Message Strategy","type":"string"},"max_chain_depth":{"minimum":0,"title":"Max Chain Depth","type":"integer"},"prompt_strategy":{"const":"reuse_exact","title":"Prompt Strategy","type":"string"},"resumable":{"title":"Resumable","type":"boolean"},"tool_grant_strategy":{"const":"reissue_exact","title":"Tool Grant Strategy","type":"string"},"transcript_strategy":{"const":"durable_reconstruction","title":"Transcript Strategy","type":"string"}},"required":["resumable","max_chain_depth","transcript_strategy","prompt_strategy","tool_grant_strategy","control_message_strategy"],"title":"AgentResumeMechanics","type":"object"},"AttemptRef":{"additionalProperties":false,"properties":{"attempt_id":{"maxLength":512,"minLength":1,"title":"Attempt Id","type":"string"},"attempt_number":{"minimum":1,"title":"Attempt Number","type":"integer"},"physical_task_id":{"maxLength":512,"minLength":1,"title":"Physical Task Id","type":"string"},"restart_of_attempt_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Restart Of Attempt Id"},"resume_of_task_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Resume Of Task Id"},"resumer_job_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Resumer Job Id"}},"required":["attempt_number","attempt_id","physical_task_id"],"title":"AttemptRef","type":"object"},"CapabilityBind":{"additionalProperties":false,"description":"Complete, secret-free execution identity for one admitted capability.","properties":{"adapter":{"maxLength":512,"minLength":1,"title":"Adapter","type":"string"},"capability_id":{"maxLength":512,"minLength":1,"title":"Capability Id","type":"string"},"credential_principal":{"enum":["user","service"],"title":"Credential Principal","type":"string"},"credential_ref":{"maxLength":512,"minLength":1,"title":"Credential Ref","type":"string"},"effort":{"enum":["none","minimal","low","medium","high","xhigh","max"],"title":"Effort","type":"string"},"model_key":{"maxLength":512,"minLength":1,"title":"Model Key","type":"string"},"policy_revision":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$","title":"Policy Revision","type":"string"},"protocol_profile":{"maxLength":512,"minLength":1,"title":"Protocol Profile","type":"string"},"provider":{"maxLength":512,"minLength":1,"title":"Provider","type":"string"},"registry_revision":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$","title":"Registry Revision","type":"string"},"route":{"maxLength":512,"minLength":1,"title":"Route","type":"string"},"run_mode":{"enum":["interactive","fleet","batch","autonomous","cron"],"title":"Run Mode","type":"string"},"schema_version":{"const":"1.0","title":"Schema Version","type":"string"},"selection_source":{"enum":["explicit_user","saved_preference","channel_default","capability_default","internal_policy","parent_binding"],"title":"Selection Source","type":"string"},"upstream_model":{"maxLength":512,"minLength":1,"title":"Upstream Model","type":"string"}},"required":["schema_version","capability_id","model_key","provider","upstream_model","adapter","protocol_profile","route","effort","credential_principal","credential_ref","run_mode","registry_revision","policy_revision","selection_source"],"title":"CapabilityBind","type":"object"},"ContentHandle":{"additionalProperties":false,"properties":{"content_bytes":{"minimum":0,"title":"Content Bytes","type":"integer"},"content_chars":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Content Chars"},"content_id":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Content Id","type":"string"},"content_sha256":{"pattern":"^[0-9a-f]{64}$","title":"Content Sha256","type":"string"},"contract":{"$ref":"#/$defs/ContractRef"},"encoding":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Encoding"},"media_type":{"maxLength":255,"minLength":1,"title":"Media Type","type":"string"},"retention":{"enum":["durable","workflow","session","transient"],"title":"Retention","type":"string"}},"required":["content_id","content_sha256","content_bytes","contract","media_type","retention"],"title":"ContentHandle","type":"object"},"ContentReadContextView":{"additionalProperties":false,"properties":{"complete":{"const":false,"default":false,"title":"Complete","type":"boolean"},"kind":{"const":"content_read","default":"content_read","title":"Kind","type":"string"},"read_grant":{"$ref":"#/$defs/ContentReadGrant"},"source":{"$ref":"#/$defs/ContextSourceRef"}},"required":["source","read_grant"],"title":"ContentReadContextView","type":"object"},"ContentReadGrant":{"additionalProperties":false,"properties":{"content_id":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Content Id","type":"string"},"grant_id":{"maxLength":512,"minLength":1,"title":"Grant Id","type":"string"},"kind":{"const":"content_read_grant","default":"content_read_grant","title":"Kind","type":"string"},"principal_id":{"maxLength":512,"minLength":1,"title":"Principal Id","type":"string"},"scope":{"enum":["this_task","direct_parent"],"title":"Scope","type":"string"}},"required":["grant_id","content_id","scope","principal_id"],"title":"ContentReadGrant","type":"object"},"ContextSourceRef":{"additionalProperties":false,"properties":{"content_id":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Content Id","type":"string"},"kind":{"const":"admitted_data_ref","default":"admitted_data_ref","title":"Kind","type":"string"},"logical_source_id":{"maxLength":512,"minLength":1,"title":"Logical Source Id","type":"string"}},"required":["logical_source_id","content_id"],"title":"ContextSourceRef","type":"object"},"ContextViewPolicy":{"additionalProperties":false,"properties":{"max_bytes":{"minimum":1,"title":"Max Bytes","type":"integer"},"on_overflow":{"enum":["content_read","semantic_excerpt","fail"],"title":"On Overflow","type":"string"},"preferred":{"enum":["inline_exact","semantic_excerpt","content_read"],"title":"Preferred","type":"string"}},"required":["preferred","max_bytes","on_overflow"],"title":"ContextViewPolicy","type":"object"},"ContractRef":{"additionalProperties":false,"properties":{"digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Digest","type":"string"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"},"namespace":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Namespace","type":"string"},"version":{"pattern":"^[A-Za-z0-9][A-Za-z0-9._+-]{0,63}$","title":"Version","type":"string"}},"required":["namespace","name","version","digest"],"title":"ContractRef","type":"object"},"DurableArtifactSelector":{"additionalProperties":false,"properties":{"artifact_id":{"maxLength":512,"minLength":1,"title":"Artifact Id","type":"string"},"kind":{"const":"durable_artifact_selector","default":"durable_artifact_selector","title":"Kind","type":"string"}},"required":["artifact_id"],"title":"DurableArtifactSelector","type":"object"},"EvidencePort":{"additionalProperties":false,"description":"One declared multi-valued evidence input on an operation contract.\n\nAn operation that cannot gather evidence itself declares where upstream\nresults enter. The catalog owns the fact that the port exists and its\ncardinality floor; the plan author selects only which upstream results\nfeed it.","properties":{"max_selections":{"default":8,"maximum":8,"minimum":1,"title":"Max Selections","type":"integer"},"min_selections":{"default":1,"maximum":8,"minimum":1,"title":"Min Selections","type":"integer"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"}},"required":["name"],"title":"EvidencePort","type":"object"},"ExecuteTaskDisposition":{"additionalProperties":false,"properties":{"kind":{"const":"execute","default":"execute","title":"Kind","type":"string"}},"title":"ExecuteTaskDisposition","type":"object"},"InlineExactContextView":{"additionalProperties":false,"properties":{"complete":{"const":true,"default":true,"title":"Complete","type":"boolean"},"content":{"$ref":"#/$defs/JsonValue"},"content_bytes":{"minimum":0,"title":"Content Bytes","type":"integer"},"kind":{"const":"inline_exact","default":"inline_exact","title":"Kind","type":"string"},"source":{"$ref":"#/$defs/ContextSourceRef"}},"required":["source","content","content_bytes"],"title":"InlineExactContextView","type":"object"},"InvocationArgumentSelector":{"additionalProperties":false,"properties":{"argument_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Argument Name","type":"string"},"kind":{"const":"invocation_argument_selector","default":"invocation_argument_selector","title":"Kind","type":"string"}},"required":["argument_name"],"title":"InvocationArgumentSelector","type":"object"},"JsonValue":{},"LiteralSelector":{"additionalProperties":false,"properties":{"kind":{"const":"literal_selector","default":"literal_selector","title":"Kind","type":"string"},"value":{"$ref":"#/$defs/JsonValue"}},"required":["value"],"title":"LiteralSelector","type":"object"},"LiveToolCapabilityBinding":{"additionalProperties":false,"properties":{"capability":{"maxLength":512,"minLength":1,"title":"Capability","type":"string"},"kind":{"const":"live_tool","default":"live_tool","title":"Kind","type":"string"},"route_id":{"maxLength":512,"minLength":1,"title":"Route Id","type":"string"},"tool_ids":{"items":{"maxLength":512,"minLength":1,"type":"string"},"minItems":1,"title":"Tool Ids","type":"array"}},"required":["capability","route_id","tool_ids"],"title":"LiveToolCapabilityBinding","type":"object"},"NodeValueSelector":{"additionalProperties":false,"properties":{"artifact_name":{"anyOf":[{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},{"type":"null"}],"default":null,"title":"Artifact Name"},"kind":{"const":"node_value_selector","default":"node_value_selector","title":"Kind","type":"string"},"node_id":{"maxLength":512,"minLength":1,"title":"Node Id","type":"string"},"projection_path":{"default":[],"items":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"title":"Projection Path","type":"array"},"value_kind":{"enum":["narrative","projection","artifact"],"title":"Value Kind","type":"string"}},"required":["node_id","value_kind"],"title":"NodeValueSelector","type":"object"},"OrdinaryDelegationTaskRef":{"additionalProperties":false,"properties":{"delegation_id":{"maxLength":512,"minLength":1,"title":"Delegation Id","type":"string"},"kind":{"const":"ordinary_delegation","default":"ordinary_delegation","title":"Kind","type":"string"},"operation":{"$ref":"#/$defs/AgentOperationRef"}},"required":["delegation_id","operation"],"title":"OrdinaryDelegationTaskRef","type":"object"},"OutcomePolicy":{"additionalProperties":false,"properties":{"routes":{"items":{"$ref":"#/$defs/OutcomeRoute"},"minItems":1,"title":"Routes","type":"array"}},"required":["routes"],"title":"OutcomePolicy","type":"object"},"OutcomeRequirement":{"additionalProperties":false,"properties":{"required":{"const":false,"default":false,"title":"Required","type":"boolean"},"source":{"const":"none","default":"none","title":"Source","type":"string"}},"title":"OutcomeRequirement","type":"object"},"OutcomeRoute":{"additionalProperties":false,"properties":{"action":{"enum":["settle","continue","skip_dependents","fail"],"title":"Action","type":"string"},"disposition":{"enum":["complete","partial","insufficient_evidence","blocked","not_assessed"],"title":"Disposition","type":"string"}},"required":["disposition","action"],"title":"OutcomeRoute","type":"object"},"OwnerBinding":{"additionalProperties":false,"properties":{"invocation_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Invocation Id"},"session_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Session Id"},"tenant_id":{"maxLength":512,"minLength":1,"title":"Tenant Id","type":"string"},"workflow_run_id":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Workflow Run Id"}},"required":["tenant_id"],"title":"OwnerBinding","type":"object"},"PhaseOutputSelector":{"additionalProperties":false,"properties":{"kind":{"const":"phase_output_selector","default":"phase_output_selector","title":"Kind","type":"string"},"output_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Output Name","type":"string"},"phase_number":{"minimum":1,"title":"Phase Number","type":"integer"},"revision":{"minimum":1,"title":"Revision","type":"integer"}},"required":["phase_number","revision","output_name"],"title":"PhaseOutputSelector","type":"object"},"PipelineStageTaskRef":{"additionalProperties":false,"description":"One pipeline stage attempt, a durable child of the execution that runs it.\n\nRecorded as a default where the logical-task contract was open. Revert site:\nuse OrdinaryDelegationTaskRef with delegation_id set to the stage run id.","properties":{"kind":{"const":"pipeline_stage","default":"pipeline_stage","title":"Kind","type":"string"},"operation":{"$ref":"#/$defs/AgentOperationRef"},"pipeline_id":{"maxLength":512,"minLength":1,"title":"Pipeline Id","type":"string"},"stage_id":{"maxLength":512,"minLength":1,"title":"Stage Id","type":"string"}},"required":["pipeline_id","stage_id","operation"],"title":"PipelineStageTaskRef","type":"object"},"ProjectionRequirement":{"additionalProperties":false,"properties":{"contract":{"$ref":"#/$defs/ContractRef"},"required":{"default":true,"title":"Required","type":"boolean"}},"required":["contract"],"title":"ProjectionRequirement","type":"object"},"ProviderToolDefinition":{"additionalProperties":false,"description":"One exact provider-facing tool definition frozen for child execution.","properties":{"definition":{"additionalProperties":{"$ref":"#/$defs/JsonValue"},"title":"Definition","type":"object"}},"required":["definition"],"title":"ProviderToolDefinition","type":"object"},"RequestedDataRef":{"additionalProperties":false,"properties":{"context_policy":{"anyOf":[{"$ref":"#/$defs/ContextViewPolicy"},{"type":"null"}],"default":null},"expected_contract":{"$ref":"#/$defs/ContractRef"},"kind":{"const":"requested_data","default":"requested_data","title":"Kind","type":"string"},"name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Name","type":"string"},"selector":{"discriminator":{"mapping":{"durable_artifact_selector":"#/$defs/DurableArtifactSelector","invocation_argument_selector":"#/$defs/InvocationArgumentSelector","literal_selector":"#/$defs/LiteralSelector","node_value_selector":"#/$defs/NodeValueSelector","phase_output_selector":"#/$defs/PhaseOutputSelector","selected_content_selector":"#/$defs/SelectedContentSelector"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/InvocationArgumentSelector"},{"$ref":"#/$defs/LiteralSelector"},{"$ref":"#/$defs/SelectedContentSelector"},{"$ref":"#/$defs/NodeValueSelector"},{"$ref":"#/$defs/PhaseOutputSelector"},{"$ref":"#/$defs/DurableArtifactSelector"}],"title":"Selector"}},"required":["name","selector","expected_contract"],"title":"RequestedDataRef","type":"object"},"ResultRequirement":{"additionalProperties":false,"description":"Code-owned result metadata, not a response schema for the model.","properties":{"mode":{"default":"narrative","title":"Mode","type":"string"},"outcome":{"$ref":"#/$defs/OutcomeRequirement"},"projection":{"anyOf":[{"$ref":"#/$defs/ProjectionRequirement"},{"type":"null"}],"default":null},"terminal_narrative":{"default":"required","title":"Terminal Narrative","type":"string"}},"required":["outcome"],"title":"ResultRequirement","type":"object"},"SelectedContentSelector":{"additionalProperties":false,"properties":{"input_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Input Name","type":"string"},"kind":{"const":"selected_content_selector","default":"selected_content_selector","title":"Kind","type":"string"}},"required":["input_name"],"title":"SelectedContentSelector","type":"object"},"SelectionPresetProvenance":{"additionalProperties":false,"description":"The winning preset recorded beside one bind (design §7.4).","properties":{"name":{"title":"Name","type":"string"},"policy_revision":{"title":"Policy Revision","type":"string"},"scope":{"enum":["user","firm","run","subtree"],"title":"Scope","type":"string"}},"required":["name","scope","policy_revision"],"title":"SelectionPresetProvenance","type":"object"},"SelectionProvenance":{"additionalProperties":false,"description":"Role, effort and preset sources beside an exact bind; every key is present.","properties":{"effort_source":{"anyOf":[{"enum":["explicit","spawn","operation"],"type":"string"},{"type":"null"}],"title":"Effort Source"},"preset":{"anyOf":[{"$ref":"#/$defs/SelectionPresetProvenance"},{"type":"null"}]},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"role_source":{"anyOf":[{"enum":["spawn","operation"],"type":"string"},{"type":"null"}],"title":"Role Source"}},"required":["role","role_source","effort_source","preset"],"title":"SelectionProvenance","type":"object"},"SemanticCapabilityRequirement":{"additionalProperties":false,"properties":{"binding_modes":{"items":{"enum":["typed_input","live_tool"],"type":"string"},"minItems":1,"title":"Binding Modes","type":"array"},"compatible_input_contracts":{"default":[],"items":{"$ref":"#/$defs/ContractRef"},"title":"Compatible Input Contracts","type":"array"},"name":{"maxLength":512,"minLength":1,"title":"Name","type":"string"},"required":{"default":true,"title":"Required","type":"boolean"}},"required":["name","binding_modes"],"title":"SemanticCapabilityRequirement","type":"object"},"SemanticExcerptContextView":{"additionalProperties":false,"properties":{"complete":{"const":false,"default":false,"title":"Complete","type":"boolean"},"content":{"minLength":1,"title":"Content","type":"string"},"content_bytes":{"minimum":1,"title":"Content Bytes","type":"integer"},"kind":{"const":"semantic_excerpt","default":"semantic_excerpt","title":"Kind","type":"string"},"selection_query":{"minLength":1,"title":"Selection Query","type":"string"},"source":{"$ref":"#/$defs/ContextSourceRef"}},"required":["source","content","content_bytes","selection_query"],"title":"SemanticExcerptContextView","type":"object"},"SettleWithoutExecutionDisposition":{"additionalProperties":false,"properties":{"kind":{"const":"settle_without_execution","default":"settle_without_execution","title":"Kind","type":"string"},"reason":{"enum":["dependency_not_accepted","required_input_unavailable","workflow_cancelled","admission_denied"],"title":"Reason","type":"string"},"unavailable_input_names":{"items":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"title":"Unavailable Input Names","type":"array"}},"required":["reason","unavailable_input_names"],"title":"SettleWithoutExecutionDisposition","type":"object"},"ToolGrant":{"additionalProperties":false,"properties":{"digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Digest","type":"string"},"grant_id":{"maxLength":512,"minLength":1,"title":"Grant Id","type":"string"},"kind":{"const":"tool_grant","default":"tool_grant","title":"Kind","type":"string"},"tools":{"default":[],"items":{"$ref":"#/$defs/ToolGrantEntry"},"title":"Tools","type":"array"}},"required":["grant_id","digest"],"title":"ToolGrant","type":"object"},"ToolGrantEntry":{"additionalProperties":false,"properties":{"effect":{"enum":["read","propose","write","external_effect"],"title":"Effect","type":"string"},"route_id":{"maxLength":512,"minLength":1,"title":"Route Id","type":"string"},"tool_id":{"maxLength":512,"minLength":1,"title":"Tool Id","type":"string"}},"required":["tool_id","route_id","effect"],"title":"ToolGrantEntry","type":"object"},"TypedInputCapabilityBinding":{"additionalProperties":false,"properties":{"capability":{"maxLength":512,"minLength":1,"title":"Capability","type":"string"},"input_contract":{"$ref":"#/$defs/ContractRef"},"input_name":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","title":"Input Name","type":"string"},"kind":{"const":"typed_input","default":"typed_input","title":"Kind","type":"string"}},"required":["capability","input_name","input_contract"],"title":"TypedInputCapabilityBinding","type":"object"},"WorkflowNodeTaskRef":{"additionalProperties":false,"properties":{"item_key":{"anyOf":[{"maxLength":512,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Item Key"},"kind":{"const":"workflow_node","default":"workflow_node","title":"Kind","type":"string"},"node_id":{"maxLength":512,"minLength":1,"title":"Node Id","type":"string"},"operation":{"$ref":"#/$defs/AgentOperationRef"},"phase_number":{"minimum":1,"title":"Phase Number","type":"integer"},"plan_id":{"maxLength":512,"minLength":1,"title":"Plan Id","type":"string"},"revision":{"minimum":1,"title":"Revision","type":"integer"},"workflow_run_id":{"maxLength":512,"minLength":1,"title":"Workflow Run Id","type":"string"}},"required":["workflow_run_id","plan_id","phase_number","revision","node_id","operation"],"title":"WorkflowNodeTaskRef","type":"object"},"WorkspaceGrant":{"additionalProperties":false,"properties":{"kind":{"const":"workspace_grant","default":"workspace_grant","title":"Kind","type":"string"},"scope":{"enum":["read_only","workspace_write","model_write"],"title":"Scope","type":"string"},"workspace_id":{"maxLength":512,"minLength":1,"title":"Workspace Id","type":"string"}},"required":["workspace_id","scope"],"title":"WorkspaceGrant","type":"object"}},"additionalProperties":false,"properties":{"admitted_plan_digest":{"anyOf":[{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},{"type":"null"}],"default":null,"title":"Admitted Plan Digest"},"admitted_task_digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Admitted Task Digest","type":"string"},"admitted_task_id":{"maxLength":512,"minLength":1,"title":"Admitted Task Id","type":"string"},"attempt":{"$ref":"#/$defs/AttemptRef"},"capability_binding_digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Capability Binding Digest","type":"string"},"capability_bindings":{"default":[],"items":{"discriminator":{"mapping":{"live_tool":"#/$defs/LiveToolCapabilityBinding","typed_input":"#/$defs/TypedInputCapabilityBinding"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/TypedInputCapabilityBinding"},{"$ref":"#/$defs/LiveToolCapabilityBinding"}]},"title":"Capability Bindings","type":"array"},"content_read_grants":{"default":[],"items":{"$ref":"#/$defs/ContentReadGrant"},"title":"Content Read Grants","type":"array"},"execution_disposition":{"discriminator":{"mapping":{"execute":"#/$defs/ExecuteTaskDisposition","settle_without_execution":"#/$defs/SettleWithoutExecutionDisposition"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/ExecuteTaskDisposition"},{"$ref":"#/$defs/SettleWithoutExecutionDisposition"}],"title":"Execution Disposition"},"execution_snapshot":{"anyOf":[{"$ref":"#/$defs/AgentExecutionSnapshot"},{"type":"null"}]},"inputs":{"default":[],"items":{"$ref":"#/$defs/AdmittedInputBinding"},"title":"Inputs","type":"array"},"logical_task":{"discriminator":{"mapping":{"ordinary_delegation":"#/$defs/OrdinaryDelegationTaskRef","pipeline_stage":"#/$defs/PipelineStageTaskRef","workflow_node":"#/$defs/WorkflowNodeTaskRef"},"propertyName":"kind"},"oneOf":[{"$ref":"#/$defs/OrdinaryDelegationTaskRef"},{"$ref":"#/$defs/WorkflowNodeTaskRef"},{"$ref":"#/$defs/PipelineStageTaskRef"}],"title":"Logical Task"},"model_bind":{"anyOf":[{"$ref":"#/$defs/CapabilityBind"},{"type":"null"}]},"model_bind_digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Model Bind Digest","type":"string"},"objective":{"$ref":"#/$defs/JsonValue"},"operation":{"$ref":"#/$defs/AgentOperationSnapshot"},"outcome_policy":{"$ref":"#/$defs/OutcomePolicy"},"result_requirement":{"$ref":"#/$defs/ResultRequirement"},"schema_version":{"default":"1.1","enum":["1.0","1.1","1.2"],"title":"Schema Version","type":"string"},"tool_grant":{"$ref":"#/$defs/ToolGrant"},"tool_grant_digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Tool Grant Digest","type":"string"},"tool_routes":{"anyOf":[{"items":{"$ref":"#/$defs/AdmittedToolRoute"},"type":"array"},{"type":"null"}],"default":null,"title":"Tool Routes"},"workflow_identity":{"anyOf":[{"$ref":"#/$defs/AdmittedWorkflowNodeIdentity"},{"type":"null"}],"default":null},"workspace_grant":{"$ref":"#/$defs/WorkspaceGrant"}},"required":["admitted_task_id","logical_task","attempt","objective","execution_disposition","execution_snapshot","operation","tool_grant","workspace_grant","model_bind","result_requirement","outcome_policy","admitted_task_digest","model_bind_digest","capability_binding_digest","tool_grant_digest"],"title":"AdmittedTask","type":"object"}
|