@zarel-ai/sdk 0.6.0 → 0.7.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 (358) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +29 -31
  3. package/dist/_internal/auth-headers.d.ts +3 -3
  4. package/dist/_internal/auth-headers.d.ts.map +1 -1
  5. package/dist/_internal/auth-headers.js +5 -3
  6. package/dist/_internal/auth-headers.js.map +1 -1
  7. package/dist/_internal/confirmation.d.ts +1 -1
  8. package/dist/_internal/confirmation.d.ts.map +1 -1
  9. package/dist/_internal/confirmation.js +3 -1
  10. package/dist/_internal/confirmation.js.map +1 -1
  11. package/dist/_internal/event-iterator.d.ts.map +1 -1
  12. package/dist/_internal/event-iterator.js +3 -1
  13. package/dist/_internal/event-iterator.js.map +1 -1
  14. package/dist/_internal/fetch-client.d.ts +26 -18
  15. package/dist/_internal/fetch-client.d.ts.map +1 -1
  16. package/dist/_internal/fetch-client.js +40 -35
  17. package/dist/_internal/fetch-client.js.map +1 -1
  18. package/dist/_internal/interceptors.d.ts.map +1 -1
  19. package/dist/_internal/interceptors.js.map +1 -1
  20. package/dist/_internal/mcp.d.ts.map +1 -1
  21. package/dist/_internal/mcp.js +6 -4
  22. package/dist/_internal/mcp.js.map +1 -1
  23. package/dist/_internal/pagination.d.ts +5 -5
  24. package/dist/_internal/pagination.d.ts.map +1 -1
  25. package/dist/_internal/pagination.js +7 -5
  26. package/dist/_internal/pagination.js.map +1 -1
  27. package/dist/_internal/require-token.d.ts +4 -4
  28. package/dist/_internal/require-token.d.ts.map +1 -1
  29. package/dist/_internal/require-token.js +6 -4
  30. package/dist/_internal/require-token.js.map +1 -1
  31. package/dist/_internal/retry-after.d.ts.map +1 -1
  32. package/dist/_internal/retry-after.js +2 -0
  33. package/dist/_internal/retry-after.js.map +1 -1
  34. package/dist/_internal/sse-client.d.ts.map +1 -1
  35. package/dist/_internal/sse-client.js +4 -3
  36. package/dist/_internal/sse-client.js.map +1 -1
  37. package/dist/_internal/version.d.ts +2 -2
  38. package/dist/_internal/version.d.ts.map +1 -1
  39. package/dist/_internal/version.js +4 -2
  40. package/dist/_internal/version.js.map +1 -1
  41. package/dist/client.d.ts +8 -8
  42. package/dist/client.d.ts.map +1 -1
  43. package/dist/client.js +10 -10
  44. package/dist/client.js.map +1 -1
  45. package/dist/contract/_singleton.d.ts +31 -6
  46. package/dist/contract/_singleton.d.ts.map +1 -1
  47. package/dist/contract/_singleton.js +30 -6
  48. package/dist/contract/_singleton.js.map +1 -1
  49. package/dist/contract/actions.d.ts +16 -4
  50. package/dist/contract/actions.d.ts.map +1 -1
  51. package/dist/contract/actions.js +13 -12
  52. package/dist/contract/actions.js.map +1 -1
  53. package/dist/contract/assistant.d.ts +3 -3
  54. package/dist/contract/assistant.d.ts.map +1 -1
  55. package/dist/contract/assistant.js +13 -11
  56. package/dist/contract/assistant.js.map +1 -1
  57. package/dist/contract/batch.d.ts +9 -20
  58. package/dist/contract/batch.d.ts.map +1 -1
  59. package/dist/contract/batch.js +14 -6
  60. package/dist/contract/batch.js.map +1 -1
  61. package/dist/contract/capabilities.d.ts +7 -13
  62. package/dist/contract/capabilities.d.ts.map +1 -1
  63. package/dist/contract/capabilities.js +10 -8
  64. package/dist/contract/capabilities.js.map +1 -1
  65. package/dist/contract/constraints.d.ts +7 -13
  66. package/dist/contract/constraints.d.ts.map +1 -1
  67. package/dist/contract/constraints.js +10 -8
  68. package/dist/contract/constraints.js.map +1 -1
  69. package/dist/contract/events.d.ts +9 -13
  70. package/dist/contract/events.d.ts.map +1 -1
  71. package/dist/contract/events.js +12 -13
  72. package/dist/contract/events.js.map +1 -1
  73. package/dist/contract/flows.d.ts +30 -19
  74. package/dist/contract/flows.d.ts.map +1 -1
  75. package/dist/contract/flows.js +46 -29
  76. package/dist/contract/flows.js.map +1 -1
  77. package/dist/contract/index.d.ts +207 -32
  78. package/dist/contract/index.d.ts.map +1 -1
  79. package/dist/contract/index.js +13 -14
  80. package/dist/contract/index.js.map +1 -1
  81. package/dist/contract/metadata.d.ts +6 -20
  82. package/dist/contract/metadata.d.ts.map +1 -1
  83. package/dist/contract/metadata.js +16 -8
  84. package/dist/contract/metadata.js.map +1 -1
  85. package/dist/contract/process-model.d.ts +10 -15
  86. package/dist/contract/process-model.d.ts.map +1 -1
  87. package/dist/contract/process-model.js +11 -9
  88. package/dist/contract/process-model.js.map +1 -1
  89. package/dist/contract/roots/channels.d.ts.map +1 -1
  90. package/dist/contract/roots/channels.js +12 -10
  91. package/dist/contract/roots/channels.js.map +1 -1
  92. package/dist/contract/roots/events.d.ts.map +1 -1
  93. package/dist/contract/roots/events.js +2 -0
  94. package/dist/contract/roots/events.js.map +1 -1
  95. package/dist/contract/roots/index.d.ts +3 -2
  96. package/dist/contract/roots/index.d.ts.map +1 -1
  97. package/dist/contract/roots/index.js +13 -12
  98. package/dist/contract/roots/index.js.map +1 -1
  99. package/dist/contract/roots/mcp-servers.d.ts +11 -29
  100. package/dist/contract/roots/mcp-servers.d.ts.map +1 -1
  101. package/dist/contract/roots/mcp-servers.js +22 -18
  102. package/dist/contract/roots/mcp-servers.js.map +1 -1
  103. package/dist/contract/roots/profiles.d.ts +13 -12
  104. package/dist/contract/roots/profiles.d.ts.map +1 -1
  105. package/dist/contract/roots/profiles.js +18 -7
  106. package/dist/contract/roots/profiles.js.map +1 -1
  107. package/dist/contract/roots/timezone.d.ts +3 -3
  108. package/dist/contract/roots/timezone.d.ts.map +1 -1
  109. package/dist/contract/roots/timezone.js +5 -2
  110. package/dist/contract/roots/timezone.js.map +1 -1
  111. package/dist/contract/roots/treatment.d.ts +3 -2
  112. package/dist/contract/roots/treatment.d.ts.map +1 -1
  113. package/dist/contract/roots/treatment.js +8 -8
  114. package/dist/contract/roots/treatment.js.map +1 -1
  115. package/dist/contract/roots/vocabulary.d.ts +20 -13
  116. package/dist/contract/roots/vocabulary.d.ts.map +1 -1
  117. package/dist/contract/roots/vocabulary.js +28 -9
  118. package/dist/contract/roots/vocabulary.js.map +1 -1
  119. package/dist/contract/schemas.d.ts +7 -10
  120. package/dist/contract/schemas.d.ts.map +1 -1
  121. package/dist/contract/schemas.js +10 -8
  122. package/dist/contract/schemas.js.map +1 -1
  123. package/dist/contract/skills.d.ts +14 -4
  124. package/dist/contract/skills.d.ts.map +1 -1
  125. package/dist/contract/skills.js +11 -11
  126. package/dist/contract/skills.js.map +1 -1
  127. package/dist/errors.d.ts +4 -4
  128. package/dist/errors.d.ts.map +1 -1
  129. package/dist/errors.js +4 -4
  130. package/dist/errors.js.map +1 -1
  131. package/dist/generated/contract.d.ts +4494 -706
  132. package/dist/generated/contract.d.ts.map +1 -1
  133. package/dist/generated/index.d.ts +119 -7
  134. package/dist/generated/index.d.ts.map +1 -1
  135. package/dist/generated/runtime.d.ts +1490 -368
  136. package/dist/generated/runtime.d.ts.map +1 -1
  137. package/dist/generated/unwrap-map.d.ts +5 -2
  138. package/dist/generated/unwrap-map.d.ts.map +1 -1
  139. package/dist/generated/unwrap-map.js +5 -5
  140. package/dist/generated/unwrap-map.js.map +1 -1
  141. package/dist/index.d.ts +9 -6
  142. package/dist/index.d.ts.map +1 -1
  143. package/dist/index.js +7 -3
  144. package/dist/index.js.map +1 -1
  145. package/dist/resources/actions.d.ts +5 -6
  146. package/dist/resources/actions.d.ts.map +1 -1
  147. package/dist/resources/actions.js +9 -10
  148. package/dist/resources/actions.js.map +1 -1
  149. package/dist/resources/audit.d.ts +6 -6
  150. package/dist/resources/audit.d.ts.map +1 -1
  151. package/dist/resources/audit.js +3 -25
  152. package/dist/resources/audit.js.map +1 -1
  153. package/dist/resources/authorization-ceiling.d.ts +2 -2
  154. package/dist/resources/authorization-ceiling.d.ts.map +1 -1
  155. package/dist/resources/authorization-ceiling.js +8 -7
  156. package/dist/resources/authorization-ceiling.js.map +1 -1
  157. package/dist/resources/authorization-operation-ids.d.ts +1 -1
  158. package/dist/resources/authorization-operation-ids.d.ts.map +1 -1
  159. package/dist/resources/authorization-operation-ids.js +4 -2
  160. package/dist/resources/authorization-operation-ids.js.map +1 -1
  161. package/dist/resources/authorization.d.ts +53 -19
  162. package/dist/resources/authorization.d.ts.map +1 -1
  163. package/dist/resources/authorization.js +24 -6
  164. package/dist/resources/authorization.js.map +1 -1
  165. package/dist/resources/authorizations.d.ts +3 -5
  166. package/dist/resources/authorizations.d.ts.map +1 -1
  167. package/dist/resources/authorizations.js +4 -2
  168. package/dist/resources/authorizations.js.map +1 -1
  169. package/dist/resources/channels.d.ts +7 -7
  170. package/dist/resources/channels.d.ts.map +1 -1
  171. package/dist/resources/channels.js +10 -10
  172. package/dist/resources/channels.js.map +1 -1
  173. package/dist/resources/contracts.d.ts +2 -2
  174. package/dist/resources/contracts.d.ts.map +1 -1
  175. package/dist/resources/contracts.js +15 -14
  176. package/dist/resources/contracts.js.map +1 -1
  177. package/dist/resources/conversation-sessions.d.ts +19 -20
  178. package/dist/resources/conversation-sessions.d.ts.map +1 -1
  179. package/dist/resources/conversation-sessions.js +17 -22
  180. package/dist/resources/conversation-sessions.js.map +1 -1
  181. package/dist/resources/conversation.d.ts +4 -4
  182. package/dist/resources/conversation.d.ts.map +1 -1
  183. package/dist/resources/conversation.js +13 -11
  184. package/dist/resources/conversation.js.map +1 -1
  185. package/dist/resources/embedding-credentials.d.ts +3 -3
  186. package/dist/resources/embedding-credentials.d.ts.map +1 -1
  187. package/dist/resources/embedding-credentials.js +8 -6
  188. package/dist/resources/embedding-credentials.js.map +1 -1
  189. package/dist/resources/entities.d.ts +50 -32
  190. package/dist/resources/entities.d.ts.map +1 -1
  191. package/dist/resources/entities.js +51 -32
  192. package/dist/resources/entities.js.map +1 -1
  193. package/dist/resources/events.d.ts +4 -5
  194. package/dist/resources/events.d.ts.map +1 -1
  195. package/dist/resources/events.js +12 -11
  196. package/dist/resources/events.js.map +1 -1
  197. package/dist/resources/flows.d.ts +18 -15
  198. package/dist/resources/flows.d.ts.map +1 -1
  199. package/dist/resources/flows.js +41 -27
  200. package/dist/resources/flows.js.map +1 -1
  201. package/dist/resources/imports.d.ts.map +1 -1
  202. package/dist/resources/imports.js +1 -1
  203. package/dist/resources/imports.js.map +1 -1
  204. package/dist/resources/index.d.ts +3 -2
  205. package/dist/resources/index.d.ts.map +1 -1
  206. package/dist/resources/index.js +6 -2
  207. package/dist/resources/index.js.map +1 -1
  208. package/dist/resources/llm-credentials.d.ts +21 -6
  209. package/dist/resources/llm-credentials.d.ts.map +1 -1
  210. package/dist/resources/llm-credentials.js +25 -10
  211. package/dist/resources/llm-credentials.js.map +1 -1
  212. package/dist/resources/llm-services.d.ts +8 -8
  213. package/dist/resources/llm-services.d.ts.map +1 -1
  214. package/dist/resources/llm-services.js +11 -9
  215. package/dist/resources/llm-services.js.map +1 -1
  216. package/dist/resources/mcp.d.ts.map +1 -1
  217. package/dist/resources/mcp.js +5 -3
  218. package/dist/resources/mcp.js.map +1 -1
  219. package/dist/resources/receipts.d.ts +1 -1
  220. package/dist/resources/receipts.d.ts.map +1 -1
  221. package/dist/resources/receipts.js +1 -1
  222. package/dist/resources/receipts.js.map +1 -1
  223. package/dist/resources/records.d.ts +1 -1
  224. package/dist/resources/records.d.ts.map +1 -1
  225. package/dist/resources/records.js +7 -5
  226. package/dist/resources/records.js.map +1 -1
  227. package/dist/resources/role-assignments.d.ts +4 -5
  228. package/dist/resources/role-assignments.d.ts.map +1 -1
  229. package/dist/resources/role-assignments.js +8 -7
  230. package/dist/resources/role-assignments.js.map +1 -1
  231. package/dist/resources/roles.d.ts +23 -23
  232. package/dist/resources/roles.d.ts.map +1 -1
  233. package/dist/resources/roles.js +20 -14
  234. package/dist/resources/roles.js.map +1 -1
  235. package/dist/resources/runtime-entities.d.ts +12 -9
  236. package/dist/resources/runtime-entities.d.ts.map +1 -1
  237. package/dist/resources/runtime-entities.js +5 -8
  238. package/dist/resources/runtime-entities.js.map +1 -1
  239. package/dist/resources/state-machine.d.ts +6 -12
  240. package/dist/resources/state-machine.d.ts.map +1 -1
  241. package/dist/resources/state-machine.js +17 -21
  242. package/dist/resources/state-machine.js.map +1 -1
  243. package/dist/resources/system.d.ts.map +1 -1
  244. package/dist/resources/system.js +5 -5
  245. package/dist/resources/system.js.map +1 -1
  246. package/dist/resources/tools.d.ts +2 -2
  247. package/dist/resources/tools.d.ts.map +1 -1
  248. package/dist/resources/tools.js +7 -5
  249. package/dist/resources/tools.js.map +1 -1
  250. package/dist/resources/traces.d.ts +1 -7
  251. package/dist/resources/traces.d.ts.map +1 -1
  252. package/dist/resources/traces.js +4 -29
  253. package/dist/resources/traces.js.map +1 -1
  254. package/dist/runtime/index.d.ts +4 -2
  255. package/dist/runtime/index.d.ts.map +1 -1
  256. package/dist/runtime/index.js +21 -17
  257. package/dist/runtime/index.js.map +1 -1
  258. package/dist/types/actions.d.ts +7 -8
  259. package/dist/types/actions.d.ts.map +1 -1
  260. package/dist/types/actions.js +4 -2
  261. package/dist/types/actions.js.map +1 -1
  262. package/dist/types/audit.d.ts +5 -7
  263. package/dist/types/audit.d.ts.map +1 -1
  264. package/dist/types/audit.js +6 -6
  265. package/dist/types/audit.js.map +1 -1
  266. package/dist/types/channels.d.ts +1 -1
  267. package/dist/types/channels.d.ts.map +1 -1
  268. package/dist/types/channels.js +5 -3
  269. package/dist/types/channels.js.map +1 -1
  270. package/dist/types/collections-contract.d.ts +50 -0
  271. package/dist/types/collections-contract.d.ts.map +1 -0
  272. package/dist/types/collections-contract.js +22 -0
  273. package/dist/types/collections-contract.js.map +1 -0
  274. package/dist/types/confirmation.d.ts +4 -4
  275. package/dist/types/confirmation.d.ts.map +1 -1
  276. package/dist/types/confirmation.js +6 -4
  277. package/dist/types/confirmation.js.map +1 -1
  278. package/dist/types/contracts.d.ts +12 -15
  279. package/dist/types/contracts.d.ts.map +1 -1
  280. package/dist/types/contracts.js +5 -4
  281. package/dist/types/contracts.js.map +1 -1
  282. package/dist/types/conversation-sessions.d.ts +1 -1
  283. package/dist/types/conversation-sessions.d.ts.map +1 -1
  284. package/dist/types/conversation-sessions.js +3 -1
  285. package/dist/types/conversation-sessions.js.map +1 -1
  286. package/dist/types/conversation.d.ts +13 -40
  287. package/dist/types/conversation.d.ts.map +1 -1
  288. package/dist/types/entities.d.ts +52 -16
  289. package/dist/types/entities.d.ts.map +1 -1
  290. package/dist/types/entities.js +12 -0
  291. package/dist/types/entities.js.map +1 -1
  292. package/dist/types/events-stream.d.ts +2 -2
  293. package/dist/types/events-stream.d.ts.map +1 -1
  294. package/dist/types/events-stream.js +6 -4
  295. package/dist/types/events-stream.js.map +1 -1
  296. package/dist/types/flows-contract.d.ts +28 -7
  297. package/dist/types/flows-contract.d.ts.map +1 -1
  298. package/dist/types/flows-contract.js +11 -4
  299. package/dist/types/flows-contract.js.map +1 -1
  300. package/dist/types/flows.d.ts +27 -58
  301. package/dist/types/flows.d.ts.map +1 -1
  302. package/dist/types/flows.js +8 -20
  303. package/dist/types/flows.js.map +1 -1
  304. package/dist/types/imports.d.ts +9 -0
  305. package/dist/types/imports.d.ts.map +1 -1
  306. package/dist/types/index.d.ts +8 -4
  307. package/dist/types/index.d.ts.map +1 -1
  308. package/dist/types/locale.d.ts +2 -2
  309. package/dist/types/locale.d.ts.map +1 -1
  310. package/dist/types/locale.js +4 -2
  311. package/dist/types/locale.js.map +1 -1
  312. package/dist/types/mcp-and-events-contract.d.ts +51 -0
  313. package/dist/types/mcp-and-events-contract.d.ts.map +1 -0
  314. package/dist/types/mcp-and-events-contract.js +20 -0
  315. package/dist/types/mcp-and-events-contract.js.map +1 -0
  316. package/dist/types/mcp.d.ts.map +1 -1
  317. package/dist/types/mcp.js +3 -1
  318. package/dist/types/mcp.js.map +1 -1
  319. package/dist/types/platform.d.ts +12 -12
  320. package/dist/types/platform.d.ts.map +1 -1
  321. package/dist/types/platform.js +0 -1
  322. package/dist/types/platform.js.map +1 -1
  323. package/dist/types/receipt.d.ts +3 -5
  324. package/dist/types/receipt.d.ts.map +1 -1
  325. package/dist/types/receipt.js +5 -5
  326. package/dist/types/receipt.js.map +1 -1
  327. package/dist/types/records.d.ts +3 -3
  328. package/dist/types/records.d.ts.map +1 -1
  329. package/dist/types/records.js +2 -0
  330. package/dist/types/records.js.map +1 -1
  331. package/dist/types/spec.d.ts +2 -2
  332. package/dist/types/spec.d.ts.map +1 -1
  333. package/dist/types/state-machine.d.ts +48 -84
  334. package/dist/types/state-machine.d.ts.map +1 -1
  335. package/dist/types/state-machine.js +9 -4
  336. package/dist/types/state-machine.js.map +1 -1
  337. package/dist/types/system.d.ts.map +1 -1
  338. package/dist/types/tools.d.ts +36 -28
  339. package/dist/types/tools.d.ts.map +1 -1
  340. package/dist/types/tools.js +6 -6
  341. package/dist/types/tools.js.map +1 -1
  342. package/dist/types/traces.d.ts +6 -9
  343. package/dist/types/traces.d.ts.map +1 -1
  344. package/dist/types/traces.js +5 -5
  345. package/dist/types/traces.js.map +1 -1
  346. package/dist/types/treatment-contract.d.ts +70 -0
  347. package/dist/types/treatment-contract.d.ts.map +1 -0
  348. package/dist/types/treatment-contract.js +20 -0
  349. package/dist/types/treatment-contract.js.map +1 -0
  350. package/dist/types/workflows.d.ts +14 -0
  351. package/dist/types/workflows.d.ts.map +1 -1
  352. package/dist/types/workflows.js +7 -6
  353. package/dist/types/workflows.js.map +1 -1
  354. package/package.json +93 -96
  355. package/dist/contract/governance.d.ts +0 -6
  356. package/dist/contract/governance.d.ts.map +0 -1
  357. package/dist/contract/governance.js +0 -17
  358. package/dist/contract/governance.js.map +0 -1
