kith-coord 0.1.5 → 0.1.7

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.
@@ -20,7 +20,7 @@ Reports contain client/version, platform, scenario outcomes and tool names. Raw
20
20
 
21
21
  ## Hosted checks
22
22
 
23
- The `CI` workflow runs independently on Linux/macOS with Node 22.13.0, current 22 and 24. Each job checks types, process/lifecycle and MCP tests, an installed package consumer, and the two-client worktree demo. JUnit reports are retained even when a test fails. It also supports manual dispatch. Hosted CI does not run paid models or require agent credentials. Run native clients separately after adapter changes and record their exact versions and outcomes here or in the pull request.
23
+ The `CI` workflow runs independently on Linux/macOS with Node 22.13.0, current 22 and 24. Each job checks types, process/lifecycle and MCP tests, an installed package consumer, and the two-client worktree demo. JUnit reports are retained even when a test fails. It also supports manual dispatch. The separate Windows workflow adds two installed-package jobs on Node 22.13.0 and 24, making eight hosted jobs in total. Hosted CI does not run paid models or require agent credentials. Run native clients separately after adapter changes and record their exact versions and outcomes here or in the pull request.
24
24
 
25
25
  ## Recorded native runs
26
26
 
@@ -44,7 +44,7 @@ The 2026-10-20 subtraction pass reran the isolated native workflows on macOS / N
44
44
 
45
45
  ## Cursor adapter coverage
46
46
 
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
+ 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. Editor marketplace discovery and native MCP registration have separate versioned checks below. CLI hook runs do not establish GUI hook behavior or support for other client versions. The shared Git/worktree and MCP boundaries have separate automated coverage.
48
48
 
49
49
 
50
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).
@@ -71,3 +71,17 @@ This is an attributed external workflow report for those versions, not a control
71
71
  ## 2026-10-22 reliability pass
72
72
 
73
73
  Fresh synthetic isolated-worktree checks passed with Claude Code 2.1.301 and Codex CLI 0.163.0-alpha.11.1 on macOS / Node 22.23.3, using existing subscription sign-ins. Both exercised conflicting claim refusal, native edits, a renewable command mutex, failed verification with preserved target, successful repair/retry and released ownership. Claude also verified native hook denial. These are version-specific native checks, separate from the actual Kith project integration and from external adoption. Reports: [Claude](validation/2026-10-22-product-claude.json), [Codex](validation/2026-10-22-product-codex.json).
74
+
75
+
76
+ ## Editor marketplaces and signed-in chats
77
+
78
+ On 2026-10-22, published extension **0.1.4** was installed from each editor's own marketplace in **VS Code 1.143.0** and **Cursor 3.24.18** on macOS. Search, download and installation succeeded without sideloading or a gallery override. Installed payloads matched the released VSIX. Native checks passed activation, MCP registration, Node autodetection with a minimal PATH, read-only observation without database initialization, and byte-for-byte preservation of existing custom/disabled Kith entries and peer configurations. SDK-driven workflows against each installed bundled server separately covered ownership, scope/path refusal, worktrees, resources, verified integration and recovery. [Marketplace report](validation/2026-10-22-editor-marketplaces.json).
79
+
80
+ Separate **signed-in GUI chats** used a disposable invoice task with one discount agent and one tax agent. Both editors refused a tax agent's overlapping discount claim and gave the agents separate worktrees. Each chat implemented its scoped module, reported the edit, ran tests through `kith_run_with_mutex`, and committed. Full verification correctly failed before the other module was integrated; independent Git checks confirmed the target stayed unchanged and the committed worktree was retained.
81
+
82
+ | Editor | Signed-in task result |
83
+ | --- | --- |
84
+ | VS Code 1.143.0 / Copilot | Discount integrated with scoped checks; tax retried through Kith with the full suite. All five tests passed; both sessions completed and no locks remained. An independent `npm test` and scoped Git diff confirmed the result. |
85
+ | Cursor 3.24.18 | Both implementations committed and scoped tests passed. Discount integrated; the account's Agent usage limit blocked the final tax retry. That retry remains pending, with the worktree and commits preserved. This is partial GUI workflow evidence. |
86
+
87
+ [Signed-in chat report](validation/2026-10-22-editor-chats.json). Normal OS Keychain storage and native approval controls were used for these chats; the mock Keychain is only for unsigned disposable host tests. All 15 monitored live client configuration paths remained byte-for-byte unchanged. Only synthetic fixture code and task prompts were used for model-driven work; no API keys were added. Public reports omit credentials and raw capability-bearing transcripts. No production work was changed. These are internal synthetic checks, separate from external user adoption, Windows GUI coverage and later client/extension releases.
@@ -1,6 +1,6 @@
1
1
  # Client integrations
2
2
 
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.
3
+ For CLI-generated configuration, 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
  | --- | --- |
@@ -11,6 +11,12 @@ Install Kith persistently or build and link the checkout first. On macOS/Linux,
11
11
  | `git` | Installs a pre-commit hook only when one does not exist; uses an in-repository Git hooks path and skips external hooks directories |
12
12
  | `shims` | Creates optional `.coord/bin/npm`, `pnpm`, and `yarn` wrappers |
