@adea-ai/runtime-sdk 1.17.0 → 1.17.2

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.
Files changed (77) hide show
  1. package/dist/adapter.d.ts +29 -1
  2. package/dist/adapter.js +32 -1
  3. package/dist/agent-plugins.d.ts +0 -1
  4. package/dist/agent-plugins.js +0 -1
  5. package/dist/capabilities.d.ts +0 -1
  6. package/dist/capabilities.js +0 -1
  7. package/dist/channel-ownership.d.ts +0 -1
  8. package/dist/channel-ownership.js +0 -1
  9. package/dist/compatibility.d.ts +0 -1
  10. package/dist/compatibility.js +0 -1
  11. package/dist/conformance.d.ts +0 -1
  12. package/dist/conformance.js +0 -1
  13. package/dist/discovery.d.ts +0 -1
  14. package/dist/discovery.js +0 -1
  15. package/dist/eligibility.d.ts +0 -1
  16. package/dist/eligibility.js +0 -1
  17. package/dist/fixtures.d.ts +0 -1
  18. package/dist/fixtures.js +0 -1
  19. package/dist/health.d.ts +0 -1
  20. package/dist/health.js +0 -1
  21. package/dist/index.d.ts +0 -1
  22. package/dist/index.js +0 -1
  23. package/dist/inventory.d.ts +0 -1
  24. package/dist/inventory.js +0 -1
  25. package/dist/mock.d.ts +0 -1
  26. package/dist/mock.js +0 -1
  27. package/dist/models.d.ts +0 -1
  28. package/dist/models.js +0 -1
  29. package/dist/pi-durable-lead.d.ts +150 -1305
  30. package/dist/pi-durable-lead.js +68 -10
  31. package/dist/registry.d.ts +0 -1
  32. package/dist/registry.js +0 -1
  33. package/dist/routing.d.ts +0 -1
  34. package/dist/routing.js +0 -1
  35. package/dist/sessions.d.ts +0 -1
  36. package/dist/sessions.js +0 -1
  37. package/dist/transport.d.ts +0 -1
  38. package/dist/transport.js +0 -1
  39. package/package.json +3 -3
  40. package/dist/adapter.d.ts.map +0 -1
  41. package/dist/adapter.js.map +0 -1
  42. package/dist/agent-plugins.d.ts.map +0 -1
  43. package/dist/agent-plugins.js.map +0 -1
  44. package/dist/capabilities.d.ts.map +0 -1
  45. package/dist/capabilities.js.map +0 -1
  46. package/dist/channel-ownership.d.ts.map +0 -1
  47. package/dist/channel-ownership.js.map +0 -1
  48. package/dist/compatibility.d.ts.map +0 -1
  49. package/dist/compatibility.js.map +0 -1
  50. package/dist/conformance.d.ts.map +0 -1
  51. package/dist/conformance.js.map +0 -1
  52. package/dist/discovery.d.ts.map +0 -1
  53. package/dist/discovery.js.map +0 -1
  54. package/dist/eligibility.d.ts.map +0 -1
  55. package/dist/eligibility.js.map +0 -1
  56. package/dist/fixtures.d.ts.map +0 -1
  57. package/dist/fixtures.js.map +0 -1
  58. package/dist/health.d.ts.map +0 -1
  59. package/dist/health.js.map +0 -1
  60. package/dist/index.d.ts.map +0 -1
  61. package/dist/index.js.map +0 -1
  62. package/dist/inventory.d.ts.map +0 -1
  63. package/dist/inventory.js.map +0 -1
  64. package/dist/mock.d.ts.map +0 -1
  65. package/dist/mock.js.map +0 -1
  66. package/dist/models.d.ts.map +0 -1
  67. package/dist/models.js.map +0 -1
  68. package/dist/pi-durable-lead.d.ts.map +0 -1
  69. package/dist/pi-durable-lead.js.map +0 -1
  70. package/dist/registry.d.ts.map +0 -1
  71. package/dist/registry.js.map +0 -1
  72. package/dist/routing.d.ts.map +0 -1
  73. package/dist/routing.js.map +0 -1
  74. package/dist/sessions.d.ts.map +0 -1
  75. package/dist/sessions.js.map +0 -1
  76. package/dist/transport.d.ts.map +0 -1
  77. package/dist/transport.js.map +0 -1
@@ -1,5 +1,17 @@
1
1
  import { z } from 'zod';
2
+ import { IdentifierSchemas, ModelSelectionRefSchema } from '@adea-ai/contracts';
3
+ import { RuntimeExecutionProgressSchema, RuntimeExecutionStatusSchema, RuntimeExecutionStateSchema, RuntimeObservedGenerationSchema } from './adapter.js';
4
+ declare const IntentId: z.ZodUUID;
5
+ declare const DispatchId: z.ZodString;
2
6
  export declare const PiDurableLeadPreparationRefSchema: z.ZodString;
7
+ declare const Caller: z.ZodObject<{
8
+ servicePrincipalId: z.ZodString;
9
+ }, z.core.$strict>;
10
+ declare const Correlation: z.ZodObject<{
11
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
12
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
13
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
14
+ }, z.core.$strict>;
3
15
  export declare const PiDurableLeadCommandEnvelopeSchema: z.ZodObject<{
4
16
  contractVersion: z.ZodObject<{
5
17
  major: z.ZodNumber;
@@ -14,14 +26,8 @@ export declare const PiDurableLeadCommandEnvelopeSchema: z.ZodObject<{
14
26
  operation: z.ZodString;
15
27
  issuedAt: z.ZodISODateTime;
16
28
  payload: z.ZodUnknown;
17
- caller: z.ZodObject<{
18
- servicePrincipalId: z.ZodString;
19
- }, z.core.$strict>;
20
- correlation: z.ZodObject<{
21
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
22
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
23
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
24
- }, z.core.$strict>;
29
+ caller: typeof Caller;
30
+ correlation: typeof Correlation;
25
31
  }, z.core.$strict>;
26
32
  export declare const PiDurableLeadReadEnvelopeSchema: z.ZodObject<{
27
33
  contractVersion: z.ZodObject<{
@@ -34,14 +40,8 @@ export declare const PiDurableLeadReadEnvelopeSchema: z.ZodObject<{
34
40
  operation: z.ZodString;
35
41
  requestedAt: z.ZodISODateTime;
36
42
  parameters: z.ZodUnknown;
37
- caller: z.ZodObject<{
38
- servicePrincipalId: z.ZodString;
39
- }, z.core.$strict>;
40
- correlation: z.ZodObject<{
41
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
42
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
43
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
44
- }, z.core.$strict>;
43
+ caller: typeof Caller;
44
+ correlation: typeof Correlation;
45
45
  }, z.core.$strict>;
46
46
  /** Requested target reference: the session, task, and generation a caller
47
47
  * asks to bind to an intent, echoed back on every receipt. UNTRUSTED by
@@ -57,16 +57,37 @@ export declare const PiDurableLeadRequestedTargetSchema: z.ZodReadonly<z.ZodObje
57
57
  }, z.core.$strict>>;
58
58
  export type PiDurableLeadRequestedTarget = z.output<typeof PiDurableLeadRequestedTargetSchema>;
59
59
  /** Server-owned execution observation: the session the runtime assigned
60
- * this execution plus the authority-resolved plan task. Both facts come
61
- * from server-held records (adapter handle + admitted plan), never from
62
- * caller claims. Generation is deliberately absent: no current read
63
- * reports the target's live generation, and emitting a caller value here
64
- * would launder it as observed. */
60
+ * this execution, the authority-resolved plan task, and the generation the
61
+ * runtime observed for the attempt that owns it. All three come from
62
+ * server-held records (adapter handle + admitted plan + the runtime's own
63
+ * observed generation), never from caller claims. A caller-claimed
64
+ * generation is retained on the request and echoed back as a claim; it can
65
+ * never appear here, because a claimed value laundered as an observation is
66
+ * not an observation. The generation is additive in contract 3.1: a consumer
67
+ * that advertised an earlier version parses with the strict pre-3.1 shape, so
68
+ * a producer publishes it only to a negotiated consumer. */
65
69
  export declare const PiDurableLeadObservedTargetSchema: z.ZodReadonly<z.ZodObject<{
66
70
  sessionId: z.ZodString;
67
71
  taskId: z.ZodString;
72
+ generation: z.ZodOptional<typeof RuntimeObservedGenerationSchema>;
68
73
  }, z.core.$strict>>;
69
74
  export type PiDurableLeadObservedTarget = z.output<typeof PiDurableLeadObservedTargetSchema>;
75
+ /** The contract version that introduced the runtime-observed generation on the
76
+ * lead receipt and on the runtime execution status. The field is optional and
77
+ * additive within the major, but the pre-3.1 target and runtime-status shapes
78
+ * are strict: a consumer that predates this version rejects an unknown key and
79
+ * reports an invalid response. */
80
+ export declare const PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION: {
81
+ readonly major: 3;
82
+ readonly minor: 1;
83
+ };
84
+ /** Whether a consumer that advertised `consumerVersion` negotiated a contract
85
+ * that includes the runtime-observed generation. The producer and the consumer
86
+ * negotiate the highest common major and the lower of the two minors, so an
87
+ * earlier same-major consumer (or a consumer of another major) never receives
88
+ * the field it cannot parse. A consumer that advertised a newer minor already
89
+ * understands it. */
90
+ export declare function supportsPiDurableObservedGeneration(consumerVersion: unknown): boolean;
70
91
  export declare const PiDurableLeadPrepareRequestSchema: z.ZodObject<{
71
92
  contractVersion: z.ZodObject<{
72
93
  major: z.ZodNumber;
@@ -79,14 +100,8 @@ export declare const PiDurableLeadPrepareRequestSchema: z.ZodObject<{
79
100
  idempotencyKey: z.ZodString;
80
101
  payloadHash: z.ZodString;
81
102
  issuedAt: z.ZodISODateTime;
82
- caller: z.ZodObject<{
83
- servicePrincipalId: z.ZodString;
84
- }, z.core.$strict>;
85
- correlation: z.ZodObject<{
86
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
87
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
88
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
89
- }, z.core.$strict>;
103
+ caller: typeof Caller;
104
+ correlation: typeof Correlation;
90
105
  operation: z.ZodLiteral<"pi-durable.lead.prepare">;
91
106
  payload: z.ZodObject<{
92
107
  intentId: z.ZodUUID;
@@ -104,23 +119,13 @@ export declare const PiDurableLeadDispatchRequestSchema: z.ZodObject<{
104
119
  idempotencyKey: z.ZodString;
105
120
  payloadHash: z.ZodString;
106
121
  issuedAt: z.ZodISODateTime;
107
- caller: z.ZodObject<{
108
- servicePrincipalId: z.ZodString;
109
- }, z.core.$strict>;
110
- correlation: z.ZodObject<{
111
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
112
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
113
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
114
- }, z.core.$strict>;
122
+ caller: typeof Caller;
123
+ correlation: typeof Correlation;
115
124
  operation: z.ZodLiteral<"pi-durable.lead.dispatch">;
116
125
  payload: z.ZodObject<{
117
- intentId: z.ZodUUID;
118
- preparationRef: z.ZodOptional<z.ZodString>;
119
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
120
- sessionId: z.ZodString;
121
- taskId: z.ZodString;
122
- generation: z.ZodNumber;
123
- }, z.core.$strict>>>;
126
+ intentId: typeof IntentId;
127
+ preparationRef: z.ZodOptional<typeof PiDurableLeadPreparationRefSchema>;
128
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
124
129
  }, z.core.$strict>;
125
130
  }, z.core.$strict>;
126
131
  export declare const PiDurableLeadStatusRequestSchema: z.ZodObject<{
@@ -132,14 +137,8 @@ export declare const PiDurableLeadStatusRequestSchema: z.ZodObject<{
132
137
  workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
133
138
  projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
134
139
  requestedAt: z.ZodISODateTime;
135
- caller: z.ZodObject<{
136
- servicePrincipalId: z.ZodString;
137
- }, z.core.$strict>;
138
- correlation: z.ZodObject<{
139
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
140
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
141
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
142
- }, z.core.$strict>;
140
+ caller: typeof Caller;
141
+ correlation: typeof Correlation;
143
142
  operation: z.ZodLiteral<"pi-durable.lead.status">;
144
143
  parameters: z.ZodObject<{
145
144
  dispatchId: z.ZodString;
@@ -154,14 +153,8 @@ export declare const PiDurableLeadLookupRequestSchema: z.ZodObject<{
154
153
  workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
155
154
  projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
156
155
  requestedAt: z.ZodISODateTime;
157
- caller: z.ZodObject<{
158
- servicePrincipalId: z.ZodString;
159
- }, z.core.$strict>;
160
- correlation: z.ZodObject<{
161
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
162
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
163
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
164
- }, z.core.$strict>;
156
+ caller: typeof Caller;
157
+ correlation: typeof Correlation;
165
158
  operation: z.ZodLiteral<"pi-durable.lead.lookup">;
166
159
  parameters: z.ZodObject<{
167
160
  intentId: z.ZodUUID;
@@ -176,17 +169,11 @@ export declare const PiDurableLeadProgressRequestSchema: z.ZodObject<{
176
169
  workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
177
170
  projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
178
171
  requestedAt: z.ZodISODateTime;
179
- caller: z.ZodObject<{
180
- servicePrincipalId: z.ZodString;
181
- }, z.core.$strict>;
182
- correlation: z.ZodObject<{
183
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
184
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
185
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
186
- }, z.core.$strict>;
172
+ caller: typeof Caller;
173
+ correlation: typeof Correlation;
187
174
  operation: z.ZodLiteral<"pi-durable.lead.progress">;
188
175
  parameters: z.ZodObject<{
189
- dispatchId: z.ZodString;
176
+ dispatchId: typeof DispatchId;
190
177
  afterSequence: z.ZodOptional<z.ZodNumber>;
191
178
  }, z.core.$strict>;
192
179
  }, z.core.$strict>;
@@ -206,21 +193,12 @@ export declare const PiDurableLeadChildrenRequestSchema: z.ZodObject<{
206
193
  workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
207
194
  projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
208
195
  requestedAt: z.ZodISODateTime;
209
- caller: z.ZodObject<{
210
- servicePrincipalId: z.ZodString;
211
- }, z.core.$strict>;
212
- correlation: z.ZodObject<{
213
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
214
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
215
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
216
- }, z.core.$strict>;
196
+ caller: typeof Caller;
197
+ correlation: typeof Correlation;
217
198
  operation: z.ZodLiteral<"pi-durable.lead.children">;
218
199
  parameters: z.ZodObject<{
219
- dispatchId: z.ZodString;
220
- after: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
221
- acceptedAt: z.ZodISODateTime;
222
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
223
- }, z.core.$strict>>>;
200
+ dispatchId: typeof DispatchId;
201
+ after: z.ZodOptional<typeof PiDurableLeadChildrenCursorSchema>;
224
202
  limit: z.ZodOptional<z.ZodNumber>;
225
203
  }, z.core.$strict>;
226
204
  }, z.core.$strict>;
@@ -236,14 +214,8 @@ export declare const PiDurableLeadCancelRequestSchema: z.ZodObject<{
236
214
  idempotencyKey: z.ZodString;
237
215
  payloadHash: z.ZodString;
238
216
  issuedAt: z.ZodISODateTime;
239
- caller: z.ZodObject<{
240
- servicePrincipalId: z.ZodString;
241
- }, z.core.$strict>;
242
- correlation: z.ZodObject<{
243
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
244
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
245
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
246
- }, z.core.$strict>;
217
+ caller: typeof Caller;
218
+ correlation: typeof Correlation;
247
219
  operation: z.ZodLiteral<"pi-durable.lead.cancel">;
248
220
  payload: z.ZodObject<{
249
221
  dispatchId: z.ZodString;
@@ -251,30 +223,24 @@ export declare const PiDurableLeadCancelRequestSchema: z.ZodObject<{
251
223
  }, z.core.$strict>;
252
224
  export declare const PiDurableLeadReceiptResponseSchema: z.ZodObject<{
253
225
  schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
254
- dispatchId: z.ZodString;
255
- intentId: z.ZodUUID;
256
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
257
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
226
+ dispatchId: typeof DispatchId;
227
+ intentId: typeof IntentId;
228
+ executionId: typeof IdentifierSchemas.executionId;
229
+ attemptId: typeof IdentifierSchemas.attemptId;
258
230
  runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
259
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
260
- sessionId: z.ZodString;
261
- taskId: z.ZodString;
262
- generation: z.ZodNumber;
263
- }, z.core.$strict>>>;
264
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
265
- sessionId: z.ZodString;
266
- taskId: z.ZodString;
267
- }, z.core.$strict>>>;
231
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
232
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
268
233
  }, z.core.$strict>;
234
+ declare const PlanDigest: z.ZodString;
269
235
  /** What the accepted lead plan holds back for child executions. Disclosure only: never a funding,
270
236
  * admission or spending capability. `not_stated` means the plan holds nothing back, so only
271
237
  * balance the lead releases can fund children; it is not an error and not a missing disclosure. */
272
238
  export declare const PiDurableLeadChildAllowanceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
273
239
  schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
274
- executionPlanDigest: z.ZodString;
240
+ executionPlanDigest: typeof PlanDigest;
275
241
  profile: z.ZodReadonly<z.ZodObject<{
276
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
277
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
242
+ profileId: typeof IdentifierSchemas.profileId;
243
+ profileVersionId: typeof IdentifierSchemas.profileVersionId;
278
244
  version: z.ZodNumber;
279
245
  revision: z.ZodNumber;
280
246
  }, z.core.$strict>>;
@@ -284,10 +250,10 @@ export declare const PiDurableLeadChildAllowanceSchema: z.ZodDiscriminatedUnion<
284
250
  maximumTokens: z.ZodNumber;
285
251
  }, z.core.$strict>, z.ZodObject<{
286
252
  schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
287
- executionPlanDigest: z.ZodString;
253
+ executionPlanDigest: typeof PlanDigest;
288
254
  profile: z.ZodReadonly<z.ZodObject<{
289
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
290
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
255
+ profileId: typeof IdentifierSchemas.profileId;
256
+ profileVersionId: typeof IdentifierSchemas.profileVersionId;
291
257
  version: z.ZodNumber;
292
258
  revision: z.ZodNumber;
293
259
  }, z.core.$strict>>;
@@ -296,11 +262,11 @@ export declare const PiDurableLeadChildAllowanceSchema: z.ZodDiscriminatedUnion<
296
262
  /** Disclosure bound to a prepared canonical attempt; never a spending or runtime capability. */
297
263
  export declare const PiDurableLeadPreparationSchema: z.ZodObject<{
298
264
  schemaVersion: z.ZodLiteral<"pi-lead-preparation/v1">;
299
- preparationRef: z.ZodString;
300
- intentId: z.ZodUUID;
301
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
302
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
303
- selectionRef: z.ZodString;
265
+ preparationRef: typeof PiDurableLeadPreparationRefSchema;
266
+ intentId: typeof IntentId;
267
+ executionId: typeof IdentifierSchemas.executionId;
268
+ attemptId: typeof IdentifierSchemas.attemptId;
269
+ selectionRef: typeof ModelSelectionRefSchema;
304
270
  selectionRevision: z.ZodNumber;
305
271
  funding: z.ZodObject<{
306
272
  schemaVersion: z.ZodLiteral<"model-funding-display/v1">;
@@ -338,30 +304,7 @@ export declare const PiDurableLeadPreparationSchema: z.ZodObject<{
338
304
  authorityRevision: z.ZodNumber;
339
305
  expiresAt: z.ZodISODateTime;
340
306
  }, z.core.$strict>;
341
- childAllowance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
342
- schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
343
- executionPlanDigest: z.ZodString;
344
- profile: z.ZodReadonly<z.ZodObject<{
345
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
346
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
347
- version: z.ZodNumber;
348
- revision: z.ZodNumber;
349
- }, z.core.$strict>>;
350
- state: z.ZodLiteral<"stated">;
351
- currency: z.ZodLiteral<"USD">;
352
- maximumMicrounits: z.ZodNumber;
353
- maximumTokens: z.ZodNumber;
354
- }, z.core.$strict>, z.ZodObject<{
355
- schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
356
- executionPlanDigest: z.ZodString;
357
- profile: z.ZodReadonly<z.ZodObject<{
358
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
359
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
360
- version: z.ZodNumber;
361
- revision: z.ZodNumber;
362
- }, z.core.$strict>>;
363
- state: z.ZodLiteral<"not_stated">;
364
- }, z.core.$strict>], "state">>;
307
+ childAllowance: z.ZodOptional<typeof PiDurableLeadChildAllowanceSchema>;
365
308
  expiresAt: z.ZodISODateTime;
366
309
  replayed: z.ZodBoolean;
367
310
  }, z.core.$strict>;
@@ -376,77 +319,7 @@ export declare const PiDurableLeadPrepareResponseSchema: z.ZodObject<{
376
319
  causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
377
320
  parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
378
321
  }, z.core.$strict>;
379
- data: z.ZodObject<{
380
- schemaVersion: z.ZodLiteral<"pi-lead-preparation/v1">;
381
- preparationRef: z.ZodString;
382
- intentId: z.ZodUUID;
383
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
384
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
385
- selectionRef: z.ZodString;
386
- selectionRevision: z.ZodNumber;
387
- funding: z.ZodObject<{
388
- schemaVersion: z.ZodLiteral<"model-funding-display/v1">;
389
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
390
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
391
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
392
- selectionRef: z.ZodString;
393
- selectionRevision: z.ZodNumber;
394
- state: z.ZodLiteral<"ready">;
395
- provider: z.ZodString;
396
- providerModel: z.ZodString;
397
- accountRef: z.ZodString;
398
- authKind: z.ZodEnum<{
399
- api_key: "api_key";
400
- local_runtime: "local_runtime";
401
- provider_subscription: "provider_subscription";
402
- }>;
403
- fundingSource: z.ZodEnum<{
404
- byo_api: "byo_api";
405
- external_subscription: "external_subscription";
406
- hq_managed: "hq_managed";
407
- }>;
408
- fundingOwner: z.ZodObject<{
409
- ownerRef: z.ZodString;
410
- kind: z.ZodEnum<{
411
- adea_account: "adea_account";
412
- provider_account: "provider_account";
413
- workspace_account: "workspace_account";
414
- }>;
415
- displayName: z.ZodString;
416
- revision: z.ZodNumber;
417
- evidenceRef: z.ZodString;
418
- }, z.core.$strict>;
419
- authorizationRef: z.ZodString;
420
- authorityRevision: z.ZodNumber;
421
- expiresAt: z.ZodISODateTime;
422
- }, z.core.$strict>;
423
- childAllowance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
424
- schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
425
- executionPlanDigest: z.ZodString;
426
- profile: z.ZodReadonly<z.ZodObject<{
427
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
428
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
429
- version: z.ZodNumber;
430
- revision: z.ZodNumber;
431
- }, z.core.$strict>>;
432
- state: z.ZodLiteral<"stated">;
433
- currency: z.ZodLiteral<"USD">;
434
- maximumMicrounits: z.ZodNumber;
435
- maximumTokens: z.ZodNumber;
436
- }, z.core.$strict>, z.ZodObject<{
437
- schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
438
- executionPlanDigest: z.ZodString;
439
- profile: z.ZodReadonly<z.ZodObject<{
440
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
441
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
442
- version: z.ZodNumber;
443
- revision: z.ZodNumber;
444
- }, z.core.$strict>>;
445
- state: z.ZodLiteral<"not_stated">;
446
- }, z.core.$strict>], "state">>;
447
- expiresAt: z.ZodISODateTime;
448
- replayed: z.ZodBoolean;
449
- }, z.core.$strict>;
322
+ data: typeof PiDurableLeadPreparationSchema;
450
323
  }, z.core.$strict>;
451
324
  /** Stored dispatch metadata; lookup never creates an execution or runtime session. */
452
325
  export declare const PiDurableLeadLookupResponseSchema: z.ZodObject<{
@@ -462,27 +335,20 @@ export declare const PiDurableLeadLookupResponseSchema: z.ZodObject<{
462
335
  }, z.core.$strict>;
463
336
  data: z.ZodObject<{
464
337
  schemaVersion: z.ZodLiteral<"pi-lead-lookup/v1">;
465
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
466
- intentId: z.ZodUUID;
338
+ workspaceId: typeof IdentifierSchemas.workspaceId;
339
+ intentId: typeof IntentId;
467
340
  receipt: z.ZodNullable<z.ZodObject<{
468
- dispatchId: z.ZodString;
469
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
470
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
341
+ dispatchId: typeof DispatchId;
342
+ executionId: typeof IdentifierSchemas.executionId;
343
+ attemptId: typeof IdentifierSchemas.attemptId;
471
344
  state: z.ZodEnum<{
472
345
  dispatched: "dispatched";
473
346
  dispatching: "dispatching";
474
347
  reconciliation_required: "reconciliation_required";
475
348
  }>;
476
349
  runtimeSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
477
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
478
- sessionId: z.ZodString;
479
- taskId: z.ZodString;
480
- generation: z.ZodNumber;
481
- }, z.core.$strict>>>;
482
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
483
- sessionId: z.ZodString;
484
- taskId: z.ZodString;
485
- }, z.core.$strict>>>;
350
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
351
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
486
352
  }, z.core.$strict>>;
487
353
  }, z.core.$strict>;
488
354
  }, z.core.$strict>;
@@ -499,31 +365,14 @@ export declare const PiDurableLeadDispatchResponseSchema: z.ZodObject<{
499
365
  }, z.core.$strict>;
500
366
  data: z.ZodObject<{
501
367
  schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
502
- dispatchId: z.ZodString;
503
- intentId: z.ZodUUID;
504
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
505
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
368
+ dispatchId: typeof DispatchId;
369
+ intentId: typeof IntentId;
370
+ executionId: typeof IdentifierSchemas.executionId;
371
+ attemptId: typeof IdentifierSchemas.attemptId;
506
372
  runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
507
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
508
- sessionId: z.ZodString;
509
- taskId: z.ZodString;
510
- generation: z.ZodNumber;
511
- }, z.core.$strict>>>;
512
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
513
- sessionId: z.ZodString;
514
- taskId: z.ZodString;
515
- }, z.core.$strict>>>;
516
- state: z.ZodEnum<{
517
- awaiting_input: "awaiting_input";
518
- cancelled: "cancelled";
519
- cancelling: "cancelling";
520
- completed: "completed";
521
- failed: "failed";
522
- running: "running";
523
- starting: "starting";
524
- timed_out: "timed_out";
525
- unknown: "unknown";
526
- }>;
373
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
374
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
375
+ state: typeof RuntimeExecutionStateSchema;
527
376
  replayed: z.ZodBoolean;
528
377
  }, z.core.$strict>;
529
378
  }, z.core.$strict>;
@@ -540,122 +389,15 @@ export declare const PiDurableLeadStatusResponseSchema: z.ZodObject<{
540
389
  }, z.core.$strict>;
541
390
  data: z.ZodObject<{
542
391
  schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
543
- dispatchId: z.ZodString;
544
- intentId: z.ZodUUID;
545
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
546
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
392
+ dispatchId: typeof DispatchId;
393
+ intentId: typeof IntentId;
394
+ executionId: typeof IdentifierSchemas.executionId;
395
+ attemptId: typeof IdentifierSchemas.attemptId;
547
396
  runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
548
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
549
- sessionId: z.ZodString;
550
- taskId: z.ZodString;
551
- generation: z.ZodNumber;
552
- }, z.core.$strict>>>;
553
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
554
- sessionId: z.ZodString;
555
- taskId: z.ZodString;
556
- }, z.core.$strict>>>;
557
- state: z.ZodEnum<{
558
- awaiting_input: "awaiting_input";
559
- cancelled: "cancelled";
560
- cancelling: "cancelling";
561
- completed: "completed";
562
- failed: "failed";
563
- running: "running";
564
- starting: "starting";
565
- timed_out: "timed_out";
566
- unknown: "unknown";
567
- }>;
568
- status: z.ZodObject<{
569
- handle: z.ZodObject<{
570
- handleId: z.ZodString;
571
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
572
- externalSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
573
- startedAt: z.ZodISODateTime;
574
- }, z.core.$strict>;
575
- state: z.ZodEnum<{
576
- awaiting_input: "awaiting_input";
577
- cancelled: "cancelled";
578
- cancelling: "cancelling";
579
- completed: "completed";
580
- failed: "failed";
581
- running: "running";
582
- starting: "starting";
583
- timed_out: "timed_out";
584
- unknown: "unknown";
585
- }>;
586
- observedAt: z.ZodISODateTime;
587
- result: z.ZodOptional<z.ZodObject<{
588
- outcome: z.ZodLiteral<"completed">;
589
- output: z.ZodOptional<z.ZodJSONSchema>;
590
- usage: z.ZodObject<{
591
- inputTokens: z.ZodNumber;
592
- outputTokens: z.ZodNumber;
593
- durationMs: z.ZodNumber;
594
- cost: z.ZodOptional<z.ZodObject<{
595
- amount: z.ZodString;
596
- currency: z.ZodString;
597
- }, z.core.$strict>>;
598
- accounting: z.ZodOptional<z.ZodObject<{
599
- schemaVersion: z.ZodLiteral<1>;
600
- sourceId: z.ZodString;
601
- fundingSource: z.ZodEnum<{
602
- byo_api: "byo_api";
603
- external_subscription: "external_subscription";
604
- hq_managed: "hq_managed";
605
- }>;
606
- currency: z.ZodLiteral<"USD">;
607
- chargedMicrounits: z.ZodNumber;
608
- costExact: z.ZodLiteral<true>;
609
- }, z.core.$strict>>;
610
- }, z.core.$strict>;
611
- artifacts: z.ZodArray<z.ZodObject<{
612
- artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
613
- version: z.ZodNumber;
614
- mediaType: z.ZodString;
615
- digest: z.ZodString;
616
- sizeBytes: z.ZodNumber;
617
- locator: z.ZodString;
618
- }, z.core.$strip>>;
619
- }, z.core.$strict>>;
620
- terminalUsage: z.ZodOptional<z.ZodObject<{
621
- inputTokens: z.ZodNumber;
622
- outputTokens: z.ZodNumber;
623
- durationMs: z.ZodNumber;
624
- cost: z.ZodOptional<z.ZodObject<{
625
- amount: z.ZodString;
626
- currency: z.ZodString;
627
- }, z.core.$strict>>;
628
- accounting: z.ZodOptional<z.ZodObject<{
629
- schemaVersion: z.ZodLiteral<1>;
630
- sourceId: z.ZodString;
631
- fundingSource: z.ZodEnum<{
632
- byo_api: "byo_api";
633
- external_subscription: "external_subscription";
634
- hq_managed: "hq_managed";
635
- }>;
636
- currency: z.ZodLiteral<"USD">;
637
- chargedMicrounits: z.ZodNumber;
638
- costExact: z.ZodLiteral<true>;
639
- }, z.core.$strict>>;
640
- }, z.core.$strict>>;
641
- error: z.ZodOptional<z.ZodObject<{
642
- code: z.ZodString;
643
- classification: z.ZodEnum<{
644
- cancelled: "cancelled";
645
- conflict: "conflict";
646
- infrastructure: "infrastructure";
647
- runtime: "runtime";
648
- timeout: "timeout";
649
- unavailable: "unavailable";
650
- unknown: "unknown";
651
- unsupported: "unsupported";
652
- validation: "validation";
653
- }>;
654
- message: z.ZodString;
655
- retryable: z.ZodBoolean;
656
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
657
- }, z.core.$strict>>;
658
- }, z.core.$strict>;
397
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
398
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
399
+ state: typeof RuntimeExecutionStateSchema;
400
+ status: typeof RuntimeExecutionStatusSchema;
659
401
  }, z.core.$strict>;
