sticky-note-cli 3.1.34 → 3.1.36
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/bin/mcp-server.js +26 -2
- package/package.json +1 -1
- package/sticky-server/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-shm +0 -0
- package/sticky-server/.wrangler/state/v3/observability/miniflare-wobs-trace-store/a590acd76969f996ec6e4b599c3c09f58c283a76f2d61392b5d3046caf557602.sqlite-wal +0 -0
- package/templates/hooks/session-end.js +8 -1
package/bin/mcp-server.js
CHANGED
|
@@ -359,10 +359,34 @@ function toolSearchThreads(params) {
|
|
|
359
359
|
return q.split(/\s+/).every((word) => searchable.includes(word));
|
|
360
360
|
});
|
|
361
361
|
|
|
362
|
+
// Return summarized thread objects — full objects can exceed token limits
|
|
363
|
+
// when failed_approaches accumulates dozens of entries per thread.
|
|
364
|
+
const summarized = matches.map((t) => ({
|
|
365
|
+
id: t.id,
|
|
366
|
+
status: t.status,
|
|
367
|
+
user: t.user,
|
|
368
|
+
tool: t.tool,
|
|
369
|
+
branch: t.branch,
|
|
370
|
+
work_type: t.work_type,
|
|
371
|
+
goal_achieved: t.goal_achieved || false,
|
|
372
|
+
created_at: t.created_at,
|
|
373
|
+
last_activity_at: t.last_activity_at,
|
|
374
|
+
narrative: (t.narrative || "").substring(0, 300),
|
|
375
|
+
last_note: (t.last_note || "").substring(0, 200),
|
|
376
|
+
handoff_summary: (t.handoff_summary || "").substring(0, 300),
|
|
377
|
+
files_touched: (t.files_touched || []).slice(0, 20),
|
|
378
|
+
failed_approaches: (t.failed_approaches || []).slice(-3).map((f) => ({
|
|
379
|
+
description: typeof f === "string"
|
|
380
|
+
? f.substring(0, 150)
|
|
381
|
+
: (f.description || "").substring(0, 150),
|
|
382
|
+
error: typeof f === "string" ? "" : (f.error || "").substring(0, 100),
|
|
383
|
+
})),
|
|
384
|
+
}));
|
|
385
|
+
|
|
362
386
|
return {
|
|
363
387
|
query,
|
|
364
|
-
count:
|
|
365
|
-
threads:
|
|
388
|
+
count: summarized.length,
|
|
389
|
+
threads: summarized,
|
|
366
390
|
};
|
|
367
391
|
}
|
|
368
392
|
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1012,7 +1012,14 @@ async function main() {
|
|
|
1012
1012
|
const memory = loadJson(memoryPath, { version: "2", project: "", threads: [] });
|
|
1013
1013
|
if (cloud) {
|
|
1014
1014
|
const cloudThreads = await cloudReadThreads();
|
|
1015
|
-
if (cloudThreads)
|
|
1015
|
+
if (cloudThreads) {
|
|
1016
|
+
// Merge: use cloud as the source of truth for shared threads, but preserve
|
|
1017
|
+
// any local-only threads (e.g. the "open" thread session-start just created
|
|
1018
|
+
// and saved locally but didn't push to cloud yet).
|
|
1019
|
+
const cloudIds = new Set(cloudThreads.map((t) => t && t.id).filter(Boolean));
|
|
1020
|
+
const localOnly = (memory.threads || []).filter((t) => t && !cloudIds.has(t.id));
|
|
1021
|
+
memory.threads = [...cloudThreads, ...localOnly];
|
|
1022
|
+
}
|
|
1016
1023
|
}
|
|
1017
1024
|
const config = loadJson(getConfigPath(), { stale_days: 14 });
|
|
1018
1025
|
const staleDays = config.stale_days || 14;
|