@software-dlc/cli 0.157.2

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 (701) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +105 -0
  3. package/README.md +31 -0
  4. package/dist/checkout.d.ts +43 -0
  5. package/dist/checkout.d.ts.map +1 -0
  6. package/dist/checkout.js +92 -0
  7. package/dist/checkout.js.map +1 -0
  8. package/dist/cli-arguments.d.ts +13 -0
  9. package/dist/cli-arguments.d.ts.map +1 -0
  10. package/dist/cli-arguments.js +67 -0
  11. package/dist/cli-arguments.js.map +1 -0
  12. package/dist/cli-branch-history.d.ts +48 -0
  13. package/dist/cli-branch-history.d.ts.map +1 -0
  14. package/dist/cli-branch-history.js +319 -0
  15. package/dist/cli-branch-history.js.map +1 -0
  16. package/dist/cli-branches.d.ts +22 -0
  17. package/dist/cli-branches.d.ts.map +1 -0
  18. package/dist/cli-branches.js +59 -0
  19. package/dist/cli-branches.js.map +1 -0
  20. package/dist/cli-deploy.d.ts +14 -0
  21. package/dist/cli-deploy.d.ts.map +1 -0
  22. package/dist/cli-deploy.js +164 -0
  23. package/dist/cli-deploy.js.map +1 -0
  24. package/dist/cli-health.d.ts +3 -0
  25. package/dist/cli-health.d.ts.map +1 -0
  26. package/dist/cli-health.js +73 -0
  27. package/dist/cli-health.js.map +1 -0
  28. package/dist/cli-help.d.ts +21 -0
  29. package/dist/cli-help.d.ts.map +1 -0
  30. package/dist/cli-help.js +176 -0
  31. package/dist/cli-help.js.map +1 -0
  32. package/dist/cli-login.d.ts +76 -0
  33. package/dist/cli-login.d.ts.map +1 -0
  34. package/dist/cli-login.js +634 -0
  35. package/dist/cli-login.js.map +1 -0
  36. package/dist/cli-operation.d.ts +2 -0
  37. package/dist/cli-operation.d.ts.map +1 -0
  38. package/dist/cli-operation.js +66 -0
  39. package/dist/cli-operation.js.map +1 -0
  40. package/dist/cli-org.d.ts +12 -0
  41. package/dist/cli-org.d.ts.map +1 -0
  42. package/dist/cli-org.js +218 -0
  43. package/dist/cli-org.js.map +1 -0
  44. package/dist/cli-rebuild.d.ts +20 -0
  45. package/dist/cli-rebuild.d.ts.map +1 -0
  46. package/dist/cli-rebuild.js +29 -0
  47. package/dist/cli-rebuild.js.map +1 -0
  48. package/dist/cli-reset.d.ts +27 -0
  49. package/dist/cli-reset.d.ts.map +1 -0
  50. package/dist/cli-reset.js +44 -0
  51. package/dist/cli-reset.js.map +1 -0
  52. package/dist/cli-snapshot.d.ts +398 -0
  53. package/dist/cli-snapshot.d.ts.map +1 -0
  54. package/dist/cli-snapshot.js +45 -0
  55. package/dist/cli-snapshot.js.map +1 -0
  56. package/dist/cli-task-context.d.ts +3 -0
  57. package/dist/cli-task-context.d.ts.map +1 -0
  58. package/dist/cli-task-context.js +112 -0
  59. package/dist/cli-task-context.js.map +1 -0
  60. package/dist/cli.d.ts +3 -0
  61. package/dist/cli.d.ts.map +1 -0
  62. package/dist/cli.js +1004 -0
  63. package/dist/cli.js.map +1 -0
  64. package/dist/graph-packages-lock.d.ts +169 -0
  65. package/dist/graph-packages-lock.d.ts.map +1 -0
  66. package/dist/graph-packages-lock.js +503 -0
  67. package/dist/graph-packages-lock.js.map +1 -0
  68. package/dist/index.d.ts +2 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/index.js +2 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/local/aggregate-preflight.d.ts +12 -0
  73. package/dist/local/aggregate-preflight.d.ts.map +1 -0
  74. package/dist/local/aggregate-preflight.js +22 -0
  75. package/dist/local/aggregate-preflight.js.map +1 -0
  76. package/dist/local/allow-mcp.d.ts +77 -0
  77. package/dist/local/allow-mcp.d.ts.map +1 -0
  78. package/dist/local/allow-mcp.js +394 -0
  79. package/dist/local/allow-mcp.js.map +1 -0
  80. package/dist/local/api-client.d.ts +15 -0
  81. package/dist/local/api-client.d.ts.map +1 -0
  82. package/dist/local/api-client.js +87 -0
  83. package/dist/local/api-client.js.map +1 -0
  84. package/dist/local/app-contract-readers.d.ts +229 -0
  85. package/dist/local/app-contract-readers.d.ts.map +1 -0
  86. package/dist/local/app-contract-readers.js +450 -0
  87. package/dist/local/app-contract-readers.js.map +1 -0
  88. package/dist/local/app-org-reader.d.ts +21 -0
  89. package/dist/local/app-org-reader.d.ts.map +1 -0
  90. package/dist/local/app-org-reader.js +66 -0
  91. package/dist/local/app-org-reader.js.map +1 -0
  92. package/dist/local/app-shell-readers.d.ts +96 -0
  93. package/dist/local/app-shell-readers.d.ts.map +1 -0
  94. package/dist/local/app-shell-readers.js +381 -0
  95. package/dist/local/app-shell-readers.js.map +1 -0
  96. package/dist/local/app-tasks-read.d.ts +202 -0
  97. package/dist/local/app-tasks-read.d.ts.map +1 -0
  98. package/dist/local/app-tasks-read.js +290 -0
  99. package/dist/local/app-tasks-read.js.map +1 -0
  100. package/dist/local/app-worktrees.d.ts +69 -0
  101. package/dist/local/app-worktrees.d.ts.map +1 -0
  102. package/dist/local/app-worktrees.js +554 -0
  103. package/dist/local/app-worktrees.js.map +1 -0
  104. package/dist/local/base-sync-manifest.d.ts +12 -0
  105. package/dist/local/base-sync-manifest.d.ts.map +1 -0
  106. package/dist/local/base-sync-manifest.js +57 -0
  107. package/dist/local/base-sync-manifest.js.map +1 -0
  108. package/dist/local/blast-radius.d.ts +191 -0
  109. package/dist/local/blast-radius.d.ts.map +1 -0
  110. package/dist/local/blast-radius.js +585 -0
  111. package/dist/local/blast-radius.js.map +1 -0
  112. package/dist/local/canonical.d.ts +2 -0
  113. package/dist/local/canonical.d.ts.map +1 -0
  114. package/dist/local/canonical.js +2 -0
  115. package/dist/local/canonical.js.map +1 -0
  116. package/dist/local/config.d.ts +22 -0
  117. package/dist/local/config.d.ts.map +1 -0
  118. package/dist/local/config.js +57 -0
  119. package/dist/local/config.js.map +1 -0
  120. package/dist/local/document-commands.d.ts +163 -0
  121. package/dist/local/document-commands.d.ts.map +1 -0
  122. package/dist/local/document-commands.js +620 -0
  123. package/dist/local/document-commands.js.map +1 -0
  124. package/dist/local/document-embeds.d.ts +21 -0
  125. package/dist/local/document-embeds.d.ts.map +1 -0
  126. package/dist/local/document-embeds.js +38 -0
  127. package/dist/local/document-embeds.js.map +1 -0
  128. package/dist/local/environment-context.d.ts +39 -0
  129. package/dist/local/environment-context.d.ts.map +1 -0
  130. package/dist/local/environment-context.js +193 -0
  131. package/dist/local/environment-context.js.map +1 -0
  132. package/dist/local/environment-exclude.d.ts +7 -0
  133. package/dist/local/environment-exclude.d.ts.map +1 -0
  134. package/dist/local/environment-exclude.js +82 -0
  135. package/dist/local/environment-exclude.js.map +1 -0
  136. package/dist/local/environment-sidecar.d.ts +126 -0
  137. package/dist/local/environment-sidecar.d.ts.map +1 -0
  138. package/dist/local/environment-sidecar.js +442 -0
  139. package/dist/local/environment-sidecar.js.map +1 -0
  140. package/dist/local/environment-switch.d.ts +22 -0
  141. package/dist/local/environment-switch.d.ts.map +1 -0
  142. package/dist/local/environment-switch.js +385 -0
  143. package/dist/local/environment-switch.js.map +1 -0
  144. package/dist/local/exact-remote-projection.d.ts +17 -0
  145. package/dist/local/exact-remote-projection.d.ts.map +1 -0
  146. package/dist/local/exact-remote-projection.js +53 -0
  147. package/dist/local/exact-remote-projection.js.map +1 -0
  148. package/dist/local/experimental/path-object-store.d.ts +66 -0
  149. package/dist/local/experimental/path-object-store.d.ts.map +1 -0
  150. package/dist/local/experimental/path-object-store.js +135 -0
  151. package/dist/local/experimental/path-object-store.js.map +1 -0
  152. package/dist/local/external-worktree-binding.d.ts +21 -0
  153. package/dist/local/external-worktree-binding.d.ts.map +1 -0
  154. package/dist/local/external-worktree-binding.js +56 -0
  155. package/dist/local/external-worktree-binding.js.map +1 -0
  156. package/dist/local/folder-members.d.ts +34 -0
  157. package/dist/local/folder-members.d.ts.map +1 -0
  158. package/dist/local/folder-members.js +168 -0
  159. package/dist/local/folder-members.js.map +1 -0
  160. package/dist/local/git-ref-authority.d.ts +11 -0
  161. package/dist/local/git-ref-authority.d.ts.map +1 -0
  162. package/dist/local/git-ref-authority.js +76 -0
  163. package/dist/local/git-ref-authority.js.map +1 -0
  164. package/dist/local/git.d.ts +88 -0
  165. package/dist/local/git.d.ts.map +1 -0
  166. package/dist/local/git.js +413 -0
  167. package/dist/local/git.js.map +1 -0
  168. package/dist/local/graph-read.d.ts +168 -0
  169. package/dist/local/graph-read.d.ts.map +1 -0
  170. package/dist/local/graph-read.js +360 -0
  171. package/dist/local/graph-read.js.map +1 -0
  172. package/dist/local/graph-sync.d.ts +39 -0
  173. package/dist/local/graph-sync.d.ts.map +1 -0
  174. package/dist/local/graph-sync.js +186 -0
  175. package/dist/local/graph-sync.js.map +1 -0
  176. package/dist/local/guide-commands.d.ts +79 -0
  177. package/dist/local/guide-commands.d.ts.map +1 -0
  178. package/dist/local/guide-commands.js +247 -0
  179. package/dist/local/guide-commands.js.map +1 -0
  180. package/dist/local/health-files.d.ts +24 -0
  181. package/dist/local/health-files.d.ts.map +1 -0
  182. package/dist/local/health-files.js +133 -0
  183. package/dist/local/health-files.js.map +1 -0
  184. package/dist/local/health-inspection.d.ts +12 -0
  185. package/dist/local/health-inspection.d.ts.map +1 -0
  186. package/dist/local/health-inspection.js +407 -0
  187. package/dist/local/health-inspection.js.map +1 -0
  188. package/dist/local/health-policy.d.ts +11 -0
  189. package/dist/local/health-policy.d.ts.map +1 -0
  190. package/dist/local/health-policy.js +257 -0
  191. package/dist/local/health-policy.js.map +1 -0
  192. package/dist/local/health-projection.d.ts +14 -0
  193. package/dist/local/health-projection.d.ts.map +1 -0
  194. package/dist/local/health-projection.js +102 -0
  195. package/dist/local/health-projection.js.map +1 -0
  196. package/dist/local/health-schema.d.ts +338 -0
  197. package/dist/local/health-schema.d.ts.map +1 -0
  198. package/dist/local/health-schema.js +213 -0
  199. package/dist/local/health-schema.js.map +1 -0
  200. package/dist/local/health-store.d.ts +61 -0
  201. package/dist/local/health-store.d.ts.map +1 -0
  202. package/dist/local/health-store.js +218 -0
  203. package/dist/local/health-store.js.map +1 -0
  204. package/dist/local/index.d.ts +66 -0
  205. package/dist/local/index.d.ts.map +1 -0
  206. package/dist/local/index.js +66 -0
  207. package/dist/local/index.js.map +1 -0
  208. package/dist/local/journey-commands.d.ts +65 -0
  209. package/dist/local/journey-commands.d.ts.map +1 -0
  210. package/dist/local/journey-commands.js +138 -0
  211. package/dist/local/journey-commands.js.map +1 -0
  212. package/dist/local/local-org-store.d.ts +46 -0
  213. package/dist/local/local-org-store.d.ts.map +1 -0
  214. package/dist/local/local-org-store.js +132 -0
  215. package/dist/local/local-org-store.js.map +1 -0
  216. package/dist/local/local-org.d.ts +389 -0
  217. package/dist/local/local-org.d.ts.map +1 -0
  218. package/dist/local/local-org.js +855 -0
  219. package/dist/local/local-org.js.map +1 -0
  220. package/dist/local/media-upload.d.ts +5 -0
  221. package/dist/local/media-upload.d.ts.map +1 -0
  222. package/dist/local/media-upload.js +41 -0
  223. package/dist/local/media-upload.js.map +1 -0
  224. package/dist/local/operation.d.ts +155 -0
  225. package/dist/local/operation.d.ts.map +1 -0
  226. package/dist/local/operation.js +340 -0
  227. package/dist/local/operation.js.map +1 -0
  228. package/dist/local/ownership-reader-schema.d.ts +117 -0
  229. package/dist/local/ownership-reader-schema.d.ts.map +1 -0
  230. package/dist/local/ownership-reader-schema.js +105 -0
  231. package/dist/local/ownership-reader-schema.js.map +1 -0
  232. package/dist/local/ownership-reader-worker.d.ts +2 -0
  233. package/dist/local/ownership-reader-worker.d.ts.map +1 -0
  234. package/dist/local/ownership-reader-worker.js +341 -0
  235. package/dist/local/ownership-reader-worker.js.map +1 -0
  236. package/dist/local/ownership-reader.d.ts +10 -0
  237. package/dist/local/ownership-reader.d.ts.map +1 -0
  238. package/dist/local/ownership-reader.js +93 -0
  239. package/dist/local/ownership-reader.js.map +1 -0
  240. package/dist/local/package-uses-check.d.ts +33 -0
  241. package/dist/local/package-uses-check.d.ts.map +1 -0
  242. package/dist/local/package-uses-check.js +62 -0
  243. package/dist/local/package-uses-check.js.map +1 -0
  244. package/dist/local/pending-recovery.d.ts +22 -0
  245. package/dist/local/pending-recovery.d.ts.map +1 -0
  246. package/dist/local/pending-recovery.js +171 -0
  247. package/dist/local/pending-recovery.js.map +1 -0
  248. package/dist/local/portable-commit-store.d.ts +28 -0
  249. package/dist/local/portable-commit-store.d.ts.map +1 -0
  250. package/dist/local/portable-commit-store.js +187 -0
  251. package/dist/local/portable-commit-store.js.map +1 -0
  252. package/dist/local/portable-commit.d.ts +109 -0
  253. package/dist/local/portable-commit.d.ts.map +1 -0
  254. package/dist/local/portable-commit.js +209 -0
  255. package/dist/local/portable-commit.js.map +1 -0
  256. package/dist/local/portable-remote.d.ts +432 -0
  257. package/dist/local/portable-remote.d.ts.map +1 -0
  258. package/dist/local/portable-remote.js +280 -0
  259. package/dist/local/portable-remote.js.map +1 -0
  260. package/dist/local/project-deleted.d.ts +4 -0
  261. package/dist/local/project-deleted.d.ts.map +1 -0
  262. package/dist/local/project-deleted.js +13 -0
  263. package/dist/local/project-deleted.js.map +1 -0
  264. package/dist/local/projection.d.ts +166 -0
  265. package/dist/local/projection.d.ts.map +1 -0
  266. package/dist/local/projection.js +709 -0
  267. package/dist/local/projection.js.map +1 -0
  268. package/dist/local/read-operation.d.ts +3 -0
  269. package/dist/local/read-operation.d.ts.map +1 -0
  270. package/dist/local/read-operation.js +19 -0
  271. package/dist/local/read-operation.js.map +1 -0
  272. package/dist/local/rebuild.d.ts +11 -0
  273. package/dist/local/rebuild.d.ts.map +1 -0
  274. package/dist/local/rebuild.js +42 -0
  275. package/dist/local/rebuild.js.map +1 -0
  276. package/dist/local/remote-base.d.ts +25 -0
  277. package/dist/local/remote-base.d.ts.map +1 -0
  278. package/dist/local/remote-base.js +68 -0
  279. package/dist/local/remote-base.js.map +1 -0
  280. package/dist/local/save-layout-worker.d.ts +19 -0
  281. package/dist/local/save-layout-worker.d.ts.map +1 -0
  282. package/dist/local/save-layout-worker.js +28 -0
  283. package/dist/local/save-layout-worker.js.map +1 -0
  284. package/dist/local/save-layout.d.ts +84 -0
  285. package/dist/local/save-layout.d.ts.map +1 -0
  286. package/dist/local/save-layout.js +221 -0
  287. package/dist/local/save-layout.js.map +1 -0
  288. package/dist/local/scope-impact.d.ts +31 -0
  289. package/dist/local/scope-impact.d.ts.map +1 -0
  290. package/dist/local/scope-impact.js +32 -0
  291. package/dist/local/scope-impact.js.map +1 -0
  292. package/dist/local/source-evidence/filesystem-worker.d.ts +2 -0
  293. package/dist/local/source-evidence/filesystem-worker.d.ts.map +1 -0
  294. package/dist/local/source-evidence/filesystem-worker.js +139 -0
  295. package/dist/local/source-evidence/filesystem-worker.js.map +1 -0
  296. package/dist/local/source-evidence/processes.d.ts +20 -0
  297. package/dist/local/source-evidence/processes.d.ts.map +1 -0
  298. package/dist/local/source-evidence/processes.js +133 -0
  299. package/dist/local/source-evidence/processes.js.map +1 -0
  300. package/dist/local/source-evidence/protocol.d.ts +52 -0
  301. package/dist/local/source-evidence/protocol.d.ts.map +1 -0
  302. package/dist/local/source-evidence/protocol.js +72 -0
  303. package/dist/local/source-evidence/protocol.js.map +1 -0
  304. package/dist/local/source-evidence/reader.d.ts +14 -0
  305. package/dist/local/source-evidence/reader.d.ts.map +1 -0
  306. package/dist/local/source-evidence/reader.js +308 -0
  307. package/dist/local/source-evidence/reader.js.map +1 -0
  308. package/dist/local/source-evidence/schema.d.ts +2504 -0
  309. package/dist/local/source-evidence/schema.d.ts.map +1 -0
  310. package/dist/local/source-evidence/schema.js +99 -0
  311. package/dist/local/source-evidence/schema.js.map +1 -0
  312. package/dist/local/source-policy/loader.d.ts +29 -0
  313. package/dist/local/source-policy/loader.d.ts.map +1 -0
  314. package/dist/local/source-policy/loader.js +209 -0
  315. package/dist/local/source-policy/loader.js.map +1 -0
  316. package/dist/local/source-policy/process.d.ts +7 -0
  317. package/dist/local/source-policy/process.d.ts.map +1 -0
  318. package/dist/local/source-policy/process.js +53 -0
  319. package/dist/local/source-policy/process.js.map +1 -0
  320. package/dist/local/source-policy/protocol.d.ts +27 -0
  321. package/dist/local/source-policy/protocol.d.ts.map +1 -0
  322. package/dist/local/source-policy/protocol.js +48 -0
  323. package/dist/local/source-policy/protocol.js.map +1 -0
  324. package/dist/local/source-policy/worker.d.ts +2 -0
  325. package/dist/local/source-policy/worker.d.ts.map +1 -0
  326. package/dist/local/source-policy/worker.js +100 -0
  327. package/dist/local/source-policy/worker.js.map +1 -0
  328. package/dist/local/state-directory.d.ts +17 -0
  329. package/dist/local/state-directory.d.ts.map +1 -0
  330. package/dist/local/state-directory.js +68 -0
  331. package/dist/local/state-directory.js.map +1 -0
  332. package/dist/local/store-database.d.ts +13 -0
  333. package/dist/local/store-database.d.ts.map +1 -0
  334. package/dist/local/store-database.js +187 -0
  335. package/dist/local/store-database.js.map +1 -0
  336. package/dist/local/store.d.ts +181 -0
  337. package/dist/local/store.d.ts.map +1 -0
  338. package/dist/local/store.js +585 -0
  339. package/dist/local/store.js.map +1 -0
  340. package/dist/local/sync.d.ts +47 -0
  341. package/dist/local/sync.d.ts.map +1 -0
  342. package/dist/local/sync.js +518 -0
  343. package/dist/local/sync.js.map +1 -0
  344. package/dist/local/task-context-inspection.d.ts +23 -0
  345. package/dist/local/task-context-inspection.d.ts.map +1 -0
  346. package/dist/local/task-context-inspection.js +165 -0
  347. package/dist/local/task-context-inspection.js.map +1 -0
  348. package/dist/local/task-context-observations.d.ts +9553 -0
  349. package/dist/local/task-context-observations.d.ts.map +1 -0
  350. package/dist/local/task-context-observations.js +232 -0
  351. package/dist/local/task-context-observations.js.map +1 -0
  352. package/dist/local/task-context-provider.d.ts +18 -0
  353. package/dist/local/task-context-provider.d.ts.map +1 -0
  354. package/dist/local/task-context-provider.js +231 -0
  355. package/dist/local/task-context-provider.js.map +1 -0
  356. package/dist/local/task-context-schema.d.ts +847 -0
  357. package/dist/local/task-context-schema.d.ts.map +1 -0
  358. package/dist/local/task-context-schema.js +305 -0
  359. package/dist/local/task-context-schema.js.map +1 -0
  360. package/dist/local/task-context-source.d.ts +16 -0
  361. package/dist/local/task-context-source.d.ts.map +1 -0
  362. package/dist/local/task-context-source.js +45 -0
  363. package/dist/local/task-context-source.js.map +1 -0
  364. package/dist/local/task-context.d.ts +14 -0
  365. package/dist/local/task-context.d.ts.map +1 -0
  366. package/dist/local/task-context.js +570 -0
  367. package/dist/local/task-context.js.map +1 -0
  368. package/dist/local/test-commands.d.ts +71 -0
  369. package/dist/local/test-commands.d.ts.map +1 -0
  370. package/dist/local/test-commands.js +292 -0
  371. package/dist/local/test-commands.js.map +1 -0
  372. package/dist/local/tree-save.d.ts +117 -0
  373. package/dist/local/tree-save.d.ts.map +1 -0
  374. package/dist/local/tree-save.js +615 -0
  375. package/dist/local/tree-save.js.map +1 -0
  376. package/dist/local/variants.d.ts +125 -0
  377. package/dist/local/variants.d.ts.map +1 -0
  378. package/dist/local/variants.js +267 -0
  379. package/dist/local/variants.js.map +1 -0
  380. package/dist/local/workspace-admission.d.ts +61 -0
  381. package/dist/local/workspace-admission.d.ts.map +1 -0
  382. package/dist/local/workspace-admission.js +112 -0
  383. package/dist/local/workspace-admission.js.map +1 -0
  384. package/dist/local/workspace-authority-guard.d.ts +18 -0
  385. package/dist/local/workspace-authority-guard.d.ts.map +1 -0
  386. package/dist/local/workspace-authority-guard.js +69 -0
  387. package/dist/local/workspace-authority-guard.js.map +1 -0
  388. package/dist/local/workspace-authority.d.ts +33 -0
  389. package/dist/local/workspace-authority.d.ts.map +1 -0
  390. package/dist/local/workspace-authority.js +33 -0
  391. package/dist/local/workspace-authority.js.map +1 -0
  392. package/dist/local/workspace-branch-runtime.d.ts +61 -0
  393. package/dist/local/workspace-branch-runtime.d.ts.map +1 -0
  394. package/dist/local/workspace-branch-runtime.js +216 -0
  395. package/dist/local/workspace-branch-runtime.js.map +1 -0
  396. package/dist/local/workspace-built-content.d.ts +137 -0
  397. package/dist/local/workspace-built-content.d.ts.map +1 -0
  398. package/dist/local/workspace-built-content.js +393 -0
  399. package/dist/local/workspace-built-content.js.map +1 -0
  400. package/dist/local/workspace-claim-status-read.d.ts +53 -0
  401. package/dist/local/workspace-claim-status-read.d.ts.map +1 -0
  402. package/dist/local/workspace-claim-status-read.js +118 -0
  403. package/dist/local/workspace-claim-status-read.js.map +1 -0
  404. package/dist/local/workspace-claim-status.d.ts +172 -0
  405. package/dist/local/workspace-claim-status.d.ts.map +1 -0
  406. package/dist/local/workspace-claim-status.js +721 -0
  407. package/dist/local/workspace-claim-status.js.map +1 -0
  408. package/dist/local/workspace-claim-views.d.ts +45 -0
  409. package/dist/local/workspace-claim-views.d.ts.map +1 -0
  410. package/dist/local/workspace-claim-views.js +45 -0
  411. package/dist/local/workspace-claim-views.js.map +1 -0
  412. package/dist/local/workspace-cli.d.ts +46 -0
  413. package/dist/local/workspace-cli.d.ts.map +1 -0
  414. package/dist/local/workspace-cli.js +1524 -0
  415. package/dist/local/workspace-cli.js.map +1 -0
  416. package/dist/local/workspace-commit-resolver.d.ts +19 -0
  417. package/dist/local/workspace-commit-resolver.d.ts.map +1 -0
  418. package/dist/local/workspace-commit-resolver.js +47 -0
  419. package/dist/local/workspace-commit-resolver.js.map +1 -0
  420. package/dist/local/workspace-decision-store.d.ts +184 -0
  421. package/dist/local/workspace-decision-store.d.ts.map +1 -0
  422. package/dist/local/workspace-decision-store.js +510 -0
  423. package/dist/local/workspace-decision-store.js.map +1 -0
  424. package/dist/local/workspace-environment-runtime.d.ts +107 -0
  425. package/dist/local/workspace-environment-runtime.d.ts.map +1 -0
  426. package/dist/local/workspace-environment-runtime.js +135 -0
  427. package/dist/local/workspace-environment-runtime.js.map +1 -0
  428. package/dist/local/workspace-evidence-drop.d.ts +21 -0
  429. package/dist/local/workspace-evidence-drop.d.ts.map +1 -0
  430. package/dist/local/workspace-evidence-drop.js +58 -0
  431. package/dist/local/workspace-evidence-drop.js.map +1 -0
  432. package/dist/local/workspace-evidence-sign-tool.d.ts +20 -0
  433. package/dist/local/workspace-evidence-sign-tool.d.ts.map +1 -0
  434. package/dist/local/workspace-evidence-sign-tool.js +85 -0
  435. package/dist/local/workspace-evidence-sign-tool.js.map +1 -0
  436. package/dist/local/workspace-evidence-status.d.ts +89 -0
  437. package/dist/local/workspace-evidence-status.d.ts.map +1 -0
  438. package/dist/local/workspace-evidence-status.js +141 -0
  439. package/dist/local/workspace-evidence-status.js.map +1 -0
  440. package/dist/local/workspace-evidence.d.ts +145 -0
  441. package/dist/local/workspace-evidence.d.ts.map +1 -0
  442. package/dist/local/workspace-evidence.js +347 -0
  443. package/dist/local/workspace-evidence.js.map +1 -0
  444. package/dist/local/workspace-graph-store.d.ts +32 -0
  445. package/dist/local/workspace-graph-store.d.ts.map +1 -0
  446. package/dist/local/workspace-graph-store.js +249 -0
  447. package/dist/local/workspace-graph-store.js.map +1 -0
  448. package/dist/local/workspace-handoff.d.ts +32 -0
  449. package/dist/local/workspace-handoff.d.ts.map +1 -0
  450. package/dist/local/workspace-handoff.js +144 -0
  451. package/dist/local/workspace-handoff.js.map +1 -0
  452. package/dist/local/workspace-history-journal.d.ts +70 -0
  453. package/dist/local/workspace-history-journal.d.ts.map +1 -0
  454. package/dist/local/workspace-history-journal.js +131 -0
  455. package/dist/local/workspace-history-journal.js.map +1 -0
  456. package/dist/local/workspace-history-store.d.ts +98 -0
  457. package/dist/local/workspace-history-store.d.ts.map +1 -0
  458. package/dist/local/workspace-history-store.js +632 -0
  459. package/dist/local/workspace-history-store.js.map +1 -0
  460. package/dist/local/workspace-history-types.d.ts +307 -0
  461. package/dist/local/workspace-history-types.d.ts.map +1 -0
  462. package/dist/local/workspace-history-types.js +2 -0
  463. package/dist/local/workspace-history-types.js.map +1 -0
  464. package/dist/local/workspace-integration-runtime.d.ts +48 -0
  465. package/dist/local/workspace-integration-runtime.d.ts.map +1 -0
  466. package/dist/local/workspace-integration-runtime.js +419 -0
  467. package/dist/local/workspace-integration-runtime.js.map +1 -0
  468. package/dist/local/workspace-lock.d.ts +7 -0
  469. package/dist/local/workspace-lock.d.ts.map +1 -0
  470. package/dist/local/workspace-lock.js +211 -0
  471. package/dist/local/workspace-lock.js.map +1 -0
  472. package/dist/local/workspace-merge.d.ts +77 -0
  473. package/dist/local/workspace-merge.d.ts.map +1 -0
  474. package/dist/local/workspace-merge.js +703 -0
  475. package/dist/local/workspace-merge.js.map +1 -0
  476. package/dist/local/workspace-mixed-history.d.ts +33 -0
  477. package/dist/local/workspace-mixed-history.d.ts.map +1 -0
  478. package/dist/local/workspace-mixed-history.js +107 -0
  479. package/dist/local/workspace-mixed-history.js.map +1 -0
  480. package/dist/local/workspace-overlap-allocation.d.ts +33 -0
  481. package/dist/local/workspace-overlap-allocation.d.ts.map +1 -0
  482. package/dist/local/workspace-overlap-allocation.js +69 -0
  483. package/dist/local/workspace-overlap-allocation.js.map +1 -0
  484. package/dist/local/workspace-overlap-impact.d.ts +46 -0
  485. package/dist/local/workspace-overlap-impact.d.ts.map +1 -0
  486. package/dist/local/workspace-overlap-impact.js +162 -0
  487. package/dist/local/workspace-overlap-impact.js.map +1 -0
  488. package/dist/local/workspace-overlap.d.ts +109 -0
  489. package/dist/local/workspace-overlap.d.ts.map +1 -0
  490. package/dist/local/workspace-overlap.js +327 -0
  491. package/dist/local/workspace-overlap.js.map +1 -0
  492. package/dist/local/workspace-paths.d.ts +4 -0
  493. package/dist/local/workspace-paths.d.ts.map +1 -0
  494. package/dist/local/workspace-paths.js +8 -0
  495. package/dist/local/workspace-paths.js.map +1 -0
  496. package/dist/local/workspace-pick-runtime.d.ts +70 -0
  497. package/dist/local/workspace-pick-runtime.d.ts.map +1 -0
  498. package/dist/local/workspace-pick-runtime.js +177 -0
  499. package/dist/local/workspace-pick-runtime.js.map +1 -0
  500. package/dist/local/workspace-pick-store.d.ts +33 -0
  501. package/dist/local/workspace-pick-store.d.ts.map +1 -0
  502. package/dist/local/workspace-pick-store.js +43 -0
  503. package/dist/local/workspace-pick-store.js.map +1 -0
  504. package/dist/local/workspace-pick.d.ts +73 -0
  505. package/dist/local/workspace-pick.d.ts.map +1 -0
  506. package/dist/local/workspace-pick.js +253 -0
  507. package/dist/local/workspace-pick.js.map +1 -0
  508. package/dist/local/workspace-portable-authoring.d.ts +43 -0
  509. package/dist/local/workspace-portable-authoring.d.ts.map +1 -0
  510. package/dist/local/workspace-portable-authoring.js +128 -0
  511. package/dist/local/workspace-portable-authoring.js.map +1 -0
  512. package/dist/local/workspace-prune.d.ts +63 -0
  513. package/dist/local/workspace-prune.d.ts.map +1 -0
  514. package/dist/local/workspace-prune.js +267 -0
  515. package/dist/local/workspace-prune.js.map +1 -0
  516. package/dist/local/workspace-remote-fetch.d.ts +82 -0
  517. package/dist/local/workspace-remote-fetch.d.ts.map +1 -0
  518. package/dist/local/workspace-remote-fetch.js +409 -0
  519. package/dist/local/workspace-remote-fetch.js.map +1 -0
  520. package/dist/local/workspace-remote-provider.d.ts +97 -0
  521. package/dist/local/workspace-remote-provider.d.ts.map +1 -0
  522. package/dist/local/workspace-remote-provider.js +400 -0
  523. package/dist/local/workspace-remote-provider.js.map +1 -0
  524. package/dist/local/workspace-remote-pull-request-journal.d.ts +49 -0
  525. package/dist/local/workspace-remote-pull-request-journal.d.ts.map +1 -0
  526. package/dist/local/workspace-remote-pull-request-journal.js +63 -0
  527. package/dist/local/workspace-remote-pull-request-journal.js.map +1 -0
  528. package/dist/local/workspace-remote-pull-request.d.ts +36 -0
  529. package/dist/local/workspace-remote-pull-request.d.ts.map +1 -0
  530. package/dist/local/workspace-remote-pull-request.js +158 -0
  531. package/dist/local/workspace-remote-pull-request.js.map +1 -0
  532. package/dist/local/workspace-remote-push.d.ts +88 -0
  533. package/dist/local/workspace-remote-push.d.ts.map +1 -0
  534. package/dist/local/workspace-remote-push.js +297 -0
  535. package/dist/local/workspace-remote-push.js.map +1 -0
  536. package/dist/local/workspace-remote-topic-journal.d.ts +56 -0
  537. package/dist/local/workspace-remote-topic-journal.d.ts.map +1 -0
  538. package/dist/local/workspace-remote-topic-journal.js +121 -0
  539. package/dist/local/workspace-remote-topic-journal.js.map +1 -0
  540. package/dist/local/workspace-remote-topic.d.ts +45 -0
  541. package/dist/local/workspace-remote-topic.d.ts.map +1 -0
  542. package/dist/local/workspace-remote-topic.js +204 -0
  543. package/dist/local/workspace-remote-topic.js.map +1 -0
  544. package/dist/local/workspace-remote-transfer.d.ts +76 -0
  545. package/dist/local/workspace-remote-transfer.d.ts.map +1 -0
  546. package/dist/local/workspace-remote-transfer.js +270 -0
  547. package/dist/local/workspace-remote-transfer.js.map +1 -0
  548. package/dist/local/workspace-resolution.d.ts +145 -0
  549. package/dist/local/workspace-resolution.d.ts.map +1 -0
  550. package/dist/local/workspace-resolution.js +479 -0
  551. package/dist/local/workspace-resolution.js.map +1 -0
  552. package/dist/local/workspace-resolver-provider.d.ts +72 -0
  553. package/dist/local/workspace-resolver-provider.d.ts.map +1 -0
  554. package/dist/local/workspace-resolver-provider.js +312 -0
  555. package/dist/local/workspace-resolver-provider.js.map +1 -0
  556. package/dist/local/workspace-runtime-handoff.d.ts +52 -0
  557. package/dist/local/workspace-runtime-handoff.d.ts.map +1 -0
  558. package/dist/local/workspace-runtime-handoff.js +237 -0
  559. package/dist/local/workspace-runtime-handoff.js.map +1 -0
  560. package/dist/local/workspace-runtime-lease.d.ts +26 -0
  561. package/dist/local/workspace-runtime-lease.d.ts.map +1 -0
  562. package/dist/local/workspace-runtime-lease.js +123 -0
  563. package/dist/local/workspace-runtime-lease.js.map +1 -0
  564. package/dist/local/workspace-runtime.d.ts +690 -0
  565. package/dist/local/workspace-runtime.d.ts.map +1 -0
  566. package/dist/local/workspace-runtime.js +2124 -0
  567. package/dist/local/workspace-runtime.js.map +1 -0
  568. package/dist/local/workspace-scope.d.ts +70 -0
  569. package/dist/local/workspace-scope.d.ts.map +1 -0
  570. package/dist/local/workspace-scope.js +206 -0
  571. package/dist/local/workspace-scope.js.map +1 -0
  572. package/dist/local/workspace-sources.d.ts +159 -0
  573. package/dist/local/workspace-sources.d.ts.map +1 -0
  574. package/dist/local/workspace-sources.js +570 -0
  575. package/dist/local/workspace-sources.js.map +1 -0
  576. package/dist/local/workspace-store-database.d.ts +5 -0
  577. package/dist/local/workspace-store-database.d.ts.map +1 -0
  578. package/dist/local/workspace-store-database.js +726 -0
  579. package/dist/local/workspace-store-database.js.map +1 -0
  580. package/dist/local/workspace-store.d.ts +261 -0
  581. package/dist/local/workspace-store.d.ts.map +1 -0
  582. package/dist/local/workspace-store.js +831 -0
  583. package/dist/local/workspace-store.js.map +1 -0
  584. package/dist/local/workspace-topology-runtime.d.ts +27 -0
  585. package/dist/local/workspace-topology-runtime.d.ts.map +1 -0
  586. package/dist/local/workspace-topology-runtime.js +396 -0
  587. package/dist/local/workspace-topology-runtime.js.map +1 -0
  588. package/dist/local/workspace-topology.d.ts +140 -0
  589. package/dist/local/workspace-topology.d.ts.map +1 -0
  590. package/dist/local/workspace-topology.js +359 -0
  591. package/dist/local/workspace-topology.js.map +1 -0
  592. package/dist/local/workspace-upstream-inspection.d.ts +60 -0
  593. package/dist/local/workspace-upstream-inspection.d.ts.map +1 -0
  594. package/dist/local/workspace-upstream-inspection.js +189 -0
  595. package/dist/local/workspace-upstream-inspection.js.map +1 -0
  596. package/dist/local/workspace-upstream-runtime.d.ts +91 -0
  597. package/dist/local/workspace-upstream-runtime.d.ts.map +1 -0
  598. package/dist/local/workspace-upstream-runtime.js +270 -0
  599. package/dist/local/workspace-upstream-runtime.js.map +1 -0
  600. package/dist/local/workspace-upstream-store.d.ts +51 -0
  601. package/dist/local/workspace-upstream-store.d.ts.map +1 -0
  602. package/dist/local/workspace-upstream-store.js +475 -0
  603. package/dist/local/workspace-upstream-store.js.map +1 -0
  604. package/dist/local/workspace-viewer-server.d.ts +136 -0
  605. package/dist/local/workspace-viewer-server.d.ts.map +1 -0
  606. package/dist/local/workspace-viewer-server.js +1097 -0
  607. package/dist/local/workspace-viewer-server.js.map +1 -0
  608. package/dist/local/workspace-viewer-snapshot.d.ts +49 -0
  609. package/dist/local/workspace-viewer-snapshot.d.ts.map +1 -0
  610. package/dist/local/workspace-viewer-snapshot.js +91 -0
  611. package/dist/local/workspace-viewer-snapshot.js.map +1 -0
  612. package/dist/local/worktree-projection.d.ts +76 -0
  613. package/dist/local/worktree-projection.d.ts.map +1 -0
  614. package/dist/local/worktree-projection.js +470 -0
  615. package/dist/local/worktree-projection.js.map +1 -0
  616. package/dist/mcp/client-identity.d.ts +8 -0
  617. package/dist/mcp/client-identity.d.ts.map +1 -0
  618. package/dist/mcp/client-identity.js +33 -0
  619. package/dist/mcp/client-identity.js.map +1 -0
  620. package/dist/mcp/graph-to-code.d.ts +53 -0
  621. package/dist/mcp/graph-to-code.d.ts.map +1 -0
  622. package/dist/mcp/graph-to-code.js +1624 -0
  623. package/dist/mcp/graph-to-code.js.map +1 -0
  624. package/dist/mcp/index.d.ts +3 -0
  625. package/dist/mcp/index.d.ts.map +1 -0
  626. package/dist/mcp/index.js +3 -0
  627. package/dist/mcp/index.js.map +1 -0
  628. package/dist/mcp/stdio/graph-to-code.d.ts +3 -0
  629. package/dist/mcp/stdio/graph-to-code.d.ts.map +1 -0
  630. package/dist/mcp/stdio/graph-to-code.js +55 -0
  631. package/dist/mcp/stdio/graph-to-code.js.map +1 -0
  632. package/dist/mcp/stdio/worktree.d.ts +3 -0
  633. package/dist/mcp/stdio/worktree.d.ts.map +1 -0
  634. package/dist/mcp/stdio/worktree.js +67 -0
  635. package/dist/mcp/stdio/worktree.js.map +1 -0
  636. package/dist/mcp/worktree-claim-status.d.ts +162 -0
  637. package/dist/mcp/worktree-claim-status.d.ts.map +1 -0
  638. package/dist/mcp/worktree-claim-status.js +113 -0
  639. package/dist/mcp/worktree-claim-status.js.map +1 -0
  640. package/dist/mcp/worktree-dispatch.d.ts +13 -0
  641. package/dist/mcp/worktree-dispatch.d.ts.map +1 -0
  642. package/dist/mcp/worktree-dispatch.js +52 -0
  643. package/dist/mcp/worktree-dispatch.js.map +1 -0
  644. package/dist/mcp/worktree-errors.d.ts +15 -0
  645. package/dist/mcp/worktree-errors.d.ts.map +1 -0
  646. package/dist/mcp/worktree-errors.js +17 -0
  647. package/dist/mcp/worktree-errors.js.map +1 -0
  648. package/dist/mcp/worktree-health.d.ts +12 -0
  649. package/dist/mcp/worktree-health.d.ts.map +1 -0
  650. package/dist/mcp/worktree-health.js +32 -0
  651. package/dist/mcp/worktree-health.js.map +1 -0
  652. package/dist/mcp/worktree-results.d.ts +15 -0
  653. package/dist/mcp/worktree-results.d.ts.map +1 -0
  654. package/dist/mcp/worktree-results.js +12 -0
  655. package/dist/mcp/worktree-results.js.map +1 -0
  656. package/dist/mcp/worktree-task-context.d.ts +57 -0
  657. package/dist/mcp/worktree-task-context.d.ts.map +1 -0
  658. package/dist/mcp/worktree-task-context.js +45 -0
  659. package/dist/mcp/worktree-task-context.js.map +1 -0
  660. package/dist/mcp/worktree-tools.d.ts +2648 -0
  661. package/dist/mcp/worktree-tools.d.ts.map +1 -0
  662. package/dist/mcp/worktree-tools.js +192 -0
  663. package/dist/mcp/worktree-tools.js.map +1 -0
  664. package/dist/mcp/worktree.d.ts +33 -0
  665. package/dist/mcp/worktree.d.ts.map +1 -0
  666. package/dist/mcp/worktree.js +551 -0
  667. package/dist/mcp/worktree.js.map +1 -0
  668. package/dist/own-package.d.ts +13 -0
  669. package/dist/own-package.d.ts.map +1 -0
  670. package/dist/own-package.js +32 -0
  671. package/dist/own-package.js.map +1 -0
  672. package/dist/packages-browse.d.ts +107 -0
  673. package/dist/packages-browse.d.ts.map +1 -0
  674. package/dist/packages-browse.js +646 -0
  675. package/dist/packages-browse.js.map +1 -0
  676. package/dist/packages-cli.d.ts +8 -0
  677. package/dist/packages-cli.d.ts.map +1 -0
  678. package/dist/packages-cli.js +184 -0
  679. package/dist/packages-cli.js.map +1 -0
  680. package/dist/packages-uses.d.ts +46 -0
  681. package/dist/packages-uses.d.ts.map +1 -0
  682. package/dist/packages-uses.js +737 -0
  683. package/dist/packages-uses.js.map +1 -0
  684. package/dist/portable.d.ts +7 -0
  685. package/dist/portable.d.ts.map +1 -0
  686. package/dist/portable.js +14 -0
  687. package/dist/portable.js.map +1 -0
  688. package/dist/quiet-warnings.d.ts +3 -0
  689. package/dist/quiet-warnings.d.ts.map +1 -0
  690. package/dist/quiet-warnings.js +21 -0
  691. package/dist/quiet-warnings.js.map +1 -0
  692. package/dist/view-seam.d.ts +62 -0
  693. package/dist/view-seam.d.ts.map +1 -0
  694. package/dist/view-seam.js +70 -0
  695. package/dist/view-seam.js.map +1 -0
  696. package/generated/graph-packages/index.json +5 -0
  697. package/graph-packages.lock.json +4 -0
  698. package/package.json +81 -0
  699. package/viewer/assets/index-BZKGDARF.css +1 -0
  700. package/viewer/assets/index-DWu0CbZZ.js +272 -0
  701. package/viewer/index.html +13 -0
