@tarcisiopgs/lisa 1.21.2 → 1.21.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +54 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -642,8 +642,7 @@ var AiderProvider = class {
|
|
|
642
642
|
kanbanEmitter.emit(
|
|
643
643
|
"issue:output",
|
|
644
644
|
opts.issueId,
|
|
645
|
-
`$
|
|
646
|
-
`.trim()}
|
|
645
|
+
`$ aider --message-file --yes-always ${modelFlag || "(default model)"} <prompt: ${prompt.length} chars>
|
|
647
646
|
`
|
|
648
647
|
);
|
|
649
648
|
}
|
|
@@ -746,8 +745,12 @@ var ClaudeProvider = class {
|
|
|
746
745
|
const command = `claude ${flags.join(" ")} "$(cat '${promptFile}')"`;
|
|
747
746
|
log(`[claude] Running: claude ${flags.join(" ")}`.trim());
|
|
748
747
|
if (opts.issueId) {
|
|
749
|
-
kanbanEmitter.emit(
|
|
750
|
-
|
|
748
|
+
kanbanEmitter.emit(
|
|
749
|
+
"issue:output",
|
|
750
|
+
opts.issueId,
|
|
751
|
+
`$ claude ${flags.join(" ")} <prompt: ${prompt.length} chars>
|
|
752
|
+
`
|
|
753
|
+
);
|
|
751
754
|
}
|
|
752
755
|
const spawnEnv = { ...process.env, ...opts.env, CLAUDECODE: void 0 };
|
|
753
756
|
const isNestedInClaude = Boolean(process.env.CLAUDECODE);
|
|
@@ -858,8 +861,8 @@ var CodexProvider = class {
|
|
|
858
861
|
kanbanEmitter.emit(
|
|
859
862
|
"issue:output",
|
|
860
863
|
opts.issueId,
|
|
861
|
-
`$ codex exec --dangerously-bypass-approvals-and-sandbox --ephemeral ${modelFlag || "(default model)"}
|
|
862
|
-
|
|
864
|
+
`$ codex exec --dangerously-bypass-approvals-and-sandbox --ephemeral ${modelFlag || "(default model)"} <prompt: ${prompt.length} chars>
|
|
865
|
+
`
|
|
863
866
|
);
|
|
864
867
|
}
|
|
865
868
|
const { proc, isPty } = spawnWithPty(command, {
|
|
@@ -961,8 +964,7 @@ var CopilotProvider = class {
|
|
|
961
964
|
kanbanEmitter.emit(
|
|
962
965
|
"issue:output",
|
|
963
966
|
opts.issueId,
|
|
964
|
-
`$
|
|
965
|
-
`.trim()}
|
|
967
|
+
`$ copilot --allow-all ${modelFlag || "(default model)"} -p <prompt: ${prompt.length} chars>
|
|
966
968
|
`
|
|
967
969
|
);
|
|
968
970
|
}
|
|
@@ -1083,8 +1085,8 @@ var CursorProvider = class {
|
|
|
1083
1085
|
kanbanEmitter.emit(
|
|
1084
1086
|
"issue:output",
|
|
1085
1087
|
opts.issueId,
|
|
1086
|
-
`$ ${bin} -p --output-format text --force ${modelFlag || "(default model)"}
|
|
1087
|
-
|
|
1088
|
+
`$ ${bin} -p --output-format text --force ${modelFlag || "(default model)"} <prompt: ${prompt.length} chars>
|
|
1089
|
+
`
|
|
1088
1090
|
);
|
|
1089
1091
|
}
|
|
1090
1092
|
const { proc, isPty } = spawnWithPty(command, {
|
|
@@ -1185,8 +1187,7 @@ var GeminiProvider = class {
|
|
|
1185
1187
|
kanbanEmitter.emit(
|
|
1186
1188
|
"issue:output",
|
|
1187
1189
|
opts.issueId,
|
|
1188
|
-
`$
|
|
1189
|
-
`.trim()}
|
|
1190
|
+
`$ gemini --yolo ${modelFlag || "(default model)"} -p <prompt: ${prompt.length} chars>
|
|
1190
1191
|
`
|
|
1191
1192
|
);
|
|
1192
1193
|
}
|
|
@@ -1290,8 +1291,7 @@ var GooseProvider = class {
|
|
|
1290
1291
|
kanbanEmitter.emit(
|
|
1291
1292
|
"issue:output",
|
|
1292
1293
|
opts.issueId,
|
|
1293
|
-
`$
|
|
1294
|
-
`.trim()}
|
|
1294
|
+
`$ goose run ${providerFlag} ${modelFlag || "(default model)"} --text <prompt: ${prompt.length} chars>
|
|
1295
1295
|
`
|
|
1296
1296
|
);
|
|
1297
1297
|
}
|
|
@@ -1392,8 +1392,7 @@ var OpenCodeProvider = class {
|
|
|
1392
1392
|
kanbanEmitter.emit(
|
|
1393
1393
|
"issue:output",
|
|
1394
1394
|
opts.issueId,
|
|
1395
|
-
`$
|
|
1396
|
-
`.trim()}
|
|
1395
|
+
`$ opencode run ${modelFlag || "(default model)"} <prompt: ${prompt.length} chars>
|
|
1397
1396
|
`
|
|
1398
1397
|
);
|
|
1399
1398
|
}
|
|
@@ -4995,7 +4994,10 @@ Do NOT use interactive skills, ask clarifying questions, or wait for user input.
|
|
|
4995
4994
|
|
|
4996
4995
|
You are already inside the correct repository worktree on the correct branch.
|
|
4997
4996
|
Do NOT create a new branch \u2014 just work on the current one.
|
|
4998
|
-
|
|
4997
|
+
${cwd ? `
|
|
4998
|
+
**Working directory:** \`${cwd}\`
|
|
4999
|
+
All file paths are relative to this directory. Use this as the base for any absolute paths.
|
|
5000
|
+
` : ""}
|
|
4999
5001
|
## Issue
|
|
5000
5002
|
|
|
5001
5003
|
- **ID:** ${issue2.id}
|
|
@@ -5146,7 +5148,10 @@ Do NOT use interactive skills, ask clarifying questions, or wait for user input.
|
|
|
5146
5148
|
|
|
5147
5149
|
You are working inside a git worktree that was automatically created for this task.
|
|
5148
5150
|
Work on the current branch \u2014 it was created for you.
|
|
5149
|
-
|
|
5151
|
+
${repoPath ? `
|
|
5152
|
+
**Working directory:** \`${repoPath}\`
|
|
5153
|
+
All file paths are relative to this directory. Use this as the base for any absolute paths.
|
|
5154
|
+
` : ""}
|
|
5150
5155
|
## Issue
|
|
5151
5156
|
|
|
5152
5157
|
- **ID:** ${issue2.id}
|
|
@@ -5285,7 +5290,10 @@ Use this context if the current step depends on changes from previous steps.
|
|
|
5285
5290
|
|
|
5286
5291
|
You are working inside a git worktree that was automatically created for this task.
|
|
5287
5292
|
Work on the current branch \u2014 it was created for you.
|
|
5288
|
-
|
|
5293
|
+
${cwd ? `
|
|
5294
|
+
**Working directory:** \`${cwd}\`
|
|
5295
|
+
All file paths are relative to this directory. Use this as the base for any absolute paths.
|
|
5296
|
+
` : ""}
|
|
5289
5297
|
## Issue
|
|
5290
5298
|
|
|
5291
5299
|
- **ID:** ${issue2.id}
|
|
@@ -5661,7 +5669,8 @@ function registerCleanup() {
|
|
|
5661
5669
|
}
|
|
5662
5670
|
|
|
5663
5671
|
// src/loop/manifest.ts
|
|
5664
|
-
import { existsSync as existsSync8, readFileSync as readFileSync8, unlinkSync } from "fs";
|
|
5672
|
+
import { existsSync as existsSync8, readdirSync as readdirSync2, readFileSync as readFileSync8, rmdirSync, unlinkSync } from "fs";
|
|
5673
|
+
import { dirname as dirname2 } from "path";
|
|
5665
5674
|
function readLisaManifest(cwd, issueId) {
|
|
5666
5675
|
const manifestPath = getManifestPath(cwd, issueId);
|
|
5667
5676
|
if (!existsSync8(manifestPath)) return null;
|
|
@@ -5706,17 +5715,27 @@ function readPlanFile(filePath) {
|
|
|
5706
5715
|
return null;
|
|
5707
5716
|
}
|
|
5708
5717
|
}
|
|
5718
|
+
function cleanupPlanFile(filePath) {
|
|
5719
|
+
try {
|
|
5720
|
+
unlinkSync(filePath);
|
|
5721
|
+
} catch {
|
|
5722
|
+
}
|
|
5723
|
+
try {
|
|
5724
|
+
const dir = dirname2(filePath);
|
|
5725
|
+
if (existsSync8(dir) && readdirSync2(dir).length === 0) {
|
|
5726
|
+
rmdirSync(dir);
|
|
5727
|
+
}
|
|
5728
|
+
} catch {
|
|
5729
|
+
}
|
|
5730
|
+
}
|
|
5709
5731
|
|
|
5710
5732
|
// src/loop/multi-repo-session.ts
|
|
5711
|
-
import { appendFileSync as appendFileSync10
|
|
5733
|
+
import { appendFileSync as appendFileSync10 } from "fs";
|
|
5712
5734
|
import { resolve as resolve9 } from "path";
|
|
5713
5735
|
async function runWorktreeMultiRepoSession(config2, issue2, logFile, session, models) {
|
|
5714
5736
|
const workspace = resolve9(config2.workspace);
|
|
5715
5737
|
const planPath = getPlanPath(workspace, issue2.id);
|
|
5716
|
-
|
|
5717
|
-
unlinkSync2(planPath);
|
|
5718
|
-
} catch {
|
|
5719
|
-
}
|
|
5738
|
+
cleanupPlanFile(planPath);
|
|
5720
5739
|
initLogFile(logFile);
|
|
5721
5740
|
kanbanEmitter.emit("issue:log-file", issue2.id, logFile);
|
|
5722
5741
|
startSpinner(`${issue2.id} \u2014 analyzing issue...`);
|
|
@@ -5750,10 +5769,7 @@ ${planResult.output}
|
|
|
5750
5769
|
}
|
|
5751
5770
|
if (!planResult.success) {
|
|
5752
5771
|
error(`Planning phase failed for ${issue2.id}. Check ${logFile}`);
|
|
5753
|
-
|
|
5754
|
-
unlinkSync2(planPath);
|
|
5755
|
-
} catch {
|
|
5756
|
-
}
|
|
5772
|
+
cleanupPlanFile(planPath);
|
|
5757
5773
|
activeProviderPids.delete(issue2.id);
|
|
5758
5774
|
return {
|
|
5759
5775
|
success: false,
|
|
@@ -5765,10 +5781,7 @@ ${planResult.output}
|
|
|
5765
5781
|
const plan = readPlanFile(planPath);
|
|
5766
5782
|
if (!plan?.steps || plan.steps.length === 0) {
|
|
5767
5783
|
error(`Agent did not produce a valid execution plan for ${issue2.id}. Aborting.`);
|
|
5768
|
-
|
|
5769
|
-
unlinkSync2(planPath);
|
|
5770
|
-
} catch {
|
|
5771
|
-
}
|
|
5784
|
+
cleanupPlanFile(planPath);
|
|
5772
5785
|
activeProviderPids.delete(issue2.id);
|
|
5773
5786
|
return {
|
|
5774
5787
|
success: false,
|
|
@@ -5781,10 +5794,7 @@ ${planResult.output}
|
|
|
5781
5794
|
ok(
|
|
5782
5795
|
`Plan produced ${sortedSteps.length} step(s): ${sortedSteps.map((s) => s.repoPath).join(" \u2192 ")}`
|
|
5783
5796
|
);
|
|
5784
|
-
|
|
5785
|
-
unlinkSync2(planPath);
|
|
5786
|
-
} catch {
|
|
5787
|
-
}
|
|
5797
|
+
cleanupPlanFile(planPath);
|
|
5788
5798
|
const prUrls = [];
|
|
5789
5799
|
const previousResults = [];
|
|
5790
5800
|
let lastFallback = planResult;
|
|
@@ -6531,13 +6541,13 @@ async function getChangedFiles(repoPath, baseBranch, dependencyBranch) {
|
|
|
6531
6541
|
}
|
|
6532
6542
|
|
|
6533
6543
|
// src/loop/branch-session.ts
|
|
6534
|
-
import { appendFileSync as appendFileSync12, unlinkSync as
|
|
6544
|
+
import { appendFileSync as appendFileSync12, unlinkSync as unlinkSync2 } from "fs";
|
|
6535
6545
|
import { resolve as resolve12 } from "path";
|
|
6536
6546
|
async function runBranchSession(config2, issue2, logFile, session, models) {
|
|
6537
6547
|
const workspace = resolve12(config2.workspace);
|
|
6538
6548
|
const manifestPath = getManifestPath(workspace, issue2.id);
|
|
6539
6549
|
try {
|
|
6540
|
-
|
|
6550
|
+
unlinkSync2(manifestPath);
|
|
6541
6551
|
} catch {
|
|
6542
6552
|
}
|
|
6543
6553
|
const testRunner = detectTestRunner(workspace);
|
|
@@ -6637,7 +6647,7 @@ ${result.output}
|
|
|
6637
6647
|
}
|
|
6638
6648
|
const manifest = readManifestFile(manifestPath);
|
|
6639
6649
|
try {
|
|
6640
|
-
|
|
6650
|
+
unlinkSync2(manifestPath);
|
|
6641
6651
|
} catch {
|
|
6642
6652
|
}
|
|
6643
6653
|
let prUrl = manifest?.prUrl;
|
|
@@ -7071,7 +7081,7 @@ async function runLoop(config2, opts) {
|
|
|
7071
7081
|
|
|
7072
7082
|
// src/session/kanban-persistence.ts
|
|
7073
7083
|
import { existsSync as existsSync9, mkdirSync as mkdirSync4, readFileSync as readFileSync9, renameSync, writeFileSync as writeFileSync12 } from "fs";
|
|
7074
|
-
import { dirname as
|
|
7084
|
+
import { dirname as dirname3 } from "path";
|
|
7075
7085
|
var STATE_VERSION = 1;
|
|
7076
7086
|
var OUTPUT_TAIL_LINES = 100;
|
|
7077
7087
|
function resolveCard(card) {
|
|
@@ -7224,7 +7234,7 @@ var KanbanPersistence = class {
|
|
|
7224
7234
|
}
|
|
7225
7235
|
flush() {
|
|
7226
7236
|
this.state.updatedAt = Date.now();
|
|
7227
|
-
const dir =
|
|
7237
|
+
const dir = dirname3(this.statePath);
|
|
7228
7238
|
if (!existsSync9(dir)) mkdirSync4(dir, { recursive: true });
|
|
7229
7239
|
writeFileSync12(this.statePath, JSON.stringify(this.state));
|
|
7230
7240
|
}
|
|
@@ -7415,7 +7425,7 @@ Add them to your ${shell} and run: source ${shell}`));
|
|
|
7415
7425
|
});
|
|
7416
7426
|
|
|
7417
7427
|
// src/cli/commands/status.ts
|
|
7418
|
-
import { existsSync as existsSync10, readdirSync as
|
|
7428
|
+
import { existsSync as existsSync10, readdirSync as readdirSync3 } from "fs";
|
|
7419
7429
|
import { defineCommand as defineCommand7 } from "citty";
|
|
7420
7430
|
import pc6 from "picocolors";
|
|
7421
7431
|
var status = defineCommand7({
|
|
@@ -7439,7 +7449,7 @@ var status = defineCommand7({
|
|
|
7439
7449
|
const logsDir = getLogsDir(process.cwd());
|
|
7440
7450
|
console.log(` Logs: ${pc6.dim(logsDir)}`);
|
|
7441
7451
|
if (existsSync10(logsDir)) {
|
|
7442
|
-
const logs =
|
|
7452
|
+
const logs = readdirSync3(logsDir).filter((f) => f.endsWith(".log"));
|
|
7443
7453
|
console.log(`
|
|
7444
7454
|
${pc6.cyan("Sessions:")} ${logs.length} log file(s) found`);
|
|
7445
7455
|
} else {
|