@agent-relay/acp-bridge 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -67
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,9 +6,7 @@ ACP (Agent Client Protocol) bridge for Agent Relay. Exposes relay agents to ACP-
|
|
|
6
6
|
|
|
7
7
|
The [Agent Client Protocol (ACP)](https://agentclientprotocol.com) is an open standard that enables AI agents to integrate with code editors. It's like LSP (Language Server Protocol) but for AI coding agents.
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
This bridge allows ACP-compatible editors to communicate with Agent Relay agents:
|
|
9
|
+
## Architecture
|
|
12
10
|
|
|
13
11
|
```
|
|
14
12
|
┌─────────────────┐ ACP (stdio) ┌─────────────────┐
|
|
@@ -36,68 +34,80 @@ This bridge allows ACP-compatible editors to communicate with Agent Relay agents
|
|
|
36
34
|
npm install @agent-relay/acp-bridge
|
|
37
35
|
```
|
|
38
36
|
|
|
39
|
-
## Usage
|
|
40
|
-
|
|
41
|
-
### CLI
|
|
37
|
+
## CLI Usage
|
|
42
38
|
|
|
43
39
|
```bash
|
|
44
40
|
# Start the bridge
|
|
45
41
|
relay-acp --name my-agent --debug
|
|
46
42
|
|
|
47
43
|
# With custom socket path
|
|
48
|
-
relay-acp --socket /
|
|
44
|
+
relay-acp --socket /path/to/.agent-relay/relay.sock
|
|
45
|
+
|
|
46
|
+
# Show help
|
|
47
|
+
relay-acp --help
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### CLI Options
|
|
51
|
+
|
|
52
|
+
| Option | Description |
|
|
53
|
+
|--------|-------------|
|
|
54
|
+
| `--name <name>` | Agent name for relay identification (default: `relay-acp`) |
|
|
55
|
+
| `--socket <path>` | Path to relay broker socket |
|
|
56
|
+
| `--debug` | Enable debug logging to stderr |
|
|
57
|
+
| `--help, -h` | Show help message |
|
|
58
|
+
| `--version, -v` | Show version |
|
|
59
|
+
|
|
60
|
+
## Zed Integration
|
|
61
|
+
|
|
62
|
+
### Quick Setup
|
|
63
|
+
|
|
64
|
+
Let the CLI configure Zed automatically:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
agent-relay up --zed
|
|
49
68
|
```
|
|
50
69
|
|
|
51
|
-
|
|
70
|
+
This adds an `agent_servers` entry to your Zed settings with the correct socket path.
|
|
71
|
+
|
|
72
|
+
### Manual Setup
|
|
52
73
|
|
|
53
74
|
1. Start the relay broker:
|
|
54
75
|
```bash
|
|
55
76
|
agent-relay up
|
|
56
77
|
```
|
|
57
78
|
|
|
58
|
-
2.
|
|
79
|
+
2. Spawn relay agents:
|
|
59
80
|
```bash
|
|
60
|
-
relay spawn Worker1 claude "Help with coding tasks"
|
|
81
|
+
agent-relay spawn Worker1 claude "Help with coding tasks"
|
|
61
82
|
```
|
|
62
83
|
|
|
63
|
-
3.
|
|
84
|
+
3. Add to Zed settings (`~/.config/zed/settings.json`):
|
|
64
85
|
```json
|
|
65
86
|
{
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
]
|
|
87
|
+
"agent_servers": {
|
|
88
|
+
"Agent Relay": {
|
|
89
|
+
"type": "custom",
|
|
90
|
+
"command": "relay-acp",
|
|
91
|
+
"args": ["--name", "zed-bridge"]
|
|
92
|
+
}
|
|
74
93
|
}
|
|
75
94
|
}
|
|
76
95
|
```
|
|
77
96
|
|
|
78
97
|
4. Open the Agent Panel in Zed (`Cmd+?` on macOS) and select "Agent Relay"
|
|
79
98
|
|
|
80
|
-
|
|
99
|
+
### In-Panel Commands
|
|
81
100
|
|
|
82
|
-
|
|
83
|
-
agent-relay up --zed
|
|
84
|
-
```
|
|
101
|
+
Manage agents directly from the Zed Agent Panel:
|
|
85
102
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"Agent Relay": {
|
|
92
|
-
"type": "custom",
|
|
93
|
-
"command": "relay-acp",
|
|
94
|
-
"args": ["--name", "zed-bridge", "--socket", "/path/to/project/.agent-relay/relay.sock"]
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
103
|
+
```
|
|
104
|
+
agent-relay spawn Worker claude "Review the current changes"
|
|
105
|
+
agent-relay release Worker
|
|
106
|
+
agent-relay agents
|
|
107
|
+
agent-relay help
|
|
98
108
|
```
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
## Programmatic Usage
|
|
101
111
|
|
|
102
112
|
```typescript
|
|
103
113
|
import { RelayACPAgent } from '@agent-relay/acp-bridge';
|
|
@@ -106,36 +116,11 @@ const agent = new RelayACPAgent({
|
|
|
106
116
|
agentName: 'my-agent',
|
|
107
117
|
socketPath: '/tmp/relay.sock',
|
|
108
118
|
debug: true,
|
|
109
|
-
capabilities: {
|
|
110
|
-
supportsSessionLoading: false,
|
|
111
|
-
modes: [
|
|
112
|
-
{ slug: 'default', name: 'Default', description: 'Standard mode' },
|
|
113
|
-
{ slug: 'review', name: 'Code Review', description: 'Focus on code review' },
|
|
114
|
-
],
|
|
115
|
-
},
|
|
116
119
|
});
|
|
117
120
|
|
|
118
121
|
await agent.start();
|
|
119
122
|
```
|
|
120
123
|
|
|
121
|
-
### Relay CLI commands from the Agent Panel
|
|
122
|
-
|
|
123
|
-
The bridge intercepts basic `agent-relay` commands typed in the Zed Agent Panel, so you can manage agents without a shell:
|
|
124
|
-
|
|
125
|
-
- `agent-relay spawn Worker claude "Review the current changes"`
|
|
126
|
-
- `agent-relay release Worker`
|
|
127
|
-
- `agent-relay agents` (list connected agents)
|
|
128
|
-
|
|
129
|
-
Supported commands today: spawn/create-agent, release, agents/who. Others fall back to normal broadcast handling.
|
|
130
|
-
The panel shows a help block on first message; type `agent-relay help` anytime to see it again.
|
|
131
|
-
|
|
132
|
-
## How it Works
|
|
133
|
-
|
|
134
|
-
1. **Initialization**: When an editor connects, the bridge advertises its capabilities
|
|
135
|
-
2. **Session Creation**: Each conversation creates a new session
|
|
136
|
-
3. **Prompt Handling**: User prompts are broadcast to all relay agents
|
|
137
|
-
4. **Response Streaming**: Agent responses are streamed back to the editor
|
|
138
|
-
|
|
139
124
|
## Configuration
|
|
140
125
|
|
|
141
126
|
| Option | Type | Default | Description |
|
|
@@ -143,9 +128,6 @@ The panel shows a help block on first message; type `agent-relay help` anytime t
|
|
|
143
128
|
| `agentName` | string | `'relay-acp'` | Name used when connecting to relay broker |
|
|
144
129
|
| `socketPath` | string | auto | Path to relay broker socket |
|
|
145
130
|
| `debug` | boolean | `false` | Enable debug logging |
|
|
146
|
-
| `capabilities` | object | - | ACP capabilities to advertise |
|
|
147
|
-
|
|
148
|
-
Connections to the broker go through `@agent-relay/sdk`, so socket discovery and reconnection match the rest of the Relay tooling. Provide `socketPath` to override detection when needed.
|
|
149
131
|
|
|
150
132
|
## Environment Variables
|
|
151
133
|
|
|
@@ -155,16 +137,17 @@ Connections to the broker go through `@agent-relay/sdk`, so socket discovery and
|
|
|
155
137
|
|
|
156
138
|
## ACP Compatibility
|
|
157
139
|
|
|
158
|
-
|
|
140
|
+
Implements ACP version `2025-03-26`:
|
|
159
141
|
|
|
142
|
+
**Supported:**
|
|
160
143
|
- Session management (new sessions)
|
|
161
144
|
- Prompt handling with streaming responses
|
|
162
145
|
- Cancellation
|
|
163
146
|
|
|
164
|
-
Not yet supported
|
|
147
|
+
**Not yet supported:**
|
|
165
148
|
- Session loading/resumption
|
|
166
149
|
- Tool calls
|
|
167
|
-
- File operations via ACP
|
|
150
|
+
- File operations via ACP
|
|
168
151
|
|
|
169
152
|
## License
|
|
170
153
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/acp-bridge",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "ACP (Agent Client Protocol) bridge for Agent Relay - expose relay agents to ACP-compatible editors like Zed",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@agent-relay/sdk": "3.0
|
|
49
|
+
"@agent-relay/sdk": "3.1.0",
|
|
50
50
|
"@agentclientprotocol/sdk": "^0.12.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|