Skip to content

fix(session-search): index OpenCode SQLite sessions - #20870

Merged
Jinwoo-H merged 7 commits into
mainfrom
session-search-opencode-capture
Sep 16, 2026
Merged

Jinwoo-H merged 7 commits into
mainfrom
session-search-opencode-capture

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​465 $\color{#cf222e}{\Huge{\mathbf{−}}}$​552 $\color{#cf222e}{\Huge{\mathbf{−}}}$​87
Prod 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1148 $\color{#cf222e}{\Huge{\mathbf{−}}}$​69 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1079

Bug

Nothing any OpenCode agent has said is searchable. On a real machine the index listed 606 OpenCode sessions in its files table and held zero sessions rows and zero messages for them. Every other agent had rows.

Cause

OpenCode stores sessions in one SQLite database read on a worker thread. The worker answered two requests, list and parse, and parse returned only the newest few messages for the panel preview. parserPublishesMessages therefore declared OpenCode SQLite candidates as sources the transcript channel could not reach, and the index consumer's noteUnreachableParser wrote a placeholder row (cursor at file size, no session) so the indexer would stop asking. The capture channel was deferred from PR 2 of the search stack and never built.

Fix

A capture request on the worker protocol. It returns the session and every text part of every user/assistant turn, from one open of the database, so the panel's session and the index's transcript can never describe different generations of it. Parts of one message are joined into one TranscriptMessage, which is what every other provider hands a consumer, so a phrase that runs across two blocks of a turn is still one indexable row. Decoding reuses the preview reader's own extractPartText and session reader.

Routing. parseAgentSessionFile asks for capture when a sink is listening and parse when nobody is, so a list scan still reads only the preview window. OpenCode now joins the whole-document sources (Grok, Cursor, Gemini) on the same path.

Nothing declines any more. parserPublishesMessages, the consumer's unreachable branch, noteUnreachableParser and session-search-opencode-decline.test.ts are deleted. An OpenCode read that fails — a locked database, a schema probe failure, a capture past its part ceiling — now fails through the same failed-read path as any other file, with the same retry and hold-out rules.

Cursor. No new machinery was needed. Discovery already stamps a synthetic candidate's mtimeMs with the session's time_updated, which is the stat the decide step compares, so a session that gains a message is re-read and replaced whole. The new test pins that rather than assuming it.

Schema version 5 to 6, so existing indexes drop their placeholder rows and read OpenCode sessions for real. (Main is still at 5; the brief's 6 to 7 assumed #20763 had merged.)

Tests

  • session-search-opencode-index.test.ts — the end-to-end proof. Builds an OpenCode database with two sessions, runs the real SessionSearchIndexer over it, and asserts engine.search({ query: '<sentence an assistant wrote>' }) returns that session on the phrase route with an assistant snippet. Also pins one read per session across three passes, and a re-read that replaces rows when time_updated moves.
  • session-transcript-every-agent-capture.test.ts — the guard that would have caught this. Writes one fixture per supported agent plus an OpenCode SQLite database, scans them through the real reader with a sink, and asserts every discovered source published at least one user or assistant message, and that the vault covers every agent in AI_VAULT_AGENTS. Gemini and Antigravity both pass; nothing is it.todo.
  • The every-agent fixture was lifted out of session-scanner.test.ts into shared modules so the scan test and this guard read the same layouts.
  • writeJsonlFile now terminates the last record with a newline. Six agents' fixtures ended mid-record, which the reader correctly withholds from consumers, so the guard was reading a transcript state no finished agent writes.
  • sessionsByAgent added to the index status and the status schema as an optional field. Grouped on the existing sessions_agent index over one row per session. messagesByAgent was skipped deliberately: it needs a scan of every indexed row on a call the panel polls, and the session count already separates an agent the index has read from one it has only listed.

Reverting session-scanner-agent-parser.ts fails all five new tests; restoring it passes them.

Tool and reasoning parts

Text parts alone left OpenCode behind every file-based provider. The capture query now takes text, reasoning and tool parts.

  • Reasoning folds into the turn's own words. The shared block list already treats a thinking block as part of the turn for Claude and Codex, so OpenCode reads the same way and a phrase spanning reasoning and reply is still one row.
  • Each tool part becomes one tool message, following the turn's words in transcript order. It carries the call line plus what came back, built with the shared toolCallText and its input-key list, so a command is findable whichever agent ran it. state.error is preferred over state.output, which is what a failed or cancelled call actually shows; a call still running contributes its call line alone.
  • One spelling fix. OpenCode writes filePath where every other provider, and so the shared key list, writes file_path. The key is renamed at the OpenCode boundary rather than teaching the shared list one provider's casing. Without it the call line for the second most common tool input would be the bare tool name.
  • No new cap on tool rows. The index writer still owns that at 3 KB a row. A decoded-size ceiling sits beside the existing part ceiling because a non-streaming source needs a bound a streaming one does not: a JSONL provider publishes each message as it reads it, while this one holds a whole session before posting it across the worker boundary. Neither ceiling truncates; both fail the read so it is retried and surfaces.

Shape taken from one authorized read of the user's database and cross-checked against the reference decoder in claude-code-history-viewer. Measured there: the busiest session holds 1,427 indexable parts against the 20,000 ceiling, and the largest totals 9.5 MB of part JSON against the 64 MiB one.

New assertions: tool output is found under scope: 'all' and not under scope: 'conversation'; a tool call is found by its file argument and a failed one by its error; a reasoning part is found on its assistant turn; and the every-source guard pins the exact three messages an OpenCode session publishes, with all three roles.

Gates

pnpm tc                                  clean
pnpm test src/main/ai-vault src/main/ai-vault-search src/shared
                                         878 passed | 6 skipped (884 files)
                                         9481 passed | 116 skipped
oxlint <changed files>                   clean
pnpm run check:code-quality:changed      0 findings across 25 files (all five scans)
pnpm exec oxfmt --write <changed files>  applied

OpenCode sessions live in one SQLite database read on a worker thread, and
the worker only ever answered with the newest few messages for the panel
preview. The parser therefore published nothing over the transcript channel,
so the search index wrote a placeholder row for every OpenCode candidate and
no OpenCode message was ever searchable.

Adds a `capture` request to the worker protocol that returns the session and
every text part of every user/assistant turn from one open of the database.
The agent parser asks for it whenever a sink is listening, so OpenCode joins
the whole-document sources on the same path as Grok, Cursor and Gemini. The
placeholder path (`parserPublishesMessages`, `noteUnreachableParser`) is gone;
an OpenCode read that fails now fails like any other file.

Bumps the index schema so existing indexes drop their placeholder rows, and
adds `sessionsByAgent` to the index status, which is the count that made this
bug visible.
OpenCode has two storage shapes, so asking only that some OpenCode session
published messages was satisfied by the legacy JSON fixture while every
SQLite session in the vault stayed silent. Assert per discovered source and
keep the agent-coverage check beside it.
Jinwoo-H added a commit that referenced this pull request Sep 15, 2026
… placeholder rows are rebuilt

Integration builds already shipped schema 6 with the Codex fix; main-bound
PR #20870 bumps 5 to 6 and will need 6 to 7 once #20763 lands first.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

A schema-probe failure still commits the session as indexed with empty messages — the unsearchable-but-counted shape this PR removes, and the one sessionsByAgent is meant to expose. Details inline.

Reviewed changes

  • Capture channel. New capture kind on the OpenCode SQLite worker protocol returns { session, messages } from a single open of the database: readOpenCodeSqliteSession for the panel and readOpenCodeSessionMessages for every user/assistant type:'text' part, joined into one TranscriptMessage per message row.
  • Routing. readOpenCodeSqliteCandidate requests capture when a sink is attached and parse otherwise, keeping a list scan preview-only; OpenCode SQLite stays on readWholeTranscript.
  • Decline machinery removed. parserPublishesMessages, the index consumer's unreachable branch / noteUnreachableParser, and session-search-opencode-decline.test.ts are deleted; readWholeTranscript now always reports incomplete: false.
  • Diagnostic and schema. sessionsByAgent added to store counts, indexer status, and the wire schema (optional); index schema version bumped 5→6 to drop the old placeholder rows.
  • Tests and fixtures. New end-to-end session-search-opencode-index.test.ts and per-source session-transcript-every-agent-capture.test.ts; per-agent layouts lifted into shared fixture modules, and writeJsonlFile/jsonlBody now newline-terminate the last record.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 8ad76f5d-b53d-4edc-8d5a-7bb4b6ef0d73

📥 Commits

Reviewing files that changed from the base of the PR and between ed24c77 and ce1f778.

📒 Files selected for processing (3)
  • src/main/ai-vault/session-scanner-opencode-sqlite-capture.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-fixture.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/ai-vault/session-scanner-opencode-sqlite-fixture.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-capture.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change adds OpenCode SQLite transcript capture through the scanner worker and publishes captured messages. It removes the previous non-publishing parser guard. Search indexing now reports session counts by agent and rebuilds indexes with schema version 6. Shared fixtures cover supported agent layouts and OpenCode database updates. Tests cover transcript publication, indexing, reconciliation, status counts, and fixture behavior.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to ce1f7

Very large OpenCode messages can lose searchable suffixes, and concurrent updates can briefly expose stale transcript data; both risks are bounded.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the bug, cause, implementation, and testing in detail, but it does not follow several required template sections. It omits the mandatory linked issue, Visual Proof with an exp… Add the missing template sections. Include a valid issue reference under Linked Issue, write N/A with a reason under Visual Proof if there is no visual change, complete AI Disclosure as applicable, add Review, Agent skill upstream boundar…
Docstring Coverage ⚠️ Warning Docstring coverage is 62.79% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 43 functions across 26 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: indexing OpenCode SQLite sessions for session search.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the bug, cause, implementation, and testing in detail, but it does not follow several required template sections. It omits the mandatory linked issue, Visual Proof with an explicit N/A when applicable, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections.

Resolution

Add the missing template sections. Include a valid issue reference under Linked Issue, write N/A with a reason under Visual Proof if there is no visual change, complete AI Disclosure as applicable, add Review, Agent skill upstream boundary, Notes, and Checklist content, and preserve the existing technical explanation and test results.

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 8baf0a24-7981-4df7-b75e-671a92dbe629

📥 Commits

Reviewing files that changed from the base of the PR and between 9878482 and 7673c44.

📒 Files selected for processing (28)
  • src/main/ai-vault-search/session-search-deleted-sources.test.ts
  • src/main/ai-vault-search/session-search-index-consumer.ts
  • src/main/ai-vault-search/session-search-indexer.ts
  • src/main/ai-vault-search/session-search-opencode-decline.test.ts
  • src/main/ai-vault-search/session-search-opencode-index.test.ts
  • src/main/ai-vault-search/session-search-schema.ts
  • src/main/ai-vault-search/session-search-service.test.ts
  • src/main/ai-vault-search/session-search-store.ts
  • src/main/ai-vault/session-scanner-agent-parser.ts
  • src/main/ai-vault/session-scanner-document-agent-fixtures.ts
  • src/main/ai-vault/session-scanner-every-agent-fixture.ts
  • src/main/ai-vault/session-scanner-fs-import-guard.test.ts
  • src/main/ai-vault/session-scanner-log-agent-fixtures.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-capture.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-fixture.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-client.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-entry.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-protocol.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-response.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-worker-spawn.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite.ts
  • src/main/ai-vault/session-scanner-test-fixtures.ts
  • src/main/ai-vault/session-scanner-vault-roots.ts
  • src/main/ai-vault/session-scanner.test.ts
  • src/main/ai-vault/session-transcript-consumers.test.ts
  • src/main/ai-vault/session-transcript-every-agent-capture.test.ts
  • src/main/ai-vault/session-transcript-reader.ts
  • src/shared/ai-vault-search-contract.ts
💤 Files with no reviewable changes (3)
  • src/main/ai-vault-search/session-search-deleted-sources.test.ts
  • src/main/ai-vault-search/session-search-opencode-decline.test.ts
  • src/main/ai-vault-search/session-search-index-consumer.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

let openTimestamp: string | null = null

const flush = (): void => {
const text = openRole && openParts.length > 0 ? boundedText(openParts.join('\n')) : null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Do not truncate oversized OpenCode messages.

extractPartText accepts strings of any length, and the capture limit applies only to the number of parts. A joined message can therefore exceed 262,144 UTF-16 code units. boundedText keeps only its prefix before search indexing. User and assistant text is then chunked normally, so the affected message remains indexed but terms and evidence in its suffix are unavailable. If the retained prefix is whitespace, boundedText drops the entire message.

-    const text = openRole && openParts.length > 0 ? boundedText(openParts.join('\n')) : null
+    const joined = openParts.join('\n')
+    const text = openRole && joined.trim() ? joined : null
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const text = openRole && openParts.length > 0 ? boundedText(openParts.join('\n')) : null
const joined = openParts.join('\n')
const text = openRole && joined.trim() ? joined : null

Comment on lines +156 to +158
const session = readOpenCodeSqliteSession({ db, ...args })
// No session row is no transcript: the id names nothing in this database.
return { session, messages: session ? readOpenCodeSessionMessages(db, args.sessionId) : [] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Use one SQLite read transaction for the capture.

captureOpenCodeSqliteSession reads session.time_updated and the message rows with separate statements. A concurrent append can therefore commit between them. The index can commit older session metadata with newer transcript rows and briefly mark that old candidate generation current. The next reconciliation sees the moved time_updated and replaces the rows, so the append is not permanently omitted.

Run both reads inside one read transaction. Roll back the transaction if either read fails.

Text parts alone left OpenCode behind every file-based provider: a command
someone ran, what it printed, and the model's reasoning were all unsearchable.

Widens the capture query to text, reasoning and tool parts. Reasoning folds
into the turn's own words, the way the shared block list already treats a
thinking block. Each tool part becomes one `tool` message carrying the call
line and what came back, built with the same `toolCallText` every file
provider uses; OpenCode's `filePath` is renamed to the `file_path` spelling
that list knows, so a call is findable by its file argument.

Adds a decoded-size ceiling beside the existing part ceiling. It is the bound
a non-streaming source needs and a streaming one does not: a JSONL provider
publishes each message as it reads it, while this one holds a whole session
before posting it across the worker boundary. Neither ceiling truncates; both
fail the read so it is retried and surfaces.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one new test that cannot fail.

Reviewed changes

  • Tool and reasoning capture. The OpenCode SQLite capture query now returns text, reasoning and tool parts: reasoning folds into the assistant turn's own words, and each tool part becomes its own tool message carrying the call line plus output (or the error), with OpenCode's camelCase filePath renamed to the shared file_path spelling.
  • Decoded-size ceiling. A new 64 MiB decoded-text bound sits beside the 20,000-part ceiling; both throw rather than return a prefix, so an oversized read fails and is retried.
  • Fixture and tests. The SQLite fixture can now write reasoning and tool parts, the index e2e test covers tool-output scope plus a call found by its file argument and a failed call by its error, and the every-source guard asserts OpenCode publishes all three roles.

I confirmed the third-party field assumptions against the real OpenCode schema (tool at top level, state.input / state.output / state.error, filePath), and ran the changed tests: 9 passed. Reverting session-scanner-opencode-sqlite-capture.ts to the prior commit fails the four tool/role tests but leaves the reasoning-fold test green.

ℹ️ Nitpicks

  • session-scanner-opencode-sqlite-capture.ts:181 still throws "holds more than … text parts" while the query now counts reasoning and tool parts too, and the constant's own comment was updated to "parts".

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

writeVault()
await startIndexer()

const hit = openEngine().search({ query: 'checking how the shard map is built' }).hits[0]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test passes with reasoning folding removed. The query shares the token shard with ANSWER (…reindexes every shard), so the assistant turn already matches on its text part and both assertions hold. I confirmed by reverting session-scanner-opencode-sqlite-capture.ts to the prior commit: this test stayed green while the other three new tool/reasoning tests failed.

Query a token that lives only in the reasoning part ('checking'), or assert the folded text directly as session-transcript-every-agent-capture.test.ts:143 does, so the test fails when the fold goes away.

Suggested change
const hit = openEngine().search({ query: 'checking how the shard map is built' }).hits[0]
const hit = openEngine().search({ query: 'checking' }).hits[0]

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: b7438c02-b3ab-49ef-8cf2-9700eb5f16fb

📥 Commits

Reviewing files that changed from the base of the PR and between 7673c44 and 9729483.

📒 Files selected for processing (4)
  • src/main/ai-vault-search/session-search-opencode-index.test.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-capture.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-fixture.ts
  • src/main/ai-vault/session-transcript-every-agent-capture.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

…rts of

`readOpenCodeSessionMessages` returned an empty list when the message-part
schema probe failed. The sink-aware reader treats that as a complete read,
so the consumer committed nothing and marked the source `current`: the
session stayed out of the index with nothing on its row to say why and no
retry. The part limit a few lines below already throws for exactly this
reason, so the two now agree.

The preview path is unchanged and still degrades to no messages, which is
what a list read should do.

Also throws from the fixture's `appendOpenCodeSqliteTurn` when the session
id names no row, instead of falling back to the fixture epoch and appending
orphan messages a test would then assert over.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No new issues in this delta. The new commit resolves the schema-probe finding; one prior minor thread (the reasoning-fold test shape) remains open and unchanged by these commits.

Reviewed changes

  • Fails an unreadable parts schema. readOpenCodeSessionMessages now throws instead of returning [] when canReadOpenCodeMessageParts is false, so the read reaches the failed-read/hold-out path rather than committing a counted session with zero messages.
  • Fixture strictness. currentUpdatedMs now throws for an unknown session or a non-numeric time_updated instead of silently falling back to the fixture epoch.
  • Coverage. A new test pins the rejection against a session-table-only database.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit 0d2f7bc into main Sep 16, 2026
28 checks passed
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 18, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
stablyai#20986), so that layer is now upstream's: `searchAllExecutionHosts` over
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 19, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
ivanvykopal pushed a commit to ivanvykopal/orca that referenced this pull request Sep 20, 2026
* feat(session-search): index OpenCode SQLite sessions

OpenCode sessions live in one SQLite database read on a worker thread, and
the worker only ever answered with the newest few messages for the panel
preview. The parser therefore published nothing over the transcript channel,
so the search index wrote a placeholder row for every OpenCode candidate and
no OpenCode message was ever searchable.

Adds a `capture` request to the worker protocol that returns the session and
every text part of every user/assistant turn from one open of the database.
The agent parser asks for it whenever a sink is listening, so OpenCode joins
the whole-document sources on the same path as Grok, Cursor and Gemini. The
placeholder path (`parserPublishesMessages`, `noteUnreachableParser`) is gone;
an OpenCode read that fails now fails like any other file.

Bumps the index schema so existing indexes drop their placeholder rows, and
adds `sessionsByAgent` to the index status, which is the count that made this
bug visible.

* test(session-search): assert every source speaks, not every agent

OpenCode has two storage shapes, so asking only that some OpenCode session
published messages was satisfied by the legacy JSON fixture while every
SQLite session in the vault stayed silent. Assert per discovered source and
keep the agent-coverage check beside it.

* feat(session-search): capture OpenCode tool and reasoning parts

Text parts alone left OpenCode behind every file-based provider: a command
someone ran, what it printed, and the model's reasoning were all unsearchable.

Widens the capture query to text, reasoning and tool parts. Reasoning folds
into the turn's own words, the way the shared block list already treats a
thinking block. Each tool part becomes one `tool` message carrying the call
line and what came back, built with the same `toolCallText` every file
provider uses; OpenCode's `filePath` is renamed to the `file_path` spelling
that list knows, so a call is findable by its file argument.

Adds a decoded-size ceiling beside the existing part ceiling. It is the bound
a non-streaming source needs and a streaming one does not: a JSONL provider
publishes each message as it reads it, while this one holds a whole session
before posting it across the worker boundary. Neither ceiling truncates; both
fail the read so it is retried and surfaces.

* fix(ai-vault): fail an OpenCode capture it cannot read the message parts of

`readOpenCodeSessionMessages` returned an empty list when the message-part
schema probe failed. The sink-aware reader treats that as a complete read,
so the consumer committed nothing and marked the source `current`: the
session stayed out of the index with nothing on its row to say why and no
retry. The part limit a few lines below already throws for exactly this
reason, so the two now agree.

The preview path is unchanged and still degrades to no messages, which is
what a list read should do.

Also throws from the fixture's `appendOpenCodeSqliteTurn` when the session
id names no row, instead of falling back to the fixture epoch and appending
orphan messages a test would then assert over.
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 21, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 22, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 25, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 27, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Sep 29, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Oct 1, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
nplez1 added a commit to nplez1/orca that referenced this pull request Oct 6, 2026
…on index

Agent Session History was a filesystem walk plus a parse of every transcript it
found, so one load cost O(corpus) in readdirs, stats and reads on every scan. The
index already holds one row per session with everything a row renders, so a list
is now one indexed read. The scanner stays as the fallback for a host where no
pass has completed or `node:sqlite` is absent, and it now applies the same
plain-text query the index would, because an unfiltered answer would read as
"everything matches".

Search gains a metadata tier:

- Metadata (a `sessions` row plus `sessions_fts` over titles, working
  directories, branches and agent names) is always indexed and answers with
  `evidence: null` — there is no transcript text to quote and none is
  fabricated. Content (`messages`, `messages_fts`) stays opt-in. The pre-tier
  `enabled` flag named that same consent, so a profile that recorded it keeps it
  as `contentEnabled` rather than having the question silently re-opened, and
  `status.enabled` now means only that an index exists and runs. The index writer
  takes that consent as `storeContent`, so a metadata-only index stores no message
  rows at all rather than storing and hiding them, and drops the `sessions_fts`
  row wherever it drops the session row.

The scanner service protocol grows `refresh` and `query` so a host can answer the
panel's list itself; both sides call `aiVaultHostListQuery`, so what the client
sends and what the host accepts cannot drift. Remote scanning gains a Copilot
source that walks a session directory without descending into the artifact trees
beside `events.jsonl`, which hold no sessions and cost a readdir each.

Rebased onto upstream 2026-09-18. Upstream landed its own all-computers search
merge in these same files (stablyai#20582, stablyai#20753, stablyai#20754, stablyai#20870, stablyai#20886, stablyai#20887,
`SessionSearchHostLeg`s, walking each host page by page and merging on recency and
round-robin ranking with an encoded merged cursor. This commit's own fan-out was
dropped rather than left to diverge with it —
`ai-vault-search-all-hosts.ts`, `-host-fanout.ts` and their tests now follow
upstream, and the fork's `ai-vault-search-merged-order.ts`,
`ai-vault-search-status-aggregation.ts`, `session-search-rank-fusion.ts` and their
tests are gone. What survives is what upstream has no equivalent of: the metadata
FTS tier, the indexed list, the service `query`/`refresh` protocol, and the
Copilot source. `contentEnabled` stays as an additive, optional status field.
Re-porting per-host status vocabularies and reciprocal-rank fusion onto upstream's
engine is deliberately left open, not lost.

Wire compatibility: `contentEnabled` is additive and optional, so an older peer
ignores it, and a host that predates the list `query` answers the scan request it
already understood. See docs/reference/agent-session-search-contract.md and
docs/reference/remote-wire-compatibility.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant