@cuna_labs/cli 0.1.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 (624) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +9 -0
  3. package/README.md +169 -0
  4. package/THIRD_PARTY_NOTICES.md +29 -0
  5. package/dist/api/capability-evidence.d.ts +19 -0
  6. package/dist/api/capability-evidence.d.ts.map +1 -0
  7. package/dist/api/capability-evidence.js +38 -0
  8. package/dist/api/capability-evidence.js.map +1 -0
  9. package/dist/api/client.d.ts +167 -0
  10. package/dist/api/client.d.ts.map +1 -0
  11. package/dist/api/client.js +937 -0
  12. package/dist/api/client.js.map +1 -0
  13. package/dist/api/contracts.d.ts +345 -0
  14. package/dist/api/contracts.d.ts.map +1 -0
  15. package/dist/api/contracts.js +976 -0
  16. package/dist/api/contracts.js.map +1 -0
  17. package/dist/api/execution-workspaces.d.ts +17 -0
  18. package/dist/api/execution-workspaces.d.ts.map +1 -0
  19. package/dist/api/execution-workspaces.js +46 -0
  20. package/dist/api/execution-workspaces.js.map +1 -0
  21. package/dist/api/http.d.ts +76 -0
  22. package/dist/api/http.d.ts.map +1 -0
  23. package/dist/api/http.js +838 -0
  24. package/dist/api/http.js.map +1 -0
  25. package/dist/api/managed-executions.d.ts +37 -0
  26. package/dist/api/managed-executions.d.ts.map +1 -0
  27. package/dist/api/managed-executions.js +80 -0
  28. package/dist/api/managed-executions.js.map +1 -0
  29. package/dist/api/observer-v2-schema.d.ts +206 -0
  30. package/dist/api/observer-v2-schema.d.ts.map +1 -0
  31. package/dist/api/observer-v2-schema.js +264 -0
  32. package/dist/api/observer-v2-schema.js.map +1 -0
  33. package/dist/api/observer-v2.d.ts +33 -0
  34. package/dist/api/observer-v2.d.ts.map +1 -0
  35. package/dist/api/observer-v2.js +60 -0
  36. package/dist/api/observer-v2.js.map +1 -0
  37. package/dist/api/owner-observe-grants-v2-schema.d.ts +678 -0
  38. package/dist/api/owner-observe-grants-v2-schema.d.ts.map +1 -0
  39. package/dist/api/owner-observe-grants-v2-schema.js +887 -0
  40. package/dist/api/owner-observe-grants-v2-schema.js.map +1 -0
  41. package/dist/api/owner-observe-grants-v2.d.ts +268 -0
  42. package/dist/api/owner-observe-grants-v2.d.ts.map +1 -0
  43. package/dist/api/owner-observe-grants-v2.js +604 -0
  44. package/dist/api/owner-observe-grants-v2.js.map +1 -0
  45. package/dist/api/provider-v2-schema.d.ts +293 -0
  46. package/dist/api/provider-v2-schema.d.ts.map +1 -0
  47. package/dist/api/provider-v2-schema.js +381 -0
  48. package/dist/api/provider-v2-schema.js.map +1 -0
  49. package/dist/api/provider-v2.d.ts +55 -0
  50. package/dist/api/provider-v2.d.ts.map +1 -0
  51. package/dist/api/provider-v2.js +54 -0
  52. package/dist/api/provider-v2.js.map +1 -0
  53. package/dist/api/remote-workspace.d.ts +29 -0
  54. package/dist/api/remote-workspace.d.ts.map +1 -0
  55. package/dist/api/remote-workspace.js +62 -0
  56. package/dist/api/remote-workspace.js.map +1 -0
  57. package/dist/api/supervisor-live-update.d.ts +248 -0
  58. package/dist/api/supervisor-live-update.d.ts.map +1 -0
  59. package/dist/api/supervisor-live-update.js +434 -0
  60. package/dist/api/supervisor-live-update.js.map +1 -0
  61. package/dist/api/terminal-reason.d.ts +5 -0
  62. package/dist/api/terminal-reason.d.ts.map +1 -0
  63. package/dist/api/terminal-reason.js +12 -0
  64. package/dist/api/terminal-reason.js.map +1 -0
  65. package/dist/auth/browser-handoff.d.ts +59 -0
  66. package/dist/auth/browser-handoff.d.ts.map +1 -0
  67. package/dist/auth/browser-handoff.js +33 -0
  68. package/dist/auth/browser-handoff.js.map +1 -0
  69. package/dist/auth/browser.d.ts +11 -0
  70. package/dist/auth/browser.d.ts.map +1 -0
  71. package/dist/auth/browser.js +47 -0
  72. package/dist/auth/browser.js.map +1 -0
  73. package/dist/auth/human-client.d.ts +39 -0
  74. package/dist/auth/human-client.d.ts.map +1 -0
  75. package/dist/auth/human-client.js +66 -0
  76. package/dist/auth/human-client.js.map +1 -0
  77. package/dist/auth/human-contracts.d.ts +52 -0
  78. package/dist/auth/human-contracts.d.ts.map +1 -0
  79. package/dist/auth/human-contracts.js +229 -0
  80. package/dist/auth/human-contracts.js.map +1 -0
  81. package/dist/auth/human-session.d.ts +48 -0
  82. package/dist/auth/human-session.d.ts.map +1 -0
  83. package/dist/auth/human-session.js +902 -0
  84. package/dist/auth/human-session.js.map +1 -0
  85. package/dist/auth/onboarding-state.d.ts +31 -0
  86. package/dist/auth/onboarding-state.d.ts.map +1 -0
  87. package/dist/auth/onboarding-state.js +52 -0
  88. package/dist/auth/onboarding-state.js.map +1 -0
  89. package/dist/auth/pkce.d.ts +15 -0
  90. package/dist/auth/pkce.d.ts.map +1 -0
  91. package/dist/auth/pkce.js +19 -0
  92. package/dist/auth/pkce.js.map +1 -0
  93. package/dist/bin/cuna.d.ts +3 -0
  94. package/dist/bin/cuna.d.ts.map +1 -0
  95. package/dist/bin/cuna.js +4 -0
  96. package/dist/bin/cuna.js.map +1 -0
  97. package/dist/build-identity.d.ts +20 -0
  98. package/dist/build-identity.d.ts.map +1 -0
  99. package/dist/build-identity.js +77 -0
  100. package/dist/build-identity.js.map +1 -0
  101. package/dist/cli/command-help.d.ts +9 -0
  102. package/dist/cli/command-help.d.ts.map +1 -0
  103. package/dist/cli/command-help.js +324 -0
  104. package/dist/cli/command-help.js.map +1 -0
  105. package/dist/cli/help.d.ts +40 -0
  106. package/dist/cli/help.d.ts.map +1 -0
  107. package/dist/cli/help.js +256 -0
  108. package/dist/cli/help.js.map +1 -0
  109. package/dist/cli/output.d.ts +28 -0
  110. package/dist/cli/output.d.ts.map +1 -0
  111. package/dist/cli/output.js +95 -0
  112. package/dist/cli/output.js.map +1 -0
  113. package/dist/cli/parser.d.ts +65 -0
  114. package/dist/cli/parser.d.ts.map +1 -0
  115. package/dist/cli/parser.js +294 -0
  116. package/dist/cli/parser.js.map +1 -0
  117. package/dist/cli/process-entrypoint.d.ts +18 -0
  118. package/dist/cli/process-entrypoint.d.ts.map +1 -0
  119. package/dist/cli/process-entrypoint.js +26 -0
  120. package/dist/cli/process-entrypoint.js.map +1 -0
  121. package/dist/cli/run.d.ts +114 -0
  122. package/dist/cli/run.d.ts.map +1 -0
  123. package/dist/cli/run.js +1969 -0
  124. package/dist/cli/run.js.map +1 -0
  125. package/dist/commands/commands.d.ts +74 -0
  126. package/dist/commands/commands.d.ts.map +1 -0
  127. package/dist/commands/commands.js +2814 -0
  128. package/dist/commands/commands.js.map +1 -0
  129. package/dist/config/config.d.ts +86 -0
  130. package/dist/config/config.d.ts.map +1 -0
  131. package/dist/config/config.js +323 -0
  132. package/dist/config/config.js.map +1 -0
  133. package/dist/config/infra-contract-witness.d.ts +29 -0
  134. package/dist/config/infra-contract-witness.d.ts.map +1 -0
  135. package/dist/config/infra-contract-witness.js +30 -0
  136. package/dist/config/infra-contract-witness.js.map +1 -0
  137. package/dist/core/browser-url.d.ts +2 -0
  138. package/dist/core/browser-url.d.ts.map +1 -0
  139. package/dist/core/browser-url.js +20 -0
  140. package/dist/core/browser-url.js.map +1 -0
  141. package/dist/core/deployed-wire-compatibility.d.ts +15 -0
  142. package/dist/core/deployed-wire-compatibility.d.ts.map +1 -0
  143. package/dist/core/deployed-wire-compatibility.js +15 -0
  144. package/dist/core/deployed-wire-compatibility.js.map +1 -0
  145. package/dist/core/errors.d.ts +59 -0
  146. package/dist/core/errors.d.ts.map +1 -0
  147. package/dist/core/errors.js +82 -0
  148. package/dist/core/errors.js.map +1 -0
  149. package/dist/core/exit-codes.d.ts +68 -0
  150. package/dist/core/exit-codes.d.ts.map +1 -0
  151. package/dist/core/exit-codes.js +84 -0
  152. package/dist/core/exit-codes.js.map +1 -0
  153. package/dist/core/instant.d.ts +60 -0
  154. package/dist/core/instant.d.ts.map +1 -0
  155. package/dist/core/instant.js +90 -0
  156. package/dist/core/instant.js.map +1 -0
  157. package/dist/core/namespace.d.ts +171 -0
  158. package/dist/core/namespace.d.ts.map +1 -0
  159. package/dist/core/namespace.js +227 -0
  160. package/dist/core/namespace.js.map +1 -0
  161. package/dist/core/observation-budget.d.ts +185 -0
  162. package/dist/core/observation-budget.d.ts.map +1 -0
  163. package/dist/core/observation-budget.js +209 -0
  164. package/dist/core/observation-budget.js.map +1 -0
  165. package/dist/core/product-web.d.ts +81 -0
  166. package/dist/core/product-web.d.ts.map +1 -0
  167. package/dist/core/product-web.js +87 -0
  168. package/dist/core/product-web.js.map +1 -0
  169. package/dist/core/validation.d.ts +90 -0
  170. package/dist/core/validation.d.ts.map +1 -0
  171. package/dist/core/validation.js +199 -0
  172. package/dist/core/validation.js.map +1 -0
  173. package/dist/credentials/contracts.d.ts +82 -0
  174. package/dist/credentials/contracts.d.ts.map +1 -0
  175. package/dist/credentials/contracts.js +2 -0
  176. package/dist/credentials/contracts.js.map +1 -0
  177. package/dist/credentials/errors.d.ts +19 -0
  178. package/dist/credentials/errors.d.ts.map +1 -0
  179. package/dist/credentials/errors.js +16 -0
  180. package/dist/credentials/errors.js.map +1 -0
  181. package/dist/credentials/index.d.ts +6 -0
  182. package/dist/credentials/index.d.ts.map +1 -0
  183. package/dist/credentials/index.js +6 -0
  184. package/dist/credentials/index.js.map +1 -0
  185. package/dist/credentials/local-session.d.ts +101 -0
  186. package/dist/credentials/local-session.d.ts.map +1 -0
  187. package/dist/credentials/local-session.js +839 -0
  188. package/dist/credentials/local-session.js.map +1 -0
  189. package/dist/credentials/secret-material.d.ts +17 -0
  190. package/dist/credentials/secret-material.d.ts.map +1 -0
  191. package/dist/credentials/secret-material.js +49 -0
  192. package/dist/credentials/secret-material.js.map +1 -0
  193. package/dist/credentials/vault.d.ts +41 -0
  194. package/dist/credentials/vault.d.ts.map +1 -0
  195. package/dist/credentials/vault.js +719 -0
  196. package/dist/credentials/vault.js.map +1 -0
  197. package/dist/daemon/endpoint.d.ts +29 -0
  198. package/dist/daemon/endpoint.d.ts.map +1 -0
  199. package/dist/daemon/endpoint.js +66 -0
  200. package/dist/daemon/endpoint.js.map +1 -0
  201. package/dist/daemon/journal.d.ts +62 -0
  202. package/dist/daemon/journal.d.ts.map +1 -0
  203. package/dist/daemon/journal.js +299 -0
  204. package/dist/daemon/journal.js.map +1 -0
  205. package/dist/daemon/lease.d.ts +25 -0
  206. package/dist/daemon/lease.d.ts.map +1 -0
  207. package/dist/daemon/lease.js +94 -0
  208. package/dist/daemon/lease.js.map +1 -0
  209. package/dist/daemon/lifecycle.d.ts +14 -0
  210. package/dist/daemon/lifecycle.d.ts.map +1 -0
  211. package/dist/daemon/lifecycle.js +29 -0
  212. package/dist/daemon/lifecycle.js.map +1 -0
  213. package/dist/daemon/protocol.d.ts +65 -0
  214. package/dist/daemon/protocol.d.ts.map +1 -0
  215. package/dist/daemon/protocol.js +194 -0
  216. package/dist/daemon/protocol.js.map +1 -0
  217. package/dist/daemon/supervisor.d.ts +29 -0
  218. package/dist/daemon/supervisor.d.ts.map +1 -0
  219. package/dist/daemon/supervisor.js +87 -0
  220. package/dist/daemon/supervisor.js.map +1 -0
  221. package/dist/daemon/views.d.ts +31 -0
  222. package/dist/daemon/views.d.ts.map +1 -0
  223. package/dist/daemon/views.js +86 -0
  224. package/dist/daemon/views.js.map +1 -0
  225. package/dist/index.d.ts +38 -0
  226. package/dist/index.d.ts.map +1 -0
  227. package/dist/index.js +38 -0
  228. package/dist/index.js.map +1 -0
  229. package/dist/journey/api-effects.d.ts +59 -0
  230. package/dist/journey/api-effects.d.ts.map +1 -0
  231. package/dist/journey/api-effects.js +386 -0
  232. package/dist/journey/api-effects.js.map +1 -0
  233. package/dist/journey/derived-identity.d.ts +91 -0
  234. package/dist/journey/derived-identity.d.ts.map +1 -0
  235. package/dist/journey/derived-identity.js +123 -0
  236. package/dist/journey/derived-identity.js.map +1 -0
  237. package/dist/journey/index.d.ts +6 -0
  238. package/dist/journey/index.d.ts.map +1 -0
  239. package/dist/journey/index.js +6 -0
  240. package/dist/journey/index.js.map +1 -0
  241. package/dist/journey/intent.d.ts +36 -0
  242. package/dist/journey/intent.d.ts.map +1 -0
  243. package/dist/journey/intent.js +191 -0
  244. package/dist/journey/intent.js.map +1 -0
  245. package/dist/journey/orchestrator.d.ts +140 -0
  246. package/dist/journey/orchestrator.d.ts.map +1 -0
  247. package/dist/journey/orchestrator.js +415 -0
  248. package/dist/journey/orchestrator.js.map +1 -0
  249. package/dist/journey/provider-launch-intent.d.ts +12 -0
  250. package/dist/journey/provider-launch-intent.d.ts.map +1 -0
  251. package/dist/journey/provider-launch-intent.js +40 -0
  252. package/dist/journey/provider-launch-intent.js.map +1 -0
  253. package/dist/journey/remote-workspace.d.ts +34 -0
  254. package/dist/journey/remote-workspace.d.ts.map +1 -0
  255. package/dist/journey/remote-workspace.js +91 -0
  256. package/dist/journey/remote-workspace.js.map +1 -0
  257. package/dist/journey/root-entry.d.ts +56 -0
  258. package/dist/journey/root-entry.d.ts.map +1 -0
  259. package/dist/journey/root-entry.js +19 -0
  260. package/dist/journey/root-entry.js.map +1 -0
  261. package/dist/journey/selection.d.ts +165 -0
  262. package/dist/journey/selection.d.ts.map +1 -0
  263. package/dist/journey/selection.js +565 -0
  264. package/dist/journey/selection.js.map +1 -0
  265. package/dist/journey/session-failure.d.ts +4 -0
  266. package/dist/journey/session-failure.d.ts.map +1 -0
  267. package/dist/journey/session-failure.js +28 -0
  268. package/dist/journey/session-failure.js.map +1 -0
  269. package/dist/journey/workspace-effects.d.ts +30 -0
  270. package/dist/journey/workspace-effects.d.ts.map +1 -0
  271. package/dist/journey/workspace-effects.js +348 -0
  272. package/dist/journey/workspace-effects.js.map +1 -0
  273. package/dist/local-actions/broker.d.ts +32 -0
  274. package/dist/local-actions/broker.d.ts.map +1 -0
  275. package/dist/local-actions/broker.js +400 -0
  276. package/dist/local-actions/broker.js.map +1 -0
  277. package/dist/local-actions/browser-action.d.ts +78 -0
  278. package/dist/local-actions/browser-action.d.ts.map +1 -0
  279. package/dist/local-actions/browser-action.js +307 -0
  280. package/dist/local-actions/browser-action.js.map +1 -0
  281. package/dist/local-actions/callback-relay.d.ts +45 -0
  282. package/dist/local-actions/callback-relay.d.ts.map +1 -0
  283. package/dist/local-actions/callback-relay.js +265 -0
  284. package/dist/local-actions/callback-relay.js.map +1 -0
  285. package/dist/local-actions/clipboard.d.ts +3 -0
  286. package/dist/local-actions/clipboard.d.ts.map +1 -0
  287. package/dist/local-actions/clipboard.js +18 -0
  288. package/dist/local-actions/clipboard.js.map +1 -0
  289. package/dist/local-actions/contracts.d.ts +63 -0
  290. package/dist/local-actions/contracts.d.ts.map +1 -0
  291. package/dist/local-actions/contracts.js +18 -0
  292. package/dist/local-actions/contracts.js.map +1 -0
  293. package/dist/local-actions/desktop-presentation.d.ts +141 -0
  294. package/dist/local-actions/desktop-presentation.d.ts.map +1 -0
  295. package/dist/local-actions/desktop-presentation.js +253 -0
  296. package/dist/local-actions/desktop-presentation.js.map +1 -0
  297. package/dist/local-actions/device-selection.d.ts +43 -0
  298. package/dist/local-actions/device-selection.d.ts.map +1 -0
  299. package/dist/local-actions/device-selection.js +154 -0
  300. package/dist/local-actions/device-selection.js.map +1 -0
  301. package/dist/local-actions/executor.d.ts +49 -0
  302. package/dist/local-actions/executor.d.ts.map +1 -0
  303. package/dist/local-actions/executor.js +329 -0
  304. package/dist/local-actions/executor.js.map +1 -0
  305. package/dist/local-actions/file-transfers.d.ts +141 -0
  306. package/dist/local-actions/file-transfers.d.ts.map +1 -0
  307. package/dist/local-actions/file-transfers.js +446 -0
  308. package/dist/local-actions/file-transfers.js.map +1 -0
  309. package/dist/local-actions/foreground-notifications.d.ts +45 -0
  310. package/dist/local-actions/foreground-notifications.d.ts.map +1 -0
  311. package/dist/local-actions/foreground-notifications.js +163 -0
  312. package/dist/local-actions/foreground-notifications.js.map +1 -0
  313. package/dist/local-actions/git-signing.d.ts +39 -0
  314. package/dist/local-actions/git-signing.d.ts.map +1 -0
  315. package/dist/local-actions/git-signing.js +135 -0
  316. package/dist/local-actions/git-signing.js.map +1 -0
  317. package/dist/local-actions/index.d.ts +19 -0
  318. package/dist/local-actions/index.d.ts.map +1 -0
  319. package/dist/local-actions/index.js +19 -0
  320. package/dist/local-actions/index.js.map +1 -0
  321. package/dist/local-actions/local-service-actions.d.ts +87 -0
  322. package/dist/local-actions/local-service-actions.d.ts.map +1 -0
  323. package/dist/local-actions/local-service-actions.js +347 -0
  324. package/dist/local-actions/local-service-actions.js.map +1 -0
  325. package/dist/local-actions/loopback.d.ts +5 -0
  326. package/dist/local-actions/loopback.d.ts.map +1 -0
  327. package/dist/local-actions/loopback.js +15 -0
  328. package/dist/local-actions/loopback.js.map +1 -0
  329. package/dist/local-actions/policy-store.d.ts +7 -0
  330. package/dist/local-actions/policy-store.d.ts.map +1 -0
  331. package/dist/local-actions/policy-store.js +70 -0
  332. package/dist/local-actions/policy-store.js.map +1 -0
  333. package/dist/local-actions/policy.d.ts +21 -0
  334. package/dist/local-actions/policy.d.ts.map +1 -0
  335. package/dist/local-actions/policy.js +43 -0
  336. package/dist/local-actions/policy.js.map +1 -0
  337. package/dist/local-actions/private-port-forward.d.ts +36 -0
  338. package/dist/local-actions/private-port-forward.d.ts.map +1 -0
  339. package/dist/local-actions/private-port-forward.js +154 -0
  340. package/dist/local-actions/private-port-forward.js.map +1 -0
  341. package/dist/local-actions/provider-mcp-config.d.ts +101 -0
  342. package/dist/local-actions/provider-mcp-config.d.ts.map +1 -0
  343. package/dist/local-actions/provider-mcp-config.js +166 -0
  344. package/dist/local-actions/provider-mcp-config.js.map +1 -0
  345. package/dist/local-actions/providers.d.ts +12 -0
  346. package/dist/local-actions/providers.d.ts.map +1 -0
  347. package/dist/local-actions/providers.js +42 -0
  348. package/dist/local-actions/providers.js.map +1 -0
  349. package/dist/local-actions/schemas.d.ts +4 -0
  350. package/dist/local-actions/schemas.d.ts.map +1 -0
  351. package/dist/local-actions/schemas.js +314 -0
  352. package/dist/local-actions/schemas.js.map +1 -0
  353. package/dist/local-actions/sensitive-consent.d.ts +32 -0
  354. package/dist/local-actions/sensitive-consent.d.ts.map +1 -0
  355. package/dist/local-actions/sensitive-consent.js +47 -0
  356. package/dist/local-actions/sensitive-consent.js.map +1 -0
  357. package/dist/machines/command-launch.d.ts +17 -0
  358. package/dist/machines/command-launch.d.ts.map +1 -0
  359. package/dist/machines/command-launch.js +52 -0
  360. package/dist/machines/command-launch.js.map +1 -0
  361. package/dist/machines/execution-receipt.d.ts +18 -0
  362. package/dist/machines/execution-receipt.d.ts.map +1 -0
  363. package/dist/machines/execution-receipt.js +87 -0
  364. package/dist/machines/execution-receipt.js.map +1 -0
  365. package/dist/machines/executions-screen.d.ts +6 -0
  366. package/dist/machines/executions-screen.d.ts.map +1 -0
  367. package/dist/machines/executions-screen.js +410 -0
  368. package/dist/machines/executions-screen.js.map +1 -0
  369. package/dist/machines/explorer.d.ts +75 -0
  370. package/dist/machines/explorer.d.ts.map +1 -0
  371. package/dist/machines/explorer.js +1726 -0
  372. package/dist/machines/explorer.js.map +1 -0
  373. package/dist/machines/live-supervisor-update.d.ts +325 -0
  374. package/dist/machines/live-supervisor-update.d.ts.map +1 -0
  375. package/dist/machines/live-supervisor-update.js +513 -0
  376. package/dist/machines/live-supervisor-update.js.map +1 -0
  377. package/dist/machines/machine-first.d.ts +123 -0
  378. package/dist/machines/machine-first.d.ts.map +1 -0
  379. package/dist/machines/machine-first.js +119 -0
  380. package/dist/machines/machine-first.js.map +1 -0
  381. package/dist/machines/opencode-supervisor.d.ts +51 -0
  382. package/dist/machines/opencode-supervisor.d.ts.map +1 -0
  383. package/dist/machines/opencode-supervisor.js +124 -0
  384. package/dist/machines/opencode-supervisor.js.map +1 -0
  385. package/dist/machines/pagination.d.ts +4 -0
  386. package/dist/machines/pagination.d.ts.map +1 -0
  387. package/dist/machines/pagination.js +7 -0
  388. package/dist/machines/pagination.js.map +1 -0
  389. package/dist/machines/provider-availability.d.ts +42 -0
  390. package/dist/machines/provider-availability.d.ts.map +1 -0
  391. package/dist/machines/provider-availability.js +82 -0
  392. package/dist/machines/provider-availability.js.map +1 -0
  393. package/dist/machines/provider-screen.d.ts +12 -0
  394. package/dist/machines/provider-screen.d.ts.map +1 -0
  395. package/dist/machines/provider-screen.js +129 -0
  396. package/dist/machines/provider-screen.js.map +1 -0
  397. package/dist/machines/session-actionability.d.ts +86 -0
  398. package/dist/machines/session-actionability.d.ts.map +1 -0
  399. package/dist/machines/session-actionability.js +125 -0
  400. package/dist/machines/session-actionability.js.map +1 -0
  401. package/dist/machines/session-visibility.d.ts +139 -0
  402. package/dist/machines/session-visibility.d.ts.map +1 -0
  403. package/dist/machines/session-visibility.js +109 -0
  404. package/dist/machines/session-visibility.js.map +1 -0
  405. package/dist/platform/adapter.d.ts +62 -0
  406. package/dist/platform/adapter.d.ts.map +1 -0
  407. package/dist/platform/adapter.js +240 -0
  408. package/dist/platform/adapter.js.map +1 -0
  409. package/dist/platform/support.d.ts +12 -0
  410. package/dist/platform/support.d.ts.map +1 -0
  411. package/dist/platform/support.js +25 -0
  412. package/dist/platform/support.js.map +1 -0
  413. package/dist/pty/contracts.d.ts +45 -0
  414. package/dist/pty/contracts.d.ts.map +1 -0
  415. package/dist/pty/contracts.js +2 -0
  416. package/dist/pty/contracts.js.map +1 -0
  417. package/dist/pty/evidence-gate.d.ts +14 -0
  418. package/dist/pty/evidence-gate.d.ts.map +1 -0
  419. package/dist/pty/evidence-gate.js +35 -0
  420. package/dist/pty/evidence-gate.js.map +1 -0
  421. package/dist/pty/index.d.ts +5 -0
  422. package/dist/pty/index.d.ts.map +1 -0
  423. package/dist/pty/index.js +5 -0
  424. package/dist/pty/index.js.map +1 -0
  425. package/dist/pty/node-host-terminal.d.ts +14 -0
  426. package/dist/pty/node-host-terminal.d.ts.map +1 -0
  427. package/dist/pty/node-host-terminal.js +173 -0
  428. package/dist/pty/node-host-terminal.js.map +1 -0
  429. package/dist/pty/node-process.d.ts +26 -0
  430. package/dist/pty/node-process.d.ts.map +1 -0
  431. package/dist/pty/node-process.js +102 -0
  432. package/dist/pty/node-process.js.map +1 -0
  433. package/dist/runtime/api-terminal-control-plane.d.ts +7 -0
  434. package/dist/runtime/api-terminal-control-plane.d.ts.map +1 -0
  435. package/dist/runtime/api-terminal-control-plane.js +95 -0
  436. package/dist/runtime/api-terminal-control-plane.js.map +1 -0
  437. package/dist/runtime/backoff.d.ts +17 -0
  438. package/dist/runtime/backoff.d.ts.map +1 -0
  439. package/dist/runtime/backoff.js +61 -0
  440. package/dist/runtime/backoff.js.map +1 -0
  441. package/dist/runtime/boundary.d.ts +171 -0
  442. package/dist/runtime/boundary.d.ts.map +1 -0
  443. package/dist/runtime/boundary.js +1858 -0
  444. package/dist/runtime/boundary.js.map +1 -0
  445. package/dist/runtime/capability-gate.d.ts +25 -0
  446. package/dist/runtime/capability-gate.d.ts.map +1 -0
  447. package/dist/runtime/capability-gate.js +77 -0
  448. package/dist/runtime/capability-gate.js.map +1 -0
  449. package/dist/runtime/contracts.d.ts +25 -0
  450. package/dist/runtime/contracts.d.ts.map +1 -0
  451. package/dist/runtime/contracts.js +66 -0
  452. package/dist/runtime/contracts.js.map +1 -0
  453. package/dist/runtime/errors.d.ts +20 -0
  454. package/dist/runtime/errors.d.ts.map +1 -0
  455. package/dist/runtime/errors.js +22 -0
  456. package/dist/runtime/errors.js.map +1 -0
  457. package/dist/runtime/index.d.ts +9 -0
  458. package/dist/runtime/index.d.ts.map +1 -0
  459. package/dist/runtime/index.js +9 -0
  460. package/dist/runtime/index.js.map +1 -0
  461. package/dist/runtime/node-foreground-session.d.ts +50 -0
  462. package/dist/runtime/node-foreground-session.d.ts.map +1 -0
  463. package/dist/runtime/node-foreground-session.js +431 -0
  464. package/dist/runtime/node-foreground-session.js.map +1 -0
  465. package/dist/runtime/node-websocket-connector.d.ts +6 -0
  466. package/dist/runtime/node-websocket-connector.d.ts.map +1 -0
  467. package/dist/runtime/node-websocket-connector.js +344 -0
  468. package/dist/runtime/node-websocket-connector.js.map +1 -0
  469. package/dist/runtime/observer-screen.d.ts +6 -0
  470. package/dist/runtime/observer-screen.d.ts.map +1 -0
  471. package/dist/runtime/observer-screen.js +144 -0
  472. package/dist/runtime/observer-screen.js.map +1 -0
  473. package/dist/runtime/owner-grant-operations.d.ts +136 -0
  474. package/dist/runtime/owner-grant-operations.d.ts.map +1 -0
  475. package/dist/runtime/owner-grant-operations.js +216 -0
  476. package/dist/runtime/owner-grant-operations.js.map +1 -0
  477. package/dist/runtime/owner-grants-screen.d.ts +40 -0
  478. package/dist/runtime/owner-grants-screen.d.ts.map +1 -0
  479. package/dist/runtime/owner-grants-screen.js +987 -0
  480. package/dist/runtime/owner-grants-screen.js.map +1 -0
  481. package/dist/runtime/terminal-transport.d.ts +85 -0
  482. package/dist/runtime/terminal-transport.d.ts.map +1 -0
  483. package/dist/runtime/terminal-transport.js +152 -0
  484. package/dist/runtime/terminal-transport.js.map +1 -0
  485. package/dist/sync/continuous-sync-supervisor.d.ts +107 -0
  486. package/dist/sync/continuous-sync-supervisor.d.ts.map +1 -0
  487. package/dist/sync/continuous-sync-supervisor.js +1117 -0
  488. package/dist/sync/continuous-sync-supervisor.js.map +1 -0
  489. package/dist/sync/index.d.ts +9 -0
  490. package/dist/sync/index.d.ts.map +1 -0
  491. package/dist/sync/index.js +9 -0
  492. package/dist/sync/index.js.map +1 -0
  493. package/dist/sync/journal.d.ts +57 -0
  494. package/dist/sync/journal.d.ts.map +1 -0
  495. package/dist/sync/journal.js +685 -0
  496. package/dist/sync/journal.js.map +1 -0
  497. package/dist/sync/revisions.d.ts +118 -0
  498. package/dist/sync/revisions.d.ts.map +1 -0
  499. package/dist/sync/revisions.js +364 -0
  500. package/dist/sync/revisions.js.map +1 -0
  501. package/dist/sync/supervisor.d.ts +107 -0
  502. package/dist/sync/supervisor.d.ts.map +1 -0
  503. package/dist/sync/supervisor.js +246 -0
  504. package/dist/sync/supervisor.js.map +1 -0
  505. package/dist/sync/workspace-sync-client.d.ts +18 -0
  506. package/dist/sync/workspace-sync-client.d.ts.map +1 -0
  507. package/dist/sync/workspace-sync-client.js +150 -0
  508. package/dist/sync/workspace-sync-client.js.map +1 -0
  509. package/dist/sync/workspace-sync-coordinator.d.ts +76 -0
  510. package/dist/sync/workspace-sync-coordinator.d.ts.map +1 -0
  511. package/dist/sync/workspace-sync-coordinator.js +621 -0
  512. package/dist/sync/workspace-sync-coordinator.js.map +1 -0
  513. package/dist/sync/workspace-sync-product-service.d.ts +79 -0
  514. package/dist/sync/workspace-sync-product-service.d.ts.map +1 -0
  515. package/dist/sync/workspace-sync-product-service.js +398 -0
  516. package/dist/sync/workspace-sync-product-service.js.map +1 -0
  517. package/dist/sync/workspace-sync-protocol.d.ts +145 -0
  518. package/dist/sync/workspace-sync-protocol.d.ts.map +1 -0
  519. package/dist/sync/workspace-sync-protocol.js +347 -0
  520. package/dist/sync/workspace-sync-protocol.js.map +1 -0
  521. package/dist/terminal/appbar.d.ts +40 -0
  522. package/dist/terminal/appbar.d.ts.map +1 -0
  523. package/dist/terminal/appbar.js +55 -0
  524. package/dist/terminal/appbar.js.map +1 -0
  525. package/dist/terminal/cell-width.d.ts +3 -0
  526. package/dist/terminal/cell-width.d.ts.map +1 -0
  527. package/dist/terminal/cell-width.js +53 -0
  528. package/dist/terminal/cell-width.js.map +1 -0
  529. package/dist/terminal/codec.d.ts +107 -0
  530. package/dist/terminal/codec.d.ts.map +1 -0
  531. package/dist/terminal/codec.js +538 -0
  532. package/dist/terminal/codec.js.map +1 -0
  533. package/dist/terminal/foreground.d.ts +135 -0
  534. package/dist/terminal/foreground.d.ts.map +1 -0
  535. package/dist/terminal/foreground.js +2097 -0
  536. package/dist/terminal/foreground.js.map +1 -0
  537. package/dist/terminal/generated/terminal-wire-v1.d.ts +26 -0
  538. package/dist/terminal/generated/terminal-wire-v1.d.ts.map +1 -0
  539. package/dist/terminal/generated/terminal-wire-v1.js +27 -0
  540. package/dist/terminal/generated/terminal-wire-v1.js.map +1 -0
  541. package/dist/terminal/mode.d.ts +33 -0
  542. package/dist/terminal/mode.d.ts.map +1 -0
  543. package/dist/terminal/mode.js +99 -0
  544. package/dist/terminal/mode.js.map +1 -0
  545. package/dist/terminal/passthrough.d.ts +47 -0
  546. package/dist/terminal/passthrough.d.ts.map +1 -0
  547. package/dist/terminal/passthrough.js +666 -0
  548. package/dist/terminal/passthrough.js.map +1 -0
  549. package/dist/terminal/resume.d.ts +58 -0
  550. package/dist/terminal/resume.d.ts.map +1 -0
  551. package/dist/terminal/resume.js +185 -0
  552. package/dist/terminal/resume.js.map +1 -0
  553. package/dist/terminal/viewport.d.ts +93 -0
  554. package/dist/terminal/viewport.d.ts.map +1 -0
  555. package/dist/terminal/viewport.js +266 -0
  556. package/dist/terminal/viewport.js.map +1 -0
  557. package/dist/terminal/workbench.d.ts +32 -0
  558. package/dist/terminal/workbench.d.ts.map +1 -0
  559. package/dist/terminal/workbench.js +316 -0
  560. package/dist/terminal/workbench.js.map +1 -0
  561. package/dist/terminal/xterm-vte.d.ts +49 -0
  562. package/dist/terminal/xterm-vte.d.ts.map +1 -0
  563. package/dist/terminal/xterm-vte.js +602 -0
  564. package/dist/terminal/xterm-vte.js.map +1 -0
  565. package/dist/version.d.ts +3 -0
  566. package/dist/version.d.ts.map +1 -0
  567. package/dist/version.js +3 -0
  568. package/dist/version.js.map +1 -0
  569. package/dist/workspace/binding-path.d.ts +17 -0
  570. package/dist/workspace/binding-path.d.ts.map +1 -0
  571. package/dist/workspace/binding-path.js +91 -0
  572. package/dist/workspace/binding-path.js.map +1 -0
  573. package/dist/workspace/binding-store.d.ts +107 -0
  574. package/dist/workspace/binding-store.d.ts.map +1 -0
  575. package/dist/workspace/binding-store.js +783 -0
  576. package/dist/workspace/binding-store.js.map +1 -0
  577. package/dist/workspace/binding.d.ts +35 -0
  578. package/dist/workspace/binding.d.ts.map +1 -0
  579. package/dist/workspace/binding.js +70 -0
  580. package/dist/workspace/binding.js.map +1 -0
  581. package/dist/workspace/errors.d.ts +4 -0
  582. package/dist/workspace/errors.d.ts.map +1 -0
  583. package/dist/workspace/errors.js +19 -0
  584. package/dist/workspace/errors.js.map +1 -0
  585. package/dist/workspace/exclusion.d.ts +21 -0
  586. package/dist/workspace/exclusion.d.ts.map +1 -0
  587. package/dist/workspace/exclusion.js +243 -0
  588. package/dist/workspace/exclusion.js.map +1 -0
  589. package/dist/workspace/index.d.ts +8 -0
  590. package/dist/workspace/index.d.ts.map +1 -0
  591. package/dist/workspace/index.js +8 -0
  592. package/dist/workspace/index.js.map +1 -0
  593. package/dist/workspace/lifecycle.d.ts +56 -0
  594. package/dist/workspace/lifecycle.d.ts.map +1 -0
  595. package/dist/workspace/lifecycle.js +94 -0
  596. package/dist/workspace/lifecycle.js.map +1 -0
  597. package/dist/workspace/manifest.d.ts +47 -0
  598. package/dist/workspace/manifest.d.ts.map +1 -0
  599. package/dist/workspace/manifest.js +243 -0
  600. package/dist/workspace/manifest.js.map +1 -0
  601. package/dist/workspace/paths.d.ts +14 -0
  602. package/dist/workspace/paths.d.ts.map +1 -0
  603. package/dist/workspace/paths.js +67 -0
  604. package/dist/workspace/paths.js.map +1 -0
  605. package/dist/workspace/schema.d.ts +15 -0
  606. package/dist/workspace/schema.d.ts.map +1 -0
  607. package/dist/workspace/schema.js +33 -0
  608. package/dist/workspace/schema.js.map +1 -0
  609. package/dist/workspace/selection-screen.d.ts +4 -0
  610. package/dist/workspace/selection-screen.d.ts.map +1 -0
  611. package/dist/workspace/selection-screen.js +216 -0
  612. package/dist/workspace/selection-screen.js.map +1 -0
  613. package/dist/workspace/selection-service.d.ts +16 -0
  614. package/dist/workspace/selection-service.d.ts.map +1 -0
  615. package/dist/workspace/selection-service.js +65 -0
  616. package/dist/workspace/selection-service.js.map +1 -0
  617. package/node_modules/@xterm/headless/README.md +31 -0
  618. package/node_modules/@xterm/headless/lib-headless/xterm-headless.js +2 -0
  619. package/node_modules/@xterm/headless/lib-headless/xterm-headless.js.map +1 -0
  620. package/node_modules/@xterm/headless/lib-headless/xterm-headless.mjs +46 -0
  621. package/node_modules/@xterm/headless/lib-headless/xterm-headless.mjs.map +7 -0
  622. package/node_modules/@xterm/headless/package.json +29 -0
  623. package/node_modules/@xterm/headless/typings/xterm-headless.d.ts +1385 -0
  624. package/package.json +75 -0
