@codyswann/lisa 7.1.4 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (661) hide show
  1. package/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +0 -2
  2. package/all/copy-overwrite/scripts/lib/push-timing.mjs +3 -6
  3. package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -32
  4. package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +201 -20
  5. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -2
  6. package/dist/cli/admit-cmd.d.ts.map +1 -1
  7. package/dist/cli/admit-cmd.js +16 -10
  8. package/dist/cli/admit-cmd.js.map +1 -1
  9. package/dist/cli/apply.d.ts.map +1 -1
  10. package/dist/cli/apply.js +2 -2
  11. package/dist/cli/apply.js.map +1 -1
  12. package/dist/cli/check-cmd.d.ts.map +1 -1
  13. package/dist/cli/check-cmd.js +8 -4
  14. package/dist/cli/check-cmd.js.map +1 -1
  15. package/dist/cli/doctor-coderabbit.js +2 -2
  16. package/dist/cli/doctor-coderabbit.js.map +1 -1
  17. package/dist/cli/doctor-readiness-supply-chain-python.d.ts +5 -1
  18. package/dist/cli/doctor-readiness-supply-chain-python.d.ts.map +1 -1
  19. package/dist/cli/doctor-readiness-supply-chain-python.js +44 -10
  20. package/dist/cli/doctor-readiness-supply-chain-python.js.map +1 -1
  21. package/dist/cli/doctor-readiness.js +2 -2
  22. package/dist/cli/doctor-readiness.js.map +1 -1
  23. package/dist/cli/doctor-worker-journey.js +2 -2
  24. package/dist/cli/doctor-worker-journey.js.map +1 -1
  25. package/dist/cli/doctor.d.ts.map +1 -1
  26. package/dist/cli/doctor.js +7 -4
  27. package/dist/cli/doctor.js.map +1 -1
  28. package/dist/cli/file-upstream-cmd.d.ts.map +1 -1
  29. package/dist/cli/file-upstream-cmd.js +20 -25
  30. package/dist/cli/file-upstream-cmd.js.map +1 -1
  31. package/dist/cli/gh-cli.d.ts +2 -2
  32. package/dist/cli/gh-cli.d.ts.map +1 -1
  33. package/dist/cli/gh-cli.js +13 -6
  34. package/dist/cli/gh-cli.js.map +1 -1
  35. package/dist/cli/health-cmd.d.ts.map +1 -1
  36. package/dist/cli/health-cmd.js +7 -19
  37. package/dist/cli/health-cmd.js.map +1 -1
  38. package/dist/cli/lisa-test-run-jest-merge.js +5 -5
  39. package/dist/cli/lisa-test-run-jest-merge.js.map +1 -1
  40. package/dist/cli/lisa-test-run.js +8 -4
  41. package/dist/cli/lisa-test-run.js.map +1 -1
  42. package/dist/cli/pr-landing.js +2 -2
  43. package/dist/cli/pr-landing.js.map +1 -1
  44. package/dist/cli/update-check.d.ts.map +1 -1
  45. package/dist/cli/update-check.js +7 -4
  46. package/dist/cli/update-check.js.map +1 -1
  47. package/dist/cli/update-cmd.d.ts.map +1 -1
  48. package/dist/cli/update-cmd.js +7 -4
  49. package/dist/cli/update-cmd.js.map +1 -1
  50. package/dist/cli/worktree-ownership.d.ts.map +1 -1
  51. package/dist/cli/worktree-ownership.js +3 -3
  52. package/dist/cli/worktree-ownership.js.map +1 -1
  53. package/dist/codex/hooks-catalog.d.ts +151 -0
  54. package/dist/codex/hooks-catalog.d.ts.map +1 -0
  55. package/dist/codex/hooks-catalog.js +315 -0
  56. package/dist/codex/hooks-catalog.js.map +1 -0
  57. package/dist/codex/hooks-compatibility.d.ts +14 -0
  58. package/dist/codex/hooks-compatibility.d.ts.map +1 -0
  59. package/dist/codex/hooks-compatibility.js +196 -0
  60. package/dist/codex/hooks-compatibility.js.map +1 -0
  61. package/dist/codex/hooks-installer.d.ts +2 -49
  62. package/dist/codex/hooks-installer.d.ts.map +1 -1
  63. package/dist/codex/hooks-installer.js +5 -546
  64. package/dist/codex/hooks-installer.js.map +1 -1
  65. package/dist/codex/hooks-source-links.d.ts +11 -0
  66. package/dist/codex/hooks-source-links.d.ts.map +1 -0
  67. package/dist/codex/hooks-source-links.js +74 -0
  68. package/dist/codex/hooks-source-links.js.map +1 -0
  69. package/dist/codex/scripts/block-migration-edits.sh +2 -2
  70. package/dist/codex/scripts/block-suppress-directives.sh +3 -3
  71. package/dist/codex/scripts/format-on-edit.sh +2 -2
  72. package/dist/codex/scripts/lint-on-edit.sh +2 -2
  73. package/dist/codex/scripts/lisa-edit-gate.sh +19 -15
  74. package/dist/codex/scripts/rubocop-on-edit.sh +2 -2
  75. package/dist/codex/scripts/sg-scan-on-edit.sh +2 -2
  76. package/dist/configs/coverage-scope.d.ts +0 -23
  77. package/dist/configs/coverage-scope.d.ts.map +1 -1
  78. package/dist/configs/coverage-scope.js +2 -3
  79. package/dist/configs/coverage-scope.js.map +1 -1
  80. package/dist/configs/eslint/base.d.ts +2 -113
  81. package/dist/configs/eslint/base.d.ts.map +1 -1
  82. package/dist/configs/eslint/base.js +2 -165
  83. package/dist/configs/eslint/base.js.map +1 -1
  84. package/dist/configs/eslint/cdk.d.ts.map +1 -1
  85. package/dist/configs/eslint/cdk.js +82 -66
  86. package/dist/configs/eslint/cdk.js.map +1 -1
  87. package/dist/configs/eslint/expo-overrides.d.ts +103 -0
  88. package/dist/configs/eslint/expo-overrides.d.ts.map +1 -0
  89. package/dist/configs/eslint/expo-overrides.js +187 -0
  90. package/dist/configs/eslint/expo-overrides.js.map +1 -0
  91. package/dist/configs/eslint/expo.d.ts +2 -7
  92. package/dist/configs/eslint/expo.d.ts.map +1 -1
  93. package/dist/configs/eslint/expo.js +186 -258
  94. package/dist/configs/eslint/expo.js.map +1 -1
  95. package/dist/configs/eslint/nestjs.d.ts.map +1 -1
  96. package/dist/configs/eslint/nestjs.js +86 -70
  97. package/dist/configs/eslint/nestjs.js.map +1 -1
  98. package/dist/configs/eslint/process-environment-bans.d.ts +41 -0
  99. package/dist/configs/eslint/process-environment-bans.d.ts.map +1 -0
  100. package/dist/configs/eslint/process-environment-bans.js +50 -0
  101. package/dist/configs/eslint/process-environment-bans.js.map +1 -0
  102. package/dist/configs/eslint/shared-rules.d.ts +130 -0
  103. package/dist/configs/eslint/shared-rules.d.ts.map +1 -0
  104. package/dist/configs/eslint/shared-rules.js +233 -0
  105. package/dist/configs/eslint/shared-rules.js.map +1 -0
  106. package/dist/configs/eslint/typescript.d.ts.map +1 -1
  107. package/dist/configs/eslint/typescript.js +2 -4
  108. package/dist/configs/eslint/typescript.js.map +1 -1
  109. package/dist/configs/vitest/base.d.ts +2 -2
  110. package/dist/configs/vitest/base.d.ts.map +1 -1
  111. package/dist/configs/vitest/base.js +5 -5
  112. package/dist/configs/vitest/base.js.map +1 -1
  113. package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
  114. package/dist/configs/vitest/coverage-reports-directory.js +3 -2
  115. package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
  116. package/dist/configs/vitest/refusal-announcement.js +2 -2
  117. package/dist/configs/vitest/refusal-announcement.js.map +1 -1
  118. package/dist/core/admission-lock.js +2 -3
  119. package/dist/core/admission-lock.js.map +1 -1
  120. package/dist/core/admission-state.d.ts.map +1 -1
  121. package/dist/core/admission-state.js +11 -5
  122. package/dist/core/admission-state.js.map +1 -1
  123. package/dist/core/admission.d.ts.map +1 -1
  124. package/dist/core/admission.js +2 -2
  125. package/dist/core/admission.js.map +1 -1
  126. package/dist/core/bootstrap-environment.d.ts.map +1 -1
  127. package/dist/core/bootstrap-environment.js +8 -5
  128. package/dist/core/bootstrap-environment.js.map +1 -1
  129. package/dist/core/downstream-names.d.ts.map +1 -1
  130. package/dist/core/downstream-names.js +48 -47
  131. package/dist/core/downstream-names.js.map +1 -1
  132. package/dist/core/effectiveness-store.d.ts.map +1 -1
  133. package/dist/core/effectiveness-store.js +3 -5
  134. package/dist/core/effectiveness-store.js.map +1 -1
  135. package/dist/core/gate-declaration-drift.d.ts.map +1 -1
  136. package/dist/core/gate-declaration-drift.js +46 -27
  137. package/dist/core/gate-declaration-drift.js.map +1 -1
  138. package/dist/core/kane-cli-process.d.ts.map +1 -1
  139. package/dist/core/kane-cli-process.js +46 -33
  140. package/dist/core/kane-cli-process.js.map +1 -1
  141. package/dist/core/kane-cli.d.ts.map +1 -1
  142. package/dist/core/kane-cli.js +3 -4
  143. package/dist/core/kane-cli.js.map +1 -1
  144. package/dist/core/lisa-agent-emit-extra.d.ts +75 -0
  145. package/dist/core/lisa-agent-emit-extra.d.ts.map +1 -0
  146. package/dist/core/lisa-agent-emit-extra.js +231 -0
  147. package/dist/core/lisa-agent-emit-extra.js.map +1 -0
  148. package/dist/core/lisa-agent-emit.d.ts +79 -0
  149. package/dist/core/lisa-agent-emit.d.ts.map +1 -0
  150. package/dist/core/lisa-agent-emit.js +224 -0
  151. package/dist/core/lisa-agent-emit.js.map +1 -0
  152. package/dist/core/lisa-deletions.d.ts +116 -0
  153. package/dist/core/lisa-deletions.d.ts.map +1 -0
  154. package/dist/core/lisa-deletions.js +316 -0
  155. package/dist/core/lisa-deletions.js.map +1 -0
  156. package/dist/core/lisa-file-results.d.ts +58 -0
  157. package/dist/core/lisa-file-results.d.ts.map +1 -0
  158. package/dist/core/lisa-file-results.js +173 -0
  159. package/dist/core/lisa-file-results.js.map +1 -0
  160. package/dist/core/lisa-maintenance.d.ts +139 -0
  161. package/dist/core/lisa-maintenance.d.ts.map +1 -0
  162. package/dist/core/lisa-maintenance.js +324 -0
  163. package/dist/core/lisa-maintenance.js.map +1 -0
  164. package/dist/core/lisa-owned-hash-ledger.d.ts +7 -5
  165. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  166. package/dist/core/lisa-owned-hash-ledger.js +44 -6036
  167. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  168. package/dist/core/lisa-owned-hash-ledger.json +6021 -0
  169. package/dist/core/lisa-plugin-sync.d.ts +96 -0
  170. package/dist/core/lisa-plugin-sync.d.ts.map +1 -0
  171. package/dist/core/lisa-plugin-sync.js +216 -0
  172. package/dist/core/lisa-plugin-sync.js.map +1 -0
  173. package/dist/core/lisa-plugins.d.ts +42 -0
  174. package/dist/core/lisa-plugins.d.ts.map +1 -0
  175. package/dist/core/lisa-plugins.js +155 -0
  176. package/dist/core/lisa-plugins.js.map +1 -0
  177. package/dist/core/lisa-state.d.ts +202 -0
  178. package/dist/core/lisa-state.d.ts.map +1 -0
  179. package/dist/core/lisa-state.js +205 -0
  180. package/dist/core/lisa-state.js.map +1 -0
  181. package/dist/core/lisa-summary-stats.d.ts +74 -0
  182. package/dist/core/lisa-summary-stats.d.ts.map +1 -0
  183. package/dist/core/lisa-summary-stats.js +189 -0
  184. package/dist/core/lisa-summary-stats.js.map +1 -0
  185. package/dist/core/lisa-summary.d.ts +34 -0
  186. package/dist/core/lisa-summary.d.ts.map +1 -0
  187. package/dist/core/lisa-summary.js +144 -0
  188. package/dist/core/lisa-summary.js.map +1 -0
  189. package/dist/core/lisa-templates.d.ts +98 -0
  190. package/dist/core/lisa-templates.d.ts.map +1 -0
  191. package/dist/core/lisa-templates.js +251 -0
  192. package/dist/core/lisa-templates.js.map +1 -0
  193. package/dist/core/lisa.d.ts +14 -903
  194. package/dist/core/lisa.d.ts.map +1 -1
  195. package/dist/core/lisa.js +30 -2275
  196. package/dist/core/lisa.js.map +1 -1
  197. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  198. package/dist/core/plugin-command.d.ts.map +1 -1
  199. package/dist/core/plugin-command.js +117 -61
  200. package/dist/core/plugin-command.js.map +1 -1
  201. package/dist/core/template-ownership.d.ts.map +1 -1
  202. package/dist/core/template-ownership.js +0 -1
  203. package/dist/core/template-ownership.js.map +1 -1
  204. package/dist/core/upstream-attribution-body.d.ts +4 -11
  205. package/dist/core/upstream-attribution-body.d.ts.map +1 -1
  206. package/dist/core/upstream-attribution-body.js +61 -373
  207. package/dist/core/upstream-attribution-body.js.map +1 -1
  208. package/dist/core/upstream-attribution-fields.d.ts +40 -0
  209. package/dist/core/upstream-attribution-fields.d.ts.map +1 -0
  210. package/dist/core/upstream-attribution-fields.js +167 -0
  211. package/dist/core/upstream-attribution-fields.js.map +1 -0
  212. package/dist/core/upstream-attribution-files.d.ts +15 -0
  213. package/dist/core/upstream-attribution-files.d.ts.map +1 -0
  214. package/dist/core/upstream-attribution-files.js +156 -0
  215. package/dist/core/upstream-attribution-files.js.map +1 -0
  216. package/dist/core/upstream-attribution-guards.d.ts +80 -0
  217. package/dist/core/upstream-attribution-guards.d.ts.map +1 -0
  218. package/dist/core/upstream-attribution-guards.js +284 -0
  219. package/dist/core/upstream-attribution-guards.js.map +1 -0
  220. package/dist/core/upstream-evidence-manifest.d.ts +1 -1
  221. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  222. package/dist/core/upstream-evidence-manifest.js +67 -30420
  223. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  224. package/dist/core/upstream-evidence-manifest.json +30518 -0
  225. package/dist/health/agentic-contract.d.ts +94 -0
  226. package/dist/health/agentic-contract.d.ts.map +1 -0
  227. package/dist/health/agentic-contract.js +2 -0
  228. package/dist/health/agentic-contract.js.map +1 -0
  229. package/dist/health/agentic-evidence.d.ts +16 -0
  230. package/dist/health/agentic-evidence.d.ts.map +1 -0
  231. package/dist/health/agentic-evidence.js +213 -0
  232. package/dist/health/agentic-evidence.js.map +1 -0
  233. package/dist/health/agentic.d.ts +11 -74
  234. package/dist/health/agentic.d.ts.map +1 -1
  235. package/dist/health/agentic.js +42 -216
  236. package/dist/health/agentic.js.map +1 -1
  237. package/dist/health/deadline.d.ts +4 -1
  238. package/dist/health/deadline.d.ts.map +1 -1
  239. package/dist/health/deadline.js +4 -3
  240. package/dist/health/deadline.js.map +1 -1
  241. package/dist/health/deterministic-inputs.d.ts.map +1 -1
  242. package/dist/health/deterministic-inputs.js +3 -11
  243. package/dist/health/deterministic-inputs.js.map +1 -1
  244. package/dist/health/deterministic-probes.d.ts +52 -0
  245. package/dist/health/deterministic-probes.d.ts.map +1 -0
  246. package/dist/health/deterministic-probes.js +142 -0
  247. package/dist/health/deterministic-probes.js.map +1 -0
  248. package/dist/health/deterministic.d.ts +2 -25
  249. package/dist/health/deterministic.d.ts.map +1 -1
  250. package/dist/health/deterministic.js +14 -106
  251. package/dist/health/deterministic.js.map +1 -1
  252. package/dist/health/finding-utils.d.ts +4 -3
  253. package/dist/health/finding-utils.d.ts.map +1 -1
  254. package/dist/health/finding-utils.js +4 -4
  255. package/dist/health/finding-utils.js.map +1 -1
  256. package/dist/health/governance-probes.d.ts +29 -24
  257. package/dist/health/governance-probes.d.ts.map +1 -1
  258. package/dist/health/governance-probes.js +29 -25
  259. package/dist/health/governance-probes.js.map +1 -1
  260. package/dist/health/hook-inspection.d.ts +4 -3
  261. package/dist/health/hook-inspection.d.ts.map +1 -1
  262. package/dist/health/hook-inspection.js +17 -11
  263. package/dist/health/hook-inspection.js.map +1 -1
  264. package/dist/health/plugin-inspection.d.ts +6 -4
  265. package/dist/health/plugin-inspection.d.ts.map +1 -1
  266. package/dist/health/plugin-inspection.js +10 -9
  267. package/dist/health/plugin-inspection.js.map +1 -1
  268. package/dist/health/prepare.js +24 -8
  269. package/dist/health/prepare.js.map +1 -1
  270. package/dist/health/project-probes.d.ts +14 -7
  271. package/dist/health/project-probes.d.ts.map +1 -1
  272. package/dist/health/project-probes.js +14 -9
  273. package/dist/health/project-probes.js.map +1 -1
  274. package/dist/health/ruleset-compare.d.ts +30 -0
  275. package/dist/health/ruleset-compare.d.ts.map +1 -0
  276. package/dist/health/ruleset-compare.js +143 -0
  277. package/dist/health/ruleset-compare.js.map +1 -0
  278. package/dist/health/ruleset-config-checks.d.ts +66 -0
  279. package/dist/health/ruleset-config-checks.d.ts.map +1 -0
  280. package/dist/health/ruleset-config-checks.js +190 -0
  281. package/dist/health/ruleset-config-checks.js.map +1 -0
  282. package/dist/health/ruleset-expected.d.ts +39 -0
  283. package/dist/health/ruleset-expected.d.ts.map +1 -0
  284. package/dist/health/ruleset-expected.js +181 -0
  285. package/dist/health/ruleset-expected.js.map +1 -0
  286. package/dist/health/ruleset-gh.d.ts +85 -0
  287. package/dist/health/ruleset-gh.d.ts.map +1 -0
  288. package/dist/health/ruleset-gh.js +177 -0
  289. package/dist/health/ruleset-gh.js.map +1 -0
  290. package/dist/health/ruleset-inspection.d.ts +13 -117
  291. package/dist/health/ruleset-inspection.d.ts.map +1 -1
  292. package/dist/health/ruleset-inspection.js +8 -738
  293. package/dist/health/ruleset-inspection.js.map +1 -1
  294. package/dist/health/ruleset-normalize.d.ts +32 -0
  295. package/dist/health/ruleset-normalize.d.ts.map +1 -0
  296. package/dist/health/ruleset-normalize.js +160 -0
  297. package/dist/health/ruleset-normalize.js.map +1 -0
  298. package/dist/health/template-compose.d.ts +9 -0
  299. package/dist/health/template-compose.d.ts.map +1 -0
  300. package/dist/health/template-compose.js +105 -0
  301. package/dist/health/template-compose.js.map +1 -0
  302. package/dist/health/template-inspection.d.ts +5 -52
  303. package/dist/health/template-inspection.d.ts.map +1 -1
  304. package/dist/health/template-inspection.js +13 -435
  305. package/dist/health/template-inspection.js.map +1 -1
  306. package/dist/health/template-plan.d.ts +33 -0
  307. package/dist/health/template-plan.d.ts.map +1 -0
  308. package/dist/health/template-plan.js +154 -0
  309. package/dist/health/template-plan.js.map +1 -0
  310. package/dist/health/template-shape.d.ts +19 -0
  311. package/dist/health/template-shape.d.ts.map +1 -0
  312. package/dist/health/template-shape.js +122 -0
  313. package/dist/health/template-shape.js.map +1 -0
  314. package/dist/health/workflow-excerpt.d.ts +15 -0
  315. package/dist/health/workflow-excerpt.d.ts.map +1 -0
  316. package/dist/health/workflow-excerpt.js +88 -0
  317. package/dist/health/workflow-excerpt.js.map +1 -0
  318. package/dist/health/workflow-inputs-inspection.d.ts +16 -0
  319. package/dist/health/workflow-inputs-inspection.d.ts.map +1 -0
  320. package/dist/health/workflow-inputs-inspection.js +116 -0
  321. package/dist/health/workflow-inputs-inspection.js.map +1 -0
  322. package/dist/opencode/plugin-templates/block-managed-file-edits.sh +201 -20
  323. package/dist/standards/capture.d.ts.map +1 -1
  324. package/dist/standards/capture.js +73 -25
  325. package/dist/standards/capture.js.map +1 -1
  326. package/dist/standards/contract.d.ts.map +1 -1
  327. package/dist/standards/contract.js +26 -9
  328. package/dist/standards/contract.js.map +1 -1
  329. package/dist/standards/git-state.d.ts.map +1 -1
  330. package/dist/standards/git-state.js +2 -2
  331. package/dist/standards/git-state.js.map +1 -1
  332. package/dist/standards/registry-checks.d.ts +34 -0
  333. package/dist/standards/registry-checks.d.ts.map +1 -0
  334. package/dist/standards/registry-checks.js +137 -0
  335. package/dist/standards/registry-checks.js.map +1 -0
  336. package/dist/standards/registry.d.ts +3 -13
  337. package/dist/standards/registry.d.ts.map +1 -1
  338. package/dist/standards/registry.js +105 -194
  339. package/dist/standards/registry.js.map +1 -1
  340. package/dist/standards/storage.js +8 -10
  341. package/dist/standards/storage.js.map +1 -1
  342. package/dist/strategies/deduplicate-arrays.d.ts +18 -0
  343. package/dist/strategies/deduplicate-arrays.d.ts.map +1 -0
  344. package/dist/strategies/deduplicate-arrays.js +25 -0
  345. package/dist/strategies/deduplicate-arrays.js.map +1 -0
  346. package/dist/strategies/package-lisa-detect.d.ts +10 -0
  347. package/dist/strategies/package-lisa-detect.d.ts.map +1 -0
  348. package/dist/strategies/package-lisa-detect.js +178 -0
  349. package/dist/strategies/package-lisa-detect.js.map +1 -0
  350. package/dist/strategies/package-lisa-direct-floors.d.ts +16 -0
  351. package/dist/strategies/package-lisa-direct-floors.d.ts.map +1 -0
  352. package/dist/strategies/package-lisa-direct-floors.js +37 -0
  353. package/dist/strategies/package-lisa-direct-floors.js.map +1 -0
  354. package/dist/strategies/package-lisa-host-pins.d.ts +43 -0
  355. package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -0
  356. package/dist/strategies/package-lisa-host-pins.js +254 -0
  357. package/dist/strategies/package-lisa-host-pins.js.map +1 -0
  358. package/dist/strategies/package-lisa-manifest-guards.d.ts +59 -0
  359. package/dist/strategies/package-lisa-manifest-guards.d.ts.map +1 -0
  360. package/dist/strategies/package-lisa-manifest-guards.js +234 -0
  361. package/dist/strategies/package-lisa-manifest-guards.js.map +1 -0
  362. package/dist/strategies/package-lisa-pin-alignment.d.ts +34 -0
  363. package/dist/strategies/package-lisa-pin-alignment.d.ts.map +1 -0
  364. package/dist/strategies/package-lisa-pin-alignment.js +106 -0
  365. package/dist/strategies/package-lisa-pin-alignment.js.map +1 -0
  366. package/dist/strategies/package-lisa-script-notes.d.ts +19 -0
  367. package/dist/strategies/package-lisa-script-notes.d.ts.map +1 -0
  368. package/dist/strategies/package-lisa-script-notes.js +145 -0
  369. package/dist/strategies/package-lisa-script-notes.js.map +1 -0
  370. package/dist/strategies/package-lisa-template-apply.d.ts +53 -0
  371. package/dist/strategies/package-lisa-template-apply.d.ts.map +1 -0
  372. package/dist/strategies/package-lisa-template-apply.js +216 -0
  373. package/dist/strategies/package-lisa-template-apply.js.map +1 -0
  374. package/dist/strategies/package-lisa-template-merge.d.ts +42 -0
  375. package/dist/strategies/package-lisa-template-merge.d.ts.map +1 -0
  376. package/dist/strategies/package-lisa-template-merge.js +202 -0
  377. package/dist/strategies/package-lisa-template-merge.js.map +1 -0
  378. package/dist/strategies/package-lisa-types.d.ts +5 -0
  379. package/dist/strategies/package-lisa-types.d.ts.map +1 -1
  380. package/dist/strategies/package-lisa.d.ts +1 -195
  381. package/dist/strategies/package-lisa.d.ts.map +1 -1
  382. package/dist/strategies/package-lisa.js +27 -1333
  383. package/dist/strategies/package-lisa.js.map +1 -1
  384. package/dist/strategies/tagged-merge-sections.d.ts +68 -0
  385. package/dist/strategies/tagged-merge-sections.d.ts.map +1 -0
  386. package/dist/strategies/tagged-merge-sections.js +113 -0
  387. package/dist/strategies/tagged-merge-sections.js.map +1 -0
  388. package/dist/strategies/tagged-merge.d.ts +1 -90
  389. package/dist/strategies/tagged-merge.d.ts.map +1 -1
  390. package/dist/strategies/tagged-merge.js +19 -190
  391. package/dist/strategies/tagged-merge.js.map +1 -1
  392. package/dist/utils/bounded-stream.d.ts +30 -0
  393. package/dist/utils/bounded-stream.d.ts.map +1 -0
  394. package/dist/utils/bounded-stream.js +63 -0
  395. package/dist/utils/bounded-stream.js.map +1 -0
  396. package/dist/utils/fibonacci.d.ts +3 -3
  397. package/dist/utils/fibonacci.d.ts.map +1 -1
  398. package/dist/utils/fibonacci.js +48 -10
  399. package/dist/utils/fibonacci.js.map +1 -1
  400. package/dist/utils/memo.d.ts +25 -0
  401. package/dist/utils/memo.d.ts.map +1 -0
  402. package/dist/utils/memo.js +32 -0
  403. package/dist/utils/memo.js.map +1 -0
  404. package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
  405. package/dist/utils/postinstall-trampoline.js +3 -20
  406. package/dist/utils/postinstall-trampoline.js.map +1 -1
  407. package/dist/utils/process-environment.d.ts +42 -0
  408. package/dist/utils/process-environment.d.ts.map +1 -0
  409. package/dist/utils/process-environment.js +52 -0
  410. package/dist/utils/process-environment.js.map +1 -0
  411. package/dist/utils/resolve-executable.d.ts +89 -0
  412. package/dist/utils/resolve-executable.d.ts.map +1 -0
  413. package/dist/utils/resolve-executable.js +224 -0
  414. package/dist/utils/resolve-executable.js.map +1 -0
  415. package/dist/utils/shell-command-line.d.ts +9 -0
  416. package/dist/utils/shell-command-line.d.ts.map +1 -0
  417. package/dist/utils/shell-command-line.js +43 -0
  418. package/dist/utils/shell-command-line.js.map +1 -0
  419. package/dist/utils/usage-accounting-totals.d.ts +19 -0
  420. package/dist/utils/usage-accounting-totals.d.ts.map +1 -0
  421. package/dist/utils/usage-accounting-totals.js +145 -0
  422. package/dist/utils/usage-accounting-totals.js.map +1 -0
  423. package/dist/utils/usage-accounting.d.ts +2 -14
  424. package/dist/utils/usage-accounting.d.ts.map +1 -1
  425. package/dist/utils/usage-accounting.js +2 -169
  426. package/dist/utils/usage-accounting.js.map +1 -1
  427. package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js +213 -0
  428. package/eslint-plugin-code-organization/__tests__/enforce-statement-order-valid.test.js +251 -0
  429. package/eslint-plugin-code-organization/__tests__/enforce-statement-order-violations.test.js +222 -0
  430. package/eslint-plugin-code-organization/__tests__/statement-order-tester.js +42 -0
  431. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +6 -8
  432. package/expo/copy-overwrite/jest.setup.ts +11 -10
  433. package/expo/create-only/scripts/zap-baseline.sh +6 -18
  434. package/harper-fabric/create-only/scripts/zap-baseline.sh +7 -9
  435. package/nestjs/create-only/scripts/zap-baseline.sh +6 -7
  436. package/package.json +4 -4
  437. package/phaser/copy-overwrite/.husky/pre-push.verify +2 -0
  438. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  439. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  440. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  441. package/plugins/lisa/hooks/block-managed-file-edits.sh +201 -20
  442. package/plugins/lisa/hooks/block-masked-exit-status.sh +1 -1
  443. package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
  444. package/plugins/lisa/hooks/enforce-verification-gate.sh +1 -2
  445. package/plugins/lisa/hooks/ticket-sync-reminder.sh +2 -17
  446. package/plugins/lisa/hooks/track-plan-sessions.sh +7 -131
  447. package/plugins/lisa/scripts/remote-agent-aws-setup.sh +3 -1
  448. package/plugins/lisa/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  449. package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +201 -20
  450. package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
  451. package/plugins/lisa-agy/plugin.json +1 -1
  452. package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +3 -1
  453. package/plugins/lisa-agy/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  454. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  455. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  456. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  457. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  458. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  459. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  460. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  461. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  462. package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +201 -20
  463. package/plugins/lisa-copilot/hooks/block-masked-exit-status.sh +1 -1
  464. package/plugins/lisa-copilot/hooks/enforce-verification-gate.sh +1 -2
  465. package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +3 -1
  466. package/plugins/lisa-copilot/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  467. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  468. package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +201 -20
  469. package/plugins/lisa-cursor/hooks/block-masked-exit-status.sh +1 -1
  470. package/plugins/lisa-cursor/hooks/enforce-verification-gate.sh +1 -2
  471. package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +3 -1
  472. package/plugins/lisa-cursor/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  473. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  474. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  475. package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +201 -20
  476. package/plugins/lisa-devin/hooks/block-masked-exit-status.sh +1 -1
  477. package/plugins/lisa-devin/hooks/enforce-verification-gate.sh +1 -2
  478. package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +3 -1
  479. package/plugins/lisa-devin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  480. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  481. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  482. package/plugins/lisa-expo/.codex-plugin/skills/building-native-ui/references/webgpu-three.md +19 -9
  483. package/plugins/lisa-expo/.codex-plugin/skills/expo-tailwind-setup/SKILL.md +15 -4
  484. package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +19 -9
  485. package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +15 -4
  486. package/plugins/lisa-expo-agy/plugin.json +1 -1
  487. package/plugins/lisa-expo-agy/skills/building-native-ui/references/webgpu-three.md +19 -9
  488. package/plugins/lisa-expo-agy/skills/expo-tailwind-setup/SKILL.md +15 -4
  489. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  490. package/plugins/lisa-expo-copilot/skills/building-native-ui/references/webgpu-three.md +19 -9
  491. package/plugins/lisa-expo-copilot/skills/expo-tailwind-setup/SKILL.md +15 -4
  492. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  493. package/plugins/lisa-expo-cursor/skills/building-native-ui/references/webgpu-three.md +19 -9
  494. package/plugins/lisa-expo-cursor/skills/expo-tailwind-setup/SKILL.md +15 -4
  495. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  496. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  497. package/plugins/lisa-expo-devin/skills/building-native-ui/references/webgpu-three.md +19 -9
  498. package/plugins/lisa-expo-devin/skills/expo-tailwind-setup/SKILL.md +15 -4
  499. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  500. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  501. package/plugins/lisa-harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
  502. package/plugins/lisa-harper-fabric/hooks/enforce-config-extensions.sh +1 -1
  503. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  504. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  505. package/plugins/lisa-harper-fabric-copilot/hooks/block-generated-artifact-edits.sh +196 -11
  506. package/plugins/lisa-harper-fabric-copilot/hooks/enforce-config-extensions.sh +1 -1
  507. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  508. package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +196 -11
  509. package/plugins/lisa-harper-fabric-cursor/hooks/enforce-config-extensions.sh +1 -1
  510. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  511. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  512. package/plugins/lisa-harper-fabric-devin/hooks/block-generated-artifact-edits.sh +196 -11
  513. package/plugins/lisa-harper-fabric-devin/hooks/enforce-config-extensions.sh +1 -1
  514. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  515. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  516. package/plugins/lisa-nestjs/.codex-plugin/skills/nestjs-rules/SKILL.md +39 -26
  517. package/plugins/lisa-nestjs/.codex-plugin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  518. package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +1 -1
  519. package/plugins/lisa-nestjs/hooks/lisa-edit-gate.sh +19 -15
  520. package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +39 -26
  521. package/plugins/lisa-nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  522. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  523. package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +39 -26
  524. package/plugins/lisa-nestjs-agy/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  525. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  526. package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +1 -1
  527. package/plugins/lisa-nestjs-copilot/hooks/lisa-edit-gate.sh +19 -15
  528. package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +39 -26
  529. package/plugins/lisa-nestjs-copilot/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  530. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  531. package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +1 -1
  532. package/plugins/lisa-nestjs-cursor/hooks/lisa-edit-gate.sh +19 -15
  533. package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +39 -26
  534. package/plugins/lisa-nestjs-cursor/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  535. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  536. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  537. package/plugins/lisa-nestjs-devin/hooks/block-migration-edits.sh +1 -1
  538. package/plugins/lisa-nestjs-devin/hooks/lisa-edit-gate.sh +19 -15
  539. package/plugins/lisa-nestjs-devin/skills/nestjs-rules/SKILL.md +39 -26
  540. package/plugins/lisa-nestjs-devin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  541. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  542. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  543. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  544. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  545. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  546. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  547. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  548. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  549. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  550. package/plugins/lisa-rails/hooks/lisa-edit-gate.sh +19 -15
  551. package/plugins/lisa-rails/hooks/rubocop-on-edit.sh +2 -2
  552. package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +3 -3
  553. package/plugins/lisa-rails-agy/plugin.json +1 -1
  554. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  555. package/plugins/lisa-rails-copilot/hooks/lisa-edit-gate.sh +19 -15
  556. package/plugins/lisa-rails-copilot/hooks/rubocop-on-edit.sh +2 -2
  557. package/plugins/lisa-rails-copilot/hooks/sg-scan-on-edit.sh +3 -3
  558. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  559. package/plugins/lisa-rails-cursor/hooks/lisa-edit-gate.sh +19 -15
  560. package/plugins/lisa-rails-cursor/hooks/rubocop-on-edit.sh +2 -2
  561. package/plugins/lisa-rails-cursor/hooks/sg-scan-on-edit.sh +3 -3
  562. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  563. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  564. package/plugins/lisa-rails-devin/hooks/lisa-edit-gate.sh +19 -15
  565. package/plugins/lisa-rails-devin/hooks/rubocop-on-edit.sh +2 -2
  566. package/plugins/lisa-rails-devin/hooks/sg-scan-on-edit.sh +3 -3
  567. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  568. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  569. package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +2 -2
  570. package/plugins/lisa-typescript/hooks/format-on-edit.sh +2 -2
  571. package/plugins/lisa-typescript/hooks/lint-on-edit.sh +2 -2
  572. package/plugins/lisa-typescript/hooks/lisa-edit-gate.sh +19 -15
  573. package/plugins/lisa-typescript/hooks/sg-scan-on-edit.sh +3 -3
  574. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  575. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  576. package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +2 -2
  577. package/plugins/lisa-typescript-copilot/hooks/format-on-edit.sh +2 -2
  578. package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +2 -2
  579. package/plugins/lisa-typescript-copilot/hooks/lisa-edit-gate.sh +19 -15
  580. package/plugins/lisa-typescript-copilot/hooks/sg-scan-on-edit.sh +3 -3
  581. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  582. package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +2 -2
  583. package/plugins/lisa-typescript-cursor/hooks/format-on-edit.sh +2 -2
  584. package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +2 -2
  585. package/plugins/lisa-typescript-cursor/hooks/lisa-edit-gate.sh +19 -15
  586. package/plugins/lisa-typescript-cursor/hooks/sg-scan-on-edit.sh +3 -3
  587. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  588. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  589. package/plugins/lisa-typescript-devin/hooks/block-suppress-directives.sh +2 -2
  590. package/plugins/lisa-typescript-devin/hooks/format-on-edit.sh +2 -2
  591. package/plugins/lisa-typescript-devin/hooks/lint-on-edit.sh +2 -2
  592. package/plugins/lisa-typescript-devin/hooks/lisa-edit-gate.sh +19 -15
  593. package/plugins/lisa-typescript-devin/hooks/sg-scan-on-edit.sh +3 -3
  594. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  595. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  596. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  597. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  598. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  599. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  600. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  601. package/plugins/src/base/hooks/block-managed-file-edits.sh +201 -20
  602. package/plugins/src/base/hooks/block-masked-exit-status.sh +1 -1
  603. package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
  604. package/plugins/src/base/hooks/enforce-verification-gate.sh +1 -2
  605. package/plugins/src/base/hooks/ticket-sync-reminder.sh +2 -17
  606. package/plugins/src/base/hooks/track-plan-sessions.sh +7 -131
  607. package/plugins/src/base/scripts/remote-agent-aws-setup.sh +3 -1
  608. package/plugins/src/base/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
  609. package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +19 -9
  610. package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +15 -4
  611. package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
  612. package/plugins/src/harper-fabric/hooks/enforce-config-extensions.sh +1 -1
  613. package/plugins/src/nestjs/hooks/block-migration-edits.sh +1 -1
  614. package/plugins/src/nestjs/hooks/lisa-edit-gate.sh +19 -15
  615. package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +39 -26
  616. package/plugins/src/nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
  617. package/plugins/src/rails/hooks/lisa-edit-gate.sh +19 -15
  618. package/plugins/src/rails/hooks/rubocop-on-edit.sh +2 -2
  619. package/plugins/src/rails/hooks/sg-scan-on-edit.sh +3 -3
  620. package/plugins/src/typescript/hooks/block-suppress-directives.sh +2 -2
  621. package/plugins/src/typescript/hooks/format-on-edit.sh +2 -2
  622. package/plugins/src/typescript/hooks/lint-on-edit.sh +2 -2
  623. package/plugins/src/typescript/hooks/lisa-edit-gate.sh +19 -15
  624. package/plugins/src/typescript/hooks/sg-scan-on-edit.sh +3 -3
  625. package/scripts/build-plugins.sh +1 -1
  626. package/scripts/check-derived-artifacts.mjs +2 -2
  627. package/scripts/check-generated-artifact-merge-coverage.mjs +45 -4
  628. package/scripts/check-orphan-test-processes.mjs +0 -1
  629. package/scripts/check-self-dependency-pin.mjs +0 -2
  630. package/scripts/claude-remote-setup.sh +12 -7
  631. package/scripts/cleanup-amplify-branches.sh +0 -1
  632. package/scripts/generate-export-surface.mjs +131 -61
  633. package/scripts/generate-lisa-owned-hash-ledger.mjs +87 -102
  634. package/scripts/generate-upstream-evidence-manifest.mjs +56 -49
  635. package/scripts/github-status-check.sh +5 -25
  636. package/scripts/install-claude-plugins.sh +10 -8
  637. package/scripts/lib/merge-generated-json.mjs +274 -0
  638. package/scripts/lib/upstream-manifest-staleness.mjs +38 -34
  639. package/scripts/lib/upstream-public-commits.mjs +35 -18
  640. package/scripts/lisa-commit-and-pr-local.sh +1 -1
  641. package/scripts/lisa-enforcement-fallback.sh +31 -32
  642. package/scripts/lisa-github-environments.sh +5 -1
  643. package/scripts/lisa-github-repo-settings.sh +5 -1
  644. package/scripts/lisa-github-repo-setup.sh +1 -2
  645. package/scripts/lisa-github-rulesets.sh +8 -8
  646. package/scripts/lisa-remote-env/session-start.sh +18 -5
  647. package/scripts/lisa-rollback-release.mjs +0 -2
  648. package/scripts/lisa-update-local.sh +1 -1
  649. package/scripts/merge-generated-artifact.mjs +18 -6
  650. package/scripts/raise-self-dependency-pin.mjs +0 -2
  651. package/scripts/run-artifact-checks.mjs +1 -1
  652. package/scripts/verify-packed-learnings-contract.mjs +36 -3
  653. package/scripts/verify-self-pin-raise.mjs +0 -2
  654. package/typescript/copy-contents/.husky/commit-msg +8 -2
  655. package/typescript/copy-contents/.husky/post-checkout +2 -0
  656. package/typescript/copy-contents/.husky/post-merge +2 -0
  657. package/typescript/copy-contents/.husky/pre-commit +10 -3
  658. package/typescript/copy-contents/.husky/pre-push +29 -16
  659. package/typescript/copy-contents/.husky/prepare-commit-msg +2 -0
  660. package/typescript/create-only/.husky/pre-push.local +2 -0
  661. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +0 -643