@@ -3,6 +3,37 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
+ "/runtime/branding": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /**
14
+ * Tenant branding for the Desk shell
15
+ * @description Tenant-identity projection data — display name,
16
+ * logo and accent colour — gated by AUTHENTICATION only: any verified
17
+ * principal, including the always-present anonymous session, may read it.
18
+ * It is not a policy-bearing entity, so there is no contract-policy match.
19
+ *
20
+ * The tenant comes from the request host, never from the path or a
21
+ * parameter, and is verified equal to the principal's token tenant. A
22
+ * host that is not a tenant subdomain gets an opaque 404 rather than an
23
+ * existence signal.
24
+ *
25
+ * The body is NOT the standard envelope: this operation answers with the
26
+ * branding object directly.
27
+ */
28
+ get: operations["getBranding"];
29
+ put?: never;
30
+ post?: never;
31
+ delete?: never;
32
+ options?: never;
33
+ head?: never;
34
+ patch?: never;
35
+ trace?: never;
36
+ };
6
37
  "/runtime/llm/services": {
7
38
  parameters: {
8
39
  query?: never;
@@ -12,7 +43,7 @@ export interface paths {
12
43
  };
13
44
  /**
14
45
  * List the LLM services the actor is authorized to use in `?scope=`
15
- * @description FR-B02 no-leak: returns ONLY services for which the actor has a
46
+ * @description No-leak: returns ONLY services for which the actor has a
16
47
  * `use` policy in the requested scope. There is no separate
17
48
  * "all services" endpoint — operators see everything because their
18
49
  * contract policies grant them `use` on every service.
@@ -37,9 +68,9 @@ export interface paths {
37
68
  };
38
69
  /**
39
70
  * Get one LLM service by name (only if authorized in `?scope=`)
40
- * @description FR-B02 no-leak: a service the actor cannot use in `?scope=` returns
71
+ * @description No-leak: a service the actor cannot use in `?scope=` returns
41
72
  * 404 indistinguishable from "doesn't exist". The response body never
42
- * reveals whether the row exists for unauthorized actors.
73
+ * reveals whether the service exists for unauthorized actors.
43
74
  */
44
75
  get: operations["getLlmService"];
45
76
  put?: never;
@@ -78,35 +109,42 @@ export interface paths {
78
109
  };
79
110
  /**
80
111
  * Get masked metadata for one credential
81
- * @description Plaintext is NEVER returned. Returns 404 indistinguishable from "doesn't exist" when not authorized (FR-B02).
112
+ * @description Plaintext is NEVER returned. Returns 404 indistinguishable from "doesn't exist" when not authorized.
82
113
  */
83
114
  get: operations["getLlmCredential"];
84
115
  /**
85
- * Set / replace a credential (write-only on `api_key`)
86
- * @description Body: `{ api_key, base_url? }`. Server encrypts with the per-tenant
87
- * DEK, computes a 4-char fingerprint, and writes a sanitised audit row
88
- * (no ciphertext / IV / fingerprint, FR-I06). The plaintext is consumed
89
- * and discarded — no read endpoint can retrieve it (FR-I04).
116
+ * Set / replace a credential (write-only on the secret)
117
+ * @description The body is `CredentialWriteBody` — the credential blob for the provider the DECLARED
118
+ * service names, chosen by the path and not by a key you send: `{ apiKey, baseURL? }`, or
119
+ * the AWS static-key shape for `bedrock`. The server encrypts it with the per-tenant data
120
+ * encryption key, computes a 4-char fingerprint, and records a sanitised audit entry (no
121
+ * ciphertext / IV / fingerprint). The plaintext is consumed and discarded — no read
122
+ * endpoint can retrieve it.
90
123
  *
91
124
  * Possible 4xx codes:
92
- * - `INVALID_API_KEY` (400): empty / too long / non-printable.
125
+ * - `INVALID_CREDENTIAL` (400): the blob fails the resolved provider's schema — a missing
126
+ * or malformed `apiKey`, or a key the shape does not declare.
93
127
  * - `UNKNOWN_LLM_SERVICE` (404): service does not exist in catalog
94
128
  * (only returned to authorized callers).
95
- * - `PROVIDER_NOT_ALLOWED` (403, ADR-0102 S5b-a): the service's
129
+ * - `PROVIDER_NOT_ALLOWED` (403): the service's
96
130
  * provider is outside the tenant's allowed providers (the bounds on
97
131
  * the `manage_credentials` grant). Only reachable by holders of the
98
132
  * grant — the no-leak 404 below still applies first.
133
+ * - `PROVIDER_NOT_SUPPORTED` (409): the DECLARED provider is one the
134
+ * server no longer supports. The request is well-formed and the actor
135
+ * is authorized; what blocks it is the tenant's own stale state, so it
136
+ * names the fix — update the declaration.
99
137
  * - 404 indistinguishable from "doesn't exist" when the actor lacks
100
- * `manage_credentials` (FR-B02 / SEC.V12 — never 403).
138
+ * `manage_credentials` (never 403).
101
139
  */
102
140
  put: operations["setLlmCredential"];
103
141
  post?: never;
104
142
  /**
105
- * Remove a credential (FR-I07 safeguard)
143
+ * Remove a credential
106
144
  * @description Returns 409 `CREDENTIAL_IN_USE` when any active session is pinned to
107
145
  * the service. Operators must close the pinned sessions first. Returns
108
146
  * 404 indistinguishable from "doesn't exist" when the actor lacks
109
- * `manage_credentials` (FR-B02).
147
+ * `manage_credentials`.
110
148
  */
111
149
  delete: operations["deleteLlmCredential"];
112
150
  options?: never;
@@ -123,9 +161,9 @@ export interface paths {
123
161
  };
124
162
  /**
125
163
  * List masked metadata for the tenant's embedding credentials (per declared service)
126
- * @description Returns one masked-metadata row per stored (tenant, embedding service).
164
+ * @description Returns one masked-metadata entry per embedding service with a stored credential.
127
165
  * Plaintext is NEVER returned. Authorization: tenant-level superuser;
128
- * unauthorized callers receive an empty list (SEC.V12 no-leak, never 403).
166
+ * unauthorized callers receive an empty list (no-leak, never 403).
129
167
  */
130
168
  get: operations["listEmbeddingCredentials"];
131
169
  put?: never;
@@ -143,7 +181,7 @@ export interface paths {
143
181
  path: {
144
182
  /**
145
183
  * @description The DECLARED embedding-service name from `embeddings.services[]`
146
- * (FR-023) — not the provider. A provider is not an identity: two
184
+ * — not the provider. A provider is not an identity: two
147
185
  * services may share one, and the credential keys to a declaration that
148
186
  * exists. The provider is resolved from that declaration server-side.
149
187
  */
@@ -153,35 +191,39 @@ export interface paths {
153
191
  };
154
192
  /**
155
193
  * Get masked metadata for one embedding service's credential
156
- * @description Plaintext is NEVER returned. 404 indistinguishable from "not configured" when not authorized (SEC.V12).
194
+ * @description Plaintext is NEVER returned. 404 indistinguishable from "not configured" when not authorized.
157
195
  */
158
196
  get: operations["getEmbeddingCredential"];
159
197
  /**
160
198
  * Set / replace an embedding service's credential (write-only on the secret)
161
- * @description Body is the credential blob for the provider the DECLARED service names —
162
- * `{ apiKey, base_url? }` for apiKey providers (gemini, openai,
163
- * anthropic-via-Voyage) or `{ accessKeyId, secretAccessKey, region,
164
- * sessionToken? }` for bedrock. The server resolves the provider from
165
- * `embeddings.services[]`, validates against that provider's registry
166
- * credential schema, encrypts with the per-tenant DEK, computes a
167
- * fingerprint, and writes a sanitised audit row. The secret is consumed and
199
+ * @description The body is `CredentialWriteBody` — the credential blob for the provider the DECLARED
200
+ * service names: `{ apiKey, baseURL? }` for apiKey providers (gemini, openai,
201
+ * anthropic-via-Voyage) or `{ accessKeyId, secretAccessKey, region, sessionToken? }` for
202
+ * bedrock. The server resolves the provider from
203
+ * `embeddings.services[]`, validates against that provider's
204
+ * credential schema, encrypts with the per-tenant data encryption key, computes a
205
+ * fingerprint, and records a sanitised audit entry. The secret is consumed and
168
206
  * never retrievable.
169
207
  *
170
208
  * Possible 4xx codes:
171
209
  * - `INVALID_CREDENTIAL` (400): blob fails the resolved provider's schema.
172
210
  * - `UNKNOWN_EMBEDDING_SERVICE` (404): no live `embeddings.services[]`
173
- * entry of that name — a secret must key to a declaration that exists
174
- * (FR-022). Only reachable by authorized callers.
175
- * - `PROVIDER_NOT_ALLOWED` (403, ADR-0102 S5b-a): the declared service's
211
+ * entry of that name — a secret must key to a declaration that exists.
212
+ * Only reachable by authorized callers.
213
+ * - `PROVIDER_NOT_ALLOWED` (403): the declared service's
176
214
  * provider is outside the tenant's allowed embedding providers (the
177
215
  * bounds on the `manage_credentials` grant). Only reachable by grant holders.
178
- * - 404 indistinguishable from "not configured" when not authorized (SEC.V12 — never 403).
216
+ * - `PROVIDER_NOT_SUPPORTED` (409): the DECLARED provider is one the
217
+ * server no longer supports. The request is well-formed and the actor
218
+ * is authorized; what blocks it is the tenant's own stale state, so it
219
+ * names the fix — update the declaration.
220
+ * - 404 indistinguishable from "not configured" when not authorized (never 403).
179
221
  */
180
222
  put: operations["setEmbeddingCredential"];
181
223
  post?: never;
182
224
  /**
183
225
  * Remove an embedding service's credential (soft-delete + sensitive wipe)
184
- * @description Soft-deletes the row and wipes the sensitive columns; the
226
+ * @description Soft-deletes the credential and wipes its secret material; the
185
227
  * embedding_similarity gate falls through on subsequent turns for that
186
228
  * service. 404 indistinguishable from "not configured" when not authorized.
187
229
  */
@@ -205,7 +247,7 @@ export interface paths {
205
247
  put?: never;
206
248
  /**
207
249
  * Create a record
208
- * @description ADR-0127 (Option B strict) — this bare surface serves ONLY verbs with no
250
+ * @description This bare surface serves ONLY verbs with no
209
251
  * named action. A governed verb is rejected `400 action_required`; dispatch
210
252
  * it via `POST /runtime/actions/{name}` instead.
211
253
  */
@@ -232,7 +274,7 @@ export interface paths {
232
274
  post?: never;
233
275
  /**
234
276
  * Delete a record
235
- * @description ADR-0127 (Option B strict) — a governed verb is rejected `400
277
+ * @description A governed verb is rejected `400
236
278
  * action_required`; dispatch it via `POST /runtime/actions/{name}`.
237
279
  */
238
280
  delete: operations["deleteRuntimeRecord"];
@@ -240,7 +282,7 @@ export interface paths {
240
282
  head?: never;
241
283
  /**
242
284
  * Merge-patch a record
243
- * @description ADR-0127 (Option B strict) — a governed verb is rejected `400
285
+ * @description A governed verb is rejected `400
244
286
  * action_required`; dispatch it via `POST /runtime/actions/{name}`.
245
287
  */
246
288
  patch: operations["patchRuntimeRecord"];
@@ -344,7 +386,7 @@ export interface paths {
344
386
  path?: never;
345
387
  cookie?: never;
346
388
  };
347
- /** List transition requests (filter by status / role) */
389
+ /** List transition requests (filter by status / required role) */
348
390
  get: operations["listTransitionRequests"];
349
391
  put?: never;
350
392
  /** Create a transition request */
@@ -390,13 +432,13 @@ export interface paths {
390
432
  /**
391
433
  * Dispatch a YAML-declared action
392
434
  * @description Resolves `name` against the tenant's `actions[]`, derives the
393
- * underlying `(entity, verb)` pair, and dispatches through the existing
394
- * `RecordCrudService`. Returns the dispatched record (or `null` for
435
+ * underlying `(entity, verb)` pair, and performs that record operation.
436
+ * Returns the dispatched record (or `null` for
395
437
  * `delete` verbs) plus a `resolved_via_action` telemetry tag.
396
438
  *
397
- * ADR-0127 — this is the governed dispatch surface: the resolved action's
398
- * identity is carried to the deterministic write floor, which evaluates
399
- * capability / phase / precondition / confirmation before persistence. A
439
+ * This is the governed dispatch surface: the server evaluates the
440
+ * resolved action's capability / phase / precondition / confirmation
441
+ * rules before the write is saved. A
400
442
  * blocked write returns a typed outcome (`422 phase_not_allowed` /
401
443
  * `422 precondition_failed`); a write a `confirm` guard pauses returns
402
444
  * `409 confirmation_required` (see the confirmation round-trip below).
@@ -458,7 +500,7 @@ export interface paths {
458
500
  };
459
501
  /**
460
502
  * List flow events (readonly)
461
- * @description The appended flow lifecycle log — where per-step history lives (a run row
503
+ * @description The appended flow lifecycle log — where per-step history lives (a flow run
462
504
  * carries none). Ordered by the hash chain's `seq`, which is the only total
463
505
  * order the log has. Same visibility rule as `/runtime/flows/instances`:
464
506
  * owner-scoped unless the caller holds `view_flows`, applied independently
@@ -527,11 +569,12 @@ export interface paths {
527
569
  head?: never;
528
570
  /**
529
571
  * Resolve a flow callback
530
- * @description **Public endpoint.** The `id` is the opaque capability token supplied
531
- * to the external system at flow registration; no JWT is required.
572
+ * @description Resolve a pending callback with `{action: "complete", payload}` or
573
+ * `{action: "fail", reason?}`. Answers the resolved `FlowCallback` in the
574
+ * canonical envelope.
532
575
  *
533
- * Returns a **flat** `{success, message?}` ack (no `data`, NOT
534
- * envelope-wrapped) — the SDK returns it whole (codegen-unwrap: no-unwrap).
576
+ * Requires authentication like every other operation here: a call without a
577
+ * token is refused `401`.
535
578
  */
536
579
  patch: operations["resolveFlowCallback"];
537
580
  trace?: never;
@@ -543,10 +586,18 @@ export interface paths {
543
586
  path?: never;
544
587
  cookie?: never;
545
588
  };
546
- /** List webhook subscriptions */
589
+ /**
590
+ * List webhook subscriptions
591
+ * @description THE SIGNING KEY IS NEVER RETURNED. Every read on this surface — this list, the item GET, the create and patch responses, and the delete response — answers `has_secret` (a boolean) and `header_names` (the configured header NAMES) in place of `secret` and `headers`.
592
+ * `secret` is the HMAC key Zarel signs `X-Webhook-Signature` with, so a receiver verifying that header is verifying "this came from Zarel". `manage_webhooks` gates who may SET it; no response returns it. Header VALUES are withheld with it: they are tenant-supplied and a receiver-side bearer token is a plausible thing to find in one.
593
+ * The key is masked rather than the reads gated: reads stay open to every authenticated actor in the tenant, and there is simply nothing secret left in them.
594
+ */
547
595
  get: operations["listEventSubscriptions"];
548
596
  put?: never;
549
- /** Create a webhook subscription */
597
+ /**
598
+ * Create a webhook subscription
599
+ * @description Answers `has_secret` and `header_names` in place of `secret` and `headers`, like every read on this surface — see `listEventSubscriptions` for why. The signing key is accepted on the way IN and never returned on the way out.
600
+ */
550
601
  post: operations["createEventSubscription"];
551
602
  delete?: never;
552
603
  options?: never;
@@ -563,15 +614,24 @@ export interface paths {
563
614
  };
564
615
  cookie?: never;
565
616
  };
566
- /** Get a subscription */
617
+ /**
618
+ * Get a subscription
619
+ * @description Answers `has_secret` and `header_names` in place of `secret` and `headers`, like every read on this surface — see `listEventSubscriptions` for why. The signing key is accepted on the way IN and never returned on the way out.
620
+ */
567
621
  get: operations["getEventSubscription"];
568
622
  put?: never;
569
623
  post?: never;
570
- /** Deactivate a subscription */
624
+ /**
625
+ * Deactivate a subscription
626
+ * @description Deactivates the subscription and answers its `id` and nothing else. The stored subscription — signing key and header values included — is not returned.
627
+ */
571
628
  delete: operations["deactivateEventSubscription"];
572
629
  options?: never;
573
630
  head?: never;
574
- /** Merge-patch a subscription */
631
+ /**
632
+ * Merge-patch a subscription
633
+ * @description Answers `has_secret` and `header_names` in place of `secret` and `headers`, like every read on this surface — see `listEventSubscriptions` for why. The signing key is accepted on the way IN and never returned on the way out.
634
+ */
575
635
  patch: operations["patchEventSubscription"];
576
636
  trace?: never;
577
637
  };
@@ -622,26 +682,32 @@ export interface paths {
622
682
  get: operations["listConversationSessions"];
623
683
  put?: never;
624
684
  /**
625
- * Create a conversation session (no lazy creation per FR-C07)
626
- * @description Body: `{ channel_name, roles_snapshot[], scope, llm_service?, user_name?, metadata? }`.
685
+ * Create a conversation session (no lazy creation)
686
+ * @description The body is `ConversationSessionCreateBody`.
627
687
  *
628
688
  * The SERVER assigns `session_key` and returns it on the response. A body
629
- * that CARRIES one is refused `400` — a client-chosen key was guessable,
630
- * squattable by another tenant user, and an existence oracle. This block
631
- * documented `session_key` as a request field, so an integrator following
632
- * it wrote a client that was 400'd on every call; the SDK did exactly that
633
- * until the two halves were reconciled.
689
+ * that CARRIES one is refused `400` — a client-chosen key would be guessable,
690
+ * squattable by another tenant user, and an existence oracle.
634
691
  *
635
- * Precondition enforced (FR-C09, operations gate relaxed by ADR-0112):
692
+ * Precondition enforced:
636
693
  * the actor must have ≥1 authorized `use` policy on some service in
637
694
  * `scope` — governed conversation is itself the value, so no entity/flow
638
- * operation is required. Possible 4xx codes: `INVALID_SCOPE` (400 — also
639
- * returned for any other malformed body, including one carrying
640
- * `session_key`), `SESSION_USER_MISMATCH` (403),
695
+ * operation is required.
696
+ *
697
+ * THE 400 CODE NAMES THE FIELD THAT WAS REFUSED:
698
+ *
699
+ * - `INVALID_SCOPE`, `INVALID_CHANNEL_NAME`, `INVALID_ROLES_SNAPSHOT`,
700
+ * `INVALID_LLM_SERVICE`, `INVALID_USER_NAME`, `INVALID_METADATA` (400)
701
+ * — one per declared field.
702
+ * - `INVALID_BODY` (400): the body is not a JSON object, or carries a key
703
+ * the schema does not declare.
704
+ * - `SESSION_KEY_NOT_ACCEPTED` (400): the body carries a `session_key`.
705
+ *
706
+ * The other 4xx codes: `SESSION_USER_MISMATCH` (403),
641
707
  * `SESSION_CHANNEL_MISMATCH` (403), `LLM_SERVICE_UNAUTHORIZED` (403),
642
- * `NO_AUTHORIZED_LLM_SERVICE_FOR_SCOPE` (403), `UNKNOWN_LLM_SERVICE`
708
+ * `NO_AUTHORIZED_LLM_SERVICE` (403), `UNKNOWN_LLM_SERVICE`
643
709
  * (404). `SESSION_KEY_CONFLICT` (409) is retained but unreachable short of
644
- * a UUID collision, since the caller no longer chooses the key.
710
+ * a UUID collision, since the caller does not choose the key.
645
711
  */
646
712
  post: operations["createConversationSession"];
647
713
  delete?: never;
@@ -761,10 +827,10 @@ export interface paths {
761
827
  put?: never;
762
828
  /**
763
829
  * Recompute derived fields for every record of an entity
764
- * @description Rewrites the computed fields of every `runtime.records` row of the
765
- * entity. ADR-0098 D9: this operates on RUNTIME state, so it lives on the
766
- * runtime plane alongside the MCP `recompute_entity` tool, which shares its
767
- * implementation and its authority (the `entities` contract section).
830
+ * @description Rewrites the computed fields of every record of the
831
+ * entity. It operates on runtime state, so it belongs to the runtime API,
832
+ * alongside the MCP `recompute_entity` tool, which has the same authority
833
+ * (the `entities` contract section).
768
834
  */
769
835
  post: operations["recomputeEntity"];
770
836
  delete?: never;
@@ -784,16 +850,16 @@ export interface paths {
784
850
  put?: never;
785
851
  /**
786
852
  * Verify a channel binding
787
- * @description ADR-0141 FR-031. Flips a channel binding from `unverified` to `verified` —
853
+ * @description Flips a channel binding from `unverified` to `verified` —
788
854
  * the elevation signal channel-binding resolution reads.
789
855
  *
790
856
  * Authorized by the `verify_channel_binding` runtime SYSTEM ACTION, and by
791
857
  * nothing else: the caller needs no `update` grant on
792
858
  * `records/channel_identities`. That is the point of the operation. The
793
- * binding entity is the product's declaration, so the tenant cannot extend it
794
- * with the role-gated transition it used to supply; verification was
795
- * previously a PATCH authorized by the generic entity `update` grant — the
796
- * same grant that reaches `user_name`, the field that decides who someone is.
859
+ * binding entity is declared by the product, not by the tenant's contract,
860
+ * so the tenant cannot add a role-gated transition to it; and the generic
861
+ * entity `update` grant also reaches `user_name`, the field that decides
862
+ * who someone is.
797
863
  *
798
864
  * Only the three verification fields are written. The request body may carry
799
865
  * `verification_method` (a free-form string recording HOW the binding was
@@ -818,9 +884,9 @@ export interface paths {
818
884
  put?: never;
819
885
  /**
820
886
  * Assign a role to a user
821
- * @description ADR-0102 S4 (FR-016): owner-marked roles (the plan envelope) are
887
+ * @description Owner-marked roles (the plan envelope) are
822
888
  * platform-managed — assigning a user to one is rejected. The assigned
823
- * user must exist as a live `users` record (DB user-existence trigger).
889
+ * user must exist as a live `users` record.
824
890
  */
825
891
  post: operations["createRoleAssignment"];
826
892
  delete?: never;
@@ -844,7 +910,7 @@ export interface paths {
844
910
  post?: never;
845
911
  /**
846
912
  * Revoke a role from a user
847
- * @description ADR-0102 S4 (FR-016): revoking an owner-marked assignment would
913
+ * @description Revoking an owner-marked assignment would
848
914
  * destroy the tenant's envelope anchor — rejected.
849
915
  */
850
916
  delete: operations["deleteRoleAssignment"];
@@ -864,25 +930,52 @@ export interface paths {
864
930
  put?: never;
865
931
  /**
866
932
  * Send a natural-language message to the cognitive agent
867
- * @description Service endpoint — not CRUD-derivable. The LLM orchestrator compiles
868
- * an intent, validates it against the tenant contract, and executes it
933
+ * @description Service endpoint — not CRUD-derivable. The LLM proposes an intent; the
934
+ * server validates it against the tenant contract and executes it
869
935
  * via MCP tools.
870
936
  *
871
- * SpecKit 010 / ADR-0087:
872
- * - Sessions are no longer lazily created — `session_key` MUST refer
873
- * to a session previously created via `POST /runtime/conversation/sessions`
874
- * (FR-C07). Unknown keys return `SESSION_NOT_FOUND` (404).
937
+ * Sessions and services:
938
+ * - Sessions are not created lazily — `session_key` MUST refer
939
+ * to a session previously created via `POST /runtime/conversation/sessions`.
940
+ * Unknown keys return `SESSION_NOT_FOUND` (404).
875
941
  * - Optional `llm_service` overrides the session's pinned service for
876
- * this turn (FR-C04). Must be authorized for the actor in the
942
+ * this turn. Must be authorized for the actor in the
877
943
  * session's scope.
878
944
  * - Possible error codes:
879
945
  * - `SESSION_NOT_FOUND` (404): unknown `session_key`.
946
+ * - `UNKNOWN_LLM_SERVICE` (404): `llm_service` names a service the
947
+ * tenant's catalog does not carry.
880
948
  * - `LLM_SERVICE_UNAUTHORIZED` (403): actor lacks `use` on the
881
949
  * requested service in the session's scope.
882
- * - `INTENT_OUT_OF_SCOPE` (422): the LLM emitted an intent
883
- * outside the session's scope partition (FR-H06 backstop).
950
+ * - `SESSION_PINNED_SERVICE_UNAUTHORIZED` (403): the session's
951
+ * pinned service is no longer authorized for the actor, or has
952
+ * left the catalog. The turn is refused rather than silently
953
+ * swapped to another service.
954
+ * - `INTENT_OUT_OF_SCOPE`: the LLM emitted an intent outside the
955
+ * session's scope partition (a backstop check). NOT an HTTP status
956
+ * — this one arrives as a `200` turn body with `success: false`
957
+ * and `error` naming it, because the turn happened and its
958
+ * OUTCOME is the refusal.
884
959
  * - `NO_CREDENTIAL_CONFIGURED` (412): the resolved service has
885
960
  * no credential configured.
961
+ * - `CREDENTIAL_UNREADABLE` (412): the resolved service HAS a
962
+ * stored credential and it cannot be parsed. A different
963
+ * action from the one above — re-set a corrupt credential
964
+ * rather than create a missing one.
965
+ * - `PROVIDER_NOT_ALLOWED` (403): the resolved service's provider
966
+ * is outside the tenant's plan bounds.
967
+ * - `NO_AUTHORIZED_LLM_SERVICE` (403): the actor holds `use` on
968
+ * nothing in the session's scope. The default (unpinned) path
969
+ * reports the FIRST authorized candidate's own failure, so this
970
+ * code is never used for a missing credential or an out-of-bounds
971
+ * provider.
972
+ * - `CONVERSATION_TURN_LIMIT` (429): the per-role turn cap for this
973
+ * session or day is reached.
974
+ * - `CONVERSATION_TOKEN_LIMIT` (429): the per-role token ceiling is
975
+ * reached — per-session, per-actor-day or per-role-day.
976
+ * A channel party is not a separate case: it is counted by these
977
+ * same two limits, under its party identity.
978
+ * - `BAD_REQUEST` (400): the body failed its schema.
886
979
  */
887
980
  post: operations["runtimeConversationSend"];
888
981
  delete?: never;
@@ -902,21 +995,21 @@ export interface paths {
902
995
  put?: never;
903
996
  /**
904
997
  * Mint a short-TTL anonymous party token (channel-ops)
905
- * @description Service endpoint (ADR-0133 §B.4 / decision 5). One of the FOUR
998
+ * @description Service endpoint. One of the FOUR
906
999
  * channel-ops routes, and the ONLY routes that accept a `channel`-class
907
1000
  * ingress credential (`token_class='channel'`). The asymmetry is
908
- * enforced by the class-aware pipeline: a tenant token is rejected here,
1001
+ * enforced both ways: a tenant token is rejected here,
909
1002
  * and a channel credential is rejected on every other runtime route.
910
1003
  *
911
1004
  * The channel is taken from the CREDENTIAL, never from the body — a
912
1005
  * gateway can only ever mint into its own channel. The body is strict:
913
1006
  * `{ party_ref }` and nothing else. Any role/privilege claim alongside
914
1007
  * `party_ref` fails validation before the mint and returns 422
915
- * `MINT_CLAIM_REJECTED` (QI-003) — a channel names a party, it never
1008
+ * `MINT_CLAIM_REJECTED` — a channel names a party, it never
916
1009
  * grants that party authority.
917
1010
  *
918
1011
  * The response is a **bare** body (no `{success,data}` envelope); the
919
- * SDK returns it whole (codegen-unwrap: no-unwrap).
1012
+ * SDK returns it whole.
920
1013
  */
921
1014
  post: operations["runtimeChannelsMint"];
922
1015
  delete?: never;
@@ -934,13 +1027,13 @@ export interface paths {
934
1027
  };
935
1028
  /**
936
1029
  * SSE liveness stream of new egress directives (channel-ops)
937
- * @description Service endpoint (ADR-0133 §B.4 / decision 5) — the `subscribe`
1030
+ * @description Service endpoint — the `subscribe`
938
1031
  * capability. Channel-ops route: `channel`-class credential only.
939
1032
  *
940
1033
  * The stream is server-side filtered to the credential's OWN
941
1034
  * `(tenant, channel)`: a subscriber never observes another channel's
942
- * directive metadata (QI-006). Notification transport ONLY — durability
943
- * is the outbox + sweep, so a missed frame is never a lost directive.
1035
+ * directive metadata. Notification transport ONLY — directive durability
1036
+ * does not depend on the stream, so a missed frame is never a lost directive.
944
1037
  *
945
1038
  * The wire is a `text/event-stream` carrying `channel.directive_created`
946
1039
  * frames whose `data` is `{directive_id}` — an id, never content. The
@@ -963,14 +1056,14 @@ export interface paths {
963
1056
  query?: never;
964
1057
  header?: never;
965
1058
  path: {
966
- /** @description Egress directive id (ADR-0133 §B.4) */
1059
+ /** @description Egress directive id */
967
1060
  id: components["parameters"]["ChannelDirectiveIdPath"];
968
1061
  };
969
1062
  cookie?: never;
970
1063
  };
971
1064
  /**
972
1065
  * Fetch (= claim) an egress directive and its content (channel-ops)
973
- * @description Service endpoint (ADR-0133 §B.4 / decision 5) — the `fetch` capability.
1066
+ * @description Service endpoint — the `fetch` capability.
974
1067
  * Channel-ops route: `channel`-class credential only.
975
1068
  *
976
1069
  * **fetch = claim**: this single call takes the delivery lease AND
@@ -980,9 +1073,9 @@ export interface paths {
980
1073
  * (its stable lease identity) and expires after a bounded TTL, so a dead
981
1074
  * adapter cannot strand a directive.
982
1075
  *
983
- * A directive addressed to another channel is 403 — never readable
984
- * (QI-006). The response is a **bare** body (no `{success,data}`
985
- * envelope); the SDK returns it whole (codegen-unwrap: no-unwrap).
1076
+ * A directive addressed to another channel is 403 — never readable.
1077
+ * The response is a **bare** body (no `{success,data}`
1078
+ * envelope); the SDK returns it whole.
986
1079
  */
987
1080
  get: operations["runtimeChannelsFetch"];
988
1081
  put?: never;
@@ -998,7 +1091,7 @@ export interface paths {
998
1091
  query?: never;
999
1092
  header?: never;
1000
1093
  path: {
1001
- /** @description Egress directive id (ADR-0133 §B.4) */
1094
+ /** @description Egress directive id */
1002
1095
  id: components["parameters"]["ChannelDirectiveIdPath"];
1003
1096
  };
1004
1097
  cookie?: never;
@@ -1007,23 +1100,23 @@ export interface paths {
1007
1100
  put?: never;
1008
1101
  /**
1009
1102
  * Report (= ack) the terminal send result of a directive (channel-ops)
1010
- * @description Service endpoint (ADR-0133 §B.4 / decision 5) — the `report`
1103
+ * @description Service endpoint — the `report`
1011
1104
  * capability. Channel-ops route: `channel`-class credential only.
1012
1105
  *
1013
1106
  * **report = ack**: the terminal transition plus the lease release.
1014
1107
  * Idempotent under redelivery — re-reporting an already-terminal
1015
- * directive returns its existing status unchanged (QI-005b).
1108
+ * directive returns its existing status unchanged.
1016
1109
  *
1017
- * A terminal report also appends the `channel.egress` boundary row to
1018
- * the `channels` hash chain (ADR-0133 §B.7 / FR-E01), metadata-only.
1019
- * `provider_message_id` MUST already be hashed by the adapter
1020
- * (FR-E03): an address-shaped value is refused by the audit schema
1021
- * (QI-001) and the row is skipped rather than leaking an address.
1110
+ * A terminal report also appends a `channel.egress` boundary entry to
1111
+ * the `channels` hash chain, metadata-only.
1112
+ * `provider_message_id` MUST already be hashed by the adapter:
1113
+ * an address-shaped value is refused by the audit schema
1114
+ * and the entry is skipped rather than leaking an address.
1022
1115
  *
1023
- * A directive belonging to another channel is 403 (QI-006); a lost lease
1116
+ * A directive belonging to another channel is 403; a lost lease
1024
1117
  * is 409, so the adapter aborts rather than assuming success. The
1025
1118
  * response is a **bare** body (no `{success,data}` envelope); the SDK
1026
- * returns it whole (codegen-unwrap: no-unwrap).
1119
+ * returns it whole.
1027
1120
  */
1028
1121
  post: operations["runtimeChannelsReport"];
1029
1122
  delete?: never;
@@ -1050,7 +1143,6 @@ export interface paths {
1050
1143
  * - resolve_{entity}_{field}_transition_request
1051
1144
  * - list_{entity}_{field}_pending_transition_requests
1052
1145
  * Structured per-trio metadata lives in `UserToolCatalog.transitions`.
1053
- * See ADR-0081.
1054
1146
  */
1055
1147
  get: operations["runtimeToolsList"];
1056
1148
  put?: never;
@@ -1069,16 +1161,16 @@ export interface paths {
1069
1161
  cookie?: never;
1070
1162
  };
1071
1163
  /**
1072
- * Effective authorizations of the authenticated actor (ADR-0102 §6, S3b)
1164
+ * Effective authorizations of the authenticated actor
1073
1165
  * @description Self-scoped introspection: returns what the authorization engine
1074
1166
  * actually decides for the CALLING actor — assigned roles (+ implicit
1075
1167
  * `self`), the contract sections they can manage (`update` policies),
1076
1168
  * the runtime system actions they hold (e.g. `view_traces`,
1077
1169
  * `manage_role_assignments`), and per-entity record permissions (actions +
1078
1170
  * per-action field restrictions; `null` = all fields). Derived by the
1079
- * same canonical resolvers the enforcement paths use, so the response
1080
- * can never drift from enforcement. There is NO actor parameter —
1081
- * identity comes exclusively from the verified token.
1171
+ * per-action field restrictions; `null` = all fields). Computed by the
1172
+ * same logic that enforces authorization, so the response can never
1173
+ * drift from enforcement. There is NO actor parameter —
1082
1174
  */
1083
1175
  get: operations["runtimeEffectiveAuthorizations"];
1084
1176
  put?: never;
@@ -1104,10 +1196,8 @@ export interface paths {
1104
1196
  * JSON-RPC message; the server replies either application/json or a
1105
1197
  * text/event-stream (its choice per request). Authenticated by the same
1106
1198
  * runtime tenant JWT as the REST API (aud='runtime-api',
1107
- * token_class='tenant'), bound to the {tenant}.zarel.local subdomain
1108
- * (canon §10.4 / ADR-0041). Spec-1 (mcp runtime-plane exposure) replaced
1109
- * the fictional GET /runtime/mcp/stream SSE path with this POST transport
1110
- * served by mcp-server-http.
1199
+ * token_class='tenant'), bound to the {tenant}.zarel.ai subdomain.
1200
+ * There is no GET /runtime/mcp/stream SSE path.
1111
1201
  */
1112
1202
  post: operations["runtimeMcp"];
1113
1203
  delete?: never;
@@ -1127,10 +1217,8 @@ export interface paths {
1127
1217
  * List MCP tools accessible to the authenticated tenant
1128
1218
  * @description Returns the MCP-layer `McpToolDefinition` list filtered to the tools
1129
1219
  * the user can see. Dynamic state-machine trio entries appear as
1130
- * first-class peers to entity-CRUD tools (ADR-0081). Transition tools
1131
- * are emitted dynamically from the contract per-(entity, field); the
1132
- * legacy closed set of three generic transition tools is removed (see
1133
- * CHANGELOG for the transition).
1220
+ * first-class peers to entity-CRUD tools. Transition tools
1221
+ * are emitted dynamically from the contract per-(entity, field).
1134
1222
  */
1135
1223
  get: operations["runtimeToolsMcpList"];
1136
1224
  put?: never;
@@ -1201,17 +1289,15 @@ export interface paths {
1201
1289
  };
1202
1290
  /**
1203
1291
  * List API keys (masked metadata)
1204
- * @description Bounded fidelity declaration (see `createApiKey`). Returns a **bare**
1205
- * array of masked key metadata — the SDK returns it whole (no-unwrap).
1292
+ * @description Returns a **bare** array of masked key metadata — the SDK returns it
1293
+ * whole.
1206
1294
  */
1207
1295
  get: operations["listApiKeys"];
1208
1296
  put?: never;
1209
1297
  /**
1210
1298
  * Create an API key
1211
- * @description Bounded fidelity declaration for the three `/api-keys` endpoints the SDK
1212
- * already calls (ADR-0109 codegen-unwrap follow-up) — NOT the broader
1213
- * ADR-0072 `/api-keys` redesign. The response is a **bare** body carrying
1214
- * the one-time plaintext `key`; the SDK returns it whole (no-unwrap).
1299
+ * @description The response is a **bare** body carrying
1300
+ * the one-time plaintext `key`; the SDK returns it whole.
1215
1301
  */
1216
1302
  post: operations["createApiKey"];
1217
1303
  delete?: never;
@@ -1234,9 +1320,8 @@ export interface paths {
1234
1320
  post?: never;
1235
1321
  /**
1236
1322
  * Revoke an API key
1237
- * @description Bounded fidelity declaration (see `createApiKey`). Returns a **flat**
1238
- * `{success:true}` ack (no `data`, not envelope-wrapped) — the SDK returns
1239
- * it whole (no-unwrap).
1323
+ * @description Returns a **flat** `{success:true}` ack (no `data`, not
1324
+ * envelope-wrapped) — the SDK returns it whole.
1240
1325
  */
1241
1326
  delete: operations["deleteApiKey"];
1242
1327
  options?: never;
@@ -1255,9 +1340,8 @@ export interface paths {
1255
1340
  put?: never;
1256
1341
  /**
1257
1342
  * Replay a state-machine instance against a new configuration
1258
- * @description Service endpoint (spec-051 US4 — moved from the legacy
1259
- * `/workflows/replay`). The handler delegates to the MCP
1260
- * `replay_workflow` tool and unwraps its JSON envelope.
1343
+ * @description Service endpoint. Runs the MCP `replay_workflow` tool and answers
1344
+ * its result in the standard envelope.
1261
1345
  */
1262
1346
  post: operations["runtimeStateMachineReplay"];
1263
1347
  delete?: never;
@@ -1304,24 +1388,24 @@ export interface paths {
1304
1388
  cookie?: never;
1305
1389
  };
1306
1390
  /**
1307
- * Full chronology of one agent dispatch (Spec-020 US1)
1391
+ * Full chronology of one agent dispatch
1308
1392
  * @description Returns the trace header (tenant, session, deployed spec version +
1309
1393
  * hash, actor, flow, started_at, duration, outcome) plus the ordered
1310
1394
  * `events[]` covering the eight pipeline stages: `topic_gate`,
1311
1395
  * `intent_scoring`, `envelope`, `gatekeeper`, `preconditions`,
1312
1396
  * `hitl`, `execution`, `audit`.
1313
1397
  *
1314
- * ADR-0127 (US4) — the `gatekeeper` and `preconditions` events are emitted
1315
- * from the deterministic write floor's REAL recorded verdict (`allowed` /
1398
+ * The `gatekeeper` and `preconditions` events are emitted
1399
+ * from the server's REAL recorded verdict (`allowed` /
1316
1400
  * `denied` / `requires_confirmation`, with the typed reason and any failed
1317
1401
  * preconditions), not inferred from the terminal outcome.
1318
1402
  *
1319
- * Authorization (FR-006, originator gate): a trace is visible to its
1403
+ * Authorization (originator gate): a trace is visible to its
1320
1404
  * originator and to superusers; everyone else gets `404
1321
1405
  * trace_not_found` indistinguishable from a genuine miss.
1322
1406
  *
1323
- * Pre-feature traces (FR-007): sessions originated before spec-020
1324
- * deployment have no `trace_id` and return `404
1407
+ * Pre-feature traces: sessions originated before tracing was
1408
+ * deployed have no `trace_id` and return `404
1325
1409
  * legacy_trace_not_available`. There is no retroactive backfill.
1326
1410
  */
1327
1411
  get: operations["getTrace"];
@@ -1341,19 +1425,15 @@ export interface paths {
1341
1425
  cookie?: never;
1342
1426
  };
1343
1427
  /**
1344
- * Paginated trace summary list (Spec-020 US1)
1428
+ * Paginated trace summary list
1345
1429
  * @description Filters: `flow`, `user`, `from`, `to`, `outcome`, `limit` (default
1346
1430
  * 50, max 500), `cursor`. Returns `{ traces: TraceSummary[],
1347
1431
  * next_cursor: string | null }`.
1348
1432
  *
1349
1433
  * Visibility is applied where the page is CHOSEN, not after it: the
1350
- * originator restriction runs in the query, before `LIMIT`, so every
1351
- * row of a page is a row the caller may see and `next_cursor` — which
1352
- * anchors on the last row — has nothing to disclose. (This
1353
- * description previously said the cursor anchors at the last DB row
1354
- * "visible or not". That was accurate about the old behaviour and
1355
- * the old behaviour handed one caller another caller's `trace_id`
1356
- * and `started_at` in cleartext.)
1434
+ * originator restriction is applied before the page limit, so every
1435
+ * trace in a page is one the caller may see and `next_cursor` — which
1436
+ * anchors on the page's last trace — has nothing to disclose.
1357
1437
  *
1358
1438
  * `duration_basis` says WHICH WINDOW each timing field was measured
1359
1439
  * over, because this endpoint and `GET /runtime/traces/{trace_id}`
@@ -1396,7 +1476,7 @@ export interface paths {
1396
1476
  * Re-run deterministic governance stages against the proposed spec
1397
1477
  * @description Body: `{ against_current_spec?: boolean }`. Returns side-by-side
1398
1478
  * comparison of original vs replayed stages with `deterministic_match`
1399
- * boolean and `stages_diverged[]`. The originator gate (FR-006)
1479
+ * boolean and `stages_diverged[]`. The originator gate
1400
1480
  * applies — replay leaks the trace's content, so the same
1401
1481
  * visibility rule that governs the trace fetch route applies here.
1402
1482
  */
@@ -1419,13 +1499,13 @@ export interface paths {
1419
1499
  /**
1420
1500
  * Download a signed evidence bundle (.tar.gz)
1421
1501
  * @description Streams the bundle as `application/gzip` with attachment
1422
- * `Content-Disposition`. Contents per ADR-0090: `README.md`,
1502
+ * `Content-Disposition`. Contents: `README.md`,
1423
1503
  * `trace.json`, `trace.pdf`, `spec/{deployed_at_execution.yaml,.hash}`,
1424
1504
  * `entities_snapshot.json`, `replay_attestation.json`, `manifest.sig`
1425
1505
  * (Ed25519 over the canonical JSON of `manifest.json` per RFC 8785).
1426
1506
  *
1427
1507
  * Soft cap 50 MB / hard cap 200 MB after compression. Past the hard
1428
- * cap returns `error.code = bundle_too_large` (FR-035a). Originator
1508
+ * cap returns `error.code = bundle_too_large`. Originator
1429
1509
  * gate enforced same as trace fetch.
1430
1510
  */
1431
1511
  get: operations["getTraceBundle"];
@@ -1449,26 +1529,26 @@ export interface paths {
1449
1529
  };
1450
1530
  /**
1451
1531
  * Download a signed audit tamper-evidence bundle (.tar.gz)
1452
- * @description ADR-0108. Streams a self-contained, offline-verifiable evidence bundle
1532
+ * @description Streams a self-contained, offline-verifiable evidence bundle
1453
1533
  * for the tenant's `{log}` cryptographic hash-chain as `application/gzip`
1454
1534
  * with attachment `Content-Disposition`. Contents: `events.json` (the RAW
1455
- * event content + chain columns `seq`/`prev_hash`/`event_hash`, so the
1535
+ * event content + chain fields `seq`/`prev_hash`/`event_hash`, so the
1456
1536
  * verifier recomputes the canonical bytes itself), `checkpoints.json` (the
1457
- * covering Ed25519-signed checkpoints), `anchors.json` (ADR-0115: external
1537
+ * covering Ed25519-signed checkpoints), `anchors.json` (external
1458
1538
  * RFC 3161 TSA anchors over the checkpoints' Merkle roots + this tenant's
1459
1539
  * inclusion paths — present only for already-anchored windows; absent
1460
1540
  * windows verify as the un-anchored tail), `README.md`, `manifest.json` +
1461
1541
  * `manifest.sig` (Ed25519 over the canonical JSON of the manifest, which
1462
- * hashes every file incl. `anchors.json`, ADR-0090). Verify offline with
1542
+ * hashes every file incl. `anchors.json`). Verify offline with
1463
1543
  * `zarel verify <bundle> --keys <trust-keys.json>` (add `--tsa-roots
1464
- * <pinned.pem>` to also verify external anchoring, ADR-0115).
1544
+ * <pinned.pem>` to also verify external anchoring).
1465
1545
  *
1466
1546
  * Authorization: gated by the `view_traces` runtime-system action (an
1467
1547
  * evidence bundle exposes the full event content for the tenant, same as
1468
1548
  * the trace bundle). An unauthorized actor receives an opaque 404. Tenant
1469
1549
  * is taken from the verified JWT, never the path.
1470
1550
  *
1471
- * Bounded read (ADR-0108 follow-up): the optional `from`/`to` query
1551
+ * Bounded read: the optional `from`/`to` query
1472
1552
  * parameters restrict the export to an inclusive `seq` range. A request
1473
1553
  * whose selected range exceeds the per-bundle event cap is refused with
1474
1554
  * `413` — narrow it via `from`/`to`. For a partial range, only checkpoints
@@ -1488,17 +1568,17 @@ export interface paths {
1488
1568
  query?: never;
1489
1569
  header?: never;
1490
1570
  path: {
1491
- /** @description The audit row-table to list. */
1571
+ /** @description The audit log to list. */
1492
1572
  log: "binding_violations" | "topic_refusals";
1493
1573
  };
1494
1574
  cookie?: never;
1495
1575
  };
1496
1576
  /**
1497
- * Paginated, filterable listing of a privacy-preserving audit row-table (GTM M1)
1498
- * @description Lists rows of the tenant's `{log}` audit table — `binding_violations`
1499
- * (ADR-0106 Amendment A1, blocked field-binding parameter-injection
1500
- * attempts) or `topic_refusals` (ADR-0107, blocked regulatory-boundary
1501
- * refusals). Each row exposes only a non-reversible SHA-256 hash + a
1577
+ * Paginated, filterable listing of a privacy-preserving audit log
1578
+ * @description Lists entries of the tenant's `{log}` audit log — `binding_violations`
1579
+ * (blocked field-binding parameter-injection
1580
+ * attempts) or `topic_refusals` (blocked regulatory-boundary
1581
+ * refusals). Each entry exposes only a non-reversible SHA-256 hash + a
1502
1582
  * deterministic PII-mask of the offending value — NEVER the raw value (it
1503
1583
  * is never stored). Newest-first, cursor-paginated. Response body (inside
1504
1584
  * the success envelope): `{ items: <row>[], next_cursor: string | null }`
@@ -1509,9 +1589,9 @@ export interface paths {
1509
1589
  * Authorization + known-log are checked BEFORE filter validation, so an
1510
1590
  * unauthorized actor OR an unknown log receives an opaque `404` — even with
1511
1591
  * a malformed filter — and cannot probe filter validity. There is no
1512
- * per-row originator gate: any holder of `view_traces` sees all tenant
1513
- * rows. Tenant is taken from the verified JWT, never the path. Distinct
1514
- * from `/runtime/audit/{log}/evidence` (ADR-0108), whose `{log}` is the
1592
+ * per-entry originator gate: any holder of `view_traces` sees all tenant
1593
+ * entries. Tenant is taken from the verified JWT, never the path. Distinct
1594
+ * from `/runtime/audit/{log}/evidence`, whose `{log}` is the
1515
1595
  * event hash-chains `state_machine | flows`.
1516
1596
  */
1517
1597
  get: operations["listAuditLog"];
@@ -1531,7 +1611,7 @@ export interface paths {
1531
1611
  cookie?: never;
1532
1612
  };
1533
1613
  /**
1534
- * Public Ed25519 trust-keys manifest (ADR-0090)
1614
+ * Public Ed25519 trust-keys manifest
1535
1615
  * @description Public, unauthenticated endpoint listing every bundle-signing
1536
1616
  * public key (current + archived) keyed by `kid`. Standalone
1537
1617
  * verifiers (`zarel verify <bundle>`) resolve the bundle's `kid` →
@@ -1594,10 +1674,10 @@ export interface paths {
1594
1674
  cookie?: never;
1595
1675
  };
1596
1676
  /**
1597
- * List the authenticated end-user's own governance receipts (Desk Spec 3)
1677
+ * List the authenticated end-user's own governance receipts
1598
1678
  * @description Lists the CALLER'S OWN governance receipts — normalized over the three
1599
- * audit signals: topic refusals (ADR-0107), binding violations (ADR-0106
1600
- * A1), and validation violations (ADR-0111). Each receipt is a discriminated
1679
+ * audit signals: topic refusals, binding violations,
1680
+ * and validation violations. Each receipt is a discriminated
1601
1681
  * union by `signal` carrying a composite id (`<signal>:<uuid>`), the request
1602
1682
  * correlation `trace_id`, a non-reversible `proof` (hash + masked value +
1603
1683
  * contract version, per signal), and a per-signal `detail`. NEVER the raw
@@ -1622,8 +1702,475 @@ export interface paths {
1622
1702
  export type webhooks = Record<string, never>;
1623
1703
  export interface components {
1624
1704
  schemas: {
1705
+ /** @description Body of the governed action-dispatch surface. */
1706
+ ActionDispatchBody: {
1707
+ /**
1708
+ * @description Required for read/update/delete verbs; null/omitted for create/list
1709
+ * (entity-level). Must be a POSITIVE integer or its decimal string;
1710
+ * otherwise the request is refused `400 record_id_required` naming the field.
1711
+ */
1712
+ record_id?: number | string | null;
1713
+ /**
1714
+ * @description Forwarded to the underlying entity intent. Open because its keys are
1715
+ * the target entity's fields, declared by the tenant contract and
1716
+ * judged there — not by this document.
1717
+ */
1718
+ payload?: {
1719
+ [key: string]: unknown;
1720
+ };
1721
+ /**
1722
+ * @description Accepted for wire compatibility; server-side deduplication is not yet
1723
+ * implemented, so the key currently has no effect.
1724
+ */
1725
+ idempotency_key?: string;
1726
+ /**
1727
+ * @description An operator note, as sent by `@zarel-ai/react`'s action-confirm
1728
+ * dialog and by the SDK's `client.actions.dispatch`. The server
1729
+ * currently ignores it; it is declared so that a request carrying a
1730
+ * note is accepted rather than refused with a 400.
1731
+ */
1732
+ notes?: string;
1733
+ };
1734
+ /**
1735
+ * @description Envelope of the bulk record import. The envelope is closed; each item's
1736
+ * `data` is not, for the same reason `RuntimeRecordCreateBody` is not.
1737
+ */
1738
+ BulkImportBody: {
1739
+ items: {
1740
+ /** @description One record's fields, judged against the tenant contract for the path entity. */
1741
+ data: {
1742
+ [key: string]: unknown;
1743
+ };
1744
+ /**
1745
+ * @description Attribution for the created record. A non-string value here
1746
+ * is refused.
1747
+ */
1748
+ owner_name?: string;
1749
+ }[];
1750
+ /**
1751
+ * @description Omitted means `strict`.
1752
+ * @enum {string}
1753
+ */
1754
+ mode?: "strict" | "best_effort";
1755
+ };
1756
+ /**
1757
+ * @description The record's fields. THE KEY SET IS NOT FIXED BY THIS DOCUMENT and cannot
1758
+ * be: it is the field list the tenant's published contract declares for
1759
+ * `{entity_name}`, and both the keys and the values are validated against that
1760
+ * contract. That is why this schema is deliberately open.
1761
+ */
1762
+ RuntimeRecordCreateBody: {
1763
+ [key: string]: unknown;
1764
+ };
1765
+ /**
1766
+ * @description The fields to change, merged onto the stored record. Open for the same
1767
+ * reason as `RuntimeRecordCreateBody`, and distinct from it because a patch
1768
+ * requires nothing: a create's required fields come from the contract, a
1769
+ * patch's from the merge base.
1770
+ */
1771
+ RuntimeRecordPatchBody: {
1772
+ [key: string]: unknown;
1773
+ };
1774
+ /** @description A webhook subscription. Validated by the same rules as the PATCH that updates one. */
1775
+ EventSubscriptionCreateBody: {
1776
+ event_name: string;
1777
+ /**
1778
+ * @description HTTPS, and not a private host. Which hosts count as internal depends on
1779
+ * deployment-configured exemptions, so the rule is described here rather than
1780
+ * published as a `pattern`.
1781
+ */
1782
+ webhook_url: string;
1783
+ /**
1784
+ * @description The HMAC key. Present ⇒ every delivery carries
1785
+ * `X-Webhook-Signature: sha256=<hmac>`; absent ⇒ deliveries are unsigned.
1786
+ *
1787
+ * `minLength: 1` because an empty string would read as "a secret is set" and still
1788
+ * produce unsigned deliveries. Omit the key to have none.
1789
+ */
1790
+ secret?: string;
1791
+ /**
1792
+ * @description Extra headers on the outbound delivery. Values must be strings. Restricted names
1793
+ * are matched case-insensitively and by prefix, which is why the key rule is described
1794
+ * here rather than published as `propertyNames`. Restricted names are refused `400`:
1795
+ * `authorization`, `cookie`, `host`, `x-api-key`, `x-webhook-signature`, and the
1796
+ * `x-platform-` / `x-forwarded-` prefixes.
1797
+ *
1798
+ * `x-webhook-signature` is restricted because it is the platform's own. A value supplied
1799
+ * here would not REPLACE the delivery signature — the two arrive as one header with two
1800
+ * values — so every delivery on the subscription would fail verification at the receiver
1801
+ * while carrying a correct signature.
1802
+ */
1803
+ headers?: {
1804
+ [key: string]: string;
1805
+ };
1806
+ };
1807
+ /**
1808
+ * @description A merge PATCH over one subscription. At least one mutable field is required — a body
1809
+ * carrying none is refused *"Subscription patch body must include at least one mutable
1810
+ * field"*.
1811
+ *
1812
+ * Keys outside this set are refused rather than accepted and ignored. The rule applies to
1813
+ * the request body only, not to values already stored on the subscription.
1814
+ *
1815
+ * `null` on `secret` and `headers` CLEARS the stored value; absent leaves it alone. The two
1816
+ * are different requests.
1817
+ */
1818
+ EventSubscriptionPatchBody: {
1819
+ /** @description Validated by the same rule as on create. */
1820
+ webhook_url?: string;
1821
+ /**
1822
+ * @description `null` clears the HMAC key, and every later delivery is then unsigned. The empty
1823
+ * string is refused rather than treated as a second spelling of that: it clears the
1824
+ * key while reading as a value.
1825
+ */
1826
+ secret?: string | null;
1827
+ /** @description `null` clears them. Same value rule and same restricted-name rule as create. */
1828
+ headers?: {
1829
+ [key: string]: string;
1830
+ } | null;
1831
+ is_active?: boolean;
1832
+ };
1833
+ /**
1834
+ * @description Settling a suspended flow callback. `action` selects which other key is required, and the
1835
+ * two arms go in opposite directions: `complete` resumes the run on `payload`, `fail` does
1836
+ * not resume it at all.
1837
+ */
1838
+ FlowCallbackResolveBody: {
1839
+ /** @enum {string} */
1840
+ action: "complete";
1841
+ /**
1842
+ * @description The resolution the suspended run RESUMES on. Open because the key set is the
1843
+ * external system's, not this document's; it must be an object.
1844
+ *
1845
+ * ONE KEY DOES NOT SURVIVE: an own `__proto__` property is dropped rather than
1846
+ * stored.
1847
+ */
1848
+ payload: {
1849
+ [key: string]: unknown;
1850
+ };
1851
+ } | {
1852
+ /** @enum {string} */
1853
+ action: "fail";
1854
+ reason?: string;
1855
+ };
1856
+ /**
1857
+ * @description Assign a role to a user.
1858
+ *
1859
+ * `expires_at`, when sent, must be a string; any other type is refused.
1860
+ *
1861
+ * `granted_by` IS NOT ON THIS BODY: sending it is refused by name. The grantor is the
1862
+ * authenticated caller.
1863
+ */
1864
+ RoleAssignmentCreateBody: {
1865
+ /**
1866
+ * @description The user receiving the role. The SDK's input calls this `target_user_name`, to
1867
+ * distinguish the target from the actor, and maps it here.
1868
+ */
1869
+ user_name: string;
1870
+ role_name: string;
1871
+ /**
1872
+ * @description A moment, as a string: `2027-01-01T00:00:00Z`, an offset form, or a bare
1873
+ * `2027-01-01`. Deliberately NOT `format: date-time`: that format is RFC 3339 only and
1874
+ * would exclude the date-only and naive forms this field accepts. A non-string is
1875
+ * refused.
1876
+ *
1877
+ * AN IMPOSSIBLE DAY ROLLS OVER rather than being refused: `2026-02-30T00:00:00Z` is stored
1878
+ * as `2026-03-02`. An out-of-range MONTH is refused; an out-of-range day is not.
1879
+ *
1880
+ * Omit the key for a grant that does not expire; that is the only way to ask for one.
1881
+ */
1882
+ expires_at?: string;
1883
+ };
1884
+ /**
1885
+ * @description OPTIONAL: sending no body at all and sending `{}` are both accepted, because flipping a
1886
+ * binding to `verified` needs no payload. `required: false` on the operation is what says
1887
+ * the first one.
1888
+ *
1889
+ * A BARE `null` IS NOT ACCEPTED: a top-level `null` body is refused with
1890
+ * `entity.parse.failed` and a 400.
1891
+ *
1892
+ * What the body may carry is the METHOD that was used, recorded alongside the flip. Any
1893
+ * other key is refused.
1894
+ */
1895
+ ChannelBindingVerifyBody: {
1896
+ /** @description How the binding was verified, recorded on the record beside the flip. */
1897
+ verification_method?: string;
1898
+ };
1899
+ /**
1900
+ * @description Re-evaluate one state-machine instance against a candidate configuration.
1901
+ * `instance_id` must be a non-empty string.
1902
+ */
1903
+ StateMachineReplayBody: {
1904
+ instance_id: string;
1905
+ /**
1906
+ * @description The candidate configuration, OPEN by declaration: its keys are a state-machine
1907
+ * configuration validated at replay, not a shape this document knows. A non-object is
1908
+ * refused.
1909
+ */
1910
+ new_config: {
1911
+ [key: string]: unknown;
1912
+ };
1913
+ };
1914
+ /**
1915
+ * @description Bulk-import a tenant snapshot. `data` must be an object, and keys outside this set are
1916
+ * refused.
1917
+ */
1918
+ SnapshotImportBody: {
1919
+ /**
1920
+ * @description The snapshot. OPEN for the same reason `BulkImportBody`'s item `data` is: its keys are
1921
+ * the tenant's own records, validated against that tenant's contract.
1922
+ */
1923
+ data: {
1924
+ [key: string]: unknown;
1925
+ };
1926
+ /**
1927
+ * @description Omitted means `clean`.
1928
+ * @enum {string}
1929
+ */
1930
+ mode?: "clean" | "restore";
1931
+ /**
1932
+ * @description Omitted means `fail-fast`.
1933
+ * @enum {string}
1934
+ */
1935
+ validation_mode?: "fail-fast" | "collect-errors";
1936
+ };
1937
+ /**
1938
+ * @description THE ARM IS CHOSEN BY THE PATH, NOT BY A KEY IN THIS BODY. The server reads the declared
1939
+ * provider of the service named in the path and validates the body against that provider's
1940
+ * credential shape. There is no discriminator property to send, which is why this is a
1941
+ * plain `oneOf` and not a `discriminator` mapping.
1942
+ *
1943
+ * Every provider uses one of TWO credential shapes: an API key, or Amazon Bedrock's static
1944
+ * AWS keys.
1945
+ */
1946
+ CredentialWriteBody: components["schemas"]["ApiKeyCredentialBody"] | components["schemas"]["AwsStaticCredentialBody"];
1947
+ /**
1948
+ * @description Printable ASCII, no whitespace. The rule exists to catch the copy-paste mistake — a
1949
+ * leading or trailing space or newline — not to describe any provider's key format.
1950
+ */
1951
+ CredentialApiKey: string;
1952
+ /**
1953
+ * @description The API-key credential shape: gemini, openai and anthropic for both LLM and embedding
1954
+ * services, plus the embedding `local` provider.
1955
+ *
1956
+ * Keys outside this set are refused: `{"apiKey": "…", "secretAccessKey": "…"}` on an
1957
+ * api-key service is refused rather than silently discarding the AWS key.
1958
+ */
1959
+ ApiKeyCredentialBody: {
1960
+ apiKey: components["schemas"]["CredentialApiKey"];
1961
+ /**
1962
+ * @description Optional endpoint override. Must be HTTPS and must not point at a private or
1963
+ * reserved address. Not published as `format: uri` because that would state a weaker
1964
+ * rule than the one enforced.
1965
+ */
1966
+ baseURL?: string;
1967
+ };
1968
+ /**
1969
+ * @description Amazon Bedrock's static AWS keys, on both registries. The primary
1970
+ * secret fingerprinted on write is `secretAccessKey`, not `accessKeyId`.
1971
+ */
1972
+ AwsStaticCredentialBody: {
1973
+ accessKeyId: string;
1974
+ secretAccessKey: string;
1975
+ region: string;
1976
+ /** @description Optional — present for temporary credentials. */
1977
+ sessionToken?: string;
1978
+ };
1979
+ /**
1980
+ * @description A request to move one record field across a state-machine edge.
1981
+ *
1982
+ * WHAT IT NAMES: the record (`entity_name`, `record_id`, `field_name`), the ask
1983
+ * (`requested_transition`), what the requester last saw (`current_state`), and an optional
1984
+ * `reason`. Nothing else — every value that decides who may approve the request is set by
1985
+ * the server.
1986
+ *
1987
+ * THREE KEYS ARE NOT ON THIS BODY, and each is refused BY NAME with its reason rather
1988
+ * than accepted or silently ignored:
1989
+ *
1990
+ * · `required_roles` — who may approve. Always derived from the edge's `allowed_roles`.
1991
+ * · `instance_id` — which state-machine instance the request belongs to, and so which
1992
+ * request an approval on the record resolves. Resolved from
1993
+ * (`entity_name`, `record_id`, `field_name`).
1994
+ * · `flow_instance_id` — ties the request to a suspended flow run, and a `rejected`
1995
+ * resolution on a linked request terminates that run. Set only by the server, when a
1996
+ * flow suspends on the request.
1997
+ *
1998
+ * THE EDGE MUST BE DECLARED. A `current_state` → `requested_transition` the contract does not
1999
+ * declare for this entity/field is a 400.
2000
+ *
2001
+ * Non-string values are refused, including inside a list and on `reason`.
2002
+ */
2003
+ TransitionRequestCreateBody: {
2004
+ /**
2005
+ * @description NON-EMPTY, and so are the three identifying strings below it: each names something the
2006
+ * request must be about.
2007
+ */
2008
+ entity_name: string;
2009
+ /**
2010
+ * @description A positive, signed 32-bit integer: at most `2147483647`.
2011
+ *
2012
+ * A NUMBER only. `ActionDispatchBody.record_id` differs: it accepts a positive integer OR
2013
+ * its decimal string. This body takes the number only.
2014
+ */
2015
+ record_id: number;
2016
+ field_name: string;
2017
+ /**
2018
+ * @description WHAT THE REQUESTER LAST SAW, checked against the instance's current state; a
2019
+ * disagreement is a 409 and no request is created. Kept in the body rather than derived
2020
+ * silently because a requester asking to move a record out of a state it is no longer in
2021
+ * has read stale data, and saying so is worth a key.
2022
+ *
2023
+ * A STALENESS CHECK, NOT A COMPARE-AND-SET: a transition committed through another path
2024
+ * between the check and the write can still admit this request against the state the
2025
+ * record has left.
2026
+ */
2027
+ current_state: string;
2028
+ requested_transition: string;
2029
+ /**
2030
+ * @description Required in practice when the matching edge declares `requires_reason`: an empty or
2031
+ * absent reason is then refused with the edge named.
2032
+ */
2033
+ reason?: string;
2034
+ };
2035
+ /** @description The inbound at-most-once dedupe token: a SHA-256 hex digest over the length-prefixed `(channel_name, channel_message_id)` pair, unique per `(tenant, channel)`. */
2036
+ ChannelIdempotencyKey: string;
2037
+ /**
2038
+ * @description One governed conversation turn. Keys outside this set are refused.
2039
+ *
2040
+ * In particular, these are refused: `role`; `locale` (the per-turn override is the
2041
+ * `?locale=` QUERY parameter, not a body key); and `metadata`.
2042
+ */
2043
+ ConversationSendBody: {
2044
+ /** @description The natural-language turn. The empty string is refused, not sent. */
2045
+ message: string;
2046
+ /**
2047
+ * @description REQUIRED. There is no lazy session creation: the key must name a session created
2048
+ * by `POST /runtime/conversation/sessions`, owned by the caller and not retired, or the
2049
+ * turn is `404 SESSION_NOT_FOUND`.
2050
+ */
2051
+ session_key: string;
2052
+ /**
2053
+ * @description Per-turn treatment-resolution overrides.
2054
+ *
2055
+ * NO `channel_name`. The channel a turn is rendered for is the SESSION's, and it
2056
+ * is not caller-selectable: sending it is an unrecognized key and the turn is refused.
2057
+ * This matches `POST /runtime/conversation/sessions`, which answers
2058
+ * `403 SESSION_CHANNEL_MISMATCH` for a body channel that contradicts a party credential.
2059
+ */
2060
+ interaction?: {
2061
+ /** @enum {string} */
2062
+ audience?: "human" | "machine";
2063
+ /** @enum {string} */
2064
+ modality?: "synchronous" | "asynchronous";
2065
+ platform?: string;
2066
+ /**
2067
+ * @description The TREATMENT locale for this turn, overriding the configured treatment locale.
2068
+ * Not the same as the `?locale=` query parameter, which sets the locale of labels
2069
+ * and descriptions in the response and does not affect this override.
2070
+ */
2071
+ locale?: string;
2072
+ /** @description Per-turn timezone override for the turn's channel context. */
2073
+ timezone?: string;
2074
+ };
2075
+ /**
2076
+ * @description Per-turn override of the session's pinned service. Must be authorized for the
2077
+ * actor in the session's scope, or the turn is `403 LLM_SERVICE_UNAUTHORIZED`.
2078
+ */
2079
+ llm_service?: string;
2080
+ /**
2081
+ * @description The inbound dedupe token (see `ChannelIdempotencyKey`). Its SHAPE is validated for
2082
+ * every caller; what is conditional is what it is USED for. Dedupe applies only to a
2083
+ * party token, whose channel comes from the credential and never from this body — on an
2084
+ * ordinary tenant token a well-formed key is accepted and does nothing.
2085
+ */
2086
+ idempotency_key?: components["schemas"]["ChannelIdempotencyKey"];
2087
+ /**
2088
+ * @description The edge-attestation of the inbound crossing, from which the runtime
2089
+ * records the `channel.ingress` audit entry.
2090
+ *
2091
+ * EVERY MEMBER IS OPTIONAL: recording the audit entry is fail-soft, so an attestation
2092
+ * missing `attested_by` skips the entry and the turn still commits.
2093
+ */
2094
+ channel_attestation?: {
2095
+ /** @description Whether the adapter verified the provider signature. Only `true` counts as verified. */
2096
+ signature_verified?: boolean;
2097
+ /** @enum {string} */
2098
+ attested_by?: "runtime" | "channel_provider";
2099
+ /** @description The provider's clock for the crossing. */
2100
+ provider_timestamp?: string;
2101
+ /**
2102
+ * @description The opaque provider message id, which the adapter MUST hash if address-shaped.
2103
+ * An address-shaped value is refused when the audit entry is recorded, and the entry
2104
+ * is skipped rather than leaking PII.
2105
+ */
2106
+ channel_message_id?: string;
2107
+ };
2108
+ };
2109
+ /**
2110
+ * @description Explicit session creation, the only way to open a session.
2111
+ *
2112
+ * `session_key` IS NOT A PROPERTY: the server mints the key. A client-chosen one was
2113
+ * guessable, squattable under another identity, and an existence oracle. Sending it is
2114
+ * refused with a message that names the key and the reason.
2115
+ */
2116
+ ConversationSessionCreateBody: {
2117
+ channel_name: components["schemas"]["NonReservedChannelName"];
2118
+ /**
2119
+ * @description The session-level snapshot of the actor's roles. NOT a security
2120
+ * gate: authorization is re-resolved server-side. It shapes the prompt given to the LLM.
2121
+ */
2122
+ roles_snapshot: string[];
2123
+ /**
2124
+ * @description Immutable for the life of the session.
2125
+ * @enum {string}
2126
+ */
2127
+ scope: "runtime" | "contract";
2128
+ /**
2129
+ * @description Optional pin. Validated at create: unknown is `404 UNKNOWN_LLM_SERVICE`,
2130
+ * unauthorized in scope is `403 LLM_SERVICE_UNAUTHORIZED`.
2131
+ */
2132
+ llm_service?: string;
2133
+ /**
2134
+ * @description May only NAME THE AUTHENTICATED ACTOR — the route answers
2135
+ * `403 SESSION_USER_MISMATCH` otherwise. It is the identity that authorizes every later
2136
+ * read and write of the session, so a body that could choose it would let any
2137
+ * tenant user own someone else's transcript. Accepted rather than refused because clients
2138
+ * send it as an echo.
2139
+ */
2140
+ user_name?: string;
2141
+ /**
2142
+ * @description Stored on the session verbatim. Open because the key set is the client's, not this
2143
+ * document's — the same reason `ToolCallBody.parameters` is open.
2144
+ */
2145
+ metadata?: {
2146
+ [key: string]: unknown;
2147
+ };
2148
+ };
2149
+ /**
2150
+ * @description The tool-invocation body — the surface the reasoner drives. Keys other than `tool` and
2151
+ * `parameters` are refused.
2152
+ */
2153
+ ToolCallBody: {
2154
+ /** @description Tool name as published by the tool catalogue. */
2155
+ tool: string;
2156
+ /**
2157
+ * @description The tool's own arguments. Open because the key set is the tool's, not
2158
+ * this document's — it is declared by the tenant's tool catalogue.
2159
+ */
2160
+ parameters: {
2161
+ [key: string]: unknown;
2162
+ };
2163
+ };
2164
+ /** @description Body of the deterministic-governance replay command. */
2165
+ TraceReplayBody: {
2166
+ /**
2167
+ * @description Replay against the tenant's CURRENT spec instead of the one recorded
2168
+ * on the trace. Omitted means `false`.
2169
+ */
2170
+ against_current_spec?: boolean;
2171
+ };
1625
2172
  /**
1626
- * @description One blocked field-binding parameter-injection attempt (ADR-0106 A1).
2173
+ * @description One blocked field-binding parameter-injection attempt.
1627
2174
  * Privacy-preserving: only the SHA-256 hash + PII-mask of the offending
1628
2175
  * value are present — never the raw value.
1629
2176
  */
@@ -1644,7 +2191,7 @@ export interface components {
1644
2191
  created_at: string;
1645
2192
  };
1646
2193
  /**
1647
- * @description One blocked regulatory-boundary hard refusal (ADR-0107).
2194
+ * @description One blocked regulatory-boundary hard refusal.
1648
2195
  * Privacy-preserving: only the SHA-256 hash + PII-mask of the input are
1649
2196
  * present — never the raw input.
1650
2197
  */
@@ -1669,9 +2216,8 @@ export interface components {
1669
2216
  created_at: string;
1670
2217
  };
1671
2218
  /**
1672
- * @description The canonical response envelope. `data` holds the payload (shape
1673
- * depends on the operation — consult the DDL + `schema.json` for the
1674
- * exact per-resource shape) and `message` is an optional human
2219
+ * @description The canonical response envelope. `data` holds the payload (its shape
2220
+ * depends on the operation) and `message` is an optional human
1675
2221
  * summary.
1676
2222
  */
1677
2223
  SuccessEnvelope: {
@@ -1689,11 +2235,9 @@ export interface components {
1689
2235
  };
1690
2236
  };
1691
2237
  /**
1692
- * @description Tenant-class JWT payload. Spec-019 FR-A06 removed the `roles` claim;
1693
- * authorization is DB-resolved fresh per request via
1694
- * `permissionService.getUserRoles`, never derived from JWT claims.
1695
- * See `runtime/packages/runtime-api/src/domain/auth/credential-claims.ts`
1696
- * for the canonical schema.
2238
+ * @description Tenant-class JWT payload. It carries no `roles` claim;
2239
+ * authorization resolves the actor's roles fresh on every request,
2240
+ * never from JWT claims.
1697
2241
  */
1698
2242
  JwtPayload: {
1699
2243
  sub: string;
@@ -1710,10 +2254,10 @@ export interface components {
1710
2254
  aud?: "runtime-api";
1711
2255
  };
1712
2256
  LlmCredentialMetadata: {
1713
- /** @description LLM service name (FK into `llm.services[]`). */
2257
+ /** @description LLM service name; names an entry of the contract's `llm.services[]`. */
1714
2258
  service_name: string;
1715
2259
  /**
1716
- * @description "••••" + last 4 chars of the fingerprint. The plaintext key is NEVER returned (FR-I04).
2260
+ * @description "••••" + last 4 chars of the fingerprint. The plaintext key is NEVER returned.
1717
2261
  * @example ••••WXYZ
1718
2262
  */
1719
2263
  api_key_masked: string;
@@ -1729,11 +2273,10 @@ export interface components {
1729
2273
  EmbeddingCredentialMetadata: {
1730
2274
  tenant_name: string;
1731
2275
  /**
1732
- * @description The declared `embeddings.services[].name` this credential keys to
1733
- * (FR-023). Deliberately NOT a provider enum: the credential keys to a
1734
- * declaration, and reporting the provider here was the response half of
1735
- * the conflation that made the write unstorable. The provider is a
1736
- * property of the declaration, readable from the embeddings catalog.
2276
+ * @description The declared `embeddings.services[].name` this credential keys to.
2277
+ * Deliberately NOT a provider enum: the credential keys to a
2278
+ * declaration. The provider is a property of the declaration,
2279
+ * readable from the embeddings catalog.
1737
2280
  */
1738
2281
  service_name: string;
1739
2282
  /**
@@ -1759,11 +2302,11 @@ export interface components {
1759
2302
  priority: number;
1760
2303
  /** @description YAML declaration index. Used as priority tie-breaker. */
1761
2304
  position: number;
1762
- /** @description Per-service override; absent when null (FR-A06). */
2305
+ /** @description Per-service override; absent when null. */
1763
2306
  temperature?: number;
1764
- /** @description Per-service override; absent when null (FR-A06). */
2307
+ /** @description Per-service override; absent when null. */
1765
2308
  max_tokens?: number;
1766
- /** @description Per-service override of the intent-confidence floor; absent when null (FR-A06). Resolution order is flow → this → the tenant's `llm.confidence_threshold` → the single named code default. */
2309
+ /** @description Per-service override of the intent-confidence floor; absent when null. Resolution order is flow → this → the tenant's `llm.confidence_threshold` → the platform default. */
1767
2310
  confidence_threshold?: number;
1768
2311
  };
1769
2312
  UserVisibleAction: {
@@ -1776,7 +2319,7 @@ export interface components {
1776
2319
  entity_label: string;
1777
2320
  description?: string;
1778
2321
  actions: components["schemas"]["UserVisibleAction"][];
1779
- /** @description FieldToolDefinition shape; see contract tool-catalog types. */
2322
+ /** @description The entity's field definitions, as exposed in the tool catalog. */
1780
2323
  fields: Record<string, never>[];
1781
2324
  /**
1782
2325
  * @description MCP tool names exposed to this user for this entity. Includes
@@ -1787,7 +2330,7 @@ export interface components {
1787
2330
  * - request_{entity}_{field}_transition
1788
2331
  * - resolve_{entity}_{field}_transition_request
1789
2332
  * - list_{entity}_{field}_pending_transition_requests
1790
- * See ADR-0081 for the generation rules; structured per-trio
2333
+ * Structured per-trio
1791
2334
  * metadata lives in UserToolCatalog.transitions.
1792
2335
  */
1793
2336
  tool_names: string[];
@@ -1796,7 +2339,7 @@ export interface components {
1796
2339
  from: string;
1797
2340
  to: string;
1798
2341
  /**
1799
- * @description Spec 015 / M4. When true, the trigger UI MUST require a reason
2342
+ * @description When true, the trigger UI MUST require a reason
1800
2343
  * textarea before dispatch. Omitted when false/absent in YAML.
1801
2344
  */
1802
2345
  requires_reason?: boolean;
@@ -1806,29 +2349,29 @@ export interface components {
1806
2349
  entity_name: string;
1807
2350
  /** @description Field declaring the transitions[] block. */
1808
2351
  field_name: string;
1809
- /** @example request_limit_requests_status_transition */
2352
+ /** @example request_orders_status_transition */
1810
2353
  request_tool_name: string;
1811
- /** @example resolve_limit_requests_status_transition_request */
2354
+ /** @example resolve_orders_status_transition_request */
1812
2355
  resolve_tool_name: string;
1813
- /** @example list_limit_requests_status_pending_transition_requests */
2356
+ /** @example list_orders_status_pending_transition_requests */
1814
2357
  list_pending_tool_name: string;
1815
2358
  /**
1816
2359
  * @description Distinct `to` states declared reachable across all transitions of
1817
2360
  * the field, in declaration order. The LLM sees this set at schema
1818
- * time; the dispatch service enforces the (from, to) legality per
2361
+ * time; the server enforces the (from, to) legality per
1819
2362
  * record.
1820
2363
  */
1821
2364
  target_states: string[];
1822
2365
  /**
1823
- * @description Per-edge projection (spec 015 / M4). Parallel to `target_states`
2366
+ * @description Per-edge projection. Parallel to `target_states`
1824
2367
  * and carries `requires_reason` so trigger UIs can mark the reason
1825
2368
  * textarea required for the matching (from, to) edge. Order mirrors
1826
2369
  * YAML declaration; not deduplicated.
1827
2370
  */
1828
2371
  transitions: components["schemas"]["TransitionEdge"][];
1829
- /** @description Optional display label for the field; used by the prompt builder. */
2372
+ /** @description Optional display label for the field; used when building the LLM prompt. */
1830
2373
  field_label?: string;
1831
- /** @description Optional description of the field; used by the prompt builder. */
2374
+ /** @description Optional description of the field; used when building the LLM prompt. */
1832
2375
  field_description?: string;
1833
2376
  /**
1834
2377
  * @description Forward-compatibility hook for a future introspect capability. V1
@@ -1838,7 +2381,7 @@ export interface components {
1838
2381
  inspect: boolean;
1839
2382
  };
1840
2383
  /**
1841
- * @description Spec 016 / M5 / ADR-0085 amendment. Per-user projection of a single
2384
+ * @description Per-user projection of a single
1842
2385
  * YAML-declared `action` the caller is authorized to dispatch.
1843
2386
  */
1844
2387
  UserVisibleActionTool: {
@@ -1849,15 +2392,15 @@ export interface components {
1849
2392
  verb: "create" | "read" | "update" | "delete" | "list";
1850
2393
  /** @description From YAML `action.description`. Optional. */
1851
2394
  description?: string;
1852
- /** @description Dispatcher-recognised intent string — `action.<name>` for native, `external.<ns>.<tool>` for external (ADR-0076). */
2395
+ /** @description Intent string — `action.<name>` for native, `external.<ns>.<tool>` for external. */
1853
2396
  intent_type: string;
1854
2397
  /** @enum {string} */
1855
2398
  provenance: "native" | "external";
1856
2399
  };
1857
2400
  /**
1858
- * @description Spec-042 — per-tenant role declaration. Read-only metadata always
2401
+ * @description Per-tenant role declaration. Read-only metadata always
1859
2402
  * projected for every caller; editing is gated separately by the
1860
- * `roles` contract-section policy (W3: surfaced via `admin_sections`).
2403
+ * `roles` contract-section policy (surfaced via `admin_sections`).
1861
2404
  */
1862
2405
  UserVisibleRole: {
1863
2406
  name: string;
@@ -1865,15 +2408,15 @@ export interface components {
1865
2408
  description?: string;
1866
2409
  };
1867
2410
  /**
1868
- * @description Spec-042 — per-tenant flow declaration projected for users with
1869
- * `inspect` policy on the flow (open-by-default per ADR-0065).
2411
+ * @description Per-tenant flow declaration projected for users with
2412
+ * `inspect` policy on the flow (open-by-default).
1870
2413
  */
1871
2414
  UserVisibleFlow: {
1872
2415
  name: string;
1873
2416
  description?: string;
1874
2417
  };
1875
2418
  /**
1876
- * @description Spec-042 — per-tenant skill declaration projected for users whose
2419
+ * @description Per-tenant skill declaration projected for users whose
1877
2420
  * role set satisfies the skill's YAML `constraints[]`.
1878
2421
  */
1879
2422
  UserVisibleSkill: {
@@ -1882,7 +2425,7 @@ export interface components {
1882
2425
  description?: string;
1883
2426
  };
1884
2427
  /**
1885
- * @description W3 — a contract section name. `UserToolCatalog.admin_sections` is the
2428
+ * @description A contract section name. `UserToolCatalog.admin_sections` is the
1886
2429
  * subset the caller's roles can `update` (drives admin mutation pages).
1887
2430
  * @enum {string}
1888
2431
  */
@@ -1896,36 +2439,49 @@ export interface components {
1896
2439
  * @description Structured metadata for every state-machine transition trio
1897
2440
  * visible to this user. One entry per (entity, field) with
1898
2441
  * non-empty transitions[] for which user_roles ∩ R(entity, field)
1899
- * ≠ ∅. See ADR-0081.
2442
+ * ≠ ∅.
1900
2443
  */
1901
2444
  transitions: components["schemas"]["UserVisibleTransitionTool"][];
1902
2445
  /**
1903
- * @description Spec 016 / M5 / ADR-0085 amendment. Per-user projection of
1904
- * YAML-declared `actions[]` the caller is authorized to dispatch.
1905
- * One entry per action whose `(entity, verb)` resolves to
1906
- * `kind: 'action'` under the action-surface-resolver decision
1907
- * logic for the caller's capabilities. Hidden/entity-fallback
1908
- * decisions are NOT projected. Optional — omitted entirely when
1909
- * zero entries.
2446
+ * @description THE TOOL SURFACE: every EXPOSED action this user may dispatch, each registered as
2447
+ * a tool alias. An action appears here
2448
+ * when `expose_as_mcp_tool: true` AND the underlying `(entity, verb)` is
2449
+ * granted; there is no per-pair dedup, because an alias is registered
2450
+ * for every exposed action and a pair may legitimately carry two.
2451
+ *
2452
+ * NOT the prompt's action list and NOT the dispatchable list: see
2453
+ * `dispatchable_actions`, which carries every GRANTED action and is what a UI
2454
+ * offering action buttons must read.
1910
2455
  */
1911
2456
  actions?: components["schemas"]["UserVisibleActionTool"][];
1912
2457
  /**
1913
- * @description Spec-042 — declared roles in the tenant contract (read-only
1914
- * metadata always emitted, even when empty).
2458
+ * @description EVERY GRANTED action, exposure irrelevant: what this user may DISPATCH
2459
+ * by name through `POST /runtime/actions/:name`, whether or not an MCP tool
2460
+ * carries it.
2461
+ *
2462
+ * The sibling of `actions[]`, and the reason that field can be the tool surface
2463
+ * without losing anything. A UI offering action buttons must read THIS one: the
2464
+ * bare `/runtime/records` surface enforces named-action routing, so a verb
2465
+ * carrying a named action answers `action_required` there — a missing button
2466
+ * would leave the verb with no path at all.
2467
+ *
2468
+ * Optional — omitted entirely when zero entries.
1915
2469
  */
1916
- roles: components["schemas"]["UserVisibleRole"][];
2470
+ dispatchable_actions?: components["schemas"]["UserVisibleActionTool"][];
1917
2471
  /**
1918
- * @description Spec-042 — flows the user can `inspect` (ADR-0065
1919
- * open-by-default).
2472
+ * @description Declared roles in the tenant contract (read-only
2473
+ * metadata always emitted, even when empty).
1920
2474
  */
2475
+ roles: components["schemas"]["UserVisibleRole"][];
2476
+ /** @description Flows the user can `inspect` (open-by-default). */
1921
2477
  flows: components["schemas"]["UserVisibleFlow"][];
1922
2478
  /**
1923
- * @description Spec-042 — skills whose YAML `constraints[]` evaluate true for
2479
+ * @description Skills whose YAML `constraints[]` evaluate true for
1924
2480
  * the user.
1925
2481
  */
1926
2482
  skills: components["schemas"]["UserVisibleSkill"][];
1927
2483
  /**
1928
- * @description W3 (ADR-0102 §3 closure) — contract sections the user can `update`,
2484
+ * @description Contract sections the user can `update`,
1929
2485
  * derived from `authorization.spec.{section}` policies. The dashboard
1930
2486
  * derives admin mutation pages (roles/skills/flows/authorization+
1931
2487
  * policies/state-machines/settings) and the admin-tier pages
@@ -1939,69 +2495,275 @@ export interface components {
1939
2495
  } & {
1940
2496
  [key: string]: unknown;
1941
2497
  };
1942
- /**
1943
- * @description Opaque 64-hex digest of a party's address within its channel's address
1944
- * namespace (QI-001). NOT an address — the runtime never names a phone
1945
- * number, an email or a handle.
1946
- */
1947
- ChannelPartyRef: string;
1948
- /** @description Content digest — metadata-only handle, never the body (R12). */
1949
- ChannelContentRef: string;
1950
- /** @description Tenant-declared channel name (the `channels:` contract section). */
1951
- ChannelName: string;
1952
- /** @enum {string} */
1953
- ChannelDeliveryMode: "freeform" | "template" | "deferred";
1954
- /**
1955
- * @description Who attests the send outcome — the runtime itself, or the channel
1956
- * provider (the transport descriptor declares which is admissible).
1957
- * @enum {string}
1958
- */
1959
- ChannelAttestedBy: "runtime" | "channel_provider";
1960
- /**
1961
- * @description Strict by construction: `party_ref` is the ONLY accepted key. The
1962
- * strictness IS the QI-003 claim rejection — any role/privilege key
1963
- * alongside it fails validation (422 `MINT_CLAIM_REJECTED`) before the
1964
- * mint. The channel comes from the credential, never from here.
1965
- */
1966
- ChannelMintRequest: {
1967
- party_ref: components["schemas"]["ChannelPartyRef"];
1968
- };
1969
- ChannelPartyToken: {
2498
+ /** @description The fields of a resolution. At least one is required — a body carrying none is refused *"patch body requires at least one mutable field"*. `status` is the resolution: the caller's approver authority is checked, the transition's rules are re-checked at commit, and a linked flow run is resumed in the same transaction; a body with only `decision_notes` annotates the request and changes no state. `resolved_by` and `resolved_at` are NOT settable — the approver is the authenticated caller and the time is when the resolution commits — and a body carrying either is refused rather than silently ignored. */
2499
+ TransitionRequestResolveBody: {
1970
2500
  /**
1971
- * @description Short-TTL anonymous party token (`token_class: party`) bound to
1972
- * `(channel, party_ref)`. Carries no role and grants no authority.
2501
+ * @description Only the two a caller may write. `pending` is an outcome, not a request: the `?status=` filter admits it because listing pending requests is a different question.
2502
+ * @enum {string}
1973
2503
  */
1974
- token: string;
1975
- /** Format: date-time */
1976
- expires_at: string;
1977
- };
1978
- ChannelDirectiveTemplateRef: {
1979
- id: string;
1980
- version: number;
1981
- };
1982
- ChannelDirectiveCorrelation: {
1983
- session_key: string;
1984
- turn_seq: number;
2504
+ status?: "approved" | "rejected";
2505
+ decision_notes?: string | null;
1985
2506
  };
1986
2507
  /**
1987
- * @description The claimed directive plus its resolved content. `fetch = claim`, so
1988
- * receiving this body means the lease is now held by the caller's `jti`.
2508
+ * @description One of THREE statuses. There is no `expired` status: a transition request has no
2509
+ * deadline.
2510
+ * @enum {string}
1989
2511
  */
1990
- ChannelDirectiveContent: {
2512
+ TransitionRequestStatus: "pending" | "approved" | "rejected";
2513
+ /** @description One record-field state machine. Every field is always present. */
2514
+ StateMachineInstance: {
1991
2515
  /** Format: uuid */
1992
2516
  id: string;
1993
- channel_name: components["schemas"]["ChannelName"];
1994
- recipient_ref: components["schemas"]["ChannelPartyRef"];
1995
- content_ref: components["schemas"]["ChannelContentRef"];
1996
- delivery_mode: components["schemas"]["ChannelDeliveryMode"];
1997
- template?: components["schemas"]["ChannelDirectiveTemplateRef"];
1998
- correlation: components["schemas"]["ChannelDirectiveCorrelation"];
2517
+ entity_name: string;
2518
+ record_id: number;
2519
+ field_name: string;
2520
+ current_state: string;
2521
+ /** Format: date-time */
2522
+ created_at: string;
2523
+ /** Format: date-time */
2524
+ updated_at: string;
2525
+ };
2526
+ /** @description One recorded transition. `actor` is always present; the other optional fields may be absent. */
2527
+ StateMachineEvent: {
2528
+ /** Format: uuid */
2529
+ id: string;
2530
+ /** Format: uuid */
2531
+ instance_id: string;
2532
+ from_state: string;
2533
+ to_state: string;
2534
+ actor: string;
2535
+ /** @description ABSENT when there is no value — never `null`. */
2536
+ actor_role?: string;
2537
+ payload?: {
2538
+ [key: string]: unknown;
2539
+ };
2540
+ /** @description Currently always absent. */
2541
+ rule_evaluations?: {
2542
+ [key: string]: unknown;
2543
+ };
2544
+ /** Format: date-time */
2545
+ created_at: string;
2546
+ };
2547
+ /**
2548
+ * @description A requested transition awaiting a decision. Note `transition_request_id`, not `id`, and
2549
+ * `target_state` for what the create body calls `requested_transition`.
2550
+ */
2551
+ TransitionRequest: {
2552
+ /** Format: uuid */
2553
+ transition_request_id: string;
2554
+ /** Format: uuid */
2555
+ instance_id: string;
2556
+ entity_name: string;
2557
+ record_id: number;
2558
+ current_state: string;
2559
+ target_state: string;
2560
+ field_name: string;
2561
+ /** @description Always present; `[]` when there are none. */
2562
+ required_roles: string[];
2563
+ reason?: string;
2564
+ status: components["schemas"]["TransitionRequestStatus"];
2565
+ resolved_by?: string;
2566
+ /** Format: date-time */
2567
+ resolved_at?: string;
2568
+ decision_notes?: string;
2569
+ /** Format: date-time */
2570
+ created_at: string;
2571
+ /** Format: date-time */
2572
+ updated_at: string;
2573
+ };
2574
+ StateMachineInstanceList: {
2575
+ count: number;
2576
+ instances: components["schemas"]["StateMachineInstance"][];
2577
+ };
2578
+ StateMachineEventList: {
2579
+ count: number;
2580
+ events: components["schemas"]["StateMachineEvent"][];
2581
+ };
2582
+ TransitionRequestList: {
2583
+ count: number;
2584
+ transition_requests: components["schemas"]["TransitionRequest"][];
2585
+ };
2586
+ /**
2587
+ * @description The flow-event vocabulary, shared by `listFlowEvents`'s `event_type` filter
2588
+ * and `FlowEvent.event_type`.
2589
+ * @enum {string}
2590
+ */
2591
+ FlowEventKind: "FlowStarted" | "FlowStepCompleted" | "FlowStepFailed" | "FlowStepSkipped" | "FlowStepAlreadyCompleted" | "FlowPaused" | "FlowResumed" | "FlowCompleted" | "FlowFailed" | "FlowConstraintViolated" | "FlowConstraintUnverifiable";
2592
+ /**
2593
+ * @description One flow run. There is no `started_at` and no `steps` collection: the start time is
2594
+ * `created_at`, and per-step history lives in the run's flow events (`FlowEvent`).
2595
+ */
2596
+ FlowInstance: {
2597
+ /** Format: uuid */
2598
+ id: string;
2599
+ tenant_name: string;
2600
+ flow_name: string;
2601
+ session_id: string;
2602
+ /**
2603
+ * @description Who started the run. `'anonymous'` for every channel party — the pair that
2604
+ * OWNS the run is `party_ref` + `channel_name`, never this field.
2605
+ */
2606
+ actor: string;
2607
+ /** @description The owning party pair; `null` for a non-party actor. */
2608
+ party_ref: string | null;
2609
+ /** @description Set exactly when `party_ref` is. */
2610
+ channel_name: string | null;
2611
+ /** @enum {string} */
2612
+ status: "running" | "paused" | "resuming" | "completed" | "failed";
2613
+ /** @description ABSENT (not `null`) when there is none. */
2614
+ trigger_data?: {
2615
+ [key: string]: unknown;
2616
+ };
2617
+ /** @description ABSENT (not `null`) when there is none — a run in flight has none. */
2618
+ final_state?: {
2619
+ [key: string]: unknown;
2620
+ };
2621
+ error: string | null;
2622
+ /**
2623
+ * Format: date-time
2624
+ * @description When the run started.
2625
+ */
2626
+ created_at: string;
2627
+ /**
2628
+ * Format: date-time
2629
+ * @description Last update to the run. For a TERMINAL status (`completed` / `failed`) that is
2630
+ * when the run ended, so `updated_at - created_at` is its duration. It is NOT a
2631
+ * completion timestamp for a run still in flight — check `status` first. For an
2632
+ * exact figure prefer the `FlowCompleted` / `FlowFailed` event's `duration_ms`,
2633
+ * which the engine measures rather than infers.
2634
+ */
2635
+ updated_at: string;
2636
+ };
2637
+ /**
2638
+ * @description One appended flow lifecycle event. This is where per-step history lives: a step
2639
+ * appears as an event whose `step_name` is set and whose `event_type` is one of
2640
+ * the `FlowStep*` kinds. Returned in CHAIN order (`seq`), not `created_at` —
2641
+ * events appended together share a timestamp, so only `seq` totally
2642
+ * orders them.
2643
+ */
2644
+ FlowEvent: {
2645
+ /** Format: uuid */
2646
+ id: string;
2647
+ tenant_name: string;
2648
+ /** Format: uuid */
2649
+ instance_id: string;
2650
+ event_type: components["schemas"]["FlowEventKind"];
2651
+ /** @description The step this event is about; `null` on a run-level kind (`FlowStarted`, …). */
2652
+ step_name: string | null;
2653
+ output_key: string | null;
2654
+ /** @description ABSENT (not `null`) when there is no payload. */
2655
+ payload?: {
2656
+ [key: string]: unknown;
2657
+ };
2658
+ /** @description Measured elapsed time for the step, or for the whole run on a terminal event. */
2659
+ duration_ms: number | null;
2660
+ /** @description Which run of the instance appended this event (a resume increments it). */
2661
+ attempt: number;
2662
+ /** Format: date-time */
2663
+ created_at: string;
2664
+ };
2665
+ /**
2666
+ * @description A suspended flow's resumption point. The `id` is the capability token an
2667
+ * external system presents to resolve the run.
2668
+ */
2669
+ FlowCallback: {
2670
+ /** Format: uuid */
2671
+ id: string;
2672
+ tenant_name: string;
2673
+ flow_name: string;
2674
+ session_id: string;
2675
+ event_name: string;
2676
+ step_name: string;
2677
+ /** @enum {string} */
2678
+ status: "pending" | "completed" | "timed_out" | "failed";
2679
+ /** @description The saved state the run resumes from. Always present — `{}` when empty. */
2680
+ flow_state: {
2681
+ [key: string]: unknown;
2682
+ };
2683
+ /** @description What the resolver supplied; `null` until the callback is resolved. */
2684
+ callback_payload: {
2685
+ [key: string]: unknown;
2686
+ } | null;
2687
+ /** Format: date-time */
2688
+ timeout_at: string | null;
2689
+ /** Format: date-time */
2690
+ created_at: string;
2691
+ /** Format: date-time */
2692
+ completed_at: string | null;
2693
+ };
2694
+ /**
2695
+ * @description Opaque 64-hex digest of a party's address within its channel's address
2696
+ * namespace. NOT an address — the runtime never names a phone
2697
+ * number, an email or a handle.
2698
+ */
2699
+ ChannelPartyRef: string;
2700
+ /** @description Content digest — metadata-only handle, never the body. */
2701
+ ChannelContentRef: string;
2702
+ /**
2703
+ * @description A channel name as returned in responses: the kebab class and NOTHING ELSE.
2704
+ * Every stored channel name is at most 64 characters, but that width is not published on this output form.
2705
+ * IT DOES NOT STATE THE RESERVED-NAME REFUSAL. The refusal is an INPUT rule, applied where a name is parsed from a request; `NonReservedChannelName` carries it, at the sites that parse.
2706
+ */
2707
+ ChannelName: string;
2708
+ /**
2709
+ * @description A channel name as accepted in requests: the kebab class of `ChannelName`, at most 64 characters, and not one of the reserved words.
2710
+ * THIS IS AN INPUT RULE, published only where a request carries a channel name. It is deliberately absent from response bodies, which carry what is stored.
2711
+ * EVERY NAME THIS REFUSES IS ONE NO CHANNEL CAN HAVE: the contract API refuses the same names when a channel is written.
2712
+ */
2713
+ NonReservedChannelName: components["schemas"]["ChannelName"] & unknown & unknown;
2714
+ /** @enum {string} */
2715
+ ChannelDeliveryMode: "freeform" | "template" | "deferred";
2716
+ /**
2717
+ * @description Who attests the send outcome — the runtime itself, or the channel
2718
+ * provider (the transport descriptor declares which is admissible).
2719
+ * @enum {string}
2720
+ */
2721
+ ChannelAttestedBy: "runtime" | "channel_provider";
2722
+ /**
2723
+ * @description Strict by construction: `party_ref` is the ONLY accepted key. The
2724
+ * Strict by construction: `party_ref` is the ONLY accepted key. Any
2725
+ * role/privilege key alongside it fails validation (422 `MINT_CLAIM_REJECTED`) before the
2726
+ * mint. The channel comes from the credential, never from here.
2727
+ */
2728
+ ChannelMintRequest: {
2729
+ party_ref: components["schemas"]["ChannelPartyRef"];
2730
+ };
2731
+ ChannelPartyToken: {
2732
+ /**
2733
+ * @description Short-TTL anonymous party token (`token_class: party`) bound to
2734
+ * `(channel, party_ref)`. Carries no role and grants no authority.
2735
+ */
2736
+ token: string;
2737
+ /** Format: date-time */
2738
+ expires_at: string;
2739
+ };
2740
+ ChannelDirectiveTemplateRef: {
2741
+ id: string;
2742
+ version: number;
2743
+ };
2744
+ ChannelDirectiveCorrelation: {
2745
+ session_key: string;
2746
+ turn_seq: number;
2747
+ };
2748
+ /**
2749
+ * @description The claimed directive plus its resolved content. `fetch = claim`, so
2750
+ * receiving this body means the lease is now held by the caller's `jti`.
2751
+ */
2752
+ ChannelDirectiveContent: {
2753
+ /** Format: uuid */
2754
+ id: string;
2755
+ channel_name: components["schemas"]["ChannelName"];
2756
+ recipient_ref: components["schemas"]["ChannelPartyRef"];
2757
+ content_ref: components["schemas"]["ChannelContentRef"];
2758
+ delivery_mode: components["schemas"]["ChannelDeliveryMode"];
2759
+ template?: components["schemas"]["ChannelDirectiveTemplateRef"];
2760
+ correlation: components["schemas"]["ChannelDirectiveCorrelation"];
1999
2761
  /** Format: date-time */
2000
2762
  deadline_at?: string;
2001
2763
  /**
2002
2764
  * @description The resolved turn body, returned ONLY here — the directive itself
2003
- * (and every audit row) carries `content_ref` and never the content
2004
- * (R12 / QI-004). Resolved by the directive's turn correlation as an
2765
+ * (and every audit entry) carries `content_ref` and never the content.
2766
+ * Resolved by the directive's turn correlation as an
2005
2767
  * authorized, audited read.
2006
2768
  */
2007
2769
  content: unknown;
@@ -2010,8 +2772,8 @@ export interface components {
2010
2772
  /** @enum {string} */
2011
2773
  status: "accepted" | "failed" | "deferred";
2012
2774
  /**
2013
- * @description Provider-supplied opaque id. MUST already be hashed by the adapter
2014
- * (FR-E03) — an E.164- or email-shaped value is refused (QI-001).
2775
+ * @description Provider-supplied opaque id. MUST already be hashed by the adapter —
2776
+ * an E.164- or email-shaped value is refused.
2015
2777
  */
2016
2778
  provider_message_id?: string;
2017
2779
  attested_by: components["schemas"]["ChannelAttestedBy"];
@@ -2090,6 +2852,24 @@ export interface components {
2090
2852
  "application/json": components["schemas"]["ErrorResponse"];
2091
2853
  };
2092
2854
  };
2855
+ /** @description A precondition on the tenant's configuration is unmet — the resolved LLM service has no credential (`NO_CREDENTIAL_CONFIGURED`) or one that cannot be read (`CREDENTIAL_UNREADABLE`). Not an authorization failure: the actor may use the service. */
2856
+ PreconditionFailed: {
2857
+ headers: {
2858
+ [name: string]: unknown;
2859
+ };
2860
+ content: {
2861
+ "application/json": components["schemas"]["ErrorResponse"];
2862
+ };
2863
+ };
2864
+ /** @description A declared conversational ceiling is reached: `CONVERSATION_TURN_LIMIT` (the per-role turn cap) or `CONVERSATION_TOKEN_LIMIT` (the per-role token ceiling — also what a fail-CLOSED metering fault answers for an anonymous party). Governed limits, not infrastructure throttling: the code says which ceiling, and the actor's own contract set it. Both answer 429. */
2865
+ TooManyRequests: {
2866
+ headers: {
2867
+ [name: string]: unknown;
2868
+ };
2869
+ content: {
2870
+ "application/json": components["schemas"]["ErrorResponse"];
2871
+ };
2872
+ };
2093
2873
  /** @description Resource state conflict */
2094
2874
  Conflict: {
2095
2875
  headers: {
@@ -2100,7 +2880,7 @@ export interface components {
2100
2880
  };
2101
2881
  };
2102
2882
  /**
2103
- * @description ADR-0127 US2 — the verb is governed by ≥1 named action and must be
2883
+ * @description The verb is governed by ≥1 named action and must be
2104
2884
  * dispatched via `POST /runtime/actions/{name}`; the bare records surface
2105
2885
  * rejects it. `error.code='action_required'`; `error.candidate_actions[]`
2106
2886
  * lists the eligible action names.
@@ -2118,7 +2898,7 @@ export interface components {
2118
2898
  };
2119
2899
  };
2120
2900
  /**
2121
- * @description ADR-0127 — the write floor blocked the mutation: `error.code` is
2901
+ * @description The write was blocked: `error.code` is
2122
2902
  * `phase_not_allowed` (action not allowed in the record's current process
2123
2903
  * phase) or `precondition_failed` (a declared precondition evaluated false
2124
2904
  * against the real record set).
@@ -2132,7 +2912,7 @@ export interface components {
2132
2912
  };
2133
2913
  };
2134
2914
  /**
2135
- * @description ADR-0127 US3 — a `confirm` guard (an entity check or a transition edge)
2915
+ * @description A `confirm` guard (an entity check or a transition edge)
2136
2916
  * paused this write pending human consent; the write is not performed.
2137
2917
  * Re-submit the IDENTICAL write with the returned token in the
2138
2918
  * `X-Zarel-Confirmation-Token` header before `expires_at`.
@@ -2205,14 +2985,14 @@ export interface components {
2205
2985
  };
2206
2986
  };
2207
2987
  parameters: {
2208
- /** @description Canonical natural-key identifier (ADR-0077 P4) */
2988
+ /** @description Canonical natural-key identifier */
2209
2989
  NamePath: string;
2210
2990
  EntityNamePath: string;
2211
- /** @description Egress directive id (ADR-0133 §B.4) */
2991
+ /** @description Egress directive id */
2212
2992
  ChannelDirectiveIdPath: string;
2213
2993
  RequestId: string;
2214
2994
  /**
2215
- * @description ADR-0127 US3 — the self-confirmation retry token from a prior `409
2995
+ * @description The self-confirmation retry token from a prior `409
2216
2996
  * confirmation_required` response. Re-submit the IDENTICAL write carrying
2217
2997
  * this header to proceed. The token is bound to the exact write
2218
2998
  * (tenant/actor/contract-version/action/entity/verb/record/params) and
@@ -2231,18 +3011,56 @@ export interface components {
2231
3011
  */
2232
3012
  Locale: "en" | "es";
2233
3013
  };
2234
- requestBodies: {
2235
- JsonObject: {
2236
- content: {
2237
- "application/json": Record<string, never>;
2238
- };
2239
- };
2240
- };
3014
+ requestBodies: never;
2241
3015
  headers: never;
2242
3016
  pathItems: never;
2243
3017
  }
2244
3018
  export type $defs = Record<string, never>;
2245
3019
  export interface operations {
3020
+ getBranding: {
3021
+ parameters: {
3022
+ query?: {
3023
+ /**
3024
+ * @description Locale for the display name. Published inline rather than as the
3025
+ * shared `Locale` parameter because it behaves differently from it.
3026
+ *
3027
+ * An unsupported single value falls back to the canonical locale
3028
+ * (`en`) instead of the 400 the shared parameter promises — this
3029
+ * selects a RENDERING, and a rendering has a default where a filter
3030
+ * has none. A REPEATED `?locale=a&locale=b` is a 400.
3031
+ */
3032
+ locale?: string;
3033
+ };
3034
+ header?: never;
3035
+ path?: never;
3036
+ cookie?: never;
3037
+ };
3038
+ requestBody?: never;
3039
+ responses: {
3040
+ /** @description The tenant's branding. */
3041
+ 200: {
3042
+ headers: {
3043
+ [name: string]: unknown;
3044
+ };
3045
+ content: {
3046
+ "application/json": {
3047
+ /** @description The tenant label for the locale, falling back to the tenant name. */
3048
+ displayName: string;
3049
+ /**
3050
+ * @description An `https://` URL or a root-relative path. Re-validated at
3051
+ * this boundary and answered as `null` when it fails, so a
3052
+ * malformed stored value never reaches a consumer.
3053
+ */
3054
+ logoUrl: string | null;
3055
+ /** @description A `#rrggbb` colour, or `null` when the stored value is not one. */
3056
+ accentColor: string | null;
3057
+ };
3058
+ };
3059
+ };
3060
+ 400: components["responses"]["BadRequest"];
3061
+ 404: components["responses"]["NotFound"];
3062
+ };
3063
+ };
2246
3064
  listLlmServices: {
2247
3065
  parameters: {
2248
3066
  query: {
@@ -2360,11 +3178,17 @@ export interface operations {
2360
3178
  };
2361
3179
  cookie?: never;
2362
3180
  };
2363
- requestBody: components["requestBodies"]["JsonObject"];
3181
+ requestBody: {
3182
+ content: {
3183
+ "application/json": components["schemas"]["CredentialWriteBody"];
3184
+ };
3185
+ };
2364
3186
  responses: {
2365
3187
  200: components["responses"]["OkEnvelope"];
2366
3188
  400: components["responses"]["BadRequest"];
3189
+ 403: components["responses"]["Forbidden"];
2367
3190
  404: components["responses"]["NotFound"];
3191
+ 409: components["responses"]["Conflict"];
2368
3192
  };
2369
3193
  };
2370
3194
  deleteLlmCredential: {
@@ -2408,7 +3232,7 @@ export interface operations {
2408
3232
  path: {
2409
3233
  /**
2410
3234
  * @description The DECLARED embedding-service name from `embeddings.services[]`
2411
- * (FR-023) — not the provider. A provider is not an identity: two
3235
+ * — not the provider. A provider is not an identity: two
2412
3236
  * services may share one, and the credential keys to a declaration that
2413
3237
  * exists. The provider is resolved from that declaration server-side.
2414
3238
  */
@@ -2429,7 +3253,7 @@ export interface operations {
2429
3253
  path: {
2430
3254
  /**
2431
3255
  * @description The DECLARED embedding-service name from `embeddings.services[]`
2432
- * (FR-023) — not the provider. A provider is not an identity: two
3256
+ * — not the provider. A provider is not an identity: two
2433
3257
  * services may share one, and the credential keys to a declaration that
2434
3258
  * exists. The provider is resolved from that declaration server-side.
2435
3259
  */
@@ -2437,11 +3261,17 @@ export interface operations {
2437
3261
  };
2438
3262
  cookie?: never;
2439
3263
  };
2440
- requestBody: components["requestBodies"]["JsonObject"];
3264
+ requestBody: {
3265
+ content: {
3266
+ "application/json": components["schemas"]["CredentialWriteBody"];
3267
+ };
3268
+ };
2441
3269
  responses: {
2442
3270
  200: components["responses"]["OkEnvelope"];
2443
3271
  400: components["responses"]["BadRequest"];
3272
+ 403: components["responses"]["Forbidden"];
2444
3273
  404: components["responses"]["NotFound"];
3274
+ 409: components["responses"]["Conflict"];
2445
3275
  };
2446
3276
  };
2447
3277
  deleteEmbeddingCredential: {
@@ -2451,7 +3281,7 @@ export interface operations {
2451
3281
  path: {
2452
3282
  /**
2453
3283
  * @description The DECLARED embedding-service name from `embeddings.services[]`
2454
- * (FR-023) — not the provider. A provider is not an identity: two
3284
+ * — not the provider. A provider is not an identity: two
2455
3285
  * services may share one, and the credential keys to a declaration that
2456
3286
  * exists. The provider is resolved from that declaration server-side.
2457
3287
  */
@@ -2474,10 +3304,36 @@ export interface operations {
2474
3304
  listRuntimeRecords: {
2475
3305
  parameters: {
2476
3306
  query?: {
3307
+ /** @description Page size, capped at 200. `0` is an empty page, not an error. */
2477
3308
  limit?: number;
2478
3309
  offset?: number;
2479
- sort_by?: string;
2480
- sort_dir?: "asc" | "desc";
3310
+ /**
3311
+ * @description Per-field filters, e.g. `filters[status]=open`. A value is one of three spellings:
3312
+ *
3313
+ * - a bare scalar — shorthand for `{"op":"eq","value":<scalar>}`;
3314
+ * - a JSON-encoded `{"op":…,"value":…}` — one operator;
3315
+ * - a JSON-encoded array of those — an AND of operators within the field.
3316
+ *
3317
+ * `op` is one of `eq`, `neq`, `contains`, `startsWith`, `endsWith`, `gt`, `gte`, `lt`,
3318
+ * `lte`, `between`, `in`, `not_in`, `before`, `after`, `is_empty`, `is_not_empty`; an
3319
+ * unknown one is a 400 `invalid_filter_operator`. Operator-versus-field-type validation
3320
+ * is NOT applied server-side.
3321
+ *
3322
+ * The bracket-expanded spelling of the last two — `filters[f][op]=gt&filters[f][value]=3`
3323
+ * — is accepted and equivalent, which is why the value schema is unconstrained: all three
3324
+ * documented spellings are strings, and that one is not.
3325
+ */
3326
+ filters?: {
3327
+ [key: string]: unknown;
3328
+ };
3329
+ /**
3330
+ * @description JSON-encoded `[{field, dir}]`, e.g. `sort=[{"field":"created_at","dir":"desc"}]`.
3331
+ * `dir` is `asc` or `desc`; an unknown field or an unknown direction is a 400.
3332
+ * Absent (or `[]`), the list is ordered by the entity's declared `default_sort`, and by
3333
+ * `created_at` newest first when it declares none. A `sort` sent here replaces the
3334
+ * declared one outright; the two are never merged.
3335
+ */
3336
+ sort?: string;
2481
3337
  };
2482
3338
  header?: never;
2483
3339
  path: {
@@ -2488,6 +3344,7 @@ export interface operations {
2488
3344
  requestBody?: never;
2489
3345
  responses: {
2490
3346
  200: components["responses"]["OkEnvelope"];
3347
+ 400: components["responses"]["BadRequest"];
2491
3348
  };
2492
3349
  };
2493
3350
  createRuntimeRecord: {
@@ -2495,7 +3352,7 @@ export interface operations {
2495
3352
  query?: never;
2496
3353
  header?: {
2497
3354
  /**
2498
- * @description ADR-0127 US3 — the self-confirmation retry token from a prior `409
3355
+ * @description The self-confirmation retry token from a prior `409
2499
3356
  * confirmation_required` response. Re-submit the IDENTICAL write carrying
2500
3357
  * this header to proceed. The token is bound to the exact write
2501
3358
  * (tenant/actor/contract-version/action/entity/verb/record/params) and
@@ -2508,7 +3365,11 @@ export interface operations {
2508
3365
  };
2509
3366
  cookie?: never;
2510
3367
  };
2511
- requestBody: components["requestBodies"]["JsonObject"];
3368
+ requestBody: {
3369
+ content: {
3370
+ "application/json": components["schemas"]["RuntimeRecordCreateBody"];
3371
+ };
3372
+ };
2512
3373
  responses: {
2513
3374
  201: components["responses"]["OkEnvelope"];
2514
3375
  400: components["responses"]["ActionRequired"];
@@ -2537,7 +3398,7 @@ export interface operations {
2537
3398
  query?: never;
2538
3399
  header?: {
2539
3400
  /**
2540
- * @description ADR-0127 US3 — the self-confirmation retry token from a prior `409
3401
+ * @description The self-confirmation retry token from a prior `409
2541
3402
  * confirmation_required` response. Re-submit the IDENTICAL write carrying
2542
3403
  * this header to proceed. The token is bound to the exact write
2543
3404
  * (tenant/actor/contract-version/action/entity/verb/record/params) and
@@ -2564,7 +3425,7 @@ export interface operations {
2564
3425
  query?: never;
2565
3426
  header?: {
2566
3427
  /**
2567
- * @description ADR-0127 US3 — the self-confirmation retry token from a prior `409
3428
+ * @description The self-confirmation retry token from a prior `409
2568
3429
  * confirmation_required` response. Re-submit the IDENTICAL write carrying
2569
3430
  * this header to proceed. The token is bound to the exact write
2570
3431
  * (tenant/actor/contract-version/action/entity/verb/record/params) and
@@ -2578,7 +3439,11 @@ export interface operations {
2578
3439
  };
2579
3440
  cookie?: never;
2580
3441
  };
2581
- requestBody: components["requestBodies"]["JsonObject"];
3442
+ requestBody: {
3443
+ content: {
3444
+ "application/json": components["schemas"]["RuntimeRecordPatchBody"];
3445
+ };
3446
+ };
2582
3447
  responses: {
2583
3448
  200: components["responses"]["OkEnvelope"];
2584
3449
  400: components["responses"]["ActionRequired"];
@@ -2610,7 +3475,17 @@ export interface operations {
2610
3475
  };
2611
3476
  requestBody?: never;
2612
3477
  responses: {
2613
- 200: components["responses"]["OkEnvelope"];
3478
+ /** @description The tenant's state-machine instances. */
3479
+ 200: {
3480
+ headers: {
3481
+ [name: string]: unknown;
3482
+ };
3483
+ content: {
3484
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3485
+ data: components["schemas"]["StateMachineInstanceList"];
3486
+ };
3487
+ };
3488
+ };
2614
3489
  };
2615
3490
  };
2616
3491
  getStateMachineInstance: {
@@ -2624,7 +3499,17 @@ export interface operations {
2624
3499
  };
2625
3500
  requestBody?: never;
2626
3501
  responses: {
2627
- 200: components["responses"]["OkEnvelope"];
3502
+ /** @description One state-machine instance. */
3503
+ 200: {
3504
+ headers: {
3505
+ [name: string]: unknown;
3506
+ };
3507
+ content: {
3508
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3509
+ data: components["schemas"]["StateMachineInstance"];
3510
+ };
3511
+ };
3512
+ };
2628
3513
  404: components["responses"]["NotFound"];
2629
3514
  };
2630
3515
  };
@@ -2640,7 +3525,18 @@ export interface operations {
2640
3525
  };
2641
3526
  requestBody?: never;
2642
3527
  responses: {
2643
- 200: components["responses"]["OkEnvelope"];
3528
+ /** @description The transition log. */
3529
+ 200: {
3530
+ headers: {
3531
+ [name: string]: unknown;
3532
+ };
3533
+ content: {
3534
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3535
+ data: components["schemas"]["StateMachineEventList"];
3536
+ };
3537
+ };
3538
+ };
3539
+ 400: components["responses"]["BadRequest"];
2644
3540
  };
2645
3541
  };
2646
3542
  getStateMachineEvent: {
@@ -2654,15 +3550,25 @@ export interface operations {
2654
3550
  };
2655
3551
  requestBody?: never;
2656
3552
  responses: {
2657
- 200: components["responses"]["OkEnvelope"];
3553
+ /** @description One recorded transition. */
3554
+ 200: {
3555
+ headers: {
3556
+ [name: string]: unknown;
3557
+ };
3558
+ content: {
3559
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3560
+ data: components["schemas"]["StateMachineEvent"];
3561
+ };
3562
+ };
3563
+ };
2658
3564
  404: components["responses"]["NotFound"];
2659
3565
  };
2660
3566
  };
2661
3567
  listTransitionRequests: {
2662
3568
  parameters: {
2663
3569
  query?: {
2664
- status?: "pending" | "approved" | "rejected";
2665
- role?: string;
3570
+ status?: components["schemas"]["TransitionRequestStatus"];
3571
+ roles?: string[];
2666
3572
  };
2667
3573
  header?: never;
2668
3574
  path?: never;
@@ -2670,7 +3576,18 @@ export interface operations {
2670
3576
  };
2671
3577
  requestBody?: never;
2672
3578
  responses: {
2673
- 200: components["responses"]["OkEnvelope"];
3579
+ /** @description The transition requests visible to the caller. */
3580
+ 200: {
3581
+ headers: {
3582
+ [name: string]: unknown;
3583
+ };
3584
+ content: {
3585
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3586
+ data: components["schemas"]["TransitionRequestList"];
3587
+ };
3588
+ };
3589
+ };
3590
+ 400: components["responses"]["BadRequest"];
2674
3591
  };
2675
3592
  };
2676
3593
  createTransitionRequest: {
@@ -2680,9 +3597,84 @@ export interface operations {
2680
3597
  path?: never;
2681
3598
  cookie?: never;
2682
3599
  };
2683
- requestBody: components["requestBodies"]["JsonObject"];
3600
+ requestBody: {
3601
+ content: {
3602
+ "application/json": components["schemas"]["TransitionRequestCreateBody"];
3603
+ };
3604
+ };
2684
3605
  responses: {
2685
- 201: components["responses"]["OkEnvelope"];
3606
+ /** @description The created request. */
3607
+ 201: {
3608
+ headers: {
3609
+ [name: string]: unknown;
3610
+ };
3611
+ content: {
3612
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3613
+ data: components["schemas"]["TransitionRequest"];
3614
+ };
3615
+ };
3616
+ };
3617
+ /**
3618
+ * @description The body is malformed, it carries a server-owned key (`required_roles`, `instance_id`, `flow_instance_id` — see the body schema), or the contract declares no transition `current_state` → `requested_transition` for `entity_name`.`field_name`. A rule-passing edge that declares `requires_reason` and got no `reason` is also a 400, under its own `error.code` of `reason_required`.
3619
+ * Also 400 when the rule-passing edges' approver set is empty once the `owner` pseudo-role is stripped: `owner` is a per-record ownership gate, never an assignable authority someone else holds to approve on the actor's behalf. An owner-only edge is performed by its owner, not requested; a request for it could never be resolved.
3620
+ */
3621
+ 400: {
3622
+ headers: {
3623
+ [name: string]: unknown;
3624
+ };
3625
+ content: {
3626
+ "application/json": components["schemas"]["ErrorResponse"];
3627
+ };
3628
+ };
3629
+ /**
3630
+ * @description The caller may not RAISE a request for this record's field (`error.code` = `transition_request_not_permitted`).
3631
+ * The authority required is `update` on the field, for that record: the authority to ask for a transition IS the authority to update the field. It is deliberately NOT the edge's `allowed_roles`: those are the APPROVER set, and an actor holding them would have no reason to request.
3632
+ * ONE opaque refusal whichever clause failed — no grant, an owner-scoped grant on another actor's record, a grant whose field list does not open this field, or no such record. Those are four different facts about a record the caller may not be able to read, so the response distinguishes none of them.
3633
+ * Answered BEFORE any per-record read, so an unauthorized caller learns nothing from the 409s and 422 below, each of which discriminates on the record.
3634
+ */
3635
+ 403: {
3636
+ headers: {
3637
+ [name: string]: unknown;
3638
+ };
3639
+ content: {
3640
+ "application/json": components["schemas"]["ErrorResponse"];
3641
+ };
3642
+ };
3643
+ /**
3644
+ * @description The entity/field declares no state machine at all, the record is in a state other than the `current_state` the body asserts — re-read the record and retry — or the edge's rules could not be evaluated at all.
3645
+ * A record whose field has never ENTERED its state machine is not a refusal: the machine is started at the contract's `initial` state, so a first transition is possible here too. When the body's state the machine started at, because "re-read and retry" is unactionable for a field whose only readable value is the one just sent.
3646
+ * That last cause is deliberately not separable from a missing record, and — like the 422 — is reachable only when the matching edges disagree about who may approve, which is the one shape whose answer needs the record. The rules are then evaluated under the caller's own `read` grants, the same decision `GET /runtime/records/{entity}/{id}` makes, so it is the answer when the record is gone, when the caller holds no grant on its entity or on one the rules reference, and when the grant is owner-scoped and the record is someone else's. A status telling those apart would answer an existence question about a READ this operation never authorized — its authority check establishes only that the caller may UPDATE the field. It is a 409 rather than a 500 because every one of those causes is deterministic and 500 is a retryable status for the first-party SDK.
3647
+ */
3648
+ 409: {
3649
+ headers: {
3650
+ [name: string]: unknown;
3651
+ };
3652
+ content: {
3653
+ "application/json": components["schemas"]["ErrorResponse"];
3654
+ };
3655
+ };
3656
+ /**
3657
+ * @description The contract declares edges for `current_state` → `requested_transition` that DISAGREE about who may approve, and none of their rules pass for this record — so there is no approver set to write (`error.code` = `business_rules_failed`).
3658
+ * Reachable only for that shape. The request's `required_roles` is the union over the edges whose rules pass, and when every matching edge names the same approvers that union is decided by the contract alone, so no rule is evaluated, no record is read, and a request is created whichever way the rules would have gone.
3659
+ * The refusal names the edge and NOT the rule that failed, unlike the same code on `PATCH .../transition-requests/{id}` — that surface checks the caller's roles against the request's `required_roles` first. This one never intersects the caller against an approver set; it has an `update` authority check, which is a different question, so the failing rule's operands stay withheld.
3660
+ */
3661
+ 422: {
3662
+ headers: {
3663
+ [name: string]: unknown;
3664
+ };
3665
+ content: {
3666
+ "application/json": components["schemas"]["ErrorResponse"];
3667
+ };
3668
+ };
3669
+ /** @description The contract could not be READ at all — the rule gate faulted — so the approver set for this edge is underivable, and the request is REFUSED rather than created: the server does not fall back to the body's own `required_roles`, which would fail open. A server fault, and retrying it is right; the deterministic "could not be evaluated" cases are the 409 above. */
3670
+ 500: {
3671
+ headers: {
3672
+ [name: string]: unknown;
3673
+ };
3674
+ content: {
3675
+ "application/json": components["schemas"]["ErrorResponse"];
3676
+ };
3677
+ };
2686
3678
  };
2687
3679
  };
2688
3680
  getTransitionRequest: {
@@ -2696,7 +3688,17 @@ export interface operations {
2696
3688
  };
2697
3689
  requestBody?: never;
2698
3690
  responses: {
2699
- 200: components["responses"]["OkEnvelope"];
3691
+ /** @description One transition request. */
3692
+ 200: {
3693
+ headers: {
3694
+ [name: string]: unknown;
3695
+ };
3696
+ content: {
3697
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3698
+ data: components["schemas"]["TransitionRequest"];
3699
+ };
3700
+ };
3701
+ };
2700
3702
  404: components["responses"]["NotFound"];
2701
3703
  };
2702
3704
  };
@@ -2709,9 +3711,23 @@ export interface operations {
2709
3711
  };
2710
3712
  cookie?: never;
2711
3713
  };
2712
- requestBody: components["requestBodies"]["JsonObject"];
3714
+ requestBody: {
3715
+ content: {
3716
+ "application/json": components["schemas"]["TransitionRequestResolveBody"];
3717
+ };
3718
+ };
2713
3719
  responses: {
2714
- 200: components["responses"]["OkEnvelope"];
3720
+ /** @description The resolved request. */
3721
+ 200: {
3722
+ headers: {
3723
+ [name: string]: unknown;
3724
+ };
3725
+ content: {
3726
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3727
+ data: components["schemas"]["TransitionRequest"];
3728
+ };
3729
+ };
3730
+ };
2715
3731
  };
2716
3732
  };
2717
3733
  dispatchAction: {
@@ -2719,7 +3735,7 @@ export interface operations {
2719
3735
  query?: never;
2720
3736
  header?: {
2721
3737
  /**
2722
- * @description ADR-0127 US3 — the self-confirmation retry token from a prior `409
3738
+ * @description The self-confirmation retry token from a prior `409
2723
3739
  * confirmation_required` response. Re-submit the IDENTICAL write carrying
2724
3740
  * this header to proceed. The token is bound to the exact write
2725
3741
  * (tenant/actor/contract-version/action/entity/verb/record/params) and
@@ -2735,16 +3751,7 @@ export interface operations {
2735
3751
  };
2736
3752
  requestBody?: {
2737
3753
  content: {
2738
- "application/json": {
2739
- /** @description Required for read/update/delete verbs; null/omitted for create/list (entity-level). */
2740
- record_id?: number | string | null;
2741
- /** @description Forwarded to the underlying entity intent. */
2742
- payload?: {
2743
- [key: string]: unknown;
2744
- };
2745
- /** @description V1 wire-format pass-through; server-side dedup deferred. */
2746
- idempotency_key?: string;
2747
- };
3754
+ "application/json": components["schemas"]["ActionDispatchBody"];
2748
3755
  };
2749
3756
  };
2750
3757
  responses: {
@@ -2760,7 +3767,7 @@ export interface operations {
2760
3767
  data: {
2761
3768
  [key: string]: unknown;
2762
3769
  } | null;
2763
- /** @description ADR-0085 telemetry tag — action name as resolved. */
3770
+ /** @description Telemetry tag — action name as resolved. */
2764
3771
  resolved_via_action: string;
2765
3772
  };
2766
3773
  };
@@ -2808,7 +3815,18 @@ export interface operations {
2808
3815
  };
2809
3816
  requestBody?: never;
2810
3817
  responses: {
2811
- 200: components["responses"]["OkEnvelope"];
3818
+ /** @description The runs visible to the caller. */
3819
+ 200: {
3820
+ headers: {
3821
+ [name: string]: unknown;
3822
+ };
3823
+ content: {
3824
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3825
+ data: components["schemas"]["FlowInstance"][];
3826
+ };
3827
+ };
3828
+ };
3829
+ 400: components["responses"]["BadRequest"];
2812
3830
  };
2813
3831
  };
2814
3832
  getFlowInstance: {
@@ -2822,7 +3840,17 @@ export interface operations {
2822
3840
  };
2823
3841
  requestBody?: never;
2824
3842
  responses: {
2825
- 200: components["responses"]["OkEnvelope"];
3843
+ /** @description One flow run. */
3844
+ 200: {
3845
+ headers: {
3846
+ [name: string]: unknown;
3847
+ };
3848
+ content: {
3849
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3850
+ data: components["schemas"]["FlowInstance"];
3851
+ };
3852
+ };
3853
+ };
2826
3854
  404: components["responses"]["NotFound"];
2827
3855
  };
2828
3856
  };
@@ -2832,7 +3860,7 @@ export interface operations {
2832
3860
  /** @description Only events belonging to this flow instance. */
2833
3861
  instance_id?: string;
2834
3862
  /** @description Only events of this kind. An unrecognised kind is refused `400` rather than silently matching nothing. */
2835
- event_type?: "FlowStarted" | "FlowStepCompleted" | "FlowStepFailed" | "FlowStepSkipped" | "FlowStepAlreadyCompleted" | "FlowPaused" | "FlowResumed" | "FlowCompleted" | "FlowFailed" | "FlowConstraintViolated" | "FlowConstraintUnverifiable";
3863
+ event_type?: components["schemas"]["FlowEventKind"];
2836
3864
  };
2837
3865
  header?: never;
2838
3866
  path?: never;
@@ -2840,7 +3868,17 @@ export interface operations {
2840
3868
  };
2841
3869
  requestBody?: never;
2842
3870
  responses: {
2843
- 200: components["responses"]["OkEnvelope"];
3871
+ /** @description The lifecycle log visible to the caller, in chain (`seq`) order. */
3872
+ 200: {
3873
+ headers: {
3874
+ [name: string]: unknown;
3875
+ };
3876
+ content: {
3877
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3878
+ data: components["schemas"]["FlowEvent"][];
3879
+ };
3880
+ };
3881
+ };
2844
3882
  400: components["responses"]["BadRequest"];
2845
3883
  };
2846
3884
  };
@@ -2855,7 +3893,17 @@ export interface operations {
2855
3893
  };
2856
3894
  requestBody?: never;
2857
3895
  responses: {
2858
- 200: components["responses"]["OkEnvelope"];
3896
+ /** @description One flow lifecycle event. */
3897
+ 200: {
3898
+ headers: {
3899
+ [name: string]: unknown;
3900
+ };
3901
+ content: {
3902
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3903
+ data: components["schemas"]["FlowEvent"];
3904
+ };
3905
+ };
3906
+ };
2859
3907
  404: components["responses"]["NotFound"];
2860
3908
  };
2861
3909
  };
@@ -2868,7 +3916,17 @@ export interface operations {
2868
3916
  };
2869
3917
  requestBody?: never;
2870
3918
  responses: {
2871
- 200: components["responses"]["OkEnvelope"];
3919
+ /** @description The tenant's flow callbacks. */
3920
+ 200: {
3921
+ headers: {
3922
+ [name: string]: unknown;
3923
+ };
3924
+ content: {
3925
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3926
+ data: components["schemas"]["FlowCallback"][];
3927
+ };
3928
+ };
3929
+ };
2872
3930
  };
2873
3931
  };
2874
3932
  getFlowCallback: {
@@ -2882,7 +3940,17 @@ export interface operations {
2882
3940
  };
2883
3941
  requestBody?: never;
2884
3942
  responses: {
2885
- 200: components["responses"]["OkEnvelope"];
3943
+ /** @description One flow callback. */
3944
+ 200: {
3945
+ headers: {
3946
+ [name: string]: unknown;
3947
+ };
3948
+ content: {
3949
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3950
+ data: components["schemas"]["FlowCallback"];
3951
+ };
3952
+ };
3953
+ };
2886
3954
  404: components["responses"]["NotFound"];
2887
3955
  };
2888
3956
  };
@@ -2895,20 +3963,26 @@ export interface operations {
2895
3963
  };
2896
3964
  cookie?: never;
2897
3965
  };
2898
- requestBody: components["requestBodies"]["JsonObject"];
3966
+ requestBody: {
3967
+ content: {
3968
+ "application/json": components["schemas"]["FlowCallbackResolveBody"];
3969
+ };
3970
+ };
2899
3971
  responses: {
2900
- /** @description Flat callback-resolution ack (success + optional message). */
3972
+ /** @description The resolved callback. */
2901
3973
  200: {
2902
3974
  headers: {
2903
3975
  [name: string]: unknown;
2904
3976
  };
2905
3977
  content: {
2906
- "application/json": {
2907
- success: boolean;
2908
- message?: string;
3978
+ "application/json": components["schemas"]["SuccessEnvelope"] & {
3979
+ data: components["schemas"]["FlowCallback"];
2909
3980
  };
2910
3981
  };
2911
3982
  };
3983
+ 400: components["responses"]["BadRequest"];
3984
+ 401: components["responses"]["Unauthorized"];
3985
+ 404: components["responses"]["NotFound"];
2912
3986
  };
2913
3987
  };
2914
3988
  listEventSubscriptions: {
@@ -2930,7 +4004,11 @@ export interface operations {
2930
4004
  path?: never;
2931
4005
  cookie?: never;
2932
4006
  };
2933
- requestBody: components["requestBodies"]["JsonObject"];
4007
+ requestBody: {
4008
+ content: {
4009
+ "application/json": components["schemas"]["EventSubscriptionCreateBody"];
4010
+ };
4011
+ };
2934
4012
  responses: {
2935
4013
  201: components["responses"]["OkEnvelope"];
2936
4014
  };
@@ -2973,7 +4051,11 @@ export interface operations {
2973
4051
  };
2974
4052
  cookie?: never;
2975
4053
  };
2976
- requestBody: components["requestBodies"]["JsonObject"];
4054
+ requestBody: {
4055
+ content: {
4056
+ "application/json": components["schemas"]["EventSubscriptionPatchBody"];
4057
+ };
4058
+ };
2977
4059
  responses: {
2978
4060
  200: components["responses"]["OkEnvelope"];
2979
4061
  };
@@ -3008,11 +4090,12 @@ export interface operations {
3008
4090
  listConversationSessions: {
3009
4091
  parameters: {
3010
4092
  query?: {
3011
- /** @description Declared channel name (tenant `channels:` section, ADR-0133) */
3012
- channel_name?: string;
4093
+ /** @description Declared channel name (tenant `channels:` section). A malformed value is a 400; it is not DISCARDED, which would answer 200 with every session the actor owns on every channel — a filter the caller asked for and did not get. */
4094
+ channel_name?: components["schemas"]["NonReservedChannelName"];
3013
4095
  status?: "active" | "expired" | "cleared";
3014
4096
  from?: string;
3015
4097
  to?: string;
4098
+ /** @description Page size, clamped to 100. `0` is an empty page, not an error. */
3016
4099
  limit?: number;
3017
4100
  offset?: number;
3018
4101
  };
@@ -3023,6 +4106,7 @@ export interface operations {
3023
4106
  requestBody?: never;
3024
4107
  responses: {
3025
4108
  200: components["responses"]["OkEnvelope"];
4109
+ 400: components["responses"]["BadRequest"];
3026
4110
  };
3027
4111
  };
3028
4112
  createConversationSession: {
@@ -3032,10 +4116,15 @@ export interface operations {
3032
4116
  path?: never;
3033
4117
  cookie?: never;
3034
4118
  };
3035
- requestBody: components["requestBodies"]["JsonObject"];
4119
+ requestBody: {
4120
+ content: {
4121
+ "application/json": components["schemas"]["ConversationSessionCreateBody"];
4122
+ };
4123
+ };
3036
4124
  responses: {
3037
4125
  201: components["responses"]["OkEnvelope"];
3038
4126
  400: components["responses"]["BadRequest"];
4127
+ 403: components["responses"]["Forbidden"];
3039
4128
  404: components["responses"]["NotFound"];
3040
4129
  409: components["responses"]["Conflict"];
3041
4130
  };
@@ -3152,7 +4241,11 @@ export interface operations {
3152
4241
  };
3153
4242
  cookie?: never;
3154
4243
  };
3155
- requestBody: components["requestBodies"]["JsonObject"];
4244
+ requestBody?: {
4245
+ content: {
4246
+ "application/json": components["schemas"]["ChannelBindingVerifyBody"];
4247
+ };
4248
+ };
3156
4249
  responses: {
3157
4250
  200: components["responses"]["OkEnvelope"];
3158
4251
  /** @description Missing the system action — `error.code='verify_channel_binding_required'` */
@@ -3185,10 +4278,14 @@ export interface operations {
3185
4278
  path?: never;
3186
4279
  cookie?: never;
3187
4280
  };
3188
- requestBody: components["requestBodies"]["JsonObject"];
4281
+ requestBody: {
4282
+ content: {
4283
+ "application/json": components["schemas"]["RoleAssignmentCreateBody"];
4284
+ };
4285
+ };
3189
4286
  responses: {
3190
4287
  201: components["responses"]["OkEnvelope"];
3191
- /** @description Owner-marked role — `error.code='owner_role_protected'` (ADR-0102 S4) */
4288
+ /** @description Owner-marked role — `error.code='owner_role_protected'` */
3192
4289
  403: {
3193
4290
  headers: {
3194
4291
  [name: string]: unknown;
@@ -3221,7 +4318,7 @@ export interface operations {
3221
4318
  requestBody?: never;
3222
4319
  responses: {
3223
4320
  200: components["responses"]["OkEnvelope"];
3224
- /** @description Owner-marked role — `error.code='owner_role_protected'` (ADR-0102 S4) */
4321
+ /** @description Owner-marked role — `error.code='owner_role_protected'` */
3225
4322
  403: {
3226
4323
  headers: {
3227
4324
  [name: string]: unknown;
@@ -3239,12 +4336,16 @@ export interface operations {
3239
4336
  path?: never;
3240
4337
  cookie?: never;
3241
4338
  };
3242
- requestBody: components["requestBodies"]["JsonObject"];
4339
+ requestBody: {
4340
+ content: {
4341
+ "application/json": components["schemas"]["ConversationSendBody"];
4342
+ };
4343
+ };
3243
4344
  responses: {
3244
4345
  /**
3245
4346
  * @description Cognitive-agent reply — a **flat** body (`success` + `message` +
3246
4347
  * optional intent/clarification fields), NOT envelope-wrapped. The SDK
3247
- * returns it whole (codegen-unwrap: no-unwrap).
4348
+ * returns it whole.
3248
4349
  */
3249
4350
  200: {
3250
4351
  headers: {
@@ -3264,7 +4365,11 @@ export interface operations {
3264
4365
  };
3265
4366
  };
3266
4367
  };
4368
+ 400: components["responses"]["BadRequest"];
4369
+ 403: components["responses"]["Forbidden"];
3267
4370
  404: components["responses"]["NotFound"];
4371
+ 412: components["responses"]["PreconditionFailed"];
4372
+ 429: components["responses"]["TooManyRequests"];
3268
4373
  };
3269
4374
  };
3270
4375
  runtimeChannelsMint: {
@@ -3291,7 +4396,7 @@ export interface operations {
3291
4396
  };
3292
4397
  /**
3293
4398
  * @description `MINT_CLAIM_REJECTED` — the body carried a role/privilege claim, or
3294
- * any key other than `party_ref`. Refused before the mint (QI-003).
4399
+ * any key other than `party_ref`. Refused before the mint.
3295
4400
  */
3296
4401
  422: {
3297
4402
  headers: {
@@ -3340,7 +4445,7 @@ export interface operations {
3340
4445
  query?: never;
3341
4446
  header?: never;
3342
4447
  path: {
3343
- /** @description Egress directive id (ADR-0133 §B.4) */
4448
+ /** @description Egress directive id */
3344
4449
  id: components["parameters"]["ChannelDirectiveIdPath"];
3345
4450
  };
3346
4451
  cookie?: never;
@@ -3359,10 +4464,7 @@ export interface operations {
3359
4464
  "application/json": components["schemas"]["ChannelDirectiveContent"];
3360
4465
  };
3361
4466
  };
3362
- /**
3363
- * @description The directive belongs to another channel — refused, never readable
3364
- * (QI-006).
3365
- */
4467
+ /** @description The directive belongs to another channel — refused, never readable. */
3366
4468
  403: {
3367
4469
  headers: {
3368
4470
  [name: string]: unknown;
@@ -3391,7 +4493,7 @@ export interface operations {
3391
4493
  query?: never;
3392
4494
  header?: never;
3393
4495
  path: {
3394
- /** @description Egress directive id (ADR-0133 §B.4) */
4496
+ /** @description Egress directive id */
3395
4497
  id: components["parameters"]["ChannelDirectiveIdPath"];
3396
4498
  };
3397
4499
  cookie?: never;
@@ -3415,7 +4517,7 @@ export interface operations {
3415
4517
  };
3416
4518
  };
3417
4519
  400: components["responses"]["BadRequest"];
3418
- /** @description The directive belongs to another channel — refused (QI-006). */
4520
+ /** @description The directive belongs to another channel — refused. */
3419
4521
  403: {
3420
4522
  headers: {
3421
4523
  [name: string]: unknown;
@@ -3484,8 +4586,8 @@ export interface operations {
3484
4586
  admin_sections: string[];
3485
4587
  system_actions: string[];
3486
4588
  /**
3487
- * @description ADR-0102 S5b-a (FR-012): bounds carried by the actor's
3488
- * matched CONDITIONED system grants (e.g. the Cat-2
4589
+ * @description Bounds carried by the actor's
4590
+ * matched CONDITIONED system grants (e.g. the
3489
4591
  * provider allow-lists on `manage_credentials`). Present
3490
4592
  * only when at least one matched grant is bounded.
3491
4593
  */
@@ -3496,25 +4598,25 @@ export interface operations {
3496
4598
  entity: string;
3497
4599
  actions: string[];
3498
4600
  /**
3499
- * @description The scope the write floor will enforce for each reported action.
3500
- * `full` reaches every row; `owner` reaches only rows the caller
4601
+ * @description The scope the server will enforce for each reported action.
4602
+ * `full` reaches every record; `owner` reaches only records the caller
3501
4603
  * owns, so an affordance rendered from an `owner` action must be
3502
- * gated on the row's owner or it will meet a 403.
4604
+ * gated on the record's owner or it will meet a 403.
3503
4605
  */
3504
4606
  scope_by_action: {
3505
4607
  [key: string]: "full" | "owner";
3506
4608
  };
3507
4609
  /**
3508
- * @description The fields each action opens, ON A ROW THE CALLER OWNS — the widest
3509
- * set any single row admits, since ownership is a property of a row
4610
+ * @description The fields each action opens, ON A RECORD THE CALLER OWNS — the widest
4611
+ * set any single record admits, since ownership is a property of a record
3510
4612
  * and this endpoint is asked about an entity. ABSENT means all
3511
4613
  * fields; it never means none. An EMPTY list means exactly none, and
3512
4614
  * is emitted rather than dropped: a policy may grant the scope while
3513
- * opening no field (`fields: []`), and the write floor then refuses
4615
+ * opening no field (`fields: []`), and the server then refuses
3514
4616
  * every field. Absence and `[]` are opposite answers and both are
3515
4617
  * reachable. Read together with `scope_by_action`: where an `owner`
3516
4618
  * grant contributed, that part of the list applies only to the
3517
- * caller's own rows.
4619
+ * caller's own records.
3518
4620
  */
3519
4621
  fields_by_action: {
3520
4622
  [key: string]: string[] | null;
@@ -3586,7 +4688,11 @@ export interface operations {
3586
4688
  path?: never;
3587
4689
  cookie?: never;
3588
4690
  };
3589
- requestBody: components["requestBodies"]["JsonObject"];
4691
+ requestBody: {
4692
+ content: {
4693
+ "application/json": components["schemas"]["ToolCallBody"];
4694
+ };
4695
+ };
3590
4696
  responses: {
3591
4697
  200: components["responses"]["OkEnvelope"];
3592
4698
  };
@@ -3705,7 +4811,11 @@ export interface operations {
3705
4811
  path?: never;
3706
4812
  cookie?: never;
3707
4813
  };
3708
- requestBody: components["requestBodies"]["JsonObject"];
4814
+ requestBody: {
4815
+ content: {
4816
+ "application/json": components["schemas"]["StateMachineReplayBody"];
4817
+ };
4818
+ };
3709
4819
  responses: {
3710
4820
  200: components["responses"]["OkEnvelope"];
3711
4821
  };
@@ -3787,7 +4897,11 @@ export interface operations {
3787
4897
  };
3788
4898
  cookie?: never;
3789
4899
  };
3790
- requestBody: components["requestBodies"]["JsonObject"];
4900
+ requestBody: {
4901
+ content: {
4902
+ "application/json": components["schemas"]["TraceReplayBody"];
4903
+ };
4904
+ };
3791
4905
  responses: {
3792
4906
  200: components["responses"]["OkEnvelope"];
3793
4907
  /** @description trace_not_found / legacy_trace_not_available */
@@ -3923,7 +5037,7 @@ export interface operations {
3923
5037
  };
3924
5038
  header?: never;
3925
5039
  path: {
3926
- /** @description The audit row-table to list. */
5040
+ /** @description The audit log to list. */
3927
5041
  log: "binding_violations" | "topic_refusals";
3928
5042
  };
3929
5043
  cookie?: never;
@@ -3966,7 +5080,11 @@ export interface operations {
3966
5080
  path?: never;
3967
5081
  cookie?: never;
3968
5082
  };
3969
- requestBody: components["requestBodies"]["JsonObject"];
5083
+ requestBody: {
5084
+ content: {
5085
+ "application/json": components["schemas"]["SnapshotImportBody"];
5086
+ };
5087
+ };
3970
5088
  responses: {
3971
5089
  200: components["responses"]["OkEnvelope"];
3972
5090
  };
@@ -3980,7 +5098,11 @@ export interface operations {
3980
5098
  };
3981
5099
  cookie?: never;
3982
5100
  };
3983
- requestBody: components["requestBodies"]["JsonObject"];
5101
+ requestBody: {
5102
+ content: {
5103
+ "application/json": components["schemas"]["BulkImportBody"];
5104
+ };
5105
+ };
3984
5106
  responses: {
3985
5107
  200: components["responses"]["OkEnvelope"];
3986
5108
  };