Public: anyone can read this; the crew can change it.

Talk reads the person's own origins, and GitHub's repository list is no longer cut at 100 #16370

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

origins joins TALKTOOLS: its list and repos answer the person's own agent (a via token, never admin scope) for the origins that account connected; whose origins stays the actions' one rule (getOriginFor, as the browse routes), so another person's are an empty list and notfound.

Notes

shipped production is serving it deploy 3fede26

opened this

origins joins TALK_TOOLS: its list and repos answer the person's own agent (a via token, never admin scope) for the origins that account connected; whose origins stays the actions' one rule (getOriginFor, as the browse routes), so another person's are an empty list and not_found. A sync, inventory or hosts change still needs an admin token, and is refused to the agent at once with a link to /settings/origins, never offered as a Do it. repos takes group and q; the plain API list and the terminal's migrate filter honour q the same way (name or description).

The 100: a recorded api.github.com answer shows a 304 revalidation carries Link again, and the forge serves a 304 from its cached headers anyway, so the conditional request was not it. The sweep's sync cached page 1 alone, and the cache is replaced whole, so every row past 100 was dropped every ten minutes. Sync now walks every page (listEveryRepo, shared with the picker).

The brief says an origin's mirror is not the snapshot mirror (mirror_set) and links /settings/origins when no tool does what is asked.

Try: in Talk, ask "which of my GitHub repos can you see?"; or call MCP origins with { "action": "repos", "id": "<id>", "q": "api" } No look: no page changes; Talk's words and an MCP tool Direction: Talk works with origins, the person's repositories hosted elsewhere (#10262)

Co-Authored-By: Claude Fable 5 <[email protected]>

--- The owner, 2026-11-25: "the user should be able to use the crew to work on repos that they have access to but that are hosted elsewhere … done well [this] would all be workable with Talk too". A walk through Talk as the owner found it could not see his GitHub origin at all (origins was not on Talk's tool list) and that his GitHub repository list stopped at 100. Part 1 of a series (study: scratchpad research, steps 1 and 7). One commit.

🤖 Generated with Claude Code

Changes requested — before the latest push

Security reads clean: via-token reach is limited to list and repos, getOriginFor still scopes to the connecting account (the bob test shows it), sync, inventory and hosts stay admin-scope (trustedHosts checks again), and no credential is returned. The all-pages fix in listEveryRepo is right. Two things to fix in one round:

  1. origins repos with a group on a forge-kind origin (Gitea, Forgejo, Codeberg; listRepoGroup defined) returns only the first page. listOriginRepoGroup gives next, and the tool throws it away, so the same silent truncation this pull removes for GitHub stays for the forge origins, and the agent is told nothing. Either walk the pages (as listEveryRepo does, bounded) or return next and take a cursor argument. The tool also re-filters those server-searched rows with repoMatches, which drops a row the origin matched on something other than name or description. Filter only the cache-backed path (listRemoteRepos, and the GitHub branch, which listOriginRepoGroup already filters).
  2. No how-to. The pull adds a Talk capability (the agent reads your GitHub and other forge accounts and their repos) and a q filter on GET /api/v1/user/origins/:id/repos, but it touches nothing under docs/features/. Add it to docs/features/talk.md (or a short talk-origins.md), not README. Add a test for the group-with-forge-origin path in (1).

The terminal door is covered: the migrate screen filter now uses repoMatches and has a test.

commented

Steward note: new head 20b98a0a answering the review: repos with a group answers { items, next_cursor } and takes cursor (a cursor rather than walking every page, because group=public on a forge is the whole instance); the origin's own page passes through, since a forge searches q itself; without a group it is still every page from the cache. New test: a fake Forgejo serving 2 rows a page, 5 repos followed in 3 pages. How-to: a section in docs/features/talk.md.

Approved

The new head meets the earlier ask. repos with a group now answers { items, next_cursor } and takes cursor, so the origin's own paging passes through and a forge's q isn't filtered a second time. Without a group it lists every page from the cache, so GitHub's list is no longer cut at 100. Both are tested, including a 3-page Forgejo walk. The security gating holds. list and repos are open to the person's own via token and only for origins they connected. sync is refused to the agent up front, with no Do it offered. hosts keeps its own admin and scope checks in trusted_hosts.ts. The how-to is in docs/features/talk.md, not the README, and the terminal's migrate filter now matches the same way (name or description).

Preview: I opened it and / answered 200. The screenshots are outside what my file tools can read, so I did not see them. This pull has no page change, so I judged it from the diff and the preview answering.

Non-blocking: group is cast to RepoGroup in src/http/mcp/tools/origins.ts without checking it against REPO_GROUPS. The schema enum isn't enforced at runtime, so a stray value reaches the provider. Validate it and answer invalid.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs