@inneranimalmedia/agentsam-sdk 2.6.8 → 2.6.10

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 (203) hide show
  1. package/README.md +18 -0
  2. package/apps/README.md +25 -0
  3. package/apps/cad-creator/shared/cad/package.json +1 -1
  4. package/apps/client-cms-editor/backend/package.json +5 -7
  5. package/apps/client-cms-editor/frontend/package.json +5 -7
  6. package/apps/client-cms-editor/frontend/tsconfig.json +27 -8
  7. package/apps/client-cms-editor/package-lock.json +8 -8
  8. package/apps/client-cms-editor/package.json +1 -1
  9. package/apps/client-cms-editor/shared/cms/package.json +3 -5
  10. package/docs/LOCAL_ENGINE_COMPUTE_AUDIT_PLAN.md +299 -0
  11. package/docs/architecture/HOOKS-MODELS-SELF-HOSTING-PLAN.md +199 -0
  12. package/examples/hyperspace-demo/index.html +16 -0
  13. package/examples/hyperspace-demo/package.json +21 -0
  14. package/examples/hyperspace-demo/src/main.tsx +160 -0
  15. package/examples/hyperspace-demo/tsconfig.json +9 -0
  16. package/examples/hyperspace-demo/vite.config.ts +24 -0
  17. package/migrations/runtime/0005_agentsam_hooks.sql +87 -0
  18. package/package.json +37 -10
  19. package/packages/agentsam-brand/package.json +1 -1
  20. package/packages/agentsam-brand/src/core/v2/compile.js +1 -1
  21. package/packages/agentsam-brand/src/core/v2/schema.js +1 -1
  22. package/packages/agentsam-contracts/package.json +71 -20
  23. package/packages/agentsam-contracts/scripts/build.mjs +18 -0
  24. package/packages/agentsam-contracts/src/errors.ts +19 -10
  25. package/packages/agentsam-contracts/test/contracts.test.mjs +4 -1
  26. package/packages/agentsam-contracts/test/repository.test.mjs +4 -1
  27. package/packages/agentsam-contracts/tsconfig.build.json +10 -0
  28. package/packages/agentsam-errors/package.json +13 -4
  29. package/packages/agentsam-errors/protocol/agentsam.error.v2.schema.json +821 -0
  30. package/packages/agentsam-errors/protocol/error-catalog.json +3512 -0
  31. package/packages/agentsam-errors/src/envelope.js +63 -11
  32. package/packages/agentsam-errors/src/error.js +6 -0
  33. package/packages/agentsam-errors/src/fingerprint.js +9 -1
  34. package/packages/agentsam-errors/src/normalize.js +51 -6
  35. package/packages/agentsam-errors/src/recovery.js +9 -35
  36. package/packages/agentsam-errors/src/transport.js +6 -1
  37. package/packages/agentsam-errors/src/vocabulary.js +515 -126
  38. package/packages/agentsam-errors/test/catalog-v2.test.mjs +106 -0
  39. package/packages/agentsam-errors/types/index.d.ts +157 -0
  40. package/packages/agentsam-goap/package.json +2 -2
  41. package/packages/agentsam-hooks/README.md +206 -0
  42. package/packages/agentsam-hooks/bin/agentsam-hooks.mjs +64 -0
  43. package/packages/agentsam-hooks/bindings/go/command.go +55 -0
  44. package/packages/agentsam-hooks/bindings/go/errors_generated.go +402 -0
  45. package/packages/agentsam-hooks/bindings/go/go.mod +3 -0
  46. package/packages/agentsam-hooks/bindings/go/hooks.go +285 -0
  47. package/packages/agentsam-hooks/bindings/go/hooks_test.go +48 -0
  48. package/packages/agentsam-hooks/bindings/rust/Cargo.toml +11 -0
  49. package/packages/agentsam-hooks/bindings/rust/src/errors_generated.rs +396 -0
  50. package/packages/agentsam-hooks/bindings/rust/src/lib.rs +397 -0
  51. package/packages/agentsam-hooks/package.json +69 -0
  52. package/packages/agentsam-hooks/schema/manifest.json +54 -0
  53. package/packages/agentsam-hooks/scripts/clean-protocol.mjs +17 -0
  54. package/packages/agentsam-hooks/scripts/sync-protocol.mjs +27 -0
  55. package/packages/agentsam-hooks/src/adapters/agents.js +82 -0
  56. package/packages/agentsam-hooks/src/adapters/callback.js +4 -0
  57. package/packages/agentsam-hooks/src/adapters/capability.js +122 -0
  58. package/packages/agentsam-hooks/src/adapters/command.js +104 -0
  59. package/packages/agentsam-hooks/src/adapters/composite.js +31 -0
  60. package/packages/agentsam-hooks/src/adapters/http.js +58 -0
  61. package/packages/agentsam-hooks/src/adapters/lsp.js +116 -0
  62. package/packages/agentsam-hooks/src/adapters/mcp.js +76 -0
  63. package/packages/agentsam-hooks/src/adapters/provider.js +129 -0
  64. package/packages/agentsam-hooks/src/config.js +143 -0
  65. package/packages/agentsam-hooks/src/contracts.js +284 -0
  66. package/packages/agentsam-hooks/src/errors-generated.js +2732 -0
  67. package/packages/agentsam-hooks/src/index.d.ts +193 -0
  68. package/packages/agentsam-hooks/src/index.js +14 -0
  69. package/packages/agentsam-hooks/src/policy.js +34 -0
  70. package/packages/agentsam-hooks/src/runtime.js +312 -0
  71. package/packages/agentsam-hooks/src/store.js +264 -0
  72. package/packages/agentsam-hooks/test/adapters.test.mjs +216 -0
  73. package/packages/agentsam-hooks/test/runtime.test.mjs +258 -0
  74. package/packages/agentsam-knowledge/package.json +3 -2
  75. package/packages/agentsam-nav/package.json +1 -1
  76. package/packages/agentsam-queue-control/package.json +1 -1
  77. package/packages/agentsam-rapid-rust/src/main.rs +1 -0
  78. package/packages/agentsam-repository/package.json +3 -2
  79. package/packages/agentsam-vault/package.json +8 -5
  80. package/packages/agentsam-workbench/package.json +45 -18
  81. package/packages/connectors/cloudflare/package.json +1 -1
  82. package/packages/heuristic-theme/package.json +1 -1
  83. package/packages/identity/package.json +3 -2
  84. package/packages/identity/tests/lane1-packed-consumer.test.mjs +9 -1
  85. package/packages/providers/completeful/package.json +1 -1
  86. package/packages/theme-church-site/README.md +2 -2
  87. package/packages/theme-church-site/package.json +2 -3
  88. package/packages/theme-church-site/src/index.js +1 -1
  89. package/packages/theme-church-site/test/theme.test.mjs +1 -1
  90. package/packages/theme-companions-site/README.md +2 -2
  91. package/packages/theme-companions-site/package.json +2 -3
  92. package/packages/theme-companions-site/src/index.js +1 -1
  93. package/packages/theme-companions-site/test/theme.test.mjs +1 -1
  94. package/packages/theme-floors-site/README.md +2 -2
  95. package/packages/theme-floors-site/package.json +2 -3
  96. package/packages/theme-floors-site/src/index.js +1 -1
  97. package/packages/theme-floors-site/test/theme.test.mjs +1 -1
  98. package/packages/theme-fuelnfree-site/README.md +2 -2
  99. package/packages/theme-fuelnfree-site/package.json +2 -3
  100. package/packages/theme-fuelnfree-site/src/index.js +1 -1
  101. package/packages/theme-fuelnfree-site/test/theme.test.mjs +1 -1
  102. package/packages/theme-handyman-site/README.md +2 -2
  103. package/packages/theme-handyman-site/package.json +2 -3
  104. package/packages/theme-handyman-site/src/index.js +1 -1
  105. package/packages/theme-handyman-site/test/theme.test.mjs +1 -1
  106. package/packages/theme-insurance-site/README.md +2 -2
  107. package/packages/theme-insurance-site/package.json +2 -3
  108. package/packages/theme-insurance-site/src/index.js +1 -1
  109. package/packages/theme-insurance-site/test/theme.test.mjs +1 -1
  110. package/packages/theme-scenes/package.json +1 -1
  111. package/packages/theme-shinshu-site/README.md +2 -2
  112. package/packages/theme-shinshu-site/package.json +2 -3
  113. package/packages/theme-shinshu-site/src/index.js +1 -1
  114. package/packages/theme-shinshu-site/test/theme.test.mjs +1 -1
  115. package/packages/work-graph/package.json +3 -2
  116. package/protocol/apps/agentsam.app.v1.schema.json +1 -1
  117. package/protocol/apps/agentsam.host-install.v1.schema.json +1 -1
  118. package/protocol/assets/asset-record.v1.schema.json +1 -1
  119. package/protocol/brand/brandpack.v1.schema.json +1 -1
  120. package/protocol/capabilities/capability-manifest.schema.json +1 -1
  121. package/protocol/capabilities/knowledge-search-input.schema.json +1 -0
  122. package/protocol/credentials/issue.v1.schema.json +1 -1
  123. package/protocol/database/agentsam.schema-pack.v1.schema.json +1 -1
  124. package/protocol/database/connection.v1.schema.json +1 -1
  125. package/protocol/embeddings/embedding-profile.v1.schema.json +1 -1
  126. package/protocol/errors/README.md +36 -0
  127. package/protocol/errors/agentsam.error.v2.schema.json +821 -0
  128. package/protocol/errors/error-catalog.json +3506 -158
  129. package/protocol/errors/error-envelope.schema.json +195 -52
  130. package/protocol/errors/recovery.v1.schema.json +1 -1
  131. package/protocol/features/agentsam.feature.v1.schema.json +1 -1
  132. package/protocol/hooks/README.md +18 -0
  133. package/protocol/hooks/agentsam.hook.output.v1.schema.json +27 -0
  134. package/protocol/hooks/agentsam.hook.receipt.v1.schema.json +61 -0
  135. package/protocol/hooks/agentsam.hook.v1.schema.json +35 -0
  136. package/protocol/hooks/agentsam.hooks.config.v1.schema.json +78 -0
  137. package/protocol/local-engine/benchmark.v1.schema.json +14 -0
  138. package/protocol/local-engine/engine.v1.schema.json +17 -0
  139. package/protocol/models/model-inventory-v2.schema.json +1 -1
  140. package/protocol/models/provider-model-snapshot.v1.schema.json +22 -0
  141. package/protocol/rpc/v1/errors.proto +1 -0
  142. package/protocol/runtime/agentsam.runtime.v1.schema.json +1 -1
  143. package/protocol/runtime/workspace-fs.v1.schema.json +1 -1
  144. package/protocol/sam/activity.v1.schema.json +1 -1
  145. package/protocol/sam/answer.v1.schema.json +1 -1
  146. package/protocol/sam/calibration.v1.schema.json +1 -1
  147. package/protocol/sam/decision-receipt.v1.schema.json +1 -1
  148. package/protocol/sam/evaluation.v1.schema.json +1 -1
  149. package/protocol/sam/operation.schema.json +1 -1
  150. package/protocol/sam/outcome.v1.schema.json +1 -1
  151. package/protocol/sam/question.v1.schema.json +1 -1
  152. package/protocol/sam/result.schema.json +1 -1
  153. package/protocol/sam/state.v1.schema.json +1 -1
  154. package/protocol/scoring/scorecard.v1.schema.json +1 -1
  155. package/protocol/skills/agentsam.interaction.v1.schema.json +1 -1
  156. package/protocol/skills/agentsam.skill.v1.schema.json +1 -1
  157. package/protocol/theme-refinery/product-metadata.schema.json +1 -1
  158. package/protocol/theme-refinery/reconciliation-receipt.schema.json +1 -1
  159. package/protocol/ui/icon.v1.schema.json +1 -1
  160. package/python/README.md +20 -0
  161. package/python/agentsam_sdk/errors/__init__.py +4 -0
  162. package/python/agentsam_sdk/errors/vocabulary.py +2730 -0
  163. package/python/agentsam_sdk/hooks/__init__.py +32 -0
  164. package/python/agentsam_sdk/hooks/adapters.py +132 -0
  165. package/python/agentsam_sdk/hooks/contracts.py +121 -0
  166. package/python/agentsam_sdk/hooks/runtime.py +253 -0
  167. package/python/tests/test_hooks.py +115 -0
  168. package/src/agent/responses-runner.js +145 -1
  169. package/src/cli/command-catalog.js +2 -0
  170. package/src/cli.js +19 -0
  171. package/src/commands/app.js +10 -0
  172. package/src/commands/cheat-sheet.js +1 -0
  173. package/src/commands/engine.js +10 -0
  174. package/src/commands/hooks.js +260 -0
  175. package/src/commands/machine.js +71 -38
  176. package/src/commands/models.js +1 -1
  177. package/src/commands/package.js +10 -3
  178. package/src/commands/runtime.js +25 -10
  179. package/src/commands/setup.js +30 -6
  180. package/src/commands/shell.js +114 -9
  181. package/src/commands/terminal.js +20 -8
  182. package/src/errors/contract.js +4 -4
  183. package/src/errors/diagnostic.js +10 -10
  184. package/src/errors/index.js +1 -1
  185. package/src/index.js +52 -0
  186. package/src/indexing/ingest/materials.js +237 -30
  187. package/src/knowledge/service/grpc-codec.js +2 -0
  188. package/src/lib/setup/runtime.js +4 -2
  189. package/src/lib/slash-commands.js +1 -0
  190. package/src/local/runtime-store.js +46 -0
  191. package/src/local-engine/assets.js +37 -0
  192. package/src/local-engine/audit.js +133 -0
  193. package/src/local-engine/benchmark.js +26 -0
  194. package/src/local-engine/contracts.js +101 -0
  195. package/src/local-engine/engines.js +142 -0
  196. package/src/local-engine/index.js +18 -0
  197. package/src/local-engine/runtime.js +39 -0
  198. package/src/models/catalog.js +0 -49
  199. package/src/models/inventory-core.js +69 -0
  200. package/src/plugins/index.js +8 -1
  201. package/src/plugins/registry.js +56 -0
  202. package/src/rpc/generated/errors_pb.js +49 -1
  203. package/src/tools/runtime.js +13 -5