660
402
  }, z.core.$strict>;
661
403
  export declare const PiDurableLeadProgressResponseSchema: z.ZodObject<{
@@ -671,33 +413,14 @@ export declare const PiDurableLeadProgressResponseSchema: z.ZodObject<{
671
413
  }, z.core.$strict>;
672
414
  data: z.ZodObject<{
673
415
  schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
674
- dispatchId: z.ZodString;
675
- intentId: z.ZodUUID;
676
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
677
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
416
+ dispatchId: typeof DispatchId;
417
+ intentId: typeof IntentId;
418
+ executionId: typeof IdentifierSchemas.executionId;
419
+ attemptId: typeof IdentifierSchemas.attemptId;
678
420
  runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
679
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
680
- sessionId: z.ZodString;
681
- taskId: z.ZodString;
682
- generation: z.ZodNumber;
683
- }, z.core.$strict>>>;
684
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
685
- sessionId: z.ZodString;
686
- taskId: z.ZodString;
687
- }, z.core.$strict>>>;
688
- events: z.ZodArray<z.ZodObject<{
689
- handleId: z.ZodString;
690
- sequence: z.ZodNumber;
691
- occurredAt: z.ZodISODateTime;
692
- type: z.ZodEnum<{
693
- artifact: "artifact";
694
- interaction: "interaction";
695
- output: "output";
696
- status: "status";
697
- usage: "usage";
698
- }>;
699
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
700
- }, z.core.$strict>>;
421
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
422
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
423
+ events: z.ZodArray<typeof RuntimeExecutionProgressSchema>;
701
424
  nextSequence: z.ZodNumber;
