@adea-ai/runtime-sdk 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +53 -0
- package/dist/adapter.d.ts +526 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +278 -0
- package/dist/adapter.js.map +1 -0
- package/dist/capabilities.d.ts +132 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +86 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/compatibility.d.ts +182 -0
- package/dist/compatibility.d.ts.map +1 -0
- package/dist/compatibility.js +243 -0
- package/dist/compatibility.js.map +1 -0
- package/dist/conformance.d.ts +14 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +73 -0
- package/dist/conformance.js.map +1 -0
- package/dist/discovery.d.ts +26 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +253 -0
- package/dist/discovery.js.map +1 -0
- package/dist/eligibility.d.ts +334 -0
- package/dist/eligibility.d.ts.map +1 -0
- package/dist/eligibility.js +310 -0
- package/dist/eligibility.js.map +1 -0
- package/dist/fixtures.d.ts +90 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +48 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/health.d.ts +182 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +441 -0
- package/dist/health.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/inventory.d.ts +21 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +33 -0
- package/dist/inventory.js.map +1 -0
- package/dist/mock.d.ts +24 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/mock.js +261 -0
- package/dist/mock.js.map +1 -0
- package/dist/models.d.ts +285 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +241 -0
- package/dist/models.js.map +1 -0
- package/dist/registry.d.ts +195 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +298 -0
- package/dist/registry.js.map +1 -0
- package/dist/routing.d.ts +408 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +314 -0
- package/dist/routing.js.map +1 -0
- package/dist/sessions.d.ts +251 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +411 -0
- package/dist/sessions.js.map +1 -0
- package/dist/transport.d.ts +55 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +73 -0
- package/dist/transport.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type CapabilityEvaluation, type CapabilityRequirement } from './capabilities.js';
|
|
3
|
+
export declare const RuntimeAdapterMetadataSchema: z.ZodObject<{
|
|
4
|
+
contractVersion: z.ZodObject<{
|
|
5
|
+
major: z.ZodLiteral<1>;
|
|
6
|
+
minor: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
adapterName: z.ZodString;
|
|
9
|
+
adapterVersion: z.ZodString;
|
|
10
|
+
runtimeFamily: z.ZodString;
|
|
11
|
+
driverVersion: z.ZodString;
|
|
12
|
+
harnessVersion: z.ZodString;
|
|
13
|
+
transportKind: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
"direct-local": "direct-local";
|
|
15
|
+
"remote-gateway": "remote-gateway";
|
|
16
|
+
}>>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const RuntimeAdapterInspectionSchema: z.ZodObject<{
|
|
19
|
+
metadata: z.ZodObject<{
|
|
20
|
+
contractVersion: z.ZodObject<{
|
|
21
|
+
major: z.ZodLiteral<1>;
|
|
22
|
+
minor: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
adapterName: z.ZodString;
|
|
25
|
+
adapterVersion: z.ZodString;
|
|
26
|
+
runtimeFamily: z.ZodString;
|
|
27
|
+
driverVersion: z.ZodString;
|
|
28
|
+
harnessVersion: z.ZodString;
|
|
29
|
+
transportKind: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
"direct-local": "direct-local";
|
|
31
|
+
"remote-gateway": "remote-gateway";
|
|
32
|
+
}>>;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
health: z.ZodEnum<{
|
|
35
|
+
degraded: "degraded";
|
|
36
|
+
healthy: "healthy";
|
|
37
|
+
unavailable: "unavailable";
|
|
38
|
+
}>;
|
|
39
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
40
|
+
name: z.ZodEnum<{
|
|
41
|
+
"stream.output": "stream.output";
|
|
42
|
+
"stream.events": "stream.events";
|
|
43
|
+
"tool.call": "tool.call";
|
|
44
|
+
"tool.parallel": "tool.parallel";
|
|
45
|
+
"output.structured": "output.structured";
|
|
46
|
+
"filesystem.read": "filesystem.read";
|
|
47
|
+
"filesystem.write": "filesystem.write";
|
|
48
|
+
"project.read": "project.read";
|
|
49
|
+
"project.write": "project.write";
|
|
50
|
+
"execution.cancel": "execution.cancel";
|
|
51
|
+
"interaction.user-input": "interaction.user-input";
|
|
52
|
+
"interaction.approval": "interaction.approval";
|
|
53
|
+
"session.create": "session.create";
|
|
54
|
+
"session.list": "session.list";
|
|
55
|
+
"session.resume": "session.resume";
|
|
56
|
+
"session.close": "session.close";
|
|
57
|
+
"session.history": "session.history";
|
|
58
|
+
"session.load": "session.load";
|
|
59
|
+
"model.select": "model.select";
|
|
60
|
+
"execution.child": "execution.child";
|
|
61
|
+
}>;
|
|
62
|
+
support: z.ZodEnum<{
|
|
63
|
+
supported: "supported";
|
|
64
|
+
degraded: "degraded";
|
|
65
|
+
unsupported: "unsupported";
|
|
66
|
+
}>;
|
|
67
|
+
limitations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
70
|
+
observedAt: z.ZodISODateTime;
|
|
71
|
+
capabilityEvaluation: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
eligible: z.ZodBoolean;
|
|
73
|
+
mode: z.ZodEnum<{
|
|
74
|
+
degraded: "degraded";
|
|
75
|
+
full: "full";
|
|
76
|
+
ineligible: "ineligible";
|
|
77
|
+
}>;
|
|
78
|
+
missingRequired: z.ZodArray<z.ZodEnum<{
|
|
79
|
+
"stream.output": "stream.output";
|
|
80
|
+
"stream.events": "stream.events";
|
|
81
|
+
"tool.call": "tool.call";
|
|
82
|
+
"tool.parallel": "tool.parallel";
|
|
83
|
+
"output.structured": "output.structured";
|
|
84
|
+
"filesystem.read": "filesystem.read";
|
|
85
|
+
"filesystem.write": "filesystem.write";
|
|
86
|
+
"project.read": "project.read";
|
|
87
|
+
"project.write": "project.write";
|
|
88
|
+
"execution.cancel": "execution.cancel";
|
|
89
|
+
"interaction.user-input": "interaction.user-input";
|
|
90
|
+
"interaction.approval": "interaction.approval";
|
|
91
|
+
"session.create": "session.create";
|
|
92
|
+
"session.list": "session.list";
|
|
93
|
+
"session.resume": "session.resume";
|
|
94
|
+
"session.close": "session.close";
|
|
95
|
+
"session.history": "session.history";
|
|
96
|
+
"session.load": "session.load";
|
|
97
|
+
"model.select": "model.select";
|
|
98
|
+
"execution.child": "execution.child";
|
|
99
|
+
}>>;
|
|
100
|
+
insufficientRequired: z.ZodArray<z.ZodEnum<{
|
|
101
|
+
"stream.output": "stream.output";
|
|
102
|
+
"stream.events": "stream.events";
|
|
103
|
+
"tool.call": "tool.call";
|
|
104
|
+
"tool.parallel": "tool.parallel";
|
|
105
|
+
"output.structured": "output.structured";
|
|
106
|
+
"filesystem.read": "filesystem.read";
|
|
107
|
+
"filesystem.write": "filesystem.write";
|
|
108
|
+
"project.read": "project.read";
|
|
109
|
+
"project.write": "project.write";
|
|
110
|
+
"execution.cancel": "execution.cancel";
|
|
111
|
+
"interaction.user-input": "interaction.user-input";
|
|
112
|
+
"interaction.approval": "interaction.approval";
|
|
113
|
+
"session.create": "session.create";
|
|
114
|
+
"session.list": "session.list";
|
|
115
|
+
"session.resume": "session.resume";
|
|
116
|
+
"session.close": "session.close";
|
|
117
|
+
"session.history": "session.history";
|
|
118
|
+
"session.load": "session.load";
|
|
119
|
+
"model.select": "model.select";
|
|
120
|
+
"execution.child": "execution.child";
|
|
121
|
+
}>>;
|
|
122
|
+
missingOptional: z.ZodArray<z.ZodEnum<{
|
|
123
|
+
"stream.output": "stream.output";
|
|
124
|
+
"stream.events": "stream.events";
|
|
125
|
+
"tool.call": "tool.call";
|
|
126
|
+
"tool.parallel": "tool.parallel";
|
|
127
|
+
"output.structured": "output.structured";
|
|
128
|
+
"filesystem.read": "filesystem.read";
|
|
129
|
+
"filesystem.write": "filesystem.write";
|
|
130
|
+
"project.read": "project.read";
|
|
131
|
+
"project.write": "project.write";
|
|
132
|
+
"execution.cancel": "execution.cancel";
|
|
133
|
+
"interaction.user-input": "interaction.user-input";
|
|
134
|
+
"interaction.approval": "interaction.approval";
|
|
135
|
+
"session.create": "session.create";
|
|
136
|
+
"session.list": "session.list";
|
|
137
|
+
"session.resume": "session.resume";
|
|
138
|
+
"session.close": "session.close";
|
|
139
|
+
"session.history": "session.history";
|
|
140
|
+
"session.load": "session.load";
|
|
141
|
+
"model.select": "model.select";
|
|
142
|
+
"execution.child": "execution.child";
|
|
143
|
+
}>>;
|
|
144
|
+
degradedOptional: z.ZodArray<z.ZodEnum<{
|
|
145
|
+
"stream.output": "stream.output";
|
|
146
|
+
"stream.events": "stream.events";
|
|
147
|
+
"tool.call": "tool.call";
|
|
148
|
+
"tool.parallel": "tool.parallel";
|
|
149
|
+
"output.structured": "output.structured";
|
|
150
|
+
"filesystem.read": "filesystem.read";
|
|
151
|
+
"filesystem.write": "filesystem.write";
|
|
152
|
+
"project.read": "project.read";
|
|
153
|
+
"project.write": "project.write";
|
|
154
|
+
"execution.cancel": "execution.cancel";
|
|
155
|
+
"interaction.user-input": "interaction.user-input";
|
|
156
|
+
"interaction.approval": "interaction.approval";
|
|
157
|
+
"session.create": "session.create";
|
|
158
|
+
"session.list": "session.list";
|
|
159
|
+
"session.resume": "session.resume";
|
|
160
|
+
"session.close": "session.close";
|
|
161
|
+
"session.history": "session.history";
|
|
162
|
+
"session.load": "session.load";
|
|
163
|
+
"model.select": "model.select";
|
|
164
|
+
"execution.child": "execution.child";
|
|
165
|
+
}>>;
|
|
166
|
+
}, z.core.$strict>>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
export declare const RuntimeExecutionHandleSchema: z.ZodObject<{
|
|
169
|
+
handleId: z.ZodString;
|
|
170
|
+
attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"attempt ID">, string>>;
|
|
171
|
+
externalSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
|
|
172
|
+
startedAt: z.ZodISODateTime;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
export declare const RuntimeUsageSchema: z.ZodObject<{
|
|
175
|
+
inputTokens: z.ZodNumber;
|
|
176
|
+
outputTokens: z.ZodNumber;
|
|
177
|
+
durationMs: z.ZodNumber;
|
|
178
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
amount: z.ZodString;
|
|
180
|
+
currency: z.ZodString;
|
|
181
|
+
}, z.core.$strict>>;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
export declare const RuntimeArtifactReferenceSchema: z.ZodObject<{
|
|
184
|
+
artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
|
|
185
|
+
version: z.ZodNumber;
|
|
186
|
+
mediaType: z.ZodString;
|
|
187
|
+
digest: z.ZodString;
|
|
188
|
+
sizeBytes: z.ZodNumber;
|
|
189
|
+
locator: z.ZodString;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
export declare const RuntimeExecutionResultSchema: z.ZodObject<{
|
|
192
|
+
outcome: z.ZodLiteral<"completed">;
|
|
193
|
+
output: z.ZodOptional<z.ZodJSONSchema>;
|
|
194
|
+
usage: z.ZodObject<{
|
|
195
|
+
inputTokens: z.ZodNumber;
|
|
196
|
+
outputTokens: z.ZodNumber;
|
|
197
|
+
durationMs: z.ZodNumber;
|
|
198
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
199
|
+
amount: z.ZodString;
|
|
200
|
+
currency: z.ZodString;
|
|
201
|
+
}, z.core.$strict>>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
204
|
+
artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
|
|
205
|
+
version: z.ZodNumber;
|
|
206
|
+
mediaType: z.ZodString;
|
|
207
|
+
digest: z.ZodString;
|
|
208
|
+
sizeBytes: z.ZodNumber;
|
|
209
|
+
locator: z.ZodString;
|
|
210
|
+
}, z.core.$strip>>;
|
|
211
|
+
}, z.core.$strict>;
|
|
212
|
+
export declare const RuntimeErrorSchema: z.ZodObject<{
|
|
213
|
+
code: z.ZodString;
|
|
214
|
+
classification: z.ZodEnum<{
|
|
215
|
+
unsupported: "unsupported";
|
|
216
|
+
unknown: "unknown";
|
|
217
|
+
unavailable: "unavailable";
|
|
218
|
+
validation: "validation";
|
|
219
|
+
conflict: "conflict";
|
|
220
|
+
timeout: "timeout";
|
|
221
|
+
cancelled: "cancelled";
|
|
222
|
+
runtime: "runtime";
|
|
223
|
+
infrastructure: "infrastructure";
|
|
224
|
+
}>;
|
|
225
|
+
message: z.ZodString;
|
|
226
|
+
retryable: z.ZodBoolean;
|
|
227
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
228
|
+
}, z.core.$strict>;
|
|
229
|
+
export declare const RuntimeExecutionStateSchema: z.ZodEnum<{
|
|
230
|
+
unknown: "unknown";
|
|
231
|
+
completed: "completed";
|
|
232
|
+
cancelled: "cancelled";
|
|
233
|
+
starting: "starting";
|
|
234
|
+
running: "running";
|
|
235
|
+
awaiting_input: "awaiting_input";
|
|
236
|
+
cancelling: "cancelling";
|
|
237
|
+
failed: "failed";
|
|
238
|
+
timed_out: "timed_out";
|
|
239
|
+
}>;
|
|
240
|
+
export declare const RuntimeExecutionStatusSchema: z.ZodObject<{
|
|
241
|
+
handle: z.ZodObject<{
|
|
242
|
+
handleId: z.ZodString;
|
|
243
|
+
attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"attempt ID">, string>>;
|
|
244
|
+
externalSessionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>>;
|
|
245
|
+
startedAt: z.ZodISODateTime;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
state: z.ZodEnum<{
|
|
248
|
+
unknown: "unknown";
|
|
249
|
+
completed: "completed";
|
|
250
|
+
cancelled: "cancelled";
|
|
251
|
+
starting: "starting";
|
|
252
|
+
running: "running";
|
|
253
|
+
awaiting_input: "awaiting_input";
|
|
254
|
+
cancelling: "cancelling";
|
|
255
|
+
failed: "failed";
|
|
256
|
+
timed_out: "timed_out";
|
|
257
|
+
}>;
|
|
258
|
+
observedAt: z.ZodISODateTime;
|
|
259
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
outcome: z.ZodLiteral<"completed">;
|
|
261
|
+
output: z.ZodOptional<z.ZodJSONSchema>;
|
|
262
|
+
usage: z.ZodObject<{
|
|
263
|
+
inputTokens: z.ZodNumber;
|
|
264
|
+
outputTokens: z.ZodNumber;
|
|
265
|
+
durationMs: z.ZodNumber;
|
|
266
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
267
|
+
amount: z.ZodString;
|
|
268
|
+
currency: z.ZodString;
|
|
269
|
+
}, z.core.$strict>>;
|
|
270
|
+
}, z.core.$strict>;
|
|
271
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
272
|
+
artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"Artifact reference ID">, string>>;
|
|
273
|
+
version: z.ZodNumber;
|
|
274
|
+
mediaType: z.ZodString;
|
|
275
|
+
digest: z.ZodString;
|
|
276
|
+
sizeBytes: z.ZodNumber;
|
|
277
|
+
locator: z.ZodString;
|
|
278
|
+
}, z.core.$strip>>;
|
|
279
|
+
}, z.core.$strict>>;
|
|
280
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
code: z.ZodString;
|
|
282
|
+
classification: z.ZodEnum<{
|
|
283
|
+
unsupported: "unsupported";
|
|
284
|
+
unknown: "unknown";
|
|
285
|
+
unavailable: "unavailable";
|
|
286
|
+
validation: "validation";
|
|
287
|
+
conflict: "conflict";
|
|
288
|
+
timeout: "timeout";
|
|
289
|
+
cancelled: "cancelled";
|
|
290
|
+
runtime: "runtime";
|
|
291
|
+
infrastructure: "infrastructure";
|
|
292
|
+
}>;
|
|
293
|
+
message: z.ZodString;
|
|
294
|
+
retryable: z.ZodBoolean;
|
|
295
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
296
|
+
}, z.core.$strict>>;
|
|
297
|
+
}, z.core.$strict>;
|
|
298
|
+
export declare const RuntimeExecutionProgressSchema: z.ZodObject<{
|
|
299
|
+
handleId: z.ZodString;
|
|
300
|
+
sequence: z.ZodNumber;
|
|
301
|
+
occurredAt: z.ZodISODateTime;
|
|
302
|
+
type: z.ZodEnum<{
|
|
303
|
+
output: "output";
|
|
304
|
+
usage: "usage";
|
|
305
|
+
status: "status";
|
|
306
|
+
interaction: "interaction";
|
|
307
|
+
artifact: "artifact";
|
|
308
|
+
}>;
|
|
309
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
310
|
+
}, z.core.$strict>;
|
|
311
|
+
export declare const RuntimeExecutionPlanSnapshotSchema: z.ZodObject<{
|
|
312
|
+
schemaVersion: z.ZodNumber;
|
|
313
|
+
executionPlanId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"ExecutionPlan ID">, string>>;
|
|
314
|
+
contentDigest: z.ZodString;
|
|
315
|
+
runtimeRequirements: z.ZodArray<z.ZodObject<{
|
|
316
|
+
capability: z.ZodEnum<{
|
|
317
|
+
"stream.output": "stream.output";
|
|
318
|
+
"stream.events": "stream.events";
|
|
319
|
+
"tool.call": "tool.call";
|
|
320
|
+
"tool.parallel": "tool.parallel";
|
|
321
|
+
"output.structured": "output.structured";
|
|
322
|
+
"filesystem.read": "filesystem.read";
|
|
323
|
+
"filesystem.write": "filesystem.write";
|
|
324
|
+
"project.read": "project.read";
|
|
325
|
+
"project.write": "project.write";
|
|
326
|
+
"execution.cancel": "execution.cancel";
|
|
327
|
+
"interaction.user-input": "interaction.user-input";
|
|
328
|
+
"interaction.approval": "interaction.approval";
|
|
329
|
+
"session.create": "session.create";
|
|
330
|
+
"session.list": "session.list";
|
|
331
|
+
"session.resume": "session.resume";
|
|
332
|
+
"session.close": "session.close";
|
|
333
|
+
"session.history": "session.history";
|
|
334
|
+
"session.load": "session.load";
|
|
335
|
+
"model.select": "model.select";
|
|
336
|
+
"execution.child": "execution.child";
|
|
337
|
+
}>;
|
|
338
|
+
necessity: z.ZodEnum<{
|
|
339
|
+
optional: "optional";
|
|
340
|
+
required: "required";
|
|
341
|
+
}>;
|
|
342
|
+
minimumSupport: z.ZodDefault<z.ZodEnum<{
|
|
343
|
+
supported: "supported";
|
|
344
|
+
degraded: "degraded";
|
|
345
|
+
}>>;
|
|
346
|
+
}, z.core.$strip>>;
|
|
347
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
348
|
+
export declare const RuntimeStartRequestSchema: z.ZodObject<{
|
|
349
|
+
attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"attempt ID">, string>>;
|
|
350
|
+
idempotencyKey: z.ZodString;
|
|
351
|
+
executionPlan: z.ZodObject<{
|
|
352
|
+
schemaVersion: z.ZodNumber;
|
|
353
|
+
executionPlanId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"ExecutionPlan ID">, string>>;
|
|
354
|
+
contentDigest: z.ZodString;
|
|
355
|
+
runtimeRequirements: z.ZodArray<z.ZodObject<{
|
|
356
|
+
capability: z.ZodEnum<{
|
|
357
|
+
"stream.output": "stream.output";
|
|
358
|
+
"stream.events": "stream.events";
|
|
359
|
+
"tool.call": "tool.call";
|
|
360
|
+
"tool.parallel": "tool.parallel";
|
|
361
|
+
"output.structured": "output.structured";
|
|
362
|
+
"filesystem.read": "filesystem.read";
|
|
363
|
+
"filesystem.write": "filesystem.write";
|
|
364
|
+
"project.read": "project.read";
|
|
365
|
+
"project.write": "project.write";
|
|
366
|
+
"execution.cancel": "execution.cancel";
|
|
367
|
+
"interaction.user-input": "interaction.user-input";
|
|
368
|
+
"interaction.approval": "interaction.approval";
|
|
369
|
+
"session.create": "session.create";
|
|
370
|
+
"session.list": "session.list";
|
|
371
|
+
"session.resume": "session.resume";
|
|
372
|
+
"session.close": "session.close";
|
|
373
|
+
"session.history": "session.history";
|
|
374
|
+
"session.load": "session.load";
|
|
375
|
+
"model.select": "model.select";
|
|
376
|
+
"execution.child": "execution.child";
|
|
377
|
+
}>;
|
|
378
|
+
necessity: z.ZodEnum<{
|
|
379
|
+
optional: "optional";
|
|
380
|
+
required: "required";
|
|
381
|
+
}>;
|
|
382
|
+
minimumSupport: z.ZodDefault<z.ZodEnum<{
|
|
383
|
+
supported: "supported";
|
|
384
|
+
degraded: "degraded";
|
|
385
|
+
}>>;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
388
|
+
}, z.core.$strict>;
|
|
389
|
+
export declare const RuntimeInputRequestSchema: z.ZodObject<{
|
|
390
|
+
interactionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"interaction ID">, string>>;
|
|
391
|
+
idempotencyKey: z.ZodString;
|
|
392
|
+
text: z.ZodString;
|
|
393
|
+
}, z.core.$strict>;
|
|
394
|
+
export declare const RuntimeApprovalRequestSchema: z.ZodObject<{
|
|
395
|
+
interactionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"interaction ID">, string>>;
|
|
396
|
+
idempotencyKey: z.ZodString;
|
|
397
|
+
decision: z.ZodEnum<{
|
|
398
|
+
approve: "approve";
|
|
399
|
+
deny: "deny";
|
|
400
|
+
}>;
|
|
401
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
402
|
+
}, z.core.$strict>;
|
|
403
|
+
export declare const RuntimeCancelRequestSchema: z.ZodObject<{
|
|
404
|
+
idempotencyKey: z.ZodString;
|
|
405
|
+
requestedAt: z.ZodISODateTime;
|
|
406
|
+
}, z.core.$strict>;
|
|
407
|
+
export declare const RuntimeSessionOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
|
+
operation: z.ZodLiteral<"create">;
|
|
409
|
+
idempotencyKey: z.ZodString;
|
|
410
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
411
|
+
operation: z.ZodLiteral<"list">;
|
|
412
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
413
|
+
operation: z.ZodEnum<{
|
|
414
|
+
resume: "resume";
|
|
415
|
+
load: "load";
|
|
416
|
+
close: "close";
|
|
417
|
+
}>;
|
|
418
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>;
|
|
419
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
420
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
421
|
+
operation: z.ZodLiteral<"history">;
|
|
422
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>;
|
|
423
|
+
afterSequence: z.ZodOptional<z.ZodNumber>;
|
|
424
|
+
}, z.core.$strict>], "operation">;
|
|
425
|
+
export declare const RuntimeSessionResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
426
|
+
operation: z.ZodEnum<{
|
|
427
|
+
create: "create";
|
|
428
|
+
resume: "resume";
|
|
429
|
+
load: "load";
|
|
430
|
+
close: "close";
|
|
431
|
+
}>;
|
|
432
|
+
session: z.ZodObject<{
|
|
433
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>;
|
|
434
|
+
state: z.ZodEnum<{
|
|
435
|
+
active: "active";
|
|
436
|
+
closed: "closed";
|
|
437
|
+
}>;
|
|
438
|
+
observedAt: z.ZodISODateTime;
|
|
439
|
+
}, z.core.$strict>;
|
|
440
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
441
|
+
operation: z.ZodLiteral<"list">;
|
|
442
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
443
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>;
|
|
444
|
+
state: z.ZodEnum<{
|
|
445
|
+
active: "active";
|
|
446
|
+
closed: "closed";
|
|
447
|
+
}>;
|
|
448
|
+
observedAt: z.ZodISODateTime;
|
|
449
|
+
}, z.core.$strict>>;
|
|
450
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
451
|
+
operation: z.ZodLiteral<"history">;
|
|
452
|
+
session: z.ZodObject<{
|
|
453
|
+
sessionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"external-session ID">, string>>;
|
|
454
|
+
state: z.ZodEnum<{
|
|
455
|
+
active: "active";
|
|
456
|
+
closed: "closed";
|
|
457
|
+
}>;
|
|
458
|
+
observedAt: z.ZodISODateTime;
|
|
459
|
+
}, z.core.$strict>;
|
|
460
|
+
completeness: z.ZodEnum<{
|
|
461
|
+
unavailable: "unavailable";
|
|
462
|
+
complete: "complete";
|
|
463
|
+
partial: "partial";
|
|
464
|
+
}>;
|
|
465
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
466
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
467
|
+
sequence: z.ZodNumber;
|
|
468
|
+
occurredAt: z.ZodISODateTime;
|
|
469
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
470
|
+
}, z.core.$strict>>;
|
|
471
|
+
}, z.core.$strict>], "operation">;
|
|
472
|
+
export type RuntimeAdapterInspection = z.output<typeof RuntimeAdapterInspectionSchema>;
|
|
473
|
+
export type RuntimeExecutionHandle = z.output<typeof RuntimeExecutionHandleSchema>;
|
|
474
|
+
export type RuntimeExecutionProgress = z.output<typeof RuntimeExecutionProgressSchema>;
|
|
475
|
+
export type RuntimeExecutionStatus = z.output<typeof RuntimeExecutionStatusSchema>;
|
|
476
|
+
export type RuntimeExecutionResult = z.output<typeof RuntimeExecutionResultSchema>;
|
|
477
|
+
export type RuntimeExecutionPlanSnapshot = Readonly<{
|
|
478
|
+
schemaVersion: number;
|
|
479
|
+
executionPlanId: string;
|
|
480
|
+
contentDigest: string;
|
|
481
|
+
runtimeRequirements: readonly Readonly<CapabilityRequirement>[];
|
|
482
|
+
} & Record<string, unknown>>;
|
|
483
|
+
export type RuntimeStartRequest = Readonly<Omit<z.input<typeof RuntimeStartRequestSchema>, 'executionPlan'> & {
|
|
484
|
+
executionPlan: RuntimeExecutionPlanSnapshot;
|
|
485
|
+
}>;
|
|
486
|
+
export type RuntimeInputRequest = z.input<typeof RuntimeInputRequestSchema>;
|
|
487
|
+
export type RuntimeApprovalRequest = z.input<typeof RuntimeApprovalRequestSchema>;
|
|
488
|
+
export type RuntimeCancelRequest = z.input<typeof RuntimeCancelRequestSchema>;
|
|
489
|
+
export type RuntimeSessionOperation = z.input<typeof RuntimeSessionOperationSchema>;
|
|
490
|
+
export type RuntimeSessionResult = z.output<typeof RuntimeSessionResultSchema>;
|
|
491
|
+
export type RuntimeError = z.output<typeof RuntimeErrorSchema>;
|
|
492
|
+
export declare const RuntimeAdapterContract: Readonly<{
|
|
493
|
+
version: Readonly<{
|
|
494
|
+
major: 1;
|
|
495
|
+
minor: 0;
|
|
496
|
+
}>;
|
|
497
|
+
lifecycle: readonly string[];
|
|
498
|
+
idempotentOperations: readonly string[];
|
|
499
|
+
terminalStates: readonly string[];
|
|
500
|
+
}>;
|
|
501
|
+
export interface RuntimeProgressOptions {
|
|
502
|
+
readonly afterSequence?: number;
|
|
503
|
+
readonly signal?: AbortSignal;
|
|
504
|
+
}
|
|
505
|
+
export interface RuntimeAdapter {
|
|
506
|
+
inspect(requirements?: readonly CapabilityRequirement[]): Promise<RuntimeAdapterInspection>;
|
|
507
|
+
start(request: RuntimeStartRequest): Promise<RuntimeExecutionHandle>;
|
|
508
|
+
progress(handle: RuntimeExecutionHandle, options?: RuntimeProgressOptions): AsyncIterable<RuntimeExecutionProgress>;
|
|
509
|
+
submitInput(handle: RuntimeExecutionHandle, request: RuntimeInputRequest): Promise<RuntimeExecutionStatus>;
|
|
510
|
+
submitApproval(handle: RuntimeExecutionHandle, request: RuntimeApprovalRequest): Promise<RuntimeExecutionStatus>;
|
|
511
|
+
cancel(handle: RuntimeExecutionHandle, request: RuntimeCancelRequest): Promise<RuntimeExecutionStatus>;
|
|
512
|
+
status(handle: RuntimeExecutionHandle): Promise<RuntimeExecutionStatus>;
|
|
513
|
+
reconcile(handle: RuntimeExecutionHandle): Promise<RuntimeExecutionStatus>;
|
|
514
|
+
session(operation: RuntimeSessionOperation): Promise<RuntimeSessionResult>;
|
|
515
|
+
cleanup(handle: RuntimeExecutionHandle): Promise<void>;
|
|
516
|
+
}
|
|
517
|
+
export declare class RuntimeAdapterError extends Error {
|
|
518
|
+
readonly code: string;
|
|
519
|
+
readonly classification: RuntimeError['classification'];
|
|
520
|
+
readonly retryable: boolean;
|
|
521
|
+
readonly details?: Readonly<Record<string, z.util.JSONType>>;
|
|
522
|
+
constructor(errorInput: RuntimeError);
|
|
523
|
+
toJSON(): RuntimeError;
|
|
524
|
+
}
|
|
525
|
+
export declare function inspectRuntimeCapabilities(capabilities: RuntimeAdapterInspection['capabilities'], requirements: readonly CapabilityRequirement[]): CapabilityEvaluation;
|
|
526
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAA;AAQ1B,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;kBAkB9B,CAAA;AAaX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAShC,CAAA;AAEX,eAAO,MAAM,4BAA4B;;;;;kBAO9B,CAAA;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;kBAapB,CAAA;AAEX,eAAO,MAAM,8BAA8B;;;;;;;iBAEzC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;kBAO9B,CAAA;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;kBAsBpB,CAAA;AAEX,eAAO,MAAM,2BAA2B;;;;;;;;;;EAUtC,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;k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