Skip to content

(Feat)Add Kimi as Supported Harness, Extraction/Synthesis Provider, Task Manager, Dreaming Provider - #934

Closed
aaf2tbz wants to merge 9 commits into
mainfrom
feat/kimi-harness-provider-support
Closed

aaf2tbz wants to merge 9 commits into
mainfrom
feat/kimi-harness-provider-support

Conversation

@aaf2tbz

@aaf2tbz aaf2tbz commented Jul 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds Kimi (Kimi CLI / Kimi Code) as a first-class supported harness in Signet, on par with Codex: setup/configure integration, dashboard Active Harnesses, extraction + session-synthesis provider, task-runner harness (default model Kimi K2.7, hidden), session hooks, sync support, dreaming provider support, and full Rust daemon parity.

Reference harness: Codex. Kimi mechanics (verified against official Kimi Code docs):

  • Config home: ~/.kimi-code/ (config.toml, mcp.json) — detection path
  • Hooks: [[hooks]] TOML entries; events SessionStart / UserPromptSubmit / SessionEnd; event JSON on stdin, context injection via stdout
  • Headless exec: kimi -p "<prompt>" --output-format stream-json (analogous to codex exec --json)
  • MCP: stdio server entry in ~/.kimi-code/mcp.json

Type

  • feat — new user-facing feature (bumps minor)

Packages affected

  • @signet/core
  • @signet/daemon
  • @signet/cli / dashboard
  • @signet/connector-* (new @signet/connector-kimi)
  • Other: platform/daemon-rs

PR Readiness (MANDATORY)

  • Spec alignment validated (INDEX.md + dependencies.yaml)
  • Agent scoping verified on all new/changed data queries
  • Input/config validation and bounds checks added
  • Error handling and fallback paths tested (no silent swallow)
  • Security checks applied to admin/mutation endpoints
  • Docs updated for API/spec/status changes
  • Regression tests added for each bug fix
  • Lint/typecheck/tests pass locally

Changes

Core registries & detection (platform/core/src/)

  • identity.ts — detect Kimi via ~/.kimi-code/config.toml.
  • types.ts — TASK_HARNESSES += kimi.
  • pipeline-providers.ts — extraction/synthesis provider choices += kimi.
  • llm-model-catalog.ts — kimi provider + models (Kimi K3, K2.7, K2.6) + defaults.
  • routing.ts — kimi executor kind.

Daemon providers (extraction / synthesis / dreaming)

  • platform/daemon/src/pipeline/provider.ts — createKimiProvider (spawn kimi -p --output-format stream-json, sterile env keyed on KIMI_CODE_HOME, mirrors createCodexProvider).
  • platform/daemon/src/inference-provider-factory.ts — case "kimi".
  • Dreaming: synthesis-provider reuse path (dreaming-worker.ts) verified with kimi.

Connector & session hooks

  • New integrations/kimi/connector package (extends libs/connector-base) — writes [[hooks]] SessionStart/UserPromptSubmit/SessionEnd into ~/.kimi-code/config.toml, adds signet MCP stdio server to ~/.kimi-code/mcp.json, skills install.
  • surfaces/cli/src/commands/hook.ts — -H kimi + --kimi-json output mode.
  • surfaces/cli/src/cli.ts — configureHarnessHooks dispatch case "kimi".
  • platform/daemon/src/transcript-normalization.ts — kimi stream-json transcript branch + test.

CLI surfaces (setup / configure / sync)

  • surfaces/cli/src/features/setup-shared.ts — HarnessChoice, SETUP_HARNESS_CHOICES, provider mapping.
  • setup.ts — harness checkbox, hasCommand("kimi") detection, extraction-provider model prompts.
  • configure.ts — harness checkbox.
  • sync.ts — detectInstalledHarnesses().
  • templates/agent.yaml.template — document kimi harness.

Dashboard

  • settings.svelte.ts — KNOWN_HARNESSES += kimi (Agent tab → Active Harnesses).
  • PipelineSection.svelte — Extraction/Synthesis Provider/Model kimi options (K3/K2.7).
  • TaskForm.svelte — Harness selector += Kimi (default model K2.7 not shown to user).