@@ -0,0 +1,821 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.inneranimalmedia.com/agentsam/errors/agentsam.error.v2.schema.json",
4
+ "title": "AgentSam ErrorEnvelope v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "ok",
9
+ "schema_version",
10
+ "code",
11
+ "reason",
12
+ "domain",
13
+ "failure_class",
14
+ "stage",
15
+ "native_stage",
16
+ "feature",
17
+ "failure_behavior",
18
+ "severity",
19
+ "retryable",
20
+ "side_effect_state",
21
+ "resolution_owner",
22
+ "source",
23
+ "adapter",
24
+ "protocol",
25
+ "transport",
26
+ "tool",
27
+ "message",
28
+ "retry_after_ms",
29
+ "remediation",
30
+ "resource",
31
+ "native",
32
+ "environment",
33
+ "http_status",
34
+ "grpc_status",
35
+ "provider",
36
+ "provider_code",
37
+ "request_id",
38
+ "trace_id",
39
+ "fingerprint",
40
+ "occurrence_count",
41
+ "details"
42
+ ],
43
+ "properties": {
44
+ "ok": {
45
+ "const": false
46
+ },
47
+ "schema_version": {
48
+ "const": 2
49
+ },
50
+ "code": {
51
+ "enum": [
52
+ "CANCELLED",
53
+ "UNKNOWN",
54
+ "INVALID_ARGUMENT",
55
+ "DEADLINE_EXCEEDED",
56
+ "NOT_FOUND",
57
+ "ALREADY_EXISTS",
58
+ "PERMISSION_DENIED",
59
+ "RESOURCE_EXHAUSTED",
60
+ "FAILED_PRECONDITION",
61
+ "ABORTED",
62
+ "OUT_OF_RANGE",
63
+ "UNIMPLEMENTED",
64
+ "INTERNAL",
65
+ "UNAVAILABLE",
66
+ "DATA_LOSS",
67
+ "UNAUTHENTICATED"
68
+ ]
69
+ },
70
+ "reason": {
71
+ "type": "string",
72
+ "pattern": "^[a-z][a-z0-9_]{0,127}$"
73
+ },
74
+ "domain": {
75
+ "enum": [
76
+ "runtime",
77
+ "provider",
78
+ "auth",
79
+ "identity",
80
+ "device",
81
+ "terminal",
82
+ "transport",
83
+ "repository",
84
+ "indexing",
85
+ "knowledge",
86
+ "cad",
87
+ "hook",
88
+ "model",
89
+ "configuration",
90
+ "schema",
91
+ "migration",
92
+ "database",
93
+ "package",
94
+ "build",
95
+ "distribution",
96
+ "deployment",
97
+ "workflow",
98
+ "persistence",
99
+ "policy",
100
+ "tool"
101
+ ]
102
+ },
103
+ "failure_class": {
104
+ "enum": [
105
+ "input",
106
+ "validation",
107
+ "authentication",
108
+ "authorization",
109
+ "policy",
110
+ "discovery",
111
+ "resolution",
112
+ "availability",
113
+ "transport",
114
+ "protocol",
115
+ "timeout",
116
+ "rate_limit",
117
+ "capacity",
118
+ "resource",
119
+ "configuration",
120
+ "dependency",
121
+ "filesystem",
122
+ "persistence",
123
+ "consistency",
124
+ "conflict",
125
+ "process",
126
+ "ipc",
127
+ "data_integrity",
128
+ "cancellation",
129
+ "cancelled",
130
+ "build",
131
+ "distribution",
132
+ "migration",
133
+ "schema",
134
+ "identity",
135
+ "execution",
136
+ "internal",
137
+ "unknown"
138
+ ]
139
+ },
140
+ "stage": {
141
+ "enum": [
142
+ "discover",
143
+ "resolve",
144
+ "load",
145
+ "configure",
146
+ "validate",
147
+ "authorize",
148
+ "connect",
149
+ "prepare",
150
+ "install",
151
+ "build",
152
+ "start",
153
+ "execute",
154
+ "transform",
155
+ "persist",
156
+ "migrate",
157
+ "verify",
158
+ "publish",
159
+ "attach",
160
+ "detach",
161
+ "cleanup",
162
+ "shutdown"
163
+ ]
164
+ },
165
+ "native_stage": {
166
+ "anyOf": [
167
+ {
168
+ "type": "string"
169
+ },
170
+ {
171
+ "type": "null"
172
+ }
173
+ ]
174
+ },
175
+ "feature": {
176
+ "anyOf": [
177
+ {
178
+ "type": "string",
179
+ "pattern": "^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$",
180
+ "maxLength": 256
181
+ },
182
+ {
183
+ "type": "null"
184
+ }
185
+ ]
186
+ },
187
+ "failure_behavior": {
188
+ "anyOf": [
189
+ {
190
+ "enum": [
191
+ "fail_closed",
192
+ "fail_open",
193
+ "observe_only",
194
+ "retry_bounded",
195
+ "skip",
196
+ "abort",
197
+ "no_replay"
198
+ ]
199
+ },
200
+ {
201
+ "type": "null"
202
+ }
203
+ ]
204
+ },
205
+ "severity": {
206
+ "enum": [
207
+ "transient",
208
+ "blocking_user_fixable",
209
+ "blocking_internal",
210
+ "policy_blocking"
211
+ ]
212
+ },
213
+ "retryable": {
214
+ "type": "boolean"
215
+ },
216
+ "side_effect_state": {
217
+ "enum": [
218
+ "none",
219
+ "not_started",
220
+ "confirmed_not_applied",
221
+ "confirmed_applied",
222
+ "partially_applied",
223
+ "unknown"
224
+ ]
225
+ },
226
+ "resolution_owner": {
227
+ "enum": [
228
+ "user",
229
+ "agentsam",
230
+ "provider",
231
+ "organization_admin",
232
+ "policy",
233
+ "unknown"
234
+ ]
235
+ },
236
+ "source": {
237
+ "type": "object",
238
+ "additionalProperties": false,
239
+ "required": [
240
+ "kind",
241
+ "name",
242
+ "service"
243
+ ],
244
+ "properties": {
245
+ "kind": {
246
+ "enum": [
247
+ "user",
248
+ "agentsam",
249
+ "provider",
250
+ "dependency",
251
+ "runtime",
252
+ "policy"
253
+ ]
254
+ },
255
+ "name": {
256
+ "type": "string",
257
+ "minLength": 1,
258
+ "maxLength": 256
259
+ },
260
+ "service": {
261
+ "anyOf": [
262
+ {
263
+ "type": "string"
264
+ },
265
+ {
266
+ "type": "null"
267
+ }
268
+ ]
269
+ }
270
+ }
271
+ },
272
+ "adapter": {
273
+ "anyOf": [
274
+ {
275
+ "type": "string"
276
+ },
277
+ {
278
+ "type": "null"
279
+ }
280
+ ]
281
+ },
282
+ "protocol": {
283
+ "anyOf": [
284
+ {
285
+ "type": "string"
286
+ },
287
+ {
288
+ "type": "null"
289
+ }
290
+ ]
291
+ },
292
+ "transport": {
293
+ "anyOf": [
294
+ {
295
+ "type": "string"
296
+ },
297
+ {
298
+ "type": "null"
299
+ }
300
+ ]
301
+ },
302
+ "tool": {
303
+ "anyOf": [
304
+ {
305
+ "type": "string"
306
+ },
307
+ {
308
+ "type": "null"
309
+ }
310
+ ]
311
+ },
312
+ "message": {
313
+ "type": "string",
314
+ "minLength": 1,
315
+ "maxLength": 4000
316
+ },
317
+ "retry_after_ms": {
318
+ "anyOf": [
319
+ {
320
+ "type": "integer",
321
+ "minimum": 0
322
+ },
323
+ {
324
+ "type": "null"
325
+ }
326
+ ]
327
+ },
328
+ "remediation": {
329
+ "type": "object",
330
+ "additionalProperties": false,
331
+ "required": [
332
+ "action",
333
+ "message",
334
+ "automatic",
335
+ "command",
336
+ "url"
337
+ ],
338
+ "properties": {
339
+ "action": {
340
+ "enum": [
341
+ "none",
342
+ "retry",
343
+ "retry_later",
344
+ "reauthenticate",
345
+ "connect_provider",
346
+ "configure_provider_credential",
347
+ "refresh_provider_credential",
348
+ "request_permission",
349
+ "reenroll_device",
350
+ "reconnect_service",
351
+ "install_dependency",
352
+ "upgrade_dependency",
353
+ "configure_dependency",
354
+ "change_configuration",
355
+ "change_input",
356
+ "reduce_scope",
357
+ "increase_quota",
358
+ "add_budget",
359
+ "select_model",
360
+ "change_region",
361
+ "restart_runtime",
362
+ "inspect_platform",
363
+ "contact_provider",
364
+ "contact_agentsam",
365
+ "contact_organization_admin",
366
+ "restart_service",
367
+ "repair_schema",
368
+ "run_migration",
369
+ "regenerate_artifact",
370
+ "update_lockfile",
371
+ "reinstall_workspace",
372
+ "republish_artifact"
373
+ ]
374
+ },
375
+ "message": {
376
+ "anyOf": [
377
+ {
378
+ "type": "string"
379
+ },
380
+ {
381
+ "type": "null"
382
+ }
383
+ ]
384
+ },
385
+ "automatic": {
386
+ "type": "boolean"
387
+ },
388
+ "command": {
389
+ "anyOf": [
390
+ {
391
+ "type": "string"
392
+ },
393
+ {
394
+ "type": "null"
395
+ }
396
+ ]
397
+ },
398
+ "url": {
399
+ "anyOf": [
400
+ {
401
+ "type": "string"
402
+ },
403
+ {
404
+ "type": "null"
405
+ }
406
+ ]
407
+ }
408
+ }
409
+ },
410
+ "resource": {
411
+ "anyOf": [
412
+ {
413
+ "type": "object",
414
+ "additionalProperties": false,
415
+ "required": [
416
+ "type",
417
+ "id",
418
+ "name"
419
+ ],
420
+ "properties": {
421
+ "type": {
422
+ "type": "string",
423
+ "minLength": 1,
424
+ "maxLength": 128
425
+ },
426
+ "id": {
427
+ "anyOf": [
428
+ {
429
+ "type": "string"
430
+ },
431
+ {
432
+ "type": "null"
433
+ }
434
+ ]
435
+ },
436
+ "name": {
437
+ "anyOf": [
438
+ {
439
+ "type": "string"
440
+ },
441
+ {
442
+ "type": "null"
443
+ }
444
+ ]
445
+ }
446
+ }
447
+ },
448
+ {
449
+ "type": "null"
450
+ }
451
+ ]
452
+ },
453
+ "native": {
454
+ "anyOf": [
455
+ {
456
+ "type": "object",
457
+ "additionalProperties": false,
458
+ "required": [
459
+ "code",
460
+ "exception_type",
461
+ "exit_code",
462
+ "signal",
463
+ "stderr",
464
+ "stdout",
465
+ "stack"
466
+ ],
467
+ "properties": {
468
+ "code": {
469
+ "anyOf": [
470
+ {
471
+ "type": "string"
472
+ },
473
+ {
474
+ "type": "null"
475
+ }
476
+ ]
477
+ },
478
+ "exception_type": {
479
+ "anyOf": [
480
+ {
481
+ "type": "string"
482
+ },
483
+ {
484
+ "type": "null"
485
+ }
486
+ ]
487
+ },
488
+ "exit_code": {
489
+ "anyOf": [
490
+ {
491
+ "type": "integer",
492
+ "minimum": -2147483648,
493
+ "maximum": 2147483647
494
+ },
495
+ {
496
+ "type": "null"
497
+ }
498
+ ]
499
+ },
500
+ "signal": {
501
+ "anyOf": [
502
+ {
503
+ "type": "string"
504
+ },
505
+ {
506
+ "type": "null"
507
+ }
508
+ ]
509
+ },
510
+ "stderr": {
511
+ "anyOf": [
512
+ {
513
+ "type": "string"
514
+ },
515
+ {
516
+ "type": "null"
517
+ }
518
+ ]
519
+ },
520
+ "stdout": {
521
+ "anyOf": [
522
+ {
523
+ "type": "string"
524
+ },
525
+ {
526
+ "type": "null"
527
+ }
528
+ ]
529
+ },
530
+ "stack": {
531
+ "anyOf": [
532
+ {
533
+ "type": "string"
534
+ },
535
+ {
536
+ "type": "null"
537
+ }
538
+ ]
539
+ }
540
+ }
541
+ },
542
+ {
543
+ "type": "null"
544
+ }
545
+ ]
546
+ },
547
+ "environment": {
548
+ "anyOf": [
549
+ {
550
+ "type": "object",
551
+ "additionalProperties": false,
552
+ "required": [
553
+ "detected_version",
554
+ "required_version",
555
+ "component",
556
+ "runtime",
557
+ "platform"
558
+ ],
559
+ "properties": {
560
+ "detected_version": {
561
+ "anyOf": [
562
+ {
563
+ "type": "string"
564
+ },
565
+ {
566
+ "type": "null"
567
+ }
568
+ ]
569
+ },
570
+ "required_version": {
571
+ "anyOf": [
572
+ {
573
+ "type": "string"
574
+ },
575
+ {
576
+ "type": "null"
577
+ }
578
+ ]
579
+ },
580
+ "component": {
581
+ "anyOf": [
582
+ {
583
+ "type": "string"
584
+ },
585
+ {
586
+ "type": "null"
587
+ }
588
+ ]
589
+ },
590
+ "runtime": {
591
+ "anyOf": [
592
+ {
593
+ "type": "string"
594
+ },
595
+ {
596
+ "type": "null"
597
+ }
598
+ ]
599
+ },
600
+ "platform": {
601
+ "anyOf": [
602
+ {
603
+ "type": "string"
604
+ },
605
+ {
606
+ "type": "null"
607
+ }
608
+ ]
609
+ }
610
+ }
611
+ },
612
+ {
613
+ "type": "null"
614
+ }
615
+ ]
616
+ },
617
+ "http_status": {
618
+ "anyOf": [
619
+ {
620
+ "type": "integer",
621
+ "minimum": 100,
622
+ "maximum": 599
623
+ },
624
+ {
625
+ "type": "null"
626
+ }
627
+ ]
628
+ },
629
+ "grpc_status": {
630
+ "anyOf": [
631
+ {
632
+ "type": "integer",
633
+ "minimum": 0,
634
+ "maximum": 16
635
+ },
636
+ {
637
+ "type": "null"
638
+ }
639
+ ]
640
+ },
641
+ "provider": {
642
+ "anyOf": [
643
+ {
644
+ "type": "string"
645
+ },
646
+ {
647
+ "type": "null"
648
+ }
649
+ ]
650
+ },
651
+ "provider_code": {
652
+ "anyOf": [
653
+ {
654
+ "type": "string"
655
+ },
656
+ {
657
+ "type": "null"
658
+ }
659
+ ]
660
+ },
661
+ "request_id": {
662
+ "anyOf": [
663
+ {
664
+ "type": "string"
665
+ },
666
+ {
667
+ "type": "null"
668
+ }
669
+ ]
670
+ },
671
+ "trace_id": {
672
+ "anyOf": [
673
+ {
674
+ "type": "string"
675
+ },
676
+ {
677
+ "type": "null"
678
+ }
679
+ ]
680
+ },
681
+ "fingerprint": {
682
+ "type": "string",
683
+ "pattern": "^err_[A-Za-z0-9_-]{8,128}$"
684
+ },
685
+ "occurrence_count": {
686
+ "type": "integer",
687
+ "minimum": 1
688
+ },
689
+ "details": {},
690
+ "operation": {
691
+ "type": "object",
692
+ "properties": {
693
+ "kind": {
694
+ "type": [
695
+ "string",
696
+ "null"
697
+ ]
698
+ },
699
+ "action": {
700
+ "type": [
701
+ "string",
702
+ "null"
703
+ ]
704
+ },
705
+ "resource_type": {
706
+ "type": [
707
+ "string",
708
+ "null"
709
+ ]
710
+ },
711
+ "resource_id": {
712
+ "type": [
713
+ "string",
714
+ "null"
715
+ ]
716
+ },
717
+ "read_only": {
718
+ "type": "boolean"
719
+ },
720
+ "idempotent": {
721
+ "type": "boolean"
722
+ },
723
+ "side_effect_state": {
724
+ "enum": [
725
+ "none",
726
+ "not_started",
727
+ "confirmed_not_applied",
728
+ "confirmed_applied",
729
+ "partially_applied",
730
+ "unknown"
731
+ ]
732
+ }
733
+ }
734
+ },
735
+ "retry": {
736
+ "type": "object",
737
+ "properties": {
738
+ "allowed": {
739
+ "type": "boolean"
740
+ },
741
+ "strategy": {
742
+ "type": "string"
743
+ },
744
+ "retry_after_ms": {
745
+ "type": [
746
+ "number",
747
+ "null"
748
+ ]
749
+ },
750
+ "max_attempts": {
751
+ "type": [
752
+ "integer",
753
+ "null"
754
+ ]
755
+ },
756
+ "requires_idempotency_key": {
757
+ "type": "boolean"
758
+ }
759
+ }
760
+ },
761
+ "fallback": {
762
+ "type": "object",
763
+ "properties": {
764
+ "allowed": {
765
+ "type": "boolean"
766
+ },
767
+ "strategy": {
768
+ "type": [
769
+ "string",
770
+ "null"
771
+ ]
772
+ },
773
+ "preserve_semantics": {
774
+ "type": "boolean"
775
+ },
776
+ "target": {
777
+ "type": [
778
+ "string",
779
+ "null"
780
+ ]
781
+ }
782
+ }
783
+ },
784
+ "notify": {
785
+ "type": "object",
786
+ "properties": {
787
+ "user": {
788
+ "type": "string"
789
+ },
790
+ "operator": {
791
+ "type": "string"
792
+ },
793
+ "agent": {
794
+ "type": "string"
795
+ }
796
+ }
797
+ },
798
+ "cause": {},
799
+ "status": {
800
+ "enum": [
801
+ "success",
802
+ "partial",
803
+ "failure"
804
+ ]
805
+ },
806
+ "partial": {
807
+ "type": "object",
808
+ "properties": {
809
+ "completed": {
810
+ "type": "number"
811
+ },
812
+ "failed": {
813
+ "type": "number"
814
+ },
815
+ "failures": {
816
+ "type": "array"
817
+ }
818
+ }
819
+ }
820
+ }
821
+ }