@openwop/spec-artifacts 2.0.0-rc.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 (229) hide show
  1. package/CORPUS-STAMP.json +234 -0
  2. package/LICENSE +201 -0
  3. package/README.md +7 -0
  4. package/api/.redocly.lint-ignore.yaml +22 -0
  5. package/api/asyncapi.yaml +834 -0
  6. package/api/grpc/openwop.proto +251 -0
  7. package/api/openapi.yaml +2693 -0
  8. package/api/redocly.yaml +23 -0
  9. package/api/seams-v2.yaml +680 -0
  10. package/api/v2/asyncapi.yaml +528 -0
  11. package/api/v2/openapi.yaml +3139 -0
  12. package/api/v2/redocly.yaml +16 -0
  13. package/package.json +10 -0
  14. package/schemas/README.md +144 -0
  15. package/schemas/a2a-task-state.schema.json +78 -0
  16. package/schemas/a2ui-surface-delta-frame.schema.json +48 -0
  17. package/schemas/agent-deployment-transition.schema.json +49 -0
  18. package/schemas/agent-deployment.schema.json +54 -0
  19. package/schemas/agent-eval-suite.schema.json +140 -0
  20. package/schemas/agent-inventory-response.schema.json +115 -0
  21. package/schemas/agent-manifest.schema.json +156 -0
  22. package/schemas/agent-org-chart.schema.json +82 -0
  23. package/schemas/agent-ref.schema.json +63 -0
  24. package/schemas/agent-roster-entry.schema.json +81 -0
  25. package/schemas/agent-roster-response.schema.json +21 -0
  26. package/schemas/ai-envelope.schema.json +134 -0
  27. package/schemas/annotation-create.schema.json +37 -0
  28. package/schemas/annotation.schema.json +56 -0
  29. package/schemas/artifact-type-pack-manifest.schema.json +244 -0
  30. package/schemas/audit-verify-result.schema.json +90 -0
  31. package/schemas/budget-policy.schema.json +18 -0
  32. package/schemas/capabilities.schema.json +4160 -0
  33. package/schemas/certification-bundle-v2.schema.json +118 -0
  34. package/schemas/channel-presence-payload.schema.json +41 -0
  35. package/schemas/channel-written-payload.schema.json +55 -0
  36. package/schemas/chat-card-pack-manifest.schema.json +253 -0
  37. package/schemas/compact-tool-descriptor.schema.json +51 -0
  38. package/schemas/compensation-policy.schema.json +64 -0
  39. package/schemas/conformance-certification-bundle.schema.json +86 -0
  40. package/schemas/connection-pack-manifest.schema.json +353 -0
  41. package/schemas/conversation-event.schema.json +168 -0
  42. package/schemas/conversation-turn.schema.json +117 -0
  43. package/schemas/core-conformance-mock-agent-config.schema.json +152 -0
  44. package/schemas/credential-provenance.schema.json +18 -0
  45. package/schemas/credential-reference.schema.json +21 -0
  46. package/schemas/debug-bundle.schema.json +196 -0
  47. package/schemas/dispatch-config.schema.json +112 -0
  48. package/schemas/envelopes/clarification.request.schema.json +52 -0
  49. package/schemas/envelopes/error.schema.json +30 -0
  50. package/schemas/envelopes/media.audio.schema.json +38 -0
  51. package/schemas/envelopes/media.file.schema.json +37 -0
  52. package/schemas/envelopes/media.image.schema.json +33 -0
  53. package/schemas/envelopes/schema.request.schema.json +26 -0
  54. package/schemas/envelopes/schema.response.schema.json +22 -0
  55. package/schemas/envelopes/ui.a2ui-surface.schema.json +154 -0
  56. package/schemas/error-envelope.schema.json +25 -0
  57. package/schemas/eval-summary.schema.json +92 -0
  58. package/schemas/export-bundle.schema.json +66 -0
  59. package/schemas/form-content-pack-manifest.schema.json +243 -0
  60. package/schemas/frontend-plugin-manifest.schema.json +109 -0
  61. package/schemas/goal.schema.json +104 -0
  62. package/schemas/heartbeat-evaluated.schema.json +14 -0
  63. package/schemas/heartbeat-state-changed.schema.json +14 -0
  64. package/schemas/localized-content-language-settings.schema.json +26 -0
  65. package/schemas/localized-content-page-response.schema.json +60 -0
  66. package/schemas/localized-content-page.schema.json +62 -0
  67. package/schemas/localized-content-section.schema.json +51 -0
  68. package/schemas/memory-entry.schema.json +36 -0
  69. package/schemas/memory-list-options.schema.json +37 -0
  70. package/schemas/node-pack-manifest.schema.json +654 -0
  71. package/schemas/orchestrator-decision.schema.json +90 -0
  72. package/schemas/org-chart-responsibility-view.schema.json +26 -0
  73. package/schemas/pack-lockfile.schema.json +108 -0
  74. package/schemas/prompt-kind.schema.json +8 -0
  75. package/schemas/prompt-pack-manifest.schema.json +117 -0
  76. package/schemas/prompt-ref.schema.json +40 -0
  77. package/schemas/prompt-template.schema.json +149 -0
  78. package/schemas/proposal.schema.json +84 -0
  79. package/schemas/registry-version-manifest.schema.json +208 -0
  80. package/schemas/residency.schema.json +16 -0
  81. package/schemas/run-ancestry-response.schema.json +54 -0
  82. package/schemas/run-diff-response.schema.json +64 -0
  83. package/schemas/run-event-payloads.schema.json +4452 -0
  84. package/schemas/run-event.schema.json +211 -0
  85. package/schemas/run-options.schema.json +80 -0
  86. package/schemas/run-orchestrator-decided-event.schema.json +20 -0
  87. package/schemas/run-snapshot.schema.json +148 -0
  88. package/schemas/security-advisory.schema.json +109 -0
  89. package/schemas/self-hosted-runner-dispatch-frame.schema.json +79 -0
  90. package/schemas/self-hosted-runner-registration.schema.json +53 -0
  91. package/schemas/self-hosted-runner-result-frame.schema.json +38 -0
  92. package/schemas/subject.schema.json +56 -0
  93. package/schemas/suspend-request.schema.json +207 -0
  94. package/schemas/tool-descriptor.schema.json +63 -0
  95. package/schemas/trigger-event.schema.json +222 -0
  96. package/schemas/trigger-subscription-registration.schema.json +67 -0
  97. package/schemas/trigger-subscription.schema.json +26 -0
  98. package/schemas/ui-plugin-message.schema.json +90 -0
  99. package/schemas/v2/a2a-task-state.schema.json +102 -0
  100. package/schemas/v2/a2ui-surface-delta-frame.schema.json +62 -0
  101. package/schemas/v2/agent-deployment-transition.schema.json +67 -0
  102. package/schemas/v2/agent-deployment.schema.json +68 -0
  103. package/schemas/v2/agent-eval-suite.schema.json +214 -0
  104. package/schemas/v2/agent-inventory-response.schema.json +172 -0
  105. package/schemas/v2/agent-manifest.schema.json +218 -0
  106. package/schemas/v2/agent-org-chart.schema.json +149 -0
  107. package/schemas/v2/agent-ref.schema.json +67 -0
  108. package/schemas/v2/agent-roster-entry.schema.json +104 -0
  109. package/schemas/v2/agent-roster-response.schema.json +27 -0
  110. package/schemas/v2/ai-envelope.schema.json +167 -0
  111. package/schemas/v2/annotation-create.schema.json +109 -0
  112. package/schemas/v2/annotation.schema.json +142 -0
  113. package/schemas/v2/artifact-type-pack-manifest.schema.json +245 -0
  114. package/schemas/v2/audit-verify-result.schema.json +110 -0
  115. package/schemas/v2/budget-policy.schema.json +61 -0
  116. package/schemas/v2/capabilities.schema.json +7644 -0
  117. package/schemas/v2/certification-bundle.schema.json +401 -0
  118. package/schemas/v2/channel-presence-payload.schema.json +60 -0
  119. package/schemas/v2/channel-written-payload.schema.json +64 -0
  120. package/schemas/v2/chat-card-pack-manifest.schema.json +254 -0
  121. package/schemas/v2/compact-tool-descriptor.schema.json +108 -0
  122. package/schemas/v2/compensation-policy.schema.json +91 -0
  123. package/schemas/v2/compensation-projection.schema.json +95 -0
  124. package/schemas/v2/configurable.schema.json +110 -0
  125. package/schemas/v2/connection-pack-manifest.schema.json +354 -0
  126. package/schemas/v2/conversation-event.schema.json +281 -0
  127. package/schemas/v2/conversation-turn.schema.json +165 -0
  128. package/schemas/v2/credential-provenance.schema.json +62 -0
  129. package/schemas/v2/credential-reference.schema.json +28 -0
  130. package/schemas/v2/debug-bundle.schema.json +312 -0
  131. package/schemas/v2/dispatch-config.schema.json +147 -0
  132. package/schemas/v2/effect-ledger-projection.schema.json +71 -0
  133. package/schemas/v2/effect-seam-manifest.schema.json +98 -0
  134. package/schemas/v2/envelopes/clarification.request.schema.json +59 -0
  135. package/schemas/v2/envelopes/error.schema.json +35 -0
  136. package/schemas/v2/envelopes/media.audio.schema.json +41 -0
  137. package/schemas/v2/envelopes/media.file.schema.json +40 -0
  138. package/schemas/v2/envelopes/media.image.schema.json +36 -0
  139. package/schemas/v2/envelopes/schema.request.schema.json +29 -0
  140. package/schemas/v2/envelopes/schema.response.schema.json +26 -0
  141. package/schemas/v2/envelopes/ui.a2ui-surface.schema.json +292 -0
  142. package/schemas/v2/error-envelope.schema.json +229 -0
  143. package/schemas/v2/eval-summary.schema.json +166 -0
  144. package/schemas/v2/export-bundle.schema.json +94 -0
  145. package/schemas/v2/form-content-pack-manifest.schema.json +241 -0
  146. package/schemas/v2/frontend-plugin-manifest.schema.json +152 -0
  147. package/schemas/v2/goal.schema.json +188 -0
  148. package/schemas/v2/heartbeat-evaluated.schema.json +34 -0
  149. package/schemas/v2/heartbeat-state-changed.schema.json +31 -0
  150. package/schemas/v2/ids.schema.json +31 -0
  151. package/schemas/v2/localized-content-language-settings.schema.json +34 -0
  152. package/schemas/v2/localized-content-page-response.schema.json +94 -0
  153. package/schemas/v2/localized-content-page.schema.json +87 -0
  154. package/schemas/v2/localized-content-section.schema.json +63 -0
  155. package/schemas/v2/memory-entry.schema.json +45 -0
  156. package/schemas/v2/memory-list-options.schema.json +41 -0
  157. package/schemas/v2/node-pack-manifest.schema.json +657 -0
  158. package/schemas/v2/orchestrator-decision.schema.json +120 -0
  159. package/schemas/v2/org-chart-responsibility-view.schema.json +36 -0
  160. package/schemas/v2/pack-lockfile.schema.json +139 -0
  161. package/schemas/v2/prompt-kind.schema.json +14 -0
  162. package/schemas/v2/prompt-pack-manifest.schema.json +118 -0
  163. package/schemas/v2/prompt-ref.schema.json +42 -0
  164. package/schemas/v2/prompt-template.schema.json +209 -0
  165. package/schemas/v2/proposal.schema.json +145 -0
  166. package/schemas/v2/registry-version-manifest.schema.json +292 -0
  167. package/schemas/v2/residency.schema.json +19 -0
  168. package/schemas/v2/run-ancestry-response.schema.json +68 -0
  169. package/schemas/v2/run-diff-response.schema.json +80 -0
  170. package/schemas/v2/run-event-payloads.schema.json +4588 -0
  171. package/schemas/v2/run-event.schema.json +324 -0
  172. package/schemas/v2/run-options.schema.json +90 -0
  173. package/schemas/v2/run-orchestrator-decided-event.schema.json +22 -0
  174. package/schemas/v2/run-snapshot.schema.json +207 -0
  175. package/schemas/v2/security-advisory.schema.json +138 -0
  176. package/schemas/v2/self-hosted-runner-dispatch-frame.schema.json +119 -0
  177. package/schemas/v2/self-hosted-runner-registration.schema.json +74 -0
  178. package/schemas/v2/self-hosted-runner-result-frame.schema.json +47 -0
  179. package/schemas/v2/subject-link.schema.json +69 -0
  180. package/schemas/v2/subject.schema.json +597 -0
  181. package/schemas/v2/suspend-request.schema.json +370 -0
  182. package/schemas/v2/tool-descriptor.schema.json +150 -0
  183. package/schemas/v2/trigger-event.schema.json +508 -0
  184. package/schemas/v2/trigger-subscription-registration.schema.json +99 -0
  185. package/schemas/v2/trigger-subscription.schema.json +79 -0
  186. package/schemas/v2/ui-plugin-message.schema.json +149 -0
  187. package/schemas/v2/workflow-chain-pack-manifest.schema.json +610 -0
  188. package/schemas/v2/workflow-definition.schema.json +864 -0
  189. package/schemas/v2/workload-identity.schema.json +115 -0
  190. package/schemas/v2/workspace-file-create.schema.json +23 -0
  191. package/schemas/v2/workspace-file.schema.json +45 -0
  192. package/schemas/workflow-chain-pack-manifest.schema.json +615 -0
  193. package/schemas/workflow-definition.schema.json +850 -0
  194. package/schemas/workload-identity.schema.json +79 -0
  195. package/schemas/workspace-file-create.schema.json +20 -0
  196. package/schemas/workspace-file.schema.json +39 -0
  197. package/spec/v1/alias-detectors.json +283 -0
  198. package/spec/v1/capability-declaration-classes.json +176 -0
  199. package/spec/v1/core-standard-manifest.json +423 -0
  200. package/spec/v1/deprecations.json +854 -0
  201. package/spec/v1/deprecations.schema.json +187 -0
  202. package/spec/v1/event-codemap.json +1089 -0
  203. package/spec/v1/event-codemap.schema.json +41 -0
  204. package/spec/v1/extensions.json +1273 -0
  205. package/spec/v1/gaps.json +14581 -0
  206. package/spec/v1/gaps.schema.json +55 -0
  207. package/spec/v1/migrations.json +1822 -0
  208. package/spec/v1/migrations.schema.json +44 -0
  209. package/spec/v1/operation-path-manifest.json +462 -0
  210. package/spec/v1/spec-gaps.json +4823 -0
  211. package/spec/v2/declaration.json +1862 -0
  212. package/spec/v2/declaration.schema.json +305 -0
  213. package/spec/v2/errors.json +837 -0
  214. package/spec/v2/event-codemap.json +1099 -0
  215. package/spec/v2/event-codemap.schema.json +114 -0
  216. package/spec/v2/ext/provider-idempotency/registry.json +6 -0
  217. package/spec/v2/facets/a2a.schema.json +51 -0
  218. package/spec/v2/facets/aiProviders.schema.json +56 -0
  219. package/spec/v2/facets/auth.schema.json +91 -0
  220. package/spec/v2/facets/heartbeat.schema.json +20 -0
  221. package/spec/v2/facets/interrupt.schema.json +29 -0
  222. package/spec/v2/facets/mcp.schema.json +81 -0
  223. package/spec/v2/facets/replay.schema.json +34 -0
  224. package/spec/v2/facets/sandbox.schema.json +31 -0
  225. package/spec/v2/facets/webhooks.schema.json +18 -0
  226. package/spec/v2/path-manifest.json +279 -0
  227. package/spec/v2/peer-dependency-aliases.json +165 -0
  228. package/spec/v2/profiles.json +45 -0
  229. package/spec/v2/release.json +6 -0
