TX-122: Task attachments (agent runtime) - #14
Merged
Merged
Conversation
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
throng-agent side of task attachments (TX-122). Companion to col/throngx#210.
Adds an optional
attachmentsfield 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 }+ optionalWorkspaceManifest.attachments(backward-compatible — absent ⇒[], so an older throngx that doesn't send the field still boots).downloadAttachmentsstep (Nodefetch, filename basename-sanitised against path traversal) writes files intoattachments/— a sibling of the working directory, so the system prompt's../attachments/<name>paths resolve. Download failure fails boot loudly (StepError).EngineAdapter.buildAgentConfigwidened with an optionaladditionalDirectoriesarg; the Claude adapter setsclaude.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, unrelatedthrong-credscache-dir-guard test onmain).throng-agent-claudebuild/test require the private@col/a2a-claude(not installable in the dev sandbox); its diff was verified by static inspection + before/aftertsc --noEmit. CI validates.🤖 Generated with Claude Code