@@ -1,4 +1,3 @@
1
- /* eslint-disable max-lines -- hook catalog and reconciliation form one cohesive pipeline */
2
1
  /**
3
2
  * Legacy full installer for Lisa-managed Codex hooks in a host project.
4
3
  *
@@ -27,200 +26,13 @@
27
26
  * @module codex/hooks-installer
28
27
  */
29
28
  import * as fse from "fs-extra";
30
- import { lstat, mkdtemp, readFile, readlink, rename, rm, symlink, writeFile, } from "node:fs/promises";
29
+ import { rm, writeFile } from "node:fs/promises";
31
30
  import * as path from "node:path";
32
- import { fileURLToPath } from "node:url";
33
- import { RAILS_HOOK_ENGINE_FILES } from "../../scripts/lib/rails-hooks.mjs";
34
31
  import { mirrorLisaRules } from "../core/lisa-rules-mirror.js";
35
- import { mergeLisaHooks, parseHooksFile, serializeHooksFile, } from "./hooks-merger.js";
36
- /** Subdirectory inside `.codex/` for Lisa-managed hook scripts */
37
- export const LISA_HOOKS_SUBDIR = path.join("hooks", "lisa");
38
- /**
39
- * Shared shell helper sourced by every edit-aware hook to resolve the file
40
- * path(s) a tool touches (handles single-file Edit/Write and multi-file
41
- * apply_patch). Copied alongside the hook scripts whenever an edit hook is
42
- * installed so the apply_patch parsing lives in exactly one place.
43
- */
44
- export const EDIT_PATHS_LIB = "_extract-edit-paths.sh";
45
- /**
46
- * Shared shell helper sourced by every edit-time hook to resolve the project's
47
- * gate declaration before the hook reaches for its own tool. Copied alongside
48
- * the hook scripts whenever an installed hook sources it.
49
- *
50
- * Absent from this installer until #3007, while six scripts sourced it. See
51
- * `needsEditGate` for what that absence did.
52
- */
53
- export const EDIT_GATE_LIB = "lisa-edit-gate.sh";
54
- /** Subdirectory inside `.codex/` for Lisa rules content (read by inject-rules) */
55
- export const LISA_RULES_SUBDIR = "lisa-rules";
56
- /** Filename of the Codex hooks config file inside `.codex/` */
57
- export const HOOKS_FILENAME = "hooks.json";
58
- /**
59
- * Matcher regex shared by every PostToolUse/PreToolUse hook that fires on
60
- * a file write. Codex emits these tool names for filesystem edits across
61
- * its three write paths (text Edit, file Write, apply_patch diff).
62
- */
63
- const WRITE_MATCHER = "Edit|Write|apply_patch";
64
- const INJECT_RULES_ID = "inject-rules";
65
- const INSTALL_RAILS_HOOKS_ID = "install-rails-hooks";
66
- const HARPER_PLUGIN = "lisa-harper-fabric";
67
- /**
68
- * Hook catalog. Adding a new hook? Three steps:
69
- * 1. Drop the script into `src/codex/scripts/<filename>`
70
- * 2. Add an entry here
71
- * 3. Add tests in `tests/unit/codex/hooks-installer.test.ts`
72
- *
73
- * Stack-specific hooks are gated by `forProjectTypes` so they're only shipped
74
- * when the relevant project type is detected.
75
- */
76
- const HOOK_CATALOG = [
77
- {
78
- id: INJECT_RULES_ID,
79
- event: "SessionStart",
80
- matcher: "",
81
- scriptFilename: "inject-rules.sh",
82
- forProjectTypes: ["*"],
83
- statusMessage: "Injecting Lisa rules into session context",
84
- },
85
- {
86
- id: "install-pkgs",
87
- event: "SessionStart",
88
- matcher: "startup",
89
- scriptFilename: "install-pkgs.sh",
90
- forProjectTypes: ["*"],
91
- statusMessage: "Checking project dependencies",
92
- },
93
- {
94
- id: INSTALL_RAILS_HOOKS_ID,
95
- event: "SessionStart",
96
- matcher: "startup",
97
- scriptFilename: "install-rails-hooks.sh",
98
- sourcePlugin: "lisa",
99
- forProjectTypes: ["*"],
100
- statusMessage: "Checking Rails Git hook installation",
101
- },
102
- {
103
- id: "setup-jira-cli",
104
- event: "SessionStart",
105
- matcher: "",
106
- scriptFilename: "setup-jira-cli.sh",
107
- forProjectTypes: ["*"],
108
- statusMessage: "Preparing Jira CLI configuration",
109
- },
110
- {
111
- id: "block-no-verify",
112
- event: "PreToolUse",
113
- matcher: "Bash",
114
- scriptFilename: "block-no-verify.sh",
115
- forProjectTypes: ["*"],
116
- statusMessage: "Checking shell command policy",
117
- },
118
- {
119
- id: "block-direct-issue-create",
120
- event: "PreToolUse",
121
- matcher: "Bash",
122
- scriptFilename: "block-direct-issue-create.sh",
123
- sourcePlugin: "lisa",
124
- forProjectTypes: ["*"],
125
- statusMessage: "Checking work-item filing policy",
126
- },
127
- {
128
- id: "shell-write-nudge",
129
- event: "PostToolUse",
130
- matcher: "Bash",
131
- scriptFilename: "shell-write-nudge.sh",
132
- forProjectTypes: ["*"],
133
- statusMessage: "Checking shell write visibility",
134
- },
135
- {
136
- id: "format-on-edit",
137
- event: "PostToolUse",
138
- matcher: WRITE_MATCHER,
139
- scriptFilename: "format-on-edit.sh",
140
- forProjectTypes: ["typescript"],
141
- needsEditPathLib: true,
142
- needsEditGate: true,
143
- },
144
- {
145
- id: "lint-on-edit",
146
- event: "PostToolUse",
147
- matcher: WRITE_MATCHER,
148
- scriptFilename: "lint-on-edit.sh",
149
- forProjectTypes: ["typescript"],
150
- needsEditPathLib: true,
151
- needsEditGate: true,
152
- },
153
- {
154
- id: "sg-scan-on-edit",
155
- event: "PostToolUse",
156
- matcher: WRITE_MATCHER,
157
- scriptFilename: "sg-scan-on-edit.sh",
158
- forProjectTypes: ["typescript", "rails"],
159
- needsEditPathLib: true,
160
- needsEditGate: true,
161
- },
162
- {
163
- id: "rubocop-on-edit",
164
- event: "PostToolUse",
165
- matcher: WRITE_MATCHER,
166
- scriptFilename: "rubocop-on-edit.sh",
167
- forProjectTypes: ["rails"],
168
- needsEditPathLib: true,
169
- needsEditGate: true,
170
- },
171
- {
172
- id: "block-migration-edits",
173
- event: "PreToolUse",
174
- matcher: WRITE_MATCHER,
175
- scriptFilename: "block-migration-edits.sh",
176
- forProjectTypes: ["nestjs"],
177
- needsEditPathLib: true,
178
- needsEditGate: true,
179
- },
180
- {
181
- id: "block-suppress-directives",
182
- event: "PreToolUse",
183
- matcher: WRITE_MATCHER,
184
- scriptFilename: "block-suppress-directives.sh",
185
- forProjectTypes: ["typescript"],
186
- statusMessage: "Checking for error-suppression directives",
187
- needsEditPathLib: true,
188
- needsEditGate: true,
189
- },
190
- {
191
- id: "block-generated-artifact-edits",
192
- event: "PreToolUse",
193
- matcher: WRITE_MATCHER,
194
- scriptFilename: "block-generated-artifact-edits.sh",
195
- sourcePlugin: HARPER_PLUGIN,
196
- forProjectTypes: ["harper-fabric"],
197
- needsEditPathLib: true,
198
- },
199
- {
200
- id: "enforce-config-extensions",
201
- event: "PostToolUse",
202
- matcher: WRITE_MATCHER,
203
- scriptFilename: "enforce-config-extensions.sh",
204
- sourcePlugin: HARPER_PLUGIN,
205
- forProjectTypes: ["harper-fabric"],
206
- needsEditPathLib: true,
207
- },
208
- ];
209
- /**
210
- * Every bundled Codex script that fires on the agent write boundary.
211
- *
212
- * DERIVED from the catalog above rather than listed, so a hook added to a tool
213
- * moment tomorrow joins the controls that read this with no test edited. That
214
- * matters here specifically: the population those controls used before #3007
215
- * was globbed as `-on-edit.sh`, a naming convention rather than a moment, and
216
- * the two `PreToolUse` refusal hooks fell outside it while firing on exactly
217
- * the same boundary.
218
- *
219
- * Scripts sourced from another plugin are excluded — they are that plugin's
220
- * artifacts, not this catalog's, and they are not resolved out of
221
- * `src/codex/scripts`.
222
- */
223
- export const EDIT_TIME_HOOK_SCRIPTS = Object.freeze(HOOK_CATALOG.filter(entry => entry.matcher === WRITE_MATCHER && entry.sourcePlugin === undefined).map(entry => entry.scriptFilename));
32
+ import { EDIT_GATE_LIB, EDIT_PATHS_LIB, HARPER_PLUGIN, HOOKS_FILENAME, INJECT_RULES_ID, INSTALL_RAILS_HOOKS_ID, LISA_HOOKS_SUBDIR, LISA_RULES_SUBDIR, catalogEntryToSpec, filterCatalogByTypes, harperSupportSources, linkManagedFile, railsHookSupportSources, readHooksFile, resolveBundledScript, resolveHookScript, } from "./hooks-catalog.js";
33
+ import { mergeLisaHooks, serializeHooksFile } from "./hooks-merger.js";
34
+ export { EDIT_GATE_LIB, EDIT_PATHS_LIB, EDIT_TIME_HOOK_SCRIPTS, HOOKS_FILENAME, LISA_HOOKS_SUBDIR, LISA_RULES_SUBDIR, } from "./hooks-catalog.js";
35
+ export { installHookCompatibility } from "./hooks-compatibility.js";
224
36
  /**
225
37
  * Install Lisa hook scripts + rules + hooks.json entries.
226
38
  * @param lisaDir - Absolute path to the Lisa repo root (or installed package)
@@ -288,147 +100,6 @@ export async function installHooks(lisaDir, destDir, detectedTypes, previousMana
288
100
  deleted: Object.freeze(deleted),
289
101
  };
290
102
  }
291
- /**
292
- * Keep previously installed catalog commands functional without registering
293
- * them again. Copies outlive replacement of the package that owned old links.
294
- * Host-authored siblings are never pruned. This is an apply-time migration,
295
- * not runtime/session detection or an assumed hot-reload boundary.
296
- * @param lisaDir Lisa source/package root.
297
- * @param destDir Host root.
298
- * @param detectedTypes Current project types.
299
- * @param previousManagedFiles Previous manifest ownership.
300
- * @returns Compatibility files to retain in the current manifest.
301
- */
302
- export async function installHookCompatibility(lisaDir, destDir, detectedTypes, previousManagedFiles) {
303
- const codexDir = path.join(destDir, ".codex");
304
- const hooksDir = path.join(codexDir, LISA_HOOKS_SUBDIR);
305
- const existing = await readHooksFile(path.join(codexDir, HOOKS_FILENAME));
306
- const taggedCommands = new Set(Object.values(existing.hooks ?? {}).flatMap(groups => groups.flatMap(group => group.hooks
307
- .filter(hook => hook._lisaManaged === true)
308
- .map(hook => hook.command))));
309
- const owned = new Set([
310
- ...previousManagedFiles,
311
- ...HOOK_CATALOG.filter(entry => taggedCommands.has(catalogEntryToSpec(entry, destDir).command)).map(entry => path.join(LISA_HOOKS_SUBDIR, entry.scriptFilename)),
312
- ]);
313
- const candidates = await Promise.all(HOOK_CATALOG.map(async (entry) => {
314
- const relative = path.join(LISA_HOOKS_SUBDIR, entry.scriptFilename);
315
- const keep = owned.has(relative) ||
316
- taggedCommands.has(catalogEntryToSpec(entry, destDir).command) ||
317
- (await isManagedSourceLink(path.join(codexDir, relative), resolveHookScript(lisaDir, entry), lisaDir, destDir));
318
- return keep ? entry : undefined;
319
- }));
320
- const retained = candidates.filter((entry) => entry !== undefined);
321
- if (retained.length === 0)
322
- return [];
323
- const sources = compatibilitySources(lisaDir, retained);
324
- await assertCompatibilityOwnership(sources, codexDir, owned, lisaDir, destDir);
325
- await fse.ensureDir(hooksDir);
326
- const entrypoints = new Set(retained.map(entry => entry.scriptFilename));
327
- const rules = retained.some(entry => entry.id === INJECT_RULES_ID)
328
- ? await copyCompatibilityRules(lisaDir, codexDir, detectedTypes, retained, owned)
329
- : [];
330
- // Install complete dependencies before atomically replacing loaded entrypoints.
331
- const helpers = await copyCompatibilitySources(sources.filter(source => !entrypoints.has(source.filename)), codexDir);
332
- const scripts = await copyCompatibilitySources(sources.filter(source => entrypoints.has(source.filename)), codexDir);
333
- return Object.freeze([...scripts, ...helpers, ...rules]);
334
- }
335
- /**
336
- * Reject unknown companion collisions before changing any compatibility file.
337
- * A retained command does not grant ownership of a host-authored helper.
338
- * @param sources Complete catalog closure.
339
- * @param codexDir Host Codex root.
340
- * @param owned Proven manifest/tagged-handler ownership.
341
- * @param lisaDir Verified Lisa package root.
342
- * @param destDir Host root.
343
- */
344
- async function assertCompatibilityOwnership(sources, codexDir, owned, lisaDir, destDir) {
345
- await Promise.all(sources.map(async ({ source, filename }) => {
346
- const relative = path.join(LISA_HOOKS_SUBDIR, filename);
347
- const destination = path.join(codexDir, relative);
348
- const stat = await lstat(destination).catch(error => {
349
- if (error.code === "ENOENT")
350
- return undefined;
351
- throw error;
352
- });
353
- if (!stat || owned.has(relative))
354
- return;
355
- if (stat.isSymbolicLink()) {
356
- if (await isManagedSourceLink(destination, source, lisaDir, destDir))
357
- return;
358
- }
359
- else if (stat.isFile() &&
360
- (await readFile(destination)).equals(await readFile(source))) {
361
- return;
362
- }
363
- throw new Error(`Cannot migrate Codex hooks: .codex/${relative} contains host-owned content. No compatibility files were changed. Preserve it and resolve the source ownership conflict before applying again.`);
364
- }));
365
- }
366
- /**
367
- * Copy one dependency group before exposing dependent entrypoints.
368
- * @param sources Package implementations.
369
- * @param codexDir Host Codex directory.
370
- * @returns Installed paths.
371
- */
372
- async function copyCompatibilitySources(sources, codexDir) {
373
- return Promise.all(sources.map(async ({ source, filename }) => {
374
- const relative = path.join(LISA_HOOKS_SUBDIR, filename);
375
- await copyManagedCompatibility(source, path.join(codexDir, relative));
376
- return relative;
377
- }));
378
- }
379
- /**
380
- * Resolve the full helper/data closure from the existing hook catalog.
381
- * @param lisaDir Source/package root.
382
- * @param retained Previously installed catalog entries.
383
- * @returns Script and companion sources.
384
- */
385
- function compatibilitySources(lisaDir, retained) {
386
- const helpers = [
387
- ...(retained.some(entry => entry.needsEditPathLib) ? [EDIT_PATHS_LIB] : []),
388
- ...(retained.some(entry => entry.needsEditGate) ? [EDIT_GATE_LIB] : []),
389
- ];
390
- return [
391
- ...retained.map(entry => ({
392
- source: resolveHookScript(lisaDir, entry),
393
- filename: entry.scriptFilename,
394
- })),
395
- ...helpers.map(filename => ({
396
- source: resolveBundledScript(filename),
397
- filename,
398
- })),
399
- ...(retained.some(entry => entry.id === INSTALL_RAILS_HOOKS_ID)
400
- ? railsHookSupportSources(lisaDir)
401
- : []),
402
- ...(retained.some(entry => entry.sourcePlugin === "lisa")
403
- ? [
404
- {
405
- source: path.join(lisaDir, "plugins/lisa/hooks/guard-dedupe.bash"),
406
- filename: "guard-dedupe.bash",
407
- },
408
- ]
409
- : []),
410
- ...(retained.some(entry => entry.sourcePlugin === HARPER_PLUGIN)
411
- ? harperSupportSources(lisaDir)
412
- : []),
413
- ];
414
- }
415
- /**
416
- * Complete runtime closure for linked hooks and copied loaded-session hooks.
417
- * @param lisaDir - Lisa package root
418
- * @returns Canonical source and installed basename for each required asset
419
- */
420
- function railsHookSupportSources(lisaDir) {
421
- return [
422
- {
423
- source: path.join(lisaDir, "plugins/lisa/hooks/install-rails-hooks.mjs"),
424
- filename: "install-rails-hooks.mjs",
425
- },
426
- ...RAILS_HOOK_ENGINE_FILES.map(filename => ({
427
- source: path.join(lisaDir, "scripts/lib", filename),
428
- filename,
429
- })),
430
- ];
431
- }
432
103
  /**
433
104
  * Link the dependency closures selected by the installed catalog.
434
105
  * @param lisaDir Source/package root
@@ -448,124 +119,6 @@ async function linkCatalogSupportFiles(lisaDir, hooksDir, applicable) {
448
119
  }));
449
120
  return [...harper, ...rails];
450
121
  }
451
- /**
452
- * Copy rule dependencies without replacing host-authored rules.
453
- * @param lisaDir Source/package root.
454
- * @param codexDir Host Codex directory.
455
- * @param detectedTypes Current types.
456
- * @param retained Entries determining required earlier stack rules.
457
- * @param owned Prior manifest paths.
458
- * @returns Copied rule paths.
459
- */
460
- async function copyCompatibilityRules(lisaDir, codexDir, detectedTypes, retained, owned) {
461
- const ruleTypes = [
462
- ...new Set([
463
- ...detectedTypes,
464
- ...retained.flatMap(entry => entry.forProjectTypes.filter(type => type !== "*")),
465
- ]),
466
- ];
467
- const scratch = await mkdtemp(path.join(codexDir, ".compat-rules-"));
468
- try {
469
- const rules = await mirrorLisaRules(lisaDir, scratch, ruleTypes, "link");
470
- const copied = await Promise.all(rules.map(async (relativeRule) => {
471
- const relative = path.join(LISA_RULES_SUBDIR, relativeRule);
472
- const destination = path.join(codexDir, relative);
473
- const stat = await lstat(destination).catch(() => undefined);
474
- const source = await readlink(path.join(scratch, relativeRule));
475
- const linkedRule = stat?.isSymbolicLink() &&
476
- (await isManagedSourceLink(destination, source, lisaDir, path.dirname(codexDir)));
477
- if (stat && !linkedRule && !owned.has(relative))
478
- return undefined;
479
- await fse.ensureDir(path.dirname(destination));
480
- await copyManagedCompatibility(path.join(scratch, relativeRule), destination);
481
- return relative;
482
- }));
483
- return copied.filter((file) => file !== undefined);
484
- }
485
- finally {
486
- await rm(scratch, { recursive: true, force: true });
487
- }
488
- }
489
- /**
490
- * Admit links to known Lisa sources, not host paths with similar suffixes.
491
- * Canonical installed-package paths also recover genuinely dangling links.
492
- * @param destination Host script path.
493
- * @param source Exact shipped source.
494
- * @param lisaDir Verified Lisa package root.
495
- * @param destDir Host root.
496
- * @returns Whether the catalog owns this legacy representation.
497
- */
498
- async function isManagedSourceLink(destination, source, lisaDir, destDir) {
499
- const stat = await lstat(destination).catch(() => undefined);
500
- if (!stat?.isSymbolicLink())
501
- return false;
502
- const target = path.resolve(path.dirname(destination), await readlink(destination));
503
- const relative = path.relative(lisaDir, source);
504
- if (target === path.resolve(source))
505
- return true;
506
- if (relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))
507
- return false;
508
- const variants = sourceLocationVariants(relative);
509
- if (variants.some(file => target === path.resolve(lisaDir, file)))
510
- return true;
511
- const installedRoot = path.join(destDir, "node_modules/@codyswann/lisa");
512
- return isLisaPackageTarget(target, variants, installedRoot);
513
- }
514
- /**
515
- * Source and compiled trees contain the same legacy bundled scripts.
516
- * @param relative Source path within the verified Lisa package.
517
- * @returns Exact supported source locations within that package.
518
- */
519
- function sourceLocationVariants(relative) {
520
- const tree = ["src", "dist"].find(directory => relative.startsWith(path.join(directory, "codex", "scripts") + path.sep));
521
- return tree === undefined
522
- ? [relative]
523
- : [
524
- relative,
525
- path.join(tree === "src" ? "dist" : "src", "codex", "scripts", path.basename(relative)),
526
- ];
527
- }
528
- /**
529
- * Verify old package/store roots rather than relying on their directory layout.
530
- * @param target Resolved legacy link target.
531
- * @param variants Exact supported paths within a Lisa package.
532
- * @param installedRoot Canonical host package path, including dangling installs.
533
- * @returns Whether positive package identity owns this expected source path.
534
- */
535
- async function isLisaPackageTarget(target, variants, installedRoot) {
536
- const roots = variants
537
- .filter(file => target.endsWith(path.sep + file))
538
- .map(file => target.slice(0, -(file.length + 1)));
539
- const verified = await Promise.all(roots.map(async (root) => {
540
- if (root === path.resolve(installedRoot) && !(await fse.pathExists(root)))
541
- return true;
542
- const metadata = await readFile(path.join(root, "package.json"), "utf8")
543
- .then(raw => JSON.parse(raw))
544
- .catch(() => undefined);
545
- return (typeof metadata === "object" &&
546
- metadata !== null &&
547
- "name" in metadata &&
548
- metadata.name === "@codyswann/lisa");
549
- }));
550
- return verified.some(Boolean);
551
- }
552
- /**
553
- * Replace a managed representation with executable regular source bytes.
554
- * @param source Functional shipped implementation.
555
- * @param destination Old loaded-command path.
556
- */
557
- async function copyManagedCompatibility(source, destination) {
558
- const content = await readFile(source);
559
- const scratch = await mkdtemp(path.join(path.dirname(destination), ".compat-file-"));
560
- try {
561
- const replacement = path.join(scratch, "replacement");
562
- await writeFile(replacement, content, { mode: 0o755 });
563
- await rename(replacement, destination);
564
- }
565
- finally {
566
- await rm(scratch, { force: true, recursive: true });
567
- }
568
- }
569
122
  /** Project-local directory prefixes wholly owned by the hook installer. */