@@ -0,0 +1,90 @@
1
+ export declare function assertPublicId(value: string, label: string): string;
2
+ export declare function encodePublicId(value: string, label: string): string;
3
+ export declare function assertCanonicalUuid(value: string, label: string): string;
4
+ export declare function encodeCanonicalUuid(value: string, label: string): string;
5
+ /**
6
+ * A machine identifier, in the one shape the product accepts.
7
+ *
8
+ * The command layer used `assertPublicId` and the transport used
9
+ * `encodeCanonicalUuid`, so `mch_1` passed preflight, spent a capability
10
+ * round-trip, and only then failed deep in the transport against a rule the
11
+ * command layer never enforced. The user paid a network call to learn that
12
+ * their argument was malformed, and the error named a layer they had never
13
+ * heard of.
14
+ *
15
+ * The transport is the authority here — the server routes by canonical UUID —
16
+ * so both layers now call this, and the shape is stated once. Note that
17
+ * `--machine` on `cuna claude` is a machine NAME, not an ID, and is deliberately
18
+ * not validated here.
19
+ */
20
+ export declare function assertMachineId(value: string): string;
21
+ /** The same authority, percent-encoded for a request path. */
22
+ export declare function encodeMachineId(value: string): string;
23
+ export declare function assertIdempotencyKey(value: string): string;
24
+ export declare function isIdempotencyKey(value: string): boolean;
25
+ /**
26
+ * Parse a command-line integer option, or throw a usage error naming it.
27
+ *
28
+ * `Number(raw)` is not a base-10 integer parser. It accepts `0x1F4` (500),
29
+ * `1e5` (100000), `" 500 "`, `+500`, `.5e3`, `0b111` and `Infinity`, and
30
+ * `Number.isInteger` then waves the first five through. That is tolerable for a
31
+ * timeout and not tolerable for `--workspace-generation`, which is a fencing
32
+ * token: `1e3` silently becoming 1000 is a write against the wrong generation,
33
+ * and the mistake is invisible because the value looks like what was typed.
34
+ *
35
+ * Both the root option parser and the per-command option parser now go through
36
+ * here, because the two had independently written the same `Number(raw)` bug.
37
+ */
38
+ export declare function integerArgument(raw: string, name: string, minimum: number, maximum: number): number;
39
+ export declare function safeReasonCode(value: unknown): string | undefined;
40
+ export declare function assertSafeDisplayText(value: string, label: string): string;
41
+ export declare function isObject(value: unknown): value is Record<string, unknown>;
42
+ /**
43
+ * A response that did not match the published contract, carrying WHICH part.
44
+ *
45
+ * WHY THIS TYPE EXISTS. Every decoder in `api/contracts.ts` already knew the
46
+ * exact predicate that failed and threw a bare `TypeError` whose message the
47
+ * client then discarded, so `cuna.remote.malformed_response` reached the user as
48
+ * one unactionable sentence — "Cuna returned a response that does not match the
49
+ * public contract." — with no `details` and no `hint`. Finding out that
50
+ * production omits `workspace.id` required isolating `decodeCunaIdentity` in a
51
+ * throwaway script. That is a diagnosis a user cannot perform and the CLI did
52
+ * not need to lose: the information existed at the throw site and died one
53
+ * `catch` later.
54
+ *
55
+ * WHAT MAY BE CARRIED, AND WHAT MAY NOT. `field` and `predicate` are NAMES and
56
+ * SHAPES. A response body may hold an API key, an email address, or a workspace
57
+ * path, so no value from the payload is ever placed on this error — not the
58
+ * offending value, not a truncation of it, not its length. `field` is the key
59
+ * path the CLI itself asked for and `predicate` is a fixed token chosen from
60
+ * this source tree. Both are safe to print and safe to log.
61
+ *
62
+ * `field` is the NARROWEST KNOWN location, not necessarily a leaf. A compound
63
+ * check that spans a subtree reports the subtree, because claiming a leaf it did
64
+ * not test would be a more precise answer than the code actually has.
65
+ */
66
+ export declare class ContractViolation extends TypeError {
67
+ /** Narrowest known location, e.g. `workspace.id` or `capabilities[3].id`. */
68
+ readonly field: string | undefined;
69
+ /** Stable token naming the rule that failed, e.g. `required_string`. */
70
+ readonly predicate: string;
71
+ constructor(predicate: string, field?: string);
72
+ }
73
+ /** Mint a contract violation. `field` is omitted when the check spans no one key. */
74
+ export declare function contractViolation(predicate: string, field?: string): ContractViolation;
75
+ /**
76
+ * Run a nested decode, reporting any violation under `prefix`.
77
+ *
78
+ * Without this, `decodeCunaIdentity` reported `id` for a violation inside
79
+ * `workspace`, which names a key that also exists at the root — the one reading
80
+ * that would send a user to the wrong field.
81
+ */
82
+ export declare function underField<T>(prefix: string, run: () => T): T;
83
+ /** The same, for one element of a decoded array. */
84
+ export declare function underIndex<T>(prefix: string, index: number, run: () => T): T;
85
+ export declare function requiredString(source: Record<string, unknown>, key: string): string;
86
+ export declare function requiredDisplayString(source: Record<string, unknown>, key: string): string;
87
+ export declare function optionalDisplayString(source: Record<string, unknown>, key: string): string | undefined;
88
+ export declare function optionalString(source: Record<string, unknown>, key: string): string | undefined;
89
+ export declare function optionalNumber(source: Record<string, unknown>, key: string): number | undefined;
90
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/core/validation.ts"],"names":[],"mappings":"AAWA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKnE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAExE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ1D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,CAWR;AAED,wBAAgB,cAA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AAG,MAAM,GAAG,SAAS,CAMtG;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK/F;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAO/F"}
@@ -0,0 +1,199 @@
1
+ import { usageError } from "./errors.js";
2
+ const PUBLIC_ID = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u;
3
+ const SAFE_CODE = /^[a-z][a-z0-9_.-]{0,127}$/u;
4
+ // C0/C1 controls and Unicode format controls can mutate terminal state, forge
5
+ // rows, reverse text direction, or hide content. They are never valid in a
6
+ // Cuna display name, state label, or workspace path.
7
+ const UNSAFE_DISPLAY_CHARACTER = /[\p{Cc}\p{Cf}]/u;
8
+ const IDEMPOTENCY_KEY = /^[!-~]{8,128}$/u;
9
+ const CANONICAL_UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u;
10
+ export function assertPublicId(value, label) {
11
+ if (!PUBLIC_ID.test(value)) {
12
+ throw usageError(`Invalid ${label}.`, `${label} must be an opaque public Cuna identifier.`);
13
+ }
14
+ return value;
15
+ }
16
+ export function encodePublicId(value, label) {
17
+ return encodeURIComponent(assertPublicId(value, label));
18
+ }
19
+ export function assertCanonicalUuid(value, label) {
20
+ if (!CANONICAL_UUID.test(value)) {
21
+ throw usageError(`Invalid ${label}.`, `${label} must be a canonical lowercase Cuna UUID.`);
22
+ }
23
+ return value;
24
+ }
25
+ export function encodeCanonicalUuid(value, label) {
26
+ return encodeURIComponent(assertCanonicalUuid(value, label));
27
+ }
28
+ /**
29
+ * A machine identifier, in the one shape the product accepts.
30
+ *
31
+ * The command layer used `assertPublicId` and the transport used
32
+ * `encodeCanonicalUuid`, so `mch_1` passed preflight, spent a capability
33
+ * round-trip, and only then failed deep in the transport against a rule the
34
+ * command layer never enforced. The user paid a network call to learn that
35
+ * their argument was malformed, and the error named a layer they had never
36
+ * heard of.
37
+ *
38
+ * The transport is the authority here — the server routes by canonical UUID —
39
+ * so both layers now call this, and the shape is stated once. Note that
40
+ * `--machine` on `cuna claude` is a machine NAME, not an ID, and is deliberately
41
+ * not validated here.
42
+ */
43
+ export function assertMachineId(value) {
44
+ return assertCanonicalUuid(value, "machine ID");
45
+ }
46
+ /** The same authority, percent-encoded for a request path. */
47
+ export function encodeMachineId(value) {
48
+ return encodeURIComponent(assertMachineId(value));
49
+ }
50
+ export function assertIdempotencyKey(value) {
51
+ if (!isIdempotencyKey(value)) {
52
+ throw usageError("Invalid idempotency key.", "Idempotency key must contain 8 through 128 printable ASCII characters.");
53
+ }
54
+ return value;
55
+ }
56
+ export function isIdempotencyKey(value) {
57
+ return IDEMPOTENCY_KEY.test(value);
58
+ }
59
+ // Exactly a base-10 integer: no sign, no radix prefix, no exponent, no
60
+ // surrounding whitespace, no decimal point.
61
+ const DECIMAL_INTEGER = /^\d+$/u;
62
+ /**
63
+ * Parse a command-line integer option, or throw a usage error naming it.
64
+ *
65
+ * `Number(raw)` is not a base-10 integer parser. It accepts `0x1F4` (500),
66
+ * `1e5` (100000), `" 500 "`, `+500`, `.5e3`, `0b111` and `Infinity`, and
67
+ * `Number.isInteger` then waves the first five through. That is tolerable for a
68
+ * timeout and not tolerable for `--workspace-generation`, which is a fencing
69
+ * token: `1e3` silently becoming 1000 is a write against the wrong generation,
70
+ * and the mistake is invisible because the value looks like what was typed.
71
+ *
72
+ * Both the root option parser and the per-command option parser now go through
73
+ * here, because the two had independently written the same `Number(raw)` bug.
74
+ */
75
+ export function integerArgument(raw, name, minimum, maximum) {
76
+ const invalid = () => {
77
+ throw usageError(`Option --${name} must be an integer from ${minimum} through ${maximum}.`, "Write the value in base 10 with no sign, exponent, radix prefix, or surrounding spaces.");
78
+ };
79
+ if (!DECIMAL_INTEGER.test(raw))
80
+ return invalid();
81
+ const value = Number(raw);
82
+ if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
83
+ return invalid();
84
+ return value;
85
+ }
86
+ export function safeReasonCode(value) {
87
+ return typeof value === "string" && SAFE_CODE.test(value) ? value : undefined;
88
+ }
89
+ export function assertSafeDisplayText(value, label) {
90
+ if (UNSAFE_DISPLAY_CHARACTER.test(value)) {
91
+ throw usageError(`Invalid ${label}.`, `${label} must not contain control or formatting characters.`);
92
+ }
93
+ return value;
94
+ }
95
+ export function isObject(value) {
96
+ return value !== null && typeof value === "object" && !Array.isArray(value);
97
+ }
98
+ /**
99
+ * A response that did not match the published contract, carrying WHICH part.
100
+ *
101
+ * WHY THIS TYPE EXISTS. Every decoder in `api/contracts.ts` already knew the
102
+ * exact predicate that failed and threw a bare `TypeError` whose message the
103
+ * client then discarded, so `cuna.remote.malformed_response` reached the user as
104
+ * one unactionable sentence — "Cuna returned a response that does not match the
105
+ * public contract." — with no `details` and no `hint`. Finding out that
106
+ * production omits `workspace.id` required isolating `decodeCunaIdentity` in a
107
+ * throwaway script. That is a diagnosis a user cannot perform and the CLI did
108
+ * not need to lose: the information existed at the throw site and died one
109
+ * `catch` later.
110
+ *
111
+ * WHAT MAY BE CARRIED, AND WHAT MAY NOT. `field` and `predicate` are NAMES and
112
+ * SHAPES. A response body may hold an API key, an email address, or a workspace
113
+ * path, so no value from the payload is ever placed on this error — not the
114
+ * offending value, not a truncation of it, not its length. `field` is the key
115
+ * path the CLI itself asked for and `predicate` is a fixed token chosen from
116
+ * this source tree. Both are safe to print and safe to log.
117
+ *
118
+ * `field` is the NARROWEST KNOWN location, not necessarily a leaf. A compound
119
+ * check that spans a subtree reports the subtree, because claiming a leaf it did
120
+ * not test would be a more precise answer than the code actually has.
121
+ */
122
+ export class ContractViolation extends TypeError {
123
+ /** Narrowest known location, e.g. `workspace.id` or `capabilities[3].id`. */
124
+ field;
125
+ /** Stable token naming the rule that failed, e.g. `required_string`. */
126
+ predicate;
127
+ constructor(predicate, field) {
128
+ super(field === undefined
129
+ ? `Contract violation: ${predicate}`
130
+ : `Contract violation: ${predicate} at ${field}`);
131
+ this.name = "ContractViolation";
132
+ this.predicate = predicate;
133
+ this.field = field;
134
+ }
135
+ }
136
+ /** Mint a contract violation. `field` is omitted when the check spans no one key. */
137
+ export function contractViolation(predicate, field) {
138
+ return field === undefined ? new ContractViolation(predicate) : new ContractViolation(predicate, field);
139
+ }
140
+ /**
141
+ * Run a nested decode, reporting any violation under `prefix`.
142
+ *
143
+ * Without this, `decodeCunaIdentity` reported `id` for a violation inside
144
+ * `workspace`, which names a key that also exists at the root — the one reading
145
+ * that would send a user to the wrong field.
146
+ */
147
+ export function underField(prefix, run) {
148
+ try {
149
+ return run();
150
+ }
151
+ catch (error) {
152
+ if (error instanceof ContractViolation) {
153
+ throw contractViolation(error.predicate, error.field === undefined ? prefix : `${prefix}.${error.field}`);
154
+ }
155
+ throw error;
156
+ }
157
+ }
158
+ /** The same, for one element of a decoded array. */
159
+ export function underIndex(prefix, index, run) {
160
+ return underField(`${prefix}[${index}]`, run);
161
+ }
162
+ export function requiredString(source, key) {
163
+ const value = source[key];
164
+ if (typeof value !== "string" || value.length === 0) {
165
+ throw contractViolation("required_non_empty_string", key);
166
+ }
167
+ return value;
168
+ }
169
+ export function requiredDisplayString(source, key) {
170
+ const value = requiredString(source, key);
171
+ if (UNSAFE_DISPLAY_CHARACTER.test(value))
172
+ throw contractViolation("no_control_characters", key);
173
+ return value;
174
+ }
175
+ export function optionalDisplayString(source, key) {
176
+ const value = optionalString(source, key);
177
+ if (value !== undefined && UNSAFE_DISPLAY_CHARACTER.test(value)) {
178
+ throw contractViolation("no_control_characters", key);
179
+ }
180
+ return value;
181
+ }
182
+ export function optionalString(source, key) {
183
+ const value = source[key];
184
+ if (value === undefined || value === null)
185
+ return undefined;
186
+ if (typeof value !== "string")
187
+ throw contractViolation("string_when_present", key);
188
+ return value;
189
+ }
190
+ export function optionalNumber(source, key) {
191
+ const value = source[key];
192
+ if (value === undefined || value === null)
193
+ return undefined;
194
+ if (typeof value !== "number" || !Number.isFinite(value)) {
195
+ throw contractViolation("finite_number_when_present", key);
196
+ }
197
+ return value;
198
+ }
199
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/core/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,SAAS,GAAG,sCAAsC,CAAC;AACzD,MAAM,SAAS,GAAG,4BAA4B,CAAC;AAC/C,8EAA8E;AAC9E,2EAA2E;AAC3E,qDAAqD;AACrD,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AACnD,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAC1C,MAAM,cAAc,GAAG,iEAAiE,CAAC;AAEzF,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,KAAa;IACzD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,UAAU,CAAC,WAAW,KAAK,GAAG,EAAE,GAAG,KAAK,4CAA4C,CAAC,CAAC;IAC9F,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa,EAAE,KAAa;IACzD,OAAO,kBAAkB,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,KAAa;IAC9D,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,UAAU,CAAC,WAAW,KAAK,GAAG,EAAE,GAAG,KAAK,2CAA2C,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAa,EAAE,KA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C;AAED,MAAM,UAAU,qBAAqB,CAAC,MAA+B,EAAE,GAAW;IAChF,MAAM,KAAK,GAAG,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,SAAS,IAAI,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChE,MAAM,iBAAiB,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAA+B,EAAE,GAAW;IACzE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,iBAAiB,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;IACnF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,MAA+B,EAAE,GAAW;IACzE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACzD,MAAM,iBAAiB,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,82 @@
1
+ import type { SecretMaterial } from "./secret-material.js";
2
+ export declare const CREDENTIAL_BACKEND_PROTOCOL: "cuna.secure-vault.v1";
3
+ export interface CredentialBinding {
4
+ readonly profileId: string;
5
+ readonly accountId: string;
6
+ readonly workspaceId: string;
7
+ readonly kind: string;
8
+ }
9
+ /**
10
+ * `preview` is deliberately not a production security claim. It is only
11
+ * accepted by an explicitly constructed preview vault and therefore cannot
12
+ * satisfy the public encrypted-session readiness gate.
13
+ */
14
+ export type CredentialBackendStatus = "verified" | "preview" | "unavailable" | "unknown";
15
+ export interface CredentialBackendEvidence {
16
+ readonly protocol: typeof CREDENTIAL_BACKEND_PROTOCOL;
17
+ readonly backendId: string;
18
+ readonly platform: NodeJS.Platform;
19
+ readonly status: CredentialBackendStatus;
20
+ readonly observedAt: number;
21
+ readonly expiresAt: number;
22
+ readonly source: "live_round_trip" | "encrypted_local_file" | "local_file_preview" | "probe_failed";
23
+ readonly reason?: string;
24
+ }
25
+ /**
26
+ * An implementation MUST replace one target atomically and MUST NOT expose the
27
+ * protected value through argv, environment variables, errors, or diagnostics.
28
+ */
29
+ export interface SecureCredentialBackend {
30
+ readonly backendId: string;
31
+ readonly platform: NodeJS.Platform;
32
+ probe(): Promise<CredentialBackendEvidence>;
33
+ read(target: string): Promise<Uint8Array | undefined>;
34
+ replace(target: string, protectedValue: Uint8Array): Promise<void>;
35
+ delete(target: string): Promise<"deleted" | "absent">;
36
+ /**
37
+ * Optional durable compare-and-swap operations. File-backed implementations
38
+ * use these to fence independent CLI processes; an in-memory queue is not an
39
+ * inter-process authority.
40
+ */
41
+ compareAndSwap?(target: string, expectedSha256: string | null, protectedValue: Uint8Array): Promise<"replaced" | "conflict">;
42
+ compareAndDelete?(target: string, expectedSha256: string): Promise<"deleted" | "absent" | "conflict">;
43
+ /**
44
+ * Optional cross-process refresh authority. It is deliberately separate
45
+ * from the backend's storage lock: the callback reads and CAS-writes through
46
+ * that storage lock while this outer authority prevents sibling CLI
47
+ * processes from re-exchanging the same renewable session concurrently.
48
+ */
49
+ withRefreshLock?<T>(target: string, operation: () => Promise<T>): Promise<T>;
50
+ }
51
+ export interface CredentialSnapshot {
52
+ readonly material: SecretMaterial;
53
+ readonly revision: number;
54
+ readonly expiresAt: number | undefined;
55
+ }
56
+ export interface CredentialStatus {
57
+ readonly backendId: string;
58
+ readonly backendStatus: CredentialBackendStatus;
59
+ readonly state: "present" | "expired" | "absent" | "corrupt" | "revoked" | "unavailable";
60
+ readonly bindingDigest: string;
61
+ readonly revision?: number;
62
+ readonly expiresAt?: number;
63
+ }
64
+ export type CredentialRefreshResult = {
65
+ readonly status: "rotated";
66
+ readonly material: SecretMaterial;
67
+ readonly expiresAt?: number;
68
+ } | {
69
+ readonly status: "retained";
70
+ } | {
71
+ readonly status: "missing";
72
+ } | {
73
+ readonly status: "rejected";
74
+ /**
75
+ * The vault always revision-fences removal, but the caller must still
76
+ * distinguish a remote terminal fact from local expiry or validation.
77
+ * Only `authoritative_remote` permits a later logout to report that the
78
+ * remote family was already revoked.
79
+ */
80
+ readonly reason: "authoritative_remote" | "local_expired" | "local_integrity";
81
+ };
82
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/credentials/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,eAAO,MAAM,2BAA2B,EAAG,sBAA+B,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC;AAEzF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,QAAQ,EAAE,OAAO,2BAA2B,CAAC;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC;IACnC,QAAQ,CAAC,MAAM,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C;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,uBAAuB,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;IACzF,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,MAAM,uBAAuB,GAC/B;IACE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,GACD;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GAI/B;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAAE,GAC9B;IACE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,sBAAsB,GAAG,eAAe,GAAG,iBAAiB,CAAC;CAC/E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export const CREDENTIAL_BACKEND_PROTOCOL = "cuna.secure-vault.v1";
2
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/credentials/contracts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAA+B,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type CredentialErrorCode = "credential_backend_unavailable" | "credential_backend_unverified" | "credential_backend_failure" | "credential_binding_invalid" | "credential_corrupt" | "credential_missing" | "credential_revision_conflict" | "credential_refresh_failed" | "credential_revoked" | "credential_process_failed" | "credential_process_timeout" | "credential_output_oversized";
2
+ export declare class CredentialBoundaryError extends Error {
3
+ readonly code: CredentialErrorCode;
4
+ readonly retryable: boolean;
5
+ readonly safeDetails: Readonly<Record<string, string | number | boolean | null>> | undefined;
6
+ constructor(input: {
7
+ readonly code: CredentialErrorCode;
8
+ readonly message: string;
9
+ readonly retryable?: boolean;
10
+ readonly safeDetails?: Readonly<Record<string, string | number | boolean | null>>;
11
+ readonly cause?: unknown;
12
+ });
13
+ }
14
+ export declare function credentialFailure(code: CredentialErrorCode, message: string, options?: {
15
+ readonly retryable?: boolean;
16
+ readonly safeDetails?: Readonly<Record<string, string | number | boolean | null>>;
17
+ readonly cause?: unknown;
18
+ }): CredentialBoundaryError;
19
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/credentials/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B,gCAAgC,GAChC,+BAA+B,GAC/B,4BAA4B,GAC5B,4BAA4B,GAC5B,oBAAoB,GACpB,oBAAoB,GACpB,8BAA8B,GAC9B,2BAA2B,GAC3B,oBAAoB,GACpB,2BAA2B,GAC3B,4BAA4B,GAC5B,6BAA6B,CAAC;AAElC,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;gBAEjF,KAAK,EAAE;QACjB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;QACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;QAClF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;KAC1B;CAOF;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,mBAAmB,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IACP,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;IAClF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CACrB,GACL,uBAAuB,CAEzB"}
@@ -0,0 +1,16 @@
1
+ export class CredentialBoundaryError extends Error {
2
+ code;
3
+ retryable;
4
+ safeDetails;
5
+ constructor(input) {
6
+ super(input.message, { cause: input.cause });
7
+ this.name = "CredentialBoundaryError";
8
+ this.code = input.code;
9
+ this.retryable = input.retryable ?? false;
10
+ this.safeDetails = input.safeDetails;
11
+ }
12
+ }
13
+ export function credentialFailure(code, message, options = {}) {
14
+ return new CredentialBoundaryError({ code, message, ...options });
15
+ }
16
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/credentials/errors.ts"],"names":[],"mappings":"AAcA,MAAM,OAAO,uBAAwB,SAAQ,KAAK;IACvC,IAAI,CAAsB;IAC1B,SAAS,CAAU;IACnB,WAAW,CAAyE;IAE7F,YAAY,KAMX;QACC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;IACvC,CAAC;CACF;AAED,MAAM,UAAU,iBAAiB,CAC/B,IAAyB,EACzB,OAAe,EACf,UAII,EAAE;IAEN,OAAO,IAAI,uBAAuB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./contracts.js";
2
+ export * from "./errors.js";
3
+ export * from "./local-session.js";
4
+ export * from "./secret-material.js";
5
+ export * from "./vault.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./contracts.js";
2
+ export * from "./errors.js";
3
+ export * from "./local-session.js";
4
+ export * from "./secret-material.js";
5
+ export * from "./vault.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/credentials/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { type CredentialBackendEvidence, type SecureCredentialBackend } from "./contracts.js";
2
+ /**
3
+ * These programs are deliberately static. Dynamic values are supplied through
4
+ * a child-only environment instead of being interpolated into `-Command`.
5
+ * This keeps the Restricted-policy-compatible invocation while avoiding
6
+ * encoded/dynamically generated PowerShell source.
7
+ */
8
+ export declare const WINDOWS_ACL_COMMAND_PROGRAMS: Readonly<{
9
+ inspect: string;
10
+ inspectMany: string;
11
+ reconcileFile: string;
12
+ reconcileDirectory: string;
13
+ }>;
14
+ /**
15
+ * The production authority is the operating-system ACL implementation below.
16
+ * The override exists only so the sequencing and fail-closed behaviour can be
17
+ * tested deterministically; product wiring must not provide one.
18
+ */
19
+ interface WindowsAclInspection {
20
+ readonly currentSid: string;
21
+ readonly ownerSid: string;
22
+ readonly daclOwnerOnly: boolean;
23
+ }
24
+ interface WindowsAclReconciliation {
25
+ readonly before: WindowsAclInspection;
26
+ readonly after: WindowsAclInspection;
27
+ readonly repaired: boolean;
28
+ }
29
+ interface WindowsAclInspectionRequest {
30
+ readonly path: string;
31
+ readonly directory: boolean;
32
+ }
33
+ interface WindowsAclAuthority {
34
+ inspectOwnerOnly(path: string, directory: boolean): Promise<WindowsAclInspection>;
35
+ /**
36
+ * Optional: inspect several paths in one OS invocation. The result is
37
+ * index-aligned with the request; `undefined` means "not inspected" (for
38
+ * example, the path does not exist yet) and the caller must fall back to
39
+ * `inspectOwnerOnly` before trusting anything about that path.
40
+ */
41
+ inspectManyOwnerOnly?(requests: readonly WindowsAclInspectionRequest[]): Promise<readonly (WindowsAclInspection | undefined)[]>;
42
+ reconcileNewOwnerOnly(path: string, directory: boolean): Promise<WindowsAclReconciliation>;
43
+ }
44
+ /**
45
+ * Pure-JavaScript session persistence for the durable browser login code.
46
+ * The random AES key and ciphertext are separate current-user-only files.
47
+ * Their separation is not a backup boundary: a copied profile containing both
48
+ * files, or compromise of the same OS account, can decrypt the session.
49
+ */
50
+ export declare class LocalEncryptedSessionBackend implements SecureCredentialBackend {
51
+ #private;
52
+ readonly backendId = "cuna-local-aes256gcm-v1";
53
+ readonly platform: NodeJS.Platform;
54
+ constructor(input: {
55
+ readonly sessionFile: string;
56
+ readonly keyFile: string;
57
+ readonly platform: NodeJS.Platform;
58
+ readonly clock?: () => number;
59
+ readonly lockTimeoutMs?: number;
60
+ readonly windowsAcl?: WindowsAclAuthority;
61
+ });
62
+ probe(): Promise<CredentialBackendEvidence>;
63
+ read(_target: string): Promise<Uint8Array | undefined>;
64
+ replace(_target: string, protectedValue: Uint8Array): Promise<void>;
65
+ compareAndSwap(_target: string, expectedSha256: string | null, protectedValue: Uint8Array): Promise<"replaced" | "conflict">;
66
+ compareAndDelete(_target: string, expectedSha256: string): Promise<"deleted" | "absent" | "conflict">;
67
+ delete(_target: string): Promise<"deleted" | "absent">;
68
+ withRefreshLock<T>(_target: string, operation: () => Promise<T>): Promise<T>;
69
+ }
70
+ export declare function localEncryptedSessionPaths(configDirectory: string, profile?: string): {
71
+ readonly sessionFile: string;
72
+ readonly keyFile: string;
73
+ };
74
+ /**
75
+ * Isolates the two ACL inputs from inherited Windows environment variables.
76
+ * Windows environment-variable names are case-insensitive, so simply adding
77
+ * canonical uppercase keys would leave an attacker-controlled differently
78
+ * cased duplicate ambiguous to the child process.
79
+ */
80
+ export declare function isolateWindowsAclChildEnvironment(inherited: NodeJS.ProcessEnv, path: string): NodeJS.ProcessEnv;
81
+ /**
82
+ * The batched variant carries a newline-separated list under its own name.
83
+ * Both isolated environments strip every ACL input name, so a single-path
84
+ * child never sees a list and a batched child never sees a single path.
85
+ */
86
+ export declare function isolateWindowsAclBatchChildEnvironment(inherited: NodeJS.ProcessEnv, paths: readonly string[]): NodeJS.ProcessEnv;
87
+ /**
88
+ * Batched form of `inspectWindowsAcl`: one `powershell.exe` spawn for every
89
+ * requested path. Exported so the real program and its parser can be
90
+ * exercised against real files on Windows.
91
+ */
92
+ export declare function inspectWindowsAclMany(requests: readonly WindowsAclInspectionRequest[]): Promise<readonly (WindowsAclInspection | undefined)[]>;
93
+ /**
94
+ * Parses `inspectMany` output. Exactly one `CUNA_CURRENT_SID=` line is
95
+ * required; each `CUNA_SDDL:<index>=` line yields an inspection at that index
96
+ * and an index without a line stays `undefined`. A duplicated or out-of-range
97
+ * index is a malformed observation and rejects the whole batch.
98
+ */
99
+ export declare function parseWindowsAclBatchInspection(stdout: string, directories: readonly boolean[]): readonly (WindowsAclInspection | undefined)[];
100
+ export {};
101
+ //# sourceMappingURL=local-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-session.d.ts","sourceRoot":"","sources":["../../src/credentials/local-session.ts"],"names":[],"mappings":"AAUA,OAAO,EAA+B,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AA6B3H;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;;EAsGvC,CAAC;AAUH;;;;GAIG;AACH,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAED,UAAU,wBAAwB;IAChC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,UAAU,2BAA2B;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED,UAAU,mBAAmB;IAC3B,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAClF;;;;;OAKG;IACH,oBAAoB,CAAC,CAAC,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,oBAAoB,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;IAChI,qBAAqB,CAAC,IAAI,EAAE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