@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,165 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/conversation-turn.schema.json",
4
+ "title": "ConversationTurn",
5
+ "description": "One turn in a multi-turn conversation. Structural superset of `ConversationMessage` (RFC 0002 §G — append-only, idempotent on `messageId`, replay-deterministic). Adds `role`, optional `agent` reference, and `turnIndex` discriminators. Folds through the existing `applyMessage` reducer unchanged. See RFC 0005 §C.",
6
+ "type": "object",
7
+ "required": [
8
+ "messageId",
9
+ "from",
10
+ "content",
11
+ "ts",
12
+ "role",
13
+ "turnIndex"
14
+ ],
15
+ "properties": {
16
+ "messageId": {
17
+ "type": "string",
18
+ "description": "Dedup key. Producers MUST construct a deterministic id so re-folding is idempotent. Recommended encoding: `${conversationId}:${turnIndex}:${role}` (e.g., `run-abc:n1:0:7:agent`).",
19
+ "minLength": 1,
20
+ "maxLength": 256
21
+ },
22
+ "from": {
23
+ "type": "string",
24
+ "description": "Sender identity. Either an agent ID (RFC 0002 §A1) or the literal `'user'` for human-originated turns.",
25
+ "minLength": 1,
26
+ "maxLength": 256
27
+ },
28
+ "to": {
29
+ "type": "string",
30
+ "description": "Optional addressee. Absent = broadcast to the conversation's group (or the run's default participants).",
31
+ "maxLength": 256
32
+ },
33
+ "groupId": {
34
+ "type": "string",
35
+ "description": "Optional shared-agent group ID. When set, the turn is scoped to the `shared:<groupId>` agent context per RFC 0002 §A8.",
36
+ "maxLength": 256
37
+ },
38
+ "content": {
39
+ "description": "Opaque turn content. Protocol does not standardize the shape; hosts use Zod schemas at the application layer for structured turns. Pass-through for any JSON value.",
40
+ "type": [
41
+ "object",
42
+ "array",
43
+ "string",
44
+ "number",
45
+ "boolean",
46
+ "null"
47
+ ]
48
+ },
49
+ "ts": {
50
+ "type": "integer",
51
+ "minimum": 0,
52
+ "description": "Turn timestamp (ms epoch). Caller's clock; replay carries through unchanged for determinism."
53
+ },
54
+ "role": {
55
+ "type": "string",
56
+ "enum": [
57
+ "user",
58
+ "agent",
59
+ "system"
60
+ ],
61
+ "description": "Discriminator distinguishing human-originated turns (`'user'`), AI-agent-originated turns (`'agent'`), and host-emitted procedural turns (`'system'` — e.g., `'conversation timed out'`)."
62
+ },
63
+ "agent": {
64
+ "type": "object",
65
+ "description": "Optional agent reference (RFC 0002 §A1 `AgentRef`) for `role: 'agent'` turns. The same shape RFC 0002 reserves on `RunSnapshot.agent` and `node.started.payload.agent` — propagated through inheritance.",
66
+ "properties": {
67
+ "agentId": {
68
+ "$ref": "ids.schema.json#/$defs/agentId"
69
+ },
70
+ "agentSharing": {
71
+ "type": "string",
72
+ "enum": [
73
+ "isolated",
74
+ "shared",
75
+ "shared:%shared%"
76
+ ],
77
+ "description": "Per RFC 0002 §A8 — `shared:<groupId>` requires a `groupId` field on the message."
78
+ },
79
+ "memoryRef": {
80
+ "type": "string",
81
+ "description": "Opaque memory reference per RFC 0002 §A + RFC 0004 §A. Resolves to `MemoryEntry[]` via host `MemoryAdapter` for cross-run conversation continuity."
82
+ },
83
+ "model": {
84
+ "type": "object",
85
+ "description": "RFC 0109 — OPTIONAL provenance: which model produced this `role: 'agent'` turn. NON-SECRET, NON-PII: provider + model identifiers ONLY (`additionalProperties: false` forbids any credential/endpoint/prompt leaking in — the SR-1 secret-redaction guard). Stamped at emit; read VERBATIM on `:fork` (never re-resolved). A host that stamps it MUST advertise `conversationTurnModelProvenance.supported: true`. Absent ⇒ no advertisement; clients MUST tolerate its absence.",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "provider",
89
+ "model"
90
+ ],
91
+ "properties": {
92
+ "provider": {
93
+ "type": "string",
94
+ "minLength": 1,
95
+ "maxLength": 128,
96
+ "description": "Provider identifier (e.g. `anthropic`, `openai`, `google`). Non-secret."
97
+ },
98
+ "model": {
99
+ "type": "string",
100
+ "minLength": 1,
101
+ "maxLength": 256,
102
+ "description": "Model identifier as the provider names it (e.g. `claude-opus-4-8`). Non-secret."
103
+ }
104
+ }
105
+ }
106
+ },
107
+ "additionalProperties": false
108
+ },
109
+ "turnIndex": {
110
+ "type": "integer",
111
+ "minimum": 0,
112
+ "description": "0-based index within the conversation. `conversation.opened.initialTurn` carries `turnIndex: 0`; subsequent `conversation.exchanged` turns increment monotonically; `conversation.closed.finalTurn` carries the highest index."
113
+ },
114
+ "speakerId": {
115
+ "type": "string",
116
+ "minLength": 1,
117
+ "maxLength": 256,
118
+ "description": "RFC 0101. Stable speaker identity of this turn — the roster INSTANCE id of the agent that produced it (the `host:<id>` AgentRef agentId per `agent-roster-entry.schema.json` §A / RFC 0086), NOT the manifest/class `AgentRef.agentId`. REQUIRED when `role: 'agent'` (the conditional below) so that 'turn N was spoken by agent X' is an observable, replay-stable, cross-host-projectable fact in a multi-party transcript. When a `participants` roster is declared on `conversation.opened` (RFC 0101), `speakerId` MUST be a member of that roster; a turn whose `speakerId` is not a participant MUST be rejected (host-enforced, capability-gated on `multiPartyConversation.supported`). For `role: 'user'` / `role: 'system'` turns the field is OPTIONAL and carries no normative meaning. Additive-safe: pre-RFC-0101 `role: 'agent'` turns that omit it are accepted by hosts that do NOT advertise `multiPartyConversation`."
119
+ }
120
+ },
121
+ "allOf": [
122
+ {
123
+ "$comment": "RFC 0101 — agent turns MUST carry speaker attribution. Conditional (not unconditional `required`) so the field is only mandatory for `role: 'agent'`; `user`/`system` turns and pre-RFC-0101 producers on non-multi-party hosts are unaffected. Capability-gated: hosts enforce this only when advertising `multiPartyConversation.supported` (capabilities.schema.json).",
124
+ "if": {
125
+ "properties": {
126
+ "role": {
127
+ "const": "agent"
128
+ }
129
+ },
130
+ "required": [
131
+ "role"
132
+ ]
133
+ },
134
+ "then": {
135
+ "required": [
136
+ "speakerId"
137
+ ]
138
+ }
139
+ }
140
+ ],
141
+ "examples": [
142
+ {
143
+ "$comment": "RFC 0101 POSITIVE — an agent turn in a multi-party council carrying speaker attribution (the roster instance id).",
144
+ "messageId": "council-q1:1:agent",
145
+ "from": "host:advisor-cfo",
146
+ "content": "From a cash-runway view I'd push the launch one quarter.",
147
+ "ts": 1718900000000,
148
+ "role": "agent",
149
+ "turnIndex": 1,
150
+ "speakerId": "host:advisor-cfo"
151
+ },
152
+ {
153
+ "$comment": "RFC 0101 POSITIVE — a user turn; speakerId is OPTIONAL for non-agent roles and omitted here.",
154
+ "messageId": "council-q1:0:user",
155
+ "from": "user",
156
+ "content": "Should we launch in Q3 or Q4?",
157
+ "ts": 1718900000000,
158
+ "role": "user",
159
+ "turnIndex": 0
160
+ }
161
+ ],
162
+ "$comment": "RFC 0101 NEGATIVE (covered by the `allOf`/`if` conditional + conversation scenarios, NOT validatable as an `examples[]` entry which must be VALID): a `{ role: 'agent', ... }` turn that OMITS `speakerId` MUST FAIL validation; see conformance/src/scenarios/multi-party-conversation-shape.test.ts.",
163
+ "additionalProperties": false,
164
+ "x-openwop-seeded-from": "v1"
165
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/credential-provenance.schema.json",
4
+ "title": "CredentialProvenance",
5
+ "description": "RFC 0079 §A. Metadata ABOUT a host-issued credential (an RFC 0046 stored reference or an RFC 0047 OAuth token) attached at the tool/egress boundary — never the secret value (SR-1; reuses the RFC 0046 `credential-payload-redaction` posture). Travels with the egress decision, not the credential material. The §C audience-binding MUST is evaluated against `audiences`.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "credentialId",
10
+ "issuer",
11
+ "audiences"
12
+ ],
13
+ "properties": {
14
+ "credentialId": {
15
+ "type": "string",
16
+ "minLength": 1,
17
+ "description": "Stable host-issued id for the credential (the RFC 0046 `ref`, or an OAuth-grant id). Correlates audit + the Keys-page view. NOT the secret value."
18
+ },
19
+ "issuer": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "description": "Who minted/owns the credential — the host itself (`host`), an RFC 0047 OAuth provider id, or a BYOK principal (RFC 0046). Lets a consumer distinguish host-managed from caller-supplied credentials."
23
+ },
24
+ "audiences": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "description": "REQUIRED. The destination hosts/domains (or destination-class ids) the credential is valid for. The §C binding MUST is evaluated against this list — a credential MUST NOT be attached to an egress outside its audiences. Matching is exact host or an explicit `*.domain` suffix form (no arbitrary regex — injection risk; RFC 0079 §UQ1)."
32
+ },
33
+ "scopes": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ },
38
+ "uniqueItems": true,
39
+ "description": "MAY — RFC 0049 scopes the credential grants (e.g. `egress:stripe:charge`)."
40
+ },
41
+ "expiresAt": {
42
+ "type": "string",
43
+ "format": "date-time",
44
+ "description": "MAY — credential expiry; an expired credential MUST NOT be attached (deny, `reason: \"expired\"`)."
45
+ },
46
+ "redactionPolicy": {
47
+ "type": "string",
48
+ "enum": [
49
+ "always",
50
+ "hash",
51
+ "host-policy"
52
+ ],
53
+ "description": "MAY — how the credential surfaces in logs/events. `always`: never appears (default posture, SR-1); `hash`: an SR-1-redacted digest MAY appear; `host-policy`: host-defined. The secret value itself is NEVER on the wire regardless."
54
+ },
55
+ "auditCorrelationId": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "description": "MAY — id correlating this credential's egress decisions across the run's `egress.decided` events + the host audit log."
59
+ }
60
+ },
61
+ "x-openwop-seeded-from": "v1"
62
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/credential-reference.schema.json",
4
+ "title": "CredentialReference",
5
+ "description": "RFC 0046. An opaque, host-issued handle to a stored credential. This is the ONLY credential artifact permitted on the wire — it NEVER carries key material. The host's host.credentials resolver dereferences it into the node sandbox at execution time (SECURITY invariant `credential-payload-redaction`).",
6
+ "type": "object",
7
+ "required": [
8
+ "ref"
9
+ ],
10
+ "properties": {
11
+ "ref": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "description": "Opaque host-issued identifier, e.g. `cred_a3b9c2`. Hosts MUST NOT encode secret material in the ref."
15
+ },
16
+ "scope": {
17
+ "type": "string",
18
+ "enum": [
19
+ "user",
20
+ "workspace",
21
+ "tenant"
22
+ ],
23
+ "description": "Resolution scope. MUST match a scope in `capabilities.credentials.scopes`. Absent ⇒ the host's default scope."
24
+ }
25
+ },
26
+ "additionalProperties": false,
27
+ "x-openwop-seeded-from": "v1"
28
+ }
@@ -0,0 +1,312 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://openwop.dev/spec/v2/debug-bundle.schema.json",
4
+ "title": "RunDebugBundle",
5
+ "description": "Portable JSON export of a single run's diagnostic state. See spec/v1/debug-bundle.md. Additive over v1 per COMPATIBILITY.md §2.1: optional endpoint; hosts MAY omit.",
6
+ "type": "object",
7
+ "required": [
8
+ "bundleVersion",
9
+ "generatedAt",
10
+ "host",
11
+ "run",
12
+ "events",
13
+ "redactionApplied",
14
+ "redactionMode"
15
+ ],
16
+ "properties": {
17
+ "bundleVersion": {
18
+ "const": "2",
19
+ "description": "RFC 0172 §B axis 10 — one const family; this bundle is \"2\" in v2."
20
+ },
21
+ "generatedAt": {
22
+ "type": "string",
23
+ "format": "date-time",
24
+ "description": "ISO 8601 timestamp when the host generated this response."
25
+ },
26
+ "host": {
27
+ "type": "object",
28
+ "description": "Identifies the host that produced the bundle.",
29
+ "required": [
30
+ "name",
31
+ "version"
32
+ ],
33
+ "properties": {
34
+ "name": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "version": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ },
42
+ "vendor": {
43
+ "type": "string"
44
+ }
45
+ },
46
+ "additionalProperties": false
47
+ },
48
+ "run": {
49
+ "type": "object",
50
+ "description": "Run snapshot — same shape as GET /v1/runs/{runId}. See run-snapshot.schema.json.",
51
+ "required": [
52
+ "runId",
53
+ "workflowId",
54
+ "status"
55
+ ],
56
+ "properties": {
57
+ "runId": {
58
+ "$ref": "ids.schema.json#/$defs/runId"
59
+ },
60
+ "workflowId": {
61
+ "$ref": "ids.schema.json#/$defs/workflowId"
62
+ },
63
+ "status": {
64
+ "type": "string",
65
+ "enum": [
66
+ "pending",
67
+ "running",
68
+ "completed",
69
+ "failed",
70
+ "cancelled",
71
+ "waiting-approval",
72
+ "waiting-clarification"
73
+ ]
74
+ },
75
+ "startedAt": {
76
+ "type": "string",
77
+ "format": "date-time"
78
+ },
79
+ "endedAt": {
80
+ "oneOf": [
81
+ {
82
+ "type": "string",
83
+ "format": "date-time"
84
+ },
85
+ {
86
+ "type": "null"
87
+ }
88
+ ]
89
+ },
90
+ "error": {
91
+ "oneOf": [
92
+ {
93
+ "type": "null"
94
+ },
95
+ {
96
+ "type": "object",
97
+ "required": [
98
+ "code"
99
+ ],
100
+ "properties": {
101
+ "code": {
102
+ "type": "string",
103
+ "minLength": 1
104
+ },
105
+ "message": {
106
+ "type": "string"
107
+ }
108
+ },
109
+ "additionalProperties": false
110
+ }
111
+ ]
112
+ },
113
+ "inputs": {
114
+ "type": "object",
115
+ "additionalProperties": true
116
+ },
117
+ "variables": {
118
+ "type": "object",
119
+ "additionalProperties": true
120
+ },
121
+ "currentNodeId": {
122
+ "oneOf": [
123
+ {
124
+ "type": "string"
125
+ },
126
+ {
127
+ "type": "null"
128
+ }
129
+ ]
130
+ },
131
+ "nodeStates": {
132
+ "type": "object",
133
+ "additionalProperties": true
134
+ },
135
+ "metrics": {
136
+ "type": "object",
137
+ "additionalProperties": true
138
+ }
139
+ },
140
+ "additionalProperties": false
141
+ },
142
+ "events": {
143
+ "type": "array",
144
+ "description": "Full event log for this run, in order. Each entry follows run-event.schema.json.",
145
+ "items": {
146
+ "type": "object",
147
+ "properties": {
148
+ "sequence": {
149
+ "oneOf": [
150
+ {
151
+ "type": "integer",
152
+ "minimum": 0
153
+ },
154
+ {
155
+ "type": "null"
156
+ }
157
+ ]
158
+ },
159
+ "type": {
160
+ "type": "string",
161
+ "minLength": 1
162
+ },
163
+ "timestamp": {
164
+ "type": "string",
165
+ "format": "date-time"
166
+ },
167
+ "nodeId": {
168
+ "oneOf": [
169
+ {
170
+ "type": "string"
171
+ },
172
+ {
173
+ "type": "null"
174
+ }
175
+ ]
176
+ },
177
+ "data": {}
178
+ },
179
+ "additionalProperties": false
180
+ }
181
+ },
182
+ "spans": {
183
+ "type": "array",
184
+ "description": "OTel-format spans per spec/v1/observability.md. Empty array if host doesn't emit spans.",
185
+ "items": {
186
+ "type": "object",
187
+ "required": [
188
+ "name"
189
+ ],
190
+ "properties": {
191
+ "name": {
192
+ "type": "string",
193
+ "minLength": 1
194
+ },
195
+ "spanId": {
196
+ "$ref": "ids.schema.json#/$defs/spanId"
197
+ },
198
+ "parentSpanId": {
199
+ "oneOf": [
200
+ {
201
+ "type": "string"
202
+ },
203
+ {
204
+ "type": "null"
205
+ }
206
+ ]
207
+ },
208
+ "startedAt": {
209
+ "type": "string",
210
+ "format": "date-time"
211
+ },
212
+ "endedAt": {
213
+ "oneOf": [
214
+ {
215
+ "type": "string",
216
+ "format": "date-time"
217
+ },
218
+ {
219
+ "type": "null"
220
+ }
221
+ ]
222
+ },
223
+ "attributes": {
224
+ "type": "object",
225
+ "additionalProperties": true
226
+ }
227
+ },
228
+ "additionalProperties": false
229
+ }
230
+ },
231
+ "metrics": {
232
+ "type": "object",
233
+ "description": "Aggregate metrics for the run.",
234
+ "properties": {
235
+ "openwopCost": {
236
+ "oneOf": [
237
+ {
238
+ "type": "null"
239
+ },
240
+ {
241
+ "type": "object",
242
+ "properties": {
243
+ "usd": {
244
+ "type": "number",
245
+ "minimum": 0
246
+ },
247
+ "tokens": {
248
+ "type": "object",
249
+ "properties": {
250
+ "input": {
251
+ "type": "integer",
252
+ "minimum": 0
253
+ },
254
+ "output": {
255
+ "type": "integer",
256
+ "minimum": 0
257
+ }
258
+ },
259
+ "additionalProperties": false
260
+ },
261
+ "model": {
262
+ "type": "string"
263
+ },
264
+ "provider": {
265
+ "type": "string"
266
+ },
267
+ "duration_ms": {
268
+ "type": "number",
269
+ "minimum": 0
270
+ }
271
+ },
272
+ "additionalProperties": false
273
+ }
274
+ ]
275
+ },
276
+ "nodeCount": {
277
+ "type": "integer",
278
+ "minimum": 0
279
+ },
280
+ "eventCount": {
281
+ "type": "integer",
282
+ "minimum": 0,
283
+ "description": "MUST equal events.length per spec/v1/debug-bundle.md."
284
+ }
285
+ },
286
+ "additionalProperties": false
287
+ },
288
+ "redactionApplied": {
289
+ "type": "boolean",
290
+ "description": "True if any field in this bundle was masked/omitted/hashed by the host's redaction harness."
291
+ },
292
+ "redactionMode": {
293
+ "type": "string",
294
+ "enum": [
295
+ "mask",
296
+ "omit",
297
+ "hash",
298
+ "passthrough"
299
+ ],
300
+ "description": "Masking mode in effect per capabilities.compliance.defaultMode."
301
+ },
302
+ "truncated": {
303
+ "type": "boolean",
304
+ "description": "True when the bundle was truncated to fit the host's size cap."
305
+ },
306
+ "truncatedReason": {
307
+ "type": "string",
308
+ "description": "Why truncation occurred (e.g., 'events_truncated_to_size_cap')."
309
+ }
310
+ },
311
+ "additionalProperties": false
312
+ }