Skip to content

feat(profiles): expose AgentProfile kind + ACP fields#195

Open
simonrosenberg wants to merge 2 commits into
mainfrom
feat-acp-agent-profiles
Open

feat(profiles): expose AgentProfile kind + ACP fields#195
simonrosenberg wants to merge 2 commits into
mainfrom
feat-acp-agent-profiles

Conversation

@simonrosenberg
Copy link
Copy Markdown
Member

What

Mirrors the agent-server's AgentProfile model (software-agent-sdk#3433) in the TypeScript client so consumers (agent-canvas) can read and create ACP profiles, not just LLM ones. This is the client piece that unblocks the frontend half of agent-canvas#669 — today agent-canvas can only see LLM profiles because these types are LLM-only.

Changes (src/models/api.ts)

  • ProfileInfo gains:
    • kind: 'openhands' | 'acp' (new ProfileKind type) — legacy LLM profiles report openhands.
    • acp_server: string | null, acp_model: string | null for ACP profiles.
    • model mirrors acp_model for ACP profiles so chip/label consumers keep rendering.
  • SaveProfileRequest: llm is now optional, and a new agent_settings?: Record<string, unknown> accepts the discriminated AgentSettings payload. ACP profiles are saved via:
    client.saveProfile(name, { agent_settings: { agent_kind: 'acp', acp_server, acp_model, acp_command, acp_args, acp_env } })
    Exactly one of llm / agent_settings is provided, matching the server contract. agent_settings is typed as a record (not a full union) consistent with how SettingsApiResponse.agent_settings is modeled here.

No client-method changes — ProfilesClient.saveProfile already forwards the request body, and getProfile/activateProfile are unchanged.

Tests

src/__tests__/api-clients.test.ts adds coverage for the ACP agent_settings save path and the ACP ProfileInfo shape. Full suite: 215/215 passing; tsc build clean; lint 0 errors.

Related

  • Backend: software-agent-sdk#3433 (persists ACP profiles)
  • Frontend: agent-canvas#928 (runtime-compat picker; will consume these fields once this client version is published & bumped)

🤖 Generated with Claude Code

Debug Agent and others added 2 commits May 29, 2026 16:59
Mirror the agent-server's AgentProfile model (software-agent-sdk#3433) so
clients (agent-canvas) can read and create ACP profiles, not just LLM ones —
the frontend half of agent-canvas#669.

- ProfileInfo gains `kind` ('openhands' | 'acp'), `acp_server`, and
  `acp_model`. Legacy LLM profiles report `kind: 'openhands'`; for ACP
  profiles `model` mirrors `acp_model` so chip/label consumers keep working.
- SaveProfileRequest: `llm` is now optional and a new `agent_settings` record
  is accepted (the discriminated AgentSettings payload), so ACP profiles can
  be saved via `{ agent_settings: { agent_kind: 'acp', acp_server, acp_model,
  acp_command, acp_args, acp_env } }`. Exactly one of `llm` / `agent_settings`
  is provided, matching the server contract.

No client-method changes — saveProfile already forwards the request body.
Tests cover the ACP agent_settings save path and the ACP ProfileInfo shape.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Older agent-servers (pre-AgentProfiles) don't emit `kind`/`acp_server`/
`acp_model`, so the client should tolerate their absence — treat a missing
`kind` as `openhands`. Also lets consumers keep building partial ProfileInfo
fixtures without the new fields.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant