@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,3139 @@
1
+ openapi: 3.1.0
2
+ info:
3
+ title: OpenWOP v2 API
4
+ version: 2.0.0-rc.0
5
+ summary: REST surface for declaring, executing, suspending, resuming, and observing multi-step workflows.
6
+ description: GENERATED by scripts/derive-v2-api.py from api/openapi.yaml and the RFC 0167 children (v2 charter Phase 3,
7
+ P3-C). Bare origin, unversioned path keys, negotiation by `OpenWOP-Version` + `protocolVersions[]` (RFC 0172 §A). No seam
8
+ or test-mode operation lives here (RFC 0168 §C.2 — see api/seams-v2.yaml). Every non-standard header is `OpenWOP-<Name>`
9
+ (RFC 0171 §C.1). Retry timing lives in `Retry-After` only (RFC 0171 §B.2).
10
+ contact:
11
+ name: openwop spec working group
12
+ url: https://openwop.dev/spec/v1/
13
+ license:
14
+ name: Apache-2.0
15
+ identifier: Apache-2.0
16
+ externalDocs:
17
+ description: openwop spec v1 corpus
18
+ url: https://openwop.dev/spec/v1/
19
+ servers:
20
+ - url: https://{host}
21
+ description: openwop-compliant server
22
+ variables:
23
+ host:
24
+ default: api.example.com
25
+ description: Replace with your server's hostname.
26
+ security:
27
+ - ApiKeyAuth: []
28
+ tags:
29
+ - name: discovery
30
+ description: Public capability + spec discovery (no auth required).
31
+ - name: workflows
32
+ description: Workflow definition manifest.
33
+ - name: runs
34
+ description: Run lifecycle — create, read, stream, cancel, fork.
35
+ - name: agents
36
+ description: Manifest-agent inventory (RFC 0072 §A). Read-only; gated on capabilities.agents.manifestRuntime. Dispatch rides
37
+ the run surface (WorkflowNode.agent + POST /v1/runs).
38
+ - name: tools
39
+ description: Portable tool catalog (RFC 0078 §B). Read-only ToolDescriptor projection across tool sources (node-pack / workflow
40
+ / mcp / connector / host-extension); gated on capabilities.toolCatalog; authorization-scoped per §F-2.
41
+ - name: hitl
42
+ description: Human-in-the-loop interrupts and approvals.
43
+ - name: artifacts
44
+ description: Run-produced artifacts.
45
+ - name: webhooks
46
+ description: Subscribe to run events via outbound HTTP.
47
+ - name: triggers
48
+ description: Durable trigger-bridge subscriptions (RFC 0083). RFC 0099 adds the external-event create surface (`POST /v1/trigger-subscriptions`);
49
+ gated on `capabilities.triggerBridge.ingestion.registrationEndpoint`.
50
+ - name: audit
51
+ description: Audit-log integrity verification (gated on the `openwop-audit-log-integrity` profile).
52
+ - name: prompts
53
+ description: Prompt-template library — list, fetch, render, mutate (RFC 0028; gated on `capabilities.prompts.*`).
54
+ - name: content
55
+ description: Localized authored content — public delivery + tenant-scoped admin CRUD (RFC 0103; gated on `capabilities.content.supported`).
56
+ - name: host
57
+ description: Host-capability resources — e.g. the RFC 0059 agent workspace file store (gated on `capabilities.workspace.*`).
58
+ - name: packs-test
59
+ description: 'RFC 0025 (`Draft`). Test-mode mirror of the production `/v1/packs/*` publish/get/delete/sig surface against
60
+
61
+ an isolated catalog. Gated on `capabilities.packs.testMode.supported: true` plus the reference impl''s
62
+
63
+ `OPENWOP_PACKS_TEST_NAMESPACE_ENABLED=true` env-gate. Lets the conformance suite exercise the documented
64
+
65
+ 19-code publish error catalog without `packs:publish` scope on the real registry. Hosts that haven''t
66
+
67
+ mounted this surface MUST return `404 Not Found` for every path under `/v1/packs-test/`.
68
+
69
+
70
+ Scope note (RFC 0094 §I): the PRODUCTION `/v1/packs/*` surface these paths mirror is specified in
71
+
72
+ `spec/v1/registry-operations.md` + `node-packs.md` §"Registry HTTP API" and is served by a registry
73
+
74
+ service (a distinct deployable from the host), so it is intentionally NOT defined in this host
75
+
76
+ OpenAPI document.
77
+
78
+ '
79
+ paths:
80
+ /.well-known/openwop:
81
+ get:
82
+ tags:
83
+ - discovery
84
+ summary: Capability declaration handshake.
85
+ operationId: getCapabilities
86
+ security: []
87
+ parameters:
88
+ - name: If-None-Match
89
+ in: header
90
+ required: false
91
+ schema:
92
+ type: string
93
+ description: RFC 0165 §C.2. Standard conditional request against the discovery document's `ETag`; a matching value
94
+ SHOULD yield `304 Not Modified`.
95
+ - $ref: '#/components/parameters/OpenWOPVersion'
96
+ responses:
97
+ '200':
98
+ description: Capabilities object — see `capabilities.md`.
99
+ headers:
100
+ Cache-Control:
101
+ schema:
102
+ type: string
103
+ example: public, max-age=300
104
+ ETag:
105
+ schema:
106
+ type: string
107
+ description: Optional probe handle for mid-session capability change detection. Deprecated toward v2 (RFC 0165
108
+ §C.2).
109
+ OpenWOP-Version:
110
+ $ref: '#/components/headers/OpenWOPVersion'
111
+ content:
112
+ application/json:
113
+ schema:
114
+ $ref: '#/components/schemas/Capabilities'
115
+ '304':
116
+ description: RFC 0165 §C.2 — `If-None-Match` matched the current `ETag`; the body is unchanged.
117
+ headers:
118
+ OpenWOP-Version:
119
+ $ref: '#/components/headers/OpenWOPVersion'
120
+ '503':
121
+ description: Server unable to compute capabilities (transient).
122
+ content:
123
+ application/json:
124
+ schema:
125
+ $ref: '#/components/schemas/Error'
126
+ headers:
127
+ OpenWOP-Version:
128
+ $ref: '#/components/headers/OpenWOPVersion'
129
+ /openapi.json:
130
+ get:
131
+ tags:
132
+ - discovery
133
+ summary: Self-describing OpenAPI 3.1 spec.
134
+ operationId: getOpenApiSpec
135
+ security: []
136
+ responses:
137
+ '200':
138
+ description: This document.
139
+ content:
140
+ application/json:
141
+ schema:
142
+ type: object
143
+ headers:
144
+ OpenWOP-Version:
145
+ $ref: '#/components/headers/OpenWOPVersion'
146
+ '503':
147
+ description: Server unable to serve spec (transient).
148
+ content:
149
+ application/json:
150
+ schema:
151
+ $ref: '#/components/schemas/Error'
152
+ headers:
153
+ OpenWOP-Version:
154
+ $ref: '#/components/headers/OpenWOPVersion'
155
+ parameters:
156
+ - $ref: '#/components/parameters/OpenWOPVersion'
157
+ /workflows/{workflowId}:
158
+ get:
159
+ tags:
160
+ - workflows
161
+ summary: Read a workflow definition.
162
+ operationId: getWorkflow
163
+ parameters:
164
+ - $ref: '#/components/parameters/WorkflowId'
165
+ - $ref: '#/components/parameters/OpenWOPVersion'
166
+ responses:
167
+ '200':
168
+ description: Workflow definition.
169
+ content:
170
+ application/json:
171
+ schema:
172
+ $ref: ../../schemas/v2/workflow-definition.schema.json
173
+ headers:
174
+ OpenWOP-Version:
175
+ $ref: '#/components/headers/OpenWOPVersion'
176
+ '401':
177
+ $ref: '#/components/responses/Unauthenticated'
178
+ '403':
179
+ $ref: '#/components/responses/Forbidden'
180
+ '404':
181
+ $ref: '#/components/responses/NotFound'
182
+ /runs:
183
+ post:
184
+ tags:
185
+ - runs
186
+ summary: Create a new run.
187
+ operationId: createRun
188
+ parameters:
189
+ - $ref: '#/components/parameters/IdempotencyKey'
190
+ - in: header
191
+ name: OpenWOP-Dedup
192
+ schema:
193
+ type: string
194
+ enum:
195
+ - enforce
196
+ description: When set, server cross-host claim system rejects duplicate `(tenantId, scopeId)` pairs with `409 Conflict`.
197
+ - in: header
198
+ name: OpenWOP-Force-Engine-Version
199
+ schema:
200
+ type: integer
201
+ minimum: 0
202
+ description: '**Test-keys-only.** When set, the server emits events for this run AS IF it
203
+
204
+ were running the specified engine version (must be within the server''s
205
+
206
+ advertised `Capabilities.testing.forceEngineVersionRange`). Used by the
207
+
208
+ conformance suite to verify version-negotiation fold-best-effort tolerance
209
+
210
+ across the spec''s forward-compat matrix. Servers MUST reject on production
211
+
212
+ API keys with `403 force_engine_version_forbidden`. Closes F5.
213
+
214
+ '
215
+ - $ref: '#/components/parameters/OpenWOPVersion'
216
+ requestBody:
217
+ required: true
218
+ content:
219
+ application/json:
220
+ schema:
221
+ unevaluatedProperties: false
222
+ allOf:
223
+ - type: object
224
+ properties:
225
+ workflowId:
226
+ type: string
227
+ minLength: 1
228
+ inputs:
229
+ type: object
230
+ description: Workflow inputs (consumed by triggers/nodes).
231
+ residency:
232
+ $ref: ../../schemas/v2/residency.schema.json
233
+ tenantId:
234
+ type: string
235
+ description: Tenant scoping. Server typically defaults from API key.
236
+ scopeId:
237
+ type: string
238
+ description: Opaque correlation ID for `X-Dedup` semantics.
239
+ callbackUrl:
240
+ type: string
241
+ format: uri
242
+ description: Signed-token HITL callback URL (see `interrupt.md`).
243
+ mode:
244
+ type: string
245
+ enum:
246
+ - eval
247
+ description: 'RFC 0081 §B. When `eval`, this run is an eval-suite projection
248
+
249
+ (not a workflow run): the host runs the `evalSuiteRef` against
250
+
251
+ `agentId`, emits the content-free `eval.*` family, and terminates
252
+
253
+ with an `EvalSummary` readable via `GET /v1/runs/{runId}/eval-summary`.
254
+
255
+ Capability-gated on `capabilities.agents.evalSuite.supported`; a
256
+
257
+ host that omits it rejects `mode: "eval"` with 501. Omit for a
258
+
259
+ normal workflow run.
260
+
261
+ '
262
+ evalSuiteRef:
263
+ type: string
264
+ minLength: 1
265
+ description: RFC 0081 — URI of the `AgentEvalSuite` to run. Required when mode is `eval`.
266
+ agentId:
267
+ type: string
268
+ minLength: 1
269
+ description: RFC 0081 — the manifest agent the eval suite targets. Required when mode is `eval`.
270
+ if:
271
+ properties:
272
+ mode:
273
+ const: eval
274
+ required:
275
+ - mode
276
+ then:
277
+ required:
278
+ - evalSuiteRef
279
+ - agentId
280
+ else:
281
+ required:
282
+ - workflowId
283
+ - $ref: ../../schemas/v2/run-options.schema.json
284
+ responses:
285
+ '201':
286
+ description: Run accepted.
287
+ headers:
288
+ OpenWOP-Idempotent-Replay:
289
+ schema:
290
+ type: boolean
291
+ description: Set when the response was served from the idempotency cache.
292
+ OpenWOP-Version:
293
+ $ref: '#/components/headers/OpenWOPVersion'
294
+ content:
295
+ application/json:
296
+ schema:
297
+ type: object
298
+ required:
299
+ - runId
300
+ - status
301
+ - eventsUrl
302
+ properties:
303
+ runId:
304
+ type: string
305
+ status:
306
+ type: string
307
+ enum:
308
+ - pending
309
+ - running
310
+ - waiting-approval
311
+ - waiting-input
312
+ - waiting-external
313
+ eventsUrl:
314
+ type: string
315
+ format: uri
316
+ statusUrl:
317
+ type: string
318
+ format: uri
319
+ '400':
320
+ $ref: '#/components/responses/ValidationError'
321
+ '401':
322
+ $ref: '#/components/responses/Unauthenticated'
323
+ '403':
324
+ $ref: '#/components/responses/Forbidden'
325
+ '409':
326
+ description: '`X-Dedup` collision OR concurrent `Idempotency-Key` collision.'
327
+ headers:
328
+ Retry-After:
329
+ schema:
330
+ type: integer
331
+ description: Seconds until the active claim is stale-eligible.
332
+ OpenWOP-Version:
333
+ $ref: '#/components/headers/OpenWOPVersion'
334
+ content:
335
+ application/json:
336
+ schema:
337
+ $ref: '#/components/schemas/RunClaimConflict'
338
+ '429':
339
+ $ref: '#/components/responses/RateLimited'
340
+ /runs/{runId}:
341
+ get:
342
+ tags:
343
+ - runs
344
+ summary: Read run state (cached projection).
345
+ operationId: getRun
346
+ parameters:
347
+ - $ref: '#/components/parameters/RunId'
348
+ - in: header
349
+ name: If-None-Match
350
+ required: false
351
+ schema:
352
+ type: string
353
+ description: 'RFC 0115. Conditional revalidation. When this carries the
354
+
355
+ current `ETag`, the host responds `304 Not Modified` with no
356
+
357
+ body (capability-gated on `restTransport.conditionalRunGet`).
358
+
359
+ '
360
+ - $ref: '#/components/parameters/OpenWOPVersion'
361
+ responses:
362
+ '200':
363
+ description: Projected run state.
364
+ headers:
365
+ ETag:
366
+ schema:
367
+ type: string
368
+ description: 'RFC 0115. Strong validator derived from the run''s latest
369
+
370
+ persisted event-log sequence number; changes on every
371
+
372
+ observable state transition, stable while none occurs.
373
+
374
+ '
375
+ Content-Encoding:
376
+ required: false
377
+ schema:
378
+ type: string
379
+ enum:
380
+ - gzip
381
+ - br
382
+ - zstd
383
+ description: 'RFC 0115. Present only when the host negotiated compression
384
+
385
+ from `Accept-Encoding`; pairs with `Vary: Accept-Encoding`.
386
+
387
+ The decoded body is byte-identical to the identity body.
388
+
389
+ '
390
+ OpenWOP-Version:
391
+ $ref: '#/components/headers/OpenWOPVersion'
392
+ content:
393
+ application/json:
394
+ schema:
395
+ $ref: '#/components/schemas/RunSnapshot'
396
+ '304':
397
+ description: RFC 0115. Not Modified — `If-None-Match` matched the current `ETag`. Empty body.
398
+ headers:
399
+ OpenWOP-Version:
400
+ $ref: '#/components/headers/OpenWOPVersion'
401
+ '401':
402
+ $ref: '#/components/responses/Unauthenticated'
403
+ '403':
404
+ $ref: '#/components/responses/Forbidden'
405
+ '404':
406
+ $ref: '#/components/responses/NotFound'
407
+ /runs/{runId}/events:
408
+ get:
409
+ tags:
410
+ - runs
411
+ summary: SSE stream of run events.
412
+ operationId: streamRunEvents
413
+ parameters:
414
+ - $ref: '#/components/parameters/RunId'
415
+ - in: query
416
+ name: streamMode
417
+ schema:
418
+ type: string
419
+ pattern: ^(values|(updates|messages|debug)(,(updates|messages|debug))*)$
420
+ default: updates
421
+ description: RFC 0171 §E.1 — the closed set and its comma-separated combinations; `values` never combines.
422
+ - in: query
423
+ name: bufferMs
424
+ schema:
425
+ type: integer
426
+ minimum: 0
427
+ maximum: 5000
428
+ description: 'Optional batching hint per S3 closure. When set, the server
429
+
430
+ accumulates events for up to N ms (or until a forced-flush
431
+
432
+ trigger fires — terminal events, suspensions, connection close)
433
+
434
+ and emits a single SSE event with `event: batch` and `data:` as
435
+
436
+ a JSON array of `RunEventDoc`. Range 0..5000; `0` = no buffering.
437
+
438
+ See `stream-modes.md` §Aggregation hint.
439
+
440
+ '
441
+ - in: header
442
+ name: Last-Event-ID
443
+ schema:
444
+ type: string
445
+ description: Resume from sequence after this ID.
446
+ - $ref: '#/components/parameters/OpenWOPVersion'
447
+ responses:
448
+ '200':
449
+ description: SSE stream. Auto-closes on terminal event. Keep-alive comments every 30s.
450
+ content:
451
+ text/event-stream:
452
+ schema:
453
+ type: string
454
+ description: SSE events. Each event has `id:`, `event:`, `data:` per RFC 8895.
455
+ headers:
456
+ OpenWOP-Version:
457
+ $ref: '#/components/headers/OpenWOPVersion'
458
+ '400':
459
+ description: Unsupported `streamMode`.
460
+ content:
461
+ application/json:
462
+ schema:
463
+ $ref: '#/components/schemas/UnsupportedStreamMode'
464
+ headers:
465
+ OpenWOP-Version:
466
+ $ref: '#/components/headers/OpenWOPVersion'
467
+ '401':
468
+ $ref: '#/components/responses/Unauthenticated'
469
+ '403':
470
+ $ref: '#/components/responses/Forbidden'
471
+ '404':
472
+ $ref: '#/components/responses/NotFound'
473
+ /runs/{runId}/events/poll:
474
+ get:
475
+ tags:
476
+ - runs
477
+ summary: Long-poll fallback for non-SSE clients.
478
+ operationId: pollRunEvents
479
+ parameters:
480
+ - $ref: '#/components/parameters/RunId'
481
+ - in: query
482
+ name: afterSequence
483
+ schema:
484
+ type: integer
485
+ minimum: 0
486
+ description: RFC 0171 §E.2 — return events with `sequence > afterSequence`; omission means from the first event (sequence
487
+ 0). `lastSequence` and `since` are gone.
488
+ - in: query
489
+ name: timeout
490
+ schema:
491
+ type: integer
492
+ minimum: 1
493
+ maximum: 60
494
+ default: 30
495
+ description: Seconds to wait for new events. Max 60.
496
+ - $ref: '#/components/parameters/OpenWOPVersion'
497
+ responses:
498
+ '200':
499
+ description: Events since `lastSequence`.
500
+ content:
501
+ application/json:
502
+ schema:
503
+ type: object
504
+ additionalProperties: false
505
+ required:
506
+ - runId
507
+ - events
508
+ - lastSequence
509
+ - status
510
+ - isTerminal
511
+ properties:
512
+ runId:
513
+ $ref: ../../schemas/v2/ids.schema.json#/$defs/runId
514
+ events:
515
+ type: array
516
+ items:
517
+ $ref: ../../schemas/v2/run-event.schema.json
518
+ lastSequence:
519
+ type: integer
520
+ minimum: -1
521
+ description: The highest sequence in the log at the time of the response (one meaning); -1 when the log
522
+ is empty.
523
+ status:
524
+ type: string
525
+ isTerminal:
526
+ type: boolean
527
+ headers:
528
+ OpenWOP-Version:
529
+ $ref: '#/components/headers/OpenWOPVersion'
530
+ '401':
531
+ $ref: '#/components/responses/Unauthenticated'
532
+ '403':
533
+ $ref: '#/components/responses/Forbidden'
534
+ '404':
535
+ $ref: '#/components/responses/NotFound'
536
+ /runs/{runId}/cancel:
537
+ post:
538
+ tags:
539
+ - runs
540
+ summary: Cancel an in-flight run.
541
+ operationId: cancelRun
542
+ parameters:
543
+ - $ref: '#/components/parameters/RunId'
544
+ - $ref: '#/components/parameters/IdempotencyKey'
545
+ - $ref: '#/components/parameters/OpenWOPVersion'
546
+ requestBody:
547
+ content:
548
+ application/json:
549
+ schema:
550
+ type: object
551
+ properties:
552
+ reason:
553
+ type: string
554
+ responses:
555
+ '200':
556
+ description: Run cancellation accepted (cascade may be async).
557
+ content:
558
+ application/json:
559
+ schema:
560
+ type: object
561
+ properties:
562
+ runId:
563
+ type: string
564
+ status:
565
+ type: string
566
+ enum:
567
+ - cancelled
568
+ - cancelling
569
+ headers:
570
+ OpenWOP-Version:
571
+ $ref: '#/components/headers/OpenWOPVersion'
572
+ '401':
573
+ $ref: '#/components/responses/Unauthenticated'
574
+ '403':
575
+ $ref: '#/components/responses/Forbidden'
576
+ '404':
577
+ $ref: '#/components/responses/NotFound'
578
+ /runs/{runId}/annotations:
579
+ post:
580
+ tags:
581
+ - runs
582
+ summary: Record a non-blocking quality annotation on a run (RFC 0056).
583
+ operationId: createAnnotation
584
+ parameters:
585
+ - $ref: '#/components/parameters/RunId'
586
+ - $ref: '#/components/parameters/IdempotencyKey'
587
+ - $ref: '#/components/parameters/OpenWOPVersion'
588
+ requestBody:
589
+ required: true
590
+ content:
591
+ application/json:
592
+ schema:
593
+ $ref: ../../schemas/v2/annotation-create.schema.json
594
+ responses:
595
+ '201':
596
+ description: Annotation recorded. Returns the persisted annotation.
597
+ content:
598
+ application/json:
599
+ schema:
600
+ $ref: ../../schemas/v2/annotation.schema.json
601
+ headers:
602
+ OpenWOP-Version:
603
+ $ref: '#/components/headers/OpenWOPVersion'
604
+ '400':
605
+ $ref: '#/components/responses/ValidationError'
606
+ '401':
607
+ $ref: '#/components/responses/Unauthenticated'
608
+ '403':
609
+ $ref: '#/components/responses/Forbidden'
610
+ '404':
611
+ $ref: '#/components/responses/NotFound'
612
+ '501':
613
+ description: Host does not advertise capabilities.feedback.supported (RFC 0056).
614
+ content:
615
+ application/json:
616
+ schema:
617
+ $ref: ../../schemas/v2/error-envelope.schema.json
618
+ headers:
619
+ OpenWOP-Version:
620
+ $ref: '#/components/headers/OpenWOPVersion'
621
+ get:
622
+ tags:
623
+ - runs
624
+ summary: List the annotations recorded on a run (RFC 0056).
625
+ operationId: listAnnotations
626
+ parameters:
627
+ - $ref: '#/components/parameters/RunId'
628
+ - $ref: '#/components/parameters/OpenWOPVersion'
629
+ responses:
630
+ '200':
631
+ description: Annotations for the run (tenant-scoped).
632
+ content:
633
+ application/json:
634
+ schema:
635
+ type: object
636
+ required:
637
+ - annotations
638
+ properties:
639
+ annotations:
640
+ type: array
641
+ items:
642
+ $ref: ../../schemas/v2/annotation.schema.json
643
+ additionalProperties: false
644
+ headers:
645
+ OpenWOP-Version:
646
+ $ref: '#/components/headers/OpenWOPVersion'
647
+ '401':
648
+ $ref: '#/components/responses/Unauthenticated'
649
+ '403':
650
+ $ref: '#/components/responses/Forbidden'
651
+ '404':
652
+ $ref: '#/components/responses/NotFound'
653
+ '501':
654
+ description: Host does not advertise capabilities.feedback.supported (RFC 0056).
655
+ content:
656
+ application/json:
657
+ schema:
658
+ $ref: ../../schemas/v2/error-envelope.schema.json
659
+ headers:
660
+ OpenWOP-Version:
661
+ $ref: '#/components/headers/OpenWOPVersion'
662
+ /trigger-subscriptions:
663
+ post:
664
+ tags:
665
+ - triggers
666
+ summary: Register an external-event trigger subscription (RFC 0099).
667
+ description: 'Creates an external-event (`webhook`/`email`/`form`) TriggerSubscription
668
+
669
+ bound to a workflow, with a dedup config and a source-authenticity
670
+
671
+ verification policy (RFC 0099 §F.2). The `workflowId` MUST resolve under
672
+
673
+ the caller''s RFC 0048 owner triple. The response carries the created
674
+
675
+ TriggerSubscription plus a source-specific `binding`; the binding
676
+
677
+ secret/URL is returned ONCE and is not re-fetchable in cleartext.
678
+
679
+ '
680
+ operationId: createTriggerSubscription
681
+ parameters:
682
+ - $ref: '#/components/parameters/IdempotencyKey'
683
+ - $ref: '#/components/parameters/OpenWOPVersion'
684
+ requestBody:
685
+ required: true
686
+ content:
687
+ application/json:
688
+ schema:
689
+ $ref: ../../schemas/v2/trigger-subscription-registration.schema.json
690
+ responses:
691
+ '201':
692
+ description: Subscription created. Returns the TriggerSubscription + a source-specific binding.
693
+ content:
694
+ application/json:
695
+ schema:
696
+ type: object
697
+ required:
698
+ - subscription
699
+ - binding
700
+ additionalProperties: false
701
+ properties:
702
+ subscription:
703
+ $ref: ../../schemas/v2/trigger-subscription.schema.json
704
+ binding:
705
+ type: object
706
+ description: 'Source-specific binding the caller needs to wire the external
707
+
708
+ source. For `webhook`: `{ ingestUrl, secretFingerprint }`; for
709
+
710
+ `email`: `{ ingestAddress }`; for `form`: `{ ingestUrl }`. The
711
+
712
+ secret is returned once at creation (SR-1).
713
+
714
+ '
715
+ additionalProperties: true
716
+ properties:
717
+ ingestUrl:
718
+ type: string
719
+ format: uri
720
+ ingestAddress:
721
+ type: string
722
+ secretFingerprint:
723
+ type: string
724
+ maxLength: 32
725
+ headers:
726
+ OpenWOP-Version:
727
+ $ref: '#/components/headers/OpenWOPVersion'
728
+ '400':
729
+ $ref: '#/components/responses/ValidationError'
730
+ '401':
731
+ $ref: '#/components/responses/Unauthenticated'
732
+ '403':
733
+ $ref: '#/components/responses/Forbidden'
734
+ '501':
735
+ description: Host does not advertise capabilities.triggerBridge.ingestion.registrationEndpoint (RFC 0099).
736
+ content:
737
+ application/json:
738
+ schema:
739
+ $ref: ../../schemas/v2/error-envelope.schema.json
740
+ headers:
741
+ OpenWOP-Version:
742
+ $ref: '#/components/headers/OpenWOPVersion'
743
+ /content/pages/{slug}:
744
+ get:
745
+ tags:
746
+ - content
747
+ security: []
748
+ summary: Deliver a published content page resolved for the negotiated locale (RFC 0103 §D).
749
+ description: 'Resolves the published page `slug` for the locale negotiated from
750
+
751
+ `Accept-Language` (i18n.md fallback: q-value order → language family →
752
+
753
+ `content.baseLocale`), applies the per-section field merge
754
+
755
+ (`localized-content.md` §C), and returns the already-merged sections in
756
+
757
+ render order. Sets `Content-Language` to the locale used,
758
+
759
+ `Vary: Accept-Language, Accept-Encoding`, and
760
+
761
+ `Cache-Control: public, max-age=300, stale-while-revalidate=3600`.
762
+
763
+ Serves `status: "published"` content only. Tenant is host-resolved
764
+
765
+ (`localized-content.md` §F): credential-derived when authenticated,
766
+
767
+ host-defined (e.g. domain) when anonymous. A `slug` absent for the
768
+
769
+ resolved tenant returns the same `404` as a nonexistent slug (no
770
+
771
+ cross-tenant enumeration).
772
+
773
+ '
774
+ operationId: getContentPage
775
+ parameters:
776
+ - name: slug
777
+ in: path
778
+ required: true
779
+ schema:
780
+ type: string
781
+ pattern: ^[a-z][a-z0-9-]*$
782
+ description: The page slug.
783
+ - name: Accept-Language
784
+ in: header
785
+ required: false
786
+ schema:
787
+ type: string
788
+ description: BCP-47 preference list; authoritative for locale selection (i18n.md). A malformed value MUST NOT 400.
789
+ - $ref: '#/components/parameters/OpenWOPVersion'
790
+ responses:
791
+ '200':
792
+ description: The resolved, published page for the negotiated locale.
793
+ headers:
794
+ Content-Language:
795
+ schema:
796
+ type: string
797
+ description: The BCP-47 locale actually used (equals the response `locale`).
798
+ OpenWOP-Version:
799
+ $ref: '#/components/headers/OpenWOPVersion'
800
+ content:
801
+ application/json:
802
+ schema:
803
+ $ref: ../../schemas/v2/localized-content-page-response.schema.json
804
+ '404':
805
+ $ref: '#/components/responses/NotFound'
806
+ '501':
807
+ description: Host does not advertise capabilities.content.supported (RFC 0103).
808
+ content:
809
+ application/json:
810
+ schema:
811
+ $ref: ../../schemas/v2/error-envelope.schema.json
812
+ headers:
813
+ OpenWOP-Version:
814
+ $ref: '#/components/headers/OpenWOPVersion'
815
+ /content/pages:
816
+ get:
817
+ tags:
818
+ - content
819
+ summary: List content pages for the caller's tenant (RFC 0103 §D, admin).
820
+ description: 'Tenant-scoped admin listing of pages (draft + published). Requires a
821
+
822
+ principal with `content.read` scope.
823
+
824
+ '
825
+ operationId: listContentPages
826
+ responses:
827
+ '200':
828
+ description: The caller-tenant's pages.
829
+ content:
830
+ application/json:
831
+ schema:
832
+ type: array
833
+ items:
834
+ $ref: ../../schemas/v2/localized-content-page.schema.json
835
+ headers:
836
+ OpenWOP-Version:
837
+ $ref: '#/components/headers/OpenWOPVersion'
838
+ '401':
839
+ $ref: '#/components/responses/Unauthenticated'
840
+ '403':
841
+ $ref: '#/components/responses/Forbidden'
842
+ '501':
843
+ description: Host does not advertise capabilities.content.supported (RFC 0103).
844
+ content:
845
+ application/json:
846
+ schema:
847
+ $ref: ../../schemas/v2/error-envelope.schema.json
848
+ headers:
849
+ OpenWOP-Version:
850
+ $ref: '#/components/headers/OpenWOPVersion'
851
+ parameters:
852
+ - $ref: '#/components/parameters/OpenWOPVersion'
853
+ post:
854
+ tags:
855
+ - content
856
+ summary: Create a content page (RFC 0103 §D, admin).
857
+ description: Tenant-scoped page creation. Requires `content.write` scope.
858
+ operationId: createContentPage
859
+ requestBody:
860
+ required: true
861
+ content:
862
+ application/json:
863
+ schema:
864
+ $ref: ../../schemas/v2/localized-content-page.schema.json
865
+ responses:
866
+ '201':
867
+ description: The created page.
868
+ content:
869
+ application/json:
870
+ schema:
871
+ $ref: ../../schemas/v2/localized-content-page.schema.json
872
+ headers:
873
+ OpenWOP-Version:
874
+ $ref: '#/components/headers/OpenWOPVersion'
875
+ '400':
876
+ description: Invalid request (e.g. baseLocale in supportedLocales, or a malformed locale/slug).
877
+ content:
878
+ application/json:
879
+ schema:
880
+ $ref: ../../schemas/v2/error-envelope.schema.json
881
+ headers:
882
+ OpenWOP-Version:
883
+ $ref: '#/components/headers/OpenWOPVersion'
884
+ '401':
885
+ $ref: '#/components/responses/Unauthenticated'
886
+ '403':
887
+ $ref: '#/components/responses/Forbidden'
888
+ parameters:
889
+ - $ref: '#/components/parameters/OpenWOPVersion'
890
+ /content/pages/{pageId}/sections/{sectionId}:
891
+ put:
892
+ tags:
893
+ - content
894
+ summary: Upsert a section's base or per-locale fields (RFC 0103 §D, admin).
895
+ description: 'Locale-targeted write: `locale == content.baseLocale` upserts the
896
+
897
+ section''s base `data`; any other (BCP-47-subset) locale upserts
898
+
899
+ `localizations[locale]`. Tenant-scoped; requires `content.write`.
900
+
901
+ '
902
+ operationId: putContentSection
903
+ parameters:
904
+ - name: pageId
905
+ in: path
906
+ required: true
907
+ schema:
908
+ type: string
909
+ minLength: 1
910
+ - name: sectionId
911
+ in: path
912
+ required: true
913
+ schema:
914
+ type: string
915
+ minLength: 1
916
+ - $ref: '#/components/parameters/OpenWOPVersion'
917
+ requestBody:
918
+ required: true
919
+ content:
920
+ application/json:
921
+ schema:
922
+ type: object
923
+ additionalProperties: false
924
+ required:
925
+ - locale
926
+ - data
927
+ properties:
928
+ locale:
929
+ type: string
930
+ pattern: ^[a-z]{2}(-[A-Z]{2})?$
931
+ description: Target locale; baseLocale upserts `data`, else `localizations[locale]`.
932
+ data:
933
+ type: object
934
+ additionalProperties: true
935
+ description: The field overlay for the target locale.
936
+ responses:
937
+ '200':
938
+ description: The updated section record.
939
+ content:
940
+ application/json:
941
+ schema:
942
+ $ref: ../../schemas/v2/localized-content-section.schema.json
943
+ headers:
944
+ OpenWOP-Version:
945
+ $ref: '#/components/headers/OpenWOPVersion'
946
+ '400':
947
+ description: Invalid request (e.g. baseLocale in supportedLocales, or a malformed locale/slug).
948
+ content:
949
+ application/json:
950
+ schema:
951
+ $ref: ../../schemas/v2/error-envelope.schema.json
952
+ headers:
953
+ OpenWOP-Version:
954
+ $ref: '#/components/headers/OpenWOPVersion'
955
+ '401':
956
+ $ref: '#/components/responses/Unauthenticated'
957
+ '403':
958
+ $ref: '#/components/responses/Forbidden'
959
+ '404':
960
+ $ref: '#/components/responses/NotFound'
961
+ /content/settings:
962
+ get:
963
+ tags:
964
+ - content
965
+ summary: Read the tenant's content language settings (RFC 0103 §B, admin).
966
+ description: Tenant-scoped read of `{ baseLocale, supportedLocales, autoTranslateOnPublish }`. Requires `content.read`.
967
+ operationId: getContentSettings
968
+ responses:
969
+ '200':
970
+ description: The tenant's language settings.
971
+ content:
972
+ application/json:
973
+ schema:
974
+ $ref: ../../schemas/v2/localized-content-language-settings.schema.json
975
+ headers:
976
+ OpenWOP-Version:
977
+ $ref: '#/components/headers/OpenWOPVersion'
978
+ '401':
979
+ $ref: '#/components/responses/Unauthenticated'
980
+ '403':
981
+ $ref: '#/components/responses/Forbidden'
982
+ '501':
983
+ description: Host does not advertise capabilities.content.supported (RFC 0103).
984
+ content:
985
+ application/json:
986
+ schema:
987
+ $ref: ../../schemas/v2/error-envelope.schema.json
988
+ headers:
989
+ OpenWOP-Version:
990
+ $ref: '#/components/headers/OpenWOPVersion'
991
+ parameters:
992
+ - $ref: '#/components/parameters/OpenWOPVersion'
993
+ put:
994
+ tags:
995
+ - content
996
+ summary: Update the tenant's content language settings (RFC 0103 §B, admin).
997
+ description: 'Tenant-scoped settings update. The invariant `baseLocale ∉
998
+
999
+ supportedLocales` MUST hold (else `400`). Requires `content.write`.
1000
+
1001
+ '
1002
+ operationId: putContentSettings
1003
+ requestBody:
1004
+ required: true
1005
+ content:
1006
+ application/json:
1007
+ schema:
1008
+ $ref: ../../schemas/v2/localized-content-language-settings.schema.json
1009
+ responses:
1010
+ '200':
1011
+ description: The updated language settings.
1012
+ content:
1013
+ application/json:
1014
+ schema:
1015
+ $ref: ../../schemas/v2/localized-content-language-settings.schema.json
1016
+ headers:
1017
+ OpenWOP-Version:
1018
+ $ref: '#/components/headers/OpenWOPVersion'
1019
+ '400':
1020
+ description: Invalid request (e.g. baseLocale in supportedLocales, or a malformed locale/slug).
1021
+ content:
1022
+ application/json:
1023
+ schema:
1024
+ $ref: ../../schemas/v2/error-envelope.schema.json
1025
+ headers:
1026
+ OpenWOP-Version:
1027
+ $ref: '#/components/headers/OpenWOPVersion'
1028
+ '401':
1029
+ $ref: '#/components/responses/Unauthenticated'
1030
+ '403':
1031
+ $ref: '#/components/responses/Forbidden'
1032
+ parameters:
1033
+ - $ref: '#/components/parameters/OpenWOPVersion'
1034
+ /runs:bulk-cancel:
1035
+ post:
1036
+ tags:
1037
+ - runs
1038
+ summary: Cancel a set of in-flight runs in a single request.
1039
+ description: 'Per `spec/v1/rest-endpoints.md` §"POST /v1/runs:bulk-cancel". Accepts
1040
+
1041
+ a non-empty array of runIds and processes each cancellation
1042
+
1043
+ independently. Returns `200` with a per-id results array even when
1044
+
1045
+ some individual cancellations fail; the top-level operation succeeds
1046
+
1047
+ when the request reached the host, regardless of per-id outcomes.
1048
+
1049
+ Hosts enforce a host-defined cap on the array length (RECOMMENDED
1050
+
1051
+ 100); over-cap requests return `400 validation_error`.
1052
+
1053
+ '
1054
+ operationId: bulkCancelRuns
1055
+ parameters:
1056
+ - $ref: '#/components/parameters/IdempotencyKey'
1057
+ - $ref: '#/components/parameters/OpenWOPVersion'
1058
+ requestBody:
1059
+ required: true
1060
+ content:
1061
+ application/json:
1062
+ schema:
1063
+ type: object
1064
+ required:
1065
+ - runIds
1066
+ properties:
1067
+ runIds:
1068
+ type: array
1069
+ minItems: 1
1070
+ maxItems: 100
1071
+ items:
1072
+ type: string
1073
+ minLength: 1
1074
+ maxLength: 128
1075
+ reason:
1076
+ type: string
1077
+ maxLength: 512
1078
+ additionalProperties: false
1079
+ responses:
1080
+ '200':
1081
+ description: Per-id cancel results.
1082
+ content:
1083
+ application/json:
1084
+ schema:
1085
+ type: object
1086
+ required:
1087
+ - results
1088
+ properties:
1089
+ results:
1090
+ type: array
1091
+ items:
1092
+ type: object
1093
+ required:
1094
+ - runId
1095
+ - ok
1096
+ properties:
1097
+ runId:
1098
+ type: string
1099
+ minLength: 1
1100
+ ok:
1101
+ type: boolean
1102
+ status:
1103
+ type: string
1104
+ enum:
1105
+ - cancelled
1106
+ - cancelling
1107
+ error:
1108
+ $ref: ../../schemas/v2/error-envelope.schema.json
1109
+ additionalProperties: false
1110
+ additionalProperties: false
1111
+ headers:
1112
+ OpenWOP-Version:
1113
+ $ref: '#/components/headers/OpenWOPVersion'
1114
+ '400':
1115
+ $ref: '#/components/responses/ValidationError'
1116
+ '401':
1117
+ $ref: '#/components/responses/Unauthenticated'
1118
+ '403':
1119
+ $ref: '#/components/responses/Forbidden'
1120
+ /runs/{runId}:fork:
1121
+ post:
1122
+ tags:
1123
+ - runs
1124
+ summary: Fork the run for replay or branch (see `replay.md`).
1125
+ operationId: forkRun
1126
+ parameters:
1127
+ - $ref: '#/components/parameters/RunId'
1128
+ - $ref: '#/components/parameters/IdempotencyKey'
1129
+ - $ref: '#/components/parameters/OpenWOPVersion'
1130
+ requestBody:
1131
+ required: true
1132
+ content:
1133
+ application/json:
1134
+ schema:
1135
+ type: object
1136
+ required:
1137
+ - mode
1138
+ properties:
1139
+ fromSeq:
1140
+ type: integer
1141
+ minimum: 0
1142
+ description: 'Inclusive — events `< fromSeq` are fixed history; `>= fromSeq` are re-executed.
1143
+
1144
+ Required for `branch` (the branch point). Optional for `replay`; when omitted,
1145
+
1146
+ defaults to `0` (full re-execution from source-run start) per `replay.md`
1147
+
1148
+ §"Replay-mode defaults".
1149
+
1150
+ '
1151
+ mode:
1152
+ type: string
1153
+ enum:
1154
+ - replay
1155
+ - branch
1156
+ runOptionsOverlay:
1157
+ type: object
1158
+ description: For `branch` mode only — caller-supplied `RunOptions` to overlay.
1159
+ additionalProperties: false
1160
+ responses:
1161
+ '201':
1162
+ description: Fork accepted, new run started.
1163
+ content:
1164
+ application/json:
1165
+ schema:
1166
+ type: object
1167
+ required:
1168
+ - runId
1169
+ - sourceRunId
1170
+ - mode
1171
+ - status
1172
+ - eventsUrl
1173
+ properties:
1174
+ runId:
1175
+ type: string
1176
+ sourceRunId:
1177
+ type: string
1178
+ fromSeq:
1179
+ type: integer
1180
+ mode:
1181
+ type: string
1182
+ enum:
1183
+ - replay
1184
+ - branch
1185
+ status:
1186
+ type: string
1187
+ eventsUrl:
1188
+ type: string
1189
+ format: uri
1190
+ headers:
1191
+ OpenWOP-Version:
1192
+ $ref: '#/components/headers/OpenWOPVersion'
1193
+ '400':
1194
+ description: Invalid `fromSeq`, `replay` with non-empty `runOptionsOverlay`, etc.
1195
+ content:
1196
+ application/json:
1197
+ schema:
1198
+ $ref: '#/components/schemas/Error'
1199
+ headers:
1200
+ OpenWOP-Version:
1201
+ $ref: '#/components/headers/OpenWOPVersion'
1202
+ '401':
1203
+ $ref: '#/components/responses/Unauthenticated'
1204
+ '403':
1205
+ $ref: '#/components/responses/Forbidden'
1206
+ '404':
1207
+ $ref: '#/components/responses/NotFound'
1208
+ '422':
1209
+ description: '`fromSeq` references a sequence number that doesn''t exist in the source run''s event log.'
1210
+ content:
1211
+ application/json:
1212
+ schema:
1213
+ $ref: '#/components/schemas/Error'
1214
+ headers:
1215
+ OpenWOP-Version:
1216
+ $ref: '#/components/headers/OpenWOPVersion'
1217
+ /runs/{runId}/ancestry:
1218
+ get:
1219
+ tags:
1220
+ - runs
1221
+ summary: 'RFC 0040 §C — return the run''s immediate parent in the cross-host
1222
+
1223
+ composition chain. Capability-gated on
1224
+
1225
+ `capabilities.multiAgent.executionModel.crossHostCausation.ancestryEndpointSupported: true`;
1226
+
1227
+ hosts that don''t advertise return 404 not_found. Clients walk the full
1228
+
1229
+ chain by following `parent.wellKnownUrl` per response, one hop at a
1230
+
1231
+ time.
1232
+
1233
+ '
1234
+ operationId: getRunAncestry
1235
+ parameters:
1236
+ - $ref: '#/components/parameters/RunId'
1237
+ - $ref: '#/components/parameters/OpenWOPVersion'
1238
+ responses:
1239
+ '200':
1240
+ description: 'Run''s immediate parent (or `parent: null` for top-level runs).
1241
+
1242
+ '
1243
+ content:
1244
+ application/json:
1245
+ schema:
1246
+ $ref: ../../schemas/v2/run-ancestry-response.schema.json
1247
+ headers:
1248
+ OpenWOP-Version:
1249
+ $ref: '#/components/headers/OpenWOPVersion'
1250
+ '401':
1251
+ $ref: '#/components/responses/Unauthenticated'
1252
+ '403':
1253
+ $ref: '#/components/responses/Forbidden'
1254
+ '404':
1255
+ description: 'Either the run doesn''t exist, OR the host doesn''t advertise
1256
+
1257
+ `crossHostCausation.ancestryEndpointSupported: true` and treats
1258
+
1259
+ the endpoint as absent. Clients can disambiguate by inspecting
1260
+
1261
+ the host''s discovery doc.
1262
+
1263
+ '
1264
+ content:
1265
+ application/json:
1266
+ schema:
1267
+ $ref: '#/components/schemas/Error'
1268
+ headers:
1269
+ OpenWOP-Version:
1270
+ $ref: '#/components/headers/OpenWOPVersion'
1271
+ /agents:
1272
+ get:
1273
+ tags:
1274
+ - agents
1275
+ summary: 'RFC 0072 §A — list the manifest agents this host has installed into its
1276
+
1277
+ AgentRegistry (RFC 0070). Capability-gated on
1278
+
1279
+ `capabilities.agents.manifestRuntime.supported: true`; hosts that don''t
1280
+
1281
+ advertise it return 404. Read-only projection — never carries the
1282
+
1283
+ system-prompt body, resolved handoff schemas, or credential material (SR-1).
1284
+
1285
+ Dispatch is not a bespoke endpoint: a manifest agent is invoked as a run
1286
+
1287
+ whose node pins it via `WorkflowNode.agent` + `POST /v1/runs` (RFC 0072 §B).
1288
+
1289
+ RFC 0074 — the result is scoped to the authenticated principal''s owner
1290
+
1291
+ triple (RFC 0048). When `capabilities.agents.manifestRuntime.installScope`
1292
+
1293
+ is `''tenant''`, only the agents available to the caller''s tenant·workspace
1294
+
1295
+ are returned (an agent another workspace installed is absent, never
1296
+
1297
+ disclosed); when `''host''` (default) the inventory is host-global as in
1298
+
1299
+ RFC 0072. A `''tenant''`-scoped host MUST reject unauthenticated/unscoped
1300
+
1301
+ requests per its standard auth contract rather than fall back to a global list.
1302
+
1303
+ '
1304
+ operationId: listAgents
1305
+ responses:
1306
+ '200':
1307
+ description: Installed manifest agents (agentId-sorted).
1308
+ content:
1309
+ application/json:
1310
+ schema:
1311
+ $ref: ../../schemas/v2/agent-inventory-response.schema.json
1312
+ headers:
1313
+ OpenWOP-Version:
1314
+ $ref: '#/components/headers/OpenWOPVersion'
1315
+ '401':
1316
+ $ref: '#/components/responses/Unauthenticated'
1317
+ '403':
1318
+ $ref: '#/components/responses/Forbidden'
1319
+ '404':
1320
+ description: 'Host does not advertise `capabilities.agents.manifestRuntime` and
1321
+
1322
+ treats the endpoint as absent.
1323
+
1324
+ '
1325
+ content:
1326
+ application/json:
1327
+ schema:
1328
+ $ref: '#/components/schemas/Error'
1329
+ headers:
1330
+ OpenWOP-Version:
1331
+ $ref: '#/components/headers/OpenWOPVersion'
1332
+ parameters:
1333
+ - $ref: '#/components/parameters/OpenWOPVersion'
1334
+ /agents/{agentId}:
1335
+ get:
1336
+ tags:
1337
+ - agents
1338
+ summary: 'RFC 0072 §A — return one installed manifest agent''s inventory entry, or
1339
+
1340
+ 404 when no such agent is installed (or the host doesn''t advertise
1341
+
1342
+ `capabilities.agents.manifestRuntime`). RFC 0074 — resolved within the
1343
+
1344
+ authenticated principal''s owner triple (RFC 0048): on an
1345
+
1346
+ `installScope: ''tenant''` host an agent the caller''s workspace has not
1347
+
1348
+ approved 404s identically to "not installed", so the surface never
1349
+
1350
+ discloses another tenant''s inventory.
1351
+
1352
+ '
1353
+ operationId: getAgent
1354
+ parameters:
1355
+ - in: path
1356
+ name: agentId
1357
+ required: true
1358
+ schema:
1359
+ type: string
1360
+ pattern: ^(?!roster$|org-chart$).+$
1361
+ description: 'The manifest agentId. MUST NOT be the reserved literals `roster` or
1362
+
1363
+ `org-chart` — those name the sibling collection routes
1364
+
1365
+ (`/v1/agents/roster`, `/v1/agents/org-chart`), so excluding them here
1366
+
1367
+ keeps `/v1/agents/{agentId}` unambiguous against them.
1368
+
1369
+ '
1370
+ - $ref: '#/components/parameters/OpenWOPVersion'
1371
+ responses:
1372
+ '200':
1373
+ description: The agent's inventory entry.
1374
+ content:
1375
+ application/json:
1376
+ schema:
1377
+ $ref: ../../schemas/v2/agent-inventory-response.schema.json#/$defs/AgentInventoryEntry
1378
+ headers:
1379
+ OpenWOP-Version:
1380
+ $ref: '#/components/headers/OpenWOPVersion'
1381
+ '401':
1382
+ $ref: '#/components/responses/Unauthenticated'
1383
+ '403':
1384
+ $ref: '#/components/responses/Forbidden'
1385
+ '404':
1386
+ description: No such agent, or the host doesn't advertise the capability.
1387
+ content:
1388
+ application/json:
1389
+ schema:
1390
+ $ref: '#/components/schemas/Error'
1391
+ headers:
1392
+ OpenWOP-Version:
1393
+ $ref: '#/components/headers/OpenWOPVersion'
1394
+ /agents/{agentId}/deployments:
1395
+ get:
1396
+ tags:
1397
+ - agents
1398
+ summary: 'RFC 0082 §C/§E — list the deployment records (per-(agentId, version)) for
1399
+
1400
+ a manifest agent: the lifecycle `state`, the named `channels`, the canary
1401
+
1402
+ share, the rollback pointer, and the last-transition provenance. Read-only,
1403
+
1404
+ content-free of any manifest body or credential (SR-1). Capability-gated on
1405
+
1406
+ `capabilities.agents.deployment.supported: true`; hosts that don''t advertise
1407
+
1408
+ it return 404. Tenant-scoped to the caller''s owner triple (RFC 0048/0074)
1409
+
1410
+ when `installScope: ''tenant''`.
1411
+
1412
+ '
1413
+ operationId: listAgentDeployments
1414
+ parameters:
1415
+ - in: path
1416
+ name: agentId
1417
+ required: true
1418
+ schema:
1419
+ type: string
1420
+ pattern: ^(?!roster$|org-chart$).+$
1421
+ description: 'The manifest agentId. MUST NOT be the reserved literals `roster` or
1422
+
1423
+ `org-chart` — those name the sibling collection routes
1424
+
1425
+ (`/v1/agents/roster/{rosterId}`, `/v1/agents/org-chart/{departmentId}`),
1426
+
1427
+ so excluding them here keeps `/v1/agents/{agentId}/deployments`
1428
+
1429
+ unambiguous against them.
1430
+
1431
+ '
1432
+ - $ref: '#/components/parameters/OpenWOPVersion'
1433
+ responses:
1434
+ '200':
1435
+ description: The agent's deployment records (version-sorted).
1436
+ content:
1437
+ application/json:
1438
+ schema:
1439
+ type: array
1440
+ items:
1441
+ $ref: ../../schemas/v2/agent-deployment.schema.json
1442
+ headers:
1443
+ OpenWOP-Version:
1444
+ $ref: '#/components/headers/OpenWOPVersion'
1445
+ '401':
1446
+ $ref: '#/components/responses/Unauthenticated'
1447
+ '403':
1448
+ $ref: '#/components/responses/Forbidden'
1449
+ '404':
1450
+ description: No such agent, or the host doesn't advertise `capabilities.agents.deployment`.
1451
+ content:
1452
+ application/json:
1453
+ schema:
1454
+ $ref: '#/components/schemas/Error'
1455
+ headers:
1456
+ OpenWOP-Version:
1457
+ $ref: '#/components/headers/OpenWOPVersion'
1458
+ post:
1459
+ tags:
1460
+ - agents
1461
+ summary: 'RFC 0082 §E — request a deployment state transition (promote / pause /
1462
+
1463
+ deprecate / rollback / adjust-canary). The host MUST authorize fail-closed
1464
+
1465
+ against the RFC 0049 `deploy:*` scope (absent/unseeded role denies), run any
1466
+
1467
+ configured RFC 0051 approvalGate, and — when the gate carries `requiredEval`
1468
+
1469
+ — verify the referenced RFC 0081 eval run is terminal and `EvalSummary.passed`
1470
+
1471
+ BEFORE emitting `deployment.promoted`. On success returns the updated
1472
+
1473
+ deployment record and emits the matching content-free `deployment.*` event.
1474
+
1475
+ '
1476
+ operationId: transitionAgentDeployment
1477
+ parameters:
1478
+ - in: path
1479
+ name: agentId
1480
+ required: true
1481
+ schema:
1482
+ type: string
1483
+ description: The manifest agentId.
1484
+ - $ref: '#/components/parameters/IdempotencyKey'
1485
+ - $ref: '#/components/parameters/OpenWOPVersion'
1486
+ requestBody:
1487
+ required: true
1488
+ content:
1489
+ application/json:
1490
+ schema:
1491
+ $ref: ../../schemas/v2/agent-deployment-transition.schema.json
1492
+ responses:
1493
+ '200':
1494
+ description: The deployment record after the applied transition.
1495
+ content:
1496
+ application/json:
1497
+ schema:
1498
+ $ref: ../../schemas/v2/agent-deployment.schema.json
1499
+ headers:
1500
+ OpenWOP-Version:
1501
+ $ref: '#/components/headers/OpenWOPVersion'
1502
+ '400':
1503
+ description: 'Validation error, or a transition that the host''s advertised
1504
+
1505
+ `states`/`canary` cannot satisfy, or `no_active_deployment` when a
1506
+
1507
+ referenced channel resolves to no active version.
1508
+
1509
+ '
1510
+ content:
1511
+ application/json:
1512
+ schema:
1513
+ $ref: '#/components/schemas/Error'
1514
+ headers:
1515
+ OpenWOP-Version:
1516
+ $ref: '#/components/headers/OpenWOPVersion'
1517
+ '401':
1518
+ $ref: '#/components/responses/Unauthenticated'
1519
+ '403':
1520
+ description: 'Fail-closed authorization denial (the principal lacks the required
1521
+
1522
+ `deploy:*` scope — RFC 0049), or `eval_gate_unmet` when a `requiredEval`
1523
+
1524
+ gate''s referenced eval run is not terminal-and-passed (RFC 0081).
1525
+
1526
+ '
1527
+ content:
1528
+ application/json:
1529
+ schema:
1530
+ $ref: '#/components/schemas/Error'
1531
+ headers:
1532
+ OpenWOP-Version:
1533
+ $ref: '#/components/headers/OpenWOPVersion'
1534
+ '404':
1535
+ description: No such agent, or the host doesn't advertise `capabilities.agents.deployment`.
1536
+ content:
1537
+ application/json:
1538
+ schema:
1539
+ $ref: '#/components/schemas/Error'
1540
+ headers:
1541
+ OpenWOP-Version:
1542
+ $ref: '#/components/headers/OpenWOPVersion'
1543
+ /agents/roster:
1544
+ get:
1545
+ tags:
1546
+ - agents
1547
+ summary: 'RFC 0086 §B — list the standing agent roster (named "digital-twin
1548
+
1549
+ employee" instances + their workflow portfolios) visible to the
1550
+
1551
+ caller. Capability-gated on `capabilities.agents.roster.supported:
1552
+
1553
+ true`; hosts that don''t advertise it return 404. Tenant-scoped per
1554
+
1555
+ RFC 0074 — on an `installScope: ''tenant''` host only the caller''s
1556
+
1557
+ owner-triple entries are returned. Read-only; content-free (SR-1).
1558
+
1559
+ '
1560
+ operationId: listAgentRoster
1561
+ responses:
1562
+ '200':
1563
+ description: The caller's standing roster (rosterId-sorted).
1564
+ content:
1565
+ application/json:
1566
+ schema:
1567
+ $ref: ../../schemas/v2/agent-roster-response.schema.json
1568
+ headers:
1569
+ OpenWOP-Version:
1570
+ $ref: '#/components/headers/OpenWOPVersion'
1571
+ '401':
1572
+ $ref: '#/components/responses/Unauthenticated'
1573
+ '403':
1574
+ $ref: '#/components/responses/Forbidden'
1575
+ '404':
1576
+ description: Host does not advertise `capabilities.agents.roster`.
1577
+ content:
1578
+ application/json:
1579
+ schema:
1580
+ $ref: '#/components/schemas/Error'
1581
+ headers:
1582
+ OpenWOP-Version:
1583
+ $ref: '#/components/headers/OpenWOPVersion'
1584
+ parameters:
1585
+ - $ref: '#/components/parameters/OpenWOPVersion'
1586
+ /agents/roster/{rosterId}:
1587
+ get:
1588
+ tags:
1589
+ - agents
1590
+ summary: 'RFC 0086 §B — return one standing roster entry, or 404 when no such
1591
+
1592
+ entry exists, the host doesn''t advertise `capabilities.agents.roster`,
1593
+
1594
+ or (on an `installScope: ''tenant''` host) the entry is outside the
1595
+
1596
+ caller''s owner triple — a cross-tenant entry 404s identically to
1597
+
1598
+ "not found", never disclosing another tenant''s roster.
1599
+
1600
+ '
1601
+ operationId: getAgentRosterEntry
1602
+ parameters:
1603
+ - in: path
1604
+ name: rosterId
1605
+ required: true
1606
+ schema:
1607
+ type: string
1608
+ description: The standing instance id (a `host:<id>` AgentRef agentId).
1609
+ - $ref: '#/components/parameters/OpenWOPVersion'
1610
+ responses:
1611
+ '200':
1612
+ description: The roster entry.
1613
+ content:
1614
+ application/json:
1615
+ schema:
1616
+ $ref: ../../schemas/v2/agent-roster-entry.schema.json
1617
+ headers:
1618
+ OpenWOP-Version:
1619
+ $ref: '#/components/headers/OpenWOPVersion'
1620
+ '401':
1621
+ $ref: '#/components/responses/Unauthenticated'
1622
+ '403':
1623
+ $ref: '#/components/responses/Forbidden'
1624
+ '404':
1625
+ description: No such entry, cross-tenant, or capability unadvertised.
1626
+ content:
1627
+ application/json:
1628
+ schema:
1629
+ $ref: '#/components/schemas/Error'
1630
+ headers:
1631
+ OpenWOP-Version:
1632
+ $ref: '#/components/headers/OpenWOPVersion'
1633
+ /agents/org-chart:
1634
+ get:
1635
+ tags:
1636
+ - agents
1637
+ summary: 'RFC 0087 §C — return the caller''s agent org-chart (departments + roles
1638
+
1639
+ + `reportsTo` edges over roster members). Capability-gated on
1640
+
1641
+ `capabilities.agents.orgChart.supported: true`; hosts that don''t
1642
+
1643
+ advertise it return 404. Tenant-scoped per RFC 0074. DESCRIPTIVE only:
1644
+
1645
+ an org edge confers no authority (§B `org-position-no-authority-escalation`).
1646
+
1647
+ '
1648
+ operationId: getAgentOrgChart
1649
+ responses:
1650
+ '200':
1651
+ description: The caller's org-chart.
1652
+ content:
1653
+ application/json:
1654
+ schema:
1655
+ $ref: ../../schemas/v2/agent-org-chart.schema.json
1656
+ headers:
1657
+ OpenWOP-Version:
1658
+ $ref: '#/components/headers/OpenWOPVersion'
1659
+ '401':
1660
+ $ref: '#/components/responses/Unauthenticated'
1661
+ '403':
1662
+ $ref: '#/components/responses/Forbidden'
1663
+ '404':
1664
+ description: Host does not advertise `capabilities.agents.orgChart`.
1665
+ content:
1666
+ application/json:
1667
+ schema:
1668
+ $ref: '#/components/schemas/Error'
1669
+ headers:
1670
+ OpenWOP-Version:
1671
+ $ref: '#/components/headers/OpenWOPVersion'
1672
+ parameters:
1673
+ - $ref: '#/components/parameters/OpenWOPVersion'
1674
+ /agents/org-chart/{departmentId}:
1675
+ get:
1676
+ tags:
1677
+ - agents
1678
+ summary: 'RFC 0087 §D — one department''s subtree + responsibility roll-up (the
1679
+
1680
+ union of its members'' RFC 0086 portfolios). `?recursive=false` narrows
1681
+
1682
+ the roll-up to direct members without changing the response shape.
1683
+
1684
+ 404 when the department is unknown, cross-tenant, or the host doesn''t
1685
+
1686
+ advertise `capabilities.agents.orgChart`. The roll-up grants nothing (§B).
1687
+
1688
+ '
1689
+ operationId: getAgentOrgChartDepartment
1690
+ parameters:
1691
+ - in: path
1692
+ name: departmentId
1693
+ required: true
1694
+ schema:
1695
+ type: string
1696
+ description: The department id to root the subtree + roll-up at.
1697
+ - in: query
1698
+ name: recursive
1699
+ required: false
1700
+ schema:
1701
+ type: boolean
1702
+ default: true
1703
+ description: When `false`, the roll-up scopes to direct members only.
1704
+ - $ref: '#/components/parameters/OpenWOPVersion'
1705
+ responses:
1706
+ '200':
1707
+ description: The department subtree + responsibility roll-up.
1708
+ content:
1709
+ application/json:
1710
+ schema:
1711
+ $ref: ../../schemas/v2/org-chart-responsibility-view.schema.json
1712
+ headers:
1713
+ OpenWOP-Version:
1714
+ $ref: '#/components/headers/OpenWOPVersion'
1715
+ '401':
1716
+ $ref: '#/components/responses/Unauthenticated'
1717
+ '403':
1718
+ $ref: '#/components/responses/Forbidden'
1719
+ '404':
1720
+ description: Unknown/cross-tenant department, or capability unadvertised.
1721
+ content:
1722
+ application/json:
1723
+ schema:
1724
+ $ref: '#/components/schemas/Error'
1725
+ headers:
1726
+ OpenWOP-Version:
1727
+ $ref: '#/components/headers/OpenWOPVersion'
1728
+ /tools:
1729
+ get:
1730
+ tags:
1731
+ - tools
1732
+ summary: 'RFC 0078 §B — list the portable `ToolDescriptor`s visible to the caller
1733
+
1734
+ across every tool source (node-pack / workflow / mcp / connector /
1735
+
1736
+ host-extension). Capability-gated on
1737
+
1738
+ `capabilities.toolCatalog.supported: true`; hosts that don''t advertise
1739
+
1740
+ it return 404. §F-2 — the projection is authorization-scoped: a
1741
+
1742
+ principal sees only the tools it may invoke, and a second principal MUST
1743
+
1744
+ NOT see another principal''s tools (non-disclosure). Read-only; each
1745
+
1746
+ descriptor is content-free of any credential material (SR-1).
1747
+
1748
+ '
1749
+ operationId: listTools
1750
+ parameters:
1751
+ - name: view
1752
+ in: query
1753
+ required: false
1754
+ schema:
1755
+ type: string
1756
+ enum:
1757
+ - standard
1758
+ - compact
1759
+ default: standard
1760
+ description: 'RFC 0112. `compact` returns the `{ tools: CompactToolDescriptor[] }` projection — heavy descriptor fields
1761
+ omitted and `inputSchema` bounded to the compact structural subset — when the host advertises `capabilities.toolCatalog.compactView:
1762
+ true`. Defaults to `standard`; a host that does not advertise `compactView` treats `view=compact` as any unknown
1763
+ query param and returns the standard view.
1764
+
1765
+ '
1766
+ - $ref: '#/components/parameters/OpenWOPVersion'
1767
+ responses:
1768
+ '200':
1769
+ description: 'The caller''s authorized tool catalog (standard array, or the compact `{ tools: [] }` projection when
1770
+ `view=compact`).'
1771
+ content:
1772
+ application/json:
1773
+ schema:
1774
+ oneOf:
1775
+ - type: array
1776
+ items:
1777
+ $ref: ../../schemas/v2/tool-descriptor.schema.json
1778
+ - type: object
1779
+ required:
1780
+ - tools
1781
+ properties:
1782
+ tools:
1783
+ type: array
1784
+ items:
1785
+ $ref: ../../schemas/v2/compact-tool-descriptor.schema.json
1786
+ headers:
1787
+ OpenWOP-Version:
1788
+ $ref: '#/components/headers/OpenWOPVersion'
1789
+ '401':
1790
+ $ref: '#/components/responses/Unauthenticated'
1791
+ '403':
1792
+ $ref: '#/components/responses/Forbidden'
1793
+ '404':
1794
+ description: Host does not advertise `capabilities.toolCatalog`.
1795
+ content:
1796
+ application/json:
1797
+ schema:
1798
+ $ref: '#/components/schemas/Error'
1799
+ headers:
1800
+ OpenWOP-Version:
1801
+ $ref: '#/components/headers/OpenWOPVersion'
1802
+ /tools/{toolId}:
1803
+ get:
1804
+ tags:
1805
+ - tools
1806
+ summary: 'RFC 0078 §B — return one `ToolDescriptor` by its stable `toolId`, or 404
1807
+
1808
+ when no such tool exists, the caller isn''t authorized for it (§F-2
1809
+
1810
+ non-disclosure — a cross-principal tool 404s identically to "not
1811
+
1812
+ found"), or the host doesn''t advertise `capabilities.toolCatalog`.
1813
+
1814
+ '
1815
+ operationId: getTool
1816
+ parameters:
1817
+ - in: path
1818
+ name: toolId
1819
+ required: true
1820
+ schema:
1821
+ type: string
1822
+ description: The stable tool id (`ToolDescriptor.toolId`).
1823
+ - name: view
1824
+ in: query
1825
+ required: false
1826
+ schema:
1827
+ type: string
1828
+ enum:
1829
+ - standard
1830
+ - compact
1831
+ default: standard
1832
+ description: 'RFC 0112. `compact` returns one `CompactToolDescriptor` (heavy fields omitted; `inputSchema` bounded
1833
+ to the compact structural subset) when the host advertises `capabilities.toolCatalog.compactView: true`. Defaults
1834
+ to `standard`; a host that does not advertise `compactView` treats `view=compact` as any unknown query param.
1835
+
1836
+ '
1837
+ - $ref: '#/components/parameters/OpenWOPVersion'
1838
+ responses:
1839
+ '200':
1840
+ description: The tool descriptor (standard, or one `CompactToolDescriptor` when `view=compact`).
1841
+ content:
1842
+ application/json:
1843
+ schema:
1844
+ oneOf:
1845
+ - $ref: ../../schemas/v2/tool-descriptor.schema.json
1846
+ - $ref: ../../schemas/v2/compact-tool-descriptor.schema.json
1847
+ headers:
1848
+ OpenWOP-Version:
1849
+ $ref: '#/components/headers/OpenWOPVersion'
1850
+ '401':
1851
+ $ref: '#/components/responses/Unauthenticated'
1852
+ '403':
1853
+ $ref: '#/components/responses/Forbidden'
1854
+ '404':
1855
+ description: No such tool, unauthorized, or capability unadvertised.
1856
+ content:
1857
+ application/json:
1858
+ schema:
1859
+ $ref: '#/components/schemas/Error'
1860
+ headers:
1861
+ OpenWOP-Version:
1862
+ $ref: '#/components/headers/OpenWOPVersion'
1863
+ /runs/{runId}/eval-summary:
1864
+ get:
1865
+ tags:
1866
+ - runs
1867
+ summary: 'RFC 0081 §C — return the `EvalSummary` scorecard for a terminal eval run
1868
+
1869
+ (a run started with `mode: "eval"`): aggregate + per-task scores, cost,
1870
+
1871
+ latency, schema-validity, and redaction-safe safety findings, plus the
1872
+
1873
+ suite provenance and (regression mode) the score delta vs a baseline.
1874
+
1875
+ Content-free of task output / rubric prose / credentials (SR-1; the
1876
+
1877
+ `eval-summary-no-content-leak` invariant). Capability-gated on
1878
+
1879
+ `capabilities.agents.evalSuite.supported: true`; hosts that don''t advertise
1880
+
1881
+ it return 404. 409 when the run is not yet terminal.
1882
+
1883
+ '
1884
+ operationId: getEvalSummary
1885
+ parameters:
1886
+ - $ref: '#/components/parameters/RunId'
1887
+ - $ref: '#/components/parameters/OpenWOPVersion'
1888
+ responses:
1889
+ '200':
1890
+ description: The eval run's scorecard.
1891
+ content:
1892
+ application/json:
1893
+ schema:
1894
+ $ref: ../../schemas/v2/eval-summary.schema.json
1895
+ headers:
1896
+ OpenWOP-Version:
1897
+ $ref: '#/components/headers/OpenWOPVersion'
1898
+ '401':
1899
+ $ref: '#/components/responses/Unauthenticated'
1900
+ '403':
1901
+ $ref: '#/components/responses/Forbidden'
1902
+ '404':
1903
+ description: 'No such run, the run is not an eval run, or the host doesn''t advertise
1904
+
1905
+ `capabilities.agents.evalSuite`.
1906
+
1907
+ '
1908
+ content:
1909
+ application/json:
1910
+ schema:
1911
+ $ref: '#/components/schemas/Error'
1912
+ headers:
1913
+ OpenWOP-Version:
1914
+ $ref: '#/components/headers/OpenWOPVersion'
1915
+ '409':
1916
+ description: The eval run is still running; the summary is not yet final.
1917
+ content:
1918
+ application/json:
1919
+ schema:
1920
+ $ref: '#/components/schemas/Error'
1921
+ headers:
1922
+ OpenWOP-Version:
1923
+ $ref: '#/components/headers/OpenWOPVersion'
1924
+ /runs/{runId}:diff:
1925
+ get:
1926
+ tags:
1927
+ - runs
1928
+ summary: 'RFC 0054 — return a deterministic, replay-aware structured diff of
1929
+
1930
+ two runs (typically a run and its RFC 0011 fork): `divergedAtSeq` +
1931
+
1932
+ ordered `eventDiffs[]` + `stateDiff`. The diff is a pure function of
1933
+
1934
+ the two event logs (see `replay.md` determinism contract). Requires
1935
+
1936
+ `runs:read` on BOTH runs. Hosts that don''t implement it return 404.
1937
+
1938
+ '
1939
+ operationId: diffRun
1940
+ parameters:
1941
+ - $ref: '#/components/parameters/RunId'
1942
+ - name: against
1943
+ in: query
1944
+ required: true
1945
+ description: The other run id to diff `{runId}` against (the `b` run).
1946
+ schema:
1947
+ type: string
1948
+ - $ref: '#/components/parameters/OpenWOPVersion'
1949
+ responses:
1950
+ '200':
1951
+ description: 'Structured diff of the two runs. `divergedAtSeq: null` + empty
1952
+
1953
+ `eventDiffs` when the logs are identical.
1954
+
1955
+ '
1956
+ content:
1957
+ application/json:
1958
+ schema:
1959
+ $ref: ../../schemas/v2/run-diff-response.schema.json
1960
+ headers:
1961
+ OpenWOP-Version:
1962
+ $ref: '#/components/headers/OpenWOPVersion'
1963
+ '400':
1964
+ description: Missing or malformed `against` query parameter.
1965
+ content:
1966
+ application/json:
1967
+ schema:
1968
+ $ref: '#/components/schemas/Error'
1969
+ headers:
1970
+ OpenWOP-Version:
1971
+ $ref: '#/components/headers/OpenWOPVersion'
1972
+ '401':
1973
+ $ref: '#/components/responses/Unauthenticated'
1974
+ '403':
1975
+ description: 'Caller lacks `runs:read` on `{runId}` and/or on `against`
1976
+
1977
+ (`forbidden`); composes with RFC 0048 cross-workspace
1978
+
1979
+ isolation.
1980
+
1981
+ '
1982
+ content:
1983
+ application/json:
1984
+ schema:
1985
+ $ref: '#/components/schemas/Error'
1986
+ headers:
1987
+ OpenWOP-Version:
1988
+ $ref: '#/components/headers/OpenWOPVersion'
1989
+ '404':
1990
+ description: 'Either run doesn''t exist, OR the host doesn''t implement the diff
1991
+
1992
+ endpoint and treats the path as absent.
1993
+
1994
+ '
1995
+ content:
1996
+ application/json:
1997
+ schema:
1998
+ $ref: '#/components/schemas/Error'
1999
+ headers:
2000
+ OpenWOP-Version:
2001
+ $ref: '#/components/headers/OpenWOPVersion'
2002
+ /runs/{runId}:pause:
2003
+ post:
2004
+ tags:
2005
+ - runs
2006
+ summary: Administratively pause an in-flight run (RFC Track 13).
2007
+ description: 'Operator-driven pause distinct from cancel (terminal) and HITL suspend (workflow-driven).
2008
+
2009
+ Emits a `run.paused` event when the pause takes effect; exit only via `:resume` or `:cancel`.
2010
+
2011
+ '
2012
+ operationId: pauseRun
2013
+ parameters:
2014
+ - $ref: '#/components/parameters/RunId'
2015
+ - $ref: '#/components/parameters/IdempotencyKey'
2016
+ - $ref: '#/components/parameters/OpenWOPVersion'
2017
+ requestBody:
2018
+ content:
2019
+ application/json:
2020
+ schema:
2021
+ type: object
2022
+ properties:
2023
+ reason:
2024
+ type: string
2025
+ description: Free-form rationale, persisted on the `run.paused` event payload.
2026
+ drainPolicy:
2027
+ type: string
2028
+ enum:
2029
+ - immediate
2030
+ - drain-current-node
2031
+ default: drain-current-node
2032
+ description: '`immediate` snapshots between events; `drain-current-node` lets the running node
2033
+
2034
+ reach a terminal before transitioning to `paused`.
2035
+
2036
+ '
2037
+ additionalProperties: false
2038
+ responses:
2039
+ '202':
2040
+ description: Pause requested; transition emits `run.paused` when complete.
2041
+ content:
2042
+ application/json:
2043
+ schema:
2044
+ type: object
2045
+ required:
2046
+ - runId
2047
+ - status
2048
+ properties:
2049
+ runId:
2050
+ type: string
2051
+ status:
2052
+ type: string
2053
+ enum:
2054
+ - paused
2055
+ pausedAt:
2056
+ type: string
2057
+ format: date-time
2058
+ headers:
2059
+ OpenWOP-Version:
2060
+ $ref: '#/components/headers/OpenWOPVersion'
2061
+ '401':
2062
+ $ref: '#/components/responses/Unauthenticated'
2063
+ '403':
2064
+ $ref: '#/components/responses/Forbidden'
2065
+ '404':
2066
+ $ref: '#/components/responses/NotFound'
2067
+ '409':
2068
+ description: Run is already paused, terminal, or in a state that cannot be paused.
2069
+ content:
2070
+ application/json:
2071
+ schema:
2072
+ $ref: '#/components/schemas/Error'
2073
+ headers:
2074
+ OpenWOP-Version:
2075
+ $ref: '#/components/headers/OpenWOPVersion'
2076
+ /runs/{runId}:resume:
2077
+ post:
2078
+ tags:
2079
+ - runs
2080
+ summary: Resume a paused run (RFC Track 13).
2081
+ description: 'Reverses a prior `:pause`. Run transitions from `paused` to `running` and emits `run.resumed`.
2082
+
2083
+ '
2084
+ operationId: resumeRun
2085
+ parameters:
2086
+ - $ref: '#/components/parameters/RunId'
2087
+ - $ref: '#/components/parameters/IdempotencyKey'
2088
+ - $ref: '#/components/parameters/OpenWOPVersion'
2089
+ requestBody:
2090
+ content:
2091
+ application/json:
2092
+ schema:
2093
+ type: object
2094
+ properties:
2095
+ reason:
2096
+ type: string
2097
+ additionalProperties: false
2098
+ responses:
2099
+ '202':
2100
+ description: Resume requested.
2101
+ content:
2102
+ application/json:
2103
+ schema:
2104
+ type: object
2105
+ required:
2106
+ - runId
2107
+ - status
2108
+ properties:
2109
+ runId:
2110
+ type: string
2111
+ status:
2112
+ type: string
2113
+ enum:
2114
+ - running
2115
+ resumedAt:
2116
+ type: string
2117
+ format: date-time
2118
+ headers:
2119
+ OpenWOP-Version:
2120
+ $ref: '#/components/headers/OpenWOPVersion'
2121
+ '401':
2122
+ $ref: '#/components/responses/Unauthenticated'
2123
+ '403':
2124
+ $ref: '#/components/responses/Forbidden'
2125
+ '404':
2126
+ $ref: '#/components/responses/NotFound'
2127
+ '409':
2128
+ description: Run is not currently paused.
2129
+ content:
2130
+ application/json:
2131
+ schema:
2132
+ $ref: '#/components/schemas/Error'
2133
+ headers:
2134
+ OpenWOP-Version:
2135
+ $ref: '#/components/headers/OpenWOPVersion'
2136
+ /runs/{runId}/interrupts/{nodeId}:
2137
+ post:
2138
+ tags:
2139
+ - hitl
2140
+ summary: Resolve an interrupt via the run-scoped surface.
2141
+ operationId: resolveInterruptByRun
2142
+ parameters:
2143
+ - $ref: '#/components/parameters/RunId'
2144
+ - in: path
2145
+ name: nodeId
2146
+ required: true
2147
+ schema:
2148
+ type: string
2149
+ minLength: 1
2150
+ - $ref: '#/components/parameters/IdempotencyKey'
2151
+ - $ref: '#/components/parameters/OpenWOPVersion'
2152
+ requestBody:
2153
+ required: true
2154
+ content:
2155
+ application/json:
2156
+ schema:
2157
+ type: object
2158
+ required:
2159
+ - resumeValue
2160
+ properties:
2161
+ resumeValue:
2162
+ description: Validated against the interrupt's `resumeSchema` if declared.
2163
+ additionalProperties: false
2164
+ responses:
2165
+ '200':
2166
+ description: Interrupt resolved; executor unblocks.
2167
+ content:
2168
+ application/json:
2169
+ schema:
2170
+ type: object
2171
+ properties:
2172
+ runId:
2173
+ type: string
2174
+ nodeId:
2175
+ type: string
2176
+ status:
2177
+ type: string
2178
+ headers:
2179
+ OpenWOP-Version:
2180
+ $ref: '#/components/headers/OpenWOPVersion'
2181
+ '400':
2182
+ $ref: '#/components/responses/ValidationError'
2183
+ '401':
2184
+ $ref: '#/components/responses/Unauthenticated'
2185
+ '403':
2186
+ $ref: '#/components/responses/Forbidden'
2187
+ '404':
2188
+ description: Interrupt not found or already resolved.
2189
+ content:
2190
+ application/json:
2191
+ schema:
2192
+ $ref: '#/components/schemas/Error'
2193
+ headers:
2194
+ OpenWOP-Version:
2195
+ $ref: '#/components/headers/OpenWOPVersion'
2196
+ '409':
2197
+ description: Concurrent resolve — only one wins.
2198
+ content:
2199
+ application/json:
2200
+ schema:
2201
+ $ref: '#/components/schemas/Error'
2202
+ headers:
2203
+ OpenWOP-Version:
2204
+ $ref: '#/components/headers/OpenWOPVersion'
2205
+ '422':
2206
+ description: Run was cancelled while interrupt was pending.
2207
+ content:
2208
+ application/json:
2209
+ schema:
2210
+ $ref: '#/components/schemas/Error'
2211
+ headers:
2212
+ OpenWOP-Version:
2213
+ $ref: '#/components/headers/OpenWOPVersion'
2214
+ /interrupts/{token}:
2215
+ parameters:
2216
+ - in: path
2217
+ name: token
2218
+ required: true
2219
+ schema:
2220
+ type: string
2221
+ description: HMAC-signed token issued by the server at suspension time. Format `base64url(payload).hmac_sha256(secret,
2222
+ payload)`.
2223
+ get:
2224
+ tags:
2225
+ - hitl
2226
+ summary: Inspect an interrupt without resolving (signed-token surface).
2227
+ operationId: inspectInterruptByToken
2228
+ security: []
2229
+ responses:
2230
+ '200':
2231
+ description: Interrupt details.
2232
+ content:
2233
+ application/json:
2234
+ schema:
2235
+ $ref: ../../schemas/v2/suspend-request.schema.json
2236
+ headers:
2237
+ OpenWOP-Version:
2238
+ $ref: '#/components/headers/OpenWOPVersion'
2239
+ '410':
2240
+ description: Token expired.
2241
+ content:
2242
+ application/json:
2243
+ schema:
2244
+ $ref: '#/components/schemas/Error'
2245
+ headers:
2246
+ OpenWOP-Version:
2247
+ $ref: '#/components/headers/OpenWOPVersion'
2248
+ parameters:
2249
+ - $ref: '#/components/parameters/OpenWOPVersion'
2250
+ post:
2251
+ tags:
2252
+ - hitl
2253
+ summary: Resolve an interrupt via signed token (asynchronous callback).
2254
+ operationId: resolveInterruptByToken
2255
+ security: []
2256
+ parameters:
2257
+ - $ref: '#/components/parameters/IdempotencyKey'
2258
+ - $ref: '#/components/parameters/OpenWOPVersion'
2259
+ requestBody:
2260
+ required: true
2261
+ content:
2262
+ application/json:
2263
+ schema:
2264
+ type: object
2265
+ required:
2266
+ - resumeValue
2267
+ properties:
2268
+ resumeValue: {}
2269
+ additionalProperties: false
2270
+ responses:
2271
+ '200':
2272
+ description: Resolution accepted.
2273
+ content:
2274
+ application/json:
2275
+ schema:
2276
+ type: object
2277
+ headers:
2278
+ OpenWOP-Version:
2279
+ $ref: '#/components/headers/OpenWOPVersion'
2280
+ '410':
2281
+ description: Token expired.
2282
+ content:
2283
+ application/json:
2284
+ schema:
2285
+ $ref: '#/components/schemas/Error'
2286
+ headers:
2287
+ OpenWOP-Version:
2288
+ $ref: '#/components/headers/OpenWOPVersion'
2289
+ /runs/{runId}/artifacts/{artifactId}:
2290
+ get:
2291
+ tags:
2292
+ - artifacts
2293
+ summary: Read a run-produced artifact.
2294
+ operationId: getArtifact
2295
+ parameters:
2296
+ - $ref: '#/components/parameters/RunId'
2297
+ - in: path
2298
+ name: artifactId
2299
+ required: true
2300
+ schema:
2301
+ type: string
2302
+ minLength: 1
2303
+ - $ref: '#/components/parameters/OpenWOPVersion'
2304
+ responses:
2305
+ '200':
2306
+ description: Artifact payload.
2307
+ content:
2308
+ application/json:
2309
+ schema:
2310
+ type: object
2311
+ description: Implementation-defined artifact shape.
2312
+ headers:
2313
+ OpenWOP-Version:
2314
+ $ref: '#/components/headers/OpenWOPVersion'
2315
+ '401':
2316
+ $ref: '#/components/responses/Unauthenticated'
2317
+ '403':
2318
+ $ref: '#/components/responses/Forbidden'
2319
+ '404':
2320
+ $ref: '#/components/responses/NotFound'
2321
+ /webhooks:
2322
+ post:
2323
+ tags:
2324
+ - webhooks
2325
+ summary: Register a webhook subscription.
2326
+ operationId: registerWebhook
2327
+ parameters:
2328
+ - $ref: '#/components/parameters/IdempotencyKey'
2329
+ - $ref: '#/components/parameters/OpenWOPVersion'
2330
+ requestBody:
2331
+ required: true
2332
+ content:
2333
+ application/json:
2334
+ schema:
2335
+ type: object
2336
+ required:
2337
+ - url
2338
+ - events
2339
+ properties:
2340
+ url:
2341
+ type: string
2342
+ format: uri
2343
+ events:
2344
+ type: array
2345
+ items:
2346
+ type: string
2347
+ description: Event types to subscribe to (see `run-event.schema.json` enum).
2348
+ secret:
2349
+ type: string
2350
+ description: Server signs payloads with this secret using HMAC-SHA256.
2351
+ tags:
2352
+ type: array
2353
+ items:
2354
+ type: string
2355
+ description: Filter to runs carrying these tags (see `run-options.md`).
2356
+ additionalProperties: false
2357
+ responses:
2358
+ '201':
2359
+ description: Webhook registered.
2360
+ content:
2361
+ application/json:
2362
+ schema:
2363
+ type: object
2364
+ required:
2365
+ - webhookId
2366
+ properties:
2367
+ webhookId:
2368
+ type: string
2369
+ headers:
2370
+ OpenWOP-Version:
2371
+ $ref: '#/components/headers/OpenWOPVersion'
2372
+ '400':
2373
+ $ref: '#/components/responses/ValidationError'
2374
+ '401':
2375
+ $ref: '#/components/responses/Unauthenticated'
2376
+ '403':
2377
+ $ref: '#/components/responses/Forbidden'
2378
+ /webhooks/{webhookId}:
2379
+ delete:
2380
+ tags:
2381
+ - webhooks
2382
+ summary: Unregister a webhook.
2383
+ operationId: unregisterWebhook
2384
+ parameters:
2385
+ - in: path
2386
+ name: webhookId
2387
+ required: true
2388
+ schema:
2389
+ type: string
2390
+ minLength: 1
2391
+ - $ref: '#/components/parameters/OpenWOPVersion'
2392
+ responses:
2393
+ '204':
2394
+ description: Unregistered.
2395
+ headers:
2396
+ OpenWOP-Version:
2397
+ $ref: '#/components/headers/OpenWOPVersion'
2398
+ '401':
2399
+ $ref: '#/components/responses/Unauthenticated'
2400
+ '403':
2401
+ $ref: '#/components/responses/Forbidden'
2402
+ '404':
2403
+ $ref: '#/components/responses/NotFound'
2404
+ /audit/verify:
2405
+ get:
2406
+ tags:
2407
+ - audit
2408
+ summary: Verify the audit-log hash chain over [fromSeq, toSeq].
2409
+ description: 'Per `spec/v1/auth-profiles.md` §`openwop-audit-log-integrity` §4. The
2410
+
2411
+ verifier re-walks audit-log entries in the requested range,
2412
+
2413
+ re-computes each entry''s `prevHash` from the canonical RFC 8785 JCS
2414
+
2415
+ serialization of the prior entry, verifies signed checkpoints
2416
+
2417
+ against the host''s advertised `auditLogIntegrity.checkpointPublicKey`,
2418
+
2419
+ and returns `chainValid` + an enumeration of any anomalies.
2420
+
2421
+ Hosts MUST require the `audit:read` scope. Hosts that do NOT
2422
+
2423
+ advertise the `openwop-audit-log-integrity` profile MAY omit this
2424
+
2425
+ endpoint entirely (clients SHOULD pre-flight via `/.well-known/openwop`).
2426
+
2427
+ '
2428
+ operationId: verifyAuditLog
2429
+ parameters:
2430
+ - in: query
2431
+ name: fromSeq
2432
+ required: true
2433
+ schema:
2434
+ type: integer
2435
+ minimum: 0
2436
+ description: First audit-log sequence to include (inclusive).
2437
+ - in: query
2438
+ name: toSeq
2439
+ required: true
2440
+ schema:
2441
+ type: integer
2442
+ minimum: 0
2443
+ description: Last audit-log sequence to include (inclusive). MUST be >= fromSeq.
2444
+ - $ref: '#/components/parameters/OpenWOPVersion'
2445
+ responses:
2446
+ '200':
2447
+ description: Verification result.
2448
+ content:
2449
+ application/json:
2450
+ schema:
2451
+ $ref: ../../schemas/v2/audit-verify-result.schema.json
2452
+ headers:
2453
+ OpenWOP-Version:
2454
+ $ref: '#/components/headers/OpenWOPVersion'
2455
+ '400':
2456
+ $ref: '#/components/responses/ValidationError'
2457
+ '401':
2458
+ $ref: '#/components/responses/Unauthenticated'
2459
+ '403':
2460
+ $ref: '#/components/responses/Forbidden'
2461
+ '404':
2462
+ description: Host does not advertise the audit-log-integrity profile.
2463
+ content:
2464
+ application/json:
2465
+ schema:
2466
+ $ref: ../../schemas/v2/error-envelope.schema.json
2467
+ headers:
2468
+ OpenWOP-Version:
2469
+ $ref: '#/components/headers/OpenWOPVersion'
2470
+ /prompts:
2471
+ get:
2472
+ tags:
2473
+ - prompts
2474
+ summary: List prompt templates available to the caller.
2475
+ operationId: listPromptTemplates
2476
+ parameters:
2477
+ - in: query
2478
+ name: kind
2479
+ schema:
2480
+ type: string
2481
+ enum:
2482
+ - system
2483
+ - user
2484
+ - few-shot
2485
+ - schema-hint
2486
+ description: Filter by `PromptTemplate.kind`.
2487
+ - in: query
2488
+ name: tag
2489
+ schema:
2490
+ type: string
2491
+ description: 'Filter to templates whose `tags[]` contains this exact tag.
2492
+
2493
+ Hosts MAY accept the parameter multiple times; the semantic
2494
+
2495
+ when repeated is AND (every named tag must be present).
2496
+
2497
+ '
2498
+ - in: query
2499
+ name: modelClass
2500
+ schema:
2501
+ type: string
2502
+ description: Filter to templates whose `modelHints.modelClass` matches.
2503
+ - in: query
2504
+ name: source
2505
+ schema:
2506
+ type: string
2507
+ enum:
2508
+ - host
2509
+ - pack
2510
+ - user
2511
+ description: Filter by `meta.source` provenance.
2512
+ - in: query
2513
+ name: cursor
2514
+ schema:
2515
+ type: string
2516
+ description: Opaque pagination cursor.
2517
+ - in: query
2518
+ name: limit
2519
+ schema:
2520
+ type: integer
2521
+ minimum: 1
2522
+ maximum: 200
2523
+ default: 50
2524
+ description: Maximum entries per page.
2525
+ - $ref: '#/components/parameters/OpenWOPVersion'
2526
+ responses:
2527
+ '200':
2528
+ description: Paginated list of templates.
2529
+ content:
2530
+ application/json:
2531
+ schema:
2532
+ type: object
2533
+ required:
2534
+ - items
2535
+ properties:
2536
+ items:
2537
+ type: array
2538
+ items:
2539
+ $ref: ../../schemas/v2/prompt-template.schema.json
2540
+ nextCursor:
2541
+ type: string
2542
+ description: Opaque cursor; absent on the final page.
2543
+ headers:
2544
+ OpenWOP-Version:
2545
+ $ref: '#/components/headers/OpenWOPVersion'
2546
+ '401':
2547
+ $ref: '#/components/responses/Unauthenticated'
2548
+ '403':
2549
+ $ref: '#/components/responses/Forbidden'
2550
+ '501':
2551
+ description: Host does not advertise capabilities.prompts.endpointsSupported. (RFC 0028 §A — supported gates Phase
2552
+ A node-execution composition; endpointsSupported gates this REST surface independently.)
2553
+ content:
2554
+ application/json:
2555
+ schema:
2556
+ $ref: ../../schemas/v2/error-envelope.schema.json
2557
+ headers:
2558
+ OpenWOP-Version:
2559
+ $ref: '#/components/headers/OpenWOPVersion'
2560
+ post:
2561
+ tags:
2562
+ - prompts
2563
+ summary: Create a new prompt template (mutable libraries only).
2564
+ operationId: createPromptTemplate
2565
+ parameters:
2566
+ - $ref: '#/components/parameters/IdempotencyKey'
2567
+ - $ref: '#/components/parameters/OpenWOPVersion'
2568
+ requestBody:
2569
+ required: true
2570
+ content:
2571
+ application/json:
2572
+ schema:
2573
+ $ref: ../../schemas/v2/prompt-template.schema.json
2574
+ responses:
2575
+ '201':
2576
+ description: Template created. `Location` header carries the canonical URI.
2577
+ headers:
2578
+ Location:
2579
+ schema:
2580
+ type: string
2581
+ description: Canonical URI of the new template.
2582
+ OpenWOP-Version:
2583
+ $ref: '#/components/headers/OpenWOPVersion'
2584
+ '400':
2585
+ $ref: '#/components/responses/ValidationError'
2586
+ '401':
2587
+ $ref: '#/components/responses/Unauthenticated'
2588
+ '403':
2589
+ $ref: '#/components/responses/Forbidden'
2590
+ '409':
2591
+ description: A template with this `(templateId, version)` pair already exists.
2592
+ content:
2593
+ application/json:
2594
+ schema:
2595
+ $ref: ../../schemas/v2/error-envelope.schema.json
2596
+ headers:
2597
+ OpenWOP-Version:
2598
+ $ref: '#/components/headers/OpenWOPVersion'
2599
+ '501':
2600
+ description: Host does not advertise capabilities.prompts.mutableLibrary.
2601
+ content:
2602
+ application/json:
2603
+ schema:
2604
+ $ref: ../../schemas/v2/error-envelope.schema.json
2605
+ headers:
2606
+ OpenWOP-Version:
2607
+ $ref: '#/components/headers/OpenWOPVersion'
2608
+ /prompts/{templateId}:
2609
+ parameters:
2610
+ - in: path
2611
+ name: templateId
2612
+ required: true
2613
+ schema:
2614
+ type: string
2615
+ pattern: ^[a-z0-9][a-z0-9._-]{0,127}$
2616
+ description: PromptTemplate.templateId per RFC 0027.
2617
+ - in: query
2618
+ name: version
2619
+ schema:
2620
+ type: string
2621
+ pattern: ^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$
2622
+ description: Pin to a specific SemVer version; latest when omitted.
2623
+ - in: query
2624
+ name: libraryId
2625
+ schema:
2626
+ type: string
2627
+ pattern: ^[a-z0-9][a-z0-9._-]{0,127}$
2628
+ description: 'Disambiguate when multiple installed packs ship the same
2629
+
2630
+ templateId. Hosts MUST return `prompt_ref_ambiguous` if
2631
+
2632
+ ambiguous and libraryId is omitted.
2633
+
2634
+ '
2635
+ get:
2636
+ tags:
2637
+ - prompts
2638
+ summary: Fetch a single prompt template.
2639
+ operationId: getPromptTemplate
2640
+ responses:
2641
+ '200':
2642
+ description: The PromptTemplate.
2643
+ headers:
2644
+ ETag:
2645
+ schema:
2646
+ type: string
2647
+ description: SHA-256 of the canonical body.
2648
+ Cache-Control:
2649
+ schema:
2650
+ type: string
2651
+ description: Honors immutable semantics when version was pinned.
2652
+ OpenWOP-Version:
2653
+ $ref: '#/components/headers/OpenWOPVersion'
2654
+ content:
2655
+ application/json:
2656
+ schema:
2657
+ $ref: ../../schemas/v2/prompt-template.schema.json
2658
+ '304':
2659
+ description: Conditional revalidation succeeded.
2660
+ headers:
2661
+ OpenWOP-Version:
2662
+ $ref: '#/components/headers/OpenWOPVersion'
2663
+ '400':
2664
+ description: '`prompt_ref_ambiguous` when libraryId disambiguation is required.'
2665
+ content:
2666
+ application/json:
2667
+ schema:
2668
+ $ref: ../../schemas/v2/error-envelope.schema.json
2669
+ headers:
2670
+ OpenWOP-Version:
2671
+ $ref: '#/components/headers/OpenWOPVersion'
2672
+ '401':
2673
+ $ref: '#/components/responses/Unauthenticated'
2674
+ '403':
2675
+ $ref: '#/components/responses/Forbidden'
2676
+ '404':
2677
+ description: No such template (or version).
2678
+ content:
2679
+ application/json:
2680
+ schema:
2681
+ $ref: ../../schemas/v2/error-envelope.schema.json
2682
+ headers:
2683
+ OpenWOP-Version:
2684
+ $ref: '#/components/headers/OpenWOPVersion'
2685
+ '501':
2686
+ description: Host does not advertise capabilities.prompts.endpointsSupported. (RFC 0028 §A — supported gates Phase
2687
+ A node-execution composition; endpointsSupported gates this REST surface independently.)
2688
+ content:
2689
+ application/json:
2690
+ schema:
2691
+ $ref: ../../schemas/v2/error-envelope.schema.json
2692
+ headers:
2693
+ OpenWOP-Version:
2694
+ $ref: '#/components/headers/OpenWOPVersion'
2695
+ parameters:
2696
+ - $ref: '#/components/parameters/OpenWOPVersion'
2697
+ put:
2698
+ tags:
2699
+ - prompts
2700
+ summary: Replace a prompt template (mutable libraries; user-source only).
2701
+ operationId: updatePromptTemplate
2702
+ parameters:
2703
+ - $ref: '#/components/parameters/IdempotencyKey'
2704
+ - $ref: '#/components/parameters/OpenWOPVersion'
2705
+ requestBody:
2706
+ required: true
2707
+ content:
2708
+ application/json:
2709
+ schema:
2710
+ $ref: ../../schemas/v2/prompt-template.schema.json
2711
+ responses:
2712
+ '200':
2713
+ description: Template updated.
2714
+ content:
2715
+ application/json:
2716
+ schema:
2717
+ $ref: ../../schemas/v2/prompt-template.schema.json
2718
+ headers:
2719
+ OpenWOP-Version:
2720
+ $ref: '#/components/headers/OpenWOPVersion'
2721
+ '400':
2722
+ $ref: '#/components/responses/ValidationError'
2723
+ '401':
2724
+ $ref: '#/components/responses/Unauthenticated'
2725
+ '403':
2726
+ description: Template is pack-sourced or host-built-in (read-only).
2727
+ content:
2728
+ application/json:
2729
+ schema:
2730
+ $ref: ../../schemas/v2/error-envelope.schema.json
2731
+ headers:
2732
+ OpenWOP-Version:
2733
+ $ref: '#/components/headers/OpenWOPVersion'
2734
+ '404':
2735
+ description: No such template.
2736
+ content:
2737
+ application/json:
2738
+ schema:
2739
+ $ref: ../../schemas/v2/error-envelope.schema.json
2740
+ headers:
2741
+ OpenWOP-Version:
2742
+ $ref: '#/components/headers/OpenWOPVersion'
2743
+ '409':
2744
+ description: Submitted version does not exceed stored version (SemVer).
2745
+ content:
2746
+ application/json:
2747
+ schema:
2748
+ $ref: ../../schemas/v2/error-envelope.schema.json
2749
+ headers:
2750
+ OpenWOP-Version:
2751
+ $ref: '#/components/headers/OpenWOPVersion'
2752
+ '501':
2753
+ description: Host does not advertise capabilities.prompts.mutableLibrary.
2754
+ content:
2755
+ application/json:
2756
+ schema:
2757
+ $ref: ../../schemas/v2/error-envelope.schema.json
2758
+ headers:
2759
+ OpenWOP-Version:
2760
+ $ref: '#/components/headers/OpenWOPVersion'
2761
+ delete:
2762
+ tags:
2763
+ - prompts
2764
+ summary: Delete a prompt template (mutable libraries; user-source only).
2765
+ operationId: deletePromptTemplate
2766
+ responses:
2767
+ '204':
2768
+ description: Template deleted.
2769
+ headers:
2770
+ OpenWOP-Version:
2771
+ $ref: '#/components/headers/OpenWOPVersion'
2772
+ '401':
2773
+ $ref: '#/components/responses/Unauthenticated'
2774
+ '403':
2775
+ description: Template is pack-sourced or host-built-in (read-only).
2776
+ content:
2777
+ application/json:
2778
+ schema:
2779
+ $ref: ../../schemas/v2/error-envelope.schema.json
2780
+ headers:
2781
+ OpenWOP-Version:
2782
+ $ref: '#/components/headers/OpenWOPVersion'
2783
+ '404':
2784
+ description: No such template.
2785
+ content:
2786
+ application/json:
2787
+ schema:
2788
+ $ref: ../../schemas/v2/error-envelope.schema.json
2789
+ headers:
2790
+ OpenWOP-Version:
2791
+ $ref: '#/components/headers/OpenWOPVersion'
2792
+ '501':
2793
+ description: Host does not advertise capabilities.prompts.mutableLibrary.
2794
+ content:
2795
+ application/json:
2796
+ schema:
2797
+ $ref: ../../schemas/v2/error-envelope.schema.json
2798
+ headers:
2799
+ OpenWOP-Version:
2800
+ $ref: '#/components/headers/OpenWOPVersion'
2801
+ parameters:
2802
+ - $ref: '#/components/parameters/OpenWOPVersion'
2803
+ /prompts:render:
2804
+ post:
2805
+ tags:
2806
+ - prompts
2807
+ summary: Render a prompt template with supplied variable bindings.
2808
+ description: 'Returns the composed body + sha256 hash + per-variable hashes.
2809
+
2810
+ The response''s `hash` MUST equal the `hash` that a matching
2811
+
2812
+ `prompt.composed` event would carry at dispatch time for the
2813
+
2814
+ same `(ref, variables, contentTrust)` inputs (RFC 0028 §A
2815
+
2816
+ deterministic-render invariant; RFC 0027 §F replay invariant).
2817
+
2818
+ Does NOT dispatch an LLM call. Secret-source variable values
2819
+
2820
+ MUST be supplied as `[REDACTED:<credentialRef>]` markers; the
2821
+
2822
+ host resolves the plaintext internally and never echoes it in
2823
+
2824
+ the `composed` response field per SR-1.
2825
+
2826
+ '
2827
+ operationId: renderPromptTemplate
2828
+ requestBody:
2829
+ required: true
2830
+ content:
2831
+ application/json:
2832
+ schema:
2833
+ type: object
2834
+ required:
2835
+ - ref
2836
+ - variables
2837
+ properties:
2838
+ ref:
2839
+ $ref: ../../schemas/v2/prompt-ref.schema.json
2840
+ variables:
2841
+ type: object
2842
+ description: 'Variable bindings keyed by `PromptVariable.name`.
2843
+
2844
+ Secret-source bindings carry `[REDACTED:<credentialRef>]`
2845
+
2846
+ markers; the host resolves the real value internally.
2847
+
2848
+ '
2849
+ additionalProperties: true
2850
+ contentTrust:
2851
+ type: string
2852
+ enum:
2853
+ - trusted
2854
+ - untrusted
2855
+ description: 'Aggregate trust marker for the supplied bindings,
2856
+
2857
+ propagated through composition per RFC 0027 §E.
2858
+
2859
+ '
2860
+ responses:
2861
+ '200':
2862
+ description: Composed result.
2863
+ content:
2864
+ application/json:
2865
+ schema:
2866
+ type: object
2867
+ required:
2868
+ - hash
2869
+ - refs
2870
+ - variableHashes
2871
+ properties:
2872
+ composed:
2873
+ type: string
2874
+ description: Full composed body. Present only when observability is `full`.
2875
+ hash:
2876
+ type: string
2877
+ pattern: ^sha256:[0-9a-f]{64}$
2878
+ refs:
2879
+ type: array
2880
+ items:
2881
+ type: string
2882
+ variableHashes:
2883
+ type: object
2884
+ additionalProperties:
2885
+ type: string
2886
+ pattern: ^sha256:[0-9a-f]{64}$
2887
+ contentTrust:
2888
+ type: string
2889
+ enum:
2890
+ - trusted
2891
+ - untrusted
2892
+ headers:
2893
+ OpenWOP-Version:
2894
+ $ref: '#/components/headers/OpenWOPVersion'
2895
+ '400':
2896
+ description: '`prompt_variable_unresolved` (required variable missing),
2897
+
2898
+ `prompt_variable_type_mismatch` (bound type vs. declared type),
2899
+
2900
+ or `prompt_ref_invalid` (malformed PromptRef).
2901
+
2902
+ '
2903
+ content:
2904
+ application/json:
2905
+ schema:
2906
+ $ref: ../../schemas/v2/error-envelope.schema.json
2907
+ headers:
2908
+ OpenWOP-Version:
2909
+ $ref: '#/components/headers/OpenWOPVersion'
2910
+ '401':
2911
+ $ref: '#/components/responses/Unauthenticated'
2912
+ '403':
2913
+ $ref: '#/components/responses/Forbidden'
2914
+ '404':
2915
+ description: Referenced template does not exist.
2916
+ content:
2917
+ application/json:
2918
+ schema:
2919
+ $ref: ../../schemas/v2/error-envelope.schema.json
2920
+ headers:
2921
+ OpenWOP-Version:
2922
+ $ref: '#/components/headers/OpenWOPVersion'
2923
+ '501':
2924
+ description: Host does not advertise capabilities.prompts.endpointsSupported. (RFC 0028 §A — supported gates Phase
2925
+ A node-execution composition; endpointsSupported gates this REST surface independently.)
2926
+ content:
2927
+ application/json:
2928
+ schema:
2929
+ $ref: ../../schemas/v2/error-envelope.schema.json
2930
+ headers:
2931
+ OpenWOP-Version:
2932
+ $ref: '#/components/headers/OpenWOPVersion'
2933
+ parameters:
2934
+ - $ref: '#/components/parameters/OpenWOPVersion'
2935
+ /host/effect-seams:
2936
+ get:
2937
+ tags:
2938
+ - Host
2939
+ operationId: getEffectSeamManifest
2940
+ summary: The host-declared effect-seam manifest (RFC 0173 §C)
2941
+ description: Every outbound effect seam replay suppression covers. A seam omitted here is invisible to the suite; the
2942
+ RFC 0140 R5 audit is the control.
2943
+ responses:
2944
+ '200':
2945
+ description: The manifest.
2946
+ content:
2947
+ application/json:
2948
+ schema:
2949
+ $ref: ../../schemas/v2/effect-seam-manifest.schema.json
2950
+ headers:
2951
+ OpenWOP-Version:
2952
+ $ref: '#/components/headers/OpenWOPVersion'
2953
+ '401':
2954
+ $ref: '#/components/responses/Unauthenticated'
2955
+ parameters:
2956
+ - $ref: '#/components/parameters/OpenWOPVersion'
2957
+ /runs/{runId}/compensation:
2958
+ parameters:
2959
+ - $ref: '#/components/parameters/RunId'
2960
+ get:
2961
+ tags:
2962
+ - Runs
2963
+ operationId: getRunCompensation
2964
+ summary: Compensation plan and attempts for a run (RFC 0173 §C.1)
2965
+ description: The read projection that makes compensation a core obligation with a deployed-wire witness (RFC 0151 G9
2966
+ / RFC 0173 §B).
2967
+ responses:
2968
+ '200':
2969
+ description: The projection.
2970
+ content:
2971
+ application/json:
2972
+ schema:
2973
+ $ref: ../../schemas/v2/compensation-projection.schema.json
2974
+ headers:
2975
+ OpenWOP-Version:
2976
+ $ref: '#/components/headers/OpenWOPVersion'
2977
+ '404':
2978
+ $ref: '#/components/responses/NotFound'
2979
+ parameters:
2980
+ - $ref: '#/components/parameters/OpenWOPVersion'
2981
+ /runs/{runId}/effects:
2982
+ parameters:
2983
+ - $ref: '#/components/parameters/RunId'
2984
+ get:
2985
+ tags:
2986
+ - Runs
2987
+ operationId: getRunEffects
2988
+ summary: The Layer-2 effect ledger for a run (RFC 0173 §C.2)
2989
+ description: Business-identity keyed effect records; the witness for the Layer-2 effect-identity obligation.
2990
+ responses:
2991
+ '200':
2992
+ description: The ledger projection.
2993
+ content:
2994
+ application/json:
2995
+ schema:
2996
+ $ref: ../../schemas/v2/effect-ledger-projection.schema.json
2997
+ headers:
2998
+ OpenWOP-Version:
2999
+ $ref: '#/components/headers/OpenWOPVersion'
3000
+ '404':
3001
+ $ref: '#/components/responses/NotFound'
3002
+ parameters:
3003
+ - $ref: '#/components/parameters/OpenWOPVersion'
3004
+ /host/events:
3005
+ get:
3006
+ tags:
3007
+ - Host
3008
+ operationId: streamHostEvents
3009
+ summary: Host-scoped events (heartbeat.*) as SSE (RFC 0171 §E.1)
3010
+ description: The documented default hostEvents address; a host MAY declare another under `heartbeat.deliveryChannel`.
3011
+ Content-free of run data.
3012
+ responses:
3013
+ '200':
3014
+ description: text/event-stream of hostEvents messages.
3015
+ content:
3016
+ text/event-stream:
3017
+ schema:
3018
+ type: string
3019
+ headers:
3020
+ OpenWOP-Version:
3021
+ $ref: '#/components/headers/OpenWOPVersion'
3022
+ '401':
3023
+ $ref: '#/components/responses/Unauthenticated'
3024
+ parameters:
3025
+ - $ref: '#/components/parameters/OpenWOPVersion'
3026
+ components:
3027
+ securitySchemes:
3028
+ ApiKeyAuth:
3029
+ type: http
3030
+ scheme: bearer
3031
+ bearerFormat: API key
3032
+ description: 'openwop API key. Format implementation-defined; reference impl uses `hk_`/`hk_test_` prefixes.
3033
+
3034
+ Each key carries one or more scopes from the canonical vocabulary
3035
+
3036
+ (`manifest:read`, `runs:create`, `runs:read`, `runs:cancel`,
3037
+
3038
+ `artifacts:read`, `webhooks:manage`, `approvals:respond`, `audit:read`).
3039
+
3040
+ See `auth.md`.
3041
+
3042
+ '
3043
+ parameters:
3044
+ WorkflowId:
3045
+ in: path
3046
+ name: workflowId
3047
+ required: true
3048
+ schema:
3049
+ type: string
3050
+ minLength: 1
3051
+ maxLength: 128
3052
+ RunId:
3053
+ in: path
3054
+ name: runId
3055
+ required: true
3056
+ schema:
3057
+ type: string
3058
+ minLength: 1
3059
+ maxLength: 128
3060
+ IdempotencyKey:
3061
+ in: header
3062
+ name: Idempotency-Key
3063
+ required: false
3064
+ schema:
3065
+ type: string
3066
+ maxLength: 255
3067
+ description: 'Per-mutation idempotency token (see `idempotency.md` Layer 1).
3068
+
3069
+ Server caches `(tenantId, endpoint, key)` → response for ≥24h.
3070
+
3071
+ Duplicate requests return the cached response with header
3072
+
3073
+ `OpenWOP-Idempotent-Replay: true`.
3074
+
3075
+ '
3076
+ OpenWOPVersion:
3077
+ name: OpenWOP-Version
3078
+ in: header
3079
+ required: false
3080
+ schema:
3081
+ type: string
3082
+ pattern: ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$
3083
+ description: RFC 0172 §A.3 — selects a listed major.minor; absent ⇒ the host's `preferredVersion`; unlisted ⇒ 406 protocol_version_unsupported.
3084
+ responses:
3085
+ Unauthenticated:
3086
+ description: Missing or invalid credential.
3087
+ content:
3088
+ application/json:
3089
+ schema:
3090
+ $ref: '#/components/schemas/Error'
3091
+ Forbidden:
3092
+ description: Credential valid but lacks required scope or fails resource binding.
3093
+ content:
3094
+ application/json:
3095
+ schema:
3096
+ $ref: '#/components/schemas/Error'
3097
+ NotFound:
3098
+ description: Resource doesn't exist or caller can't see it (do not leak existence).
3099
+ content:
3100
+ application/json:
3101
+ schema:
3102
+ $ref: '#/components/schemas/Error'
3103
+ ValidationError:
3104
+ description: Request body or parameters malformed.
3105
+ content:
3106
+ application/json:
3107
+ schema:
3108
+ $ref: '#/components/schemas/Error'
3109
+ RateLimited:
3110
+ description: Too many requests.
3111
+ headers:
3112
+ Retry-After:
3113
+ schema:
3114
+ type: integer
3115
+ content:
3116
+ application/json:
3117
+ schema:
3118
+ $ref: '#/components/schemas/Error'
3119
+ schemas:
3120
+ Error:
3121
+ $ref: ../../schemas/v2/error-envelope.schema.json
3122
+ Capabilities:
3123
+ $ref: ../../schemas/v2/capabilities.schema.json
3124
+ RunSnapshot:
3125
+ $ref: ../../schemas/v2/run-snapshot.schema.json
3126
+ RunClaimConflict:
3127
+ $ref: ../../schemas/v2/error-envelope.schema.json
3128
+ description: RFC 0171 §B.1 — the former one-member enum `RunClaimConflict` is the generated error envelope (`error`
3129
+ carries the code).
3130
+ UnsupportedStreamMode:
3131
+ $ref: ../../schemas/v2/error-envelope.schema.json
3132
+ description: RFC 0171 §B.1 — the former one-member enum `UnsupportedStreamMode` is the generated error envelope (`error`
3133
+ carries the code).
3134
+ headers:
3135
+ OpenWOPVersion:
3136
+ schema:
3137
+ type: string
3138
+ description: RFC 0172 §A.4 — the contract that produced this response; MUST equal the one used.
3139
+ required: true