Public: anyone can read this; the crew can change it.
Talk's origins answers tidily: repos finds the account without an id, a page of one-line rows with the total #16402
Check · Review · Land · Live done — Landed and live in production.
In production Talk's first origins {action:"repos"} had no id and failed, and the listing it then read came to about 92,000 characters. repos now finds the account: the id given, or a word naming one (github, a host), or with none the person's only account; several and no word are named in one line (login, host, id).
shipped production is serving it deploy 3fede26
No security finding: the origin is resolved only from listUserOrigins(user), so a guessed id or word reaches nothing of anyone else's, and the changed tests pass here. These are the changes I need, all in one round.
- Dead code, src/http/mcp/tools/origins.ts, end of
run. Afterreposnow returns early, the closingreturn bad("bad_action", ...)can never run, because the action was already validated above. Remove it, or restructure sorunends on the sync/inventory branch. - The group path's cursor condition is muddled.
cursor === undefined || local > 0 || cursor.startsWith("o:") ? {} : { cursor }has a redundantlocal > 0, sincelocal > 0already implies theo:prefix. Say it once: passcursorto the origin unless it is ano:cursor. Also say in one comment why a group read that comes back withnext === nullis paged locally and a forge's own page is not. - Tests for behaviour the pull adds are missing. Nothing asserts: (a) the
forkandhere as owner/nameparts of a repo line, which are a new output format; (b) that agroupread withoutfullreturns one-line strings, since every group test now passesfull: true; (c) thatfull: truewithout a group returns objects, which is the only case mcp-origins covers; (d) that agroupread of a cached whole list (not a forge page) returns theo:cursor and walks to the end; (e) that an unknownidor word givesnot_foundwith the account list. Add tests that would fail without each. - The no-group
reposanswer changes shape from an array to{ total, items, next_cursor }, anditemsdefault to strings. Say so in the origin's feature how-to under docs/features/ (forge-origin.md or the page that already describes Talk's origins reads) in one line, so the shape has a written home. The README is capped, so do not put it there.
I couldn't fetch my earlier review or the old head (1cb52c8c4a6d isn't in the clone), so I read the current change whole. It's clean.
- Account scoping:
originForresolvesidonly againstlistUserOriginsfor the caller. A word likegithubor a host can't reach another person's origin, and the error lists only the caller's own accounts. - Cursor: the
o:cursor is parsed withparseInt, clamped at 0 and used only as a slice offset. An origin's own cursor is never mixed with it. - Output size: pages are capped at 50 one-line rows, and
fullis opt-in. The only user text in a row is the repo name. - Tests: they cover paging to the end,
total, the id-less and word-named account cases, the several-accounts error and the no-accounts error. They also cover the fork andhere asmarkers and theo:cursor for a group read whole. - Docs: the how-to is in
docs/features/talk.md, not the README.
Non-blocking: originFor returns {id} or a bad result and the caller tells them apart with "id" in found. A small discriminated type would be clearer.
In production Talk's first
origins {action:"repos"}had no id and failed, and the listing it then read came to about 92,000 characters.reposnow finds the account: theidgiven, or a word naming one (github, a host), or with none the person's only account; several and no word are named in one line (login, host, id). It answers 50 rows a page, one line each (name, private or public, fork, its copy here), withtotalandnext_cursorsent back ascursor;fullgives every field. A list read whole (the cache, GitHub's group) is paged here with ano:cursor; a forge's own page of a group keeps the origin's cursor. Archived is not in the cached listing, so a line does not say it.Try: in Talk, ask "which of my GitHub repositories can you see?" and see one page of short lines with the total No look: no page changes; the MCP tool's answer only No door: the terminal already lists an origin's repositories a screen at a time (Migrate, its filter); the page size and the one-line rows are for the agent's reply, which has no terminal twin Direction: Talk works with origins, the person's repositories hosted elsewhere, from the production test of 11-25 (#10262), ahead of #6534
Co-Authored-By: Claude Fable 5 <[email protected]>
--- Found on production 0.7.656 (conversation 01m88ktaebbwnyhfjxhzs5ka3x): asked for his GitHub repositories, the agent's first
origins reposcall failed for want of an id, and the listing it then got was about 92,000 characters. One commit.🤖 Generated with Claude Code