13
13
 
14
+ ## VS Code and Cursor extension
15
+
16
+ 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). Open a trusted local Git checkout with a supported Node installation, then approve the bundled server through the editor's native MCP controls. No global npm install or hand-written MCP entry is required for this path.
17
+
18
+ The extension preserves existing project/global Kith entries and suppresses its duplicate registration when one exists. Other MCP servers, hooks and permissions remain untouched. Custom entries continue to use their configured launcher; installing the extension does not replace it. Use a unique agent ID, pass the original absolute `repository` on each call, and edit only the worktree returned by `kith_begin_work`. The small status view is read-only. See [extension settings](../extensions/editor/README.md) and [recorded native checks](client-validation.md#editor-marketplaces-and-signed-in-chats).
19
+
14
20
  ## Start with MCP
15
21
 
16
22
  Choose global `kith setup` for an existing desktop/user-wide client connection, or project `kith init` for checkout-scoped configuration and instructions. You do not need to run both for the same client. An existing global connection can use `kith init --only agents` to add just project guidance. Configuration changes do not prove native connection or ownership.
@@ -66,12 +72,12 @@ Uninstall restores the exact original bytes/permissions or deletes files created
66
72
 
67
73
  ## Registry installation
68
74
 
69
- The package is `kith-coord`, and its binary remains `kith`. Install it persistently (`npm install --global kith-coord@0.1.5`) before `kith init`, because generated configurations launch `kith` on PATH. Invoking init through npx alone does not create that persistent executable.
75
+ The package is `kith-coord`, and its binary remains `kith`. Install it persistently (`npm install --global kith-coord@0.1.6`) before `kith init`, because generated configurations launch `kith` on PATH. Invoking init through npx alone does not create that persistent executable.
70
76
 
71
77
  An MCP client can instead use a pinned registry launcher without a global install:
72
78
 
73
79
  ```json
74
- {"mcpServers":{"kith":{"command":"npx","args":["--yes","--package","kith-coord@0.1.5","kith","mcp","--repo","/absolute/checkout"]}}}
80
+ {"mcpServers":{"kith":{"command":"npx","args":["--yes","--package","kith-coord@0.1.6","kith","mcp","--repo","/absolute/checkout"]}}}
75
81
  ```
76
82
 
77
83
  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.
@@ -84,6 +90,11 @@ Version 0.1.1 generates MCP configuration using the current absolute Node execut
84
90
 
85
91
  ## Configure detected local clients
86
92
 
93
+ From 0.1.7, `npx --yes --package kith-coord@0.1.7 kith setup /absolute/checkout` is the single setup path. Versions through 0.1.6 need a persistent npm installation first. Setup retains the exact bundled runtime under `~/.local/share/kith/runtimes/`, validates actual MCP discovery without selecting a repository, configures supported detected clients and adds marked project guidance. Clearing the original npx cache does not break its launcher. Repeat setup reuses identical content; upgrades retain prior runtimes so existing processes and configuration backups remain usable. A damaged selected runtime is refused rather than overwritten. Custom launchers remain custom.
94
+
95
+ Retained runtimes are not automatically deleted by uninstall because existing or edited client configurations may still reference them. Global setup outside a Git checkout does not create one whole-machine coordination database. Project guidance joins the existing original-byte setup ledger. An older project schema is refused before changing clients: stop all coordinators and follow the upgrade procedure first.
96
+
97
+
87
98
  `kith setup --dry-run` previews configuration for detected existing clients; omit `--dry-run` to apply it. It works from HOME without creating a project database there. Global Claude Desktop, Claude Code, Codex and Antigravity entries use this installation's Node and CLI paths and can select a different Git repository on each MCP call. No disk-wide scan or shared current-project switch is involved. Clients started inside a Git checkout use that checkout by default. Desktop clients started at `/` or HOME connect without opening a coordinator; their agent supplies an absolute `repository` path for the task.
88
99
 
89
100
  Run `kith setup /absolute/checkout` inside a project to configure its Cursor entry as well. Project entries and explicit `mcp --repo /absolute/checkout` remain pinned to that checkout. Existing hooks and approval settings are untouched. Custom Kith transports or wrappers that cannot be safely recognized are preserved and reported for manual review, with a nonzero exit. Detection/configuration is not proof that a particular GUI client connected; restart or reconnect that client after setup and check its server status. VS Code is not an automatic setup adapter.
@@ -1,5 +1,5 @@
1
1
  {
2
- "protocolVersion": "1.3.0",
2
+ "protocolVersion": "1.5.0",
3
3
  "tools": [
4
4
  {
5
5
  "name": "kith_start_session",
@@ -16,6 +16,12 @@
16
16
  "leaseDurationMs": {
17
17
  "type": "number"
18
18
  },
19
+ "operationKey": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 128,
23
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
24
+ },
19
25
  "repository": {
20
26
  "type": "string",
21
27
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -94,6 +100,12 @@
94
100
  "maximum": 600000,
95
101
  "description": "Wait up to this many milliseconds for the whole scope; default fail-fast, not a FIFO file queue"
96
102
  },
103
+ "operationKey": {
104
+ "type": "string",
105
+ "minLength": 1,
106
+ "maxLength": 128,
107
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
108
+ },
97
109
  "repository": {
98
110
  "type": "string",
99
111
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -124,6 +136,22 @@
124
136
  "client": {
125
137
  "type": "string"
126
138
  },
139
+ "isolateWorktree": {
140
+ "type": "boolean",
141
+ "description": "Recommended: true, giving the claiming agent an isolated Git worktree"
142
+ },
143
+ "waitTimeoutMs": {
144
+ "type": "integer",
145
+ "minimum": 0,
146
+ "maximum": 600000,
147
+ "description": "Wait up to this many milliseconds for a queued task to become unblocked and claimable"
148
+ },
149
+ "operationKey": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 128,
153
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
154
+ },
127
155
  "repository": {
128
156
  "type": "string",
129
157
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -145,6 +173,13 @@
145
173
  "id": {
146
174
  "type": "string"
147
175
  },
176
+ "agentId": {
177
+ "type": "string",
178
+ "description": "Required for operationKey; identifies an already owned session."
179
+ },
180
+ "sessionToken": {
181
+ "type": "string"
182
+ },
148
183
  "title": {
149
184
  "type": "string"
150
185
  },
@@ -166,6 +201,12 @@
166
201
  "type": "string"
167
202
  }
168
203
  },
204
+ "operationKey": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "maxLength": 128,
208
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
209
+ },
169
210
  "repository": {
170
211
  "type": "string",
171
212
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -211,6 +252,12 @@
211
252
  "minimum": 0,
212
253
  "maximum": 600000
213
254
  },
255
+ "operationKey": {
256
+ "type": "string",
257
+ "minLength": 1,
258
+ "maxLength": 128,
259
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
260
+ },
214
261
  "repository": {
215
262
  "type": "string",
216
263
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -242,6 +289,12 @@
242
289
  "content": {
243
290
  "type": "string"
244
291
  },
292
+ "operationKey": {
293
+ "type": "string",
294
+ "minLength": 1,
295
+ "maxLength": 128,
296
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
297
+ },
245
298
  "repository": {
246
299
  "type": "string",
247
300
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -291,6 +344,12 @@
291
344
  "docComment": {
292
345
  "type": "string"
293
346
  },
347
+ "operationKey": {
348
+ "type": "string",
349
+ "minLength": 1,
350
+ "maxLength": 128,
351
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
352
+ },
294
353
  "repository": {
295
354
  "type": "string",
296
355
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -325,6 +384,12 @@
325
384
  "basePort": {
326
385
  "type": "number"
327
386
  },
387
+ "operationKey": {
388
+ "type": "string",
389
+ "minLength": 1,
390
+ "maxLength": 128,
391
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
392
+ },
328
393
  "repository": {
329
394
  "type": "string",
330
395
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -387,6 +452,12 @@
387
452
  "minimum": 1,
388
453
  "maximum": 1048576
389
454
  },
455
+ "operationKey": {
456
+ "type": "string",
457
+ "minLength": 1,
458
+ "maxLength": 128,
459
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
460
+ },
390
461
  "repository": {
391
462
  "type": "string",
392
463
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -448,6 +519,12 @@
448
519
  "minimum": 1,
449
520
  "maximum": 1048576
450
521
  },
522
+ "operationKey": {
523
+ "type": "string",
524
+ "minLength": 1,
525
+ "maxLength": 128,
526
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
527
+ },
451
528
  "repository": {
452
529
  "type": "string",
453
530
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
@@ -474,6 +551,10 @@
474
551
  "sessionToken": {
475
552
  "type": "string"
476
553
  },
554
+ "includeHistory": {
555
+ "type": "boolean",
556
+ "description": "Include completed task history; default false returns current/pending tasks plus completedTaskCount. Lock lease details are always preserved."
557
+ },
477
558
  "includeContracts": {
478
559
  "type": "boolean",
479
560
  "description": "Include the full contract registry. Default false keeps frequent status polls compact; contractCount always reports its size."
@@ -537,6 +618,12 @@
537
618
  "type": "string",
538
619
  "description": "Command to run in speculative merge tree (e.g. \"npm run typecheck\")"
539
620
  },
621
+ "operationKey": {
622
+ "type": "string",
623
+ "minLength": 1,
624
+ "maxLength": 128,
625
+ "description": "Unique client-generated key for this exact mutation. Reuse only to recover its result; never an ownership credential. Retried failures are snapshots; use a new key after repair or backoff."
626
+ },
540
627
  "repository": {
541
628
  "type": "string",
542
629
  "description": "Absolute Git checkout path. Required on global connections without project context. Always use the same original checkout for a task."
package/docs/protocol.md CHANGED
@@ -1,4 +1,4 @@
1
- # Kith coordination protocol 1.3
1
+ # Kith coordination protocol 1.5
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
 
@@ -6,11 +6,11 @@ Kith is a local ledger for cooperating coding agents. Clients share one reposito
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
8
 
9
- `KITH_PROTOCOL_VERSION` and status responses advertise `1.3.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 14 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`.
9
+ `KITH_PROTOCOL_VERSION` and status responses advertise `1.5.0` starting with package 0.1.7; package 0.1.6 advertises `1.4.0`. Package releases (`kith-coord`, beginning at 0.1.0) and the SQLite storage schema (3) have independent versions. The [tool snapshot](protocol/tools.v1.json) contains all 14 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`.
10
10
 
11
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.
12
12
 
13
- Successful tool replies place the same JSON object in `structuredContent` and the first text block. Additional text may contain an advisory event delta. Inspect `isError` and the operation's fields: a computed preview with `clean:false` is a successful observation of a conflict, not permission to integrate. Exceptions are MCP tool errors. Never infer successful work from the client process exit code alone.
13
+ Successful tool replies place the same JSON object in `structuredContent` and the first text block. Additional text may contain an advisory event delta. Inspect `isError` and the operation's fields: a computed preview with `clean:false` is a successful observation of a conflict, not permission to integrate. Operational failures also return `failure` as described below. Malformed arguments, unknown tools and transport/protocol errors still use the MCP SDK error format; do not retry those blindly. Never infer successful work from the client process exit code alone.
14
14
 
15
15
  Protocol 1.2 adds optional `repository` to every tool. A global `kith mcp` connection can route calls independently to absolute Git checkout paths; it creates no project database until a project is selected. A Git checkout in the process/project context supplies a default. Without one, calls must include `repository` and otherwise return a tool error while the connection remains available. Never substitute HOME or a filesystem root. Always keep the original checkout path for a task, even when editing its isolated worktree. Capabilities and commands remain attached to their repository context, and disconnect cleanup covers every opened context. An explicit `mcp --repo` connection retains its pinned checkout and refuses a different repository argument.
16
16
 
@@ -38,8 +38,49 @@ Normal CLI/MCP status opens the engine and may migrate or reap. `kith status --o
38
38
 
39
39
  Preview refuses repositories with configured custom merge drivers because Git can execute their commands during merge-tree. It does not silently substitute a different merge policy. Actual integration can run trusted project code and still needs an appropriate verification command.
40
40
 
41
- ## Protocol 1.3 additions (source builds)
41
+ ## Protocol 1.3 additions (0.1.4)
42
42
 
43
43
  `kith_run_dev_server` launches literal argv with an allocated port in `PORT`/`KITH_PORT` and substitutes `{port}` in arguments. It uses the existing process-group supervisor and permission boundary. Cancellation/disconnect drains execution before cleanup. It is foreground, with a default 60-second deadline and bounded output; longer-lived interactive servers should use `kith dev` in the CLI. No readiness or socket handoff is promised.
44
44
 
45
45
  `kith_begin_work` and `kith_check_and_lock_files` accept optional `waitTimeoutMs` (0–600000). Omitted fields preserve fail-fast behavior. Wait results add `waitedMs` and `waitTimedOut`; timeout keeps the normal conflict payload, with `isError:true`. Cancellation is a request error and never grants a partial claim. No FIFO ordering guarantee is added. The storage schema is unchanged; the published 0.1.3 package still uses protocol 1.2.
46
+
47
+ ## Protocol 1.5: compact context with explicit full details (0.1.7)
48
+
49
+ MCP JSON text omits formatting whitespace without changing its data or literal strings. Contract previews remove database fingerprints while preserving file/symbol/signature, version, breaking status, owner and documentation. A write scope is not a read-dependency filter: previews draw from all scopes and include every breaking contract, even beyond the ordinary 30-record preview size. `publishedContractsComplete` and `publishedContractsOmitted` label omitted ordinary records; `contractDetails` points to `kith_get_status` with `includeContracts:true` for the full original registry. Large sets of critical changes may therefore produce larger replies; Kith does not discard them to meet a token target.
50
+
51
+ Linked-module replies retain every symbol supplied by the already bounded core inspector and preserve `exportsComplete`, `ownershipAvailable`, dirty/unknown state and drift details. `totalSymbolsInFile` is null when the core cannot establish a complete list. File-edit replies retain all changed contracts, the established per-consumer breaking-change fields, removal/conflict details and warnings. Only the advisory text footer groups repeated signatures, retaining each affected file, owner and hop distance together. This grouping never changes the machine-readable `contractReport.breakingChanges` shape.
52
+
53
+ `kith_get_status` defaults to current/pending tasks and reports `completedTaskCount` and `historyIncluded:false`. Its optional `includeHistory:true` returns completed tasks too. All lock records retain their identity, fencing and lease/expiry fields in both modes. `includeContracts:true` continues to return full unmodified registry records. No new tool, dependency or storage migration is introduced.
54
+
55
+ ## Protocol 1.4: keyed retries and operational failures (0.1.6)
56
+
57
+ These additions ship in `kith-coord` 0.1.6. Existing callers can omit the new fields and retain the same ownership requirements.
58
+
59
+ Mutating tools accept an optional client-generated `operationKey` (1–128 characters). Generate a fresh UUID for each logical attempt. After a timeout, resend the **same tool, original checkout, agent ID, key and arguments**. The server stores a reservation before execution and a result afterward in the existing repository database. It never executes the reserved operation a second time. A different tool, checkout or argument set with the same key returns `OPERATION_KEY_REUSED`. Explicit `sessionToken` may be supplied on another connection without changing the request identity.
60
+
61
+ `kith_add_task` accepts optional `agentId` and `sessionToken`; a keyed task addition requires an already owned session. Unkeyed task additions retain their existing behavior. Heartbeats and observations (`kith_get_status`, `kith_preview_integrate`) do not accept operation keys: they must refresh or observe current state on each call.
62
+
63
+ Keyed replies add `operation: { key, state, replayed }`:
64
+
65
+ - `completed`: the original success **or failure** was recorded. A replay returns that historical snapshot, with no new task, command, port allocation, contract update or integration. It does not renew a lease, reacquire a claim, deliver another event delta or establish that the old result is still current. After repairing a failure, use a **new** key for the new attempt.
66
+ - `running`: no result has been recorded and the coordinator process is still alive. `OPERATION_IN_PROGRESS` permits backoff and another read using the **same** key; it never starts another execution. A suspended process is still an owner.
67
+ - `unknown`: the coordinator died before recording a result, or the result could not be saved. `OPERATION_OUTCOME_UNKNOWN` refuses automatic re-execution. Inspect project status, retained worktrees, command output and external side effects. A deliberate new attempt needs a new key after that review.
68
+
69
+ An operation key is not a capability. Replay requires the original session token, retained internally on the owning connection or supplied explicitly on a different connection. A token from a replacement session cannot retrieve the old generation's result. The old capability may read its historical result after expiry/completion, but cannot resume, heartbeat, mutate or release a replacement generation. Raw session tokens are not saved in operation records; initial grant replays reconstruct the token from the caller's proof. If the initial grant response and connection are both lost before the caller receives a capability, possession of the key cannot recover that secret or seize the session. Inspect/recover the retained work after its owner expires.
70
+
71
+ Operational tool errors set `isError:true`, preserve existing fields and add `failure: { code, message, retryable, retryAfterMs? }` to both JSON text and `structuredContent`:
72
+
73
+ | Code | Retryable | Client action |
74
+ | --- | --- | --- |
75
+ | `CLAIM_CONFLICT`, `CLAIM_WAIT_TIMEOUT`, `MUTEX_WAIT_TIMEOUT` | Yes | Back off; use a new key for another attempt. Existing failure snapshots stay unchanged. |
76
+ | `OPERATION_IN_PROGRESS` | Yes | Back off and resend the exact same key/request to recover its result. |
77
+ | `OPERATION_OUTCOME_UNKNOWN` | No | Inspect effects and recovery state; never blindly repeat commands or integration. |
78
+ | `INTEGRATION_FAILED` | No | Read `mergeResult.diagnostics`, inspect/repair the retained source worktree and normal project checks, then use a new key. |
79
+ | `COMMAND_FAILED`, `COMMAND_TIMEOUT`, `COMMAND_OUTPUT_LIMIT`, `CANCELLED` | No | Inspect bounded output and partial effects. Cancellation/deadlines do not undo completed filesystem or external writes. |
80
+ | `SESSION_OWNERSHIP`, `STALE_FENCING_TOKEN` | No | Establish valid current ownership; never bypass a lease or guard. |
81
+ | `OPERATION_KEY_REUSED`, `INVALID_REQUEST` | No | Correct the request; new work needs a new key. |
82
+ | `DATABASE_BUSY`, `STATE_UNAVAILABLE`, `OPERATION_FAILED` | No | Preserve state and diagnose. A generic storage/runtime error may occur after a side effect. |
83
+
84
+ Command execution deadlines/cancellation retain captured bounded `stdout` and `stderr` where available. A computed preview with `clean:false` remains an observation, not a failed command or permission to integrate. Task-queue polling with `claimed:false` remains a successful observation of no eligible task.
85
+
86
+ Reservations/results survive process restarts, including a lost response after completion. Records are not automatically expired or pruned: forgetting a key would allow a later retry to execute again. They include private command output/diagnostics; protect and preserve the complete `.coord` recovery set. This is at-most-once execution for a retained key under coordinator process failures, **not exactly-once external effects**, command rollback or a guarantee across power loss, damaged/lost storage or manually discarded history. Stop older clients before upgrading schema 2 to 3. The additive transaction preserves existing sessions, claims and command guards; older binaries reject schema 3 instead of dropping the journal. Offline observation accepts schemas 2 and 3 without migrating the original.
@@ -64,7 +64,7 @@ The SQLite implementation requires Node's unflagged SQLite API: [Node SQLite doc
64
64
 
65
65
  ## Existing databases
66
66
 
67
- No full-text SQLite extension is required. Contracts, tasks, locks and supervised commands use the canonical tables on every supported runtime. Older derived `contracts_fts` tables are left intact but are no longer read or maintained. Stop all clients before upgrading. Do not mix versions or rely on downgrading to an older search index after new contract writes. No schema reset, new tables or automatic repair are involved.
67
+ No full-text SQLite extension is required. Contracts, tasks, locks and supervised commands use the canonical tables on every supported runtime. Older derived `contracts_fts` tables are left intact but are no longer read or maintained. Stop all clients before upgrading. Do not mix versions or rely on downgrading to an older search index after new contract writes. Removing the old derived search machinery requires no schema reset or automatic repair. Kith 0.1.6 (protocol 1.4) adds one operation journal table in the same database; see below.
68
68
 
69
69
  ## Paths, scopes and merge boundaries
70
70
 
@@ -85,3 +85,25 @@ Passive CLI/menu observations use Git status and available file mtimes. They do
85
85
  The radar groups differing paths by checkout. **Active Kith lease** means a recorded active session with an unexpired lease, not proof of a live writer. **Retained** means its recorded sessions are completed, idle, dead or expired; it is not permission to delete the checkout. **No Kith session** means outside activity is unknown. **Ownership unavailable** means the preserved coordination snapshot could not be read; inspect `kith status --offline` or `kith recover` in that checkout. Reads never renew or reap owners. Git change counts exclude ignored files and say nothing about unpushed commits or whether cleanup is safe.
86
86
 
87
87
  The menu's path count is a review list before integration, not an urgency score or a count of colliding agents. Identical dirty copies are excluded. A path shown under several checkouts need not differ between every pair. Recorded owners are not attributed as file writers. Review the worktree copies and run normal verification through the owning session before integration; preserve unfinished work in retained checkouts.
88
+
89
+ ## Retrying timed-out MCP mutations
90
+
91
+ Kith 0.1.6 (protocol 1.4) supports optional [operation keys and structured failures](protocol.md#protocol-14-keyed-retries-and-operational-failures-016). Reusing a key returns the original recorded result, including failures; it never repeats the mutation. A live pending owner produces a retryable in-progress response. If the result was lost between a side effect and its database commit, the outcome is unknown and automatic execution is refused. Commands can leave partial effects despite cancellation or deadlines.
92
+
93
+ Replay is capability-protected historical access, not renewed ownership. Old session tokens cannot act on a replacement generation. Lost initial capability grants cannot be recovered with a key alone. Do not erase operation history to make a retry run; inspect effects and retained work before deliberately starting a new attempt. Keep the entire stopped database/sidecar set, because operation history and ownership belong to the same recovery snapshot.
94
+
95
+ Schema 2 to 3 adds the journal transactionally and preserves current ownership, task state, files and process guards. A killed upgrade rolls back and can be retried. Startup refuses a schema-3 database missing its journal or required columns, rather than reconstructing an empty retry history. Stop old clients before upgrading; binaries that only support schema 2 refuse schema 3. Generic storage errors stay non-retryable because they can occur after external work. There are no new services, dependencies, retry daemons or UI controls.
96
+
97
+
98
+ ### Task handoff and cross-repository observations (0.1.7)
99
+
100
+ A queued task's ownership/claims and its worktree handoff commit together. If the handoff fails, task/claim mutations roll back. Any partial filesystem output stays intact for inspection; Kith never deletes it to make a retry succeed. Reusing a saved worktree requires matching Git common-directory identity, branch and exclusive registration, no unfinished tracked/untracked changes, and HEAD matching the selected checkout's HEAD. A moved, dirty or stale checkout is refused for explicit recovery.
101
+
102
+ Cross-repository advice reads explicit local TypeScript/JavaScript path aliases to tracked files in a distinct Git repository. It does not crawl folders or prove runtime compatibility. Status inspects direct aliases; concrete wildcard imports are resolved when recording edits. Inherited/referenced configuration and re-exports defer to your normal compiler and project checks. Source/config reads are capped at 64 KiB, reports at eight linked files/64 symbols and 16 KiB. Replies contain symbol names/kinds/hashes, not source initializers. MCP text replies use compact JSON without dropping fields or changing literal strings; structured responses and safety/recovery details are preserved. Partial exports suppress missing-export verdicts. Unavailable sibling ownership, Git checks or worktrees remain explicitly unavailable; advisory failure does not invalidate a successful work claim.
103
+
104
+ The menu watches a selected workspace and stores recent selections. It does not search your home directory or assume project-folder names. Switching invalidates the old view immediately; late results from an earlier selection are discarded. Task prompts belong to individual Git checkouts, not a workspace parent. Observations never identify nonparticipating writers or authorize cleanup.
105
+
106
+
107
+ ### Compact MCP context (0.1.7)
108
+
109
+ Compact replies preserve actionable context: all breaking contracts, linked exports within the core inspection bounds, changed contract receipts, warnings, failures and recovery instructions. They do not guess read dependencies from write scopes. Only ordinary contract previews are limited; omitted counts and a full-registry retrieval instruction are explicit. The text footer can group repeated signatures while retaining each downstream file/agent/distance relationship; machine-readable breaking alerts retain their established fields. `includeHistory:true` retrieves completed tasks, and lock identity, fencing and expiry remain visible. Savings come from formatting, repeated signatures and internal fingerprints rather than a semantic summarizer. No model calls or extra service are needed.
package/docs/roadmap.md CHANGED
@@ -14,7 +14,7 @@ MCP is the default agent interface. Keep one shared ownership ledger per Git com
14
14
  4. **Followable recovery.** Exercise disconnect, expiry, failed checks, partial setup, interrupted migration and damaged-state refusal. Preserve worktrees and matching stopped database/sidecars; no automatic repair, forced claim release or deletion of `.coord`.
15
15
  5. **Exact release evidence.** Require all six Linux/macOS and both Windows jobs on the candidate, including any editor checks, plus the exact packed-package consumer. Verify registry bytes and tag workflows after publication. Maintain versioned client evidence and honest platform limits.
16
16
 
17
- Published 0.1.4 / protocol 1.3 has recorded clean npm and editor-registry evidence. Version 0.1.5 carries the read-only radar clarity fixes without changing the protocol. Each candidate must pass its own combined core/platform, bundled-server and clean-install gates before publication; a green prior release does not certify a new branch.
17
+ Published 0.1.6 / protocol 1.4 has recorded clean npm and editor-registry evidence, including durable mutation retries and preserved recovery. The current usability pass simplifies activation and read-only feedback without changing ownership, storage schema or the MCP protocol. Each candidate must pass its own combined core/platform, bundled-server and clean-install gates before publication; a green prior release does not certify a new branch.
18
18
 
19
19
  ## Deferred
20
20
 
@@ -0,0 +1,88 @@
1
+ {
2
+ "checkedAt": "2026-10-22T20:58:43.770422+00:00",
3
+ "type": "Signed-in native GUI agent chats on disposable synthetic invoice task; not external adoption or production validation",
4
+ "platform": "macOS",
5
+ "versions": {
6
+ "kithExtension": "0.1.4 from each editor own marketplace",
7
+ "vscode": "1.143.0",
8
+ "cursor": "3.24.18"
9
+ },
10
+ "task": {
11
+ "description": "Implement discount and tax calculations for a synthetic invoice in two independent signed-in chats.",
12
+ "scopes": [
13
+ "src/discount.js",
14
+ "src/tax.js"
15
+ ],
16
+ "scopedVerification": [
17
+ "node --test tests/discount.test.js",
18
+ "node --test tests/tax.test.js"
19
+ ],
20
+ "fullVerification": "npm test",
21
+ "tests": 5
22
+ },
23
+ "results": {
24
+ "vscode": {
25
+ "status": "passed",
26
+ "commits": {
27
+ "main": "f528332e1af5843dc051de486412aa0ea862b5cc",
28
+ "kith/vscode-discount": "5183d9db42c03be38eedd0a9b039e4ea19de4988",
29
+ "kith/vscode-tax": "1b4d2f5862e234653b689448bea54e2cd87171ca"
30
+ },
31
+ "targetClean": true,
32
+ "conflictingClaimRefused": true,
33
+ "isolatedWorktrees": true,
34
+ "scopedTestsViaMutexPassed": true,
35
+ "failedFullVerificationPreservedTargetAndWork": true,
36
+ "bothChangesIntegrated": true,
37
+ "fullSuitePassed": true,
38
+ "agents": [
39
+ {
40
+ "id": "vscode-discount",
41
+ "statusAtCheck": "completed"
42
+ },
43
+ {
44
+ "id": "vscode-tax",
45
+ "statusAtCheck": "completed"
46
+ }
47
+ ],
48
+ "failedVerificationTargetUnchanged": true
49
+ },
50
+ "cursor": {
51
+ "status": "pending_client_usage",
52
+ "commits": {
53
+ "main": "a47ce3ee9f2c8a9a5bc3c32e219ad9ec84870da3",
54
+ "kith/cursor-discount": "db8b4b2b312ed2d7a88f0823f1ec0a9af72f0016",
55
+ "kith/cursor-tax": "92ca13b7a30b0a5f74517797e8561f735705ad7e"
56
+ },
57
+ "targetClean": true,
58
+ "conflictingClaimRefused": true,
59
+ "isolatedWorktrees": true,
60
+ "scopedTestsViaMutexPassed": true,
61
+ "failedFullVerificationPreservedTargetAndWork": true,
62
+ "bothChangesIntegrated": false,
63
+ "fullSuitePassed": false,
64
+ "agents": [
65
+ {
66
+ "id": "cursor-discount",
67
+ "statusAtCheck": "completed"
68
+ },
69
+ {
70
+ "id": "cursor-tax",
71
+ "statusAtCheck": "active"
72
+ }
73
+ ],
74
+ "failedVerificationTargetUnchanged": true
75
+ }
76
+ },
77
+ "clientConfigs": {
78
+ "monitoredPaths": 15,
79
+ "byteIdentical": true
80
+ },
81
+ "sourceChanges": false,
82
+ "boundaries": [
83
+ "Normal OS Keychain and native tool approvals; no mock Keychain for signed-in chats.",
84
+ "No private source, credentials or capability-bearing transcripts published.",
85
+ "Cursor final retry remains pending by user choice after account usage exhaustion.",
86
+ "Internal synthetic validation, not external adoption or production coverage."
87
+ ]
88
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "checkedAt": "2026-10-22T20:37:24.745310+00:00",
3
+ "type": "internal synthetic marketplace and native host validation",
4
+ "extensionVersion": "0.1.4",
5
+ "extensionSource": "70e44620d4e24c488f2f6020809a9ccd67b1ae00",
6
+ "passed": true,
7
+ "results": [
8
+ {
9
+ "editor": "vscode",
10
+ "appVersion": "1.143.0",
11
+ "vscodeApiVersion": "1.143.0",
12
+ "extensionVersion": "0.1.4",
13
+ "search": {
14
+ "editor": "vscode",
15
+ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery",
16
+ "query": "kith",
17
+ "searchRank": 1,
18
+ "extensionId": "Kith-coord.kith",
19
+ "version": "0.1.4",
20
+ "checkedAt": "2026-10-22T20:27:15.575204+00:00"
21
+ },
22
+ "marketplaceIdInstallPassed": true,
23
+ "nativeActivationPassed": true,
24
+ "nativeMcpRegistration": "Bundled Kith offered through VS Code MCP. VS Code manages server approval and start status.",
25
+ "nodeAutodetectionWithMinimalPathPassed": true,
26
+ "existingConfigurationPreservedByteForByte": true,
27
+ "duplicateRegistrationSuppressed": true,
28
+ "readOnlyObservationCreatesNoCoordinationState": true,
29
+ "installedPayloadMatchesValidatedRelease": true,
30
+ "installedWorkflowPassed": true,
31
+ "workflowChecks": [
32
+ "owned sessions, refused overlap and refused capability theft",
33
+ "native absolute and Git-style paths, literal brackets, internal/escaping links, isolated worktrees and distinct port leases",
34
+ "dirty preview refusal, committed preview, failed verification and successful retry/integration",
35
+ "killed MCP owner recovered with new capability and preserved worktree, then integrated",
36
+ "offline inspection preserves original state; tracked MCP setup/uninstall preserves integrated work",
37
+ "global client connects at filesystem root, routes two projects independently and refuses cross-project capability reuse",
38
+ "automatic setup preserves peer configuration, binds native launcher from filesystem root and restores original bytes",
39
+ "damaged state refused without replacing database, creating client config or losing integrated work"
40
+ ]
41
+ },
42
+ {
43
+ "editor": "cursor",
44
+ "appVersion": "3.24.18",
45
+ "vscodeApiVersion": "1.128.0",
46
+ "extensionVersion": "0.1.4",
47
+ "search": {
48
+ "editor": "cursor",
49
+ "serviceUrl": "https://marketplace.cursorapi.com/_apis/public/gallery/extensionquery",
50
+ "query": "kith",
51
+ "searchRank": 1,
52
+ "extensionId": "kith-coord.kith",
53
+ "version": "0.1.4",
54
+ "checkedAt": "2026-10-22T20:27:16.859036+00:00"
55
+ },
56
+ "marketplaceIdInstallPassed": true,
57
+ "nativeActivationPassed": true,
58
+ "nativeMcpRegistration": "Bundled Kith offered through Cursor MCP. Cursor manages server approval and start status.",
59
+ "nodeAutodetectionWithMinimalPathPassed": true,
60
+ "existingConfigurationPreservedByteForByte": true,
61
+ "duplicateRegistrationSuppressed": true,
62
+ "readOnlyObservationCreatesNoCoordinationState": true,
63
+ "installedPayloadMatchesValidatedRelease": true,
64
+ "installedWorkflowPassed": true,
65
+ "workflowChecks": [
66
+ "owned sessions, refused overlap and refused capability theft",
67
+ "native absolute and Git-style paths, literal brackets, internal/escaping links, isolated worktrees and distinct port leases",
68
+ "dirty preview refusal, committed preview, failed verification and successful retry/integration",
69
+ "killed MCP owner recovered with new capability and preserved worktree, then integrated",
70
+ "offline inspection preserves original state; tracked MCP setup/uninstall preserves integrated work",
71
+ "global client connects at filesystem root, routes two projects independently and refuses cross-project capability reuse",
72
+ "automatic setup preserves peer configuration, binds native launcher from filesystem root and restores original bytes",
73
+ "damaged state refused without replacing database, creating client config or losing integrated work"
74
+ ]
75
+ }
76
+ ],
77
+ "liveClientConfigurationPathsChecked": 15,
78
+ "liveClientConfigurationsByteIdentical": true,
79
+ "boundaries": [
80
+ "Native host checks do not sign in or make model calls.",
81
+ "SDK workflows against installed bundled servers are distinct from model-driven GUI chats.",
82
+ "Results apply to recorded versions, not all clients or later extension releases."
83
+ ]
84
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kith-coord",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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": {
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.connorhriley/kith",
4
4
  "title": "Kith",
5
5
  "description": "Coordinate coding agents with work claims, Git worktrees, shared resources and verified integration.",
6
- "version": "0.1.5",
6
+ "version": "0.1.7",
7
7
  "repository": {
8
8
  "url": "https://github.com/connorhriley/kith",
9
9
  "source": "github"
@@ -23,7 +23,7 @@
23
23
  "registryType": "npm",
24
24
  "registryBaseUrl": "https://registry.npmjs.org",
25
25
  "identifier": "kith-coord",
26
- "version": "0.1.5",
26
+ "version": "0.1.7",
27
27
  "runtimeHint": "npx",
28
28
  "runtimeArguments": [
29
29
  {