@codyswann/lisa 4.69.0 → 4.69.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/all/create-only/.github/workflows/continuous-gates.yml +2 -2
- package/all/create-only/.github/workflows/workflow-load-failure-sweep.yml +1 -1
- package/cdk/create-only/.github/workflows/ci.yml +2 -2
- package/cdk/create-only/.github/workflows/deploy.yml +3 -3
- package/cdk/package-lisa/package.lisa.json +4 -4
- package/dist/cli/doctor-legacy-overlay.d.ts.map +1 -1
- package/dist/cli/doctor-legacy-overlay.js +37 -5
- package/dist/cli/doctor-legacy-overlay.js.map +1 -1
- package/dist/codex/hooks-installer.d.ts +12 -0
- package/dist/codex/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +256 -7
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/manifest.d.ts +4 -1
- package/dist/codex/manifest.d.ts.map +1 -1
- package/dist/codex/manifest.js +18 -2
- package/dist/codex/manifest.js.map +1 -1
- package/dist/codex/project-hooks-cleanup.d.ts +3 -3
- package/dist/codex/project-hooks-cleanup.d.ts.map +1 -1
- package/dist/codex/project-hooks-cleanup.js +5 -14
- package/dist/codex/project-hooks-cleanup.js.map +1 -1
- package/dist/codex/project-overlay.d.ts.map +1 -1
- package/dist/codex/project-overlay.js +4 -1
- package/dist/codex/project-overlay.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +129 -29
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/create-only/.github/workflows/ci.yml +3 -3
- package/expo/create-only/.github/workflows/deploy.yml +4 -4
- package/expo/create-only/.github/workflows/nightly-e2e-bypass-reaper.yml +1 -1
- package/expo/create-only/.github/workflows/playwright-e2e.yml +1 -1
- package/expo/create-only/eas.json +1 -1
- package/harper-fabric/copy-overwrite/.github/workflows/ci.yml +1 -1
- package/harper-fabric/create-only/.github/workflows/deploy.yml +3 -3
- package/harper-fabric/create-only/.github/workflows/zap-baseline.yml +1 -1
- package/harper-fabric/package-lisa/package.lisa.json +3 -3
- package/nestjs/create-only/.github/workflows/ci.yml +2 -2
- package/nestjs/create-only/.github/workflows/deploy.yml +5 -5
- package/nestjs/package-lisa/package.lisa.json +3 -3
- package/npm-package/package-lisa/package.lisa.json +3 -3
- package/package.json +12 -12
- package/phaser/copy-overwrite/.github/workflows/ci.yml +1 -1
- package/phaser/package-lisa/package.lisa.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/scripts/update-node-version.ts +51 -43
- package/typescript/copy-overwrite/.github/GITHUB_ACTIONS.md +2 -2
- package/typescript/copy-overwrite/.nvmrc +1 -1
- package/typescript/copy-overwrite/audit.ignore.config.json +0 -6
- package/typescript/create-only/.github/workflows/ci.yml +1 -1
- package/typescript/create-only/.github/workflows/review-evidence.yml +1 -1
- package/typescript/create-only/.github/workflows/third-party-review-evidence.yml +1 -1
- package/typescript/package-lisa/package.lisa.json +9 -9
- package/ui/index.html +2 -2
package/README.md
CHANGED
|
@@ -186,6 +186,22 @@ any direct override in the current directory's `package.json`. It preserves the
|
|
|
186
186
|
original error and does not change dependencies. Nested selectors and unreadable
|
|
187
187
|
manifests remain unverified; this diagnostic is not a full lockfile audit.
|
|
188
188
|
|
|
189
|
+
Clean TypeScript and CDK hosts receive the shared Node 22.23.3 baseline,
|
|
190
|
+
Vitest and coverage-v8 4.1.11 minimums, and a Vite 8.3.2 minimum within Vite 8.
|
|
191
|
+
Lisa retains the TypeScript 6, ESLint 9, Knip 5, Husky 8 and Vitest 4 families.
|
|
192
|
+
Applying twice with the same Lisa version keeps managed content unchanged.
|
|
193
|
+
Install dependencies after applying, then verify the installed versions and
|
|
194
|
+
lockfile alongside the host's test, typecheck and offline synth commands.
|
|
195
|
+
|
|
196
|
+
Package template ownership still applies. Explicit TypeScript Node and test-tool
|
|
197
|
+
`defaults` survive an apply, while CDK's `force` test tools advance to the shared
|
|
198
|
+
patch floor. Existing create-only workflow and Expo EAS files stay host-owned.
|
|
199
|
+
The overwritten `.nvmrc` supplies the shared Node runtime. Review older explicit
|
|
200
|
+
pins and create-only workflow inputs before adopting this baseline in an
|
|
201
|
+
existing host. Maintainers can run `bun run update-node-version` after changing
|
|
202
|
+
the root `.nvmrc` to update current tracked runtime surfaces without rewriting
|
|
203
|
+
historical plans or generic test fixtures.
|
|
204
|
+
|
|
189
205
|
When Lisa is invoked during installation it prints this next step. Package
|
|
190
206
|
managers that do not run its lifecycle scripts cannot display that notice.
|
|
191
207
|
|
|
@@ -272,6 +288,18 @@ into the project and unrelated Lisa stacks are not loaded. Project settings use
|
|
|
272
288
|
`[features].hooks`; the deprecated `codex_hooks` key is removed during
|
|
273
289
|
reconciliation.
|
|
274
290
|
|
|
291
|
+
During an explicit Codex hook migration, including `--refresh-templates`, apply
|
|
292
|
+
retains previously installed hook commands as functional regular copies with
|
|
293
|
+
their helpers and rule data. An active session can keep using its loaded
|
|
294
|
+
commands while a fresh session uses the current generated fallback. Host hooks
|
|
295
|
+
remain intact. Keep the managed compatibility files recorded in
|
|
296
|
+
`.codex/.lisa-managed.json` rather than deleting them during a running session.
|
|
297
|
+
Review changed project hook definitions through Codex’s `/hooks` interface
|
|
298
|
+
before trusting them in a fresh session. Automatic postinstall still skips
|
|
299
|
+
agent configuration changes. This retirement
|
|
300
|
+
boundary belongs to the Codex project overlay. The other supported agents do
|
|
301
|
+
not delete this shell-command layout during apply.
|
|
302
|
+
|
|
275
303
|
Remote coding environments use one vendor-neutral AWS bootstrap rather than
|
|
276
304
|
repository-specific or agent-specific IAM users. Run `/lisa:setup-remote-aws`
|
|
277
305
|
to install the common setup script and native Cursor/Copilot adapters; Claude,
|
|
@@ -73,7 +73,7 @@ jobs:
|
|
|
73
73
|
persist-credentials: false
|
|
74
74
|
- uses: actions/setup-node@v6
|
|
75
75
|
with:
|
|
76
|
-
node-version: '22.
|
|
76
|
+
node-version: '22.23.3'
|
|
77
77
|
# This prerequisite belongs to this scheduled caller. Other callers of
|
|
78
78
|
# gates.yml keep their existing behavior when a moment declares no gates.
|
|
79
79
|
- name: Require checks for this environment
|
|
@@ -116,7 +116,7 @@ jobs:
|
|
|
116
116
|
# (CodySwannGT/lisa#3698).
|
|
117
117
|
expected_workflow_contract_major: '1'
|
|
118
118
|
moment: continuous:${{ inputs.environment || 'production' }}
|
|
119
|
-
node_version: '22.
|
|
119
|
+
node_version: '22.23.3'
|
|
120
120
|
package_manager: 'npm'
|
|
121
121
|
# No `secrets:` key, deliberately. `gates.yml` declares none in its
|
|
122
122
|
# `workflow_call` and contains zero occurrences of the string `secret`, so
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
persist-credentials: false
|
|
23
23
|
- uses: actions/setup-node@v6
|
|
24
24
|
with:
|
|
25
|
-
node-version: '22.
|
|
25
|
+
node-version: '22.23.3'
|
|
26
26
|
package-manager-cache: false
|
|
27
27
|
# Keep this a local script: the detector must run when an upstream
|
|
28
28
|
# reusable workflow cannot load. It needs Node and gh, with no dependencies.
|
|
@@ -149,7 +149,7 @@ jobs:
|
|
|
149
149
|
uses: actions/setup-node@v6
|
|
150
150
|
with:
|
|
151
151
|
package-manager-cache: false
|
|
152
|
-
node-version: '22.
|
|
152
|
+
node-version: '22.23.3'
|
|
153
153
|
|
|
154
154
|
- name: 📦 Install dependencies
|
|
155
155
|
run: npm ci
|
|
@@ -230,7 +230,7 @@ jobs:
|
|
|
230
230
|
# declared a break, and says NOT DETERMINED if this line goes missing
|
|
231
231
|
# (CodySwannGT/lisa#3698).
|
|
232
232
|
expected_workflow_contract_major: '1'
|
|
233
|
-
node_version: '22.
|
|
233
|
+
node_version: '22.23.3'
|
|
234
234
|
package_manager: 'npm'
|
|
235
235
|
secrets:
|
|
236
236
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
@@ -103,7 +103,7 @@ jobs:
|
|
|
103
103
|
# (CodySwannGT/lisa#3698).
|
|
104
104
|
expected_workflow_contract_major: '1'
|
|
105
105
|
moment: pre-deploy:${{ needs.determine_environment.outputs.environment }}
|
|
106
|
-
node_version: '22.
|
|
106
|
+
node_version: '22.23.3'
|
|
107
107
|
package_manager: 'npm'
|
|
108
108
|
# No `secrets:` key: gates.yml declares none in its `workflow_call`, so
|
|
109
109
|
# passing any grants everything to a callee that reads nothing (#3065).
|
|
@@ -132,7 +132,7 @@ jobs:
|
|
|
132
132
|
require_signatures: false
|
|
133
133
|
generate_sbom: true
|
|
134
134
|
override_blackout: true
|
|
135
|
-
node_version: '22.
|
|
135
|
+
node_version: '22.23.3'
|
|
136
136
|
package_manager: 'npm'
|
|
137
137
|
secrets:
|
|
138
138
|
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
|
|
@@ -171,7 +171,7 @@ jobs:
|
|
|
171
171
|
# (CodySwannGT/lisa#3698).
|
|
172
172
|
expected_workflow_contract_major: '1'
|
|
173
173
|
moment: post-deploy:${{ needs.determine_environment.outputs.environment }}
|
|
174
|
-
node_version: '22.
|
|
174
|
+
node_version: '22.23.3'
|
|
175
175
|
package_manager: 'npm'
|
|
176
176
|
# No `secrets:` key: gates.yml declares none in its `workflow_call`, so
|
|
177
177
|
# passing any grants everything to a callee that reads nothing (#3065).
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"aws-cdk": "^2.1127.0",
|
|
27
27
|
"esbuild": "^0.28.1",
|
|
28
|
-
"vite": "^8.
|
|
29
|
-
"vitest": "^4.1.
|
|
30
|
-
"@vitest/coverage-v8": "^4.1.
|
|
28
|
+
"vite": "^8.3.2",
|
|
29
|
+
"vitest": "^4.1.11",
|
|
30
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
31
31
|
"eslint-plugin-oxlint": "^1.62.0",
|
|
32
32
|
"oxlint": "^1.62.0",
|
|
33
33
|
"oxlint-tsgolint": "^0.24.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"yarn": "please-use-npm",
|
|
60
60
|
"pnpm": "please-use-npm",
|
|
61
61
|
"bun": "please-use-npm",
|
|
62
|
-
"node": "22.
|
|
62
|
+
"node": "22.23.3"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"lint": "$npm_execpath run lint:lisa",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-legacy-overlay.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-legacy-overlay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"doctor-legacy-overlay.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-legacy-overlay.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CA2CvE"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
1
|
+
import { existsSync, lstatSync, readFileSync } from "node:fs";
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { LISA_HOOKS_SUBDIR, LISA_RULES_SUBDIR, } from "../codex/hooks-installer.js";
|
|
4
|
+
import { LISA_MANAGED_MANIFEST_FILENAME } from "../codex/manifest.js";
|
|
5
|
+
import { parseHooksFile } from "../codex/hooks-merger.js";
|
|
4
6
|
import { LISA_SKILLS_SUBDIR } from "../codex/skills-installer.js";
|
|
5
7
|
const LEGACY_CODEX_OVERLAY_CHECK_NAME = "Codex overlay current?";
|
|
6
8
|
/**
|
|
@@ -24,16 +26,20 @@ export function checkLegacyCodexOverlay(targetPath) {
|
|
|
24
26
|
detail: "No .codex directory present",
|
|
25
27
|
};
|
|
26
28
|
}
|
|
29
|
+
const compatibility = hasManagedCompatibility(codexDir);
|
|
27
30
|
const legacyPaths = [
|
|
28
31
|
LISA_HOOKS_SUBDIR,
|
|
29
32
|
LISA_RULES_SUBDIR,
|
|
30
33
|
LISA_SKILLS_SUBDIR,
|
|
31
|
-
].filter(subdir => existsSync(path.join(codexDir, subdir))
|
|
34
|
+
].filter(subdir => existsSync(path.join(codexDir, subdir)) &&
|
|
35
|
+
!(compatibility && subdir !== LISA_SKILLS_SUBDIR));
|
|
32
36
|
if (legacyPaths.length === 0) {
|
|
33
37
|
return {
|
|
34
38
|
name: LEGACY_CODEX_OVERLAY_CHECK_NAME,
|
|
35
39
|
status: "ok",
|
|
36
|
-
detail:
|
|
40
|
+
detail: compatibility
|
|
41
|
+
? "Managed compatibility copies retained for active sessions; fresh sessions use the current enforcement fallback"
|
|
42
|
+
: "No legacy project-level Codex overlay present",
|
|
37
43
|
};
|
|
38
44
|
}
|
|
39
45
|
const listed = legacyPaths
|
|
@@ -43,9 +49,35 @@ export function checkLegacyCodexOverlay(targetPath) {
|
|
|
43
49
|
name: LEGACY_CODEX_OVERLAY_CHECK_NAME,
|
|
44
50
|
status: "warn",
|
|
45
51
|
detail: `Legacy pre-2.198 Codex overlay present (${listed}). ` +
|
|
46
|
-
"Run `lisa apply` in the primary checkout
|
|
52
|
+
"Run `lisa apply` in the primary checkout to migrate the configuration and retain functional copies for active sessions — " +
|
|
47
53
|
"fresh clones/worktrees otherwise load stale hooks/skills that a later " +
|
|
48
|
-
"apply
|
|
54
|
+
"apply must keep executable mid-session (CodySwannGT/lisa#1632)",
|
|
49
55
|
};
|
|
50
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Distinguish intentional copied compatibility from an unmigrated overlay.
|
|
59
|
+
* @param codexDir Host Codex directory.
|
|
60
|
+
* @returns Whether every recorded compatibility path remains a regular file.
|
|
61
|
+
*/
|
|
62
|
+
function hasManagedCompatibility(codexDir) {
|
|
63
|
+
try {
|
|
64
|
+
const manifest = JSON.parse(readFileSync(path.join(codexDir, LISA_MANAGED_MANIFEST_FILENAME), "utf8"));
|
|
65
|
+
const compatibility = manifest.hookCompatibilityFiles;
|
|
66
|
+
if (!Array.isArray(compatibility) ||
|
|
67
|
+
compatibility.length === 0 ||
|
|
68
|
+
!compatibility.every(file => typeof file === "string" &&
|
|
69
|
+
manifest.files?.includes(file) &&
|
|
70
|
+
(file.startsWith(`${LISA_HOOKS_SUBDIR}${path.sep}`) ||
|
|
71
|
+
file.startsWith(`${LISA_RULES_SUBDIR}${path.sep}`)) &&
|
|
72
|
+
!file.split(path.sep).includes("..") &&
|
|
73
|
+
lstatSync(path.join(codexDir, file)).isFile()))
|
|
74
|
+
return false;
|
|
75
|
+
const hooks = parseHooksFile(readFileSync(path.join(codexDir, "hooks.json"), "utf8"));
|
|
76
|
+
const managed = Object.values(hooks.hooks ?? {}).flatMap(groups => groups.flatMap(group => group.hooks.filter(hook => hook._lisaManaged === true)));
|
|
77
|
+
return (managed.length === 1 && managed[0]?._lisaId === "enforcement-fallback");
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
51
83
|
//# sourceMappingURL=doctor-legacy-overlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-legacy-overlay.js","sourceRoot":"","sources":["../../src/cli/doctor-legacy-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor-legacy-overlay.js","sourceRoot":"","sources":["../../src/cli/doctor-legacy-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AAEjE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACjD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,OAAO;YACL,IAAI,EAAE,+BAA+B;YACrC,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,6BAA6B;SACtC,CAAC;IACJ,CAAC;IAED,MAAM,aAAa,GAAG,uBAAuB,CAA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AAO,IAAI,KAAK,QAAQ;gBACxB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC;gBAC9B,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,iBAAiB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;oBACjD,IAAI,CAAC,UAAU,CAAC,GAAG,iBAAiB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;gBACrD,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACpC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAChD;YAED,OAAO,KAAK,CAAC;QACf,MAAM,KAAK,GAAG,cAAc,CAC1B,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,CACxD,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAChE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CACrB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CACvD,CACF,CAAC;QACF,OAAO,CACL,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,sBAAsB,CACvE,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -55,4 +55,16 @@ export interface HooksInstallResult {
|
|
|
55
55
|
* @returns Result describing what was written
|
|
56
56
|
*/
|
|
57
57
|
export declare function installHooks(lisaDir: string, destDir: string, detectedTypes: readonly ProjectType[], previousManagedFiles?: readonly string[]): Promise<HooksInstallResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Keep previously installed catalog commands functional without registering
|
|
60
|
+
* them again. Copies outlive replacement of the package that owned old links.
|
|
61
|
+
* Host-authored siblings are never pruned. This is an apply-time migration,
|
|
62
|
+
* not runtime/session detection or an assumed hot-reload boundary.
|
|
63
|
+
* @param lisaDir Lisa source/package root.
|
|
64
|
+
* @param destDir Host root.
|
|
65
|
+
* @param detectedTypes Current project types.
|
|
66
|
+
* @param previousManagedFiles Previous manifest ownership.
|
|
67
|
+
* @returns Compatibility files to retain in the current manifest.
|
|
68
|
+
*/
|
|
69
|
+
export declare function installHookCompatibility(lisaDir: string, destDir: string, detectedTypes: readonly ProjectType[], previousManagedFiles: readonly string[]): Promise<readonly string[]>;
|
|
58
70
|
//# sourceMappingURL=hooks-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks-installer.d.ts","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks-installer.d.ts","sourceRoot":"","sources":["../../src/codex/hooks-installer.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWrD,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,QAA6B,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,2BAA2B,CAAC;AAEvD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,sBAAsB,CAAC;AAEjD,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,+DAA+D;AAC/D,eAAO,MAAM,cAAc,eAAe,CAAC;AAqL3C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAInD,CAAC;AAEF,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,0DAA0D;IAC1D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,SAAS,WAAW,EAAE,EACrC,oBAAoB,GAAE,SAAS,MAAM,EAAO,GAC3C,OAAO,CAAC,kBAAkB,CAAC,CAsF7B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,SAAS,WAAW,EAAE,EACrC,oBAAoB,EAAE,SAAS,MAAM,EAAE,GACtC,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAmE5B"}
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
* The project overlay now uses plugin-bundled hooks for the complete catalog
|
|
26
26
|
* and one repository-owned enforcement dispatcher as the fail-closed delivery
|
|
27
27
|
* fallback. This module remains for migration coverage of the retired linked
|
|
28
|
-
* script/rule layout.
|
|
28
|
+
* script/rule layout and source-owned compatibility copies for loaded sessions.
|
|
29
29
|
* @module codex/hooks-installer
|
|
30
30
|
*/
|
|
31
31
|
import * as fse from "fs-extra";
|
|
32
|
-
import { readFile, rm, symlink, writeFile } from "node:fs/promises";
|
|
32
|
+
import { lstat, mkdtemp, readFile, readlink, rename, rm, symlink, writeFile, } from "node:fs/promises";
|
|
33
33
|
import * as path from "node:path";
|
|
34
34
|
import { fileURLToPath } from "node:url";
|
|
35
35
|
import { mirrorLisaRules } from "../core/lisa-rules-mirror.js";
|
|
@@ -62,6 +62,7 @@ export const HOOKS_FILENAME = "hooks.json";
|
|
|
62
62
|
* its three write paths (text Edit, file Write, apply_patch diff).
|
|
63
63
|
*/
|
|
64
64
|
const WRITE_MATCHER = "Edit|Write|apply_patch";
|
|
65
|
+
const INJECT_RULES_ID = "inject-rules";
|
|
65
66
|
const HARPER_PLUGIN = "lisa-harper-fabric";
|
|
66
67
|
/**
|
|
67
68
|
* Hook catalog. Adding a new hook? Three steps:
|
|
@@ -74,7 +75,7 @@ const HARPER_PLUGIN = "lisa-harper-fabric";
|
|
|
74
75
|
*/
|
|
75
76
|
const HOOK_CATALOG = [
|
|
76
77
|
{
|
|
77
|
-
id:
|
|
78
|
+
id: INJECT_RULES_ID,
|
|
78
79
|
event: "SessionStart",
|
|
79
80
|
matcher: "",
|
|
80
81
|
scriptFilename: "inject-rules.sh",
|
|
@@ -110,6 +111,7 @@ const HOOK_CATALOG = [
|
|
|
110
111
|
event: "PreToolUse",
|
|
111
112
|
matcher: "Bash",
|
|
112
113
|
scriptFilename: "block-direct-issue-create.sh",
|
|
114
|
+
sourcePlugin: "lisa",
|
|
113
115
|
forProjectTypes: ["*"],
|
|
114
116
|
statusMessage: "Checking work-item filing policy",
|
|
115
117
|
},
|
|
@@ -256,7 +258,7 @@ export async function installHooks(lisaDir, destDir, detectedTypes, previousMana
|
|
|
256
258
|
: [];
|
|
257
259
|
// Step 2: mirror rules from Lisa into .codex/lisa-rules/ (only when
|
|
258
260
|
// inject-rules is being installed — i.e., always, since it's a "*" hook)
|
|
259
|
-
const ruleFiles = applicable.some(e => e.id ===
|
|
261
|
+
const ruleFiles = applicable.some(e => e.id === INJECT_RULES_ID)
|
|
260
262
|
? (await mirrorLisaRules(lisaDir, rulesDir, detectedTypes, "link")).map(file => path.join(LISA_RULES_SUBDIR, file))
|
|
261
263
|
: [];
|
|
262
264
|
// Step 3: tagged-merge hooks.json
|
|
@@ -279,6 +281,245 @@ export async function installHooks(lisaDir, destDir, detectedTypes, previousMana
|
|
|
279
281
|
deleted: Object.freeze(deleted),
|
|
280
282
|
};
|
|
281
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Keep previously installed catalog commands functional without registering
|
|
286
|
+
* them again. Copies outlive replacement of the package that owned old links.
|
|
287
|
+
* Host-authored siblings are never pruned. This is an apply-time migration,
|
|
288
|
+
* not runtime/session detection or an assumed hot-reload boundary.
|
|
289
|
+
* @param lisaDir Lisa source/package root.
|
|
290
|
+
* @param destDir Host root.
|
|
291
|
+
* @param detectedTypes Current project types.
|
|
292
|
+
* @param previousManagedFiles Previous manifest ownership.
|
|
293
|
+
* @returns Compatibility files to retain in the current manifest.
|
|
294
|
+
*/
|
|
295
|
+
export async function installHookCompatibility(lisaDir, destDir, detectedTypes, previousManagedFiles) {
|
|
296
|
+
const codexDir = path.join(destDir, ".codex");
|
|
297
|
+
const hooksDir = path.join(codexDir, LISA_HOOKS_SUBDIR);
|
|
298
|
+
const existing = await readHooksFile(path.join(codexDir, HOOKS_FILENAME));
|
|
299
|
+
const taggedCommands = new Set(Object.values(existing.hooks ?? {}).flatMap(groups => groups.flatMap(group => group.hooks
|
|
300
|
+
.filter(hook => hook._lisaManaged === true)
|
|
301
|
+
.map(hook => hook.command))));
|
|
302
|
+
const owned = new Set([
|
|
303
|
+
...previousManagedFiles,
|
|
304
|
+
...HOOK_CATALOG.filter(entry => taggedCommands.has(catalogEntryToSpec(entry, destDir).command)).map(entry => path.join(LISA_HOOKS_SUBDIR, entry.scriptFilename)),
|
|
305
|
+
]);
|
|
306
|
+
const candidates = await Promise.all(HOOK_CATALOG.map(async (entry) => {
|
|
307
|
+
const relative = path.join(LISA_HOOKS_SUBDIR, entry.scriptFilename);
|
|
308
|
+
const keep = owned.has(relative) ||
|
|
309
|
+
taggedCommands.has(catalogEntryToSpec(entry, destDir).command) ||
|
|
310
|
+
(await isManagedSourceLink(path.join(codexDir, relative), resolveHookScript(lisaDir, entry), lisaDir, destDir));
|
|
311
|
+
return keep ? entry : undefined;
|
|
312
|
+
}));
|
|
313
|
+
const retained = candidates.filter((entry) => entry !== undefined);
|
|
314
|
+
if (retained.length === 0)
|
|
315
|
+
return [];
|
|
316
|
+
const sources = compatibilitySources(lisaDir, retained);
|
|
317
|
+
await assertCompatibilityOwnership(sources, codexDir, owned, lisaDir, destDir);
|
|
318
|
+
await fse.ensureDir(hooksDir);
|
|
319
|
+
const entrypoints = new Set(retained.map(entry => entry.scriptFilename));
|
|
320
|
+
const rules = retained.some(entry => entry.id === INJECT_RULES_ID)
|
|
321
|
+
? await copyCompatibilityRules(lisaDir, codexDir, detectedTypes, retained, owned)
|
|
322
|
+
: [];
|
|
323
|
+
// Install complete dependencies before atomically replacing loaded entrypoints.
|
|
324
|
+
const helpers = await copyCompatibilitySources(sources.filter(source => !entrypoints.has(source.filename)), codexDir);
|
|
325
|
+
const scripts = await copyCompatibilitySources(sources.filter(source => entrypoints.has(source.filename)), codexDir);
|
|
326
|
+
return Object.freeze([...scripts, ...helpers, ...rules]);
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Reject unknown companion collisions before changing any compatibility file.
|
|
330
|
+
* A retained command does not grant ownership of a host-authored helper.
|
|
331
|
+
* @param sources Complete catalog closure.
|
|
332
|
+
* @param codexDir Host Codex root.
|
|
333
|
+
* @param owned Proven manifest/tagged-handler ownership.
|
|
334
|
+
* @param lisaDir Verified Lisa package root.
|
|
335
|
+
* @param destDir Host root.
|
|
336
|
+
*/
|
|
337
|
+
async function assertCompatibilityOwnership(sources, codexDir, owned, lisaDir, destDir) {
|
|
338
|
+
await Promise.all(sources.map(async ({ source, filename }) => {
|
|
339
|
+
const relative = path.join(LISA_HOOKS_SUBDIR, filename);
|
|
340
|
+
const destination = path.join(codexDir, relative);
|
|
341
|
+
const stat = await lstat(destination).catch(error => {
|
|
342
|
+
if (error.code === "ENOENT")
|
|
343
|
+
return undefined;
|
|
344
|
+
throw error;
|
|
345
|
+
});
|
|
346
|
+
if (!stat || owned.has(relative))
|
|
347
|
+
return;
|
|
348
|
+
if (stat.isSymbolicLink()) {
|
|
349
|
+
if (await isManagedSourceLink(destination, source, lisaDir, destDir))
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
else if (stat.isFile() &&
|
|
353
|
+
(await readFile(destination)).equals(await readFile(source))) {
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
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.`);
|
|
357
|
+
}));
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Copy one dependency group before exposing dependent entrypoints.
|
|
361
|
+
* @param sources Package implementations.
|
|
362
|
+
* @param codexDir Host Codex directory.
|
|
363
|
+
* @returns Installed paths.
|
|
364
|
+
*/
|
|
365
|
+
async function copyCompatibilitySources(sources, codexDir) {
|
|
366
|
+
return Promise.all(sources.map(async ({ source, filename }) => {
|
|
367
|
+
const relative = path.join(LISA_HOOKS_SUBDIR, filename);
|
|
368
|
+
await copyManagedCompatibility(source, path.join(codexDir, relative));
|
|
369
|
+
return relative;
|
|
370
|
+
}));
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Resolve the full helper/data closure from the existing hook catalog.
|
|
374
|
+
* @param lisaDir Source/package root.
|
|
375
|
+
* @param retained Previously installed catalog entries.
|
|
376
|
+
* @returns Script and companion sources.
|
|
377
|
+
*/
|
|
378
|
+
function compatibilitySources(lisaDir, retained) {
|
|
379
|
+
const helpers = [
|
|
380
|
+
...(retained.some(entry => entry.needsEditPathLib) ? [EDIT_PATHS_LIB] : []),
|
|
381
|
+
...(retained.some(entry => entry.needsEditGate) ? [EDIT_GATE_LIB] : []),
|
|
382
|
+
];
|
|
383
|
+
return [
|
|
384
|
+
...retained.map(entry => ({
|
|
385
|
+
source: resolveHookScript(lisaDir, entry),
|
|
386
|
+
filename: entry.scriptFilename,
|
|
387
|
+
})),
|
|
388
|
+
...helpers.map(filename => ({
|
|
389
|
+
source: resolveBundledScript(filename),
|
|
390
|
+
filename,
|
|
391
|
+
})),
|
|
392
|
+
...(retained.some(entry => entry.sourcePlugin === "lisa")
|
|
393
|
+
? [
|
|
394
|
+
{
|
|
395
|
+
source: path.join(lisaDir, "plugins/lisa/hooks/guard-dedupe.bash"),
|
|
396
|
+
filename: "guard-dedupe.bash",
|
|
397
|
+
},
|
|
398
|
+
]
|
|
399
|
+
: []),
|
|
400
|
+
...(retained.some(entry => entry.sourcePlugin === HARPER_PLUGIN)
|
|
401
|
+
? harperSupportSources(lisaDir)
|
|
402
|
+
: []),
|
|
403
|
+
];
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Copy rule dependencies without replacing host-authored rules.
|
|
407
|
+
* @param lisaDir Source/package root.
|
|
408
|
+
* @param codexDir Host Codex directory.
|
|
409
|
+
* @param detectedTypes Current types.
|
|
410
|
+
* @param retained Entries determining required earlier stack rules.
|
|
411
|
+
* @param owned Prior manifest paths.
|
|
412
|
+
* @returns Copied rule paths.
|
|
413
|
+
*/
|
|
414
|
+
async function copyCompatibilityRules(lisaDir, codexDir, detectedTypes, retained, owned) {
|
|
415
|
+
const ruleTypes = [
|
|
416
|
+
...new Set([
|
|
417
|
+
...detectedTypes,
|
|
418
|
+
...retained.flatMap(entry => entry.forProjectTypes.filter(type => type !== "*")),
|
|
419
|
+
]),
|
|
420
|
+
];
|
|
421
|
+
const scratch = await mkdtemp(path.join(codexDir, ".compat-rules-"));
|
|
422
|
+
try {
|
|
423
|
+
const rules = await mirrorLisaRules(lisaDir, scratch, ruleTypes, "link");
|
|
424
|
+
const copied = await Promise.all(rules.map(async (relativeRule) => {
|
|
425
|
+
const relative = path.join(LISA_RULES_SUBDIR, relativeRule);
|
|
426
|
+
const destination = path.join(codexDir, relative);
|
|
427
|
+
const stat = await lstat(destination).catch(() => undefined);
|
|
428
|
+
const source = await readlink(path.join(scratch, relativeRule));
|
|
429
|
+
const linkedRule = stat?.isSymbolicLink() &&
|
|
430
|
+
(await isManagedSourceLink(destination, source, lisaDir, path.dirname(codexDir)));
|
|
431
|
+
if (stat && !linkedRule && !owned.has(relative))
|
|
432
|
+
return undefined;
|
|
433
|
+
await fse.ensureDir(path.dirname(destination));
|
|
434
|
+
await copyManagedCompatibility(path.join(scratch, relativeRule), destination);
|
|
435
|
+
return relative;
|
|
436
|
+
}));
|
|
437
|
+
return copied.filter((file) => file !== undefined);
|
|
438
|
+
}
|
|
439
|
+
finally {
|
|
440
|
+
await rm(scratch, { recursive: true, force: true });
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Admit links to known Lisa sources, not host paths with similar suffixes.
|
|
445
|
+
* Canonical installed-package paths also recover genuinely dangling links.
|
|
446
|
+
* @param destination Host script path.
|
|
447
|
+
* @param source Exact shipped source.
|
|
448
|
+
* @param lisaDir Verified Lisa package root.
|
|
449
|
+
* @param destDir Host root.
|
|
450
|
+
* @returns Whether the catalog owns this legacy representation.
|
|
451
|
+
*/
|
|
452
|
+
async function isManagedSourceLink(destination, source, lisaDir, destDir) {
|
|
453
|
+
const stat = await lstat(destination).catch(() => undefined);
|
|
454
|
+
if (!stat?.isSymbolicLink())
|
|
455
|
+
return false;
|
|
456
|
+
const target = path.resolve(path.dirname(destination), await readlink(destination));
|
|
457
|
+
const relative = path.relative(lisaDir, source);
|
|
458
|
+
if (target === path.resolve(source))
|
|
459
|
+
return true;
|
|
460
|
+
if (relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))
|
|
461
|
+
return false;
|
|
462
|
+
const variants = sourceLocationVariants(relative);
|
|
463
|
+
if (variants.some(file => target === path.resolve(lisaDir, file)))
|
|
464
|
+
return true;
|
|
465
|
+
const installedRoot = path.join(destDir, "node_modules/@codyswann/lisa");
|
|
466
|
+
return isLisaPackageTarget(target, variants, installedRoot);
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Source and compiled trees contain the same legacy bundled scripts.
|
|
470
|
+
* @param relative Source path within the verified Lisa package.
|
|
471
|
+
* @returns Exact supported source locations within that package.
|
|
472
|
+
*/
|
|
473
|
+
function sourceLocationVariants(relative) {
|
|
474
|
+
const tree = ["src", "dist"].find(directory => relative.startsWith(path.join(directory, "codex", "scripts") + path.sep));
|
|
475
|
+
return tree === undefined
|
|
476
|
+
? [relative]
|
|
477
|
+
: [
|
|
478
|
+
relative,
|
|
479
|
+
path.join(tree === "src" ? "dist" : "src", "codex", "scripts", path.basename(relative)),
|
|
480
|
+
];
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* Verify old package/store roots rather than relying on their directory layout.
|
|
484
|
+
* @param target Resolved legacy link target.
|
|
485
|
+
* @param variants Exact supported paths within a Lisa package.
|
|
486
|
+
* @param installedRoot Canonical host package path, including dangling installs.
|
|
487
|
+
* @returns Whether positive package identity owns this expected source path.
|
|
488
|
+
*/
|
|
489
|
+
async function isLisaPackageTarget(target, variants, installedRoot) {
|
|
490
|
+
const roots = variants
|
|
491
|
+
.filter(file => target.endsWith(path.sep + file))
|
|
492
|
+
.map(file => target.slice(0, -(file.length + 1)));
|
|
493
|
+
const verified = await Promise.all(roots.map(async (root) => {
|
|
494
|
+
if (root === path.resolve(installedRoot) && !(await fse.pathExists(root)))
|
|
495
|
+
return true;
|
|
496
|
+
const metadata = await readFile(path.join(root, "package.json"), "utf8")
|
|
497
|
+
.then(raw => JSON.parse(raw))
|
|
498
|
+
.catch(() => undefined);
|
|
499
|
+
return (typeof metadata === "object" &&
|
|
500
|
+
metadata !== null &&
|
|
501
|
+
"name" in metadata &&
|
|
502
|
+
metadata.name === "@codyswann/lisa");
|
|
503
|
+
}));
|
|
504
|
+
return verified.some(Boolean);
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Replace a managed representation with executable regular source bytes.
|
|
508
|
+
* @param source Functional shipped implementation.
|
|
509
|
+
* @param destination Old loaded-command path.
|
|
510
|
+
*/
|
|
511
|
+
async function copyManagedCompatibility(source, destination) {
|
|
512
|
+
const content = await readFile(source);
|
|
513
|
+
const scratch = await mkdtemp(path.join(path.dirname(destination), ".compat-file-"));
|
|
514
|
+
try {
|
|
515
|
+
const replacement = path.join(scratch, "replacement");
|
|
516
|
+
await writeFile(replacement, content, { mode: 0o755 });
|
|
517
|
+
await rename(replacement, destination);
|
|
518
|
+
}
|
|
519
|
+
finally {
|
|
520
|
+
await rm(scratch, { force: true, recursive: true });
|
|
521
|
+
}
|
|
522
|
+
}
|
|
282
523
|
/** Project-local directory prefixes wholly owned by the hook installer. */
|
|
283
524
|
const MANAGED_HOOK_PREFIXES = [
|
|
284
525
|
`${LISA_HOOKS_SUBDIR}${path.sep}`,
|
|
@@ -374,7 +615,17 @@ function resolveHookScript(lisaDir, entry) {
|
|
|
374
615
|
* @returns Managed paths relative to `.codex/`.
|
|
375
616
|
*/
|
|
376
617
|
async function linkHarperSupportFiles(lisaDir, hooksDir) {
|
|
377
|
-
const sources =
|
|
618
|
+
const sources = harperSupportSources(lisaDir);
|
|
619
|
+
await Promise.all(sources.map(({ source, filename }) => linkManagedFile(source, path.join(hooksDir, filename))));
|
|
620
|
+
return sources.map(({ filename }) => path.join(LISA_HOOKS_SUBDIR, filename));
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Companion sources shared by linked installation and copied compatibility.
|
|
624
|
+
* @param lisaDir Lisa package root.
|
|
625
|
+
* @returns Complete Harper companion list.
|
|
626
|
+
*/
|
|
627
|
+
function harperSupportSources(lisaDir) {
|
|
628
|
+
return [
|
|
378
629
|
{
|
|
379
630
|
source: path.join(lisaDir, "plugins", HARPER_PLUGIN, "hooks", "enforce-config-extensions.mjs"),
|
|
380
631
|
filename: "enforce-config-extensions.mjs",
|
|
@@ -384,8 +635,6 @@ async function linkHarperSupportFiles(lisaDir, hooksDir) {
|
|
|
384
635
|
filename: "generated-artifact-globs.txt",
|
|
385
636
|
},
|
|
386
637
|
];
|
|
387
|
-
await Promise.all(sources.map(({ source, filename }) => linkManagedFile(source, path.join(hooksDir, filename))));
|
|
388
|
-
return sources.map(({ filename }) => path.join(LISA_HOOKS_SUBDIR, filename));
|
|
389
638
|
}
|
|
390
639
|
/**
|
|
391
640
|
* Replace a Lisa-owned project file with a link to its package source.
|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