Skip to content

TX-122: Task attachments (agent runtime) - #14

Merged
col merged 4 commits into
mainfrom
throng/TX-122
Aug 28, 2026
Merged

TX-122: Task attachments (agent runtime)#14
col merged 4 commits into
mainfrom
throng/TX-122

Conversation

@throng-app

@throng-app throng-app Bot commented Aug 28, 2026

Copy link
Copy Markdown

Summary

throng-agent side of task attachments (TX-122). Companion to col/throngx#210.

Adds an optional attachments field to the workspace manifest and downloads the files into the sandbox at boot so the coding agent can read them.

Changes

  • packages/core: AttachmentSpec { filename, content_type, url } + optional WorkspaceManifest.attachments (backward-compatible — absent ⇒ [], so an older throngx that doesn't send the field still boots).
  • Boot: new downloadAttachments step (Node fetch, filename basename-sanitised against path traversal) writes files into attachments/ — a sibling of the working directory, so the system prompt's ../attachments/<name> paths resolve. Download failure fails boot loudly (StepError).
  • EngineAdapter.buildAgentConfig widened with an optional additionalDirectories arg; the Claude adapter sets claude.additionalDirectories = [attachmentsDir] so the SDK may read the sibling dir. Codex adapter unaffected.

Testing

  • packages/core: 270/271 pass (the 1 failure is a pre-existing, unrelated throng-creds cache-dir-guard test on main).
  • throng-agent-claude build/test require the private @col/a2a-claude (not installable in the dev sandbox); its diff was verified by static inspection + before/after tsc --noEmit. CI validates.

🤖 Generated with Claude Code

Throng Agent added 3 commits August 28, 2026 01:49
Adds bootstrap/attachments.ts (downloadAttachment/downloadAttachments over
Node's global fetch, sanitising filenames to basenames), threads a new
BootDeps.downloadAttachments through TaskRun, and has materialiseWorkspace
compute a sibling attachments dir and download into it when the manifest
carries attachments, returning both paths. boot() grants the agent access
to that dir via a widened, backward-compatible EngineAdapter.buildAgentConfig
third argument.
@throng-app
throng-app Bot marked this pull request as ready for review August 28, 2026 02:25
Replace the sequential await loop with Promise.all so N attachments
download concurrently (wall-clock = slowest single download, not the
sum). Fan-out is unbounded but bounded in practice — throngx caps a task
at 10 attachments. Failure semantics unchanged: the first rejection
rejects the whole call, which boot turns into StepError("attachments").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@col
col merged commit 8bfd22e into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant