coord-mcp-server 0.27.1__py3-none-any.whl

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.
@@ -0,0 +1,446 @@
1
+ Metadata-Version: 2.4
2
+ Name: coord-mcp-server
3
+ Version: 0.27.1
4
+ Summary: Coordination service for multi-engineer agent teams (HTTP API + MCP + dashboard)
5
+ Project-URL: Homepage, https://github.com/amittell/coord
6
+ Project-URL: Repository, https://github.com/amittell/coord
7
+ Project-URL: Changelog, https://github.com/amittell/coord/blob/main/CHANGELOG.md
8
+ Project-URL: Issues, https://github.com/amittell/coord/issues
9
+ Project-URL: Documentation, https://github.com/amittell/coord/tree/main/docs
10
+ Author: Alex Mittell
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: agents,claude-code,codex,coordination,cursor,file-locking,mcp,multi-agent
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Classifier: Topic :: Software Development :: Version Control
25
+ Classifier: Typing :: Typed
26
+ Requires-Python: >=3.11
27
+ Requires-Dist: aiosqlite>=0.20.0
28
+ Requires-Dist: fastapi>=0.115.0
29
+ Requires-Dist: httpx>=0.28.0
30
+ Requires-Dist: mcp>=1.2.0
31
+ Requires-Dist: pathspec>=0.12.1
32
+ Requires-Dist: pydantic-settings>=2.14.0
33
+ Requires-Dist: pydantic>=2.13.3
34
+ Requires-Dist: pyyaml>=6.0.2
35
+ Requires-Dist: uvicorn[standard]>=0.45.0
36
+ Provides-Extra: dev
37
+ Requires-Dist: mypy>=2.1.0; extra == 'dev'
38
+ Requires-Dist: pytest-asyncio>=1.4.0; extra == 'dev'
39
+ Requires-Dist: pytest>=9.0.3; extra == 'dev'
40
+ Requires-Dist: ruff>=0.15.15; extra == 'dev'
41
+ Requires-Dist: tree-sitter-go>=0.23.0; extra == 'dev'
42
+ Requires-Dist: tree-sitter-python>=0.23.0; extra == 'dev'
43
+ Requires-Dist: tree-sitter-typescript>=0.23.2; extra == 'dev'
44
+ Requires-Dist: tree-sitter>=0.24.0; extra == 'dev'
45
+ Provides-Extra: symbols
46
+ Requires-Dist: tree-sitter-go>=0.23.0; extra == 'symbols'
47
+ Requires-Dist: tree-sitter-python>=0.23.0; extra == 'symbols'
48
+ Requires-Dist: tree-sitter-typescript>=0.23.2; extra == 'symbols'
49
+ Requires-Dist: tree-sitter>=0.24.0; extra == 'symbols'
50
+ Description-Content-Type: text/markdown
51
+
52
+ # Multi-Agent Team Coordination
53
+
54
+ [![PyPI](https://img.shields.io/pypi/v/coord-mcp-server.svg)](https://pypi.org/project/coord-mcp-server/)
55
+ [![Python versions](https://img.shields.io/pypi/pyversions/coord-mcp-server.svg)](https://pypi.org/project/coord-mcp-server/)
56
+ [![CI](https://github.com/amittell/coord/actions/workflows/ci.yml/badge.svg)](https://github.com/amittell/coord/actions/workflows/ci.yml)
57
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
58
+ [![Container image](https://img.shields.io/badge/ghcr.io-coord-blue)](https://github.com/amittell/coord/pkgs/container/coord)
59
+
60
+ `coord` is a small coordination layer for teams running multiple agent sessions against the same codebase. It gives Claude Code, Codex CLI, and Cursor a shared source of truth for active file/module claims so agents can check, claim, extend, and release work before they step on each other.
61
+
62
+ **This repo IS the coordination service.** You run one instance of it (locally during development, or as a container in whatever infra your team already uses) and point your application repos at it with `coord init`. The application repos you coordinate live elsewhere.
63
+
64
+ The stack is intentionally simple:
65
+
66
+ - FastAPI HTTP API (`coordination.main:app`) for claims, conflicts, ownership config, and dashboard access
67
+ - SQLite storage with WAL enabled
68
+ - MCP stdio bridge (`coord-mcp`) so editor/CLI tools can talk to the service as native tools
69
+ - Shipped as a container image so you can deploy it on any infra that runs containers
70
+ - Integration templates for `CLAUDE.md`, `AGENTS.md`, pre-push hooks, and CI
71
+
72
+ ## Docs
73
+
74
+ - `docs/quickstart.md`: fastest path from clone to first successful claim
75
+ - `docs/getting-started.md`: fuller install + rollout guide
76
+ - `docs/usage-guide.md`: day-to-day workflow for engineers and agent sessions
77
+ - `docs/architecture.md`: component model, request flow, and scaling notes
78
+ - `docs/api-reference.md`: endpoint reference and example payloads
79
+ - `docs/deployment.md`: container contract and operator notes for self-hosting
80
+ - `docs/troubleshooting.md`: common setup and runtime issues
81
+ - `docs/integrations/claude-code.md`: Claude Code-first integration
82
+ - `docs/integrations/codex-cli.md`: Codex CLI integration
83
+ - Cursor users: see `templates/.cursor/mcp.json.example` and the Cursor rule under `templates/.cursor/rules/`
84
+ - [`docs/design/roadmap.md`](./docs/design/roadmap.md): v0.27-v0.30 candidates and future bucket
85
+ - `CHANGELOG.md`: notable changes between versions
86
+
87
+ ## Quickstart
88
+
89
+ From inside a checkout of this repository:
90
+
91
+ ```bash
92
+ python -m venv .venv
93
+ source .venv/bin/activate
94
+ pip install -e ".[dev]"
95
+ coord start --background
96
+ ```
97
+
98
+ `coord start` prints the API URL, dashboard URL, and an `export COORD_AUTH_TOKEN=...` line you can paste into your shell.
99
+
100
+ Useful URLs:
101
+
102
+ - API base: `http://127.0.0.1:8080`
103
+ - readiness: `http://127.0.0.1:8080/readyz`
104
+ - dashboard: `http://127.0.0.1:8080/dashboard`
105
+
106
+ Then, inside the repo you want to coordinate:
107
+
108
+ ```bash
109
+ cd /path/to/your-app
110
+ coord init --tool claude --mode local --yes
111
+ coord doctor
112
+ ```
113
+
114
+ Advanced MCP note:
115
+
116
+ ```bash
117
+ export COORD_API_URL=http://127.0.0.1:8080
118
+ coord-mcp
119
+ ```
120
+
121
+ `coord` is the main product surface:
122
+
123
+ - `coord start`: boot a local coordination service with sane defaults
124
+ - `coord init`: wire the current repo for Claude Code, Codex CLI, or Cursor
125
+ - `coord doctor`: verify the repo wiring and service connectivity
126
+
127
+ `coord-api` and `coord-mcp` still exist for advanced use and compatibility.
128
+
129
+ ## First API Call
130
+
131
+ `coord start` printed an `export COORD_AUTH_TOKEN=...` line. Paste it into your shell, then:
132
+
133
+ ```bash
134
+ curl -X POST http://127.0.0.1:8080/claims \
135
+ -H "Authorization: Bearer $COORD_AUTH_TOKEN" \
136
+ -H "Content-Type: application/json" \
137
+ -d '{
138
+ "engineer": "alex/claude/main",
139
+ "branch": "alex/feature",
140
+ "description": "touching auth module",
141
+ "claims": [{"type": "file", "pattern": "src/auth/**"}],
142
+ "ttl_hours": 4
143
+ }'
144
+ ```
145
+
146
+ `POST /claims` returns:
147
+
148
+ - `200` when claims are created
149
+ - `409` when overlapping active claims exist
150
+ - `400` when scope validation fails
151
+
152
+ `GET /conflicts` returns `safe`, `safe_to_proceed`, `has_conflicts`, and an optional `suggestion`.
153
+
154
+ ## Operator Defaults
155
+
156
+ - Auth is now explicit: set `COORD_AUTH_TOKEN` in normal use.
157
+ - Local unauthenticated mode is possible, but only if you opt in with `COORD_ALLOW_INSECURE_NO_AUTH=true`.
158
+ - `COORD_REPO_ROOT` is optional but strongly recommended when the service can access a checkout of the application repo, because overlap detection is more accurate with `git ls-files`.
159
+
160
+ ## Configuration & secrets
161
+
162
+ `coord init` lays down two kinds of files in the application repo:
163
+
164
+ 1. **Tracked templates** committed to VCS with placeholder values. These tell every MCP client (Claude Code, Codex CLI, Cursor) how to spawn `coord-mcp` and tell agents the coordination protocol. They are safe to share publicly.
165
+ 2. **Gitignored runtime config** under `.coordination/` carrying the real bearer token and repo identifier. Never committed.
166
+
167
+ | Path | Tracked? | What it carries |
168
+ |------|----------|-----------------|
169
+ | `.mcp.json` (Claude Code) | yes (template) | `command = "coord-mcp"` + an `env` block with placeholder `COORD_*` values |
170
+ | `.codex/config.toml` (Codex CLI) | yes (template) | Codex equivalent of the above |
171
+ | `.cursor/mcp.json` (Cursor) | yes (template) | Cursor equivalent of the above |
172
+ | `CLAUDE.md` / `AGENTS.md` | yes | Protocol snippet inside a `coord:begin … coord:end` managed block |
173
+ | `.gitignore` | yes | Managed block adds `/.coordination/` so step 2 stays untracked |
174
+ | `.coordination/config.toml` | **no** (gitignored) | Per-repo coord settings: mode, service URL, ownership file path |
175
+ | `.coordination/local.env` | **no** (gitignored) | Real `COORD_AUTH_TOKEN`, `COORD_API_URL`, `COORD_REPO_ID` |
176
+ | `.coordination/owners.yaml` | **no** (gitignored) | Per-repo ownership rules; upload to the service via `POST /config/ownership` |
177
+ | `.git/hooks/pre-push` | not in repo | Installed by `coord init`; sources `.coordination/local.env` before calling the API |
178
+
179
+ `coord init` patches `.gitignore` with `/.coordination/` automatically, so the whole `.coordination/` directory is excluded from the moment it is created. No additional setup is required to keep secrets out of git history.
180
+
181
+ ### How the template + secret split works at runtime
182
+
183
+ `coord-mcp` is spawned by the editor/CLI with whatever env the tracked MCP registration provides -- usually the placeholder values `set-me`, `example-org/example-repo`, and `http://127.0.0.1:8080`. At startup the wrapper walks up from its working directory (like git looking for `.git/`) until it finds `.coordination/local.env`, then for each `COORD_*` allowlisted key:
184
+
185
+ - if the variable is currently unset, **or** holds one of the documented placeholders, the wrapper overrides it from `local.env`;
186
+ - if the variable already holds a real value (a shell export, or an inline env block in `.mcp.json` with a real token), the explicit value wins.
187
+
188
+ `_headers()` also drops the `Authorization` header when the token is a documented placeholder, so a misconfigured client fails loud with a clean `401` instead of silently leaking a `Bearer set-me` request. The net effect: a tracked `.mcp.json` template can ship placeholder values to a public repo without breaking any working setup, and rotating credentials means editing one file (`.coordination/local.env`) rather than every per-tool MCP registration. See `docs/integrations/claude-code.md` and `docs/integrations/codex-cli.md` for the resolution order in tool-specific terms.
189
+
190
+ ## Sub-file (symbol-level) claims
191
+
192
+ File-level locking scales poorly once 10+ agents work the same repo: hot files (`router.ts`, the schema index, the app shell) are touched by every active branch, so the conflict engine forces agents to serialise even when their actual edits don't overlap. The v0.11 `narrowed` / `coexist` decisions help, but they're reactive -- the requester still hits a `409` first. Coord v0.14 adds symbol-scope claims so two agents editing different functions in the same file coexist by default, with no human-in-the-loop request.
193
+
194
+ Claim `handleLogin` in `auth.ts` from MCP:
195
+
196
+ ```python
197
+ claim_files(
198
+ engineer="alex/claude/main",
199
+ patterns=["src/auth/login.ts"],
200
+ symbols={"src/auth/login.ts": ["handleLogin"]},
201
+ )
202
+ ```
203
+
204
+ Or over HTTP:
205
+
206
+ ```json
207
+ {
208
+ "engineer": "alex/claude/main",
209
+ "claims": [
210
+ {"type": "file", "pattern": "src/auth/login.ts", "symbols": ["handleLogin"]}
211
+ ]
212
+ }
213
+ ```
214
+
215
+ Two automatic decisions kick in when symbols are involved:
216
+
217
+ - **AUTO_COEXIST**: a second symbol claim on the same file with a disjoint symbol set is granted immediately. Both claims live as cooperative partners (`coexists_with` cross-referenced). No `409`, no request filed, audit row `event_type='auto-coexist'`.
218
+ - **AUTO_NARROW**: a symbol claim arriving against an existing narrowable file claim is granted alongside the file claim. The holder's effective scope becomes "the file minus the new partner's symbols"; they get a `pending_requests` notice on their next poll but don't have to act. File claims are `narrowable=true` by default; `shared_file` and `module` claims are not.
219
+
220
+ Symbols only cover the named declarations. Imports and module-level statements still need a file claim. TypeScript is supported in v0.14; Python and Go follow in v0.15. See [./docs/design/sub-file-claims.md](./docs/design/sub-file-claims.md) for the full spec.
221
+
222
+ ### Method-level scope (v0.16)
223
+
224
+ Claim a specific method on a class with the `Parent::child` notation:
225
+
226
+ ```http
227
+ POST /claims
228
+ {
229
+ "engineer": "alex/claude/main",
230
+ "claims": [{
231
+ "type": "file",
232
+ "pattern": "src/auth/router.ts",
233
+ "symbols": ["Router::handleAuth"]
234
+ }]
235
+ }
236
+ ```
237
+
238
+ Two agents on `Router::handleAuth` and `Router::handleLogout` auto-coexist; a claim on the bare `Router` blocks both (and vice versa).
239
+
240
+ ### Recursive nesting (v0.17)
241
+
242
+ The notation is recursive: `"Outer::Inner::method"` works to any depth. A claim on `"Outer"` covers every descendant; a claim on `"Outer::Inner"` covers `"Outer::Inner::*"` but not `"Outer::Other::*"`. Storage is unchanged -- `parent_symbol` carries the ancestor chain joined by `::`, and the conflict engine prefix-matches on the full canonical path. As of v0.19 the TypeScript parser also walks recursively into nested class declarations, so symbol claims on `"Outer::Inner::method"` validate end-to-end for TS files in addition to Python.
243
+
244
+ ### Validation (v0.17)
245
+
246
+ When `COORD_REPO_ROOT` is set the service parses each claimed file and rejects unknown symbols with a hint listing the file's actual symbol set. The MCP wrapper also pre-validates locally before POSTing so typos fail fast without a round-trip; disable with `COORD_DISABLE_CLIENT_VALIDATION=1`.
247
+
248
+ ### Observability (v0.18)
249
+
250
+ The dashboard surfaces a 30-day auto-resolution heatmap per repo so you can see whether sub-file claims are actually saving conflicts. The same series is exposed at `GET /metrics/auto-resolutions?days=30` for external monitoring.
251
+
252
+ - **Hotspot files (v0.20):** the dashboard adds a "Hotspot files (30d)" panel listing the files agents keep `409`'ing on, with a suggested-action chip (split into modules, promote to `shared_file`, or just monitor) based on attempt thresholds. The same series is exposed at `GET /metrics/hotspots?days=30` for external monitoring. Read-only signal for v0.20; auto-promote is queued for v0.21.
253
+
254
+ ### Apply hotspot suggestions (v0.21)
255
+
256
+ The dashboard's "promote to shared_file" / "split into modules" chips now have actionable counterparts. POST to `/metrics/hotspots/promote` with `{action: "shared_file" | "split", pattern}` to write the rule into `owners.yaml`. Idempotent.
257
+
258
+ ### Queue claims instead of bouncing (v0.21)
259
+
260
+ `claim_files` now accepts `wait_seconds`. When the request would `409`, the requester is FIFO-queued behind the holder; on release the next queued requester is auto-granted. Eliminates the retry storm on hot files.
261
+
262
+ ### Hard auto-promote (v0.22)
263
+
264
+ Set `COORD_AUTO_PROMOTE_THRESHOLD=N` (default 0, disabled) to have the conflict pipeline write a `shared_file` rule into `owners.yaml` whenever a file's blocked-claim attempts cross the threshold within the rolling `COORD_AUTO_PROMOTE_WINDOW_DAYS` (default 7). Idempotent; each promotion is recorded as an `auto-promote` `request_event`.
265
+
266
+ ### Queue visibility (v0.22)
267
+
268
+ `GET /requests?queued=true` returns live FIFO queue rows joined with the blocking holder's engineer/pattern -- "who am I waiting on?" without a second query. The `coord-mcp` `my_requests` tool gains a `queued` kwarg passing the same filter through. Dashboard surfaces a "pending queue" panel per repo with depth + head-of-queue waiter.
269
+
270
+ ### Auto-demote (v0.23)
271
+
272
+ Coord-managed shared_files entries (added by hard auto-promote, marked
273
+ with the ``# auto-promoted=DATE`` comment in owners.yaml) are
274
+ auto-removed when their rolling hotspot count stays below
275
+ COORD_AUTO_PROMOTE_THRESHOLD for COORD_AUTO_DEMOTE_WINDOW_DAYS
276
+ (default 14) days. Each removal is recorded as an auto-demote
277
+ request_event. Sweep cadence: COORD_AUTO_DEMOTE_INTERVAL_SEC (default
278
+ 3600). Operator-added entries (no marker) are left alone.
279
+
280
+ ### Cross-process FIFO queue (v0.24)
281
+
282
+ The queue's long-poll now falls back to DB polling when the release
283
+ happens in a different replica than the waiter. Same-process grants
284
+ still wake instantly via the in-memory event registry; cross-process
285
+ grants wake within the poll interval (0.5s). Coord can now be
286
+ deployed multi-replica without losing queued-waiter notifications.
287
+
288
+ ### Permanent shared-file pin (v0.25)
289
+
290
+ Operators can pin a shared_files entry against auto-demote by
291
+ appending ``# coord-managed=permanent`` to its YAML line.
292
+ package-lock.json and the app shell are typical candidates. The
293
+ v0.23 sweep skips any entry carrying this marker even when the
294
+ rolling hotspot count drops to zero. An entry can carry both the
295
+ auto-promoted=DATE and coord-managed=permanent markers (operator
296
+ intent wins).
297
+
298
+ ### Queue priority hints (v0.25)
299
+
300
+ CreateClaimsRequest gains an ``urgency`` field accepting
301
+ low|normal|high|blocking (same vocabulary as v0.9 release-request
302
+ urgency). When combined with wait_seconds, the FIFO queue orders
303
+ by priority DESC then position ASC so blocking work jumps ahead of
304
+ normal traffic. Default normal preserves strict FIFO for legacy
305
+ callers. coord-mcp claim_files accepts urgency as an optional kwarg.
306
+
307
+ ### Subtree auto-promote (v0.26)
308
+
309
+ When COORD_AUTO_PROMOTE_SUBTREE_MIN_FILES (default 3) or more
310
+ auto-promoted files share a directory ancestor, coord writes the
311
+ subtree glob (e.g. ``src/auth/**``) once instead of N individual
312
+ entries. Set to 0 to disable subtree-level promotion.
313
+
314
+ ### Priority age boost (v0.26)
315
+
316
+ A waiting queue entry whose age exceeds
317
+ COORD_QUEUE_AGE_BOOST_SECONDS (default 60s) is treated as one
318
+ priority level higher for pop ordering. Prevents normal/low
319
+ waiters from starving under a steady stream of high/blocking
320
+ entries. Set to 0 to disable.
321
+
322
+ ### Queue cancellation (v0.26)
323
+
324
+ DELETE /requests/{queue_id} marks a waiting queue entry cancelled
325
+ and wakes its in-process long-poll. coord-mcp gets a
326
+ cancel_queue_request(queue_id, engineer=) tool. Useful when an
327
+ agent decides to abandon a wait early.
328
+
329
+ ### Webhook notifications (v0.27)
330
+
331
+ Set COORD_WEBHOOK_URL to the target receiver and the conflict
332
+ pipeline starts POSTing every emitted event (auto-coexist,
333
+ auto-narrow, auto-promote, auto-demote, queue_grant, queue_cancel,
334
+ claim_granted) with an HMAC-SHA256 signature header
335
+ (X-Coord-Signature) verifiable against COORD_WEBHOOK_SECRET. A
336
+ background delivery loop retries on failure with exponential
337
+ backoff capped at COORD_WEBHOOK_MAX_RETRIES (default 5). The
338
+ dashboard's "webhook delivery (24h)" panel surfaces per-event-type
339
+ delivery counts so the operator can see whether the receiver is
340
+ healthy. Filter the event stream with COORD_WEBHOOK_EVENTS
341
+ (comma-separated allowlist; empty = all). Slack and GitHub PR
342
+ adapters are queued for v0.27.x follow-ups.
343
+
344
+ ## Local Assets
345
+
346
+ - `.env.example`: environment variable template
347
+ - `compose.yaml`: local Docker Compose launcher
348
+ - `Makefile`: common install, run, lint, test, and smoke targets
349
+ - `templates/`: files to copy into the application repo you want to coordinate
350
+ - `scripts/completions/`: bash and zsh shell completion scripts for the `coord` CLI. Bash: copy `coord.bash` to `/etc/bash_completion.d/coord` (or `~/.local/share/bash-completion/completions/coord`). Zsh: copy `_coord` to a directory on `$fpath` (for example `/usr/local/share/zsh/site-functions/`) and run `autoload -U compinit && compinit`.
351
+
352
+ ## Repo Integration
353
+
354
+ The easiest path is to use `coord init` in the application repo. For most teams:
355
+
356
+ 1. Start the local service with `coord start` or point at an existing shared service.
357
+ 2. Run `coord init --tool claude --mode local --yes`.
358
+ 3. Run `coord doctor`.
359
+ 4. Refine the generated `.coordination/owners.yaml` and upload it with `POST /config/ownership` if you want stronger ownership guidance.
360
+
361
+ Start with `docs/integrations/claude-code.md` if your team is primarily on Claude Code.
362
+
363
+ ## Environment Variables
364
+
365
+ ### Server (the API process)
366
+
367
+ | Variable | Description |
368
+ |----------|-------------|
369
+ | `COORD_DATABASE_PATH` | SQLite path. Default: `./data/coordination.db` |
370
+ | `COORD_AUTH_TOKEN` | Bearer token required by the HTTP API |
371
+ | `COORD_ALLOW_INSECURE_NO_AUTH` | Only for explicit local/demo mode; default `false` |
372
+ | `COORD_HOST` | Bind host for the API server. Default: `0.0.0.0` |
373
+ | `COORD_PORT` | Bind port for the API server. Default: `8080` |
374
+ | `COORD_LOG_LEVEL` | Uvicorn log level. Default: `info` |
375
+ | `COORD_LOG_JSON` | Set truthy to emit access logs as JSON instead of text. Default: unset |
376
+ | `COORD_REPO_ROOT` | Optional repo path used for accurate overlap checks via `git ls-files` |
377
+ | `COORD_REPO_SCOPE` | Restrict overlap checks (and claim-ratio enforcement) to this subdirectory of `COORD_REPO_ROOT`. Default: unset |
378
+ | `COORD_MAX_CLAIM_FILES` | Max files a single claim may cover. Default: `100` |
379
+ | `COORD_MAX_CLAIM_RATIO` | Max fraction of repo a single claim may cover (skipped in scope mode). Default: `0.2` |
380
+ | `COORD_CLEANUP_INTERVAL_SEC` | Background expiration sweep interval. Default: `900` |
381
+ | `COORD_DEFAULT_TTL_HOURS` | Default TTL for normal claims. Default: `4` |
382
+ | `COORD_SHARED_TTL_HOURS` | TTL for shared-file claims. Default: `2` |
383
+ | `COORD_IDLE_TIMEOUT_SEC` | Session-tagged claims auto-release if the holder has been silent for this many seconds (added in v0.6.0). Set to `0` to disable idle expiration cluster-wide. Default: `1800` |
384
+ | `COORD_REQUEST_TTL_SHORT_SEC` | When a release request is filed, the holder's claim TTL is clamped to `min(remaining, this)` (added in v0.9.0). Forces a near-term decision so a non-responsive holder can't sit on the scope. Default: `300` |
385
+ | `COORD_AUTO_PROMOTE_THRESHOLD` | Hard auto-promote (v0.22): when a file's blocked-claim attempts cross this threshold within `COORD_AUTO_PROMOTE_WINDOW_DAYS`, the conflict pipeline writes a `shared_files` rule into `owners.yaml`. Default: `0` (disabled). |
386
+ | `COORD_AUTO_PROMOTE_WINDOW_DAYS` | Rolling window (days) used by hard auto-promote when counting blocked-claim attempts (v0.22). Default: `7` |
387
+ | `COORD_AUTO_PROMOTE_SUBTREE_MIN_FILES` | Subtree auto-promote (v0.26): when this many auto-promoted files share a directory ancestor, coord writes a single subtree glob (e.g. `src/auth/**`) instead of N leaf entries. Set to `0` to disable subtree-level promotion. Default: `3` |
388
+ | `COORD_AUTO_DEMOTE_INTERVAL_SEC` | Auto-demote sweep cadence (v0.23) for coord-managed `shared_files` entries. Set to `0` to disable the sweep. Default: `3600` |
389
+ | `COORD_AUTO_DEMOTE_WINDOW_DAYS` | Auto-demote window (v0.23): coord-managed `shared_files` entries whose rolling hotspot count stays below `COORD_AUTO_PROMOTE_THRESHOLD` for this many days are removed. Default: `14` |
390
+ | `COORD_QUEUE_AGE_BOOST_SECONDS` | Queue age boost (v0.26): a waiting FIFO queue entry whose age exceeds this is treated as one priority level higher for pop ordering. Set to `0` to disable (strict declared-priority order, the v0.25 behaviour). Default: `60` |
391
+ | `COORD_WEBHOOK_URL` | Webhook receiver (v0.27): when set, every emitted event (auto-coexist, auto-narrow, auto-promote, auto-demote, claim_granted, queue_grant, queue_cancel) is enqueued in `webhook_outbox` and POSTed to this URL with an HMAC signature header. Default: unset (webhook delivery disabled). |
392
+ | `COORD_WEBHOOK_SECRET` | Webhook signing secret (v0.27): HMAC-SHA256 key used to sign the JSON payload. The `X-Coord-Signature` header on every delivery is verifiable against this value. Default: unset (no signature header). |
393
+ | `COORD_WEBHOOK_EVENTS` | Webhook event allowlist (v0.27): comma-separated list of event types to deliver (e.g. `auto-promote,queue_grant`). Empty or unset means "all events". Default: unset |
394
+ | `COORD_WEBHOOK_MAX_RETRIES` | Webhook retry cap (v0.27): the delivery loop retries failed POSTs with exponential backoff and marks the outbox row exhausted after this many attempts. Default: `5` |
395
+ | `COORD_WEBHOOK_RETRY_BACKOFF_SEC` | Webhook retry base delay (v0.27): exponential backoff base in seconds; next retry runs at `backoff * 2**retry_count`. Default: `60` |
396
+ | `COORD_WEBHOOK_DELIVERY_INTERVAL_SEC` | Webhook delivery loop interval (v0.27): how often the background loop scans `webhook_outbox` for due rows. Default: `5` |
397
+ | `COORD_DISABLE_BACKGROUND_CLEANUP` | Set truthy to skip the in-process claim expiration sweep (useful for tests or external schedulers). Default: unset |
398
+ | `COORD_DISABLE_INSTANCE_LOCK` | Set truthy to bypass the advisory `<db>.lock` flock (useful on NFS-backed shared volumes where flock is unreliable). Default: unset |
399
+ | `COORD_LS_FILES_CACHE_TTL_SEC` | TTL for the in-process `git ls-files` cache used during overlap checks. Default: `10` |
400
+ | `COORD_HOME` | Base directory for `coord start` local state (token file and SQLite). Default: `~/.coord` |
401
+ | `COORD_START_READY_TIMEOUT_SEC` | How long `coord start --background` waits for `/readyz` before giving up. Default: `30` |
402
+
403
+ ### MCP / client (set in `.coordination/local.env` or your shell)
404
+
405
+ | Variable | Description |
406
+ |----------|-------------|
407
+ | `COORD_API_URL` | Base URL for the MCP stdio bridge and pre-push hook. Default: `http://127.0.0.1:8080` |
408
+ | `COORD_SERVICE_URL` | Legacy alias for `COORD_API_URL`. Pre-push hook accepts both. |
409
+ | `COORD_TOKEN` | Legacy alias for `COORD_AUTH_TOKEN` accepted by the pre-push hook. |
410
+ | `COORD_REPO_ID` | Repo identifier (e.g. `example-org/example-app`) attached to every claim from this repo (added in v0.3.0). Set automatically by `coord init` from `git remote get-url origin`. |
411
+ | `COORD_SESSION_ID` | Pin a stable session id across coord-mcp restarts (added in v0.5.0). Otherwise coord-mcp generates a fresh 16-char hex id at startup. |
412
+ | `COORD_NO_UPDATE_CHECK` | Set truthy to silence the once-per-24h "update available" stderr line emitted by every `coord` CLI command. Default: unset |
413
+ | `COORD_DISABLE_CLIENT_VALIDATION` | Set to `1` to bypass the MCP wrapper's local symbol pre-validation (v0.17). The server-side validator still runs when `COORD_REPO_ROOT` is set. Default: unset |
414
+
415
+ ## Development
416
+
417
+ ```bash
418
+ make install # create .venv and install dev deps
419
+ make check # ruff + mypy + pytest (~30s) - run before pushing
420
+ make verify # check + docker-smoke (~2min) - full local CI equivalent
421
+ make test-fast # pytest without integration tests - fast inner loop
422
+ make docker-smoke # build image, probe /readyz, stop
423
+ ```
424
+
425
+ To run `make check` automatically before every push, install the shipped hook:
426
+
427
+ ```bash
428
+ ln -sf ../../scripts/git-hooks/pre-push .git/hooks/pre-push
429
+ chmod +x .git/hooks/pre-push
430
+ ```
431
+
432
+ Bypass a specific push with `git push --no-verify` (docs-only changes, etc.).
433
+
434
+ ## Docker
435
+
436
+ ```bash
437
+ docker build -t coordination .
438
+ docker run \
439
+ -e COORD_AUTH_TOKEN=secret \
440
+ -p 8080:8080 \
441
+ coordination
442
+ ```
443
+
444
+ ## License
445
+
446
+ Apache License 2.0. See [`LICENSE`](./LICENSE).
@@ -0,0 +1,37 @@
1
+ coordination/__init__.py,sha256=Uosx7F2tbPFEO7lOoSvoPu30-Q5gvdCOsQxkH4k5gmY,480
2
+ coordination/assets.py,sha256=db7wnS67tj6DhMnJJCcLnS9mi3HLzYB3jJGnIvZykzc,18027
3
+ coordination/cli.py,sha256=pG6hIlYH7ZcpxcAjMilS6J2eYoZa0g_qEb4zqN51a4M,9122
4
+ coordination/cli_doctor.py,sha256=iFnLydB7iwEN8SwcZ0kMjELM6uw47F2aPeEatl95Rsw,23417
5
+ coordination/cli_init.py,sha256=ez7uZkGSWO_gDEsHuvhh4bO963_GpnQIGJfU-P4U_SU,16352
6
+ coordination/cli_ops.py,sha256=_6I3KjeVjV9BP9Fi8M6sYB5SgHpQKzUjguOX3pF323M,14875
7
+ coordination/cli_outbox.py,sha256=xPDuQyDoSndE8ZUwmQFBAOj0OPnuujGpDFWv5WoZJv0,17722
8
+ coordination/cli_shared.py,sha256=yLijLk7_xwuU_w4UnkR9-miRRIZxEK0ZfuUdolOspgI,6052
9
+ coordination/cli_start.py,sha256=9uI-rbrfTv22OFJBorJRoG48jTZBor53yapmuZTfCxM,6270
10
+ coordination/cli_update_notice.py,sha256=AJyCoFf7yzXCwwNIXJBi_2-4OdC2UFU-UeZk9e6K5Qk,3965
11
+ coordination/cli_upgrade.py,sha256=XAmIRgeuwo2U5dyPq5TQgIY_ZFwg5ywQjoTqcmM35pU,6415
12
+ coordination/config.py,sha256=4Fxe9eDr2rtk0l-VaPMhsx-rAOfCt8VysN4MbNdqyQ0,4509
13
+ coordination/dashboard.py,sha256=qh6oNPm8GHAcH8qiFCP5ReYYGKwsaIhzgLHNscIHUMY,51498
14
+ coordination/db.py,sha256=Yw0cF5tFIVo6unfdXKaTIRPKbaKrsxrLcZyffgSQIMY,115911
15
+ coordination/deps.py,sha256=Iq4SLweVkMK3Et_xPLviKOyetwjrTyG-XMNQx00slaI,219
16
+ coordination/engine.py,sha256=e-IFjupZ1qemzVl7kNfYM8s6bnugCjgHLQCBdR7iTiQ,10176
17
+ coordination/logging.py,sha256=xQNCHFxJyzFzX9N7T3XHnZfGxmbzDfhHpUX_UKvgOCQ,4966
18
+ coordination/main.py,sha256=p7xDI7ZUpK-zw9EHpepYnEJeNh2o2v-C9ykQgtdwEWk,25730
19
+ coordination/mcp_server.py,sha256=Qm7eG0WqKo2Q70g_judLQVj8W0d_GC3X0-41X4Sa_7o,40084
20
+ coordination/metrics.py,sha256=GfQp5mRuQl29tlYWsZ5GJ__YgfTaz4BTvy9FU1A3BJI,6228
21
+ coordination/overlap_symbols.py,sha256=IWJTYkhOBntXIqNRYoWaxHAsw0s_EhE4fC_fOMMt2nM,18655
22
+ coordination/ownership.py,sha256=_HKSggYFsCxUAkEXvZD3GvQfLkDtLCJOfNnkSJ0jrbI,21449
23
+ coordination/repo_config.py,sha256=QL__4Xc5Pj03olji6cmYKwbRWtiGf_99_6dWrzOKLXI,1410
24
+ coordination/schemas.py,sha256=hZSXRO13Rmh0phTHZseuwMDWRLEhkKokRR-y5ZV1iqY,10129
25
+ coordination/service.py,sha256=lyCIwcM4M5v941mnB6wYHSHVgx_bkliRMskc0f07ngs,78727
26
+ coordination/symbols/__init__.py,sha256=dmIBkdvCWtAHBemFzP3krIXlOoC81EogyosBrSowRlg,8166
27
+ coordination/symbols/go_regex.py,sha256=veywI-jARyjqGJ3-aERBSxh-E52o1Wtj7_CmSPUBl4U,7006
28
+ coordination/symbols/go_treesitter.py,sha256=l2-0tWna8WGDpJoZoOwYkTUOebnBANTVbjA8dp_r0C0,11793
29
+ coordination/symbols/py_regex.py,sha256=uCw5lZJdiRPKWf6yqHtJmDtnpVMiG-E2DMzyVdPfhtY,12873
30
+ coordination/symbols/py_treesitter.py,sha256=QizVKTGw4v2P9vEIa5O4ZVPXb9VOb3V_gPrWOiFt-LI,13724
31
+ coordination/symbols/ts_regex.py,sha256=7dhGQjDNua1FYAXNmzJeSBQg44fE5eh_9qu7ptyGnkc,17112
32
+ coordination/symbols/ts_treesitter.py,sha256=ilsDqt7nuMudWT8ZOOyY3rf8eI4FbnBl1QQm7-6wLIQ,15069
33
+ coord_mcp_server-0.27.1.dist-info/METADATA,sha256=bK0uAn-ymmxuxZvWanRzxYtnHGOSqNOQUmPnCw4JVM4,26314
34
+ coord_mcp_server-0.27.1.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
35
+ coord_mcp_server-0.27.1.dist-info/entry_points.txt,sha256=0wiIEUr3vS2wh5R3Rtgz4arlX4QU2T1P0EONTpEKtB0,123
36
+ coord_mcp_server-0.27.1.dist-info/licenses/LICENSE,sha256=h4XrKjhq4pb0E2KOPIBwrKpZigoBpqKckuSYkcf8MMA,11284
37
+ coord_mcp_server-0.27.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.30.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ coord = coordination.cli:main
3
+ coord-api = coordination.main:run
4
+ coord-mcp = coordination.mcp_server:main