@codyswann/lisa 2.247.3 → 2.250.1
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.d.ts +3 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +4 -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,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;AAED;;;;;GAKG;AACH,SAAS,cAAc,CACrB,MAAyC,EACzC,GAAW;IAEX,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACxD,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,IAC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E,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,GAA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,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;QACxC,MAAM,IAAI,KAAK,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;QACxC,MAAM,IAAI,KAAK,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE;QACxB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;IACjE,CAAC,CAAC,CAAC;IACH,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;QAC9B,QAAQ,GAAG,IAAI,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxB,CAAC,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,GAAG,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;AAEnE,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8DAA8D;AAC9D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAA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AAED,kEAAkE;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAC9B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACjC,KACE,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhC,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,wEAAwE;AACxE,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli-types.js","sourceRoot":"","sources":["../../src/core/kane-cli-types.ts"],"names":[],"mappings":"AAAA,mEAAmE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type KaneBrowserConfig } from "./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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B,kBAAkB,CACtC,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,iBAAkC,EAC1C,eAAe,GAAE,uBAA2C,GAC3D,OAAO,CAAC,aAAa,CAAC,CAoDxB"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/** Lisa-owned policy adapter for TestMu Kane CLI. */
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { readFile } from "node:fs/promises";
|
|
4
|
+
import * as path from "node:path";
|
|
5
|
+
import { readProjectConfig, validateProjectConfig, } from "./project-config.js";
|
|
6
|
+
import { parseKaneResult } from "./kane-cli-parser.js";
|
|
7
|
+
import { isChromeAvailable, runKaneCommand } from "./kane-cli-process.js";
|
|
8
|
+
export { parseKaneResult } from "./kane-cli-parser.js";
|
|
9
|
+
export { isChromeAvailable, runKaneCommand } from "./kane-cli-process.js";
|
|
10
|
+
/** Kane CLI version covered by Lisa's adapter contract tests. */
|
|
11
|
+
export const SUPPORTED_KANE_VERSION = "0.6.3";
|
|
12
|
+
/**
|
|
13
|
+
* Merge committed and local Kane config using per-key local precedence.
|
|
14
|
+
* @param projectRoot - Downstream project root
|
|
15
|
+
* @returns Effective optional provider config
|
|
16
|
+
*/
|
|
17
|
+
export async function readEffectiveKaneConfig(projectRoot) {
|
|
18
|
+
const committed = (await readProjectConfig(projectRoot)).verification?.browser
|
|
19
|
+
?.kane;
|
|
20
|
+
const localPath = path.join(projectRoot, ".lisa.config.local.json");
|
|
21
|
+
if (!existsSync(localPath))
|
|
22
|
+
return committed;
|
|
23
|
+
const parsed = JSON.parse(await readFile(localPath, "utf8"));
|
|
24
|
+
const local = validateProjectConfig(parsed, localPath).verification?.browser
|
|
25
|
+
?.kane;
|
|
26
|
+
return local === undefined ? committed : { ...committed, ...local };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Assert that a request satisfies Lisa's hard Kane safety gate.
|
|
30
|
+
* @param config - Effective provider config
|
|
31
|
+
* @param request - Environment and mutation policy
|
|
32
|
+
*/
|
|
33
|
+
export function assertKaneRunAllowed(config, request) {
|
|
34
|
+
if (config?.enabled !== true) {
|
|
35
|
+
throw new Error("Kane CLI is not enabled for this project");
|
|
36
|
+
}
|
|
37
|
+
if (config.cloudUploadApproved !== true) {
|
|
38
|
+
throw new Error("Kane CLI cloud upload has not been approved for this project");
|
|
39
|
+
}
|
|
40
|
+
if (config.version !== SUPPORTED_KANE_VERSION) {
|
|
41
|
+
throw new Error(`Kane CLI version must be ${SUPPORTED_KANE_VERSION}; configured ${config.version ?? "none"}`);
|
|
42
|
+
}
|
|
43
|
+
if (!config.allowedEnvironments?.includes(request.environment) ||
|
|
44
|
+
["prod", "production"].includes(request.environment.toLowerCase())) {
|
|
45
|
+
throw new Error(`Kane CLI is not allowed in environment ${JSON.stringify(request.environment)}`);
|
|
46
|
+
}
|
|
47
|
+
if (request.mutation !== "full") {
|
|
48
|
+
throw new Error("Kane CLI requires Lisa mutation policy 'full' during the initial provider rollout");
|
|
49
|
+
}
|
|
50
|
+
if (config.projectId === undefined) {
|
|
51
|
+
throw new Error("Kane CLI requires a configured Test Manager projectId");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Build the fixed provider argument vector.
|
|
56
|
+
* @param request - Validated run request
|
|
57
|
+
* @param config - Effective provider config
|
|
58
|
+
* @returns Kane argument vector
|
|
59
|
+
*/
|
|
60
|
+
function buildRunArguments(request, config) {
|
|
61
|
+
return [
|
|
62
|
+
"run",
|
|
63
|
+
request.objective,
|
|
64
|
+
"--agent",
|
|
65
|
+
"--headless",
|
|
66
|
+
"--timeout",
|
|
67
|
+
String(config.timeoutSeconds ?? 120),
|
|
68
|
+
"--max-steps",
|
|
69
|
+
String(request.maxSteps ?? 30),
|
|
70
|
+
...(request.url === undefined ? [] : ["--url", request.url]),
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Execute a run after asynchronous config resolution.
|
|
75
|
+
* @param request - Objective and resolved Lisa policy context
|
|
76
|
+
* @param config - Effective provider config
|
|
77
|
+
* @param runner - Fixed-argv process runner
|
|
78
|
+
* @returns Normalized provider result
|
|
79
|
+
*/
|
|
80
|
+
async function executeKaneRun(request, config, runner) {
|
|
81
|
+
const timeoutSeconds = config?.timeoutSeconds ?? 120;
|
|
82
|
+
// eslint-disable-next-line no-restricted-syntax -- child inherits existing auth without logging values
|
|
83
|
+
const env = { ...process.env, KANE_CLI_USER_AGENT: "lisa" };
|
|
84
|
+
assertKaneRunAllowed(config, request);
|
|
85
|
+
if (request.objective.trim().length === 0) {
|
|
86
|
+
throw new Error("Kane CLI objective must not be empty");
|
|
87
|
+
}
|
|
88
|
+
if (request.maxSteps !== undefined &&
|
|
89
|
+
(!Number.isInteger(request.maxSteps) ||
|
|
90
|
+
request.maxSteps < 1 ||
|
|
91
|
+
request.maxSteps > 100)) {
|
|
92
|
+
throw new Error("Kane CLI maxSteps must be an integer from 1 to 100");
|
|
93
|
+
}
|
|
94
|
+
return parseKaneResult(await runner("kane-cli", buildRunArguments(request, config), {
|
|
95
|
+
cwd: request.projectRoot,
|
|
96
|
+
timeoutMs: (timeoutSeconds + 15) * 1000,
|
|
97
|
+
env,
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Run one policy-approved Kane browser objective.
|
|
102
|
+
* @param request - Objective and resolved Lisa policy context
|
|
103
|
+
* @param runner - Injectable fixed-argv process runner
|
|
104
|
+
* @returns Normalized provider result
|
|
105
|
+
*/
|
|
106
|
+
export async function runKane(request, runner = runKaneCommand) {
|
|
107
|
+
const config = await readEffectiveKaneConfig(request.projectRoot);
|
|
108
|
+
return await executeKaneRun(request, config, runner);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Return a failed readiness result for an unknown error.
|
|
112
|
+
* @param error - Unknown caught value
|
|
113
|
+
* @returns Failed readiness result
|
|
114
|
+
*/
|
|
115
|
+
function readinessError(error) {
|
|
116
|
+
return {
|
|
117
|
+
status: "fail",
|
|
118
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Evaluate config-only readiness policy.
|
|
123
|
+
* @param config - Enabled effective provider config
|
|
124
|
+
* @returns Failure result or undefined
|
|
125
|
+
*/
|
|
126
|
+
function policyReadinessFailure(config) {
|
|
127
|
+
try {
|
|
128
|
+
assertKaneRunAllowed(config, {
|
|
129
|
+
environment: config.allowedEnvironments?.[0] ?? "",
|
|
130
|
+
mutation: "full",
|
|
131
|
+
});
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
return readinessError(error);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Verify the configured Test Manager target.
|
|
140
|
+
* @param config - Effective provider config
|
|
141
|
+
* @param output - `config show` output
|
|
142
|
+
* @returns Failure detail or undefined
|
|
143
|
+
*/
|
|
144
|
+
function targetFailure(config, output) {
|
|
145
|
+
return [config.projectId, config.folderId]
|
|
146
|
+
.filter((expected) => expected !== undefined)
|
|
147
|
+
.find(expected => !output.includes(expected));
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Parse a numeric credit balance from supported human-readable output forms.
|
|
151
|
+
* @param output - Kane balance output
|
|
152
|
+
* @returns Numeric credits or undefined when not observable
|
|
153
|
+
*/
|
|
154
|
+
function parseCreditBalance(output) {
|
|
155
|
+
const balanceLine = output
|
|
156
|
+
.split(/\r?\n/u)
|
|
157
|
+
.find(line => line.toLowerCase().includes("balance"));
|
|
158
|
+
const balanceFirst = balanceLine === undefined
|
|
159
|
+
? undefined
|
|
160
|
+
: /-?\d+(?:\.\d+)?/u.exec(balanceLine)?.[0];
|
|
161
|
+
return balanceFirst === undefined ? undefined : Number(balanceFirst);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Interpret the final account-balance readiness probe.
|
|
165
|
+
* @param balance - Captured balance command
|
|
166
|
+
* @param projectId - Expected Test Manager project
|
|
167
|
+
* @returns Final readiness result
|
|
168
|
+
*/
|
|
169
|
+
function balanceReadiness(balance, projectId) {
|
|
170
|
+
const credits = parseCreditBalance(balance.stdout);
|
|
171
|
+
if (balance.exitCode !== 0) {
|
|
172
|
+
return {
|
|
173
|
+
status: "warn",
|
|
174
|
+
detail: "Kane CLI is authenticated and configured, but balance could not be verified",
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
if (credits === undefined) {
|
|
178
|
+
return {
|
|
179
|
+
status: "warn",
|
|
180
|
+
detail: "Kane CLI is authenticated and configured, but its credit balance could not be parsed",
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
if (credits <= 0) {
|
|
184
|
+
return {
|
|
185
|
+
status: "fail",
|
|
186
|
+
detail: "Kane CLI account has no available credits",
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
return {
|
|
190
|
+
status: "ready",
|
|
191
|
+
detail: `Kane CLI ${SUPPORTED_KANE_VERSION} authenticated for project ${projectId}`,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Run install, version, auth, target, and balance readiness probes.
|
|
196
|
+
* @param projectRoot - Downstream project root
|
|
197
|
+
* @param runner - Injectable process runner
|
|
198
|
+
* @param chromeAvailable - Injectable host-browser probe
|
|
199
|
+
* @returns Readiness status for doctor and setup
|
|
200
|
+
*/
|
|
201
|
+
export async function probeKaneReadiness(projectRoot, runner = runKaneCommand, chromeAvailable = isChromeAvailable) {
|
|
202
|
+
const config = await readEffectiveKaneConfig(projectRoot);
|
|
203
|
+
const policyFailure = config?.enabled === true ? policyReadinessFailure(config) : undefined;
|
|
204
|
+
if (config?.enabled !== true) {
|
|
205
|
+
return { status: "disabled", detail: "Kane CLI provider is not enabled" };
|
|
206
|
+
}
|
|
207
|
+
if (policyFailure !== undefined)
|
|
208
|
+
return policyFailure;
|
|
209
|
+
if (!chromeAvailable()) {
|
|
210
|
+
return {
|
|
211
|
+
status: "fail",
|
|
212
|
+
detail: "Kane CLI requires Google Chrome or Chromium; install it or set CHROME_PATH",
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
// eslint-disable-next-line no-restricted-syntax -- read-only probes inherit existing auth/config
|
|
216
|
+
const env = { ...process.env, KANE_CLI_USER_AGENT: "lisa-doctor" };
|
|
217
|
+
const options = { cwd: projectRoot, timeoutMs: 15_000, env };
|
|
218
|
+
const version = await runner("kane-cli", ["--version"], options);
|
|
219
|
+
const observedVersion = /\b\d+\.\d+\.\d+\b/u.exec(version.stdout)?.[0];
|
|
220
|
+
if (version.exitCode !== 0) {
|
|
221
|
+
return {
|
|
222
|
+
status: "fail",
|
|
223
|
+
detail: `Kane CLI unavailable: ${version.stderr.trim() || "version probe failed"}`,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
if (observedVersion !== SUPPORTED_KANE_VERSION) {
|
|
227
|
+
return {
|
|
228
|
+
status: "fail",
|
|
229
|
+
detail: `Kane CLI ${SUPPORTED_KANE_VERSION} required; observed ${version.stdout.trim()}`,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const identity = await runner("kane-cli", ["whoami"], options);
|
|
233
|
+
if (identity.exitCode !== 0) {
|
|
234
|
+
return {
|
|
235
|
+
status: "fail",
|
|
236
|
+
detail: `Kane CLI authentication failed: ${identity.stderr.trim() || identity.stdout.trim()}`,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const shown = await runner("kane-cli", ["config", "show"], options);
|
|
240
|
+
if (shown.exitCode !== 0) {
|
|
241
|
+
return { status: "fail", detail: "Kane CLI config show failed" };
|
|
242
|
+
}
|
|
243
|
+
const missingTarget = targetFailure(config, shown.stdout);
|
|
244
|
+
if (missingTarget !== undefined) {
|
|
245
|
+
return {
|
|
246
|
+
status: "fail",
|
|
247
|
+
detail: `Kane CLI is not configured for expected Test Manager target ${missingTarget}`,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const balance = await runner("kane-cli", ["balance"], options);
|
|
251
|
+
return balanceReadiness(balance, config.projectId);
|
|
252
|
+
}
|
|
253
|
+
//# sourceMappingURL=kane-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kane-cli.js","sourceRoot":"","sources":["../../src/core/kane-cli.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,GAEtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAU1E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAa1E,iEAAiE;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAU9C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,WAAmB;IAEnB,MAAM,SAAS,GAAG,CAAC,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,EAAE,OAAO;QAC5E,EAAE,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,yBAAyB,CAAC,CAAC;IACpE,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAY,CAAC;IACxE,MAAM,KAAK,GAAG,qBAAqB,CAAC,MAAM,E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