@edihasaj/recall 2.0.22 → 2.0.24
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-QPFSU57E.js → chunk-26L3VPS2.js} +2 -2
- package/dist/{chunk-5XIMY5B6.js → chunk-2WUTNYQG.js} +9 -9
- package/dist/{chunk-T76BHBJD.js → chunk-4USUZRZ3.js} +2 -2
- package/dist/{chunk-T3HE4QJW.js → chunk-6PNQCUGC.js} +5 -5
- package/dist/{chunk-55L2KDQE.js → chunk-7WM3F5OZ.js} +7 -7
- package/dist/{chunk-E6532GTG.js → chunk-7YGNSCHC.js} +2 -2
- package/dist/{chunk-X2SVAAFV.js → chunk-B4OWLDI2.js} +9 -9
- package/dist/{chunk-PI4VEC7V.js → chunk-DNTUXT2R.js} +5 -5
- package/dist/{chunk-E2LPE3NE.js → chunk-PX5I35LA.js} +4 -4
- package/dist/{chunk-B3Y3473H.js → chunk-PZ7ME5V7.js} +3 -3
- package/dist/{chunk-AEYHCV5C.js → chunk-Q3RCWX2V.js} +13 -13
- package/dist/{chunk-VUP3OKAX.js → chunk-RHNOBI2K.js} +2 -2
- package/dist/{chunk-MSONNUK7.js → chunk-SDEFRW55.js} +3 -3
- package/dist/{chunk-HYTMHT2T.js → chunk-VF5FCMYP.js} +10 -10
- package/dist/{chunk-GJNSMGG3.js → chunk-W5OYMBI4.js} +2 -2
- package/dist/{chunk-BDLPFPQ7.js → chunk-WFMX76ZE.js} +2 -2
- package/dist/{chunk-BDLPFPQ7.js.map → chunk-WFMX76ZE.js.map} +1 -1
- package/dist/{chunk-NELIM5IE.js → chunk-Y4SDY4QO.js} +3 -3
- package/dist/{chunk-RJ6LXKXJ.js → chunk-YT4VNDQ2.js} +7 -7
- package/dist/{cleanup-55OGHQDD.js → cleanup-VRKJIOXT.js} +11 -11
- package/dist/cli.js +90 -47
- package/dist/cli.js.map +1 -1
- package/dist/{codex-trust-REI3BIGY.js → codex-trust-XCV5OHMG.js} +4 -4
- package/dist/daemon.js +91 -40
- package/dist/daemon.js.map +1 -1
- package/dist/dispatcher-HUV4DYYE.js +22 -0
- package/dist/{embeddings-JP3QJXH3.js → embeddings-YKZANK7C.js} +5 -5
- package/dist/ingest-2TYIQROR.js +20 -0
- package/dist/{keychain-6KYNSQNM.js → keychain-746HEAXS.js} +3 -3
- package/dist/mcp.js +15 -15
- package/dist/{memory-value-2JMNGF6K.js → memory-value-SXEC6554.js} +11 -11
- package/dist/{provenance-7HFGC5YG.js → provenance-DRMEP2U3.js} +9 -9
- package/dist/quality-XWGXAAAF.js +25 -0
- package/dist/retrieval-PHBJ7KCQ.js +15 -0
- package/dist/{store-ZZ3D7T6Q.js → store-J4EGEE3V.js} +4 -4
- package/dist/sync-server.js +2 -2
- package/dist/{tasks-YXZSJ4VS.js → tasks-46FRZS5E.js} +11 -11
- package/dist/{usage-QGFPQ47H.js → usage-OKPSUXLK.js} +4 -4
- package/package.json +1 -1
- package/dist/dispatcher-WDO675ZZ.js +0 -22
- package/dist/ingest-223V4GBH.js +0 -20
- package/dist/quality-NOUPZBPR.js +0 -25
- package/dist/retrieval-NOHQIQIJ.js +0 -15
- /package/dist/{chunk-QPFSU57E.js.map → chunk-26L3VPS2.js.map} +0 -0
- /package/dist/{chunk-5XIMY5B6.js.map → chunk-2WUTNYQG.js.map} +0 -0
- /package/dist/{chunk-T76BHBJD.js.map → chunk-4USUZRZ3.js.map} +0 -0
- /package/dist/{chunk-T3HE4QJW.js.map → chunk-6PNQCUGC.js.map} +0 -0
- /package/dist/{chunk-55L2KDQE.js.map → chunk-7WM3F5OZ.js.map} +0 -0
- /package/dist/{chunk-E6532GTG.js.map → chunk-7YGNSCHC.js.map} +0 -0
- /package/dist/{chunk-X2SVAAFV.js.map → chunk-B4OWLDI2.js.map} +0 -0
- /package/dist/{chunk-PI4VEC7V.js.map → chunk-DNTUXT2R.js.map} +0 -0
- /package/dist/{chunk-E2LPE3NE.js.map → chunk-PX5I35LA.js.map} +0 -0
- /package/dist/{chunk-B3Y3473H.js.map → chunk-PZ7ME5V7.js.map} +0 -0
- /package/dist/{chunk-AEYHCV5C.js.map → chunk-Q3RCWX2V.js.map} +0 -0
- /package/dist/{chunk-VUP3OKAX.js.map → chunk-RHNOBI2K.js.map} +0 -0
- /package/dist/{chunk-MSONNUK7.js.map → chunk-SDEFRW55.js.map} +0 -0
- /package/dist/{chunk-HYTMHT2T.js.map → chunk-VF5FCMYP.js.map} +0 -0
- /package/dist/{chunk-GJNSMGG3.js.map → chunk-W5OYMBI4.js.map} +0 -0
- /package/dist/{chunk-NELIM5IE.js.map → chunk-Y4SDY4QO.js.map} +0 -0
- /package/dist/{chunk-RJ6LXKXJ.js.map → chunk-YT4VNDQ2.js.map} +0 -0
- /package/dist/{cleanup-55OGHQDD.js.map → cleanup-VRKJIOXT.js.map} +0 -0
- /package/dist/{codex-trust-REI3BIGY.js.map → codex-trust-XCV5OHMG.js.map} +0 -0
- /package/dist/{dispatcher-WDO675ZZ.js.map → dispatcher-HUV4DYYE.js.map} +0 -0
- /package/dist/{embeddings-JP3QJXH3.js.map → embeddings-YKZANK7C.js.map} +0 -0
- /package/dist/{ingest-223V4GBH.js.map → ingest-2TYIQROR.js.map} +0 -0
- /package/dist/{keychain-6KYNSQNM.js.map → keychain-746HEAXS.js.map} +0 -0
- /package/dist/{memory-value-2JMNGF6K.js.map → memory-value-SXEC6554.js.map} +0 -0
- /package/dist/{provenance-7HFGC5YG.js.map → provenance-DRMEP2U3.js.map} +0 -0
- /package/dist/{quality-NOUPZBPR.js.map → quality-XWGXAAAF.js.map} +0 -0
- /package/dist/{retrieval-NOHQIQIJ.js.map → retrieval-PHBJ7KCQ.js.map} +0 -0
- /package/dist/{store-ZZ3D7T6Q.js.map → store-J4EGEE3V.js.map} +0 -0
- /package/dist/{tasks-YXZSJ4VS.js.map → tasks-46FRZS5E.js.map} +0 -0
- /package/dist/{usage-QGFPQ47H.js.map → usage-OKPSUXLK.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -55,14 +55,14 @@ import {
|
|
|
55
55
|
unregisterStrayApps,
|
|
56
56
|
verifyBackupIntegrity,
|
|
57
57
|
writeRepoContextArtifact
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-Q3RCWX2V.js";
|
|
59
59
|
import {
|
|
60
60
|
hasCommand,
|
|
61
61
|
installCodexHooks,
|
|
62
62
|
resolveCodexHookTargets,
|
|
63
63
|
resolveUserHomeDir,
|
|
64
64
|
uninstallCodexHooks
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-Y4SDY4QO.js";
|
|
66
66
|
import {
|
|
67
67
|
closeDb,
|
|
68
68
|
cloudQueryStatus,
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
startEvalSession,
|
|
108
108
|
summarizeValueRetrievalEval,
|
|
109
109
|
togglePolicy
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-VF5FCMYP.js";
|
|
111
111
|
import {
|
|
112
112
|
autoResolveContradictions,
|
|
113
113
|
computeAllHealthScores,
|
|
@@ -120,10 +120,10 @@ import {
|
|
|
120
120
|
processCorrection,
|
|
121
121
|
processReviewFeedback,
|
|
122
122
|
resolveContradiction
|
|
123
|
-
} from "./chunk-
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
126
|
-
import "./chunk-
|
|
123
|
+
} from "./chunk-B4OWLDI2.js";
|
|
124
|
+
import "./chunk-YT4VNDQ2.js";
|
|
125
|
+
import "./chunk-RHNOBI2K.js";
|
|
126
|
+
import "./chunk-7YGNSCHC.js";
|
|
127
127
|
import {
|
|
128
128
|
confirmMemory,
|
|
129
129
|
createMemory,
|
|
@@ -137,9 +137,9 @@ import {
|
|
|
137
137
|
recordAudit,
|
|
138
138
|
rejectMemory,
|
|
139
139
|
rollbackMemory
|
|
140
|
-
} from "./chunk-
|
|
141
|
-
import "./chunk-
|
|
142
|
-
import "./chunk-
|
|
140
|
+
} from "./chunk-7WM3F5OZ.js";
|
|
141
|
+
import "./chunk-PZ7ME5V7.js";
|
|
142
|
+
import "./chunk-26L3VPS2.js";
|
|
143
143
|
import {
|
|
144
144
|
bootstrapEmbeddings,
|
|
145
145
|
ensureEmbeddingProviderReady,
|
|
@@ -153,25 +153,25 @@ import {
|
|
|
153
153
|
semanticSearch,
|
|
154
154
|
upsertMemoryFtsRow,
|
|
155
155
|
verifyEmbeddings
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-PX5I35LA.js";
|
|
157
157
|
import {
|
|
158
158
|
deleteApiKey,
|
|
159
159
|
hasKeychainApiKey,
|
|
160
160
|
init_keychain,
|
|
161
161
|
init_outbound_url,
|
|
162
162
|
normalizeSyncRemoteUrl
|
|
163
|
-
} from "./chunk-
|
|
164
|
-
import "./chunk-
|
|
163
|
+
} from "./chunk-W5OYMBI4.js";
|
|
164
|
+
import "./chunk-SDEFRW55.js";
|
|
165
165
|
import {
|
|
166
166
|
and,
|
|
167
167
|
eq,
|
|
168
168
|
gt,
|
|
169
169
|
memories,
|
|
170
170
|
syncState
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-4USUZRZ3.js";
|
|
172
172
|
import {
|
|
173
173
|
init_define_RECALL_BUILD_INFO
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-WFMX76ZE.js";
|
|
175
175
|
|
|
176
176
|
// src/cli.ts
|
|
177
177
|
init_define_RECALL_BUILD_INFO();
|
|
@@ -441,7 +441,7 @@ function registerCloudQueryCommands(program2) {
|
|
|
441
441
|
|
|
442
442
|
// src/cli.ts
|
|
443
443
|
import { resolve as resolve4 } from "path";
|
|
444
|
-
import { writeFileSync, readFileSync as
|
|
444
|
+
import { writeFileSync, readFileSync as readFileSync4, realpathSync } from "fs";
|
|
445
445
|
import { join as join5 } from "path";
|
|
446
446
|
|
|
447
447
|
// src/ump/serve.ts
|
|
@@ -1220,7 +1220,7 @@ async function runReliabilityProbe(db, options = {}) {
|
|
|
1220
1220
|
|
|
1221
1221
|
// src/setup/local.ts
|
|
1222
1222
|
init_define_RECALL_BUILD_INFO();
|
|
1223
|
-
import { existsSync } from "fs";
|
|
1223
|
+
import { existsSync, readFileSync as readFileSync2 } from "fs";
|
|
1224
1224
|
import { execFileSync } from "child_process";
|
|
1225
1225
|
import { basename, dirname as dirname2, join as join3, resolve as resolve2 } from "path";
|
|
1226
1226
|
import { fileURLToPath } from "url";
|
|
@@ -1312,7 +1312,9 @@ function runRecallSetup(opts = {}) {
|
|
|
1312
1312
|
scope,
|
|
1313
1313
|
uninstallHooks,
|
|
1314
1314
|
promptInjection: opts.promptInjection,
|
|
1315
|
-
claudeMd: claudeMdEnabled
|
|
1315
|
+
claudeMd: claudeMdEnabled,
|
|
1316
|
+
mcpTransport: opts.mcpTransport,
|
|
1317
|
+
mcpUrl: recallMcpUrl(opts.daemonPort)
|
|
1316
1318
|
})
|
|
1317
1319
|
);
|
|
1318
1320
|
return {
|
|
@@ -1408,25 +1410,29 @@ function configureMcp(agent, options) {
|
|
|
1408
1410
|
if (options.dryRun) {
|
|
1409
1411
|
return ok(describeCodexTargets("would configure global Codex MCP server", targets));
|
|
1410
1412
|
}
|
|
1413
|
+
const transports = /* @__PURE__ */ new Set();
|
|
1411
1414
|
for (const target of targets) {
|
|
1412
1415
|
const env = { ...process.env, CODEX_HOME: target.home };
|
|
1416
|
+
const transport2 = options.mcpTransport ?? registeredCodexTransport(target.configPath) ?? "stdio";
|
|
1417
|
+
transports.add(transport2);
|
|
1413
1418
|
tryRun(options.runner, "codex", ["mcp", "remove", "recall"], { env });
|
|
1414
1419
|
options.runner(
|
|
1415
1420
|
"codex",
|
|
1416
|
-
["mcp", "add", "recall", "--", options.paths.runtimeNodePath, options.paths.runtimeMcpPath],
|
|
1421
|
+
transport2 === "http" ? ["mcp", "add", "recall", "--url", options.mcpUrl] : ["mcp", "add", "recall", "--", options.paths.runtimeNodePath, options.paths.runtimeMcpPath],
|
|
1417
1422
|
{ env }
|
|
1418
1423
|
);
|
|
1419
1424
|
}
|
|
1420
|
-
return ok(describeCodexTargets(
|
|
1425
|
+
return ok(describeCodexTargets(`configured global Codex MCP server (${[...transports].join(", ")})`, targets));
|
|
1421
1426
|
}
|
|
1422
1427
|
if (!hasCommand("claude")) return skipped("claude not found on PATH");
|
|
1423
1428
|
const claudeScope = options.scope === "project" ? "project" : "user";
|
|
1424
1429
|
if (options.dryRun) {
|
|
1425
1430
|
return ok(`would configure ${claudeScope} Claude MCP server`);
|
|
1426
1431
|
}
|
|
1432
|
+
const transport = options.mcpTransport ?? (claudeScope === "user" ? registeredClaudeTransport() : void 0) ?? "stdio";
|
|
1427
1433
|
tryRun(options.runner, "claude", ["mcp", "remove", "recall", "-s", claudeScope]);
|
|
1428
|
-
options.runner("claude", ["mcp", "add", "-s", claudeScope, "recall", options.paths.runtimeNodePath, options.paths.runtimeMcpPath]);
|
|
1429
|
-
return ok(`configured ${claudeScope} Claude MCP server`);
|
|
1434
|
+
options.runner("claude", transport === "http" ? ["mcp", "add", "--transport", "http", "-s", claudeScope, "recall", options.mcpUrl] : ["mcp", "add", "-s", claudeScope, "recall", options.paths.runtimeNodePath, options.paths.runtimeMcpPath]);
|
|
1435
|
+
return ok(`configured ${claudeScope} Claude MCP server (${transport})`);
|
|
1430
1436
|
}
|
|
1431
1437
|
function configureHooks(agent, options) {
|
|
1432
1438
|
const codexTargets = agent === "codex" ? options.scope === "project" ? [{
|
|
@@ -1515,6 +1521,37 @@ function ok(message) {
|
|
|
1515
1521
|
function skipped(message) {
|
|
1516
1522
|
return { enabled: false, ok: false, message };
|
|
1517
1523
|
}
|
|
1524
|
+
function recallMcpUrl(port) {
|
|
1525
|
+
const resolved = port ?? Number.parseInt(process.env.RECALL_PORT ?? "7890", 10);
|
|
1526
|
+
return `http://127.0.0.1:${resolved}/mcp`;
|
|
1527
|
+
}
|
|
1528
|
+
function registeredCodexTransport(configPath) {
|
|
1529
|
+
let raw;
|
|
1530
|
+
try {
|
|
1531
|
+
raw = readFileSync2(configPath, "utf8");
|
|
1532
|
+
} catch {
|
|
1533
|
+
return void 0;
|
|
1534
|
+
}
|
|
1535
|
+
const start = raw.search(/^\[mcp_servers\.recall\]\s*$/m);
|
|
1536
|
+
if (start < 0) return void 0;
|
|
1537
|
+
const rest = raw.slice(start).split(/\r?\n/).slice(1);
|
|
1538
|
+
const end = rest.findIndex((line) => /^\s*\[/.test(line));
|
|
1539
|
+
const block = (end < 0 ? rest : rest.slice(0, end)).join("\n");
|
|
1540
|
+
if (/^\s*url\s*=/m.test(block)) return "http";
|
|
1541
|
+
if (/^\s*command\s*=/m.test(block)) return "stdio";
|
|
1542
|
+
return void 0;
|
|
1543
|
+
}
|
|
1544
|
+
function registeredClaudeTransport(homeDir = resolveUserHomeDir()) {
|
|
1545
|
+
try {
|
|
1546
|
+
const parsed = JSON.parse(readFileSync2(join3(homeDir, ".claude.json"), "utf8"));
|
|
1547
|
+
const entry = parsed.mcpServers?.recall;
|
|
1548
|
+
if (!entry) return void 0;
|
|
1549
|
+
if (entry.type === "http" || entry.url && !entry.command) return "http";
|
|
1550
|
+
return "stdio";
|
|
1551
|
+
} catch {
|
|
1552
|
+
return void 0;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1518
1555
|
|
|
1519
1556
|
// src/cli.ts
|
|
1520
1557
|
import { createRequire } from "module";
|
|
@@ -1525,7 +1562,7 @@ init_define_RECALL_BUILD_INFO();
|
|
|
1525
1562
|
import { execFileSync as execFileSync2 } from "child_process";
|
|
1526
1563
|
import {
|
|
1527
1564
|
existsSync as existsSync2,
|
|
1528
|
-
readFileSync as
|
|
1565
|
+
readFileSync as readFileSync3,
|
|
1529
1566
|
readdirSync,
|
|
1530
1567
|
rmSync as rmSync2,
|
|
1531
1568
|
rmdirSync
|
|
@@ -1702,7 +1739,7 @@ function findGeneratedContextArtifacts(repoRoots) {
|
|
|
1702
1739
|
function isGeneratedContext(path) {
|
|
1703
1740
|
if (!existsSync2(path)) return false;
|
|
1704
1741
|
try {
|
|
1705
|
-
return
|
|
1742
|
+
return readFileSync3(path, "utf8").startsWith(GENERATED_CONTEXT_MARKER);
|
|
1706
1743
|
} catch {
|
|
1707
1744
|
return false;
|
|
1708
1745
|
}
|
|
@@ -1903,7 +1940,7 @@ program.command("doctor").description("Show local Recall runtime, DB, embedding,
|
|
|
1903
1940
|
const finalReport = opts.fix ? getDoctorReport() : report;
|
|
1904
1941
|
const codexEntry = finalReport.agents.find((agent) => agent.agent === "codex" && agent.detected);
|
|
1905
1942
|
if (codexEntry) {
|
|
1906
|
-
const { inspectCodexTrust } = await import("./codex-trust-
|
|
1943
|
+
const { inspectCodexTrust } = await import("./codex-trust-XCV5OHMG.js");
|
|
1907
1944
|
codexEntry.hook_trust = await inspectCodexTrust();
|
|
1908
1945
|
}
|
|
1909
1946
|
if (opts.json) {
|
|
@@ -1996,7 +2033,11 @@ dataCmd.command("purge").description("Permanently erase local Recall data, crede
|
|
|
1996
2033
|
if (result.failures > 0) process.exitCode = 1;
|
|
1997
2034
|
});
|
|
1998
2035
|
var setupCmd = program.command("setup").description("Setup Recall for local use");
|
|
1999
|
-
setupCmd.option("--app-path <path>", "Override Recall.app path", defaultRecallAppPath()).option("--hooks-only", "Install hooks only").option("--mcp-only", "Install MCP wiring only").option("--agent <agent>", "Restrict setup to a single agent (repeatable)", collectAgents, []).option("--uninstall-hooks", "Remove Recall-managed hooks while leaving MCP configured").option("--dry-run", "Show planned setup changes without writing").option("--scope <scope>", "Hook config scope: global or project", "global").option("--no-prompt-injection", "Opt out of per-prompt memory injection (writes RECALL_HOOK_INJECT_PROMPT=false inline into the agent hook command)").option("--no-claude-md", "Skip installing the managed CLAUDE.md memory-override block for Claude Code (the block stops Claude's built-in auto-memory from racing Recall)").option("--yes", "Skip confirmation prompt").action(async (opts) => {
|
|
2036
|
+
setupCmd.option("--app-path <path>", "Override Recall.app path", defaultRecallAppPath()).option("--hooks-only", "Install hooks only").option("--mcp-only", "Install MCP wiring only").option("--agent <agent>", "Restrict setup to a single agent (repeatable)", collectAgents, []).option("--uninstall-hooks", "Remove Recall-managed hooks while leaving MCP configured").option("--dry-run", "Show planned setup changes without writing").option("--scope <scope>", "Hook config scope: global or project", "global").option("--no-prompt-injection", "Opt out of per-prompt memory injection (writes RECALL_HOOK_INJECT_PROMPT=false inline into the agent hook command)").option("--no-claude-md", "Skip installing the managed CLAUDE.md memory-override block for Claude Code (the block stops Claude's built-in auto-memory from racing Recall)").option("--mcp-transport <transport>", "How Codex and Claude Code reach Recall: stdio (one process per chat) or http (the daemon's shared endpoint). Default: keep the current registration").option("--daemon-port <port>", "Daemon port used by --mcp-transport http", process.env.RECALL_PORT ?? "7890").option("--yes", "Skip confirmation prompt").action(async (opts) => {
|
|
2037
|
+
if (opts.mcpTransport !== void 0 && opts.mcpTransport !== "stdio" && opts.mcpTransport !== "http") {
|
|
2038
|
+
console.error("--mcp-transport must be stdio or http");
|
|
2039
|
+
process.exit(1);
|
|
2040
|
+
}
|
|
2000
2041
|
if (!opts.yes && !opts.dryRun) {
|
|
2001
2042
|
const confirmed = await confirmSetupWrite(opts.scope);
|
|
2002
2043
|
if (!confirmed) {
|
|
@@ -2006,6 +2047,8 @@ setupCmd.option("--app-path <path>", "Override Recall.app path", defaultRecallAp
|
|
|
2006
2047
|
}
|
|
2007
2048
|
const result = runRecallSetup({
|
|
2008
2049
|
appPath: opts.appPath,
|
|
2050
|
+
mcpTransport: opts.mcpTransport,
|
|
2051
|
+
daemonPort: Number.parseInt(opts.daemonPort, 10),
|
|
2009
2052
|
agent: opts.agent.length > 0 ? opts.agent : void 0,
|
|
2010
2053
|
dryRun: opts.dryRun,
|
|
2011
2054
|
hooksOnly: opts.hooksOnly,
|
|
@@ -2483,7 +2526,7 @@ program.command("export").description("Export memories as markdown instruction f
|
|
|
2483
2526
|
console.error(`Could not resolve local repo path for ${opts.repo}`);
|
|
2484
2527
|
process.exit(1);
|
|
2485
2528
|
}
|
|
2486
|
-
content =
|
|
2529
|
+
content = readFileSync4(artifact.output_path, "utf-8");
|
|
2487
2530
|
if (!opts.output) {
|
|
2488
2531
|
console.log(content);
|
|
2489
2532
|
return;
|
|
@@ -2632,7 +2675,7 @@ evalCmd.command("value-retrieval").description("Run retrieval eval cases synthes
|
|
|
2632
2675
|
});
|
|
2633
2676
|
let snapshot = null;
|
|
2634
2677
|
if (opts.snapshot) {
|
|
2635
|
-
const { computeQualityReport, recordQualitySnapshot } = await import("./quality-
|
|
2678
|
+
const { computeQualityReport, recordQualitySnapshot } = await import("./quality-XWGXAAAF.js");
|
|
2636
2679
|
const qualityReport = computeQualityReport(db, { sinceIso: report.since });
|
|
2637
2680
|
snapshot = recordQualitySnapshot(
|
|
2638
2681
|
db,
|
|
@@ -3161,15 +3204,15 @@ uiCmd.command("status").description("Show WebUI status").option("--daemon-port <
|
|
|
3161
3204
|
var graphCmd = program.command("graph").description("Inspect and rebuild the knowledge graph (entities + relations)");
|
|
3162
3205
|
graphCmd.command("stats").description("Show entity/relation counts").action(async () => {
|
|
3163
3206
|
const db = initDb();
|
|
3164
|
-
const { countEntities, countRelations } = await import("./store-
|
|
3207
|
+
const { countEntities, countRelations } = await import("./store-J4EGEE3V.js");
|
|
3165
3208
|
console.log(`entities: ${countEntities(db)}`);
|
|
3166
3209
|
console.log(`relations: ${countRelations(db)}`);
|
|
3167
3210
|
});
|
|
3168
3211
|
graphCmd.command("backfill").description("Run the heuristic extractor over every active memory (idempotent)").option("--repo <repo>", "Limit to a single repo").option("--limit <n>", "Cap rows processed", "10000").option("--rebuild", "Clear all existing entities/relations first, then re-extract").action(async (opts) => {
|
|
3169
3212
|
const db = initDb();
|
|
3170
|
-
const { ingestMemoryHeuristic } = await import("./ingest-
|
|
3213
|
+
const { ingestMemoryHeuristic } = await import("./ingest-2TYIQROR.js");
|
|
3171
3214
|
if (opts.rebuild) {
|
|
3172
|
-
const { clearGraph } = await import("./store-
|
|
3215
|
+
const { clearGraph } = await import("./store-J4EGEE3V.js");
|
|
3173
3216
|
clearGraph(db);
|
|
3174
3217
|
console.log("Cleared existing graph entities and relations.");
|
|
3175
3218
|
}
|
|
@@ -3191,7 +3234,7 @@ graphCmd.command("backfill").description("Run the heuristic extractor over every
|
|
|
3191
3234
|
});
|
|
3192
3235
|
graphCmd.command("entities").description("List entities").option("--repo <repo>", "Filter by repo").option("--kind <kind>", "Filter by entity kind").option("--search <q>", "Substring filter on name").option("--limit <n>", "Max rows", "50").action(async (opts) => {
|
|
3193
3236
|
const db = initDb();
|
|
3194
|
-
const { listEntities } = await import("./store-
|
|
3237
|
+
const { listEntities } = await import("./store-J4EGEE3V.js");
|
|
3195
3238
|
const rows = listEntities(db, {
|
|
3196
3239
|
repo: opts.repo,
|
|
3197
3240
|
kind: opts.kind,
|
|
@@ -3210,8 +3253,8 @@ graphCmd.command("entities").description("List entities").option("--repo <repo>"
|
|
|
3210
3253
|
});
|
|
3211
3254
|
graphCmd.command("query <query...>").description("Run graph-aware retrieval for a query").option("--repo <repo>", "Restrict to repo").option("--hops <n>", "Graph hops", "2").option("--limit <n>", "Max hits", "10").action(async (queryTokens, opts) => {
|
|
3212
3255
|
const db = initDb();
|
|
3213
|
-
const { graphQuery } = await import("./retrieval-
|
|
3214
|
-
const { loadEmbeddingConfigFromEnv: loadEmbeddingConfigFromEnv2 } = await import("./embeddings-
|
|
3256
|
+
const { graphQuery } = await import("./retrieval-PHBJ7KCQ.js");
|
|
3257
|
+
const { loadEmbeddingConfigFromEnv: loadEmbeddingConfigFromEnv2 } = await import("./embeddings-YKZANK7C.js");
|
|
3215
3258
|
const embeddingConfig = loadEmbeddingConfigFromEnv2();
|
|
3216
3259
|
const result = await graphQuery(db, queryTokens.join(" "), embeddingConfig, {
|
|
3217
3260
|
repo: opts.repo,
|
|
@@ -3227,7 +3270,7 @@ graphCmd.command("query <query...>").description("Run graph-aware retrieval for
|
|
|
3227
3270
|
});
|
|
3228
3271
|
var maintenanceCmd = program.command("maintenance").description("Inspect and manage the delegated maintenance task queue");
|
|
3229
3272
|
maintenanceCmd.command("stats").description("Show backlog counts, completion stats, and mean latency").action(async () => {
|
|
3230
|
-
const { getTaskStats } = await import("./tasks-
|
|
3273
|
+
const { getTaskStats } = await import("./tasks-46FRZS5E.js");
|
|
3231
3274
|
const db = initDb();
|
|
3232
3275
|
const stats = getTaskStats(db);
|
|
3233
3276
|
console.log(`Total tasks: ${stats.total}`);
|
|
@@ -3253,7 +3296,7 @@ maintenanceCmd.command("stats").description("Show backlog counts, completion sta
|
|
|
3253
3296
|
}
|
|
3254
3297
|
});
|
|
3255
3298
|
maintenanceCmd.command("list").description("List tasks (default: pending)").option("-s, --status <status>", "pending|claimed|completed|abandoned", "pending").option("-k, --kind <kind>", "Filter by kind").option("-r, --repo <repo>", "Filter by repo").option("-n, --limit <n>", "Max entries", "20").action(async (opts) => {
|
|
3256
|
-
const { listTasks } = await import("./tasks-
|
|
3299
|
+
const { listTasks } = await import("./tasks-46FRZS5E.js");
|
|
3257
3300
|
const db = initDb();
|
|
3258
3301
|
const tasks = listTasks(db, {
|
|
3259
3302
|
status: opts.status,
|
|
@@ -3275,7 +3318,7 @@ maintenanceCmd.command("list").description("List tasks (default: pending)").opti
|
|
|
3275
3318
|
}
|
|
3276
3319
|
});
|
|
3277
3320
|
maintenanceCmd.command("drop").description("Delete a task by id (or id prefix)").argument("<task-id>", "Task id or prefix").action(async (taskIdArg) => {
|
|
3278
|
-
const { deleteTask, listTasks } = await import("./tasks-
|
|
3321
|
+
const { deleteTask, listTasks } = await import("./tasks-46FRZS5E.js");
|
|
3279
3322
|
const db = initDb();
|
|
3280
3323
|
const all = listTasks(db, { limit: 1e4 });
|
|
3281
3324
|
const matches = all.filter((t) => t.id === taskIdArg || t.id.startsWith(taskIdArg));
|
|
@@ -3294,7 +3337,7 @@ maintenanceCmd.command("drop").description("Delete a task by id (or id prefix)")
|
|
|
3294
3337
|
});
|
|
3295
3338
|
var credentialsCmd = maintenanceCmd.command("credentials").description("Manage LLM provider API keys in macOS Keychain (env fallback on other platforms)");
|
|
3296
3339
|
credentialsCmd.command("list", { isDefault: true }).description("Show which providers have credentials available").action(async () => {
|
|
3297
|
-
const { listCredentials } = await import("./keychain-
|
|
3340
|
+
const { listCredentials } = await import("./keychain-746HEAXS.js");
|
|
3298
3341
|
const creds = listCredentials();
|
|
3299
3342
|
if (creds.length === 0) {
|
|
3300
3343
|
console.log("No API keys configured. Set one with:");
|
|
@@ -3308,7 +3351,7 @@ credentialsCmd.command("list", { isDefault: true }).description("Show which prov
|
|
|
3308
3351
|
}
|
|
3309
3352
|
});
|
|
3310
3353
|
credentialsCmd.command("set").description("Store credentials for an LLM provider in the macOS Keychain").argument("<provider>", "openai|anthropic|azure").argument("[key]", "API key (prompts via stdin if omitted; required for openai/anthropic and for azure unless --stdin-json is used)").option("--endpoint <url>", "Azure OpenAI resource endpoint (e.g. https://myresource.openai.azure.com)").option("--deployment <name>", "Azure OpenAI deployment name").option("--api-version <version>", "Azure OpenAI api-version (e.g. 2024-10-21)").option("--stdin-json", "Read the azure config (endpoint/deployment/api_version/key) as a JSON object from stdin").action(async (providerArg, keyArg, opts) => {
|
|
3311
|
-
const { setApiKey, setAzureConfig } = await import("./keychain-
|
|
3354
|
+
const { setApiKey, setAzureConfig } = await import("./keychain-746HEAXS.js");
|
|
3312
3355
|
const provider = providerArg === "azure" ? "azure-openai" : providerArg;
|
|
3313
3356
|
if (provider === "openai" || provider === "anthropic") {
|
|
3314
3357
|
const key = keyArg ?? await readStdinKey();
|
|
@@ -3370,7 +3413,7 @@ credentialsCmd.command("set").description("Store credentials for an LLM provider
|
|
|
3370
3413
|
process.exit(1);
|
|
3371
3414
|
});
|
|
3372
3415
|
credentialsCmd.command("clear").description("Remove provider credentials from the macOS Keychain").argument("<provider>", "openai|anthropic|azure").action(async (providerArg) => {
|
|
3373
|
-
const { deleteApiKey: deleteApiKey2 } = await import("./keychain-
|
|
3416
|
+
const { deleteApiKey: deleteApiKey2 } = await import("./keychain-746HEAXS.js");
|
|
3374
3417
|
const provider = providerArg === "azure" ? "azure-openai" : providerArg;
|
|
3375
3418
|
if (provider !== "openai" && provider !== "anthropic" && provider !== "azure-openai") {
|
|
3376
3419
|
console.error(`Provider must be "openai", "anthropic", or "azure", got "${providerArg}".`);
|
|
@@ -3381,8 +3424,8 @@ credentialsCmd.command("clear").description("Remove provider credentials from th
|
|
|
3381
3424
|
else console.log(`No ${provider} credentials found in Keychain.`);
|
|
3382
3425
|
});
|
|
3383
3426
|
maintenanceCmd.command("dispatch").description("Run the daemon-owned dispatcher once against pending maintenance tasks (requires a configured LLM provider)").option("--provider <provider>", "openai|anthropic|azure-openai (defaults to whichever is configured)").option("--model <model>", "Model override").option("--kind <kind>", "Restrict to a single task kind (repeatable)", (value, acc = []) => [...acc, value], []).option("--repo <repo>", "Restrict to a single repo").option("--max <n>", "Max tasks to run this round", "5").option("--dry-run", "Show which tasks would be dispatched; do not call the LLM").option("--preview", "Show the actual prompts that would be sent (no provider needed; no LLM call)").option("--json", "Emit the raw JSON report").action(async (opts) => {
|
|
3384
|
-
const { dispatchPendingTasks, formatDispatchReport, buildPrompt } = await import("./dispatcher-
|
|
3385
|
-
const { listTasks } = await import("./tasks-
|
|
3427
|
+
const { dispatchPendingTasks, formatDispatchReport, buildPrompt } = await import("./dispatcher-HUV4DYYE.js");
|
|
3428
|
+
const { listTasks } = await import("./tasks-46FRZS5E.js");
|
|
3386
3429
|
const db = initDb();
|
|
3387
3430
|
if (opts.preview) {
|
|
3388
3431
|
const pending = listTasks(db, {
|
|
@@ -3439,12 +3482,12 @@ ${p.prompt.max_output_tokens}
|
|
|
3439
3482
|
console.log(formatDispatchReport(report));
|
|
3440
3483
|
});
|
|
3441
3484
|
maintenanceCmd.command("quarantine-generated").description("Preview memories supported only by generated messages; preserve them outside injection").option("--apply", "Quarantine matching memories with reversible audit snapshots").action(async (opts) => {
|
|
3442
|
-
const { quarantineGeneratedMemories } = await import("./provenance-
|
|
3485
|
+
const { quarantineGeneratedMemories } = await import("./provenance-DRMEP2U3.js");
|
|
3443
3486
|
const ids = quarantineGeneratedMemories(initDb(), Boolean(opts.apply));
|
|
3444
3487
|
console.log(JSON.stringify({ applied: Boolean(opts.apply), count: ids.length, memory_ids: ids }, null, 2));
|
|
3445
3488
|
});
|
|
3446
3489
|
maintenanceCmd.command("cleanup").description("Run deterministic, LLM-free cleanup for duplicate, low-quality, stale, and mis-scoped memories").option("--apply", "Persist changes (default is dry-run)").option("--only <action>", "Restrict to one action: dedupe_exact_merge|reject_fragment_candidate|promote_repeat_correction|suppress_unproductive_command|globalize_cross_repo|reject_test_fixture_repo|reject_invalid_scope|reject_generic_scanned_tooling|reject_agent_authored").option("--revert <run-id>", "Revert a previous cleanup run (id or 8-char prefix)").option("--list", "List recent cleanup runs").option("--json", "Emit the raw JSON report").action(async (opts) => {
|
|
3447
|
-
const { runDeterministicCleanup, formatCleanupReport, revertCleanupRun, listCleanupRuns } = await import("./cleanup-
|
|
3490
|
+
const { runDeterministicCleanup, formatCleanupReport, revertCleanupRun, listCleanupRuns } = await import("./cleanup-VRKJIOXT.js");
|
|
3448
3491
|
const db = initDb();
|
|
3449
3492
|
if (opts.list) {
|
|
3450
3493
|
const runs = listCleanupRuns(db);
|
|
@@ -3498,7 +3541,7 @@ maintenanceCmd.command("quality").description("Show injection outcome distributi
|
|
|
3498
3541
|
recordQualitySnapshot,
|
|
3499
3542
|
listQualitySnapshots,
|
|
3500
3543
|
diffQualitySnapshots
|
|
3501
|
-
} = await import("./quality-
|
|
3544
|
+
} = await import("./quality-XWGXAAAF.js");
|
|
3502
3545
|
const db = initDb();
|
|
3503
3546
|
if (opts.history) {
|
|
3504
3547
|
const snaps = listQualitySnapshots(db);
|
|
@@ -3559,7 +3602,7 @@ maintenanceCmd.command("value-backfill").description("Backfill memory value even
|
|
|
3559
3602
|
const {
|
|
3560
3603
|
backfillMemoryValueEvents,
|
|
3561
3604
|
formatMemoryValueBackfillReport
|
|
3562
|
-
} = await import("./memory-value-
|
|
3605
|
+
} = await import("./memory-value-SXEC6554.js");
|
|
3563
3606
|
const db = initDb();
|
|
3564
3607
|
const report = backfillMemoryValueEvents(db, {
|
|
3565
3608
|
sinceIso: opts.since,
|
|
@@ -3572,7 +3615,7 @@ maintenanceCmd.command("value-backfill").description("Backfill memory value even
|
|
|
3572
3615
|
console.log(formatMemoryValueBackfillReport(report));
|
|
3573
3616
|
});
|
|
3574
3617
|
maintenanceCmd.command("usage").description("Summarize LLM API usage (tokens, cost) across recent maintenance runs").option("--since <iso>", "Window start (default: last 30 days)").option("--limit <n>", "Recent-call rows to show", "10").option("--json", "Emit raw JSON summary").action(async (opts) => {
|
|
3575
|
-
const { summarizeUsage, formatUsageReport } = await import("./usage-
|
|
3618
|
+
const { summarizeUsage, formatUsageReport } = await import("./usage-OKPSUXLK.js");
|
|
3576
3619
|
const db = initDb();
|
|
3577
3620
|
const summary = summarizeUsage(db, {
|
|
3578
3621
|
sinceIso: opts.since,
|