@codyswann/lisa 3.12.0 → 3.13.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.
- package/all/copy-overwrite/scripts/lisa-hooks/block-no-verify.sh +15 -2
- package/all/create-only/scripts/remote-agent-aws-setup.sh +3 -0
- package/cdk/create-only/.github/workflows/deploy.yml +2 -1
- package/cdk/create-only/vitest.config.local.ts +3 -0
- package/dist/cli/doctor-lisa-owned-artifacts.d.ts +11 -2
- package/dist/cli/doctor-lisa-owned-artifacts.d.ts.map +1 -1
- package/dist/cli/doctor-lisa-owned-artifacts.js +60 -15
- package/dist/cli/doctor-lisa-owned-artifacts.js.map +1 -1
- package/dist/core/config.d.ts +21 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +1 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/guard-capabilities.d.ts +60 -0
- package/dist/core/guard-capabilities.d.ts.map +1 -0
- package/dist/core/guard-capabilities.js +102 -0
- package/dist/core/guard-capabilities.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts +11 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.js +127 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -0
- package/dist/core/lisa-owned-provenance.d.ts +75 -0
- package/dist/core/lisa-owned-provenance.d.ts.map +1 -0
- package/dist/core/lisa-owned-provenance.js +127 -0
- package/dist/core/lisa-owned-provenance.js.map +1 -0
- package/dist/core/lisa.d.ts +18 -0
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +38 -0
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +59 -51
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/strategies/copy-overwrite.d.ts +28 -1
- package/dist/strategies/copy-overwrite.d.ts.map +1 -1
- package/dist/strategies/copy-overwrite.js +53 -3
- package/dist/strategies/copy-overwrite.js.map +1 -1
- package/dist/strategies/strategy.interface.d.ts +13 -0
- package/dist/strategies/strategy.interface.d.ts.map +1 -1
- package/expo/create-only/.github/workflows/ci.yml +3 -0
- package/expo/create-only/.github/workflows/deploy.yml +2 -1
- package/expo/create-only/.github/workflows/maestro-e2e.yml +3 -0
- package/expo/create-only/.github/workflows/nightly-e2e-bypass-reaper.yml +3 -0
- package/expo/create-only/.github/workflows/nightly-e2e-health.yml +3 -0
- package/expo/create-only/.github/workflows/nightly-e2e-report.yml +3 -0
- package/expo/create-only/babel.config.js +3 -0
- package/expo/create-only/jest.config.local.ts +3 -0
- package/expo/create-only/jest.config.react-native-mock.js +3 -0
- package/expo/create-only/jest.setup.local.ts +3 -0
- package/expo/create-only/jest.setup.pre.local.js +3 -0
- package/expo/create-only/scripts/zap-baseline.sh +3 -0
- package/harper-fabric/create-only/.github/workflows/deploy.yml +3 -0
- package/harper-fabric/create-only/.github/workflows/zap-baseline.yml +3 -0
- package/harper-fabric/create-only/scripts/zap-baseline.sh +3 -0
- package/nestjs/create-only/.github/workflows/deploy.yml +3 -0
- package/nestjs/create-only/scripts/zap-baseline.sh +3 -0
- package/nestjs/create-only/vitest.config.local.ts +3 -0
- package/npm-package/create-only/.github/workflows/publish-to-npm.yml +2 -1
- package/package.json +3 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/block-no-verify.sh +15 -2
- 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-copilot/hooks/block-no-verify.sh +15 -2
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-no-verify.sh +15 -2
- 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/plugins/src/base/hooks/block-no-verify.sh +15 -2
- package/rails/create-only/.github/workflows/claude-code-review-response.yml +2 -1
- package/rails/create-only/.github/workflows/claude-nightly-code-complexity.yml +2 -1
- package/rails/create-only/.github/workflows/claude-nightly-test-coverage.yml +2 -1
- package/rails/create-only/.github/workflows/claude-nightly-test-improvement.yml +2 -1
- package/rails/create-only/.github/workflows/claude-sync-down-branches.yml +2 -1
- package/rails/create-only/.github/workflows/deploy.yml +2 -1
- package/rails/create-only/.mutant.yml +3 -0
- package/rails/create-only/.reek.yml +3 -0
- package/rails/create-only/.rubocop_todo.yml +3 -0
- package/rails/create-only/mutation.gate.yml +3 -0
- package/rails/create-only/rubocop.thresholds.yml +3 -0
- package/rails/create-only/spec/rails_helper.rb +2 -0
- package/rails/create-only/spec/spec_helper.rb +2 -0
- package/scripts/generate-lisa-owned-hash-ledger.mjs +226 -0
- package/typescript/create-only/.github/workflows/auto-update-pr-branches-dispatch.yml +2 -1
- package/typescript/create-only/.github/workflows/auto-update-pr-branches.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-ci-auto-fix.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-code-review-response.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-deploy-auto-fix.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-nightly-code-complexity.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-nightly-test-coverage.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-nightly-test-improvement.yml +2 -1
- package/typescript/create-only/.github/workflows/claude-sync-down-branches.yml +2 -1
- package/typescript/create-only/.github/workflows/claude.yml +2 -1
- package/typescript/create-only/.github/workflows/required-checks-drift.yml +2 -1
- package/typescript/create-only/eslint.config.local.ts +3 -0
- package/typescript/create-only/jest.config.local.ts +3 -0
- package/typescript/create-only/vitest.config.local.ts +3 -0
|
@@ -34,12 +34,39 @@ export declare class CopyOverwriteStrategy implements ICopyStrategy {
|
|
|
34
34
|
* so the create path would recreate them. Lisa owns those files outright —
|
|
35
35
|
* see `isLisaOwnedTemplate` — so they refresh here, backed up first, and a
|
|
36
36
|
* project that wants to keep its own copy says so in `.lisaignore`.
|
|
37
|
+
*
|
|
38
|
+
* That refresh is unconditional only where Lisa can prove the installed copy
|
|
39
|
+
* is behind. "Differs from mine" is not that proof — it is equally consistent
|
|
40
|
+
* with the host being *ahead*, which is how `propswapllc/frontend` had a guard
|
|
41
|
+
* they had hardened themselves silently replaced by a weaker upstream one. So
|
|
42
|
+
* a Lisa-owned artifact is now classified before it is replaced, and anything
|
|
43
|
+
* short of proof that it is stale leaves the host's copy alone with an
|
|
44
|
+
* explanation. See `classifyHostCopy`.
|
|
37
45
|
* @param sourcePath - Packaged template path
|
|
38
46
|
* @param destPath - Installed file path
|
|
39
47
|
* @param relativePath - Repo-relative path for reporting
|
|
40
48
|
* @param context - Strategy context with config and callbacks
|
|
41
|
-
* @returns Whether the file was refreshed or left out of date
|
|
49
|
+
* @returns Whether the file was refreshed, preserved, or left out of date
|
|
42
50
|
*/
|
|
43
51
|
private applyNonInteractive;
|
|
52
|
+
/**
|
|
53
|
+
* Hold back a Lisa-owned refresh that cannot be proved to be an upgrade.
|
|
54
|
+
*
|
|
55
|
+
* Returns a result only when the file is being preserved, so the caller falls
|
|
56
|
+
* through to its normal refresh path in every provably-safe case — a host copy
|
|
57
|
+
* that matches a past Lisa release still gets replaced, which is what keeps
|
|
58
|
+
* genuine drift from accumulating forever.
|
|
59
|
+
*
|
|
60
|
+
* A read failure is not treated as permission to overwrite. If the installed
|
|
61
|
+
* bytes cannot be read they cannot be classified, and a classifier that
|
|
62
|
+
* defaults to "overwrite" when it is confused is the original defect wearing a
|
|
63
|
+
* different hat.
|
|
64
|
+
* @param sourcePath - Packaged template path
|
|
65
|
+
* @param destPath - Installed file path
|
|
66
|
+
* @param relativePath - Repo-relative path for reporting
|
|
67
|
+
* @param ledger - Known-good hashes, defaulting to Lisa's shipping history
|
|
68
|
+
* @returns A `host-ahead` result when the copy is preserved, else undefined
|
|
69
|
+
*/
|
|
70
|
+
private preserveIfHostAhead;
|
|
44
71
|
}
|
|
45
72
|
//# sourceMappingURL=copy-overwrite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-overwrite.d.ts","sourceRoot":"","sources":["../../src/strategies/copy-overwrite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"copy-overwrite.d.ts","sourceRoot":"","sources":["../../src/strategies/copy-overwrite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAQ7D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG9E;;;;;;GAMG;AACH,qBAAa,qBAAsB,YAAW,aAAa;IACzD,QAAQ,CAAC,IAAI,EAAG,gBAAgB,CAAU;IAE1C;;;;;;;OAOG;IACG,KAAK,CACT,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC;IAuD/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;YACW,mBAAmB;IAmCjC;;;;;;;;;;;;;;;;;OAiBG;YACW,mBAAmB;CA2BlC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as fse from "fs-extra";
|
|
2
|
-
import { copyFile } from "node:fs/promises";
|
|
2
|
+
import { copyFile, readFile } from "node:fs/promises";
|
|
3
3
|
import { mayRefreshTemplate } from "../core/config.js";
|
|
4
4
|
import { isLisaOwnedTemplate } from "../core/lisa-owned-templates.js";
|
|
5
|
+
import { classifyHostCopy, describePreserved, mayRefreshLisaOwned, } from "../core/lisa-owned-provenance.js";
|
|
5
6
|
import { filesIdentical, ensureParentDir } from "../utils/file-operations.js";
|
|
6
7
|
/**
|
|
7
8
|
* Copy-overwrite strategy: Replace file if exists (prompts on conflict)
|
|
@@ -74,18 +75,32 @@ export class CopyOverwriteStrategy {
|
|
|
74
75
|
* so the create path would recreate them. Lisa owns those files outright —
|
|
75
76
|
* see `isLisaOwnedTemplate` — so they refresh here, backed up first, and a
|
|
76
77
|
* project that wants to keep its own copy says so in `.lisaignore`.
|
|
78
|
+
*
|
|
79
|
+
* That refresh is unconditional only where Lisa can prove the installed copy
|
|
80
|
+
* is behind. "Differs from mine" is not that proof — it is equally consistent
|
|
81
|
+
* with the host being *ahead*, which is how `propswapllc/frontend` had a guard
|
|
82
|
+
* they had hardened themselves silently replaced by a weaker upstream one. So
|
|
83
|
+
* a Lisa-owned artifact is now classified before it is replaced, and anything
|
|
84
|
+
* short of proof that it is stale leaves the host's copy alone with an
|
|
85
|
+
* explanation. See `classifyHostCopy`.
|
|
77
86
|
* @param sourcePath - Packaged template path
|
|
78
87
|
* @param destPath - Installed file path
|
|
79
88
|
* @param relativePath - Repo-relative path for reporting
|
|
80
89
|
* @param context - Strategy context with config and callbacks
|
|
81
|
-
* @returns Whether the file was refreshed or left out of date
|
|
90
|
+
* @returns Whether the file was refreshed, preserved, or left out of date
|
|
82
91
|
*/
|
|
83
92
|
async applyNonInteractive(sourcePath, destPath, relativePath, context) {
|
|
84
93
|
const { config, backupFile } = context;
|
|
85
|
-
|
|
94
|
+
const lisaOwned = isLisaOwnedTemplate(relativePath);
|
|
95
|
+
if (!lisaOwned &&
|
|
86
96
|
!mayRefreshTemplate(relativePath, config.refreshTemplates)) {
|
|
87
97
|
return { relativePath, strategy: this.name, action: "stale" };
|
|
88
98
|
}
|
|
99
|
+
if (lisaOwned) {
|
|
100
|
+
const preserved = await this.preserveIfHostAhead(sourcePath, destPath, relativePath, context.hashLedger);
|
|
101
|
+
if (preserved !== undefined)
|
|
102
|
+
return preserved;
|
|
103
|
+
}
|
|
89
104
|
// Backed up first: opting in to an overwrite is not opting out of being
|
|
90
105
|
// able to undo it.
|
|
91
106
|
if (!config.dryRun) {
|
|
@@ -94,5 +109,40 @@ export class CopyOverwriteStrategy {
|
|
|
94
109
|
}
|
|
95
110
|
return { relativePath, strategy: this.name, action: "overwritten" };
|
|
96
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Hold back a Lisa-owned refresh that cannot be proved to be an upgrade.
|
|
114
|
+
*
|
|
115
|
+
* Returns a result only when the file is being preserved, so the caller falls
|
|
116
|
+
* through to its normal refresh path in every provably-safe case — a host copy
|
|
117
|
+
* that matches a past Lisa release still gets replaced, which is what keeps
|
|
118
|
+
* genuine drift from accumulating forever.
|
|
119
|
+
*
|
|
120
|
+
* A read failure is not treated as permission to overwrite. If the installed
|
|
121
|
+
* bytes cannot be read they cannot be classified, and a classifier that
|
|
122
|
+
* defaults to "overwrite" when it is confused is the original defect wearing a
|
|
123
|
+
* different hat.
|
|
124
|
+
* @param sourcePath - Packaged template path
|
|
125
|
+
* @param destPath - Installed file path
|
|
126
|
+
* @param relativePath - Repo-relative path for reporting
|
|
127
|
+
* @param ledger - Known-good hashes, defaulting to Lisa's shipping history
|
|
128
|
+
* @returns A `host-ahead` result when the copy is preserved, else undefined
|
|
129
|
+
*/
|
|
130
|
+
async preserveIfHostAhead(sourcePath, destPath, relativePath, ledger) {
|
|
131
|
+
const [hostBytes, lisaBytes] = await Promise.all([
|
|
132
|
+
readFile(destPath).catch(() => undefined),
|
|
133
|
+
readFile(sourcePath).catch(() => undefined),
|
|
134
|
+
]);
|
|
135
|
+
if (hostBytes === undefined || lisaBytes === undefined)
|
|
136
|
+
return undefined;
|
|
137
|
+
const verdict = classifyHostCopy(relativePath, hostBytes, lisaBytes, ledger);
|
|
138
|
+
if (mayRefreshLisaOwned(verdict))
|
|
139
|
+
return undefined;
|
|
140
|
+
return {
|
|
141
|
+
relativePath,
|
|
142
|
+
strategy: this.name,
|
|
143
|
+
action: "host-ahead",
|
|
144
|
+
note: describePreserved(relativePath, verdict),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
97
147
|
}
|
|
98
148
|
//# sourceMappingURL=copy-overwrite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-overwrite.js","sourceRoot":"","sources":["../../src/strategies/copy-overwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"copy-overwrite.js","sourceRoot":"","sources":["../../src/strategies/copy-overwrite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,cAAc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AE,CAAC;YACnB,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAC;YAC3B,MAAM,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACK,KAAK,CAAC,mBAAmB,CAC/B,UAAkB,EAClB,QAAgB,EAChB,YAAoB,EACpB,MAAmB;QAEnB,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAC/C,QAAQ,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;YACzC,QAAQ,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;SAC5C,CAAC,CAAC;QACH,IAAI,SAAS,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAEzE,MAAM,OAAO,GAAG,gBAAgB,CAC9B,YAAY,EACZ,SAAS,EACT,SAAS,EACT,MAAM,CACP,CAAC;QACF,IAAI,mBAAmB,CAAC,OAAO,CAAC;YAAE,OAAO,SAAS,CAAC;QAEnD,OAAO;YACL,YAAY;YACZ,QAAQ,EAAE,IAAI,CAAC,IAAI;YACnB,MAAM,EAAE,YAAY;YACpB,IAAI,EAAE,iBAAiB,CAAC,YAAY,EAAE,OAAO,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CopyStrategy, FileOperationResult, LisaConfig } from "../core/config.js";
|
|
2
|
+
import type { HashLedger } from "../core/lisa-owned-provenance.js";
|
|
2
3
|
/**
|
|
3
4
|
* Context for strategy execution
|
|
4
5
|
*/
|
|
@@ -9,6 +10,18 @@ export interface StrategyContext {
|
|
|
9
10
|
readonly backupFile: (absolutePath: string) => Promise<void>;
|
|
10
11
|
/** Prompt user for overwrite decision */
|
|
11
12
|
readonly promptOverwrite: (relativePath: string, sourcePath: string, destPath: string) => Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Known-good hashes proving which contents Lisa has shipped at each path.
|
|
15
|
+
*
|
|
16
|
+
* Injected rather than imported so a test can state which bytes count as a
|
|
17
|
+
* genuine past release. Without that seam a test can only stage invented
|
|
18
|
+
* content, which the classifier correctly reads as host-modified — so every
|
|
19
|
+
* "refresh delivers the fix" test would be asserting the upgrade path while
|
|
20
|
+
* exercising the downgrade-protection path instead.
|
|
21
|
+
*
|
|
22
|
+
* Defaults to Lisa's real shipping history when omitted.
|
|
23
|
+
*/
|
|
24
|
+
readonly hashLedger?: HashLedger;
|
|
12
25
|
}
|
|
13
26
|
/**
|
|
14
27
|
* Interface for copy strategy implementations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.interface.d.ts","sourceRoot":"","sources":["../../src/strategies/strategy.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACX,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"strategy.interface.d.ts","sourceRoot":"","sources":["../../src/strategies/strategy.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAE5B,wCAAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7D,yCAAyC;IACzC,QAAQ,CAAC,eAAe,EAAE,CACxB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtB;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAE5B;;;;;;;OAOG;IACH,KAAK,CACH,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Seeded by Lisa on first setup — this file is YOURS.
|
|
2
|
+
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
2
3
|
|
|
3
4
|
# This is an example deployment workflow that demonstrates the recommended pattern:
|
|
4
5
|
# 1. Call the release.yml workflow to create a release
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Seeded by Lisa on first setup — this file is YOURS.
|
|
3
|
+
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
4
|
+
|
|
2
5
|
# OWASP ZAP Baseline Scan — Expo Web Export
|
|
3
6
|
# Builds the Expo web export, serves it locally, and runs a ZAP baseline scan via Docker.
|
|
4
7
|
# Outputs an HTML report to zap-report.html in the project root.
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Seeded by Lisa on first setup — this file is YOURS.
|
|
3
|
+
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
4
|
+
|
|
2
5
|
# OWASP ZAP Baseline Scan - Harper Fabric app
|
|
3
6
|
# Builds the Harper app, starts it locally when no deployed target is supplied,
|
|
4
7
|
# and runs a ZAP baseline scan via Docker.
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# Seeded by Lisa on first setup — this file is YOURS.
|
|
2
|
+
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
3
|
+
|
|
1
4
|
# This is an example deployment workflow that demonstrates the recommended pattern:
|
|
2
5
|
# 1. Call the release.yml workflow to create a release
|
|
3
6
|
# 2. Implement your custom deployment logic
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
# Seeded by Lisa on first setup — this file is YOURS.
|
|
3
|
+
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
4
|
+
|
|
2
5
|
# OWASP ZAP Baseline Scan — NestJS GraphQL API
|
|
3
6
|
# Builds and starts the NestJS server, then runs a ZAP baseline scan via Docker.
|
|
4
7
|
# Outputs an HTML report to zap-report.html in the project root.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Seeded by Lisa on first setup — this file is YOURS.
|
|
2
|
+
# Lisa will not overwrite it. (copy-overwrite assets ARE replaced each run.)
|
|
2
3
|
# You can customize this file — Lisa will not overwrite it.
|
|
3
4
|
|
|
4
5
|
# Reusable workflow for publishing to npm with OIDC trusted publishing
|
package/package.json
CHANGED
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"check:learnings-budget": "bun scripts/check-learnings-budget.ts",
|
|
36
36
|
"build:upstream-evidence-manifest": "node scripts/generate-upstream-evidence-manifest.mjs",
|
|
37
37
|
"check:upstream-evidence-manifest": "node scripts/generate-upstream-evidence-manifest.mjs --check",
|
|
38
|
+
"build:lisa-owned-hash-ledger": "node scripts/generate-lisa-owned-hash-ledger.mjs",
|
|
39
|
+
"check:lisa-owned-hash-ledger": "node scripts/generate-lisa-owned-hash-ledger.mjs --check",
|
|
38
40
|
"refresh:upstream-public-commits": "node scripts/generate-upstream-evidence-manifest.mjs --refresh-public-commits",
|
|
39
41
|
"check:rules-pairing": "bash scripts/check-rules-pairing.sh",
|
|
40
42
|
"check:workflow-inputs": "node scripts/detect-stale-workflow-inputs.mjs --project . --project typescript/create-only --project rails/create-only --json",
|
|
@@ -122,7 +124,7 @@
|
|
|
122
124
|
}
|
|
123
125
|
},
|
|
124
126
|
"name": "@codyswann/lisa",
|
|
125
|
-
"version": "3.
|
|
127
|
+
"version": "3.13.0",
|
|
126
128
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
127
129
|
"main": "dist/index.js",
|
|
128
130
|
"exports": {
|
|
@@ -5,9 +5,22 @@
|
|
|
5
5
|
# check. See feedback_never_no_verify in user memory.
|
|
6
6
|
#
|
|
7
7
|
# Blocked bypass vectors:
|
|
8
|
-
# 1.
|
|
8
|
+
# 1. --no-verify, and any prefix abbreviation git would accept for it;
|
|
9
9
|
# 2. HUSKY=0 / HUSKY_SKIP_HOOKS=... — disables husky-managed git hooks;
|
|
10
|
-
# 3. core.hooksPath pointed
|
|
10
|
+
# 3. core.hooksPath pointed anywhere but an allowlisted in-repo hooks dir;
|
|
11
|
+
# 4. --config-env=core.hooksPath=VAR, in both the one- and two-token spellings;
|
|
12
|
+
# 5. GIT_CONFIG_KEY_<n>=core.hooksPath env-var-style command-scope config.
|
|
13
|
+
#
|
|
14
|
+
# The line below is what lets `lisa apply` tell a downstream copy of this guard
|
|
15
|
+
# that is BEHIND from one that is AHEAD. Byte comparison cannot: both look like
|
|
16
|
+
# "differs from mine", and guessing "behind" is how a fork's stronger guard gets
|
|
17
|
+
# silently replaced by a weaker upstream one. Refresh compares the two declared
|
|
18
|
+
# sets, and refuses to overwrite a copy declaring anything this one does not.
|
|
19
|
+
#
|
|
20
|
+
# Add a name here in the same commit that closes a vector. A hardening that
|
|
21
|
+
# forgets to is invisible to refresh, and shows up as an unexplained diff at
|
|
22
|
+
# review time instead of a named capability.
|
|
23
|
+
# lisa-guard-capabilities: no-verify-abbrev, husky-env, hookspath-allowlist, config-env, git-config-key
|
|
11
24
|
#
|
|
12
25
|
# Shell-token matching avoids false positives from issue bodies, heredocs, and
|
|
13
26
|
# commit-message prose while still catching quoted real argv values such as
|
|
@@ -5,9 +5,22 @@
|
|
|
5
5
|
# check. See feedback_never_no_verify in user memory.
|
|
6
6
|
#
|
|
7
7
|
# Blocked bypass vectors:
|
|
8
|
-
# 1.
|
|
8
|
+
# 1. --no-verify, and any prefix abbreviation git would accept for it;
|
|
9
9
|
# 2. HUSKY=0 / HUSKY_SKIP_HOOKS=... — disables husky-managed git hooks;
|
|
10
|
-
# 3. core.hooksPath pointed
|
|
10
|
+
# 3. core.hooksPath pointed anywhere but an allowlisted in-repo hooks dir;
|
|
11
|
+
# 4. --config-env=core.hooksPath=VAR, in both the one- and two-token spellings;
|
|
12
|
+
# 5. GIT_CONFIG_KEY_<n>=core.hooksPath env-var-style command-scope config.
|
|
13
|
+
#
|
|
14
|
+
# The line below is what lets `lisa apply` tell a downstream copy of this guard
|
|
15
|
+
# that is BEHIND from one that is AHEAD. Byte comparison cannot: both look like
|
|
16
|
+
# "differs from mine", and guessing "behind" is how a fork's stronger guard gets
|
|
17
|
+
# silently replaced by a weaker upstream one. Refresh compares the two declared
|
|
18
|
+
# sets, and refuses to overwrite a copy declaring anything this one does not.
|
|
19
|
+
#
|
|
20
|
+
# Add a name here in the same commit that closes a vector. A hardening that
|
|
21
|
+
# forgets to is invisible to refresh, and shows up as an unexplained diff at
|
|
22
|
+
# review time instead of a named capability.
|
|
23
|
+
# lisa-guard-capabilities: no-verify-abbrev, husky-env, hookspath-allowlist, config-env, git-config-key
|
|
11
24
|
#
|
|
12
25
|
# Shell-token matching avoids false positives from issue bodies, heredocs, and
|
|
13
26
|
# commit-message prose while still catching quoted real argv values such as
|
|
@@ -5,9 +5,22 @@
|
|
|
5
5
|
# check. See feedback_never_no_verify in user memory.
|
|
6
6
|
#
|
|
7
7
|
# Blocked bypass vectors:
|
|
8
|
-
# 1.
|
|
8
|
+
# 1. --no-verify, and any prefix abbreviation git would accept for it;
|
|
9
9
|
# 2. HUSKY=0 / HUSKY_SKIP_HOOKS=... — disables husky-managed git hooks;
|
|
10
|
-
# 3. core.hooksPath pointed
|
|
10
|
+
# 3. core.hooksPath pointed anywhere but an allowlisted in-repo hooks dir;
|
|
11
|
+
# 4. --config-env=core.hooksPath=VAR, in both the one- and two-token spellings;
|
|
12
|
+
# 5. GIT_CONFIG_KEY_<n>=core.hooksPath env-var-style command-scope config.
|
|
13
|
+
#
|
|
14
|
+
# The line below is what lets `lisa apply` tell a downstream copy of this guard
|
|
15
|
+
# that is BEHIND from one that is AHEAD. Byte comparison cannot: both look like
|
|
16
|
+
# "differs from mine", and guessing "behind" is how a fork's stronger guard gets
|
|
17
|
+
# silently replaced by a weaker upstream one. Refresh compares the two declared
|
|
18
|
+
# sets, and refuses to overwrite a copy declaring anything this one does not.
|
|
19
|
+
#
|
|
20
|
+
# Add a name here in the same commit that closes a vector. A hardening that
|
|
21
|
+
# forgets to is invisible to refresh, and shows up as an unexplained diff at
|
|
22
|
+
# review time instead of a named capability.
|
|
23
|
+
# lisa-guard-capabilities: no-verify-abbrev, husky-env, hookspath-allowlist, config-env, git-config-key
|
|
11
24
|
#
|
|
12
25
|
# Shell-token matching avoids false positives from issue bodies, heredocs, and
|
|
13
26
|
# commit-message prose while still catching quoted real argv values such as
|