chat-recall 0.7.74 → 0.7.76
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/README.md +0 -1
- package/dist/cli.js +23 -8
- package/dist/cli.js.map +1 -1
- package/dist/mcp.js +12 -5
- package/dist/raw-archive-parts.d.ts +8 -0
- package/dist/raw-archive-parts.d.ts.map +1 -1
- package/dist/raw-archive-parts.js +4 -2
- package/dist/raw-archive-parts.js.map +1 -1
- package/dist/sync-client.d.ts +7 -2
- package/dist/sync-client.d.ts.map +1 -1
- package/dist/sync-client.js +20 -5
- package/dist/sync-client.js.map +1 -1
- package/dist/watch.js +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/chat-recall)
|
|
5
5
|
[](https://www.npmjs.com/package/chat-recall)
|
|
6
6
|
[](https://registry.modelcontextprotocol.io/v0/servers?search=chat-recall)
|
|
7
|
-
[](https://smithery.ai/servers/munhq/chat-recall)
|
|
8
7
|
[](https://glama.ai/mcp/servers/munhq/chat-recall)
|
|
9
8
|
|
|
10
9
|
[](cursor://anysphere.cursor-deeplink/mcp/install?name=chat-recall&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIi1wIiwiY2hhdC1yZWNhbGwiLCJjaGF0LXJlY2FsbC1tY3AiXX0=)
|
package/dist/cli.js
CHANGED
|
@@ -29761,10 +29761,10 @@ async function writeArchiveFile(source, meta, redact, dir = tmpdir2()) {
|
|
|
29761
29761
|
for (const [i, f] of source.files.entries()) {
|
|
29762
29762
|
await write(`${i ? "," : ""}{"name":${JSON.stringify(f.name)},"text":"`);
|
|
29763
29763
|
const whole = () => source.kind === "memory" ? f.text : readFileSync39(f.path, "utf-8");
|
|
29764
|
-
if (!f.name.endsWith(".jsonl")) {
|
|
29764
|
+
if (source.kind !== "lines" && !f.name.endsWith(".jsonl")) {
|
|
29765
29765
|
await write(escapeJson(redact(whole())));
|
|
29766
29766
|
} else {
|
|
29767
|
-
const lines = source.kind === "memory" ? textLines(f.text) : fileLines(f.path);
|
|
29767
|
+
const lines = source.kind === "memory" ? textLines(f.text) : source.kind === "disk" ? fileLines(f.path) : f.lines();
|
|
29768
29768
|
for await (const line of lines) {
|
|
29769
29769
|
const nl = line.endsWith("\n");
|
|
29770
29770
|
const body2 = nl ? line.slice(0, -1) : line;
|
|
@@ -32116,8 +32116,8 @@ async function buildConversationSync(ref, mtime, opts = {}) {
|
|
|
32116
32116
|
source = { kind: "memory", files: container.files };
|
|
32117
32117
|
archiveMtime = container.mtime;
|
|
32118
32118
|
archiveTool = container.tool;
|
|
32119
|
-
} else if (oversized) {
|
|
32120
|
-
source =
|
|
32119
|
+
} else if (oversized || exportOverCeiling) {
|
|
32120
|
+
source = streamedArchiveSource(ref);
|
|
32121
32121
|
}
|
|
32122
32122
|
if (source) archive = { file: await writeArchiveFile(source, { tool: archiveTool, mtime: archiveMtime }, redact), tool: archiveTool, mtime: archiveMtime };
|
|
32123
32123
|
} catch (err) {
|
|
@@ -32159,6 +32159,13 @@ async function buildConversationSync(ref, mtime, opts = {}) {
|
|
|
32159
32159
|
archive
|
|
32160
32160
|
};
|
|
32161
32161
|
}
|
|
32162
|
+
function streamedArchiveSource(ref) {
|
|
32163
|
+
const disk = diskArchiveSource(ref);
|
|
32164
|
+
if (disk) return disk;
|
|
32165
|
+
const backend = getBackendForId(ref.prefixedId);
|
|
32166
|
+
if (ref.toolId === "claude" || !backend?.iterateRawSessionLines) return null;
|
|
32167
|
+
return { kind: "lines", files: [{ name: `${ref.rawId}.dump.jsonl`, lines: () => backend.iterateRawSessionLines(ref.prefixedId) }] };
|
|
32168
|
+
}
|
|
32162
32169
|
function diskArchiveSource(ref) {
|
|
32163
32170
|
if (ref.toolId !== "claude") return null;
|
|
32164
32171
|
const groups = resolveSessionContentGroups(ref.rawId);
|
|
@@ -32369,7 +32376,7 @@ var init_sync_client = __esm({
|
|
|
32369
32376
|
capsOk = /* @__PURE__ */ new Map();
|
|
32370
32377
|
advertisedIngestConc = /* @__PURE__ */ new Map();
|
|
32371
32378
|
advertisedGzipBody = /* @__PURE__ */ new Set();
|
|
32372
|
-
FULL_BUILD_MAX_BYTES = Math.max(8, parseInt(process.env.CHAT_RECALL_FULL_BUILD_MAX_MB || "
|
|
32379
|
+
FULL_BUILD_MAX_BYTES = Math.max(8, parseInt(process.env.CHAT_RECALL_FULL_BUILD_MAX_MB || "12", 10)) * 1024 * 1024;
|
|
32373
32380
|
DERIVED_MAX_BYTES = Math.max(8, parseInt(process.env.CHAT_RECALL_DERIVED_MAX_MB || "64", 10)) * 1024 * 1024;
|
|
32374
32381
|
SYNC_CHUNK_BYTES = 8 * 1024 * 1024;
|
|
32375
32382
|
TOOLKIT_INVENTORY_TYPES = /* @__PURE__ */ new Set(["skill", "mcp", "command", "agent", "plugin"]);
|
|
@@ -40973,6 +40980,10 @@ function describeProbeError(err) {
|
|
|
40973
40980
|
if (!/fetch failed|ECONN|ENOTFOUND|EAI_AGAIN|ETIMEDOUT|CERT_|aborted|timeout/i.test(msg)) return msg;
|
|
40974
40981
|
return describeUnreachable(err);
|
|
40975
40982
|
}
|
|
40983
|
+
function loginRetryUnitMs() {
|
|
40984
|
+
const n = Number(process.env.CHAT_RECALL_LOGIN_RETRY_UNIT_MS);
|
|
40985
|
+
return Number.isFinite(n) && n >= 0 && process.env.CHAT_RECALL_LOGIN_RETRY_UNIT_MS !== void 0 ? n : 1e3;
|
|
40986
|
+
}
|
|
40976
40987
|
function failLogin(opts, message) {
|
|
40977
40988
|
if (opts.fromInit) throw new Error(message);
|
|
40978
40989
|
console.error(chalk2.red("login failed:"), message);
|
|
@@ -42218,7 +42229,7 @@ program.command("verify").description("Check that the server holds everything th
|
|
|
42218
42229
|
const { verifyAgainstServer: verifyAgainstServer2, verifyTargets: verifyTargets2 } = await Promise.resolve().then(() => (init_verify_deep(), verify_deep_exports));
|
|
42219
42230
|
const { getBackend: getBackend2 } = await Promise.resolve().then(() => (init_tool_backend(), tool_backend_exports));
|
|
42220
42231
|
const { gzipContainer: gzipContainer2, redactContainer: redactContainer2 } = await Promise.resolve().then(() => (init_transcript(), transcript_exports));
|
|
42221
|
-
const { redactSecrets: redactSecrets2 } = await Promise.resolve().then(() => (init_secret_redactor(), secret_redactor_exports));
|
|
42232
|
+
const { redactSecrets: redactSecrets2, serverRulePackVersion: serverRulePackVersion2 } = await Promise.resolve().then(() => (init_secret_redactor(), secret_redactor_exports));
|
|
42222
42233
|
const { fetchWithTimeout: fetchWithTimeout2 } = await Promise.resolve().then(() => (init_http(), http_exports));
|
|
42223
42234
|
const { forceFullResync: forceFullResync2 } = await Promise.resolve().then(() => (init_verify_repair(), verify_repair_exports));
|
|
42224
42235
|
const targets = verifyTargets2();
|
|
@@ -42277,7 +42288,11 @@ program.command("verify").description("Check that the server holds everything th
|
|
|
42277
42288
|
// again with it: with the compiled-in rules alone a session that the pack redacts looked 764
|
|
42278
42289
|
// bytes larger than its archive on the server.
|
|
42279
42290
|
beforeRecheck: async (server, token) => {
|
|
42280
|
-
|
|
42291
|
+
for (let attempt = 1; attempt <= 3; attempt++) {
|
|
42292
|
+
await fetchTenantSecurityConfig({ serverUrl: server, token });
|
|
42293
|
+
if (serverRulePackVersion2()) return;
|
|
42294
|
+
}
|
|
42295
|
+
console.error(chalk2.yellow(" the rule pack of the server could not be installed: a deficit may be a difference of redaction"));
|
|
42281
42296
|
},
|
|
42282
42297
|
serverSizes: async (server, token) => {
|
|
42283
42298
|
const headers = {};
|
|
@@ -43535,7 +43550,7 @@ async function runLogin(serverUrl, opts) {
|
|
|
43535
43550
|
} else {
|
|
43536
43551
|
capsError = probeAdvice2(probe, base4);
|
|
43537
43552
|
}
|
|
43538
|
-
if (!authProvider && attempt < 3) await new Promise((r) => setTimeout(r, attempt *
|
|
43553
|
+
if (!authProvider && attempt < 3) await new Promise((r) => setTimeout(r, attempt * loginRetryUnitMs()));
|
|
43539
43554
|
}
|
|
43540
43555
|
}
|
|
43541
43556
|
if (!authProvider && !issuer) {
|