Tasks (daemon)

  • misc-routes.ts — task harness validation += kimi.
  • scheduler/spawn.ts — buildCommand kimi case.
  • scheduler/worker.ts — default model kimi-k2.7.

Rust daemon parity (platform/daemon-rs)

  • routes/harnesses.rs, routes/scheduler.rs (VALID_HARNESSES + test), signet-pipeline provider.rs/model_registry.rs, signet-core config.rs.
  • route-parity.json regenerated; bun run check:rust-parity green; cargo tests green.

Docs & tests

  • docs/HARNESSES.md Kimi section; README.md harness table; docs/CLI.md; docs/CONFIGURATION.md; integrations/kimi/README.md.
  • Tests cover all new kimi paths: harness-config, llm-model-catalog, routing, provider, spawn/worker, transcript-normalization, hook output, dashboard settings.

Testing

  • bun test passes (core 198/200, cli 315/323, dashboard 65/65, daemon kimi-targeted suites green — remaining failures verified byte-identical on unmodified main baseline: forge detection, ACPX/process-group, linux desktop artifact env tests)
  • bun run typecheck passes (core, connector-kimi)
  • bun run lint / biome clean on all touched files
  • Tested against running daemon (isolated SIGNET_PATH smoke: /api/harnesses returns Kimi CLI, /api/pipeline/models?provider=kimi returns K3/K2.7/K2.6, POST /api/tasks accepts harness=kimi and rejects unknown harnesses)
  • bun run check:rust-parity green (328 routes, manifest regenerated); cargo tests green for signet-core/signet-pipeline/signet-daemon (5 pre-existing routes::pipeline failures on main unchanged)

Known inherited failure: check-rust-daemon-parity.test.ts has 1 failure carried over from main (2 repair routes missing in Rust) — fixed by #933, independent of this PR.

AI disclosure

  • AI tools were used (see Assisted-by tags in commits)

Notes

All items complete and verified.

@aaf2tbz
aaf2tbz marked this pull request as ready for review July 19, 2026 05:10
@aaf2tbz aaf2tbz added enhancement New feature or request documentation Improvements or additions to documentation labels Jul 19, 2026
@aaf2tbz aaf2tbz changed the title Add Kimi as Supported Harness, Extraction/Synthesis Provider, Task Manager, Dreaming Provider (Feat)Add Kimi as Supported Harness, Extraction/Synthesis Provider, Task Manager, Dreaming Provider Jul 19, 2026
@NicholaiVogel

Copy link
Copy Markdown
Collaborator

Leaving this open but holding merge until we can verify functionality locally. The architecture review looks clean, but at 25k lines for a harness we cannot test without the Kimi binary, I need to validate it works before merging confidently.

Two cleanup items for whenever this gets picked back up:

  1. Remove the committed dist/ build artifacts (22k+ lines in integrations/kimi/connector/dist/) and add a .gitignore matching the other connectors.
  2. Rebase to resolve conflicts with the merged repair-route PRs.

aaf2tbz added a commit that referenced this pull request Jul 19, 2026
Remove 5 committed dist/ build artifacts (22k+ lines) from
integrations/kimi/connector/dist/ and add a .gitignore matching
every other connector (dist/).

Addresses review feedback from NicholaiVogel on PR #934.
@aaf2tbz
aaf2tbz force-pushed the feat/kimi-harness-provider-support branch 2 times, most recently from f357c7f to fc6b82a Compare July 19, 2026 22:18
aaf2tbz added a commit that referenced this pull request Jul 22, 2026
Remove 5 committed dist/ build artifacts (22k+ lines) from
integrations/kimi/connector/dist/ and add a .gitignore matching
every other connector (dist/).

Addresses review feedback from NicholaiVogel on PR #934.
@aaf2tbz
aaf2tbz force-pushed the feat/kimi-harness-provider-support branch from fc6b82a to bd12dcb Compare July 22, 2026 01:54
aaf2tbz added a commit that referenced this pull request Jul 22, 2026
Remove 5 committed dist/ build artifacts (22k+ lines) from
integrations/kimi/connector/dist/ and add a .gitignore matching
every other connector (dist/).