@@ -0,0 +1,77 @@
1
+ /**
2
+ * `sdlc allow-mcp`: which repositories the SoftwareDLC plugin may run their own install in
3
+ * (docs/specs/local-tooling-release-readiness.md, D6). The plugin's launcher
4
+ * (plugins/softwaredlc/scripts/start-worktree.mjs) runs a repository's own install, and loads its
5
+ * .env.local, only for a repository listed in the approvals file; it speaks MCP over standard
6
+ * input and cannot ask, so the user approves here. This command is the file's one writer; the
7
+ * engine's allow_mcp.py forwards to it, and allow-mcp-cases.json pins what both sides read.
8
+ */
9
+ export declare const ALLOW_MCP_USAGE: string;
10
+ export declare const APPROVALS_SCHEMA_VERSION = 1;
11
+ /**
12
+ * Set in an agent's environment by its provider (Claude Code also sets CLAUDECODE). The engine's
13
+ * allow_mcp.AGENT_VARIABLES is the same list, and allow-mcp-cases.json pins both.
14
+ */
15
+ export declare const AGENT_VARIABLES: readonly ["SDLC_AGENT_THREAD", "CLAUDE_CODE_SESSION_ID", "CLAUDECODE", "CODEX_THREAD_ID"];
16
+ export declare const PATH_TRUST = "The approval trusts this path: at every agent session start the plugin runs whatever this folder's own install and .env.local hold, after pulls and installs too, until you revoke it (sdlc allow-mcp --revoke).";
17
+ export type ApprovalsDocument = {
18
+ schema_version: number;
19
+ repositories: unknown[];
20
+ [field: string]: unknown;
21
+ };
22
+ /** What the person typed after `question`, or null when there is no one to ask. */
23
+ export type Confirm = (question: string) => Promise<string | null>;
24
+ export type AllowMcpContext = {
25
+ env?: NodeJS.ProcessEnv;
26
+ cwd?: string;
27
+ stdout?: {
28
+ write(text: string): unknown;
29
+ };
30
+ stdinIsTTY?: boolean;
31
+ now?: () => Date;
32
+ /** The specs' way to answer; the command itself always asks at the controlling terminal. */
33
+ confirm?: Confirm;
34
+ };
35
+ export declare function approvalsPath(env?: NodeJS.ProcessEnv): string;
36
+ export declare function agentSession(env?: NodeJS.ProcessEnv): boolean;
37
+ /**
38
+ * The real path that names the repository at `start`, or null when no approval can name it, read
39
+ * with the caller's GIT_* variables removed, as the launcher reads it. Only these layouts git itself
40
+ * writes have a key, and anything else fails closed (eval-20261104212736-ef4d876004b8,
41
+ * eval-20261104215917-9da3782ad131):
42
+ * - a checkout whose own .git (a directory, or a file whose gitdir: line names it) is both its git
43
+ * directory and the common directory: its top level;
44
+ * - a linked worktree whose .git is a file naming <common>/worktrees/<id>, whose gitdir file
45
+ * names that .git back: its primary checkout, the parent of a .git common directory, or, for a
46
+ * bare repository (core.bare in its own config), the bare directory. A submodule's or a separate
47
+ * git directory's worktrees have no key.
48
+ * A .git that is a symlink, a commondir or core.worktree pointing elsewhere, or a .git file naming
49
+ * another repository's worktree entry names nothing. The engine's allow_mcp.repository_key and the
50
+ * launcher hold the same rule, and allow-mcp-cases.json pins it.
51
+ */
52
+ export declare function repositoryKey(start: string, env?: NodeJS.ProcessEnv): Promise<string | null>;
53
+ /**
54
+ * Ask on the controlling terminal, never stdin or stdout (stdout stays one JSON object), so only
55
+ * the person at that terminal answers. Null when the process has none.
56
+ */
57
+ export declare function askAtTerminal(question: string): Promise<string | null>;
58
+ /** The approvals document; a missing file is empty, an unreadable one is refused. */
59
+ export declare function readApprovals(file: string): Promise<ApprovalsDocument>;
60
+ export declare function isApproved(doc: ApprovalsDocument, key: string): boolean;
61
+ /**
62
+ * Approve (or revoke) the repository at `start`: its key and whether the file changed. A new
63
+ * approval first asks `confirm` for the folder's name, and is refused (Refused) unless the answer
64
+ * is that name. Throws outside Git or for an unreadable approvals file, which it never overwrites.
65
+ */
66
+ export declare function setApproved(start: string, approve: boolean, file: string, options: {
67
+ confirm: Confirm;
68
+ env?: NodeJS.ProcessEnv;
69
+ now?: () => Date;
70
+ cwd?: string;
71
+ }): Promise<{
72
+ key: string;
73
+ changed: boolean;
74
+ }>;
75
+ /** `sdlc allow-mcp ...`: the exit code, with one JSON object on stdout. */
76
+ export declare function runAllowMcpCommand(args: string[], context?: AllowMcpContext): Promise<number>;
77
+ //# sourceMappingURL=allow-mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allow-mcp.d.ts","sourceRoot":"","sources":["../../src/local/allow-mcp.ts"],"names":[],"mappings":"AAiBA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,QAGoK,CAAC;AAEjM,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,eAAe,2FAKlB,CAAC;AASX,eAAO,MAAM,UAAU,qNAC6L,CAAC;AAErN,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAEnE,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EA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 @@
1
+ import { execFile } from 'node:child_process';
2
+ import { randomBytes } from 'node:crypto';
3
+ import { closeSync, openSync } from 'node:fs';
4
+ import { lstat, mkdir, open, readFile, realpath, rename, rm } from 'node:fs/promises';
5
+ import { homedir } from 'node:os';
6
+ import path from 'node:path';
7
+ import { createInterface } from 'node:readline';
8
+ import { ReadStream, WriteStream } from 'node:tty';
9
+ /**
10
+ * `sdlc allow-mcp`: which repositories the SoftwareDLC plugin may run their own install in
11
+ * (docs/specs/local-tooling-release-readiness.md, D6). The plugin's launcher
12
+ * (plugins/softwaredlc/scripts/start-worktree.mjs) runs a repository's own install, and loads its
13
+ * .env.local, only for a repository listed in the approvals file; it speaks MCP over standard
14
+ * input and cannot ask, so the user approves here. This command is the file's one writer; the
15
+ * engine's allow_mcp.py forwards to it, and allow-mcp-cases.json pins what both sides read.
16
+ */
17
+ export const ALLOW_MCP_USAGE = 'Usage: sdlc allow-mcp [--repo <path>] | allow-mcp --revoke [--repo <path>] | allow-mcp --list\n' +
18
+ "Approves the repository at <path> (default: here) for the SoftwareDLC plugin to run its own install and .env.local, takes the approval back, or lists the approved repositories. The approval is kept in the user's configuration folder ($XDG_CONFIG_HOME, else ~/.config, then softwaredlc/mcp-approvals.json), never in a repository. A repository is its primary checkout, so its linked worktrees share one approval, and a moved repository is asked again. The approval trusts the path: the plugin runs whatever that folder's install and .env.local hold at each session start, after pulls and installs too, until it is revoked. Approving is the user's consent to run the repository's code, so it asks the person to type the folder's name at the controlling terminal, and is refused inside an agent's session unless stdin is a terminal. " +
19
+ "Prints one JSON object on stdout. Exit 0: done; 1: refused or failed, with the reason under error; 3: approval refused in an agent session, without the person's terminal, or not confirmed.";
20
+ export const APPROVALS_SCHEMA_VERSION = 1;
21
+ /**
22
+ * Set in an agent's environment by its provider (Claude Code also sets CLAUDECODE). The engine's
23
+ * allow_mcp.AGENT_VARIABLES is the same list, and allow-mcp-cases.json pins both.
24
+ */
25
+ export const AGENT_VARIABLES = [
26
+ 'SDLC_AGENT_THREAD',
27
+ 'CLAUDE_CODE_SESSION_ID',
28
+ 'CLAUDECODE',
29
+ 'CODEX_THREAD_ID'
30
+ ];
31
+ const AGENT_REFUSAL = "approving a repository is the user's decision: run allow-mcp in your own terminal, not from an agent session";
32
+ const NO_TERMINAL = 'approving a repository needs the person at its terminal: run sdlc allow-mcp in your own terminal and type the folder name when it asks';
33
+ const NOT_CONFIRMED = 'not approved: the folder name was not typed';
34
+ const THEN = 'Restart the agent session so the plugin starts the server again.';
35
+ export const PATH_TRUST = "The approval trusts this path: at every agent session start the plugin runs whatever this folder's own install and .env.local hold, after pulls and installs too, until you revoke it (sdlc allow-mcp --revoke).";
36
+ /** A refusal that is the person's to lift (exit 3), not a failure. */
37
+ class Refused extends Error {
38
+ }
39
+ export function approvalsPath(env = process.env) {
40
+ const configured = env.XDG_CONFIG_HOME;
41
+ const base = configured && path.isAbsolute(configured)
42
+ ? configured
43
+ : path.join(homedir(), '.config');
44
+ return path.join(base, 'softwaredlc', 'mcp-approvals.json');
45
+ }
46
+ export function agentSession(env = process.env) {
47
+ return AGENT_VARIABLES.some((name) => Boolean(env[name]));
48
+ }
49
+ async function real(at) {
50
+ try {
51
+ return await realpath(at);
52
+ }
53
+ catch {
54
+ return path.resolve(at);
55
+ }
56
+ }
57
+ /** The real path a `.git` file's `gitdir:` line names, relative to the folder holding it, or null. */
58
+ async function gitfileTarget(dotgit) {
59
+ let text;
60
+ try {
61
+ text = await readFile(dotgit, 'utf8');
62
+ }
63
+ catch {
64
+ return null;
65
+ }
66
+ const match = /^gitdir: (.+)$/m.exec(text);
67
+ return match ? real(path.resolve(path.dirname(dotgit), match[1].trim())) : null;
68
+ }
69
+ /**
70
+ * The real path that names the repository at `start`, or null when no approval can name it, read
71
+ * with the caller's GIT_* variables removed, as the launcher reads it. Only these layouts git itself
72
+ * writes have a key, and anything else fails closed (eval-20261104212736-ef4d876004b8,
73
+ * eval-20261104215917-9da3782ad131):
74
+ * - a checkout whose own .git (a directory, or a file whose gitdir: line names it) is both its git
75
+ * directory and the common directory: its top level;
76
+ * - a linked worktree whose .git is a file naming <common>/worktrees/<id>, whose gitdir file
77
+ * names that .git back: its primary checkout, the parent of a .git common directory, or, for a
78
+ * bare repository (core.bare in its own config), the bare directory. A submodule's or a separate
79
+ * git directory's worktrees have no key.
80
+ * A .git that is a symlink, a commondir or core.worktree pointing elsewhere, or a .git file naming
81
+ * another repository's worktree entry names nothing. The engine's allow_mcp.repository_key and the
82
+ * launcher hold the same rule, and allow-mcp-cases.json pins it.
83
+ */
84
+ export async function repositoryKey(start, env = process.env) {
85
+ // A copy rather than Object.fromEntries keeps the ProcessEnv type the Next build augments.
86
+ const clean = { ...env };
87
+ for (const name of Object.keys(clean)) {
88
+ if (name.startsWith('GIT_'))
89
+ delete clean[name];
90
+ }
91
+ const lines = await new Promise((resolve) => {
92
+ execFile('git', [
93
+ 'rev-parse',
94
+ '--path-format=absolute',
95
+ '--show-toplevel',
96
+ '--git-dir',
97
+ '--git-common-dir'
98
+ ], { cwd: start, env: clean, timeout: 5000 }, (error, stdout) => resolve(error ? null : String(stdout).trim().split('\n')));
99
+ });
100
+ if (lines === null || lines.length !== 3 || lines.some((line) => !line))
101
+ return null;
102
+ const [top, gitDir, common] = await Promise.all(lines.map(real));
103
+ // The folder's own .git, never followed through a symlink.
104
+ const dotgit = path.join(top, '.git');
105
+ let kind;
106
+ try {
107
+ const found = await lstat(dotgit);
108
+ if (found.isDirectory())
109
+ kind = 'directory';
110
+ else if (found.isFile())
111
+ kind = 'file';
112
+ else
113
+ return null;
114
+ }
115
+ catch {
116
+ return null;
117
+ }
118
+ const own = kind === 'directory' ? dotgit : await gitfileTarget(dotgit);
119
+ if (own !== gitDir)
120
+ return null;
121
+ if (gitDir === common)
122
+ return top;
123
+ if (kind !== 'file' || path.dirname(gitDir) !== path.join(common, 'worktrees'))
124
+ return null;
125
+ let repository;
126
+ if (path.basename(common) === '.git')
127
+ repository = path.dirname(common);
128
+ else if (await isBare(common, clean))
129
+ repository = common;
130
+ else
131
+ return null;
132
+ let named;
133
+ try {
134
+ named = (await readFile(path.join(gitDir, 'gitdir'), 'utf8')).trim();
135
+ }
136
+ catch {
137
+ return null;
138
+ }
139
+ if (!named)
140
+ return null;
141
+ // Its folders resolved, its final .git never followed.
142
+ const back = path.resolve(gitDir, named);
143
+ return path.join(await real(path.dirname(back)), path.basename(back)) ===
144
+ dotgit
145
+ ? repository
146
+ : null;
147
+ }
148
+ /**
149
+ * Whether the git directory's own config sets core.bare, so it has no primary checkout. Git never
150
+ * writes a .git inside a bare directory, so one holding a .git is a checkout's working tree posing
151
+ * as a bare repository through tracked files (eval-20261104224822-d212128ba466, F-5ABAA4D8E5A181C5).
152
+ */
153
+ async function isBare(common, env) {
154
+ try {
155
+ await lstat(path.join(common, '.git'));
156
+ return false;
157
+ }
158
+ catch {
159
+ // No .git: it may be bare.
160
+ }
161
+ return new Promise((resolve) => {
162
+ execFile('git', ['config', '--file', path.join(common, 'config'), '--type=bool', '--get', 'core.bare'], { env, timeout: 5000 }, (error, stdout) => resolve(!error && String(stdout).trim() === 'true'));
163
+ });
164
+ }
165
+ /**
166
+ * Ask on the controlling terminal, never stdin or stdout (stdout stays one JSON object), so only
167
+ * the person at that terminal answers. Null when the process has none.
168
+ */
169
+ export async function askAtTerminal(question) {
170
+ let input;
171
+ let output;
172
+ try {
173
+ input = openSync('/dev/tty', 'r');
174
+ output = openSync('/dev/tty', 'w');
175
+ }
176
+ catch {
177
+ for (const fd of [input, output])
178
+ if (fd !== undefined)
179
+ closeSync(fd);
180
+ return null;
181
+ }
182
+ const reader = new ReadStream(input);
183
+ const writer = new WriteStream(output);
184
+ // Not a readline terminal: the terminal's own line editing and echo stay on.
185
+ const lines = createInterface({ input: reader, terminal: false });
186
+ try {
187
+ return await new Promise((resolve) => {
188
+ lines.once('line', resolve);
189
+ lines.once('close', () => resolve(''));
190
+ writer.write(question);
191
+ });
192
+ }
193
+ finally {
194
+ lines.close();
195
+ reader.destroy();
196
+ writer.destroy();
197
+ }
198
+ }
199
+ /**
200
+ * A path as the terminal should show it: quoted, with control, line-separator and bidirectional
201
+ * characters escaped, so a folder name cannot redraw the question to show another path.
202
+ */
203
+ function shown(text) {
204
+ return JSON.stringify(text).replace(/[\u007f-\u009f\u061c\u200e\u200f\u2028-\u202e\u2066-\u2069]/g, (c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, '0')}`);
205
+ }
206
+ function confirmationQuestion(key) {
207
+ return (`Approve the SoftwareDLC plugin to run this repository's own install and .env.local?\n` +
208
+ `Repository: ${shown(key)}\n` +
209
+ `${PATH_TRUST}\n` +
210
+ `Type the folder name ${shown(path.basename(key))} (without the quotes) to approve, anything else to cancel: `);
211
+ }
212
+ /** The approvals document; a missing file is empty, an unreadable one is refused. */
213
+ export async function readApprovals(file) {
214
+ let text;
215
+ try {
216
+ text = await readFile(file, 'utf8');
217
+ }
218
+ catch (error) {
219
+ if (error.code === 'ENOENT')
220
+ return { schema_version: APPROVALS_SCHEMA_VERSION, repositories: [] };
221
+ throw error;
222
+ }
223
+ let doc;
224
+ try {
225
+ doc = JSON.parse(text);
226
+ }
227
+ catch {
228
+ doc = null;
229
+ }
230
+ if (typeof doc !== 'object' ||
231
+ doc === null ||
232
+ Array.isArray(doc) ||
233
+ doc.schema_version !== APPROVALS_SCHEMA_VERSION ||
234
+ !Array.isArray(doc.repositories))
235
+ throw new Error(`${file} is not a version ${APPROVALS_SCHEMA_VERSION} approvals file`);
236
+ return doc;
237
+ }
238
+ export function isApproved(doc, key) {
239
+ return doc.repositories.some((entry) => entryPath(entry) === key);
240
+ }
241
+ function entryPath(entry) {
242
+ return typeof entry === 'object' && entry !== null && !Array.isArray(entry)
243
+ ? entry.path
244
+ : undefined;
245
+ }
246
+ /** Keys sorted at every level, as the engine wrote the file (json.dump sort_keys). */
247
+ function sorted(value) {
248
+ if (Array.isArray(value))
249
+ return value.map(sorted);
250
+ if (typeof value !== 'object' || value === null)
251
+ return value;
252
+ return Object.fromEntries(Object.keys(value)
253
+ .sort()
254
+ .map((key) => [key, sorted(value[key])]));
255
+ }
256
+ /** Through a temporary file in the same folder, readable by the user alone, then a rename. */
257
+ async function writeApprovals(file, doc) {
258
+ await mkdir(path.dirname(file), { recursive: true });
259
+ const temporary = path.join(path.dirname(file), `.mcp-approvals.${randomBytes(6).toString('hex')}`);
260
+ const handle = await open(temporary, 'wx', 0o600);
261
+ try {
262
+ // ASCII only, as json.dump wrote it, so a reader decoding with another locale reads the same paths.
263
+ const text = JSON.stringify(sorted(doc), null, 2).replace(/[\u007f-￿]/g, (c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, '0')}`);
264
+ await handle.writeFile(`${text}\n`);
265
+ }
266
+ finally {
267
+ await handle.close();
268
+ }
269
+ try {
270
+ await rename(temporary, file);
271
+ }
272
+ catch (error) {
273
+ await rm(temporary, { force: true });
274
+ throw error;
275
+ }
276
+ }
277
+ function secondsTimestamp(at) {
278
+ return at.toISOString().replace(/\.\d{3}Z$/, 'Z');
279
+ }
280
+ /**
281
+ * Approve (or revoke) the repository at `start`: its key and whether the file changed. A new
282
+ * approval first asks `confirm` for the folder's name, and is refused (Refused) unless the answer
283
+ * is that name. Throws outside Git or for an unreadable approvals file, which it never overwrites.
284
+ */
285
+ export async function setApproved(start, approve, file, options) {
286
+ // An empty --repo (an unset variable, say) names no repository, not the current one.
287
+ if (!start)
288
+ throw new Error(`${start} is not inside a Git repository`);
289
+ const key = await repositoryKey(path.resolve(options.cwd ?? process.cwd(), start), options.env);
290
+ if (key === null)
291
+ throw new Error(`${start} is not inside a Git repository, or not one an approval can name: a checkout whose own .git is its Git directory, or a linked worktree its repository's worktrees entry names back (a primary checkout's .git, or a bare repository)`);
292
+ let doc = await readApprovals(file);
293
+ let was = isApproved(doc, key);
294
+ if (approve && !was) {
295
+ const answer = await options.confirm(confirmationQuestion(key));
296
+ if (answer === null)
297
+ throw new Refused(NO_TERMINAL);
298
+ const name = path.basename(key);
299
+ if (!name || answer.trim() !== name)
300
+ throw new Refused(NOT_CONFIRMED);
301
+ // Read again: the person may take minutes, and another run may have changed the file meanwhile.
302
+ doc = await readApprovals(file);
303
+ was = isApproved(doc, key);
304
+ }
305
+ if (approve && !was) {
306
+ doc.repositories.push({
307
+ path: key,
308
+ approved_at: secondsTimestamp((options.now ?? (() => new Date()))())
309
+ });
310
+ }
311
+ else if (!approve && was)
312
+ doc.repositories = doc.repositories.filter((entry) => entryPath(entry) !== key);
313
+ if (was !== approve)
314
+ await writeApprovals(file, doc);
315
+ return { key, changed: was !== approve };
316
+ }
317
+ function parseArguments(args) {
318
+ const parsed = { repo: '.', revoke: false, list: false };
319
+ for (let index = 0; index < args.length; index += 1) {
320
+ const arg = args[index];
321
+ if (arg === '--revoke')
322
+ parsed.revoke = true;
323
+ else if (arg === '--list')
324
+ parsed.list = true;
325
+ else if (arg === '--repo' && index + 1 < args.length)
326
+ parsed.repo = args[++index];
327
+ else if (arg.startsWith('--repo='))
328
+ parsed.repo = arg.slice(7);
329
+ else
330
+ return `unexpected argument ${arg}\n${ALLOW_MCP_USAGE}`;
331
+ }
332
+ if (parsed.revoke && parsed.list)
333
+ return `--revoke and --list cannot be combined\n${ALLOW_MCP_USAGE}`;
334
+ return parsed;
335
+ }
336
+ /** `sdlc allow-mcp ...`: the exit code, with one JSON object on stdout. */
337
+ export async function runAllowMcpCommand(args, context = {}) {
338
+ const stdout = context.stdout ?? process.stdout;
339
+ const env = context.env ?? process.env;
340
+ const print = (value) => stdout.write(`${JSON.stringify(value)}\n`);
341
+ const parsed = parseArguments(args);
342
+ if (typeof parsed === 'string') {
343
+ print({ ok: false, error: parsed });
344
+ return 1;
345
+ }
346
+ const file = approvalsPath(env);
347
+ let doc;
348
+ try {
349
+ doc = await readApprovals(file);
350
+ }
351
+ catch (error) {
352
+ print({ ok: false, error: messageOf(error) });
353
+ return 1;
354
+ }
355
+ if (parsed.list) {
356
+ print({
357
+ ok: true,
358
+ file,
359
+ repositories: doc.repositories.map((entry) => entryPath(entry) ?? null)
360
+ });
361
+ return 0;
362
+ }
363
+ const stdinIsTTY = context.stdinIsTTY ?? Boolean(process.stdin.isTTY);
364
+ if (!parsed.revoke && agentSession(env) && !stdinIsTTY) {
365
+ print({ ok: false, error: AGENT_REFUSAL });
366
+ return 3;
367
+ }
368
+ try {
369
+ const { key, changed } = await setApproved(parsed.repo, !parsed.revoke, file, {
370
+ confirm: context.confirm ?? askAtTerminal,
371
+ env,
372
+ now: context.now,
373
+ cwd: context.cwd
374
+ });
375
+ print({
376
+ ok: true,
377
+ repository: key,
378
+ approved: !parsed.revoke,
379
+ changed,
380
+ file,
381
+ ...(parsed.revoke ? {} : { trusts: PATH_TRUST }),
382
+ then: THEN
383
+ });
384
+ return 0;
385
+ }
386
+ catch (error) {
387
+ print({ ok: false, error: messageOf(error) });
388
+ return error instanceof Refused ? 3 : 1;
389
+ }
390
+ }
391
+ function messageOf(error) {
392
+ return error instanceof Error ? error.message : String(error);
393
+ }
394
+ //# sourceMappingURL=allow-mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allow-mcp.js","sourceRoot":"","sources":["../../src/local/allow-mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,EAAE,EACH,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,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KAAK,CAAC,EAAE,CAAC,CAAC;QAC9C,OAAO,KAAK,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { type ApiVersionRefusal, type SdlcClientIdentity } from '@software-dlc/graph/client/api-version';
2
+ import { ProjectDeletedError } from './project-deleted.js';
3
+ export { ProjectDeletedError };
4
+ export declare const SDLC_CLI_CLIENT: SdlcClientIdentity;
5
+ export declare function sdlcCliHeaders(): Record<string, string>;
6
+ export declare function apiVersionRefusalOf(response: Response): Promise<ApiVersionRefusal | null>;
7
+ export declare function throwIfApiVersionRefused(response: Response, client?: SdlcClientIdentity): Promise<void>;
8
+ export declare const PROTECTION_BYPASS_VARIABLE = "SDLC_PROTECTION_BYPASS";
9
+ export declare const PROTECTION_BYPASS_HEADER = "x-vercel-protection-bypass";
10
+ export declare function sdlcPlatformFetch(input?: {
11
+ client?: SdlcClientIdentity;
12
+ fetch_impl?: typeof fetch;
13
+ environment?: Readonly<Record<string, string | undefined>>;
14
+ }): typeof fetch;
15
+ //# sourceMappingURL=api-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/local/api-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAgB/B,eAAO,MAAM,eAAe,EAAE,kBAG7B,CAAC;AAEF,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEvD;AAID,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CASnC;AAED,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,QAAQ,EAClB,MAAM,GAAE,kBAAoC,GAC3C,OAAO,CAAC,IAAI,CAAC,CAGf;AAgBD,eAAO,MAAM,0BAA0B,2BAA2B,CAAC;AACnE,eAAO,MAAM,wBAAwB,+BAA+B,CAAC;AAoBrE,wBAAgB,iBAAiB,CAC/B,KAAK,GAAE;IACL,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,KAAK,CAAC;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CACvD,GACL,OAAO,KAAK,CAad"}
@@ -0,0 +1,87 @@
1
+ import { createRequire } from 'node:module';
2
+ import { ApiVersionRefusedError, readApiVersionRefusal, sdlcClientHeaders, withSdlcClientHeaders } from '@software-dlc/graph/client/api-version';
3
+ import { ProjectDeletedError } from './project-deleted.js';
4
+ export { ProjectDeletedError };
5
+ // The package's own release. A bundler that copies this module away from the
6
+ // package manifest leaves the release unknown instead of failing the import.
7
+ function packageRelease() {
8
+ try {
9
+ const require = createRequire(import.meta.url);
10
+ const metadata = require('../../package.json');
11
+ return typeof metadata.version === 'string' ? metadata.version : 'unknown';
12
+ }
13
+ catch {
14
+ return 'unknown';
15
+ }
16
+ }
17
+ // The sdlc CLI as the platform sees it: every request names this release and
18
+ // the API version it was built against.
19
+ export const SDLC_CLI_CLIENT = {
20
+ kind: 'sdlc-cli',
21
+ release: packageRelease()
22
+ };
23
+ export function sdlcCliHeaders() {
24
+ return sdlcClientHeaders(SDLC_CLI_CLIENT);
25
+ }
26
+ // The platform's refusal of this client's API version, or null for any other
27
+ // response. Reads a copy of the body, so the caller can still read it.
28
+ export async function apiVersionRefusalOf(response) {
29
+ if (response.status !== 400)
30
+ return null;
31
+ const content_type = response.headers.get('content-type') ?? '';
32
+ if (!content_type.toLowerCase().startsWith('application/json'))
33
+ return null;
34
+ try {
35
+ return readApiVersionRefusal(await response.clone().json());
36
+ }
37
+ catch {
38
+ return null;
39
+ }
40
+ }
41
+ export async function throwIfApiVersionRefused(response, client = SDLC_CLI_CLIENT) {
42
+ const refusal = await apiVersionRefusalOf(response);
43
+ if (refusal)
44
+ throw new ApiVersionRefusedError(refusal, client);
45
+ }
46
+ async function isProjectDeleted(response) {
47
+ if (response.status !== 410)
48
+ return false;
49
+ const content_type = response.headers.get('content-type') ?? '';
50
+ if (!content_type.toLowerCase().startsWith('application/json'))
51
+ return false;
52
+ try {
53
+ const body = (await response.clone().json());
54
+ return body?.code === 'project_deleted';
55
+ }
56
+ catch {
57
+ return false;
58
+ }
59
+ }
60
+ // Vercel's deployment protection bypass, for a protected (staging) origin:
61
+ // when this variable holds the secret, every platform request carries it.
62
+ export const PROTECTION_BYPASS_VARIABLE = 'SDLC_PROTECTION_BYPASS';
63
+ export const PROTECTION_BYPASS_HEADER = 'x-vercel-protection-bypass';
64
+ function withProtectionBypass(request, init, bypass) {
65
+ // Headers given with the call replace a Request's own, so start from those.
66
+ const headers = new Headers(init?.headers ?? (request instanceof Request ? request.headers : undefined));
67
+ headers.set(PROTECTION_BYPASS_HEADER, bypass);
68
+ return { ...init, headers };
69
+ }
70
+ // The fetch for platform requests: it adds the client headers, and the
71
+ // protection bypass when one is set, and turns a version refusal into
72
+ // ApiVersionRefusedError, whose message names the update, and a deleted
73
+ // project into ProjectDeletedError, whose message names sdlc reconnect, so the
74
+ // refused request is reported once and never retried.
75
+ export function sdlcPlatformFetch(input = {}) {
76
+ const client = input.client ?? SDLC_CLI_CLIENT;
77
+ const send = withSdlcClientHeaders(input.fetch_impl ?? fetch, client);
78
+ const bypass = (input.environment ?? process.env)[PROTECTION_BYPASS_VARIABLE];
79
+ return async (request, init) => {
80
+ const response = await send(request, bypass ? withProtectionBypass(request, init, bypass) : init);
81
+ await throwIfApiVersionRefused(response, client);
82
+ if (await isProjectDeleted(response))
83
+ throw new ProjectDeletedError();
84
+ return response;
85
+ };
86
+ }
87
+ //# sourceMappingURL=api-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../src/local/api-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EAGtB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,6EAA6E;AAC7E,6EAA6E;AAC7E,SAAS,cAAc;IACrB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAA0B,CAAC;QACxE,OAAO,OAAO,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,wCAAwC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAuB;IACjD,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,cAAc,EAAE;CAC1B,CAAC;AAEF,MAAM,UAAU,cAAc;IAC5B,OAAO,iBAAiB,CAAC,eAAe,CAAC,CAAC;AAC5C,CAAC;AAED,6EAA6E;AAC7E,uEAAuE;AACvE,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,QAAkB;IAElB,IAAI,QAAQ,CAAC,MAAM,KA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