clinkx 1.2.0 → 1.4.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 (371) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +17 -8
  3. package/clinkx-workflows/dist/architecture-arena/admission.d.ts +16 -0
  4. package/clinkx-workflows/dist/architecture-arena/admission.js +107 -0
  5. package/clinkx-workflows/dist/architecture-arena/admission.js.map +1 -0
  6. package/clinkx-workflows/dist/architecture-arena/contract.d.ts +1368 -0
  7. package/clinkx-workflows/dist/architecture-arena/contract.js +254 -0
  8. package/clinkx-workflows/dist/architecture-arena/contract.js.map +1 -0
  9. package/clinkx-workflows/dist/architecture-arena/runtime.d.ts +53 -0
  10. package/clinkx-workflows/dist/architecture-arena/runtime.js +511 -0
  11. package/clinkx-workflows/dist/architecture-arena/runtime.js.map +1 -0
  12. package/clinkx-workflows/dist/architecture-comparison/admission.d.ts +17 -1
  13. package/clinkx-workflows/dist/architecture-comparison/admission.js +27 -4
  14. package/clinkx-workflows/dist/architecture-comparison/admission.js.map +1 -1
  15. package/clinkx-workflows/dist/architecture-comparison/contract.d.ts +59 -62
  16. package/clinkx-workflows/dist/architecture-comparison/contract.js +4 -21
  17. package/clinkx-workflows/dist/architecture-comparison/contract.js.map +1 -1
  18. package/clinkx-workflows/dist/architecture-comparison/runtime.d.ts +4 -3
  19. package/clinkx-workflows/dist/architecture-comparison/runtime.js +22 -67
  20. package/clinkx-workflows/dist/architecture-comparison/runtime.js.map +1 -1
  21. package/clinkx-workflows/dist/artifacts.d.ts +19 -4
  22. package/clinkx-workflows/dist/artifacts.js +16 -7
  23. package/clinkx-workflows/dist/artifacts.js.map +1 -1
  24. package/clinkx-workflows/dist/backend.d.ts +30 -0
  25. package/clinkx-workflows/dist/child-env.d.ts +3 -0
  26. package/clinkx-workflows/dist/child-env.js +11 -0
  27. package/clinkx-workflows/dist/child-env.js.map +1 -1
  28. package/clinkx-workflows/dist/clink-client.d.ts +8 -2
  29. package/clinkx-workflows/dist/clink-client.js +4 -2
  30. package/clinkx-workflows/dist/clink-client.js.map +1 -1
  31. package/clinkx-workflows/dist/context-preflight.d.ts +6 -0
  32. package/clinkx-workflows/dist/context-preflight.js.map +1 -1
  33. package/clinkx-workflows/dist/council-execution-policy.d.ts +3 -1
  34. package/clinkx-workflows/dist/council-execution-policy.js +4 -0
  35. package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
  36. package/clinkx-workflows/dist/dashboard/api-routes.d.ts +21 -0
  37. package/clinkx-workflows/dist/dashboard/api-routes.js +27 -0
  38. package/clinkx-workflows/dist/dashboard/api-routes.js.map +1 -1
  39. package/clinkx-workflows/dist/dashboard/auth/challenge-store.d.ts +13 -0
  40. package/clinkx-workflows/dist/dashboard/auth/challenge-store.js.map +1 -1
  41. package/clinkx-workflows/dist/dashboard/auth/controller.d.ts +27 -0
  42. package/clinkx-workflows/dist/dashboard/auth/controller.js +262 -23
  43. package/clinkx-workflows/dist/dashboard/auth/controller.js.map +1 -1
  44. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.d.ts +62 -0
  45. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js +70 -0
  46. package/clinkx-workflows/dist/dashboard/auth/settings-step-up.js.map +1 -0
  47. package/clinkx-workflows/dist/dashboard/contracts.d.ts +586 -586
  48. package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +28 -28
  49. package/clinkx-workflows/dist/dashboard/request-admission.d.ts +6 -0
  50. package/clinkx-workflows/dist/dashboard/request-admission.js +9 -0
  51. package/clinkx-workflows/dist/dashboard/request-admission.js.map +1 -1
  52. package/clinkx-workflows/dist/dashboard/server-factory.js +15 -1
  53. package/clinkx-workflows/dist/dashboard/server-factory.js.map +1 -1
  54. package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +32 -32
  55. package/clinkx-workflows/dist/dashboard/settings-contract.d.ts +1806 -0
  56. package/clinkx-workflows/dist/dashboard/settings-contract.js +630 -0
  57. package/clinkx-workflows/dist/dashboard/settings-contract.js.map +1 -0
  58. package/clinkx-workflows/dist/dashboard/settings-process-reader.d.ts +48 -0
  59. package/clinkx-workflows/dist/dashboard/settings-process-reader.js +195 -0
  60. package/clinkx-workflows/dist/dashboard/settings-process-reader.js.map +1 -0
  61. package/clinkx-workflows/dist/dashboard/settings-routes.d.ts +87 -0
  62. package/clinkx-workflows/dist/dashboard/settings-routes.js +690 -0
  63. package/clinkx-workflows/dist/dashboard/settings-routes.js.map +1 -0
  64. package/clinkx-workflows/dist/dashboard-ui/assets/index-DSOtuS0p.js +122 -0
  65. package/clinkx-workflows/dist/dashboard-ui/assets/style-C5guUjwN.css +1 -0
  66. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  67. package/clinkx-workflows/dist/delegate-signature.d.ts +4 -3
  68. package/clinkx-workflows/dist/delegate-signature.js +4 -3
  69. package/clinkx-workflows/dist/delegate-signature.js.map +1 -1
  70. package/clinkx-workflows/dist/durable-file-core.d.ts +76 -0
  71. package/clinkx-workflows/dist/durable-file-core.js +146 -0
  72. package/clinkx-workflows/dist/durable-file-core.js.map +1 -0
  73. package/clinkx-workflows/dist/durable-file.d.ts +13 -0
  74. package/clinkx-workflows/dist/durable-file.js +22 -0
  75. package/clinkx-workflows/dist/durable-file.js.map +1 -0
  76. package/clinkx-workflows/dist/engine.d.ts +42 -7
  77. package/clinkx-workflows/dist/engine.js +196 -24
  78. package/clinkx-workflows/dist/engine.js.map +1 -1
  79. package/clinkx-workflows/dist/index.js +68 -2
  80. package/clinkx-workflows/dist/index.js.map +1 -1
  81. package/clinkx-workflows/dist/ping-pong/admission.d.ts +127 -0
  82. package/clinkx-workflows/dist/ping-pong/admission.js +522 -0
  83. package/clinkx-workflows/dist/ping-pong/admission.js.map +1 -0
  84. package/clinkx-workflows/dist/ping-pong/contract.d.ts +2539 -0
  85. package/clinkx-workflows/dist/ping-pong/contract.js +819 -0
  86. package/clinkx-workflows/dist/ping-pong/contract.js.map +1 -0
  87. package/clinkx-workflows/dist/ping-pong/control.d.ts +67 -0
  88. package/clinkx-workflows/dist/ping-pong/control.js +12 -0
  89. package/clinkx-workflows/dist/ping-pong/control.js.map +1 -0
  90. package/clinkx-workflows/dist/ping-pong/runtime-handle.d.ts +24 -0
  91. package/clinkx-workflows/dist/ping-pong/runtime-handle.js +55 -0
  92. package/clinkx-workflows/dist/ping-pong/runtime-handle.js.map +1 -0
  93. package/clinkx-workflows/dist/ping-pong/runtime.d.ts +235 -0
  94. package/clinkx-workflows/dist/ping-pong/runtime.js +1183 -0
  95. package/clinkx-workflows/dist/ping-pong/runtime.js.map +1 -0
  96. package/clinkx-workflows/dist/ping-pong/settle.d.ts +57 -0
  97. package/clinkx-workflows/dist/ping-pong/settle.js +58 -0
  98. package/clinkx-workflows/dist/ping-pong/settle.js.map +1 -0
  99. package/clinkx-workflows/dist/ping-pong/sidecar.d.ts +65 -0
  100. package/clinkx-workflows/dist/ping-pong/sidecar.js +138 -0
  101. package/clinkx-workflows/dist/ping-pong/sidecar.js.map +1 -0
  102. package/clinkx-workflows/dist/plan-review/publication.d.ts +2 -1
  103. package/clinkx-workflows/dist/plan-review/publication.js +5 -6
  104. package/clinkx-workflows/dist/plan-review/publication.js.map +1 -1
  105. package/clinkx-workflows/dist/plan-review/snapshot.d.ts +3 -2
  106. package/clinkx-workflows/dist/plan-review/snapshot.js +8 -8
  107. package/clinkx-workflows/dist/plan-review/snapshot.js.map +1 -1
  108. package/clinkx-workflows/dist/recipe-host.d.ts +315 -0
  109. package/clinkx-workflows/dist/recipe-host.js +183 -0
  110. package/clinkx-workflows/dist/recipe-host.js.map +1 -0
  111. package/clinkx-workflows/dist/recipe-seats.d.ts +96 -0
  112. package/clinkx-workflows/dist/recipe-seats.js +163 -0
  113. package/clinkx-workflows/dist/recipe-seats.js.map +1 -0
  114. package/clinkx-workflows/dist/recipe-shared/evidence.d.ts +67 -0
  115. package/clinkx-workflows/dist/recipe-shared/evidence.js +111 -0
  116. package/clinkx-workflows/dist/recipe-shared/evidence.js.map +1 -0
  117. package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
  118. package/clinkx-workflows/dist/reducers/index.js +30 -0
  119. package/clinkx-workflows/dist/reducers/index.js.map +1 -1
  120. package/clinkx-workflows/dist/run-lock-reclaim.d.ts +44 -0
  121. package/clinkx-workflows/dist/run-lock-reclaim.js +86 -0
  122. package/clinkx-workflows/dist/run-lock-reclaim.js.map +1 -0
  123. package/clinkx-workflows/dist/settings/audit.d.ts +101 -0
  124. package/clinkx-workflows/dist/settings/audit.js +318 -0
  125. package/clinkx-workflows/dist/settings/audit.js.map +1 -0
  126. package/clinkx-workflows/dist/settings/bootstrap.d.ts +35 -0
  127. package/clinkx-workflows/dist/settings/bootstrap.js +52 -0
  128. package/clinkx-workflows/dist/settings/bootstrap.js.map +1 -0
  129. package/clinkx-workflows/dist/settings/codec.d.ts +51 -0
  130. package/clinkx-workflows/dist/settings/codec.js +410 -0
  131. package/clinkx-workflows/dist/settings/codec.js.map +1 -0
  132. package/clinkx-workflows/dist/settings/durable-write.d.ts +48 -0
  133. package/clinkx-workflows/dist/settings/durable-write.js +31 -0
  134. package/clinkx-workflows/dist/settings/durable-write.js.map +1 -0
  135. package/clinkx-workflows/dist/settings/index.d.ts +20 -0
  136. package/clinkx-workflows/dist/settings/index.js +23 -0
  137. package/clinkx-workflows/dist/settings/index.js.map +1 -0
  138. package/clinkx-workflows/dist/settings/loader.d.ts +80 -0
  139. package/clinkx-workflows/dist/settings/loader.js +577 -0
  140. package/clinkx-workflows/dist/settings/loader.js.map +1 -0
  141. package/clinkx-workflows/dist/settings/lock.d.ts +108 -0
  142. package/clinkx-workflows/dist/settings/lock.js +344 -0
  143. package/clinkx-workflows/dist/settings/lock.js.map +1 -0
  144. package/clinkx-workflows/dist/settings/paths.d.ts +65 -0
  145. package/clinkx-workflows/dist/settings/paths.js +173 -0
  146. package/clinkx-workflows/dist/settings/paths.js.map +1 -0
  147. package/clinkx-workflows/dist/settings/process-heartbeat.d.ts +47 -0
  148. package/clinkx-workflows/dist/settings/process-heartbeat.js +305 -0
  149. package/clinkx-workflows/dist/settings/process-heartbeat.js.map +1 -0
  150. package/clinkx-workflows/dist/settings/registry.d.ts +178 -0
  151. package/clinkx-workflows/dist/settings/registry.js +1285 -0
  152. package/clinkx-workflows/dist/settings/registry.js.map +1 -0
  153. package/clinkx-workflows/dist/settings/schema.d.ts +404 -0
  154. package/clinkx-workflows/dist/settings/schema.js +415 -0
  155. package/clinkx-workflows/dist/settings/schema.js.map +1 -0
  156. package/clinkx-workflows/dist/settings/store.d.ts +157 -0
  157. package/clinkx-workflows/dist/settings/store.js +842 -0
  158. package/clinkx-workflows/dist/settings/store.js.map +1 -0
  159. package/clinkx-workflows/dist/state-schema.d.ts +11 -0
  160. package/clinkx-workflows/dist/state-schema.js +4 -1
  161. package/clinkx-workflows/dist/state-schema.js.map +1 -1
  162. package/clinkx-workflows/dist/state.d.ts +178 -3
  163. package/clinkx-workflows/dist/state.js +618 -83
  164. package/clinkx-workflows/dist/state.js.map +1 -1
  165. package/clinkx-workflows/dist/stdio-entry.d.ts +2 -0
  166. package/clinkx-workflows/dist/stdio-entry.js +52 -0
  167. package/clinkx-workflows/dist/stdio-entry.js.map +1 -0
  168. package/clinkx-workflows/dist/transport.d.ts +2 -1
  169. package/clinkx-workflows/dist/transport.js +5 -0
  170. package/clinkx-workflows/dist/transport.js.map +1 -1
  171. package/clinkx-workflows/dist/validators/architecture-arena.d.ts +6 -0
  172. package/clinkx-workflows/dist/validators/architecture-arena.js +16 -0
  173. package/clinkx-workflows/dist/validators/architecture-arena.js.map +1 -0
  174. package/clinkx-workflows/dist/validators/index.js +4 -0
  175. package/clinkx-workflows/dist/validators/index.js.map +1 -1
  176. package/clinkx-workflows/dist/validators/ping-pong.d.ts +6 -0
  177. package/clinkx-workflows/dist/validators/ping-pong.js +10 -0
  178. package/clinkx-workflows/dist/validators/ping-pong.js.map +1 -0
  179. package/clinkx-workflows/dist/workflow-tools.d.ts +51 -5
  180. package/clinkx-workflows/dist/workflow-tools.js +785 -34
  181. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  182. package/clinkx-workflows/dist/workflow-verification-contract.d.ts +4 -4
  183. package/clinkx-workflows/templates/architecture-arena/candidate.txt +39 -0
  184. package/clinkx-workflows/templates/architecture-arena/judge.txt +34 -0
  185. package/clinkx-workflows/templates/ping-pong/implement.txt +14 -0
  186. package/clinkx-workflows/templates/ping-pong/remediate.txt +14 -0
  187. package/clinkx-workflows/templates/ping-pong/review.txt +27 -0
  188. package/clinkx-workflows/workflows/architecture-arena.yaml +127 -0
  189. package/clinkx-workflows/workflows/ping-pong.yaml +158 -0
  190. package/dist/context-builder/bundle.js +4 -3
  191. package/dist/context-builder/bundle.js.map +1 -1
  192. package/dist/context-builder/delegate-packet.d.ts +1 -0
  193. package/dist/context-builder/delegate-packet.js +66 -7
  194. package/dist/context-builder/delegate-packet.js.map +1 -1
  195. package/dist/context-builder/delegate-validation.d.ts +12 -3
  196. package/dist/context-builder/delegate-validation.js +23 -13
  197. package/dist/context-builder/delegate-validation.js.map +1 -1
  198. package/dist/context-builder/external-gaps.d.ts +14 -3
  199. package/dist/context-builder/external-gaps.js +124 -18
  200. package/dist/context-builder/external-gaps.js.map +1 -1
  201. package/dist/context-builder/handler.js +108 -191
  202. package/dist/context-builder/handler.js.map +1 -1
  203. package/dist/context-builder/review-coverage.js +27 -1
  204. package/dist/context-builder/review-coverage.js.map +1 -1
  205. package/dist/context-builder/secrets.js +1 -1
  206. package/dist/context-builder/secrets.js.map +1 -1
  207. package/dist/context-builder/versions.d.ts +10 -4
  208. package/dist/context-builder/versions.js +10 -4
  209. package/dist/context-builder/versions.js.map +1 -1
  210. package/dist/context-builder/workflow-runner.js +33 -24
  211. package/dist/context-builder/workflow-runner.js.map +1 -1
  212. package/dist/dashboard-cli.d.ts +2 -0
  213. package/dist/dashboard-cli.js +197 -58
  214. package/dist/dashboard-cli.js.map +1 -1
  215. package/dist/dashboard-companion/client.d.ts +10 -0
  216. package/dist/dashboard-companion/client.js +43 -1
  217. package/dist/dashboard-companion/client.js.map +1 -1
  218. package/dist/dashboard-companion/config.d.ts +19 -1
  219. package/dist/dashboard-companion/config.js +104 -3
  220. package/dist/dashboard-companion/config.js.map +1 -1
  221. package/dist/dashboard-companion/protocol.d.ts +16 -0
  222. package/dist/dashboard-companion/protocol.js +55 -1
  223. package/dist/dashboard-companion/protocol.js.map +1 -1
  224. package/dist/dashboard-companion/workstation-binding.d.ts +69 -0
  225. package/dist/dashboard-companion/workstation-binding.js +192 -0
  226. package/dist/dashboard-companion/workstation-binding.js.map +1 -0
  227. package/dist/dashboard-gateway/admin-cli.d.ts +10 -0
  228. package/dist/dashboard-gateway/admin-cli.js +266 -0
  229. package/dist/dashboard-gateway/admin-cli.js.map +1 -0
  230. package/dist/dashboard-gateway/config.d.ts +50 -0
  231. package/dist/dashboard-gateway/config.js +235 -1
  232. package/dist/dashboard-gateway/config.js.map +1 -1
  233. package/dist/dashboard-gateway/connection-registry.d.ts +100 -0
  234. package/dist/dashboard-gateway/connection-registry.js +228 -0
  235. package/dist/dashboard-gateway/connection-registry.js.map +1 -0
  236. package/dist/dashboard-gateway/control-plane/account-auth.d.ts +78 -0
  237. package/dist/dashboard-gateway/control-plane/account-auth.js +198 -0
  238. package/dist/dashboard-gateway/control-plane/account-auth.js.map +1 -0
  239. package/dist/dashboard-gateway/control-plane/billing.d.ts +264 -0
  240. package/dist/dashboard-gateway/control-plane/billing.js +787 -0
  241. package/dist/dashboard-gateway/control-plane/billing.js.map +1 -0
  242. package/dist/dashboard-gateway/control-plane/contracts.d.ts +1293 -0
  243. package/dist/dashboard-gateway/control-plane/contracts.js +280 -0
  244. package/dist/dashboard-gateway/control-plane/contracts.js.map +1 -0
  245. package/dist/dashboard-gateway/control-plane/cookies.d.ts +13 -0
  246. package/dist/dashboard-gateway/control-plane/cookies.js +46 -0
  247. package/dist/dashboard-gateway/control-plane/cookies.js.map +1 -0
  248. package/dist/dashboard-gateway/control-plane/credentials.d.ts +63 -0
  249. package/dist/dashboard-gateway/control-plane/credentials.js +66 -0
  250. package/dist/dashboard-gateway/control-plane/credentials.js.map +1 -0
  251. package/dist/dashboard-gateway/control-plane/entitlements.d.ts +118 -0
  252. package/dist/dashboard-gateway/control-plane/entitlements.js +329 -0
  253. package/dist/dashboard-gateway/control-plane/entitlements.js.map +1 -0
  254. package/dist/dashboard-gateway/control-plane/errors.d.ts +17 -0
  255. package/dist/dashboard-gateway/control-plane/errors.js +23 -0
  256. package/dist/dashboard-gateway/control-plane/errors.js.map +1 -0
  257. package/dist/dashboard-gateway/control-plane/hosts.d.ts +6 -0
  258. package/dist/dashboard-gateway/control-plane/hosts.js +16 -0
  259. package/dist/dashboard-gateway/control-plane/hosts.js.map +1 -0
  260. package/dist/dashboard-gateway/control-plane/http.d.ts +34 -0
  261. package/dist/dashboard-gateway/control-plane/http.js +331 -0
  262. package/dist/dashboard-gateway/control-plane/http.js.map +1 -0
  263. package/dist/dashboard-gateway/control-plane/schema.d.ts +9 -0
  264. package/dist/dashboard-gateway/control-plane/schema.js +247 -0
  265. package/dist/dashboard-gateway/control-plane/schema.js.map +1 -0
  266. package/dist/dashboard-gateway/control-plane/secrets.d.ts +20 -0
  267. package/dist/dashboard-gateway/control-plane/secrets.js +39 -0
  268. package/dist/dashboard-gateway/control-plane/secrets.js.map +1 -0
  269. package/dist/dashboard-gateway/control-plane/store.d.ts +579 -0
  270. package/dist/dashboard-gateway/control-plane/store.js +1115 -0
  271. package/dist/dashboard-gateway/control-plane/store.js.map +1 -0
  272. package/dist/dashboard-gateway/cookie-boundary.d.ts +60 -0
  273. package/dist/dashboard-gateway/cookie-boundary.js +205 -0
  274. package/dist/dashboard-gateway/cookie-boundary.js.map +1 -0
  275. package/dist/dashboard-gateway/index.js +271 -494
  276. package/dist/dashboard-gateway/index.js.map +1 -1
  277. package/dist/dashboard-gateway/main.js +7 -2
  278. package/dist/dashboard-gateway/main.js.map +1 -1
  279. package/dist/dashboard-gateway/routing.d.ts +43 -0
  280. package/dist/dashboard-gateway/routing.js +65 -0
  281. package/dist/dashboard-gateway/routing.js.map +1 -0
  282. package/dist/dashboard-gateway/tenant-gateway.d.ts +56 -0
  283. package/dist/dashboard-gateway/tenant-gateway.js +989 -0
  284. package/dist/dashboard-gateway/tenant-gateway.js.map +1 -0
  285. package/dist/dashboard-gateway/tenant-main.d.ts +41 -0
  286. package/dist/dashboard-gateway/tenant-main.js +303 -0
  287. package/dist/dashboard-gateway/tenant-main.js.map +1 -0
  288. package/dist/dashboard-gateway/tunnel-errors.d.ts +16 -0
  289. package/dist/dashboard-gateway/tunnel-errors.js +22 -0
  290. package/dist/dashboard-gateway/tunnel-errors.js.map +1 -0
  291. package/dist/dashboard-gateway/tunnel-http.d.ts +21 -0
  292. package/dist/dashboard-gateway/tunnel-http.js +195 -0
  293. package/dist/dashboard-gateway/tunnel-http.js.map +1 -0
  294. package/dist/elaris/config.d.ts +10 -0
  295. package/dist/elaris/config.js +27 -1
  296. package/dist/elaris/config.js.map +1 -1
  297. package/dist/elaris/tools.js +4 -1
  298. package/dist/elaris/tools.js.map +1 -1
  299. package/dist/handler.d.ts +6 -0
  300. package/dist/handler.js +17 -1
  301. package/dist/handler.js.map +1 -1
  302. package/dist/index.d.ts +0 -31
  303. package/dist/index.js +41 -404
  304. package/dist/index.js.map +1 -1
  305. package/dist/lib.d.ts +17 -0
  306. package/dist/lib.js +17 -0
  307. package/dist/lib.js.map +1 -0
  308. package/dist/local-clink-backend.d.ts +2 -1
  309. package/dist/local-clink-backend.js +28 -4
  310. package/dist/local-clink-backend.js.map +1 -1
  311. package/dist/parsers/extract.d.ts +19 -1
  312. package/dist/parsers/extract.js +68 -3
  313. package/dist/parsers/extract.js.map +1 -1
  314. package/dist/pipeline.d.ts +17 -1
  315. package/dist/pipeline.js +34 -6
  316. package/dist/pipeline.js.map +1 -1
  317. package/dist/process-group.d.ts +65 -0
  318. package/dist/process-group.js +153 -0
  319. package/dist/process-group.js.map +1 -0
  320. package/dist/progress-report/lock.d.ts +17 -59
  321. package/dist/progress-report/lock.js +25 -329
  322. package/dist/progress-report/lock.js.map +1 -1
  323. package/dist/progress-report/schema.d.ts +23 -23
  324. package/dist/project-verification/files.js +1 -1
  325. package/dist/project-verification/files.js.map +1 -1
  326. package/dist/project-verification/process.js +23 -44
  327. package/dist/project-verification/process.js.map +1 -1
  328. package/dist/project-verification/service.js +9 -1
  329. package/dist/project-verification/service.js.map +1 -1
  330. package/dist/prompt.d.ts +7 -0
  331. package/dist/prompt.js +18 -1
  332. package/dist/prompt.js.map +1 -1
  333. package/dist/recipe-host/git-trust.d.ts +43 -0
  334. package/dist/recipe-host/git-trust.js +360 -0
  335. package/dist/recipe-host/git-trust.js.map +1 -0
  336. package/dist/recipe-host/git.d.ts +42 -0
  337. package/dist/recipe-host/git.js +207 -0
  338. package/dist/recipe-host/git.js.map +1 -0
  339. package/dist/recipe-host/native-recipe-host.d.ts +127 -0
  340. package/dist/recipe-host/native-recipe-host.js +880 -0
  341. package/dist/recipe-host/native-recipe-host.js.map +1 -0
  342. package/dist/recipe-host/seat-cwd.d.ts +16 -0
  343. package/dist/recipe-host/seat-cwd.js +170 -0
  344. package/dist/recipe-host/seat-cwd.js.map +1 -0
  345. package/dist/runner.d.ts +43 -1
  346. package/dist/runner.js +234 -35
  347. package/dist/runner.js.map +1 -1
  348. package/dist/server.js +84 -5
  349. package/dist/server.js.map +1 -1
  350. package/dist/settings-cli/clients.d.ts +137 -0
  351. package/dist/settings-cli/clients.js +1124 -0
  352. package/dist/settings-cli/clients.js.map +1 -0
  353. package/dist/settings-cli/commands.d.ts +67 -0
  354. package/dist/settings-cli/commands.js +726 -0
  355. package/dist/settings-cli/commands.js.map +1 -0
  356. package/dist/settings-cli/format.d.ts +34 -0
  357. package/dist/settings-cli/format.js +40 -0
  358. package/dist/settings-cli/format.js.map +1 -0
  359. package/dist/settings-cli/main.d.ts +18 -0
  360. package/dist/settings-cli/main.js +256 -0
  361. package/dist/settings-cli/main.js.map +1 -0
  362. package/dist/stdio-main.d.ts +73 -0
  363. package/dist/stdio-main.js +455 -0
  364. package/dist/stdio-main.js.map +1 -0
  365. package/docs/configuration.md +362 -40
  366. package/docs/engineering-recipes.md +291 -0
  367. package/docs/security.md +234 -6
  368. package/docs/verification/project-checks.md +24 -2
  369. package/package.json +6 -2
  370. package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +0 -115
  371. package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +0 -1
