chat-recall 0.5.17 → 0.5.19
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/auto-update.d.ts +11 -0
- package/dist/auto-update.d.ts.map +1 -1
- package/dist/auto-update.js +50 -2
- package/dist/auto-update.js.map +1 -1
- package/dist/cli.js +125 -106
- package/dist/mcp.js +62 -41
- package/dist/watch.js +85 -66
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -4913,7 +4913,8 @@ function signInText(p, server) {
|
|
|
4913
4913
|
"",
|
|
4914
4914
|
`(If the link does not carry the code, enter it at ${p.verificationUri}.)`,
|
|
4915
4915
|
"",
|
|
4916
|
-
"Sign in with Google or GitHub and
|
|
4916
|
+
"Sign in with Google or GitHub and your free 7-day trial starts on the spot \u2014 no card.",
|
|
4917
|
+
"With an email address instead, confirm the 6-digit code we send and the trial starts then.",
|
|
4917
4918
|
"",
|
|
4918
4919
|
"Approving also finishes the setup for you: the chat-recall skills go into your AI",
|
|
4919
4920
|
"tools, the MCP is registered with them, and a background service starts shipping new",
|
|
@@ -7332,8 +7333,8 @@ var init_claude = __esm({
|
|
|
7332
7333
|
|
|
7333
7334
|
// ../engine/dist/transcript/gemini.js
|
|
7334
7335
|
async function parseGeminiTranscript(sessionPath) {
|
|
7335
|
-
const { readFileSync:
|
|
7336
|
-
return parseGeminiTranscriptText(
|
|
7336
|
+
const { readFileSync: readFileSync44 } = await import("fs");
|
|
7337
|
+
return parseGeminiTranscriptText(readFileSync44(sessionPath, "utf-8"));
|
|
7337
7338
|
}
|
|
7338
7339
|
function parseGeminiTranscriptText(text) {
|
|
7339
7340
|
let content;
|
|
@@ -7789,11 +7790,11 @@ async function archiveRawSession(store2, sessionId) {
|
|
|
7789
7790
|
return await store2.putRawSession(sessionId, exp.tool, Math.floor(exp.mtime), gz, size);
|
|
7790
7791
|
}
|
|
7791
7792
|
function detectForkPredecessor(sessionPath) {
|
|
7792
|
-
const { readFileSync:
|
|
7793
|
-
const { dirname:
|
|
7793
|
+
const { readFileSync: readFileSync44, readdirSync: readdirSync34 } = requireFs();
|
|
7794
|
+
const { dirname: dirname20, join: join53, basename: basename25 } = requirePath();
|
|
7794
7795
|
let text;
|
|
7795
7796
|
try {
|
|
7796
|
-
text =
|
|
7797
|
+
text = readFileSync44(sessionPath, "utf-8");
|
|
7797
7798
|
} catch {
|
|
7798
7799
|
return null;
|
|
7799
7800
|
}
|
|
@@ -7815,7 +7816,7 @@ function detectForkPredecessor(sessionPath) {
|
|
|
7815
7816
|
return null;
|
|
7816
7817
|
if (text.includes(`"uuid":"${headParent}"`))
|
|
7817
7818
|
return null;
|
|
7818
|
-
const dir =
|
|
7819
|
+
const dir = dirname20(sessionPath);
|
|
7819
7820
|
const self = basename25(sessionPath);
|
|
7820
7821
|
let entries;
|
|
7821
7822
|
try {
|
|
@@ -7827,7 +7828,7 @@ function detectForkPredecessor(sessionPath) {
|
|
|
7827
7828
|
if (!f.endsWith(".jsonl") || f === self || f === "sessions-index.json")
|
|
7828
7829
|
continue;
|
|
7829
7830
|
try {
|
|
7830
|
-
if (
|
|
7831
|
+
if (readFileSync44(join53(dir, f), "utf-8").includes(`"uuid":"${headParent}"`)) {
|
|
7831
7832
|
return basename25(f, ".jsonl");
|
|
7832
7833
|
}
|
|
7833
7834
|
} catch {
|
|
@@ -20629,7 +20630,7 @@ var init_http = __esm({
|
|
|
20629
20630
|
CLI_VERSION = JSON.parse(readFileSync37(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION;
|
|
20630
20631
|
} catch {
|
|
20631
20632
|
try {
|
|
20632
|
-
if (true) CLI_VERSION = "0.5.
|
|
20633
|
+
if (true) CLI_VERSION = "0.5.19";
|
|
20633
20634
|
} catch {
|
|
20634
20635
|
}
|
|
20635
20636
|
}
|
|
@@ -21141,7 +21142,7 @@ var init_telemetry = __esm({
|
|
|
21141
21142
|
init_sync_client();
|
|
21142
21143
|
cliVersion2 = () => {
|
|
21143
21144
|
try {
|
|
21144
|
-
return true ? "0.5.
|
|
21145
|
+
return true ? "0.5.19" : "dev";
|
|
21145
21146
|
} catch {
|
|
21146
21147
|
return "dev";
|
|
21147
21148
|
}
|
|
@@ -21156,14 +21157,18 @@ var auto_update_exports = {};
|
|
|
21156
21157
|
__export(auto_update_exports, {
|
|
21157
21158
|
compareVersions: () => compareVersions,
|
|
21158
21159
|
executeAutoUpdate: () => executeAutoUpdate,
|
|
21160
|
+
installedVersion: () => installedVersion,
|
|
21159
21161
|
isAutoUpdateEnabled: () => isAutoUpdateEnabled,
|
|
21162
|
+
newerOf: () => newerOf,
|
|
21160
21163
|
planAutoUpdate: () => planAutoUpdate,
|
|
21161
21164
|
runAutoUpdate: () => runAutoUpdate,
|
|
21162
21165
|
tarballUrl: () => tarballUrl
|
|
21163
21166
|
});
|
|
21164
21167
|
import { execSync as execSync4 } from "node:child_process";
|
|
21168
|
+
import { readFileSync as readFileSync38 } from "node:fs";
|
|
21169
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
21165
21170
|
import { writeFileSync as writeFileSync9, mkdtempSync as mkdtempSync3 } from "node:fs";
|
|
21166
|
-
import { join as join48 } from "node:path";
|
|
21171
|
+
import { join as join48, dirname as dirname18 } from "node:path";
|
|
21167
21172
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
21168
21173
|
import { createHash as createHash13 } from "node:crypto";
|
|
21169
21174
|
function compareVersions(a, b) {
|
|
@@ -21180,6 +21185,20 @@ function isAutoUpdateEnabled(_edition, flag) {
|
|
|
21180
21185
|
if (flag === "1" || flag === "true" || flag === "on") return true;
|
|
21181
21186
|
return true;
|
|
21182
21187
|
}
|
|
21188
|
+
function newerOf(a, b) {
|
|
21189
|
+
if (!b) return a;
|
|
21190
|
+
if (!a) return b;
|
|
21191
|
+
return compareVersions(a, b) >= 0 ? a : b;
|
|
21192
|
+
}
|
|
21193
|
+
function installedVersion() {
|
|
21194
|
+
try {
|
|
21195
|
+
const here = dirname18(fileURLToPath2(import.meta.url));
|
|
21196
|
+
const raw = readFileSync38(join48(here, "..", "package.json"), "utf-8");
|
|
21197
|
+
return JSON.parse(raw).version || null;
|
|
21198
|
+
} catch {
|
|
21199
|
+
return null;
|
|
21200
|
+
}
|
|
21201
|
+
}
|
|
21183
21202
|
function planAutoUpdate(base, caps, ownVersion2, flag) {
|
|
21184
21203
|
const rel = caps.cli;
|
|
21185
21204
|
if (!rel || !rel.version || !rel.sha256) return { update: false, reason: "server advertises no CLI release" };
|
|
@@ -21237,7 +21256,8 @@ async function runAutoUpdate(base, authHeaders, ownVersion2, deps) {
|
|
|
21237
21256
|
} catch (e) {
|
|
21238
21257
|
return { updated: false, reason: `capabilities unreachable: ${e instanceof Error ? e.message : e}` };
|
|
21239
21258
|
}
|
|
21240
|
-
const
|
|
21259
|
+
const effectiveOwn = newerOf(ownVersion2, installedVersion());
|
|
21260
|
+
const plan = planAutoUpdate(base, caps, effectiveOwn, process.env.CHAT_RECALL_AUTO_UPDATE);
|
|
21241
21261
|
if (!plan.update) return { updated: false, reason: plan.reason };
|
|
21242
21262
|
const result = await executeAutoUpdate(plan, {
|
|
21243
21263
|
download: deps?.download ?? realDownload,
|
|
@@ -21289,11 +21309,11 @@ __export(sync_client_exports, {
|
|
|
21289
21309
|
syncIncremental: () => syncIncremental,
|
|
21290
21310
|
syncSessions: () => syncSessions
|
|
21291
21311
|
});
|
|
21292
|
-
import { join as join49, dirname as
|
|
21293
|
-
import { readFileSync as
|
|
21312
|
+
import { join as join49, dirname as dirname19, basename as basename23 } from "node:path";
|
|
21313
|
+
import { readFileSync as readFileSync39, writeFileSync as writeFileSync10, mkdirSync as mkdirSync11, mkdtempSync as mkdtempSync4, rmSync as rmSync5, chmodSync as chmodSync5, unlinkSync as unlinkSync3, readdirSync as readdirSync32, statSync as statSync41 } from "node:fs";
|
|
21294
21314
|
import { tmpdir as tmpdir3, hostname as hostname2 } from "node:os";
|
|
21295
21315
|
import { createHash as createHash14 } from "node:crypto";
|
|
21296
|
-
import { fileURLToPath as
|
|
21316
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
21297
21317
|
import { gzipSync as gzipSync3 } from "zlib";
|
|
21298
21318
|
function classifyError(msg) {
|
|
21299
21319
|
const m = msg.toLowerCase();
|
|
@@ -21310,7 +21330,7 @@ function classifyError(msg) {
|
|
|
21310
21330
|
}
|
|
21311
21331
|
function saveCredentials(c) {
|
|
21312
21332
|
assertTransportSafe(c.serverUrl);
|
|
21313
|
-
mkdirSync11(
|
|
21333
|
+
mkdirSync11(dirname19(credPath()), { recursive: true });
|
|
21314
21334
|
const targets = loadAllCredentials().filter((t) => t.serverUrl !== c.serverUrl);
|
|
21315
21335
|
targets.unshift(c);
|
|
21316
21336
|
writeFileSync10(credPath(), JSON.stringify({ targets }, null, 2));
|
|
@@ -21330,7 +21350,7 @@ function loadAllCredentials() {
|
|
|
21330
21350
|
const fromEnv = envCredentials();
|
|
21331
21351
|
if (fromEnv) return [{ serverUrl: fromEnv.serverUrl, token: fromEnv.token }];
|
|
21332
21352
|
try {
|
|
21333
|
-
const parsed = JSON.parse(
|
|
21353
|
+
const parsed = JSON.parse(readFileSync39(credPath(), "utf-8"));
|
|
21334
21354
|
if (Array.isArray(parsed?.targets)) return parsed.targets.filter((t) => t?.serverUrl).map((t) => ({ serverUrl: t.serverUrl, token: t.token || "" }));
|
|
21335
21355
|
if (parsed?.serverUrl) return [{ serverUrl: parsed.serverUrl, token: parsed.token || "" }];
|
|
21336
21356
|
} catch {
|
|
@@ -21396,7 +21416,7 @@ function syncConfigCachePath() {
|
|
|
21396
21416
|
}
|
|
21397
21417
|
function readPersistedSyncConfigs() {
|
|
21398
21418
|
try {
|
|
21399
|
-
return JSON.parse(
|
|
21419
|
+
return JSON.parse(readFileSync39(syncConfigCachePath(), "utf-8"));
|
|
21400
21420
|
} catch {
|
|
21401
21421
|
return {};
|
|
21402
21422
|
}
|
|
@@ -21405,7 +21425,7 @@ function persistSyncConfig(base, config2) {
|
|
|
21405
21425
|
try {
|
|
21406
21426
|
const all = readPersistedSyncConfigs();
|
|
21407
21427
|
all[base] = { fetchedAt: Date.now(), config: config2 };
|
|
21408
|
-
mkdirSync11(
|
|
21428
|
+
mkdirSync11(dirname19(syncConfigCachePath()), { recursive: true });
|
|
21409
21429
|
writeFileSync10(syncConfigCachePath(), JSON.stringify(all, null, 2));
|
|
21410
21430
|
} catch {
|
|
21411
21431
|
}
|
|
@@ -22778,11 +22798,11 @@ var init_sync_client = __esm({
|
|
|
22778
22798
|
init_backends();
|
|
22779
22799
|
ownVersion = "0.0.0";
|
|
22780
22800
|
try {
|
|
22781
|
-
const dir =
|
|
22782
|
-
ownVersion = JSON.parse(
|
|
22801
|
+
const dir = dirname19(fileURLToPath3(import.meta.url));
|
|
22802
|
+
ownVersion = JSON.parse(readFileSync39(join49(dir, "../package.json"), "utf-8")).version || ownVersion;
|
|
22783
22803
|
} catch {
|
|
22784
22804
|
try {
|
|
22785
|
-
if (true) ownVersion = "0.5.
|
|
22805
|
+
if (true) ownVersion = "0.5.19";
|
|
22786
22806
|
} catch {
|
|
22787
22807
|
}
|
|
22788
22808
|
}
|
|
@@ -22813,7 +22833,7 @@ __export(client_events_exports, {
|
|
|
22813
22833
|
isTelemetryEnabled: () => isTelemetryEnabled,
|
|
22814
22834
|
reportClientEvent: () => reportClientEvent2
|
|
22815
22835
|
});
|
|
22816
|
-
import { readFileSync as
|
|
22836
|
+
import { readFileSync as readFileSync40 } from "node:fs";
|
|
22817
22837
|
function scrub(msg) {
|
|
22818
22838
|
if (!msg) return "";
|
|
22819
22839
|
const noHome = msg.replace(/\/(?:home|Users)\/[^/\s]+/g, "~");
|
|
@@ -22866,7 +22886,7 @@ var init_client_events = __esm({
|
|
|
22866
22886
|
init_secret_redactor();
|
|
22867
22887
|
CLI_VERSION2 = "0.0.0";
|
|
22868
22888
|
try {
|
|
22869
|
-
CLI_VERSION2 = JSON.parse(
|
|
22889
|
+
CLI_VERSION2 = JSON.parse(readFileSync40(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION2;
|
|
22870
22890
|
} catch {
|
|
22871
22891
|
}
|
|
22872
22892
|
}
|
|
@@ -22879,11 +22899,11 @@ __export(update_notice_exports, {
|
|
|
22879
22899
|
refreshUpdateCheck: () => refreshUpdateCheck,
|
|
22880
22900
|
updateNotice: () => updateNotice2
|
|
22881
22901
|
});
|
|
22882
|
-
import { readFileSync as
|
|
22902
|
+
import { readFileSync as readFileSync41, writeFileSync as writeFileSync11 } from "node:fs";
|
|
22883
22903
|
import { join as join50 } from "node:path";
|
|
22884
22904
|
function readCheck() {
|
|
22885
22905
|
try {
|
|
22886
|
-
const c = JSON.parse(
|
|
22906
|
+
const c = JSON.parse(readFileSync41(checkPath(), "utf-8"));
|
|
22887
22907
|
return c && typeof c.serverVersion === "string" ? c : null;
|
|
22888
22908
|
} catch {
|
|
22889
22909
|
return null;
|
|
@@ -22970,7 +22990,7 @@ __export(install_skills_exports, {
|
|
|
22970
22990
|
skillsSourceDir: () => skillsSourceDir,
|
|
22971
22991
|
uninstallSkills: () => uninstallSkills
|
|
22972
22992
|
});
|
|
22973
|
-
import { readdirSync as readdirSync33, existsSync as existsSync47, mkdirSync as mkdirSync12, rmSync as rmSync6, cpSync, writeFileSync as writeFileSync12, readFileSync as
|
|
22993
|
+
import { readdirSync as readdirSync33, existsSync as existsSync47, mkdirSync as mkdirSync12, rmSync as rmSync6, cpSync, writeFileSync as writeFileSync12, readFileSync as readFileSync42, statSync as statSync42, realpathSync as realpathSync4 } from "fs";
|
|
22974
22994
|
import { createHash as createHash15 } from "crypto";
|
|
22975
22995
|
import { join as join51, basename as basename24 } from "path";
|
|
22976
22996
|
function skillsSourceDir() {
|
|
@@ -22978,7 +22998,7 @@ function skillsSourceDir() {
|
|
|
22978
22998
|
}
|
|
22979
22999
|
function version() {
|
|
22980
23000
|
try {
|
|
22981
|
-
return JSON.parse(
|
|
23001
|
+
return JSON.parse(readFileSync42(new URL("../package.json", import.meta.url), "utf-8")).version || "0.0.0";
|
|
22982
23002
|
} catch {
|
|
22983
23003
|
return "0.0.0";
|
|
22984
23004
|
}
|
|
@@ -22989,7 +23009,7 @@ function skillsFingerprint() {
|
|
|
22989
23009
|
for (const name of bundledSkillNames()) {
|
|
22990
23010
|
for (const rel of filesUnder(join51(src, name)).sort()) {
|
|
22991
23011
|
h.update(name + "/" + rel);
|
|
22992
|
-
h.update(
|
|
23012
|
+
h.update(readFileSync42(join51(src, name, rel)));
|
|
22993
23013
|
}
|
|
22994
23014
|
}
|
|
22995
23015
|
return h.digest("hex").slice(0, 12);
|
|
@@ -23124,7 +23144,7 @@ function skillsNeedRefresh() {
|
|
|
23124
23144
|
const marker = join51(t.dir, name, MARKER);
|
|
23125
23145
|
if (!existsSync47(marker)) return true;
|
|
23126
23146
|
try {
|
|
23127
|
-
if (
|
|
23147
|
+
if (readFileSync42(marker, "utf-8").trim() !== cur) return true;
|
|
23128
23148
|
} catch {
|
|
23129
23149
|
return true;
|
|
23130
23150
|
}
|
|
@@ -23143,7 +23163,7 @@ function skillStatus() {
|
|
|
23143
23163
|
if (existsSync47(marker)) {
|
|
23144
23164
|
installed++;
|
|
23145
23165
|
try {
|
|
23146
|
-
ver =
|
|
23166
|
+
ver = readFileSync42(marker, "utf-8").trim();
|
|
23147
23167
|
} catch {
|
|
23148
23168
|
}
|
|
23149
23169
|
}
|
|
@@ -23183,9 +23203,9 @@ import { execSync as execSync5 } from "child_process";
|
|
|
23183
23203
|
import { existsSync as existsSync48, mkdirSync as mkdirSync13, rmSync as rmSync7, writeFileSync as writeFileSync13 } from "fs";
|
|
23184
23204
|
import { homedir as homedir17 } from "os";
|
|
23185
23205
|
import { join as join52 } from "path";
|
|
23186
|
-
import { fileURLToPath as
|
|
23206
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
23187
23207
|
function resolveDaemonPaths() {
|
|
23188
|
-
const watchJs =
|
|
23208
|
+
const watchJs = fileURLToPath4(new URL("./watch.js", import.meta.url));
|
|
23189
23209
|
const node = process.execPath;
|
|
23190
23210
|
const dataDir = join52(homedir17(), ".chat-recall");
|
|
23191
23211
|
const logFile = join52(dataDir, "watch.log");
|
|
@@ -23391,7 +23411,7 @@ var init_service_installer = __esm({
|
|
|
23391
23411
|
// src/mcp.ts
|
|
23392
23412
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
23393
23413
|
import { spawn as spawn3 } from "child_process";
|
|
23394
|
-
import { fileURLToPath as
|
|
23414
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
23395
23415
|
|
|
23396
23416
|
// ../engine/dist/mcp/tools.js
|
|
23397
23417
|
import { homedir as homedir6 } from "node:os";
|
|
@@ -25607,9 +25627,10 @@ Complements recall_memory_search: search finds candidates, this reads the specif
|
|
|
25607
25627
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
25608
25628
|
const result = await dispatchTool(request);
|
|
25609
25629
|
try {
|
|
25610
|
-
const
|
|
25611
|
-
const
|
|
25612
|
-
const
|
|
25630
|
+
const local = !isMultiTenant();
|
|
25631
|
+
const reported = local ? readCollectorHealth() : null;
|
|
25632
|
+
const health = local ? judgeHealth(reported) : { ok: true, summary: "" };
|
|
25633
|
+
const progress = local ? progressLine(reported) : null;
|
|
25613
25634
|
const state2 = await syncState();
|
|
25614
25635
|
const banners = [
|
|
25615
25636
|
health.ok ? null : `\u26A0 ${health.summary} Recent work may be missing from these answers. Tell the user, and suggest \`chat-recall doctor\`.`,
|
|
@@ -27865,9 +27886,9 @@ function openBrowser(url) {
|
|
|
27865
27886
|
// src/mcp.ts
|
|
27866
27887
|
init_client_events();
|
|
27867
27888
|
init_update_notice();
|
|
27868
|
-
import { readFileSync as
|
|
27889
|
+
import { readFileSync as readFileSync43 } from "node:fs";
|
|
27869
27890
|
setServerVersion(JSON.parse(
|
|
27870
|
-
|
|
27891
|
+
readFileSync43(new URL("../package.json", import.meta.url), "utf-8")
|
|
27871
27892
|
).version);
|
|
27872
27893
|
setEventReporter(reportClientEvent2);
|
|
27873
27894
|
setIndexRunner(runIndexChild2);
|
|
@@ -27886,7 +27907,7 @@ function startLoginChild(server) {
|
|
|
27886
27907
|
return new Promise((resolve3, reject) => {
|
|
27887
27908
|
let cliPath;
|
|
27888
27909
|
try {
|
|
27889
|
-
cliPath =
|
|
27910
|
+
cliPath = fileURLToPath5(new URL("./cli.js", import.meta.url));
|
|
27890
27911
|
} catch {
|
|
27891
27912
|
reject(new Error("could not locate the CLI entry point"));
|
|
27892
27913
|
return;
|
|
@@ -27937,7 +27958,7 @@ function runIndexChild2(force) {
|
|
|
27937
27958
|
return new Promise((resolve3) => {
|
|
27938
27959
|
let cliPath;
|
|
27939
27960
|
try {
|
|
27940
|
-
cliPath =
|
|
27961
|
+
cliPath = fileURLToPath5(new URL("./cli.js", import.meta.url));
|
|
27941
27962
|
} catch {
|
|
27942
27963
|
resolve3("Index unavailable: could not locate the CLI entry point.");
|
|
27943
27964
|
return;
|