@adea-ai/runtime-gateway-protocol 1.2.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 +43 -0
- package/dist/authentication.d.ts +37 -0
- package/dist/authentication.d.ts.map +1 -0
- package/dist/authentication.js +66 -0
- package/dist/authentication.js.map +1 -0
- package/dist/emulator.d.ts +25 -0
- package/dist/emulator.d.ts.map +1 -0
- package/dist/emulator.js +138 -0
- package/dist/emulator.js.map +1 -0
- package/dist/fixtures.d.ts +144 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +49 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/protocol.d.ts +648 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +462 -0
- package/dist/protocol.js.map +1 -0
- package/fixtures/golden/envelopes.json +153 -0
- package/fixtures/index.mjs +4 -0
- package/fixtures/malformed/envelopes.json +70 -0
- package/package.json +57 -0
- package/schema/gateway-envelope.v1.json +893 -0
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GatewayProtocolVersionSchema: z.ZodObject<{
|
|
3
|
+
major: z.ZodNumber;
|
|
4
|
+
minor: z.ZodNumber;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export type GatewayProtocolVersion = z.output<typeof GatewayProtocolVersionSchema>;
|
|
7
|
+
export declare const GatewayProtocolManifest: Readonly<{
|
|
8
|
+
name: "control-plane-runtime-gateway";
|
|
9
|
+
current: {
|
|
10
|
+
major: number;
|
|
11
|
+
minor: number;
|
|
12
|
+
};
|
|
13
|
+
supported: {
|
|
14
|
+
major: number;
|
|
15
|
+
minor: number;
|
|
16
|
+
}[];
|
|
17
|
+
}>;
|
|
18
|
+
export declare const GatewayProtocolDeprecationSchema: z.ZodObject<{
|
|
19
|
+
version: z.ZodObject<{
|
|
20
|
+
major: z.ZodNumber;
|
|
21
|
+
minor: z.ZodNumber;
|
|
22
|
+
}, z.core.$strict>;
|
|
23
|
+
deprecatedAt: z.ZodISODateTime;
|
|
24
|
+
sunsetAt: z.ZodOptional<z.ZodISODateTime>;
|
|
25
|
+
replacement: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
major: z.ZodNumber;
|
|
27
|
+
minor: z.ZodNumber;
|
|
28
|
+
}, z.core.$strict>>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
export declare function negotiateGatewayProtocolVersion(localValues: readonly GatewayProtocolVersion[], remoteValues: readonly GatewayProtocolVersion[]): GatewayProtocolVersion | undefined;
|
|
31
|
+
export declare const GatewayArtifactReferenceSchema: z.ZodObject<{
|
|
32
|
+
artifactId: z.ZodString;
|
|
33
|
+
digest: z.ZodString;
|
|
34
|
+
mediaType: z.ZodString;
|
|
35
|
+
sizeBytes: z.ZodNumber;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
export declare const GatewayRetainedCommandOutcomeSchema: z.ZodObject<{
|
|
38
|
+
commandId: z.ZodString;
|
|
39
|
+
payloadHash: z.ZodString;
|
|
40
|
+
status: z.ZodEnum<{
|
|
41
|
+
unknown: "unknown";
|
|
42
|
+
accepted: "accepted";
|
|
43
|
+
running: "running";
|
|
44
|
+
cancelling: "cancelling";
|
|
45
|
+
succeeded: "succeeded";
|
|
46
|
+
failed: "failed";
|
|
47
|
+
cancelled: "cancelled";
|
|
48
|
+
}>;
|
|
49
|
+
observedAt: z.ZodISODateTime;
|
|
50
|
+
result: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
51
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
artifact: z.ZodObject<{
|
|
54
|
+
artifactId: z.ZodString;
|
|
55
|
+
digest: z.ZodString;
|
|
56
|
+
mediaType: z.ZodString;
|
|
57
|
+
sizeBytes: z.ZodNumber;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
}, z.core.$strict>]>>;
|
|
60
|
+
}, z.core.$strict>;
|
|
61
|
+
export declare const GatewayHelloEnvelopeSchema: z.ZodObject<{
|
|
62
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
63
|
+
protocolVersion: z.ZodObject<{
|
|
64
|
+
major: z.ZodNumber;
|
|
65
|
+
minor: z.ZodNumber;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
sequence: z.ZodNumber;
|
|
68
|
+
nodeId: z.ZodString;
|
|
69
|
+
workspaceId: z.ZodString;
|
|
70
|
+
traceId: z.ZodString;
|
|
71
|
+
sentAt: z.ZodISODateTime;
|
|
72
|
+
channelGeneration: z.ZodNumber;
|
|
73
|
+
type: z.ZodLiteral<"hello">;
|
|
74
|
+
supportedVersions: z.ZodArray<z.ZodObject<{
|
|
75
|
+
major: z.ZodNumber;
|
|
76
|
+
minor: z.ZodNumber;
|
|
77
|
+
}, z.core.$strict>>;
|
|
78
|
+
lastAcknowledgedSequence: z.ZodNumber;
|
|
79
|
+
retainedCommandOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
80
|
+
commandId: z.ZodString;
|
|
81
|
+
payloadHash: z.ZodString;
|
|
82
|
+
status: z.ZodEnum<{
|
|
83
|
+
unknown: "unknown";
|
|
84
|
+
accepted: "accepted";
|
|
85
|
+
running: "running";
|
|
86
|
+
cancelling: "cancelling";
|
|
87
|
+
succeeded: "succeeded";
|
|
88
|
+
failed: "failed";
|
|
89
|
+
cancelled: "cancelled";
|
|
90
|
+
}>;
|
|
91
|
+
observedAt: z.ZodISODateTime;
|
|
92
|
+
result: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
93
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
94
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
95
|
+
artifact: z.ZodObject<{
|
|
96
|
+
artifactId: z.ZodString;
|
|
97
|
+
digest: z.ZodString;
|
|
98
|
+
mediaType: z.ZodString;
|
|
99
|
+
sizeBytes: z.ZodNumber;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
}, z.core.$strict>]>>;
|
|
102
|
+
}, z.core.$strict>>>;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
export declare const GatewayCommandEnvelopeSchema: z.ZodObject<{
|
|
105
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
106
|
+
protocolVersion: z.ZodObject<{
|
|
107
|
+
major: z.ZodNumber;
|
|
108
|
+
minor: z.ZodNumber;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
sequence: z.ZodNumber;
|
|
111
|
+
nodeId: z.ZodString;
|
|
112
|
+
workspaceId: z.ZodString;
|
|
113
|
+
traceId: z.ZodString;
|
|
114
|
+
sentAt: z.ZodISODateTime;
|
|
115
|
+
channelGeneration: z.ZodNumber;
|
|
116
|
+
type: z.ZodLiteral<"command">;
|
|
117
|
+
commandId: z.ZodString;
|
|
118
|
+
idempotencyKey: z.ZodString;
|
|
119
|
+
payloadHash: z.ZodString;
|
|
120
|
+
issuedAt: z.ZodISODateTime;
|
|
121
|
+
expiresAt: z.ZodISODateTime;
|
|
122
|
+
family: z.ZodEnum<{
|
|
123
|
+
runtime: "runtime";
|
|
124
|
+
context_provider: "context_provider";
|
|
125
|
+
}>;
|
|
126
|
+
operation: z.ZodEnum<{
|
|
127
|
+
"runtime.execute": "runtime.execute";
|
|
128
|
+
"runtime.cancel": "runtime.cancel";
|
|
129
|
+
"runtime.input": "runtime.input";
|
|
130
|
+
"runtime.approval": "runtime.approval";
|
|
131
|
+
"runtime.status": "runtime.status";
|
|
132
|
+
"runtime.session": "runtime.session";
|
|
133
|
+
"context.status": "context.status";
|
|
134
|
+
"context.read": "context.read";
|
|
135
|
+
"context.write": "context.write";
|
|
136
|
+
}>;
|
|
137
|
+
driver: z.ZodObject<{
|
|
138
|
+
family: z.ZodString;
|
|
139
|
+
version: z.ZodString;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
runtimeConnectionId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
143
|
+
attemptId: z.ZodOptional<z.ZodString>;
|
|
144
|
+
providerRef: z.ZodOptional<z.ZodString>;
|
|
145
|
+
authorizationRef: z.ZodOptional<z.ZodString>;
|
|
146
|
+
requiredCapabilities: z.ZodArray<z.ZodString>;
|
|
147
|
+
payload: z.ZodUnion<readonly [z.ZodObject<{
|
|
148
|
+
version: z.ZodNumber;
|
|
149
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
150
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
151
|
+
version: z.ZodNumber;
|
|
152
|
+
artifact: z.ZodObject<{
|
|
153
|
+
artifactId: z.ZodString;
|
|
154
|
+
digest: z.ZodString;
|
|
155
|
+
mediaType: z.ZodString;
|
|
156
|
+
sizeBytes: z.ZodNumber;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
}, z.core.$strict>]>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
export declare const GatewayAcknowledgementEnvelopeSchema: z.ZodObject<{
|
|
161
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
162
|
+
protocolVersion: z.ZodObject<{
|
|
163
|
+
major: z.ZodNumber;
|
|
164
|
+
minor: z.ZodNumber;
|
|
165
|
+
}, z.core.$strict>;
|
|
166
|
+
sequence: z.ZodNumber;
|
|
167
|
+
nodeId: z.ZodString;
|
|
168
|
+
workspaceId: z.ZodString;
|
|
169
|
+
traceId: z.ZodString;
|
|
170
|
+
sentAt: z.ZodISODateTime;
|
|
171
|
+
channelGeneration: z.ZodNumber;
|
|
172
|
+
type: z.ZodLiteral<"ack">;
|
|
173
|
+
commandId: z.ZodString;
|
|
174
|
+
payloadHash: z.ZodString;
|
|
175
|
+
disposition: z.ZodEnum<{
|
|
176
|
+
accepted: "accepted";
|
|
177
|
+
replayed: "replayed";
|
|
178
|
+
rejected: "rejected";
|
|
179
|
+
expired: "expired";
|
|
180
|
+
}>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
export declare const GatewayProgressEnvelopeSchema: z.ZodObject<{
|
|
183
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
184
|
+
protocolVersion: z.ZodObject<{
|
|
185
|
+
major: z.ZodNumber;
|
|
186
|
+
minor: z.ZodNumber;
|
|
187
|
+
}, z.core.$strict>;
|
|
188
|
+
sequence: z.ZodNumber;
|
|
189
|
+
nodeId: z.ZodString;
|
|
190
|
+
workspaceId: z.ZodString;
|
|
191
|
+
traceId: z.ZodString;
|
|
192
|
+
sentAt: z.ZodISODateTime;
|
|
193
|
+
channelGeneration: z.ZodNumber;
|
|
194
|
+
type: z.ZodLiteral<"progress">;
|
|
195
|
+
commandId: z.ZodString;
|
|
196
|
+
payloadHash: z.ZodString;
|
|
197
|
+
eventSequence: z.ZodNumber;
|
|
198
|
+
event: z.ZodObject<{
|
|
199
|
+
kind: z.ZodString;
|
|
200
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
201
|
+
}, z.core.$strict>;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
export declare const GatewayResultEnvelopeSchema: z.ZodObject<{
|
|
204
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
205
|
+
protocolVersion: z.ZodObject<{
|
|
206
|
+
major: z.ZodNumber;
|
|
207
|
+
minor: z.ZodNumber;
|
|
208
|
+
}, z.core.$strict>;
|
|
209
|
+
sequence: z.ZodNumber;
|
|
210
|
+
nodeId: z.ZodString;
|
|
211
|
+
workspaceId: z.ZodString;
|
|
212
|
+
traceId: z.ZodString;
|
|
213
|
+
sentAt: z.ZodISODateTime;
|
|
214
|
+
channelGeneration: z.ZodNumber;
|
|
215
|
+
type: z.ZodLiteral<"result">;
|
|
216
|
+
commandId: z.ZodString;
|
|
217
|
+
payloadHash: z.ZodString;
|
|
218
|
+
status: z.ZodEnum<{
|
|
219
|
+
succeeded: "succeeded";
|
|
220
|
+
failed: "failed";
|
|
221
|
+
cancelled: "cancelled";
|
|
222
|
+
}>;
|
|
223
|
+
completedAt: z.ZodISODateTime;
|
|
224
|
+
result: z.ZodUnion<readonly [z.ZodObject<{
|
|
225
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
226
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
227
|
+
artifact: z.ZodObject<{
|
|
228
|
+
artifactId: z.ZodString;
|
|
229
|
+
digest: z.ZodString;
|
|
230
|
+
mediaType: z.ZodString;
|
|
231
|
+
sizeBytes: z.ZodNumber;
|
|
232
|
+
}, z.core.$strict>;
|
|
233
|
+
}, z.core.$strict>]>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
export declare const GatewayCancellationEnvelopeSchema: z.ZodObject<{
|
|
236
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
237
|
+
protocolVersion: z.ZodObject<{
|
|
238
|
+
major: z.ZodNumber;
|
|
239
|
+
minor: z.ZodNumber;
|
|
240
|
+
}, z.core.$strict>;
|
|
241
|
+
sequence: z.ZodNumber;
|
|
242
|
+
nodeId: z.ZodString;
|
|
243
|
+
workspaceId: z.ZodString;
|
|
244
|
+
traceId: z.ZodString;
|
|
245
|
+
sentAt: z.ZodISODateTime;
|
|
246
|
+
channelGeneration: z.ZodNumber;
|
|
247
|
+
type: z.ZodLiteral<"cancel">;
|
|
248
|
+
commandId: z.ZodString;
|
|
249
|
+
payloadHash: z.ZodString;
|
|
250
|
+
requestedAt: z.ZodISODateTime;
|
|
251
|
+
reason: z.ZodEnum<{
|
|
252
|
+
user_requested: "user_requested";
|
|
253
|
+
policy_revoked: "policy_revoked";
|
|
254
|
+
deadline_exceeded: "deadline_exceeded";
|
|
255
|
+
shutdown: "shutdown";
|
|
256
|
+
}>;
|
|
257
|
+
}, z.core.$strict>;
|
|
258
|
+
export declare const GatewayHeartbeatEnvelopeSchema: z.ZodObject<{
|
|
259
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
260
|
+
protocolVersion: z.ZodObject<{
|
|
261
|
+
major: z.ZodNumber;
|
|
262
|
+
minor: z.ZodNumber;
|
|
263
|
+
}, z.core.$strict>;
|
|
264
|
+
sequence: z.ZodNumber;
|
|
265
|
+
nodeId: z.ZodString;
|
|
266
|
+
workspaceId: z.ZodString;
|
|
267
|
+
traceId: z.ZodString;
|
|
268
|
+
sentAt: z.ZodISODateTime;
|
|
269
|
+
channelGeneration: z.ZodNumber;
|
|
270
|
+
type: z.ZodLiteral<"heartbeat">;
|
|
271
|
+
observedAt: z.ZodISODateTime;
|
|
272
|
+
status: z.ZodEnum<{
|
|
273
|
+
online: "online";
|
|
274
|
+
degraded: "degraded";
|
|
275
|
+
draining: "draining";
|
|
276
|
+
}>;
|
|
277
|
+
}, z.core.$strict>;
|
|
278
|
+
export declare const GatewayInventoryEnvelopeSchema: z.ZodObject<{
|
|
279
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
280
|
+
protocolVersion: z.ZodObject<{
|
|
281
|
+
major: z.ZodNumber;
|
|
282
|
+
minor: z.ZodNumber;
|
|
283
|
+
}, z.core.$strict>;
|
|
284
|
+
sequence: z.ZodNumber;
|
|
285
|
+
nodeId: z.ZodString;
|
|
286
|
+
workspaceId: z.ZodString;
|
|
287
|
+
traceId: z.ZodString;
|
|
288
|
+
sentAt: z.ZodISODateTime;
|
|
289
|
+
channelGeneration: z.ZodNumber;
|
|
290
|
+
type: z.ZodLiteral<"inventory">;
|
|
291
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
292
|
+
snapshot: "snapshot";
|
|
293
|
+
delta: "delta";
|
|
294
|
+
}>>;
|
|
295
|
+
snapshotVersion: z.ZodNumber;
|
|
296
|
+
baseSnapshotVersion: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
observedAt: z.ZodISODateTime;
|
|
298
|
+
runtimeDrivers: z.ZodArray<z.ZodObject<{
|
|
299
|
+
opaqueRef: z.ZodString;
|
|
300
|
+
driverFamily: z.ZodString;
|
|
301
|
+
adapterVersion: z.ZodOptional<z.ZodString>;
|
|
302
|
+
driverVersion: z.ZodString;
|
|
303
|
+
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
304
|
+
protocolVersion: z.ZodObject<{
|
|
305
|
+
major: z.ZodNumber;
|
|
306
|
+
minor: z.ZodNumber;
|
|
307
|
+
}, z.core.$strict>;
|
|
308
|
+
health: z.ZodEnum<{
|
|
309
|
+
degraded: "degraded";
|
|
310
|
+
healthy: "healthy";
|
|
311
|
+
unavailable: "unavailable";
|
|
312
|
+
}>;
|
|
313
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
314
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
315
|
+
}, z.core.$strict>>;
|
|
316
|
+
contextProviders: z.ZodArray<z.ZodObject<{
|
|
317
|
+
opaqueRef: z.ZodString;
|
|
318
|
+
driverFamily: z.ZodString;
|
|
319
|
+
adapterVersion: z.ZodOptional<z.ZodString>;
|
|
320
|
+
driverVersion: z.ZodString;
|
|
321
|
+
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
322
|
+
protocolVersion: z.ZodObject<{
|
|
323
|
+
major: z.ZodNumber;
|
|
324
|
+
minor: z.ZodNumber;
|
|
325
|
+
}, z.core.$strict>;
|
|
326
|
+
health: z.ZodEnum<{
|
|
327
|
+
degraded: "degraded";
|
|
328
|
+
healthy: "healthy";
|
|
329
|
+
unavailable: "unavailable";
|
|
330
|
+
}>;
|
|
331
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
332
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
333
|
+
}, z.core.$strict>>;
|
|
334
|
+
removedRuntimeRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
335
|
+
}, z.core.$strict>;
|
|
336
|
+
export declare const GatewayErrorEnvelopeSchema: z.ZodObject<{
|
|
337
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
338
|
+
protocolVersion: z.ZodObject<{
|
|
339
|
+
major: z.ZodNumber;
|
|
340
|
+
minor: z.ZodNumber;
|
|
341
|
+
}, z.core.$strict>;
|
|
342
|
+
sequence: z.ZodNumber;
|
|
343
|
+
nodeId: z.ZodString;
|
|
344
|
+
workspaceId: z.ZodString;
|
|
345
|
+
traceId: z.ZodString;
|
|
346
|
+
sentAt: z.ZodISODateTime;
|
|
347
|
+
channelGeneration: z.ZodNumber;
|
|
348
|
+
type: z.ZodLiteral<"error">;
|
|
349
|
+
commandId: z.ZodOptional<z.ZodString>;
|
|
350
|
+
payloadHash: z.ZodOptional<z.ZodString>;
|
|
351
|
+
code: z.ZodString;
|
|
352
|
+
retryable: z.ZodBoolean;
|
|
353
|
+
}, z.core.$strict>;
|
|
354
|
+
export declare const GatewayEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
355
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
356
|
+
protocolVersion: z.ZodObject<{
|
|
357
|
+
major: z.ZodNumber;
|
|
358
|
+
minor: z.ZodNumber;
|
|
359
|
+
}, z.core.$strict>;
|
|
360
|
+
sequence: z.ZodNumber;
|
|
361
|
+
nodeId: z.ZodString;
|
|
362
|
+
workspaceId: z.ZodString;
|
|
363
|
+
traceId: z.ZodString;
|
|
364
|
+
sentAt: z.ZodISODateTime;
|
|
365
|
+
channelGeneration: z.ZodNumber;
|
|
366
|
+
type: z.ZodLiteral<"hello">;
|
|
367
|
+
supportedVersions: z.ZodArray<z.ZodObject<{
|
|
368
|
+
major: z.ZodNumber;
|
|
369
|
+
minor: z.ZodNumber;
|
|
370
|
+
}, z.core.$strict>>;
|
|
371
|
+
lastAcknowledgedSequence: z.ZodNumber;
|
|
372
|
+
retainedCommandOutcomes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
373
|
+
commandId: z.ZodString;
|
|
374
|
+
payloadHash: z.ZodString;
|
|
375
|
+
status: z.ZodEnum<{
|
|
376
|
+
unknown: "unknown";
|
|
377
|
+
accepted: "accepted";
|
|
378
|
+
running: "running";
|
|
379
|
+
cancelling: "cancelling";
|
|
380
|
+
succeeded: "succeeded";
|
|
381
|
+
failed: "failed";
|
|
382
|
+
cancelled: "cancelled";
|
|
383
|
+
}>;
|
|
384
|
+
observedAt: z.ZodISODateTime;
|
|
385
|
+
result: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
386
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
387
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
388
|
+
artifact: z.ZodObject<{
|
|
389
|
+
artifactId: z.ZodString;
|
|
390
|
+
digest: z.ZodString;
|
|
391
|
+
mediaType: z.ZodString;
|
|
392
|
+
sizeBytes: z.ZodNumber;
|
|
393
|
+
}, z.core.$strict>;
|
|
394
|
+
}, z.core.$strict>]>>;
|
|
395
|
+
}, z.core.$strict>>>;
|
|
396
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
397
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
398
|
+
protocolVersion: z.ZodObject<{
|
|
399
|
+
major: z.ZodNumber;
|
|
400
|
+
minor: z.ZodNumber;
|
|
401
|
+
}, z.core.$strict>;
|
|
402
|
+
sequence: z.ZodNumber;
|
|
403
|
+
nodeId: z.ZodString;
|
|
404
|
+
workspaceId: z.ZodString;
|
|
405
|
+
traceId: z.ZodString;
|
|
406
|
+
sentAt: z.ZodISODateTime;
|
|
407
|
+
channelGeneration: z.ZodNumber;
|
|
408
|
+
type: z.ZodLiteral<"command">;
|
|
409
|
+
commandId: z.ZodString;
|
|
410
|
+
idempotencyKey: z.ZodString;
|
|
411
|
+
payloadHash: z.ZodString;
|
|
412
|
+
issuedAt: z.ZodISODateTime;
|
|
413
|
+
expiresAt: z.ZodISODateTime;
|
|
414
|
+
family: z.ZodEnum<{
|
|
415
|
+
runtime: "runtime";
|
|
416
|
+
context_provider: "context_provider";
|
|
417
|
+
}>;
|
|
418
|
+
operation: z.ZodEnum<{
|
|
419
|
+
"runtime.execute": "runtime.execute";
|
|
420
|
+
"runtime.cancel": "runtime.cancel";
|
|
421
|
+
"runtime.input": "runtime.input";
|
|
422
|
+
"runtime.approval": "runtime.approval";
|
|
423
|
+
"runtime.status": "runtime.status";
|
|
424
|
+
"runtime.session": "runtime.session";
|
|
425
|
+
"context.status": "context.status";
|
|
426
|
+
"context.read": "context.read";
|
|
427
|
+
"context.write": "context.write";
|
|
428
|
+
}>;
|
|
429
|
+
driver: z.ZodObject<{
|
|
430
|
+
family: z.ZodString;
|
|
431
|
+
version: z.ZodString;
|
|
432
|
+
}, z.core.$strict>;
|
|
433
|
+
runtimeConnectionId: z.ZodOptional<z.ZodString>;
|
|
434
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
435
|
+
attemptId: z.ZodOptional<z.ZodString>;
|
|
436
|
+
providerRef: z.ZodOptional<z.ZodString>;
|
|
437
|
+
authorizationRef: z.ZodOptional<z.ZodString>;
|
|
438
|
+
requiredCapabilities: z.ZodArray<z.ZodString>;
|
|
439
|
+
payload: z.ZodUnion<readonly [z.ZodObject<{
|
|
440
|
+
version: z.ZodNumber;
|
|
441
|
+
parameters: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
442
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
443
|
+
version: z.ZodNumber;
|
|
444
|
+
artifact: z.ZodObject<{
|
|
445
|
+
artifactId: z.ZodString;
|
|
446
|
+
digest: z.ZodString;
|
|
447
|
+
mediaType: z.ZodString;
|
|
448
|
+
sizeBytes: z.ZodNumber;
|
|
449
|
+
}, z.core.$strict>;
|
|
450
|
+
}, z.core.$strict>]>;
|
|
451
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
452
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
453
|
+
protocolVersion: z.ZodObject<{
|
|
454
|
+
major: z.ZodNumber;
|
|
455
|
+
minor: z.ZodNumber;
|
|
456
|
+
}, z.core.$strict>;
|
|
457
|
+
sequence: z.ZodNumber;
|
|
458
|
+
nodeId: z.ZodString;
|
|
459
|
+
workspaceId: z.ZodString;
|
|
460
|
+
traceId: z.ZodString;
|
|
461
|
+
sentAt: z.ZodISODateTime;
|
|
462
|
+
channelGeneration: z.ZodNumber;
|
|
463
|
+
type: z.ZodLiteral<"ack">;
|
|
464
|
+
commandId: z.ZodString;
|
|
465
|
+
payloadHash: z.ZodString;
|
|
466
|
+
disposition: z.ZodEnum<{
|
|
467
|
+
accepted: "accepted";
|
|
468
|
+
replayed: "replayed";
|
|
469
|
+
rejected: "rejected";
|
|
470
|
+
expired: "expired";
|
|
471
|
+
}>;
|
|
472
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
473
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
474
|
+
protocolVersion: z.ZodObject<{
|
|
475
|
+
major: z.ZodNumber;
|
|
476
|
+
minor: z.ZodNumber;
|
|
477
|
+
}, z.core.$strict>;
|
|
478
|
+
sequence: z.ZodNumber;
|
|
479
|
+
nodeId: z.ZodString;
|
|
480
|
+
workspaceId: z.ZodString;
|
|
481
|
+
traceId: z.ZodString;
|
|
482
|
+
sentAt: z.ZodISODateTime;
|
|
483
|
+
channelGeneration: z.ZodNumber;
|
|
484
|
+
type: z.ZodLiteral<"progress">;
|
|
485
|
+
commandId: z.ZodString;
|
|
486
|
+
payloadHash: z.ZodString;
|
|
487
|
+
eventSequence: z.ZodNumber;
|
|
488
|
+
event: z.ZodObject<{
|
|
489
|
+
kind: z.ZodString;
|
|
490
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
491
|
+
}, z.core.$strict>;
|
|
492
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
493
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
494
|
+
protocolVersion: z.ZodObject<{
|
|
495
|
+
major: z.ZodNumber;
|
|
496
|
+
minor: z.ZodNumber;
|
|
497
|
+
}, z.core.$strict>;
|
|
498
|
+
sequence: z.ZodNumber;
|
|
499
|
+
nodeId: z.ZodString;
|
|
500
|
+
workspaceId: z.ZodString;
|
|
501
|
+
traceId: z.ZodString;
|
|
502
|
+
sentAt: z.ZodISODateTime;
|
|
503
|
+
channelGeneration: z.ZodNumber;
|
|
504
|
+
type: z.ZodLiteral<"result">;
|
|
505
|
+
commandId: z.ZodString;
|
|
506
|
+
payloadHash: z.ZodString;
|
|
507
|
+
status: z.ZodEnum<{
|
|
508
|
+
succeeded: "succeeded";
|
|
509
|
+
failed: "failed";
|
|
510
|
+
cancelled: "cancelled";
|
|
511
|
+
}>;
|
|
512
|
+
completedAt: z.ZodISODateTime;
|
|
513
|
+
result: z.ZodUnion<readonly [z.ZodObject<{
|
|
514
|
+
data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
515
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
516
|
+
artifact: z.ZodObject<{
|
|
517
|
+
artifactId: z.ZodString;
|
|
518
|
+
digest: z.ZodString;
|
|
519
|
+
mediaType: z.ZodString;
|
|
520
|
+
sizeBytes: z.ZodNumber;
|
|
521
|
+
}, z.core.$strict>;
|
|
522
|
+
}, z.core.$strict>]>;
|
|
523
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
524
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
525
|
+
protocolVersion: z.ZodObject<{
|
|
526
|
+
major: z.ZodNumber;
|
|
527
|
+
minor: z.ZodNumber;
|
|
528
|
+
}, z.core.$strict>;
|
|
529
|
+
sequence: z.ZodNumber;
|
|
530
|
+
nodeId: z.ZodString;
|
|
531
|
+
workspaceId: z.ZodString;
|
|
532
|
+
traceId: z.ZodString;
|
|
533
|
+
sentAt: z.ZodISODateTime;
|
|
534
|
+
channelGeneration: z.ZodNumber;
|
|
535
|
+
type: z.ZodLiteral<"cancel">;
|
|
536
|
+
commandId: z.ZodString;
|
|
537
|
+
payloadHash: z.ZodString;
|
|
538
|
+
requestedAt: z.ZodISODateTime;
|
|
539
|
+
reason: z.ZodEnum<{
|
|
540
|
+
user_requested: "user_requested";
|
|
541
|
+
policy_revoked: "policy_revoked";
|
|
542
|
+
deadline_exceeded: "deadline_exceeded";
|
|
543
|
+
shutdown: "shutdown";
|
|
544
|
+
}>;
|
|
545
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
546
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
547
|
+
protocolVersion: z.ZodObject<{
|
|
548
|
+
major: z.ZodNumber;
|
|
549
|
+
minor: z.ZodNumber;
|
|
550
|
+
}, z.core.$strict>;
|
|
551
|
+
sequence: z.ZodNumber;
|
|
552
|
+
nodeId: z.ZodString;
|
|
553
|
+
workspaceId: z.ZodString;
|
|
554
|
+
traceId: z.ZodString;
|
|
555
|
+
sentAt: z.ZodISODateTime;
|
|
556
|
+
channelGeneration: z.ZodNumber;
|
|
557
|
+
type: z.ZodLiteral<"heartbeat">;
|
|
558
|
+
observedAt: z.ZodISODateTime;
|
|
559
|
+
status: z.ZodEnum<{
|
|
560
|
+
online: "online";
|
|
561
|
+
degraded: "degraded";
|
|
562
|
+
draining: "draining";
|
|
563
|
+
}>;
|
|
564
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
565
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
566
|
+
protocolVersion: z.ZodObject<{
|
|
567
|
+
major: z.ZodNumber;
|
|
568
|
+
minor: z.ZodNumber;
|
|
569
|
+
}, z.core.$strict>;
|
|
570
|
+
sequence: z.ZodNumber;
|
|
571
|
+
nodeId: z.ZodString;
|
|
572
|
+
workspaceId: z.ZodString;
|
|
573
|
+
traceId: z.ZodString;
|
|
574
|
+
sentAt: z.ZodISODateTime;
|
|
575
|
+
channelGeneration: z.ZodNumber;
|
|
576
|
+
type: z.ZodLiteral<"inventory">;
|
|
577
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
578
|
+
snapshot: "snapshot";
|
|
579
|
+
delta: "delta";
|
|
580
|
+
}>>;
|
|
581
|
+
snapshotVersion: z.ZodNumber;
|
|
582
|
+
baseSnapshotVersion: z.ZodOptional<z.ZodNumber>;
|
|
583
|
+
observedAt: z.ZodISODateTime;
|
|
584
|
+
runtimeDrivers: z.ZodArray<z.ZodObject<{
|
|
585
|
+
opaqueRef: z.ZodString;
|
|
586
|
+
driverFamily: z.ZodString;
|
|
587
|
+
adapterVersion: z.ZodOptional<z.ZodString>;
|
|
588
|
+
driverVersion: z.ZodString;
|
|
589
|
+
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
590
|
+
protocolVersion: z.ZodObject<{
|
|
591
|
+
major: z.ZodNumber;
|
|
592
|
+
minor: z.ZodNumber;
|
|
593
|
+
}, z.core.$strict>;
|
|
594
|
+
health: z.ZodEnum<{
|
|
595
|
+
degraded: "degraded";
|
|
596
|
+
healthy: "healthy";
|
|
597
|
+
unavailable: "unavailable";
|
|
598
|
+
}>;
|
|
599
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
600
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
601
|
+
}, z.core.$strict>>;
|
|
602
|
+
contextProviders: z.ZodArray<z.ZodObject<{
|
|
603
|
+
opaqueRef: z.ZodString;
|
|
604
|
+
driverFamily: z.ZodString;
|
|
605
|
+
adapterVersion: z.ZodOptional<z.ZodString>;
|
|
606
|
+
driverVersion: z.ZodString;
|
|
607
|
+
harnessVersion: z.ZodOptional<z.ZodString>;
|
|
608
|
+
protocolVersion: z.ZodObject<{
|
|
609
|
+
major: z.ZodNumber;
|
|
610
|
+
minor: z.ZodNumber;
|
|
611
|
+
}, z.core.$strict>;
|
|
612
|
+
health: z.ZodEnum<{
|
|
613
|
+
degraded: "degraded";
|
|
614
|
+
healthy: "healthy";
|
|
615
|
+
unavailable: "unavailable";
|
|
616
|
+
}>;
|
|
617
|
+
capabilities: z.ZodArray<z.ZodString>;
|
|
618
|
+
limitations: z.ZodArray<z.ZodString>;
|
|
619
|
+
}, z.core.$strict>>;
|
|
620
|
+
removedRuntimeRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
621
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
622
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
623
|
+
protocolVersion: z.ZodObject<{
|
|
624
|
+
major: z.ZodNumber;
|
|
625
|
+
minor: z.ZodNumber;
|
|
626
|
+
}, z.core.$strict>;
|
|
627
|
+
sequence: z.ZodNumber;
|
|
628
|
+
nodeId: z.ZodString;
|
|
629
|
+
workspaceId: z.ZodString;
|
|
630
|
+
traceId: z.ZodString;
|
|
631
|
+
sentAt: z.ZodISODateTime;
|
|
632
|
+
channelGeneration: z.ZodNumber;
|
|
633
|
+
type: z.ZodLiteral<"error">;
|
|
634
|
+
commandId: z.ZodOptional<z.ZodString>;
|
|
635
|
+
payloadHash: z.ZodOptional<z.ZodString>;
|
|
636
|
+
code: z.ZodString;
|
|
637
|
+
retryable: z.ZodBoolean;
|
|
638
|
+
}, z.core.$strict>], "type">;
|
|
639
|
+
export type GatewayEnvelope = z.output<typeof GatewayEnvelopeSchema>;
|
|
640
|
+
export type GatewayCommandEnvelope = z.output<typeof GatewayCommandEnvelopeSchema>;
|
|
641
|
+
export type GatewayAcknowledgementEnvelope = z.output<typeof GatewayAcknowledgementEnvelopeSchema>;
|
|
642
|
+
export type GatewayResultEnvelope = z.output<typeof GatewayResultEnvelopeSchema>;
|
|
643
|
+
export type GatewayProgressEnvelope = z.output<typeof GatewayProgressEnvelopeSchema>;
|
|
644
|
+
export type GatewayErrorEnvelope = z.output<typeof GatewayErrorEnvelopeSchema>;
|
|
645
|
+
export type GatewayInventoryEnvelope = z.output<typeof GatewayInventoryEnvelopeSchema>;
|
|
646
|
+
export type GatewayHelloEnvelope = z.output<typeof GatewayHelloEnvelopeSchema>;
|
|
647
|
+
export type GatewayRetainedCommandOutcome = z.output<typeof GatewayRetainedCommandOutcomeSchema>;
|
|
648
|
+
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"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