@heddleagent/execution-host-client 6.0.0-next.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 (152) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +305 -0
  3. package/dist/authority/index.d.ts +3 -0
  4. package/dist/authority/index.d.ts.map +1 -0
  5. package/dist/authority/index.js +2 -0
  6. package/dist/authority/index.js.map +1 -0
  7. package/dist/authority/jose-execution-authority.d.ts +14 -0
  8. package/dist/authority/jose-execution-authority.d.ts.map +1 -0
  9. package/dist/authority/jose-execution-authority.js +266 -0
  10. package/dist/authority/jose-execution-authority.js.map +1 -0
  11. package/dist/authority/types.d.ts +63 -0
  12. package/dist/authority/types.d.ts.map +1 -0
  13. package/dist/authority/types.js +2 -0
  14. package/dist/authority/types.js.map +1 -0
  15. package/dist/contracts/index.d.ts +163 -0
  16. package/dist/contracts/index.d.ts.map +1 -0
  17. package/dist/contracts/index.js +149 -0
  18. package/dist/contracts/index.js.map +1 -0
  19. package/dist/conversation/durable-hosted-conversation-turn-service.d.ts +23 -0
  20. package/dist/conversation/durable-hosted-conversation-turn-service.d.ts.map +1 -0
  21. package/dist/conversation/durable-hosted-conversation-turn-service.js +273 -0
  22. package/dist/conversation/durable-hosted-conversation-turn-service.js.map +1 -0
  23. package/dist/conversation/hosted-conversation-turn-service.d.ts +17 -0
  24. package/dist/conversation/hosted-conversation-turn-service.d.ts.map +1 -0
  25. package/dist/conversation/hosted-conversation-turn-service.js +60 -0
  26. package/dist/conversation/hosted-conversation-turn-service.js.map +1 -0
  27. package/dist/conversation/index.d.ts +7 -0
  28. package/dist/conversation/index.d.ts.map +1 -0
  29. package/dist/conversation/index.js +5 -0
  30. package/dist/conversation/index.js.map +1 -0
  31. package/dist/conversation/lifecycle-types.d.ts +208 -0
  32. package/dist/conversation/lifecycle-types.d.ts.map +1 -0
  33. package/dist/conversation/lifecycle-types.js +92 -0
  34. package/dist/conversation/lifecycle-types.js.map +1 -0
  35. package/dist/conversation/types.d.ts +35 -0
  36. package/dist/conversation/types.d.ts.map +1 -0
  37. package/dist/conversation/types.js +11 -0
  38. package/dist/conversation/types.js.map +1 -0
  39. package/dist/http-sse/direct-http-execution-host.d.ts +12 -0
  40. package/dist/http-sse/direct-http-execution-host.d.ts.map +1 -0
  41. package/dist/http-sse/direct-http-execution-host.js +279 -0
  42. package/dist/http-sse/direct-http-execution-host.js.map +1 -0
  43. package/dist/http-sse/errors.d.ts +19 -0
  44. package/dist/http-sse/errors.d.ts.map +1 -0
  45. package/dist/http-sse/errors.js +29 -0
  46. package/dist/http-sse/errors.js.map +1 -0
  47. package/dist/http-sse/index.d.ts +4 -0
  48. package/dist/http-sse/index.d.ts.map +1 -0
  49. package/dist/http-sse/index.js +3 -0
  50. package/dist/http-sse/index.js.map +1 -0
  51. package/dist/http-sse/types.d.ts +20 -0
  52. package/dist/http-sse/types.d.ts.map +1 -0
  53. package/dist/http-sse/types.js +2 -0
  54. package/dist/http-sse/types.js.map +1 -0
  55. package/dist/index.d.ts +6 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +6 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/mcp/errors.d.ts +11 -0
  60. package/dist/mcp/errors.d.ts.map +1 -0
  61. package/dist/mcp/errors.js +15 -0
  62. package/dist/mcp/errors.js.map +1 -0
  63. package/dist/mcp/index.d.ts +5 -0
  64. package/dist/mcp/index.d.ts.map +1 -0
  65. package/dist/mcp/index.js +3 -0
  66. package/dist/mcp/index.js.map +1 -0
  67. package/dist/mcp/jwt-capability-verifier.d.ts +12 -0
  68. package/dist/mcp/jwt-capability-verifier.d.ts.map +1 -0
  69. package/dist/mcp/jwt-capability-verifier.js +136 -0
  70. package/dist/mcp/jwt-capability-verifier.js.map +1 -0
  71. package/dist/mcp/node/index.d.ts +4 -0
  72. package/dist/mcp/node/index.d.ts.map +1 -0
  73. package/dist/mcp/node/index.js +3 -0
  74. package/dist/mcp/node/index.js.map +1 -0
  75. package/dist/mcp/node/json-toolset.d.ts +23 -0
  76. package/dist/mcp/node/json-toolset.d.ts.map +1 -0
  77. package/dist/mcp/node/json-toolset.js +94 -0
  78. package/dist/mcp/node/json-toolset.js.map +1 -0
  79. package/dist/mcp/node/streamable-http-mcp-service.d.ts +18 -0
  80. package/dist/mcp/node/streamable-http-mcp-service.d.ts.map +1 -0
  81. package/dist/mcp/node/streamable-http-mcp-service.js +229 -0
  82. package/dist/mcp/node/streamable-http-mcp-service.js.map +1 -0
  83. package/dist/mcp/node/types.d.ts +53 -0
  84. package/dist/mcp/node/types.d.ts.map +1 -0
  85. package/dist/mcp/node/types.js +2 -0
  86. package/dist/mcp/node/types.js.map +1 -0
  87. package/dist/mcp/types.d.ts +37 -0
  88. package/dist/mcp/types.d.ts.map +1 -0
  89. package/dist/mcp/types.js +2 -0
  90. package/dist/mcp/types.js.map +1 -0
  91. package/dist/node/authority-key.d.ts +14 -0
  92. package/dist/node/authority-key.d.ts.map +1 -0
  93. package/dist/node/authority-key.js +89 -0
  94. package/dist/node/authority-key.js.map +1 -0
  95. package/dist/node/direct-credentials.d.ts +21 -0
  96. package/dist/node/direct-credentials.d.ts.map +1 -0
  97. package/dist/node/direct-credentials.js +47 -0
  98. package/dist/node/direct-credentials.js.map +1 -0
  99. package/dist/node/http-service.d.ts +21 -0
  100. package/dist/node/http-service.d.ts.map +1 -0
  101. package/dist/node/http-service.js +389 -0
  102. package/dist/node/http-service.js.map +1 -0
  103. package/dist/node/index.d.ts +6 -0
  104. package/dist/node/index.d.ts.map +1 -0
  105. package/dist/node/index.js +4 -0
  106. package/dist/node/index.js.map +1 -0
  107. package/dist/node/types.d.ts +52 -0
  108. package/dist/node/types.d.ts.map +1 -0
  109. package/dist/node/types.js +2 -0
  110. package/dist/node/types.js.map +1 -0
  111. package/dist/testing/event-stream.d.ts +17 -0
  112. package/dist/testing/event-stream.d.ts.map +1 -0
  113. package/dist/testing/event-stream.js +83 -0
  114. package/dist/testing/event-stream.js.map +1 -0
  115. package/dist/testing/hosted-conversation-turn-store-conformance.d.ts +17 -0
  116. package/dist/testing/hosted-conversation-turn-store-conformance.d.ts.map +1 -0
  117. package/dist/testing/hosted-conversation-turn-store-conformance.js +137 -0
  118. package/dist/testing/hosted-conversation-turn-store-conformance.js.map +1 -0
  119. package/dist/testing/index.d.ts +5 -0
  120. package/dist/testing/index.d.ts.map +1 -0
  121. package/dist/testing/index.js +3 -0
  122. package/dist/testing/index.js.map +1 -0
  123. package/dist/testing/invocation.d.ts +20 -0
  124. package/dist/testing/invocation.d.ts.map +1 -0
  125. package/dist/testing/invocation.js +39 -0
  126. package/dist/testing/invocation.js.map +1 -0
  127. package/dist/testing/local-execution-host-contract-fixture.d.ts +21 -0
  128. package/dist/testing/local-execution-host-contract-fixture.d.ts.map +1 -0
  129. package/dist/testing/local-execution-host-contract-fixture.js +197 -0
  130. package/dist/testing/local-execution-host-contract-fixture.js.map +1 -0
  131. package/dist/testing/request.d.ts +10 -0
  132. package/dist/testing/request.d.ts.map +1 -0
  133. package/dist/testing/request.js +140 -0
  134. package/dist/testing/request.js.map +1 -0
  135. package/dist/testing/types.d.ts +42 -0
  136. package/dist/testing/types.d.ts.map +1 -0
  137. package/dist/testing/types.js +2 -0
  138. package/dist/testing/types.js.map +1 -0
  139. package/package.json +92 -0
  140. package/spec/v1/README.md +101 -0
  141. package/spec/v1/durable-hosted-conversation-lifecycle.md +139 -0
  142. package/spec/v1/fixtures/ambiguous-eof.sse +9 -0
  143. package/spec/v1/fixtures/authority.json +70 -0
  144. package/spec/v1/fixtures/cancelled.sse +9 -0
  145. package/spec/v1/fixtures/durable-conversation-lifecycle.json +890 -0
  146. package/spec/v1/fixtures/invalid-request-extra-field.json +8 -0
  147. package/spec/v1/fixtures/invalid-sequence-gap.sse +9 -0
  148. package/spec/v1/fixtures/manifest.json +53 -0
  149. package/spec/v1/fixtures/valid-request.json +7 -0
  150. package/spec/v1/fixtures/valid-result.sse +13 -0
  151. package/spec/v1/openapi.json +896 -0
  152. package/spec/v1/schema-bundle.json +1286 -0
