@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
@@ -23,7 +23,7 @@ export interface FieldToolDefinition {
23
23
  /**
24
24
  * The effective display field of the *referenced* entity for a
25
25
  * reference/reference[] field — the field a client labels/searches the target
26
- * by (ADR-0134 T007). Resolved server-side; omitted when unresolvable.
26
+ * by. Resolved server-side; omitted when unresolvable.
27
27
  * (Mirror of the contract-side `FieldToolDefinition` — kept in lockstep.)
28
28
  */
29
29
  display_field?: string;
@@ -51,7 +51,7 @@ export interface UserVisibleEntityTool {
51
51
  }
52
52
  /**
53
53
  * Per-edge projection of a `StateMachineTransition` exposed to UIs through
54
- * the catalog (spec 015 / M4). `requires_reason` is omitted when the
54
+ * the catalog. `requires_reason` is omitted when the
55
55
  * underlying flag is `false` or absent.
56
56
  */
57
57
  export interface TransitionEdge {
@@ -61,7 +61,7 @@ export interface TransitionEdge {
61
61
  }
62
62
  /**
63
63
  * Per-user projection of a state-machine `(entity, field)` transition tool
64
- * trio (ADR-0081). Carries the rendering inputs needed by the M4 UI surfaces
64
+ * trio. Carries the rendering inputs needed by the UI surfaces
65
65
  * (`<FieldTransitions>`, `<TransitionRequestQueue>`).
66
66
  */
67
67
  export interface UserVisibleTransitionTool {
@@ -77,13 +77,12 @@ export interface UserVisibleTransitionTool {
77
77
  inspect: boolean;
78
78
  }
79
79
  /**
80
- * Per-user projection of a YAML-declared `action` (ADR-0085) the user is
81
- * authorized to dispatch. Carries the rendering inputs needed by the M5 UI
80
+ * Per-user projection of a YAML-declared `action` the user is
81
+ * authorized to dispatch. Carries the rendering inputs needed by the UI
82
82
  * surfaces (`<EntityActions>`, `<EntityRecordActions>`).
83
83
  *
84
- * Emitted only when the action-surface-resolver returns `kind: 'action'` for
85
- * the underlying `(entity, verb)` pair under the user's capabilities. Hidden
86
- * and entity-fallback decisions are NOT projected.
84
+ * ONE ENTRY IN EITHER `actions[]` OR `dispatchable_actions[]` — the element type is shared and
85
+ * the RULE is not: `actions[]` is exposed AND granted, `dispatchable_actions[]` is granted.
87
86
  */
88
87
  export interface UserVisibleActionTool {
89
88
  /** Action name from YAML — unique within the tenant. */
@@ -96,14 +95,14 @@ export interface UserVisibleActionTool {
96
95
  description?: string;
97
96
  /** Dispatcher-recognised intent string — `action.<name>` or `external.<ns>.<tool>`. */
98
97
  intent_type: string;
99
- /** Whether the action is native (declared in tenant YAML) or external (ADR-0076). */
98
+ /** Whether the action is native (declared in tenant YAML) or external. */
100
99
  provenance: 'native' | 'external';
101
100
  }
102
101
  /**
103
102
  * Per-tenant role declaration. Always projected for every caller — read-only
104
103
  * metadata used by UIs to render role pickers and label other catalog
105
104
  * references. Editing is gated separately by the `roles` contract-section
106
- * policy (W3: surfaced to UIs via {@link UserToolCatalog.admin_sections}).
105
+ * policy (surfaced to UIs via {@link UserToolCatalog.admin_sections}).
107
106
  */
108
107
  export interface UserVisibleRole {
109
108
  name: string;
@@ -112,8 +111,8 @@ export interface UserVisibleRole {
112
111
  }
113
112
  /**
114
113
  * Per-tenant flow declaration projected for users with `inspect` policy on the
115
- * flow (open-by-default per ADR-0065). Only carries the rendering inputs the
116
- * dashboard sidebar needs — full editable shape is fetched elsewhere.
114
+ * flow (open by default). Only carries what a navigation list needs — the
115
+ * full editable shape is fetched from the contract API.
117
116
  */
118
117
  export interface UserVisibleFlow {
119
118
  name: string;
@@ -129,13 +128,11 @@ export interface UserVisibleSkill {
129
128
  description?: string;
130
129
  }
131
130
  /**
132
- * W3 — mirror of `@zarel-ai/contract`'s `CONTRACT_SECTION_NAMES`. The closed set
131
+ * Mirror of `@zarel-ai/contract`'s `CONTRACT_SECTION_NAMES`. The closed set
133
132
  * of contract sections; `UserToolCatalog.admin_sections` is a subset (the
134
- * sections the user can `update`). The SDK is published standalone and cannot
135
- * import the contract package, so this is a hand-maintained mirror — and it
136
- * DRIFTED: it named two roots that no longer exist and none of the nine that a
137
- * dissolution had created. The ADR-0136 QI-001 gate compared seven mirrors and
138
- * did not compare this one, which is why nothing said so. It does now.
133
+ * sections the user can `update`). The SDK has no dependencies and does not
134
+ * import the contract package, so this is a hand-maintained mirror: keep it
135
+ * equal to the contract package's list.
139
136
  */
140
137
  export declare const CONTRACT_SECTION_NAMES: readonly ["metadata", "entities", "roles", "skills", "actions", "schemas", "capabilities", "flows", "constraints", "events", "llm", "embeddings", "treatment", "channels", "channels/credentials", "mcp_servers", "quotas", "timezone", "process_model", "authorization"];
141
138
  export type ContractSectionName = typeof CONTRACT_SECTION_NAMES[number];
@@ -144,22 +141,33 @@ export interface UserToolCatalog {
144
141
  user_name: string;
145
142
  user_roles: string[];
146
143
  entities: UserVisibleEntityTool[];
147
- /** M4 / ADR-0081 trio-coupled state-machine projection. */
144
+ /** Trio-coupled state-machine projection. */
148
145
  transitions?: UserVisibleTransitionTool[];
149
- /** M5 / ADR-0085 per-user authorized action projection. */
146
+ /**
147
+ * THE TOOL SURFACE — every EXPOSED action, exactly the actions offered as MCP tools.
148
+ */
150
149
  actions?: UserVisibleActionTool[];
151
- /** Spec-042: declared roles in the tenant contract (read-only metadata). */
150
+ /**
151
+ * EVERY GRANTED action, exposure irrelevant — what may be DISPATCHED by name through
152
+ * `POST /runtime/actions/:name`.
153
+ *
154
+ * A UI offering action buttons reads THIS one, not `actions`. An unexposed action has no MCP
155
+ * tool and is still dispatchable, and the bare `/runtime/records` surface answers
156
+ * `action_required` for a verb that carries a named action — so a button missing here leaves
157
+ * the verb with no path at all.
158
+ */
159
+ dispatchable_actions?: UserVisibleActionTool[];
160
+ /** Declared roles in the tenant contract (read-only metadata). */
152
161
  roles: UserVisibleRole[];
153
- /** Spec-042: flows the user can `inspect` (ADR-0065 open-by-default). */
162
+ /** Flows the user can `inspect` (open by default). */
154
163
  flows: UserVisibleFlow[];
155
- /** Spec-042: skills whose YAML `constraints` evaluate true for the user. */
164
+ /** Skills whose YAML `constraints` evaluate true for the user. */
156
165
  skills: UserVisibleSkill[];
157
166
  /**
158
- * W3 (ADR-0102 §3 closure): contract sections the user can `update`. The
159
- * dashboard derives admin **mutation** pages (Roles, Skills, Flows,
160
- * Authorization/Policies, State-machines, Settings) and the admin-tier
161
- * pages (Imports, API-keys) from this, replacing the retired `edit_*` /
162
- * `manage_imports` / `manage_api_keys` capability codes.
167
+ * Contract sections the user can `update`. A UI can derive which admin
168
+ * **mutation** pages to offer (roles, skills, flows, authorization,
169
+ * state machines, settings) and the admin-tier pages (imports, API keys)
170
+ * from this.
163
171
  */
164
172
  admin_sections: ContractSectionName[];
165
173
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":"AAEA,MA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M,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright 2026 Nicolas Moreno
2
4
  // ── Tools ────────────────────────────────────────────────────────────────
3
5
  Object.defineProperty(exports, "__esModule", { value: true });
4
6
  exports.CONTRACT_SECTION_NAMES = void 0;
5
7
  /**
6
- * W3 — mirror of `@zarel-ai/contract`'s `CONTRACT_SECTION_NAMES`. The closed set
8
+ * Mirror of `@zarel-ai/contract`'s `CONTRACT_SECTION_NAMES`. The closed set
7
9
  * of contract sections; `UserToolCatalog.admin_sections` is a subset (the
8
- * sections the user can `update`). The SDK is published standalone and cannot
9
- * import the contract package, so this is a hand-maintained mirror — and it
10
- * DRIFTED: it named two roots that no longer exist and none of the nine that a
11
- * dissolution had created. The ADR-0136 QI-001 gate compared seven mirrors and
12
- * did not compare this one, which is why nothing said so. It does now.
10
+ * sections the user can `update`). The SDK has no dependencies and does not
11
+ * import the contract package, so this is a hand-maintained mirror: keep it
12
+ * equal to the contract package's list.
13
13
  */
14
14
  exports.CONTRACT_SECTION_NAMES = [
15
15
  'metadata', 'entities', 'roles', 'skills', 'actions', 'schemas',
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":";AAAA,4EAA4E;;;AA4I5E;;;;;;;;GAQG;AACU,QAAA,sBAAsB,GAAG;IAClC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;IAC/D,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ;IAChD,KAAK,EAAE,YAAY,EAAE,WAAW;IAChC,UAAU,EAAE,sBAAsB;IAClC,aAAa,EAAE,QAAQ,EAAE,UAAU;IACnC,eAAe,EAAE,eAAe;CAC1B,CAAC"}
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/types/tools.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,4EAA4E;;;AA2I5E;;;;;;GAMG;AACU,QAAA,sBAAsB,GAAG;IAClC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;IAC/D,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ;IAChD,KAAK,EAAE,YAAY,EAAE,WAAW;IAChC,UAAU,EAAE,sBAAsB;IAClC,aAAa,EAAE,QAAQ,EAAE,UAAU;IACnC,eAAe,EAAE,eAAe;CAC1B,CAAC"}
@@ -1,18 +1,15 @@
1
1
  /**
2
- * Trace observability types (Spec-020 US1).
2
+ * Trace observability types.
3
3
  *
4
- * Wire shapes mirror the runtime contract module's `Trace` / `TraceSummary`
5
- * (see authoring/packages/contract/src/domain/types/trace.ts). Keeping the
6
- * canonical-with-runtime surface here as plain interfaces avoids forcing
7
- * SDK consumers to depend on the runtime contract package.
4
+ * Wire shapes of the runtime API's trace responses, kept as plain interfaces
5
+ * with no dependencies.
8
6
  */
9
7
  /**
10
8
  * WHICH WINDOW a trace's timing fields were measured over.
11
9
  *
12
- * The listing and the single-trace read answer different questions about the same trace
13
- * and used to answer them silently: a conversation answered in 6 s whose webhook retry
14
- * settled at 40 s reported 6 s in the list and 40 s when opened. Both true; neither said
15
- * so. Each surface now declares its own.
10
+ * The listing and the single-trace read answer different questions about the same trace: a
11
+ * conversation answered in 6 s whose webhook retry settled at 40 s reports 6 s in the list and
12
+ * 40 s when opened. Both are true, so each surface declares its own basis.
16
13
  */
17
14
  export type TraceDurationBasis = 'anchor_evidence' | 'all_evidence';
18
15
  export type TraceOutcome = 'executed' | 'refused' | 'awaiting_human_decision' | 'failed';
@@ -1 +1 @@
1
- {"version":3,"file":"traces.d.ts","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG,cAAc,CAAC;AAEpE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,yBAAyB,GAAG,QAAQ,CAAC;AAEzF,MAAM,MAAM,UAAU,GAChB,YAAY,GACZ,gBAAgB,GAChB,UAAU,GACV,YAAY,GACZ,eAAe,GACf,MAAM,GACN,WAAW,GACX,OAAO,CAAC;AAEd,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,KAAK;IAClB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CA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,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;CAClC;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAC7C,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright 2026 Nicolas Moreno
2
4
  /**
3
- * Trace observability types (Spec-020 US1).
5
+ * Trace observability types.
4
6
  *
5
- * Wire shapes mirror the runtime contract module's `Trace` / `TraceSummary`
6
- * (see authoring/packages/contract/src/domain/types/trace.ts). Keeping the
7
- * canonical-with-runtime surface here as plain interfaces avoids forcing
8
- * SDK consumers to depend on the runtime contract package.
7
+ * Wire shapes of the runtime API's trace responses, kept as plain interfaces
8
+ * with no dependencies.
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  //# sourceMappingURL=traces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
1
+ {"version":3,"file":"traces.js","sourceRoot":"","sources":["../../src/types/traces.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC;;;;;GAKG"}
@@ -0,0 +1,70 @@
1
+ import type { ContractTreatmentPatchPayload, ContractTreatmentRailsPatchPayload, ContractDeletedAckPayload, ContractProfileCreatePayload, ContractProfileWritePayload, ContractProfilePayload, ContractTenantMetadataPayload, ContractTenantMetadataWritePayload, ContractTreatmentPayload, ContractTreatmentRailsPayload, ContractTreatmentWritePayload, ContractVocabularyCreatePayload, ContractVocabularyEntryPayload, ContractVocabularyWritePayload } from '../generated';
2
+ /**
3
+ * The baseline conversation treatment as the READ answers it: the mergeable fields, plus
4
+ * `vocabulary` composed from `/contract/treatment/vocabulary`. `vocabulary` is ABSENT when
5
+ * that collection is empty — never present-and-empty, and never a stale copy from an older
6
+ * publish.
7
+ */
8
+ export type ContractTreatment = ContractTreatmentPayload;
9
+ /**
10
+ * The PATCH bodies. Deliberately NOT the write types: RFC 7396 reads `null` as a REMOVAL,
11
+ * and it is the only way to clear a field. Typing both verbs with the write body made
12
+ * `patch({persona: null})` a compile error on a route that answers 200 with the key gone.
13
+ *
14
+ * A NESTED removal (`{style: {tone: null}}`) is expressible too: every nested value
15
+ * names a `*Patch` sibling whose properties admit `null`, so clearing one key inside `style` and
16
+ * leaving its siblings standing compiles and answers 200.
17
+ *
18
+ * TWO PLACES IT DOES NOT, and both are the schema telling the truth rather than a gap.
19
+ * `hard_refusals` requires both its keys on the MERGED value, so clearing either would leave a
20
+ * document the server refuses in every stored state — clear `hard_refusals` whole instead. And
21
+ * `drift_detection.max_turns_without_domain_action` carries a server-side default, so a `null` there is
22
+ * accepted and RE-DEFAULTED rather than removed; only `{drift_detection: null}` clears it.
23
+ */
24
+ export type ContractTreatmentPatch = ContractTreatmentPatchPayload;
25
+ export type ContractTreatmentRailsPatch = ContractTreatmentRailsPatchPayload;
26
+ /**
27
+ * The PUT/PATCH body. Deliberately NOT `ContractTreatment`: `vocabulary`, `profiles` and
28
+ * `rails` are refused here, each by name, each pointing at the route that owns it.
29
+ */
30
+ export type ContractTreatmentWrite = ContractTreatmentWritePayload;
31
+ /** The non-overridable half of the treatment, applied AFTER any profile merge. */
32
+ export type ContractTreatmentRails = ContractTreatmentRailsPayload;
33
+ /** One vocabulary entry, as every `/contract/treatment/vocabulary*` route answers it. */
34
+ export type ContractVocabularyEntry = ContractVocabularyEntryPayload;
35
+ /** The POST body — both fields required. */
36
+ export type ContractVocabularyCreate = ContractVocabularyCreatePayload;
37
+ /**
38
+ * The PUT/PATCH body for an existing entry. `means` is required by PUT (a total write states
39
+ * its value) and optional in a PATCH; `term` is accepted so a read round-trips, and is
40
+ * immutable.
41
+ */
42
+ export type ContractVocabularyWrite = ContractVocabularyWritePayload;
43
+ /** One treatment profile — a named partial override, stored as one blob. */
44
+ export type ContractProfile = ContractProfilePayload;
45
+ /**
46
+ * The PUT/PATCH body for a profile — the flat treatment.
47
+ *
48
+ * DISTINCT FROM `ContractTreatmentWrite`, and the difference is `vocabulary`: the baseline
49
+ * write refuses it (the tenant's list is its own collection, `/contract/treatment/vocabulary`),
50
+ * while a profile's list is an OVERRIDE that is appended to the baseline's and has no collection
51
+ * of its own.
52
+ */
53
+ export type ContractProfileWrite = ContractProfileWritePayload;
54
+ /**
55
+ * The POST body — `ContractProfileWrite` plus `name`.
56
+ *
57
+ * NO `channels`: a profile's channel membership is not written by any route of the contract
58
+ * API.
59
+ */
60
+ export type ContractProfileCreate = ContractProfileCreatePayload;
61
+ /**
62
+ * The tenant metadata composite. `label` is RESOLVED from the contract's semantic labels
63
+ * against the request locale — it is not writable here.
64
+ */
65
+ export type ContractTenantMetadata = ContractTenantMetadataPayload;
66
+ /** The PUT/PATCH body for the metadata composite. `label` is refused. */
67
+ export type ContractTenantMetadataWrite = ContractTenantMetadataWritePayload;
68
+ /** What both collection DELETEs answer. Not `void`. */
69
+ export type ContractDeletedAck = ContractDeletedAckPayload;
70
+ //# sourceMappingURL=treatment-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treatment-contract.d.ts","sourceRoot":"","sources":["../../src/types/treatment-contract.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACR,6BAA6B,EAC7B,kCAAkC,EAClC,yBAAyB,EACzB,4BAA4B,EAC5B,2BAA2B,EAC3B,sBAAsB,EACtB,6BAA6B,EAC7B,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EACjC,MAAM,cAAc,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AACnE,MAAM,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,kFAAkF;AAClF,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,yFAAyF;AACzF,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAErE,4CAA4C;AAC5C,MAAM,MAAM,wBAAwB,GAAG,+BAA+B,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,8BAA8B,CAAC;AAErE,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,oBAAoB,GAAG,2BAA2B,CAAC;AAE/D;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEnE,yEAAyE;AACzE,MAAM,MAAM,2BAA2B,GAAG,kCAAkC,CAAC;AAE7E,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright 2026 Nicolas Moreno
4
+ // Types for the `contract.treatment` family — the baseline treatment document, its
5
+ // `rails`, and the two normalized child collections (`vocabulary`, `profiles`).
6
+ //
7
+ // EVERY SHAPE HERE IS DERIVED from the contract API's OpenAPI document (through
8
+ // `generated/contract.ts`), so there is one description of the `/contract/treatment*` and
9
+ // `/contract/metadata` wire. The treatment document is closed: the route refuses keys it
10
+ // does not declare.
11
+ //
12
+ // THE READ AND THE WRITE ARE DIFFERENT SHAPES, and one type cannot be both.
13
+ // `ContractTreatment` (read) carries `vocabulary`, composed from the collection that owns it;
14
+ // `ContractTreatmentWrite` (write) refuses it, along with `profiles` and `rails`. A GET body is
15
+ // therefore not a legal PUT body, and the refusal names the route to use.
16
+ //
17
+ // The vocabulary collection (`/contract/treatment/vocabulary`) is the single source of the
18
+ // tenant's term list. Both collection DELETEs answer `{success, data: {message}}`.
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ //# sourceMappingURL=treatment-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treatment-contract.js","sourceRoot":"","sources":["../../src/types/treatment-contract.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,mFAAmF;AACnF,gFAAgF;AAChF,EAAE;AACF,gFAAgF;AAChF,0FAA0F;AAC1F,yFAAyF;AACzF,oBAAoB;AACpB,EAAE;AACF,4EAA4E;AAC5E,8FAA8F;AAC9F,gGAAgG;AAChG,0EAA0E;AAC1E,EAAE;AACF,2FAA2F;AAC3F,mFAAmF"}
@@ -13,6 +13,20 @@ export interface WorkflowStateMachineConfig {
13
13
  initial: string;
14
14
  transitions: WorkflowTransitionConfig[];
15
15
  }
16
+ /**
17
+ * NARROWER THAN THE WIRE, DELIBERATELY.
18
+ *
19
+ * `StateMachineReplayBody.new_config` is published OPEN — its keys are a state-machine
20
+ * configuration the MCP `replay_workflow` tool validates, not a shape the document knows — so the
21
+ * API accepts configurations this type refuses. Not derived from the document for that reason:
22
+ * deriving would replace a helpful shape with `Record<string, unknown>` and hand every caller the
23
+ * job the tool already does. Other request types are derived because their wire shape IS the
24
+ * useful shape; here it is not.
25
+ *
26
+ * What that costs: if the tool's accepted configuration changes, this type does not follow
27
+ * automatically. That is stated here rather than left for a reader to discover from a refused
28
+ * request.
29
+ */
16
30
  export interface WorkflowReplayRequest {
17
31
  instance_id: string;
18
32
  new_config: WorkflowStateMachineConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sBAAsB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,wBAAwB,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,0BAA0B,CAAC;CAC1C;AAED,MAAM,WAAW,yBAAyB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,yBAAyB,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,yBAAyB;IACtC,OAAO,EAAE,MAAM,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Y,EAAE,CAAC,CAAC;IAChB,cAAc,EAAE,CAAC,CAAC;IAClB,MAAM,EAAE,EAAE,CAAC;CACd;AAED,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG,yBAAyB,CAAC"}
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
+ // SPDX-License-Identifier: MIT
3
+ // Copyright 2026 Nicolas Moreno
2
4
  // ── Workflows (service-endpoint only) ────────────────────────────────────
3
5
  //
4
- // `POST /workflows/replay` is a permanent Service endpoint per ADR-0077
5
- // FR-4#3 (Q3 resolution). Types below describe its request/response shapes.
6
- // All other types that used to live here moved in P12:
7
- // - timeline/event types → ./state-machine.ts
8
- // - transition-request types → ./state-machine.ts
9
- // - flow instance/step types → ./flows.ts
6
+ // Request/response shapes of the state-machine replay operation
7
+ // (`POST /runtime/state-machine/replay`). Related types live elsewhere:
8
+ // - state-machine event types → ./state-machine.ts
9
+ // - transition-request types → ./state-machine.ts
10
+ // - flow instance types → ./flows.ts
10
11
  Object.defineProperty(exports, "__esModule", { value: true });
11
12
  //# sourceMappingURL=workflows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":";AAAA,4EAA4E;AAC5E,EAAE;AACF,wEAAwE;AACxE,4EAA4E;AAC5E,uDAAuD;AACvD,iDAAiD;AACjD,oDAAoD;AACpD,4CAA4C"}
1
+ {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/types/workflows.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,gCAAgC;AAChC,4EAA4E;AAC5E,EAAE;AACF,gEAAgE;AAChE,wEAAwE;AACxE,sDAAsD;AACtD,sDAAsD;AACtD,8CAA8C"}
package/package.json CHANGED
@@ -1,103 +1,100 @@
1
1
  {
2
- "name": "@zarel-ai/sdk",
3
- "version": "0.6.0",
4
- "description": "TypeScript SDK for the Zarel API",
5
- "license": "MIT",
6
- "author": "Zarel AI",
7
- "homepage": "https://zarel.ai",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/Zarel-AI/platform.git",
11
- "directory": "sdk/packages/sdk"
12
- },
13
- "main": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "exports": {
16
- ".": {
17
- "types": "./dist/index.d.ts",
18
- "import": "./dist/index.js",
19
- "require": "./dist/index.js"
2
+ "name": "@zarel-ai/sdk",
3
+ "version": "0.7.0",
4
+ "description": "TypeScript SDK for the Zarel API",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "Nicolas Moreno",
8
+ "url": "https://zarel.ai"
20
9
  },
21
- "./client": {
22
- "types": "./dist/client.d.ts",
23
- "import": "./dist/client.js",
24
- "require": "./dist/client.js"
10
+ "homepage": "https://zarel.ai",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/Zarel-AI/zarel-sdk-typescript.git",
14
+ "directory": "packages/sdk"
25
15
  },
26
- "./errors": {
27
- "types": "./dist/errors.d.ts",
28
- "import": "./dist/errors.js",
29
- "require": "./dist/errors.js"
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/index.d.ts",
21
+ "import": "./dist/index.js",
22
+ "require": "./dist/index.js"
23
+ },
24
+ "./client": {
25
+ "types": "./dist/client.d.ts",
26
+ "import": "./dist/client.js",
27
+ "require": "./dist/client.js"
28
+ },
29
+ "./errors": {
30
+ "types": "./dist/errors.d.ts",
31
+ "import": "./dist/errors.js",
32
+ "require": "./dist/errors.js"
33
+ },
34
+ "./types": {
35
+ "types": "./dist/types/index.d.ts",
36
+ "import": "./dist/types/index.js",
37
+ "require": "./dist/types/index.js"
38
+ },
39
+ "./resources": {
40
+ "types": "./dist/resources/index.d.ts",
41
+ "import": "./dist/resources/index.js",
42
+ "require": "./dist/resources/index.js"
43
+ },
44
+ "./resources/*": {
45
+ "types": "./dist/resources/*.d.ts",
46
+ "import": "./dist/resources/*.js",
47
+ "require": "./dist/resources/*.js"
48
+ }
30
49
  },
31
- "./types": {
32
- "types": "./dist/types/index.d.ts",
33
- "import": "./dist/types/index.js",
34
- "require": "./dist/types/index.js"
50
+ "typesVersions": {
51
+ "*": {
52
+ "client": [
53
+ "dist/client.d.ts"
54
+ ],
55
+ "errors": [
56
+ "dist/errors.d.ts"
57
+ ],
58
+ "types": [
59
+ "dist/types/index.d.ts"
60
+ ],
61
+ "resources": [
62
+ "dist/resources/index.d.ts"
63
+ ],
64
+ "resources/*": [
65
+ "dist/resources/*.d.ts"
66
+ ]
67
+ }
35
68
  },
36
- "./resources": {
37
- "types": "./dist/resources/index.d.ts",
38
- "import": "./dist/resources/index.js",
39
- "require": "./dist/resources/index.js"
69
+ "files": [
70
+ "dist",
71
+ "README.md",
72
+ "LICENSE"
73
+ ],
74
+ "engines": {
75
+ "node": ">=18.0.0"
40
76
  },
41
- "./resources/*": {
42
- "types": "./dist/resources/*.d.ts",
43
- "import": "./dist/resources/*.js",
44
- "require": "./dist/resources/*.js"
45
- }
46
- },
47
- "typesVersions": {
48
- "*": {
49
- "client": [
50
- "dist/client.d.ts"
51
- ],
52
- "errors": [
53
- "dist/errors.d.ts"
54
- ],
55
- "types": [
56
- "dist/types/index.d.ts"
57
- ],
58
- "resources": [
59
- "dist/resources/index.d.ts"
60
- ],
61
- "resources/*": [
62
- "dist/resources/*.d.ts"
63
- ]
64
- }
65
- },
66
- "files": [
67
- "dist",
68
- "README.md",
69
- "LICENSE"
70
- ],
71
- "engines": {
72
- "node": ">=18.0.0"
73
- },
74
- "sideEffects": false,
75
- "publishConfig": {
76
- "access": "public"
77
- },
78
- "scripts": {
79
- "prepack": "npm run build",
80
- "build": "tsc",
81
- "test": "jest",
82
- "lint": "eslint src/ tests/",
83
- "gen:sdk-types": "openapi-typescript ../../../docs/api/runtime-openapi-v1.yaml -o src/generated/runtime.ts && openapi-typescript ../../../docs/api/contract-openapi-v1.yaml -o src/generated/contract.ts",
84
- "gen:sdk-unwrap-map": "tsx ../../../scripts/toolchain/gen-sdk-unwrap-map.ts src/generated/unwrap-map.ts",
85
- "gen:sdk": "npm run gen:sdk-types && npm run gen:sdk-unwrap-map"
86
- },
87
- "devDependencies": {
88
- "@types/jest": "^29.5.12",
89
- "@types/node": "^20.11.0",
90
- "jest": "^29.7.0",
91
- "openapi-typescript": "7.13.0",
92
- "ts-jest": "^29.1.2",
93
- "tsx": "^4.7.0",
94
- "typescript": "^5.3.3",
95
- "yaml": "2.8.2"
96
- },
97
- "keywords": [
98
- "zarel",
99
- "zarel-ai",
100
- "sdk",
101
- "api-client"
102
- ]
77
+ "sideEffects": false,
78
+ "publishConfig": {
79
+ "access": "public"
80
+ },
81
+ "scripts": {
82
+ "prepack": "npm run build",
83
+ "build": "rm -rf dist && tsc",
84
+ "test": "jest"
85
+ },
86
+ "devDependencies": {
87
+ "@jest/globals": "^29.7.0",
88
+ "@types/jest": "^29.5.12",
89
+ "@types/node": "^20.11.0",
90
+ "jest": "^29.7.0",
91
+ "ts-jest": "^29.1.2",
92
+ "typescript": "^5.3.3"
93
+ },
94
+ "keywords": [
95
+ "zarel",
96
+ "zarel-ai",
97
+ "sdk",
98
+ "api-client"
99
+ ]
103
100
  }
@@ -1,6 +0,0 @@
1
- import type { FetchClient } from '../_internal/fetch-client';
2
- import { SingletonAccessor } from './_singleton';
3
- export declare class GovernanceResource extends SingletonAccessor {
4
- constructor(client: FetchClient);
5
- }
6
- //# sourceMappingURL=governance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"governance.d.ts","sourceRoot":"","sources":["../../src/contract/governance.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qBAAa,kBAAmB,SAAQ,iBAAiB;gBACzC,MAAM,EAAE,WAAW;CAOlC"}