@ulpi/cli 0.1.1 → 0.1.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/auth-KQCJ43U2.js +118 -0
- package/dist/{chunk-Q4HIY43N.js → chunk-2VYFVYJL.js} +67 -24
- package/dist/{chunk-DBMUNBNB.js → chunk-5J6NLQUN.js} +149 -19
- package/dist/{chunk-4KRVDKGB.js → chunk-F7OXF7Z3.js} +1 -1
- package/dist/chunk-G6SVZ4Q5.js +122 -0
- package/dist/{chunk-NNUWU6CV.js → chunk-JGBXM5NC.js} +42 -0
- package/dist/{chunk-6JCMYYBT.js → chunk-PDR55ZNW.js} +247 -112
- package/dist/{chunk-247GVVKK.js → chunk-ZLYRPD7I.js} +18 -16
- package/dist/ci-QM57ZCBW.js +367 -0
- package/dist/{codemap-RRJIDBQ5.js → codemap-RKSD4MIE.js} +49 -17
- package/dist/{dist-LZKZFPVX.js → dist-CB5D5LMO.js} +6 -3
- package/dist/{dist-7LHZ65GC.js → dist-CS2VKNYS.js} +5 -4
- package/dist/{dist-R5F4MX3I.js → dist-GJYT2OQV.js} +11 -4
- package/dist/{dist-RJGCUS3L.js → dist-QAU3LGJN.js} +3 -1
- package/dist/{dist-W7K4WPAF.js → dist-UKMCJBB2.js} +42 -14
- package/dist/{dist-R5ZJ4LX5.js → dist-YA2BWZB2.js} +1 -1
- package/dist/{history-Q2LDADFW.js → history-NFNA4HE5.js} +13 -7
- package/dist/index.js +50 -21
- package/dist/{init-AY5C2ZAS.js → init-6CH4HV5T.js} +2 -2
- package/dist/{memory-J3G24QHS.js → memory-Y6OZTXJ2.js} +231 -22
- package/dist/{server-MOYPE4SM-N7SE2AN7.js → server-USLHY6GH-AEOJC5ST.js} +2 -2
- package/dist/skills/ulpi-generate-guardian/SKILL.md +246 -7
- package/dist/skills/ulpi-generate-guardian/references/framework-rules.md +161 -4
- package/dist/skills/ulpi-generate-guardian/references/language-rules.md +13 -18
- package/dist/{ui-L7UAWXDY.js → ui-OWXZ3YSR.js} +3 -3
- package/dist/ui.html +112 -112
- package/dist/{update-DJ227LL3.js → update-WUITQX4Z.js} +1 -1
- package/dist/{version-checker-M37KI7DY.js → version-checker-SMAYSN7Y.js} +1 -1
- package/package.json +31 -28
- package/LICENSE +0 -21
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
parseSourceWithLanguage,
|
|
47
47
|
processIncremental,
|
|
48
48
|
queryBM25,
|
|
49
|
+
rebuildDepgraph,
|
|
49
50
|
recallAtK,
|
|
50
51
|
releaseCodemapLock,
|
|
51
52
|
removeDocuments,
|
|
@@ -60,18 +61,19 @@ import {
|
|
|
60
61
|
searchCode,
|
|
61
62
|
searchSymbols,
|
|
62
63
|
tokenize
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import "./chunk-
|
|
64
|
+
} from "./chunk-5J6NLQUN.js";
|
|
65
|
+
import "./chunk-JGBXM5NC.js";
|
|
65
66
|
import "./chunk-YM2HV4IA.js";
|
|
66
67
|
import "./chunk-74WVVWJ4.js";
|
|
67
68
|
import "./chunk-KIKPIH6N.js";
|
|
69
|
+
import "./chunk-ZLYRPD7I.js";
|
|
68
70
|
import {
|
|
69
71
|
OpenAIEmbedder
|
|
70
72
|
} from "./chunk-2HEE5OKX.js";
|
|
73
|
+
import "./chunk-7LXY5UVC.js";
|
|
71
74
|
import {
|
|
72
75
|
OllamaEmbedder
|
|
73
76
|
} from "./chunk-KLEASXUR.js";
|
|
74
|
-
import "./chunk-7LXY5UVC.js";
|
|
75
77
|
import "./chunk-4VNS5WPM.js";
|
|
76
78
|
export {
|
|
77
79
|
CodemapStore,
|
|
@@ -123,6 +125,7 @@ export {
|
|
|
123
125
|
parseSourceWithLanguage,
|
|
124
126
|
processIncremental,
|
|
125
127
|
queryBM25,
|
|
128
|
+
rebuildDepgraph,
|
|
126
129
|
recallAtK,
|
|
127
130
|
releaseCodemapLock,
|
|
128
131
|
removeDocuments,
|
|
@@ -15,15 +15,16 @@ import {
|
|
|
15
15
|
removeEntry,
|
|
16
16
|
searchMemory,
|
|
17
17
|
updateEntry
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-PDR55ZNW.js";
|
|
19
|
+
import "./chunk-5J6NLQUN.js";
|
|
20
|
+
import "./chunk-JGBXM5NC.js";
|
|
21
21
|
import "./chunk-YM2HV4IA.js";
|
|
22
22
|
import "./chunk-74WVVWJ4.js";
|
|
23
23
|
import "./chunk-KIKPIH6N.js";
|
|
24
|
+
import "./chunk-ZLYRPD7I.js";
|
|
24
25
|
import "./chunk-2HEE5OKX.js";
|
|
25
|
-
import "./chunk-KLEASXUR.js";
|
|
26
26
|
import "./chunk-7LXY5UVC.js";
|
|
27
|
+
import "./chunk-KLEASXUR.js";
|
|
27
28
|
import "./chunk-4VNS5WPM.js";
|
|
28
29
|
|
|
29
30
|
// ../../packages/memory-mcp/dist/index.js
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
classifySession,
|
|
11
11
|
classifySinglePrompt,
|
|
12
12
|
classifyWindow,
|
|
13
|
+
clearClassifyBatchProgress,
|
|
13
14
|
deduplicateMemories,
|
|
14
15
|
exportMemories,
|
|
15
16
|
filterSignificantEvents,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
parseClassifierOutput,
|
|
35
36
|
readCapturedEvents,
|
|
36
37
|
readCapturedTranscript,
|
|
38
|
+
readClassifyBatchProgress,
|
|
37
39
|
redactContent,
|
|
38
40
|
reindexMemories,
|
|
39
41
|
releaseMemoryLock,
|
|
@@ -45,16 +47,18 @@ import {
|
|
|
45
47
|
searchMemory,
|
|
46
48
|
toClassificationEvent,
|
|
47
49
|
updateEntry,
|
|
50
|
+
writeClassifyBatchProgress,
|
|
48
51
|
writeMemoryStats
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
+
} from "./chunk-PDR55ZNW.js";
|
|
53
|
+
import "./chunk-5J6NLQUN.js";
|
|
54
|
+
import "./chunk-JGBXM5NC.js";
|
|
52
55
|
import "./chunk-YM2HV4IA.js";
|
|
53
56
|
import "./chunk-74WVVWJ4.js";
|
|
54
57
|
import "./chunk-KIKPIH6N.js";
|
|
58
|
+
import "./chunk-ZLYRPD7I.js";
|
|
55
59
|
import "./chunk-2HEE5OKX.js";
|
|
56
|
-
import "./chunk-KLEASXUR.js";
|
|
57
60
|
import "./chunk-7LXY5UVC.js";
|
|
61
|
+
import "./chunk-KLEASXUR.js";
|
|
58
62
|
import "./chunk-4VNS5WPM.js";
|
|
59
63
|
export {
|
|
60
64
|
DEFAULT_MEMORY_CONFIG,
|
|
@@ -68,6 +72,7 @@ export {
|
|
|
68
72
|
classifySession,
|
|
69
73
|
classifySinglePrompt,
|
|
70
74
|
classifyWindow,
|
|
75
|
+
clearClassifyBatchProgress,
|
|
71
76
|
deduplicateMemories,
|
|
72
77
|
exportMemories,
|
|
73
78
|
filterSignificantEvents,
|
|
@@ -92,6 +97,7 @@ export {
|
|
|
92
97
|
parseClassifierOutput,
|
|
93
98
|
readCapturedEvents,
|
|
94
99
|
readCapturedTranscript,
|
|
100
|
+
readClassifyBatchProgress,
|
|
95
101
|
redactContent,
|
|
96
102
|
reindexMemories,
|
|
97
103
|
releaseMemoryLock,
|
|
@@ -103,5 +109,6 @@ export {
|
|
|
103
109
|
searchMemory,
|
|
104
110
|
toClassificationEvent,
|
|
105
111
|
updateEntry,
|
|
112
|
+
writeClassifyBatchProgress,
|
|
106
113
|
writeMemoryStats
|
|
107
114
|
};
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
initHistoryBranch,
|
|
21
21
|
installGitHooks,
|
|
22
22
|
listBranchDir,
|
|
23
|
+
listBranchOnlyCommits,
|
|
23
24
|
listCommitsBetween,
|
|
24
25
|
listRecentCommits,
|
|
25
26
|
loadActiveGuards,
|
|
@@ -39,7 +40,7 @@ import {
|
|
|
39
40
|
withWorktree,
|
|
40
41
|
writeAndStage,
|
|
41
42
|
writeHistoryEntry
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-JGBXM5NC.js";
|
|
43
44
|
import "./chunk-YM2HV4IA.js";
|
|
44
45
|
import "./chunk-7LXY5UVC.js";
|
|
45
46
|
import "./chunk-4VNS5WPM.js";
|
|
@@ -65,6 +66,7 @@ export {
|
|
|
65
66
|
initHistoryBranch,
|
|
66
67
|
installGitHooks,
|
|
67
68
|
listBranchDir,
|
|
69
|
+
listBranchOnlyCommits,
|
|
68
70
|
listCommitsBetween,
|
|
69
71
|
listRecentCommits,
|
|
70
72
|
loadActiveGuards,
|
|
@@ -4,32 +4,33 @@ import {
|
|
|
4
4
|
Server,
|
|
5
5
|
StdioServerTransport
|
|
6
6
|
} from "./chunk-JWUUVXIV.js";
|
|
7
|
-
import {
|
|
8
|
-
getIncomingEdges,
|
|
9
|
-
getOutgoingEdges,
|
|
10
|
-
getTransitiveDeps,
|
|
11
|
-
getTransitiveRdeps,
|
|
12
|
-
loadGraph,
|
|
13
|
-
loadMetrics,
|
|
14
|
-
loadPageRank
|
|
15
|
-
} from "./chunk-247GVVKK.js";
|
|
16
7
|
import {
|
|
17
8
|
getCodemapStatus,
|
|
18
9
|
loadManifest,
|
|
19
10
|
loadSymbolIndex,
|
|
11
|
+
rebuildDepgraph,
|
|
20
12
|
runInitPipeline,
|
|
21
13
|
searchCode,
|
|
22
14
|
searchSymbols
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-5J6NLQUN.js";
|
|
16
|
+
import "./chunk-JGBXM5NC.js";
|
|
25
17
|
import "./chunk-YM2HV4IA.js";
|
|
26
18
|
import "./chunk-74WVVWJ4.js";
|
|
27
19
|
import "./chunk-KIKPIH6N.js";
|
|
20
|
+
import {
|
|
21
|
+
getIncomingEdges,
|
|
22
|
+
getOutgoingEdges,
|
|
23
|
+
getTransitiveDeps,
|
|
24
|
+
getTransitiveRdeps,
|
|
25
|
+
loadGraph,
|
|
26
|
+
loadMetrics,
|
|
27
|
+
loadPageRank
|
|
28
|
+
} from "./chunk-ZLYRPD7I.js";
|
|
28
29
|
import "./chunk-2HEE5OKX.js";
|
|
29
|
-
import "./chunk-KLEASXUR.js";
|
|
30
30
|
import {
|
|
31
31
|
getCurrentBranch
|
|
32
32
|
} from "./chunk-7LXY5UVC.js";
|
|
33
|
+
import "./chunk-KLEASXUR.js";
|
|
33
34
|
import "./chunk-4VNS5WPM.js";
|
|
34
35
|
|
|
35
36
|
// ../../packages/codemap-mcp/dist/index.js
|
|
@@ -531,6 +532,31 @@ async function handleGetDepgraphStats(projectDir, _args, branch) {
|
|
|
531
532
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }]
|
|
532
533
|
};
|
|
533
534
|
}
|
|
535
|
+
var rebuildDepgraphTool = {
|
|
536
|
+
name: "rebuild_depgraph",
|
|
537
|
+
description: "Rebuild the dependency graph (tags, PageRank, cycles, coupling) without re-embedding. Faster than full reindex when only the depgraph is missing or stale.",
|
|
538
|
+
inputSchema: {
|
|
539
|
+
type: "object",
|
|
540
|
+
properties: {}
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
async function handleRebuildDepgraph(projectDir, _args, branch) {
|
|
544
|
+
const result = await rebuildDepgraph(projectDir, void 0, branch);
|
|
545
|
+
const payload = {
|
|
546
|
+
nodeCount: result.nodeCount,
|
|
547
|
+
edgeCount: result.edgeCount,
|
|
548
|
+
definitionCount: result.definitionCount,
|
|
549
|
+
referenceCount: result.referenceCount,
|
|
550
|
+
cycleCount: result.cycleCount,
|
|
551
|
+
taggedFiles: result.taggedFiles,
|
|
552
|
+
totalFiles: result.totalFiles,
|
|
553
|
+
durationMs: result.durationMs,
|
|
554
|
+
summary: `Rebuilt depgraph: ${result.nodeCount} nodes, ${result.edgeCount} edges, ${result.definitionCount} defs, ${result.referenceCount} refs, ${result.cycleCount} cycles (${result.taggedFiles}/${result.totalFiles} files tagged) in ${(result.durationMs / 1e3).toFixed(1)}s`
|
|
555
|
+
};
|
|
556
|
+
return {
|
|
557
|
+
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }]
|
|
558
|
+
};
|
|
559
|
+
}
|
|
534
560
|
var ALL_TOOLS = [
|
|
535
561
|
searchCodeTool,
|
|
536
562
|
searchSymbolsTool,
|
|
@@ -542,7 +568,8 @@ var ALL_TOOLS = [
|
|
|
542
568
|
getFileRankTool,
|
|
543
569
|
findCyclesTool,
|
|
544
570
|
getCouplingMetricsTool,
|
|
545
|
-
getDepgraphStatsTool
|
|
571
|
+
getDepgraphStatsTool,
|
|
572
|
+
rebuildDepgraphTool
|
|
546
573
|
];
|
|
547
574
|
var HANDLERS = {
|
|
548
575
|
search_code: handleSearchCode,
|
|
@@ -555,7 +582,8 @@ var HANDLERS = {
|
|
|
555
582
|
get_file_rank: handleGetFileRank,
|
|
556
583
|
find_cycles: handleFindCycles,
|
|
557
584
|
get_coupling_metrics: handleGetCouplingMetrics,
|
|
558
|
-
get_depgraph_stats: handleGetDepgraphStats
|
|
585
|
+
get_depgraph_stats: handleGetDepgraphStats,
|
|
586
|
+
rebuild_depgraph: handleRebuildDepgraph
|
|
559
587
|
};
|
|
560
588
|
function createMcpServer(options) {
|
|
561
589
|
const server = new Server(
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
getCurrentHead,
|
|
11
11
|
historyBranchExists,
|
|
12
12
|
initHistoryBranch,
|
|
13
|
+
listBranchOnlyCommits,
|
|
13
14
|
listRecentCommits,
|
|
14
15
|
loadActiveGuards,
|
|
15
16
|
readBranchMeta,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
readTimeline,
|
|
19
20
|
updateEntryEnrichment,
|
|
20
21
|
writeHistoryEntry
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JGBXM5NC.js";
|
|
22
23
|
import "./chunk-YM2HV4IA.js";
|
|
23
24
|
import {
|
|
24
25
|
DEFAULT_AI_MODEL,
|
|
@@ -318,6 +319,8 @@ function enrichEntry(entry, rawEvents, model = DEFAULT_AI_MODEL) {
|
|
|
318
319
|
reject(new Error("Claude CLI not found"));
|
|
319
320
|
return;
|
|
320
321
|
}
|
|
322
|
+
const env = { ...process.env };
|
|
323
|
+
delete env.CLAUDECODE;
|
|
321
324
|
const proc = spawn(claudePath, [
|
|
322
325
|
"--print",
|
|
323
326
|
"--model",
|
|
@@ -329,7 +332,8 @@ function enrichEntry(entry, rawEvents, model = DEFAULT_AI_MODEL) {
|
|
|
329
332
|
"--permission-mode",
|
|
330
333
|
"bypassPermissions"
|
|
331
334
|
], {
|
|
332
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
335
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
336
|
+
env
|
|
333
337
|
});
|
|
334
338
|
let stdout = "";
|
|
335
339
|
let stderr = "";
|
|
@@ -412,7 +416,7 @@ async function initSubcommand(projectDir) {
|
|
|
412
416
|
}
|
|
413
417
|
const projectName = path2.basename(projectDir);
|
|
414
418
|
try {
|
|
415
|
-
initHistoryBranch(projectDir, projectName, "0.1.
|
|
419
|
+
initHistoryBranch(projectDir, projectName, "0.1.3");
|
|
416
420
|
} catch (err) {
|
|
417
421
|
const message = err instanceof Error ? err.message : String(err);
|
|
418
422
|
console.log(chalk.red(`Error: ${message}`));
|
|
@@ -420,7 +424,7 @@ async function initSubcommand(projectDir) {
|
|
|
420
424
|
}
|
|
421
425
|
if (collectReviewPlans) {
|
|
422
426
|
try {
|
|
423
|
-
const { withWorktree, writeAndStage, commitInWorktree } = await import("./dist-
|
|
427
|
+
const { withWorktree, writeAndStage, commitInWorktree } = await import("./dist-QAU3LGJN.js");
|
|
424
428
|
const meta = readBranchMeta(projectDir);
|
|
425
429
|
if (meta) {
|
|
426
430
|
meta.config.collectReviewPlans = true;
|
|
@@ -443,7 +447,7 @@ async function initSubcommand(projectDir) {
|
|
|
443
447
|
);
|
|
444
448
|
if (installHooksAnswer.trim().toLowerCase() !== "n") {
|
|
445
449
|
try {
|
|
446
|
-
const { installGitHooks } = await import("./dist-
|
|
450
|
+
const { installGitHooks } = await import("./dist-QAU3LGJN.js");
|
|
447
451
|
const { getBinaryPath } = await import("./dist-RKOGLK7R.js");
|
|
448
452
|
const binaryPath = getBinaryPath();
|
|
449
453
|
const result = installGitHooks(projectDir, binaryPath);
|
|
@@ -528,10 +532,12 @@ async function backfillSubcommand(args, projectDir) {
|
|
|
528
532
|
if (args[0] && !args[0].startsWith("--") && /^\d+$/.test(args[0])) {
|
|
529
533
|
limit = parseInt(args[0], 10);
|
|
530
534
|
}
|
|
535
|
+
const branchOnly = args.includes("--branch-only");
|
|
536
|
+
const label = branchOnly ? "branch-only commits" : `last ${limit} commits`;
|
|
531
537
|
console.log(chalk.bold(`
|
|
532
|
-
ULPI History \u2014 Backfill (
|
|
538
|
+
ULPI History \u2014 Backfill (${label})
|
|
533
539
|
`));
|
|
534
|
-
const commits = listRecentCommits(projectDir, limit);
|
|
540
|
+
const commits = branchOnly ? listBranchOnlyCommits(projectDir, limit) : listRecentCommits(projectDir, limit);
|
|
535
541
|
if (commits.length === 0) {
|
|
536
542
|
console.log(chalk.yellow("No commits found."));
|
|
537
543
|
return;
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
readTranscript,
|
|
47
47
|
updateEntryTranscript,
|
|
48
48
|
writeHistoryEntry
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JGBXM5NC.js";
|
|
50
50
|
import {
|
|
51
51
|
JsonSessionStore,
|
|
52
52
|
appendEvent,
|
|
@@ -138,10 +138,10 @@ async function handleSessionStart(ctx) {
|
|
|
138
138
|
if (shouldPromptForGeneration(projectDir2)) {
|
|
139
139
|
outputGenerationPrompt();
|
|
140
140
|
}
|
|
141
|
-
import("./version-checker-
|
|
141
|
+
import("./version-checker-SMAYSN7Y.js").then((m) => m.checkForUpdates()).catch(() => {
|
|
142
142
|
});
|
|
143
143
|
try {
|
|
144
|
-
const { isMemoryEnabled, loadMemoryConfig, getTopMemories, formatMemoriesForAgent } = await import("./dist-
|
|
144
|
+
const { isMemoryEnabled, loadMemoryConfig, getTopMemories, formatMemoriesForAgent } = await import("./dist-GJYT2OQV.js");
|
|
145
145
|
if (isMemoryEnabled(projectDir2)) {
|
|
146
146
|
const config = loadMemoryConfig(projectDir2);
|
|
147
147
|
if (config.surfaceOnStart) {
|
|
@@ -155,15 +155,15 @@ async function handleSessionStart(ctx) {
|
|
|
155
155
|
} catch {
|
|
156
156
|
}
|
|
157
157
|
try {
|
|
158
|
-
const { loadCodemapConfig } = await import("./dist-
|
|
158
|
+
const { loadCodemapConfig } = await import("./dist-CB5D5LMO.js");
|
|
159
159
|
const { getCodemapBranch, getCurrentBranch } = await import("./dist-RKOGLK7R.js");
|
|
160
|
-
const { historyBranchExists: historyBranchExists2 } = await import("./dist-
|
|
160
|
+
const { historyBranchExists: historyBranchExists2 } = await import("./dist-QAU3LGJN.js");
|
|
161
161
|
const codemapConfig = loadCodemapConfig(projectDir2);
|
|
162
162
|
if (codemapConfig.autoImport) {
|
|
163
163
|
const branch = state.branch ?? getCurrentBranch(projectDir2);
|
|
164
164
|
const shadowBranch = getCodemapBranch(branch);
|
|
165
165
|
if (historyBranchExists2(projectDir2, shadowBranch)) {
|
|
166
|
-
const { importIndex } = await import("./dist-
|
|
166
|
+
const { importIndex } = await import("./dist-CB5D5LMO.js");
|
|
167
167
|
await importIndex(projectDir2, branch);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -1473,7 +1473,7 @@ ${failureFeedback.join("\n\n")}`
|
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
1475
|
try {
|
|
1476
|
-
const { isMemoryEnabled, loadMemoryConfig, appendMemoryEvent, toClassificationEvent } = await import("./dist-
|
|
1476
|
+
const { isMemoryEnabled, loadMemoryConfig, appendMemoryEvent, toClassificationEvent } = await import("./dist-GJYT2OQV.js");
|
|
1477
1477
|
if (isMemoryEnabled(projectDir2)) {
|
|
1478
1478
|
const memConfig = loadMemoryConfig(projectDir2);
|
|
1479
1479
|
if (memConfig.captureMode === "continuous") {
|
|
@@ -1493,7 +1493,7 @@ ${failureFeedback.join("\n\n")}`
|
|
|
1493
1493
|
}
|
|
1494
1494
|
if (input.tool_name === "Bash" && /\bgit\s+push\b/.test(String(input.tool_input?.command ?? ""))) {
|
|
1495
1495
|
try {
|
|
1496
|
-
const { loadCodemapConfig, getCodemapStatus, exportIndex } = await import("./dist-
|
|
1496
|
+
const { loadCodemapConfig, getCodemapStatus, exportIndex } = await import("./dist-CB5D5LMO.js");
|
|
1497
1497
|
const { getCurrentBranch } = await import("./dist-RKOGLK7R.js");
|
|
1498
1498
|
const codemapConfig = loadCodemapConfig(projectDir2);
|
|
1499
1499
|
if (codemapConfig.autoExport) {
|
|
@@ -1747,6 +1747,7 @@ ${warnings.map((w) => ` - ${w}`).join("\n")}`
|
|
|
1747
1747
|
}
|
|
1748
1748
|
|
|
1749
1749
|
// src/hooks/session-end.ts
|
|
1750
|
+
import { spawn } from "child_process";
|
|
1750
1751
|
async function captureSessionCommits(ctx) {
|
|
1751
1752
|
const { input, state, projectDir: projectDir2 } = ctx;
|
|
1752
1753
|
if (!state.headAtStart) return;
|
|
@@ -1834,24 +1835,46 @@ async function handleSessionEnd(ctx) {
|
|
|
1834
1835
|
} catch {
|
|
1835
1836
|
}
|
|
1836
1837
|
try {
|
|
1837
|
-
const memEngine = await import("./dist-
|
|
1838
|
+
const memEngine = await import("./dist-GJYT2OQV.js");
|
|
1838
1839
|
if (memEngine.isMemoryEnabled(projectDir2)) {
|
|
1839
1840
|
const config = memEngine.loadMemoryConfig(projectDir2);
|
|
1840
1841
|
memEngine.finalizeCapture(input.session_id, state, projectDir2);
|
|
1841
1842
|
if (config.classifier.enabled) {
|
|
1842
|
-
await memEngine.classifySession(projectDir2, input.session_id);
|
|
1843
|
-
}
|
|
1844
|
-
if (config.autoExport) {
|
|
1845
1843
|
try {
|
|
1846
|
-
|
|
1844
|
+
const args2 = ["memory", "classify", "-p", projectDir2, "--session", input.session_id];
|
|
1845
|
+
if (config.autoExport) args2.push("--export");
|
|
1846
|
+
const child = spawn(process.execPath, [process.argv[1], ...args2], {
|
|
1847
|
+
detached: true,
|
|
1848
|
+
stdio: "ignore",
|
|
1849
|
+
env: { ...process.env, ULPI_BG_CLASSIFY: "1" }
|
|
1850
|
+
});
|
|
1851
|
+
child.unref();
|
|
1852
|
+
} catch {
|
|
1853
|
+
}
|
|
1854
|
+
} else if (config.autoExport) {
|
|
1855
|
+
try {
|
|
1856
|
+
await memEngine.exportMemories(projectDir2);
|
|
1847
1857
|
} catch {
|
|
1848
1858
|
}
|
|
1849
1859
|
}
|
|
1850
1860
|
}
|
|
1861
|
+
} catch (err) {
|
|
1862
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
1863
|
+
console.error(`[ulpi] Memory capture failed: ${msg}`);
|
|
1864
|
+
}
|
|
1865
|
+
try {
|
|
1866
|
+
if (historyBranchExists(projectDir2)) {
|
|
1867
|
+
const args2 = ["history", "backfill", "-p", projectDir2, "--limit", "50", "--branch-only"];
|
|
1868
|
+
const child = spawn(process.execPath, [process.argv[1], ...args2], {
|
|
1869
|
+
detached: true,
|
|
1870
|
+
stdio: "ignore"
|
|
1871
|
+
});
|
|
1872
|
+
child.unref();
|
|
1873
|
+
}
|
|
1851
1874
|
} catch {
|
|
1852
1875
|
}
|
|
1853
1876
|
try {
|
|
1854
|
-
const { loadCodemapConfig, getCodemapStatus, exportIndex } = await import("./dist-
|
|
1877
|
+
const { loadCodemapConfig, getCodemapStatus, exportIndex } = await import("./dist-CB5D5LMO.js");
|
|
1855
1878
|
const { getCurrentBranch } = await import("./dist-RKOGLK7R.js");
|
|
1856
1879
|
const codemapConfig = loadCodemapConfig(projectDir2);
|
|
1857
1880
|
if (codemapConfig.autoExport) {
|
|
@@ -2022,7 +2045,7 @@ async function main() {
|
|
|
2022
2045
|
switch (command) {
|
|
2023
2046
|
case "init": {
|
|
2024
2047
|
const initDir = rawArgs.some((a) => a === "--project" || a === "-p") ? projectDir : process.cwd();
|
|
2025
|
-
return (await import("./init-
|
|
2048
|
+
return (await import("./init-6CH4HV5T.js")).runInit([initDir, ...args.slice(1)]);
|
|
2026
2049
|
}
|
|
2027
2050
|
case "rules":
|
|
2028
2051
|
return (await import("./rules-E427DKYJ.js")).runRules(args.slice(1), projectDir);
|
|
@@ -2041,24 +2064,28 @@ async function main() {
|
|
|
2041
2064
|
case "uninstall":
|
|
2042
2065
|
return (await import("./uninstall-6SW35IK4.js")).runUninstall(args.slice(1), projectDir);
|
|
2043
2066
|
case "ui":
|
|
2044
|
-
return (await import("./ui-
|
|
2067
|
+
return (await import("./ui-OWXZ3YSR.js")).runUI(args.slice(1), projectDir);
|
|
2045
2068
|
case "update":
|
|
2046
|
-
return (await import("./update-
|
|
2069
|
+
return (await import("./update-WUITQX4Z.js")).runUpdate(args.slice(1));
|
|
2047
2070
|
case "history":
|
|
2048
|
-
return (await import("./history-
|
|
2071
|
+
return (await import("./history-NFNA4HE5.js")).runHistory(args.slice(1), projectDir);
|
|
2049
2072
|
case "review":
|
|
2050
2073
|
return (await import("./review-ADUPV3PN.js")).runReview(args.slice(1), projectDir);
|
|
2051
2074
|
case "config":
|
|
2052
2075
|
return (await import("./config-EGAXXCGL.js")).runConfig(args.slice(1));
|
|
2053
2076
|
case "codemap":
|
|
2054
|
-
return (await import("./codemap-
|
|
2077
|
+
return (await import("./codemap-RKSD4MIE.js")).runCodemap(args.slice(1), projectDir);
|
|
2055
2078
|
case "memory":
|
|
2056
|
-
return (await import("./memory-
|
|
2079
|
+
return (await import("./memory-Y6OZTXJ2.js")).runMemory(args.slice(1), projectDir);
|
|
2057
2080
|
case "projects":
|
|
2058
2081
|
return (await import("./projects-ATHDD3D6.js")).runProjects(args.slice(1));
|
|
2082
|
+
case "ci":
|
|
2083
|
+
return (await import("./ci-QM57ZCBW.js")).runCi(args.slice(1), projectDir);
|
|
2084
|
+
case "auth":
|
|
2085
|
+
return (await import("./auth-KQCJ43U2.js")).runAuth(args.slice(1));
|
|
2059
2086
|
case "--version":
|
|
2060
2087
|
case "-v":
|
|
2061
|
-
console.log("0.1.
|
|
2088
|
+
console.log("0.1.3");
|
|
2062
2089
|
return;
|
|
2063
2090
|
case "--help":
|
|
2064
2091
|
case "-h":
|
|
@@ -2102,6 +2129,8 @@ CLI Commands:
|
|
|
2102
2129
|
config Manage settings and API keys
|
|
2103
2130
|
codemap Semantic code indexing (init/search/status/reindex/watch)
|
|
2104
2131
|
memory Agent memory (init/search/remember/status/export/import/serve)
|
|
2132
|
+
ci Run in CI/PR worker mode (used inside worker containers)
|
|
2133
|
+
auth Manage Claude Code credentials for CI workers
|
|
2105
2134
|
update Check for and install updates
|
|
2106
2135
|
|
|
2107
2136
|
Global Options:
|
|
@@ -121,8 +121,8 @@ async function runInit(args) {
|
|
|
121
121
|
} catch {
|
|
122
122
|
}
|
|
123
123
|
try {
|
|
124
|
-
const { runInitPipeline } = await import("./dist-
|
|
125
|
-
const { initMemoryBranch } = await import("./dist-
|
|
124
|
+
const { runInitPipeline } = await import("./dist-CB5D5LMO.js");
|
|
125
|
+
const { initMemoryBranch } = await import("./dist-GJYT2OQV.js");
|
|
126
126
|
console.log(chalk.cyan("\nInitializing code index..."));
|
|
127
127
|
try {
|
|
128
128
|
await runInitPipeline(projectDir, (progress) => {
|