@codyswann/lisa 4.107.0 → 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 (375) 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 -140
  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 -10
  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/scripts/check-ui-demo-data.mjs +0 -102
  374. package/ui/README.md +0 -448
  375. package/ui/index.html +0 -14392
@@ -1,383 +0,0 @@
1
- import { randomBytes } from "node:crypto";
2
- import { existsSync } from "node:fs";
3
- import { readFile } from "node:fs/promises";
4
- import * as http from "node:http";
5
- import * as path from "node:path";
6
- import { fileURLToPath } from "node:url";
7
- import { runConfigSync } from "../sync/config-sync.js";
8
- import { printSyncReport } from "./sync-cmd.js";
9
- import { inspectRemoteEnvironment, } from "./remote-environment.js";
10
- import { createCiQualityJobsProbe } from "./ui-ci-quality-jobs.js";
11
- import { createDeployPipelineProbe } from "./ui-deploy-pipeline.js";
12
- import { createDetectedStacksProbe } from "./ui-detected-stacks.js";
13
- import { createGithubRepoProbe } from "./ui-github-repo.js";
14
- import { createLisaVersionProbe } from "./ui-lisa-version.js";
15
- import { createGithubAuthProbe, readStatusSnapshot, validateStatusProbes, } from "./ui-status.js";
16
- import { createEnabledPluginsProbe } from "./ui-enabled-plugins.js";
17
- import { createAutomationsProbe } from "./ui-automations.js";
18
- import { createObservabilityProviderProbes } from "./ui-observability-providers.js";
19
- import { createUiStarterSyncHandler, } from "./ui-starter-sync.js";
20
- import { serveConfigWrite } from "./ui-config-write.js";
21
- import { createGateReportHandler, } from "./ui-gate-report.js";
22
- import { createUiHealthHandler, } from "./ui-health.js";
23
- import { createSetupReadinessReader, readMergedUiConfig, } from "./ui-setup-readiness.js";
24
- export { createGithubAuthProbe, runProbe, } from "./ui-status.js";
25
- export { createGithubRepoProbe } from "./ui-github-repo.js";
26
- export { createEnabledPluginsProbe, buildEnabledPluginsValue, listMarketplacePluginsFromDisk, } from "./ui-enabled-plugins.js";
27
- export { createDeployPipelineProbe, DEPLOY_PIPELINE_PROBE_ID, } from "./ui-deploy-pipeline.js";
28
- export { createDetectedStacksProbe, DETECTED_STACKS_PROBE_ID, } from "./ui-detected-stacks.js";
29
- export { createLisaVersionProbe, mapLisaVersionCheck, } from "./ui-lisa-version.js";
30
- export { createCiQualityJobsProbe, computeCiQualityJobs, parseCiWorkflowInputs, CI_QUALITY_JOBS_PROBE_ID, } from "./ui-ci-quality-jobs.js";
31
- export { createObservabilityProviderProbes } from "./ui-observability-providers.js";
32
- export { createGateReportHandler, readGateReport, } from "./ui-gate-report.js";
33
- export { inspectRemoteEnvironment } from "./remote-environment.js";
34
- /** Default port for the settings console. */
35
- export const DEFAULT_UI_PORT = 4780;
36
- const JSON_CONTENT_TYPE = "application/json; charset=utf-8";
37
- const NO_STORE = "no-store";
38
- const TEXT_CONTENT_TYPE = "text/plain; charset=utf-8";
39
- /**
40
- * Register the console and its server-bound starter attribution.
41
- * @param program - Root CLI program.
42
- * @param run - Console startup operation.
43
- */
44
- export function addUiCommand(program, run) {
45
- program
46
- .command("ui")
47
- .description("Serve the Lisa settings console for a project (runs a config sync first)")
48
- .argument("[path]", "Project directory (defaults to current directory)")
49
- .option("--port <port>", "Port to listen on", "4780")
50
- .option("--no-sync", "Skip the config sync on startup")
51
- .option("--work-item <ref>", "Work item for starter-sync commits")
52
- .option("--co-author <identity>", "Actual agent co-author for starter-sync commits")
53
- .action(async (targetPath, options) => {
54
- await run(targetPath, options);
55
- });
56
- }
57
- /**
58
- * Read the CLI process environment through one explicit, reviewable exception.
59
- * Only boolean presence checks derived from this map reach the browser.
60
- * @returns Current process environment
61
- */
62
- function getProcessEnvironment() {
63
- // eslint-disable-next-line no-restricted-syntax -- CLI status view must inspect externally supplied remote-environment variables once
64
- return process.env;
65
- }
66
- /**
67
- * Locate the packaged `ui/index.html` by walking up from this module until a
68
- * directory containing `ui/index.html` is found (works from both `src/` and
69
- * the compiled `dist/`).
70
- * @param startDir - Directory to start searching from
71
- * @returns Absolute path to ui/index.html
72
- */
73
- export function findUiHtml(startDir) {
74
- const candidate = path.join(startDir, "ui", "index.html");
75
- if (existsSync(candidate)) {
76
- return candidate;
77
- }
78
- const parent = path.dirname(startDir);
79
- if (parent === startDir) {
80
- throw new Error("Unable to locate the packaged ui/index.html");
81
- }
82
- return findUiHtml(parent);
83
- }
84
- /**
85
- * Inject the live config into the console HTML as a script tag. The JSON is
86
- * escaped so a value containing `</script>` cannot break out of the tag.
87
- * @param html - Packaged console HTML
88
- * @param config - Merged live config
89
- * @param remoteEnvironment - Boolean-only secret and startup-artifact status
90
- * @returns HTML with the injected config
91
- */
92
- export function injectLiveConfig(html, config, remoteEnvironment = {
93
- projectTypes: [],
94
- variables: [],
95
- startupScripts: [],
96
- }) {
97
- const payload = JSON.stringify(config).replace(/<\//g, "<\\/");
98
- const remotePayload = JSON.stringify(remoteEnvironment).replace(/<\//g, "<\\/");
99
- const tag = `<script>window.LISA_LIVE_CONFIG = ${payload}; window.LISA_REMOTE_ENVIRONMENT = ${remotePayload};</script>`;
100
- return html.replace("</body>", `${tag}\n</body>`);
101
- }
102
- /**
103
- * Create a single-flight reader that coalesces concurrent status requests.
104
- * @param probes - Validated live-status probes
105
- * @returns Snapshot reader shared by one UI server
106
- */
107
- function createStatusSnapshotReader(probes) {
108
- // eslint-disable-next-line functional/no-let -- single-flight state clears after settlement
109
- let inFlight;
110
- return () => {
111
- if (inFlight === undefined) {
112
- const pending = readStatusSnapshot(probes);
113
- inFlight = pending;
114
- const clear = () => {
115
- if (inFlight === pending) {
116
- inFlight = undefined;
117
- }
118
- };
119
- void pending.then(clear, clear);
120
- }
121
- return inFlight;
122
- };
123
- }
124
- /**
125
- * Coalesce concurrent first-open setup reads without caching later requests.
126
- * @param readCurrent - Current projection reader
127
- * @returns Single-flight reader that clears after settlement
128
- */
129
- function createSetupReadinessSnapshotReader(readCurrent) {
130
- // eslint-disable-next-line functional/no-let -- single-flight state clears after settlement
131
- let inFlight;
132
- return () => {
133
- if (inFlight === undefined) {
134
- const pending = readCurrent();
135
- inFlight = pending;
136
- const clear = () => {
137
- if (inFlight === pending)
138
- inFlight = undefined;
139
- };
140
- void pending.then(clear, clear);
141
- }
142
- return inFlight;
143
- };
144
- }
145
- /**
146
- * Serve the same-origin live-status endpoint.
147
- * @param request - Incoming loopback request
148
- * @param response - Response associated with the request
149
- * @param readSnapshot - Single-flight status snapshot reader
150
- */
151
- function serveStatus(request, response, readSnapshot) {
152
- if (request.method === "HEAD") {
153
- response.writeHead(200, {
154
- "cache-control": NO_STORE,
155
- "content-type": JSON_CONTENT_TYPE,
156
- });
157
- response.end();
158
- return;
159
- }
160
- if (request.method !== "GET") {
161
- response.writeHead(405, {
162
- allow: "GET, HEAD",
163
- "cache-control": NO_STORE,
164
- "content-type": TEXT_CONTENT_TYPE,
165
- });
166
- response.end("Method not allowed");
167
- return;
168
- }
169
- void readSnapshot()
170
- .then(snapshot => {
171
- response.writeHead(200, {
172
- "cache-control": NO_STORE,
173
- "content-type": JSON_CONTENT_TYPE,
174
- });
175
- response.end(JSON.stringify({ probes: snapshot }));
176
- })
177
- .catch(error => {
178
- response.writeHead(500, {
179
- "cache-control": NO_STORE,
180
- "content-type": JSON_CONTENT_TYPE,
181
- });
182
- response.end(JSON.stringify({
183
- error: error instanceof Error ? error.message : String(error),
184
- }));
185
- });
186
- }
187
- /**
188
- * Serve a current, non-persisted Setup readiness projection.
189
- * @param request - Incoming loopback request
190
- * @param response - Response associated with the request
191
- * @param readCurrent - Current projection reader
192
- */
193
- function serveSetupReadiness(request, response, readCurrent) {
194
- if (request.method === "HEAD") {
195
- response.writeHead(200, {
196
- "cache-control": NO_STORE,
197
- "content-type": JSON_CONTENT_TYPE,
198
- });
199
- response.end();
200
- return;
201
- }
202
- if (request.method !== "GET") {
203
- response.writeHead(405, {
204
- allow: "GET, HEAD",
205
- "cache-control": NO_STORE,
206
- "content-type": TEXT_CONTENT_TYPE,
207
- });
208
- response.end("Method not allowed");
209
- return;
210
- }
211
- void readCurrent().then(result => {
212
- response.writeHead(200, {
213
- "cache-control": NO_STORE,
214
- "content-type": JSON_CONTENT_TYPE,
215
- });
216
- response.end(JSON.stringify(result));
217
- }, () => {
218
- response.writeHead(500, {
219
- "cache-control": NO_STORE,
220
- "content-type": JSON_CONTENT_TYPE,
221
- });
222
- response.end(JSON.stringify({ error: "Unable to observe setup readiness" }));
223
- });
224
- }
225
- /**
226
- * Parse an HTTP request target without allowing malformed input to escape.
227
- * @param requestUrl - Raw request target supplied by Node HTTP
228
- * @returns Parsed pathname, or undefined for an invalid target
229
- */
230
- function requestPathname(requestUrl) {
231
- try {
232
- return new URL(requestUrl, "http://127.0.0.1").pathname;
233
- }
234
- catch {
235
- return undefined;
236
- }
237
- }
238
- /**
239
- * Restrict loopback requests to the authority advertised by `lisa ui`.
240
- * @param host - Incoming HTTP Host header
241
- * @returns Whether the authority is 127.0.0.1 with an optional valid port
242
- */
243
- function isLoopbackHost(host) {
244
- if (host === "127.0.0.1") {
245
- return true;
246
- }
247
- const prefix = "127.0.0.1:";
248
- if (host === undefined || !host.startsWith(prefix)) {
249
- return false;
250
- }
251
- const portText = host.slice(prefix.length);
252
- const digitsOnly = Array.from(portText).every(character => character >= "0" && character <= "9");
253
- const port = Number(portText);
254
- return (portText.length > 0 &&
255
- portText.length <= 5 &&
256
- digitsOnly &&
257
- port > 0 &&
258
- port <= 65_535);
259
- }
260
- /**
261
- * Build the request handler after validating the complete probe registry.
262
- * @param page - Hydrated settings console HTML
263
- * @param probes - Live-status probes registered for this server
264
- * @param destDir - Project root served by this UI process
265
- * @param starterCapability - Per-launch credential for the Git-mutating route
266
- * @param healthDependencies - Injectable Health v1 storage/run boundaries
267
- * @param setupReadinessDependencies - Injectable read-only Setup boundaries
268
- * @param gateReportDependencies - Injectable read-only Doctor boundaries
269
- * @param starterSyncDependencies - Existing starter landing operation
270
- * @param options - Server-bound commit attribution
271
- * @returns Loopback HTTP request handler
272
- */
273
- function createUiRequestHandler(page, probes, destDir, starterCapability, healthDependencies = {}, setupReadinessDependencies = {}, gateReportDependencies = {}, starterSyncDependencies = {}, options = {}) {
274
- const readSnapshot = createStatusSnapshotReader(probes);
275
- const serveHealth = createUiHealthHandler(destDir, healthDependencies);
276
- const serveStarterSync = createUiStarterSyncHandler({
277
- path: destDir,
278
- ...(options.workItem ? { workItem: options.workItem } : {}),
279
- ...(options.coAuthor ? { coAuthor: options.coAuthor } : {}),
280
- }, starterCapability, starterSyncDependencies);
281
- const serveGateReport = createGateReportHandler(destDir, gateReportDependencies);
282
- const readCurrentSetup = createSetupReadinessSnapshotReader(createSetupReadinessReader(destDir, setupReadinessDependencies));
283
- validateStatusProbes(probes);
284
- return (request, response) => {
285
- if (!isLoopbackHost(request.headers.host)) {
286
- response.writeHead(400, { "content-type": TEXT_CONTENT_TYPE });
287
- response.end("Bad request");
288
- return;
289
- }
290
- const pathname = requestPathname(request.url ?? "/");
291
- if (pathname === undefined) {
292
- response.writeHead(400, { "content-type": TEXT_CONTENT_TYPE });
293
- response.end("Bad request");
294
- return;
295
- }
296
- if (pathname === "/api/status") {
297
- serveStatus(request, response, readSnapshot);
298
- return;
299
- }
300
- if (pathname === "/api/config") {
301
- serveConfigWrite(request, response, destDir);
302
- return;
303
- }
304
- if (pathname === "/api/starter-sync") {
305
- serveStarterSync(request, response);
306
- return;
307
- }
308
- if (pathname === "/api/health") {
309
- serveHealth(request, response);
310
- return;
311
- }
312
- if (pathname === "/api/setup-readiness") {
313
- serveSetupReadiness(request, response, readCurrentSetup);
314
- return;
315
- }
316
- if (pathname === "/api/gate-report") {
317
- serveGateReport(request, response);
318
- return;
319
- }
320
- if (pathname === "/" || pathname === "/index.html") {
321
- response.writeHead(200, { "content-type": "text/html; charset=utf-8" });
322
- response.end(page);
323
- return;
324
- }
325
- response.writeHead(404, { "content-type": "text/plain" });
326
- response.end("Not found");
327
- };
328
- }
329
- /**
330
- * Run the `lisa ui` command: sync, then serve the console until interrupted.
331
- * @param targetPath - Project path argument (defaults to the current directory)
332
- * @param options - CLI options
333
- * @param dependencies - Optional status probes for tests and extensions
334
- * @returns The listening server (callers/tests are responsible for closing it)
335
- */
336
- export async function runUi(targetPath, options = {}, dependencies = {}) {
337
- const destDir = path.resolve(targetPath ?? ".");
338
- const port = Number.parseInt(options.port ?? `${DEFAULT_UI_PORT}`, 10);
339
- if (Number.isNaN(port) || port < 0 || port > 65535) {
340
- throw new Error(`Invalid --port value: ${options.port}`);
341
- }
342
- if (options.sync !== false) {
343
- const report = await runConfigSync(destDir);
344
- printSyncReport(report);
345
- }
346
- const moduleDir = path.dirname(fileURLToPath(import.meta.url));
347
- const htmlPath = findUiHtml(moduleDir);
348
- const html = await readFile(htmlPath, "utf8");
349
- // Keep the read-only console available when config is malformed or unsafe;
350
- // probes receive no claims instead of importing untrusted evidence. The
351
- // config write endpoint still reads the originals strictly and fails closed.
352
- const config = await readMergedUiConfig(destDir).catch(() => ({}));
353
- const remoteEnvironment = await inspectRemoteEnvironment(destDir, config, getProcessEnvironment());
354
- const page = injectLiveConfig(html, config, remoteEnvironment);
355
- const starterCapability = randomBytes(32).toString("hex");
356
- const probes = dependencies.probes ?? [
357
- createGithubAuthProbe(destDir),
358
- createEnabledPluginsProbe(destDir),
359
- createDetectedStacksProbe(destDir),
360
- createLisaVersionProbe(),
361
- createCiQualityJobsProbe(destDir, config),
362
- createDeployPipelineProbe(destDir),
363
- createGithubRepoProbe(destDir, config),
364
- ...createObservabilityProviderProbes(),
365
- createAutomationsProbe({ cwd: destDir }),
366
- ];
367
- const server = http.createServer(createUiRequestHandler(page, probes, destDir, starterCapability, dependencies.health, dependencies.setupReadiness, dependencies.gateReport, dependencies.starterSync, options));
368
- await new Promise(resolve => {
369
- server.listen(port, "127.0.0.1", resolve);
370
- });
371
- const address = server.address();
372
- const boundPort = typeof address === "object" && address !== null ? address.port : port;
373
- const launchUrl = `http://127.0.0.1:${boundPort}/#lisa-token=${starterCapability}`;
374
- console.log(`Lisa console for ${destDir}`);
375
- if (dependencies.onListening)
376
- dependencies.onListening(launchUrl);
377
- else
378
- console.log(` → ${launchUrl}`);
379
- console.log("Press Ctrl+C to stop.");
380
- return server;
381
- }
382
- /* eslint-enable max-lines -- restore repository default */
383
- //# sourceMappingURL=ui-cmd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-cmd.js","sourceRoot":"","sources":["../../src/cli/ui-cmd.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OA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O,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IACjC,MAAM,SAAS,GACb,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACxE,MAAM,SAAS,GAAG,oBAAoB,SAAS,gBAAgB,iBAAiB,EAAE,CAAC;IACnF,OAAO,CAAC,GAAG,CAAC,oBAAoB,OAAO,EAAE,CAAC,CAAC;IAC3C,IAAI,YAAY,CAAC,WAAW;QAAE,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;;QAC7D,OAAO,CAAC,GAAG,CAAC,OAAO,SAAS,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC;AAChB,CAAC;AACD,2DAA2D"}
@@ -1,53 +0,0 @@
1
- import { type JsonObject, type JsonValue } from "../sync/json-path.js";
2
- /** Minimum source image needed for one surgical render. */
3
- export interface ConfigDocumentSource {
4
- /** Fixed public filename used only in safe diagnostics. */
5
- readonly filename: string;
6
- /** Strict UTF-8 JSON source. */
7
- readonly text: string;
8
- /** Semantic source document paired with the text. */
9
- readonly document: JsonObject;
10
- }
11
- /** Fully checked textual and semantic prospective document. */
12
- export interface RenderedConfigDocument {
13
- /** Surgical strict-JSON text ready for atomic persistence. */
14
- readonly text: string;
15
- /** Reparsing result proven structurally equal to the requested edits. */
16
- readonly document: JsonObject;
17
- /** Whether any owner set or non-owner cleanup changed the source. */
18
- readonly changed: boolean;
19
- }
20
- /**
21
- * Parse one strict, unambiguous object document.
22
- *
23
- * `JSON.parse` deliberately accepts duplicate object properties using
24
- * last-value-wins semantics, while a positional syntax-tree lookup can select
25
- * an earlier occurrence. Rejecting duplicates prevents those two views from
26
- * claiming a successful write to different semantic documents.
27
- * @param text - Strict JSON source or rendered candidate
28
- * @param filename - Safe fixed filename used in diagnostics
29
- * @returns Parsed JSON object with exactly one value per property
30
- */
31
- export declare function parseConfigDocument(text: string, filename: string): JsonObject;
32
- /**
33
- * Parse strict JSON while refusing recursively duplicated property names.
34
- *
35
- * This remains separate from the object-document contract because HTTP input
36
- * must reject ambiguity before payload shape validation, while preserving the
37
- * existing shape-specific 400 responses for valid arrays and scalars.
38
- * @param text - Strict JSON source from a bounded, fatal UTF-8 decode
39
- * @param filename - Safe fixed label used in diagnostics
40
- * @returns Parsed JSON value with exactly one value per object property
41
- */
42
- export declare function parseUnambiguousJson(text: string, filename: string): unknown;
43
- /**
44
- * Apply owner sets after non-owner removals and prove both representations
45
- * agree. Ordering is significant for overlapping ancestor/descendant inputs.
46
- * @param source - Strict source image to edit
47
- * @param removals - Routed owner paths removed from this non-owner document
48
- * @param changes - Routed values owned by this document
49
- * @param exactRemovals - Exact property paths whose segments may contain dots
50
- * @returns Reparsing-verified prospective document and surgical text
51
- */
52
- export declare function renderConfigChanges(source: ConfigDocumentSource, removals: readonly string[], changes: Readonly<Record<string, JsonValue>>, exactRemovals?: readonly (readonly string[])[]): RenderedConfigDocument;
53
- //# sourceMappingURL=ui-config-write-document.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ui-config-write-document.d.ts","sourceRoot":"","sources":["../../src/cli/ui-config-write-document.ts"],"names":[],"mappings":"AAQA,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAM9B,2DAA2D;AAC3D,MAAM,WAAW,oBAAoB;IACnC,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;CAC/B;AAED,+DAA+D;AAC/D,MAAM,WAAW,sBAAsB;IACrC,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AASD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,UAAU,CAMZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAU5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,oBAAoB,EAC5B,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,EAC5C,aAAa,GAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAO,GACjD,sBAAsB,CAiCxB"}
@@ -1,212 +0,0 @@
1
- /**
2
- * Strict, ambiguity-free surgical editing for UI config documents.
3
- *
4
- * Strict parsing and the prospective semantic edit stay paired here so the
5
- * source-relative planner can be checked by reparsing before publication.
6
- * @module cli/ui-config-write-document
7
- */
8
- import { applyEdits, parseTree } from "jsonc-parser";
9
- import { getAtPropertyPath, isJsonObject, jsonEquals, } from "../sync/json-path.js";
10
- import { planConfigTextEdits, } from "./ui-config-write-patch-plan.js";
11
- /**
12
- * Parse one strict, unambiguous object document.
13
- *
14
- * `JSON.parse` deliberately accepts duplicate object properties using
15
- * last-value-wins semantics, while a positional syntax-tree lookup can select
16
- * an earlier occurrence. Rejecting duplicates prevents those two views from
17
- * claiming a successful write to different semantic documents.
18
- * @param text - Strict JSON source or rendered candidate
19
- * @param filename - Safe fixed filename used in diagnostics
20
- * @returns Parsed JSON object with exactly one value per property
21
- */
22
- export function parseConfigDocument(text, filename) {
23
- const parsed = parseUnambiguousJson(text, filename);
24
- if (!isJsonObject(parsed)) {
25
- throw new Error(`${filename} must contain a JSON object`);
26
- }
27
- return parsed;
28
- }
29
- /**
30
- * Parse strict JSON while refusing recursively duplicated property names.
31
- *
32
- * This remains separate from the object-document contract because HTTP input
33
- * must reject ambiguity before payload shape validation, while preserving the
34
- * existing shape-specific 400 responses for valid arrays and scalars.
35
- * @param text - Strict JSON source from a bounded, fatal UTF-8 decode
36
- * @param filename - Safe fixed label used in diagnostics
37
- * @returns Parsed JSON value with exactly one value per object property
38
- */
39
- export function parseUnambiguousJson(text, filename) {
40
- const parsed = JSON.parse(text);
41
- const tree = parseTree(text, [], {
42
- allowTrailingComma: false,
43
- disallowComments: true,
44
- });
45
- if (tree === undefined || hasDuplicateObjectKey(tree)) {
46
- throw new Error(`${filename} contains duplicate object keys`);
47
- }
48
- return parsed;
49
- }
50
- /**
51
- * Apply owner sets after non-owner removals and prove both representations
52
- * agree. Ordering is significant for overlapping ancestor/descendant inputs.
53
- * @param source - Strict source image to edit
54
- * @param removals - Routed owner paths removed from this non-owner document
55
- * @param changes - Routed values owned by this document
56
- * @param exactRemovals - Exact property paths whose segments may contain dots
57
- * @returns Reparsing-verified prospective document and surgical text
58
- */
59
- export function renderConfigChanges(source, removals, changes, exactRemovals = []) {
60
- const edits = [
61
- ...removals.map(key => ({ kind: "remove", path: key.split(".") })),
62
- ...exactRemovals.map(path => ({ kind: "remove", path })),
63
- ...Object.entries(changes).map(([key, value]) => ({ kind: "set", path: key.split("."), value })),
64
- ];
65
- const prospective = edits.reduce((state, edit) => applySemanticEdit(state, edit), {
66
- document: source.document,
67
- changed: false,
68
- touched: [],
69
- });
70
- if (!prospective.changed) {
71
- return { text: source.text, document: source.document, changed: false };
72
- }
73
- const tree = requireConfigTree(source.text, source.filename);
74
- const textEdits = planConfigTextEdits(source.text, tree, source.document, prospective.document, prospective.touched);
75
- const renderedText = applyEdits(source.text, [...textEdits]);
76
- const reparsed = parseConfigDocument(renderedText, source.filename);
77
- if (!jsonEquals(reparsed, prospective.document)) {
78
- throw new Error(`${source.filename} surgical edit was ambiguous`);
79
- }
80
- return { text: renderedText, document: reparsed, changed: true };
81
- }
82
- /**
83
- * Detect ambiguity recursively because a changed path may sit below a duplicate
84
- * ancestor even when its own final property appears only once.
85
- * @param node - Strict JSON syntax tree node
86
- * @returns Whether any object contains the same property more than once
87
- */
88
- function hasDuplicateObjectKey(node) {
89
- if (node.type === "object") {
90
- const keys = (node.children ?? [])
91
- .map(property => property.children?.[0]?.value)
92
- .filter((key) => typeof key === "string");
93
- if (new Set(keys).size !== keys.length) {
94
- return true;
95
- }
96
- }
97
- return (node.children ?? []).some(hasDuplicateObjectKey);
98
- }
99
- /**
100
- * Apply one edit to the prospective object before planning source ranges.
101
- * @param state - Semantic result accumulated from earlier ordered edits
102
- * @param edit - Owner set or non-owner removal
103
- * @returns Prospective state plus only the edits that changed semantics
104
- */
105
- function applySemanticEdit(state, edit) {
106
- if (edit.kind === "remove") {
107
- assertRemovalPathIsReachable(state.document, edit.path);
108
- }
109
- const current = getAtPropertyPath(state.document, edit.path);
110
- if ((edit.kind === "remove" && current === undefined) ||
111
- (edit.kind === "set" && jsonEquals(current, edit.value))) {
112
- return state;
113
- }
114
- return {
115
- document: edit.kind === "remove"
116
- ? removeAtPropertyPath(state.document, edit.path)
117
- : setAtPropertyPath(state.document, edit.path, edit.value),
118
- changed: true,
119
- touched: [...state.touched, edit],
120
- };
121
- }
122
- /**
123
- * Reparse the already validated source into the positional tree used for edits.
124
- * @param text - Original strict JSON bytes decoded as text
125
- * @param filename - Safe fixed filename used in diagnostics
126
- * @returns Root object node whose offsets all refer to the original text
127
- */
128
- function requireConfigTree(text, filename) {
129
- const tree = parseTree(text, [], {
130
- allowTrailingComma: false,
131
- disallowComments: true,
132
- });
133
- if (tree?.type !== "object") {
134
- throw new Error(`${filename} must contain a JSON object`);
135
- }
136
- return tree;
137
- }
138
- /**
139
- * Refuse descendant cleanup when a scalar or array ancestor shadows its owner.
140
- * Deleting that ancestor would also delete data outside the routed path, while
141
- * treating the cleanup as a no-op would leave overlay precedence unchanged.
142
- * @param root - Non-owner document being reconciled
143
- * @param propertyPath - Exact routed owner path that must become absent here
144
- */
145
- function assertRemovalPathIsReachable(root, propertyPath) {
146
- const ancestors = propertyPath.slice(0, -1);
147
- assertObjectAncestors(root, ancestors);
148
- }
149
- /**
150
- * Walk only present ancestors: an absent branch cannot shadow anything, while
151
- * every present branch must remain an object for exact descendant removal.
152
- * @param node - Present object at the current path depth
153
- * @param segments - Remaining ancestor segments before the routed leaf
154
- */
155
- function assertObjectAncestors(node, segments) {
156
- const [head, ...rest] = segments;
157
- if (head === undefined)
158
- return;
159
- const child = node[head];
160
- if (child === undefined)
161
- return;
162
- if (!isJsonObject(child)) {
163
- throw new Error("Config owner cleanup is blocked by a non-object ancestor");
164
- }
165
- assertObjectAncestors(child, rest);
166
- }
167
- /**
168
- * Remove exactly one property path while retaining every ancestor and sibling.
169
- * @param root - Prospective object to copy
170
- * @param propertyPath - Exact path being removed from the non-owner document
171
- * @returns Object without that path and with unrelated siblings intact
172
- */
173
- function removeAtPropertyPath(root, propertyPath) {
174
- const [head, ...rest] = propertyPath;
175
- if (head === undefined) {
176
- throw new Error("Config root removal is not writable");
177
- }
178
- if (rest.length === 0) {
179
- const { [head]: _removed, ...remaining } = root;
180
- return remaining;
181
- }
182
- const child = root[head];
183
- if (!isJsonObject(child)) {
184
- return root;
185
- }
186
- return { ...root, [head]: removeAtPropertyPath(child, rest) };
187
- }
188
- /**
189
- * Immutably set an exact property path, creating missing object ancestors.
190
- * @param root - Object to copy
191
- * @param propertyPath - Exact decoded property names
192
- * @param value - JSON value to write
193
- * @returns Updated object
194
- */
195
- function setAtPropertyPath(root, propertyPath, value) {
196
- const [head, ...rest] = propertyPath;
197
- if (head === undefined) {
198
- if (!isJsonObject(value)) {
199
- throw new Error("Config root replacement requires an object value");
200
- }
201
- return value;
202
- }
203
- if (rest.length === 0) {
204
- return { ...root, [head]: value };
205
- }
206
- const child = root[head];
207
- return {
208
- ...root,
209
- [head]: setAtPropertyPath(isJsonObject(child) ? child : {}, rest, value),
210
- };
211
- }
212
- //# sourceMappingURL=ui-config-write-document.js.map