Repository navigation
Conversation
|
@Stener1 is attempting to deploy a commit to the seanbrydonio's projects Team on Vercel. A member of the Team first needs to authorize it. |
… does A plugin can upload a pasted or dropped file into a running session's worktree, or a worktree an agent is about to start in, and put the path it resolves with in a prompt. It reuses the composer's upload: the same names, the same 20 MB refusal, .json as plain bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reenshots; api.localPaths A plugin can attach a file a paste names on this computer, found in the pasted text by api.localPaths: the laptop agent uploads it, and a box on this computer gets the path as it is. pasted: true shrinks a screenshot first, as the composer does. The verify skill's dev box can listen on another address (VERIFY_BOX_ADDR), so a path's upload is driven for real. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
attach with a path on this computer now passes opts.signal to the laptop agent's request, so an aborted attach uploads nothing (Client.laptop takes a signal). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stener1
force-pushed
the
plugin-api-attach
branch
from
October 23, 2026 23:01
c04c2d4 to
3690ba8
Compare
This branch has not been deployed
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
Plugins can give an agent a file the way the composer does.
berth.apigets two methods. Both go through the composer's own helpers inlib/attachments.ts, so there is no second upload path:Attachmentis now declared in@berth/plugin; the app re-exports it.typeof berth.api.attach === "function", so it still loads on an older app.Client.laptoptakes an optionalsignal, so an aborted attach of a path uploads nothing.docs/reference/plugin-sdk.mdx(apitable), the SDK README, the changelog.plugin-attach-livescenario,features/plugins.mdplugin-attach, anddev-box.shtakesVERIFY_BOX_ADDRso the dev box can count as another computer.Evidence
Unit:
app/src/lib/attachments.test.tscovers the session route, the worktree route, the pasted name,.jsonsent as octet-stream, the 20 MB refusal with no upload, a path going throughattach-localfor both targets, a path on a local box resolving unread, the signal reaching the laptop call,pastedon a text file, andlocalPaths.pnpm test: 586 pass, 0 fail.typecheck:plugins, everycheck:*,build,tsc -p e2eand the docs-site build all pass. No Go changed.End to end:
verify-berthdplugin-attach-live. A test plugin is loaded as a built-in, on a dev box and agent of this checkout, through the real app build. The console was empty in both runs.Steps from
result.json(remote run):notes.mdattached to sessionasklands atacme-shop/.berth/attachments/20261022-…-notes.md, with progress 50/50.image.pngattached to a new worktree lands as…-pasted-HHMMSS.png.localPaths("see /tmp/shot.png")gives[].localPaths("file:///tmp/verify-attach-…/shot.png")finds the path, and attaching it uploads through the laptop agent, byte for byte. On the loopback box the same call resolves to the path itself, and nothing arrives.AbortError, and nothing arrives.pasted: truegoes up as a 1.9 MB WebP.git check-ignoreignores each one.Merge Danger
Door: two-way
Additive SDK surface. The only change to an existing signature is an optional trailing
signalonClient.laptop.Blast Radius: plugins
A plugin that calls
attachon an older app finds no function, which is the documented feature check. The composer's own attach paths are untouched apart fromuploadLocalFiletaking an optional signal they don't pass.🤖 Generated with Claude Code