@codyswann/lisa 3.4.0 → 3.5.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 (206) hide show
  1. package/README.md +22 -0
  2. package/all/copy-contents/gitignore +7 -0
  3. package/all/copy-overwrite/scripts/lisa-command-envelope.mjs +44 -4
  4. package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +31 -0
  5. package/all/copy-overwrite/scripts/lisa-schema-validate.mjs +125 -47
  6. package/all/copy-overwrite/scripts/lisa-work-item.mjs +24 -2
  7. package/cdk/merge/.oxlintrc.json +1 -1
  8. package/dist/cli/apply.d.ts.map +1 -1
  9. package/dist/cli/apply.js +48 -13
  10. package/dist/cli/apply.js.map +1 -1
  11. package/dist/cli/doctor-apply-freshness.d.ts +29 -0
  12. package/dist/cli/doctor-apply-freshness.d.ts.map +1 -0
  13. package/dist/cli/doctor-apply-freshness.js +194 -0
  14. package/dist/cli/doctor-apply-freshness.js.map +1 -0
  15. package/dist/cli/doctor-learnings-merge-driver.d.ts +23 -0
  16. package/dist/cli/doctor-learnings-merge-driver.d.ts.map +1 -0
  17. package/dist/cli/doctor-learnings-merge-driver.js +73 -0
  18. package/dist/cli/doctor-learnings-merge-driver.js.map +1 -0
  19. package/dist/cli/doctor-readiness-workflows.js +2 -2
  20. package/dist/cli/doctor-readiness-workflows.js.map +1 -1
  21. package/dist/cli/doctor.d.ts.map +1 -1
  22. package/dist/cli/doctor.js +13 -0
  23. package/dist/cli/doctor.js.map +1 -1
  24. package/dist/cli/ui-ci-quality-jobs-parse.js +2 -2
  25. package/dist/cli/ui-ci-quality-jobs-parse.js.map +1 -1
  26. package/dist/cli/ui-deploy-pipeline-model.d.ts +4 -0
  27. package/dist/cli/ui-deploy-pipeline-model.d.ts.map +1 -1
  28. package/dist/cli/ui-deploy-pipeline-model.js +2 -2
  29. package/dist/cli/ui-deploy-pipeline-model.js.map +1 -1
  30. package/dist/codex/agent-transformer.js +2 -2
  31. package/dist/codex/agent-transformer.js.map +1 -1
  32. package/dist/codex/command-skill-transformer.js +3 -3
  33. package/dist/codex/command-skill-transformer.js.map +1 -1
  34. package/dist/codex/scripts/block-no-verify.sh +53 -4
  35. package/dist/core/apply-receipt.d.ts +68 -0
  36. package/dist/core/apply-receipt.d.ts.map +1 -0
  37. package/dist/core/apply-receipt.js +107 -0
  38. package/dist/core/apply-receipt.js.map +1 -0
  39. package/dist/core/learnings-merge-driver-install.d.ts +34 -0
  40. package/dist/core/learnings-merge-driver-install.d.ts.map +1 -1
  41. package/dist/core/learnings-merge-driver-install.js +36 -0
  42. package/dist/core/learnings-merge-driver-install.js.map +1 -1
  43. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  44. package/dist/core/upstream-evidence-manifest.js +62 -39
  45. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  46. package/dist/migrations/ensure-lisa-postinstall.d.ts +33 -0
  47. package/dist/migrations/ensure-lisa-postinstall.d.ts.map +1 -1
  48. package/dist/migrations/ensure-lisa-postinstall.js +47 -5
  49. package/dist/migrations/ensure-lisa-postinstall.js.map +1 -1
  50. package/dist/migrations/ensure-oxlint-base-configs.d.ts +42 -0
  51. package/dist/migrations/ensure-oxlint-base-configs.d.ts.map +1 -0
  52. package/dist/migrations/ensure-oxlint-base-configs.js +212 -0
  53. package/dist/migrations/ensure-oxlint-base-configs.js.map +1 -0
  54. package/dist/migrations/index.d.ts +1 -0
  55. package/dist/migrations/index.d.ts.map +1 -1
  56. package/dist/migrations/index.js +3 -0
  57. package/dist/migrations/index.js.map +1 -1
  58. package/dist/opencode/command-transformer.js +3 -3
  59. package/dist/opencode/command-transformer.js.map +1 -1
  60. package/dist/utils/yaml.d.ts +54 -0
  61. package/dist/utils/yaml.d.ts.map +1 -0
  62. package/dist/utils/yaml.js +124 -0
  63. package/dist/utils/yaml.js.map +1 -0
  64. package/expo/copy-overwrite/scripts/bdd/baseline.mjs +104 -19
  65. package/expo/copy-overwrite/scripts/bdd/contract.mjs +20 -1
  66. package/expo/copy-overwrite/scripts/bdd/discover.mjs +53 -10
  67. package/expo/copy-overwrite/scripts/bdd/parse.mjs +25 -3
  68. package/expo/copy-overwrite/scripts/bdd/render.mjs +2 -1
  69. package/expo/copy-overwrite/scripts/bdd/report.mjs +26 -12
  70. package/expo/copy-overwrite/scripts/bdd/validate.mjs +2 -2
  71. package/expo/copy-overwrite/scripts/bdd/waivers.mjs +19 -4
  72. package/expo/copy-overwrite/scripts/bdd-matrix.mjs +2 -2
  73. package/expo/copy-overwrite/scripts/check-bdd-coverage.mjs +58 -16
  74. package/expo/create-only/.github/required-checks.json +10 -4
  75. package/expo/merge/.oxlintrc.json +1 -1
  76. package/harper-fabric/merge/.oxlintrc.json +1 -1
  77. package/nestjs/create-only/.github/required-checks.json +57 -0
  78. package/nestjs/merge/.oxlintrc.json +1 -1
  79. package/package.json +1 -1
  80. package/phaser/merge/.oxlintrc.json +1 -1
  81. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  83. package/plugins/lisa/.codex-plugin/skills/lisa-atlassian-access/SKILL.md +7 -0
  84. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +1 -1
  85. package/plugins/lisa/.codex-plugin/skills/lisa-jam-access/SKILL.md +37 -2
  86. package/plugins/lisa/.codex-plugin/skills/lisa-notion-access/SKILL.md +7 -0
  87. package/plugins/lisa/.codex-plugin/skills/lisa-posthog-access/SKILL.md +40 -3
  88. package/plugins/lisa/.codex-plugin/skills/lisa-sentry-access/SKILL.md +44 -3
  89. package/plugins/lisa/.codex-plugin/skills/lisa-sonarcloud-access/SKILL.md +56 -0
  90. package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +1 -1
  91. package/plugins/lisa/hooks/block-no-verify.agy.sh +53 -4
  92. package/plugins/lisa/hooks/block-no-verify.sh +31 -0
  93. package/plugins/lisa/rules/eager/credential-substrate-precedence.md +3 -1
  94. package/plugins/lisa/rules/eager/tracked-work.md +1 -1
  95. package/plugins/lisa/rules/reference/credential-substrate-precedence.md +20 -0
  96. package/plugins/lisa/rules/reference/tracked-work.md +4 -2
  97. package/plugins/lisa/skills/lisa-atlassian-access/SKILL.md +7 -0
  98. package/plugins/lisa/skills/lisa-implement/SKILL.md +1 -1
  99. package/plugins/lisa/skills/lisa-jam-access/SKILL.md +37 -2
  100. package/plugins/lisa/skills/lisa-notion-access/SKILL.md +7 -0
  101. package/plugins/lisa/skills/lisa-posthog-access/SKILL.md +40 -3
  102. package/plugins/lisa/skills/lisa-sentry-access/SKILL.md +44 -3
  103. package/plugins/lisa/skills/lisa-sonarcloud-access/SKILL.md +56 -0
  104. package/plugins/lisa/skills/lisa-track/SKILL.md +1 -1
  105. package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +53 -4
  106. package/plugins/lisa-agy/plugin.json +1 -1
  107. package/plugins/lisa-agy/skills/lisa-atlassian-access/SKILL.md +7 -0
  108. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +1 -1
  109. package/plugins/lisa-agy/skills/lisa-jam-access/SKILL.md +37 -2
  110. package/plugins/lisa-agy/skills/lisa-notion-access/SKILL.md +7 -0
  111. package/plugins/lisa-agy/skills/lisa-posthog-access/SKILL.md +40 -3
  112. package/plugins/lisa-agy/skills/lisa-sentry-access/SKILL.md +44 -3
  113. package/plugins/lisa-agy/skills/lisa-sonarcloud-access/SKILL.md +56 -0
  114. package/plugins/lisa-agy/skills/lisa-track/SKILL.md +1 -1
  115. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  116. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  117. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  118. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  119. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  120. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  121. package/plugins/lisa-copilot/hooks/block-no-verify.sh +31 -0
  122. package/plugins/lisa-copilot/rules/eager/credential-substrate-precedence.md +3 -1
  123. package/plugins/lisa-copilot/rules/eager/tracked-work.md +1 -1
  124. package/plugins/lisa-copilot/rules/reference/credential-substrate-precedence.md +20 -0
  125. package/plugins/lisa-copilot/rules/reference/tracked-work.md +4 -2
  126. package/plugins/lisa-copilot/skills/lisa-atlassian-access/SKILL.md +7 -0
  127. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +1 -1
  128. package/plugins/lisa-copilot/skills/lisa-jam-access/SKILL.md +37 -2
  129. package/plugins/lisa-copilot/skills/lisa-notion-access/SKILL.md +7 -0
  130. package/plugins/lisa-copilot/skills/lisa-posthog-access/SKILL.md +40 -3
  131. package/plugins/lisa-copilot/skills/lisa-sentry-access/SKILL.md +44 -3
  132. package/plugins/lisa-copilot/skills/lisa-sonarcloud-access/SKILL.md +56 -0
  133. package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +1 -1
  134. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-cursor/hooks/block-no-verify.sh +31 -0
  136. package/plugins/lisa-cursor/rules/credential-substrate-precedence-reference.mdc +20 -0
  137. package/plugins/lisa-cursor/rules/credential-substrate-precedence.mdc +3 -1
  138. package/plugins/lisa-cursor/rules/tracked-work-reference.mdc +4 -2
  139. package/plugins/lisa-cursor/rules/tracked-work.mdc +1 -1
  140. package/plugins/lisa-cursor/skills/lisa-atlassian-access/SKILL.md +7 -0
  141. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +1 -1
  142. package/plugins/lisa-cursor/skills/lisa-jam-access/SKILL.md +37 -2
  143. package/plugins/lisa-cursor/skills/lisa-notion-access/SKILL.md +7 -0
  144. package/plugins/lisa-cursor/skills/lisa-posthog-access/SKILL.md +40 -3
  145. package/plugins/lisa-cursor/skills/lisa-sentry-access/SKILL.md +44 -3
  146. package/plugins/lisa-cursor/skills/lisa-sonarcloud-access/SKILL.md +56 -0
  147. package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +1 -1
  148. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  149. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  150. package/plugins/lisa-expo-agy/plugin.json +1 -1
  151. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  152. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  153. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  154. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  155. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  156. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  157. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  159. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  160. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  161. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  163. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  164. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  165. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  166. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  167. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  170. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  171. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  172. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  173. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  174. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  175. package/plugins/lisa-rails-agy/plugin.json +1 -1
  176. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  177. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  178. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  180. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  181. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  185. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  186. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  187. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  188. package/plugins/src/base/hooks/block-no-verify.agy.sh +53 -4
  189. package/plugins/src/base/hooks/block-no-verify.sh +31 -0
  190. package/plugins/src/base/rules/eager/credential-substrate-precedence.md +3 -1
  191. package/plugins/src/base/rules/eager/tracked-work.md +1 -1
  192. package/plugins/src/base/rules/reference/credential-substrate-precedence.md +20 -0
  193. package/plugins/src/base/rules/reference/tracked-work.md +4 -2
  194. package/plugins/src/base/skills/lisa-atlassian-access/SKILL.md +7 -0
  195. package/plugins/src/base/skills/lisa-implement/SKILL.md +1 -1
  196. package/plugins/src/base/skills/lisa-jam-access/SKILL.md +37 -2
  197. package/plugins/src/base/skills/lisa-notion-access/SKILL.md +7 -0
  198. package/plugins/src/base/skills/lisa-posthog-access/SKILL.md +40 -3
  199. package/plugins/src/base/skills/lisa-sentry-access/SKILL.md +44 -3
  200. package/plugins/src/base/skills/lisa-sonarcloud-access/SKILL.md +56 -0
  201. package/plugins/src/base/skills/lisa-track/SKILL.md +1 -1
  202. package/scripts/install-claude-plugins.sh +5 -1
  203. package/typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs +298 -26
  204. package/typescript/create-only/.github/required-checks.json +11 -6
  205. package/typescript/create-only/.github/workflows/required-checks-drift.yml +84 -0
  206. package/typescript/merge/.oxlintrc.json +1 -1
