kith-coord 0.1.0 → 0.1.2
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 +18 -1
- package/README.md +6 -14
- package/dist/cli/index.js +105 -71
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +82 -60
- package/dist/index.js.map +1 -1
- package/docs/client-validation.md +21 -4
- package/docs/integrations.md +9 -4
- package/docs/path-and-scope-rules.md +1 -1
- package/docs/protocol/tools.v1.json +6 -2
- package/docs/protocol.md +6 -4
- package/docs/reliability.md +3 -1
- package/docs/roadmap.md +1 -1
- package/docs/usage.md +9 -1
- package/docs/validation/2026-10-20-cursor-cli.json +38 -0
- package/docs/validation/2026-10-20-cursor-hook-unavailable.json +18 -0
- package/docs/validation/2026-10-20-windows-node-22.13.0.json +17 -0
- package/docs/validation/2026-10-20-windows-node-24.json +17 -0
- package/package.json +4 -2
- package/server.json +52 -0
|
@@ -7,13 +7,14 @@ pnpm install --frozen-lockfile
|
|
|
7
7
|
pnpm build
|
|
8
8
|
node scripts/validate-native-clients.mjs --client codex --output artifacts/codex.json
|
|
9
9
|
node scripts/validate-native-clients.mjs --client claude --output artifacts/claude.json
|
|
10
|
+
node scripts/validate-native-clients.mjs --client cursor --output artifacts/cursor.json
|
|
10
11
|
```
|
|
11
12
|
|
|
12
|
-
Use `--scenario isolated` or `--scenario shared` for a single run. Claude also
|
|
13
|
+
Use `--scenario isolated` or `--scenario shared` for a single run. Claude and Cursor also run `--scenario hook-failure` by default, replacing the pre-hook executable with a missing path and proving that a native edit is denied. Both worktree modes integrate an isolated worktree. The isolated scenario gives Codex an MCP-owned session; shared mode forwards a capability anchored to the runner. Claude and Cursor always inherit a session so its generated edit hooks and MCP server share ownership.
|
|
13
14
|
|
|
14
|
-
Each run uses a disposable Git repository with spaces and an apostrophe in its path. A peer holds a source file. The native client must receive the conflict (Claude also
|
|
15
|
+
Each run uses a disposable Git repository with spaces and an apostrophe in its path. A peer holds a source file. The native client must receive the conflict (Claude and Cursor also attempt a native edit that their pre-hook must deny), choose a separate scope, edit its returned worktree, report the edit, run a supervised MCP command across multiple lease periods, encounter an expected verification failure, inspect retained ownership, retry completion successfully, and release ownership. The runner checks native tool events, exact protected/integrated bytes, contracts, task completion, verification diagnostics, Git HEAD and remaining locks. An exit-zero client that merely reports a permission failure fails validation. Results are version-specific evidence, not certification of every client release or GUI.
|
|
15
16
|
|
|
16
|
-
The Codex invocation ignores user configuration/rules, uses a workspace-write sandbox, passes the generated TOML server values as invocation overrides, and approves only that fixture's Kith MCP tools for unattended execution. It does not test persisted project trust or GUI discovery; review and trust project settings in your normal client before use. Normal `kith init --only codex` does not change approval policy or mark a real project trusted. Claude loads project settings, restricts MCP to the generated config, permits its native editor and Kith tools, denies unattended permission prompts, and uses a $2 per-scenario budget. The runner has a three-minute deadline and bounded output
|
|
17
|
+
The Codex invocation ignores user configuration/rules, uses a workspace-write sandbox, passes the generated TOML server values as invocation overrides, and approves only that fixture's Kith MCP tools for unattended execution. It does not test persisted project trust or GUI discovery; review and trust project settings in your normal client before use. Normal `kith init --only codex` does not change approval policy or mark a real project trusted. Claude loads project settings, restricts MCP to the generated config, permits its native editor and Kith tools, denies unattended permission prompts, and uses a $2 per-scenario budget. Cursor uses its installed `agent` executable (override with `--binary /absolute/path`), generated project MCP/hook settings, fixture trust, automatic MCP approval and its enabled sandbox. It uses your existing Cursor login/default model and can consume Cursor usage; no price cap is available in this runner. The CLI can record trust/session metadata for the disposable fixture. The runner has a three-minute deadline and bounded output, does not log in or edit global client settings directly, and never requests subagents. Model-driven runs currently require macOS/Linux process groups for bounded cleanup.
|
|
17
18
|
|
|
18
19
|
Reports contain client/version, platform, scenario outcomes and tool names. Raw MCP results include bearer capabilities and must not be published. No raw transcript is saved by default. Keep credentials out of repository settings; generated Codex config forwards environment variable names with `env_vars`.
|
|
19
20
|
|
|
@@ -43,9 +44,25 @@ The 2026-10-20 subtraction pass reran the isolated native workflows on macOS / N
|
|
|
43
44
|
|
|
44
45
|
## Cursor adapter coverage
|
|
45
46
|
|
|
46
|
-
Generated Cursor hooks use the documented native `preToolUse`/`postToolUse` protocol and `failClosed:true`. Subprocess fixtures exercise allow/deny JSON, block/warn/off mode changes, preservation of unrelated hooks, and missing/forged ownership refusal. Native Cursor
|
|
47
|
+
Generated Cursor hooks use the documented native `preToolUse`/`postToolUse` protocol and `failClosed:true`. Subprocess fixtures exercise allow/deny JSON, block/warn/off mode changes, preservation of unrelated hooks, and missing/forged ownership refusal. Native Cursor CLI evidence is recorded below. Cursor GUI discovery/trust and other client versions remain unvalidated; CLI and payload fixtures do not establish those outcomes. The shared Git/worktree and MCP boundaries have separate automated coverage.
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
The 2026-10-20 adoption pass reran the isolated workflows on macOS / Node 22.23.3: [Codex CLI 0.163.0-alpha.10.2](validation/2026-10-20-adoption-codex.json) and [Claude Code 2.1.301](validation/2026-10-20-adoption-claude.json) passed native editing, renewable mutex execution, failed verification/retry, integration and ownership release. Claude also passed the separate [unavailable-guard denial](validation/2026-10-20-adoption-hook-failure.json).
|
|
50
51
|
|
|
51
52
|
The [first Codex attempt](validation/2026-10-20-adoption-codex-first-attempt.json) stopped after its mutex call without completing the fixture; the runner correctly marked it failed despite the client exiting zero. Its cause was not established. A diagnostic rerun passed and now records redacted outcome fields without raw tool arguments/results. Keep the incomplete attempt visible: model-driven validation can vary, and one successful rerun does not explain an earlier incomplete workflow.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
On 2026-10-20, macOS / Node 22.23.3, [Cursor CLI 2026.10.19-6bbf2c4](validation/2026-10-20-cursor-cli.json) passed the real model workflow with an inherited session: native peer-edit denial, worktree editing, edit reporting, renewable command supervision, failed verification/retry, integration and released claims. A temporary wrapper forwarded the exact generated guard and recorded only path/exit status; native editor events and repository state were also checked. The separate [unavailable-guard check](validation/2026-10-20-cursor-hook-unavailable.json) passed: one native edit attempt was denied and the marker stayed absent. Raw capability-bearing transcripts were not saved.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## Native Windows
|
|
59
|
+
|
|
60
|
+
Version 0.1.1 has real `windows-latest` SDK/Node/Git workflow evidence on [Node 22.13.0](validation/2026-10-20-windows-node-22.13.0.json) and [Node 24](validation/2026-10-20-windows-node-24.json). These checks use two actual MCP server processes, not path mocks: owned sessions and refused theft/overlap, native and Git-style paths, literal bracket filenames, internal/escaping directory junctions, separate worktrees, port leases, dirty-preview refusal, failed verification/retry, integration, killed-owner recovery with a new capability, unchanged-state offline inspection, generated Node-based MCP startup and conservative uninstall. Git's configured checkout line endings are respected; failed verification must preserve the source's exact existing bytes. The installed package is tested from a fresh npm cache: source pushes use a packed archive, while matching release tags install the exact public registry version. The separate [Windows workflow](../.github/workflows/windows.yml) runs on pushes/PRs and retains redacted JSON; it also checks damaged-state refusal without replacing state or losing work.
|
|
61
|
+
|
|
62
|
+
This is **partial native Windows support**, included in npm `kith-coord@0.1.1`. `kith_run_with_mutex` refuses before execution or lease/guard acquisition because its cleanup guarantee needs POSIX process groups. Native shell hooks/shims are refused during setup before writes; use `kith init --mcp-only` or WSL for the full workflow. `doctor` reports the platform limitation and exits nonzero. This does not certify a Windows model-driven client or GUI; the native Cursor runs above are on macOS. Windows backup files are flushed before client writes, but Node cannot flush directory entries there, so setup-ledger durability across sudden power loss is not promised.
|
|
63
|
+
|
|
64
|
+
## External real-task report: Claude Code and OpenCode
|
|
65
|
+
|
|
66
|
+
On 2026-10-21, [AgentScrum's maintainer reported](https://github.com/KoalaLyfestyle/AgentScrum/issues/39#issuecomment-6306658975) a trial of published `kith-coord@0.1.1` on macOS Darwin 27.0.0, Node 24.21.0 and Git 2.54.0, with Claude Code 2.1.305 and OpenCode 2.0.32 (DeepSeek V4.1 Flash). OpenCode used a manually written local MCP config; all 13 tools loaded. An overlapping claim on `src/services/scrum.ts` was refused, then accepted after the first agent completed. The maintainer reported both actual fixes integrated with verification passing (145 tests on the combined trial branch). [PR #42](https://github.com/KoalaLyfestyle/AgentScrum/pull/42) and [PR #43](https://github.com/KoalaLyfestyle/AgentScrum/pull/43) were subsequently merged into their `main`, after rebuilding PR branches to remove inherited setup and prior-task commits.
|
|
67
|
+
|
|
68
|
+
This is an attributed external workflow report for those versions, not a controlled native OpenCode certification. It exposed oversized status/edit responses, token visibility in client logs, launcher PATH differences and friction adapting integration branches to independent PRs. See [workflow guidance](usage.md). No OpenCode init adapter or new client trust/permissions configuration is implied.
|
package/docs/integrations.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Client integrations
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install Kith persistently or build and link the checkout first. On macOS/Linux, generated configurations use the `kith` executable already on PATH; they do not download an unverified package at hook execution time.
|
|
4
4
|
|
|
5
5
|
| Selection | Files and behavior |
|
|
6
6
|
| --- | --- |
|
|
@@ -50,7 +50,7 @@ Cursor's native `preToolUse`/`postToolUse` adapter handles `Shell`, `Write` and
|
|
|
50
50
|
|
|
51
51
|
## Diagnose and undo setup
|
|
52
52
|
|
|
53
|
-
`kith doctor` checks Node/Git versions, supported platform, the CLI on PATH, parseable MCP configuration, recorded session environment, guard failure policy and worktree health. It does not execute configured hooks, establish project trust, authenticate clients or prove that a supplied token is valid. Windows is reported
|
|
53
|
+
`kith doctor` checks Node/Git versions, supported platform, the CLI on PATH, parseable MCP configuration, recorded session environment, guard failure policy and worktree health. It does not execute configured hooks, establish project trust, authenticate clients or prove that a supplied token is valid. Native Windows is reported limited: MCP coordination is tested, while supervised mutex commands and shell hooks require macOS/Linux or WSL. A missing/broken check exits nonzero and leaves configuration/state untouched.
|
|
54
54
|
|
|
55
55
|
Before writing selected client files, init persists private original-byte/mode backups in the shared coordination directory's `setup/` subdirectory. Each checkout has its own ledger. An exclusive `setup.lock` serializes cooperative setup/uninstall. A partial write can leave configuration requiring review; original backups remain available. Stop clients and inspect a stale lock before removing it manually. Never delete the ledger as routine cleanup.
|
|
56
56
|
|
|
@@ -64,12 +64,17 @@ Uninstall restores the exact original bytes/permissions or deletes files created
|
|
|
64
64
|
|
|
65
65
|
## Registry installation
|
|
66
66
|
|
|
67
|
-
The package is `kith-coord`, and its binary remains `kith`. Install it persistently (`npm install --global kith-coord@0.1.
|
|
67
|
+
The package is `kith-coord`, and its binary remains `kith`. Install it persistently (`npm install --global kith-coord@0.1.2`) before `kith init`, because generated configurations launch `kith` on PATH. Invoking init through npx alone does not create that persistent executable.
|
|
68
68
|
|
|
69
69
|
An MCP client can instead use a pinned registry launcher without a global install:
|
|
70
70
|
|
|
71
71
|
```json
|
|
72
|
-
{"mcpServers":{"kith":{"command":"npx","args":["--yes","--package","kith-coord@0.1.
|
|
72
|
+
{"mcpServers":{"kith":{"command":"npx","args":["--yes","--package","kith-coord@0.1.2","kith","mcp","--repo","/absolute/checkout"]}}}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Use a version you have verified; the unrelated npm package named `kith` is not Kith's distribution. Hook commands still need their configured executable to remain available. The clean-package smoke check exercises the installed binary, library, supervised worker and actual MCP discovery/status in a separate consumer.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
## Native Windows setup
|
|
79
|
+
|
|
80
|
+
Version 0.1.1 generates MCP configuration using the current absolute Node executable and built CLI path, avoiding `.cmd` launcher/shell quoting. Use `kith init --mcp-only` and review the generated paths; rerun setup if the Node/Kith installation moves. Native Windows setup refuses shell hooks and shims before configuration writes. Supervised mutex commands are also refused. Use WSL for those full workflows. The `npx` example above is a POSIX launcher; do not assume a native Windows client can spawn `npx.cmd` directly. See [platform proof and limits](client-validation.md#native-windows).
|
|
@@ -36,7 +36,7 @@ Existing literal path prefixes are physically resolved before containment checks
|
|
|
36
36
|
|
|
37
37
|
A wildcard can hide a symlink below its literal prefix. When a lexical comparison is disjoint, Kith checks relevant filesystem entries in active checkouts and retains exclusion if an alias makes the result uncertain. Scan errors or the 10,000-entry scan bound also retain exclusion. This favors extra conflicts over overlapping access. Release scopes or use narrower literal prefixes to reduce uncertainty.
|
|
38
38
|
|
|
39
|
-
Path checks assume a stable layout during the check/write boundary. They do not provide protection against a hostile process swapping symlinks concurrently, hardlink aliases or clients bypassing Kith. Windows
|
|
39
|
+
Path checks assume a stable layout during the check/write boundary. They do not provide protection against a hostile process swapping symlinks concurrently, hardlink aliases or clients bypassing Kith. Current source exercises native Windows absolute/Git-style concrete paths and internal/escaping directory junctions in the platform workflow. Concrete native Windows file paths accept backslash separators; scope expressions still use the documented forward-slash grammar. Native shell hooks remain unsupported.
|
|
40
40
|
|
|
41
41
|
## Integration and conflicts
|
|
42
42
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"protocolVersion": "1.
|
|
2
|
+
"protocolVersion": "1.1.0",
|
|
3
3
|
"tools": [
|
|
4
4
|
{
|
|
5
5
|
"name": "kith_start_session",
|
|
@@ -361,6 +361,10 @@
|
|
|
361
361
|
},
|
|
362
362
|
"sessionToken": {
|
|
363
363
|
"type": "string"
|
|
364
|
+
},
|
|
365
|
+
"includeContracts": {
|
|
366
|
+
"type": "boolean",
|
|
367
|
+
"description": "Include the full contract registry. Default false keeps frequent status polls compact; contractCount always reports its size."
|
|
364
368
|
}
|
|
365
369
|
},
|
|
366
370
|
"additionalProperties": false,
|
|
@@ -407,7 +411,7 @@
|
|
|
407
411
|
},
|
|
408
412
|
"mergeBranch": {
|
|
409
413
|
"type": "string",
|
|
410
|
-
"description": "
|
|
414
|
+
"description": "Source branch to integrate, not the destination. Defaults to the registered agent branch; destination is the selected repository checkout current branch. Omit for claims-only work without a registered branch."
|
|
411
415
|
},
|
|
412
416
|
"verificationCmd": {
|
|
413
417
|
"type": "string",
|
package/docs/protocol.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
# Kith coordination protocol 1.
|
|
1
|
+
# Kith coordination protocol 1.1
|
|
2
2
|
|
|
3
3
|
Kith is a local ledger for cooperating coding agents. Clients share one repository's coordination state, including across linked Git worktrees. The transport is MCP over stdio (`kith mcp --repo /absolute/checkout`). No hosted service or Kith API key is required. The server process has the user's filesystem and command permissions.
|
|
4
4
|
|
|
5
5
|
## Versioning and schemas
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Protocol 1.1 ships with package 0.1.2. Earlier `kith-coord@0.1.1` reports protocol 1.0 and includes full contracts in MCP status; the compact default and `includeContracts` input below require 0.1.2.
|
|
8
|
+
|
|
9
|
+
`KITH_PROTOCOL_VERSION` and status responses advertise `1.1.0`. Package releases (`kith-coord`, beginning at 0.1.0) and the SQLite storage schema (2) have independent versions. The [tool snapshot](protocol/tools.v1.json) contains all 13 tool names, descriptions and JSON input schemas, exported from an actual MCP `tools/list` response. `pnpm protocol:check` rejects snapshot drift in CI. Update deliberately using `pnpm protocol:export`.
|
|
8
10
|
|
|
9
11
|
For protocol 1.x, existing tool names, required input fields and the ownership/claim semantics below remain compatible. New optional fields/tools and additive result fields use a minor version; compatible repairs use a patch version. Removing tools, adding required inputs or changing ownership semantics requires a major version. Clients should ignore unknown result fields. The snapshot describes inputs; it is not a machine-validated schema for every result or a guarantee of source-level library compatibility.
|
|
10
12
|
|
|
@@ -12,7 +14,7 @@ Successful tool replies place the same JSON object in `structuredContent` and th
|
|
|
12
14
|
|
|
13
15
|
## Sessions and claims
|
|
14
16
|
|
|
15
|
-
- `kith_start_session` or `kith_begin_work` grants a random session capability for a unique `agentId`. The owning MCP connection retains it. Another connection needs the capability to resume that generation; an ID is not authorization. Tokens are returned at grant/resume and must
|
|
17
|
+
- `kith_start_session` or `kith_begin_work` grants a random session capability for a unique `agentId`. The owning MCP connection retains it. Another connection needs the capability to resume that generation; an ID is not authorization. Omit `sessionToken` on subsequent calls on the owning connection. Tokens are returned at grant/resume, so client transcripts can contain capabilities and must stay private. Public status omits capabilities and their hashes.
|
|
16
18
|
- `kith_heartbeat` renews an owned active generation before expiry (five minutes by default). It cannot revive an expired or completed generation. Engine startup may reap expired/dead owners and requeue unfinished tasks. Active supervised command guards remain until shutdown is confirmed.
|
|
17
19
|
- `kith_begin_work` declares an intent and atomically acquires its supported scope claims. An overlapping exclusive claim returns a conflict. Use `isolateWorktree:true`, and edit only the returned `worktree.worktreePath`. Worktrees separate files while claims describe cooperative ownership across checkouts.
|
|
18
20
|
- `kith_check_and_lock_files` acquires file/glob/symbol claims using fencing generations. See [scope rules](path-and-scope-rules.md); unsupported patterns are rejected. Direct filesystem writes and bypassed hooks are outside this protocol's enforcement boundary.
|
|
@@ -22,7 +24,7 @@ Successful tool replies place the same JSON object in `structuredContent` and th
|
|
|
22
24
|
|
|
23
25
|
## Workspace observation and integration
|
|
24
26
|
|
|
25
|
-
`kith_get_status` preserves agents, tasks, locks,
|
|
27
|
+
`kith_get_status` preserves agents, tasks, locks, conflicts, resources, merge queue and quarantine. In protocol 1.1, frequent MCP polls return `contracts:[]`, `contractCount` and `contractsIncluded:false` by default; pass `includeContracts:true` to inspect the full registry. CLI `kith status` and `kith contract list` still include full contract records. Edit reports publish only new or changed contract metadata, retaining unchanged records without repeating them. It adds `protocolVersion`, `mutexWaiters` (ticket order), `commandGuards`, and `workspaces`. Normal status observes active owners; offline inspection also includes retained recorded worktrees. Each workspace reports its path, recorded and actual branch, HEAD, dirty paths (including rename sources), last commit time/age, last heartbeat, lease expiry, availability, and dirty-file overlaps with active peers. `ahead`/`behind` compare against `comparisonBase`, the selected integration checkout's observed HEAD. Commit age is descriptive; an old commit is not evidence of a dead agent. Missing/unreadable workspaces are marked unavailable, not clean. Git observations are sequential snapshots, not a transaction over all files/checkouts.
|
|
26
28
|
|
|
27
29
|
`kith_preview_integrate` requires an owned registered worktree on its recorded branch, committed source changes, and a clean integration target. It reports frozen `sourceHead`/`targetHead`, branch names, `clean`, and exact Git conflict paths. Dirty inputs return `ok:false` and are not checkpointed. Git may write unreachable merge-tree objects, but preview never stages files, advances refs or rewrites worktree contents. Authorization can renew the session and deliver an event delta. A clean preview does not run project verification or guarantee a later integration: inputs can change.
|
|
28
30
|
|
package/docs/reliability.md
CHANGED
|
@@ -33,11 +33,13 @@ These are test scenarios, not universal guarantees. CI coverage and real usage n
|
|
|
33
33
|
|
|
34
34
|
**Bash recovery.** Snapshots skip large files, symlinks, and generated/dependency directories. One snapshot is stored per agent. Overlapping commands can replace snapshots, and a shared-workspace snapshot cannot distinguish a sibling's legitimate concurrent edits from a command's unauthorized edits. The default saves current and pre-command recovery copies without changing workspace bytes. Explicit library callers can opt into `restoreLockedFiles: true` only when they control all writers; restoration is best effort and can restore older bytes. Prefer worktrees. This is not a safe attribution or security mechanism.
|
|
35
35
|
|
|
36
|
+
**Native Windows.** Version 0.1.1 validates MCP claims, worktrees, ports, integration, killed-owner recovery and conservative setup. Supervised mutex commands and shell hooks remain refused; use macOS/Linux or WSL for those guarantees. See [platform evidence](client-validation.md#native-windows). These fixes are included in npm `kith-coord@0.1.1`.
|
|
37
|
+
|
|
36
38
|
**Ports.** A reservation coordinates Kith clients but releases its OS probe socket immediately. Another process can bind the port before your service does. Handle bind failures.
|
|
37
39
|
|
|
38
40
|
**Git.** Integration targets the currently checked-out branch, not a hardcoded main branch. External Git writers can race with integration. Dependency hydration and speculative verification may run project code with your privileges. Verification uses a shared dependency symlink in the staging tree; choose checks that do not mutate shared dependencies. Worktree hydration can copy `.env` files; treat those worktrees as sensitive.
|
|
39
41
|
|
|
40
|
-
**Configuration.** Preflight refuses malformed selected configuration before writes. Private setup backups are persisted before client-file writes; disk failure can still leave partial configuration requiring inspection. Uninstall restores only unchanged recorded writes and preserves user edits, coordination state and the ignore rule. Custom Git hooks and third-party hook managers require manual integration. See [setup recovery](integrations.md#diagnose-and-undo-setup).
|
|
42
|
+
**Configuration.** Preflight refuses malformed selected configuration before writes. Private setup backups are persisted before client-file writes; disk failure can still leave partial configuration requiring inspection. Backup files are flushed on Windows, but Node cannot flush parent directory entries there; setup-ledger survival across sudden power loss is not guaranteed. Uninstall restores only unchanged recorded writes and preserves user edits, coordination state and the ignore rule. Custom Git hooks and third-party hook managers require manual integration. See [setup recovery](integrations.md#diagnose-and-undo-setup).
|
|
41
43
|
|
|
42
44
|
## Recovery
|
|
43
45
|
|
package/docs/roadmap.md
CHANGED
|
@@ -28,7 +28,7 @@ Cursor native hook payload/command fixtures, enforcement modes, private setup ba
|
|
|
28
28
|
|
|
29
29
|
## 5. Public project and release operations
|
|
30
30
|
|
|
31
|
-
The canonical upstream is established. The package identity is `kith-coord` (CLI `kith`); release checks include an actual installed-package MCP consumer. Input schemas and claim/status semantics are recorded under protocol 1.
|
|
31
|
+
The canonical upstream is established. The package identity is `kith-coord` (CLI `kith`); release checks include an actual installed-package MCP consumer. Input schemas and claim/status semantics are recorded under protocol 1.1 with a CI drift check. Maintain registry ownership, maintainer access, security/moderation contacts and the decision process. Private vulnerability reporting is enabled on the canonical upstream. Run the CI matrix on real pull requests. Publish a prerelease only after a packed-package clean-install check, dependency review, documented support matrix, changelog, rollback procedure, and end-to-end demo. Add provenance and automated publishing after ownership and credentials are established.
|
|
32
32
|
|
|
33
33
|
## 6. Adaptability after the core is sound
|
|
34
34
|
|
package/docs/usage.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Recommended: MCP and isolated worktrees
|
|
4
4
|
|
|
5
|
-
Connect through the [MCP-only client setup](integrations.md). Each parallel agent uses its own MCP connection and worktree. No shell exports are needed when using only MCP. The connection retains its granted capability; another connection needs that capability to resume the same ID.
|
|
5
|
+
Connect through the [MCP-only client setup](integrations.md). Each parallel agent uses its own MCP connection and worktree. No shell exports are needed when using only MCP. Omit `sessionToken` on subsequent calls on the same connection; the initial grant reply still contains it, so keep client transcripts private. The connection retains its granted capability; another connection needs that capability to resume the same ID.
|
|
6
6
|
|
|
7
7
|
Call these tools on the same connection:
|
|
8
8
|
|
|
@@ -17,6 +17,14 @@ kith_complete_work {"agentId":"auth-worker","verificationCmd":"pnpm typecheck"
|
|
|
17
17
|
|
|
18
18
|
Use a different ID and nonoverlapping scope for another agent. An overlapping exclusive scope returns a tool error. Commands run with the MCP server permissions and require client approval; their working directory defaults to the registered worktree. Keep the connection open and heartbeat before the default five-minute session expiry. See the runnable [two-client example](../examples/two-agents.mjs).
|
|
19
19
|
|
|
20
|
+
## Keep existing PR branches and checks
|
|
21
|
+
|
|
22
|
+
For independent PRs, create each task's Git worktree from the intended PR base first, connect Kith to that worktree and use a fresh agent ID with `isolateWorktree:false`. Keep the existing PR/review/merge process. Kith-created worktrees branch from the selected integration checkout's current HEAD; they inherit its setup and earlier integrated commits.
|
|
23
|
+
|
|
24
|
+
Successful completion ends the session and retains its worktree. Run owned commands before completing, or start a fresh session for later maintenance. A refused claim can leave an active session without locks; it can retry on the same connection or expire normally. Status `conflicts` describes current detected file conflicts, not a history of refused scope claims.
|
|
25
|
+
|
|
26
|
+
Integration refuses a target with uncommitted or untracked work to preserve it. Commit or preserve those files explicitly, use a clean integration checkout, or keep the existing PR workflow above. Do not blanket-ignore unknown files to silence the guard. The supervised command runner uses the server's permissions, including network access; it is not a sandbox. `verificationCmd` is an explicit shell string; mutex commands use literal argv.
|
|
27
|
+
|
|
20
28
|
## CLI fallback: keep the owning shell alive
|
|
21
29
|
|
|
22
30
|
CLI commands and Claude edit hooks need the same capability environment. Start from one persistent shell, then launch hook clients from it. Separate stateless shell calls do not preserve these exports or the owning shell process.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"client": "cursor",
|
|
3
|
+
"version": "2026.10.19-6bbf2c4",
|
|
4
|
+
"platform": "darwin",
|
|
5
|
+
"node": "v22.23.3",
|
|
6
|
+
"scenarios": [
|
|
7
|
+
{
|
|
8
|
+
"scenario": "isolated",
|
|
9
|
+
"passed": true,
|
|
10
|
+
"tools": [
|
|
11
|
+
"kith_begin_work",
|
|
12
|
+
"kith_start_session",
|
|
13
|
+
"kith_get_status",
|
|
14
|
+
"kith_begin_work",
|
|
15
|
+
"kith_begin_work",
|
|
16
|
+
"kith_record_file_edit",
|
|
17
|
+
"kith_run_with_mutex",
|
|
18
|
+
"kith_complete_work",
|
|
19
|
+
"kith_get_status",
|
|
20
|
+
"kith_complete_work",
|
|
21
|
+
"kith_get_status"
|
|
22
|
+
],
|
|
23
|
+
"hookDenialVerified": true,
|
|
24
|
+
"checks": [
|
|
25
|
+
"protected bytes unchanged",
|
|
26
|
+
"native edit",
|
|
27
|
+
"contract recorded",
|
|
28
|
+
"renewable MCP mutex command",
|
|
29
|
+
"failed verification and successful retry",
|
|
30
|
+
"verified integration",
|
|
31
|
+
"task completed",
|
|
32
|
+
"locks released",
|
|
33
|
+
"inherited owner preserved"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"passed": true
|
|
38
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"client": "cursor",
|
|
3
|
+
"version": "2026.10.19-6bbf2c4",
|
|
4
|
+
"platform": "darwin",
|
|
5
|
+
"node": "v22.23.3",
|
|
6
|
+
"scenarios": [
|
|
7
|
+
{
|
|
8
|
+
"scenario": "hook-failure",
|
|
9
|
+
"passed": true,
|
|
10
|
+
"checks": [
|
|
11
|
+
"native edit attempted once",
|
|
12
|
+
"tool denied",
|
|
13
|
+
"marker absent"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"passed": true
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"platform": "win32",
|
|
3
|
+
"node": "v22.13.0",
|
|
4
|
+
"passed": true,
|
|
5
|
+
"phase": "complete",
|
|
6
|
+
"checks": [
|
|
7
|
+
"owned sessions, refused overlap and refused capability theft",
|
|
8
|
+
"native absolute and Git-style paths, literal brackets, internal/escaping links, isolated worktrees and distinct port leases",
|
|
9
|
+
"unsupported process-group supervision refused without execution or leaked guards",
|
|
10
|
+
"dirty preview refusal, committed preview, failed verification and successful retry/integration",
|
|
11
|
+
"killed MCP owner recovered with new capability and preserved worktree, then integrated",
|
|
12
|
+
"offline inspection preserves original state; tracked MCP setup/uninstall preserves integrated work"
|
|
13
|
+
],
|
|
14
|
+
"git": "git version 2.56.0.windows.2",
|
|
15
|
+
"sourceCommit": "5babcfee7fd8977352f3b58ac9e54fdd45e2ce79",
|
|
16
|
+
"hostedRun": "https://github.com/connorhriley/kith/actions/runs/39408240569"
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"platform": "win32",
|
|
3
|
+
"node": "v24.21.0",
|
|
4
|
+
"passed": true,
|
|
5
|
+
"phase": "complete",
|
|
6
|
+
"checks": [
|
|
7
|
+
"owned sessions, refused overlap and refused capability theft",
|
|
8
|
+
"native absolute and Git-style paths, literal brackets, internal/escaping links, isolated worktrees and distinct port leases",
|
|
9
|
+
"unsupported process-group supervision refused without execution or leaked guards",
|
|
10
|
+
"dirty preview refusal, committed preview, failed verification and successful retry/integration",
|
|
11
|
+
"killed MCP owner recovered with new capability and preserved worktree, then integrated",
|
|
12
|
+
"offline inspection preserves original state; tracked MCP setup/uninstall preserves integrated work"
|
|
13
|
+
],
|
|
14
|
+
"git": "git version 2.56.0.windows.2",
|
|
15
|
+
"sourceCommit": "5babcfee7fd8977352f3b58ac9e54fdd45e2ce79",
|
|
16
|
+
"hostedRun": "https://github.com/connorhriley/kith/actions/runs/39408240569"
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kith-coord",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Local coordination for cooperating coding agents: work claims, isolated worktrees, shared resources, and verified integration without a hosted service.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
|
+
"server.json",
|
|
20
21
|
"README.md",
|
|
21
22
|
"LICENSE",
|
|
22
23
|
"docs",
|
|
@@ -81,5 +82,6 @@
|
|
|
81
82
|
"publishConfig": {
|
|
82
83
|
"access": "public",
|
|
83
84
|
"registry": "https://registry.npmjs.org"
|
|
84
|
-
}
|
|
85
|
+
},
|
|
86
|
+
"mcpName": "io.github.connorhriley/kith"
|
|
85
87
|
}
|
package/server.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.connorhriley/kith",
|
|
4
|
+
"title": "Kith",
|
|
5
|
+
"description": "Coordinate coding agents with work claims, Git worktrees, shared resources and verified integration.",
|
|
6
|
+
"version": "0.1.2",
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "https://github.com/connorhriley/kith",
|
|
9
|
+
"source": "github"
|
|
10
|
+
},
|
|
11
|
+
"websiteUrl": "https://github.com/connorhriley/kith#quick-start",
|
|
12
|
+
"icons": [
|
|
13
|
+
{
|
|
14
|
+
"src": "https://raw.githubusercontent.com/connorhriley/kith/main/assets/brand/avatar.png",
|
|
15
|
+
"mimeType": "image/png",
|
|
16
|
+
"sizes": [
|
|
17
|
+
"256x256"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"packages": [
|
|
22
|
+
{
|
|
23
|
+
"registryType": "npm",
|
|
24
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
25
|
+
"identifier": "kith-coord",
|
|
26
|
+
"version": "0.1.2",
|
|
27
|
+
"runtimeHint": "npx",
|
|
28
|
+
"runtimeArguments": [
|
|
29
|
+
{
|
|
30
|
+
"type": "named",
|
|
31
|
+
"name": "--yes"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"transport": {
|
|
35
|
+
"type": "stdio"
|
|
36
|
+
},
|
|
37
|
+
"packageArguments": [
|
|
38
|
+
{
|
|
39
|
+
"type": "positional",
|
|
40
|
+
"value": "mcp"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"type": "named",
|
|
44
|
+
"name": "--repo",
|
|
45
|
+
"description": "Absolute path to the Git checkout to coordinate. Git 2.38+ and Node 22.13+ (22.x) or 24+ required.",
|
|
46
|
+
"format": "filepath",
|
|
47
|
+
"isRequired": true
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|