@misterhuydo/cairn-mcp 1.31.0 → 1.33.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 +34 -14
- package/dist/cairn-cli.js +65 -65
- package/dist/index.js +41 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -374,23 +374,43 @@ is least reason to speak. Bytes survive now only as a fallback for when no usage
|
|
|
374
374
|
record is reachable, and when that happens the line says so instead of dressing a
|
|
375
375
|
file size up as a token count.
|
|
376
376
|
|
|
377
|
-
**
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
377
|
+
**There is no threshold, and since v1.33.0 there is deliberately no attempt at one.**
|
|
378
|
+
Cairn reports the measured count on every prompt and the *agent* decides whether to
|
|
379
|
+
stop, weighing what is left against how big the work you just asked for is going to be.
|
|
380
|
+
|
|
381
|
+
The reason is that a threshold needs a window, and the window is the one thing cairn
|
|
382
|
+
cannot see. No hook input carries it, the transcript records usage but never a limit,
|
|
383
|
+
and the model id is no help either: a `claude-opus-5[1m]` session writes the base
|
|
384
|
+
`claude-opus-5` into both the transcript's `message.model` and `lastModelUsage` in
|
|
385
|
+
`~/.claude.json`. Three versions tried anyway, each failing differently:
|
|
386
|
+
|
|
387
|
+
| | approach | how it failed |
|
|
388
|
+
|---|---|---|
|
|
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
|
+
| 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
|
+
| 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
|
+
|
|
393
|
+
v1.31.0's false-alarm band could never have been tuned away: any firing point for a
|
|
394
|
+
200k window is a point a 1M session also passes through, so no number serves both.
|
|
395
|
+
|
|
396
|
+
The agent, though, *does* know its window — it is stated in its own system prompt —
|
|
397
|
+
and it is the only party that knows whether the next task is a one-line answer or a
|
|
398
|
+
refactor across thirty files. So cairn hands over what it actually measured and the
|
|
399
|
+
rules for acting on it, and never issues the verdict itself. It is the same division
|
|
400
|
+
of labour as the handoff: cairn demands the judgement and carries it, never computes
|
|
401
|
+
it.
|
|
402
|
+
|
|
403
|
+
That also removes the rate-limiting. The old block was a *verdict*, so repeating it
|
|
404
|
+
was nagging and it had to be shown once per situation; this is a *measurement*, and a
|
|
405
|
+
budget you are only shown once it is nearly spent cannot inform the decision to start
|
|
406
|
+
something. It rides every prompt.
|
|
407
|
+
|
|
408
|
+
`CAIRN_CONTEXT_HINT_TOKENS` no longer gates anything, but if you set it, cairn tells
|
|
409
|
+
the agent when you have passed it rather than ignoring you.
|
|
390
410
|
|
|
391
411
|
Deliberately not built: no full transcript walk (the tail only; a full walk in this
|
|
392
412
|
hot path once froze every terminal in the cockpit for 4.3 seconds), no counting
|
|
393
|
-
subagent spend as main-thread context, no
|
|
413
|
+
subagent spend as main-thread context, no cairn-side verdict about when to stop,
|
|
394
414
|
and no auto-clearing, auto-compacting, or filling the field in on your behalf. Same
|
|
395
415
|
shape as completed-phase detection: detect, surface, confirm with the user, never apply.
|
|
396
416
|
|