@@ -1,4 +1,37 @@
1
1
  import type { Migration, MigrationContext, MigrationResult } from "./migration.interface.js";
2
+ /**
3
+ * What the operator sees on stderr when the bootstrap apply fails.
4
+ *
5
+ * Written for someone scrolling past a wall of install output who may not know
6
+ * what Lisa is: it says what stopped working (templates and guardrails are no
7
+ * longer arriving), that the real error is directly above, and the two commands
8
+ * that reproduce and diagnose it. ASCII and free of `"`, `$`, and backticks so
9
+ * it survives being embedded in a JSON string inside a `sh -c` command.
10
+ */
11
+ export declare const APPLY_FAILURE_NOTICE: string;
12
+ /**
13
+ * The bootstrap invocation chained into a host project's `postinstall`.
14
+ *
15
+ * Shape: **loud but non-fatal**. It used to end in `2>/dev/null || true`, which
16
+ * discarded the apply's stderr and its exit code, so a totally failed apply was
17
+ * indistinguishable from success and a repo could silently stop receiving
18
+ * template updates (CodySwannGT/lisa#2467). Stderr now flows through and a
19
+ * failure adds an explicit warning line.
20
+ *
21
+ * It deliberately still exits 0. A postinstall runs inside `npm install` /
22
+ * `bun install`; exiting non-zero aborts the install and leaves `node_modules`
23
+ * half-built. Apply legitimately cannot run in plenty of environments (no git
24
+ * repo, no project config, sandboxed or non-interactive shells), so a hard
25
+ * failure would convert a template-sync problem into an install outage across
26
+ * the fleet. The durable signal instead lives in the apply receipt that a
27
+ * successful apply writes — `lisa doctor` reports a repo whose receipt is
28
+ * missing or older than the installed Lisa, so the failure is still findable
29
+ * long after the install output has scrolled away.
30
+ *
31
+ * Exported so tests can execute the real script under `sh` rather than assert
32
+ * on a string.
33
+ */
34
+ export declare const LISA_INVOCATION = "[ -n \"$CI\" ] || LISA_BOOTSTRAP=1 node node_modules/@codyswann/lisa/dist/index.js --yes --skip-git-check . || echo \"lisa: TEMPLATE APPLY FAILED - this project is NOT receiving Lisa template or guardrail updates. The error is above. Reproduce it with: node node_modules/@codyswann/lisa/dist/index.js --yes --skip-git-check . - then run: node node_modules/@codyswann/lisa/dist/index.js doctor\" >&2";
2
35
  /**
3
36
  * Migration: ensure Node-based projects chain Lisa into their postinstall script.
4
37
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-lisa-postinstall.d.ts","sourceRoot":"","sources":["../../src/migrations/ensure-lisa-postinstall.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AA2ElC;;;;;;;;;GASG;AACH,qBAAa,8BAA+B,YAAW,SAAS;IAC9D,QAAQ,CAAC,IAAI,6BAA6B;IAC1C,QAAQ,CAAC,WAAW,qEACgD;IAEpE;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAyBtD;;;;OAIG;IACG,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAqC7D"}
1
+ {"version":3,"file":"ensure-lisa-postinstall.d.ts","sourceRoot":"","sources":["../../src/migrations/ensure-lisa-postinstall.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAQlC;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,QAGS,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,eAAe,mZAAqG,CAAC;AA6ElI;;;;;;;;;GASG;AACH,qBAAa,8BAA+B,YAAW,SAAS;IAC9D,QAAQ,CAAC,IAAI,6BAA6B;IAC1C,QAAQ,CAAC,WAAW,qEACgD;IAEpE;;;;;;;;;;;;;OAaG;IACG,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAyBtD;;;;OAIG;IACG,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAqC7D"}
@@ -4,8 +4,43 @@ import { readJsonOrNull, writeJson } from "../utils/json-utils.js";
4
4
  const PACKAGE_JSON = "package.json";
5
5
  const CI_GUARD_PREFIX = '[ -n "$CI" ] || ';
6
6
  const BOOTSTRAP_PREFIX = "LISA_BOOTSTRAP=1 ";
7
- const LISA_INVOCATION = `${CI_GUARD_PREFIX}${BOOTSTRAP_PREFIX}node node_modules/@codyswann/lisa/dist/index.js --yes --skip-git-check . 2>/dev/null || true`;
8
7
  const LISA_MARKER = "node_modules/@codyswann/lisa/dist/index.js";
8
+ const LISA_APPLY_COMMAND = `node ${LISA_MARKER} --yes --skip-git-check .`;
9
+ /**
10
+ * What the operator sees on stderr when the bootstrap apply fails.
11
+ *
12
+ * Written for someone scrolling past a wall of install output who may not know
13
+ * what Lisa is: it says what stopped working (templates and guardrails are no
14
+ * longer arriving), that the real error is directly above, and the two commands
15
+ * that reproduce and diagnose it. ASCII and free of `"`, `$`, and backticks so
16
+ * it survives being embedded in a JSON string inside a `sh -c` command.
17
+ */
18
+ export const APPLY_FAILURE_NOTICE = "lisa: TEMPLATE APPLY FAILED - this project is NOT receiving Lisa template " +
19
+ `or guardrail updates. The error is above. Reproduce it with: ${LISA_APPLY_COMMAND} ` +
20
+ `- then run: node ${LISA_MARKER} doctor`;
21
+ /**
22
+ * The bootstrap invocation chained into a host project's `postinstall`.
23
+ *
24
+ * Shape: **loud but non-fatal**. It used to end in `2>/dev/null || true`, which
25
+ * discarded the apply's stderr and its exit code, so a totally failed apply was
26
+ * indistinguishable from success and a repo could silently stop receiving
27
+ * template updates (CodySwannGT/lisa#2467). Stderr now flows through and a
28
+ * failure adds an explicit warning line.
29
+ *
30
+ * It deliberately still exits 0. A postinstall runs inside `npm install` /
31
+ * `bun install`; exiting non-zero aborts the install and leaves `node_modules`
32
+ * half-built. Apply legitimately cannot run in plenty of environments (no git
33
+ * repo, no project config, sandboxed or non-interactive shells), so a hard
34
+ * failure would convert a template-sync problem into an install outage across
35
+ * the fleet. The durable signal instead lives in the apply receipt that a
36
+ * successful apply writes — `lisa doctor` reports a repo whose receipt is
37
+ * missing or older than the installed Lisa, so the failure is still findable
38
+ * long after the install output has scrolled away.
39
+ *
40
+ * Exported so tests can execute the real script under `sh` rather than assert
41
+ * on a string.
42
+ */
43
+ export const LISA_INVOCATION = `${CI_GUARD_PREFIX}${BOOTSTRAP_PREFIX}${LISA_APPLY_COMMAND} || echo "${APPLY_FAILURE_NOTICE}" >&2`;
9
44
  /**
10
45
  * Project types that do not use Node.js postinstall hooks (e.g. Rails).
11
46
  * Projects detected as only these types are skipped by this migration.
@@ -20,11 +55,18 @@ async function readPackageJson(projectDir) {
20
55
  return readJsonOrNull(path.join(projectDir, PACKAGE_JSON));
21
56
  }
22
57
  /**
23
- * Legacy Lisa invocation pattern (without CI guard). Existing projects may
24
- * have this form chained with other commands; we detect and replace it so
25
- * the CI guard is introduced without duplicating the invocation.
58
+ * Every historical spelling of the Lisa invocation, so an in-place upgrade
59
+ * replaces it rather than chaining a second copy in front of it.
60
+ *
61
+ * The optional tail covers, in order: the failure-swallowing legacy form
62
+ * (`2>/dev/null || true`), the current loud-but-non-fatal form
63
+ * (`|| echo "..." >&2`), and a bare invocation with no tail at all. Guard
64
+ * prefixes are optional and repeatable because older Lisa versions introduced
65
+ * them one at a time.
26
66
  */
27
- const LISA_INVOCATION_RE = /(?:(?:\[ -n "\$CI" \] \|\| )|(?:LISA_BOOTSTRAP=1 ))*node node_modules\/@codyswann\/lisa\/dist\/index\.js --yes --skip-git-check \. 2>\/dev\/null \|\| true/;
67
+ const LISA_INVOCATION_RE = new RegExp('(?:(?:\\[ -n "\\$CI" \\] \\|\\| )|(?:LISA_BOOTSTRAP=1 ))*' +
68
+ "node node_modules/@codyswann/lisa/dist/index\\.js --yes --skip-git-check \\." +
69
+ '(?: 2>/dev/null \\|\\| true| \\|\\| echo "[^"]*" >&2)?');
28
70
  /**
29
71
  * Compose the new postinstall, prepending the Lisa invocation to any existing command.
30
72
  * If the existing script already contains a legacy Lisa invocation (no CI guard),
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-lisa-postinstall.js","sourceRoot":"","sources":["../../src/migrations/ensure-lisa-postinstall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAOnE,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,eAAe,GAAG,kBAAkB,CAAC;AAC3C,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAC7C,MAAM,eAAe,GAAG,GAAG,eAAe,GAAG,gBAAgB,8FAA8F,CAAC;AAC5J,MAAM,WAAW,GAAG,4CAA4C,CAAC;AAEjE;;;GAGG;AACH,MAAM,cAAc,GAA2B,CAAC,OAAO,CAAC,CAAC;AAUzD;;;;GAIG;AACH,KAAK,UAAU,eAAe,CAC5B,UAAkB;IAElB,OAAO,cAAc,CAAc,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;;;;GAIG;AACH,MAAM,kBAAkB,GACtB,4JAA4J,CAAC;AAE/J;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,QAA4B;IACtD,MAAM,OAAO,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QAClC,OAAO,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,GAAG,eAAe,OAAO,OAAO,EAAE,CAAC;AAC5C,CA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MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,CAAC,YAAY,CAAC;YAC5B,OAAO;SACR,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,42 @@
1
+ import type { Migration, MigrationContext, MigrationResult } from "./migration.interface.js";
2
+ /**
3
+ * Migration: vendor Lisa's oxlint configs into the host repository and point
4
+ * `.oxlintrc.json` at them, so linting works in a checkout without an install.
5
+ *
6
+ * oxlint resolves every `extends` entry as a plain path relative to the config
7
+ * file that declares it — its schema says so, and it performs no Node-style
8
+ * upward module resolution. A `./node_modules/@codyswann/lisa/oxlint/*.json`
9
+ * entry therefore dies in any checkout lacking its own `node_modules`, most
10
+ * commonly a fresh `git worktree`. Since `.lintstagedrc.json` runs
11
+ * `oxlint --fix` from the husky pre-commit hook, that blocked every commit in
12
+ * such a worktree, with the failure surfacing as a downstream prettier kill
13
+ * rather than as the config error it was (#2465).
14
+ *
15
+ * Vendoring is what makes it worktree-proof: git checks tracked files into
16
+ * every worktree, whereas `node_modules` is untracked by definition. The two
17
+ * layers are preserved — Lisa owns the vendored base, the host still owns
18
+ * `.oxlintrc.json` — so projects keep overriding rules exactly as before.
19
+ *
20
+ * Pruning the legacy entry is not cosmetic. The `merge` strategy unions arrays
21
+ * and can never drop an element, so an upgraded project would otherwise carry
22
+ * the new path *and* the old one; oxlint hard-fails on any unresolvable entry,
23
+ * so changing the templates alone would fix nothing for existing hosts.
24
+ */
25
+ export declare class EnsureOxlintBaseConfigsMigration implements Migration {
26
+ readonly name = "ensure-oxlint-base-configs";
27
+ readonly description = "Vendor Lisa oxlint configs into .lisa/lisa-oxlint/ so linting works without node_modules";
28
+ /**
29
+ * The migration applies when the vendored configs are missing or stale, or
30
+ * when `.oxlintrc.json` still carries a legacy package-relative entry.
31
+ * @param ctx - Migration context
32
+ * @returns True when there is work to do
33
+ */
34
+ applies(ctx: MigrationContext): Promise<boolean>;
35
+ /**
36
+ * Write the vendored configs and normalize the host `extends` list.
37
+ * @param ctx - Migration context
38
+ * @returns Result describing the action taken
39
+ */
40
+ apply(ctx: MigrationContext): Promise<MigrationResult>;
41
+ }
42
+ //# sourceMappingURL=ensure-oxlint-base-configs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-oxlint-base-configs.d.ts","sourceRoot":"","sources":["../../src/migrations/ensure-oxlint-base-configs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AA4MlC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,gCAAiC,YAAW,SAAS;IAChE,QAAQ,CAAC,IAAI,gCAAgC;IAC7C,QAAQ,CAAC,WAAW,8FACyE;IAE7F;;;;;OAKG;IACG,OAAO,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IAKtD;;;;OAIG;IACG,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;CAuC7D"}
@@ -0,0 +1,212 @@
1
+ import { readFile, writeFile } from "node:fs/promises";
2
+ import * as path from "node:path";
3
+ import * as fse from "fs-extra";
4
+ import { readJsonOrNull } from "../utils/json-utils.js";
5
+ const OXLINTRC = ".oxlintrc.json";
6
+ /**
7
+ * Repo-relative home for the Lisa oxlint configs vendored into a host project.
8
+ *
9
+ * The `lisa-` path segment is deliberate: `isLisaOwnedTemplate()` keys on that
10
+ * namespace, and it is how Lisa marks files it owns outright and may refresh
11
+ * without asking. Hosts never hand-edit these — they layer their own rules in
12
+ * `.oxlintrc.json`, which stays host-owned.
13
+ */
14
+ const VENDOR_DIR = ".lisa/lisa-oxlint";
15
+ /** `extends` prefix that points at a vendored config. */
16
+ const VENDOR_PREFIX = `./${VENDOR_DIR}/`;
17
+ /** Directory inside the Lisa package holding the canonical oxlint configs. */
18
+ const SOURCE_DIR = "oxlint";
19
+ /**
20
+ * Legacy `extends` entry shape, pointing into the installed Lisa package.
21
+ * Captures the config's basename so it can be remapped to the vendored copy.
22
+ */
23
+ const LEGACY_ENTRY = /^\.?\/?node_modules\/@codyswann\/lisa\/oxlint\/([^/]+\.json)$/;
24
+ /**
25
+ * Serialize a vendored oxlint config.
26
+ *
27
+ * `$schema` is dropped on the way in. It is an editor affordance that oxlint
28
+ * itself never reads, and every value Lisa ships is a `node_modules`-relative
29
+ * path — exactly the fragility this migration exists to remove. Leaving a
30
+ * dangling pointer inside the file that fixes dangling pointers would be
31
+ * self-defeating.
32
+ * @param config - Parsed source config
33
+ * @returns Canonical file content, newline-terminated
34
+ */
35
+ function serialize(config) {
36
+ const { $schema: _schema, ...rest } = config;
37
+ return `${JSON.stringify(rest, null, 2)}\n`;
38
+ }
39
+ /**
40
+ * Rewrite one `extends` entry, remapping a legacy package-relative path to its
41
+ * vendored equivalent and leaving anything else untouched.
42
+ * @param entry - Raw `extends` entry
43
+ * @returns Rewritten entry
44
+ */
45
+ function remapEntry(entry) {
46
+ const legacy = LEGACY_ENTRY.exec(entry);
47
+ return legacy ? `${VENDOR_PREFIX}${legacy[1]}` : entry;
48
+ }
49
+ /**
50
+ * Collect the vendored config basenames an `extends` list depends on.
51
+ * @param entries - Rewritten `extends` entries
52
+ * @returns Basenames such as `typescript.json`
53
+ */
54
+ function vendoredNames(entries) {
55
+ return entries
56
+ .filter(entry => entry.startsWith(VENDOR_PREFIX))
57
+ .map(entry => entry.slice(VENDOR_PREFIX.length))
58
+ .filter(name => name.length > 0 && !name.includes("/"));
59
+ }
60
+ /**
61
+ * Sibling config basenames a config inherits from.
62
+ * @param config - Parsed oxlint config
63
+ * @returns Basenames such as `base.json`
64
+ */
65
+ function siblingParents(config) {
66
+ return (config.extends ?? [])
67
+ .filter(entry => entry.startsWith("./") && !entry.slice(2).includes("/"))
68
+ .map(entry => entry.slice(2));
69
+ }
70
+ /**
71
+ * Accumulate one config and everything it inherits from.
72
+ *
73
+ * Lisa's oxlint configs form a sibling chain (`expo.json` extends
74
+ * `./typescript.json` extends `./base.json`), so vendoring a leaf without its
75
+ * ancestors would leave a dangling reference — the very failure being fixed.
76
+ * A config Lisa does not ship contributes nothing rather than a partial chain.
77
+ * @param lisaDir - Lisa installation directory
78
+ * @param name - Config basename to collect
79
+ * @param seen - Already-collected basename to content
80
+ * @returns Updated basename to serialized content
81
+ */
82
+ async function collectChain(lisaDir, name, seen) {
83
+ if (seen.has(name)) {
84
+ return seen;
85
+ }
86
+ const config = await readJsonOrNull(path.join(lisaDir, SOURCE_DIR, name));
87
+ if (!config) {
88
+ return seen;
89
+ }
90
+ const withSelf = new Map([
91
+ ...seen,
92
+ [name, serialize(config)],
93
+ ]);
94
+ return siblingParents(config).reduce(async (acc, parent) => collectChain(lisaDir, parent, await acc), Promise.resolve(withSelf));
95
+ }
96
+ /**
97
+ * Walk the `extends` chains of every config the host references.
98
+ * @param lisaDir - Lisa installation directory
99
+ * @param roots - Config basenames referenced by the host
100
+ * @returns Basename to serialized content for the whole closure
101
+ */
102
+ async function resolveClosure(lisaDir, roots) {
103
+ return roots.reduce(async (acc, root) => collectChain(lisaDir, root, await acc), Promise.resolve(new Map()));
104
+ }
105
+ /**
106
+ * Identify vendored configs whose on-disk content does not match what Lisa
107
+ * ships, including those not written yet.
108
+ * @param projectDir - Host project directory
109
+ * @param files - Basename to expected content
110
+ * @returns Basenames needing a write
111
+ */
112
+ async function findStaleFiles(projectDir, files) {
113
+ const checked = await Promise.all([...files].map(async ([name, content]) => {
114
+ const existing = await readFile(path.join(projectDir, VENDOR_DIR, name), "utf-8").catch(() => null);
115
+ return { name, stale: existing !== content };
116
+ }));
117
+ return checked.filter(entry => entry.stale).map(entry => entry.name);
118
+ }
119
+ /**
120
+ * Compute what this migration would change for a project.
121
+ * @param ctx - Migration context
122
+ * @returns The plan, or null when the project has no managed oxlint config
123
+ */
124
+ async function buildPlan(ctx) {
125
+ const oxlintrcPath = path.join(ctx.projectDir, OXLINTRC);
126
+ const oxlintrc = await readJsonOrNull(oxlintrcPath);
127
+ if (!oxlintrc || !Array.isArray(oxlintrc.extends)) {
128
+ return null;
129
+ }
130
+ const current = oxlintrc.extends;
131
+ const nextExtends = [...new Set(current.map(remapEntry))];
132
+ const names = vendoredNames(nextExtends);
133
+ if (names.length === 0) {
134
+ return null;
135
+ }
136
+ const files = await resolveClosure(ctx.lisaDir, names);
137
+ if (files.size === 0) {
138
+ return null;
139
+ }
140
+ const staleFiles = await findStaleFiles(ctx.projectDir, files);
141
+ const extendsChanged = nextExtends.length !== current.length ||
142
+ nextExtends.some((entry, index) => entry !== current[index]);
143
+ return { nextExtends, extendsChanged, files, staleFiles };
144
+ }
145
+ /**
146
+ * Migration: vendor Lisa's oxlint configs into the host repository and point
147
+ * `.oxlintrc.json` at them, so linting works in a checkout without an install.
148
+ *
149
+ * oxlint resolves every `extends` entry as a plain path relative to the config
150
+ * file that declares it — its schema says so, and it performs no Node-style
151
+ * upward module resolution. A `./node_modules/@codyswann/lisa/oxlint/*.json`
152
+ * entry therefore dies in any checkout lacking its own `node_modules`, most
153
+ * commonly a fresh `git worktree`. Since `.lintstagedrc.json` runs
154
+ * `oxlint --fix` from the husky pre-commit hook, that blocked every commit in
155
+ * such a worktree, with the failure surfacing as a downstream prettier kill
156
+ * rather than as the config error it was (#2465).
157
+ *
158
+ * Vendoring is what makes it worktree-proof: git checks tracked files into
159
+ * every worktree, whereas `node_modules` is untracked by definition. The two
160
+ * layers are preserved — Lisa owns the vendored base, the host still owns
161
+ * `.oxlintrc.json` — so projects keep overriding rules exactly as before.
162
+ *
163
+ * Pruning the legacy entry is not cosmetic. The `merge` strategy unions arrays
164
+ * and can never drop an element, so an upgraded project would otherwise carry
165
+ * the new path *and* the old one; oxlint hard-fails on any unresolvable entry,
166
+ * so changing the templates alone would fix nothing for existing hosts.
167
+ */
168
+ export class EnsureOxlintBaseConfigsMigration {
169
+ name = "ensure-oxlint-base-configs";
170
+ description = "Vendor Lisa oxlint configs into .lisa/lisa-oxlint/ so linting works without node_modules";
171
+ /**
172
+ * The migration applies when the vendored configs are missing or stale, or
173
+ * when `.oxlintrc.json` still carries a legacy package-relative entry.
174
+ * @param ctx - Migration context
175
+ * @returns True when there is work to do
176
+ */
177
+ async applies(ctx) {
178
+ const plan = await buildPlan(ctx);
179
+ return plan !== null && (plan.extendsChanged || plan.staleFiles.length > 0);
180
+ }
181
+ /**
182
+ * Write the vendored configs and normalize the host `extends` list.
183
+ * @param ctx - Migration context
184
+ * @returns Result describing the action taken
185
+ */
186
+ async apply(ctx) {
187
+ const plan = await buildPlan(ctx);
188
+ if (!plan || (!plan.extendsChanged && plan.staleFiles.length === 0)) {
189
+ return { name: this.name, action: "noop" };
190
+ }
191
+ const changedFiles = [
192
+ ...plan.staleFiles.map(name => `${VENDOR_DIR}/${name}`),
193
+ ...(plan.extendsChanged ? [OXLINTRC] : []),
194
+ ];
195
+ const message = `vendored ${plan.files.size} oxlint config(s) into ${VENDOR_DIR}`;
196
+ if (ctx.dryRun) {
197
+ ctx.logger.dry(`Would ${message}`);
198
+ return { name: this.name, action: "applied", changedFiles, message };
199
+ }
200
+ const vendorDir = path.join(ctx.projectDir, VENDOR_DIR);
201
+ await fse.ensureDir(vendorDir);
202
+ await Promise.all(plan.staleFiles.map(name => writeFile(path.join(vendorDir, name), plan.files.get(name))));
203
+ if (plan.extendsChanged) {
204
+ const oxlintrcPath = path.join(ctx.projectDir, OXLINTRC);
205
+ const oxlintrc = (await readJsonOrNull(oxlintrcPath));
206
+ await writeFile(oxlintrcPath, `${JSON.stringify({ ...oxlintrc, extends: plan.nextExtends }, null, 2)}\n`);
207
+ }
208
+ ctx.logger.success(message);
209
+ return { name: this.name, action: "applied", changedFiles, message };
210
+ }
211
+ }
212
+ //# sourceMappingURL=ensure-oxlint-base-configs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ensure-oxlint-base-configs.js","sourceRoot":"","sources":["../../src/migrations/ensure-oxlint-base-configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kB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,CAAC,cAAc,EAAE,CAAC;YACxB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;YACzD,MAAM,QAAQ,GAAG,CAAC,MAAM,cAAc,CACpC,YAAY,CACb,CAAqB,CAAC;YACvB,MAAM,SAAS,CACb,YAAY,EACZ,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAC3E,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;IACvE,CAAC;CACF"}
@@ -5,6 +5,7 @@ export { EnsureJestRnMockAccessibilityManagerMigration } from "./ensure-jest-rn-
5
5
  export { EnsureLearningsGitattributesMigration } from "./ensure-learnings-gitattributes.js";
6
6
  export { EnsureLearningsMergeDriverMigration } from "./ensure-learnings-merge-driver.js";
7
7
  export { EnsureLisaPostinstallMigration } from "./ensure-lisa-postinstall.js";
8
+ export { EnsureOxlintBaseConfigsMigration } from "./ensure-oxlint-base-configs.js";
8
9
  export { EnsureQualityCallerScopesMigration } from "./ensure-quality-caller-scopes.js";
9
10
  export { EnsureSonarExcludesLisaHarnessMigration } from "./ensure-sonar-excludes-lisa-harness.js";
10
11
  export { EnsureTsconfigLocalFilesFallbackMigration } from "./ensure-tsconfig-local-files-fallback.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,SAAS,EACT,eAAe,EACf,gB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B,IAAI,iBAAiB,CAE3D"}
@@ -3,6 +3,7 @@ import { EnsureJestRnMockAccessibilityManagerMigration } from "./ensure-jest-rn-
3
3
  import { EnsureLearningsGitattributesMigration } from "./ensure-learnings-gitattributes.js";
4
4
  import { EnsureLearningsMergeDriverMigration } from "./ensure-learnings-merge-driver.js";
5
5
  import { EnsureLisaPostinstallMigration } from "./ensure-lisa-postinstall.js";
6
+ import { EnsureOxlintBaseConfigsMigration } from "./ensure-oxlint-base-configs.js";
6
7
  import { EnsureQualityCallerScopesMigration } from "./ensure-quality-caller-scopes.js";
7
8
  import { EnsureSonarExcludesLisaHarnessMigration } from "./ensure-sonar-excludes-lisa-harness.js";
8
9
  import { EnsureTsconfigLocalFilesFallbackMigration } from "./ensure-tsconfig-local-files-fallback.js";
@@ -15,6 +16,7 @@ export { EnsureJestRnMockAccessibilityManagerMigration } from "./ensure-jest-rn-
15
16
  export { EnsureLearningsGitattributesMigration } from "./ensure-learnings-gitattributes.js";
16
17
  export { EnsureLearningsMergeDriverMigration } from "./ensure-learnings-merge-driver.js";
17
18
  export { EnsureLisaPostinstallMigration } from "./ensure-lisa-postinstall.js";
19
+ export { EnsureOxlintBaseConfigsMigration } from "./ensure-oxlint-base-configs.js";
18
20
  export { EnsureQualityCallerScopesMigration } from "./ensure-quality-caller-scopes.js";
19
21
  export { EnsureSonarExcludesLisaHarnessMigration } from "./ensure-sonar-excludes-lisa-harness.js";
20
22
  export { EnsureTsconfigLocalFilesFallbackMigration } from "./ensure-tsconfig-local-files-fallback.js";
@@ -40,6 +42,7 @@ export class MigrationRegistry {
40
42
  new EnsureLearningsGitattributesMigration(),
41
43
  new EnsureLearningsMergeDriverMigration(),
42
44
  new EnsureLisaPostinstallMigration(),
45
+ new EnsureOxlintBaseConfigsMigration(),
43
46
  new EnsureQualityCallerScopesMigration(),
44
47
  new EnsureSonarExcludesLisaHarnessMigration(),
45
48
  new EnsureWikiSourceDeclaredMigration(),
@@ -1 +1 @@
1
- {"version":3,"file":"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AAU,EAAE,CAAC;YACxC,IAAI,SAAS,CAAC,gBAAgB,EAAE,CAAC;gBAC/B,MAAM,SAAS,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,GAAqB;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACxC,MAAM,SAAS,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/C,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;gBAC1D,SAAS;YACX,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,IAAI,iBAAiB,EAAE,CAAC;AACjC,CAAC"}
@@ -31,7 +31,7 @@
31
31
  * passed through unchanged.
32
32
  * @module opencode/command-transformer
33
33
  */
34
- import yaml from "js-yaml";
34
+ import { loadYaml } from "../utils/yaml.js";
35
35
  /**
36
36
  * Pure transform: convert a Lisa command Markdown into an OpenCode command
37
37
  * Markdown.
@@ -45,7 +45,7 @@ export function transformCommandToOpencode(commandSource, displayName) {
45
45
  if (match === null || match[1] === undefined || match[2] === undefined) {
46
46
  throw new Error(`Command source is missing YAML frontmatter for ${displayName}`);
47
47
  }
48
- const description = parseDescription(yaml.load(match[1]), displayName);
48
+ const description = parseDescription(loadYaml(match[1]), displayName);
49
49
  const body = match[2].trimStart().trimEnd();
50
50
  const frontmatter = [
51
51
  "---",
@@ -58,7 +58,7 @@ export function transformCommandToOpencode(commandSource, displayName) {
58
58
  /**
59
59
  * Extract the command description from parsed frontmatter, falling back to the
60
60
  * display name when none is present.
61
- * @param parsed - Output of `yaml.load(rawFrontmatter)` (untrusted shape)
61
+ * @param parsed - Output of `loadYaml(rawFrontmatter)` (untrusted shape)
62
62
  * @param displayName - Fallback used when no description is available
63
63
  * @returns The description string
64
64
  */
@@ -1 +1 @@
1
- {"version":3,"file":"command-transformer.js","sourceRoot":"","sources":["../../src/opencode/command-transformer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CACxC,aAAqB,EACrB,WAAmB;IAEnB,MAAM,KAAK,GAAG,6CAA6C,CAAC,IAAI,CAC9D,aAAa,CACd,CAAC;IACF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QACvE,MAAM,IAAI,KAAK,CACb,kDAAkD,WAAW,EAAE,CAChE,CAAC;IACJ,CAAC;IACD,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;IACvE,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;IAE5C,MAAM,WAAW,GAAG;QAClB,KAAK;QACL,gBAAgB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE;QAC7C,KAAK;QACL,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,OAAO,GAAG,WAAW,GAAG,IAAI,IAAI,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;A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C,CAAC;IAEb,OAAO,GAAG,WAAW,GAAG,IAAI,IAAI,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CAAC,MAAe,EAAE,WAAmB;IAC5D,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAClD,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,MAAM,GAAG,GAAG,MAAiC,CAAC;IAC9C,OAAO,OAAO,GAAG,CAAC,WAAW,KAAK,QAAQ,IAAI,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;QACtE,CAAC,CAAC,GAAG,CAAC,WAAW;QACjB,CAAC,CAAC,WAAW,CAAC;AAClB,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { LisaError } from "../errors/index.js";
2
+ /** The only js-yaml surface Lisa consumes. */
3
+ export interface YamlApi {
4
+ /**
5
+ * Parse a single YAML document.
6
+ * @param source - YAML text
7
+ * @returns The parsed document
8
+ */
9
+ readonly load: (source: string) => unknown;
10
+ }
11
+ /** Human-readable statement of what Lisa can drive. */
12
+ export declare const SUPPORTED_JS_YAML_DESCRIPTION = "js-yaml 3.x, 4.x and 5.x (any build exposing a load() function)";
13
+ /**
14
+ * Raised when the resolved js-yaml cannot be driven by Lisa.
15
+ *
16
+ * Carries the remediation inline: the operator reading this in a postinstall
17
+ * warning has no other context to work from.
18
+ */
19
+ export declare class IncompatibleYamlError extends LisaError {
20
+ /**
21
+ * Build the operator-facing incompatibility message.
22
+ * @param shape - Short description of what the resolved module did expose
23
+ */
24
+ constructor(shape: string);
25
+ }
26
+ /**
27
+ * Resolve Lisa's YAML surface from a js-yaml module namespace, tolerating both
28
+ * the named-export shape (3.x/4.x/5.x ESM) and the CJS interop shape where the
29
+ * whole module hangs off `default`.
30
+ *
31
+ * Exported so `lisa doctor` can probe compatibility without parsing anything,
32
+ * and so the failure path is directly testable.
33
+ * @param moduleNamespace - The resolved js-yaml module namespace
34
+ * @returns The YAML surface Lisa uses
35
+ * @throws IncompatibleYamlError when no callable `load` can be found
36
+ */
37
+ export declare function resolveYamlApi(moduleNamespace: unknown): YamlApi;
38
+ /**
39
+ * Parse a single YAML document using whichever js-yaml the install resolved.
40
+ * @param source - YAML text
41
+ * @returns The parsed document
42
+ * @throws IncompatibleYamlError when the resolved js-yaml is unusable
43
+ */
44
+ export declare function loadYaml(source: string): unknown;
45
+ /**
46
+ * Probe the js-yaml this process actually resolved.
47
+ *
48
+ * Never throws: `lisa doctor` turns the result into a check line, and a doctor
49
+ * that crashed on the very incompatibility it is meant to report would be the
50
+ * silent-failure bug all over again.
51
+ * @returns The incompatibility message, or null when the resolved js-yaml works
52
+ */
53
+ export declare function probeYamlRuntime(): string | null;
54
+ //# sourceMappingURL=yaml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../src/utils/yaml.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,8CAA8C;AAC9C,MAAM,WAAW,OAAO;IACtB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C;AAED,uDAAuD;AACvD,eAAO,MAAM,6BAA6B,oEACyB,CAAC;AAEpE;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,SAAS;IAClD;;;OAGG;gBACS,KAAK,EAAE,MAAM;CAW1B;AA8BD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,OAAO,GAAG,OAAO,CAYhE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAOhD"}