@tarcisiopgs/lisa 1.21.0 → 1.21.2
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/{chunk-XE35VI6S.js → chunk-3QCZWKDJ.js} +10 -1
- package/dist/{chunk-EK5XS7CB.js → chunk-7OCDGYDM.js} +4 -10
- package/dist/{chunk-N35HZN5O.js → chunk-ZAYL7SJN.js} +1 -1
- package/dist/{guardrails-OAO4CAIT.js → guardrails-EMOWZNS7.js} +2 -2
- package/dist/index.js +18 -18
- package/dist/{kanban-VOOYRIWF.js → kanban-GK6MHA5G.js} +27 -5
- package/dist/{paths-ZRUQ4GIN.js → paths-JE4IML2C.js} +1 -1
- package/package.json +1 -1
|
@@ -772,9 +772,18 @@ function useKanbanState(bellEnabled, initialCards = []) {
|
|
|
772
772
|
const onLogFile = (issueId, logFile) => {
|
|
773
773
|
setCards((prev) => prev.map((c) => c.id === issueId ? { ...c, logFile } : c));
|
|
774
774
|
};
|
|
775
|
+
const MAX_OUTPUT_SIZE = 2e5;
|
|
775
776
|
const onOutput = (issueId, text) => {
|
|
776
777
|
setCards(
|
|
777
|
-
(prev) => prev.map((c) =>
|
|
778
|
+
(prev) => prev.map((c) => {
|
|
779
|
+
if (c.id !== issueId) return c;
|
|
780
|
+
let newLog = c.outputLog + text;
|
|
781
|
+
if (newLog.length > MAX_OUTPUT_SIZE) {
|
|
782
|
+
const trimAt = newLog.indexOf("\n", newLog.length - MAX_OUTPUT_SIZE);
|
|
783
|
+
newLog = trimAt !== -1 ? newLog.slice(trimAt + 1) : newLog.slice(-MAX_OUTPUT_SIZE);
|
|
784
|
+
}
|
|
785
|
+
return { ...c, outputLog: newLog };
|
|
786
|
+
})
|
|
778
787
|
);
|
|
779
788
|
};
|
|
780
789
|
const onReconcileRemove = (issueId) => {
|
|
@@ -28,21 +28,15 @@ function getGuardrailsPath(cwd) {
|
|
|
28
28
|
return join(getCacheDir(cwd), "guardrails.md");
|
|
29
29
|
}
|
|
30
30
|
function getManifestPath(cwd, issueId) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return join(getCacheDir(cwd), `manifest-${safe}.json`);
|
|
34
|
-
}
|
|
35
|
-
return join(getCacheDir(cwd), "manifest.json");
|
|
31
|
+
const safe = issueId ? issueId.replace(/[^a-zA-Z0-9_-]/g, "_") : "default";
|
|
32
|
+
return join(cwd, ".lisa", "manifests", `${safe}.json`);
|
|
36
33
|
}
|
|
37
34
|
function getPrCachePath(cwd) {
|
|
38
35
|
return join(getCacheDir(cwd), "pr-cache.json");
|
|
39
36
|
}
|
|
40
37
|
function getPlanPath(cwd, issueId) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return join(getCacheDir(cwd), `plan-${safe}.json`);
|
|
44
|
-
}
|
|
45
|
-
return join(getCacheDir(cwd), "plan.json");
|
|
38
|
+
const safe = issueId ? issueId.replace(/[^a-zA-Z0-9_-]/g, "_") : "default";
|
|
39
|
+
return join(cwd, ".lisa", "plans", `${safe}.json`);
|
|
46
40
|
}
|
|
47
41
|
function getKanbanStatePath(cwd) {
|
|
48
42
|
return join(getCacheDir(cwd), "kanban-state.json");
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractContext,
|
|
7
7
|
extractErrorType,
|
|
8
8
|
migrateGuardrails
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZAYL7SJN.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureCacheDir,
|
|
12
12
|
getKanbanStatePath,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
getPlanPath,
|
|
16
16
|
getPrCachePath,
|
|
17
17
|
rotateLogFiles
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-7OCDGYDM.js";
|
|
19
19
|
import {
|
|
20
20
|
appendPrAttribution,
|
|
21
21
|
detectDefaultBranch,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
setOutputMode,
|
|
48
48
|
updateNotice,
|
|
49
49
|
warn
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-3QCZWKDJ.js";
|
|
51
51
|
import {
|
|
52
52
|
notify,
|
|
53
53
|
resetTitle,
|
|
@@ -2456,8 +2456,8 @@ var feedback = defineCommand3({
|
|
|
2456
2456
|
},
|
|
2457
2457
|
async run({ args }) {
|
|
2458
2458
|
const { fetchPrFeedback: fetchPrFeedback2, formatPrFeedbackEntry: formatPrFeedbackEntry2 } = await import("./pr-feedback-DGHNP3E7.js");
|
|
2459
|
-
const { appendRawEntrySync } = await import("./guardrails-
|
|
2460
|
-
const { ensureCacheDir: ensureCacheDir2 } = await import("./paths-
|
|
2459
|
+
const { appendRawEntrySync } = await import("./guardrails-EMOWZNS7.js");
|
|
2460
|
+
const { ensureCacheDir: ensureCacheDir2 } = await import("./paths-JE4IML2C.js");
|
|
2461
2461
|
const prUrl = args.pr;
|
|
2462
2462
|
const issueId = args.issue ?? "unknown";
|
|
2463
2463
|
const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
@@ -3863,7 +3863,7 @@ import { defineCommand as defineCommand6 } from "citty";
|
|
|
3863
3863
|
import pc5 from "picocolors";
|
|
3864
3864
|
|
|
3865
3865
|
// src/loop/index.ts
|
|
3866
|
-
import { join as
|
|
3866
|
+
import { join as join17, resolve as resolve14 } from "path";
|
|
3867
3867
|
|
|
3868
3868
|
// src/loop/concurrent.ts
|
|
3869
3869
|
import { resolve as resolve11 } from "path";
|
|
@@ -4281,7 +4281,7 @@ function logAttemptHistory(result) {
|
|
|
4281
4281
|
|
|
4282
4282
|
// src/loop/worktree-session.ts
|
|
4283
4283
|
import { appendFileSync as appendFileSync11 } from "fs";
|
|
4284
|
-
import {
|
|
4284
|
+
import { resolve as resolve10 } from "path";
|
|
4285
4285
|
import { execa as execa5 } from "execa";
|
|
4286
4286
|
|
|
4287
4287
|
// src/context.ts
|
|
@@ -4988,7 +4988,7 @@ function buildWorktreePrompt(issue2, testRunner, pm, baseBranch, projectContext,
|
|
|
4988
4988
|
const specWarningBlock = buildSpecWarningBlock(issue2.specWarning);
|
|
4989
4989
|
const contextMdBlock = buildContextMdBlock(repoContextMd ?? null);
|
|
4990
4990
|
const prBase = issue2.dependency ? issue2.dependency.branch : baseBranch;
|
|
4991
|
-
const manifestLocation = manifestPath ? `\`${manifestPath}\`` : "`.lisa
|
|
4991
|
+
const manifestLocation = manifestPath ? `\`${manifestPath}\`` : "`.lisa/manifests/default.json` in the **current directory**";
|
|
4992
4992
|
const prCreateBlock = buildPrCreateInstruction(platform2, prBase);
|
|
4993
4993
|
return `You are an autonomous implementation agent. Your job is to implement an issue end-to-end: code, push, PR, and tracker update.
|
|
4994
4994
|
Do NOT use interactive skills, ask clarifying questions, or wait for user input. You are running unattended. If the issue is too ambiguous to implement, you MUST STOP and provide a clear explanation.
|
|
@@ -5139,7 +5139,7 @@ function buildNativeWorktreePrompt(issue2, repoPath, testRunner, pm, baseBranch,
|
|
|
5139
5139
|
const specWarningBlock = buildSpecWarningBlock(issue2.specWarning);
|
|
5140
5140
|
const contextMdBlock = buildContextMdBlock(repoContextMd ?? null);
|
|
5141
5141
|
const prBase = issue2.dependency ? issue2.dependency.branch : baseBranch;
|
|
5142
|
-
const manifestLocation = manifestPath ? `\`${manifestPath}\`` : "`.lisa
|
|
5142
|
+
const manifestLocation = manifestPath ? `\`${manifestPath}\`` : "`.lisa/manifests/default.json` in the **current directory**";
|
|
5143
5143
|
const prCreateBlock = buildPrCreateInstruction(platform2, prBase);
|
|
5144
5144
|
return `You are an autonomous implementation agent. Your job is to implement an issue end-to-end: code, push, PR, and tracker update.
|
|
5145
5145
|
Do NOT use interactive skills, ask clarifying questions, or wait for user input. You are running unattended. If the issue is too ambiguous to implement, you MUST STOP and provide a clear explanation.
|
|
@@ -5333,7 +5333,7 @@ ${readmeBlock}
|
|
|
5333
5333
|
|
|
5334
5334
|
5. ${buildPrCreateInstruction(platform2, prBase)}
|
|
5335
5335
|
${trackerStep}
|
|
5336
|
-
7. **Write manifest**: Create ${manifestPath ? `\`${manifestPath}\`` : "`.lisa
|
|
5336
|
+
7. **Write manifest**: Create ${manifestPath ? `\`${manifestPath}\`` : "`.lisa/manifests/default.json` in the **current directory**"} with JSON:
|
|
5337
5337
|
\`\`\`json
|
|
5338
5338
|
{"branch": "<final English branch name>", "prUrl": "<pull request URL>"}
|
|
5339
5339
|
\`\`\`
|
|
@@ -5709,7 +5709,7 @@ function readPlanFile(filePath) {
|
|
|
5709
5709
|
|
|
5710
5710
|
// src/loop/multi-repo-session.ts
|
|
5711
5711
|
import { appendFileSync as appendFileSync10, unlinkSync as unlinkSync2 } from "fs";
|
|
5712
|
-
import {
|
|
5712
|
+
import { resolve as resolve9 } from "path";
|
|
5713
5713
|
async function runWorktreeMultiRepoSession(config2, issue2, logFile, session, models) {
|
|
5714
5714
|
const workspace = resolve9(config2.workspace);
|
|
5715
5715
|
const planPath = getPlanPath(workspace, issue2.id);
|
|
@@ -5874,7 +5874,7 @@ async function runMultiRepoStep(config2, issue2, step, previousResults, logFile,
|
|
|
5874
5874
|
const lifecycleMode = config2.lifecycle?.mode ?? "skip";
|
|
5875
5875
|
resolveInfraStatus(lifecycleMode, { success: lifecycleSuccess });
|
|
5876
5876
|
const workspace = resolve9(config2.workspace);
|
|
5877
|
-
const manifestPath =
|
|
5877
|
+
const manifestPath = getManifestPath(worktreePath, issue2.id);
|
|
5878
5878
|
const prompt = buildScopedImplementPrompt(
|
|
5879
5879
|
issue2,
|
|
5880
5880
|
step,
|
|
@@ -6174,7 +6174,7 @@ async function runManualWorktreeSession(config2, issue2, logFile, session, model
|
|
|
6174
6174
|
lifecycleEnv = started.env;
|
|
6175
6175
|
}
|
|
6176
6176
|
const workspace = resolve10(config2.workspace);
|
|
6177
|
-
const manifestPath =
|
|
6177
|
+
const manifestPath = getManifestPath(worktreePath, issue2.id);
|
|
6178
6178
|
const prompt = buildImplementPrompt(
|
|
6179
6179
|
issue2,
|
|
6180
6180
|
config2,
|
|
@@ -6532,10 +6532,10 @@ async function getChangedFiles(repoPath, baseBranch, dependencyBranch) {
|
|
|
6532
6532
|
|
|
6533
6533
|
// src/loop/branch-session.ts
|
|
6534
6534
|
import { appendFileSync as appendFileSync12, unlinkSync as unlinkSync3 } from "fs";
|
|
6535
|
-
import {
|
|
6535
|
+
import { resolve as resolve12 } from "path";
|
|
6536
6536
|
async function runBranchSession(config2, issue2, logFile, session, models) {
|
|
6537
6537
|
const workspace = resolve12(config2.workspace);
|
|
6538
|
-
const manifestPath =
|
|
6538
|
+
const manifestPath = getManifestPath(workspace, issue2.id);
|
|
6539
6539
|
try {
|
|
6540
6540
|
unlinkSync3(manifestPath);
|
|
6541
6541
|
} catch {
|
|
@@ -7029,7 +7029,7 @@ async function runLoop(config2, opts) {
|
|
|
7029
7029
|
migrateGuardrails(workspace);
|
|
7030
7030
|
rotateLogFiles(workspace);
|
|
7031
7031
|
if (!opts.dryRun) {
|
|
7032
|
-
const contextLogFile =
|
|
7032
|
+
const contextLogFile = join17(workspace, ".lisa", "context-generation.log");
|
|
7033
7033
|
ensureWorkspaceContext(config2, models, workspace, contextLogFile).catch((err) => {
|
|
7034
7034
|
warn(
|
|
7035
7035
|
`Background context generation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
@@ -7315,7 +7315,7 @@ var run = defineCommand6({
|
|
|
7315
7315
|
if (isTTY) {
|
|
7316
7316
|
const { render } = await import("ink");
|
|
7317
7317
|
const { createElement } = await import("react");
|
|
7318
|
-
const { KanbanApp } = await import("./kanban-
|
|
7318
|
+
const { KanbanApp } = await import("./kanban-GK6MHA5G.js");
|
|
7319
7319
|
const demoConfig = {
|
|
7320
7320
|
provider: "claude",
|
|
7321
7321
|
source: "linear",
|
|
@@ -7398,7 +7398,7 @@ Add them to your ${shell} and run: source ${shell}`));
|
|
|
7398
7398
|
onBeforeExit = () => persistence.stop();
|
|
7399
7399
|
const { render } = await import("ink");
|
|
7400
7400
|
const { createElement } = await import("react");
|
|
7401
|
-
const { KanbanApp } = await import("./kanban-
|
|
7401
|
+
const { KanbanApp } = await import("./kanban-GK6MHA5G.js");
|
|
7402
7402
|
render(createElement(KanbanApp, { config: merged, initialCards }), { exitOnCtrlC: false });
|
|
7403
7403
|
}
|
|
7404
7404
|
await runLoop(merged, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
kanbanEmitter,
|
|
4
4
|
useKanbanState
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3QCZWKDJ.js";
|
|
6
6
|
import {
|
|
7
7
|
resetTitle,
|
|
8
8
|
startSpinner,
|
|
@@ -418,6 +418,24 @@ function formatElapsed2(ms) {
|
|
|
418
418
|
function hyperlink(url, text) {
|
|
419
419
|
return `\x1B]8;;${url}\x07${text}\x1B]8;;\x07`;
|
|
420
420
|
}
|
|
421
|
+
var ANSI_CSI = /\x1b\[[0-9;]*[A-Za-z]/g;
|
|
422
|
+
var ANSI_OSC = /\x1b\][^\x07]*\x07/g;
|
|
423
|
+
var ANSI_CHARSET = /\x1b\([A-Z]/g;
|
|
424
|
+
function stripAnsi(str) {
|
|
425
|
+
return str.replace(ANSI_CSI, "").replace(ANSI_OSC, "").replace(ANSI_CHARSET, "").replace(/\r/g, "");
|
|
426
|
+
}
|
|
427
|
+
function truncateLine(line, maxWidth) {
|
|
428
|
+
const clean = stripAnsi(line);
|
|
429
|
+
if (clean.length <= maxWidth) return clean;
|
|
430
|
+
return `${clean.slice(0, maxWidth - 1)}\u2026`;
|
|
431
|
+
}
|
|
432
|
+
function processOutputLines(raw) {
|
|
433
|
+
const normalized = raw.replace(/\r\n/g, "\n");
|
|
434
|
+
return normalized.split("\n").map((line) => {
|
|
435
|
+
const parts = line.split("\r");
|
|
436
|
+
return parts[parts.length - 1] ?? "";
|
|
437
|
+
});
|
|
438
|
+
}
|
|
421
439
|
function logLineColor(line) {
|
|
422
440
|
if (/\berror\b|✖/i.test(line)) return "red";
|
|
423
441
|
if (/\bwarn(ing)?\b/i.test(line)) return "yellow";
|
|
@@ -478,10 +496,15 @@ function IssueDetail({ card, onBack }) {
|
|
|
478
496
|
}
|
|
479
497
|
});
|
|
480
498
|
const { columns: terminalCols, rows: terminalRows } = useTerminalSize();
|
|
499
|
+
const SIDEBAR_TOTAL_WIDTH = 30;
|
|
481
500
|
const bodyRows = Math.max(1, terminalRows - 10);
|
|
482
|
-
const
|
|
501
|
+
const maxLineWidth = Math.max(1, terminalCols - SIDEBAR_TOTAL_WIDTH - 4);
|
|
502
|
+
const lines = useMemo(() => processOutputLines(card.outputLog), [card.outputLog]);
|
|
483
503
|
const startLine = Math.max(0, lines.length - bodyRows - logScrollOffset);
|
|
484
|
-
const visibleLines =
|
|
504
|
+
const visibleLines = useMemo(
|
|
505
|
+
() => lines.slice(startLine, startLine + bodyRows).map((l) => truncateLine(l, maxLineWidth)),
|
|
506
|
+
[lines, startLine, bodyRows, maxLineWidth]
|
|
507
|
+
);
|
|
485
508
|
const status = statusLabel(card.column, card.hasError, card.killed, card.skipped, card.merged);
|
|
486
509
|
let elapsedDisplay = null;
|
|
487
510
|
let isRunning = false;
|
|
@@ -492,7 +515,6 @@ function IssueDetail({ card, onBack }) {
|
|
|
492
515
|
} else if (card.column === "done" && card.startedAt !== void 0 && card.finishedAt !== void 0) {
|
|
493
516
|
elapsedDisplay = formatElapsed2(card.finishedAt - card.startedAt);
|
|
494
517
|
}
|
|
495
|
-
const SIDEBAR_TOTAL_WIDTH = 30;
|
|
496
518
|
const separator = useMemo(() => {
|
|
497
519
|
const separatorInner = Math.max(0, terminalCols - SIDEBAR_TOTAL_WIDTH - 4);
|
|
498
520
|
return `\u2560${"\u2550".repeat(Math.max(0, separatorInner - 2))}\u2563`;
|
|
@@ -555,7 +577,7 @@ function IssueDetail({ card, onBack }) {
|
|
|
555
577
|
const color = logLineColor(line);
|
|
556
578
|
return (
|
|
557
579
|
// biome-ignore lint/suspicious/noArrayIndexKey: log lines have no stable key
|
|
558
|
-
/* @__PURE__ */ jsx4(Text4, { color, dimColor: color === "white", children: line }, i)
|
|
580
|
+
/* @__PURE__ */ jsx4(Text4, { color, dimColor: color === "white", wrap: "truncate", children: line }, i)
|
|
559
581
|
);
|
|
560
582
|
}) })
|
|
561
583
|
]
|