@@ -102,9 +102,9 @@ explicit by returning `action` and the relevant identifiers/counts directly.
102102 when you resume an interrupted topic, need the exact wording of a pinned user
103103 instruction, or want to verify what you previously noted before acting on it.
104104
105- If `id` is provided, returns that single note. If `id` is omitted, returns all
106- notes for the current session. Returns
107- `{ notes: [{ note_id, text, created_at, updated_at }] }`.
105+ Use this after `session_search` returns a matching note hit. `session_notes_read`
106+ requires `id` and returns `{ note: { id, text, created_at, updated_at } }`.
107+ When the note does not exist, it returns `{ note: null }`.
108108
109109 Always prefer reading a pinned note over reciting its contents from recall —
110110 notes are the source of truth for intentionally preserved context.
@@ -130,9 +130,10 @@ response. When `id` is omitted and no notes exist, returns `{ notes: [] }`
130130 - Before re-solving a problem that may already have a solution in session history
131131 - To check whether pinned session notes already contain the context you need
132132
133- Results may include indexed memory content (type: "memory") and, when pinned
134- session notes exist, matching notes (type: "note"). Note results include a
135- `note_id` — use `session_notes_read` with that id to reopen the full note
133+ Results may include exact indexed hits (type: "entry"), summaries
134+ (type: "summary"), and, when pinned session notes exist, matching notes
135+ (type: "note"). Note results include an `id` — use `session_notes_read`
136+ with that id to reopen the full note
136137 text. Not every query will return note results; notes only appear when they
137138 match the search query and the session has pinned notes.
138139
@@ -159,9 +160,10 @@ tracked session has `biasState` `"new-session"` or `"post-compaction"`. See Task
159160 - Before re-solving a problem that may already have a solution in session history
160161 - To check whether pinned session notes already contain the context you need
161162
162- Results may include indexed memory content (type: "memory") and, when pinned
163- session notes exist, matching notes (type: "note"). Note results include a
164- `note_id` — use `session_notes_read` with that id to reopen the full note
163+ Results may include exact indexed hits (type: "entry"), summaries
164+ (type: "summary"), and, when pinned session notes exist, matching notes
165+ (type: "note"). Note results include an `id` — use `session_notes_read`
166+ with that id to reopen the full note
165167 text. Not every query will return note results; notes only appear when they
166168 match the search query and the session has pinned notes.
167169
@@ -429,21 +431,20 @@ compaction-envelope tests for notes will be added to this existing file.
429431 ` { action: "deleted", note_id } `
430432- ` session_notes_write ` with empty text + replace ` "*" ` → returns
431433 ` { action: "replaced", cleared_count } `
432- - ` session_notes_read ` without id → returns all notes
433- - ` session_notes_read ` with id → returns single note
434- - ` session_notes_read ` with no notes → returns ` { notes: [] } `
434+ - ` session_notes_read ` with id → returns a single note
435+ - ` session_notes_read ` with a missing note → returns ` { note: null } `
435436 - Responses validate against the Zod response schemas
436437
437438- [ ] ** Step 3: Write failing tests for ` session_search ` note merge**
438439
439- - ` session_search ` returns note hits with ` type: "note" ` and ` note_id `
440- - Existing memory results have ` type: "memory" ` (or undefined for backward
441- compat)
440+ - ` session_search ` returns note hits with ` type: "note" ` and ` id `
441+ - Existing indexed hits use ` type: "entry" ` ; summary-only hits use
442+ ` type: "summary" `
442443 - Note hits and memory hits coexist in the results array, sorted by score
443444 descending
444445 - Note hits include snippet from note text
445- - When no notes exist, search returns only memory results (no empty note
446- entries)
446+ - When no notes exist, search returns only entry/summary results (no empty
447+ note entries)
447448
448449- [ ] ** Step 4: Accept ` SessionNotesService ` as runtime option**
449450
@@ -459,8 +460,8 @@ compaction-envelope tests for notes will be added to this existing file.
459460
460461 In the ` session_search ` handler, after ` searchLocalCorpus() ` , also call
461462 ` notesService.searchNotes() ` . Merge results:
462- - Memory hits: ` type: "memory" ` (or omit for backward compat)
463- - Note hits: ` type: "note" ` , ` note_id ` set, ` corpus_ref ` set to note ref
463+ - Indexed hits: ` type: "entry" ` ; summary hits: ` type: "summary" `
464+ - Note hits: ` type: "note" ` , ` id ` set, ` corpus_ref ` set to note ref
464465 - Sort merged results by score descending — both sources produce ` 0 ` –` 1 `
465466 floats so interleaving by score is meaningful
466467 - Cap total results conservatively to avoid overwhelming output
0 commit comments