@@ -0,0 +1,1293 @@
1
+ import { z } from "zod";
2
+ export declare const CONTROL_PATH_PREFIX = "/api/control/";
3
+ /** One subscription covers at most this many live workstations. */
4
+ export declare const MAX_WORKSTATIONS = 2;
5
+ /** A workstation API key: the companion's static device credential. */
6
+ export declare const DeviceCredentialSchema: z.ZodString;
7
+ export declare const AccountIdSchema: z.ZodString;
8
+ export declare const TenantIdSchema: z.ZodString;
9
+ export declare const CompanionIdSchema: z.ZodString;
10
+ export declare const CredentialIdSchema: z.ZodString;
11
+ export declare const UtcTimestampSchema: z.ZodString;
12
+ export declare const HttpsUrlSchema: z.ZodEffects<z.ZodString, string, string>;
13
+ export declare const ControlErrorCodeSchema: z.ZodEnum<["unauthenticated", "auth_failed", "forbidden", "not_member", "not_found", "method_not_allowed", "misdirected_request", "credential_revoked", "entitlement_inactive", "context_mismatch", "not_active", "workstation_limit", "workstation_not_found", "workstation_required", "subscription_active", "payload_too_large", "invalid_request", "webhook_signature_invalid", "rate_limited", "outcome_unknown", "store_unavailable", "provider_unavailable", "companion_offline"]>;
14
+ export type ControlErrorCode = z.infer<typeof ControlErrorCodeSchema>;
15
+ export declare const CONTROL_ERROR_HTTP_STATUS: {
16
+ readonly unauthenticated: 401;
17
+ readonly auth_failed: 401;
18
+ readonly forbidden: 403;
19
+ readonly not_member: 403;
20
+ readonly not_found: 404;
21
+ readonly method_not_allowed: 405;
22
+ readonly misdirected_request: 421;
23
+ readonly credential_revoked: 401;
24
+ readonly entitlement_inactive: 402;
25
+ readonly context_mismatch: 409;
26
+ readonly not_active: 409;
27
+ readonly workstation_limit: 409;
28
+ readonly workstation_not_found: 404;
29
+ readonly workstation_required: 400;
30
+ readonly subscription_active: 409;
31
+ readonly payload_too_large: 413;
32
+ readonly invalid_request: 400;
33
+ readonly webhook_signature_invalid: 400;
34
+ readonly rate_limited: 429;
35
+ readonly outcome_unknown: 502;
36
+ readonly store_unavailable: 503;
37
+ readonly provider_unavailable: 503;
38
+ readonly companion_offline: 503;
39
+ };
40
+ export declare const ControlErrorResponseSchema: z.ZodObject<{
41
+ error: z.ZodObject<{
42
+ code: z.ZodEnum<["unauthenticated", "auth_failed", "forbidden", "not_member", "not_found", "method_not_allowed", "misdirected_request", "credential_revoked", "entitlement_inactive", "context_mismatch", "not_active", "workstation_limit", "workstation_not_found", "workstation_required", "subscription_active", "payload_too_large", "invalid_request", "webhook_signature_invalid", "rate_limited", "outcome_unknown", "store_unavailable", "provider_unavailable", "companion_offline"]>;
43
+ message: z.ZodOptional<z.ZodString>;
44
+ }, "strict", z.ZodTypeAny, {
45
+ code: "auth_failed" | "rate_limited" | "payload_too_large" | "forbidden" | "unauthenticated" | "not_member" | "not_found" | "method_not_allowed" | "misdirected_request" | "credential_revoked" | "entitlement_inactive" | "context_mismatch" | "not_active" | "workstation_limit" | "workstation_not_found" | "workstation_required" | "subscription_active" | "invalid_request" | "webhook_signature_invalid" | "outcome_unknown" | "store_unavailable" | "provider_unavailable" | "companion_offline";
46
+ message?: string | undefined;
47
+ }, {
48
+ code: "auth_failed" | "rate_limited" | "payload_too_large" | "forbidden" | "unauthenticated" | "not_member" | "not_found" | "method_not_allowed" | "misdirected_request" | "credential_revoked" | "entitlement_inactive" | "context_mismatch" | "not_active" | "workstation_limit" | "workstation_not_found" | "workstation_required" | "subscription_active" | "invalid_request" | "webhook_signature_invalid" | "outcome_unknown" | "store_unavailable" | "provider_unavailable" | "companion_offline";
49
+ message?: string | undefined;
50
+ }>;
51
+ }, "strict", z.ZodTypeAny, {
52
+ error: {
53
+ code: "auth_failed" | "rate_limited" | "payload_too_large" | "forbidden" | "unauthenticated" | "not_member" | "not_found" | "method_not_allowed" | "misdirected_request" | "credential_revoked" | "entitlement_inactive" | "context_mismatch" | "not_active" | "workstation_limit" | "workstation_not_found" | "workstation_required" | "subscription_active" | "invalid_request" | "webhook_signature_invalid" | "outcome_unknown" | "store_unavailable" | "provider_unavailable" | "companion_offline";
54
+ message?: string | undefined;
55
+ };
56
+ }, {
57
+ error: {
58
+ code: "auth_failed" | "rate_limited" | "payload_too_large" | "forbidden" | "unauthenticated" | "not_member" | "not_found" | "method_not_allowed" | "misdirected_request" | "credential_revoked" | "entitlement_inactive" | "context_mismatch" | "not_active" | "workstation_limit" | "workstation_not_found" | "workstation_required" | "subscription_active" | "invalid_request" | "webhook_signature_invalid" | "outcome_unknown" | "store_unavailable" | "provider_unavailable" | "companion_offline";
59
+ message?: string | undefined;
60
+ };
61
+ }>;
62
+ export type ControlErrorResponse = z.infer<typeof ControlErrorResponseSchema>;
63
+ export declare const WorkspaceSummarySchema: z.ZodObject<{
64
+ id: z.ZodString;
65
+ }, "strict", z.ZodTypeAny, {
66
+ id: string;
67
+ }, {
68
+ id: string;
69
+ }>;
70
+ export type WorkspaceSummary = z.infer<typeof WorkspaceSummarySchema>;
71
+ export declare const MembershipRoleSchema: z.ZodEnum<["owner"]>;
72
+ export declare const AccountSummarySchema: z.ZodObject<{
73
+ id: z.ZodString;
74
+ display_name: z.ZodNullable<z.ZodString>;
75
+ }, "strict", z.ZodTypeAny, {
76
+ id: string;
77
+ display_name: string | null;
78
+ }, {
79
+ id: string;
80
+ display_name: string | null;
81
+ }>;
82
+ export declare const AuthStartRequestSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
83
+ export type AuthStartRequest = z.infer<typeof AuthStartRequestSchema>;
84
+ export declare const AuthStartResponseSchema: z.ZodObject<{
85
+ authorization_url: z.ZodEffects<z.ZodString, string, string>;
86
+ }, "strict", z.ZodTypeAny, {
87
+ authorization_url: string;
88
+ }, {
89
+ authorization_url: string;
90
+ }>;
91
+ export type AuthStartResponse = z.infer<typeof AuthStartResponseSchema>;
92
+ export declare const AuthCallbackQuerySchema: z.ZodEffects<z.ZodObject<{
93
+ state: z.ZodString;
94
+ code: z.ZodOptional<z.ZodString>;
95
+ error: z.ZodOptional<z.ZodString>;
96
+ error_description: z.ZodOptional<z.ZodString>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ state: string;
99
+ error?: string | undefined;
100
+ code?: string | undefined;
101
+ error_description?: string | undefined;
102
+ }, {
103
+ state: string;
104
+ error?: string | undefined;
105
+ code?: string | undefined;
106
+ error_description?: string | undefined;
107
+ }>, {
108
+ state: string;
109
+ error?: string | undefined;
110
+ code?: string | undefined;
111
+ error_description?: string | undefined;
112
+ }, {
113
+ state: string;
114
+ error?: string | undefined;
115
+ code?: string | undefined;
116
+ error_description?: string | undefined;
117
+ }>;
118
+ export type AuthCallbackQuery = z.infer<typeof AuthCallbackQuerySchema>;
119
+ export declare const AuthLogoutRequestSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
120
+ export declare const AuthLogoutResponseSchema: z.ZodObject<{
121
+ logged_out: z.ZodLiteral<true>;
122
+ }, "strict", z.ZodTypeAny, {
123
+ logged_out: true;
124
+ }, {
125
+ logged_out: true;
126
+ }>;
127
+ export type AuthLogoutResponse = z.infer<typeof AuthLogoutResponseSchema>;
128
+ export declare const AuthSessionResponseSchema: z.ZodObject<{
129
+ account: z.ZodObject<{
130
+ id: z.ZodString;
131
+ display_name: z.ZodNullable<z.ZodString>;
132
+ }, "strict", z.ZodTypeAny, {
133
+ id: string;
134
+ display_name: string | null;
135
+ }, {
136
+ id: string;
137
+ display_name: string | null;
138
+ }>;
139
+ expires_at: z.ZodString;
140
+ }, "strict", z.ZodTypeAny, {
141
+ account: {
142
+ id: string;
143
+ display_name: string | null;
144
+ };
145
+ expires_at: string;
146
+ }, {
147
+ account: {
148
+ id: string;
149
+ display_name: string | null;
150
+ };
151
+ expires_at: string;
152
+ }>;
153
+ export type AuthSessionResponse = z.infer<typeof AuthSessionResponseSchema>;
154
+ export declare const SubscriptionStateSchema: z.ZodEnum<["none", "active", "trialing", "past_due", "incomplete", "incomplete_expired", "unpaid", "canceled", "paused", "unknown"]>;
155
+ export type SubscriptionState = z.infer<typeof SubscriptionStateSchema>;
156
+ export declare const AccessReasonSchema: z.ZodEnum<["paid_period", "past_due_grace", "period_ended", "grace_expired", "no_purchase", "payment_pending", "subscription_inactive", "unknown_state", "suspended", "operator_grant"]>;
157
+ export declare const EntitlementStatusSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
158
+ access: z.ZodEnum<["granted", "denied"]>;
159
+ reason: z.ZodEnum<["paid_period", "past_due_grace", "period_ended", "grace_expired", "no_purchase", "payment_pending", "subscription_inactive", "unknown_state", "suspended", "operator_grant"]>;
160
+ subscription_state: z.ZodEnum<["none", "active", "trialing", "past_due", "incomplete", "incomplete_expired", "unpaid", "canceled", "paused", "unknown"]>;
161
+ access_until: z.ZodNullable<z.ZodString>;
162
+ grace_deadline: z.ZodNullable<z.ZodString>;
163
+ suspended: z.ZodBoolean;
164
+ /** The unexpired operator grant's cutoff, else `null`. */
165
+ grant_until: z.ZodNullable<z.ZodString>;
166
+ last_reconciled_at: z.ZodNullable<z.ZodString>;
167
+ stale: z.ZodBoolean;
168
+ }, "strict", z.ZodTypeAny, {
169
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
170
+ stale: boolean;
171
+ suspended: boolean;
172
+ access: "denied" | "granted";
173
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
174
+ access_until: string | null;
175
+ grace_deadline: string | null;
176
+ grant_until: string | null;
177
+ last_reconciled_at: string | null;
178
+ }, {
179
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
180
+ stale: boolean;
181
+ suspended: boolean;
182
+ access: "denied" | "granted";
183
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
184
+ access_until: string | null;
185
+ grace_deadline: string | null;
186
+ grant_until: string | null;
187
+ last_reconciled_at: string | null;
188
+ }>, {
189
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
190
+ stale: boolean;
191
+ suspended: boolean;
192
+ access: "denied" | "granted";
193
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
194
+ access_until: string | null;
195
+ grace_deadline: string | null;
196
+ grant_until: string | null;
197
+ last_reconciled_at: string | null;
198
+ }, {
199
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
200
+ stale: boolean;
201
+ suspended: boolean;
202
+ access: "denied" | "granted";
203
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
204
+ access_until: string | null;
205
+ grace_deadline: string | null;
206
+ grant_until: string | null;
207
+ last_reconciled_at: string | null;
208
+ }>, {
209
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
210
+ stale: boolean;
211
+ suspended: boolean;
212
+ access: "denied" | "granted";
213
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
214
+ access_until: string | null;
215
+ grace_deadline: string | null;
216
+ grant_until: string | null;
217
+ last_reconciled_at: string | null;
218
+ }, {
219
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
220
+ stale: boolean;
221
+ suspended: boolean;
222
+ access: "denied" | "granted";
223
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
224
+ access_until: string | null;
225
+ grace_deadline: string | null;
226
+ grant_until: string | null;
227
+ last_reconciled_at: string | null;
228
+ }>;
229
+ export type EntitlementStatus = z.infer<typeof EntitlementStatusSchema>;
230
+ export declare const WorkstationLabelSchema: z.ZodString;
231
+ export declare const WorkstationConnectionSchema: z.ZodEffects<z.ZodObject<{
232
+ state: z.ZodEnum<["offline", "online"]>;
233
+ connection_generation: z.ZodNullable<z.ZodNumber>;
234
+ }, "strict", z.ZodTypeAny, {
235
+ state: "offline" | "online";
236
+ connection_generation: number | null;
237
+ }, {
238
+ state: "offline" | "online";
239
+ connection_generation: number | null;
240
+ }>, {
241
+ state: "offline" | "online";
242
+ connection_generation: number | null;
243
+ }, {
244
+ state: "offline" | "online";
245
+ connection_generation: number | null;
246
+ }>;
247
+ export declare const WorkstationSummarySchema: z.ZodObject<{
248
+ companion_id: z.ZodString;
249
+ label: z.ZodString;
250
+ created_at: z.ZodString;
251
+ key_issued_at: z.ZodNullable<z.ZodString>;
252
+ connection: z.ZodEffects<z.ZodObject<{
253
+ state: z.ZodEnum<["offline", "online"]>;
254
+ connection_generation: z.ZodNullable<z.ZodNumber>;
255
+ }, "strict", z.ZodTypeAny, {
256
+ state: "offline" | "online";
257
+ connection_generation: number | null;
258
+ }, {
259
+ state: "offline" | "online";
260
+ connection_generation: number | null;
261
+ }>, {
262
+ state: "offline" | "online";
263
+ connection_generation: number | null;
264
+ }, {
265
+ state: "offline" | "online";
266
+ connection_generation: number | null;
267
+ }>;
268
+ }, "strict", z.ZodTypeAny, {
269
+ companion_id: string;
270
+ connection: {
271
+ state: "offline" | "online";
272
+ connection_generation: number | null;
273
+ };
274
+ created_at: string;
275
+ label: string;
276
+ key_issued_at: string | null;
277
+ }, {
278
+ companion_id: string;
279
+ connection: {
280
+ state: "offline" | "online";
281
+ connection_generation: number | null;
282
+ };
283
+ created_at: string;
284
+ label: string;
285
+ key_issued_at: string | null;
286
+ }>;
287
+ export type WorkstationSummary = z.infer<typeof WorkstationSummarySchema>;
288
+ export declare const WorkspaceReadResponseSchema: z.ZodObject<{
289
+ workspace: z.ZodObject<{
290
+ id: z.ZodString;
291
+ }, "strict", z.ZodTypeAny, {
292
+ id: string;
293
+ }, {
294
+ id: string;
295
+ }>;
296
+ role: z.ZodEnum<["owner"]>;
297
+ entitlement: z.ZodEffects<z.ZodEffects<z.ZodObject<{
298
+ access: z.ZodEnum<["granted", "denied"]>;
299
+ reason: z.ZodEnum<["paid_period", "past_due_grace", "period_ended", "grace_expired", "no_purchase", "payment_pending", "subscription_inactive", "unknown_state", "suspended", "operator_grant"]>;
300
+ subscription_state: z.ZodEnum<["none", "active", "trialing", "past_due", "incomplete", "incomplete_expired", "unpaid", "canceled", "paused", "unknown"]>;
301
+ access_until: z.ZodNullable<z.ZodString>;
302
+ grace_deadline: z.ZodNullable<z.ZodString>;
303
+ suspended: z.ZodBoolean;
304
+ /** The unexpired operator grant's cutoff, else `null`. */
305
+ grant_until: z.ZodNullable<z.ZodString>;
306
+ last_reconciled_at: z.ZodNullable<z.ZodString>;
307
+ stale: z.ZodBoolean;
308
+ }, "strict", z.ZodTypeAny, {
309
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
310
+ stale: boolean;
311
+ suspended: boolean;
312
+ access: "denied" | "granted";
313
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
314
+ access_until: string | null;
315
+ grace_deadline: string | null;
316
+ grant_until: string | null;
317
+ last_reconciled_at: string | null;
318
+ }, {
319
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
320
+ stale: boolean;
321
+ suspended: boolean;
322
+ access: "denied" | "granted";
323
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
324
+ access_until: string | null;
325
+ grace_deadline: string | null;
326
+ grant_until: string | null;
327
+ last_reconciled_at: string | null;
328
+ }>, {
329
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
330
+ stale: boolean;
331
+ suspended: boolean;
332
+ access: "denied" | "granted";
333
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
334
+ access_until: string | null;
335
+ grace_deadline: string | null;
336
+ grant_until: string | null;
337
+ last_reconciled_at: string | null;
338
+ }, {
339
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
340
+ stale: boolean;
341
+ suspended: boolean;
342
+ access: "denied" | "granted";
343
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
344
+ access_until: string | null;
345
+ grace_deadline: string | null;
346
+ grant_until: string | null;
347
+ last_reconciled_at: string | null;
348
+ }>, {
349
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
350
+ stale: boolean;
351
+ suspended: boolean;
352
+ access: "denied" | "granted";
353
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
354
+ access_until: string | null;
355
+ grace_deadline: string | null;
356
+ grant_until: string | null;
357
+ last_reconciled_at: string | null;
358
+ }, {
359
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
360
+ stale: boolean;
361
+ suspended: boolean;
362
+ access: "denied" | "granted";
363
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
364
+ access_until: string | null;
365
+ grace_deadline: string | null;
366
+ grant_until: string | null;
367
+ last_reconciled_at: string | null;
368
+ }>;
369
+ /** `false`: the billing routes do not exist and access comes only from operator grants. */
370
+ billing_enabled: z.ZodBoolean;
371
+ max_workstations: z.ZodLiteral<2>;
372
+ workstations: z.ZodArray<z.ZodObject<{
373
+ companion_id: z.ZodString;
374
+ label: z.ZodString;
375
+ created_at: z.ZodString;
376
+ key_issued_at: z.ZodNullable<z.ZodString>;
377
+ connection: z.ZodEffects<z.ZodObject<{
378
+ state: z.ZodEnum<["offline", "online"]>;
379
+ connection_generation: z.ZodNullable<z.ZodNumber>;
380
+ }, "strict", z.ZodTypeAny, {
381
+ state: "offline" | "online";
382
+ connection_generation: number | null;
383
+ }, {
384
+ state: "offline" | "online";
385
+ connection_generation: number | null;
386
+ }>, {
387
+ state: "offline" | "online";
388
+ connection_generation: number | null;
389
+ }, {
390
+ state: "offline" | "online";
391
+ connection_generation: number | null;
392
+ }>;
393
+ }, "strict", z.ZodTypeAny, {
394
+ companion_id: string;
395
+ connection: {
396
+ state: "offline" | "online";
397
+ connection_generation: number | null;
398
+ };
399
+ created_at: string;
400
+ label: string;
401
+ key_issued_at: string | null;
402
+ }, {
403
+ companion_id: string;
404
+ connection: {
405
+ state: "offline" | "online";
406
+ connection_generation: number | null;
407
+ };
408
+ created_at: string;
409
+ label: string;
410
+ key_issued_at: string | null;
411
+ }>, "many">;
412
+ }, "strict", z.ZodTypeAny, {
413
+ role: "owner";
414
+ workspace: {
415
+ id: string;
416
+ };
417
+ entitlement: {
418
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
419
+ stale: boolean;
420
+ suspended: boolean;
421
+ access: "denied" | "granted";
422
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
423
+ access_until: string | null;
424
+ grace_deadline: string | null;
425
+ grant_until: string | null;
426
+ last_reconciled_at: string | null;
427
+ };
428
+ billing_enabled: boolean;
429
+ max_workstations: 2;
430
+ workstations: {
431
+ companion_id: string;
432
+ connection: {
433
+ state: "offline" | "online";
434
+ connection_generation: number | null;
435
+ };
436
+ created_at: string;
437
+ label: string;
438
+ key_issued_at: string | null;
439
+ }[];
440
+ }, {
441
+ role: "owner";
442
+ workspace: {
443
+ id: string;
444
+ };
445
+ entitlement: {
446
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
447
+ stale: boolean;
448
+ suspended: boolean;
449
+ access: "denied" | "granted";
450
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
451
+ access_until: string | null;
452
+ grace_deadline: string | null;
453
+ grant_until: string | null;
454
+ last_reconciled_at: string | null;
455
+ };
456
+ billing_enabled: boolean;
457
+ max_workstations: 2;
458
+ workstations: {
459
+ companion_id: string;
460
+ connection: {
461
+ state: "offline" | "online";
462
+ connection_generation: number | null;
463
+ };
464
+ created_at: string;
465
+ label: string;
466
+ key_issued_at: string | null;
467
+ }[];
468
+ }>;
469
+ export type WorkspaceReadResponse = z.infer<typeof WorkspaceReadResponseSchema>;
470
+ export declare const WorkstationCreateRequestSchema: z.ZodObject<{
471
+ label: z.ZodString;
472
+ }, "strict", z.ZodTypeAny, {
473
+ label: string;
474
+ }, {
475
+ label: string;
476
+ }>;
477
+ export type WorkstationCreateRequest = z.infer<typeof WorkstationCreateRequestSchema>;
478
+ /** The API key is returned exactly once, here or on rotation; no read route ever returns it. */
479
+ export declare const WorkstationCreateResponseSchema: z.ZodObject<{
480
+ workstation: z.ZodObject<{
481
+ companion_id: z.ZodString;
482
+ label: z.ZodString;
483
+ created_at: z.ZodString;
484
+ key_issued_at: z.ZodNullable<z.ZodString>;
485
+ connection: z.ZodEffects<z.ZodObject<{
486
+ state: z.ZodEnum<["offline", "online"]>;
487
+ connection_generation: z.ZodNullable<z.ZodNumber>;
488
+ }, "strict", z.ZodTypeAny, {
489
+ state: "offline" | "online";
490
+ connection_generation: number | null;
491
+ }, {
492
+ state: "offline" | "online";
493
+ connection_generation: number | null;
494
+ }>, {
495
+ state: "offline" | "online";
496
+ connection_generation: number | null;
497
+ }, {
498
+ state: "offline" | "online";
499
+ connection_generation: number | null;
500
+ }>;
501
+ }, "strict", z.ZodTypeAny, {
502
+ companion_id: string;
503
+ connection: {
504
+ state: "offline" | "online";
505
+ connection_generation: number | null;
506
+ };
507
+ created_at: string;
508
+ label: string;
509
+ key_issued_at: string | null;
510
+ }, {
511
+ companion_id: string;
512
+ connection: {
513
+ state: "offline" | "online";
514
+ connection_generation: number | null;
515
+ };
516
+ created_at: string;
517
+ label: string;
518
+ key_issued_at: string | null;
519
+ }>;
520
+ api_key: z.ZodString;
521
+ }, "strict", z.ZodTypeAny, {
522
+ api_key: string;
523
+ workstation: {
524
+ companion_id: string;
525
+ connection: {
526
+ state: "offline" | "online";
527
+ connection_generation: number | null;
528
+ };
529
+ created_at: string;
530
+ label: string;
531
+ key_issued_at: string | null;
532
+ };
533
+ }, {
534
+ api_key: string;
535
+ workstation: {
536
+ companion_id: string;
537
+ connection: {
538
+ state: "offline" | "online";
539
+ connection_generation: number | null;
540
+ };
541
+ created_at: string;
542
+ label: string;
543
+ key_issued_at: string | null;
544
+ };
545
+ }>;
546
+ export type WorkstationCreateResponse = z.infer<typeof WorkstationCreateResponseSchema>;
547
+ export declare const WorkstationRotateRequestSchema: z.ZodObject<{
548
+ companion_id: z.ZodString;
549
+ }, "strict", z.ZodTypeAny, {
550
+ companion_id: string;
551
+ }, {
552
+ companion_id: string;
553
+ }>;
554
+ export type WorkstationRotateRequest = z.infer<typeof WorkstationRotateRequestSchema>;
555
+ export declare const WorkstationRotateResponseSchema: z.ZodObject<{
556
+ companion_id: z.ZodString;
557
+ api_key: z.ZodString;
558
+ revoked_credential_id: z.ZodNullable<z.ZodString>;
559
+ closed_connections: z.ZodNumber;
560
+ }, "strict", z.ZodTypeAny, {
561
+ api_key: string;
562
+ companion_id: string;
563
+ revoked_credential_id: string | null;
564
+ closed_connections: number;
565
+ }, {
566
+ api_key: string;
567
+ companion_id: string;
568
+ revoked_credential_id: string | null;
569
+ closed_connections: number;
570
+ }>;
571
+ export type WorkstationRotateResponse = z.infer<typeof WorkstationRotateResponseSchema>;
572
+ export declare const WorkstationRevokeRequestSchema: z.ZodObject<{
573
+ companion_id: z.ZodString;
574
+ }, "strict", z.ZodTypeAny, {
575
+ companion_id: string;
576
+ }, {
577
+ companion_id: string;
578
+ }>;
579
+ export type WorkstationRevokeRequest = z.infer<typeof WorkstationRevokeRequestSchema>;
580
+ export declare const WorkstationRevokeResponseSchema: z.ZodObject<{
581
+ companion_id: z.ZodString;
582
+ revoked_at: z.ZodString;
583
+ closed_connections: z.ZodNumber;
584
+ }, "strict", z.ZodTypeAny, {
585
+ companion_id: string;
586
+ closed_connections: number;
587
+ revoked_at: string;
588
+ }, {
589
+ companion_id: string;
590
+ closed_connections: number;
591
+ revoked_at: string;
592
+ }>;
593
+ export type WorkstationRevokeResponse = z.infer<typeof WorkstationRevokeResponseSchema>;
594
+ export declare const BillingStatusResponseSchema: z.ZodObject<{
595
+ entitlement: z.ZodEffects<z.ZodEffects<z.ZodObject<{
596
+ access: z.ZodEnum<["granted", "denied"]>;
597
+ reason: z.ZodEnum<["paid_period", "past_due_grace", "period_ended", "grace_expired", "no_purchase", "payment_pending", "subscription_inactive", "unknown_state", "suspended", "operator_grant"]>;
598
+ subscription_state: z.ZodEnum<["none", "active", "trialing", "past_due", "incomplete", "incomplete_expired", "unpaid", "canceled", "paused", "unknown"]>;
599
+ access_until: z.ZodNullable<z.ZodString>;
600
+ grace_deadline: z.ZodNullable<z.ZodString>;
601
+ suspended: z.ZodBoolean;
602
+ /** The unexpired operator grant's cutoff, else `null`. */
603
+ grant_until: z.ZodNullable<z.ZodString>;
604
+ last_reconciled_at: z.ZodNullable<z.ZodString>;
605
+ stale: z.ZodBoolean;
606
+ }, "strict", z.ZodTypeAny, {
607
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
608
+ stale: boolean;
609
+ suspended: boolean;
610
+ access: "denied" | "granted";
611
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
612
+ access_until: string | null;
613
+ grace_deadline: string | null;
614
+ grant_until: string | null;
615
+ last_reconciled_at: string | null;
616
+ }, {
617
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
618
+ stale: boolean;
619
+ suspended: boolean;
620
+ access: "denied" | "granted";
621
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
622
+ access_until: string | null;
623
+ grace_deadline: string | null;
624
+ grant_until: string | null;
625
+ last_reconciled_at: string | null;
626
+ }>, {
627
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
628
+ stale: boolean;
629
+ suspended: boolean;
630
+ access: "denied" | "granted";
631
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
632
+ access_until: string | null;
633
+ grace_deadline: string | null;
634
+ grant_until: string | null;
635
+ last_reconciled_at: string | null;
636
+ }, {
637
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
638
+ stale: boolean;
639
+ suspended: boolean;
640
+ access: "denied" | "granted";
641
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
642
+ access_until: string | null;
643
+ grace_deadline: string | null;
644
+ grant_until: string | null;
645
+ last_reconciled_at: string | null;
646
+ }>, {
647
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
648
+ stale: boolean;
649
+ suspended: boolean;
650
+ access: "denied" | "granted";
651
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
652
+ access_until: string | null;
653
+ grace_deadline: string | null;
654
+ grant_until: string | null;
655
+ last_reconciled_at: string | null;
656
+ }, {
657
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
658
+ stale: boolean;
659
+ suspended: boolean;
660
+ access: "denied" | "granted";
661
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
662
+ access_until: string | null;
663
+ grace_deadline: string | null;
664
+ grant_until: string | null;
665
+ last_reconciled_at: string | null;
666
+ }>;
667
+ }, "strict", z.ZodTypeAny, {
668
+ entitlement: {
669
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
670
+ stale: boolean;
671
+ suspended: boolean;
672
+ access: "denied" | "granted";
673
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
674
+ access_until: string | null;
675
+ grace_deadline: string | null;
676
+ grant_until: string | null;
677
+ last_reconciled_at: string | null;
678
+ };
679
+ }, {
680
+ entitlement: {
681
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
682
+ stale: boolean;
683
+ suspended: boolean;
684
+ access: "denied" | "granted";
685
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
686
+ access_until: string | null;
687
+ grace_deadline: string | null;
688
+ grant_until: string | null;
689
+ last_reconciled_at: string | null;
690
+ };
691
+ }>;
692
+ export type BillingStatusResponse = z.infer<typeof BillingStatusResponseSchema>;
693
+ export declare const CheckoutSessionRequestSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
694
+ export declare const CheckoutSessionResponseSchema: z.ZodObject<{
695
+ checkout_url: z.ZodEffects<z.ZodString, string, string>;
696
+ }, "strict", z.ZodTypeAny, {
697
+ checkout_url: string;
698
+ }, {
699
+ checkout_url: string;
700
+ }>;
701
+ export type CheckoutSessionResponse = z.infer<typeof CheckoutSessionResponseSchema>;
702
+ export declare const PortalSessionRequestSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
703
+ export declare const PortalSessionResponseSchema: z.ZodObject<{
704
+ portal_url: z.ZodEffects<z.ZodString, string, string>;
705
+ }, "strict", z.ZodTypeAny, {
706
+ portal_url: string;
707
+ }, {
708
+ portal_url: string;
709
+ }>;
710
+ export type PortalSessionResponse = z.infer<typeof PortalSessionResponseSchema>;
711
+ export declare const StripeWebhookAckSchema: z.ZodObject<{
712
+ received: z.ZodLiteral<true>;
713
+ event_id: z.ZodString;
714
+ duplicate: z.ZodBoolean;
715
+ }, "strict", z.ZodTypeAny, {
716
+ received: true;
717
+ duplicate: boolean;
718
+ event_id: string;
719
+ }, {
720
+ received: true;
721
+ duplicate: boolean;
722
+ event_id: string;
723
+ }>;
724
+ export type StripeWebhookAck = z.infer<typeof StripeWebhookAckSchema>;
725
+ export type ControlAuthority = "none" | "oidc_state" | "account_session" | "workspace_owner" | "stripe_signature";
726
+ export interface ControlRoute {
727
+ readonly method: "GET" | "POST";
728
+ readonly path: string;
729
+ readonly authority: ControlAuthority;
730
+ readonly request: z.ZodTypeAny | null;
731
+ readonly response: z.ZodTypeAny | null;
732
+ }
733
+ /** Every control route, on the single public origin. */
734
+ export declare const CONTROL_ROUTES: {
735
+ readonly authStart: {
736
+ readonly method: "POST";
737
+ readonly path: "/api/control/auth/start";
738
+ readonly authority: "none";
739
+ readonly request: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
740
+ readonly response: z.ZodObject<{
741
+ authorization_url: z.ZodEffects<z.ZodString, string, string>;
742
+ }, "strict", z.ZodTypeAny, {
743
+ authorization_url: string;
744
+ }, {
745
+ authorization_url: string;
746
+ }>;
747
+ };
748
+ readonly authCallback: {
749
+ readonly method: "GET";
750
+ readonly path: "/api/control/auth/callback";
751
+ readonly authority: "oidc_state";
752
+ readonly request: z.ZodEffects<z.ZodObject<{
753
+ state: z.ZodString;
754
+ code: z.ZodOptional<z.ZodString>;
755
+ error: z.ZodOptional<z.ZodString>;
756
+ error_description: z.ZodOptional<z.ZodString>;
757
+ }, "strip", z.ZodTypeAny, {
758
+ state: string;
759
+ error?: string | undefined;
760
+ code?: string | undefined;
761
+ error_description?: string | undefined;
762
+ }, {
763
+ state: string;
764
+ error?: string | undefined;
765
+ code?: string | undefined;
766
+ error_description?: string | undefined;
767
+ }>, {
768
+ state: string;
769
+ error?: string | undefined;
770
+ code?: string | undefined;
771
+ error_description?: string | undefined;
772
+ }, {
773
+ state: string;
774
+ error?: string | undefined;
775
+ code?: string | undefined;
776
+ error_description?: string | undefined;
777
+ }>;
778
+ readonly response: null;
779
+ };
780
+ readonly authLogout: {
781
+ readonly method: "POST";
782
+ readonly path: "/api/control/auth/logout";
783
+ readonly authority: "account_session";
784
+ readonly request: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
785
+ readonly response: z.ZodObject<{
786
+ logged_out: z.ZodLiteral<true>;
787
+ }, "strict", z.ZodTypeAny, {
788
+ logged_out: true;
789
+ }, {
790
+ logged_out: true;
791
+ }>;
792
+ };
793
+ readonly authSession: {
794
+ readonly method: "GET";
795
+ readonly path: "/api/control/auth/session";
796
+ readonly authority: "account_session";
797
+ readonly request: null;
798
+ readonly response: z.ZodObject<{
799
+ account: z.ZodObject<{
800
+ id: z.ZodString;
801
+ display_name: z.ZodNullable<z.ZodString>;
802
+ }, "strict", z.ZodTypeAny, {
803
+ id: string;
804
+ display_name: string | null;
805
+ }, {
806
+ id: string;
807
+ display_name: string | null;
808
+ }>;
809
+ expires_at: z.ZodString;
810
+ }, "strict", z.ZodTypeAny, {
811
+ account: {
812
+ id: string;
813
+ display_name: string | null;
814
+ };
815
+ expires_at: string;
816
+ }, {
817
+ account: {
818
+ id: string;
819
+ display_name: string | null;
820
+ };
821
+ expires_at: string;
822
+ }>;
823
+ };
824
+ readonly workspaceRead: {
825
+ readonly method: "GET";
826
+ readonly path: "/api/control/workspace";
827
+ readonly authority: "workspace_owner";
828
+ readonly request: null;
829
+ readonly response: z.ZodObject<{
830
+ workspace: z.ZodObject<{
831
+ id: z.ZodString;
832
+ }, "strict", z.ZodTypeAny, {
833
+ id: string;
834
+ }, {
835
+ id: string;
836
+ }>;
837
+ role: z.ZodEnum<["owner"]>;
838
+ entitlement: z.ZodEffects<z.ZodEffects<z.ZodObject<{
839
+ access: z.ZodEnum<["granted", "denied"]>;
840
+ reason: z.ZodEnum<["paid_period", "past_due_grace", "period_ended", "grace_expired", "no_purchase", "payment_pending", "subscription_inactive", "unknown_state", "suspended", "operator_grant"]>;
841
+ subscription_state: z.ZodEnum<["none", "active", "trialing", "past_due", "incomplete", "incomplete_expired", "unpaid", "canceled", "paused", "unknown"]>;
842
+ access_until: z.ZodNullable<z.ZodString>;
843
+ grace_deadline: z.ZodNullable<z.ZodString>;
844
+ suspended: z.ZodBoolean;
845
+ /** The unexpired operator grant's cutoff, else `null`. */
846
+ grant_until: z.ZodNullable<z.ZodString>;
847
+ last_reconciled_at: z.ZodNullable<z.ZodString>;
848
+ stale: z.ZodBoolean;
849
+ }, "strict", z.ZodTypeAny, {
850
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
851
+ stale: boolean;
852
+ suspended: boolean;
853
+ access: "denied" | "granted";
854
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
855
+ access_until: string | null;
856
+ grace_deadline: string | null;
857
+ grant_until: string | null;
858
+ last_reconciled_at: string | null;
859
+ }, {
860
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
861
+ stale: boolean;
862
+ suspended: boolean;
863
+ access: "denied" | "granted";
864
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
865
+ access_until: string | null;
866
+ grace_deadline: string | null;
867
+ grant_until: string | null;
868
+ last_reconciled_at: string | null;
869
+ }>, {
870
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
871
+ stale: boolean;
872
+ suspended: boolean;
873
+ access: "denied" | "granted";
874
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
875
+ access_until: string | null;
876
+ grace_deadline: string | null;
877
+ grant_until: string | null;
878
+ last_reconciled_at: string | null;
879
+ }, {
880
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
881
+ stale: boolean;
882
+ suspended: boolean;
883
+ access: "denied" | "granted";
884
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
885
+ access_until: string | null;
886
+ grace_deadline: string | null;
887
+ grant_until: string | null;
888
+ last_reconciled_at: string | null;
889
+ }>, {
890
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
891
+ stale: boolean;
892
+ suspended: boolean;
893
+ access: "denied" | "granted";
894
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
895
+ access_until: string | null;
896
+ grace_deadline: string | null;
897
+ grant_until: string | null;
898
+ last_reconciled_at: string | null;
899
+ }, {
900
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
901
+ stale: boolean;
902
+ suspended: boolean;
903
+ access: "denied" | "granted";
904
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
905
+ access_until: string | null;
906
+ grace_deadline: string | null;
907
+ grant_until: string | null;
908
+ last_reconciled_at: string | null;
909
+ }>;
910
+ /** `false`: the billing routes do not exist and access comes only from operator grants. */
911
+ billing_enabled: z.ZodBoolean;
912
+ max_workstations: z.ZodLiteral<2>;
913
+ workstations: z.ZodArray<z.ZodObject<{
914
+ companion_id: z.ZodString;
915
+ label: z.ZodString;
916
+ created_at: z.ZodString;
917
+ key_issued_at: z.ZodNullable<z.ZodString>;
918
+ connection: z.ZodEffects<z.ZodObject<{
919
+ state: z.ZodEnum<["offline", "online"]>;
920
+ connection_generation: z.ZodNullable<z.ZodNumber>;
921
+ }, "strict", z.ZodTypeAny, {
922
+ state: "offline" | "online";
923
+ connection_generation: number | null;
924
+ }, {
925
+ state: "offline" | "online";
926
+ connection_generation: number | null;
927
+ }>, {
928
+ state: "offline" | "online";
929
+ connection_generation: number | null;
930
+ }, {
931
+ state: "offline" | "online";
932
+ connection_generation: number | null;
933
+ }>;
934
+ }, "strict", z.ZodTypeAny, {
935
+ companion_id: string;
936
+ connection: {
937
+ state: "offline" | "online";
938
+ connection_generation: number | null;
939
+ };
940
+ created_at: string;
941
+ label: string;
942
+ key_issued_at: string | null;
943
+ }, {
944
+ companion_id: string;
945
+ connection: {
946
+ state: "offline" | "online";
947
+ connection_generation: number | null;
948
+ };
949
+ created_at: string;
950
+ label: string;
951
+ key_issued_at: string | null;
952
+ }>, "many">;
953
+ }, "strict", z.ZodTypeAny, {
954
+ role: "owner";
955
+ workspace: {
956
+ id: string;
957
+ };
958
+ entitlement: {
959
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
960
+ stale: boolean;
961
+ suspended: boolean;
962
+ access: "denied" | "granted";
963
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
964
+ access_until: string | null;
965
+ grace_deadline: string | null;
966
+ grant_until: string | null;
967
+ last_reconciled_at: string | null;
968
+ };
969
+ billing_enabled: boolean;
970
+ max_workstations: 2;
971
+ workstations: {
972
+ companion_id: string;
973
+ connection: {
974
+ state: "offline" | "online";
975
+ connection_generation: number | null;
976
+ };
977
+ created_at: string;
978
+ label: string;
979
+ key_issued_at: string | null;
980
+ }[];
981
+ }, {
982
+ role: "owner";
983
+ workspace: {
984
+ id: string;
985
+ };
986
+ entitlement: {
987
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
988
+ stale: boolean;
989
+ suspended: boolean;
990
+ access: "denied" | "granted";
991
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
992
+ access_until: string | null;
993
+ grace_deadline: string | null;
994
+ grant_until: string | null;
995
+ last_reconciled_at: string | null;
996
+ };
997
+ billing_enabled: boolean;
998
+ max_workstations: 2;
999
+ workstations: {
1000
+ companion_id: string;
1001
+ connection: {
1002
+ state: "offline" | "online";
1003
+ connection_generation: number | null;
1004
+ };
1005
+ created_at: string;
1006
+ label: string;
1007
+ key_issued_at: string | null;
1008
+ }[];
1009
+ }>;
1010
+ };
1011
+ readonly workstationCreate: {
1012
+ readonly method: "POST";
1013
+ readonly path: "/api/control/workstations";
1014
+ readonly authority: "workspace_owner";
1015
+ readonly request: z.ZodObject<{
1016
+ label: z.ZodString;
1017
+ }, "strict", z.ZodTypeAny, {
1018
+ label: string;
1019
+ }, {
1020
+ label: string;
1021
+ }>;
1022
+ readonly response: z.ZodObject<{
1023
+ workstation: z.ZodObject<{
1024
+ companion_id: z.ZodString;
1025
+ label: z.ZodString;
1026
+ created_at: z.ZodString;
1027
+ key_issued_at: z.ZodNullable<z.ZodString>;
1028
+ connection: z.ZodEffects<z.ZodObject<{
1029
+ state: z.ZodEnum<["offline", "online"]>;
1030
+ connection_generation: z.ZodNullable<z.ZodNumber>;
1031
+ }, "strict", z.ZodTypeAny, {
1032
+ state: "offline" | "online";
1033
+ connection_generation: number | null;
1034
+ }, {
1035
+ state: "offline" | "online";
1036
+ connection_generation: number | null;
1037
+ }>, {
1038
+ state: "offline" | "online";
1039
+ connection_generation: number | null;
1040
+ }, {
1041
+ state: "offline" | "online";
1042
+ connection_generation: number | null;
1043
+ }>;
1044
+ }, "strict", z.ZodTypeAny, {
1045
+ companion_id: string;
1046
+ connection: {
1047
+ state: "offline" | "online";
1048
+ connection_generation: number | null;
1049
+ };
1050
+ created_at: string;
1051
+ label: string;
1052
+ key_issued_at: string | null;
1053
+ }, {
1054
+ companion_id: string;
1055
+ connection: {
1056
+ state: "offline" | "online";
1057
+ connection_generation: number | null;
1058
+ };
1059
+ created_at: string;
1060
+ label: string;
1061
+ key_issued_at: string | null;
1062
+ }>;
1063
+ api_key: z.ZodString;
1064
+ }, "strict", z.ZodTypeAny, {
1065
+ api_key: string;
1066
+ workstation: {
1067
+ companion_id: string;
1068
+ connection: {
1069
+ state: "offline" | "online";
1070
+ connection_generation: number | null;
1071
+ };
1072
+ created_at: string;
1073
+ label: string;
1074
+ key_issued_at: string | null;
1075
+ };
1076
+ }, {
1077
+ api_key: string;
1078
+ workstation: {
1079
+ companion_id: string;
1080
+ connection: {
1081
+ state: "offline" | "online";
1082
+ connection_generation: number | null;
1083
+ };
1084
+ created_at: string;
1085
+ label: string;
1086
+ key_issued_at: string | null;
1087
+ };
1088
+ }>;
1089
+ };
1090
+ readonly workstationRotate: {
1091
+ readonly method: "POST";
1092
+ readonly path: "/api/control/workstations/rotate";
1093
+ readonly authority: "workspace_owner";
1094
+ readonly request: z.ZodObject<{
1095
+ companion_id: z.ZodString;
1096
+ }, "strict", z.ZodTypeAny, {
1097
+ companion_id: string;
1098
+ }, {
1099
+ companion_id: string;
1100
+ }>;
1101
+ readonly response: z.ZodObject<{
1102
+ companion_id: z.ZodString;
1103
+ api_key: z.ZodString;
1104
+ revoked_credential_id: z.ZodNullable<z.ZodString>;
1105
+ closed_connections: z.ZodNumber;
1106
+ }, "strict", z.ZodTypeAny, {
1107
+ api_key: string;
1108
+ companion_id: string;
1109
+ revoked_credential_id: string | null;
1110
+ closed_connections: number;
1111
+ }, {
1112
+ api_key: string;
1113
+ companion_id: string;
1114
+ revoked_credential_id: string | null;
1115
+ closed_connections: number;
1116
+ }>;
1117
+ };
1118
+ readonly workstationRevoke: {
1119
+ readonly method: "POST";
1120
+ readonly path: "/api/control/workstations/revoke";
1121
+ readonly authority: "workspace_owner";
1122
+ readonly request: z.ZodObject<{
1123
+ companion_id: z.ZodString;
1124
+ }, "strict", z.ZodTypeAny, {
1125
+ companion_id: string;
1126
+ }, {
1127
+ companion_id: string;
1128
+ }>;
1129
+ readonly response: z.ZodObject<{
1130
+ companion_id: z.ZodString;
1131
+ revoked_at: z.ZodString;
1132
+ closed_connections: z.ZodNumber;
1133
+ }, "strict", z.ZodTypeAny, {
1134
+ companion_id: string;
1135
+ closed_connections: number;
1136
+ revoked_at: string;
1137
+ }, {
1138
+ companion_id: string;
1139
+ closed_connections: number;
1140
+ revoked_at: string;
1141
+ }>;
1142
+ };
1143
+ readonly billingStatus: {
1144
+ readonly method: "GET";
1145
+ readonly path: "/api/control/billing/status";
1146
+ readonly authority: "workspace_owner";
1147
+ readonly request: null;
1148
+ readonly response: z.ZodObject<{
1149
+ entitlement: z.ZodEffects<z.ZodEffects<z.ZodObject<{
1150
+ access: z.ZodEnum<["granted", "denied"]>;
1151
+ reason: z.ZodEnum<["paid_period", "past_due_grace", "period_ended", "grace_expired", "no_purchase", "payment_pending", "subscription_inactive", "unknown_state", "suspended", "operator_grant"]>;
1152
+ subscription_state: z.ZodEnum<["none", "active", "trialing", "past_due", "incomplete", "incomplete_expired", "unpaid", "canceled", "paused", "unknown"]>;
1153
+ access_until: z.ZodNullable<z.ZodString>;
1154
+ grace_deadline: z.ZodNullable<z.ZodString>;
1155
+ suspended: z.ZodBoolean;
1156
+ /** The unexpired operator grant's cutoff, else `null`. */
1157
+ grant_until: z.ZodNullable<z.ZodString>;
1158
+ last_reconciled_at: z.ZodNullable<z.ZodString>;
1159
+ stale: z.ZodBoolean;
1160
+ }, "strict", z.ZodTypeAny, {
1161
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1162
+ stale: boolean;
1163
+ suspended: boolean;
1164
+ access: "denied" | "granted";
1165
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1166
+ access_until: string | null;
1167
+ grace_deadline: string | null;
1168
+ grant_until: string | null;
1169
+ last_reconciled_at: string | null;
1170
+ }, {
1171
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1172
+ stale: boolean;
1173
+ suspended: boolean;
1174
+ access: "denied" | "granted";
1175
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1176
+ access_until: string | null;
1177
+ grace_deadline: string | null;
1178
+ grant_until: string | null;
1179
+ last_reconciled_at: string | null;
1180
+ }>, {
1181
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1182
+ stale: boolean;
1183
+ suspended: boolean;
1184
+ access: "denied" | "granted";
1185
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1186
+ access_until: string | null;
1187
+ grace_deadline: string | null;
1188
+ grant_until: string | null;
1189
+ last_reconciled_at: string | null;
1190
+ }, {
1191
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1192
+ stale: boolean;
1193
+ suspended: boolean;
1194
+ access: "denied" | "granted";
1195
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1196
+ access_until: string | null;
1197
+ grace_deadline: string | null;
1198
+ grant_until: string | null;
1199
+ last_reconciled_at: string | null;
1200
+ }>, {
1201
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1202
+ stale: boolean;
1203
+ suspended: boolean;
1204
+ access: "denied" | "granted";
1205
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1206
+ access_until: string | null;
1207
+ grace_deadline: string | null;
1208
+ grant_until: string | null;
1209
+ last_reconciled_at: string | null;
1210
+ }, {
1211
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1212
+ stale: boolean;
1213
+ suspended: boolean;
1214
+ access: "denied" | "granted";
1215
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1216
+ access_until: string | null;
1217
+ grace_deadline: string | null;
1218
+ grant_until: string | null;
1219
+ last_reconciled_at: string | null;
1220
+ }>;
1221
+ }, "strict", z.ZodTypeAny, {
1222
+ entitlement: {
1223
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1224
+ stale: boolean;
1225
+ suspended: boolean;
1226
+ access: "denied" | "granted";
1227
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1228
+ access_until: string | null;
1229
+ grace_deadline: string | null;
1230
+ grant_until: string | null;
1231
+ last_reconciled_at: string | null;
1232
+ };
1233
+ }, {
1234
+ entitlement: {
1235
+ reason: "paid_period" | "past_due_grace" | "period_ended" | "grace_expired" | "no_purchase" | "payment_pending" | "subscription_inactive" | "unknown_state" | "suspended" | "operator_grant";
1236
+ stale: boolean;
1237
+ suspended: boolean;
1238
+ access: "denied" | "granted";
1239
+ subscription_state: "none" | "incomplete" | "unknown" | "active" | "paused" | "trialing" | "past_due" | "incomplete_expired" | "unpaid" | "canceled";
1240
+ access_until: string | null;
1241
+ grace_deadline: string | null;
1242
+ grant_until: string | null;
1243
+ last_reconciled_at: string | null;
1244
+ };
1245
+ }>;
1246
+ };
1247
+ readonly billingCheckout: {
1248
+ readonly method: "POST";
1249
+ readonly path: "/api/control/billing/checkout";
1250
+ readonly authority: "workspace_owner";
1251
+ readonly request: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
1252
+ readonly response: z.ZodObject<{
1253
+ checkout_url: z.ZodEffects<z.ZodString, string, string>;
1254
+ }, "strict", z.ZodTypeAny, {
1255
+ checkout_url: string;
1256
+ }, {
1257
+ checkout_url: string;
1258
+ }>;
1259
+ };
1260
+ readonly billingPortal: {
1261
+ readonly method: "POST";
1262
+ readonly path: "/api/control/billing/portal";
1263
+ readonly authority: "workspace_owner";
1264
+ readonly request: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
1265
+ readonly response: z.ZodObject<{
1266
+ portal_url: z.ZodEffects<z.ZodString, string, string>;
1267
+ }, "strict", z.ZodTypeAny, {
1268
+ portal_url: string;
1269
+ }, {
1270
+ portal_url: string;
1271
+ }>;
1272
+ };
1273
+ readonly stripeWebhook: {
1274
+ readonly method: "POST";
1275
+ readonly path: "/api/control/billing/webhook";
1276
+ readonly authority: "stripe_signature";
1277
+ readonly request: null;
1278
+ readonly response: z.ZodObject<{
1279
+ received: z.ZodLiteral<true>;
1280
+ event_id: z.ZodString;
1281
+ duplicate: z.ZodBoolean;
1282
+ }, "strict", z.ZodTypeAny, {
1283
+ received: true;
1284
+ duplicate: boolean;
1285
+ event_id: string;
1286
+ }, {
1287
+ received: true;
1288
+ duplicate: boolean;
1289
+ event_id: string;
1290
+ }>;
1291
+ };
1292
+ };
1293
+ export type ControlRouteName = keyof typeof CONTROL_ROUTES;