@codyswann/lisa 4.107.1 → 4.107.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 (374) hide show
  1. package/all/copy-overwrite/scripts/lisa-plugin-registration-notice.mjs +190 -0
  2. package/all/copy-overwrite/scripts/lisa-postinstall.mjs +6 -2
  3. package/all/merge/.claude/settings.json +9 -0
  4. package/dist/cli/{ui-ci-quality-jobs-parse.d.ts → ci-workflow-inputs.d.ts} +7 -2
  5. package/dist/cli/ci-workflow-inputs.d.ts.map +1 -0
  6. package/dist/cli/{ui-ci-quality-jobs-parse.js → ci-workflow-inputs.js} +2 -2
  7. package/dist/cli/ci-workflow-inputs.js.map +1 -0
  8. package/dist/cli/{ui-confined-project-read.d.ts → confined-project-read.d.ts} +1 -1
  9. package/dist/cli/confined-project-read.d.ts.map +1 -0
  10. package/dist/cli/{ui-confined-project-read.js → confined-project-read.js} +2 -2
  11. package/dist/cli/confined-project-read.js.map +1 -0
  12. package/dist/cli/detected-stacks.d.ts +10 -0
  13. package/dist/cli/detected-stacks.d.ts.map +1 -0
  14. package/dist/cli/{ui-detected-stacks.js → detected-stacks.js} +8 -27
  15. package/dist/cli/detected-stacks.js.map +1 -0
  16. package/dist/cli/doctor-apply-freshness.d.ts +2 -2
  17. package/dist/cli/doctor-apply-freshness.js +2 -2
  18. package/dist/cli/doctor-coderabbit-labeling.js +1 -1
  19. package/dist/cli/doctor-coderabbit-labeling.js.map +1 -1
  20. package/dist/cli/doctor-coderabbit.js +1 -1
  21. package/dist/cli/doctor-coderabbit.js.map +1 -1
  22. package/dist/cli/doctor-instruction-files.d.ts +11 -0
  23. package/dist/cli/doctor-instruction-files.d.ts.map +1 -0
  24. package/dist/cli/doctor-instruction-files.js +57 -0
  25. package/dist/cli/doctor-instruction-files.js.map +1 -0
  26. package/dist/cli/doctor-plugin-registration.d.ts +25 -0
  27. package/dist/cli/doctor-plugin-registration.d.ts.map +1 -0
  28. package/dist/cli/doctor-plugin-registration.js +63 -0
  29. package/dist/cli/doctor-plugin-registration.js.map +1 -0
  30. package/dist/cli/doctor.d.ts +5 -2
  31. package/dist/cli/doctor.d.ts.map +1 -1
  32. package/dist/cli/doctor.js +11 -56
  33. package/dist/cli/doctor.js.map +1 -1
  34. package/dist/cli/gate-report-ruleset.js +1 -1
  35. package/dist/cli/gate-report-ruleset.js.map +1 -1
  36. package/dist/cli/gate-report-skip-jobs.js +1 -1
  37. package/dist/cli/gate-report-skip-jobs.js.map +1 -1
  38. package/dist/cli/gate-report-types.d.ts +2 -3
  39. package/dist/cli/gate-report-types.d.ts.map +1 -1
  40. package/dist/cli/gh-cli.d.ts +14 -0
  41. package/dist/cli/gh-cli.d.ts.map +1 -0
  42. package/dist/cli/gh-cli.js +32 -0
  43. package/dist/cli/gh-cli.js.map +1 -0
  44. package/dist/cli/index.d.ts +0 -3
  45. package/dist/cli/index.d.ts.map +1 -1
  46. package/dist/cli/index.js +2 -3
  47. package/dist/cli/index.js.map +1 -1
  48. package/dist/cli/removed-ui-cmd.d.ts +18 -0
  49. package/dist/cli/removed-ui-cmd.d.ts.map +1 -0
  50. package/dist/cli/removed-ui-cmd.js +17 -0
  51. package/dist/cli/removed-ui-cmd.js.map +1 -0
  52. package/dist/core/bootstrap-environment.d.ts.map +1 -1
  53. package/dist/core/bootstrap-environment.js +6 -2
  54. package/dist/core/bootstrap-environment.js.map +1 -1
  55. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  56. package/dist/core/lisa-owned-hash-ledger.js +12 -0
  57. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  58. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  59. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  60. package/dist/core/upstream-evidence-manifest.js +36 -97
  61. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  62. package/dist/devin/enforcement-fallback-installer.d.ts +0 -8
  63. package/dist/devin/enforcement-fallback-installer.d.ts.map +1 -1
  64. package/dist/devin/enforcement-fallback-installer.js +0 -26
  65. package/dist/devin/enforcement-fallback-installer.js.map +1 -1
  66. package/dist/health/governance-probes.d.ts.map +1 -1
  67. package/dist/health/governance-probes.js +8 -1
  68. package/dist/health/governance-probes.js.map +1 -1
  69. package/dist/health/plugin-inspection.d.ts +6 -1
  70. package/dist/health/plugin-inspection.d.ts.map +1 -1
  71. package/dist/health/plugin-inspection.js +10 -3
  72. package/dist/health/plugin-inspection.js.map +1 -1
  73. package/dist/health/ruleset-reach-inspection.d.ts.map +1 -1
  74. package/dist/health/ruleset-reach-inspection.js +2 -7
  75. package/dist/health/ruleset-reach-inspection.js.map +1 -1
  76. package/dist/standards/capture.d.ts +1 -1
  77. package/dist/standards/capture.d.ts.map +1 -1
  78. package/dist/standards/capture.js +2 -2
  79. package/dist/standards/capture.js.map +1 -1
  80. package/dist/standards/readiness.d.ts +9 -2
  81. package/dist/standards/readiness.d.ts.map +1 -1
  82. package/dist/standards/readiness.js +12 -3
  83. package/dist/standards/readiness.js.map +1 -1
  84. package/dist/sync/json-path.d.ts +0 -10
  85. package/dist/sync/json-path.d.ts.map +1 -1
  86. package/dist/sync/json-path.js +0 -14
  87. package/dist/sync/json-path.js.map +1 -1
  88. package/dist/sync/sync-population.d.ts +0 -6
  89. package/dist/sync/sync-population.d.ts.map +1 -1
  90. package/dist/sync/sync-population.js +0 -8
  91. package/dist/sync/sync-population.js.map +1 -1
  92. package/dist/utils/marketplace-manifest.d.ts.map +1 -1
  93. package/dist/utils/marketplace-manifest.js +2 -3
  94. package/dist/utils/marketplace-manifest.js.map +1 -1
  95. package/package.json +4 -5
  96. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  98. package/plugins/lisa/.codex-plugin/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  99. package/plugins/lisa/.codex-plugin/skills/lisa-setup-automations/SKILL.md +1 -1
  100. package/plugins/lisa/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  101. package/plugins/lisa/skills/lisa-setup-automations/SKILL.md +1 -1
  102. package/plugins/lisa-agy/plugin.json +1 -1
  103. package/plugins/lisa-agy/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  104. package/plugins/lisa-agy/skills/lisa-setup-automations/SKILL.md +1 -1
  105. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  107. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  108. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  112. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  113. package/plugins/lisa-copilot/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  114. package/plugins/lisa-copilot/skills/lisa-setup-automations/SKILL.md +1 -1
  115. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-cursor/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  117. package/plugins/lisa-cursor/skills/lisa-setup-automations/SKILL.md +1 -1
  118. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  120. package/plugins/lisa-devin/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  121. package/plugins/lisa-devin/skills/lisa-setup-automations/SKILL.md +1 -1
  122. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  124. package/plugins/lisa-expo-agy/plugin.json +1 -1
  125. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  129. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  131. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  132. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  136. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  138. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  139. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  140. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  141. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  143. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  144. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  145. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  146. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  147. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  148. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  149. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  150. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  151. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  152. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  153. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  154. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  155. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  156. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  157. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  159. package/plugins/lisa-rails-agy/plugin.json +1 -1
  160. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  161. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  163. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  164. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  165. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  166. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  167. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  171. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  172. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  173. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  174. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  175. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  176. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  178. package/plugins/src/base/skills/lisa-generate-claude-remote-build-script/SKILL.md +5 -18
  179. package/plugins/src/base/skills/lisa-setup-automations/SKILL.md +1 -1
  180. package/scripts/check-derived-artifacts.mjs +0 -1
  181. package/scripts/generate-upstream-evidence-manifest.mjs +0 -1
  182. package/scripts/install-claude-plugins.sh +4 -1
  183. package/scripts/lisa-ruleset-reach.mjs +0 -3
  184. package/scripts/two-channel-couplings.json +1 -1
  185. package/typescript/copy-overwrite/.prettierignore +1 -0
  186. package/dist/cli/gate-report-drift-section.d.ts +0 -8
  187. package/dist/cli/gate-report-drift-section.d.ts.map +0 -1
  188. package/dist/cli/gate-report-drift-section.js +0 -76
  189. package/dist/cli/gate-report-drift-section.js.map +0 -1
  190. package/dist/cli/gate-report-fragment.d.ts +0 -11
  191. package/dist/cli/gate-report-fragment.d.ts.map +0 -1
  192. package/dist/cli/gate-report-fragment.js +0 -106
  193. package/dist/cli/gate-report-fragment.js.map +0 -1
  194. package/dist/cli/gate-report-html.d.ts +0 -47
  195. package/dist/cli/gate-report-html.d.ts.map +0 -1
  196. package/dist/cli/gate-report-html.js +0 -49
  197. package/dist/cli/gate-report-html.js.map +0 -1
  198. package/dist/cli/gate-report-preview.d.ts +0 -9
  199. package/dist/cli/gate-report-preview.d.ts.map +0 -1
  200. package/dist/cli/gate-report-preview.js +0 -55
  201. package/dist/cli/gate-report-preview.js.map +0 -1
  202. package/dist/cli/gate-report-rows.d.ts +0 -39
  203. package/dist/cli/gate-report-rows.d.ts.map +0 -1
  204. package/dist/cli/gate-report-rows.js +0 -227
  205. package/dist/cli/gate-report-rows.js.map +0 -1
  206. package/dist/cli/gate-report-sections.d.ts +0 -38
  207. package/dist/cli/gate-report-sections.d.ts.map +0 -1
  208. package/dist/cli/gate-report-sections.js +0 -225
  209. package/dist/cli/gate-report-sections.js.map +0 -1
  210. package/dist/cli/gate-report-style.d.ts +0 -19
  211. package/dist/cli/gate-report-style.d.ts.map +0 -1
  212. package/dist/cli/gate-report-style.js +0 -100
  213. package/dist/cli/gate-report-style.js.map +0 -1
  214. package/dist/cli/remote-environment-catalog.d.ts +0 -17
  215. package/dist/cli/remote-environment-catalog.d.ts.map +0 -1
  216. package/dist/cli/remote-environment-catalog.js +0 -175
  217. package/dist/cli/remote-environment-catalog.js.map +0 -1
  218. package/dist/cli/remote-environment-contract.d.ts +0 -94
  219. package/dist/cli/remote-environment-contract.d.ts.map +0 -1
  220. package/dist/cli/remote-environment-contract.js +0 -59
  221. package/dist/cli/remote-environment-contract.js.map +0 -1
  222. package/dist/cli/remote-environment-detection.d.ts +0 -23
  223. package/dist/cli/remote-environment-detection.d.ts.map +0 -1
  224. package/dist/cli/remote-environment-detection.js +0 -120
  225. package/dist/cli/remote-environment-detection.js.map +0 -1
  226. package/dist/cli/remote-environment.d.ts +0 -12
  227. package/dist/cli/remote-environment.d.ts.map +0 -1
  228. package/dist/cli/remote-environment.js +0 -73
  229. package/dist/cli/remote-environment.js.map +0 -1
  230. package/dist/cli/ui-automations-adapters.d.ts +0 -72
  231. package/dist/cli/ui-automations-adapters.d.ts.map +0 -1
  232. package/dist/cli/ui-automations-adapters.js +0 -174
  233. package/dist/cli/ui-automations-adapters.js.map +0 -1
  234. package/dist/cli/ui-automations.d.ts +0 -90
  235. package/dist/cli/ui-automations.d.ts.map +0 -1
  236. package/dist/cli/ui-automations.js +0 -149
  237. package/dist/cli/ui-automations.js.map +0 -1
  238. package/dist/cli/ui-ci-quality-jobs-compute.d.ts +0 -44
  239. package/dist/cli/ui-ci-quality-jobs-compute.d.ts.map +0 -1
  240. package/dist/cli/ui-ci-quality-jobs-compute.js +0 -278
  241. package/dist/cli/ui-ci-quality-jobs-compute.js.map +0 -1
  242. package/dist/cli/ui-ci-quality-jobs-parse.d.ts.map +0 -1
  243. package/dist/cli/ui-ci-quality-jobs-parse.js.map +0 -1
  244. package/dist/cli/ui-ci-quality-jobs.d.ts +0 -22
  245. package/dist/cli/ui-ci-quality-jobs.d.ts.map +0 -1
  246. package/dist/cli/ui-ci-quality-jobs.js +0 -160
  247. package/dist/cli/ui-ci-quality-jobs.js.map +0 -1
  248. package/dist/cli/ui-cmd.d.ts +0 -87
  249. package/dist/cli/ui-cmd.d.ts.map +0 -1
  250. package/dist/cli/ui-cmd.js +0 -383
  251. package/dist/cli/ui-cmd.js.map +0 -1
  252. package/dist/cli/ui-config-write-document.d.ts +0 -53
  253. package/dist/cli/ui-config-write-document.d.ts.map +0 -1
  254. package/dist/cli/ui-config-write-document.js +0 -212
  255. package/dist/cli/ui-config-write-document.js.map +0 -1
  256. package/dist/cli/ui-config-write-patch-plan.d.ts +0 -30
  257. package/dist/cli/ui-config-write-patch-plan.d.ts.map +0 -1
  258. package/dist/cli/ui-config-write-patch-plan.js +0 -151
  259. package/dist/cli/ui-config-write-patch-plan.js.map +0 -1
  260. package/dist/cli/ui-config-write-persistence.d.ts +0 -29
  261. package/dist/cli/ui-config-write-persistence.d.ts.map +0 -1
  262. package/dist/cli/ui-config-write-persistence.js +0 -298
  263. package/dist/cli/ui-config-write-persistence.js.map +0 -1
  264. package/dist/cli/ui-config-write-property-edits.d.ts +0 -40
  265. package/dist/cli/ui-config-write-property-edits.d.ts.map +0 -1
  266. package/dist/cli/ui-config-write-property-edits.js +0 -250
  267. package/dist/cli/ui-config-write-property-edits.js.map +0 -1
  268. package/dist/cli/ui-config-write-provenance.d.ts +0 -12
  269. package/dist/cli/ui-config-write-provenance.d.ts.map +0 -1
  270. package/dist/cli/ui-config-write-provenance.js +0 -29
  271. package/dist/cli/ui-config-write-provenance.js.map +0 -1
  272. package/dist/cli/ui-config-write-root-identity.d.ts +0 -25
  273. package/dist/cli/ui-config-write-root-identity.d.ts.map +0 -1
  274. package/dist/cli/ui-config-write-root-identity.js +0 -66
  275. package/dist/cli/ui-config-write-root-identity.js.map +0 -1
  276. package/dist/cli/ui-config-write.d.ts +0 -13
  277. package/dist/cli/ui-config-write.d.ts.map +0 -1
  278. package/dist/cli/ui-config-write.js +0 -341
  279. package/dist/cli/ui-config-write.js.map +0 -1
  280. package/dist/cli/ui-confined-project-read.d.ts.map +0 -1
  281. package/dist/cli/ui-confined-project-read.js.map +0 -1
  282. package/dist/cli/ui-deploy-pipeline-model.d.ts +0 -74
  283. package/dist/cli/ui-deploy-pipeline-model.d.ts.map +0 -1
  284. package/dist/cli/ui-deploy-pipeline-model.js +0 -127
  285. package/dist/cli/ui-deploy-pipeline-model.js.map +0 -1
  286. package/dist/cli/ui-deploy-pipeline.d.ts +0 -25
  287. package/dist/cli/ui-deploy-pipeline.d.ts.map +0 -1
  288. package/dist/cli/ui-deploy-pipeline.js +0 -181
  289. package/dist/cli/ui-deploy-pipeline.js.map +0 -1
  290. package/dist/cli/ui-detected-stacks.d.ts +0 -21
  291. package/dist/cli/ui-detected-stacks.d.ts.map +0 -1
  292. package/dist/cli/ui-detected-stacks.js.map +0 -1
  293. package/dist/cli/ui-enabled-plugins.d.ts +0 -52
  294. package/dist/cli/ui-enabled-plugins.d.ts.map +0 -1
  295. package/dist/cli/ui-enabled-plugins.js +0 -229
  296. package/dist/cli/ui-enabled-plugins.js.map +0 -1
  297. package/dist/cli/ui-gate-report.d.ts +0 -57
  298. package/dist/cli/ui-gate-report.d.ts.map +0 -1
  299. package/dist/cli/ui-gate-report.js +0 -95
  300. package/dist/cli/ui-gate-report.js.map +0 -1
  301. package/dist/cli/ui-github-repo-expected.d.ts +0 -36
  302. package/dist/cli/ui-github-repo-expected.d.ts.map +0 -1
  303. package/dist/cli/ui-github-repo-expected.js +0 -118
  304. package/dist/cli/ui-github-repo-expected.js.map +0 -1
  305. package/dist/cli/ui-github-repo-gh.d.ts +0 -56
  306. package/dist/cli/ui-github-repo-gh.d.ts.map +0 -1
  307. package/dist/cli/ui-github-repo-gh.js +0 -117
  308. package/dist/cli/ui-github-repo-gh.js.map +0 -1
  309. package/dist/cli/ui-github-repo-map.d.ts +0 -25
  310. package/dist/cli/ui-github-repo-map.d.ts.map +0 -1
  311. package/dist/cli/ui-github-repo-map.js +0 -175
  312. package/dist/cli/ui-github-repo-map.js.map +0 -1
  313. package/dist/cli/ui-github-repo.d.ts +0 -51
  314. package/dist/cli/ui-github-repo.d.ts.map +0 -1
  315. package/dist/cli/ui-github-repo.js +0 -117
  316. package/dist/cli/ui-github-repo.js.map +0 -1
  317. package/dist/cli/ui-health.d.ts +0 -18
  318. package/dist/cli/ui-health.d.ts.map +0 -1
  319. package/dist/cli/ui-health.js +0 -101
  320. package/dist/cli/ui-health.js.map +0 -1
  321. package/dist/cli/ui-lisa-version.d.ts +0 -36
  322. package/dist/cli/ui-lisa-version.d.ts.map +0 -1
  323. package/dist/cli/ui-lisa-version.js +0 -82
  324. package/dist/cli/ui-lisa-version.js.map +0 -1
  325. package/dist/cli/ui-observability-checks.d.ts +0 -23
  326. package/dist/cli/ui-observability-checks.d.ts.map +0 -1
  327. package/dist/cli/ui-observability-checks.js +0 -156
  328. package/dist/cli/ui-observability-checks.js.map +0 -1
  329. package/dist/cli/ui-observability-providers.d.ts +0 -69
  330. package/dist/cli/ui-observability-providers.d.ts.map +0 -1
  331. package/dist/cli/ui-observability-providers.js +0 -99
  332. package/dist/cli/ui-observability-providers.js.map +0 -1
  333. package/dist/cli/ui-request-origin.d.ts +0 -8
  334. package/dist/cli/ui-request-origin.d.ts.map +0 -1
  335. package/dist/cli/ui-request-origin.js +0 -41
  336. package/dist/cli/ui-request-origin.js.map +0 -1
  337. package/dist/cli/ui-setup-readiness-config.d.ts +0 -28
  338. package/dist/cli/ui-setup-readiness-config.d.ts.map +0 -1
  339. package/dist/cli/ui-setup-readiness-config.js +0 -116
  340. package/dist/cli/ui-setup-readiness-config.js.map +0 -1
  341. package/dist/cli/ui-setup-readiness-contract.d.ts +0 -32
  342. package/dist/cli/ui-setup-readiness-contract.d.ts.map +0 -1
  343. package/dist/cli/ui-setup-readiness-contract.js +0 -61
  344. package/dist/cli/ui-setup-readiness-contract.js.map +0 -1
  345. package/dist/cli/ui-setup-readiness-install.d.ts +0 -24
  346. package/dist/cli/ui-setup-readiness-install.d.ts.map +0 -1
  347. package/dist/cli/ui-setup-readiness-install.js +0 -211
  348. package/dist/cli/ui-setup-readiness-install.js.map +0 -1
  349. package/dist/cli/ui-setup-readiness-local.d.ts +0 -41
  350. package/dist/cli/ui-setup-readiness-local.d.ts.map +0 -1
  351. package/dist/cli/ui-setup-readiness-local.js +0 -237
  352. package/dist/cli/ui-setup-readiness-local.js.map +0 -1
  353. package/dist/cli/ui-setup-readiness-remote.d.ts +0 -30
  354. package/dist/cli/ui-setup-readiness-remote.d.ts.map +0 -1
  355. package/dist/cli/ui-setup-readiness-remote.js +0 -108
  356. package/dist/cli/ui-setup-readiness-remote.js.map +0 -1
  357. package/dist/cli/ui-setup-readiness.d.ts +0 -52
  358. package/dist/cli/ui-setup-readiness.d.ts.map +0 -1
  359. package/dist/cli/ui-setup-readiness.js +0 -126
  360. package/dist/cli/ui-setup-readiness.js.map +0 -1
  361. package/dist/cli/ui-starter-sync.d.ts +0 -17
  362. package/dist/cli/ui-starter-sync.d.ts.map +0 -1
  363. package/dist/cli/ui-starter-sync.js +0 -75
  364. package/dist/cli/ui-starter-sync.js.map +0 -1
  365. package/dist/cli/ui-status-json.d.ts +0 -29
  366. package/dist/cli/ui-status-json.d.ts.map +0 -1
  367. package/dist/cli/ui-status-json.js +0 -162
  368. package/dist/cli/ui-status-json.js.map +0 -1
  369. package/dist/cli/ui-status.d.ts +0 -42
  370. package/dist/cli/ui-status.d.ts.map +0 -1
  371. package/dist/cli/ui-status.js +0 -221
  372. package/dist/cli/ui-status.js.map +0 -1
  373. package/ui/README.md +0 -443
  374. package/ui/index.html +0 -14392
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-document.js","sourceRoot":"","sources":["../../src/cli/ui-config-write-document.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAyB,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,UAAU,GAGX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,GAEpB,MAAM,iCAAiC,CAAC;AA6BzC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,mBAAmB,CACj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EAAE,CAAC;IACpC,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO;QACL,GAAG,IAAI;QACP,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC;KACzE,CAAC;AACJ,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * @file ui-config-write-patch-plan.ts
3
- * @description Deterministic non-overlapping patch planning for UI config JSON.
4
- * @module cli/ui-config-write-patch-plan
5
- */
6
- import { type Edit as JsonTextEdit, type Node as JsonNode } from "jsonc-parser";
7
- import { type JsonObject, type JsonValue } from "../sync/json-path.js";
8
- /** One requested semantic mutation in endpoint order. */
9
- export type ConfigDocumentEdit = {
10
- readonly kind: "remove";
11
- readonly path: readonly string[];
12
- } | {
13
- readonly kind: "set";
14
- readonly path: readonly string[];
15
- readonly value: JsonValue;
16
- };
17
- /**
18
- * Plan every changed path against one immutable original syntax tree.
19
- *
20
- * Missing descendants collapse to the first absent/non-object branch, so a
21
- * formatter never needs to borrow and replace an unrelated sibling for context.
22
- * @param text - Original strict JSON text
23
- * @param tree - Original syntax tree whose offsets refer to `text`
24
- * @param source - Original semantic document
25
- * @param prospective - Final semantic document after ordered edits
26
- * @param touched - Ordered edits that changed semantics
27
- * @returns Deterministic non-overlapping original-offset text edits
28
- */
29
- export declare function planConfigTextEdits(text: string, tree: JsonNode, source: JsonObject, prospective: JsonObject, touched: readonly ConfigDocumentEdit[]): readonly JsonTextEdit[];
30
- //# sourceMappingURL=ui-config-write-patch-plan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-patch-plan.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write-patch-plan.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAEL,KAAK,IAAI,IAAI,YAAY,EACzB,KAAK,IAAI,IAAI,QAAQ,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAQ9B,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAC1B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC7D;IACE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEN;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,UAAU,EACvB,OAAO,EAAE,SAAS,kBAAkB,EAAE,GACrC,SAAS,YAAY,EAAE,CAazB"}
@@ -1,151 +0,0 @@
1
- /**
2
- * @file ui-config-write-patch-plan.ts
3
- * @description Deterministic non-overlapping patch planning for UI config JSON.
4
- * @module cli/ui-config-write-patch-plan
5
- */
6
- import { findNodeAtLocation, } from "jsonc-parser";
7
- import { getAtPropertyPath, isJsonObject, } from "../sync/json-path.js";
8
- import { planObjectPatchEdits, serializeConfigValue, } from "./ui-config-write-property-edits.js";
9
- /**
10
- * Plan every changed path against one immutable original syntax tree.
11
- *
12
- * Missing descendants collapse to the first absent/non-object branch, so a
13
- * formatter never needs to borrow and replace an unrelated sibling for context.
14
- * @param text - Original strict JSON text
15
- * @param tree - Original syntax tree whose offsets refer to `text`
16
- * @param source - Original semantic document
17
- * @param prospective - Final semantic document after ordered edits
18
- * @param touched - Ordered edits that changed semantics
19
- * @returns Deterministic non-overlapping original-offset text edits
20
- */
21
- export function planConfigTextEdits(text, tree, source, prospective, touched) {
22
- const patches = collapseConfigPatches(source, prospective, touched);
23
- const planned = patches.reduce((plan, patch) => planConfigPatch(tree, plan, patch), {
24
- replacements: [],
25
- groups: [],
26
- });
27
- return [
28
- ...planned.replacements,
29
- ...planned.groups.flatMap(group => planObjectPatchEdits(text, tree, group)),
30
- ];
31
- }
32
- /**
33
- * Collapse overlapping changes to the shallowest original source property.
34
- * @param source - Original semantic document
35
- * @param prospective - Final semantic document after ordered edits
36
- * @param touched - Ordered edits that actually changed semantics
37
- * @returns Stable property patches with no ancestor/descendant overlap
38
- */
39
- function collapseConfigPatches(source, prospective, touched) {
40
- const candidates = touched.map((edit, order) => {
41
- const requestedPath = edit.path;
42
- const path = edit.kind === "remove"
43
- ? requestedPath
44
- : findSetPatchPath(source, requestedPath);
45
- return { path, value: getAtPropertyPath(prospective, path), order };
46
- });
47
- const collapsed = [...candidates]
48
- .sort((left, right) => left.path.length - right.path.length || left.order - right.order)
49
- .reduce((patches, candidate) => {
50
- return patches.some(patch => isPathPrefix(patch.path, candidate.path))
51
- ? patches
52
- : [...patches, candidate];
53
- }, []);
54
- return [...collapsed].sort((left, right) => left.order - right.order);
55
- }
56
- /**
57
- * Find the shallowest property whose replacement can express a set operation.
58
- * @param node - Original value at the current path depth
59
- * @param segments - Remaining requested dot-path segments
60
- * @param prefix - Original path already proven to contain objects
61
- * @returns Existing leaf or first missing/non-object branch to replace
62
- */
63
- function findSetPatchPath(node, segments, prefix = []) {
64
- const [head, ...rest] = segments;
65
- if (head === undefined)
66
- return prefix;
67
- const path = [...prefix, head];
68
- if (rest.length === 0)
69
- return path;
70
- const child = node[head];
71
- return isJsonObject(child) ? findSetPatchPath(child, rest, path) : path;
72
- }
73
- /**
74
- * Compare dot paths without joining them into ambiguous strings.
75
- * @param prefix - Candidate ancestor path
76
- * @param candidate - Candidate descendant path
77
- * @returns Whether every prefix segment matches the candidate
78
- */
79
- function isPathPrefix(prefix, candidate) {
80
- return (prefix.length <= candidate.length &&
81
- prefix.every((segment, index) => candidate[index] === segment));
82
- }
83
- /**
84
- * Plan one patch as an existing value replacement or grouped child mutation.
85
- * @param tree - Original strict-JSON syntax tree
86
- * @param plan - Replacements and object groups accumulated so far
87
- * @param plan.replacements - Existing-value edits accumulated so far
88
- * @param plan.groups - Direct object-child mutations accumulated so far
89
- * @param patch - Collapsed semantic patch
90
- * @returns Plan including this patch
91
- */
92
- function planConfigPatch(tree, plan, patch) {
93
- const valueNode = findNodeAtLocation(tree, [...patch.path]);
94
- if (valueNode !== undefined && patch.value !== undefined) {
95
- return {
96
- ...plan,
97
- replacements: [
98
- ...plan.replacements,
99
- {
100
- offset: valueNode.offset,
101
- length: valueNode.length,
102
- content: serializeConfigValue(patch.value),
103
- },
104
- ],
105
- };
106
- }
107
- const parentPath = patch.path.slice(0, -1);
108
- const key = patch.path.at(-1);
109
- if (key === undefined) {
110
- throw new Error("Config root replacement is not writable");
111
- }
112
- return {
113
- ...plan,
114
- groups: addObjectPatch(plan.groups, parentPath, key, patch, valueNode !== undefined),
115
- };
116
- }
117
- /**
118
- * Add one insertion or removal to an immutable parent-object group.
119
- * @param groups - Groups accumulated for earlier patches
120
- * @param parentPath - Original object that owns the direct property
121
- * @param key - Direct property name
122
- * @param patch - Final insertion value and stable request order
123
- * @param removesExisting - Whether the original tree contains this property
124
- * @returns Groups including this mutation
125
- */
126
- function addObjectPatch(groups, parentPath, key, patch, removesExisting) {
127
- const existing = groups.find(group => pathsEqual(group.parentPath, parentPath));
128
- const next = {
129
- parentPath,
130
- removals: removesExisting
131
- ? [...(existing?.removals ?? []), key]
132
- : (existing?.removals ?? []),
133
- insertions: removesExisting
134
- ? (existing?.insertions ?? [])
135
- : [...(existing?.insertions ?? []), patch],
136
- };
137
- return existing === undefined
138
- ? [...groups, next]
139
- : groups.map(group => pathsEqual(group.parentPath, parentPath) ? next : group);
140
- }
141
- /**
142
- * Compare two syntax-tree paths exactly.
143
- * @param left - First path
144
- * @param right - Second path
145
- * @returns Whether both contain the same segments in the same order
146
- */
147
- function pathsEqual(left, right) {
148
- return (left.length === right.length &&
149
- left.every((segment, index) => right[index] === segment));
150
- }
151
- //# sourceMappingURL=ui-config-write-patch-plan.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-patch-plan.js","sourceRoot":"","sources":["../../src/cli/ui-config-write-patch-plan.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,kBAAkB,GAGnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,YAAY,GAGb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,GAGrB,MAAM,qCAAqC,CAAC;AAW7C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CACjC,IAAY,EACZ,IAAc,EACd,MAAkB,EAClB,WAAuB,EACvB,OAAsC;IAEtC,MAAM,OAAO,GAAG,qBAAqB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACpE,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAG3B,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE;QACtD,YAAY,EAAE,EAAE;QAChB,MAAM,EAAE,EAAE;KACX,CAAC,CAAC;IACH,OAAO;QACL,GAAG,OAAO,CAAC,YAAY;QACvB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;KAC5E,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,qBAAqB,CAC5B,MAAkB,EAClB,WAAuB,EACvB,OAAsC;IAEtC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAe,EAAE;QAC1D,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC;QAChC,MAAM,IAAI,GACR,IAAI,CAAC,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,MAAM;QAC5B,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC,CACzD,CAAC;AACJ,CAAC"}
@@ -1,29 +0,0 @@
1
- import type { JsonObject, JsonValue } from "../sync/json-path.js";
2
- /** Changes already classified at the request boundary, before any file I/O. */
3
- export interface RoutedConfigChanges {
4
- /** Registry-root or registry-descendant changes for committed governance. */
5
- readonly committed: Readonly<Record<string, JsonValue>>;
6
- /** Exact console-authorized changes for the gitignored developer overlay. */
7
- readonly local: Readonly<Record<string, JsonValue>>;
8
- }
9
- /** Callback that enforces registry validators against the prospective config. */
10
- export type ValidateCommittedConfig = (config: JsonObject) => void;
11
- /**
12
- * Follow-up work run under the same serialization as the write it follows.
13
- *
14
- * Config propagation reads and rewrites both config files, so running it after
15
- * the lock is released would let a second request's snapshot interleave with
16
- * this request's propagation. It runs inside the transaction instead, and its
17
- * result becomes the caller's config view.
18
- */
19
- export type AfterPersist = (projectRoot: string) => Promise<JsonObject>;
20
- /**
21
- * Persist one pre-classified request under the project write queue.
22
- * @param destDir - Project root containing the two fixed config filenames
23
- * @param changes - Changes split by committed versus local ownership
24
- * @param validateCommitted - Registry validation applied before either write
25
- * @param afterPersist - Optional in-transaction follow-up supplying the result
26
- * @returns The follow-up's config view, or the prospective committed config
27
- */
28
- export declare function persistRoutedConfigChanges(destDir: string, changes: RoutedConfigChanges, validateCommitted: ValidateCommittedConfig, afterPersist?: AfterPersist): Promise<JsonObject>;
29
- //# sourceMappingURL=ui-config-write-persistence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-persistence.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write-persistence.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA0BlE,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IACxD,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACrD;AAoBD,iFAAiF;AACjF,MAAM,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;AAEnE;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAExE;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,mBAAmB,EAC5B,iBAAiB,EAAE,uBAAuB,EAC1C,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,UAAU,CAAC,CA2CrB"}
@@ -1,298 +0,0 @@
1
- /**
2
- * @file ui-config-write-persistence.ts
3
- * @description Safe, surgical persistence for localhost UI config writes.
4
- *
5
- * Requests are serialized across processes because both config files are
6
- * shared read-modify-write state. Every request snapshots, reconciles, and
7
- * validates both files before publishing either one. Canonical-path and
8
- * filesystem-identity checks fail closed when a project root or ancestor is
9
- * replaced at a checked boundary. Node has no portable descriptor-relative
10
- * temp-create/rename API, so a same-user swap inside the final check-to-use gap
11
- * remains possible. The two final renames also cannot form one filesystem
12
- * transaction, so a failure between them can leave the first target published.
13
- * @module cli/ui-config-write-persistence
14
- */
15
- import { createHash } from "node:crypto";
16
- import { lstat, mkdir, open, realpath, } from "node:fs/promises";
17
- import { tmpdir } from "node:os";
18
- import * as path from "node:path";
19
- import { withFileTargetLock } from "../core/learnings-lock.js";
20
- import { writeFileAtomically } from "../utils/atomic-file-write.js";
21
- import { parseConfigDocument, renderConfigChanges, } from "./ui-config-write-document.js";
22
- import { assertProjectRootIdentity, requireCanonicalProjectRoot, } from "./ui-config-write-root-identity.js";
23
- import { provenanceRemovals } from "./ui-config-write-provenance.js";
24
- const CONFIG_FILE = ".lisa.config.json";
25
- const LOCAL_CONFIG_FILE = ".lisa.config.local.json";
26
- const MAX_CONFIG_BYTES = 128 * 1024;
27
- const READ_CHUNK_BYTES = 16 * 1024;
28
- const WRITE_PERMISSION_BITS = 0o222;
29
- const LOCK_DIRECTORY_PRIVATE_BITS = 0o077;
30
- const LOCK_DIRECTORY_MODE = 0o700;
31
- const CONFIG_LOCK_DIRECTORY = path.join(tmpdir(), `lisa-ui-config-write-${process.getuid?.() ?? "user"}`);
32
- const configWriteQueues = new Map();
33
- /**
34
- * Persist one pre-classified request under the project write queue.
35
- * @param destDir - Project root containing the two fixed config filenames
36
- * @param changes - Changes split by committed versus local ownership
37
- * @param validateCommitted - Registry validation applied before either write
38
- * @param afterPersist - Optional in-transaction follow-up supplying the result
39
- * @returns The follow-up's config view, or the prospective committed config
40
- */
41
- export async function persistRoutedConfigChanges(destDir, changes, validateCommitted, afterPersist) {
42
- const projectRoot = await requireCanonicalProjectRoot(destDir);
43
- const lockTarget = await resolveConfigLockTarget(projectRoot.path);
44
- return await withConfigWriteLock(projectRoot.path, async () => await withFileTargetLock(lockTarget, async () => {
45
- await assertProjectRootIdentity(projectRoot);
46
- const committedTarget = path.join(projectRoot.path, CONFIG_FILE);
47
- const localTarget = path.join(projectRoot.path, LOCAL_CONFIG_FILE);
48
- const [committedSnapshot, localSnapshot] = await Promise.all([
49
- readConfigSnapshot(committedTarget, CONFIG_FILE, projectRoot),
50
- readConfigSnapshot(localTarget, LOCAL_CONFIG_FILE, projectRoot),
51
- ]);
52
- await assertProjectRootIdentity(projectRoot);
53
- const committed = prepareConfig(committedSnapshot, Object.keys(changes.local), changes.committed, provenanceRemovals(changes.committed));
54
- const local = prepareConfig(localSnapshot, Object.keys(changes.committed), changes.local);
55
- assertPreparedSize(committed);
56
- assertPreparedSize(local);
57
- validateCommitted(committed.document);
58
- await assertProjectRootIdentity(projectRoot);
59
- assertWritableWhenChanged(committed);
60
- assertWritableWhenChanged(local);
61
- await publishPrepared(committed, false, projectRoot);
62
- await assertProjectRootIdentity(projectRoot);
63
- await publishPrepared(local, true, projectRoot);
64
- await assertProjectRootIdentity(projectRoot);
65
- if (afterPersist === undefined) {
66
- return committed.document;
67
- }
68
- return await afterPersist(projectRoot.path);
69
- }));
70
- }
71
- /**
72
- * Derive a private, repository-external lock identity from the canonical root.
73
- *
74
- * The lock cannot live beside either config: the committed file would leave
75
- * transient untracked state, while the local file's exact ignore rule does not
76
- * cover an adjacent `.lock`. A user-private temp directory keeps lock metadata
77
- * outside version control; hashing avoids publishing project paths there.
78
- * @param projectRoot - Canonical project directory
79
- * @returns Hardened lock primitive target shared by every alias and process
80
- */
81
- async function resolveConfigLockTarget(projectRoot) {
82
- await mkdir(CONFIG_LOCK_DIRECTORY, {
83
- recursive: true,
84
- mode: LOCK_DIRECTORY_MODE,
85
- });
86
- const metadata = await lstat(CONFIG_LOCK_DIRECTORY);
87
- const currentUid = process.getuid?.();
88
- if (!metadata.isDirectory() ||
89
- metadata.isSymbolicLink() ||
90
- (currentUid !== undefined && metadata.uid !== currentUid) ||
91
- (process.platform !== "win32" &&
92
- (metadata.mode & LOCK_DIRECTORY_PRIVATE_BITS) !== 0)) {
93
- throw new Error("Unsafe UI config lock directory");
94
- }
95
- const canonicalLockDirectory = await realpath(CONFIG_LOCK_DIRECTORY);
96
- const identity = createHash("sha256").update(projectRoot).digest("hex");
97
- return path.join(canonicalLockDirectory, identity);
98
- }
99
- /**
100
- * Serialize whole mixed-file transactions per canonical project root.
101
- * @param projectRoot - Absolute project root used as the queue identity
102
- * @param operation - Complete snapshot, validate, and publish transaction
103
- * @returns Operation result after all earlier writes settle
104
- */
105
- async function withConfigWriteLock(projectRoot, operation) {
106
- const previous = configWriteQueues.get(projectRoot) ?? Promise.resolve();
107
- const running = previous.catch(() => undefined).then(operation);
108
- const marker = running.then(() => undefined, () => undefined);
109
- // eslint-disable-next-line functional/immutable-data -- per-project async queue
110
- configWriteQueues.set(projectRoot, marker);
111
- try {
112
- return await running;
113
- }
114
- finally {
115
- if (configWriteQueues.get(projectRoot) === marker) {
116
- // eslint-disable-next-line functional/immutable-data -- completed queue slot
117
- configWriteQueues.delete(projectRoot);
118
- }
119
- }
120
- }
121
- /**
122
- * Capture a bounded regular file without following a symlink or special entry.
123
- * @param target - Fixed config path inside the project root
124
- * @param filename - Public filename used only in safe diagnostics
125
- * @param projectRoot - Anchored directory identity checked around file access
126
- * @returns Existing strict-JSON image, or an empty absent-file image
127
- */
128
- async function readConfigSnapshot(target, filename, projectRoot) {
129
- try {
130
- await assertProjectRootIdentity(projectRoot);
131
- const before = await lstat(target);
132
- if (!before.isFile()) {
133
- throw new Error(`${filename} must be a regular file`);
134
- }
135
- if (before.size > MAX_CONFIG_BYTES) {
136
- throw new Error(`${filename} exceeds the 128 KiB safety limit`);
137
- }
138
- const handle = await open(target, "r");
139
- try {
140
- const opened = await handle.stat();
141
- if (!opened.isFile() ||
142
- opened.dev !== before.dev ||
143
- opened.ino !== before.ino) {
144
- throw new Error(`${filename} changed while it was opened`);
145
- }
146
- const bytes = await readBounded(handle);
147
- const after = await handle.stat();
148
- if (after.dev !== opened.dev ||
149
- after.ino !== opened.ino ||
150
- after.size !== bytes.byteLength) {
151
- throw new Error(`${filename} changed while it was read`);
152
- }
153
- const text = decodeUtf8(bytes, filename);
154
- const parsed = parseConfigDocument(text, filename);
155
- await assertProjectRootIdentity(projectRoot);
156
- return {
157
- target,
158
- filename,
159
- bytes,
160
- text,
161
- document: parsed,
162
- mode: before.mode & 0o7777,
163
- };
164
- }
165
- finally {
166
- await handle.close();
167
- }
168
- }
169
- catch (error) {
170
- if (error.code === "ENOENT") {
171
- await assertProjectRootIdentity(projectRoot);
172
- return {
173
- target,
174
- filename,
175
- bytes: undefined,
176
- text: "{}\n",
177
- document: {},
178
- mode: undefined,
179
- };
180
- }
181
- throw error;
182
- }
183
- }
184
- /**
185
- * Decode without replacement characters so a write can never normalize unsafe
186
- * source bytes into a different valid document.
187
- * @param bytes - Exact bounded file image
188
- * @param filename - Safe fixed filename used in diagnostics
189
- * @returns Valid UTF-8 text
190
- */
191
- function decodeUtf8(bytes, filename) {
192
- try {
193
- return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
194
- }
195
- catch {
196
- throw new Error(`${filename} must contain valid UTF-8`);
197
- }
198
- }
199
- /**
200
- * Read no more than the configured limit plus one sentinel byte.
201
- * @param handle - Already inode-verified regular-file handle
202
- * @param position - Next byte offset, used by bounded recursive reads
203
- * @param chunks - Immutable chunks collected so far
204
- * @returns Exact file bytes when within the safety limit
205
- */
206
- async function readBounded(handle, position = 0, chunks = []) {
207
- if (position > MAX_CONFIG_BYTES) {
208
- throw new Error("Config file exceeds the 128 KiB safety limit");
209
- }
210
- const remaining = MAX_CONFIG_BYTES + 1 - position;
211
- const buffer = Buffer.alloc(Math.min(READ_CHUNK_BYTES, remaining));
212
- const { bytesRead } = await handle.read(buffer, 0, buffer.length, position);
213
- if (bytesRead === 0) {
214
- return Buffer.concat(chunks, position);
215
- }
216
- return await readBounded(handle, position + bytesRead, [
217
- ...chunks,
218
- buffer.subarray(0, bytesRead),
219
- ]);
220
- }
221
- /**
222
- * Apply ordered dot-path edits while preserving untouched source bytes.
223
- * @param snapshot - Strict JSON source image
224
- * @param removals - Owner paths that must not remain in this non-owner file
225
- * @param changes - Routed values for this one target
226
- * @param exactRemovals - Exact property paths whose segments may contain dots
227
- * @returns Rendered text plus the matching prospective object
228
- */
229
- function prepareConfig(snapshot, removals, changes, exactRemovals = []) {
230
- return {
231
- snapshot,
232
- ...renderConfigChanges(snapshot, removals, changes, exactRemovals),
233
- };
234
- }
235
- /**
236
- * Refuse replacement of an existing target whose owner intentionally removed
237
- * every write bit; directory-level rename permission must not bypass that
238
- * policy, and a mixed request must fail before its first publish.
239
- * @param prepared - Fully rendered target awaiting publication
240
- */
241
- function assertWritableWhenChanged(prepared) {
242
- if (prepared.changed &&
243
- prepared.snapshot.mode !== undefined &&
244
- (prepared.snapshot.mode & WRITE_PERMISSION_BITS) === 0) {
245
- throw new Error(`${prepared.snapshot.filename} is read-only`);
246
- }
247
- }
248
- /**
249
- * Bound the rendered image, not only the source snapshot. Surgical insertion
250
- * can grow a previously valid file, and both targets must be rejected before
251
- * the first publish if either prospective image crosses the shared limit.
252
- * @param prepared - Fully rendered target awaiting publication
253
- */
254
- function assertPreparedSize(prepared) {
255
- if (Buffer.byteLength(prepared.text, "utf8") > MAX_CONFIG_BYTES) {
256
- throw new Error(`${prepared.snapshot.filename} exceeds the 128 KiB safety limit`);
257
- }
258
- }
259
- /**
260
- * Atomically publish a changed target after proving its source image is fresh.
261
- * A mode change is part of that image because restoring snapshot permissions
262
- * would otherwise undo a concurrent hardening even when the bytes still match.
263
- * @param prepared - Rendered target and its original snapshot
264
- * @param local - Whether a new file must be restricted to owner-only access
265
- * @param projectRoot - Anchored directory identity checked around publication
266
- */
267
- async function publishPrepared(prepared, local, projectRoot) {
268
- if (!prepared.changed)
269
- return;
270
- const mode = prepared.snapshot.mode ?? (local ? 0o600 : undefined);
271
- await assertProjectRootIdentity(projectRoot);
272
- await writeFileAtomically(prepared.snapshot.target, prepared.text, {
273
- ...(mode === undefined ? {} : { mode }),
274
- beforeRename: async () => {
275
- await assertProjectRootIdentity(projectRoot);
276
- const current = await readConfigSnapshot(prepared.snapshot.target, prepared.snapshot.filename, projectRoot);
277
- if (!sameBytes(current.bytes, prepared.snapshot.bytes) ||
278
- current.mode !== prepared.snapshot.mode) {
279
- throw new Error(`${prepared.snapshot.filename} changed before atomic replacement`);
280
- }
281
- await assertProjectRootIdentity(projectRoot);
282
- },
283
- });
284
- await assertProjectRootIdentity(projectRoot);
285
- }
286
- /**
287
- * Compare absent/present source images without coercing UTF-8 bytes.
288
- * @param current - Bytes observed immediately before replacement
289
- * @param original - Bytes used to render the prospective document
290
- * @returns Whether the target still contains the exact source image
291
- */
292
- function sameBytes(current, original) {
293
- if (current === undefined || original === undefined) {
294
- return current === original;
295
- }
296
- return current.equals(original);
297
- }
298
- //# sourceMappingURL=ui-config-write-persistence.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-persistence.js","sourceRoot":"","sources":["../../src/cli/ui-config-write-persistence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,GAET,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAE5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,WAAW,GAAG,mBAAmB,CAAC;AACxC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AACpD,MAAM,gBAAgB,GAAG,GAAG,GAAG,IAAI,CAAC;AACpC,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC;AACnC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AACpC,MAAM,2BAA2B,GAAG,KAAK,CAAC;AAC1C,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAClC,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CACrC,MAAM,EAAE,EACR,wBAAwB,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,MAAM,EAAE,CACvD,CAAC;AACF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAyB,CAAC;AAyC3D;;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AC;IAC9B,CAAC;IACD,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * @file ui-config-write-property-edits.ts
3
- * @description Minimal strict-JSON property edits against original source offsets.
4
- * @module cli/ui-config-write-property-edits
5
- */
6
- import { type Edit as JsonTextEdit, type Node as JsonNode } from "jsonc-parser";
7
- import type { JsonValue } from "../sync/json-path.js";
8
- /** One minimal source-relative property mutation after overlap collapse. */
9
- export interface ConfigPatch {
10
- /** Original syntax-tree path to replace, remove, or insert. */
11
- readonly path: readonly string[];
12
- /** Final value, or undefined when the property must be absent. */
13
- readonly value: JsonValue | undefined;
14
- /** Stable request order used for grouped insertions. */
15
- readonly order: number;
16
- }
17
- /** Direct child mutations sharing one original object node. */
18
- export interface ObjectPatchGroup {
19
- /** Original path of the object containing the direct children. */
20
- readonly parentPath: readonly string[];
21
- /** Direct property names to remove. */
22
- readonly removals: readonly string[];
23
- /** Missing direct properties to insert in request order. */
24
- readonly insertions: readonly ConfigPatch[];
25
- }
26
- /**
27
- * Plan direct child changes inside one original object.
28
- * @param text - Original strict JSON text
29
- * @param tree - Original syntax tree
30
- * @param group - Direct removals and insertions for one object
31
- * @returns Minimal edits for this object, all against original offsets
32
- */
33
- export declare function planObjectPatchEdits(text: string, tree: JsonNode, group: ObjectPatchGroup): readonly JsonTextEdit[];
34
- /**
35
- * Serialize a JSON value while refusing the impossible `undefined` result.
36
- * @param value - Registry-validated JSON value
37
- * @returns Strict JSON syntax for only the targeted value span
38
- */
39
- export declare function serializeConfigValue(value: JsonValue): string;
40
- //# sourceMappingURL=ui-config-write-property-edits.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-property-edits.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write-property-edits.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAEL,KAAK,IAAI,IAAI,YAAY,EACzB,KAAK,IAAI,IAAI,QAAQ,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,kEAAkE;IAClE,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IACtC,wDAAwD;IACxD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;CAC7C;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,gBAAgB,GACtB,SAAS,YAAY,EAAE,CA+BzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAM7D"}