opencode-session-recall 0.6.0 → 0.7.0
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.
|
@@ -40,9 +40,9 @@ function errmsg(e) {
|
|
|
40
40
|
// src/sessions.ts
|
|
41
41
|
function sessions(client, unscoped, global, limits) {
|
|
42
42
|
return tool({
|
|
43
|
-
description: `List sessions from the opencode database.
|
|
43
|
+
description: `List sessions from the opencode database. Returns session titles, directories, and timestamps. For cross-project discovery, use scope "global" (enabled by default, disable with plugin option global: false).
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
This is a metadata-only listing tool, NOT a content search. Session titles are usually auto-generated timestamps and won't match topic keywords. To find prior work on a topic, use recall (content search) instead \u2014 it searches inside actual messages and tool outputs. Use recall_sessions to browse recent sessions by project, check session recency, or get session IDs for recall_messages.
|
|
46
46
|
|
|
47
47
|
Returns { ok, sessions: [{ id, title, directory, time, archived }], returned, scope }. All tools return JSON with ok: true on success or ok: false with error on failure.`,
|
|
48
48
|
args: {
|
|
@@ -312,33 +312,33 @@ function scan(messages2, session, query, type, role, limit, before, after, width
|
|
|
312
312
|
}
|
|
313
313
|
function search(client, unscoped, global, limits) {
|
|
314
314
|
return tool2({
|
|
315
|
-
description: `Search your conversation history in the opencode database.
|
|
315
|
+
description: `Search your conversation history in the opencode database. This is the primary discovery tool \u2014 use it before recall_sessions, which only searches titles. Before debugging an issue or implementing a feature, check whether prior sessions already tackled it \u2014 the history shows whether an approach succeeded or was abandoned. If you have access to a memory system, add useful findings to memory so they're available directly next time without searching history.
|
|
316
316
|
|
|
317
317
|
Searches text content, tool inputs/outputs, and reasoning via case-insensitive substring matching. Returns matching snippets with session/message IDs you can pass to recall_get for full content, or recall_context if you need surrounding messages.
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
Searches globally by default \u2014 this is fast and finds results across all projects. Results are ordered by session recency (newest first). Try multiple query terms before concluding no prior work exists. Use role "user" to find original requirements.
|
|
320
320
|
|
|
321
|
-
Scope costs:
|
|
321
|
+
Scope costs: all scopes scan up to \`sessions\` sessions (default 10). "session" scans 1. "project" and "global" scan up to 10 newest. Increase \`sessions\` if nothing found.
|
|
322
322
|
|
|
323
323
|
Returns { ok, results: [{ sessionID, messageID, role, time, partID, partType, pruned, snippet, toolName? }], scanned, total, truncated }. Each result includes a pruned flag \u2014 if true, the content was compacted from your context window and recall_get will return the original full output. Check truncated to know if more matches exist beyond your results limit.
|
|
324
324
|
|
|
325
325
|
This tool's own outputs are excluded from search results to prevent recursive noise; use recall_get or recall_context to retrieve any message directly.`,
|
|
326
326
|
args: {
|
|
327
327
|
query: tool2.schema.string().min(1).describe("Text to search for (case-insensitive substring match)"),
|
|
328
|
-
scope: tool2.schema.enum(["session", "project", "global"]).default("
|
|
329
|
-
"
|
|
328
|
+
scope: tool2.schema.enum(["session", "project", "global"]).default("global").describe(
|
|
329
|
+
"global = all projects (default), project = current project, session = current only. Searching broadly is fast."
|
|
330
330
|
),
|
|
331
331
|
sessionID: tool2.schema.string().optional().describe("Search a specific session (overrides scope)"),
|
|
332
332
|
type: tool2.schema.enum(["text", "tool", "reasoning", "all"]).default("all").describe("Filter by part type"),
|
|
333
333
|
role: tool2.schema.enum(["user", "assistant", "all"]).default("all").describe("Filter by message role"),
|
|
334
334
|
sessions: tool2.schema.number().min(1).max(limits.maxSessions).default(Math.min(10, limits.maxSessions)).describe(
|
|
335
|
-
"Max sessions to scan
|
|
335
|
+
"Max sessions to scan. Increase if nothing found \u2014 default 10 may miss older sessions."
|
|
336
336
|
),
|
|
337
337
|
results: tool2.schema.number().min(1).max(limits.maxResults).default(Math.min(10, limits.maxResults)).describe(
|
|
338
338
|
"Max results to return. Check truncated in response for more."
|
|
339
339
|
),
|
|
340
340
|
title: tool2.schema.string().optional().describe(
|
|
341
|
-
"Filter sessions by title before scanning (
|
|
341
|
+
"Filter sessions by title before scanning (rarely useful \u2014 titles are usually auto-generated)"
|
|
342
342
|
),
|
|
343
343
|
before: tool2.schema.number().optional().describe("Only match messages before this timestamp (ms epoch)"),
|
|
344
344
|
after: tool2.schema.number().optional().describe("Only match messages after this timestamp (ms epoch)"),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-session-recall",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Agent memory without a memory system — search and retrieve opencode conversation history that was lost to compaction, across sessions and projects",
|
|
7
7
|
"main": "./dist/opencode-session-recall.js",
|