@adea-ai/runtime-sdk 1.17.1 → 1.18.0

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