@misterhuydo/cairn-mcp 1.33.0 → 1.34.0
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/README.md +22 -1
- package/dist/cairn-cli.js +60 -60
- package/dist/index.js +68 -68
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@ No manual steps. The index lives in `.cairn/index.db` inside your project — li
|
|
|
84
84
|
| `cairn_todos` | Scan codebase for TODO/FIXME/HACK comments, add manual items, resolve and list them |
|
|
85
85
|
| `cairn_roadmap` | The active project plan: phases authored in `.cairn/roadmap.md`, with a cursor, dependencies, and auto-pruning of shipped phases into `.cairn/roadmap_completed.md` |
|
|
86
86
|
| `cairn_bundle` | Minified source snapshot (auto-handled by hooks) |
|
|
87
|
-
| `cairn_checkpoint` | Save session state (auto-handled by hooks). At a stopping point, answer `would_be_lost` — the one part that git and the index cannot recover |
|
|
87
|
+
| `cairn_checkpoint` | Save session state (auto-handled by hooks). At a stopping point, answer `would_be_lost` — the one part that git and the index cannot recover. Also takes `context_window`, the one thing cairn cannot measure for itself |
|
|
88
88
|
| `cairn_minify` | Minify a single file on demand (fallback when hooks are not installed) |
|
|
89
89
|
| `cairn_switch` | Switch active project root mid-session (use for maintenance on a sibling service) |
|
|
90
90
|
| `cairn_memo` | Save a preference, decision, or discovery to the project's persistent memory. `action: "reindex"` repairs an index that has lost entries (see below) |
|
|
@@ -389,6 +389,7 @@ and the model id is no help either: a `claude-opus-5[1m]` session writes the bas
|
|
|
389
389
|
| v1.20.0 | fixed 120k tokens | 60% of a 200k window but 12% of a 1M one, so it fired a tenth of the way into a 1M session |
|
|
390
390
|
| v1.31.0 | infer the smallest window that fits the measurement | sound as a lower bound only, so below 196k it assumed 200k — reported **96%** where `/context` said **19%** |
|
|
391
391
|
| v1.32.0 | never guess downward; `CAIRN_CONTEXT_WINDOW` states the truth | nothing could ever set it. `install-hooks` cannot know the window either, so there was no correct value to write — unwritable by construction, and the feature went silently dead |
|
|
392
|
+
| v1.33.0 | report the bare count, let the agent judge | right about *who* decides. But a reader handed a number with no denominator supplies one, and supplies the familiar 200k: an agent at **253,500 of a 1M window** called for a clear, twice, with 74% free |
|
|
392
393
|
|
|
393
394
|
v1.31.0's false-alarm band could never have been tuned away: any firing point for a
|
|
394
395
|
200k window is a point a 1M session also passes through, so no number serves both.
|
|
@@ -400,6 +401,26 @@ rules for acting on it, and never issues the verdict itself. It is the same divi
|
|
|
400
401
|
of labour as the handoff: cairn demands the judgement and carries it, never computes
|
|
401
402
|
it.
|
|
402
403
|
|
|
404
|
+
**Since v1.34.0 the agent also declares the denominator.** Pass `context_window` to
|
|
405
|
+
`cairn_resume` or `cairn_checkpoint` once per project (optionally with
|
|
406
|
+
`context_window_model`), and every reading from then on is scaled:
|
|
407
|
+
|
|
408
|
+
```
|
|
409
|
+
[cairn] Context: 253,500 of 1,000,000 tokens (25%, declared for claude-opus-5[1m]).
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
Until you do, the line carries the raw count and says the window is undeclared, which
|
|
413
|
+
is the honest state — cairn still never invents a denominator. The declared window is
|
|
414
|
+
stored beside the handoff in `session.json` and carried forward by checkpoints that do
|
|
415
|
+
not restate it, so the every-turn heartbeat cannot drop it.
|
|
416
|
+
|
|
417
|
+
This is not `CAIRN_CONTEXT_WINDOW` coming back. That died on *who could ever set it*,
|
|
418
|
+
and the answer turned out to be: the one party that can read it off its own system
|
|
419
|
+
prompt. A declaration can still be wrong — carried into a narrower model's session, say
|
|
420
|
+
— but it is wrong *on screen*, next to the model it claims to be for, and a reading over
|
|
421
|
+
100% is called out as an impossible one rather than an emergency. A stated assumption
|
|
422
|
+
gets corrected; the unstated one that replaced it in v1.33.0 could not be.
|
|
423
|
+
|
|
403
424
|
That also removes the rate-limiting. The old block was a *verdict*, so repeating it
|
|
404
425
|
was nagging and it had to be shown once per situation; this is a *measurement*, and a
|
|
405
426
|
budget you are only shown once it is nearly spent cannot inform the decision to start
|