kith-coord 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -1
- package/README.md +3 -3
- package/dist/cli/index.js +91 -64
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +80 -59
- package/dist/index.js.map +1 -1
- package/docs/client-validation.md +15 -4
- package/docs/integrations.md +9 -4
- package/docs/path-and-scope-rules.md +1 -1
- package/docs/reliability.md +3 -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 +1 -1
|
@@ -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,19 @@ 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.
|
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.1`) 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.1","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
|
|
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
|
|
|
@@ -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.1",
|
|
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": {
|