feat(repos): read one file from a public repository #681

Merged
coilyco-ops merged 1 commit from coilyco-ops/read-a-public-file into main 2026-08-13 18:41:09 +00:00 AGit
Member

closes #679 - read_public_file, sibling to the inventory, no credential and no mount; stacked on the inventory PR so review that first

closes #679 - read_public_file, sibling to the inventory, no credential and no mount; stacked on the inventory PR so review that first
feat(repos): read one file from a public repository
All checks were successful
ci / image-build (pull_request) Successful in 25s
ci / test (pull_request) Successful in 41s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
7252028d77
read_public_file takes owner, repo, path and an optional ref, sibling to
list_public_repos: same forge, same absence of a credential.

Together the two answer sirens-echo#633's stated need, which is that the
agent cannot read its own source, without the mount that issue asks for.
A mounted clone is stale the moment anything merges, which here is
several times an hour. An API read is current by construction.

A path that climbs out is refused before any request is made, so a
refusal costs no round trip and the caller is told rather than silently
corrected. Each segment is escaped separately, so a path keeps its
separators while a segment carrying a slash cannot forge one.

Output is capped and says so when it cuts, the same shape the fetch tool
uses, because a half file the model cannot tell from a whole one is
answered from with ordinary confidence.

The mount question stays open on 633. It buys grep across a tree and
following imports, which this does not.

Stacked on the inventory in sirens-echo#642.

Refs sirens-echo#679, sirens-echo#633

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!681
No description provided.