kith-coord 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +83 -141
- package/assets/brand/readme-header.png +0 -0
- package/assets/brand/readme-header.svg +1 -1
- package/assets/brand/social-preview.png +0 -0
- package/assets/brand/social-preview.svg +1 -1
- package/assets/demo/claim.jq +5 -0
- package/assets/demo/claims.gif +0 -0
- package/assets/demo/claims.tape +59 -0
- package/assets/demo/prepare.sh +63 -0
- package/dist/chunk-6ORNHRPG.js +47 -0
- package/dist/chunk-6ORNHRPG.js.map +1 -0
- package/dist/chunk-QLLTQNDL.js +6104 -0
- package/dist/chunk-QLLTQNDL.js.map +1 -0
- package/dist/chunk-SAHFIOEQ.js +13927 -0
- package/dist/chunk-SAHFIOEQ.js.map +1 -0
- package/dist/chunk-WYEINJKJ.js +44 -0
- package/dist/chunk-WYEINJKJ.js.map +1 -0
- package/dist/chunk-YIMAR7VS.js +9599 -0
- package/dist/chunk-YIMAR7VS.js.map +1 -0
- package/dist/cli/index.js +854 -33883
- package/dist/cli/index.js.map +1 -1
- package/dist/client-77BNXEAH.js +708 -0
- package/dist/client-77BNXEAH.js.map +1 -0
- package/dist/command-worker.js +34 -2
- package/dist/command-worker.js.map +1 -1
- package/dist/index.d.ts +199 -14
- package/dist/index.js +87 -7998
- package/dist/index.js.map +1 -1
- package/dist/server-V52W56AG.js +3116 -0
- package/dist/server-V52W56AG.js.map +1 -0
- package/dist/stdio-3NHW7PIO.js +692 -0
- package/dist/stdio-3NHW7PIO.js.map +1 -0
- package/docs/architecture.md +4 -1
- package/docs/install.md +183 -0
- package/docs/integrations.md +7 -3
- package/docs/protocol/tools.v1.json +53 -0
- package/docs/protocol.md +13 -2
- package/docs/reliability.md +1 -1
- package/docs/roadmap.md +2 -0
- package/docs/sessions-and-mutexes.md +1 -1
- package/docs/usage.md +45 -0
- package/package.json +10 -10
- package/server.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1 — 2026-11-30
|
|
4
|
+
|
|
5
|
+
- Staging verification no longer shares the primary `node_modules`. The merge stage used to symlink that directory into the temporary worktree, so a check that deleted its children, including `rm -rf node_modules/*`, deleted the primary install. Staging now gets the same copy-on-write or independent copy as an agent worktree. Untracked `node_modules` paths from that copy do not fail the read-only verification check.
|
|
6
|
+
- A deferred shared-checkout `git update-ref` is restored if the agent dies before the post hook. The pending revert stays under `.coord/ref-guards` until startup, `kith doctor`, or `kith gc` compare-and-swaps the ref back to the recorded commit. An unreadable ref is kept and tried again later. A guard that has not expired is left for the live post hook. That restore is the one write `kith doctor` performs.
|
|
7
|
+
- Two concurrent adopts of the same linked worktree can no longer both register. The check for another active owner runs inside the same immediate transaction as the insert. The loser is told the worktree is already registered.
|
|
8
|
+
- `KITH_SESSION_TOKEN` is removed from verification output and from captured command output. The verification process still receives the token, because hooks need it. A supervised command does not inherit `KITH_SESSION_TOKEN` or `KITH_AGENT_ID` unless the caller supplied that variable.
|
|
9
|
+
- A symlink-alias walk that examines 10,000 entries is treated as an overlap. The lock check fails closed instead of reporting no overlap.
|
|
10
|
+
- Overlapping locks owned by the same agent are satisfied by that agent's newest fencing token. An older token for one of those locks is rejected as stale.
|
|
11
|
+
- A live auto-session renews its lease without dropping locks it still holds, and without taking a lock another agent acquired after the lease lapsed. `kith gc` does not delete a dirty worktree when `git worktree list` fails, and merge-train cleanup does not prune worktrees. Index resync resets only paths whose worktree file already matches HEAD.
|
|
12
|
+
- The shared-checkout git firewall treats `git.exe`, `-p` / `--paginate`, `--namespace`, an attached `-C`, and unknown global options as part of the command prefix. `find -delete` and `find -exec`, `fd -x` and `fd --exec`, and `awk` with `system` or a redirected `print` count as writes. Ignore rules apply to filenames that contain `*`, `?`, or `[]`. A commit lock or merge-train lock left by a dead pid, a truncated lock older than two seconds, or a reused pid is reclaimed. A detached merge target is reported as detached.
|
|
13
|
+
- The Claude Code plugin defers a hook only when that phase's own command is already Kith. Both markers have to be on the same command. An `--auto` pre-hook fails closed once coordination state exists or two peers are present and the claim check cannot finish. A solo repository with no state still passes through. `kith lock acquire --wait` installs its cancel handler before the session exists, so a SIGINT in that gap does not leave the session active.
|
|
14
|
+
- Hook startup and claim checks are faster. On Linux with Node 22, a pass-through pre-hook median went from about 73 ms to 38 ms, an enforcing check of one claim from about 98 ms to 56 ms, and an enforcing check of 2,050 claims from about 286 ms to 82 ms.
|
|
15
|
+
- README first screen. The opening names the collision (the same file, a port, competing installs, and `git add -A`), then the pitch and the install line, then the demo. The header tagline is file ownership, and the Glama score badge links to the listing. `plugins/kith/README.md` describes the Claude Code plugin for the plugin directory.
|
|
16
|
+
- Editor. The extension typechecks with TypeScript 7 and `moduleResolution` Bundler. Its lockfile takes the transitive `@azure/identity` bump; the extension runtime does not import that package. Plugin manifests are 0.2.1. Two lifecycle tests wait for a renewed lease, or set an already-expired lease, instead of sleeping for a fixed interval.
|
|
17
|
+
|
|
18
|
+
- After upgrading, run `kith install` so hooks and client entries use this runtime. Protocol stays 1.6.0. The storage schema stays 3. There is no database migration and no new table. Stop existing Kith connections first, and upgrade every coordinator that shares a repository together. The editor extension ships as 0.2.1 in lockstep with this package.
|
|
19
|
+
|
|
20
|
+
## 0.2.0 — 2026-11-23
|
|
21
|
+
|
|
22
|
+
- Worktree adoption. Kith can register a linked worktree an agent is already using, instead of creating one under `.coord/worktrees`. Claude Code `--worktree`, `EnterWorktree`, and subagent `isolation: worktree` checkouts live at `.claude/worktrees/<name>` (branch `worktree-<name>` by default). A joined hook adopts that checkout when its `cwd` is unambiguously that worktree, including the Claude Code plugin command `kith hook pre|post --client claude --auto`. `kith adopt [path]`, `kith worktree adopt [path]`, `kith begin --adopt [path]`, MCP `kith_adopt_worktree`, and `adoptWorktree` / `worktreePath` on begin and claim do the same for any `git worktree list` entry. Provenance is stored in an optional `worktree_registrations` table (`created` / `adopted`, source `kith`, `claude-code`, or `external`). Older binaries ignore the table. A dirty tree is left as it is. A detached HEAD can take `kith commit` and is refused at integration until a branch is checked out. A branch checked out in another worktree is refused for both `kith commit` and integration. An adopted branch that is unique still integrates only through the existing merge train and verification command. `kith gc` never deletes or prunes a worktree Kith did not create. `kith worktree remove` refuses an adopted directory unless `--delete-adopted` is passed, and that still refuses a dirty tree. `kith status` and `kith doctor` name adopted worktrees. The full MCP list adds `kith_adopt_worktree` (18 tools). Compact `kith_work` accepts `action: "adopt"`.
|
|
23
|
+
- README and Claude Code plugin. The README leads with file ownership for agents you already run, and the comparison section says Kith adopts worktrees from Claude Code, Claude Squad, CCManager, Orca, and Orchestrator.inc instead of launching those tools. Install and workflow detail lives in `docs/install.md` and `docs/usage.md`. Claude Code can install Kith as a plugin (`/plugin marketplace add connorhriley/kith`, then `/plugin install kith@kith`). The plugin is `plugins/kith`: hooks and the compact MCP server run `npx -y kith-coord`. Plugin hooks defer when `kith install` has already registered the same hook, so a tool call is checked once. The plugin manifests are version `0.2.0`.
|
|
24
|
+
- Short mutex leases on macOS. A 300 ms `kith_run_with_mutex` lease could expire before the command started when process inspection (`ps`) was slower than the lease, so the borrowed-session test and the cancellation test never saw a pid file. Renewal is armed before that inspection. The worker repeats its ready message until the command arrives, and a macOS process group that is only zombies is treated as stopped so the mutex is released.
|
|
25
|
+
- Dependencies. `@modelcontextprotocol/sdk` is 1.32.2. Vitest is 5.1.1. The editor extension keeps its safe dependency bumps, including esbuild 0.28.2, and Node 26 type majors are ignored. `pnpm/action-setup` in CI is 6.1.1.
|
|
26
|
+
- After upgrading, run `kith install` so hooks and client entries use this runtime. Protocol stays 1.6.0. The storage schema stays 3. There is no database migration. Opening the database creates the optional `worktree_registrations` table; binaries from 0.1.6 through 0.1.9 ignore it and keep working. Stop existing Kith connections first, and upgrade every coordinator that shares a repository together. The editor extension ships as 0.2.0 in lockstep with this package.
|
|
27
|
+
|
|
3
28
|
## 0.1.9 — 2026-11-16
|
|
4
29
|
|
|
5
30
|
- Hook messages sent back to the model are capped at 2,000 characters. That includes notices, warnings, shared-checkout refusals, and revert warnings, both before and after a tool call. The text is cut on a line boundary. The ready-to-run `kith commit` line in a refusal or revert is kept whole; other text is dropped first so the total stays within 2,000 whenever that line fits. A command longer than the budget is returned intact rather than cut into a command that would not run. The shorter conflict footer from 0.1.8 stays separately bounded and counts toward that total.
|
package/README.md
CHANGED
|
@@ -1,206 +1,148 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="assets/brand/readme-header.png" alt="Kith — Parallel agents. Shared direction.
|
|
2
|
+
<img src="assets/brand/readme-header.png" alt="Kith — Parallel agents. Shared direction. File ownership for the coding agents you already run." width="100%">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<a href="https://github.com/connorhriley/kith/actions/workflows/ci.yml"><img src="https://github.com/connorhriley/kith/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
|
|
7
|
-
<a href="https://github.com/connorhriley/kith/actions/workflows/windows.yml"><img src="https://github.com/connorhriley/kith/actions/workflows/windows.yml/badge.svg" alt="Windows validation"></a>
|
|
8
6
|
<a href="https://www.npmjs.com/package/kith-coord"><img src="https://img.shields.io/npm/v/kith-coord" alt="npm version"></a>
|
|
9
|
-
<a href="
|
|
7
|
+
<a href="https://www.npmjs.com/package/kith-coord"><img src="https://img.shields.io/npm/dm/kith-coord" alt="npm downloads"></a>
|
|
8
|
+
<a href="https://github.com/connorhriley/kith/actions/workflows/ci.yml"><img src="https://github.com/connorhriley/kith/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
9
|
+
<a href="https://github.com/connorhriley/kith/actions/workflows/windows.yml"><img src="https://github.com/connorhriley/kith/actions/workflows/windows.yml/badge.svg" alt="Windows validation"></a>
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/licence-MIT-22C55E" alt="MIT licence"></a>
|
|
11
|
+
<a href="https://registry.modelcontextprotocol.io/v0.1/servers/io.github.connorhriley%2Fkith/versions/latest"><img src="https://img.shields.io/badge/MCP%20Registry-io.github.connorhriley%2Fkith-6b4fbb" alt="MCP Registry"></a>
|
|
12
|
+
<a href="https://glama.ai/mcp/servers/connorhriley/kith"><img src="https://glama.ai/mcp/servers/connorhriley/kith/badges/score.svg" alt="connorhriley/kith MCP server"></a>
|
|
10
13
|
</p>
|
|
11
14
|
|
|
12
15
|
<p align="center">
|
|
13
|
-
<a href="#quick-start">Quick start</a> · <a href="https://marketplace.visualstudio.com/items?itemName=kith-coord.kith">VS Code</a> · <a href="https://open-vsx.org/extension/kith-coord/kith">Cursor / Open VSX</a> · <a href="
|
|
16
|
+
<a href="#quick-start">Quick start</a> · <a href="#demo">Demo</a> · <a href="#why-not-just-git-worktrees">Why not worktrees</a> · <a href="#how-kith-compares">Compare</a> · <a href="docs/install.md">Install</a> · <a href="https://marketplace.visualstudio.com/items?itemName=kith-coord.kith">VS Code</a> · <a href="https://open-vsx.org/extension/kith-coord/kith">Cursor / Open VSX</a> · <a href="docs/integrations.md">Integrations</a> · <a href="docs/usage.md">CLI & API</a> · <a href="CONTRIBUTING.md">Contribute</a>
|
|
14
17
|
</p>
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Claim work, isolate changes with Git worktrees, share local resources, and verify integration—without a hosted service.
|
|
19
|
-
|
|
20
|
-
One agent changes an interface while another builds against it. Two agents edit the same file. Separate worktrees still compete for a dev-server port or a package install.
|
|
21
|
-
|
|
22
|
-
Kith gives cooperating agents shared local state: who owns a task, which files are claimed, and which commands need to wait. Agents use its MCP server; CLI commands support local inspection and maintenance. Coordination lives in SQLite on your machine; Kith itself needs no hosted service or model API key.
|
|
23
|
-
|
|
24
|
-
## What Kith does
|
|
25
|
-
|
|
26
|
-
| Need | Kith provides |
|
|
27
|
-
| --- | --- |
|
|
28
|
-
| Keep tasks from overlapping | Scoped claims with conflict responses |
|
|
29
|
-
| Give agents separate working files | Git worktrees with an explicit integration step |
|
|
30
|
-
| Check work before integration | Your project's verification command |
|
|
31
|
-
| Share local tools | Port reservations and supervised command mutexes |
|
|
32
|
-
| Know what is going on before you start | `kith brief`: who is active on what, overlapping claims, open handoffs and conflicts. Read-only, no session needed |
|
|
33
|
-
| Work the way you do | Worktree isolation, or one shared checkout with scope claims (`kith mode main`) |
|
|
34
|
-
| Keep what an agent learned | Handoff notes that survive a session boundary and reach whoever works the same scope next |
|
|
35
|
-
| See what is happening | Session/task state through CLI/MCP; optional read-only editor and worktree views |
|
|
36
|
-
|
|
37
|
-
Kith fits workflows where you already launch multiple coding agents and want them to coordinate. It does not choose models, write prompts, or launch a fleet for you. Worktrees separate files; Kith adds shared ownership and resource coordination.
|
|
19
|
+
Two agents on one repository collide when they edit the same file, fight over a port, run competing installs, or let `git add -A` sweep up another agent's work.
|
|
38
20
|
|
|
39
|
-
|
|
21
|
+
File ownership for the coding agents you already run.
|
|
40
22
|
|
|
41
23
|
## Quick start
|
|
42
24
|
|
|
43
|
-
Requires **Git 2.38+** and **Node.js 22.13+ on 22.x or Node.js 24+**.
|
|
44
|
-
|
|
45
|
-
Git recording and integration require a commit identity configured for the repository (`user.name` and `user.email`). Kith does not change your global Git identity.
|
|
46
|
-
|
|
47
|
-
**Upgrading to 0.1.9:** Stop existing Kith connections first. Back up stopped coordination state (including SQLite sidecars) and retain worktrees; upgrade all coordinators sharing a repository together. The storage schema stays 3 and the protocol stays 1.6.0. Databases already on schema 3 open without a version migration. The first open on 0.1.8 or later creates an optional `handoffs` table; binaries from 0.1.6 and 0.1.7 ignore that table and keep working, but they do not read or write handoff notes. An upgrade from schema 2 still applies the 0.1.6 migration to schema 3, which older binaries refuse. After upgrading, run `kith install` so hooks and client entries use this runtime. `kith doctor` reports a hook or MCP entry still pinned to an older runtime. Existing custom launchers are preserved; review their pinned version before reconnecting. On macOS, `kith install` and `kith setup` register a login LaunchAgent unless `--no-autostart` or `--no-radar` is passed. See [recovery guidance](docs/reliability.md#recovery).
|
|
48
|
-
|
|
49
|
-
### VS Code or Cursor
|
|
50
|
-
|
|
51
|
-
Install **Kith** (`kith-coord.kith`) from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=kith-coord.kith) or [Cursor / Open VSX](https://open-vsx.org/extension/kith-coord/kith). You can also search for `kith-coord.kith` in the editor's Extensions view.
|
|
52
|
-
|
|
53
|
-
To select release **0.1.9** explicitly with an editor CLI already on your `PATH`:
|
|
25
|
+
Requires **Git 2.38+** and **Node.js 22.13+ on 22.x, or Node.js 24+**.
|
|
54
26
|
|
|
55
27
|
```sh
|
|
56
|
-
|
|
57
|
-
cursor --install-extension kith-coord.kith@0.1.9
|
|
28
|
+
npm i -g kith-coord && kith install
|
|
58
29
|
```
|
|
59
30
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Open a trusted local Git checkout and approve Kith's MCP server through the editor. The extension bundles the coordination server, detects Node, and preserves existing MCP entries, hooks and tool permissions. **No global npm install is needed.** It registers the compact tool profile (`kith.mcp.profile`, `compact` by default, or `full`), shows a read-only global hook status note in Output, and adds **Kith: Install Global Hooks & Autostart** (`kith.installGlobal`). The bundled extension does not include the macOS menu-bar helper; run `kith install` from the CLI on macOS for Radar login autostart. Each agent still needs to use Kith's tools; installing the extension alone does not enforce claims on other writers.
|
|
63
|
-
|
|
64
|
-
Start with a scoped task:
|
|
31
|
+
When Claude Code is the only client, install the plugin instead of a global npm package. In Claude Code:
|
|
65
32
|
|
|
66
33
|
```text
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Run the project checks and complete through Kith with that verification command.
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
The [extension guide](extensions/editor/README.md) covers settings and existing configurations; [recorded editor checks](docs/client-validation.md#editor-marketplaces-and-signed-in-chats) distinguish installation, native MCP registration and signed-in task results.
|
|
73
|
-
|
|
74
|
-
### CLI and other MCP clients
|
|
75
|
-
|
|
76
|
-
Configure detected clients and add project instructions with:
|
|
77
|
-
|
|
78
|
-
```sh
|
|
79
|
-
npx --yes --package kith-coord@0.1.9 kith setup
|
|
34
|
+
/plugin marketplace add connorhriley/kith
|
|
35
|
+
/plugin install kith@kith
|
|
80
36
|
```
|
|
81
37
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- Configures global MCP servers with the concise **`--compact`** tool profile by default (`kith mcp --compact`, or `--full` for the complete surface).
|
|
85
|
-
- Installs global silent-solo `--auto` hooks for **Claude Code** (`~/.claude/settings.json`) and **Cursor** (`~/.cursor/hooks.json`). Solo work stays zero-write (`Watching only`); when concurrent activity overlaps, hooks auto-join Kith and isolate writers into worktrees or leases.
|
|
86
|
-
- On **macOS**, installs and starts a login `LaunchAgent` (`dev.kith.radar`) for background menu-bar Radar, and opens the read-only view. `--no-autostart` or `--no-radar` skips the login item. Repeat setup keeps the existing workspace.
|
|
87
|
-
- **`kith uninstall`** removes the macOS `LaunchAgent`, global Kith hooks, global MCP entries, retained runtimes and launcher symlinks.
|
|
38
|
+
## Demo
|
|
88
39
|
|
|
89
|
-
|
|
40
|
+

|
|
90
41
|
|
|
91
|
-
|
|
42
|
+
Recorded from the real `kith` CLI in a temporary repository. `auth` (Claude Code) claims `src/auth.mjs`. `billing` (Cursor) claims the same path and is refused. `auth` edits the file and `kith commit` records only that file. `kith status` lists both sessions and the claim. Both sessions use this terminal's process id, because the CLI is driving them; two editor processes would show two ids. The claim is still per agent: `billing` does not receive the lock.
|
|
92
43
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
For source installation and the disposable demo, use the pinned **pnpm 10.20.0**:
|
|
44
|
+
Each `kith begin` is one line from the CLI's claim fields ([`claim.jq`](assets/demo/claim.jq)); the session token is not printed. The owner pid, client, and title are set in the hidden setup, so the typed commands stay short. Reproduce it from a built checkout:
|
|
96
45
|
|
|
97
46
|
```sh
|
|
98
|
-
|
|
99
|
-
cd kith
|
|
100
|
-
corepack enable
|
|
101
|
-
pnpm install --frozen-lockfile
|
|
102
|
-
pnpm build
|
|
47
|
+
pnpm build && vhs assets/demo/claims.tape
|
|
103
48
|
```
|
|
104
49
|
|
|
105
|
-
|
|
50
|
+
Kith does not launch those agents. Claude Code, Codex, Cursor, and any other MCP client share file claims, a dev-server port, and one-at-a-time commands such as a package install. When you supply a check, a worktree integrates only after that check passes; a failure leaves the target unchanged. There is no account and no coordination server. The macOS menu bar from `kith install` is an optional read-only status view, not a launcher.
|
|
106
51
|
|
|
107
|
-
|
|
108
|
-
pnpm demo
|
|
109
|
-
```
|
|
52
|
+
## What install sets up
|
|
110
53
|
|
|
111
|
-
|
|
54
|
+
`kith install` puts `kith` on your `PATH` and keeps that runtime outside the npx cache. It writes a global MCP entry for each detected client (`kith mcp --compact`) and installs silent-solo `--auto` hooks for Claude Code and Cursor. One agent stays at **Watching only**. When another writer overlaps, the hooks join Kith. If that session is already inside a linked worktree, joining adopts it, including a Claude Code checkout under `.claude/worktrees/<name>`. Otherwise the hooks isolate the work into a worktree Kith creates, or into a claim. Install does not claim any files. Codex has no native tool hooks, so it uses the MCP tools. Linux and Windows skip the menu bar; use `kith watch`. Supervised mutex commands and shell hooks need macOS, Linux, or WSL.
|
|
112
55
|
|
|
113
|
-
|
|
114
|
-
auth: claimed src/auth.mjs in an isolated worktree
|
|
115
|
-
billing: overlapping claim on src/auth.mjs refused
|
|
116
|
-
billing: claimed src/billing.mjs in an isolated worktree
|
|
117
|
-
auth: checked its worktree through the MCP command supervisor
|
|
118
|
-
auth: isolated edit reported, verified, and integrated
|
|
119
|
-
billing: checked its worktree through the MCP command supervisor
|
|
120
|
-
billing: isolated edit reported, verified, and integrated
|
|
121
|
-
Two real MCP clients completed work in separate worktrees. Disposable example passed.
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
The implementation is in [examples/two-agents.mjs](examples/two-agents.mjs). This demonstrates the coordination protocol; [native-client validation](docs/client-validation.md) separately exercises installed coding clients.
|
|
56
|
+
A directory that scans a repository for an MCP server reads the committed [`.mcp.json`](.mcp.json): `npx -y kith-coord mcp` over stdio. That entry does not pin a checkout and does not install hooks. Upgrades, the editor extension, and the client matrix are in [Install](docs/install.md).
|
|
125
57
|
|
|
126
|
-
|
|
58
|
+
The Claude Code plugin runs `npx -y kith-coord` for the same hooks and for an MCP server (`kith mcp --compact`). It does not configure Cursor, Codex, or the menu bar. Using it together with `kith install` is safe: the plugin hooks exit when those Claude hooks are already registered, and `kith doctor` does not treat that as a fault. [Which to use](docs/install.md#which-to-use).
|
|
127
59
|
|
|
128
|
-
|
|
60
|
+
## How it works
|
|
129
61
|
|
|
130
|
-
|
|
131
|
-
| --- | --- |
|
|
132
|
-
| VS Code / Cursor | Marketplace extension with `kith.mcp.profile` set to `compact` by default; **Kith: Install Global Hooks & Autostart** runs `kith install` |
|
|
133
|
-
| Claude Code and Cursor | Detected client configuration through `kith install` or `kith setup`; silent-solo `--auto` hooks join when work overlaps |
|
|
134
|
-
| Codex CLI | Detected global MCP configuration (`--compact` by default). Codex CLI has no native tool hooks, so coordination uses MCP tools and Radar or `kith watch` |
|
|
135
|
-
| Claude Desktop | Detected MCP configuration via `kith install` / `kith setup` |
|
|
136
|
-
| Other MCP clients | stdio server via `kith mcp` (`--compact` or `--full`); client-specific validation required |
|
|
137
|
-
|
|
138
|
-
Native evidence is version-specific. See [client validation](docs/client-validation.md), [advanced integration setup](docs/integrations.md) and [session ownership](docs/sessions-and-mutexes.md). The npm package is **`kith-coord`** and the command is **`kith`**; the unrelated npm package `kith` is not this project.
|
|
62
|
+
Each agent has an id and claims the paths it will change. Kith stores that claim in SQLite under the repository (`.coord/`). An exclusive claim that overlaps a live claim is refused, and no lock is taken. In the default worktrees mode, `--worktree` (MCP `isolateWorktree: true`) checks out a separate Git worktree for the task. `kith mode main` keeps every agent in the shared checkout and still enforces the claims.
|
|
139
63
|
|
|
140
|
-
|
|
64
|
+
Ports and other shared local resources are separate from file claims. `kith dev` reserves a port, scanning from 3000 unless you set a base. `kith port` reserves one too, scanning from 3100. `kith mutex` runs one command at a time under a named lock, for a package install or a database. `kith commit` commits only the calling session's files, through a temporary Git index, so a shared checkout does not pick up another agent's edits.
|
|
141
65
|
|
|
142
|
-
|
|
66
|
+
Finishing a worktree task checkpoints the work and integrates through a staging worktree. Pass the project's check. If it fails, or if it changes the staging tree, the integration target is left unchanged and the source worktree remains for repair. With no check, a clean Git merge is the gate. Claims coordinate clients that call Kith, or whose auto hooks have joined. They are not a sandbox for every process on the machine.
|
|
143
67
|
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
68
|
+
```mermaid
|
|
69
|
+
sequenceDiagram
|
|
70
|
+
participant A as Agent A
|
|
71
|
+
participant K as Kith
|
|
72
|
+
participant B as Agent B
|
|
73
|
+
A->>K: claim src/auth.mjs
|
|
74
|
+
K-->>A: exclusive claim, optional worktree
|
|
75
|
+
B->>K: claim src/auth.mjs
|
|
76
|
+
K-->>B: refused, overlap
|
|
77
|
+
A->>K: kith commit, then verify
|
|
78
|
+
K-->>A: integrate, or leave the target unchanged
|
|
148
79
|
```
|
|
149
80
|
|
|
150
|
-
|
|
81
|
+
Coordination stays on this machine. Kith does not call a model API and does not run a hosted service. CLI and MCP clients share `.coord/state.db`. There is no coordination server to leave running.
|
|
151
82
|
|
|
152
|
-
##
|
|
83
|
+
## Why not just git worktrees?
|
|
153
84
|
|
|
154
|
-
|
|
85
|
+
A Git worktree gives each agent a directory and a branch. It does not record who owns a path, so two agents can edit the same files and only collide when someone merges. It does not reserve a dev-server port, serialise a package install, or hold a shared database. It does not run your check before the result is integrated, and it does not carry a note to the next session.
|
|
155
86
|
|
|
156
|
-
|
|
87
|
+
Kith still uses worktrees when you want separate files. The extra state is the claim, the mutex, and the checked integration. `kith mode main` is the same claims without a worktree, for a checkout you would rather share.
|
|
157
88
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
kith
|
|
161
|
-
|
|
89
|
+
| | Git worktrees | Kith |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| Separate working files | One directory and branch per checkout | Optional worktree per task. `kith mode main` stays in one checkout |
|
|
92
|
+
| Overlapping edits | Found when you merge | Exclusive claim refused before the second agent edits |
|
|
93
|
+
| Dev-server ports | Not handled | `kith port` and `kith dev` reserve a port |
|
|
94
|
+
| Shared commands and databases | Not handled | `kith mutex` serialises them |
|
|
95
|
+
| Check before integration | You arrange it | Your check, when you supply one. Failure leaves the target unchanged |
|
|
96
|
+
| Who is working | `git worktree list` | `kith status` and `kith brief`: claims, waits, handoffs |
|
|
97
|
+
| Next session | Nothing carried across | Handoff notes for the same scope |
|
|
98
|
+
| Hosted service | None | None |
|
|
162
99
|
|
|
163
|
-
|
|
100
|
+
## How Kith compares
|
|
164
101
|
|
|
165
|
-
|
|
102
|
+
Most multi-agent tools solve the problem by keeping agents apart: a worktree, a container or a VM each. That stops two agents typing into the same directory. It does not stop them changing the same file on different branches, fighting over port 3000, running two package installs at once, or integrating work that has not passed a check. Kith is the layer that handles those, underneath whichever agents and launcher you already use.
|
|
166
103
|
|
|
167
|
-
|
|
104
|
+
| If you use… | It gives you | Kith adds |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| [Claude Code `--worktree`](https://code.claude.com/docs/en/worktrees) | A worktree per session under `.claude/worktrees/<name>`, and messages between sessions | That checkout, adopted instead of a second worktree. File claims shared with Codex, Cursor and other MCP clients; port and command locks; integration only after the check you supply passes |
|
|
107
|
+
| [Orca](https://github.com/stablyai/orca), [Orchestrator.inc](https://github.com/OrchestratorInc/agent-orchestrator), [Claude Squad](https://github.com/smtg-ai/claude-squad), [CCManager](https://github.com/kbwo/ccmanager) | An app or TUI that launches agents, each in its own worktree | Adoption of each linked worktree, then ownership of files *across* them, so an overlapping claim is refused before the second cooperating agent edits |
|
|
108
|
+
| [container-use](https://github.com/dagger/container-use) | A container and branch per agent | The same claims and checked integration, without containers. container-use isolates more strongly; Kith only binds agents that cooperate |
|
|
109
|
+
| [claude-bulkhead](https://github.com/dooly6276/claude-bulkhead) | Hooks that block cross-session kills, port clashes, `git add -A` sweeps and RAM overload | Exclusive file claims, a per-agent `kith commit` that records only that session's files, and checked integration. bulkhead covers process and machine safety that Kith does not; they work side by side |
|
|
110
|
+
| [MCP Agent Mail](https://github.com/Dicklesworthstone/mcp_agent_mail_rust) | Agent identities, inboxes and advisory file reservations through a local server | Enforced claims through hooks, worktree isolation and checked integration, with no coordination server to leave running. Agent Mail does messaging; Kith does not |
|
|
168
111
|
|
|
169
|
-
|
|
170
|
-
1. **Begin through MCP.** Call `kith_begin_work` with a unique `agentId`, explicit `scopeGlobs`, and `isolateWorktree: true`. The connection retains session ownership; no shell exports are needed for this MCP-only workflow.
|
|
171
|
-
2. **Claim a scope.** Cooperating clients receive a conflict when an exclusive claim overlaps another claim.
|
|
172
|
-
3. **Do the work.** Edit the returned `worktree.worktreePath`, report edits with `kith_record_file_edit`, and use `kith_run_with_mutex` for serialized commands. Heartbeat before expiry and keep the owning connection open.
|
|
173
|
-
4. **Leave a handoff.** When you finish, get blocked or must stop, call `kith_write_handoff` with what is done, what remains, what failed and what you learned. `releaseTask` hands the task back to the queue. If a session ends without a note, Kith records what it observed. The next agent on the same scope receives these notes from `kith_begin_work` or `kith_claim_next_task`, labelled as untrusted information to verify.
|
|
174
|
-
5. **Verify and complete.** For a worktree, Kith checkpoints changes and integrates through a separate staging worktree. The target may hold unrelated uncommitted work, but not edits to files the integration changes. Supply a verification command to check more than Git mergeability.
|
|
112
|
+
What Kith isn't: it does not launch agents, choose models or provide a control dashboard, and it is not a sandbox. The menu bar and editor views are read-only status. Claims bind agents that call Kith or whose hooks have joined. Native edit-blocking hooks are for Claude Code and Cursor; other clients use the MCP tools. Kith adopts a worktree another tool already created when that session is inside it, or when you run `kith adopt`. It does not delete that directory. A claim stays on the repository path, so two worktrees cannot both own the same file. Kith can still create its own worktree when you ask it to.
|
|
175
113
|
|
|
176
|
-
|
|
114
|
+
A port or command lock applies when the agent uses `kith dev`, `kith port`, or `kith mutex` (or the optional package-manager shims). The hook does not take that lock for an ordinary shell command. With no check supplied, worktree integration still requires a clean Git merge and leaves the target unchanged when that merge conflicts. The commands are in [Adopt a worktree](docs/usage.md#adopt-a-worktree-that-already-exists).
|
|
177
115
|
|
|
178
|
-
|
|
116
|
+
## What Kith does
|
|
179
117
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
118
|
+
| Need | Kith provides |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| Keep tasks from overlapping | Scoped claims with conflict responses |
|
|
121
|
+
| Give agents separate working files | A worktree Kith creates, or one it adopts from Claude Code, Claude Squad, CCManager, Orca, or Orchestrator.inc |
|
|
122
|
+
| Check work before integration | Your project's check, when you supply one |
|
|
123
|
+
| Share local tools | Port reservations and supervised command mutexes |
|
|
124
|
+
| Know what is going on before you start | `kith brief`: who is active on what, overlapping claims, open handoffs and conflicts. Read-only, no session needed |
|
|
125
|
+
| Work the way you do | Worktree isolation, or one shared checkout with scope claims (`kith mode main`) |
|
|
126
|
+
| Keep what an agent learned | Handoff notes that survive a session boundary and reach whoever works the same scope next |
|
|
127
|
+
| See what is happening | Session and task state through CLI and MCP; optional read-only editor and menu-bar views |
|
|
185
128
|
|
|
186
|
-
|
|
129
|
+
The [reliability contract](docs/reliability.md) is the boundary: ownership, checks, recovery, and what is not enforced. Scope matching follows a [documented grammar](docs/path-and-scope-rules.md). Contract-change reports and exact-name reuse hints are advisory.
|
|
187
130
|
|
|
188
|
-
|
|
131
|
+
Day to day: `kith`, `kith status`, `kith brief`, `kith run`, `kith gc`, `kith doctor`, or `kith help --all`. A task moves through begin, claim, edit, handoff, and complete; the commands are in [Workflows](docs/usage.md#how-a-task-moves-through-kith). Dev servers, waiting claims, and Radar are in [Install](docs/install.md) and [Usage](docs/usage.md).
|
|
189
132
|
|
|
190
133
|
## Project status
|
|
191
134
|
|
|
192
|
-
The suite exercises process contention, session ownership, command cancellation and disconnects, generated hooks, MCP workflows, and worktree integration.
|
|
193
|
-
|
|
194
|
-
The CI badge links to current hosted results; local tests and recorded native runs do not establish that every platform or client release passes. Repository discovery, physical path checks, exact supported glob matching and Git conflict refusal have dedicated regressions. Recovery checks cover interrupted upgrades, stopped database/WAL backups and retained worktree continuation. The [reliability contract](docs/reliability.md) records the boundaries of those scenarios; native-client coverage is listed above.
|
|
135
|
+
The suite exercises process contention, session ownership, command cancellation and disconnects, generated hooks, MCP workflows, and worktree integration. The CI badge is the current hosted result. Local tests do not establish that every platform or client release passes.
|
|
195
136
|
|
|
196
|
-
- [Reliability contract](docs/reliability.md):
|
|
137
|
+
- [Reliability contract](docs/reliability.md): behaviour, boundaries, and recovery
|
|
197
138
|
- [Architecture](docs/architecture.md): storage, adapters, and Git integration
|
|
198
139
|
- [Roadmap](docs/roadmap.md): priorities and completion gates
|
|
199
|
-
- [Changelog](CHANGELOG.md):
|
|
140
|
+
- [Changelog](CHANGELOG.md): behaviour changes and migration notes
|
|
141
|
+
- [Client validation](docs/client-validation.md): version-specific native evidence
|
|
200
142
|
|
|
201
143
|
## Contributing
|
|
202
144
|
|
|
203
|
-
The most useful contributions reproduce a concrete failure or improve a real multi-agent workflow. Include a disposable fixture, expected
|
|
145
|
+
The most useful contributions reproduce a concrete failure or improve a real multi-agent workflow. Include a disposable fixture, expected behaviour, and a way to verify the change. Start with [contributor setup and entry points](CONTRIBUTING.md).
|
|
204
146
|
|
|
205
147
|
For bugs, use the [bug report form](https://github.com/connorhriley/kith/issues/new?template=bug_report.yml). For a proposed workflow, use the [feature request form](https://github.com/connorhriley/kith/issues/new?template=feature_request.yml). Keep tokens, source snapshots, and `.coord` state out of public diagnostics; use the [security reporting guidance](SECURITY.md) for sensitive reports.
|
|
206
148
|
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="400" viewBox="0 0 1280 400" role="img" aria-label="Kith — Parallel agents. Shared direction."><title>Kith — Parallel agents. Shared direction.</title><rect width="1280" height="400" fill="#0B0F0E"/><g transform="translate(431 58) scale(1.2)"><path d="M25 57L49 33L89 73Q92 76 92 80V96Q92 100 88 100H69Q65 100 62 97Z" fill="#09624F"/><path d="M8 44L58 1Q59 0 63 0H81Q85 0 85 4V18Q85 21 82 24L8 87Q6 89 6 85V49Q6 46 8 44Z" fill="#22C55E"/></g><path d="M6.689453125,-0.0 L6.689453125,-71.58203125 L20.41015625,-71.58203125 L20.41015625,-33.59375 L36.474609375,-51.85546875 L53.369140625,-51.85546875 L35.64453125,-32.91015625 L54.638671875,-0.0 L39.84375,-0.0 L26.806640625,-23.291015625 L20.41015625,-16.6015625 L20.41015625,-0.0 Z M58.79296875,-58.88671875 L58.79296875,-71.58203125 L72.513671875,-71.58203125 L72.513671875,-58.88671875 Z M58.79296875,-0.0 L58.79296875,-51.85546875 L72.513671875,-51.85546875 L72.513671875,-0.0 Z M106.35546875,-51.85546875 L106.35546875,-40.91796875 L96.98046875,-40.91796875 L96.98046875,-20.01953125 Q96.98046875,-13.671875 97.2490234375,-12.6220703125 Q97.517578125,-11.572265625 98.4697265625,-10.888671875 Q99.421875,-10.205078125 100.7890625,-10.205078125 Q102.693359375,-10.205078125 106.306640625,-11.5234375 L107.478515625,-0.87890625 Q102.693359375,1.171875 96.638671875,1.171875 Q92.927734375,1.171875 89.94921875,-0.0732421875 Q86.970703125,-1.318359375 85.5791015625,-3.2958984375 Q84.1875,-5.2734375 83.650390625,-8.642578125 Q83.2109375,-11.03515625 83.2109375,-18.310546875 L83.2109375,-40.91796875 L76.912109375,-40.91796875 L76.912109375,-51.85546875 L83.2109375,-51.85546875 L83.2109375,-62.158203125 L96.98046875,-70.166015625 L96.98046875,-51.85546875 Z M125.548828125,-71.58203125 L125.548828125,-45.263671875 Q132.189453125,-53.02734375 141.41796875,-53.02734375 Q146.154296875,-53.02734375 149.962890625,-51.26953125 Q153.771484375,-49.51171875 155.7001953125,-46.77734375 Q157.62890625,-44.04296875 158.3369140625,-40.72265625 Q159.044921875,-37.40234375 159.044921875,-30.419921875 L159.044921875,-0.0 L145.32421875,-0.0 L145.32421875,-27.392578125 Q145.32421875,-35.546875 144.54296875,-37.744140625 Q143.76171875,-39.94140625 141.7841796875,-41.2353515625 Q139.806640625,-42.529296875 136.828125,-42.529296875 Q133.41015625,-42.529296875 130.724609375,-40.869140625 Q128.0390625,-39.208984375 126.7939453125,-35.8642578125 Q125.548828125,-32.51953125 125.548828125,-25.9765625 L125.548828125,-0.0 L111.828125,-0.0 L111.828125,-71.58203125 Z" transform="translate(571.4 168.39999999999998) scale(1.56)" fill="#F8FAFC"/><text x="640" y="246" text-anchor="middle" fill="#F8FAFC" font-family="Arial,Helvetica,sans-serif" font-size="38" font-weight="500" letter-spacing="-.9">Parallel agents. Shared direction.</text><text x="640" y="293" text-anchor="middle" fill="#A8B4B0" font-family="Arial,Helvetica,sans-serif" font-size="22">
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="400" viewBox="0 0 1280 400" role="img" aria-label="Kith — Parallel agents. Shared direction."><title>Kith — Parallel agents. Shared direction.</title><rect width="1280" height="400" fill="#0B0F0E"/><g transform="translate(431 58) scale(1.2)"><path d="M25 57L49 33L89 73Q92 76 92 80V96Q92 100 88 100H69Q65 100 62 97Z" fill="#09624F"/><path d="M8 44L58 1Q59 0 63 0H81Q85 0 85 4V18Q85 21 82 24L8 87Q6 89 6 85V49Q6 46 8 44Z" fill="#22C55E"/></g><path d="M6.689453125,-0.0 L6.689453125,-71.58203125 L20.41015625,-71.58203125 L20.41015625,-33.59375 L36.474609375,-51.85546875 L53.369140625,-51.85546875 L35.64453125,-32.91015625 L54.638671875,-0.0 L39.84375,-0.0 L26.806640625,-23.291015625 L20.41015625,-16.6015625 L20.41015625,-0.0 Z M58.79296875,-58.88671875 L58.79296875,-71.58203125 L72.513671875,-71.58203125 L72.513671875,-58.88671875 Z M58.79296875,-0.0 L58.79296875,-51.85546875 L72.513671875,-51.85546875 L72.513671875,-0.0 Z M106.35546875,-51.85546875 L106.35546875,-40.91796875 L96.98046875,-40.91796875 L96.98046875,-20.01953125 Q96.98046875,-13.671875 97.2490234375,-12.6220703125 Q97.517578125,-11.572265625 98.4697265625,-10.888671875 Q99.421875,-10.205078125 100.7890625,-10.205078125 Q102.693359375,-10.205078125 106.306640625,-11.5234375 L107.478515625,-0.87890625 Q102.693359375,1.171875 96.638671875,1.171875 Q92.927734375,1.171875 89.94921875,-0.0732421875 Q86.970703125,-1.318359375 85.5791015625,-3.2958984375 Q84.1875,-5.2734375 83.650390625,-8.642578125 Q83.2109375,-11.03515625 83.2109375,-18.310546875 L83.2109375,-40.91796875 L76.912109375,-40.91796875 L76.912109375,-51.85546875 L83.2109375,-51.85546875 L83.2109375,-62.158203125 L96.98046875,-70.166015625 L96.98046875,-51.85546875 Z M125.548828125,-71.58203125 L125.548828125,-45.263671875 Q132.189453125,-53.02734375 141.41796875,-53.02734375 Q146.154296875,-53.02734375 149.962890625,-51.26953125 Q153.771484375,-49.51171875 155.7001953125,-46.77734375 Q157.62890625,-44.04296875 158.3369140625,-40.72265625 Q159.044921875,-37.40234375 159.044921875,-30.419921875 L159.044921875,-0.0 L145.32421875,-0.0 L145.32421875,-27.392578125 Q145.32421875,-35.546875 144.54296875,-37.744140625 Q143.76171875,-39.94140625 141.7841796875,-41.2353515625 Q139.806640625,-42.529296875 136.828125,-42.529296875 Q133.41015625,-42.529296875 130.724609375,-40.869140625 Q128.0390625,-39.208984375 126.7939453125,-35.8642578125 Q125.548828125,-32.51953125 125.548828125,-25.9765625 L125.548828125,-0.0 L111.828125,-0.0 L111.828125,-71.58203125 Z" transform="translate(571.4 168.39999999999998) scale(1.56)" fill="#F8FAFC"/><text x="640" y="246" text-anchor="middle" fill="#F8FAFC" font-family="Arial,Helvetica,sans-serif" font-size="38" font-weight="500" letter-spacing="-.9">Parallel agents. Shared direction.</text><text x="640" y="293" text-anchor="middle" fill="#A8B4B0" font-family="Arial,Helvetica,sans-serif" font-size="22">File ownership for the coding agents you already run.</text><path d="M564 343H716" stroke="#174536" stroke-width="2"/><path d="M615 343H665" stroke="#22C55E" stroke-width="2"/></svg>
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="Kith — Parallel agents. Shared direction."><title>Kith — Parallel agents. Shared direction.</title><rect width="1280" height="640" fill="#0B0F0E"/><g transform="translate(431 90) scale(1.2)"><path d="M25 57L49 33L89 73Q92 76 92 80V96Q92 100 88 100H69Q65 100 62 97Z" fill="#09624F"/><path d="M8 44L58 1Q59 0 63 0H81Q85 0 85 4V18Q85 21 82 24L8 87Q6 89 6 85V49Q6 46 8 44Z" fill="#22C55E"/></g><path d="M6.689453125,-0.0 L6.689453125,-71.58203125 L20.41015625,-71.58203125 L20.41015625,-33.59375 L36.474609375,-51.85546875 L53.369140625,-51.85546875 L35.64453125,-32.91015625 L54.638671875,-0.0 L39.84375,-0.0 L26.806640625,-23.291015625 L20.41015625,-16.6015625 L20.41015625,-0.0 Z M58.79296875,-58.88671875 L58.79296875,-71.58203125 L72.513671875,-71.58203125 L72.513671875,-58.88671875 Z M58.79296875,-0.0 L58.79296875,-51.85546875 L72.513671875,-51.85546875 L72.513671875,-0.0 Z M106.35546875,-51.85546875 L106.35546875,-40.91796875 L96.98046875,-40.91796875 L96.98046875,-20.01953125 Q96.98046875,-13.671875 97.2490234375,-12.6220703125 Q97.517578125,-11.572265625 98.4697265625,-10.888671875 Q99.421875,-10.205078125 100.7890625,-10.205078125 Q102.693359375,-10.205078125 106.306640625,-11.5234375 L107.478515625,-0.87890625 Q102.693359375,1.171875 96.638671875,1.171875 Q92.927734375,1.171875 89.94921875,-0.0732421875 Q86.970703125,-1.318359375 85.5791015625,-3.2958984375 Q84.1875,-5.2734375 83.650390625,-8.642578125 Q83.2109375,-11.03515625 83.2109375,-18.310546875 L83.2109375,-40.91796875 L76.912109375,-40.91796875 L76.912109375,-51.85546875 L83.2109375,-51.85546875 L83.2109375,-62.158203125 L96.98046875,-70.166015625 L96.98046875,-51.85546875 Z M125.548828125,-71.58203125 L125.548828125,-45.263671875 Q132.189453125,-53.02734375 141.41796875,-53.02734375 Q146.154296875,-53.02734375 149.962890625,-51.26953125 Q153.771484375,-49.51171875 155.7001953125,-46.77734375 Q157.62890625,-44.04296875 158.3369140625,-40.72265625 Q159.044921875,-37.40234375 159.044921875,-30.419921875 L159.044921875,-0.0 L145.32421875,-0.0 L145.32421875,-27.392578125 Q145.32421875,-35.546875 144.54296875,-37.744140625 Q143.76171875,-39.94140625 141.7841796875,-41.2353515625 Q139.806640625,-42.529296875 136.828125,-42.529296875 Q133.41015625,-42.529296875 130.724609375,-40.869140625 Q128.0390625,-39.208984375 126.7939453125,-35.8642578125 Q125.548828125,-32.51953125 125.548828125,-25.9765625 L125.548828125,-0.0 L111.828125,-0.0 L111.828125,-71.58203125 Z" transform="translate(571.4 200.39999999999998) scale(1.56)" fill="#F8FAFC"/><text x="640" y="320" text-anchor="middle" fill="#F8FAFC" font-family="Arial,Helvetica,sans-serif" font-size="38" font-weight="500" letter-spacing="-.9">Parallel agents. Shared direction.</text><text x="640" y="367" text-anchor="middle" fill="#A8B4B0" font-family="Arial,Helvetica,sans-serif" font-size="22">
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="Kith — Parallel agents. Shared direction."><title>Kith — Parallel agents. Shared direction.</title><rect width="1280" height="640" fill="#0B0F0E"/><g transform="translate(431 90) scale(1.2)"><path d="M25 57L49 33L89 73Q92 76 92 80V96Q92 100 88 100H69Q65 100 62 97Z" fill="#09624F"/><path d="M8 44L58 1Q59 0 63 0H81Q85 0 85 4V18Q85 21 82 24L8 87Q6 89 6 85V49Q6 46 8 44Z" fill="#22C55E"/></g><path d="M6.689453125,-0.0 L6.689453125,-71.58203125 L20.41015625,-71.58203125 L20.41015625,-33.59375 L36.474609375,-51.85546875 L53.369140625,-51.85546875 L35.64453125,-32.91015625 L54.638671875,-0.0 L39.84375,-0.0 L26.806640625,-23.291015625 L20.41015625,-16.6015625 L20.41015625,-0.0 Z M58.79296875,-58.88671875 L58.79296875,-71.58203125 L72.513671875,-71.58203125 L72.513671875,-58.88671875 Z M58.79296875,-0.0 L58.79296875,-51.85546875 L72.513671875,-51.85546875 L72.513671875,-0.0 Z M106.35546875,-51.85546875 L106.35546875,-40.91796875 L96.98046875,-40.91796875 L96.98046875,-20.01953125 Q96.98046875,-13.671875 97.2490234375,-12.6220703125 Q97.517578125,-11.572265625 98.4697265625,-10.888671875 Q99.421875,-10.205078125 100.7890625,-10.205078125 Q102.693359375,-10.205078125 106.306640625,-11.5234375 L107.478515625,-0.87890625 Q102.693359375,1.171875 96.638671875,1.171875 Q92.927734375,1.171875 89.94921875,-0.0732421875 Q86.970703125,-1.318359375 85.5791015625,-3.2958984375 Q84.1875,-5.2734375 83.650390625,-8.642578125 Q83.2109375,-11.03515625 83.2109375,-18.310546875 L83.2109375,-40.91796875 L76.912109375,-40.91796875 L76.912109375,-51.85546875 L83.2109375,-51.85546875 L83.2109375,-62.158203125 L96.98046875,-70.166015625 L96.98046875,-51.85546875 Z M125.548828125,-71.58203125 L125.548828125,-45.263671875 Q132.189453125,-53.02734375 141.41796875,-53.02734375 Q146.154296875,-53.02734375 149.962890625,-51.26953125 Q153.771484375,-49.51171875 155.7001953125,-46.77734375 Q157.62890625,-44.04296875 158.3369140625,-40.72265625 Q159.044921875,-37.40234375 159.044921875,-30.419921875 L159.044921875,-0.0 L145.32421875,-0.0 L145.32421875,-27.392578125 Q145.32421875,-35.546875 144.54296875,-37.744140625 Q143.76171875,-39.94140625 141.7841796875,-41.2353515625 Q139.806640625,-42.529296875 136.828125,-42.529296875 Q133.41015625,-42.529296875 130.724609375,-40.869140625 Q128.0390625,-39.208984375 126.7939453125,-35.8642578125 Q125.548828125,-32.51953125 125.548828125,-25.9765625 L125.548828125,-0.0 L111.828125,-0.0 L111.828125,-71.58203125 Z" transform="translate(571.4 200.39999999999998) scale(1.56)" fill="#F8FAFC"/><text x="640" y="320" text-anchor="middle" fill="#F8FAFC" font-family="Arial,Helvetica,sans-serif" font-size="38" font-weight="500" letter-spacing="-.9">Parallel agents. Shared direction.</text><text x="640" y="367" text-anchor="middle" fill="#A8B4B0" font-family="Arial,Helvetica,sans-serif" font-size="22">File ownership for the coding agents you already run.</text><g fill="none" stroke-width="3" stroke-linecap="round"><path d="M350 445H410C490 445 480 500 600 500M350 555H410C490 555 480 500 600 500" stroke="#387267"/><path d="M350 500H930M916 486L930 500L916 514" stroke="#22C55E"/></g><g fill="#22C55E"><circle cx="350" cy="445" r="5"/><circle cx="350" cy="500" r="5"/><circle cx="350" cy="555" r="5"/></g></svg>
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Short CLI recording for the README.
|
|
2
|
+
#
|
|
3
|
+
# From the repository root, after `pnpm build` (needs vhs, ttyd, git, node, jq):
|
|
4
|
+
# vhs assets/demo/claims.tape
|
|
5
|
+
#
|
|
6
|
+
# Visible commands stay short. assets/demo/prepare.sh (sourced inside Hide)
|
|
7
|
+
# creates /tmp/shop, selects main mode, and wraps `kith begin` so the owner
|
|
8
|
+
# pid, client, and title are not typed. claim.jq prints one line from the
|
|
9
|
+
# real claim JSON and drops the session token. Commit and status are the
|
|
10
|
+
# CLI's own human text. The file edit happens in that hidden setup.
|
|
11
|
+
|
|
12
|
+
Output assets/demo/claims.gif
|
|
13
|
+
|
|
14
|
+
Require node
|
|
15
|
+
Require git
|
|
16
|
+
Require jq
|
|
17
|
+
|
|
18
|
+
Set Shell "bash"
|
|
19
|
+
Set FontFamily "JetBrains Mono"
|
|
20
|
+
Set FontSize 24
|
|
21
|
+
Set LineHeight 1.2
|
|
22
|
+
Set Width 1280
|
|
23
|
+
Set Height 760
|
|
24
|
+
Set Padding 28
|
|
25
|
+
Set Theme "Catppuccin Mocha"
|
|
26
|
+
Set TypingSpeed 50ms
|
|
27
|
+
Set Framerate 20
|
|
28
|
+
Set WindowBar Colorful
|
|
29
|
+
|
|
30
|
+
Hide
|
|
31
|
+
Type "source assets/demo/prepare.sh"
|
|
32
|
+
Enter
|
|
33
|
+
Type "clear"
|
|
34
|
+
Enter
|
|
35
|
+
Show
|
|
36
|
+
|
|
37
|
+
Type "# agent auth"
|
|
38
|
+
Enter
|
|
39
|
+
Type "kith begin --agent auth --scope src/auth.mjs"
|
|
40
|
+
Enter
|
|
41
|
+
Sleep 1.1s
|
|
42
|
+
|
|
43
|
+
Type "# agent billing"
|
|
44
|
+
Enter
|
|
45
|
+
Type "kith begin --agent billing --scope src/auth.mjs"
|
|
46
|
+
Enter
|
|
47
|
+
Sleep 1.8s
|
|
48
|
+
Screenshot assets/demo/refusal.png
|
|
49
|
+
|
|
50
|
+
Type "# agent auth"
|
|
51
|
+
Enter
|
|
52
|
+
Type "kith commit --agent auth -m 'Add a login check' src/auth.mjs"
|
|
53
|
+
Enter
|
|
54
|
+
Sleep 1.3s
|
|
55
|
+
|
|
56
|
+
Type "kith status"
|
|
57
|
+
Enter
|
|
58
|
+
Sleep 4.5s
|
|
59
|
+
Screenshot assets/demo/status.png
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Sourced from the repository root by assets/demo/claims.tape.
|
|
2
|
+
# Expects dist/cli/index.js from `pnpm build`. Prepares /tmp/shop.
|
|
3
|
+
# Do not execute this file: the kith wrapper has to stay in the tape's shell.
|
|
4
|
+
#
|
|
5
|
+
# The wrapper keeps the typed commands short. For `kith begin` it adds the
|
|
6
|
+
# owner pid, client, and title, then prints one line from the CLI JSON.
|
|
7
|
+
# Commit and status go to the real CLI, which already prints human text on a TTY.
|
|
8
|
+
|
|
9
|
+
if [[ ! -f dist/cli/index.js ]]; then
|
|
10
|
+
echo "Build the CLI first: pnpm build" >&2
|
|
11
|
+
return 1 2>/dev/null || exit 1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
export KITH_SRC=$PWD
|
|
15
|
+
mkdir -p /tmp/kith-bin
|
|
16
|
+
cat > /tmp/kith-bin/kith << EOF
|
|
17
|
+
#!/bin/sh
|
|
18
|
+
exec node "$KITH_SRC/dist/cli/index.js" "\$@"
|
|
19
|
+
EOF
|
|
20
|
+
chmod +x /tmp/kith-bin/kith
|
|
21
|
+
export PATH="/tmp/kith-bin:$PATH"
|
|
22
|
+
|
|
23
|
+
unset PROMPT_COMMAND
|
|
24
|
+
PS1='shop $ '
|
|
25
|
+
|
|
26
|
+
cd /tmp
|
|
27
|
+
rm -rf shop
|
|
28
|
+
mkdir shop
|
|
29
|
+
cd shop
|
|
30
|
+
git init -q -b main
|
|
31
|
+
git config user.email "demo@kith.local"
|
|
32
|
+
git config user.name "Kith demo"
|
|
33
|
+
mkdir -p src
|
|
34
|
+
printf '%s\n' 'export function login() { return false; }' > src/auth.mjs
|
|
35
|
+
printf '%s\n' 'export function charge() { return 0; }' > src/billing.mjs
|
|
36
|
+
printf '%s\n' '.coord/' > .gitignore
|
|
37
|
+
git add .
|
|
38
|
+
git commit -q -m "Initial modules"
|
|
39
|
+
kith mode main >/dev/null
|
|
40
|
+
# Auth's later commit records this edit. It stays off screen so the typed steps are the claims, the commit, and status.
|
|
41
|
+
printf '%s\n' 'export function login() { return true; }' > src/auth.mjs
|
|
42
|
+
|
|
43
|
+
kith() {
|
|
44
|
+
if [[ "${1:-}" == begin ]]; then
|
|
45
|
+
shift
|
|
46
|
+
local agent="" scope="" title="Active work" client="cli"
|
|
47
|
+
while [[ $# -gt 0 ]]; do
|
|
48
|
+
case "$1" in
|
|
49
|
+
--agent) agent=$2; shift 2 ;;
|
|
50
|
+
--scope) scope=$2; shift 2 ;;
|
|
51
|
+
*) shift ;;
|
|
52
|
+
esac
|
|
53
|
+
done
|
|
54
|
+
case "$agent" in
|
|
55
|
+
auth) title="Add a login check"; client="claude-code" ;;
|
|
56
|
+
billing) title="Change the login check"; client="cursor" ;;
|
|
57
|
+
esac
|
|
58
|
+
command kith begin --agent "$agent" --client "$client" --owner-pid "$$" --title "$title" --scope "$scope" \
|
|
59
|
+
| jq -r -f "$KITH_SRC/assets/demo/claim.jq"
|
|
60
|
+
return "${PIPESTATUS[0]}"
|
|
61
|
+
fi
|
|
62
|
+
command kith "$@"
|
|
63
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire as __kithRequire } from 'node:module'; const require = __kithRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
JSONRPCMessageSchema
|
|
4
|
+
} from "./chunk-QLLTQNDL.js";
|
|
5
|
+
|
|
6
|
+
// node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
7
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
8
|
+
var ReadBuffer = class {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
11
|
+
}
|
|
12
|
+
append(chunk) {
|
|
13
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
14
|
+
if (newSize > this._maxBufferSize) {
|
|
15
|
+
this.clear();
|
|
16
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
17
|
+
}
|
|
18
|
+
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
19
|
+
}
|
|
20
|
+
readMessage() {
|
|
21
|
+
if (!this._buffer) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const index = this._buffer.indexOf("\n");
|
|
25
|
+
if (index === -1) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const line = this._buffer.toString("utf8", 0, index).replace(/\r$/, "");
|
|
29
|
+
this._buffer = this._buffer.subarray(index + 1);
|
|
30
|
+
return deserializeMessage(line);
|
|
31
|
+
}
|
|
32
|
+
clear() {
|
|
33
|
+
this._buffer = void 0;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
function deserializeMessage(line) {
|
|
37
|
+
return JSONRPCMessageSchema.parse(JSON.parse(line));
|
|
38
|
+
}
|
|
39
|
+
function serializeMessage(message) {
|
|
40
|
+
return JSON.stringify(message) + "\n";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
ReadBuffer,
|
|
45
|
+
serializeMessage
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=chunk-6ORNHRPG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/src/shared/stdio.ts"],"sourcesContent":[null],"mappings":";;;;;;AAEO,IAAM,gCAAgC,KAAK,OAAO;AAKnD,IAAO,aAAP,MAAiB;EAInB,YAAY,SAAoC;AAC5C,SAAK,iBAAiB,SAAS,iBAAiB;EACpD;EAEA,OAAO,OAAa;AAChB,UAAM,WAAW,KAAK,SAAS,UAAU,KAAK,MAAM;AACpD,QAAI,UAAU,KAAK,gBAAgB;AAC/B,WAAK,MAAK;AACV,YAAM,IAAI,MAAM,uCAAuC,KAAK,cAAc,QAAQ;IACtF;AACA,SAAK,UAAU,KAAK,UAAU,OAAO,OAAO,CAAC,KAAK,SAAS,KAAK,CAAC,IAAI;EACzE;EAEA,cAAW;AACP,QAAI,CAAC,KAAK,SAAS;AACf,aAAO;IACX;AAEA,UAAM,QAAQ,KAAK,QAAQ,QAAQ,IAAI;AACvC,QAAI,UAAU,IAAI;AACd,aAAO;IACX;AAEA,UAAM,OAAO,KAAK,QAAQ,SAAS,QAAQ,GAAG,KAAK,EAAE,QAAQ,OAAO,EAAE;AACtE,SAAK,UAAU,KAAK,QAAQ,SAAS,QAAQ,CAAC;AAC9C,WAAO,mBAAmB,IAAI;EAClC;EAEA,QAAK;AACD,SAAK,UAAU;EACnB;;AAGE,SAAU,mBAAmB,MAAY;AAC3C,SAAO,qBAAqB,MAAM,KAAK,MAAM,IAAI,CAAC;AACtD;AAEM,SAAU,iBAAiB,SAAuB;AACpD,SAAO,KAAK,UAAU,OAAO,IAAI;AACrC;","names":[]}
|