570
123
  const MANAGED_HOOK_PREFIXES = [
571
124
  `${LISA_HOOKS_SUBDIR}${path.sep}`,
@@ -587,73 +140,6 @@ async function deleteStaleHookFiles(previousManagedFiles, currentManagedFiles, c
587
140
  await Promise.all(stale.map(file => rm(path.join(codexDir, file), { force: true })));
588
141
  return stale;
589
142
  }
590
- /**
591
- * Filter the catalog by detected project types. Universal hooks (`"*"`)
592
- * always pass; stack-specific hooks pass only if their type is detected.
593
- * @param detectedTypes - Project types Lisa detected for the host
594
- * @returns The catalog entries that apply to this host
595
- */
596
- function filterCatalogByTypes(detectedTypes) {
597
- const detectedSet = new Set(detectedTypes);
598
- return HOOK_CATALOG.filter(entry => entry.forProjectTypes.some(t => t === "*" || detectedSet.has(t)));
599
- }
600
- /**
601
- * Convert a catalog entry into the LisaHookSpec the merger consumes.
602
- *
603
- * The script path resolves at hook-firing time via
604
- * `git rev-parse --show-toplevel` because Codex sets the hook script's cwd
605
- * to the session cwd, not the repo root. Falls back to `pwd` if not in a git
606
- * repo (rare).
607
- * @param entry - One catalog entry to translate
608
- * @param _destDir - Reserved for future per-host customization; currently unused
609
- * @returns A LisaHookSpec ready to feed into mergeLisaHooks
610
- */
611
- function catalogEntryToSpec(entry, _destDir) {
612
- const command = `bash "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.codex/${LISA_HOOKS_SUBDIR}/${entry.scriptFilename}"`;
613
- return {
614
- id: entry.id,
615
- event: entry.event,
616
- matcher: entry.matcher,
617
- command,
618
- ...(entry.statusMessage !== undefined
619
- ? { statusMessage: entry.statusMessage }
620
- : {}),
621
- };
622
- }
623
- /**
624
- * Read an existing hooks.json file, returning {} if absent.
625
- * @param hooksFilePath - Absolute path to `<destDir>/.codex/hooks.json`
626
- * @returns Parsed HooksFile (empty object if the file doesn't exist)
627
- */
628
- async function readHooksFile(hooksFilePath) {
629
- if (!(await fse.pathExists(hooksFilePath))) {
630
- return {};
631
- }
632
- const raw = await readFile(hooksFilePath, "utf8");
633
- return parseHooksFile(raw);
634
- }
635
- /**
636
- * Resolve a bundled script path. Scripts ship inside the Lisa source tree at
637
- * `src/codex/scripts/<name>` and are accessible at runtime by computing the
638
- * path relative to this module's URL.
639
- * @param filename - Script filename (e.g. "inject-rules.sh")
640
- * @returns Absolute path to the bundled script in the Lisa install
641
- */
642
- function resolveBundledScript(filename) {
643
- const moduleDir = path.dirname(fileURLToPath(import.meta.url));
644
- return path.join(moduleDir, "scripts", filename);
645
- }
646
- /**
647
- * Resolve either a bundled Codex script or a selected stack-plugin script.
648
- * @param lisaDir Lisa package root.
649
- * @param entry Hook catalog entry.
650
- * @returns Absolute hook script path.
651
- */
652
- function resolveHookScript(lisaDir, entry) {
653
- return entry.sourcePlugin === undefined
654
- ? resolveBundledScript(entry.scriptFilename)
655
- : path.join(lisaDir, "plugins", entry.sourcePlugin, "hooks", entry.scriptFilename);
656
- }
657
143
  /**
658
144
  * Link Harper hook companion files beside their project-local wrappers.
659
145
  * @param lisaDir Lisa package root.
@@ -665,31 +151,4 @@ async function linkHarperSupportFiles(lisaDir, hooksDir) {
665
151
  await Promise.all(sources.map(({ source, filename }) => linkManagedFile(source, path.join(hooksDir, filename))));
666
152
  return sources.map(({ filename }) => path.join(LISA_HOOKS_SUBDIR, filename));
667
153
  }
668
- /**
669
- * Companion sources shared by linked installation and copied compatibility.
670
- * @param lisaDir Lisa package root.
671
- * @returns Complete Harper companion list.
672
- */
673
- function harperSupportSources(lisaDir) {
674
- return [
675
- {
676
- source: path.join(lisaDir, "plugins", HARPER_PLUGIN, "hooks", "enforce-config-extensions.mjs"),
677
- filename: "enforce-config-extensions.mjs",
678
- },
679
- {
680
- source: path.join(lisaDir, "plugins", HARPER_PLUGIN, "generated-artifact-globs.txt"),
681
- filename: "generated-artifact-globs.txt",
682
- },
683
- ];
684
- }
685
- /**
686
- * Replace a Lisa-owned project file with a link to its package source.
687
- * @param source Absolute package source path.
688
- * @param destination Absolute project link path.
689
- */
690
- async function linkManagedFile(source, destination) {
691
- await rm(destination, { force: true });
692
- await symlink(source, destination, process.platform === "win32" ? "file" : undefined);
693
- }
694
- /* eslint-enable max-lines -- restore the repository default */
695
154
  //# sourceMappingURL=hooks-installer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks-installer.js","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,E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CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC9C,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAEpD,MAAM,OAAO,CAAC,GAAG,CACf,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAClE,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,KAAK,UAAU,sBAAsB,CACnC,OAAe,EACf,QAAgB;IAEhB,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,OAAO,CAAC,GAAG,CACf,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CACnC,eAAe,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CACvD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Admit links to known Lisa sources, not host paths with similar suffixes.
3
+ * Canonical installed-package paths also recover genuinely dangling links.
4
+ * @param destination Host script path.
5
+ * @param source Exact shipped source.
6
+ * @param lisaDir Verified Lisa package root.
7
+ * @param destDir Host root.
8
+ * @returns Whether the catalog owns this legacy representation.
9
+ */
10
+ export declare function isManagedSourceLink(destination: string, source: string, lisaDir: string, destDir: string): Promise<boolean>;
11
+ //# sourceMappingURL=hooks-source-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-source-links.d.ts","sourceRoot":"","sources":["../../src/codex/hooks-source-links.ts"],"names":[],"mappings":"AAWA;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,CAgBlB"}