702
425
  }, z.core.$strict>;
703
426
  }, z.core.$strict>;
@@ -714,124 +437,18 @@ export declare const PiDurableLeadCancelResponseSchema: z.ZodObject<{
714
437
  }, z.core.$strict>;
715
438
  data: z.ZodObject<{
716
439
  schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
717
- dispatchId: z.ZodString;
718
- intentId: z.ZodUUID;
719
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
720
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
440
+ dispatchId: typeof DispatchId;
441
+ intentId: typeof IntentId;
442
+ executionId: typeof IdentifierSchemas.executionId;
443
+ attemptId: typeof IdentifierSchemas.attemptId;
721
444
  runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
722
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
723
- sessionId: z.ZodString;
724
- taskId: z.ZodString;
725
- generation: z.ZodNumber;
726
- }, z.core.$strict>>>;
727
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
728
- sessionId: z.ZodString;
729
- taskId: z.ZodString;
730
- }, z.core.$strict>>>;
731
- state: z.ZodEnum<{
732
- awaiting_input: "awaiting_input";
733
- cancelled: "cancelled";
734
- cancelling: "cancelling";
735
- completed: "completed";
736
- failed: "failed";
737
- running: "running";
738
- starting: "starting";
739
- timed_out: "timed_out";
740
- unknown: "unknown";
741
- }>;
742
- status: z.ZodObject<{
743
- handle: z.ZodObject<{
744
- handleId: z.ZodString;
745
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
746
- externalSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
747
- startedAt: z.ZodISODateTime;
748
- }, z.core.$strict>;
749
- state: z.ZodEnum<{
750
- awaiting_input: "awaiting_input";
751
- cancelled: "cancelled";
752
- cancelling: "cancelling";
753
- completed: "completed";
754
- failed: "failed";
755
- running: "running";
756
- starting: "starting";
757
- timed_out: "timed_out";
758
- unknown: "unknown";
759
- }>;
760
- observedAt: z.ZodISODateTime;
761
- result: z.ZodOptional<z.ZodObject<{
762
- outcome: z.ZodLiteral<"completed">;
763
- output: z.ZodOptional<z.ZodJSONSchema>;
764
- usage: z.ZodObject<{
765
- inputTokens: z.ZodNumber;
766
- outputTokens: z.ZodNumber;
767
- durationMs: z.ZodNumber;
768
- cost: z.ZodOptional<z.ZodObject<{
769
- amount: z.ZodString;
770
- currency: z.ZodString;
771
- }, z.core.$strict>>;
772
- accounting: z.ZodOptional<z.ZodObject<{
773
- schemaVersion: z.ZodLiteral<1>;
774
- sourceId: z.ZodString;
775
- fundingSource: z.ZodEnum<{
776
- byo_api: "byo_api";
777
- external_subscription: "external_subscription";
778
- hq_managed: "hq_managed";
779
- }>;
780
- currency: z.ZodLiteral<"USD">;
781
- chargedMicrounits: z.ZodNumber;
782
- costExact: z.ZodLiteral<true>;
783
- }, z.core.$strict>>;
784
- }, z.core.$strict>;
785
- artifacts: z.ZodArray<z.ZodObject<{
786
- artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
787
- version: z.ZodNumber;
788
- mediaType: z.ZodString;
789
- digest: z.ZodString;
790
- sizeBytes: z.ZodNumber;
791
- locator: z.ZodString;
792
- }, z.core.$strip>>;
793
- }, z.core.$strict>>;
794
- terminalUsage: z.ZodOptional<z.ZodObject<{
795
- inputTokens: z.ZodNumber;
796
- outputTokens: z.ZodNumber;
797
- durationMs: z.ZodNumber;
798
- cost: z.ZodOptional<z.ZodObject<{
799
- amount: z.ZodString;
800
- currency: z.ZodString;
801
- }, z.core.$strict>>;
802
- accounting: z.ZodOptional<z.ZodObject<{
803
- schemaVersion: z.ZodLiteral<1>;
804
- sourceId: z.ZodString;
805
- fundingSource: z.ZodEnum<{
806
- byo_api: "byo_api";
807
- external_subscription: "external_subscription";
808
- hq_managed: "hq_managed";
809
- }>;
810
- currency: z.ZodLiteral<"USD">;
811
- chargedMicrounits: z.ZodNumber;
812
- costExact: z.ZodLiteral<true>;
813
- }, z.core.$strict>>;
814
- }, z.core.$strict>>;
815
- error: z.ZodOptional<z.ZodObject<{
816
- code: z.ZodString;
817
- classification: z.ZodEnum<{
818
- cancelled: "cancelled";
819
- conflict: "conflict";
820
- infrastructure: "infrastructure";
821
- runtime: "runtime";
822
- timeout: "timeout";
823
- unavailable: "unavailable";
824
- unknown: "unknown";
825
- unsupported: "unsupported";
826
- validation: "validation";
827
- }>;
828
- message: z.ZodString;
829
- retryable: z.ZodBoolean;
830
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
831
- }, z.core.$strict>>;
832
- }, z.core.$strict>;
445
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
446
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
447
+ state: typeof RuntimeExecutionStateSchema;
448
+ status: typeof RuntimeExecutionStatusSchema;
833
449
  }, z.core.$strict>;
