Skip to content

Commit 3ab9773

Browse files
committed
build: upgrade acp-go-sdk from v0.4.9 to v0.6.3
Update to latest ACP SDK version which renames ToolCallUpdate to RequestPermissionToolCall. Adapt all usages in permission request handling to use the new type name. Also fixes function comment to match actual function name (SetAgentConnection).
1 parent c6ababb commit 3ab9773

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/charmbracelet/glamour/v2 v2.0.0-20250811143442-a27abb32f018
1717
github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.3.0.20250917201909-41ff0bf215ea
1818
github.com/charmbracelet/x/ansi v0.10.2
19-
github.com/coder/acp-go-sdk v0.4.9
19+
github.com/coder/acp-go-sdk v0.6.3
2020
github.com/dop251/goja v0.0.0-20251008123653-cf18d89f3cf6
2121
github.com/fatih/color v1.18.0
2222
github.com/goccy/go-yaml v1.18.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ github.com/charmbracelet/x/windows v0.2.2 h1:IofanmuvaxnKHuV04sC0eBy/smG6kIKrWG2
6262
github.com/charmbracelet/x/windows v0.2.2/go.mod h1:/8XtdKZzedat74NQFn0NGlGL4soHB0YQZrETF96h75k=
6363
github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY=
6464
github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
65-
github.com/coder/acp-go-sdk v0.4.9 h1:F4sKT2up4sMqNYt6yt2L9g4MaE09VPgt3eRqDFnoY5k=
66-
github.com/coder/acp-go-sdk v0.4.9/go.mod h1:yKzM/3R9uELp4+nBAwwtkS0aN1FOFjo11CNPy37yFko=
65+
github.com/coder/acp-go-sdk v0.6.3 h1:LsXQytehdjKIYJnoVWON/nf7mqbiarnyuyE3rrjBsXQ=
66+
github.com/coder/acp-go-sdk v0.6.3/go.mod h1:yKzM/3R9uELp4+nBAwwtkS0aN1FOFjo11CNPy37yFko=
6767
github.com/containerd/stargz-snapshotter/estargz v0.17.0 h1:+TyQIsR/zSFI1Rm31EQBwpAA1ovYgIKHy7kctL3sLcE=
6868
github.com/containerd/stargz-snapshotter/estargz v0.17.0/go.mod h1:s06tWAiJcXQo9/8AReBCIo/QxcXFZ2n4qfsRnpl71SM=
6969
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=

pkg/acp/agent.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (a *Agent) Stop(ctx context.Context) {
5959
}
6060
}
6161

62-
// SetConnection sets the ACP connection
62+
// SetAgentConnection sets the ACP connection
6363
func (a *Agent) SetAgentConnection(conn *acp.AgentSideConnection) {
6464
a.conn = conn
6565
}
@@ -325,7 +325,7 @@ func (a *Agent) handleToolCallConfirmation(ctx context.Context, acpSess *Session
325325
func (a *Agent) handleMaxIterationsReached(ctx context.Context, acpSess *Session, e *runtime.MaxIterationsReachedEvent) error {
326326
permResp, err := a.conn.RequestPermission(ctx, acp.RequestPermissionRequest{
327327
SessionId: acp.SessionId(acpSess.id),
328-
ToolCall: acp.ToolCallUpdate{
328+
ToolCall: acp.RequestPermissionToolCall{
329329
ToolCallId: acp.ToolCallId("max_iterations"),
330330
Title: acp.Ptr(fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations)),
331331
Kind: acp.Ptr(acp.ToolKindExecute),
@@ -391,7 +391,7 @@ func buildToolCallComplete(toolCall tools.ToolCall, output string) acp.SessionUp
391391
}
392392

393393
// buildToolCallUpdate creates a tool call update for permission requests
394-
func buildToolCallUpdate(toolCall tools.ToolCall, tool tools.Tool, status acp.ToolCallStatus) acp.ToolCallUpdate {
394+
func buildToolCallUpdate(toolCall tools.ToolCall, tool tools.Tool, status acp.ToolCallStatus) acp.RequestPermissionToolCall {
395395
kind := acp.ToolKindExecute
396396
title := tool.Annotations.Title
397397
if title == "" {
@@ -402,7 +402,7 @@ func buildToolCallUpdate(toolCall tools.ToolCall, tool tools.Tool, status acp.To
402402
kind = acp.ToolKindRead
403403
}
404404

405-
return acp.ToolCallUpdate{
405+
return acp.RequestPermissionToolCall{
406406
ToolCallId: acp.ToolCallId(toolCall.ID),
407407
Title: acp.Ptr(title),
408408
Kind: acp.Ptr(kind),

0 commit comments

Comments
 (0)