@misterhuydo/cairn-mcp 1.37.0 → 1.38.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 +38 -0
- package/dist/cairn-cli.js +82 -79
- package/dist/index.js +77 -74
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -552,6 +552,44 @@ failed on a change that was entirely intended. It now asserts a *ratio*: the pre
|
|
|
552
552
|
stay under half the payload. The invariant was never a particular length, it was that one
|
|
553
553
|
channel stays a preview while the other carries everything.
|
|
554
554
|
|
|
555
|
+
**v1.38.0 adds the other half of the question.** Everything above is retrospective.
|
|
556
|
+
`would_be_lost` asks what a fresh session would not *know*, and every example in it is
|
|
557
|
+
something that already happened. So a restored session inherited the whole of what the
|
|
558
|
+
last one learned and nothing of what it was going to do with it — thorough notes, a
|
|
559
|
+
legible thread, and an agent that still opened with "what now?" to a user who had
|
|
560
|
+
answered that an hour earlier.
|
|
561
|
+
|
|
562
|
+
`cairn_checkpoint` now takes **`next_step`**, carried by exactly the same rules as the
|
|
563
|
+
handoff: the heartbeat copies it forward but never restamps it, it ages against commits,
|
|
564
|
+
and it is delivered in full on restore, directly under the handoff. It asks for the
|
|
565
|
+
*reason* as well as the action, because the action alone already survives in the roadmap
|
|
566
|
+
and the message field — what does not survive is why that action was next rather than the
|
|
567
|
+
alternatives, and an agent that inherits only "run the Windows fixtures" will happily do
|
|
568
|
+
it in the wrong order or redo the deliberation that chose it.
|
|
569
|
+
|
|
570
|
+
Staleness means something sharper on this half. A stale handoff is still *true*: what was
|
|
571
|
+
learned stays learned, and later commits only mean it may be incomplete. A stale next step
|
|
572
|
+
may be actively *false* — commits landing after "next I will run the fixtures" are quite
|
|
573
|
+
often that step being done, so the warning says **verify before acting on it** rather than
|
|
574
|
+
"may be stale". A restored agent acting confidently on a completed instruction is worse
|
|
575
|
+
than one told nothing.
|
|
576
|
+
|
|
577
|
+
The 90% gate now demands both halves, and only the missing one. Asking for a handoff that
|
|
578
|
+
is already current invites it to be rewritten, and a rewrite restamps `at` — which is how
|
|
579
|
+
a thorough answer gets replaced by a hurried one at the worst possible moment.
|
|
580
|
+
|
|
581
|
+
**And when nothing forward is registered anywhere, the gate says so.** If the roadmap has
|
|
582
|
+
no cursor and no open phase, then after the reset there is nothing outside the discarded
|
|
583
|
+
conversation that says what comes next, and the gate suggests registering the phase. This
|
|
584
|
+
is not cairn inferring the plan — that remains the thing it cannot see and must not guess.
|
|
585
|
+
It reports an *observed absence*: the plan points at nothing. Absence is observable,
|
|
586
|
+
content is not, and that distinction is the only reason this arm is allowed to exist. When
|
|
587
|
+
the roadmap cannot be read at all — no index, no sqlite — it stays silent rather than
|
|
588
|
+
claiming a bare plan it never saw, the same honest-absence rule the commit counter uses.
|
|
589
|
+
|
|
590
|
+
The probe is deliberately not the roadmap renderer: it is two cheap queries, run only when
|
|
591
|
+
the gate is actually crossing, so the every-prompt path opens no database at all.
|
|
592
|
+
|
|
555
593
|
It needs no rate limit: it self-extinguishes. The moment the handoff is written the
|
|
556
594
|
demand returns null, and it speaks again only if later commits make that answer stale.
|
|
557
595
|
Crossing is remembered in `.cairn/.handoff-gate` and forgotten when usage drops back
|