Skip to content

Commit 82bf6a1

Browse files
nikomatsakisClaude
andcommitted
VSCode extension uses symposium-acp-agent registry commands
Centralize registry access through the Rust binary instead of fetching directly from GitHub in TypeScript: Rust changes: - Add extensions field to RegistryJson struct - Add list_extensions() function and ExtensionListEntry type - Add 'registry list-extensions' subcommand TypeScript changes: - agentRegistry.ts: fetchRegistry() calls 'registry list' - agentRegistry.ts: resolveDistribution() calls 'registry resolve' - agentRegistry.ts: Remove binary download/cache code (now in Rust) - agentRegistry.ts: Export runRegistryCommand for extensionRegistry - extensionRegistry.ts: fetchRegistryExtensions() calls 'registry list-extensions' - Remove isSymposiumBuiltin from ResolvedCommand (binary returns full path) - Simplify spawn logic in acpAgentActor.ts and languageModelProvider.ts Co-authored-by: Claude <claude@anthropic.com>
1 parent 1b85a35 commit 82bf6a1

File tree

8 files changed

+222
-250
lines changed

8 files changed

+222
-250
lines changed

src/symposium-acp-agent/src/main.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ enum RegistryCommand {
116116
/// List all available agents (built-ins + registry)
117117
List,
118118

119+
/// List all available extensions from the registry
120+
ListExtensions,
121+
119122
/// Resolve an agent ID to an executable McpServer configuration.
120123
/// Downloads binaries if needed.
121124
Resolve {
@@ -289,6 +292,10 @@ async fn main() -> Result<()> {
289292
let agents = registry::list_agents().await?;
290293
println!("{}", serde_json::to_string(&agents)?);
291294
}
295+
RegistryCommand::ListExtensions => {
296+
let extensions = registry::list_extensions().await?;
297+
println!("{}", serde_json::to_string(&extensions)?);
298+
}
292299
RegistryCommand::Resolve { agent_id } => {
293300
let server = registry::resolve_agent(&agent_id).await?;
294301
println!("{}", serde_json::to_string(&server)?);

src/symposium-acp-agent/src/registry.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const REGISTRY_URL: &str =
2525
pub struct RegistryJson {
2626
pub version: String,
2727
pub agents: Vec<RegistryEntry>,
28+
#[serde(default)]
29+
pub extensions: Vec<RegistryEntry>,
2830
}
2931

3032
/// A single entry in the registry (agent or extension)
@@ -197,6 +199,39 @@ pub async fn list_agents() -> Result<Vec<AgentListEntry>> {
197199
Ok(agents)
198200
}
199201

202+
/// Extension listing entry - what `registry list-extensions` outputs
203+
#[derive(Debug, Clone, Serialize)]
204+
pub struct ExtensionListEntry {
205+
pub id: String,
206+
pub name: String,
207+
#[serde(skip_serializing_if = "Option::is_none")]
208+
pub version: Option<String>,
209+
#[serde(skip_serializing_if = "Option::is_none")]
210+
pub description: Option<String>,
211+
}
212+
213+
/// List all available extensions from the registry
214+
pub async fn list_extensions() -> Result<Vec<ExtensionListEntry>> {
215+
let registry = fetch_registry().await?;
216+
217+
let extensions: Vec<ExtensionListEntry> = registry
218+
.extensions
219+
.into_iter()
220+
.map(|e| ExtensionListEntry {
221+
id: e.id,
222+
name: e.name,
223+
version: if e.version.is_empty() {
224+
None
225+
} else {
226+
Some(e.version)
227+
},
228+
description: e.description,
229+
})
230+
.collect();
231+
232+
Ok(extensions)
233+
}
234+
200235
// ============================================================================
201236
// Distribution Resolution
202237
// ============================================================================

vscode-extension/src/acpAgentActor.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,8 @@ export class AcpAgentActor {
262262
spawnArgs.push(arg);
263263
}
264264

265-
if (resolved.isSymposiumBuiltin) {
266-
// Symposium builtin (e.g., eliza) - run with the same binary
267-
spawnArgs.push(
268-
"--",
269-
conductorCommand,
270-
resolved.command,
271-
...resolved.args,
272-
);
273-
} else {
274-
// External agent - wrap with conductor
275-
spawnArgs.push("--", resolved.command, ...resolved.args);
276-
}
265+
// Add the downstream agent command after "--"
266+
spawnArgs.push("--", resolved.command, ...resolved.args);
277267

278268
logger.important("agent", "Spawning ACP agent", {
279269
command: conductorCommand,

0 commit comments

Comments
 (0)