feat: add Buzz ACP compatibility adapter - #1423
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7a52f54 to
724d6d3
Compare
724d6d3 to
3e1339d
Compare
|
|
||
| export function publicationKey(route: BuzzRoute): string { | ||
| if (!route.replyTo) throw new Error("Buzz reply routes require an event anchor"); | ||
| return createHash("sha256").update(`${route.channelId}\0${route.replyTo}`).digest("hex"); |
There was a problem hiding this comment.
Buzz uses the thread root as replyTo for every turn in a thread. This gives every turn the same publication key. After the first reply all later responses are skipped as already published. Can we track the triggering event ID separately and use it for idempotency? replyTo should only determine where the response is posted.
| if (channel === null) return undefined; | ||
|
|
||
| const replyTo = context.match(new RegExp(`--reply-to\\s+(${EVENT_ID})`, "i"))?.[1]; | ||
| if (!replyTo) return undefined; |
There was a problem hiding this comment.
Buzz omits --reply-to for a new top-level DM. This parser rejects the route even though the DM channel is valid. The eve turn completes but its response cannot be posted. Can we accept a channel-only route and publish a top-level DM when replyTo is absent?
| await new Promise<void>((resolve, reject) => { | ||
| const child = spawn(options.buzzCli, publicationArguments(options.route), { | ||
| env: options.environment, | ||
| stdio: ["pipe", "ignore", "pipe"], |
There was a problem hiding this comment.
buzz messages send reports delivery as JSON with event_id and accepted. This discards that response and only checks the exit status. The CLI can exit successfully with accepted: false so the adapter may mark a rejected message as published. Can we capture stdout and commit only when accepted is true?
| }); | ||
| await reservation.commit(); | ||
| } catch (error) { | ||
| if (turn.publication.signal.aborted) await reservation.commit(); |
There was a problem hiding this comment.
Cancellation does not tell us whether Buzz received the message. This marks every cancelled send as published even when the message may not have been delivered. It also allows a retry after every other error even when the message may have been delivered. That can either lose the reply or post it twice. Can the publisher return delivered not delivered or unknown and use that result to update the reservation?
| try { | ||
| return { info: await dependencies.readEveTargetInfo(targetOptions) }; | ||
| } catch (error) { | ||
| if (!(error instanceof VercelDeploymentProtectionError) || options.target.kind !== "remote") { |
There was a problem hiding this comment.
The runtime uses the eve verified remote client but this installer probe does not. It fetches /eve/v1/info directly and only starts authentication after a Vercel Protection redirect. A normal eve 401 stops installation before login. Can this probe use the same verified remote client as eve acp?
| turns.set(keyForId(message.id), { | ||
| cancelled: false, | ||
| publication: new AbortController(), | ||
| route: parseBuzzRoute(text), |
There was a problem hiding this comment.
Buzz uses one ACP session per channel and can allow multiple people to trigger it. This route does not retain the verified sender identity. Every person who can trigger the agent therefore uses the same eve authentication and connections.
Signed-off-by: Colton Padden <colton.padden@vercel.com>
Signed-off-by: Colton Padden <colton.padden@vercel.com>
Signed-off-by: Colton Padden <colton.padden@vercel.com>
Signed-off-by: Colton Padden <colton.padden@vercel.com>
Signed-off-by: Colton Padden <colton.padden@vercel.com>
Signed-off-by: Colton Padden <colton.padden@vercel.com>
Signed-off-by: Colton Padden <colton.padden@vercel.com>
e8d0d59 to
466379a
Compare
Description
Adds the experimental
eve-buzz-acp-adapterpackage, a host-local compatibility adapter that lets Buzz run an eve agent through stable ACP while publishing signed, threaded replies with the local Buzz CLI.The package includes:
doctor, anduninstallflows;This PR is stacked on #1347, which provides the generic ACP adapter and verified remote ACP authentication. Related to #100.
How did you test your changes?
pnpm --filter eve-buzz-acp-adapter test:unitpnpm --filter eve-buzz-acp-adapter typecheckpnpm --filter eve-buzz-acp-adapter buildpnpm guard:invariantspnpm docs:checkpnpm check:depsPR Checklist
CONTRIBUTING.mdgit commit --signoff)Relevant upstream Buzz issues