@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,896 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
4
+ "info": {
5
+ "title": "Heddle Execution Host invocation contract",
6
+ "version": "1.0.0",
7
+ "description": "The language-neutral HTTP/SSE binding between an adopter backend and a Heddle-compatible Execution Host. Deployment authentication and runtime routing are binding concerns; credentials stay in headers and never enter the JSON request body."
8
+ },
9
+ "servers": [],
10
+ "paths": {
11
+ "/invocations": {
12
+ "post": {
13
+ "operationId": "streamConversationTurn",
14
+ "summary": "Run one hosted conversation turn",
15
+ "description": "Starts one conversation turn and holds one SSE response open until a terminal event or an ambiguous interruption. A clean HTTP EOF is required before a terminal frame may be committed as final.",
16
+ "parameters": [
17
+ {
18
+ "name": "x-amzn-bedrock-agentcore-runtime-session-id",
19
+ "in": "header",
20
+ "required": true,
21
+ "description": "Logical runtimeSessionId. AgentCore supplies this exact header; another deployment adapter must preserve the same value.",
22
+ "schema": {
23
+ "type": "string",
24
+ "minLength": 33,
25
+ "maxLength": 256
26
+ },
27
+ "x-heddle-binding": "agentcore-runtime"
28
+ },
29
+ {
30
+ "name": "x-heddle-execution-host-assertion",
31
+ "in": "header",
32
+ "required": true,
33
+ "description": "Short-lived ES256 admission assertion issued by the adopter backend.",
34
+ "schema": {
35
+ "type": "string",
36
+ "minLength": 32,
37
+ "maxLength": 4096
38
+ }
39
+ },
40
+ {
41
+ "name": "x-heddle-execution-host-mcp-capability",
42
+ "in": "header",
43
+ "required": false,
44
+ "description": "Optional invocation-bound capability forwarded only to the configured adopter MCP server.",
45
+ "schema": {
46
+ "type": "string",
47
+ "minLength": 32,
48
+ "maxLength": 4096
49
+ }
50
+ },
51
+ {
52
+ "name": "x-heddle-execution-host-model-api-key",
53
+ "in": "header",
54
+ "required": true,
55
+ "description": "Invocation-scoped model credential. It must be scrubbed before parsing or logging.",
56
+ "schema": {
57
+ "type": "string",
58
+ "minLength": 8,
59
+ "maxLength": 4096
60
+ }
61
+ },
62
+ {
63
+ "name": "x-heddle-execution-host-local-token",
64
+ "in": "header",
65
+ "required": false,
66
+ "description": "Loopback-only direct-development ingress token; managed deployments use their provider ingress instead.",
67
+ "schema": {
68
+ "type": "string",
69
+ "minLength": 8,
70
+ "maxLength": 4096
71
+ },
72
+ "x-heddle-binding": "direct-development"
73
+ }
74
+ ],
75
+ "requestBody": {
76
+ "required": true,
77
+ "content": {
78
+ "application/json": {
79
+ "schema": {
80
+ "$ref": "#/components/schemas/ConversationTurnRequest"
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "responses": {
86
+ "200": {
87
+ "description": "Ordered SSE stream. Each frame uses id=<sequence>, event=<kind>, and one JSON event in data. accepted is sequence zero; exactly one result, cancelled, or error terminal is last.",
88
+ "headers": {
89
+ "Cache-Control": {
90
+ "schema": {
91
+ "type": "string",
92
+ "const": "no-store"
93
+ }
94
+ },
95
+ "X-Content-Type-Options": {
96
+ "schema": {
97
+ "type": "string",
98
+ "const": "nosniff"
99
+ }
100
+ }
101
+ },
102
+ "content": {
103
+ "text/event-stream": {
104
+ "schema": {
105
+ "type": "string"
106
+ },
107
+ "example": "id: 0\nevent: accepted\ndata: {\"schemaVersion\":1,\"invocationId\":\"invocation-001\",\"runId\":\"run-001\",\"sequence\":0,\"timestamp\":\"2026-08-10T04:00:00.000Z\",\"kind\":\"accepted\"}\n\nid: 1\nevent: activity\ndata: {\"schemaVersion\":1,\"invocationId\":\"invocation-001\",\"runId\":\"run-001\",\"sequence\":1,\"timestamp\":\"2026-08-10T04:00:00.000Z\",\"kind\":\"activity\",\"activity\":{\"type\":\"assistant_text_delta\",\"text\":\"Working.\"}}\n\nid: 2\nevent: result\ndata: {\"schemaVersion\":1,\"invocationId\":\"invocation-001\",\"runId\":\"run-001\",\"sequence\":2,\"timestamp\":\"2026-08-10T04:00:00.000Z\",\"kind\":\"result\",\"result\":{\"outcome\":\"done\",\"summary\":\"Complete.\"}}\n\n: fixture-clean-eof\n"
108
+ }
109
+ }
110
+ },
111
+ "400": {
112
+ "description": "Invalid request or duplicated sensitive header.",
113
+ "content": {
114
+ "application/json": {
115
+ "schema": {
116
+ "$ref": "#/components/schemas/ApiError"
117
+ }
118
+ }
119
+ }
120
+ },
121
+ "401": {
122
+ "description": "Invalid execution authority or credential.",
123
+ "content": {
124
+ "application/json": {
125
+ "schema": {
126
+ "$ref": "#/components/schemas/ApiError"
127
+ }
128
+ }
129
+ }
130
+ },
131
+ "413": {
132
+ "description": "Request body exceeded the deployment limit.",
133
+ "content": {
134
+ "application/json": {
135
+ "schema": {
136
+ "$ref": "#/components/schemas/ApiError"
137
+ }
138
+ }
139
+ }
140
+ },
141
+ "415": {
142
+ "description": "Request body was not application/json.",
143
+ "content": {
144
+ "application/json": {
145
+ "schema": {
146
+ "$ref": "#/components/schemas/ApiError"
147
+ }
148
+ }
149
+ }
150
+ },
151
+ "429": {
152
+ "description": "The bound runtime session is busy.",
153
+ "content": {
154
+ "application/json": {
155
+ "schema": {
156
+ "$ref": "#/components/schemas/ApiError"
157
+ }
158
+ }
159
+ }
160
+ },
161
+ "500": {
162
+ "description": "Execution Host failed safely.",
163
+ "content": {
164
+ "application/json": {
165
+ "schema": {
166
+ "$ref": "#/components/schemas/ApiError"
167
+ }
168
+ }
169
+ }
170
+ },
171
+ "502": {
172
+ "description": "An execution dependency could not be prepared.",
173
+ "content": {
174
+ "application/json": {
175
+ "schema": {
176
+ "$ref": "#/components/schemas/ApiError"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "503": {
182
+ "description": "Execution Host or verifier dependency unavailable.",
183
+ "content": {
184
+ "application/json": {
185
+ "schema": {
186
+ "$ref": "#/components/schemas/ApiError"
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "components": {
196
+ "schemas": {
197
+ "ExecutionScope": {
198
+ "type": "object",
199
+ "properties": {
200
+ "adopterId": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 128,
204
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
205
+ },
206
+ "tenantId": {
207
+ "type": "string",
208
+ "minLength": 1,
209
+ "maxLength": 128,
210
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
211
+ },
212
+ "subjectId": {
213
+ "type": "string",
214
+ "minLength": 1,
215
+ "maxLength": 128,
216
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
217
+ },
218
+ "productSessionId": {
219
+ "type": "string",
220
+ "minLength": 1,
221
+ "maxLength": 128,
222
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
223
+ }
224
+ },
225
+ "required": [
226
+ "adopterId",
227
+ "tenantId",
228
+ "subjectId",
229
+ "productSessionId"
230
+ ],
231
+ "additionalProperties": false
232
+ },
233
+ "ConversationTurnRequest": {
234
+ "type": "object",
235
+ "properties": {
236
+ "schemaVersion": {
237
+ "type": "number",
238
+ "const": 1
239
+ },
240
+ "kind": {
241
+ "type": "string",
242
+ "const": "conversation-turn"
243
+ },
244
+ "invocationId": {
245
+ "type": "string",
246
+ "minLength": 1,
247
+ "maxLength": 128,
248
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
249
+ },
250
+ "prompt": {
251
+ "type": "string",
252
+ "minLength": 1,
253
+ "maxLength": 200000,
254
+ "x-heddle-trimmed": true
255
+ },
256
+ "deadlineAt": {
257
+ "type": "string",
258
+ "format": "date-time",
259
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
260
+ }
261
+ },
262
+ "required": [
263
+ "schemaVersion",
264
+ "kind",
265
+ "invocationId",
266
+ "prompt"
267
+ ],
268
+ "additionalProperties": false
269
+ },
270
+ "RuntimePublicResult": {
271
+ "type": "object",
272
+ "properties": {
273
+ "outcome": {
274
+ "type": "string",
275
+ "enum": [
276
+ "done",
277
+ "max_steps",
278
+ "error",
279
+ "interrupted"
280
+ ]
281
+ },
282
+ "summary": {
283
+ "type": "string"
284
+ },
285
+ "failure": {
286
+ "type": "object",
287
+ "properties": {
288
+ "source": {
289
+ "type": "string",
290
+ "const": "model"
291
+ },
292
+ "code": {
293
+ "type": "string",
294
+ "enum": [
295
+ "authentication",
296
+ "permission",
297
+ "quota",
298
+ "rate_limit",
299
+ "context_window",
300
+ "request",
301
+ "transport",
302
+ "empty_response",
303
+ "unknown"
304
+ ]
305
+ }
306
+ },
307
+ "required": [
308
+ "source",
309
+ "code"
310
+ ],
311
+ "additionalProperties": false
312
+ }
313
+ },
314
+ "required": [
315
+ "outcome"
316
+ ],
317
+ "additionalProperties": false
318
+ },
319
+ "StreamEvent": {
320
+ "oneOf": [
321
+ {
322
+ "type": "object",
323
+ "properties": {
324
+ "schemaVersion": {
325
+ "type": "number",
326
+ "const": 1
327
+ },
328
+ "invocationId": {
329
+ "type": "string",
330
+ "minLength": 1,
331
+ "maxLength": 128,
332
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
333
+ },
334
+ "runId": {
335
+ "type": "string",
336
+ "minLength": 1,
337
+ "maxLength": 128,
338
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
339
+ },
340
+ "sequence": {
341
+ "type": "number",
342
+ "const": 0
343
+ },
344
+ "timestamp": {
345
+ "type": "string",
346
+ "format": "date-time",
347
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
348
+ },
349
+ "kind": {
350
+ "type": "string",
351
+ "const": "accepted"
352
+ }
353
+ },
354
+ "required": [
355
+ "schemaVersion",
356
+ "invocationId",
357
+ "runId",
358
+ "sequence",
359
+ "timestamp",
360
+ "kind"
361
+ ],
362
+ "additionalProperties": false
363
+ },
364
+ {
365
+ "type": "object",
366
+ "properties": {
367
+ "schemaVersion": {
368
+ "type": "number",
369
+ "const": 1
370
+ },
371
+ "invocationId": {
372
+ "type": "string",
373
+ "minLength": 1,
374
+ "maxLength": 128,
375
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
376
+ },
377
+ "runId": {
378
+ "type": "string",
379
+ "minLength": 1,
380
+ "maxLength": 128,
381
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
382
+ },
383
+ "sequence": {
384
+ "type": "integer",
385
+ "minimum": 0,
386
+ "maximum": 9007199254740991
387
+ },
388
+ "timestamp": {
389
+ "type": "string",
390
+ "format": "date-time",
391
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
392
+ },
393
+ "kind": {
394
+ "type": "string",
395
+ "const": "activity"
396
+ },
397
+ "activity": {}
398
+ },
399
+ "required": [
400
+ "schemaVersion",
401
+ "invocationId",
402
+ "runId",
403
+ "sequence",
404
+ "timestamp",
405
+ "kind",
406
+ "activity"
407
+ ],
408
+ "additionalProperties": false
409
+ },
410
+ {
411
+ "type": "object",
412
+ "properties": {
413
+ "schemaVersion": {
414
+ "type": "number",
415
+ "const": 1
416
+ },
417
+ "invocationId": {
418
+ "type": "string",
419
+ "minLength": 1,
420
+ "maxLength": 128,
421
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
422
+ },
423
+ "runId": {
424
+ "type": "string",
425
+ "minLength": 1,
426
+ "maxLength": 128,
427
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
428
+ },
429
+ "sequence": {
430
+ "type": "integer",
431
+ "minimum": 0,
432
+ "maximum": 9007199254740991
433
+ },
434
+ "timestamp": {
435
+ "type": "string",
436
+ "format": "date-time",
437
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
438
+ },
439
+ "kind": {
440
+ "type": "string",
441
+ "const": "result"
442
+ },
443
+ "result": {
444
+ "type": "object",
445
+ "properties": {
446
+ "outcome": {
447
+ "type": "string",
448
+ "enum": [
449
+ "done",
450
+ "max_steps",
451
+ "error",
452
+ "interrupted"
453
+ ]
454
+ },
455
+ "summary": {
456
+ "type": "string"
457
+ },
458
+ "failure": {
459
+ "type": "object",
460
+ "properties": {
461
+ "source": {
462
+ "type": "string",
463
+ "const": "model"
464
+ },
465
+ "code": {
466
+ "type": "string",
467
+ "enum": [
468
+ "authentication",
469
+ "permission",
470
+ "quota",
471
+ "rate_limit",
472
+ "context_window",
473
+ "request",
474
+ "transport",
475
+ "empty_response",
476
+ "unknown"
477
+ ]
478
+ }
479
+ },
480
+ "required": [
481
+ "source",
482
+ "code"
483
+ ],
484
+ "additionalProperties": false
485
+ }
486
+ },
487
+ "required": [
488
+ "outcome"
489
+ ],
490
+ "additionalProperties": false
491
+ }
492
+ },
493
+ "required": [
494
+ "schemaVersion",
495
+ "invocationId",
496
+ "runId",
497
+ "sequence",
498
+ "timestamp",
499
+ "kind",
500
+ "result"
501
+ ],
502
+ "additionalProperties": false
503
+ },
504
+ {
505
+ "type": "object",
506
+ "properties": {
507
+ "schemaVersion": {
508
+ "type": "number",
509
+ "const": 1
510
+ },
511
+ "invocationId": {
512
+ "type": "string",
513
+ "minLength": 1,
514
+ "maxLength": 128,
515
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
516
+ },
517
+ "runId": {
518
+ "type": "string",
519
+ "minLength": 1,
520
+ "maxLength": 128,
521
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
522
+ },
523
+ "sequence": {
524
+ "type": "integer",
525
+ "minimum": 0,
526
+ "maximum": 9007199254740991
527
+ },
528
+ "timestamp": {
529
+ "type": "string",
530
+ "format": "date-time",
531
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
532
+ },
533
+ "kind": {
534
+ "type": "string",
535
+ "const": "cancelled"
536
+ },
537
+ "reason": {
538
+ "type": "string"
539
+ }
540
+ },
541
+ "required": [
542
+ "schemaVersion",
543
+ "invocationId",
544
+ "runId",
545
+ "sequence",
546
+ "timestamp",
547
+ "kind",
548
+ "reason"
549
+ ],
550
+ "additionalProperties": false
551
+ },
552
+ {
553
+ "type": "object",
554
+ "properties": {
555
+ "schemaVersion": {
556
+ "type": "number",
557
+ "const": 1
558
+ },
559
+ "invocationId": {
560
+ "type": "string",
561
+ "minLength": 1,
562
+ "maxLength": 128,
563
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
564
+ },
565
+ "runId": {
566
+ "type": "string",
567
+ "minLength": 1,
568
+ "maxLength": 128,
569
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
570
+ },
571
+ "sequence": {
572
+ "type": "integer",
573
+ "minimum": 0,
574
+ "maximum": 9007199254740991
575
+ },
576
+ "timestamp": {
577
+ "type": "string",
578
+ "format": "date-time",
579
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
580
+ },
581
+ "kind": {
582
+ "type": "string",
583
+ "const": "error"
584
+ },
585
+ "error": {
586
+ "type": "object",
587
+ "properties": {
588
+ "code": {
589
+ "type": "string",
590
+ "minLength": 1,
591
+ "maxLength": 128,
592
+ "pattern": "^[a-z0-9_]+$"
593
+ },
594
+ "message": {
595
+ "type": "string",
596
+ "minLength": 1,
597
+ "maxLength": 1600
598
+ }
599
+ },
600
+ "required": [
601
+ "code",
602
+ "message"
603
+ ],
604
+ "additionalProperties": false
605
+ }
606
+ },
607
+ "required": [
608
+ "schemaVersion",
609
+ "invocationId",
610
+ "runId",
611
+ "sequence",
612
+ "timestamp",
613
+ "kind",
614
+ "error"
615
+ ],
616
+ "additionalProperties": false
617
+ }
618
+ ]
619
+ },
620
+ "ExecutionAssertionClaims": {
621
+ "type": "object",
622
+ "properties": {
623
+ "iss": {
624
+ "type": "string",
625
+ "format": "uri"
626
+ },
627
+ "aud": {
628
+ "type": "string",
629
+ "minLength": 1,
630
+ "maxLength": 512
631
+ },
632
+ "contractVersion": {
633
+ "type": "number",
634
+ "const": 1
635
+ },
636
+ "adopterId": {
637
+ "type": "string",
638
+ "minLength": 1,
639
+ "maxLength": 128,
640
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
641
+ },
642
+ "tenantId": {
643
+ "type": "string",
644
+ "minLength": 1,
645
+ "maxLength": 128,
646
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
647
+ },
648
+ "productSessionId": {
649
+ "type": "string",
650
+ "minLength": 1,
651
+ "maxLength": 128,
652
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
653
+ },
654
+ "runtimeSessionId": {
655
+ "type": "string",
656
+ "minLength": 33,
657
+ "maxLength": 256,
658
+ "x-heddle-trimmed": true
659
+ },
660
+ "workflow": {
661
+ "type": "string",
662
+ "const": "conversation-turn"
663
+ },
664
+ "sub": {
665
+ "type": "string",
666
+ "minLength": 1,
667
+ "maxLength": 128,
668
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
669
+ },
670
+ "jti": {
671
+ "type": "string",
672
+ "minLength": 1,
673
+ "maxLength": 128,
674
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
675
+ },
676
+ "iat": {
677
+ "type": "integer",
678
+ "minimum": 0,
679
+ "maximum": 9007199254740991
680
+ },
681
+ "exp": {
682
+ "type": "integer",
683
+ "exclusiveMinimum": 0,
684
+ "maximum": 9007199254740991
685
+ }
686
+ },
687
+ "required": [
688
+ "iss",
689
+ "aud",
690
+ "contractVersion",
691
+ "adopterId",
692
+ "tenantId",
693
+ "productSessionId",
694
+ "runtimeSessionId",
695
+ "workflow",
696
+ "sub",
697
+ "jti",
698
+ "iat",
699
+ "exp"
700
+ ],
701
+ "additionalProperties": {}
702
+ },
703
+ "McpCapabilityClaims": {
704
+ "type": "object",
705
+ "properties": {
706
+ "iss": {
707
+ "type": "string",
708
+ "format": "uri"
709
+ },
710
+ "aud": {
711
+ "type": "string",
712
+ "minLength": 1,
713
+ "maxLength": 512
714
+ },
715
+ "contractVersion": {
716
+ "type": "number",
717
+ "const": 1
718
+ },
719
+ "adopterId": {
720
+ "type": "string",
721
+ "minLength": 1,
722
+ "maxLength": 128,
723
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
724
+ },
725
+ "tenantId": {
726
+ "type": "string",
727
+ "minLength": 1,
728
+ "maxLength": 128,
729
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
730
+ },
731
+ "productSessionId": {
732
+ "type": "string",
733
+ "minLength": 1,
734
+ "maxLength": 128,
735
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
736
+ },
737
+ "runtimeSessionId": {
738
+ "type": "string",
739
+ "minLength": 33,
740
+ "maxLength": 256,
741
+ "x-heddle-trimmed": true
742
+ },
743
+ "invocationId": {
744
+ "type": "string",
745
+ "minLength": 1,
746
+ "maxLength": 128,
747
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
748
+ },
749
+ "workflow": {
750
+ "type": "string",
751
+ "const": "conversation-turn"
752
+ },
753
+ "serverId": {
754
+ "type": "string",
755
+ "minLength": 1,
756
+ "maxLength": 64,
757
+ "pattern": "^[A-Za-z0-9_-]+$"
758
+ },
759
+ "allowedTools": {
760
+ "minItems": 1,
761
+ "maxItems": 16,
762
+ "type": "array",
763
+ "items": {
764
+ "type": "string",
765
+ "minLength": 1,
766
+ "maxLength": 64,
767
+ "pattern": "^[A-Za-z][A-Za-z0-9_]*$"
768
+ },
769
+ "uniqueItems": true,
770
+ "x-heddle-max-total-item-characters": 512
771
+ },
772
+ "sub": {
773
+ "type": "string",
774
+ "minLength": 1,
775
+ "maxLength": 128,
776
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
777
+ },
778
+ "jti": {
779
+ "type": "string",
780
+ "minLength": 1,
781
+ "maxLength": 128,
782
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
783
+ },
784
+ "iat": {
785
+ "type": "integer",
786
+ "minimum": 0,
787
+ "maximum": 9007199254740991
788
+ },
789
+ "exp": {
790
+ "type": "integer",
791
+ "exclusiveMinimum": 0,
792
+ "maximum": 9007199254740991
793
+ }
794
+ },
795
+ "required": [
796
+ "iss",
797
+ "aud",
798
+ "contractVersion",
799
+ "adopterId",
800
+ "tenantId",
801
+ "productSessionId",
802
+ "runtimeSessionId",
803
+ "invocationId",
804
+ "workflow",
805
+ "serverId",
806
+ "allowedTools",
807
+ "sub",
808
+ "jti",
809
+ "iat",
810
+ "exp"
811
+ ],
812
+ "additionalProperties": {}
813
+ },
814
+ "ExecutionAssertionProtectedHeader": {
815
+ "type": "object",
816
+ "properties": {
817
+ "alg": {
818
+ "type": "string",
819
+ "const": "ES256"
820
+ },
821
+ "kid": {
822
+ "type": "string",
823
+ "minLength": 1,
824
+ "maxLength": 128,
825
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
826
+ },
827
+ "typ": {
828
+ "type": "string",
829
+ "const": "heddle-execution+jwt"
830
+ }
831
+ },
832
+ "required": [
833
+ "alg",
834
+ "kid",
835
+ "typ"
836
+ ],
837
+ "additionalProperties": false
838
+ },
839
+ "McpCapabilityProtectedHeader": {
840
+ "type": "object",
841
+ "properties": {
842
+ "alg": {
843
+ "type": "string",
844
+ "const": "ES256"
845
+ },
846
+ "kid": {
847
+ "type": "string",
848
+ "minLength": 1,
849
+ "maxLength": 128,
850
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@-]*$"
851
+ },
852
+ "typ": {
853
+ "type": "string",
854
+ "const": "heddle-mcp-capability+jwt"
855
+ }
856
+ },
857
+ "required": [
858
+ "alg",
859
+ "kid",
860
+ "typ"
861
+ ],
862
+ "additionalProperties": false
863
+ },
864
+ "ApiError": {
865
+ "type": "object",
866
+ "properties": {
867
+ "error": {
868
+ "type": "object",
869
+ "properties": {
870
+ "code": {
871
+ "type": "string",
872
+ "minLength": 1,
873
+ "maxLength": 128,
874
+ "pattern": "^[a-z0-9_]+$"
875
+ },
876
+ "message": {
877
+ "type": "string",
878
+ "minLength": 1,
879
+ "maxLength": 1600
880
+ }
881
+ },
882
+ "required": [
883
+ "code",
884
+ "message"
885
+ ],
886
+ "additionalProperties": false
887
+ }
888
+ },
889
+ "required": [
890
+ "error"
891
+ ],
892
+ "additionalProperties": false
893
+ }
894
+ }
895
+ }
896
+ }