feat(web): add bounded transcript content search - #387
Conversation
|
CI status note: Node 22/24 completed this PR's repository checks and failed only at the final fresh-install I reproduced the packed install independently: npm now admits Pi 0.85.0 through OpenPI's published No dependency workaround is mixed into this feature PR. |
tt-a1i
left a comment
There was a problem hiding this comment.
需要改:tool-call 参数会进搜索 snippet
web/search/transcript-search.ts 的 messageEvidence 对 toolCall 做了:
const payload = tool.arguments === undefined ? tool.input : tool.arguments;
text: `${tool.name} ${JSON.stringify(payload)}`PR 正文写排除 private result details,但 arguments / input 整段可搜、可进 snippet。工具参数里的 token、路径、密钥会漏到 Web 搜索面。
toolResult 正文也会整段进 index。请把 arguments 从 searchable text 拿掉,或只留 allowlisted 的非敏感字段,并补一条「密钥不得出现在 snippet」的测试。
原语本身(文件/大小/命中上界、symlink 检查、AbortSignal)是好的,泄漏修完再合。现在还没有 HTTP endpoint,但这个函数一旦接上就会爆。
|
已按 review 修复并推送到 |
Keep author history. No feature changes beyond clean automatic integration with c1c60cd.
tt-a1i
left a comment
There was a problem hiding this comment.
Exact-head review of integrated 3e04d85 (tree e5af1744e3525d5859929eff2c44c076d5a3f357). The previous tool-payload indexing blocker is fixed: tool calls/results contribute names only; arguments, input, result bodies and details are excluded. Focused tests and independent probes exercised those exclusions along with path, provenance and resource bounds. No blocking finding was confirmed.
The main integration is clean and preserves the reviewed scanner/test bytes; the delta is only those two new files. No tool registration, model context, persistence writes or host endpoint is changed.
Validation on the integrated tree: bun run check passed; serial bun run test passed (Node 1436 passed, 1 skipped, 0 failed; Vitest 30 passed), including 9 transcript-search tests. Earlier member-CLI full runs had two rendering failures and a setup timeout that also reproduced on pure main; those logs are retained, the exact environment trigger remains unknown, and no workaround was applied to obtain this pass.
This is approval of the scanner primitive, not end-to-end search UI or installed runtime acceptance. Required remote CI and repository approval rules still apply; no merge was performed.
Problem
Issue #349 requires transcript-aware server search, but the current Web snapshot exposes only a bounded title/cwd/first-message projection. The open metadata-search PRs do not provide a safe mechanism for scanning Session JSONL content or tool evidence.
Relates to #349. This PR implements the transcript-scanner slice only; it does not duplicate PR #362's endpoint or PR #376's pagination work.
Value
Approach
searchWebTranscripts()over a caller-authorized Session catalog; the scanner never discovers or widens filesystem authority.AbortSignalcancellation.partialReasonsand accounting.The existing lightweight metadata filtering remains separate. Endpoint composition, pagination/cursors, and derived index invalidation remain follow-up slices of #349.
Validation
Integrated with main
c1c60cd9e357044b53042ab23963d053b46dae9f, preserving the author's commits. The scanner and its test are byte-identical to reviewed headc2f395b; no tool registration, prompt context, or host route is added.bun run check: passed with the frozen lockfile and Pi 0.85.1.bun run teston integrated treee5af1744e3525d5859929eff2c44c076d5a3f357: Node 1436 passed, 1 skipped, 0 failed; Vitest 30 passed.Impact