Public: anyone can read this; the crew can change it.
Talk API: a person's sent files on each turn, and search inside turns #18009
Merged 10h 35m ago, live in production
Both parts of the Talk API are in: sent files on each person turn, and search inside turns. Both are covered by a new contract-tested test file, test/talk-search-files-api.test.ts. I ran that file and the API-contract, route-list and Talk tests that touch these routes, and they pass.
-
Reviews
ApprovedClean. I opened the preview:
/answers 200, and/api/v1/conversations/search?q=hellowith no app token answers 401 in the usual error shape. The preview has no pictures for this change, since it is API only. I could not sign in as a person there, so the data paths are judged from the tests and the code. The search route is auth-gated and takes the user id from ctx.auth, so it only reads the caller's own conversations. Paging and q are validated at the boundary, and the response is private and no-store. Files on person turns are read through filesOfTurns scoped to the user. The schema, route description, lazy route list and docs/features/talk.md all agree with the code. The tests cover files, search, cursor paging, isolation between users, and the 422 and 401 refusals. Minor, not blocking: the findConversations signature runs past 100 columns, and paging stops at the 200 best hits. -
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Talk search checks its paging before its query, so a bad limit or cursor is refused in the one shape (#18004) db04a48
- Merge main into the talk files and search pull (#18004) 6cfacb6
- Talk API: an agent turn's cards as data, with exact values (#18008) 866b811
- The test files outside api-* read no answer that disagrees with openapi.json (#18001) d861d63
- Regenerate the lazy route list for conversations/search (#18004) a3b25ca
- Talk API: sent files on each person turn, and search inside turns (#18004) fa1e2a5
- Traces: every conversation and run kept as a trace, imported from outside agents, and explored in the forge (#17968) 35a5490
- Traces 3: one trace as a tree beside a time strip, with what it changed (#17996) 2902a64
- Merge pull request #17997 from sold/ssh-mlkem 05c87e1
- SSH: the hybrid's K has its own known answer, the client test skips the hybrid on OpenSSH before 9.9, one comment, the docs in their own paragraph 281e40c
- Merge pull request #17998 from sold/tab-start 7e39794
- The /tab fix serves #16840 4eed511
- /tab starts in Safari and Chrome: the worker sees its host page, and the page waits for activation a5d9dd7
- SSH offers the hybrid post-quantum key exchange first: mlkem768x25519-sha256 1124a92
- The api-* test files read no answer that disagrees with openapi.json (#17990) 2d01f4a
- The suite's fetch reports each /api/v1 answer that disagrees with openapi.json, without failing yet (#17989) 3a1266c
- Anonymous, opt-in app telemetry: a route to receive daily summaries, and an owner view (#17967) 973052e
- Runner jobs' git-upload-pack: count the work per job, then cut it so the serving thread is not held (#17984) ee5308f
- A `[loop]` stall line names what the serving thread was doing: the route or duty in flight (#17982) bb47d9a
- takeLook's loopback-only test stops failing checks for a missing prerequisite (56 reds last week) (#17979) 87f7f1b
2 earlier comments
Both parts of the Talk API are in: sent files on each person turn, and search inside turns. Both are covered by a new contract-tested test file, test/talk-search-files-api.test.ts. I ran that file and the API-contract, route-list and Talk tests that touch these routes, and they pass. tsc is clean and the gate gave only two notes. I did not run the full suite because the forge runs it on the push. The final shapes for the issue comment are below.
What changed
GET /api/v1/conversation/turns: each person turn now carriesfiles: [{id, name, type, size}], with[]when nothing was sent. These are the files attached to that turn, read in one query by the existingfilesOfTurns. Agent turns are unchanged.GET /api/v1/conversations/search?q=&limit=&cursor=is new:- It answers
{items: [{conversation: {id, title}, turnId, snippet}], next_cursor}, best match first. - It runs on
findConversations, the same search/talk?find=uses, and only looks at the caller's own conversations. turnIdisnullwhen only the title matched.qis 1 to 100 characters.limitis 1 to 200, default 50. A badq,limitorcursoris a 422, and no token is a 401.- Reads need only a read token, not a session.
- It answers
findConversationsgained an optionalmaxargument. The page keeps its 20-conversation cap. The API asks for up to 200 and pages through them with the sharedoffsetQueryandoffsetPage.openapi.jsonhas the new route and the updated turns description.docs/features/talk.mddocuments both.lazy_lists.tsis regenerated for the new path.
What I chose not to do
- No terminal change. The terminal already shows sent files and searches conversations, so the commit says
No door: …. - No hit per turn. The search returns one hit per conversation, as the page does, so "search inside turns" means the best-matching turn of each conversation.
- The gate notes that my test's user helper looks like
makeUserintest/talk-build.test.ts; I kept it local.
Try it
Call GET /api/v1/conversations/search?q=hello with a bearer token on this pull's preview. GET /api/v1/conversation/turns shows files on a turn that had an attachment.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. Type-check is clean and the Talk, contract and route-list tests pass, but I did not run the full suite, so the forge's check on this push is the full verdict.
Both conflicts were beside the same lines main had changed:
conversation_talk.ts:mainaddedcardsto agent turns. I kept that and myfileson person turns.getApiV1ConversationTurns.ts:mainnow describes the reply with a typedConversationTurnsschema. I kept its longer description and appended the sentence aboutfiles.
main's schema would not have listed files, so I added it to the turn schema in schemas/conversation.ts, marked optional because only person turns carry it. I regenerated the route index and the lazy route list.
The pull description from my earlier message still stands.
This push fixes the two list-route failures from the check. GET /api/v1/conversations/search now checks limit and cursor before it checks q. A bad limit or cursor gets the same refusal as every other list route.
- Before: with no
q, the route answeredinvalid_queryfirst, sotest/list-limit-shape.test.tsnever sawinvalid_limitorinvalid_cursor. - Cursor refusal: the cursor refusal also lacked
field: "cursor". It now goes throughcursorRefusal, like the other routes. - Cold
/map: I didn't change anything for "a cold /map answers within a few passes over the runs". It passed in a local re-run oftest/observability-budget.test.ts, and the failure looks timing-related under the check's load. If it fails again on the next check, it needs a real look.
Verification:
bun testpasses fortest/list-limit-shape.test.tsand thetest/api-conversation*.test.tsfiles.bun x tsc --noEmitis clean.gate.ts --fixchanged nothing. It noted one comment over 100 columns insrc/core/conversations.ts, which I left because the nightly rewrap handles it on main. It also flaggedmkintest/talk-search-files-api.test.tsas 0.82 similar tomakeUserintest/talk-build.test.ts. I left that too.
I haven't re-run the full check; the forge runs it on this push.
Both parts of the Talk API are in: sent files on each person turn, and search inside turns. Both are covered by a new contract-tested test file,
test/talk-search-files-api.test.ts. I ran that file and the API-contract, route-list and Talk tests that touch these routes, and they pass.tscis clean and the gate gave only two notes. I did not run the full suite because the forge runs it on the push. The final shapes for the issue comment are below.What changed
GET /api/v1/conversation/turns: each person turn now carriesfiles: [{id, name, type, size}], with[]when nothing was sent. These are the files attached to that turn, read in one query by the existingfilesOfTurns. Agent turns are unchanged.GET /api/v1/conversations/search?q=&limit=&cursor=is new:{items: [{conversation: {id, title}, turnId, snippet}], next_cursor}, best match first.findConversations, the same search/talk?find=uses, and only looks at the caller's own conversations.turnIdisnullwhen only the title matched.qis 1 to 100 characters.limitis 1 to 200, default 50. A badq,limitorcursoris a 422, and no token is a 401.findConversationsgained an optionalmaxargument. The page keeps its 20-conversation cap. The API asks for up to 200 and pages through them with the sharedoffsetQueryandoffsetPage.openapi.jsonhas the new route and the updated turns description.docs/features/talk.mddocuments both.lazy_lists.tsis regenerated for the new path.What I chose not to do
No door: ….makeUserintest/talk-build.test.ts; I kept it local.Try it Call
GET /api/v1/conversations/search?q=hellowith a bearer token on this pull's preview.GET /api/v1/conversation/turnsshowsfileson a turn that had an attachment.🤖 Generated with Claude Code
Closes #18004