@@ -0,0 +1,890 @@
1
+ {
2
+ "profile": "durable-hosted-conversation-lifecycle",
3
+ "contractVersion": 1,
4
+ "summaryCharacterUnit": "unicode-code-point",
5
+ "statuses": [
6
+ "requested",
7
+ "running",
8
+ "completed",
9
+ "max_steps",
10
+ "failed",
11
+ "cancelled",
12
+ "interrupted"
13
+ ],
14
+ "failureCodes": [
15
+ "execution_error",
16
+ "execution_failed",
17
+ "execution_result_error",
18
+ "host_protocol_error",
19
+ "host_rejected",
20
+ "model_authentication",
21
+ "model_context_window",
22
+ "model_empty_response",
23
+ "model_permission",
24
+ "model_quota",
25
+ "model_rate_limit",
26
+ "model_request",
27
+ "model_transport",
28
+ "model_unknown",
29
+ "deadline_elapsed",
30
+ "execution_interrupted",
31
+ "invocation_aborted",
32
+ "stream_ended_without_terminal",
33
+ "stream_interrupted",
34
+ "invocation_cancelled"
35
+ ],
36
+ "scope": {
37
+ "tenantId": "tenant-a",
38
+ "subjectId": "subject-a",
39
+ "productSessionId": "product-session-a"
40
+ },
41
+ "otherScope": {
42
+ "tenantId": "tenant-b",
43
+ "subjectId": "subject-b",
44
+ "productSessionId": "product-session-b"
45
+ },
46
+ "timestamps": {
47
+ "requestedAt": "2026-08-14T00:00:00.000Z",
48
+ "acceptedAt": "2026-08-14T00:00:01.000Z",
49
+ "settledAt": "2026-08-14T00:00:02.000Z",
50
+ "deadlineAt": "2026-08-14T00:05:00.000Z"
51
+ },
52
+ "terminalProjectionCases": [
53
+ {
54
+ "id": "completed",
55
+ "maxSummaryCharacters": 100,
56
+ "event": {
57
+ "schemaVersion": 1,
58
+ "invocationId": "lifecycle-invocation-001",
59
+ "runId": "lifecycle-run-001",
60
+ "timestamp": "2026-08-14T00:00:02.000Z",
61
+ "sequence": 1,
62
+ "kind": "result",
63
+ "result": {
64
+ "outcome": "done",
65
+ "summary": "Done."
66
+ }
67
+ },
68
+ "expectedEvent": {
69
+ "schemaVersion": 1,
70
+ "invocationId": "lifecycle-invocation-001",
71
+ "runId": "lifecycle-run-001",
72
+ "timestamp": "2026-08-14T00:00:02.000Z",
73
+ "sequence": 1,
74
+ "kind": "result",
75
+ "result": {
76
+ "outcome": "done",
77
+ "summary": "Done."
78
+ }
79
+ },
80
+ "expectedSettlement": {
81
+ "status": "completed",
82
+ "summary": "Done."
83
+ }
84
+ },
85
+ {
86
+ "id": "max-steps",
87
+ "maxSummaryCharacters": 100,
88
+ "event": {
89
+ "schemaVersion": 1,
90
+ "invocationId": "lifecycle-invocation-001",
91
+ "runId": "lifecycle-run-001",
92
+ "timestamp": "2026-08-14T00:00:02.000Z",
93
+ "sequence": 1,
94
+ "kind": "result",
95
+ "result": {
96
+ "outcome": "max_steps",
97
+ "summary": "Part."
98
+ }
99
+ },
100
+ "expectedEvent": {
101
+ "schemaVersion": 1,
102
+ "invocationId": "lifecycle-invocation-001",
103
+ "runId": "lifecycle-run-001",
104
+ "timestamp": "2026-08-14T00:00:02.000Z",
105
+ "sequence": 1,
106
+ "kind": "result",
107
+ "result": {
108
+ "outcome": "max_steps",
109
+ "summary": "Part."
110
+ }
111
+ },
112
+ "expectedSettlement": {
113
+ "status": "max_steps",
114
+ "summary": "Part."
115
+ }
116
+ },
117
+ {
118
+ "id": "result-error",
119
+ "maxSummaryCharacters": 100,
120
+ "event": {
121
+ "schemaVersion": 1,
122
+ "invocationId": "lifecycle-invocation-001",
123
+ "runId": "lifecycle-run-001",
124
+ "timestamp": "2026-08-14T00:00:02.000Z",
125
+ "sequence": 1,
126
+ "kind": "result",
127
+ "result": {
128
+ "outcome": "error"
129
+ }
130
+ },
131
+ "expectedEvent": {
132
+ "schemaVersion": 1,
133
+ "invocationId": "lifecycle-invocation-001",
134
+ "runId": "lifecycle-run-001",
135
+ "timestamp": "2026-08-14T00:00:02.000Z",
136
+ "sequence": 1,
137
+ "kind": "result",
138
+ "result": {
139
+ "outcome": "error"
140
+ }
141
+ },
142
+ "expectedSettlement": {
143
+ "status": "failed",
144
+ "failureCode": "execution_result_error"
145
+ }
146
+ },
147
+ {
148
+ "id": "result-interrupted",
149
+ "maxSummaryCharacters": 100,
150
+ "event": {
151
+ "schemaVersion": 1,
152
+ "invocationId": "lifecycle-invocation-001",
153
+ "runId": "lifecycle-run-001",
154
+ "timestamp": "2026-08-14T00:00:02.000Z",
155
+ "sequence": 1,
156
+ "kind": "result",
157
+ "result": {
158
+ "outcome": "interrupted",
159
+ "summary": "Part."
160
+ }
161
+ },
162
+ "expectedEvent": {
163
+ "schemaVersion": 1,
164
+ "invocationId": "lifecycle-invocation-001",
165
+ "runId": "lifecycle-run-001",
166
+ "timestamp": "2026-08-14T00:00:02.000Z",
167
+ "sequence": 1,
168
+ "kind": "result",
169
+ "result": {
170
+ "outcome": "interrupted",
171
+ "summary": "Part."
172
+ }
173
+ },
174
+ "expectedSettlement": {
175
+ "status": "interrupted",
176
+ "summary": "Part.",
177
+ "failureCode": "execution_interrupted"
178
+ }
179
+ },
180
+ {
181
+ "id": "model-authentication",
182
+ "maxSummaryCharacters": 100,
183
+ "event": {
184
+ "schemaVersion": 1,
185
+ "invocationId": "lifecycle-invocation-001",
186
+ "runId": "lifecycle-run-001",
187
+ "timestamp": "2026-08-14T00:00:02.000Z",
188
+ "sequence": 1,
189
+ "kind": "result",
190
+ "result": {
191
+ "outcome": "error",
192
+ "failure": {
193
+ "source": "model",
194
+ "code": "authentication"
195
+ }
196
+ }
197
+ },
198
+ "expectedEvent": {
199
+ "schemaVersion": 1,
200
+ "invocationId": "lifecycle-invocation-001",
201
+ "runId": "lifecycle-run-001",
202
+ "timestamp": "2026-08-14T00:00:02.000Z",
203
+ "sequence": 1,
204
+ "kind": "result",
205
+ "result": {
206
+ "outcome": "error",
207
+ "failure": {
208
+ "source": "model",
209
+ "code": "authentication"
210
+ }
211
+ }
212
+ },
213
+ "expectedSettlement": {
214
+ "status": "failed",
215
+ "failureCode": "model_authentication"
216
+ }
217
+ },
218
+ {
219
+ "id": "model-permission",
220
+ "maxSummaryCharacters": 100,
221
+ "event": {
222
+ "schemaVersion": 1,
223
+ "invocationId": "lifecycle-invocation-001",
224
+ "runId": "lifecycle-run-001",
225
+ "timestamp": "2026-08-14T00:00:02.000Z",
226
+ "sequence": 1,
227
+ "kind": "result",
228
+ "result": {
229
+ "outcome": "error",
230
+ "failure": {
231
+ "source": "model",
232
+ "code": "permission"
233
+ }
234
+ }
235
+ },
236
+ "expectedEvent": {
237
+ "schemaVersion": 1,
238
+ "invocationId": "lifecycle-invocation-001",
239
+ "runId": "lifecycle-run-001",
240
+ "timestamp": "2026-08-14T00:00:02.000Z",
241
+ "sequence": 1,
242
+ "kind": "result",
243
+ "result": {
244
+ "outcome": "error",
245
+ "failure": {
246
+ "source": "model",
247
+ "code": "permission"
248
+ }
249
+ }
250
+ },
251
+ "expectedSettlement": {
252
+ "status": "failed",
253
+ "failureCode": "model_permission"
254
+ }
255
+ },
256
+ {
257
+ "id": "model-quota",
258
+ "maxSummaryCharacters": 100,
259
+ "event": {
260
+ "schemaVersion": 1,
261
+ "invocationId": "lifecycle-invocation-001",
262
+ "runId": "lifecycle-run-001",
263
+ "timestamp": "2026-08-14T00:00:02.000Z",
264
+ "sequence": 1,
265
+ "kind": "result",
266
+ "result": {
267
+ "outcome": "error",
268
+ "failure": {
269
+ "source": "model",
270
+ "code": "quota"
271
+ }
272
+ }
273
+ },
274
+ "expectedEvent": {
275
+ "schemaVersion": 1,
276
+ "invocationId": "lifecycle-invocation-001",
277
+ "runId": "lifecycle-run-001",
278
+ "timestamp": "2026-08-14T00:00:02.000Z",
279
+ "sequence": 1,
280
+ "kind": "result",
281
+ "result": {
282
+ "outcome": "error",
283
+ "failure": {
284
+ "source": "model",
285
+ "code": "quota"
286
+ }
287
+ }
288
+ },
289
+ "expectedSettlement": {
290
+ "status": "failed",
291
+ "failureCode": "model_quota"
292
+ }
293
+ },
294
+ {
295
+ "id": "model-rate_limit",
296
+ "maxSummaryCharacters": 100,
297
+ "event": {
298
+ "schemaVersion": 1,
299
+ "invocationId": "lifecycle-invocation-001",
300
+ "runId": "lifecycle-run-001",
301
+ "timestamp": "2026-08-14T00:00:02.000Z",
302
+ "sequence": 1,
303
+ "kind": "result",
304
+ "result": {
305
+ "outcome": "error",
306
+ "failure": {
307
+ "source": "model",
308
+ "code": "rate_limit"
309
+ }
310
+ }
311
+ },
312
+ "expectedEvent": {
313
+ "schemaVersion": 1,
314
+ "invocationId": "lifecycle-invocation-001",
315
+ "runId": "lifecycle-run-001",
316
+ "timestamp": "2026-08-14T00:00:02.000Z",
317
+ "sequence": 1,
318
+ "kind": "result",
319
+ "result": {
320
+ "outcome": "error",
321
+ "failure": {
322
+ "source": "model",
323
+ "code": "rate_limit"
324
+ }
325
+ }
326
+ },
327
+ "expectedSettlement": {
328
+ "status": "failed",
329
+ "failureCode": "model_rate_limit"
330
+ }
331
+ },
332
+ {
333
+ "id": "model-context_window",
334
+ "maxSummaryCharacters": 100,
335
+ "event": {
336
+ "schemaVersion": 1,
337
+ "invocationId": "lifecycle-invocation-001",
338
+ "runId": "lifecycle-run-001",
339
+ "timestamp": "2026-08-14T00:00:02.000Z",
340
+ "sequence": 1,
341
+ "kind": "result",
342
+ "result": {
343
+ "outcome": "error",
344
+ "failure": {
345
+ "source": "model",
346
+ "code": "context_window"
347
+ }
348
+ }
349
+ },
350
+ "expectedEvent": {
351
+ "schemaVersion": 1,
352
+ "invocationId": "lifecycle-invocation-001",
353
+ "runId": "lifecycle-run-001",
354
+ "timestamp": "2026-08-14T00:00:02.000Z",
355
+ "sequence": 1,
356
+ "kind": "result",
357
+ "result": {
358
+ "outcome": "error",
359
+ "failure": {
360
+ "source": "model",
361
+ "code": "context_window"
362
+ }
363
+ }
364
+ },
365
+ "expectedSettlement": {
366
+ "status": "failed",
367
+ "failureCode": "model_context_window"
368
+ }
369
+ },
370
+ {
371
+ "id": "model-request",
372
+ "maxSummaryCharacters": 100,
373
+ "event": {
374
+ "schemaVersion": 1,
375
+ "invocationId": "lifecycle-invocation-001",
376
+ "runId": "lifecycle-run-001",
377
+ "timestamp": "2026-08-14T00:00:02.000Z",
378
+ "sequence": 1,
379
+ "kind": "result",
380
+ "result": {
381
+ "outcome": "error",
382
+ "failure": {
383
+ "source": "model",
384
+ "code": "request"
385
+ }
386
+ }
387
+ },
388
+ "expectedEvent": {
389
+ "schemaVersion": 1,
390
+ "invocationId": "lifecycle-invocation-001",
391
+ "runId": "lifecycle-run-001",
392
+ "timestamp": "2026-08-14T00:00:02.000Z",
393
+ "sequence": 1,
394
+ "kind": "result",
395
+ "result": {
396
+ "outcome": "error",
397
+ "failure": {
398
+ "source": "model",
399
+ "code": "request"
400
+ }
401
+ }
402
+ },
403
+ "expectedSettlement": {
404
+ "status": "failed",
405
+ "failureCode": "model_request"
406
+ }
407
+ },
408
+ {
409
+ "id": "model-transport",
410
+ "maxSummaryCharacters": 100,
411
+ "event": {
412
+ "schemaVersion": 1,
413
+ "invocationId": "lifecycle-invocation-001",
414
+ "runId": "lifecycle-run-001",
415
+ "timestamp": "2026-08-14T00:00:02.000Z",
416
+ "sequence": 1,
417
+ "kind": "result",
418
+ "result": {
419
+ "outcome": "error",
420
+ "failure": {
421
+ "source": "model",
422
+ "code": "transport"
423
+ }
424
+ }
425
+ },
426
+ "expectedEvent": {
427
+ "schemaVersion": 1,
428
+ "invocationId": "lifecycle-invocation-001",
429
+ "runId": "lifecycle-run-001",
430
+ "timestamp": "2026-08-14T00:00:02.000Z",
431
+ "sequence": 1,
432
+ "kind": "result",
433
+ "result": {
434
+ "outcome": "error",
435
+ "failure": {
436
+ "source": "model",
437
+ "code": "transport"
438
+ }
439
+ }
440
+ },
441
+ "expectedSettlement": {
442
+ "status": "failed",
443
+ "failureCode": "model_transport"
444
+ }
445
+ },
446
+ {
447
+ "id": "model-empty_response",
448
+ "maxSummaryCharacters": 100,
449
+ "event": {
450
+ "schemaVersion": 1,
451
+ "invocationId": "lifecycle-invocation-001",
452
+ "runId": "lifecycle-run-001",
453
+ "timestamp": "2026-08-14T00:00:02.000Z",
454
+ "sequence": 1,
455
+ "kind": "result",
456
+ "result": {
457
+ "outcome": "error",
458
+ "failure": {
459
+ "source": "model",
460
+ "code": "empty_response"
461
+ }
462
+ }
463
+ },
464
+ "expectedEvent": {
465
+ "schemaVersion": 1,
466
+ "invocationId": "lifecycle-invocation-001",
467
+ "runId": "lifecycle-run-001",
468
+ "timestamp": "2026-08-14T00:00:02.000Z",
469
+ "sequence": 1,
470
+ "kind": "result",
471
+ "result": {
472
+ "outcome": "error",
473
+ "failure": {
474
+ "source": "model",
475
+ "code": "empty_response"
476
+ }
477
+ }
478
+ },
479
+ "expectedSettlement": {
480
+ "status": "failed",
481
+ "failureCode": "model_empty_response"
482
+ }
483
+ },
484
+ {
485
+ "id": "model-unknown",
486
+ "maxSummaryCharacters": 100,
487
+ "event": {
488
+ "schemaVersion": 1,
489
+ "invocationId": "lifecycle-invocation-001",
490
+ "runId": "lifecycle-run-001",
491
+ "timestamp": "2026-08-14T00:00:02.000Z",
492
+ "sequence": 1,
493
+ "kind": "result",
494
+ "result": {
495
+ "outcome": "error",
496
+ "failure": {
497
+ "source": "model",
498
+ "code": "unknown"
499
+ }
500
+ }
501
+ },
502
+ "expectedEvent": {
503
+ "schemaVersion": 1,
504
+ "invocationId": "lifecycle-invocation-001",
505
+ "runId": "lifecycle-run-001",
506
+ "timestamp": "2026-08-14T00:00:02.000Z",
507
+ "sequence": 1,
508
+ "kind": "result",
509
+ "result": {
510
+ "outcome": "error",
511
+ "failure": {
512
+ "source": "model",
513
+ "code": "unknown"
514
+ }
515
+ }
516
+ },
517
+ "expectedSettlement": {
518
+ "status": "failed",
519
+ "failureCode": "model_unknown"
520
+ }
521
+ },
522
+ {
523
+ "id": "explicit-cancellation",
524
+ "maxSummaryCharacters": 100,
525
+ "event": {
526
+ "schemaVersion": 1,
527
+ "invocationId": "lifecycle-invocation-001",
528
+ "runId": "lifecycle-run-001",
529
+ "timestamp": "2026-08-14T00:00:02.000Z",
530
+ "sequence": 1,
531
+ "kind": "cancelled",
532
+ "reason": "private cancellation detail"
533
+ },
534
+ "expectedEvent": {
535
+ "schemaVersion": 1,
536
+ "invocationId": "lifecycle-invocation-001",
537
+ "runId": "lifecycle-run-001",
538
+ "timestamp": "2026-08-14T00:00:02.000Z",
539
+ "sequence": 1,
540
+ "kind": "cancelled",
541
+ "reason": "private cancellation detail"
542
+ },
543
+ "expectedSettlement": {
544
+ "status": "cancelled",
545
+ "failureCode": "invocation_cancelled"
546
+ }
547
+ },
548
+ {
549
+ "id": "public-host-error",
550
+ "maxSummaryCharacters": 100,
551
+ "event": {
552
+ "schemaVersion": 1,
553
+ "invocationId": "lifecycle-invocation-001",
554
+ "runId": "lifecycle-run-001",
555
+ "timestamp": "2026-08-14T00:00:02.000Z",
556
+ "sequence": 1,
557
+ "kind": "error",
558
+ "error": {
559
+ "code": "provider_token_ghp_secret",
560
+ "message": "private host detail"
561
+ }
562
+ },
563
+ "expectedEvent": {
564
+ "schemaVersion": 1,
565
+ "invocationId": "lifecycle-invocation-001",
566
+ "runId": "lifecycle-run-001",
567
+ "timestamp": "2026-08-14T00:00:02.000Z",
568
+ "sequence": 1,
569
+ "kind": "error",
570
+ "error": {
571
+ "code": "provider_token_ghp_secret",
572
+ "message": "private host detail"
573
+ }
574
+ },
575
+ "expectedSettlement": {
576
+ "status": "failed",
577
+ "failureCode": "execution_error"
578
+ }
579
+ },
580
+ {
581
+ "id": "unicode-summary-bound",
582
+ "maxSummaryCharacters": 5,
583
+ "event": {
584
+ "schemaVersion": 1,
585
+ "invocationId": "lifecycle-invocation-001",
586
+ "runId": "lifecycle-run-001",
587
+ "timestamp": "2026-08-14T00:00:02.000Z",
588
+ "sequence": 1,
589
+ "kind": "result",
590
+ "result": {
591
+ "outcome": "done",
592
+ "summary": "A😀BCDE"
593
+ }
594
+ },
595
+ "expectedEvent": {
596
+ "schemaVersion": 1,
597
+ "invocationId": "lifecycle-invocation-001",
598
+ "runId": "lifecycle-run-001",
599
+ "timestamp": "2026-08-14T00:00:02.000Z",
600
+ "sequence": 1,
601
+ "kind": "result",
602
+ "result": {
603
+ "outcome": "done",
604
+ "summary": "A😀BCD"
605
+ }
606
+ },
607
+ "expectedSettlement": {
608
+ "status": "completed",
609
+ "summary": "A😀BCD"
610
+ }
611
+ }
612
+ ],
613
+ "thrownFailureCases": [
614
+ {
615
+ "id": "stream-interrupted",
616
+ "expectedSettlement": {
617
+ "status": "interrupted",
618
+ "failureCode": "stream_interrupted"
619
+ }
620
+ },
621
+ {
622
+ "id": "invocation-aborted",
623
+ "expectedSettlement": {
624
+ "status": "interrupted",
625
+ "failureCode": "invocation_aborted"
626
+ }
627
+ },
628
+ {
629
+ "id": "protocol-error",
630
+ "expectedSettlement": {
631
+ "status": "failed",
632
+ "failureCode": "host_protocol_error"
633
+ }
634
+ },
635
+ {
636
+ "id": "host-rejected",
637
+ "expectedSettlement": {
638
+ "status": "failed",
639
+ "failureCode": "host_rejected"
640
+ }
641
+ },
642
+ {
643
+ "id": "unexpected-error",
644
+ "expectedSettlement": {
645
+ "status": "failed",
646
+ "failureCode": "execution_failed"
647
+ }
648
+ }
649
+ ],
650
+ "storeCases": {
651
+ "lifecycleAndFencing": {
652
+ "requested": {
653
+ "invocationId": "lifecycle-invocation-001",
654
+ "scope": {
655
+ "tenantId": "tenant-a",
656
+ "subjectId": "subject-a",
657
+ "productSessionId": "product-session-a"
658
+ },
659
+ "prompt": "Run the durable lifecycle conformance case.",
660
+ "deadlineAt": "2026-08-14T00:05:00.000Z",
661
+ "requestedAt": "2026-08-14T00:00:00.000Z"
662
+ },
663
+ "wrongScopeAccepted": {
664
+ "invocationId": "lifecycle-invocation-001",
665
+ "scope": {
666
+ "tenantId": "tenant-b",
667
+ "subjectId": "subject-b",
668
+ "productSessionId": "product-session-b"
669
+ },
670
+ "runId": "lifecycle-run-001",
671
+ "acceptedAt": "2026-08-14T00:00:01.000Z"
672
+ },
673
+ "accepted": {
674
+ "invocationId": "lifecycle-invocation-001",
675
+ "scope": {
676
+ "tenantId": "tenant-a",
677
+ "subjectId": "subject-a",
678
+ "productSessionId": "product-session-a"
679
+ },
680
+ "runId": "lifecycle-run-001",
681
+ "acceptedAt": "2026-08-14T00:00:01.000Z"
682
+ },
683
+ "conflictingAccepted": {
684
+ "invocationId": "lifecycle-invocation-001",
685
+ "scope": {
686
+ "tenantId": "tenant-a",
687
+ "subjectId": "subject-a",
688
+ "productSessionId": "product-session-a"
689
+ },
690
+ "runId": "lifecycle-run-conflict",
691
+ "acceptedAt": "2026-08-14T00:00:01.000Z"
692
+ },
693
+ "conflictingAcceptedAt": {
694
+ "invocationId": "lifecycle-invocation-001",
695
+ "scope": {
696
+ "tenantId": "tenant-a",
697
+ "subjectId": "subject-a",
698
+ "productSessionId": "product-session-a"
699
+ },
700
+ "runId": "lifecycle-run-001",
701
+ "acceptedAt": "2026-08-14T00:00:01.500Z"
702
+ },
703
+ "completed": {
704
+ "invocationId": "lifecycle-invocation-001",
705
+ "scope": {
706
+ "tenantId": "tenant-a",
707
+ "subjectId": "subject-a",
708
+ "productSessionId": "product-session-a"
709
+ },
710
+ "status": "completed",
711
+ "summary": "Done.",
712
+ "settledAt": "2026-08-14T00:00:02.000Z"
713
+ },
714
+ "wrongScopeCompleted": {
715
+ "invocationId": "lifecycle-invocation-001",
716
+ "scope": {
717
+ "tenantId": "tenant-b",
718
+ "subjectId": "subject-b",
719
+ "productSessionId": "product-session-b"
720
+ },
721
+ "status": "completed",
722
+ "summary": "Done.",
723
+ "settledAt": "2026-08-14T00:00:02.000Z"
724
+ },
725
+ "conflictingCompleted": {
726
+ "invocationId": "lifecycle-invocation-001",
727
+ "scope": {
728
+ "tenantId": "tenant-a",
729
+ "subjectId": "subject-a",
730
+ "productSessionId": "product-session-a"
731
+ },
732
+ "status": "failed",
733
+ "settledAt": "2026-08-14T00:00:02.000Z",
734
+ "failureCode": "execution_failed"
735
+ },
736
+ "conflictingSettledAt": {
737
+ "invocationId": "lifecycle-invocation-001",
738
+ "scope": {
739
+ "tenantId": "tenant-a",
740
+ "subjectId": "subject-a",
741
+ "productSessionId": "product-session-a"
742
+ },
743
+ "status": "completed",
744
+ "summary": "Done.",
745
+ "settledAt": "2026-08-14T00:00:02.500Z"
746
+ },
747
+ "expectedRunning": {
748
+ "invocationId": "lifecycle-invocation-001",
749
+ "scope": {
750
+ "tenantId": "tenant-a",
751
+ "subjectId": "subject-a",
752
+ "productSessionId": "product-session-a"
753
+ },
754
+ "prompt": "Run the durable lifecycle conformance case.",
755
+ "deadlineAt": "2026-08-14T00:05:00.000Z",
756
+ "requestedAt": "2026-08-14T00:00:00.000Z",
757
+ "status": "running",
758
+ "runId": "lifecycle-run-001",
759
+ "acceptedAt": "2026-08-14T00:00:01.000Z"
760
+ },
761
+ "expectedCompleted": {
762
+ "invocationId": "lifecycle-invocation-001",
763
+ "scope": {
764
+ "tenantId": "tenant-a",
765
+ "subjectId": "subject-a",
766
+ "productSessionId": "product-session-a"
767
+ },
768
+ "prompt": "Run the durable lifecycle conformance case.",
769
+ "deadlineAt": "2026-08-14T00:05:00.000Z",
770
+ "requestedAt": "2026-08-14T00:00:00.000Z",
771
+ "status": "completed",
772
+ "runId": "lifecycle-run-001",
773
+ "acceptedAt": "2026-08-14T00:00:01.000Z",
774
+ "summary": "Done.",
775
+ "settledAt": "2026-08-14T00:00:02.000Z"
776
+ }
777
+ },
778
+ "preAcceptanceFailure": {
779
+ "requested": {
780
+ "invocationId": "lifecycle-pre-accept-failure",
781
+ "scope": {
782
+ "tenantId": "tenant-a",
783
+ "subjectId": "subject-a",
784
+ "productSessionId": "product-session-a"
785
+ },
786
+ "prompt": "Run the durable lifecycle conformance case.",
787
+ "deadlineAt": "2026-08-14T00:05:00.000Z",
788
+ "requestedAt": "2026-08-14T00:00:00.000Z"
789
+ },
790
+ "settlement": {
791
+ "invocationId": "lifecycle-pre-accept-failure",
792
+ "scope": {
793
+ "tenantId": "tenant-a",
794
+ "subjectId": "subject-a",
795
+ "productSessionId": "product-session-a"
796
+ },
797
+ "status": "failed",
798
+ "failureCode": "execution_failed",
799
+ "settledAt": "2026-08-14T00:00:02.000Z"
800
+ }
801
+ },
802
+ "expiry": {
803
+ "expiredRequested": {
804
+ "invocationId": "lifecycle-expired-requested",
805
+ "scope": {
806
+ "tenantId": "tenant-a",
807
+ "subjectId": "subject-a",
808
+ "productSessionId": "product-session-a"
809
+ },
810
+ "prompt": "Run the durable lifecycle conformance case.",
811
+ "deadlineAt": "2026-08-13T23:58:00.000Z",
812
+ "requestedAt": "2026-08-13T23:55:00.000Z"
813
+ },
814
+ "expiredRunning": {
815
+ "invocationId": "lifecycle-expired-running",
816
+ "scope": {
817
+ "tenantId": "tenant-a",
818
+ "subjectId": "subject-a",
819
+ "productSessionId": "product-session-a"
820
+ },
821
+ "prompt": "Run the durable lifecycle conformance case.",
822
+ "deadlineAt": "2026-08-13T23:58:00.000Z",
823
+ "requestedAt": "2026-08-13T23:55:00.000Z"
824
+ },
825
+ "expiredRunningAcceptance": {
826
+ "invocationId": "lifecycle-expired-running",
827
+ "scope": {
828
+ "tenantId": "tenant-a",
829
+ "subjectId": "subject-a",
830
+ "productSessionId": "product-session-a"
831
+ },
832
+ "runId": "lifecycle-expired-run",
833
+ "acceptedAt": "2026-08-13T23:56:00.000Z"
834
+ },
835
+ "futureRequested": {
836
+ "invocationId": "lifecycle-future-requested",
837
+ "scope": {
838
+ "tenantId": "tenant-a",
839
+ "subjectId": "subject-a",
840
+ "productSessionId": "product-session-a"
841
+ },
842
+ "prompt": "Run the durable lifecycle conformance case.",
843
+ "deadlineAt": "2026-08-14T00:10:00.000Z",
844
+ "requestedAt": "2026-08-14T00:00:00.000Z"
845
+ },
846
+ "terminalRequested": {
847
+ "invocationId": "lifecycle-terminal-before-expiry",
848
+ "scope": {
849
+ "tenantId": "tenant-a",
850
+ "subjectId": "subject-a",
851
+ "productSessionId": "product-session-a"
852
+ },
853
+ "prompt": "Run the durable lifecycle conformance case.",
854
+ "deadlineAt": "2026-08-13T23:58:00.000Z",
855
+ "requestedAt": "2026-08-13T23:55:00.000Z"
856
+ },
857
+ "terminalSettlement": {
858
+ "invocationId": "lifecycle-terminal-before-expiry",
859
+ "scope": {
860
+ "tenantId": "tenant-a",
861
+ "subjectId": "subject-a",
862
+ "productSessionId": "product-session-a"
863
+ },
864
+ "status": "failed",
865
+ "failureCode": "execution_failed",
866
+ "settledAt": "2026-08-13T23:57:00.000Z"
867
+ },
868
+ "otherScopeExpired": {
869
+ "invocationId": "lifecycle-other-scope-expired",
870
+ "scope": {
871
+ "tenantId": "tenant-b",
872
+ "subjectId": "subject-b",
873
+ "productSessionId": "product-session-b"
874
+ },
875
+ "prompt": "Run the durable lifecycle conformance case.",
876
+ "deadlineAt": "2026-08-13T23:58:00.000Z",
877
+ "requestedAt": "2026-08-13T23:55:00.000Z"
878
+ },
879
+ "reconciliation": {
880
+ "scope": {
881
+ "tenantId": "tenant-a",
882
+ "subjectId": "subject-a",
883
+ "productSessionId": "product-session-a"
884
+ },
885
+ "expiredBefore": "2026-08-13T23:59:00.000Z",
886
+ "settledAt": "2026-08-14T00:00:02.000Z"
887
+ }
888
+ }
889
+ }
890
+ }