834
450
  }, z.core.$strict>;
451
+ declare const ChildReference: z.ZodString;
835
452
  /** Terminal child outcome as retained by the delegation record; identifiers and bounded codes only. */
836
453
  export declare const PiDurableLeadChildOutcomeSchema: z.ZodObject<{
837
454
  state: z.ZodEnum<{
@@ -839,8 +456,8 @@ export declare const PiDurableLeadChildOutcomeSchema: z.ZodObject<{
839
456
  completed: "completed";
840
457
  failed: "failed";
841
458
  }>;
842
- resultRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>>;
843
- failureCode: z.ZodOptional<z.ZodString>;
459
+ resultRef: z.ZodOptional<typeof IdentifierSchemas.artifactId>;
460
+ failureCode: z.ZodOptional<typeof ChildReference>;
844
461
  publication: z.ZodObject<{
845
462
  status: z.ZodEnum<{
846
463
  pending: "pending";
@@ -859,10 +476,10 @@ export declare const PiDurableLeadChildOutcomeSchema: z.ZodObject<{
859
476
  * `awaitingInput` is the child's own approval/input state; it is observation, never a grant.
860
477
  */
861
478
  export declare const PiDurableLeadChildSchema: z.ZodObject<{
862
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
863
- childExecutionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
864
- childAttemptId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>>;
865
- role: z.ZodString;
479
+ delegationId: typeof IdentifierSchemas.delegationId;
480
+ childExecutionId: typeof IdentifierSchemas.executionId;
481
+ childAttemptId: z.ZodOptional<typeof IdentifierSchemas.attemptId>;
482
+ role: typeof ChildReference;
866
483
  state: z.ZodEnum<{
867
484
  awaiting_input: "awaiting_input";
868
485
  cancelled: "cancelled";
@@ -878,26 +495,7 @@ export declare const PiDurableLeadChildSchema: z.ZodObject<{
878
495
  acceptedAt: z.ZodISODateTime;
879
496
  updatedAt: z.ZodISODateTime;
880
497
  revision: z.ZodNumber;
881
- outcome: z.ZodOptional<z.ZodObject<{
882
- state: z.ZodEnum<{
883
- cancelled: "cancelled";
884
- completed: "completed";
885
- failed: "failed";
886
- }>;
887
- resultRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>>;
888
- failureCode: z.ZodOptional<z.ZodString>;
889
- publication: z.ZodObject<{
890
- status: z.ZodEnum<{
891
- pending: "pending";
892
- published: "published";
893
- }>;
894
- resolution: z.ZodOptional<z.ZodEnum<{
895
- continue_parent: "continue_parent";
896
- fail_parent: "fail_parent";
897
- manual_intervention: "manual_intervention";
898
- }>>;
899
- }, z.core.$strict>;
900
- }, z.core.$strict>>;
498
+ outcome: z.ZodOptional<typeof PiDurableLeadChildOutcomeSchema>;
901
499
  }, z.core.$strict>;
902
500
  /**
903
501
  * One page of the dispatch's children, ordered by acceptance time then delegation ID.
@@ -918,67 +516,17 @@ export declare const PiDurableLeadChildrenResponseSchema: z.ZodObject<{
918
516
  }, z.core.$strict>;
919
517
  data: z.ZodObject<{
920
518
  schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
921
- dispatchId: z.ZodString;
922
- intentId: z.ZodUUID;
923
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
924
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
519
+ dispatchId: typeof DispatchId;
520
+ intentId: typeof IntentId;
521
+ executionId: typeof IdentifierSchemas.executionId;
522
+ attemptId: typeof IdentifierSchemas.attemptId;
925
523
  runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
926
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
927
- sessionId: z.ZodString;
928
- taskId: z.ZodString;
929
- generation: z.ZodNumber;
930
- }, z.core.$strict>>>;
931
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
932
- sessionId: z.ZodString;
933
- taskId: z.ZodString;
934
- }, z.core.$strict>>>;
935
- children: z.ZodArray<z.ZodObject<{
936
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
937
- childExecutionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
938
- childAttemptId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>>;
939
- role: z.ZodString;
940
- state: z.ZodEnum<{
941
- awaiting_input: "awaiting_input";
942
- cancelled: "cancelled";
943
- completed: "completed";
944
- dispatched: "dispatched";
945
- failed: "failed";
946
- manual_intervention: "manual_intervention";
947
- requested: "requested";
948
- running: "running";
949
- }>;
950
- awaitingInput: z.ZodBoolean;
951
- stopRequested: z.ZodBoolean;
952
- acceptedAt: z.ZodISODateTime;
953
- updatedAt: z.ZodISODateTime;
954
- revision: z.ZodNumber;
955
- outcome: z.ZodOptional<z.ZodObject<{
956
- state: z.ZodEnum<{
957
- cancelled: "cancelled";
958
- completed: "completed";
959
- failed: "failed";
960
- }>;
961
- resultRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>>;
962
- failureCode: z.ZodOptional<z.ZodString>;
963
- publication: z.ZodObject<{
964
- status: z.ZodEnum<{
965
- pending: "pending";
966
- published: "published";
967
- }>;
968
- resolution: z.ZodOptional<z.ZodEnum<{
969
- continue_parent: "continue_parent";
970
- fail_parent: "fail_parent";
971
- manual_intervention: "manual_intervention";
972
- }>>;
973
- }, z.core.$strict>;
974
- }, z.core.$strict>>;
975
- }, z.core.$strict>>;
524
+ requestedTarget: z.ZodOptional<typeof PiDurableLeadRequestedTargetSchema>;
525
+ observedTarget: z.ZodOptional<typeof PiDurableLeadObservedTargetSchema>;
526
+ children: z.ZodArray<typeof PiDurableLeadChildSchema>;
976
527
  totalChildren: z.ZodNumber;
977
528
  complete: z.ZodBoolean;
978
- next: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
979
- acceptedAt: z.ZodISODateTime;
980
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
981
- }, z.core.$strict>>>;
529
+ next: z.ZodOptional<typeof PiDurableLeadChildrenCursorSchema>;
982
530
  }, z.core.$strict>;
983
531
  }, z.core.$strict>;
984
532
  /** Existing versioned authenticated envelopes; payloads contain opaque references only. */
@@ -990,753 +538,50 @@ export declare const PiDurableLeadHttpContract: Readonly<{
990
538
  route: "prepare";
991
539
  operation: "pi-durable.lead.prepare";
992
540
  scope: "execution:accept";
993
- requestSchema: z.ZodObject<{
994
- contractVersion: z.ZodObject<{
995
- major: z.ZodNumber;
996
- minor: z.ZodNumber;
997
- }, z.core.$strict>;
998
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
999
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1000
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1001
- commandId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>;
1002
- idempotencyKey: z.ZodString;
1003
- payloadHash: z.ZodString;
1004
- issuedAt: z.ZodISODateTime;
1005
- caller: z.ZodObject<{
1006
- servicePrincipalId: z.ZodString;
1007
- }, z.core.$strict>;
1008
- correlation: z.ZodObject<{
1009
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1010
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1011
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1012
- }, z.core.$strict>;
1013
- operation: z.ZodLiteral<"pi-durable.lead.prepare">;
1014
- payload: z.ZodObject<{
1015
- intentId: z.ZodUUID;
1016
- }, z.core.$strict>;
1017
- }, z.core.$strict>;
1018
- responseSchema: z.ZodObject<{
1019
- contractVersion: z.ZodObject<{
1020
- major: z.ZodNumber;
1021
- minor: z.ZodNumber;
1022
- }, z.core.$strict>;
1023
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1024
- correlation: z.ZodObject<{
1025
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1026
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1027
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1028
- }, z.core.$strict>;
1029
- data: z.ZodObject<{
1030
- schemaVersion: z.ZodLiteral<"pi-lead-preparation/v1">;
1031
- preparationRef: z.ZodString;
1032
- intentId: z.ZodUUID;
1033
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1034
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1035
- selectionRef: z.ZodString;
1036
- selectionRevision: z.ZodNumber;
1037
- funding: z.ZodObject<{
1038
- schemaVersion: z.ZodLiteral<"model-funding-display/v1">;
1039
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1040
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1041
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1042
- selectionRef: z.ZodString;
1043
- selectionRevision: z.ZodNumber;
1044
- state: z.ZodLiteral<"ready">;
1045
- provider: z.ZodString;
1046
- providerModel: z.ZodString;
1047
- accountRef: z.ZodString;
1048
- authKind: z.ZodEnum<{
1049
- api_key: "api_key";
1050
- local_runtime: "local_runtime";
1051
- provider_subscription: "provider_subscription";
1052
- }>;
1053
- fundingSource: z.ZodEnum<{
1054
- byo_api: "byo_api";
1055
- external_subscription: "external_subscription";
1056
- hq_managed: "hq_managed";
1057
- }>;
1058
- fundingOwner: z.ZodObject<{
1059
- ownerRef: z.ZodString;
1060
- kind: z.ZodEnum<{
1061
- adea_account: "adea_account";
1062
- provider_account: "provider_account";
1063
- workspace_account: "workspace_account";
1064
- }>;
1065
- displayName: z.ZodString;
1066
- revision: z.ZodNumber;
1067
- evidenceRef: z.ZodString;
1068
- }, z.core.$strict>;
1069
- authorizationRef: z.ZodString;
1070
- authorityRevision: z.ZodNumber;
1071
- expiresAt: z.ZodISODateTime;
1072
- }, z.core.$strict>;
1073
- childAllowance: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1074
- schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
1075
- executionPlanDigest: z.ZodString;
1076
- profile: z.ZodReadonly<z.ZodObject<{
1077
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
1078
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
1079
- version: z.ZodNumber;
1080
- revision: z.ZodNumber;
1081
- }, z.core.$strict>>;
1082
- state: z.ZodLiteral<"stated">;
1083
- currency: z.ZodLiteral<"USD">;
1084
- maximumMicrounits: z.ZodNumber;
1085
- maximumTokens: z.ZodNumber;
1086
- }, z.core.$strict>, z.ZodObject<{
1087
- schemaVersion: z.ZodLiteral<"pi-lead-child-allowance/v1">;
1088
- executionPlanDigest: z.ZodString;
1089
- profile: z.ZodReadonly<z.ZodObject<{
1090
- profileId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile ID">, string>>;
1091
- profileVersionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"profile-version ID">, string>>;
1092
- version: z.ZodNumber;
1093
- revision: z.ZodNumber;
1094
- }, z.core.$strict>>;
1095
- state: z.ZodLiteral<"not_stated">;
1096
- }, z.core.$strict>], "state">>;
1097
- expiresAt: z.ZodISODateTime;
1098
- replayed: z.ZodBoolean;
1099
- }, z.core.$strict>;
1100
- }, z.core.$strict>;
541
+ requestSchema: typeof PiDurableLeadPrepareRequestSchema;
542
+ responseSchema: typeof PiDurableLeadPrepareResponseSchema;
1101
543
  }>;
1102
544
  dispatch: Readonly<{
1103
545
  route: "dispatch";
1104
546
  operation: "pi-durable.lead.dispatch";
1105
547
  scope: "execution:accept";
1106
- requestSchema: z.ZodObject<{
1107
- contractVersion: z.ZodObject<{
1108
- major: z.ZodNumber;
1109
- minor: z.ZodNumber;
1110
- }, z.core.$strict>;
1111
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1112
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1113
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1114
- commandId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>;
1115
- idempotencyKey: z.ZodString;
1116
- payloadHash: z.ZodString;
1117
- issuedAt: z.ZodISODateTime;
1118
- caller: z.ZodObject<{
1119
- servicePrincipalId: z.ZodString;
1120
- }, z.core.$strict>;
1121
- correlation: z.ZodObject<{
1122
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1123
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1124
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1125
- }, z.core.$strict>;
1126
- operation: z.ZodLiteral<"pi-durable.lead.dispatch">;
1127
- payload: z.ZodObject<{
1128
- intentId: z.ZodUUID;
1129
- preparationRef: z.ZodOptional<z.ZodString>;
1130
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1131
- sessionId: z.ZodString;
1132
- taskId: z.ZodString;
1133
- generation: z.ZodNumber;
1134
- }, z.core.$strict>>>;
1135
- }, z.core.$strict>;
1136
- }, z.core.$strict>;
1137
- responseSchema: z.ZodObject<{
1138
- contractVersion: z.ZodObject<{
1139
- major: z.ZodNumber;
1140
- minor: z.ZodNumber;
1141
- }, z.core.$strict>;
1142
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1143
- correlation: z.ZodObject<{
1144
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1145
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1146
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1147
- }, z.core.$strict>;
1148
- data: z.ZodObject<{
1149
- schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
1150
- dispatchId: z.ZodString;
1151
- intentId: z.ZodUUID;
1152
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1153
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1154
- runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
1155
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1156
- sessionId: z.ZodString;
1157
- taskId: z.ZodString;
1158
- generation: z.ZodNumber;
1159
- }, z.core.$strict>>>;
1160
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1161
- sessionId: z.ZodString;
1162
- taskId: z.ZodString;
1163
- }, z.core.$strict>>>;
1164
- state: z.ZodEnum<{
1165
- awaiting_input: "awaiting_input";
1166
- cancelled: "cancelled";
1167
- cancelling: "cancelling";
1168
- completed: "completed";
1169
- failed: "failed";
1170
- running: "running";
1171
- starting: "starting";
1172
- timed_out: "timed_out";
1173
- unknown: "unknown";
1174
- }>;
1175
- replayed: z.ZodBoolean;
1176
- }, z.core.$strict>;
1177
- }, z.core.$strict>;
548
+ requestSchema: typeof PiDurableLeadDispatchRequestSchema;
549
+ responseSchema: typeof PiDurableLeadDispatchResponseSchema;
1178
550
  }>;
1179
551
  lookup: Readonly<{
1180
552
  route: "lookup";
1181
553
  operation: "pi-durable.lead.lookup";
1182
554
  scope: "execution:read";
1183
- requestSchema: z.ZodObject<{
1184
- contractVersion: z.ZodObject<{
1185
- major: z.ZodNumber;
1186
- minor: z.ZodNumber;
1187
- }, z.core.$strict>;
1188
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1189
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1190
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1191
- requestedAt: z.ZodISODateTime;
1192
- caller: z.ZodObject<{
1193
- servicePrincipalId: z.ZodString;
1194
- }, z.core.$strict>;
1195
- correlation: z.ZodObject<{
1196
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1197
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1198
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1199
- }, z.core.$strict>;
1200
- operation: z.ZodLiteral<"pi-durable.lead.lookup">;
1201
- parameters: z.ZodObject<{
1202
- intentId: z.ZodUUID;
1203
- }, z.core.$strict>;
1204
- }, z.core.$strict>;
1205
- responseSchema: z.ZodObject<{
1206
- contractVersion: z.ZodObject<{
1207
- major: z.ZodNumber;
1208
- minor: z.ZodNumber;
1209
- }, z.core.$strict>;
1210
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1211
- correlation: z.ZodObject<{
1212
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1213
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1214
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1215
- }, z.core.$strict>;
1216
- data: z.ZodObject<{
1217
- schemaVersion: z.ZodLiteral<"pi-lead-lookup/v1">;
1218
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1219
- intentId: z.ZodUUID;
1220
- receipt: z.ZodNullable<z.ZodObject<{
1221
- dispatchId: z.ZodString;
1222
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1223
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1224
- state: z.ZodEnum<{
1225
- dispatched: "dispatched";
1226
- dispatching: "dispatching";
1227
- reconciliation_required: "reconciliation_required";
1228
- }>;
1229
- runtimeSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
1230
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1231
- sessionId: z.ZodString;
1232
- taskId: z.ZodString;
1233
- generation: z.ZodNumber;
1234
- }, z.core.$strict>>>;
1235
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1236
- sessionId: z.ZodString;
1237
- taskId: z.ZodString;
1238
- }, z.core.$strict>>>;
1239
- }, z.core.$strict>>;
1240
- }, z.core.$strict>;
1241
- }, z.core.$strict>;
555
+ requestSchema: typeof PiDurableLeadLookupRequestSchema;
556
+ responseSchema: typeof PiDurableLeadLookupResponseSchema;
1242
557
  }>;
