kith-coord 0.1.1 → 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.
@@ -60,3 +60,9 @@ On 2026-10-20, macOS / Node 22.23.3, [Cursor CLI 2026.10.19-6bbf2c4](validation/
60
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
61
 
62
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.
@@ -64,12 +64,12 @@ 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.1`) before `kith init`, because generated configurations launch `kith` on PATH. Invoking init through npx alone does not create that persistent executable.
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.1","kith","mcp","--repo","/absolute/checkout"]}}}
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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "protocolVersion": "1.0.0",
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": "If work was done on a worktree/branch, run Speculative Merge Train to integrate it"
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.0
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
- `KITH_PROTOCOL_VERSION` and status responses advertise `1.0.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`.
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 not be logged. Public status omits capabilities and their hashes.
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, contracts, conflicts, resources, merge queue, quarantine and events. 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.
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/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.0 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.
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kith-coord",
3
- "version": "0.1.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
+ }