@@ -0,0 +1,324 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/run-event.schema.json",
4
+ "title": "RunEventDoc",
5
+ "description": "Persisted event document in the run's append-only event log. Source of truth for run state via projection fold. Canonical OpenWOP v1 event envelope. v2: RFC 0171 §A.",
6
+ "type": "object",
7
+ "required": [
8
+ "eventId",
9
+ "payload",
10
+ "runId",
11
+ "schemaVersion",
12
+ "sequence",
13
+ "timestamp",
14
+ "type"
15
+ ],
16
+ "properties": {
17
+ "eventId": {
18
+ "$ref": "ids.schema.json#/$defs/eventId",
19
+ "description": "Globally unique ID for this event. Generated by appendAtomic before write; consumers MUST treat as opaque."
20
+ },
21
+ "runId": {
22
+ "$ref": "ids.schema.json#/$defs/runId",
23
+ "description": "Run this event belongs to."
24
+ },
25
+ "nodeId": {
26
+ "$ref": "ids.schema.json#/$defs/nodeId",
27
+ "description": "Set for node-scoped events (node.*, approval.*, clarification.*). Lifted to top-level so projection code can key per-node state machines without payload type coercion."
28
+ },
29
+ "type": {
30
+ "oneOf": [
31
+ {
32
+ "type": "string",
33
+ "enum": [
34
+ "agent.decided",
35
+ "agent.handoff",
36
+ "agent.invocation-completed",
37
+ "agent.invocation-started",
38
+ "agent.memory-consolidated",
39
+ "agent.prompt-resolved",
40
+ "agent.reasoned",
41
+ "agent.reasoning-delta",
42
+ "agent.tool-called",
43
+ "agent.tool-returned",
44
+ "agent.verified",
45
+ "approval.granted",
46
+ "approval.overridden",
47
+ "approval.received",
48
+ "approval.rejected",
49
+ "approval.requested",
50
+ "artifact.created",
51
+ "authorization.decided",
52
+ "budget.consumed",
53
+ "budget.exhausted",
54
+ "budget.reserved",
55
+ "budget.threshold-crossed",
56
+ "cap.breached",
57
+ "channel.presence",
58
+ "channel.written",
59
+ "clarification.requested",
60
+ "clarification.resolved",
61
+ "commitment.fired",
62
+ "compensation.completed",
63
+ "compensation.failed",
64
+ "compensation.manual-intervention-required",
65
+ "compensation.paused",
66
+ "compensation.requested",
67
+ "compensation.started",
68
+ "connector.auth-expired",
69
+ "connector.authorized",
70
+ "context.summarized",
71
+ "conversation.closed",
72
+ "conversation.exchanged",
73
+ "conversation.opened",
74
+ "deployment.canary-adjusted",
75
+ "deployment.promoted",
76
+ "deployment.rolled-back",
77
+ "deployment.state-changed",
78
+ "dispatch.fanned-out",
79
+ "dispatch.joined",
80
+ "egress.decided",
81
+ "envelope.nl-to-format-engaged",
82
+ "envelope.recovery-applied",
83
+ "envelope.refusal",
84
+ "envelope.retry-attempted",
85
+ "envelope.retry-exhausted",
86
+ "envelope.truncated",
87
+ "eval.completed",
88
+ "eval.scored",
89
+ "eval.started",
90
+ "goal.closed",
91
+ "goal.evaluated",
92
+ "import.applied",
93
+ "interrupt.requested",
94
+ "interrupt.resolved",
95
+ "lease.acquired",
96
+ "lease.handed-off",
97
+ "lease.lost",
98
+ "lease.renewed",
99
+ "log.appended",
100
+ "memory.compacted",
101
+ "memory.written",
102
+ "model.capability-insufficient",
103
+ "model.capability-substituted",
104
+ "negotiation.decided",
105
+ "node.cancelled",
106
+ "node.completed",
107
+ "node.dispatched",
108
+ "node.failed",
109
+ "node.resumed",
110
+ "node.retried",
111
+ "node.skipped",
112
+ "node.started",
113
+ "node.suspend-failed",
114
+ "node.suspended",
115
+ "orchestrator.decided",
116
+ "output.chunk",
117
+ "prompt.composed",
118
+ "proposal.activated",
119
+ "proposal.created",
120
+ "provider.usage",
121
+ "replay.diverged",
122
+ "replay.diverged-at-refusal",
123
+ "roster.run-initiated",
124
+ "run.cancelled",
125
+ "run.completed",
126
+ "run.dead-lettered",
127
+ "run.failed",
128
+ "run.paused",
129
+ "run.restored-from-snapshot",
130
+ "run.resume-started",
131
+ "run.resumed",
132
+ "run.started",
133
+ "tool.session-closed",
134
+ "tool.session-opened",
135
+ "trigger.delivery-attempted",
136
+ "trigger.subscription-state-changed",
137
+ "variable.changed",
138
+ "version.pinned",
139
+ "voice.barge-in",
140
+ "voice.cancelled",
141
+ "voice.endpoint-candidate",
142
+ "voice.speech-start",
143
+ "voice.synthesis-chunk",
144
+ "voice.transcript",
145
+ "voice.turn-commit",
146
+ "workflow-chain.confidence-escalated",
147
+ "workflow-chain.event",
148
+ "workflow.loopback-limit",
149
+ "workflow.restored",
150
+ "workflow.stalled",
151
+ "workspace.updated"
152
+ ]
153
+ },
154
+ {
155
+ "type": "string",
156
+ "pattern": "^(?!openwop\\.)[a-z][a-z0-9]*(-[a-z0-9]+)*\\.[a-z][a-z0-9]*(-[a-z0-9]+)*(\\.[a-z][a-z0-9]*(-[a-z0-9]+)*)?$"
157
+ }
158
+ ],
159
+ "description": "RFC 0171 §A.1 — a registered protocol type (closed enum generated from spec/v2/event-codemap.json) or a vendor event under <org>.<name>; openwop. is the only reserved prefix. Consumers MUST accept an unknown registered member and MUST NOT act on it (§A.5)."
160
+ },
161
+ "payload": {
162
+ "description": "Event-type-specific payload. Servers MAY validate against per-type schemas; this top-level schema accepts any JSON value.",
163
+ "type": [
164
+ "object",
165
+ "array",
166
+ "string",
167
+ "number",
168
+ "boolean",
169
+ "null"
170
+ ]
171
+ },
172
+ "timestamp": {
173
+ "type": "string",
174
+ "format": "date-time",
175
+ "description": "ISO 8601 timestamp. IO adapters normalize between this canonical form and platform-specific representations (e.g., Firestore Timestamp)."
176
+ },
177
+ "sequence": {
178
+ "type": "integer",
179
+ "minimum": 0,
180
+ "description": "The one ordering field; first event 0 (RFC 0171 §A.3)."
181
+ },
182
+ "schemaVersion": {
183
+ "type": "integer",
184
+ "minimum": 1,
185
+ "description": "Per-event schema version (RFC 0172 §B axis 5)."
186
+ },
187
+ "engineVersion": {
188
+ "type": "integer",
189
+ "description": "Engine version that produced this event. Used by P4 versioning for compatibility checks. v2: integer everywhere (RFC 0172 §B axis 3).",
190
+ "minimum": 0
191
+ },
192
+ "causationId": {
193
+ "$ref": "ids.schema.json#/$defs/eventId",
194
+ "description": "Optional ID of the event that caused this one (e.g., node.completed caused by approval.received). Lets projections build causal chains without inferring from timing."
195
+ }
196
+ },
197
+ "$comment": "RFC 0094 §G + COMPATIBILITY.md §\"Schema closure\": RunEventDoc is a SERVER-EMITTED shape, so it is open (`additionalProperties: true`) — v1.x hosts may add optional fields additively without breaking schema-validating clients. Client-submitted shapes stay closed at their outermost composition.",
198
+ "additionalProperties": false,
199
+ "$defs": {
200
+ "RunEventType": {
201
+ "type": "string",
202
+ "description": "Discriminator for event payload shape. Dotted naming convention. New variants extend the union — readers MUST NOT throw on unknown types (forward-compat: fold best-effort, ignore unknowns). RFC 0151 §D adds the six content-free `compensation.*` events. They are added to this CLOSED enum because without them a conforming host cannot emit them at all: the RFC named the events, the enum did not contain them, and any host following §D would have produced run events that fail schema validation. Payloads carry opaque node/effect IDs, attempt, ordering model, and closed reason codes — never provider bodies or credentials (§D/§G).",
203
+ "enum": [
204
+ "run.started",
205
+ "run.completed",
206
+ "run.failed",
207
+ "run.cancelled",
208
+ "run.resuming",
209
+ "run.paused",
210
+ "run.resumed",
211
+ "run.restored-from-snapshot",
212
+ "run.dead_lettered",
213
+ "node.started",
214
+ "node.completed",
215
+ "node.failed",
216
+ "node.suspended",
217
+ "node.suspend-failed",
218
+ "node.resumed",
219
+ "node.retried",
220
+ "node.skipped",
221
+ "node.cancelled",
222
+ "approval.requested",
223
+ "approval.received",
224
+ "approval.granted",
225
+ "approval.rejected",
226
+ "approval.overridden",
227
+ "clarification.requested",
228
+ "clarification.resolved",
229
+ "interrupt.requested",
230
+ "interrupt.resolved",
231
+ "channel.written",
232
+ "channel.presence",
233
+ "context.summarized",
234
+ "artifact.created",
235
+ "output.chunk",
236
+ "variable.changed",
237
+ "log.appended",
238
+ "version.pinned",
239
+ "workflow.restored",
240
+ "workflow.loopback-limit",
241
+ "workflow.stalled",
242
+ "cap.breached",
243
+ "lease.acquired",
244
+ "lease.renewed",
245
+ "lease.lost",
246
+ "lease.handed-off",
247
+ "replay.diverged",
248
+ "replay.divergedAtRefusal",
249
+ "agent.reasoned",
250
+ "agent.reasoning.delta",
251
+ "provider.usage",
252
+ "prompt.composed",
253
+ "agent.promptResolved",
254
+ "model.capability.substituted",
255
+ "model.capability.insufficient",
256
+ "envelope.retry.attempted",
257
+ "envelope.retry.exhausted",
258
+ "envelope.refusal",
259
+ "envelope.truncated",
260
+ "envelope.nlToFormat.engaged",
261
+ "envelope.recovery.applied",
262
+ "agent.toolCalled",
263
+ "agent.toolReturned",
264
+ "agent.handoff",
265
+ "agent.decided",
266
+ "agent.verified",
267
+ "agent.invocation.started",
268
+ "agent.invocation.completed",
269
+ "eval.started",
270
+ "eval.scored",
271
+ "eval.completed",
272
+ "deployment.promoted",
273
+ "deployment.rolled-back",
274
+ "deployment.canary.adjusted",
275
+ "deployment.state.changed",
276
+ "roster.run.initiated",
277
+ "tool.session.opened",
278
+ "tool.session.closed",
279
+ "egress.decided",
280
+ "trigger.subscription.state.changed",
281
+ "trigger.delivery.attempted",
282
+ "budget.reserved",
283
+ "budget.consumed",
284
+ "budget.threshold.crossed",
285
+ "budget.exhausted",
286
+ "runOrchestrator.decided",
287
+ "node.dispatched",
288
+ "core.dispatch.fanOut",
289
+ "core.dispatch.join",
290
+ "conversation.opened",
291
+ "conversation.exchanged",
292
+ "conversation.closed",
293
+ "memory.compacted",
294
+ "memory.written",
295
+ "agent.memory.consolidated",
296
+ "commitment.fired",
297
+ "workspace.updated",
298
+ "core.workflowChain.event",
299
+ "core.workflowChain.confidence-escalated",
300
+ "connector.authorized",
301
+ "connector.auth_expired",
302
+ "authorization.decided",
303
+ "proposal.created",
304
+ "proposal.activated",
305
+ "goal.evaluated",
306
+ "goal.closed",
307
+ "import.applied",
308
+ "voice.speech_start",
309
+ "voice.transcript",
310
+ "voice.endpoint_candidate",
311
+ "voice.turn_commit",
312
+ "voice.synthesis_chunk",
313
+ "voice.barge_in",
314
+ "voice.cancelled",
315
+ "compensation.requested",
316
+ "compensation.started",
317
+ "compensation.completed",
318
+ "compensation.failed",
319
+ "compensation.paused",
320
+ "compensation.manual_intervention_required"
321
+ ]
322
+ }
323
+ }
324
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/run-options.schema.json",
4
+ "title": "RunOptions",
5
+ "description": "Per-run parameter overlay supplied by the caller in `POST /v1/runs`. See `run-options.md` for full semantics. Reserved keys are typed; unknown keys in `configurable` pass through to the engine. RFC 0094 §A: this schema is OPEN at its own root (no `additionalProperties: false`) because it participates in the composed `createRun` request body in `api/openapi.yaml`; the closure (`unevaluatedProperties: false`) lives at that composition site, the only place JSON Schema 2020-12 can express closure over an `allOf`.",
6
+ "type": "object",
7
+ "properties": {
8
+ "configurable": {
9
+ "$ref": "configurable.schema.json"
10
+ },
11
+ "tags": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 256
17
+ },
18
+ "maxItems": 100,
19
+ "uniqueItems": false,
20
+ "description": "Free-form caller tags for filtering/correlation. Server SHOULD enforce maxItems=100 and per-tag maxLength=256."
21
+ },
22
+ "metadata": {
23
+ "type": "object",
24
+ "description": "Free-form caller metadata. Persisted on the run doc; surfaces back via `RunSnapshot.metadata`. Server MAY enforce a serialized-size limit (recommended: 50KB).",
25
+ "additionalProperties": true
26
+ }
27
+ },
28
+ "$defs": {
29
+ "Configurable": {
30
+ "type": "object",
31
+ "description": "Reserved keys are typed below; unknown keys pass through verbatim. Implementations declare which keys they consume via `Capabilities.configurable` when advertised.",
32
+ "properties": {
33
+ "recursionLimit": {
34
+ "type": "integer",
35
+ "minimum": 1,
36
+ "description": "Override the per-run node-execution ceiling. Server clamps to `Capabilities.limits.maxNodeExecutions`."
37
+ },
38
+ "model": {
39
+ "type": "string",
40
+ "minLength": 1,
41
+ "description": "Override the AI model for nodes that consume `ctx.config.configurable.model`. Examples: `gpt-4`, `claude-opus-4-7`, `gemini-2.5-pro`."
42
+ },
43
+ "temperature": {
44
+ "type": "number",
45
+ "minimum": 0,
46
+ "maximum": 2,
47
+ "description": "Override AI temperature. Server SHOULD enforce 0..2 range."
48
+ },
49
+ "maxTokens": {
50
+ "type": "integer",
51
+ "minimum": 1,
52
+ "description": "Override AI max-tokens cap."
53
+ },
54
+ "promptOverrides": {
55
+ "type": "object",
56
+ "additionalProperties": {
57
+ "type": "string"
58
+ },
59
+ "description": "Per-prompt-ID variant override. Map of canonical prompt ID -> override text."
60
+ },
61
+ "mockProvider": {
62
+ "$ref": "#/$defs/MockProvider"
63
+ }
64
+ },
65
+ "additionalProperties": false
66
+ },
67
+ "MockProvider": {
68
+ "type": "object",
69
+ "description": "Routes AI activity calls through a deterministic mock provider instead of real LLM APIs. Test-keys-only — server returns 403 mock_provider_forbidden on production keys. See run-options.md §Mock provider extension (closes F1).",
70
+ "required": [
71
+ "id"
72
+ ],
73
+ "properties": {
74
+ "id": {
75
+ "type": "string",
76
+ "description": "Selects a mock provider from the server's catalog (advertised via `Capabilities.testing.mockProviders`). The spec-canonical baseline `stream-text` MUST be supported for OpenWOP v1.0 conformance; other providers (`tool-calls`, `error`, `usage-only`) are recommended but not required.",
77
+ "minLength": 1,
78
+ "maxLength": 128
79
+ },
80
+ "config": {
81
+ "type": "object",
82
+ "description": "Per-provider parameter shape. Each provider documents its own keys; see run-options.md §Canonical mock provider catalog. Common shapes (informative — not enforced at this schema level since providers are pluggable):\n\n - stream-text: { tokens: string[], delayMsPerToken?: integer, finishReason?: string, usage?: object, model?: string }\n - tool-calls: { toolCalls: object[], delayMsPerToken?: integer }\n - error: { code: string, message: string, retryable?: boolean, failAfterMs?: integer }\n - usage-only: { usage: object }",
83
+ "additionalProperties": true
84
+ }
85
+ },
86
+ "additionalProperties": false
87
+ }
88
+ },
89
+ "additionalProperties": false
90
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/run-orchestrator-decided-event.schema.json",
4
+ "title": "RunOrchestratorDecidedPayload",
5
+ "description": "Payload for the `runOrchestrator.decided` RunEvent. Emitted exactly once per orchestrator decision by a `core.orchestrator.supervisor` node (or a host-extension equivalent that advertises orchestration). Carries the deciding agent's identity and the typed decision (orchestrator-decision.schema.json). The event envelope's top-level `nodeId` field carries the supervisor node-id; the payload does NOT duplicate it. See RFC 0006 §E for ordering invariants CO-1/CO-2/CO-3.",
6
+ "type": "object",
7
+ "required": [
8
+ "agentId",
9
+ "decision"
10
+ ],
11
+ "properties": {
12
+ "agentId": {
13
+ "$ref": "ids.schema.json#/$defs/agentId",
14
+ "description": "AgentRef.agentId of the orchestrator that emitted this decision. MUST equal `RunSnapshot.runOrchestrator.agentId` for the run's lifetime — the orchestrator identity is set at the first decision and does not change."
15
+ },
16
+ "decision": {
17
+ "$ref": "https://openwop.dev/spec/v2/orchestrator-decision.schema.json"
18
+ }
19
+ },
20
+ "additionalProperties": false,
21
+ "x-openwop-seeded-from": "v1"
22
+ }
@@ -0,0 +1,207 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/run-snapshot.schema.json",
4
+ "title": "RunSnapshot",
5
+ "description": "Projected run state returned by `GET /v1/runs/{runId}`. Source is the run's append-only event log (run-event.schema.json) folded through the `RunProjection`. Forward-compat tolerant: readers MUST ignore unknown fields rather than reject.",
6
+ "type": "object",
7
+ "required": [
8
+ "eventLogSchemaVersion",
9
+ "owner",
10
+ "runId",
11
+ "status",
12
+ "workflowId"
13
+ ],
14
+ "properties": {
15
+ "runId": {
16
+ "$ref": "ids.schema.json#/$defs/runId",
17
+ "description": "Globally unique run identifier."
18
+ },
19
+ "workflowId": {
20
+ "$ref": "ids.schema.json#/$defs/workflowId",
21
+ "description": "ID of the workflow this run executes."
22
+ },
23
+ "status": {
24
+ "type": "string",
25
+ "enum": [
26
+ "pending",
27
+ "running",
28
+ "paused",
29
+ "waiting-approval",
30
+ "waiting-input",
31
+ "waiting-external",
32
+ "completed",
33
+ "failed",
34
+ "cancelling",
35
+ "cancelled"
36
+ ],
37
+ "description": "Current run state. `waiting-external` MUST be used when the suspended interrupt's `kind` is `external-event` per `interrupt-profiles.md §openwop-interrupt-external-event` — distinguishes external-event waits from HITL waits at the wire level. `cancelling` (RFC 0094 §B) is the transitional state between a cancel request being accepted and the terminal `cancelled` — `rest-endpoints.md` and the OpenAPI cancel responses already document the transition; a snapshot read during the cancel cascade carries it. Forward-compat: future statuses MAY be added; readers SHOULD treat unknown values as terminal-unknown rather than throw."
38
+ },
39
+ "compensationStatus": {
40
+ "type": "string",
41
+ "enum": [
42
+ "none",
43
+ "pending",
44
+ "running",
45
+ "completed",
46
+ "partial",
47
+ "failed",
48
+ "manual"
49
+ ],
50
+ "description": "RFC 0151 §D — the run's compensation (unwind) rollup, kept separate from `status` on purpose: `status` is the FORWARD execution state and a closed union exported by the SDK, so RFC 0151 forbids reinterpreting it (there is deliberately no `compensating` run status). OPTIONAL and capability-gated — a host that does not advertise `capabilities.compensation` MUST omit this field; a host that advertises it MUST include it on every snapshot, `none` when no compensation was ever requested for the run. Presence is therefore a wire witness of the advert, and a `none` cannot be read as \"unwind is monitored here\" from a host that would never unwind. Values are the deterministic fold of the six `compensation.*` events over the persisted plan, defined normatively in `spec/v1/compensation.md §\"Run rollup: compensationStatus\"`: `none` (no `compensation.requested`), `pending` (requested, no `started`), `running` (started, plan active — a §E approval pause does NOT change it; the run's own `status: waiting-approval` carries the wait), `completed` (every inverse action completed), `partial` (plan inactive; some completed and some did not — reported, never rounded), `failed` (plan inactive; none completed), `manual` (`manual_intervention_required` recorded and unresolved; takes precedence over `partial`/`failed` while unresolved). Content-free by construction. Resolves RFC 0151 UQ3: `RunSnapshot` (`GET /v1/runs/{runId}`) is the sole owner; debug bundles and the AsyncAPI `run.snapshot` reuse it by `$ref`."
51
+ },
52
+ "owner": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "tenant",
57
+ "subject"
58
+ ],
59
+ "properties": {
60
+ "tenant": {
61
+ "$ref": "ids.schema.json#/$defs/tenantId"
62
+ },
63
+ "workspace": {
64
+ "$ref": "ids.schema.json#/$defs/workspaceId"
65
+ },
66
+ "subject": {
67
+ "$ref": "subject.schema.json"
68
+ }
69
+ },
70
+ "description": "RFC 0170 §A.1 — the Subject is the owner; principal/principalKind removed. Copied verbatim onto a fork (§A.4)."
71
+ },
72
+ "currentNodeId": {
73
+ "type": "string",
74
+ "description": "Set when the run is suspended at a specific node (`waiting-approval` / `waiting-input` / `waiting-external`) — identifies which node holds the interrupt."
75
+ },
76
+ "startedAt": {
77
+ "type": "string",
78
+ "format": "date-time"
79
+ },
80
+ "completedAt": {
81
+ "type": "string",
82
+ "format": "date-time"
83
+ },
84
+ "agent": {
85
+ "$ref": "agent-ref.schema.json",
86
+ "description": "Optional run-level agent identity (Multi-Agent Shift Phase 1). When the run is driven by a single agent, this field carries that agent's `AgentRef`. In supervisor-orchestrated runs (Phase 5), this field rotates as workers hand off — it always carries the active worker for the current node. See `runOrchestrator` for the run-lifetime supervisor identity. Absent for runs with no agent provenance (legacy single-actor host)."
87
+ },
88
+ "runOrchestrator": {
89
+ "$ref": "agent-ref.schema.json",
90
+ "description": "Optional orchestrator-supervisor identity (Multi-Agent Shift Phase 5). When set, this agent owns dispatch decisions across the run's lifetime; `runOrchestrator.decided` events emitted during the run carry this agent's `agentId`. Distinct from `agent` — `agent` rotates with each worker; `runOrchestrator` is set at run start (or first `core.orchestrator.supervisor` node) and MUST NOT change for the run's lifetime. In single-agent runs (no supervisor), this field is absent; in supervisor runs both fields MAY co-exist."
91
+ },
92
+ "nodeStates": {
93
+ "type": "object",
94
+ "description": "Per-node state map. Keys are nodeIds; values are implementation-shaped state objects. Spec doesn't constrain the inner shape — see version-negotiation.md §node-states.",
95
+ "additionalProperties": true
96
+ },
97
+ "variables": {
98
+ "type": "object",
99
+ "description": "Workflow-level variables (caller-supplied inputs + per-node outputs that survive the projection).",
100
+ "additionalProperties": true
101
+ },
102
+ "channels": {
103
+ "type": "object",
104
+ "description": "Optional typed state channels (see channels-and-reducers.md). Present when the workflow declares channel-aware mode.",
105
+ "additionalProperties": true
106
+ },
107
+ "error": {
108
+ "type": "object",
109
+ "description": "Set on terminal `failed`. Structured so consumers can route on code without parsing message text.",
110
+ "required": [
111
+ "code",
112
+ "message"
113
+ ],
114
+ "properties": {
115
+ "code": {
116
+ "type": "string",
117
+ "minLength": 1
118
+ },
119
+ "message": {
120
+ "type": "string",
121
+ "minLength": 1
122
+ },
123
+ "details": {
124
+ "type": "object",
125
+ "additionalProperties": true
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ "engineVersion": {
131
+ "type": "integer",
132
+ "description": "Engine version the run was started under. Used by the projection for forward-compat folds. v2: integer everywhere (RFC 0172 §B axis 3).",
133
+ "minimum": 0
134
+ },
135
+ "eventLogSchemaVersion": {
136
+ "type": "integer",
137
+ "minimum": 2,
138
+ "description": "RFC 0176 §A.2 — the era key; a v2 host writes 3; a v1-era run reads 2."
139
+ },
140
+ "tags": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string",
144
+ "maxLength": 256
145
+ },
146
+ "maxItems": 100,
147
+ "description": "Caller-supplied tags from `RunOptions.tags`."
148
+ },
149
+ "metadata": {
150
+ "type": "object",
151
+ "description": "Caller-supplied metadata from `RunOptions.metadata`.",
152
+ "additionalProperties": true
153
+ },
154
+ "configurable": {
155
+ "type": "object",
156
+ "description": "Per-run overlay from `RunOptions.configurable` (see run-options.md). Reserved keys: `recursionLimit`, `model`, `temperature`, `maxTokens`, `promptOverrides`.",
157
+ "additionalProperties": true
158
+ },
159
+ "metrics": {
160
+ "type": "object",
161
+ "description": "Aggregate run-level metrics. Forward-compat: readers MUST tolerate missing/unknown fields. Fields are populated lazily as the engine emits them — absence does NOT mean zero. Implementation-specific fields (e.g., legacy `cost: number` estimates) MAY appear alongside the spec-canonical fields below.",
162
+ "properties": {
163
+ "openwopCost": {
164
+ "type": "object",
165
+ "description": "Spec-canonical cost rollup aggregated from per-node `recordCost()` calls. Keys mirror the `openwop.cost.*` OTel attribute allowlist (see `observability.md` §Cost attribution). Named `openwopCost` rather than `cost` because some implementations carry a legacy `metrics.cost: number` estimate that predates the typed rollup; using a distinct name avoids collision. Multi-provider runs report `provider`/`model` of the LAST contributing call; SDKs that need per-call detail SHOULD subscribe to OTel spans instead of reading this rollup.",
166
+ "properties": {
167
+ "usd": {
168
+ "type": "number",
169
+ "minimum": 0,
170
+ "description": "Total USD cost across all node-level recordCost emissions."
171
+ },
172
+ "tokens": {
173
+ "type": "object",
174
+ "properties": {
175
+ "input": {
176
+ "type": "integer",
177
+ "minimum": 0
178
+ },
179
+ "output": {
180
+ "type": "integer",
181
+ "minimum": 0
182
+ }
183
+ },
184
+ "additionalProperties": false
185
+ },
186
+ "model": {
187
+ "type": "string",
188
+ "description": "Model identifier of the most recent recordCost emission (e.g., `claude-opus-4-7`). For multi-model runs, surfaces the last value."
189
+ },
190
+ "provider": {
191
+ "type": "string",
192
+ "description": "Normalized provider name (e.g., `anthropic`, `openai`, `gemini`)."
193
+ },
194
+ "duration_ms": {
195
+ "type": "integer",
196
+ "minimum": 0,
197
+ "description": "Sum of per-call durations across all recordCost emissions in this run."
198
+ }
199
+ },
200
+ "additionalProperties": false
201
+ }
202
+ },
203
+ "additionalProperties": false
204
+ }
205
+ },
206
+ "additionalProperties": false
207
+ }