Addresses review feedback from NicholaiVogel on PR #934.
@aaf2tbz
aaf2tbz force-pushed the feat/kimi-harness-provider-support branch from bd12dcb to 11343ad Compare July 22, 2026 19:16
@aaf2tbz aaf2tbz self-assigned this Jul 25, 2026
aaf2tbz added a commit that referenced this pull request Jul 25, 2026
Remove 5 committed dist/ build artifacts (22k+ lines) from
integrations/kimi/connector/dist/ and add a .gitignore matching
every other connector (dist/).

Addresses review feedback from NicholaiVogel on PR #934.
@aaf2tbz
aaf2tbz force-pushed the feat/kimi-harness-provider-support branch 2 times, most recently from e54040a to 4b361d6 Compare July 26, 2026 10:02
Avery Felts and others added 6 commits July 26, 2026 04:03
Assisted-by: Kimi-Code:kimi-k2
Add Kimi (Kimi CLI / Kimi Code) as a first-class harness on par with Codex:

- Core: kimi harness detection (~/.kimi-code), provider/executor kinds,
  model catalog (Kimi K3/K2.7/K2.6, default kimi-k2.7), TASK_HARNESSES
- Daemon: createKimiProvider (kimi -p --output-format stream-json with
  sterile KIMI_CODE_HOME), inference factory, task spawn/validation,
  kimi transcript normalization, /api/harnesses entry
- Connector: new @signet/connector-kimi installing SessionStart /
  UserPromptSubmit / SessionEnd hooks into ~/.kimi-code/config.toml,
  signet MCP stdio server into ~/.kimi-code/mcp.json, skills symlink;
  idempotent uninstall
- CLI: setup/configure/sync harness choices, -H kimi hook handling with
  --kimi-json output mode
- Dashboard: Active Harnesses, Pipeline extraction/synthesis provider
  options, Tasks harness selector (default kimi-k2.7 hidden)
- Rust daemon parity: harnesses, scheduler VALID_HARNESSES, model
  registry, CliProvider, config defaults; route-parity.json regenerated
- Docs: HARNESSES.md Kimi section, README harness table, CLI /
  CONFIGURATION / QUICKSTART / PIPELINE enumerations
- Dreaming works via the session-synthesis provider path

Assisted-by: Kimi-Code:kimi-k2
Remove 5 committed dist/ build artifacts (22k+ lines) from
integrations/kimi/connector/dist/ and add a .gitignore matching
every other connector (dist/).

Addresses review feedback from NicholaiVogel on PR #934.
@aaf2tbz
aaf2tbz force-pushed the feat/kimi-harness-provider-support branch from 4b361d6 to 21f0223 Compare July 26, 2026 10:04
@NicholaiVogel NicholaiVogel added blast: subsystem A subsystem, surface, or single integration component: connector Harness integrations, connectors, and plugins component: dreaming Dreaming, ontology maintenance, and memory lifecycle component: inference Inference routing, providers, models, and cost controls labels Aug 10, 2026
@NicholaiVogel NicholaiVogel added component: native Rust/native runtime and packaging parity priority: P2 Medium priority risk: config-compatibility May break existing configuration, migrations, defaults, or upgrades triage: blocked Waiting on an external dependency, upstream decision, or prerequisite labels Aug 10, 2026
@NicholaiVogel

Copy link
Copy Markdown
Collaborator

Superseded by the current-main reimplementation: Phase 1 is PR #1540 (connector + setup/hook on current main, per the 2026-08-13 evaluator plan t_b5e27777). This 859-commits-behind branch is not rebasable; its Rust daemon/Svelte dashboard changes are obsolete (removed from main). Keeping it open creates confusion — closing as superseded; Phase 2 work continues on #1540's successors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast: subsystem A subsystem, surface, or single integration component: connector Harness integrations, connectors, and plugins component: dreaming Dreaming, ontology maintenance, and memory lifecycle component: inference Inference routing, providers, models, and cost controls component: native Rust/native runtime and packaging parity documentation Improvements or additions to documentation enhancement New feature or request priority: P2 Medium priority risk: config-compatibility May break existing configuration, migrations, defaults, or upgrades triage: blocked Waiting on an external dependency, upstream decision, or prerequisite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants