@codyswann/lisa 2.130.4 → 2.130.6
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/dist/cli/apply.d.ts +14 -0
- package/dist/cli/apply.d.ts.map +1 -0
- package/dist/cli/apply.js +102 -0
- package/dist/cli/apply.js.map +1 -0
- package/dist/cli/index.d.ts +25 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +43 -147
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/shared-options.d.ts +39 -0
- package/dist/cli/shared-options.d.ts.map +1 -0
- package/dist/cli/shared-options.js +58 -0
- package/dist/cli/shared-options.js.map +1 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- 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-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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type CLIOptions } from "./shared-options.js";
|
|
2
|
+
/**
|
|
3
|
+
* Apply Lisa to the given destination with the given options.
|
|
4
|
+
*
|
|
5
|
+
* This is the relocated action that previously lived inline in
|
|
6
|
+
* `src/cli/index.ts` as `runLisa`. It backs both the explicit `apply`
|
|
7
|
+
* subcommand and the backwards-compatible positional default, so the two
|
|
8
|
+
* invocation forms produce identical results.
|
|
9
|
+
* @param destination - Path to destination directory
|
|
10
|
+
* @param options - CLI options
|
|
11
|
+
* @returns Promise that completes when Lisa finishes
|
|
12
|
+
*/
|
|
13
|
+
export declare function runApply(destination: string | undefined, options: CLIOptions): Promise<void>;
|
|
14
|
+
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/cli/apply.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,UAAU,EAAsB,MAAM,qBAAqB,CAAC;AAsD1E;;;;;;;;;;GAUG;AACH,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,IAAI,CAAC,CAsDf"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { HARNESS_VALUES } from "../core/config.js";
|
|
4
|
+
import { Lisa } from "../core/lisa.js";
|
|
5
|
+
import { readProjectConfig, resolveHarness, writeProjectConfig, } from "../core/project-config.js";
|
|
6
|
+
import { ConsoleLogger } from "../logging/index.js";
|
|
7
|
+
import { toAbsolutePath } from "../utils/path-utils.js";
|
|
8
|
+
import { createDependencies } from "./shared-options.js";
|
|
9
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
/**
|
|
11
|
+
* Get Lisa directory (where configs are stored)
|
|
12
|
+
* @returns Path to Lisa directory
|
|
13
|
+
*/
|
|
14
|
+
function getLisaDir() {
|
|
15
|
+
// Go up from dist/cli to project root
|
|
16
|
+
return path.resolve(__dirname, "..", "..");
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Print usage help and exit
|
|
20
|
+
*/
|
|
21
|
+
function printUsageAndExit() {
|
|
22
|
+
console.error("Error: destination path is required");
|
|
23
|
+
console.log("");
|
|
24
|
+
console.log("Usage: lisa [options] <destination-path>");
|
|
25
|
+
console.log("");
|
|
26
|
+
console.log("Options:");
|
|
27
|
+
console.log(" -n, --dry-run Show what would be done without making changes");
|
|
28
|
+
console.log(" -y, --yes Non-interactive mode (auto-accept defaults, overwrite on conflict)");
|
|
29
|
+
console.log(" -v, --validate Validate project compatibility without applying changes");
|
|
30
|
+
console.log(" --skip-git-check Skip dirty git working directory check (for postinstall use)");
|
|
31
|
+
console.log(" --no-update-check Skip the npm latest-version check");
|
|
32
|
+
console.log(` --harness <h> Target harness for emitted artifacts: ${HARNESS_VALUES.join(" | ")} (persisted in .lisa.config.json)`);
|
|
33
|
+
console.log(" -h, --help Show this help message");
|
|
34
|
+
console.log("");
|
|
35
|
+
console.log("Examples:");
|
|
36
|
+
console.log(" lisa /path/to/my-project");
|
|
37
|
+
console.log(" lisa --dry-run .");
|
|
38
|
+
console.log(" lisa --yes /path/to/project # CI/CD pipeline usage");
|
|
39
|
+
console.log(" lisa --validate . # Check compatibility only");
|
|
40
|
+
console.log(" lisa --harness=codex . # Emit Codex artifacts");
|
|
41
|
+
console.log(" lisa --harness=both . # Emit both Claude and Codex artifacts");
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Apply Lisa to the given destination with the given options.
|
|
46
|
+
*
|
|
47
|
+
* This is the relocated action that previously lived inline in
|
|
48
|
+
* `src/cli/index.ts` as `runLisa`. It backs both the explicit `apply`
|
|
49
|
+
* subcommand and the backwards-compatible positional default, so the two
|
|
50
|
+
* invocation forms produce identical results.
|
|
51
|
+
* @param destination - Path to destination directory
|
|
52
|
+
* @param options - CLI options
|
|
53
|
+
* @returns Promise that completes when Lisa finishes
|
|
54
|
+
*/
|
|
55
|
+
export async function runApply(destination, options) {
|
|
56
|
+
if (!destination) {
|
|
57
|
+
printUsageAndExit();
|
|
58
|
+
}
|
|
59
|
+
const dryRun = options.dryRun ?? options.validate ?? false;
|
|
60
|
+
const yesMode = options.yes ?? false;
|
|
61
|
+
const destDir = toAbsolutePath(destination);
|
|
62
|
+
// Resolve harness with precedence: CLI flag > .lisa.config.json > default
|
|
63
|
+
const projectConfig = await readProjectConfig(destDir);
|
|
64
|
+
const harness = resolveHarness(options.harness, projectConfig);
|
|
65
|
+
const config = {
|
|
66
|
+
lisaDir: getLisaDir(),
|
|
67
|
+
destDir,
|
|
68
|
+
dryRun,
|
|
69
|
+
yesMode,
|
|
70
|
+
validateOnly: options.validate ?? false,
|
|
71
|
+
skipGitCheck: options.skipGitCheck ?? false,
|
|
72
|
+
harness,
|
|
73
|
+
};
|
|
74
|
+
const logger = new ConsoleLogger();
|
|
75
|
+
const deps = createDependencies(dryRun, yesMode, logger);
|
|
76
|
+
const lisa = new Lisa(config, deps);
|
|
77
|
+
try {
|
|
78
|
+
const result = options.validate
|
|
79
|
+
? await lisa.validate()
|
|
80
|
+
: await lisa.apply();
|
|
81
|
+
if (!result.success) {
|
|
82
|
+
result.errors.forEach(error => logger.error(error));
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
// Persist resolved harness on apply (not validate, not dry-run) so the
|
|
86
|
+
// choice survives to the next run without requiring the flag every time.
|
|
87
|
+
// Only write when the user actually supplied --harness, so existing
|
|
88
|
+
// host projects don't gain a brand-new .lisa.config.json with the
|
|
89
|
+
// default value just by running `lisa` once.
|
|
90
|
+
if (!options.validate &&
|
|
91
|
+
!dryRun &&
|
|
92
|
+
options.harness !== undefined &&
|
|
93
|
+
projectConfig.harness !== harness) {
|
|
94
|
+
await writeProjectConfig(destDir, { harness });
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
logger.error(error instanceof Error ? error.message : String(error));
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/cli/apply.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAmB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D;;;GAGG;AACH,SAAS,UAAU;IACjB,sCAAsC;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB;IACxB,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACxB,OAAO,CAAC,GAAG,CACT,oEAAoE,CACrE,CAAC;IACF,OAAO,CAAC,GAAG,CACT,wFAAwF,CACzF,CAAC;IACF,OAAO,CAAC,GAAG,C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C,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { runApply } from "./apply.js";
|
|
3
|
+
import { printUpdateWarning } from "./print-update-warning.js";
|
|
4
|
+
import { runUpdateCheck } from "./update-check.js";
|
|
2
5
|
/**
|
|
3
|
-
*
|
|
6
|
+
* Injectable collaborators for {@link createProgram}. Defaults wire the real
|
|
7
|
+
* apply action and npm update-check; tests override them to observe the program
|
|
8
|
+
* wiring without touching the registry or the orchestrator.
|
|
9
|
+
*/
|
|
10
|
+
export interface ProgramDependencies {
|
|
11
|
+
/** Applies Lisa to a destination (defaults to the real {@link runApply}). */
|
|
12
|
+
runApply: typeof runApply;
|
|
13
|
+
/** Runs the non-fatal npm update check (defaults to {@link runUpdateCheck}). */
|
|
14
|
+
runUpdateCheck: typeof runUpdateCheck;
|
|
15
|
+
/** Prints the update warning (defaults to {@link printUpdateWarning}). */
|
|
16
|
+
printUpdateWarning: typeof printUpdateWarning;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create and configure the CLI program.
|
|
20
|
+
*
|
|
21
|
+
* The root program is subcommand-style: `apply` is the explicit subcommand and
|
|
22
|
+
* also the default command, so the historical positional `lisa <dest>`
|
|
23
|
+
* invocation keeps working. Both forms call the same apply action. A
|
|
24
|
+
* `preAction` hook runs the npm update-check exactly once per invocation before
|
|
25
|
+
* any action fires.
|
|
26
|
+
* @param dependencies - Optional collaborator overrides for testing
|
|
4
27
|
* @returns Configured Commander program
|
|
5
28
|
*/
|
|
6
|
-
export declare function createProgram(): Command;
|
|
29
|
+
export declare function createProgram(dependencies?: Partial<ProgramDependencies>): Command;
|
|
7
30
|
export { createPrompter } from "./prompts.js";
|
|
8
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,6EAA6E;IAC7E,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,gFAAgF;IAChF,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,0EAA0E;IAC1E,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;CAC/C;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,YAAY,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAC9C,OAAO,CAwCT;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -1,161 +1,57 @@
|
|
|
1
|
-
import { Command
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Lisa } from "../core/lisa.js";
|
|
7
|
-
import { isHarness, readProjectConfig, resolveHarness, writeProjectConfig, } from "../core/project-config.js";
|
|
8
|
-
import { DetectorRegistry } from "../detection/index.js";
|
|
9
|
-
import { ConsoleLogger } from "../logging/index.js";
|
|
10
|
-
import { MigrationRegistry } from "../migrations/index.js";
|
|
11
|
-
import { StrategyRegistry } from "../strategies/index.js";
|
|
12
|
-
import { BackupService, DryRunBackupService } from "../transaction/index.js";
|
|
13
|
-
import { toAbsolutePath } from "../utils/path-utils.js";
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { runApply } from "./apply.js";
|
|
3
|
+
import { printUpdateWarning } from "./print-update-warning.js";
|
|
4
|
+
import { addSharedOptions } from "./shared-options.js";
|
|
5
|
+
import { runUpdateCheck } from "./update-check.js";
|
|
14
6
|
import { getPackageVersion } from "./version.js";
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const DEFAULT_DEPENDENCIES = {
|
|
8
|
+
runApply,
|
|
9
|
+
runUpdateCheck,
|
|
10
|
+
printUpdateWarning,
|
|
11
|
+
};
|
|
17
12
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Validate the --harness CLI argument. Commander invokes this with the raw
|
|
27
|
-
* user-supplied string and expects either the parsed value or a thrown
|
|
28
|
-
* InvalidArgumentError.
|
|
29
|
-
* @param value - Raw argument value
|
|
30
|
-
* @returns The validated harness
|
|
31
|
-
*/
|
|
32
|
-
function parseHarnessArg(value) {
|
|
33
|
-
if (!isHarness(value)) {
|
|
34
|
-
const allowed = HARNESS_VALUES.join(" | ");
|
|
35
|
-
throw new InvalidArgumentError(`expected ${allowed}, got ${JSON.stringify(value)}`);
|
|
36
|
-
}
|
|
37
|
-
return value;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Create and configure the CLI program
|
|
13
|
+
* Create and configure the CLI program.
|
|
14
|
+
*
|
|
15
|
+
* The root program is subcommand-style: `apply` is the explicit subcommand and
|
|
16
|
+
* also the default command, so the historical positional `lisa <dest>`
|
|
17
|
+
* invocation keeps working. Both forms call the same apply action. A
|
|
18
|
+
* `preAction` hook runs the npm update-check exactly once per invocation before
|
|
19
|
+
* any action fires.
|
|
20
|
+
* @param dependencies - Optional collaborator overrides for testing
|
|
41
21
|
* @returns Configured Commander program
|
|
42
22
|
*/
|
|
43
|
-
export function createProgram() {
|
|
23
|
+
export function createProgram(dependencies = {}) {
|
|
24
|
+
const deps = {
|
|
25
|
+
...DEFAULT_DEPENDENCIES,
|
|
26
|
+
...dependencies,
|
|
27
|
+
};
|
|
44
28
|
const program = new Command();
|
|
45
29
|
program
|
|
46
30
|
.name("lisa")
|
|
47
31
|
.description("Claude Code / Codex CLI governance framework - apply guardrails and guidance to projects")
|
|
48
32
|
.version(getPackageVersion())
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
33
|
+
.option("--no-update-check", "Skip the npm latest-version check");
|
|
34
|
+
// Run the npm update-check once per invocation, before the matched action.
|
|
35
|
+
// It is non-fatal: a failed check never blocks the action from running.
|
|
36
|
+
program.hook("preAction", async () => {
|
|
37
|
+
if (program.opts().updateCheck === false) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const result = await deps.runUpdateCheck();
|
|
41
|
+
deps.printUpdateWarning(result);
|
|
42
|
+
});
|
|
43
|
+
// `apply` is both the explicit subcommand and the default command, so the
|
|
44
|
+
// historical positional form `lisa <destination>` routes here unchanged and
|
|
45
|
+
// produces the same result as `lisa apply <destination>`. Commander rejects a
|
|
46
|
+
// root-level positional `argument` once subcommands exist, so the default
|
|
47
|
+
// command is the supported way to keep the bare-positional invocation.
|
|
48
|
+
addSharedOptions(program
|
|
49
|
+
.command("apply", { isDefault: true })
|
|
50
|
+
.description("Apply Lisa to an existing project (backwards-compatible)")
|
|
51
|
+
.argument("[destination]", "Path to the project directory")).action(async (destination, options) => {
|
|
52
|
+
await deps.runApply(destination, options);
|
|
58
53
|
});
|
|
59
54
|
return program;
|
|
60
55
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Print usage help and exit
|
|
63
|
-
*/
|
|
64
|
-
function printUsageAndExit() {
|
|
65
|
-
console.error("Error: destination path is required");
|
|
66
|
-
console.log("");
|
|
67
|
-
console.log("Usage: lisa [options] <destination-path>");
|
|
68
|
-
console.log("");
|
|
69
|
-
console.log("Options:");
|
|
70
|
-
console.log(" -n, --dry-run Show what would be done without making changes");
|
|
71
|
-
console.log(" -y, --yes Non-interactive mode (auto-accept defaults, overwrite on conflict)");
|
|
72
|
-
console.log(" -v, --validate Validate project compatibility without applying changes");
|
|
73
|
-
console.log(" --skip-git-check Skip dirty git working directory check (for postinstall use)");
|
|
74
|
-
console.log(" --no-update-check Skip the npm latest-version check");
|
|
75
|
-
console.log(` --harness <h> Target harness for emitted artifacts: ${HARNESS_VALUES.join(" | ")} (persisted in .lisa.config.json)`);
|
|
76
|
-
console.log(" -h, --help Show this help message");
|
|
77
|
-
console.log("");
|
|
78
|
-
console.log("Examples:");
|
|
79
|
-
console.log(" lisa /path/to/my-project");
|
|
80
|
-
console.log(" lisa --dry-run .");
|
|
81
|
-
console.log(" lisa --yes /path/to/project # CI/CD pipeline usage");
|
|
82
|
-
console.log(" lisa --validate . # Check compatibility only");
|
|
83
|
-
console.log(" lisa --harness=codex . # Emit Codex artifacts");
|
|
84
|
-
console.log(" lisa --harness=both . # Emit both Claude and Codex artifacts");
|
|
85
|
-
process.exit(1);
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Create Lisa dependencies based on options
|
|
89
|
-
* @param dryRun - Whether in dry run mode
|
|
90
|
-
* @param yesMode - Whether in non-interactive mode
|
|
91
|
-
* @param logger - Logger instance
|
|
92
|
-
* @returns Dependencies for Lisa
|
|
93
|
-
*/
|
|
94
|
-
function createDependencies(dryRun, yesMode, logger) {
|
|
95
|
-
return {
|
|
96
|
-
logger,
|
|
97
|
-
prompter: createPrompter(yesMode),
|
|
98
|
-
backupService: dryRun
|
|
99
|
-
? new DryRunBackupService()
|
|
100
|
-
: new BackupService(logger),
|
|
101
|
-
detectorRegistry: new DetectorRegistry(),
|
|
102
|
-
strategyRegistry: new StrategyRegistry(),
|
|
103
|
-
gitService: new GitService(),
|
|
104
|
-
migrationRegistry: new MigrationRegistry(),
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Run Lisa with the given options
|
|
109
|
-
* @param destination - Path to destination directory
|
|
110
|
-
* @param options - CLI options
|
|
111
|
-
* @returns Promise that completes when Lisa finishes
|
|
112
|
-
*/
|
|
113
|
-
async function runLisa(destination, options) {
|
|
114
|
-
if (!destination) {
|
|
115
|
-
printUsageAndExit();
|
|
116
|
-
}
|
|
117
|
-
const dryRun = options.dryRun ?? options.validate ?? false;
|
|
118
|
-
const yesMode = options.yes ?? false;
|
|
119
|
-
const destDir = toAbsolutePath(destination);
|
|
120
|
-
// Resolve harness with precedence: CLI flag > .lisa.config.json > default
|
|
121
|
-
const projectConfig = await readProjectConfig(destDir);
|
|
122
|
-
const harness = resolveHarness(options.harness, projectConfig);
|
|
123
|
-
const config = {
|
|
124
|
-
lisaDir: getLisaDir(),
|
|
125
|
-
destDir,
|
|
126
|
-
dryRun,
|
|
127
|
-
yesMode,
|
|
128
|
-
validateOnly: options.validate ?? false,
|
|
129
|
-
skipGitCheck: options.skipGitCheck ?? false,
|
|
130
|
-
harness,
|
|
131
|
-
};
|
|
132
|
-
const logger = new ConsoleLogger();
|
|
133
|
-
const deps = createDependencies(dryRun, yesMode, logger);
|
|
134
|
-
const lisa = new Lisa(config, deps);
|
|
135
|
-
try {
|
|
136
|
-
const result = options.validate
|
|
137
|
-
? await lisa.validate()
|
|
138
|
-
: await lisa.apply();
|
|
139
|
-
if (!result.success) {
|
|
140
|
-
result.errors.forEach(error => logger.error(error));
|
|
141
|
-
process.exit(1);
|
|
142
|
-
}
|
|
143
|
-
// Persist resolved harness on apply (not validate, not dry-run) so the
|
|
144
|
-
// choice survives to the next run without requiring the flag every time.
|
|
145
|
-
// Only write when the user actually supplied --harness, so existing
|
|
146
|
-
// host projects don't gain a brand-new .lisa.config.json with the
|
|
147
|
-
// default value just by running `lisa` once.
|
|
148
|
-
if (!options.validate &&
|
|
149
|
-
!dryRun &&
|
|
150
|
-
options.harness !== undefined &&
|
|
151
|
-
projectConfig.harness !== harness) {
|
|
152
|
-
await writeProjectConfig(destDir, { harness });
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
logger.error(error instanceof Error ? error.message : String(error));
|
|
157
|
-
process.exit(1);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
56
|
export { createPrompter } from "./prompts.js";
|
|
161
57
|
//# sourceMappingURL=index.js.map
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAmB,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAgBjD,MAAM,oBAAoB,GAAwB;IAChD,QAAQ;IACR,cAAc;IACd,kBAAkB;CACnB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,aAAa,CAC3B,eAA6C,EAAE;IAE/C,MAAM,IAAI,GAAwB;QAChC,GAAG,oBAAoB;QACvB,GAAG,YAAY;KAChB,CAAC;IACF,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,MAAM,CAAC;SACZ,WAAW,CACV,0FAA0F,CAC3F;SACA,OAAO,CAAC,iBAAiB,EAAE,CAAC;SAC5B,MAAM,CAAC,mBAAmB,EAAE,mCAAmC,CAAC,CAAC;IAEpE,2EAA2E;IAC3E,wEAAwE;IACxE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACnC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;YACzC,OAAO;QACT,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,0EAA0E;IAC1E,4EAA4E;IAC5E,8EAA8E;IAC9E,0EAA0E;IAC1E,uEAAuE;IACvE,gBAAgB,CACd,OAAO;SACJ,OAAO,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;SACrC,WAAW,CAAC,0DAA0D,CAAC;SACvE,QAAQ,CAAC,eAAe,EAAE,+BAA+B,CAAC,CAC9D,CAAC,MAAM,CAAC,KAAK,EAAE,WAA+B,EAAE,OAAmB,EAAE,EAAE;QACtE,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type Command } from "commander";
|
|
2
|
+
import type { Harness } from "../core/config.js";
|
|
3
|
+
import type { LisaDependencies } from "../core/lisa.js";
|
|
4
|
+
import type { ConsoleLogger } from "../logging/index.js";
|
|
5
|
+
/**
|
|
6
|
+
* CLI options parsed from command line arguments. Shared by the `apply`
|
|
7
|
+
* subcommand and the backwards-compatible positional default.
|
|
8
|
+
*/
|
|
9
|
+
export interface CLIOptions {
|
|
10
|
+
dryRun?: boolean;
|
|
11
|
+
yes?: boolean;
|
|
12
|
+
validate?: boolean;
|
|
13
|
+
skipGitCheck?: boolean;
|
|
14
|
+
harness?: Harness;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validate the --harness CLI argument. Commander invokes this with the raw
|
|
18
|
+
* user-supplied string and expects either the parsed value or a thrown
|
|
19
|
+
* InvalidArgumentError.
|
|
20
|
+
* @param value - Raw argument value
|
|
21
|
+
* @returns The validated harness
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseHarnessArg(value: string): Harness;
|
|
24
|
+
/**
|
|
25
|
+
* Register the apply-flow flags shared by every entry point that applies Lisa
|
|
26
|
+
* to a project. Mutates and returns the command for chaining.
|
|
27
|
+
* @param command - Command to decorate with shared options
|
|
28
|
+
* @returns The same command instance
|
|
29
|
+
*/
|
|
30
|
+
export declare function addSharedOptions(command: Command): Command;
|
|
31
|
+
/**
|
|
32
|
+
* Create Lisa dependencies based on options
|
|
33
|
+
* @param dryRun - Whether in dry run mode
|
|
34
|
+
* @param yesMode - Whether in non-interactive mode
|
|
35
|
+
* @param logger - Logger instance
|
|
36
|
+
* @returns Dependencies for Lisa
|
|
37
|
+
*/
|
|
38
|
+
export declare function createDependencies(dryRun: boolean, yesMode: boolean, logger: ConsoleLogger): LisaDependencies;
|
|
39
|
+
//# sourceMappingURL=shared-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-options.d.ts","sourceRoot":"","sources":["../../src/cli/shared-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAwB,MAAM,WAAW,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAOzD;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAQtD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAoB1D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,aAAa,GACpB,gBAAgB,CAYlB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { InvalidArgumentError } from "commander";
|
|
2
|
+
import { HARNESS_VALUES } from "../core/config.js";
|
|
3
|
+
import { GitService } from "../core/git-service.js";
|
|
4
|
+
import { DetectorRegistry } from "../detection/index.js";
|
|
5
|
+
import { MigrationRegistry } from "../migrations/index.js";
|
|
6
|
+
import { isHarness } from "../core/project-config.js";
|
|
7
|
+
import { StrategyRegistry } from "../strategies/index.js";
|
|
8
|
+
import { BackupService, DryRunBackupService } from "../transaction/index.js";
|
|
9
|
+
import { createPrompter } from "./prompts.js";
|
|
10
|
+
/**
|
|
11
|
+
* Validate the --harness CLI argument. Commander invokes this with the raw
|
|
12
|
+
* user-supplied string and expects either the parsed value or a thrown
|
|
13
|
+
* InvalidArgumentError.
|
|
14
|
+
* @param value - Raw argument value
|
|
15
|
+
* @returns The validated harness
|
|
16
|
+
*/
|
|
17
|
+
export function parseHarnessArg(value) {
|
|
18
|
+
if (!isHarness(value)) {
|
|
19
|
+
const allowed = HARNESS_VALUES.join(" | ");
|
|
20
|
+
throw new InvalidArgumentError(`expected ${allowed}, got ${JSON.stringify(value)}`);
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Register the apply-flow flags shared by every entry point that applies Lisa
|
|
26
|
+
* to a project. Mutates and returns the command for chaining.
|
|
27
|
+
* @param command - Command to decorate with shared options
|
|
28
|
+
* @returns The same command instance
|
|
29
|
+
*/
|
|
30
|
+
export function addSharedOptions(command) {
|
|
31
|
+
return command
|
|
32
|
+
.option("-n, --dry-run", "Show what would be done without making changes")
|
|
33
|
+
.option("-y, --yes", "Non-interactive mode (auto-accept defaults, overwrite on conflict)")
|
|
34
|
+
.option("-v, --validate", "Validate project compatibility without applying changes")
|
|
35
|
+
.option("--skip-git-check", "Skip dirty git working directory check (for postinstall use)")
|
|
36
|
+
.option("--harness <harness>", `Target harness for emitted artifacts: ${HARNESS_VALUES.join(" | ")} (default: claude, or value from .lisa.config.json)`, parseHarnessArg);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Create Lisa dependencies based on options
|
|
40
|
+
* @param dryRun - Whether in dry run mode
|
|
41
|
+
* @param yesMode - Whether in non-interactive mode
|
|
42
|
+
* @param logger - Logger instance
|
|
43
|
+
* @returns Dependencies for Lisa
|
|
44
|
+
*/
|
|
45
|
+
export function createDependencies(dryRun, yesMode, logger) {
|
|
46
|
+
return {
|
|
47
|
+
logger,
|
|
48
|
+
prompter: createPrompter(yesMode),
|
|
49
|
+
backupService: dryRun
|
|
50
|
+
? new DryRunBackupService()
|
|
51
|
+
: new BackupService(logger),
|
|
52
|
+
detectorRegistry: new DetectorRegistry(),
|
|
53
|
+
strategyRegistry: new StrategyRegistry(),
|
|
54
|
+
gitService: new GitService(),
|
|
55
|
+
migrationRegistry: new MigrationRegistry(),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=shared-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-options.js","sourceRoot":"","sources":["../../src/cli/shared-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAE/D,OAAO,EAAE,cAAc,EA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OAAO,CAAC;QACjC,aAAa,EAAE,MAAM;YACnB,CAAC,CAAC,IAAI,mBAAmB,EAAE;YAC3B,CAAC,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC;QAC7B,gBAAgB,EAAE,IAAI,gBAAgB,EAAE;QACxC,gBAAgB,EAAE,IAAI,gBAAgB,EAAE;QACxC,UAAU,EAAE,IAAI,UAAU,EAAE;QAC5B,iBAAiB,EAAE,IAAI,iBAAiB,EAAE;KAC3C,CAAC;AACJ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createProgram } from "./cli/index.js";
|
|
3
|
-
import { printUpdateWarning } from "./cli/print-update-warning.js";
|
|
4
|
-
import { runUpdateCheck } from "./cli/update-check.js";
|
|
5
3
|
/**
|
|
6
4
|
* Run the Lisa CLI entrypoint.
|
|
5
|
+
*
|
|
6
|
+
* The npm update-check now runs inside the program's `preAction` hook (wired in
|
|
7
|
+
* {@link createProgram}) so it fires exactly once per invocation before the
|
|
8
|
+
* matched action, for every subcommand and the positional default alike.
|
|
7
9
|
* @returns Promise that resolves after Commander completes
|
|
8
10
|
*/
|
|
9
11
|
async function main() {
|
|
10
|
-
const updateCheck = await runUpdateCheck();
|
|
11
12
|
const program = createProgram();
|
|
12
|
-
printUpdateWarning(updateCheck);
|
|
13
13
|
await program.parseAsync();
|
|
14
14
|
}
|
|
15
15
|
main().catch(error => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;GAOG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;AAC7B,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,OAAO,CAAC,KAAK,CACX,QAAQ,EACR,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lodash": ">=4.18.1"
|
|
84
84
|
},
|
|
85
85
|
"name": "@codyswann/lisa",
|
|
86
|
-
"version": "2.130.
|
|
86
|
+
"version": "2.130.6",
|
|
87
87
|
"description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
|
|
88
88
|
"main": "dist/index.js",
|
|
89
89
|
"exports": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.130.
|
|
3
|
+
"version": "2.130.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.130.
|
|
3
|
+
"version": "2.130.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.130.
|
|
3
|
+
"version": "2.130.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.130.
|
|
3
|
+
"version": "2.130.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "2.130.
|
|
3
|
+
"version": "2.130.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|