@zarel-ai/sdk 0.6.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 (375) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +412 -0
  3. package/dist/_internal/auth-headers.d.ts +19 -0
  4. package/dist/_internal/auth-headers.d.ts.map +1 -0
  5. package/dist/_internal/auth-headers.js +30 -0
  6. package/dist/_internal/auth-headers.js.map +1 -0
  7. package/dist/_internal/confirmation.d.ts +24 -0
  8. package/dist/_internal/confirmation.d.ts.map +1 -0
  9. package/dist/_internal/confirmation.js +54 -0
  10. package/dist/_internal/confirmation.js.map +1 -0
  11. package/dist/_internal/event-iterator.d.ts +18 -0
  12. package/dist/_internal/event-iterator.d.ts.map +1 -0
  13. package/dist/_internal/event-iterator.js +151 -0
  14. package/dist/_internal/event-iterator.js.map +1 -0
  15. package/dist/_internal/fetch-client.d.ts +141 -0
  16. package/dist/_internal/fetch-client.d.ts.map +1 -0
  17. package/dist/_internal/fetch-client.js +471 -0
  18. package/dist/_internal/fetch-client.js.map +1 -0
  19. package/dist/_internal/interceptors.d.ts +40 -0
  20. package/dist/_internal/interceptors.d.ts.map +1 -0
  21. package/dist/_internal/interceptors.js +28 -0
  22. package/dist/_internal/interceptors.js.map +1 -0
  23. package/dist/_internal/mcp.d.ts +11 -0
  24. package/dist/_internal/mcp.d.ts.map +1 -0
  25. package/dist/_internal/mcp.js +79 -0
  26. package/dist/_internal/mcp.js.map +1 -0
  27. package/dist/_internal/pagination.d.ts +71 -0
  28. package/dist/_internal/pagination.d.ts.map +1 -0
  29. package/dist/_internal/pagination.js +130 -0
  30. package/dist/_internal/pagination.js.map +1 -0
  31. package/dist/_internal/require-token.d.ts +17 -0
  32. package/dist/_internal/require-token.d.ts.map +1 -0
  33. package/dist/_internal/require-token.js +25 -0
  34. package/dist/_internal/require-token.js.map +1 -0
  35. package/dist/_internal/retry-after.d.ts +2 -0
  36. package/dist/_internal/retry-after.d.ts.map +1 -0
  37. package/dist/_internal/retry-after.js +34 -0
  38. package/dist/_internal/retry-after.js.map +1 -0
  39. package/dist/_internal/sse-client.d.ts +43 -0
  40. package/dist/_internal/sse-client.d.ts.map +1 -0
  41. package/dist/_internal/sse-client.js +250 -0
  42. package/dist/_internal/sse-client.js.map +1 -0
  43. package/dist/_internal/version.d.ts +5 -0
  44. package/dist/_internal/version.d.ts.map +1 -0
  45. package/dist/_internal/version.js +12 -0
  46. package/dist/_internal/version.js.map +1 -0
  47. package/dist/client.d.ts +74 -0
  48. package/dist/client.d.ts.map +1 -0
  49. package/dist/client.js +86 -0
  50. package/dist/client.js.map +1 -0
  51. package/dist/contract/_singleton.d.ts +18 -0
  52. package/dist/contract/_singleton.d.ts.map +1 -0
  53. package/dist/contract/_singleton.js +27 -0
  54. package/dist/contract/_singleton.js.map +1 -0
  55. package/dist/contract/actions.d.ts +18 -0
  56. package/dist/contract/actions.d.ts.map +1 -0
  57. package/dist/contract/actions.js +36 -0
  58. package/dist/contract/actions.js.map +1 -0
  59. package/dist/contract/assistant.d.ts +65 -0
  60. package/dist/contract/assistant.d.ts.map +1 -0
  61. package/dist/contract/assistant.js +44 -0
  62. package/dist/contract/assistant.js.map +1 -0
  63. package/dist/contract/batch.d.ts +27 -0
  64. package/dist/contract/batch.d.ts.map +1 -0
  65. package/dist/contract/batch.js +20 -0
  66. package/dist/contract/batch.js.map +1 -0
  67. package/dist/contract/capabilities.d.ts +21 -0
  68. package/dist/contract/capabilities.d.ts.map +1 -0
  69. package/dist/contract/capabilities.js +31 -0
  70. package/dist/contract/capabilities.js.map +1 -0
  71. package/dist/contract/constraints.d.ts +21 -0
  72. package/dist/contract/constraints.d.ts.map +1 -0
  73. package/dist/contract/constraints.js +31 -0
  74. package/dist/contract/constraints.js.map +1 -0
  75. package/dist/contract/events.d.ts +33 -0
  76. package/dist/contract/events.d.ts.map +1 -0
  77. package/dist/contract/events.js +56 -0
  78. package/dist/contract/events.js.map +1 -0
  79. package/dist/contract/flows.d.ts +44 -0
  80. package/dist/contract/flows.d.ts.map +1 -0
  81. package/dist/contract/flows.js +109 -0
  82. package/dist/contract/flows.js.map +1 -0
  83. package/dist/contract/governance.d.ts +6 -0
  84. package/dist/contract/governance.d.ts.map +1 -0
  85. package/dist/contract/governance.js +17 -0
  86. package/dist/contract/governance.js.map +1 -0
  87. package/dist/contract/index.d.ts +137 -0
  88. package/dist/contract/index.d.ts.map +1 -0
  89. package/dist/contract/index.js +177 -0
  90. package/dist/contract/index.js.map +1 -0
  91. package/dist/contract/metadata.d.ts +26 -0
  92. package/dist/contract/metadata.d.ts.map +1 -0
  93. package/dist/contract/metadata.js +25 -0
  94. package/dist/contract/metadata.js.map +1 -0
  95. package/dist/contract/process-model.d.ts +31 -0
  96. package/dist/contract/process-model.d.ts.map +1 -0
  97. package/dist/contract/process-model.js +51 -0
  98. package/dist/contract/process-model.js.map +1 -0
  99. package/dist/contract/roots/channels.d.ts +27 -0
  100. package/dist/contract/roots/channels.d.ts.map +1 -0
  101. package/dist/contract/roots/channels.js +53 -0
  102. package/dist/contract/roots/channels.js.map +1 -0
  103. package/dist/contract/roots/events.d.ts +7 -0
  104. package/dist/contract/roots/events.d.ts.map +1 -0
  105. package/dist/contract/roots/events.js +19 -0
  106. package/dist/contract/roots/events.js.map +1 -0
  107. package/dist/contract/roots/index.d.ts +15 -0
  108. package/dist/contract/roots/index.d.ts.map +1 -0
  109. package/dist/contract/roots/index.js +38 -0
  110. package/dist/contract/roots/index.js.map +1 -0
  111. package/dist/contract/roots/mcp-servers.d.ts +46 -0
  112. package/dist/contract/roots/mcp-servers.d.ts.map +1 -0
  113. package/dist/contract/roots/mcp-servers.js +68 -0
  114. package/dist/contract/roots/mcp-servers.js.map +1 -0
  115. package/dist/contract/roots/profiles.d.ts +18 -0
  116. package/dist/contract/roots/profiles.d.ts.map +1 -0
  117. package/dist/contract/roots/profiles.js +31 -0
  118. package/dist/contract/roots/profiles.js.map +1 -0
  119. package/dist/contract/roots/timezone.d.ts +10 -0
  120. package/dist/contract/roots/timezone.d.ts.map +1 -0
  121. package/dist/contract/roots/timezone.js +19 -0
  122. package/dist/contract/roots/timezone.js.map +1 -0
  123. package/dist/contract/roots/treatment.d.ts +11 -0
  124. package/dist/contract/roots/treatment.d.ts.map +1 -0
  125. package/dist/contract/roots/treatment.js +37 -0
  126. package/dist/contract/roots/treatment.js.map +1 -0
  127. package/dist/contract/roots/vocabulary.d.ts +18 -0
  128. package/dist/contract/roots/vocabulary.d.ts.map +1 -0
  129. package/dist/contract/roots/vocabulary.js +31 -0
  130. package/dist/contract/roots/vocabulary.js.map +1 -0
  131. package/dist/contract/schemas.d.ts +18 -0
  132. package/dist/contract/schemas.d.ts.map +1 -0
  133. package/dist/contract/schemas.js +31 -0
  134. package/dist/contract/schemas.js.map +1 -0
  135. package/dist/contract/skills.d.ts +20 -0
  136. package/dist/contract/skills.d.ts.map +1 -0
  137. package/dist/contract/skills.js +36 -0
  138. package/dist/contract/skills.js.map +1 -0
  139. package/dist/errors.d.ts +65 -0
  140. package/dist/errors.d.ts.map +1 -0
  141. package/dist/errors.js +80 -0
  142. package/dist/errors.js.map +1 -0
  143. package/dist/generated/contract.d.ts +7688 -0
  144. package/dist/generated/contract.d.ts.map +1 -0
  145. package/dist/generated/contract.js +7 -0
  146. package/dist/generated/contract.js.map +1 -0
  147. package/dist/generated/index.d.ts +41 -0
  148. package/dist/generated/index.d.ts.map +1 -0
  149. package/dist/generated/index.js +3 -0
  150. package/dist/generated/index.js.map +1 -0
  151. package/dist/generated/runtime.d.ts +4020 -0
  152. package/dist/generated/runtime.d.ts.map +1 -0
  153. package/dist/generated/runtime.js +7 -0
  154. package/dist/generated/runtime.js.map +1 -0
  155. package/dist/generated/unwrap-map.d.ts +989 -0
  156. package/dist/generated/unwrap-map.d.ts.map +1 -0
  157. package/dist/generated/unwrap-map.js +344 -0
  158. package/dist/generated/unwrap-map.js.map +1 -0
  159. package/dist/index.d.ts +38 -0
  160. package/dist/index.d.ts.map +1 -0
  161. package/dist/index.js +27 -0
  162. package/dist/index.js.map +1 -0
  163. package/dist/resources/actions.d.ts +33 -0
  164. package/dist/resources/actions.d.ts.map +1 -0
  165. package/dist/resources/actions.js +52 -0
  166. package/dist/resources/actions.js.map +1 -0
  167. package/dist/resources/audit.d.ts +52 -0
  168. package/dist/resources/audit.d.ts.map +1 -0
  169. package/dist/resources/audit.js +86 -0
  170. package/dist/resources/audit.js.map +1 -0
  171. package/dist/resources/authorization-ceiling.d.ts +25 -0
  172. package/dist/resources/authorization-ceiling.d.ts.map +1 -0
  173. package/dist/resources/authorization-ceiling.js +26 -0
  174. package/dist/resources/authorization-ceiling.js.map +1 -0
  175. package/dist/resources/authorization-operation-ids.d.ts +15 -0
  176. package/dist/resources/authorization-operation-ids.d.ts.map +1 -0
  177. package/dist/resources/authorization-operation-ids.js +31 -0
  178. package/dist/resources/authorization-operation-ids.js.map +1 -0
  179. package/dist/resources/authorization.d.ts +60 -0
  180. package/dist/resources/authorization.d.ts.map +1 -0
  181. package/dist/resources/authorization.js +51 -0
  182. package/dist/resources/authorization.js.map +1 -0
  183. package/dist/resources/authorizations.d.ts +38 -0
  184. package/dist/resources/authorizations.d.ts.map +1 -0
  185. package/dist/resources/authorizations.js +19 -0
  186. package/dist/resources/authorizations.js.map +1 -0
  187. package/dist/resources/channels.d.ts +36 -0
  188. package/dist/resources/channels.d.ts.map +1 -0
  189. package/dist/resources/channels.js +61 -0
  190. package/dist/resources/channels.js.map +1 -0
  191. package/dist/resources/contracts.d.ts +46 -0
  192. package/dist/resources/contracts.d.ts.map +1 -0
  193. package/dist/resources/contracts.js +86 -0
  194. package/dist/resources/contracts.js.map +1 -0
  195. package/dist/resources/conversation-sessions.d.ts +62 -0
  196. package/dist/resources/conversation-sessions.d.ts.map +1 -0
  197. package/dist/resources/conversation-sessions.js +48 -0
  198. package/dist/resources/conversation-sessions.js.map +1 -0
  199. package/dist/resources/conversation.d.ts +48 -0
  200. package/dist/resources/conversation.d.ts.map +1 -0
  201. package/dist/resources/conversation.js +104 -0
  202. package/dist/resources/conversation.js.map +1 -0
  203. package/dist/resources/embedding-credentials.d.ts +60 -0
  204. package/dist/resources/embedding-credentials.d.ts.map +1 -0
  205. package/dist/resources/embedding-credentials.js +53 -0
  206. package/dist/resources/embedding-credentials.js.map +1 -0
  207. package/dist/resources/entities.d.ts +66 -0
  208. package/dist/resources/entities.d.ts.map +1 -0
  209. package/dist/resources/entities.js +106 -0
  210. package/dist/resources/entities.js.map +1 -0
  211. package/dist/resources/events.d.ts +45 -0
  212. package/dist/resources/events.d.ts.map +1 -0
  213. package/dist/resources/events.js +71 -0
  214. package/dist/resources/events.js.map +1 -0
  215. package/dist/resources/flows.d.ts +45 -0
  216. package/dist/resources/flows.d.ts.map +1 -0
  217. package/dist/resources/flows.js +82 -0
  218. package/dist/resources/flows.js.map +1 -0
  219. package/dist/resources/imports.d.ts +8 -0
  220. package/dist/resources/imports.d.ts.map +1 -0
  221. package/dist/resources/imports.js +14 -0
  222. package/dist/resources/imports.js.map +1 -0
  223. package/dist/resources/index.d.ts +24 -0
  224. package/dist/resources/index.d.ts.map +1 -0
  225. package/dist/resources/index.js +41 -0
  226. package/dist/resources/index.js.map +1 -0
  227. package/dist/resources/llm-credentials.d.ts +47 -0
  228. package/dist/resources/llm-credentials.d.ts.map +1 -0
  229. package/dist/resources/llm-credentials.js +46 -0
  230. package/dist/resources/llm-credentials.js.map +1 -0
  231. package/dist/resources/llm-services.d.ts +46 -0
  232. package/dist/resources/llm-services.d.ts.map +1 -0
  233. package/dist/resources/llm-services.js +41 -0
  234. package/dist/resources/llm-services.js.map +1 -0
  235. package/dist/resources/mcp.d.ts +8 -0
  236. package/dist/resources/mcp.d.ts.map +1 -0
  237. package/dist/resources/mcp.js +25 -0
  238. package/dist/resources/mcp.js.map +1 -0
  239. package/dist/resources/receipts.d.ts +25 -0
  240. package/dist/resources/receipts.d.ts.map +1 -0
  241. package/dist/resources/receipts.js +54 -0
  242. package/dist/resources/receipts.js.map +1 -0
  243. package/dist/resources/records.d.ts +51 -0
  244. package/dist/resources/records.d.ts.map +1 -0
  245. package/dist/resources/records.js +103 -0
  246. package/dist/resources/records.js.map +1 -0
  247. package/dist/resources/role-assignments.d.ts +27 -0
  248. package/dist/resources/role-assignments.d.ts.map +1 -0
  249. package/dist/resources/role-assignments.js +40 -0
  250. package/dist/resources/role-assignments.js.map +1 -0
  251. package/dist/resources/roles.d.ts +39 -0
  252. package/dist/resources/roles.d.ts.map +1 -0
  253. package/dist/resources/roles.js +42 -0
  254. package/dist/resources/roles.js.map +1 -0
  255. package/dist/resources/runtime-entities.d.ts +23 -0
  256. package/dist/resources/runtime-entities.d.ts.map +1 -0
  257. package/dist/resources/runtime-entities.js +29 -0
  258. package/dist/resources/runtime-entities.js.map +1 -0
  259. package/dist/resources/state-machine.d.ts +45 -0
  260. package/dist/resources/state-machine.d.ts.map +1 -0
  261. package/dist/resources/state-machine.js +86 -0
  262. package/dist/resources/state-machine.js.map +1 -0
  263. package/dist/resources/system.d.ts +12 -0
  264. package/dist/resources/system.d.ts.map +1 -0
  265. package/dist/resources/system.js +26 -0
  266. package/dist/resources/system.js.map +1 -0
  267. package/dist/resources/tools.d.ts +22 -0
  268. package/dist/resources/tools.d.ts.map +1 -0
  269. package/dist/resources/tools.js +33 -0
  270. package/dist/resources/tools.js.map +1 -0
  271. package/dist/resources/traces.d.ts +65 -0
  272. package/dist/resources/traces.d.ts.map +1 -0
  273. package/dist/resources/traces.js +97 -0
  274. package/dist/resources/traces.js.map +1 -0
  275. package/dist/runtime/index.d.ts +128 -0
  276. package/dist/runtime/index.d.ts.map +1 -0
  277. package/dist/runtime/index.js +210 -0
  278. package/dist/runtime/index.js.map +1 -0
  279. package/dist/types/actions.d.ts +32 -0
  280. package/dist/types/actions.d.ts.map +1 -0
  281. package/dist/types/actions.js +9 -0
  282. package/dist/types/actions.js.map +1 -0
  283. package/dist/types/audit.d.ts +65 -0
  284. package/dist/types/audit.d.ts.map +1 -0
  285. package/dist/types/audit.js +14 -0
  286. package/dist/types/audit.js.map +1 -0
  287. package/dist/types/channels.d.ts +37 -0
  288. package/dist/types/channels.d.ts.map +1 -0
  289. package/dist/types/channels.js +6 -0
  290. package/dist/types/channels.js.map +1 -0
  291. package/dist/types/confirmation.d.ts +53 -0
  292. package/dist/types/confirmation.d.ts.map +1 -0
  293. package/dist/types/confirmation.js +17 -0
  294. package/dist/types/confirmation.js.map +1 -0
  295. package/dist/types/contracts.d.ts +194 -0
  296. package/dist/types/contracts.d.ts.map +1 -0
  297. package/dist/types/contracts.js +10 -0
  298. package/dist/types/contracts.js.map +1 -0
  299. package/dist/types/conversation-sessions.d.ts +58 -0
  300. package/dist/types/conversation-sessions.d.ts.map +1 -0
  301. package/dist/types/conversation-sessions.js +6 -0
  302. package/dist/types/conversation-sessions.js.map +1 -0
  303. package/dist/types/conversation.d.ts +96 -0
  304. package/dist/types/conversation.d.ts.map +1 -0
  305. package/dist/types/conversation.js +3 -0
  306. package/dist/types/conversation.js.map +1 -0
  307. package/dist/types/entities.d.ts +22 -0
  308. package/dist/types/entities.d.ts.map +1 -0
  309. package/dist/types/entities.js +4 -0
  310. package/dist/types/entities.js.map +1 -0
  311. package/dist/types/events-stream.d.ts +82 -0
  312. package/dist/types/events-stream.d.ts.map +1 -0
  313. package/dist/types/events-stream.js +65 -0
  314. package/dist/types/events-stream.js.map +1 -0
  315. package/dist/types/flows-contract.d.ts +8 -0
  316. package/dist/types/flows-contract.d.ts.map +1 -0
  317. package/dist/types/flows-contract.js +7 -0
  318. package/dist/types/flows-contract.js.map +1 -0
  319. package/dist/types/flows.d.ts +66 -0
  320. package/dist/types/flows.d.ts.map +1 -0
  321. package/dist/types/flows.js +25 -0
  322. package/dist/types/flows.js.map +1 -0
  323. package/dist/types/imports.d.ts +57 -0
  324. package/dist/types/imports.d.ts.map +1 -0
  325. package/dist/types/imports.js +3 -0
  326. package/dist/types/imports.js.map +1 -0
  327. package/dist/types/index.d.ts +17 -0
  328. package/dist/types/index.d.ts.map +1 -0
  329. package/dist/types/index.js +3 -0
  330. package/dist/types/index.js.map +1 -0
  331. package/dist/types/locale.d.ts +24 -0
  332. package/dist/types/locale.d.ts.map +1 -0
  333. package/dist/types/locale.js +17 -0
  334. package/dist/types/locale.js.map +1 -0
  335. package/dist/types/mcp.d.ts +28 -0
  336. package/dist/types/mcp.d.ts.map +1 -0
  337. package/dist/types/mcp.js +12 -0
  338. package/dist/types/mcp.js.map +1 -0
  339. package/dist/types/platform.d.ts +51 -0
  340. package/dist/types/platform.d.ts.map +1 -0
  341. package/dist/types/platform.js +4 -0
  342. package/dist/types/platform.js.map +1 -0
  343. package/dist/types/receipt.d.ts +79 -0
  344. package/dist/types/receipt.d.ts.map +1 -0
  345. package/dist/types/receipt.js +15 -0
  346. package/dist/types/receipt.js.map +1 -0
  347. package/dist/types/records.d.ts +45 -0
  348. package/dist/types/records.d.ts.map +1 -0
  349. package/dist/types/records.js +4 -0
  350. package/dist/types/records.js.map +1 -0
  351. package/dist/types/spec.d.ts +6 -0
  352. package/dist/types/spec.d.ts.map +1 -0
  353. package/dist/types/spec.js +3 -0
  354. package/dist/types/spec.js.map +1 -0
  355. package/dist/types/state-machine.d.ts +100 -0
  356. package/dist/types/state-machine.d.ts.map +1 -0
  357. package/dist/types/state-machine.js +9 -0
  358. package/dist/types/state-machine.js.map +1 -0
  359. package/dist/types/system.d.ts +28 -0
  360. package/dist/types/system.d.ts.map +1 -0
  361. package/dist/types/system.js +3 -0
  362. package/dist/types/system.js.map +1 -0
  363. package/dist/types/tools.d.ts +188 -0
  364. package/dist/types/tools.d.ts.map +1 -0
  365. package/dist/types/tools.js +22 -0
  366. package/dist/types/tools.js.map +1 -0
  367. package/dist/types/traces.d.ts +77 -0
  368. package/dist/types/traces.d.ts.map +1 -0
  369. package/dist/types/traces.js +11 -0
  370. package/dist/types/traces.js.map +1 -0
  371. package/dist/types/workflows.d.ts +42 -0
  372. package/dist/types/workflows.d.ts.map +1 -0
  373. package/dist/types/workflows.js +11 -0
  374. package/dist/types/workflows.js.map +1 -0
  375. package/package.json +103 -0
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpecResource = void 0;
4
+ const fetch_client_1 = require("../_internal/fetch-client");
5
+ /**
6
+ * Spec resource (spec-051 US2; renamed from ContractsResource).
7
+ *
8
+ * Canonical surface (URLs are bare canonical paths per ADR-0077 D14'):
9
+ * - publish(req) → POST /contract/spec/publish
10
+ * - diff(req) → POST /contract/spec/diff
11
+ * - apply(req) → POST /contract/spec/apply
12
+ * - snapshot() → GET /contract/spec/snapshot
13
+ * - dryRun(req) → POST /contract/spec/dry-run
14
+ * - dryRunReport() → GET /contract/spec/dry-run/:id
15
+ * - dryRunCancel() → DELETE /contract/spec/dry-run/:id
16
+ */
17
+ class SpecResource {
18
+ client;
19
+ constructor(client) {
20
+ this.client = client;
21
+ }
22
+ async publish(request) {
23
+ return this.client.post('/contract/spec/publish', request, { operationId: 'specPublish' });
24
+ }
25
+ async diff(request) {
26
+ return this.client.post('/contract/spec/diff', request, { operationId: 'specDiff' });
27
+ }
28
+ async apply(request) {
29
+ return this.client.post('/contract/spec/apply', request, { operationId: 'specApply' });
30
+ }
31
+ async snapshot(options) {
32
+ const q = (0, fetch_client_1.localeQueryOrUndefined)(options);
33
+ // GET /contract/spec/snapshot returns the flat TenantContract body
34
+ // directly (an authoring carve-out — `ok(contract)`, no {success,data}
35
+ // envelope; see contract-api routes/spec/snapshot.ts). The response IS
36
+ // the snapshot — opt out of the transport envelope-unwrap (G1) so the
37
+ // bare body is returned unchanged (unwrapping would erase entities/roles).
38
+ const data = await this.client.get('/contract/spec/snapshot', q, { operationId: 'specSnapshot' });
39
+ const contractVersion = Number(data.contract_version ?? 0);
40
+ return {
41
+ tenant_name: String(data.metadata?.name ?? ''),
42
+ spec_version: String(data.spec_version ?? `v${contractVersion}`),
43
+ contract_version: contractVersion,
44
+ hash: `v${contractVersion}`,
45
+ contract: data,
46
+ };
47
+ }
48
+ /** GET /contract/spec/snapshot/locale-coverage — i18n coverage report for the published snapshot. */
49
+ async snapshotLocaleCoverage(options) {
50
+ return this.client.get('/contract/spec/snapshot/locale-coverage', (0, fetch_client_1.localeQueryOrUndefined)(options), { operationId: 'specSnapshotLocaleCoverage' });
51
+ }
52
+ /**
53
+ * GET /contract/spec/snapshot/semantic-diff — semantic diff between two published
54
+ * contract versions. `from`/`to` are REQUIRED (contract versions, ≥ 1).
55
+ */
56
+ async snapshotSemanticDiff(input) {
57
+ const query = { from: String(input.from), to: String(input.to) };
58
+ if (input.locale)
59
+ query.locale = input.locale;
60
+ return this.client.get('/contract/spec/snapshot/semantic-diff', query, { operationId: 'specSnapshotSemanticDiff' });
61
+ }
62
+ /**
63
+ * Submit an async dry-run.
64
+ */
65
+ async dryRun(request) {
66
+ return this.client.post('/contract/spec/dry-run', request, { operationId: 'specDryRunSubmit' });
67
+ }
68
+ /**
69
+ * Poll the dry-run job for status / report.
70
+ */
71
+ async dryRunReport(reportId, options) {
72
+ const path = `/contract/spec/dry-run/${encodeURIComponent(reportId)}`;
73
+ const q = (0, fetch_client_1.localeQueryOrUndefined)(options);
74
+ return q
75
+ ? this.client.get(path, q, { operationId: 'specDryRunGet' })
76
+ : this.client.get(path, undefined, { operationId: 'specDryRunGet' });
77
+ }
78
+ /**
79
+ * Cancel a queued / running dry-run job.
80
+ */
81
+ async dryRunCancel(reportId) {
82
+ await this.client.del(`/contract/spec/dry-run/${encodeURIComponent(reportId)}`, { operationId: 'specDryRunCancel' });
83
+ }
84
+ }
85
+ exports.SpecResource = SpecResource;
86
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/resources/contracts.ts"],"names":[],"mappings":";;;AAAA,4DAAqF;AAerF;;;;;;;;;;;GAWG;AACH,MAAa,YAAY;IACe;IAApC,YAAoC,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;I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ED;;OAEG;IACI,KAAK,CAAC,YAAY,CAAC,QAAgB;QACtC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,0BAA0B,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC/H,CAAC;CACJ;AApFD,oCAoFC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Conversation-session creation resource (T076, SpecKit 010 / ADR-0087).
3
+ *
4
+ * Backs `POST /runtime/conversation/sessions` per `contracts/conversation-session-api.md`.
5
+ * Sessions are now created explicitly — `client.conversation.send` no longer lazily
6
+ * creates them (FR-C07).
7
+ */
8
+ import type { FetchClient } from '../_internal/fetch-client';
9
+ export type ConversationScope = 'runtime' | 'contract';
10
+ export interface ConversationSessionCreateInput {
11
+ channel_name: string;
12
+ /**
13
+ * Session-level snapshot of the actor's roles (Spec-019 FR-A07). NOT a
14
+ * security gate — server-side authorization is DB-resolved. The snapshot
15
+ * shapes only the LLM-compile prompt's actor context.
16
+ */
17
+ rolesSnapshot: string[];
18
+ scope: ConversationScope;
19
+ /** Optional pin — the session will use this service unless overridden per-turn (FR-C04). */
20
+ llmService?: string;
21
+ userName?: string;
22
+ metadata?: Record<string, unknown>;
23
+ }
24
+ export interface ConversationSessionResponse {
25
+ session_key: string;
26
+ user_name: string;
27
+ channel_name: string;
28
+ /**
29
+ * Session-level snapshot of the actor's roles (Spec-019 FR-A07). NOT a
30
+ * security gate — exposed for observability / UI display only.
31
+ */
32
+ roles_snapshot: string[];
33
+ scope: ConversationScope;
34
+ llm_service_name: string | null;
35
+ status: string;
36
+ turn_count: number;
37
+ created_at: string;
38
+ updated_at: string;
39
+ last_activity: string;
40
+ }
41
+ /** @deprecated G1: the transport unwraps the envelope — methods return the
42
+ * bare `ConversationSessionResponse`. Kept as an alias for the exported name. */
43
+ export type ConversationSessionEnvelope = ConversationSessionResponse;
44
+ /**
45
+ * `POST /runtime/conversation/sessions` only.
46
+ *
47
+ * This resource used to carry `get` and `delete` as well, mirroring a duplication
48
+ * that also existed in the API: two routers registered the same three paths and
49
+ * mount order picked the winner. The published contract settled it —
50
+ * `getConversationSession` is declared "with turns" — so the session READ lives on
51
+ * `ConversationResource.session()` (`ConversationSessionDetailResponse`) and the
52
+ * clear on `ConversationResource.deleteSession()`. `client.runtime.conversation.
53
+ * sessions` already routed to exactly those; the two methods here were dead in the
54
+ * composite and, once the route started returning the detail, declared a shape it
55
+ * no longer sends.
56
+ */
57
+ export declare class ConversationSessionsResource {
58
+ private readonly client;
59
+ constructor(client: FetchClient);
60
+ create(input: ConversationSessionCreateInput): Promise<ConversationSessionResponse>;
61
+ }
62
+ //# sourceMappingURL=conversation-sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-sessions.d.ts","sourceRoot":"","sources":["../../src/resources/conversation-sessions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEvD,MAAM,WAAW,8BAA8B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,EAAE,iBAAiB,CAAC;IACzB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,2BAA2B;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,iBAAiB,CAAC;IACzB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;iFACiF;AACjF,MAAM,MAAM,2BAA2B,GAAG,2BAA2B,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,qBAAa,4BAA4B;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAE1C,MAAM,CAAC,KAAK,EAAE,8BAA8B,GAAG,OAAO,CAAC,2BAA2B,CAAC;CAc5F"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * Conversation-session creation resource (T076, SpecKit 010 / ADR-0087).
4
+ *
5
+ * Backs `POST /runtime/conversation/sessions` per `contracts/conversation-session-api.md`.
6
+ * Sessions are now created explicitly — `client.conversation.send` no longer lazily
7
+ * creates them (FR-C07).
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ConversationSessionsResource = void 0;
11
+ /**
12
+ * `POST /runtime/conversation/sessions` only.
13
+ *
14
+ * This resource used to carry `get` and `delete` as well, mirroring a duplication
15
+ * that also existed in the API: two routers registered the same three paths and
16
+ * mount order picked the winner. The published contract settled it —
17
+ * `getConversationSession` is declared "with turns" — so the session READ lives on
18
+ * `ConversationResource.session()` (`ConversationSessionDetailResponse`) and the
19
+ * clear on `ConversationResource.deleteSession()`. `client.runtime.conversation.
20
+ * sessions` already routed to exactly those; the two methods here were dead in the
21
+ * composite and, once the route started returning the detail, declared a shape it
22
+ * no longer sends.
23
+ */
24
+ class ConversationSessionsResource {
25
+ client;
26
+ constructor(client) {
27
+ this.client = client;
28
+ }
29
+ async create(input) {
30
+ // No `session_key`: the SERVER mints it and REFUSES a body that carries one
31
+ // (runtime-api `conversation-sessions.ts` — a client-chosen key was guessable,
32
+ // squattable, and an existence oracle). Read the minted key off the response.
33
+ const body = {
34
+ channel_name: input.channel_name,
35
+ roles_snapshot: input.rolesSnapshot,
36
+ scope: input.scope,
37
+ };
38
+ if (input.llmService !== undefined)
39
+ body.llm_service = input.llmService;
40
+ if (input.userName !== undefined)
41
+ body.user_name = input.userName;
42
+ if (input.metadata !== undefined)
43
+ body.metadata = input.metadata;
44
+ return this.client.post('/runtime/conversation/sessions', body, { operationId: 'createConversationSession' });
45
+ }
46
+ }
47
+ exports.ConversationSessionsResource = ConversationSessionsResource;
48
+ //# sourceMappingURL=conversation-sessions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-sessions.js","sourceRoot":"","sources":["../../src/resources/conversation-sessions.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AA2CH;;;;;;;;;;;;GAYG;AACH,MAAa,4BAA4B;IACR;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,MAAM,CAAC,KAAqC;QAC9C,4EAA4E;QAC5E,+EAA+E;QAC/E,8EAA8E;QAC9E,MAAM,IAAI,GAA4B;YAClC,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,cAAc,EAAE,KAAK,CAAC,aAAa;YACnC,KAAK,EAAE,KAAK,CAAC,KAAK;SACrB,CAAC;QACF,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS;YAAE,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC;QACxE,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC;QAClE,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA8B,gCAAgC,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC,CAAC;IAC/I,CAAC;CACJ;AAjBD,oEAiBC"}
@@ -0,0 +1,48 @@
1
+ import { type FetchClient } from '../_internal/fetch-client';
2
+ import { PagePromise } from '../_internal/pagination';
3
+ import type { ConversationRequest, ConversationResponse } from '../types/conversation';
4
+ import type { ConversationSessionListParams, ConversationSessionListResponse, ConversationSessionDetailResponse, ConversationSessionActionsResponse, ConversationSessionSummary } from '../types/conversation-sessions';
5
+ import type { LocaleOptions } from '../types/locale';
6
+ export declare class ConversationResource {
7
+ private readonly client;
8
+ constructor(client: FetchClient);
9
+ /**
10
+ * Send a natural language message to the cognitive agent.
11
+ *
12
+ * spec-039 FR-026: pass `{locale: 'es'}` to override the actor's
13
+ * `preferences.language` JWT claim for *this turn only*. Useful for
14
+ * preview/testing and for actors whose stored preference does not
15
+ * match their current need. Omit for canonical server-side resolution
16
+ * (JWT preferences.language → canonical).
17
+ */
18
+ send(request: ConversationRequest, options?: LocaleOptions): Promise<ConversationResponse>;
19
+ /**
20
+ * Soft-delete a conversation session (sets status='cleared' on the row, keeping
21
+ * history for audit). Canonical route per ADR-0077 P7 runtime-mutable tier.
22
+ */
23
+ deleteSession(sessionKey: string): Promise<void>;
24
+ /**
25
+ * List past conversation sessions for the authenticated user.
26
+ *
27
+ * Returns a {@link PagePromise}: `await` it for the first page
28
+ * (`ConversationSessionSummary[]` — unchanged), or `for await (… of …)` to
29
+ * auto-paginate over every session. This endpoint has no `total`/cursor in
30
+ * its wire shape, so iteration advances by page size and stops when a page
31
+ * returns fewer items than the page size; when the row count is an exact
32
+ * multiple of the page size, one extra request returns an empty page and
33
+ * iteration then stops (no items missed or duplicated). Pass `{ signal }`
34
+ * to cancel an in-flight page; `break` also stops further fetches.
35
+ */
36
+ sessions(params?: ConversationSessionListParams, options?: LocaleOptions & {
37
+ signal?: AbortSignal;
38
+ }): PagePromise<ConversationSessionListResponse, ConversationSessionSummary>;
39
+ /**
40
+ * Get a conversation session with its full turn history.
41
+ */
42
+ session(sessionKey: string, options?: LocaleOptions): Promise<ConversationSessionDetailResponse>;
43
+ /**
44
+ * Get actions (record mutations) linked to a conversation session.
45
+ */
46
+ actions(sessionKey: string, options?: LocaleOptions): Promise<ConversationSessionActionsResponse>;
47
+ }
48
+ //# sourceMappingURL=conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAA0B,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,WAAW,EAAoC,MAAM,yBAAyB,CAAC;AACxF,OAAO,KAAK,EACR,mBAAmB,EACnB,oBAAoB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACR,6BAA6B,EAC7B,+BAA+B,EAC/B,iCAAiC,EACjC,kCAAkC,EAClC,0BAA0B,EAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQrD,qBAAa,oBAAoB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;;;;;;OAQG;IACG,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAQhG;;;OAGG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOtD;;;;;;;;;;;OAWG;IACH,QAAQ,CACJ,MAAM,CAAC,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE,aAAa,GAAG;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnD,WAAW,CAAC,+BAA+B,EAAE,0BAA0B,CAAC;IA+B3E;;OAEG;IACG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,iCAAiC,CAAC;IAQtG;;OAEG;IACG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,kCAAkC,CAAC;CAO1G"}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConversationResource = void 0;
4
+ const fetch_client_1 = require("../_internal/fetch-client");
5
+ const pagination_1 = require("../_internal/pagination");
6
+ function appendLocale(path, options) {
7
+ if (!options?.locale)
8
+ return path;
9
+ const sep = path.includes('?') ? '&' : '?';
10
+ return `${path}${sep}locale=${encodeURIComponent(options.locale)}`;
11
+ }
12
+ class ConversationResource {
13
+ client;
14
+ constructor(client) {
15
+ this.client = client;
16
+ }
17
+ /**
18
+ * Send a natural language message to the cognitive agent.
19
+ *
20
+ * spec-039 FR-026: pass `{locale: 'es'}` to override the actor's
21
+ * `preferences.language` JWT claim for *this turn only*. Useful for
22
+ * preview/testing and for actors whose stored preference does not
23
+ * match their current need. Omit for canonical server-side resolution
24
+ * (JWT preferences.language → canonical).
25
+ */
26
+ async send(request, options) {
27
+ // POST /runtime/conversation/send returns the flat ConversationResponse body directly
28
+ // (`res.json(response)`, no {success,data} envelope). Opt out of the
29
+ // transport envelope-unwrap (G1): a reply with only envelope-shaped keys
30
+ // (e.g. {success, message}) would otherwise be misread as an envelope.
31
+ return this.client.post(appendLocale('/runtime/conversation/send', options), request, { operationId: 'runtimeConversationSend' });
32
+ }
33
+ /**
34
+ * Soft-delete a conversation session (sets status='cleared' on the row, keeping
35
+ * history for audit). Canonical route per ADR-0077 P7 runtime-mutable tier.
36
+ */
37
+ async deleteSession(sessionKey) {
38
+ await this.client.del(`/runtime/conversation/sessions/${encodeURIComponent(sessionKey)}`, { operationId: 'clearConversationSession' });
39
+ }
40
+ /**
41
+ * List past conversation sessions for the authenticated user.
42
+ *
43
+ * Returns a {@link PagePromise}: `await` it for the first page
44
+ * (`ConversationSessionSummary[]` — unchanged), or `for await (… of …)` to
45
+ * auto-paginate over every session. This endpoint has no `total`/cursor in
46
+ * its wire shape, so iteration advances by page size and stops when a page
47
+ * returns fewer items than the page size; when the row count is an exact
48
+ * multiple of the page size, one extra request returns an empty page and
49
+ * iteration then stops (no items missed or duplicated). Pass `{ signal }`
50
+ * to cancel an in-flight page; `break` also stops further fetches.
51
+ */
52
+ sessions(params, options) {
53
+ const buildPath = (offset, limit) => {
54
+ const query = new URLSearchParams();
55
+ if (params?.channel_name)
56
+ query.set('channel_name', params.channel_name);
57
+ if (params?.status)
58
+ query.set('status', params.status);
59
+ if (params?.from)
60
+ query.set('from', params.from);
61
+ if (params?.to)
62
+ query.set('to', params.to);
63
+ if (limit !== undefined)
64
+ query.set('limit', String(limit));
65
+ if (offset !== undefined)
66
+ query.set('offset', String(offset));
67
+ if (options?.locale)
68
+ query.set('locale', options.locale);
69
+ const qs = query.toString();
70
+ return qs ? `/runtime/conversation/sessions?${qs}` : '/runtime/conversation/sessions';
71
+ };
72
+ const signal = options?.signal;
73
+ const fetchPage = (p) => {
74
+ const path = buildPath(p.offset, p.limit);
75
+ return this.client.get(path, undefined, { operationId: 'listConversationSessions', ...(signal ? { signal } : {}) });
76
+ };
77
+ return new pagination_1.PagePromise(fetchPage, (0, pagination_1.bareArrayOffset)(), {
78
+ ...(params?.limit !== undefined ? { limit: params.limit } : {}),
79
+ ...(params?.offset !== undefined ? { offset: params.offset } : {}),
80
+ });
81
+ }
82
+ /**
83
+ * Get a conversation session with its full turn history.
84
+ */
85
+ async session(sessionKey, options) {
86
+ const path = `/runtime/conversation/sessions/${encodeURIComponent(sessionKey)}`;
87
+ const q = (0, fetch_client_1.localeQueryOrUndefined)(options);
88
+ return q
89
+ ? this.client.get(path, q, { operationId: 'getConversationSession' })
90
+ : this.client.get(path, undefined, { operationId: 'getConversationSession' });
91
+ }
92
+ /**
93
+ * Get actions (record mutations) linked to a conversation session.
94
+ */
95
+ async actions(sessionKey, options) {
96
+ const path = `/runtime/conversation/sessions/${encodeURIComponent(sessionKey)}/actions`;
97
+ const q = (0, fetch_client_1.localeQueryOrUndefined)(options);
98
+ return q
99
+ ? this.client.get(path, q, { operationId: 'listConversationActions' })
100
+ : this.client.get(path, undefined, { operationId: 'listConversationActions' });
101
+ }
102
+ }
103
+ exports.ConversationResource = ConversationResource;
104
+ //# sourceMappingURL=conversation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation.js","sourceRoot":"","sources":["../../src/resources/conversation.ts"],"names":[],"mappings":";;;AAAA,4DAAqF;AACrF,wDAAwF;AAcxF,SAAS,YAAY,CAAC,IAAY,EAAE,OAAuB;IACvD,IAAI,CAAC,OAAO,EAAE,MAAM;QAAE,OAAO,IAAI,CAAC;IAClC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC3C,OAAO,GAAG,IAAI,GAAG,GAAG,UAAU,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,MAAa,oBAAoB;IACA;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD;;;;;;;;OAQG;IACH,KAAK,CAAC,IAAI,CAAC,OAA4B,EAAE,OAAuB;QAC5D,sFAAsF;QACtF,qEAAqE;QACrE,yEAAyE;QACzE,uEAAuE;QACvE,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAuB,YAAY,CAAC,4BAA4B,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAC5J,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,aAAa,CAAC,UAAkB;QAClC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACjB,kCAAkC,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAClE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAC9C,CAAC;IACN,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QA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AAG,IAAA,qCAAsB,EAAC,OAAO,CAAC,CAAC;QAC1C,OAAO,CAAC;YACJ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAqC,IAAI,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC;YAC1G,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAqC,IAAI,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAC3H,CAAC;CACJ;AAlGD,oDAkGC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Embedding credential management resource (embedding-provider-registry, FR-018).
3
+ *
4
+ * Per-(tenant, declared embedding service) credentials — keyed on the name from
5
+ * `embeddings.services[]` (FR-023), never the provider, which is not an identity
6
+ * and is resolved server-side from that declaration. Write-only on the secret:
7
+ * `put` accepts the credential blob but no read endpoint ever returns it; `get` /
8
+ * `list` return only masked metadata.
9
+ *
10
+ * Authorization: tenant-level superuser. The wire surface returns 404
11
+ * indistinguishable from "not configured" when unauthorized (SEC.V12), and an
12
+ * empty list from `list`.
13
+ */
14
+ import { type FetchClient } from '../_internal/fetch-client';
15
+ import type { LocaleOptions } from '../types/locale';
16
+ export interface EmbeddingCredentialMetadata {
17
+ tenant_name: string;
18
+ /** The declared `embeddings.services[].name` this credential keys to. */
19
+ service_name: string;
20
+ /** "••••" + the credential fingerprint. Read-only; never the secret. */
21
+ credential_masked: string;
22
+ created_by: string;
23
+ updated_by: string;
24
+ created_at: string;
25
+ updated_at: string;
26
+ }
27
+ export type EmbeddingCredentialsListResponse = EmbeddingCredentialMetadata[];
28
+ export type EmbeddingCredentialResponse = EmbeddingCredentialMetadata;
29
+ /** apiKey providers (gemini, openai, anthropic-via-Voyage). */
30
+ export interface EmbeddingApiKeyCredentialInput {
31
+ apiKey: string;
32
+ baseUrl?: string;
33
+ }
34
+ /** Amazon Bedrock — static AWS credentials. */
35
+ export interface EmbeddingAwsCredentialInput {
36
+ accessKeyId: string;
37
+ secretAccessKey: string;
38
+ region: string;
39
+ sessionToken?: string;
40
+ }
41
+ export type EmbeddingCredentialPutInput = EmbeddingApiKeyCredentialInput | EmbeddingAwsCredentialInput;
42
+ export declare class EmbeddingCredentialsResource {
43
+ private readonly client;
44
+ constructor(client: FetchClient);
45
+ /** List masked metadata for every stored embedding-service credential. */
46
+ list(options?: LocaleOptions): Promise<EmbeddingCredentialsListResponse>;
47
+ /** Fetch masked metadata for one declared service's credential. 404 if not authorized / not configured. */
48
+ get(serviceName: string, options?: LocaleOptions): Promise<EmbeddingCredentialResponse>;
49
+ /**
50
+ * Set / replace a declared service's credential. Idempotent UPSERT.
51
+ *
52
+ * `serviceName` is the `embeddings.services[].name` the contract declares;
53
+ * the server resolves its provider and validates `input` against that
54
+ * provider's schema, so the blob shape follows the DECLARATION, not the path.
55
+ */
56
+ put(serviceName: string, input: EmbeddingCredentialPutInput): Promise<EmbeddingCredentialResponse>;
57
+ /** Remove a declared service's credential (soft-delete + sensitive wipe). */
58
+ delete(serviceName: string): Promise<void>;
59
+ }
60
+ //# sourceMappingURL=embedding-credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedding-credentials.d.ts","sourceRoot":"","sources":["../../src/resources/embedding-credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,2BAA2B;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,gCAAgC,GAAG,2BAA2B,EAAE,CAAC;AAE7E,MAAM,MAAM,2BAA2B,GAAG,2BAA2B,CAAC;AAEtE,+DAA+D;AAC/D,MAAM,WAAW,8BAA8B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,+CAA+C;AAC/C,MAAM,WAAW,2BAA2B;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,2BAA2B,GAAG,8BAA8B,GAAG,2BAA2B,CAAC;AAEvG,qBAAa,4BAA4B;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD,0EAA0E;IACpE,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,gCAAgC,CAAC;IAI9E,2GAA2G;IACrG,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAQ7F;;;;;;OAMG;IACG,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAcxG,6EAA6E;IACvE,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnD"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * Embedding credential management resource (embedding-provider-registry, FR-018).
4
+ *
5
+ * Per-(tenant, declared embedding service) credentials — keyed on the name from
6
+ * `embeddings.services[]` (FR-023), never the provider, which is not an identity
7
+ * and is resolved server-side from that declaration. Write-only on the secret:
8
+ * `put` accepts the credential blob but no read endpoint ever returns it; `get` /
9
+ * `list` return only masked metadata.
10
+ *
11
+ * Authorization: tenant-level superuser. The wire surface returns 404
12
+ * indistinguishable from "not configured" when unauthorized (SEC.V12), and an
13
+ * empty list from `list`.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.EmbeddingCredentialsResource = void 0;
17
+ const fetch_client_1 = require("../_internal/fetch-client");
18
+ class EmbeddingCredentialsResource {
19
+ client;
20
+ constructor(client) {
21
+ this.client = client;
22
+ }
23
+ /** List masked metadata for every stored embedding-service credential. */
24
+ async list(options) {
25
+ return this.client.get('/runtime/embedding-credentials', (0, fetch_client_1.localeQuery)(options), { operationId: 'listEmbeddingCredentials' });
26
+ }
27
+ /** Fetch masked metadata for one declared service's credential. 404 if not authorized / not configured. */
28
+ async get(serviceName, options) {
29
+ return this.client.get(`/runtime/embedding-credentials/${encodeURIComponent(serviceName)}`, (0, fetch_client_1.localeQuery)(options), { operationId: 'getEmbeddingCredential' });
30
+ }
31
+ /**
32
+ * Set / replace a declared service's credential. Idempotent UPSERT.
33
+ *
34
+ * `serviceName` is the `embeddings.services[].name` the contract declares;
35
+ * the server resolves its provider and validates `input` against that
36
+ * provider's schema, so the blob shape follows the DECLARATION, not the path.
37
+ */
38
+ async put(serviceName, input) {
39
+ const body = { ...input };
40
+ // Mirror the LLM resource's apiKey casing (wire field is `baseURL`).
41
+ if ('baseUrl' in input && input.baseUrl !== undefined) {
42
+ delete body.baseUrl;
43
+ body.baseURL = input.baseUrl;
44
+ }
45
+ return this.client.put(`/runtime/embedding-credentials/${encodeURIComponent(serviceName)}`, body, { operationId: 'setEmbeddingCredential' });
46
+ }
47
+ /** Remove a declared service's credential (soft-delete + sensitive wipe). */
48
+ async delete(serviceName) {
49
+ await this.client.del(`/runtime/embedding-credentials/${encodeURIComponent(serviceName)}`, { operationId: 'deleteEmbeddingCredential' });
50
+ }
51
+ }
52
+ exports.EmbeddingCredentialsResource = EmbeddingCredentialsResource;
53
+ //# sourceMappingURL=embedding-credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedding-credentials.js","sourceRoot":"","sources":["../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B,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC,CAAC;IAC7I,CAAC;CACJ;AA1CD,oEA0CC"}
@@ -0,0 +1,66 @@
1
+ import { type FetchClient } from '../_internal/fetch-client';
2
+ import type { EntityInput, FieldDefinitionInput } from '../types/entities';
3
+ import type { LocaleOptions } from '../types/locale';
4
+ import type { EntityListPayload, EntityPayload, EntityMutationPayload } from '../generated';
5
+ export declare class EntitiesResource {
6
+ private readonly client;
7
+ constructor(client: FetchClient);
8
+ /**
9
+ * List all entities for the current tenant.
10
+ * spec-039: pass `{locale: 'es'}` to receive Spanish labels; omit for
11
+ * server-side fallback (JWT preferences.language → canonical).
12
+ */
13
+ list(options?: LocaleOptions): Promise<EntityListPayload>;
14
+ /**
15
+ * Create a new entity.
16
+ */
17
+ create(input: EntityInput): Promise<EntityMutationPayload>;
18
+ /**
19
+ * Get a single entity by name.
20
+ */
21
+ get(entityName: string, options?: LocaleOptions): Promise<EntityPayload>;
22
+ /**
23
+ * Update an entity definition.
24
+ */
25
+ update(entityName: string, input: Partial<EntityInput>): Promise<EntityMutationPayload>;
26
+ /**
27
+ * Delete an entity.
28
+ */
29
+ delete(entityName: string): Promise<void>;
30
+ /**
31
+ * Add a field to an entity.
32
+ */
33
+ addField(entityName: string, field: FieldDefinitionInput): Promise<EntityMutationPayload>;
34
+ /**
35
+ * Update a field on an entity.
36
+ */
37
+ updateField(entityName: string, fieldName: string, update: Partial<FieldDefinitionInput>): Promise<EntityMutationPayload>;
38
+ /**
39
+ * Delete a field from an entity.
40
+ */
41
+ deleteField(entityName: string, fieldName: string): Promise<void>;
42
+ /**
43
+ * Replace an entity definition wholesale (PUT). {@link update} is the partial (PATCH) counterpart.
44
+ */
45
+ replace(entityName: string, input: EntityInput): Promise<EntityMutationPayload>;
46
+ /**
47
+ * List an entity's fields. The response is `{ entity_name, fields }` — the field
48
+ * array is nested under `fields` (the endpoint wraps it, unlike the transition/step lists).
49
+ */
50
+ listFields(entityName: string, options?: LocaleOptions): Promise<Record<string, unknown>>;
51
+ /**
52
+ * Read a single field definition.
53
+ */
54
+ getField(entityName: string, fieldName: string, options?: LocaleOptions): Promise<Record<string, unknown>>;
55
+ /**
56
+ * Replace a field definition wholesale (PUT). {@link updateField} is the partial (PATCH) counterpart.
57
+ */
58
+ replaceField(entityName: string, fieldName: string, input: FieldDefinitionInput): Promise<EntityMutationPayload>;
59
+ listFieldTransitions(entityName: string, fieldName: string, options?: LocaleOptions): Promise<Record<string, unknown>[]>;
60
+ getFieldTransition(entityName: string, fieldName: string, from: string, to: string, options?: LocaleOptions): Promise<Record<string, unknown>>;
61
+ createFieldTransition(entityName: string, fieldName: string, input: Record<string, unknown>): Promise<Record<string, unknown>>;
62
+ replaceFieldTransition(entityName: string, fieldName: string, from: string, to: string, input: Record<string, unknown>): Promise<Record<string, unknown>>;
63
+ patchFieldTransition(entityName: string, fieldName: string, from: string, to: string, patch: Record<string, unknown>): Promise<Record<string, unknown>>;
64
+ deleteFieldTransition(entityName: string, fieldName: string, from: string, to: string): Promise<void>;
65
+ }
66
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/resources/entities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE5F,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,i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