feat: add Kimchi agent harness support#2649
Conversation
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.
|
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. 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: Come by if you want to see what is being built, ask questions, or just hang around with the community. |
Summary
Adds Kimchi (
@kimchi-dev/cli, binarykimchi) 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--printmode, 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/--yoloflags.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 viaao hooks kimchi <event>commands.Changes
New adapter package (
backend/internal/adapters/agent/kimchi/):kimchi.go— adapter: launch, restore, prompt construction, permission flag mappingauth.go— auth probe (checks for API key / credentials)hooks.go— hook command generation for Claude Code-compatible hook eventsactivity.go— activity state derivation from Kimchi outputinstall.go— install path for the Kimchi binarykimchi_test.go,auth_test.go— unit tests (640+ lines)Domain & registry wiring:
backend/internal/domain/harness.go— addHarnessKimchiconstant and register inAllHarnessesbackend/internal/adapters/agent/registry/registry.go— registerkimchi.New()constructorDatabase migration:
backend/internal/storage/sqlite/migrations/0022_allow_kimchi_harness.sql— allowkimchias a valid harness valueFrontend wiring:
frontend/src/renderer/types/workspace.ts— add"kimchi"toAgentProviderunionfrontend/src/renderer/lib/agent-options.ts— add Kimchi to agent options listOpenAPI spec fix (follow-up commit):
backend/internal/httpd/controllers/dto.go— addkimchitoSpawnSessionRequest.Harnessenum tagbackend/internal/httpd/apispec/openapi.yaml— regeneratedfrontend/src/api/schema.ts— regenerated (addskimchito harness union)Testing
go test ./internal/adapters/agent/kimchi/...— 46 tests passgo test ./internal/httpd/...— 146 tests pass (spec parity + drift checks)go test ./...— full backend suite greennpm run typecheck(frontend) — clean, no errorsMigration note
Migration
0022_allow_kimchi_harness.sqladdskimchito the allowed harness values. No data migration needed — purely additive.