1243
558
  status: Readonly<{
1244
559
  route: "status";
1245
560
  operation: "pi-durable.lead.status";
1246
561
  scope: "execution:read";
1247
- requestSchema: z.ZodObject<{
1248
- contractVersion: z.ZodObject<{
1249
- major: z.ZodNumber;
1250
- minor: z.ZodNumber;
1251
- }, z.core.$strict>;
1252
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1253
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1254
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1255
- requestedAt: z.ZodISODateTime;
1256
- caller: z.ZodObject<{
1257
- servicePrincipalId: z.ZodString;
1258
- }, z.core.$strict>;
1259
- correlation: z.ZodObject<{
1260
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1261
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1262
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1263
- }, z.core.$strict>;
1264
- operation: z.ZodLiteral<"pi-durable.lead.status">;
1265
- parameters: z.ZodObject<{
1266
- dispatchId: z.ZodString;
1267
- }, z.core.$strict>;
1268
- }, z.core.$strict>;
1269
- responseSchema: z.ZodObject<{
1270
- contractVersion: z.ZodObject<{
1271
- major: z.ZodNumber;
1272
- minor: z.ZodNumber;
1273
- }, z.core.$strict>;
1274
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1275
- correlation: z.ZodObject<{
1276
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1277
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1278
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1279
- }, z.core.$strict>;
1280
- data: z.ZodObject<{
1281
- schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
1282
- dispatchId: z.ZodString;
1283
- intentId: z.ZodUUID;
1284
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1285
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1286
- runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
1287
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1288
- sessionId: z.ZodString;
1289
- taskId: z.ZodString;
1290
- generation: z.ZodNumber;
1291
- }, z.core.$strict>>>;
1292
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1293
- sessionId: z.ZodString;
1294
- taskId: z.ZodString;
1295
- }, z.core.$strict>>>;
1296
- state: z.ZodEnum<{
1297
- awaiting_input: "awaiting_input";
1298
- cancelled: "cancelled";
1299
- cancelling: "cancelling";
1300
- completed: "completed";
1301
- failed: "failed";
1302
- running: "running";
1303
- starting: "starting";
1304
- timed_out: "timed_out";
1305
- unknown: "unknown";
1306
- }>;
1307
- status: z.ZodObject<{
1308
- handle: z.ZodObject<{
1309
- handleId: z.ZodString;
1310
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1311
- externalSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
1312
- startedAt: z.ZodISODateTime;
1313
- }, z.core.$strict>;
1314
- state: z.ZodEnum<{
1315
- awaiting_input: "awaiting_input";
1316
- cancelled: "cancelled";
1317
- cancelling: "cancelling";
1318
- completed: "completed";
1319
- failed: "failed";
1320
- running: "running";
1321
- starting: "starting";
1322
- timed_out: "timed_out";
1323
- unknown: "unknown";
1324
- }>;
1325
- observedAt: z.ZodISODateTime;
1326
- result: z.ZodOptional<z.ZodObject<{
1327
- outcome: z.ZodLiteral<"completed">;
1328
- output: z.ZodOptional<z.ZodJSONSchema>;
1329
- usage: z.ZodObject<{
1330
- inputTokens: z.ZodNumber;
1331
- outputTokens: z.ZodNumber;
1332
- durationMs: z.ZodNumber;
1333
- cost: z.ZodOptional<z.ZodObject<{
1334
- amount: z.ZodString;
1335
- currency: z.ZodString;
1336
- }, z.core.$strict>>;
1337
- accounting: z.ZodOptional<z.ZodObject<{
1338
- schemaVersion: z.ZodLiteral<1>;
1339
- sourceId: z.ZodString;
1340
- fundingSource: z.ZodEnum<{
1341
- byo_api: "byo_api";
1342
- external_subscription: "external_subscription";
1343
- hq_managed: "hq_managed";
1344
- }>;
1345
- currency: z.ZodLiteral<"USD">;
1346
- chargedMicrounits: z.ZodNumber;
1347
- costExact: z.ZodLiteral<true>;
1348
- }, z.core.$strict>>;
1349
- }, z.core.$strict>;
1350
- artifacts: z.ZodArray<z.ZodObject<{
1351
- artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
1352
- version: z.ZodNumber;
1353
- mediaType: z.ZodString;
1354
- digest: z.ZodString;
1355
- sizeBytes: z.ZodNumber;
1356
- locator: z.ZodString;
1357
- }, z.core.$strip>>;
1358
- }, z.core.$strict>>;
1359
- terminalUsage: z.ZodOptional<z.ZodObject<{
1360
- inputTokens: z.ZodNumber;
1361
- outputTokens: z.ZodNumber;
1362
- durationMs: z.ZodNumber;
1363
- cost: z.ZodOptional<z.ZodObject<{
1364
- amount: z.ZodString;
1365
- currency: z.ZodString;
1366
- }, z.core.$strict>>;
1367
- accounting: z.ZodOptional<z.ZodObject<{
1368
- schemaVersion: z.ZodLiteral<1>;
1369
- sourceId: z.ZodString;
1370
- fundingSource: z.ZodEnum<{
1371
- byo_api: "byo_api";
1372
- external_subscription: "external_subscription";
1373
- hq_managed: "hq_managed";
1374
- }>;
1375
- currency: z.ZodLiteral<"USD">;
1376
- chargedMicrounits: z.ZodNumber;
1377
- costExact: z.ZodLiteral<true>;
1378
- }, z.core.$strict>>;
1379
- }, z.core.$strict>>;
1380
- error: z.ZodOptional<z.ZodObject<{
1381
- code: z.ZodString;
1382
- classification: z.ZodEnum<{
1383
- cancelled: "cancelled";
1384
- conflict: "conflict";
1385
- infrastructure: "infrastructure";
1386
- runtime: "runtime";
1387
- timeout: "timeout";
1388
- unavailable: "unavailable";
1389
- unknown: "unknown";
1390
- unsupported: "unsupported";
1391
- validation: "validation";
1392
- }>;
1393
- message: z.ZodString;
1394
- retryable: z.ZodBoolean;
1395
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1396
- }, z.core.$strict>>;
1397
- }, z.core.$strict>;
1398
- }, z.core.$strict>;
1399
- }, z.core.$strict>;
562
+ requestSchema: typeof PiDurableLeadStatusRequestSchema;
563
+ responseSchema: typeof PiDurableLeadStatusResponseSchema;
1400
564
  }>;
1401
565
  progress: Readonly<{
1402
566
  route: "progress";
1403
567
  operation: "pi-durable.lead.progress";
1404
568
  scope: "execution:read";
1405
- requestSchema: z.ZodObject<{
1406
- contractVersion: z.ZodObject<{
1407
- major: z.ZodNumber;
1408
- minor: z.ZodNumber;
1409
- }, z.core.$strict>;
1410
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1411
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1412
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1413
- requestedAt: z.ZodISODateTime;
1414
- caller: z.ZodObject<{
1415
- servicePrincipalId: z.ZodString;
1416
- }, z.core.$strict>;
1417
- correlation: z.ZodObject<{
1418
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1419
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1420
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1421
- }, z.core.$strict>;
1422
- operation: z.ZodLiteral<"pi-durable.lead.progress">;
1423
- parameters: z.ZodObject<{
1424
- dispatchId: z.ZodString;
1425
- afterSequence: z.ZodOptional<z.ZodNumber>;
1426
- }, z.core.$strict>;
1427
- }, z.core.$strict>;
1428
- responseSchema: z.ZodObject<{
1429
- contractVersion: z.ZodObject<{
1430
- major: z.ZodNumber;
1431
- minor: z.ZodNumber;
1432
- }, z.core.$strict>;
1433
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1434
- correlation: z.ZodObject<{
1435
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1436
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1437
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1438
- }, z.core.$strict>;
1439
- data: z.ZodObject<{
1440
- schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
1441
- dispatchId: z.ZodString;
1442
- intentId: z.ZodUUID;
1443
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1444
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1445
- runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
1446
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1447
- sessionId: z.ZodString;
1448
- taskId: z.ZodString;
1449
- generation: z.ZodNumber;
1450
- }, z.core.$strict>>>;
1451
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1452
- sessionId: z.ZodString;
1453
- taskId: z.ZodString;
1454
- }, z.core.$strict>>>;
1455
- events: z.ZodArray<z.ZodObject<{
1456
- handleId: z.ZodString;
1457
- sequence: z.ZodNumber;
1458
- occurredAt: z.ZodISODateTime;
1459
- type: z.ZodEnum<{
1460
- artifact: "artifact";
1461
- interaction: "interaction";
1462
- output: "output";
1463
- status: "status";
1464
- usage: "usage";
1465
- }>;
1466
- data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
1467
- }, z.core.$strict>>;
1468
- nextSequence: z.ZodNumber;
1469
- }, z.core.$strict>;
1470
- }, z.core.$strict>;
569
+ requestSchema: typeof PiDurableLeadProgressRequestSchema;
570
+ responseSchema: typeof PiDurableLeadProgressResponseSchema;
1471
571
  }>;
1472
572
  children: Readonly<{
1473
573
  route: "children";
1474
574
  operation: "pi-durable.lead.children";
1475
575
  scope: "execution:read";
1476
- requestSchema: z.ZodObject<{
1477
- contractVersion: z.ZodObject<{
1478
- major: z.ZodNumber;
1479
- minor: z.ZodNumber;
1480
- }, z.core.$strict>;
1481
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1482
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1483
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1484
- requestedAt: z.ZodISODateTime;
1485
- caller: z.ZodObject<{
1486
- servicePrincipalId: z.ZodString;
1487
- }, z.core.$strict>;
1488
- correlation: z.ZodObject<{
1489
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1490
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1491
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1492
- }, z.core.$strict>;
1493
- operation: z.ZodLiteral<"pi-durable.lead.children">;
1494
- parameters: z.ZodObject<{
1495
- dispatchId: z.ZodString;
1496
- after: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1497
- acceptedAt: z.ZodISODateTime;
1498
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
1499
- }, z.core.$strict>>>;
1500
- limit: z.ZodOptional<z.ZodNumber>;
1501
- }, z.core.$strict>;
1502
- }, z.core.$strict>;
1503
- responseSchema: z.ZodObject<{
1504
- contractVersion: z.ZodObject<{
1505
- major: z.ZodNumber;
1506
- minor: z.ZodNumber;
1507
- }, z.core.$strict>;
1508
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1509
- correlation: z.ZodObject<{
1510
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1511
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1512
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1513
- }, z.core.$strict>;
1514
- data: z.ZodObject<{
1515
- schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
1516
- dispatchId: z.ZodString;
1517
- intentId: z.ZodUUID;
1518
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1519
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1520
- runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
1521
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1522
- sessionId: z.ZodString;
1523
- taskId: z.ZodString;
1524
- generation: z.ZodNumber;
1525
- }, z.core.$strict>>>;
1526
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1527
- sessionId: z.ZodString;
1528
- taskId: z.ZodString;
1529
- }, z.core.$strict>>>;
1530
- children: z.ZodArray<z.ZodObject<{
1531
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
1532
- childExecutionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1533
- childAttemptId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>>;
1534
- role: z.ZodString;
1535
- state: z.ZodEnum<{
1536
- awaiting_input: "awaiting_input";
1537
- cancelled: "cancelled";
1538
- completed: "completed";
1539
- dispatched: "dispatched";
1540
- failed: "failed";
1541
- manual_intervention: "manual_intervention";
1542
- requested: "requested";
1543
- running: "running";
1544
- }>;
1545
- awaitingInput: z.ZodBoolean;
1546
- stopRequested: z.ZodBoolean;
1547
- acceptedAt: z.ZodISODateTime;
1548
- updatedAt: z.ZodISODateTime;
1549
- revision: z.ZodNumber;
1550
- outcome: z.ZodOptional<z.ZodObject<{
1551
- state: z.ZodEnum<{
1552
- cancelled: "cancelled";
1553
- completed: "completed";
1554
- failed: "failed";
1555
- }>;
1556
- resultRef: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>>;
1557
- failureCode: z.ZodOptional<z.ZodString>;
1558
- publication: z.ZodObject<{
1559
- status: z.ZodEnum<{
1560
- pending: "pending";
1561
- published: "published";
1562
- }>;
1563
- resolution: z.ZodOptional<z.ZodEnum<{
1564
- continue_parent: "continue_parent";
1565
- fail_parent: "fail_parent";
1566
- manual_intervention: "manual_intervention";
1567
- }>>;
1568
- }, z.core.$strict>;
1569
- }, z.core.$strict>>;
1570
- }, z.core.$strict>>;
1571
- totalChildren: z.ZodNumber;
1572
- complete: z.ZodBoolean;
1573
- next: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1574
- acceptedAt: z.ZodISODateTime;
1575
- delegationId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"delegation ID">, string>>;
1576
- }, z.core.$strict>>>;
1577
- }, z.core.$strict>;
1578
- }, z.core.$strict>;
576
+ requestSchema: typeof PiDurableLeadChildrenRequestSchema;
577
+ responseSchema: typeof PiDurableLeadChildrenResponseSchema;
1579
578
  }>;
