@codyswann/lisa 2.247.2 → 2.250.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/README.md +5 -0
- package/all/copy-overwrite/scripts/lisa-work-item.mjs +1102 -0
- package/dist/cli/doctor-kane.d.ts +15 -0
- package/dist/cli/doctor-kane.d.ts.map +1 -0
- package/dist/cli/doctor-kane.js +28 -0
- package/dist/cli/doctor-kane.js.map +1 -0
- package/dist/cli/doctor-worker-epoch.d.ts +11 -0
- package/dist/cli/doctor-worker-epoch.d.ts.map +1 -0
- package/dist/cli/doctor-worker-epoch.js +234 -0
- package/dist/cli/doctor-worker-epoch.js.map +1 -0
- package/dist/cli/doctor.d.ts +3 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +6 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +56 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/kane-cmd.d.ts +45 -0
- package/dist/cli/kane-cmd.d.ts.map +1 -0
- package/dist/cli/kane-cmd.js +91 -0
- package/dist/cli/kane-cmd.js.map +1 -0
- package/dist/cli/ui-lisa-version.d.ts.map +1 -1
- package/dist/cli/ui-lisa-version.js +1 -5
- package/dist/cli/ui-lisa-version.js.map +1 -1
- package/dist/core/kane-cli-parser.d.ts +9 -0
- package/dist/core/kane-cli-parser.d.ts.map +1 -0
- package/dist/core/kane-cli-parser.js +145 -0
- package/dist/core/kane-cli-parser.js.map +1 -0
- package/dist/core/kane-cli-process.d.ts +15 -0
- package/dist/core/kane-cli-process.d.ts.map +1 -0
- package/dist/core/kane-cli-process.js +77 -0
- package/dist/core/kane-cli-process.js.map +1 -0
- package/dist/core/kane-cli-types.d.ts +61 -0
- package/dist/core/kane-cli-types.d.ts.map +1 -0
- package/dist/core/kane-cli-types.js +3 -0
- package/dist/core/kane-cli-types.js.map +1 -0
- package/dist/core/kane-cli.d.ts +42 -0
- package/dist/core/kane-cli.d.ts.map +1 -0
- package/dist/core/kane-cli.js +253 -0
- package/dist/core/kane-cli.js.map +1 -0
- package/dist/core/kane-pilot-report.d.ts +21 -0
- package/dist/core/kane-pilot-report.d.ts.map +1 -0
- package/dist/core/kane-pilot-report.js +169 -0
- package/dist/core/kane-pilot-report.js.map +1 -0
- package/dist/core/kane-pilot-types.d.ts +60 -0
- package/dist/core/kane-pilot-types.d.ts.map +1 -0
- package/dist/core/kane-pilot-types.js +2 -0
- package/dist/core/kane-pilot-types.js.map +1 -0
- package/dist/core/kane-pilot.d.ts +25 -0
- package/dist/core/kane-pilot.d.ts.map +1 -0
- package/dist/core/kane-pilot.js +255 -0
- package/dist/core/kane-pilot.js.map +1 -0
- package/dist/core/project-config-kane.d.ts +27 -0
- package/dist/core/project-config-kane.d.ts.map +1 -0
- package/dist/core/project-config-kane.js +152 -0
- package/dist/core/project-config-kane.js.map +1 -0
- package/dist/core/project-config.d.ts +11 -0
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +7 -5
- package/dist/core/project-config.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/.codex-plugin/skills/lisa-codify-verification/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-doctor/SKILL.md +7 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-exploratory-qa/SKILL.md +3 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-claim/SKILL.md +27 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-github-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +50 -14
- package/plugins/lisa/.codex-plugin/skills/lisa-improve-harness/SKILL.md +487 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-improve-harness/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-claim/SKILL.md +27 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-jira-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-kane-browser/SKILL.md +80 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-kane-browser/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-claim/SKILL.md +27 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-linear-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-monitor/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-parity-coderabbit/SKILL.md +10 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-product-walkthrough/SKILL.md +2 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-review-local/SKILL.md +11 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-kane/SKILL.md +96 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-kane/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-track/SKILL.md +71 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-track/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-claim/SKILL.md +35 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-tracker-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-use-the-product/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-verification-lifecycle/SKILL.md +3 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-verify/SKILL.md +1 -0
- package/plugins/lisa/agents/product-specialist.md +2 -0
- package/plugins/lisa/agents/quality-specialist.md +4 -1
- package/plugins/lisa/agents/verification-specialist.md +2 -2
- package/plugins/lisa/commands/improve-harness.md +6 -0
- package/plugins/lisa/commands/track.md +6 -0
- package/plugins/lisa/rules/eager/config-resolution.md +9 -0
- package/plugins/lisa/rules/eager/convergent-review.md +19 -0
- package/plugins/lisa/rules/eager/tracked-work.md +7 -0
- package/plugins/lisa/rules/eager/verification.md +1 -1
- package/plugins/lisa/rules/reference/config-resolution.md +26 -1
- package/plugins/lisa/rules/reference/convergent-review.md +69 -0
- package/plugins/lisa/rules/reference/tracked-work.md +26 -0
- package/plugins/lisa/rules/reference/verification.md +4 -2
- package/plugins/lisa/skills/lisa-codify-verification/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-doctor/SKILL.md +7 -0
- package/plugins/lisa/skills/lisa-exploratory-qa/SKILL.md +3 -0
- package/plugins/lisa/skills/lisa-github-claim/SKILL.md +27 -0
- package/plugins/lisa/skills/lisa-github-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-implement/SKILL.md +50 -14
- package/plugins/lisa/skills/lisa-improve-harness/SKILL.md +487 -0
- package/plugins/lisa/skills/lisa-improve-harness/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-jira-claim/SKILL.md +27 -0
- package/plugins/lisa/skills/lisa-jira-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-kane-browser/SKILL.md +80 -0
- package/plugins/lisa/skills/lisa-kane-browser/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-linear-claim/SKILL.md +27 -0
- package/plugins/lisa/skills/lisa-linear-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-monitor/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-parity-coderabbit/SKILL.md +10 -0
- package/plugins/lisa/skills/lisa-product-walkthrough/SKILL.md +2 -0
- package/plugins/lisa/skills/lisa-review-local/SKILL.md +11 -0
- package/plugins/lisa/skills/lisa-setup-kane/SKILL.md +96 -0
- package/plugins/lisa/skills/lisa-setup-kane/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-track/SKILL.md +71 -0
- package/plugins/lisa/skills/lisa-track/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-tracker-claim/SKILL.md +35 -0
- package/plugins/lisa/skills/lisa-tracker-claim/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/lisa-use-the-product/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-verification-lifecycle/SKILL.md +3 -1
- package/plugins/lisa/skills/lisa-verify/SKILL.md +1 -0
- package/plugins/lisa-agy/agents/product-specialist.md +2 -0
- package/plugins/lisa-agy/agents/quality-specialist.md +4 -1
- package/plugins/lisa-agy/agents/verification-specialist.md +2 -2
- package/plugins/lisa-agy/commands/lisa/improve-harness.md +6 -0
- package/plugins/lisa-agy/commands/lisa/track.md +6 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-codify-verification/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-doctor/SKILL.md +7 -0
- package/plugins/lisa-agy/skills/lisa-exploratory-qa/SKILL.md +3 -0
- package/plugins/lisa-agy/skills/lisa-github-claim/SKILL.md +27 -0
- package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +50 -14
- package/plugins/lisa-agy/skills/lisa-improve-harness/SKILL.md +487 -0
- package/plugins/lisa-agy/skills/lisa-jira-claim/SKILL.md +27 -0
- package/plugins/lisa-agy/skills/lisa-kane-browser/SKILL.md +80 -0
- package/plugins/lisa-agy/skills/lisa-linear-claim/SKILL.md +27 -0
- package/plugins/lisa-agy/skills/lisa-monitor/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-parity-coderabbit/SKILL.md +10 -0
- package/plugins/lisa-agy/skills/lisa-product-walkthrough/SKILL.md +2 -0
- package/plugins/lisa-agy/skills/lisa-review-local/SKILL.md +11 -0
- package/plugins/lisa-agy/skills/lisa-setup-kane/SKILL.md +96 -0
- package/plugins/lisa-agy/skills/lisa-track/SKILL.md +71 -0
- package/plugins/lisa-agy/skills/lisa-tracker-claim/SKILL.md +35 -0
- package/plugins/lisa-agy/skills/lisa-use-the-product/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-verification-lifecycle/SKILL.md +3 -1
- package/plugins/lisa-agy/skills/lisa-verify/SKILL.md +1 -0
- 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/agents/product-specialist.agent.md +2 -0
- package/plugins/lisa-copilot/agents/quality-specialist.agent.md +4 -1
- package/plugins/lisa-copilot/agents/verification-specialist.agent.md +2 -2
- package/plugins/lisa-copilot/commands/lisa/improve-harness.md +6 -0
- package/plugins/lisa-copilot/commands/lisa/track.md +6 -0
- package/plugins/lisa-copilot/rules/eager/config-resolution.md +9 -0
- package/plugins/lisa-copilot/rules/eager/convergent-review.md +19 -0
- package/plugins/lisa-copilot/rules/eager/tracked-work.md +7 -0
- package/plugins/lisa-copilot/rules/eager/verification.md +1 -1
- package/plugins/lisa-copilot/rules/reference/config-resolution.md +26 -1
- package/plugins/lisa-copilot/rules/reference/convergent-review.md +69 -0
- package/plugins/lisa-copilot/rules/reference/tracked-work.md +26 -0
- package/plugins/lisa-copilot/rules/reference/verification.md +4 -2
- package/plugins/lisa-copilot/skills/lisa-codify-verification/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-doctor/SKILL.md +7 -0
- package/plugins/lisa-copilot/skills/lisa-exploratory-qa/SKILL.md +3 -0
- package/plugins/lisa-copilot/skills/lisa-github-claim/SKILL.md +27 -0
- package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +50 -14
- package/plugins/lisa-copilot/skills/lisa-improve-harness/SKILL.md +487 -0
- package/plugins/lisa-copilot/skills/lisa-jira-claim/SKILL.md +27 -0
- package/plugins/lisa-copilot/skills/lisa-kane-browser/SKILL.md +80 -0
- package/plugins/lisa-copilot/skills/lisa-linear-claim/SKILL.md +27 -0
- package/plugins/lisa-copilot/skills/lisa-monitor/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-parity-coderabbit/SKILL.md +10 -0
- package/plugins/lisa-copilot/skills/lisa-product-walkthrough/SKILL.md +2 -0
- package/plugins/lisa-copilot/skills/lisa-review-local/SKILL.md +11 -0
- package/plugins/lisa-copilot/skills/lisa-setup-kane/SKILL.md +96 -0
- package/plugins/lisa-copilot/skills/lisa-track/SKILL.md +71 -0
- package/plugins/lisa-copilot/skills/lisa-tracker-claim/SKILL.md +35 -0
- package/plugins/lisa-copilot/skills/lisa-use-the-product/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-verification-lifecycle/SKILL.md +3 -1
- package/plugins/lisa-copilot/skills/lisa-verify/SKILL.md +1 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/agents/product-specialist.md +2 -0
- package/plugins/lisa-cursor/agents/quality-specialist.md +4 -1
- package/plugins/lisa-cursor/agents/verification-specialist.md +2 -2
- package/plugins/lisa-cursor/commands/lisa/improve-harness.md +6 -0
- package/plugins/lisa-cursor/commands/lisa/track.md +6 -0
- package/plugins/lisa-cursor/rules/config-resolution-reference.mdc +26 -1
- package/plugins/lisa-cursor/rules/config-resolution.mdc +9 -0
- package/plugins/lisa-cursor/rules/convergent-review-reference.mdc +74 -0
- package/plugins/lisa-cursor/rules/convergent-review.mdc +24 -0
- package/plugins/lisa-cursor/rules/tracked-work-reference.mdc +31 -0
- package/plugins/lisa-cursor/rules/tracked-work.mdc +12 -0
- package/plugins/lisa-cursor/rules/verification-reference.mdc +4 -2
- package/plugins/lisa-cursor/rules/verification.mdc +1 -1
- package/plugins/lisa-cursor/skills/lisa-codify-verification/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-doctor/SKILL.md +7 -0
- package/plugins/lisa-cursor/skills/lisa-exploratory-qa/SKILL.md +3 -0
- package/plugins/lisa-cursor/skills/lisa-github-claim/SKILL.md +27 -0
- package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +50 -14
- package/plugins/lisa-cursor/skills/lisa-improve-harness/SKILL.md +487 -0
- package/plugins/lisa-cursor/skills/lisa-jira-claim/SKILL.md +27 -0
- package/plugins/lisa-cursor/skills/lisa-kane-browser/SKILL.md +80 -0
- package/plugins/lisa-cursor/skills/lisa-linear-claim/SKILL.md +27 -0
- package/plugins/lisa-cursor/skills/lisa-monitor/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-parity-coderabbit/SKILL.md +10 -0
- package/plugins/lisa-cursor/skills/lisa-product-walkthrough/SKILL.md +2 -0
- package/plugins/lisa-cursor/skills/lisa-review-local/SKILL.md +11 -0
- package/plugins/lisa-cursor/skills/lisa-setup-kane/SKILL.md +96 -0
- package/plugins/lisa-cursor/skills/lisa-track/SKILL.md +71 -0
- package/plugins/lisa-cursor/skills/lisa-tracker-claim/SKILL.md +35 -0
- package/plugins/lisa-cursor/skills/lisa-use-the-product/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-verification-lifecycle/SKILL.md +3 -1
- package/plugins/lisa-cursor/skills/lisa-verify/SKILL.md +1 -0
- 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/agents/product-specialist.md +2 -0
- package/plugins/src/base/agents/quality-specialist.md +4 -1
- package/plugins/src/base/agents/verification-specialist.md +2 -2
- package/plugins/src/base/commands/improve-harness.md +6 -0
- package/plugins/src/base/commands/track.md +6 -0
- package/plugins/src/base/rules/eager/config-resolution.md +9 -0
- package/plugins/src/base/rules/eager/convergent-review.md +19 -0
- package/plugins/src/base/rules/eager/tracked-work.md +7 -0
- package/plugins/src/base/rules/eager/verification.md +1 -1
- package/plugins/src/base/rules/reference/config-resolution.md +26 -1
- package/plugins/src/base/rules/reference/convergent-review.md +69 -0
- package/plugins/src/base/rules/reference/tracked-work.md +26 -0
- package/plugins/src/base/rules/reference/verification.md +4 -2
- package/plugins/src/base/skills/lisa-codify-verification/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-doctor/SKILL.md +7 -0
- package/plugins/src/base/skills/lisa-exploratory-qa/SKILL.md +3 -0
- package/plugins/src/base/skills/lisa-github-claim/SKILL.md +27 -0
- package/plugins/src/base/skills/lisa-implement/SKILL.md +50 -14
- package/plugins/src/base/skills/lisa-improve-harness/SKILL.md +487 -0
- package/plugins/src/base/skills/lisa-jira-claim/SKILL.md +27 -0
- package/plugins/src/base/skills/lisa-kane-browser/SKILL.md +80 -0
- package/plugins/src/base/skills/lisa-linear-claim/SKILL.md +27 -0
- package/plugins/src/base/skills/lisa-monitor/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-parity-coderabbit/SKILL.md +10 -0
- package/plugins/src/base/skills/lisa-product-walkthrough/SKILL.md +2 -0
- package/plugins/src/base/skills/lisa-review-local/SKILL.md +11 -0
- package/plugins/src/base/skills/lisa-setup-kane/SKILL.md +96 -0
- package/plugins/src/base/skills/lisa-track/SKILL.md +71 -0
- package/plugins/src/base/skills/lisa-tracker-claim/SKILL.md +35 -0
- package/plugins/src/base/skills/lisa-use-the-product/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-verification-lifecycle/SKILL.md +3 -1
- package/plugins/src/base/skills/lisa-verify/SKILL.md +1 -0
- package/rails/copy-overwrite/lefthook.yml +10 -0
- package/scripts/lisa-work-item.mjs +5 -0
- package/typescript/copy-contents/.husky/commit-msg +9 -23
- package/typescript/copy-contents/.husky/pre-push +10 -0
- package/typescript/copy-contents/.husky/prepare-commit-msg +15 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/** Lisa CLI entrypoints for the optional Kane empirical-browser adapter. */
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { probeKaneReadiness, runKane, } from "../core/kane-cli.js";
|
|
4
|
+
import { executeKanePilot, readKanePilotReport } from "../core/kane-pilot.js";
|
|
5
|
+
const DEFAULT_DEPENDENCIES = {
|
|
6
|
+
run: runKane,
|
|
7
|
+
probe: probeKaneReadiness,
|
|
8
|
+
write: message => console.log(message),
|
|
9
|
+
setExitCode: code => {
|
|
10
|
+
process.exitCode = code;
|
|
11
|
+
},
|
|
12
|
+
executePilot: executeKanePilot,
|
|
13
|
+
readPilotReport: readKanePilotReport,
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Map stable adapter outcomes to process exit codes.
|
|
17
|
+
* @param outcome - Stable adapter outcome
|
|
18
|
+
* @returns CLI exit code
|
|
19
|
+
*/
|
|
20
|
+
function outcomeExitCode(outcome) {
|
|
21
|
+
if (outcome === "passed")
|
|
22
|
+
return 0;
|
|
23
|
+
if (outcome === "product_failed")
|
|
24
|
+
return 1;
|
|
25
|
+
if (outcome === "timed_out")
|
|
26
|
+
return 3;
|
|
27
|
+
return 2;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Run one Kane objective through Lisa's safety and schema boundary.
|
|
31
|
+
* @param projectPath - Optional downstream project path
|
|
32
|
+
* @param options - Objective and resolved policy options
|
|
33
|
+
* @param dependencies - Injectable CLI collaborators
|
|
34
|
+
* @returns Completion promise
|
|
35
|
+
*/
|
|
36
|
+
export async function runKaneCli(projectPath, options, dependencies = {}) {
|
|
37
|
+
const deps = { ...DEFAULT_DEPENDENCIES, ...dependencies };
|
|
38
|
+
const maxSteps = options.maxSteps === undefined ? undefined : Number(options.maxSteps);
|
|
39
|
+
if (maxSteps !== undefined &&
|
|
40
|
+
(!Number.isInteger(maxSteps) || maxSteps < 1 || maxSteps > 100)) {
|
|
41
|
+
throw new Error("--max-steps must be an integer from 1 to 100");
|
|
42
|
+
}
|
|
43
|
+
const request = {
|
|
44
|
+
projectRoot: path.resolve(projectPath ?? process.cwd()),
|
|
45
|
+
environment: options.environment,
|
|
46
|
+
mutation: options.mutation,
|
|
47
|
+
objective: options.objective,
|
|
48
|
+
...(options.url === undefined ? {} : { url: options.url }),
|
|
49
|
+
...(maxSteps === undefined ? {} : { maxSteps }),
|
|
50
|
+
};
|
|
51
|
+
const result = await deps.run(request);
|
|
52
|
+
const exitCode = outcomeExitCode(result.outcome);
|
|
53
|
+
deps.write(options.json === true
|
|
54
|
+
? JSON.stringify(result, null, 2)
|
|
55
|
+
: `${result.outcome.toUpperCase()}: ${result.terminal?.summary ?? result.terminal?.reason ?? "Kane run produced no summary"}`);
|
|
56
|
+
if (exitCode !== 0)
|
|
57
|
+
deps.setExitCode(exitCode);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Run Kane's read-only readiness probe.
|
|
61
|
+
* @param projectPath - Optional downstream project path
|
|
62
|
+
* @param json - Whether to emit JSON
|
|
63
|
+
* @param dependencies - Injectable CLI collaborators
|
|
64
|
+
* @returns Completion promise
|
|
65
|
+
*/
|
|
66
|
+
export async function runKaneProbeCli(projectPath, json, dependencies = {}) {
|
|
67
|
+
const deps = { ...DEFAULT_DEPENDENCIES, ...dependencies };
|
|
68
|
+
const readiness = await deps.probe(path.resolve(projectPath ?? process.cwd()));
|
|
69
|
+
deps.write(json
|
|
70
|
+
? JSON.stringify(readiness, null, 2)
|
|
71
|
+
: `${readiness.status.toUpperCase()}: ${readiness.detail}`);
|
|
72
|
+
if (readiness.status === "fail")
|
|
73
|
+
deps.setExitCode(1);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Execute one longitudinal pilot sweep and print the current gate report.
|
|
77
|
+
* @param manifestPath - Pilot manifest path
|
|
78
|
+
* @param reportOnly - Skip execution and only evaluate accumulated records
|
|
79
|
+
* @param dependencies - Injectable CLI collaborators
|
|
80
|
+
* @returns Completion promise
|
|
81
|
+
*/
|
|
82
|
+
export async function runKanePilotCli(manifestPath, reportOnly, dependencies = {}) {
|
|
83
|
+
const deps = { ...DEFAULT_DEPENDENCIES, ...dependencies };
|
|
84
|
+
const report = reportOnly
|
|
85
|
+
? await deps.readPilotReport(manifestPath)
|
|
86
|
+
: await deps.executePilot(manifestPath);
|
|
87
|
+
deps.write(JSON.stringify(report, null, 2));
|
|
88
|
+
if (report.verdict === "reject")
|
|
89
|
+
deps.setExitCode(1);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=kane-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cmd.js","sourceRoot":"","sources":["../../src/cli/kane-cmd.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,kBAAkB,EAClB,OAAO,GAGR,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAsB9E,MAAM,oBAAoB,GAAwB;IAChD,GAAG,EAAE,OAAO;IACZ,KAAK,EAAE,kBAAkB;IACzB,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;IACtC,WAAW,EAAE,IAAI,CAAC,EAAE;QAClB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC1B,CAAC;IACD,YAAY,EAAE,gBAAgB;IAC9B,eAAe,EAAE,mBAAmB;CACrC,CAAC;AAEF;;;;GAIG;AACH,SAAS,eAAe,CACtB,OAAuD;IAEvD,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,CAAC,CAAC;IACnC,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G,YAAY,EAAE,CAAC;IAC1D,MAAM,MAAM,GAAG,UAAU;QACvB,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC;QAC1C,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,MAAM,CAAC,OAAO,KAAK,QAAQ;QAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-lisa-version.d.ts","sourceRoot":"","sources":["../../src/cli/ui-lisa-version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/D,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-lisa-version.d.ts","sourceRoot":"","sources":["../../src/cli/ui-lisa-version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/D,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B,CAAC;AAeF;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,GACjB,WAAW,CAAC,gBAAgB,CAAC,CAoC/B;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC7C,WAAW,CAAC,gBAAgB,CAAC,CAU/B"}
|
|
@@ -12,14 +12,10 @@ const LATEST_UNAVAILABLE_DETAIL = /^Latest version unavailable(?: \((.+)\))?$/u;
|
|
|
12
12
|
const OFFLINE_SKIP_DETAIL = "Skipped network check in offline mode";
|
|
13
13
|
const UNRECOGNIZED_MESSAGE = "Version check returned an unrecognized result";
|
|
14
14
|
/**
|
|
15
|
-
* Default
|
|
16
|
-
* checkVersion only reads `runUpdateCheck`; the rest satisfy the type.
|
|
15
|
+
* Default collaborator for the shared doctor version check.
|
|
17
16
|
*/
|
|
18
17
|
const DEFAULT_VERSION_PROBE_DEPS = {
|
|
19
|
-
fetchImpl: fetch,
|
|
20
18
|
runUpdateCheck,
|
|
21
|
-
setExitCode: () => undefined,
|
|
22
|
-
write: () => undefined,
|
|
23
19
|
};
|
|
24
20
|
/**
|
|
25
21
|
* Map a `checkVersion` doctor result onto the live-status tri-state contract.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-lisa-version.js","sourceRoot":"","sources":["../../src/cli/ui-lisa-version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,YAAY,GAGb,MAA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AAM;SACtB,CAAC;IACJ,CAAC;IACD,MAAM,SAAS,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7D,IACE,SAAS,KAAK,IAAI;QAClB,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,EAClD,CAAC;QACD,OAAO;YACL,KAAK,EAAE,OAAO;YACd,KAAK,EAAE;gBACL,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE;gBAC3B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE;gBAC1B,QAAQ,EAAE,KAAK,CAAC,MAAM,KAAK,MAAM;aAClC;SACF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,4BAA4B;QACpC,OAAO,EACL,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB;KACvE,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CACpC,eAA4C,EAAE;IAE9C,MAAM,IAAI,GAAG,EAAE,GAAG,0BAA0B,EAAE,GAAG,YAAY,EAAE,CAAC;IAChE,OAAO;QACL,EAAE,EAAE,qBAAqB;QACzB,SAAS,EAAE,KAAK;QAChB,GAAG,EAAE,KAAK,IAAI,EAAE;YACd,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YAC9C,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;QACpC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Fail-closed parser for Kane's agent-mode JSONL stream. */
|
|
2
|
+
import type { KaneCommandResult, KaneRunResult } from "./kane-cli-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Convert captured Kane output into Lisa's stable result contract.
|
|
5
|
+
* @param command - Captured process result
|
|
6
|
+
* @returns Normalized provider result
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseKaneResult(command: KaneCommandResult): KaneRunResult;
|
|
9
|
+
//# sourceMappingURL=kane-cli-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli-parser.d.ts","sourceRoot":"","sources":["../../src/core/kane-cli-parser.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,KAAK,EACV,iBAAiB,EAEjB,aAAa,EAEd,MAAM,qBAAqB,CAAC;AAmJ7B;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,aAAa,CAoBzE"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Return a property object only when its value is defined.
|
|
3
|
+
* @param key - Output property name
|
|
4
|
+
* @param value - Optional property value
|
|
5
|
+
* @returns Empty or single-property record
|
|
6
|
+
*/
|
|
7
|
+
function defined(key, value) {
|
|
8
|
+
return value === undefined ? {} : { [key]: value };
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Read an optional string from an untrusted record.
|
|
12
|
+
* @param record - Untrusted event record
|
|
13
|
+
* @param key - Property name
|
|
14
|
+
* @returns String value or undefined
|
|
15
|
+
*/
|
|
16
|
+
function optionalString(record, key) {
|
|
17
|
+
return typeof record[key] === "string" ? record[key] : undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Read an optional finite number from an untrusted record.
|
|
21
|
+
* @param record - Untrusted event record
|
|
22
|
+
* @param key - Property name
|
|
23
|
+
* @returns Finite number or undefined
|
|
24
|
+
*/
|
|
25
|
+
function optionalNumber(record, key) {
|
|
26
|
+
const value = record[key];
|
|
27
|
+
return typeof value === "number" && Number.isFinite(value)
|
|
28
|
+
? value
|
|
29
|
+
: undefined;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Narrow an unknown value into Lisa's terminal subset.
|
|
33
|
+
* @param value - Parsed JSONL value
|
|
34
|
+
* @returns Terminal event or undefined
|
|
35
|
+
*/
|
|
36
|
+
function parseTerminalEvent(value) {
|
|
37
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const record = value;
|
|
41
|
+
if (record.type !== "run_end" ||
|
|
42
|
+
(record.status !== "passed" && record.status !== "failed")) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
const finalState = record.final_state;
|
|
46
|
+
const validFinalState = finalState !== null &&
|
|
47
|
+
typeof finalState === "object" &&
|
|
48
|
+
!Array.isArray(finalState)
|
|
49
|
+
? finalState
|
|
50
|
+
: undefined;
|
|
51
|
+
return {
|
|
52
|
+
type: "run_end",
|
|
53
|
+
status: record.status,
|
|
54
|
+
...defined("summary", optionalString(record, "summary")),
|
|
55
|
+
...defined("one_liner", optionalString(record, "one_liner")),
|
|
56
|
+
...defined("reason", optionalString(record, "reason")),
|
|
57
|
+
...defined("duration", optionalNumber(record, "duration")),
|
|
58
|
+
...defined("credits", optionalNumber(record, "credits")),
|
|
59
|
+
...defined("result_code", optionalNumber(record, "result_code")),
|
|
60
|
+
...defined("final_state", validFinalState),
|
|
61
|
+
...defined("session_dir", optionalString(record, "session_dir")),
|
|
62
|
+
...defined("run_dir", optionalString(record, "run_dir")),
|
|
63
|
+
...defined("test_url", optionalString(record, "test_url")),
|
|
64
|
+
...defined("evidence_pack", optionalString(record, "evidence_pack")),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Parse one JSONL line without trusting progress events.
|
|
69
|
+
* @param rawLine - Raw stdout line
|
|
70
|
+
* @param index - Zero-based line index
|
|
71
|
+
* @returns Parsed terminal/progress/warning markers
|
|
72
|
+
*/
|
|
73
|
+
function parseLine(rawLine, index) {
|
|
74
|
+
const line = rawLine.trim();
|
|
75
|
+
if (line.length === 0)
|
|
76
|
+
return { progress: false };
|
|
77
|
+
try {
|
|
78
|
+
const parsed = JSON.parse(line);
|
|
79
|
+
const record = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)
|
|
80
|
+
? parsed
|
|
81
|
+
: undefined;
|
|
82
|
+
return {
|
|
83
|
+
...defined("terminal", parseTerminalEvent(parsed)),
|
|
84
|
+
progress: typeof record?.step === "number" ||
|
|
85
|
+
record?.type === "step_start" ||
|
|
86
|
+
record?.type === "step_end",
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
return {
|
|
91
|
+
progress: false,
|
|
92
|
+
warning: `stdout line ${String(index + 1)} was not JSON`,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Extract a local evidence-pack path from Kane stderr.
|
|
98
|
+
* @param stderr - Captured standard error
|
|
99
|
+
* @returns Evidence path or undefined
|
|
100
|
+
*/
|
|
101
|
+
function parseEvidencePackHint(stderr) {
|
|
102
|
+
return /(?:evidence(?:[_ -]pack)?|pack)(?: path)?[:=]\s*["']?([^\s"']+\.(?:evidence|zip))/iu.exec(stderr)?.[1];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Classify process and terminal state without conflating tooling and product.
|
|
106
|
+
* @param exitCode - Kane process exit code
|
|
107
|
+
* @param terminal - Validated terminal event
|
|
108
|
+
* @returns Stable Lisa outcome
|
|
109
|
+
*/
|
|
110
|
+
function classifyOutcome(exitCode, terminal) {
|
|
111
|
+
if (exitCode === 3)
|
|
112
|
+
return "timed_out";
|
|
113
|
+
if ((exitCode !== 0 && exitCode !== 1) || terminal === undefined) {
|
|
114
|
+
return "tool_failed";
|
|
115
|
+
}
|
|
116
|
+
if (exitCode === 1 || terminal.status === "failed")
|
|
117
|
+
return "product_failed";
|
|
118
|
+
return "passed";
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Convert captured Kane output into Lisa's stable result contract.
|
|
122
|
+
* @param command - Captured process result
|
|
123
|
+
* @returns Normalized provider result
|
|
124
|
+
*/
|
|
125
|
+
export function parseKaneResult(command) {
|
|
126
|
+
const lines = command.stdout.split(/\r?\n/u).map(parseLine);
|
|
127
|
+
const terminal = lines
|
|
128
|
+
.map(line => line.terminal)
|
|
129
|
+
.filter((event) => event !== undefined)
|
|
130
|
+
.at(-1);
|
|
131
|
+
const evidencePack = terminal?.evidence_pack ?? parseEvidencePackHint(command.stderr);
|
|
132
|
+
return {
|
|
133
|
+
outcome: classifyOutcome(command.exitCode, terminal),
|
|
134
|
+
exitCode: command.exitCode,
|
|
135
|
+
...defined("terminal", terminal),
|
|
136
|
+
progressCount: lines.filter(line => line.progress).length,
|
|
137
|
+
parseWarnings: lines
|
|
138
|
+
.map(line => line.warning)
|
|
139
|
+
.filter((warning) => warning !== undefined),
|
|
140
|
+
confirmedProductBug: terminal?.result_code === 740,
|
|
141
|
+
...defined("evidencePack", evidencePack),
|
|
142
|
+
stderr: command.stderr,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=kane-cli-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli-parser.js","sourceRoot":"","sources":["../../src/core/kane-cli-parser.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,SAAS,OAAO,CAAI,GAAW,EAAE,KAAoB;IACnD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;AACrD,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CACrB,MAAyC,EACzC,GAAW;IAEX,OAAO,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACnE,CAAC;A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,EAAE,eAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC;QACpD,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,GAAG,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;QAChC,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM;QACzD,aAAa,EAAE,KAAK;aACjB,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;aACzB,MAAM,CAAC,CAAC,OAAO,EAAqB,EAAE,CAAC,OAAO,KAAK,SAAS,CAAC;QAChE,mBAAmB,EAAE,QAAQ,EAAE,WAAW,KAAK,GAAG;QAClD,GAAG,OAAO,CAAC,cAAc,EAAE,YAAY,CAAC;QACxC,MAAM,EAAE,OAAO,CAAC,MAAM;KACN,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChromeAvailabilityProbe, KaneCommandRunner } from "./kane-cli-types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Detect a locally installed Chromium-family browser without launching it.
|
|
4
|
+
* @returns True when a supported browser path exists
|
|
5
|
+
*/
|
|
6
|
+
export declare const isChromeAvailable: ChromeAvailabilityProbe;
|
|
7
|
+
/**
|
|
8
|
+
* Run a fixed-argv Kane child process without shell interpolation.
|
|
9
|
+
* @param executable - Executable name
|
|
10
|
+
* @param args - Fixed argument vector
|
|
11
|
+
* @param options - Working directory, timeout, and environment
|
|
12
|
+
* @returns Captured exit code and streams
|
|
13
|
+
*/
|
|
14
|
+
export declare const runKaneCommand: KaneCommandRunner;
|
|
15
|
+
//# sourceMappingURL=kane-cli-process.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli-process.d.ts","sourceRoot":"","sources":["../../src/core/kane-cli-process.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,uBAqC/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,iBAyCzB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Process and host-browser boundary for the Kane adapter. */
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
/**
|
|
6
|
+
* Detect a locally installed Chromium-family browser without launching it.
|
|
7
|
+
* @returns True when a supported browser path exists
|
|
8
|
+
*/
|
|
9
|
+
export const isChromeAvailable = () => {
|
|
10
|
+
// eslint-disable-next-line no-restricted-syntax -- explicit user browser override
|
|
11
|
+
const configured = process.env.CHROME_PATH;
|
|
12
|
+
// eslint-disable-next-line no-restricted-syntax -- Windows installation root discovery
|
|
13
|
+
const programFiles = process.env.PROGRAMFILES;
|
|
14
|
+
// eslint-disable-next-line no-restricted-syntax -- Windows x86 installation root discovery
|
|
15
|
+
const programFilesX86 = process.env["PROGRAMFILES(X86)"];
|
|
16
|
+
const candidates = [
|
|
17
|
+
configured,
|
|
18
|
+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
|
19
|
+
"/Applications/Chromium.app/Contents/MacOS/Chromium",
|
|
20
|
+
"/usr/bin/google-chrome",
|
|
21
|
+
"/usr/bin/google-chrome-stable",
|
|
22
|
+
"/usr/bin/chromium",
|
|
23
|
+
"/usr/bin/chromium-browser",
|
|
24
|
+
programFiles === undefined
|
|
25
|
+
? undefined
|
|
26
|
+
: path.join(programFiles, "Google", "Chrome", "Application", "chrome.exe"),
|
|
27
|
+
programFilesX86 === undefined
|
|
28
|
+
? undefined
|
|
29
|
+
: path.join(programFilesX86, "Google", "Chrome", "Application", "chrome.exe"),
|
|
30
|
+
];
|
|
31
|
+
return candidates.some(candidate => candidate !== undefined && existsSync(candidate));
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Run a fixed-argv Kane child process without shell interpolation.
|
|
35
|
+
* @param executable - Executable name
|
|
36
|
+
* @param args - Fixed argument vector
|
|
37
|
+
* @param options - Working directory, timeout, and environment
|
|
38
|
+
* @returns Captured exit code and streams
|
|
39
|
+
*/
|
|
40
|
+
export const runKaneCommand = async (executable, args, options) => await new Promise(resolve => {
|
|
41
|
+
// Kane is an explicitly configured user-installed CLI.
|
|
42
|
+
// eslint-disable-next-line sonarjs/no-os-command-from-path -- fixed executable and argv
|
|
43
|
+
const child = spawn(executable, [...args], {
|
|
44
|
+
cwd: options.cwd,
|
|
45
|
+
env: options.env,
|
|
46
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
47
|
+
});
|
|
48
|
+
/* eslint-disable functional/no-let -- child streams accumulate until the close event */
|
|
49
|
+
let stdout = "";
|
|
50
|
+
let stderr = "";
|
|
51
|
+
let timedOut = false;
|
|
52
|
+
/* eslint-enable functional/no-let -- accumulation ends with this promise */
|
|
53
|
+
child.stdout.setEncoding("utf8");
|
|
54
|
+
child.stderr.setEncoding("utf8");
|
|
55
|
+
child.stdout.on("data", (chunk) => {
|
|
56
|
+
stdout += chunk;
|
|
57
|
+
});
|
|
58
|
+
child.stderr.on("data", (chunk) => {
|
|
59
|
+
stderr += chunk;
|
|
60
|
+
});
|
|
61
|
+
child.on("error", error => {
|
|
62
|
+
stderr += `${stderr.length === 0 ? "" : "\n"}${error.message}`;
|
|
63
|
+
});
|
|
64
|
+
const timeout = setTimeout(() => {
|
|
65
|
+
timedOut = true;
|
|
66
|
+
child.kill("SIGKILL");
|
|
67
|
+
}, options.timeoutMs);
|
|
68
|
+
child.on("close", code => {
|
|
69
|
+
clearTimeout(timeout);
|
|
70
|
+
resolve({
|
|
71
|
+
exitCode: timedOut ? 3 : (code ?? 2),
|
|
72
|
+
stdout,
|
|
73
|
+
stderr,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
//# sourceMappingURL=kane-cli-process.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli-process.js","sourceRoot":"","sources":["../../src/core/kane-cli-process.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAMlC;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAA4B,GAAG,EAAE;IAC7D,kFAAkF;IAClF,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAC3C,uFAAuF;IACvF,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAC9C,2FAA2F;IAC3F,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG;QACjB,UAAU;QACV,8DAA8D;QAC9D,oDAAoD;QACpD,wBAAwB;QACxB,+BAA+B;QAC/B,mBAAmB;QACnB,2BAA2B;QAC3B,YAAY,KAAK,SAAS;YACxB,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CACP,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,YAAY,CACb;QACL,eAAe,KAAK,SAAS;YAC3B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,IAAI,CAAC,IAAI,CACP,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,YAAY,CACb;KACN,CAAC;IACF,OAAO,UAAU,CAAC,IAAI,CACpB,SAAS,CAAC,EAAE,CAAC,SAAS,KAAK,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,CAC9D,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAsB,KAAK,EAC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,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACtB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;QACvB,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,CAAC;YACN,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC;YACpC,MAAM;YACN,MAAM;SACP,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Stable Lisa types for the optional TestMu Kane CLI boundary. */
|
|
2
|
+
/** Stable Lisa outcome classes exposed to factory workflows. */
|
|
3
|
+
export type KaneOutcome = "passed" | "product_failed" | "tool_failed" | "timed_out";
|
|
4
|
+
/** Mutation levels shared with Lisa's product-use policy. */
|
|
5
|
+
export type KaneMutationLevel = "forbidden" | "read-only" | "full";
|
|
6
|
+
/** One provider-neutral Kane run request. */
|
|
7
|
+
export interface KaneRunRequest {
|
|
8
|
+
readonly projectRoot: string;
|
|
9
|
+
readonly environment: string;
|
|
10
|
+
readonly mutation: KaneMutationLevel;
|
|
11
|
+
readonly objective: string;
|
|
12
|
+
readonly url?: string;
|
|
13
|
+
readonly maxSteps?: number;
|
|
14
|
+
}
|
|
15
|
+
/** Minimal validated terminal record from Kane agent mode. */
|
|
16
|
+
export interface KaneTerminalEvent {
|
|
17
|
+
readonly type: "run_end";
|
|
18
|
+
readonly status: "passed" | "failed";
|
|
19
|
+
readonly summary?: string;
|
|
20
|
+
readonly one_liner?: string;
|
|
21
|
+
readonly reason?: string;
|
|
22
|
+
readonly duration?: number;
|
|
23
|
+
readonly credits?: number;
|
|
24
|
+
readonly result_code?: number;
|
|
25
|
+
readonly final_state?: Readonly<Record<string, unknown>>;
|
|
26
|
+
readonly session_dir?: string;
|
|
27
|
+
readonly run_dir?: string;
|
|
28
|
+
readonly test_url?: string;
|
|
29
|
+
readonly evidence_pack?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Stable result returned to Lisa factory workflows. */
|
|
32
|
+
export interface KaneRunResult {
|
|
33
|
+
readonly outcome: KaneOutcome;
|
|
34
|
+
readonly exitCode: number;
|
|
35
|
+
readonly terminal?: KaneTerminalEvent;
|
|
36
|
+
readonly progressCount: number;
|
|
37
|
+
readonly parseWarnings: readonly string[];
|
|
38
|
+
readonly confirmedProductBug: boolean;
|
|
39
|
+
readonly evidencePack?: string;
|
|
40
|
+
readonly stderr: string;
|
|
41
|
+
}
|
|
42
|
+
/** Captured child-process result. */
|
|
43
|
+
export interface KaneCommandResult {
|
|
44
|
+
readonly exitCode: number;
|
|
45
|
+
readonly stdout: string;
|
|
46
|
+
readonly stderr: string;
|
|
47
|
+
}
|
|
48
|
+
/** Injectable process runner used by adapter and doctor tests. */
|
|
49
|
+
export type KaneCommandRunner = (executable: string, args: readonly string[], options: {
|
|
50
|
+
readonly cwd: string;
|
|
51
|
+
readonly timeoutMs: number;
|
|
52
|
+
readonly env: NodeJS.ProcessEnv;
|
|
53
|
+
}) => Promise<KaneCommandResult>;
|
|
54
|
+
/** Readiness result used by `lisa doctor`. */
|
|
55
|
+
export interface KaneReadiness {
|
|
56
|
+
readonly status: "disabled" | "ready" | "warn" | "fail";
|
|
57
|
+
readonly detail: string;
|
|
58
|
+
}
|
|
59
|
+
/** Injectable local-browser availability probe used by doctor tests. */
|
|
60
|
+
export type ChromeAvailabilityProbe = () => boolean;
|
|
61
|
+
//# sourceMappingURL=kane-cli-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli-types.d.ts","sourceRoot":"","sources":["../../src/core/kane-cli-types.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAEnE,gEAAgE;AAChE,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,gBAAgB,GAChB,aAAa,GACb,WAAW,CAAC;AAEhB,6DAA6D;AAC7D,MAAM,MAAM,iBAAiB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./project-config.js";
|
|
2
|
+
import type { ChromeAvailabilityProbe, KaneCommandRunner, KaneReadiness, KaneRunRequest, KaneRunResult } from "./kane-cli-types.js";
|
|
3
|
+
export { parseKaneResult } from "./kane-cli-parser.js";
|
|
4
|
+
export { isChromeAvailable, runKaneCommand } from "./kane-cli-process.js";
|
|
5
|
+
export type { ChromeAvailabilityProbe, KaneCommandResult, KaneCommandRunner, KaneMutationLevel, KaneOutcome, KaneReadiness, KaneRunRequest, KaneRunResult, KaneTerminalEvent, } from "./kane-cli-types.js";
|
|
6
|
+
/** Kane CLI version covered by Lisa's adapter contract tests. */
|
|
7
|
+
export declare const SUPPORTED_KANE_VERSION = "0.6.3";
|
|
8
|
+
/** Provider config narrowed by Lisa's hard run gate. */
|
|
9
|
+
type AllowedKaneConfig = KaneBrowserConfig & {
|
|
10
|
+
readonly enabled: true;
|
|
11
|
+
readonly cloudUploadApproved: true;
|
|
12
|
+
readonly version: typeof SUPPORTED_KANE_VERSION;
|
|
13
|
+
readonly projectId: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Merge committed and local Kane config using per-key local precedence.
|
|
17
|
+
* @param projectRoot - Downstream project root
|
|
18
|
+
* @returns Effective optional provider config
|
|
19
|
+
*/
|
|
20
|
+
export declare function readEffectiveKaneConfig(projectRoot: string): Promise<KaneBrowserConfig | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* Assert that a request satisfies Lisa's hard Kane safety gate.
|
|
23
|
+
* @param config - Effective provider config
|
|
24
|
+
* @param request - Environment and mutation policy
|
|
25
|
+
*/
|
|
26
|
+
export declare function assertKaneRunAllowed(config: KaneBrowserConfig | undefined, request: Pick<KaneRunRequest, "environment" | "mutation">): asserts config is AllowedKaneConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Run one policy-approved Kane browser objective.
|
|
29
|
+
* @param request - Objective and resolved Lisa policy context
|
|
30
|
+
* @param runner - Injectable fixed-argv process runner
|
|
31
|
+
* @returns Normalized provider result
|
|
32
|
+
*/
|
|
33
|
+
export declare function runKane(request: KaneRunRequest, runner?: KaneCommandRunner): Promise<KaneRunResult>;
|
|
34
|
+
/**
|
|
35
|
+
* Run install, version, auth, target, and balance readiness probes.
|
|
36
|
+
* @param projectRoot - Downstream project root
|
|
37
|
+
* @param runner - Injectable process runner
|
|
38
|
+
* @param chromeAvailable - Injectable host-browser probe
|
|
39
|
+
* @returns Readiness status for doctor and setup
|
|
40
|
+
*/
|
|
41
|
+
export declare function probeKaneReadiness(projectRoot: string, runner?: KaneCommandRunner, chromeAvailable?: ChromeAvailabilityProbe): Promise<KaneReadiness>;
|
|
42
|
+
//# sourceMappingURL=kane-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli.d.ts","sourceRoot":"","sources":["../../src/core/kane-cli.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,KAAK,EACV,uBAAuB,EAEvB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC1E,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,iEAAiE;AACjE,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C,wDAAwD;AACxD,KAAK,iBAAiB,GAAG,iBAAiB,GAAG;IAC3C,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,sBAAsB,CAAC;IAChD,QAAQ,C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