feat(profiles): expose AgentProfile kind + ACP fields#195
Open
simonrosenberg wants to merge 2 commits into
Open
feat(profiles): expose AgentProfile kind + ACP fields#195simonrosenberg wants to merge 2 commits into
simonrosenberg wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)ProfileInfogains:kind: 'openhands' | 'acp'(newProfileKindtype) — legacy LLM profiles reportopenhands.acp_server: string | null,acp_model: string | nullfor ACP profiles.modelmirrorsacp_modelfor ACP profiles so chip/label consumers keep rendering.SaveProfileRequest:llmis now optional, and a newagent_settings?: Record<string, unknown>accepts the discriminatedAgentSettingspayload. ACP profiles are saved via:llm/agent_settingsis provided, matching the server contract.agent_settingsis typed as a record (not a full union) consistent with howSettingsApiResponse.agent_settingsis modeled here.No client-method changes —
ProfilesClient.saveProfilealready forwards the request body, andgetProfile/activateProfileare unchanged.Tests
src/__tests__/api-clients.test.tsadds coverage for the ACPagent_settingssave path and the ACPProfileInfoshape. Full suite: 215/215 passing;tscbuild clean; lint 0 errors.Related
🤖 Generated with Claude Code