feat: integrate KohakuTerrarium (kt) as a provider + Explorer/search/settings UX#1
Merged
Conversation
Generated via /init: common build/test commands, the layered crate architecture, the provider contract, and the sentinel vs HYARD delegation protocols. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New crate `switchyard-provider-kohaku`: drives `kt run <creature>
--headless --json -p <prompt>` as a one-shot subprocess and maps the
JSONL stream onto ProviderEvents (sandbox/leaf/model flags; clear error
when no creature is configured). Mirrors the Claude adapter and reuses
the subprocess streaming helpers.
- Register backend "kohaku" in switchyard-app-providers (alias,
inference, default command `kt`, default `@kt-biome/creatures/general`
creature) + tests.
- switchyard.toml: `[providers.kohaku]` block.
- CLI: `switchyard app` launches the desktop GUI (searches next-to-exe,
target/{release,debug}, then PATH); add `kt` notes.
- switchyard-config: `global_config_path()` (~/.switchyard/switchyard.toml)
so global settings can persist without a workspace.
- tests: deterministic integration test via a fake `kt` bin
(kohaku_integration.rs) + env-gated live smoke (kohaku_live_smoke.rs,
SWITCHYARD_TEST_KOHAKU=1).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Settings: kohaku in the provider list + roles; built-in providers always shown/editable; dynamic model dropdown from `kt config llm list --all`; save global settings without an open workspace. - Explorer: VS Code-style collapsible side bar (toggle the active rail icon); file context menu with Cut / Copy / Copy as Path|Relative / Paste (fs_paste_entry) and "Add to Chat" — staged as removable context chips in the composer (not a raw text paste). - Search: VS Code-style panel backed by ripgrep with case / whole-word / regex toggles, file-name mode, hit highlighting, collapsible per-file groups, batch Replace All, and jump-to-line on click (Canvas scrolls + selects the match). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Integrates KohakuTerrarium (
kt) as a first-class Switchyard provider (backend = "kohaku") and adds the GUI work to drive/configure it.Provider
switchyard-provider-kohaku: driveskt run <creature> --headless --json -p <prompt>(one-shot), maps the JSONL stream toProviderEvents; sandbox/leaf/model flags; clear error when no creature is configured.kohakuinswitchyard-app-providers(alias, inference, default commandkt, default@kt-biome/creatures/general);switchyard.tomlblock.switchyard applaunches the desktop GUI;switchyard-config::global_config_path()for workspace-less global settings.ktbin + env-gated live smoke (SWITCHYARD_TEST_KOHAKU=1).GUI
kt config llm list --all; save global settings with no workspace open.fs_paste_entry) + Add to Chat (removable context chips, not text paste).Verification
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test --workspace --all-targetsall pass locally.🤖 Generated with Claude Code