@roll-agent/relay-protocol 0.1.0 → 0.2.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.
- package/README.md +90 -39
- package/dist/conformance.d.ts +571 -4
- package/dist/conformance.js +677 -8
- package/dist/index.d.ts +3977 -303
- package/dist/index.js +664 -77
- package/dist/reference-adapter.d.ts +56 -0
- package/dist/reference-adapter.js +122 -0
- package/dist/schema/roll-relay-protocol-v1.1.schema.json +3791 -0
- package/fixtures/v1.1/invalid-approval-projection-raw-input-leak.json +19 -0
- package/fixtures/v1.1/invalid-authentication-local-only.json +12 -0
- package/fixtures/v1.1/invalid-file-picker-local-only.json +12 -0
- package/fixtures/v1.1/invalid-interaction-cancelled-reason-leak.json +10 -0
- package/fixtures/v1.1/invalid-interaction-resolved-result-leak.json +18 -0
- package/fixtures/v1.1/invalid-legacy-approval-candidate.json +7 -0
- package/fixtures/v1.1/invalid-legacy-approval-respond.json +7 -0
- package/fixtures/v1.1/invalid-n-minus-one-device-connect.json +6 -0
- package/fixtures/v1.1/invalid-non-normal-sensitivity.json +21 -0
- package/fixtures/v1.1/invalid-runtime-event-tool-input-leak.json +22 -0
- package/fixtures/v1.1/invalid-runtime-event-tool-output-leak.json +21 -0
- package/fixtures/v1.1/invalid-user-input-projection-secret-leak.json +22 -0
- package/fixtures/v1.1/manifest.json +673 -0
- package/fixtures/v1.1/valid-device-connect.json +6 -0
- package/fixtures/v1.1/valid-interaction-cancelled.json +9 -0
- package/fixtures/v1.1/valid-interaction-candidate-user-input.json +25 -0
- package/fixtures/v1.1/valid-interaction-request-approval.json +17 -0
- package/fixtures/v1.1/valid-interaction-request-user-input.json +40 -0
- package/fixtures/v1.1/valid-interaction-resolved.json +9 -0
- package/fixtures/v1.1/valid-runtime-ack.json +5 -0
- package/fixtures/v1.1/valid-runtime-encrypted-interaction.json +10 -0
- package/fixtures/v1.1/valid-runtime-event-runtime-n-minus-one.json +16 -0
- package/fixtures/v1.1/valid-runtime-event.json +16 -0
- package/fixtures/v1.1/valid-runtime-gap.json +7 -0
- package/fixtures/v1.1/valid-runtime-request.json +10 -0
- package/fixtures/v1.1/valid-runtime-response.json +8 -0
- package/package.json +8 -2
package/dist/conformance.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RELAY_PROTOCOL_VERSION, type RelayAckDisposition, type RelayAckState, type RelayErrorCode, type RelayProtocolVersion, type RelayRequestMethod, type RelayRequestMethodDisposition, type RelayRequestReplayClassification, type RelayRuntimeRequest } from "./index.ts";
|
|
1
|
+
import { RELAY_PROTOCOL_VERSION, type RelayAckDisposition, type RelayAckState, type RelayErrorCode, type RelayProtocolVersion, type RelayRequestMethod, type RelayRequestMethodForVersion, type RelayRequestMethodDisposition, type RelayRequestReplayClassification, type RelayReplayableRuntimeRequest, type RelayRuntimeRequest, type RelayRuntimeRequestV11 } from "./index.ts";
|
|
2
2
|
export interface RelayFrameConformanceCase {
|
|
3
3
|
readonly id: string;
|
|
4
4
|
readonly fixtureName: `${"valid" | "invalid"}-${string}.json`;
|
|
@@ -174,6 +174,447 @@ export declare const RELAY_FRAME_CONFORMANCE_CASES: readonly [{
|
|
|
174
174
|
};
|
|
175
175
|
};
|
|
176
176
|
}];
|
|
177
|
+
export declare const RELAY_FRAME_CONFORMANCE_CASES_V11: readonly [{
|
|
178
|
+
readonly id: "device-connect-v11";
|
|
179
|
+
readonly fixtureName: "valid-device-connect.json";
|
|
180
|
+
readonly valid: true;
|
|
181
|
+
readonly frame: {
|
|
182
|
+
readonly type: "device.connect";
|
|
183
|
+
readonly protocolVersion: "1.1";
|
|
184
|
+
readonly deviceId: "00000000-0000-4000-8000-000000000506";
|
|
185
|
+
readonly pairingToken: "pairing-token-with-sufficient-length";
|
|
186
|
+
};
|
|
187
|
+
}, {
|
|
188
|
+
readonly id: "runtime-request-v11";
|
|
189
|
+
readonly fixtureName: "valid-runtime-request.json";
|
|
190
|
+
readonly valid: true;
|
|
191
|
+
readonly frame: {
|
|
192
|
+
readonly type: "runtime.request";
|
|
193
|
+
readonly requestId: "00000000-0000-4000-8000-000000000505";
|
|
194
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
195
|
+
readonly method: "thread.snapshot";
|
|
196
|
+
readonly params: {
|
|
197
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
198
|
+
readonly limit: 100;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
}, {
|
|
202
|
+
readonly id: "interaction-candidate-user-input";
|
|
203
|
+
readonly fixtureName: "valid-interaction-candidate-user-input.json";
|
|
204
|
+
readonly valid: true;
|
|
205
|
+
readonly frame: {
|
|
206
|
+
readonly type: "runtime.request";
|
|
207
|
+
readonly requestId: "00000000-0000-4000-8000-000000000509";
|
|
208
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
209
|
+
readonly method: "interaction.candidate";
|
|
210
|
+
readonly params: {
|
|
211
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
212
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
213
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
214
|
+
readonly method: "userInput.request";
|
|
215
|
+
readonly candidate: {
|
|
216
|
+
readonly status: "submitted";
|
|
217
|
+
readonly values: readonly [{
|
|
218
|
+
readonly id: "region";
|
|
219
|
+
readonly value: "north";
|
|
220
|
+
}, {
|
|
221
|
+
readonly id: "workspace";
|
|
222
|
+
readonly value: "target-workspace";
|
|
223
|
+
}];
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}, {
|
|
228
|
+
readonly id: "runtime-response-v11";
|
|
229
|
+
readonly fixtureName: "valid-runtime-response.json";
|
|
230
|
+
readonly valid: true;
|
|
231
|
+
readonly frame: {
|
|
232
|
+
readonly type: "runtime.response";
|
|
233
|
+
readonly requestId: "00000000-0000-4000-8000-000000000505";
|
|
234
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
235
|
+
readonly result: {
|
|
236
|
+
readonly accepted: true;
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
}, {
|
|
240
|
+
readonly id: "runtime-event-v11";
|
|
241
|
+
readonly fixtureName: "valid-runtime-event.json";
|
|
242
|
+
readonly valid: true;
|
|
243
|
+
readonly frame: {
|
|
244
|
+
readonly type: "runtime.event";
|
|
245
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
246
|
+
readonly relaySequence: 0;
|
|
247
|
+
readonly event: {
|
|
248
|
+
readonly protocolVersion: "1.1";
|
|
249
|
+
readonly runtimeInstanceId: "00000000-0000-4000-8000-000000000501";
|
|
250
|
+
readonly sequence: 0;
|
|
251
|
+
readonly timestamp: "2026-08-04T00:00:00.000Z";
|
|
252
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
253
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
254
|
+
readonly event: {
|
|
255
|
+
readonly type: "turn.completed";
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
}, {
|
|
260
|
+
readonly id: "runtime-event-runtime-n-minus-one";
|
|
261
|
+
readonly fixtureName: "valid-runtime-event-runtime-n-minus-one.json";
|
|
262
|
+
readonly valid: true;
|
|
263
|
+
readonly frame: {
|
|
264
|
+
readonly type: "runtime.event";
|
|
265
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
266
|
+
readonly relaySequence: 1;
|
|
267
|
+
readonly event: {
|
|
268
|
+
readonly protocolVersion: "1.0";
|
|
269
|
+
readonly runtimeInstanceId: "00000000-0000-4000-8000-000000000501";
|
|
270
|
+
readonly sequence: 1;
|
|
271
|
+
readonly timestamp: "2026-08-04T00:00:01.000Z";
|
|
272
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
273
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
274
|
+
readonly event: {
|
|
275
|
+
readonly type: "turn.completed";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
}, {
|
|
280
|
+
readonly id: "runtime-ack-v11";
|
|
281
|
+
readonly fixtureName: "valid-runtime-ack.json";
|
|
282
|
+
readonly valid: true;
|
|
283
|
+
readonly frame: {
|
|
284
|
+
readonly type: "runtime.ack";
|
|
285
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
286
|
+
readonly throughRelaySequence: 1;
|
|
287
|
+
};
|
|
288
|
+
}, {
|
|
289
|
+
readonly id: "runtime-gap-v11";
|
|
290
|
+
readonly fixtureName: "valid-runtime-gap.json";
|
|
291
|
+
readonly valid: true;
|
|
292
|
+
readonly frame: {
|
|
293
|
+
readonly type: "runtime.gap";
|
|
294
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
295
|
+
readonly fromRelaySequence: 0;
|
|
296
|
+
readonly throughRelaySequence: 2;
|
|
297
|
+
readonly recovery: "thread.snapshot";
|
|
298
|
+
};
|
|
299
|
+
}, {
|
|
300
|
+
readonly id: "runtime-encrypted-interaction-v11";
|
|
301
|
+
readonly fixtureName: "valid-runtime-encrypted-interaction.json";
|
|
302
|
+
readonly valid: true;
|
|
303
|
+
readonly frame: {
|
|
304
|
+
readonly type: "runtime.encrypted";
|
|
305
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
306
|
+
readonly envelopeId: "00000000-0000-4000-8000-000000000508";
|
|
307
|
+
readonly payloadKind: "interaction";
|
|
308
|
+
readonly relaySequence: 2;
|
|
309
|
+
readonly algorithm: "example-aead";
|
|
310
|
+
readonly nonce: "opaque-nonce";
|
|
311
|
+
readonly ciphertext: "opaque-ciphertext";
|
|
312
|
+
};
|
|
313
|
+
}, {
|
|
314
|
+
readonly id: "interaction-request-approval";
|
|
315
|
+
readonly fixtureName: "valid-interaction-request-approval.json";
|
|
316
|
+
readonly valid: true;
|
|
317
|
+
readonly frame: {
|
|
318
|
+
readonly type: "interaction.request";
|
|
319
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
320
|
+
readonly relaySequence: 3;
|
|
321
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
322
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
323
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
324
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
325
|
+
readonly sensitivity: "normal";
|
|
326
|
+
readonly method: "approval.request";
|
|
327
|
+
readonly projection: {
|
|
328
|
+
readonly approvalId: "00000000-0000-4000-8000-000000000504";
|
|
329
|
+
readonly agentName: "workspace-agent";
|
|
330
|
+
readonly toolName: "deploy";
|
|
331
|
+
readonly explanation: "部署前需要确认。";
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
}, {
|
|
335
|
+
readonly id: "interaction-request-user-input";
|
|
336
|
+
readonly fixtureName: "valid-interaction-request-user-input.json";
|
|
337
|
+
readonly valid: true;
|
|
338
|
+
readonly frame: {
|
|
339
|
+
readonly type: "interaction.request";
|
|
340
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
341
|
+
readonly relaySequence: 4;
|
|
342
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
343
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
344
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
345
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
346
|
+
readonly sensitivity: "normal";
|
|
347
|
+
readonly method: "userInput.request";
|
|
348
|
+
readonly projection: {
|
|
349
|
+
readonly title: "部署配置";
|
|
350
|
+
readonly controls: readonly [{
|
|
351
|
+
readonly id: "region";
|
|
352
|
+
readonly type: "choice";
|
|
353
|
+
readonly label: "部署区域";
|
|
354
|
+
readonly required: true;
|
|
355
|
+
readonly multiple: false;
|
|
356
|
+
readonly options: readonly [{
|
|
357
|
+
readonly id: "north";
|
|
358
|
+
readonly label: "北区";
|
|
359
|
+
}, {
|
|
360
|
+
readonly id: "south";
|
|
361
|
+
readonly label: "南区";
|
|
362
|
+
}];
|
|
363
|
+
}, {
|
|
364
|
+
readonly id: "workspace";
|
|
365
|
+
readonly type: "text";
|
|
366
|
+
readonly label: "目标 Workspace";
|
|
367
|
+
readonly required: true;
|
|
368
|
+
readonly maxLength: 100;
|
|
369
|
+
}];
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
}, {
|
|
373
|
+
readonly id: "interaction-resolved";
|
|
374
|
+
readonly fixtureName: "valid-interaction-resolved.json";
|
|
375
|
+
readonly valid: true;
|
|
376
|
+
readonly frame: {
|
|
377
|
+
readonly type: "interaction.resolved";
|
|
378
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
379
|
+
readonly relaySequence: 5;
|
|
380
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
381
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
382
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
383
|
+
readonly method: "userInput.request";
|
|
384
|
+
};
|
|
385
|
+
}, {
|
|
386
|
+
readonly id: "interaction-cancelled";
|
|
387
|
+
readonly fixtureName: "valid-interaction-cancelled.json";
|
|
388
|
+
readonly valid: true;
|
|
389
|
+
readonly frame: {
|
|
390
|
+
readonly type: "interaction.cancelled";
|
|
391
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
392
|
+
readonly relaySequence: 6;
|
|
393
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
394
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
395
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
396
|
+
readonly method: "approval.request";
|
|
397
|
+
};
|
|
398
|
+
}, {
|
|
399
|
+
readonly id: "n-minus-one-device-connect-rejected";
|
|
400
|
+
readonly fixtureName: "invalid-n-minus-one-device-connect.json";
|
|
401
|
+
readonly valid: false;
|
|
402
|
+
readonly frame: {
|
|
403
|
+
readonly type: "device.connect";
|
|
404
|
+
readonly protocolVersion: "1.0";
|
|
405
|
+
readonly deviceId: "00000000-0000-4000-8000-000000000506";
|
|
406
|
+
readonly pairingToken: "pairing-token-with-sufficient-length";
|
|
407
|
+
};
|
|
408
|
+
}, {
|
|
409
|
+
readonly id: "legacy-approval-respond-rejected";
|
|
410
|
+
readonly fixtureName: "invalid-legacy-approval-respond.json";
|
|
411
|
+
readonly valid: false;
|
|
412
|
+
readonly frame: {
|
|
413
|
+
readonly type: "runtime.request";
|
|
414
|
+
readonly requestId: "00000000-0000-4000-8000-000000000505";
|
|
415
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
416
|
+
readonly method: "approval.respond";
|
|
417
|
+
readonly params: {};
|
|
418
|
+
};
|
|
419
|
+
}, {
|
|
420
|
+
readonly id: "legacy-approval-candidate-rejected";
|
|
421
|
+
readonly fixtureName: "invalid-legacy-approval-candidate.json";
|
|
422
|
+
readonly valid: false;
|
|
423
|
+
readonly frame: {
|
|
424
|
+
readonly type: "runtime.request";
|
|
425
|
+
readonly requestId: "00000000-0000-4000-8000-000000000505";
|
|
426
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
427
|
+
readonly method: "approval.candidate";
|
|
428
|
+
readonly params: {};
|
|
429
|
+
};
|
|
430
|
+
}, {
|
|
431
|
+
readonly id: "approval-projection-raw-input-leak";
|
|
432
|
+
readonly fixtureName: "invalid-approval-projection-raw-input-leak.json";
|
|
433
|
+
readonly valid: false;
|
|
434
|
+
readonly frame: {
|
|
435
|
+
readonly type: "interaction.request";
|
|
436
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
437
|
+
readonly relaySequence: 7;
|
|
438
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
439
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
440
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
441
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
442
|
+
readonly sensitivity: "normal";
|
|
443
|
+
readonly method: "approval.request";
|
|
444
|
+
readonly projection: {
|
|
445
|
+
readonly approvalId: "00000000-0000-4000-8000-000000000504";
|
|
446
|
+
readonly agentName: "workspace-agent";
|
|
447
|
+
readonly toolName: "deploy";
|
|
448
|
+
readonly input: {
|
|
449
|
+
readonly secret: "relay-security-sentinel";
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
}, {
|
|
454
|
+
readonly id: "user-input-projection-secret-leak";
|
|
455
|
+
readonly fixtureName: "invalid-user-input-projection-secret-leak.json";
|
|
456
|
+
readonly valid: false;
|
|
457
|
+
readonly frame: {
|
|
458
|
+
readonly type: "interaction.request";
|
|
459
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
460
|
+
readonly relaySequence: 8;
|
|
461
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
462
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
463
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
464
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
465
|
+
readonly sensitivity: "normal";
|
|
466
|
+
readonly method: "userInput.request";
|
|
467
|
+
readonly projection: {
|
|
468
|
+
readonly controls: readonly [{
|
|
469
|
+
readonly id: "workspace";
|
|
470
|
+
readonly type: "text";
|
|
471
|
+
readonly label: "目标 Workspace";
|
|
472
|
+
readonly required: true;
|
|
473
|
+
}];
|
|
474
|
+
readonly secret: "relay-security-sentinel";
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
}, {
|
|
478
|
+
readonly id: "non-normal-sensitivity-rejected";
|
|
479
|
+
readonly fixtureName: "invalid-non-normal-sensitivity.json";
|
|
480
|
+
readonly valid: false;
|
|
481
|
+
readonly frame: {
|
|
482
|
+
readonly type: "interaction.request";
|
|
483
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
484
|
+
readonly relaySequence: 9;
|
|
485
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
486
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
487
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
488
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
489
|
+
readonly sensitivity: "secret";
|
|
490
|
+
readonly method: "userInput.request";
|
|
491
|
+
readonly projection: {
|
|
492
|
+
readonly controls: readonly [{
|
|
493
|
+
readonly id: "workspace";
|
|
494
|
+
readonly type: "text";
|
|
495
|
+
readonly label: "目标 Workspace";
|
|
496
|
+
readonly required: true;
|
|
497
|
+
}];
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
}, {
|
|
501
|
+
readonly id: "authentication-local-only";
|
|
502
|
+
readonly fixtureName: "invalid-authentication-local-only.json";
|
|
503
|
+
readonly valid: false;
|
|
504
|
+
readonly frame: {
|
|
505
|
+
readonly type: "interaction.request";
|
|
506
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
507
|
+
readonly relaySequence: 10;
|
|
508
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
509
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
510
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
511
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
512
|
+
readonly sensitivity: "normal";
|
|
513
|
+
readonly method: "authentication.request";
|
|
514
|
+
readonly projection: {};
|
|
515
|
+
};
|
|
516
|
+
}, {
|
|
517
|
+
readonly id: "file-picker-local-only";
|
|
518
|
+
readonly fixtureName: "invalid-file-picker-local-only.json";
|
|
519
|
+
readonly valid: false;
|
|
520
|
+
readonly frame: {
|
|
521
|
+
readonly type: "interaction.request";
|
|
522
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
523
|
+
readonly relaySequence: 11;
|
|
524
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
525
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
526
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
527
|
+
readonly expiresAt: "2026-08-04T00:05:00.000Z";
|
|
528
|
+
readonly sensitivity: "normal";
|
|
529
|
+
readonly method: "filePicker.request";
|
|
530
|
+
readonly projection: {};
|
|
531
|
+
};
|
|
532
|
+
}, {
|
|
533
|
+
readonly id: "interaction-resolved-result-leak";
|
|
534
|
+
readonly fixtureName: "invalid-interaction-resolved-result-leak.json";
|
|
535
|
+
readonly valid: false;
|
|
536
|
+
readonly frame: {
|
|
537
|
+
readonly type: "interaction.resolved";
|
|
538
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
539
|
+
readonly relaySequence: 12;
|
|
540
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
541
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
542
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
543
|
+
readonly method: "userInput.request";
|
|
544
|
+
readonly result: {
|
|
545
|
+
readonly status: "submitted";
|
|
546
|
+
readonly values: readonly [{
|
|
547
|
+
readonly id: "workspace";
|
|
548
|
+
readonly value: "relay-security-sentinel";
|
|
549
|
+
}];
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
}, {
|
|
553
|
+
readonly id: "interaction-cancelled-reason-leak";
|
|
554
|
+
readonly fixtureName: "invalid-interaction-cancelled-reason-leak.json";
|
|
555
|
+
readonly valid: false;
|
|
556
|
+
readonly frame: {
|
|
557
|
+
readonly type: "interaction.cancelled";
|
|
558
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
559
|
+
readonly relaySequence: 13;
|
|
560
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
561
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
562
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
563
|
+
readonly method: "approval.request";
|
|
564
|
+
readonly reason: "relay-security-sentinel";
|
|
565
|
+
};
|
|
566
|
+
}, {
|
|
567
|
+
readonly id: "runtime-event-tool-input-leak";
|
|
568
|
+
readonly fixtureName: "invalid-runtime-event-tool-input-leak.json";
|
|
569
|
+
readonly valid: false;
|
|
570
|
+
readonly frame: {
|
|
571
|
+
readonly type: "runtime.event";
|
|
572
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
573
|
+
readonly relaySequence: 14;
|
|
574
|
+
readonly event: {
|
|
575
|
+
readonly protocolVersion: "1.1";
|
|
576
|
+
readonly runtimeInstanceId: "00000000-0000-4000-8000-000000000501";
|
|
577
|
+
readonly sequence: 14;
|
|
578
|
+
readonly timestamp: "2026-08-04T00:00:14.000Z";
|
|
579
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
580
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
581
|
+
readonly event: {
|
|
582
|
+
readonly type: "tool.started";
|
|
583
|
+
readonly toolCallId: "tool-1";
|
|
584
|
+
readonly agentName: "workspace-agent";
|
|
585
|
+
readonly toolName: "deploy";
|
|
586
|
+
readonly input: {
|
|
587
|
+
readonly secret: "relay-security-sentinel";
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
}, {
|
|
593
|
+
readonly id: "runtime-event-tool-output-leak";
|
|
594
|
+
readonly fixtureName: "invalid-runtime-event-tool-output-leak.json";
|
|
595
|
+
readonly valid: false;
|
|
596
|
+
readonly frame: {
|
|
597
|
+
readonly type: "runtime.event";
|
|
598
|
+
readonly workspaceId: "00000000-0000-4000-8000-000000000507";
|
|
599
|
+
readonly relaySequence: 15;
|
|
600
|
+
readonly event: {
|
|
601
|
+
readonly protocolVersion: "1.1";
|
|
602
|
+
readonly runtimeInstanceId: "00000000-0000-4000-8000-000000000501";
|
|
603
|
+
readonly sequence: 15;
|
|
604
|
+
readonly timestamp: "2026-08-04T00:00:15.000Z";
|
|
605
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
606
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
607
|
+
readonly event: {
|
|
608
|
+
readonly type: "tool.output";
|
|
609
|
+
readonly toolCallId: "tool-1";
|
|
610
|
+
readonly agentName: "workspace-agent";
|
|
611
|
+
readonly toolName: "deploy";
|
|
612
|
+
readonly stream: "stdout";
|
|
613
|
+
readonly delta: "relay-security-sentinel";
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
}];
|
|
177
618
|
export interface RelayNegotiationConformanceCase {
|
|
178
619
|
readonly id: string;
|
|
179
620
|
readonly peerVersions: readonly string[];
|
|
@@ -192,12 +633,34 @@ export declare const RELAY_NEGOTIATION_CONFORMANCE_CASES: readonly [{
|
|
|
192
633
|
readonly peerVersions: readonly ["9.9"];
|
|
193
634
|
readonly expected: undefined;
|
|
194
635
|
}];
|
|
636
|
+
export declare const RELAY_NEGOTIATION_CONFORMANCE_CASES_V11: readonly [{
|
|
637
|
+
readonly id: "same-version-v11";
|
|
638
|
+
readonly peerVersions: readonly ["1.1"];
|
|
639
|
+
readonly expected: "1.1";
|
|
640
|
+
}, {
|
|
641
|
+
readonly id: "latest-supported-version-preferred";
|
|
642
|
+
readonly peerVersions: readonly ["1.0", "1.1"];
|
|
643
|
+
readonly expected: "1.1";
|
|
644
|
+
}, {
|
|
645
|
+
readonly id: "n-minus-one-fallback";
|
|
646
|
+
readonly peerVersions: readonly ["1.0"];
|
|
647
|
+
readonly expected: "1.0";
|
|
648
|
+
}, {
|
|
649
|
+
readonly id: "unknown-before-supported-v11";
|
|
650
|
+
readonly peerVersions: readonly ["9.9", "1.1"];
|
|
651
|
+
readonly expected: "1.1";
|
|
652
|
+
}, {
|
|
653
|
+
readonly id: "unknown-only-v11";
|
|
654
|
+
readonly peerVersions: readonly ["9.9"];
|
|
655
|
+
readonly expected: undefined;
|
|
656
|
+
}];
|
|
195
657
|
export interface RelayMethodRegistryConformanceCase {
|
|
196
658
|
readonly id: string;
|
|
197
659
|
readonly value: string;
|
|
198
660
|
readonly expected: RelayRequestMethodDisposition | undefined;
|
|
199
661
|
}
|
|
200
662
|
export declare const RELAY_METHOD_REGISTRY_CONFORMANCE_CASES: readonly RelayMethodRegistryConformanceCase[];
|
|
663
|
+
export declare const RELAY_METHOD_REGISTRY_CONFORMANCE_CASES_V11: readonly RelayMethodRegistryConformanceCase[];
|
|
201
664
|
export interface RelayMethodConformanceCase {
|
|
202
665
|
readonly id: string;
|
|
203
666
|
readonly method: RelayRequestMethod;
|
|
@@ -237,13 +700,99 @@ export declare const RELAY_METHOD_CONFORMANCE_CASES: readonly [{
|
|
|
237
700
|
readonly accepted: true;
|
|
238
701
|
};
|
|
239
702
|
}];
|
|
240
|
-
export interface
|
|
703
|
+
export interface RelayMethodConformanceCaseV11 {
|
|
241
704
|
readonly id: string;
|
|
242
|
-
readonly
|
|
243
|
-
readonly
|
|
705
|
+
readonly method: RelayRequestMethodForVersion<"1.1">;
|
|
706
|
+
readonly kind: "params" | "result";
|
|
707
|
+
readonly valid: boolean;
|
|
708
|
+
readonly value: unknown;
|
|
709
|
+
}
|
|
710
|
+
export declare const RELAY_METHOD_CONFORMANCE_CASES_V11: readonly [{
|
|
711
|
+
readonly id: "interaction-candidate-approval-params";
|
|
712
|
+
readonly method: "interaction.candidate";
|
|
713
|
+
readonly kind: "params";
|
|
714
|
+
readonly valid: true;
|
|
715
|
+
readonly value: {
|
|
716
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
717
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
718
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
719
|
+
readonly method: "approval.request";
|
|
720
|
+
readonly candidate: {
|
|
721
|
+
readonly decision: "approve";
|
|
722
|
+
};
|
|
723
|
+
};
|
|
724
|
+
}, {
|
|
725
|
+
readonly id: "interaction-candidate-user-input-params";
|
|
726
|
+
readonly method: "interaction.candidate";
|
|
727
|
+
readonly kind: "params";
|
|
728
|
+
readonly valid: true;
|
|
729
|
+
readonly value: {
|
|
730
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
731
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
732
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
733
|
+
readonly method: "userInput.request";
|
|
734
|
+
readonly candidate: {
|
|
735
|
+
readonly status: "submitted";
|
|
736
|
+
readonly values: readonly [{
|
|
737
|
+
readonly id: "region";
|
|
738
|
+
readonly value: readonly ["north"];
|
|
739
|
+
}, {
|
|
740
|
+
readonly id: "workspace";
|
|
741
|
+
readonly value: "production";
|
|
742
|
+
}];
|
|
743
|
+
};
|
|
744
|
+
};
|
|
745
|
+
}, {
|
|
746
|
+
readonly id: "interaction-candidate-method-result-mismatch";
|
|
747
|
+
readonly method: "interaction.candidate";
|
|
748
|
+
readonly kind: "params";
|
|
749
|
+
readonly valid: false;
|
|
750
|
+
readonly value: {
|
|
751
|
+
readonly interactionId: "00000000-0000-4000-8000-000000000511";
|
|
752
|
+
readonly threadId: "00000000-0000-4000-8000-000000000502";
|
|
753
|
+
readonly turnId: "00000000-0000-4000-8000-000000000503";
|
|
754
|
+
readonly method: "approval.request";
|
|
755
|
+
readonly candidate: {
|
|
756
|
+
readonly status: "submitted";
|
|
757
|
+
readonly values: readonly [];
|
|
758
|
+
};
|
|
759
|
+
};
|
|
760
|
+
}, {
|
|
761
|
+
readonly id: "interaction-candidate-missing-identity";
|
|
762
|
+
readonly method: "interaction.candidate";
|
|
763
|
+
readonly kind: "params";
|
|
764
|
+
readonly valid: false;
|
|
765
|
+
readonly value: {
|
|
766
|
+
readonly method: "userInput.request";
|
|
767
|
+
readonly candidate: {
|
|
768
|
+
readonly status: "cancelled";
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
}, {
|
|
772
|
+
readonly id: "interaction-candidate-result";
|
|
773
|
+
readonly method: "interaction.candidate";
|
|
774
|
+
readonly kind: "result";
|
|
775
|
+
readonly valid: true;
|
|
776
|
+
readonly value: {
|
|
777
|
+
readonly accepted: true;
|
|
778
|
+
};
|
|
779
|
+
}, {
|
|
780
|
+
readonly id: "interaction-candidate-result-must-be-accepted";
|
|
781
|
+
readonly method: "interaction.candidate";
|
|
782
|
+
readonly kind: "result";
|
|
783
|
+
readonly valid: false;
|
|
784
|
+
readonly value: {
|
|
785
|
+
readonly accepted: false;
|
|
786
|
+
};
|
|
787
|
+
}];
|
|
788
|
+
export interface RelayReplayConformanceCase<TRequest extends RelayReplayableRuntimeRequest = RelayRuntimeRequest> {
|
|
789
|
+
readonly id: string;
|
|
790
|
+
readonly existing: TRequest;
|
|
791
|
+
readonly candidate: TRequest;
|
|
244
792
|
readonly expected: RelayRequestReplayClassification;
|
|
245
793
|
}
|
|
246
794
|
export declare const RELAY_REPLAY_CONFORMANCE_CASES: readonly RelayReplayConformanceCase[];
|
|
795
|
+
export declare const RELAY_REPLAY_CONFORMANCE_CASES_V11: readonly RelayReplayConformanceCase<RelayRuntimeRequestV11>[];
|
|
247
796
|
export interface RelayAckConformanceCase extends RelayAckState {
|
|
248
797
|
readonly id: string;
|
|
249
798
|
readonly expected: RelayAckDisposition;
|
|
@@ -311,11 +860,22 @@ export interface RelayProtocolConformanceAdapter {
|
|
|
311
860
|
classifyAck(state: RelayAckState): RelayAckDisposition;
|
|
312
861
|
getErrorRetryability(code: RelayErrorCode): boolean;
|
|
313
862
|
}
|
|
863
|
+
export interface RelayProtocolConformanceAdapterV11 {
|
|
864
|
+
validateFrame(value: unknown): boolean;
|
|
865
|
+
negotiate(peerVersions: readonly string[]): RelayProtocolVersion | undefined;
|
|
866
|
+
getRequestMethodDisposition(value: string): string | undefined;
|
|
867
|
+
validateMethodValue(method: RelayRequestMethodForVersion<"1.1">, kind: "params" | "result", value: unknown): boolean;
|
|
868
|
+
classifyReplay(existing: RelayRuntimeRequestV11, candidate: RelayRuntimeRequestV11): RelayReplayConformanceObservation;
|
|
869
|
+
classifyAck(state: RelayAckState): RelayAckDisposition;
|
|
870
|
+
getErrorRetryability(code: RelayErrorCode): boolean;
|
|
871
|
+
}
|
|
314
872
|
export interface RelayReplayConformanceObservation {
|
|
315
873
|
readonly disposition: string;
|
|
316
874
|
readonly errorCode?: string;
|
|
317
875
|
}
|
|
318
876
|
export declare const runtimeRelayProtocolConformanceAdapter: RelayProtocolConformanceAdapter;
|
|
877
|
+
export declare const runtimeRelayProtocolConformanceAdapterV10: RelayProtocolConformanceAdapter;
|
|
878
|
+
export declare const runtimeRelayProtocolConformanceAdapterV11: RelayProtocolConformanceAdapterV11;
|
|
319
879
|
export interface RelayProtocolConformanceFailure {
|
|
320
880
|
readonly caseId: string;
|
|
321
881
|
readonly expected: string;
|
|
@@ -326,4 +886,11 @@ export interface RelayProtocolConformanceResult {
|
|
|
326
886
|
readonly passed: boolean;
|
|
327
887
|
readonly failures: readonly RelayProtocolConformanceFailure[];
|
|
328
888
|
}
|
|
889
|
+
export interface RelayProtocolConformanceResultForVersion<TVersion extends RelayProtocolVersion> {
|
|
890
|
+
readonly protocolVersion: TVersion;
|
|
891
|
+
readonly passed: boolean;
|
|
892
|
+
readonly failures: readonly RelayProtocolConformanceFailure[];
|
|
893
|
+
}
|
|
329
894
|
export declare function runRelayProtocolConformance(adapter: RelayProtocolConformanceAdapter): RelayProtocolConformanceResult;
|
|
895
|
+
export declare function runRelayProtocolConformanceForVersion(...args: readonly [version: "1.0", adapter: RelayProtocolConformanceAdapter]): RelayProtocolConformanceResultForVersion<"1.0">;
|
|
896
|
+
export declare function runRelayProtocolConformanceForVersion(...args: readonly [version: "1.1", adapter: RelayProtocolConformanceAdapterV11]): RelayProtocolConformanceResultForVersion<"1.1">;
|