Skip to content

feat: add Kimchi agent harness support#2649

Open
vytautas-petrikas wants to merge 2 commits into
AgentWrapper:mainfrom
vytautas-petrikas:add-kimchi-support
Open

feat: add Kimchi agent harness support#2649
vytautas-petrikas wants to merge 2 commits into
AgentWrapper:mainfrom
vytautas-petrikas:add-kimchi-support

Conversation

@vytautas-petrikas

Copy link
Copy Markdown

Summary

Adds Kimchi (@kimchi-dev/cli, binary kimchi) as a new supported agent harness. Kimchi is a coding-agent CLI built on @earendil-works/pi-coding-agent. AO drives it non-interactively with --print mode, delivers the initial prompt as a trailing positional argument, appends system prompts via --append-system-prompt, and maps AO permission modes onto Kimchi's --plan/--auto/--yolo flags.

Session restore uses --session <id> — the native session id is captured from hook metadata and stored in AO session metadata. Hooks use Kimchi's Claude Code hook compatibility extension (.claude/settings.local.json), installed via ao hooks kimchi <event> commands.

Changes

New adapter package (backend/internal/adapters/agent/kimchi/):

  • kimchi.go — adapter: launch, restore, prompt construction, permission flag mapping
  • auth.go — auth probe (checks for API key / credentials)
  • hooks.go — hook command generation for Claude Code-compatible hook events
  • activity.go — activity state derivation from Kimchi output
  • install.go — install path for the Kimchi binary
  • kimchi_test.go, auth_test.go — unit tests (640+ lines)

Domain & registry wiring:

  • backend/internal/domain/harness.go — add HarnessKimchi constant and register in AllHarnesses
  • backend/internal/adapters/agent/registry/registry.go — register kimchi.New() constructor

Database migration:

  • backend/internal/storage/sqlite/migrations/0022_allow_kimchi_harness.sql — allow kimchi as a valid harness value

Frontend wiring:

  • frontend/src/renderer/types/workspace.ts — add "kimchi" to AgentProvider union
  • frontend/src/renderer/lib/agent-options.ts — add Kimchi to agent options list

OpenAPI spec fix (follow-up commit):

  • backend/internal/httpd/controllers/dto.go — add kimchi to SpawnSessionRequest.Harness enum tag
  • backend/internal/httpd/apispec/openapi.yaml — regenerated
  • frontend/src/api/schema.ts — regenerated (adds kimchi to harness union)

Testing

  • go test ./internal/adapters/agent/kimchi/... — 46 tests pass
  • go test ./internal/httpd/... — 146 tests pass (spec parity + drift checks)
  • go test ./... — full backend suite green
  • npm run typecheck (frontend) — clean, no errors

Migration note

Migration 0022_allow_kimchi_harness.sql adds kimchi to the allowed harness values. No data migration needed — purely additive.

The kimchi harness type was added to domain and registry but the
SpawnSessionRequest enum tag in dto.go was not updated, causing
schema.ts to miss the 'kimchi' value and breaking the frontend
typecheck. Regenerates openapi.yaml and schema.ts.
@somewherelostt

Copy link
Copy Markdown
Collaborator

Thanks for contributing to Agent Orchestrator.

This PR is being picked up by the current external contributor on-call pair:

If someone is already working on this, please continue as usual.
The on-call pair is added for visibility, tracking, and support, not to take over the work.
If you need help with review, direction, reproduction, or next steps, please tag @neversettle17-101 and @somewherelostt here.
You can also join the AO Discord if you want faster context, want to ask questions live, or just want to follow what the community is building.

You are also welcome to join the AO Discord community.

We do daily Discord calls at 10 PM IST, except Saturday.

Join the session here:
https://discord.gg/H6ZDcUXmq

Come by if you want to see what is being built, ask questions, or just hang around with the community.

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.

4 participants