@tarcisiopgs/lisa 1.38.0 → 1.38.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-MQG6ANVU.js → chunk-246P5Z5G.js} +1 -1
- package/dist/{chunk-YC736WGU.js → chunk-BKKDHLUA.js} +1 -1
- package/dist/{chunk-AKG5WYVB.js → chunk-XS6ARXRL.js} +45 -18
- package/dist/index.js +5 -5
- package/dist/{loop-DNAY72UG.js → loop-QYUIDHQJ.js} +2 -2
- package/dist/{tui-bridge-L5NWRFEF.js → tui-bridge-HNJ5ADCJ.js} +2 -2
- package/package.json +1 -1
|
@@ -1442,7 +1442,7 @@ var DEFAULT_IDLE_THRESHOLD_MS = 5 * 60 * 1e3;
|
|
|
1442
1442
|
var execFileAsync = promisify(execFile);
|
|
1443
1443
|
var STUCK_MESSAGE = "\n[lisa-overseer] Provider killed: no git changes detected within the stuck threshold. Eligible for fallback.\n";
|
|
1444
1444
|
var STALL_MESSAGE = "\n[lisa-stall] Provider killed: no output received within the stall timeout. Eligible for fallback.\n";
|
|
1445
|
-
var DEFAULT_OUTPUT_STALL_TIMEOUT =
|
|
1445
|
+
var DEFAULT_OUTPUT_STALL_TIMEOUT = 0;
|
|
1446
1446
|
function createOutputStallDetector(proc, timeoutSeconds) {
|
|
1447
1447
|
const timeout = timeoutSeconds ?? DEFAULT_OUTPUT_STALL_TIMEOUT;
|
|
1448
1448
|
if (timeout <= 0) {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
readContext,
|
|
20
20
|
resolveModels,
|
|
21
21
|
runWithFallback
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-246P5Z5G.js";
|
|
23
23
|
import {
|
|
24
24
|
kanbanEmitter
|
|
25
25
|
} from "./chunk-LR2GREZS.js";
|
|
@@ -1563,7 +1563,9 @@ import { resolve as resolve6 } from "path";
|
|
|
1563
1563
|
import { execa as execa5 } from "execa";
|
|
1564
1564
|
|
|
1565
1565
|
// src/enrichment.ts
|
|
1566
|
-
import {
|
|
1566
|
+
import { execFile } from "child_process";
|
|
1567
|
+
import { promisify } from "util";
|
|
1568
|
+
var execFileAsync = promisify(execFile);
|
|
1567
1569
|
var STOP_WORDS = /* @__PURE__ */ new Set([
|
|
1568
1570
|
"the",
|
|
1569
1571
|
"a",
|
|
@@ -1787,24 +1789,43 @@ function extractKeywords(text) {
|
|
|
1787
1789
|
const words = cleaned.split(/[\s/\\.,;:!?'"()[\]{}<>=+\-*&^%$@#~`|]+/).map((w) => w.toLowerCase().trim()).filter((w) => w.length >= 3 && !STOP_WORDS.has(w)).filter((w) => !/^\d+$/.test(w));
|
|
1788
1790
|
return [...new Set(words)];
|
|
1789
1791
|
}
|
|
1790
|
-
function enrichContext(cwd, issue) {
|
|
1792
|
+
async function enrichContext(cwd, issue) {
|
|
1791
1793
|
const keywords = extractKeywords(`${issue.title} ${issue.description}`);
|
|
1792
1794
|
if (keywords.length === 0) return null;
|
|
1793
|
-
const
|
|
1794
|
-
const
|
|
1795
|
+
const excludeDirArgs = EXCLUDE_DIRS.flatMap((d) => ["--exclude-dir", d]);
|
|
1796
|
+
const excludeExtArgs = EXCLUDE_EXTENSIONS.flatMap((e) => ["--exclude", e]);
|
|
1797
|
+
const includeArgs = [
|
|
1798
|
+
"*.ts",
|
|
1799
|
+
"*.tsx",
|
|
1800
|
+
"*.js",
|
|
1801
|
+
"*.jsx",
|
|
1802
|
+
"*.py",
|
|
1803
|
+
"*.rb",
|
|
1804
|
+
"*.go",
|
|
1805
|
+
"*.rs",
|
|
1806
|
+
"*.java",
|
|
1807
|
+
"*.yaml",
|
|
1808
|
+
"*.yml",
|
|
1809
|
+
"*.json"
|
|
1810
|
+
].flatMap((p) => ["--include", p]);
|
|
1795
1811
|
const fileCounts = /* @__PURE__ */ new Map();
|
|
1796
|
-
|
|
1812
|
+
const searches = keywords.slice(0, 15).map(async (keyword) => {
|
|
1797
1813
|
try {
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1814
|
+
const { stdout } = await execFileAsync(
|
|
1815
|
+
"grep",
|
|
1816
|
+
["-rl", ...excludeDirArgs, ...excludeExtArgs, "-i", ...includeArgs, "--", keyword, "."],
|
|
1800
1817
|
{ cwd, encoding: "utf-8", timeout: 5e3, maxBuffer: 1024 * 1024 }
|
|
1801
1818
|
);
|
|
1802
|
-
|
|
1803
|
-
for (const file of files) {
|
|
1804
|
-
const rel = file.startsWith("./") ? file.slice(2) : file;
|
|
1805
|
-
fileCounts.set(rel, (fileCounts.get(rel) ?? 0) + 1);
|
|
1806
|
-
}
|
|
1819
|
+
return stdout.trim().split("\n").filter(Boolean);
|
|
1807
1820
|
} catch {
|
|
1821
|
+
return [];
|
|
1822
|
+
}
|
|
1823
|
+
});
|
|
1824
|
+
const results = await Promise.all(searches);
|
|
1825
|
+
for (const files of results) {
|
|
1826
|
+
for (const file of files) {
|
|
1827
|
+
const rel = file.startsWith("./") ? file.slice(2) : file;
|
|
1828
|
+
fileCounts.set(rel, (fileCounts.get(rel) ?? 0) + 1);
|
|
1808
1829
|
}
|
|
1809
1830
|
}
|
|
1810
1831
|
if (fileCounts.size === 0) return null;
|
|
@@ -1869,9 +1890,15 @@ async function createWorktree(repoRoot, branchName, baseBranch) {
|
|
|
1869
1890
|
rmSync(worktreePath, { recursive: true, force: true });
|
|
1870
1891
|
}
|
|
1871
1892
|
}
|
|
1872
|
-
await execa2("git", ["fetch", "origin", baseBranch], {
|
|
1893
|
+
await execa2("git", ["fetch", "origin", baseBranch], {
|
|
1894
|
+
cwd: repoRoot,
|
|
1895
|
+
stdin: "ignore",
|
|
1896
|
+
timeout: 3e4
|
|
1897
|
+
});
|
|
1873
1898
|
await execa2("git", ["worktree", "add", "-b", branchName, worktreePath, `origin/${baseBranch}`], {
|
|
1874
|
-
cwd: repoRoot
|
|
1899
|
+
cwd: repoRoot,
|
|
1900
|
+
stdin: "ignore",
|
|
1901
|
+
timeout: 3e4
|
|
1875
1902
|
});
|
|
1876
1903
|
return worktreePath;
|
|
1877
1904
|
}
|
|
@@ -3047,7 +3074,7 @@ async function runNativeWorktreeSession(config, issue, logFile, session, models,
|
|
|
3047
3074
|
const pm = detectPackageManager(repoPath);
|
|
3048
3075
|
const projectContext = analyzeProject(repoPath);
|
|
3049
3076
|
const repoContextMd = readContext(repoPath);
|
|
3050
|
-
const relevantFiles = enrichContext(repoPath, issue);
|
|
3077
|
+
const relevantFiles = await enrichContext(repoPath, issue);
|
|
3051
3078
|
const workspace = resolve6(config.workspace);
|
|
3052
3079
|
const hookEnv = buildHookEnv(issue.id, issue.title, "", repoPath);
|
|
3053
3080
|
const lifecycleEnv = await startInfra(issue.id, repoPath, config);
|
|
@@ -3197,7 +3224,7 @@ async function runManualWorktreeSession(config, issue, logFile, session, models,
|
|
|
3197
3224
|
const pm = detectPackageManager(worktreePath);
|
|
3198
3225
|
const projectContext = analyzeProject(worktreePath);
|
|
3199
3226
|
const repoContextMd = readContext(repoPath);
|
|
3200
|
-
const relevantFiles = enrichContext(worktreePath, issue);
|
|
3227
|
+
const relevantFiles = await enrichContext(worktreePath, issue);
|
|
3201
3228
|
const lifecycleEnv = await startInfra(issue.id, worktreePath, config);
|
|
3202
3229
|
const manifestPath = getManifestPath(worktreePath, issue.id);
|
|
3203
3230
|
if (!await executeHook("before_run", config.hooks, worktreePath, hookEnv)) {
|
|
@@ -3818,7 +3845,7 @@ async function runBranchSession(config, issue, logFile, session, models, source,
|
|
|
3818
3845
|
const pm = detectPackageManager(workspace);
|
|
3819
3846
|
const projectContext = analyzeProject(workspace);
|
|
3820
3847
|
const repoContextMd = readContext(workspace);
|
|
3821
|
-
const relevantFiles = enrichContext(workspace, issue);
|
|
3848
|
+
const relevantFiles = await enrichContext(workspace, issue);
|
|
3822
3849
|
const lifecycleEnv = await startInfra(issue.id, workspace, config);
|
|
3823
3850
|
if (!await executeHook("before_run", config.hooks, workspace, hookEnv)) {
|
|
3824
3851
|
return hookFailure(defaultProvider(models), "before_run hook failed");
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
runLoop,
|
|
15
15
|
saveConfig,
|
|
16
16
|
validateConfig
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XS6ARXRL.js";
|
|
18
18
|
import {
|
|
19
19
|
CliError,
|
|
20
20
|
buildExecutionWaves,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
parseStructuredOutput,
|
|
25
25
|
runPlanWizard,
|
|
26
26
|
savePlan
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BKKDHLUA.js";
|
|
28
28
|
import {
|
|
29
29
|
buildContextMdBlock,
|
|
30
30
|
createProvider,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
readContext,
|
|
35
35
|
resolveModels,
|
|
36
36
|
runWithFallback
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-246P5Z5G.js";
|
|
38
38
|
import {
|
|
39
39
|
kanbanEmitter
|
|
40
40
|
} from "./chunk-LR2GREZS.js";
|
|
@@ -1850,7 +1850,7 @@ async function reviewAndCreate(plan2, planPath, opts) {
|
|
|
1850
1850
|
log("Run `lisa run` when ready.");
|
|
1851
1851
|
return;
|
|
1852
1852
|
}
|
|
1853
|
-
const { runLoop: runLoop2 } = await import("./loop-
|
|
1853
|
+
const { runLoop: runLoop2 } = await import("./loop-QYUIDHQJ.js");
|
|
1854
1854
|
const waves = buildExecutionWaves(plan2.issues);
|
|
1855
1855
|
const maxWaveSize = Math.max(...waves.map((w) => w.length));
|
|
1856
1856
|
await runLoop2(config2, {
|
|
@@ -2320,7 +2320,7 @@ Add them to your ${shell} and run: source ${shell}`));
|
|
|
2320
2320
|
const initialCards = persistence.load();
|
|
2321
2321
|
persistedCards = initialCards;
|
|
2322
2322
|
persistence.start();
|
|
2323
|
-
const { registerPlanBridge } = await import("./tui-bridge-
|
|
2323
|
+
const { registerPlanBridge } = await import("./tui-bridge-HNJ5ADCJ.js");
|
|
2324
2324
|
const cleanupPlan = registerPlanBridge(merged);
|
|
2325
2325
|
onBeforeExit = () => {
|
|
2326
2326
|
persistence.stop();
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
cleanupEventListeners,
|
|
5
5
|
runDemoLoop,
|
|
6
6
|
runLoop
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XS6ARXRL.js";
|
|
8
8
|
import {
|
|
9
9
|
WATCH_POLL_INTERVAL_MS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-246P5Z5G.js";
|
|
11
11
|
import "./chunk-LR2GREZS.js";
|
|
12
12
|
import "./chunk-ZOVVFU7B.js";
|
|
13
13
|
import "./chunk-3EOEDL3T.js";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
markdownToIssue,
|
|
7
7
|
parseStructuredOutput,
|
|
8
8
|
savePlan
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BKKDHLUA.js";
|
|
10
10
|
import {
|
|
11
11
|
createSource,
|
|
12
12
|
resolveModels,
|
|
13
13
|
runWithFallback
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-246P5Z5G.js";
|
|
15
15
|
import {
|
|
16
16
|
kanbanEmitter
|
|
17
17
|
} from "./chunk-LR2GREZS.js";
|