chat-recall 0.7.9 → 0.7.10
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/cli.js +180 -41
- package/dist/cli.js.map +1 -1
- package/dist/derived.d.ts.map +1 -1
- package/dist/derived.js +2 -5
- package/dist/derived.js.map +1 -1
- package/dist/escalate.d.ts +2 -0
- package/dist/escalate.d.ts.map +1 -1
- package/dist/escalate.js +2 -1
- package/dist/escalate.js.map +1 -1
- package/dist/mcp-relay.js +1 -1
- package/dist/mcp.js +6820 -6564
- package/dist/scan-worker.js +109 -8
- package/dist/sync-client.d.ts.map +1 -1
- package/dist/sync-client.js +9 -7
- package/dist/sync-client.js.map +1 -1
- package/dist/watch.js +152 -26
- package/package.json +1 -1
- package/skills/chat-recall/SKILL.md +1 -1
- package/skills/chat-recall-find/SKILL.md +4 -2
- package/skills/chat-recall-resume/SKILL.md +3 -1
package/dist/watch.js
CHANGED
|
@@ -134,6 +134,72 @@ var init_banners = __esm({
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
+
// ../engine/dist/core/claude-prompt-origin.js
|
|
138
|
+
function originFromText(text) {
|
|
139
|
+
const head = text.trimStart();
|
|
140
|
+
for (const [prefix, origin] of INJECTED_PREFIXES) {
|
|
141
|
+
if (head.startsWith(prefix))
|
|
142
|
+
return origin;
|
|
143
|
+
}
|
|
144
|
+
return "human";
|
|
145
|
+
}
|
|
146
|
+
function declaredOrigin(value) {
|
|
147
|
+
if (!value || typeof value !== "object")
|
|
148
|
+
return void 0;
|
|
149
|
+
const kind = value.kind;
|
|
150
|
+
return typeof kind === "string" && kind ? kind : void 0;
|
|
151
|
+
}
|
|
152
|
+
function userRecordOrigin(obj, text) {
|
|
153
|
+
if (obj.isSidechain === true)
|
|
154
|
+
return "subagent";
|
|
155
|
+
const declared = declaredOrigin(obj.origin);
|
|
156
|
+
if (declared && declared !== "human")
|
|
157
|
+
return declared;
|
|
158
|
+
if (obj.isMeta === true)
|
|
159
|
+
return "meta";
|
|
160
|
+
if (declared === "human")
|
|
161
|
+
return "human";
|
|
162
|
+
return originFromText(text);
|
|
163
|
+
}
|
|
164
|
+
function queuedCommandPrompt(obj) {
|
|
165
|
+
if (obj.type !== "attachment")
|
|
166
|
+
return null;
|
|
167
|
+
const att = obj.attachment;
|
|
168
|
+
if (!att || att.type !== "queued_command")
|
|
169
|
+
return null;
|
|
170
|
+
const text = promptText(att.prompt);
|
|
171
|
+
if (!text)
|
|
172
|
+
return null;
|
|
173
|
+
if (obj.isSidechain === true)
|
|
174
|
+
return { text, origin: "subagent" };
|
|
175
|
+
const declared = declaredOrigin(att.origin);
|
|
176
|
+
if (declared)
|
|
177
|
+
return { text, origin: declared };
|
|
178
|
+
return { text, origin: att.humanTurn === true ? "human" : originFromText(text) };
|
|
179
|
+
}
|
|
180
|
+
function promptText(prompt) {
|
|
181
|
+
if (typeof prompt === "string")
|
|
182
|
+
return prompt;
|
|
183
|
+
if (!Array.isArray(prompt))
|
|
184
|
+
return "";
|
|
185
|
+
return prompt.filter((b) => !!b && typeof b === "object" && b.type === "text" && typeof b.text === "string").map((b) => b.text).join("\n");
|
|
186
|
+
}
|
|
187
|
+
function isPersonMessage(m) {
|
|
188
|
+
return m.role === "user" && !m.origin;
|
|
189
|
+
}
|
|
190
|
+
var INJECTED_PREFIXES;
|
|
191
|
+
var init_claude_prompt_origin = __esm({
|
|
192
|
+
"../engine/dist/core/claude-prompt-origin.js"() {
|
|
193
|
+
"use strict";
|
|
194
|
+
INJECTED_PREFIXES = [
|
|
195
|
+
["<task-notification", "task-notification"],
|
|
196
|
+
["<agent-message", "peer"],
|
|
197
|
+
["Another Claude session sent a message:", "peer"],
|
|
198
|
+
["Stop hook feedback:", "hook"]
|
|
199
|
+
];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
137
203
|
// ../engine/dist/core/project-path-match.js
|
|
138
204
|
function canonicalProjectPath(p) {
|
|
139
205
|
return (p || "").trim().replace(/\\/g, "/").replace(/[-_]/g, "/").replace(/\/{2,}/g, "/").replace(/\/+$/, "").toLowerCase();
|
|
@@ -5716,7 +5782,8 @@ async function parseSessionFile(sessionPath, maxMessages = 50) {
|
|
|
5716
5782
|
const filesToParse = hasSubagentsDir(sessionPath) ? [sessionPath, ...getSubagentPaths(sessionPath)] : [sessionPath];
|
|
5717
5783
|
let userCount = 0;
|
|
5718
5784
|
const seenPrompts = /* @__PURE__ */ new Set();
|
|
5719
|
-
const
|
|
5785
|
+
const pendingQueued = /* @__PURE__ */ new Set();
|
|
5786
|
+
const recordPrompt = (raw, line, via = "record") => {
|
|
5720
5787
|
if (userCount >= maxMessages)
|
|
5721
5788
|
return;
|
|
5722
5789
|
const withoutReminders = raw.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, "");
|
|
@@ -5725,8 +5792,14 @@ async function parseSessionFile(sessionPath, maxMessages = 50) {
|
|
|
5725
5792
|
const cleanedText = stripInjectedBanners(withoutReminders).trim();
|
|
5726
5793
|
if (cleanedText.length < 10)
|
|
5727
5794
|
return;
|
|
5728
|
-
if (
|
|
5795
|
+
if (via === "enqueue") {
|
|
5796
|
+
if (seenPrompts.has(cleanedText))
|
|
5797
|
+
return;
|
|
5798
|
+
pendingQueued.add(cleanedText);
|
|
5799
|
+
} else if (pendingQueued.has(cleanedText)) {
|
|
5800
|
+
pendingQueued.delete(cleanedText);
|
|
5729
5801
|
return;
|
|
5802
|
+
}
|
|
5730
5803
|
seenPrompts.add(cleanedText);
|
|
5731
5804
|
content.userMessages.push({ text: cleanedText, lineNumber: line, contentType: "user" });
|
|
5732
5805
|
userCount++;
|
|
@@ -5811,12 +5884,16 @@ async function parseSessionFile(sessionPath, maxMessages = 50) {
|
|
|
5811
5884
|
text = textParts.join("\n");
|
|
5812
5885
|
}
|
|
5813
5886
|
}
|
|
5814
|
-
if (text)
|
|
5887
|
+
if (text && userRecordOrigin(obj, text) === "human")
|
|
5815
5888
|
recordPrompt(text, lineNum);
|
|
5816
5889
|
} else if (msgType === "queue-operation") {
|
|
5817
|
-
if (obj.operation === "enqueue" && typeof obj.content === "string") {
|
|
5818
|
-
recordPrompt(obj.content, lineNum,
|
|
5890
|
+
if (obj.operation === "enqueue" && typeof obj.content === "string" && originFromText(obj.content) === "human") {
|
|
5891
|
+
recordPrompt(obj.content, lineNum, "enqueue");
|
|
5819
5892
|
}
|
|
5893
|
+
} else if (msgType === "attachment") {
|
|
5894
|
+
const queued = queuedCommandPrompt(obj);
|
|
5895
|
+
if (queued?.origin === "human")
|
|
5896
|
+
recordPrompt(queued.text, lineNum, "delivery");
|
|
5820
5897
|
} else if (msgType === "assistant") {
|
|
5821
5898
|
const msg = obj.message;
|
|
5822
5899
|
if (!msg || typeof msg !== "object")
|
|
@@ -5920,6 +5997,7 @@ var init_session = __esm({
|
|
|
5920
5997
|
"../engine/dist/parsers/session.js"() {
|
|
5921
5998
|
"use strict";
|
|
5922
5999
|
init_banners();
|
|
6000
|
+
init_claude_prompt_origin();
|
|
5923
6001
|
init_claude2();
|
|
5924
6002
|
init_tool_paths();
|
|
5925
6003
|
init_project_dir_name();
|
|
@@ -6008,7 +6086,16 @@ function messagesFromRawLines(raw) {
|
|
|
6008
6086
|
const cleaned = stripBanners(text);
|
|
6009
6087
|
if (!cleaned)
|
|
6010
6088
|
continue;
|
|
6011
|
-
|
|
6089
|
+
const origin = userRecordOrigin(obj, cleaned);
|
|
6090
|
+
messages.push({ line, role: "user", content: cleaned, timestamp, ...origin === "human" ? {} : { origin } });
|
|
6091
|
+
} else if (obj.type === "attachment") {
|
|
6092
|
+
const queued = queuedCommandPrompt(obj);
|
|
6093
|
+
if (!queued)
|
|
6094
|
+
continue;
|
|
6095
|
+
const cleaned = stripBanners(queued.text);
|
|
6096
|
+
if (!cleaned)
|
|
6097
|
+
continue;
|
|
6098
|
+
messages.push({ line, role: "user", content: cleaned, timestamp, ...queued.origin === "human" ? {} : { origin: queued.origin } });
|
|
6012
6099
|
} else if (obj.type === "assistant") {
|
|
6013
6100
|
const blocks = Array.isArray(obj.message?.content) ? obj.message.content : [];
|
|
6014
6101
|
const thinkingBlock = blocks.find((c) => c?.type === "thinking");
|
|
@@ -6104,6 +6191,7 @@ var init_claude = __esm({
|
|
|
6104
6191
|
"../engine/dist/transcript/claude.js"() {
|
|
6105
6192
|
"use strict";
|
|
6106
6193
|
init_logger();
|
|
6194
|
+
init_claude_prompt_origin();
|
|
6107
6195
|
log2 = createLogger("transcript-claude");
|
|
6108
6196
|
INJECTED_BANNERS2 = [
|
|
6109
6197
|
/MCP issues detected\. ?Run \/mcp list for status\.?/g,
|
|
@@ -7224,10 +7312,15 @@ function summarizeMarkers(marked) {
|
|
|
7224
7312
|
}
|
|
7225
7313
|
return counts;
|
|
7226
7314
|
}
|
|
7227
|
-
|
|
7315
|
+
function markersFromTurns(sessionId, turns) {
|
|
7316
|
+
const prompts = turns.filter((t) => t.kind === "user" && t.text).map((t) => ({ line: t.line, ts: t.ts, tsIso: t.tsIso, ...markPrompt(t.text) }));
|
|
7317
|
+
return { v: MARKERS_VERSION, sessionId, prompts, summary: summarizeMarkers(prompts) };
|
|
7318
|
+
}
|
|
7319
|
+
var PROFANITY, PROFANITY_LOOSE, APPROVAL_HEAD, NEG_HEAD, QUESTION_HEAD, DIRECTIVE_HEAD, CLARIFY_PHRASES, FRUSTRATED_PHRASES, MARKERS_VERSION;
|
|
7228
7320
|
var init_session_sentiment = __esm({
|
|
7229
7321
|
"../engine/dist/core/session-sentiment.js"() {
|
|
7230
7322
|
"use strict";
|
|
7323
|
+
init_claude_prompt_origin();
|
|
7231
7324
|
PROFANITY = /\b(fuck(?:ing|er|ed)?|shit|ffs|wtf|bullshit|crap|damn(?:it)?|hell)\b/i;
|
|
7232
7325
|
PROFANITY_LOOSE = /\b(fu[ckj]+(?:ing|er|ed|c?k)?|fukc|fucj|sht|fk|wt[ft])\b/i;
|
|
7233
7326
|
APPROVAL_HEAD = /^(?:yes|y|ok(?:ay)?|sure|alright|fine|i\s*approve|approved|go\s*(?:on|ahead)|do\s*it|continue|please\s*do|sounds?\s*good|let'?s\s*go|ship\s*it|👍|✓+)\b/i;
|
|
@@ -7236,6 +7329,7 @@ var init_session_sentiment = __esm({
|
|
|
7236
7329
|
DIRECTIVE_HEAD = /^(?:please\s+)?(?:use|implement|build|make|add|create|fix|remove|delete|update|refactor|run|deploy|push|merge|test|check|investigate|find|search|show|list|generate|set\s+up|ensure)\b/i;
|
|
7237
7330
|
CLARIFY_PHRASES = /\b(?:wdym|what do you mean|explain|clarify|what is|what's|huh\??|i don'?t understand)\b/i;
|
|
7238
7331
|
FRUSTRATED_PHRASES = /\b(?:why (?:the )?(?:fuck|hell)|wtf|are you (?:kidding|serious)|stop slacking|stop making|why did you|why didn'?t you|i (?:fucking )?(?:asked|told you)|are you (?:listening|even)|come\s*on|just\s+do)\b/i;
|
|
7332
|
+
MARKERS_VERSION = 2;
|
|
7239
7333
|
}
|
|
7240
7334
|
});
|
|
7241
7335
|
|
|
@@ -8102,6 +8196,7 @@ var init_claude2 = __esm({
|
|
|
8102
8196
|
init_first_prompt();
|
|
8103
8197
|
init_tail_read();
|
|
8104
8198
|
init_project_dir_name();
|
|
8199
|
+
init_claude_prompt_origin();
|
|
8105
8200
|
init_generic_engine();
|
|
8106
8201
|
UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
8107
8202
|
ClaudeBackend = class {
|
|
@@ -8409,6 +8504,15 @@ var init_claude2 = __esm({
|
|
|
8409
8504
|
}
|
|
8410
8505
|
appendEventsFromText(events, raw, mtime, startLine) {
|
|
8411
8506
|
let lineNum = startLine;
|
|
8507
|
+
const queued = /* @__PURE__ */ new Map();
|
|
8508
|
+
const superseded = /* @__PURE__ */ new Set();
|
|
8509
|
+
const pushPrompt = (e) => {
|
|
8510
|
+
const pending = queued.get(e.text);
|
|
8511
|
+
const earlier = pending?.shift();
|
|
8512
|
+
if (earlier)
|
|
8513
|
+
superseded.add(earlier);
|
|
8514
|
+
events.push(e);
|
|
8515
|
+
};
|
|
8412
8516
|
{
|
|
8413
8517
|
for (const line of raw.split("\n")) {
|
|
8414
8518
|
lineNum++;
|
|
@@ -8424,13 +8528,26 @@ var init_claude2 = __esm({
|
|
|
8424
8528
|
const ts = tsIso ? Date.parse(tsIso) || mtime : mtime;
|
|
8425
8529
|
if (obj.type === "queue-operation") {
|
|
8426
8530
|
if (obj.operation === "enqueue" && typeof obj.content === "string") {
|
|
8427
|
-
const
|
|
8428
|
-
if (
|
|
8429
|
-
|
|
8531
|
+
const text = stripReminders(obj.content);
|
|
8532
|
+
if (text && originFromText(text) === "human") {
|
|
8533
|
+
const e = { kind: "user", ts, tsIso, line: lineNum, text };
|
|
8534
|
+
events.push(e);
|
|
8535
|
+
const list = queued.get(text);
|
|
8536
|
+
if (list)
|
|
8537
|
+
list.push(e);
|
|
8538
|
+
else
|
|
8539
|
+
queued.set(text, [e]);
|
|
8430
8540
|
}
|
|
8431
8541
|
}
|
|
8432
8542
|
continue;
|
|
8433
8543
|
}
|
|
8544
|
+
const delivered = queuedCommandPrompt(obj);
|
|
8545
|
+
if (delivered) {
|
|
8546
|
+
const text = stripReminders(delivered.text);
|
|
8547
|
+
if (text && delivered.origin === "human")
|
|
8548
|
+
pushPrompt({ kind: "user", ts, tsIso, line: lineNum, text });
|
|
8549
|
+
continue;
|
|
8550
|
+
}
|
|
8434
8551
|
if (obj.type === "user") {
|
|
8435
8552
|
const msg = obj.message;
|
|
8436
8553
|
const content = msg?.content;
|
|
@@ -8465,8 +8582,9 @@ var init_claude2 = __esm({
|
|
|
8465
8582
|
}
|
|
8466
8583
|
}
|
|
8467
8584
|
const spoken = stripReminders(text);
|
|
8468
|
-
if (spoken)
|
|
8469
|
-
|
|
8585
|
+
if (spoken && userRecordOrigin(obj, spoken) === "human") {
|
|
8586
|
+
pushPrompt({ kind: "user", ts, tsIso, line: lineNum, text: spoken });
|
|
8587
|
+
}
|
|
8470
8588
|
for (const tr of toolResults) {
|
|
8471
8589
|
events.push({
|
|
8472
8590
|
kind: "tool_result",
|
|
@@ -8515,6 +8633,13 @@ var init_claude2 = __esm({
|
|
|
8515
8633
|
}
|
|
8516
8634
|
}
|
|
8517
8635
|
}
|
|
8636
|
+
if (superseded.size > 0) {
|
|
8637
|
+
let w = 0;
|
|
8638
|
+
for (const e of events)
|
|
8639
|
+
if (!superseded.has(e))
|
|
8640
|
+
events[w++] = e;
|
|
8641
|
+
events.length = w;
|
|
8642
|
+
}
|
|
8518
8643
|
return lineNum;
|
|
8519
8644
|
}
|
|
8520
8645
|
// ── Per-session operations — all delegate to the generic engine ─
|
|
@@ -18187,7 +18312,7 @@ var init_http = __esm({
|
|
|
18187
18312
|
CLI_VERSION = JSON.parse(readFileSync32(new URL("../package.json", import.meta.url), "utf-8")).version || CLI_VERSION;
|
|
18188
18313
|
} catch {
|
|
18189
18314
|
try {
|
|
18190
|
-
if (true) CLI_VERSION = "0.7.
|
|
18315
|
+
if (true) CLI_VERSION = "0.7.10";
|
|
18191
18316
|
} catch {
|
|
18192
18317
|
}
|
|
18193
18318
|
}
|
|
@@ -18232,8 +18357,7 @@ function collectDerivedRows(ref, mtime, count, maxRowBytes) {
|
|
|
18232
18357
|
if (fullOutcome.found) data = fullOutcome.commits;
|
|
18233
18358
|
} else if (kind === "markers") {
|
|
18234
18359
|
const turns = extractTurnsAny(id, { maxTurns: 5e4 });
|
|
18235
|
-
|
|
18236
|
-
data = { sessionId: id, prompts, summary: summarizeMarkers(prompts) };
|
|
18360
|
+
data = markersFromTurns(id, turns.turns);
|
|
18237
18361
|
}
|
|
18238
18362
|
} catch {
|
|
18239
18363
|
data = null;
|
|
@@ -18682,7 +18806,7 @@ var init_telemetry = __esm({
|
|
|
18682
18806
|
init_sync_client();
|
|
18683
18807
|
cliVersion = () => {
|
|
18684
18808
|
try {
|
|
18685
|
-
return true ? "0.7.
|
|
18809
|
+
return true ? "0.7.10" : "dev";
|
|
18686
18810
|
} catch {
|
|
18687
18811
|
return "dev";
|
|
18688
18812
|
}
|
|
@@ -20026,7 +20150,8 @@ async function syncToTargetInScope(cred, opts = {}) {
|
|
|
20026
20150
|
}
|
|
20027
20151
|
trace?.("conversation walk start");
|
|
20028
20152
|
const walkStartedAt = Date.now();
|
|
20029
|
-
|
|
20153
|
+
const firstWalk = (ledger ?? getSyncedRows(base2)).size === 0;
|
|
20154
|
+
reportWalkProgress({ done: 0, total: slice.length, startedAt: walkStartedAt, complete: false, first: firstWalk });
|
|
20030
20155
|
walkProgressForUpload = { done: 0, total: slice.length, complete: false };
|
|
20031
20156
|
let traceN = 0;
|
|
20032
20157
|
let considered = 0;
|
|
@@ -20034,7 +20159,7 @@ async function syncToTargetInScope(cred, opts = {}) {
|
|
|
20034
20159
|
await new Promise((resolve3) => setImmediate(resolve3));
|
|
20035
20160
|
considered++;
|
|
20036
20161
|
const walkDone = considered >= slice.length;
|
|
20037
|
-
reportWalkProgress({ done: considered, total: slice.length, startedAt: walkStartedAt, complete: walkDone });
|
|
20162
|
+
reportWalkProgress({ done: considered, total: slice.length, startedAt: walkStartedAt, complete: walkDone, first: firstWalk });
|
|
20038
20163
|
walkProgressForUpload = { done: considered, total: slice.length, complete: walkDone };
|
|
20039
20164
|
if (trace && ++traceN % 500 === 0) trace(`walk ${traceN}/${slice.length} \xB7 at ${ref.prefixedId}`);
|
|
20040
20165
|
localSessionIds.add(ref.prefixedId);
|
|
@@ -20306,7 +20431,7 @@ async function syncToTargetInScope(cred, opts = {}) {
|
|
|
20306
20431
|
}
|
|
20307
20432
|
}
|
|
20308
20433
|
if (opts.prune) await post({ prune_empty_sessions: true });
|
|
20309
|
-
reportWalkProgress({ done: slice.length, total: slice.length, startedAt: walkStartedAt, complete: true });
|
|
20434
|
+
reportWalkProgress({ done: slice.length, total: slice.length, startedAt: walkStartedAt, complete: true, first: firstWalk });
|
|
20310
20435
|
walkProgressForUpload = { done: slice.length, total: slice.length, complete: true };
|
|
20311
20436
|
return {
|
|
20312
20437
|
uploaded: convBatch.sent + appendResults.uploaded,
|
|
@@ -20437,7 +20562,7 @@ async function buildConversationSync(ref, mtime, opts = {}) {
|
|
|
20437
20562
|
if (!transcript) return null;
|
|
20438
20563
|
const textMessages = transcript.messages.filter((m) => m.role !== "summary" && m.content?.trim());
|
|
20439
20564
|
if (textMessages.length === 0 && !transcript.messages.some((m) => m.toolCalls?.length)) return null;
|
|
20440
|
-
const firstUser = textMessages.find(
|
|
20565
|
+
const firstUser = textMessages.find(isPersonMessage);
|
|
20441
20566
|
if (isInternalToolPrompt(firstUser?.content)) return null;
|
|
20442
20567
|
const count = { redactions: 0 };
|
|
20443
20568
|
const envelope = redactDeep(
|
|
@@ -20446,7 +20571,7 @@ async function buildConversationSync(ref, mtime, opts = {}) {
|
|
|
20446
20571
|
);
|
|
20447
20572
|
let projectPath = ref.projectPath;
|
|
20448
20573
|
const meta = { messageCount: textMessages.length };
|
|
20449
|
-
if (textMessages.filter(
|
|
20574
|
+
if (textMessages.filter(isPersonMessage).length <= 1) meta.oneShot = true;
|
|
20450
20575
|
try {
|
|
20451
20576
|
const cwd = ref.fullPath ? readCwdFromJsonl(ref.fullPath) : "";
|
|
20452
20577
|
if (cwd) projectPath = cwd;
|
|
@@ -20598,7 +20723,7 @@ async function buildConversationSync(ref, mtime, opts = {}) {
|
|
|
20598
20723
|
envelope,
|
|
20599
20724
|
raw_b64,
|
|
20600
20725
|
raw_size,
|
|
20601
|
-
first_prompt: envTexts.find(
|
|
20726
|
+
first_prompt: envTexts.find(isPersonMessage)?.content?.slice(0, 200),
|
|
20602
20727
|
// Byte offset this FULL sync is synced THROUGH (file size at build time,
|
|
20603
20728
|
// or the end of the bounded tail for an oversized session). The server
|
|
20604
20729
|
// stores it as the envelope's `o`; the ledger records the SAME value
|
|
@@ -20654,7 +20779,7 @@ async function buildConversationTail(ref, fromOffset, opts = {}) {
|
|
|
20654
20779
|
bytes: 0
|
|
20655
20780
|
};
|
|
20656
20781
|
}
|
|
20657
|
-
const firstUser = textMessages.find(
|
|
20782
|
+
const firstUser = textMessages.find(isPersonMessage);
|
|
20658
20783
|
if (isInternalToolPrompt(firstUser?.content)) return null;
|
|
20659
20784
|
const count = { redactions: 0 };
|
|
20660
20785
|
const envelope = redactDeep(
|
|
@@ -20731,6 +20856,7 @@ var ownVersion, ERROR_CLASS, STANDING_FAILURE, walkProgressForUpload, lastServer
|
|
|
20731
20856
|
var init_sync_client = __esm({
|
|
20732
20857
|
"src/sync-client.ts"() {
|
|
20733
20858
|
"use strict";
|
|
20859
|
+
init_claude_prompt_origin();
|
|
20734
20860
|
init_credentials_env();
|
|
20735
20861
|
init_secret_redactor();
|
|
20736
20862
|
init_source_discovery();
|
|
@@ -20772,7 +20898,7 @@ var init_sync_client = __esm({
|
|
|
20772
20898
|
ownVersion = JSON.parse(readFileSync35(join42(dir, "../package.json"), "utf-8")).version || ownVersion;
|
|
20773
20899
|
} catch {
|
|
20774
20900
|
try {
|
|
20775
|
-
if (true) ownVersion = "0.7.
|
|
20901
|
+
if (true) ownVersion = "0.7.10";
|
|
20776
20902
|
} catch {
|
|
20777
20903
|
}
|
|
20778
20904
|
}
|
|
@@ -23909,7 +24035,7 @@ try {
|
|
|
23909
24035
|
ownVersion2 = JSON.parse(readFileSync39(join48(dir, "../package.json"), "utf-8")).version || ownVersion2;
|
|
23910
24036
|
} catch {
|
|
23911
24037
|
try {
|
|
23912
|
-
if (true) ownVersion2 = "0.7.
|
|
24038
|
+
if (true) ownVersion2 = "0.7.10";
|
|
23913
24039
|
} catch {
|
|
23914
24040
|
}
|
|
23915
24041
|
}
|
|
@@ -24294,7 +24420,7 @@ async function runCollectorMigration(opts) {
|
|
|
24294
24420
|
init_sync_ledger();
|
|
24295
24421
|
init_collector_health();
|
|
24296
24422
|
import { existsSync as existsSync50, readFileSync as readFileSync45, statSync as statSync45 } from "fs";
|
|
24297
|
-
var CLI_VERSION3 = true ? "0.7.
|
|
24423
|
+
var CLI_VERSION3 = true ? "0.7.10" : "0.0.0";
|
|
24298
24424
|
var DEBOUNCE_MS = 5e3;
|
|
24299
24425
|
var PLANS_DIR = claudeBackend.plansDir();
|
|
24300
24426
|
var TASKS_DIR = claudeBackend.tasksDir();
|
package/package.json
CHANGED
|
@@ -74,7 +74,7 @@ directly.
|
|
|
74
74
|
Every `recall_*` tool. `packages/cli/src/skills-catalog.test.ts` fails when a
|
|
75
75
|
tool is registered and never named here, so adding a tool means placing it.
|
|
76
76
|
|
|
77
|
-
**Resume / cold start** — `recall_smart_resume` (structured resume bundle; needs a session id), `recall_recent` (list recent sessions), `recall_wake_up` (identity + high-signal facts), `recall_context` (structured dump of one session), `recall_show` (raw slice — returns 10 messages unless you raise `max_messages`), `recall_summary` (AI summary + outcome).
|
|
77
|
+
**Resume / cold start** — `recall_smart_resume` (structured resume bundle; needs a session id), `recall_recent` (list recent sessions), `recall_wake_up` (identity + high-signal facts), `recall_context` (structured dump of one session), `recall_show` (raw slice — `query` finds a message and its line, `around_line` reads around it; returns 10 messages unless you raise `max_messages`), `recall_summary` (AI summary + outcome).
|
|
78
78
|
**Search** — `recall_search` (sessions; `include_outcome`, `like_session`), `recall_memory_search` (every memory type), `recall_memory_item` (read ONE item found by search, or browse a source type), `recall_user_prompts` (what the user actually typed), `recall_subagent_search` (inside subagent transcripts, whose work never reaches the main conversation), `recall_redundant_files` (before writing a new file, check you have not written one like it already).
|
|
79
79
|
**Project** — `recall_project_context` (rich dump), `recall_weekly_digest`, `recall_analytics_summary`, `recall_outcome_summary` (how many recent sessions actually shipped), `recall_code_findings` / `recall_code_actions` / `recall_code_projects` / `recall_code_index` / `recall_recommendations`.
|
|
80
80
|
|
|
@@ -39,8 +39,10 @@ description: >-
|
|
|
39
39
|
|
|
40
40
|
Every tool here takes a NAMED `session_id` (not a positional argument).
|
|
41
41
|
|
|
42
|
-
- `mcp__chat-recall__recall_show` — read the session slice
|
|
43
|
-
`
|
|
42
|
+
- `mcp__chat-recall__recall_show` — read the session slice. To find one
|
|
43
|
+
message, pass `query` with words from it: the reply gives the line of each
|
|
44
|
+
match. Then pass that line as `around_line`, or read the newest messages with
|
|
45
|
+
`from_end`. Do not guess line numbers. Each message comes back in full, with its tool calls and
|
|
44
46
|
results. A body over 2000 characters shows its ends and the `expand_line`
|
|
45
47
|
that returns it whole. It returns **10 messages
|
|
46
48
|
by default**: raise `max_messages` before telling the user what a session
|
|
@@ -47,7 +47,9 @@ Once you have a session id:
|
|
|
47
47
|
- `mcp__chat-recall__recall_context` — structured context (requests, decisions,
|
|
48
48
|
files, tools).
|
|
49
49
|
- `mcp__chat-recall__recall_show` — raw slice; `from_end: N` for the last N
|
|
50
|
-
messages
|
|
50
|
+
messages, `query` to find a message by its words and get its line,
|
|
51
|
+
`around_line` to read around that line. If the reply says that sync is
|
|
52
|
+
behind, run `recall_index` before you read the transcript file. Each message comes back in full, code and commands included, with
|
|
51
53
|
its tool results. A body over 2000 characters shows its ends; pass
|
|
52
54
|
`expand_line` to get it whole. It
|
|
53
55
|
returns 10 messages unless you raise `max_messages`, so don't read a partial
|