1580
579
  cancel: Readonly<{
1581
580
  route: "cancel";
1582
581
  operation: "pi-durable.lead.cancel";
1583
582
  scope: "execution:cancel";
1584
- requestSchema: z.ZodObject<{
1585
- contractVersion: z.ZodObject<{
1586
- major: z.ZodNumber;
1587
- minor: z.ZodNumber;
1588
- }, z.core.$strict>;
1589
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1590
- workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"workspace ID">, string>>;
1591
- projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"project ID">, string>>>;
1592
- commandId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>;
1593
- idempotencyKey: z.ZodString;
1594
- payloadHash: z.ZodString;
1595
- issuedAt: z.ZodISODateTime;
1596
- caller: z.ZodObject<{
1597
- servicePrincipalId: z.ZodString;
1598
- }, z.core.$strict>;
1599
- correlation: z.ZodObject<{
1600
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1601
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1602
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1603
- }, z.core.$strict>;
1604
- operation: z.ZodLiteral<"pi-durable.lead.cancel">;
1605
- payload: z.ZodObject<{
1606
- dispatchId: z.ZodString;
1607
- }, z.core.$strict>;
1608
- }, z.core.$strict>;
1609
- responseSchema: z.ZodObject<{
1610
- contractVersion: z.ZodObject<{
1611
- major: z.ZodNumber;
1612
- minor: z.ZodNumber;
1613
- }, z.core.$strict>;
1614
- requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"request ID">, string>>;
1615
- correlation: z.ZodObject<{
1616
- traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"trace ID">, string>>;
1617
- causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"command ID">, string>>>;
1618
- parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"event ID">, string>>>;
1619
- }, z.core.$strict>;
1620
- data: z.ZodObject<{
1621
- schemaVersion: z.ZodLiteral<"pi-lead-dispatch/v1">;
1622
- dispatchId: z.ZodString;
1623
- intentId: z.ZodUUID;
1624
- executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"execution ID">, string>>;
1625
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1626
- runtimeSessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>;
1627
- requestedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1628
- sessionId: z.ZodString;
1629
- taskId: z.ZodString;
1630
- generation: z.ZodNumber;
1631
- }, z.core.$strict>>>;
1632
- observedTarget: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
1633
- sessionId: z.ZodString;
1634
- taskId: z.ZodString;
1635
- }, z.core.$strict>>>;
1636
- state: z.ZodEnum<{
1637
- awaiting_input: "awaiting_input";
1638
- cancelled: "cancelled";
1639
- cancelling: "cancelling";
1640
- completed: "completed";
1641
- failed: "failed";
1642
- running: "running";
1643
- starting: "starting";
1644
- timed_out: "timed_out";
1645
- unknown: "unknown";
1646
- }>;
1647
- status: z.ZodObject<{
1648
- handle: z.ZodObject<{
1649
- handleId: z.ZodString;
1650
- attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
1651
- externalSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
1652
- startedAt: z.ZodISODateTime;
1653
- }, z.core.$strict>;
1654
- state: z.ZodEnum<{
1655
- awaiting_input: "awaiting_input";
1656
- cancelled: "cancelled";
1657
- cancelling: "cancelling";
1658
- completed: "completed";
1659
- failed: "failed";
1660
- running: "running";
1661
- starting: "starting";
1662
- timed_out: "timed_out";
1663
- unknown: "unknown";
1664
- }>;
1665
- observedAt: z.ZodISODateTime;
1666
- result: z.ZodOptional<z.ZodObject<{
1667
- outcome: z.ZodLiteral<"completed">;
1668
- output: z.ZodOptional<z.ZodJSONSchema>;
1669
- usage: z.ZodObject<{
1670
- inputTokens: z.ZodNumber;
1671
- outputTokens: z.ZodNumber;
1672
- durationMs: z.ZodNumber;
1673
- cost: z.ZodOptional<z.ZodObject<{
1674
- amount: z.ZodString;
1675
- currency: z.ZodString;
1676
- }, z.core.$strict>>;
1677
- accounting: z.ZodOptional<z.ZodObject<{
1678
- schemaVersion: z.ZodLiteral<1>;
1679
- sourceId: z.ZodString;
1680
- fundingSource: z.ZodEnum<{
1681
- byo_api: "byo_api";
1682
- external_subscription: "external_subscription";
1683
- hq_managed: "hq_managed";
1684
- }>;
1685
- currency: z.ZodLiteral<"USD">;
1686
- chargedMicrounits: z.ZodNumber;
1687
- costExact: z.ZodLiteral<true>;
1688
- }, z.core.$strict>>;
1689
- }, z.core.$strict>;
1690
- artifacts: z.ZodArray<z.ZodObject<{
1691
- artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
1692
- version: z.ZodNumber;
1693
- mediaType: z.ZodString;
1694
- digest: z.ZodString;
1695
- sizeBytes: z.ZodNumber;
1696
- locator: z.ZodString;
1697
- }, z.core.$strip>>;
1698
- }, z.core.$strict>>;
1699
- terminalUsage: z.ZodOptional<z.ZodObject<{
1700
- inputTokens: z.ZodNumber;
1701
- outputTokens: z.ZodNumber;
1702
- durationMs: z.ZodNumber;
1703
- cost: z.ZodOptional<z.ZodObject<{
1704
- amount: z.ZodString;
1705
- currency: z.ZodString;
1706
- }, z.core.$strict>>;
1707
- accounting: z.ZodOptional<z.ZodObject<{
1708
- schemaVersion: z.ZodLiteral<1>;
1709
- sourceId: z.ZodString;
1710
- fundingSource: z.ZodEnum<{
1711
- byo_api: "byo_api";
1712
- external_subscription: "external_subscription";
1713
- hq_managed: "hq_managed";
1714
- }>;
1715
- currency: z.ZodLiteral<"USD">;
1716
- chargedMicrounits: z.ZodNumber;
1717
- costExact: z.ZodLiteral<true>;
1718
- }, z.core.$strict>>;
1719
- }, z.core.$strict>>;
1720
- error: z.ZodOptional<z.ZodObject<{
1721
- code: z.ZodString;
1722
- classification: z.ZodEnum<{
1723
- cancelled: "cancelled";
1724
- conflict: "conflict";
1725
- infrastructure: "infrastructure";
1726
- runtime: "runtime";
1727
- timeout: "timeout";
1728
- unavailable: "unavailable";
1729
- unknown: "unknown";
1730
- unsupported: "unsupported";
1731
- validation: "validation";
1732
- }>;
1733
- message: z.ZodString;
1734
- retryable: z.ZodBoolean;
1735
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
1736
- }, z.core.$strict>>;
1737
- }, z.core.$strict>;
1738
- }, z.core.$strict>;
1739
- }, z.core.$strict>;
583
+ requestSchema: typeof PiDurableLeadCancelRequestSchema;
584
+ responseSchema: typeof PiDurableLeadCancelResponseSchema;
1740
585
  }>;
1741
586
  }>;
1742
587
  export type PiDurableLeadPrepareRequest = z.output<typeof PiDurableLeadPrepareRequestSchema>;
@@ -1756,4 +601,4 @@ export type PiDurableLeadChildrenResponse = z.output<typeof PiDurableLeadChildre
1756
601
  export type PiDurableLeadChild = z.output<typeof PiDurableLeadChildSchema>;
1757
602
  export type PiDurableLeadCancelRequest = z.output<typeof PiDurableLeadCancelRequestSchema>;
1758
603
  export type PiDurableLeadCancelResponse = z.output<typeof PiDurableLeadCancelResponseSchema>;
1759
- //# sourceMappingURL=pi-durable-lead.d.ts.map
604
+ export {};