@vortex-os/base 0.10.0 → 0.12.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.
Files changed (38) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +48 -1
  3. package/bin/vortex.mjs +17 -17
  4. package/dist/{catch-up-KIHTAUPX.js → catch-up-GDDKPZHJ.js} +2 -2
  5. package/dist/chunk-2FVNWW77.js +166 -0
  6. package/dist/chunk-2FVNWW77.js.map +1 -0
  7. package/dist/{chunk-7SNLVGBO.js → chunk-3L5DLEGP.js} +1 -1
  8. package/dist/chunk-3L5DLEGP.js.map +1 -0
  9. package/dist/chunk-EAKDR5B2.js +501 -0
  10. package/dist/chunk-EAKDR5B2.js.map +1 -0
  11. package/dist/chunk-T53UWSTR.js +301 -0
  12. package/dist/chunk-T53UWSTR.js.map +1 -0
  13. package/dist/chunk-UV76ZEDC.js +292 -0
  14. package/dist/chunk-UV76ZEDC.js.map +1 -0
  15. package/dist/failures-PMURLMVB.js +25 -0
  16. package/dist/failures-PMURLMVB.js.map +1 -0
  17. package/dist/guard-IMJR6ET7.js +23 -0
  18. package/dist/guard-IMJR6ET7.js.map +1 -0
  19. package/dist/index.d.ts +425 -3
  20. package/dist/index.js +472 -709
  21. package/dist/index.js.map +1 -1
  22. package/dist/statusline-6KSHISXO.js +36 -0
  23. package/dist/statusline-6KSHISXO.js.map +1 -0
  24. package/dist/{vectorize-RBDBTSTW.js → vectorize-PN4Y7XMO.js} +1 -1
  25. package/dist/vectorize-PN4Y7XMO.js.map +1 -0
  26. package/package.json +1 -1
  27. package/templates/commands/agenda.md +15 -15
  28. package/templates/commands/handoff.md +26 -26
  29. package/templates/commands/resume.md +52 -52
  30. package/templates/config/vortex.json +13 -13
  31. package/templates/manifest.json +2 -2
  32. package/templates/routers/.cursorrules +14 -14
  33. package/templates/routers/AGENTS.md +27 -27
  34. package/templates/routers/AI-RULES.md +3 -1
  35. package/templates/routers/GEMINI.md +16 -16
  36. package/dist/chunk-7SNLVGBO.js.map +0 -1
  37. package/dist/vectorize-RBDBTSTW.js.map +0 -1
  38. /package/dist/{catch-up-KIHTAUPX.js.map → catch-up-GDDKPZHJ.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -179,6 +179,17 @@ interface AutoRecordConfig {
179
179
  * the gap but the agent leaves it for you.
180
180
  */
181
181
  readonly backfill: boolean;
182
+ /**
183
+ * The failure ledger (`data/_failures/`) — the self-improvement loop's
184
+ * evidence store. With this on, the agent records noticed failures
185
+ * (append-only, one file per occurrence) and the session-start report
186
+ * surfaces recurring keys with their escalation-ladder stage (2nd occurrence
187
+ * → the covering rule's gate is mandatory; 3rd+ → propose a deterministic
188
+ * guard — always a proposal, never auto-installed). On by default; off → no
189
+ * recording ritual and no report section ( `vortex failure` still works when
190
+ * invoked explicitly).
191
+ */
192
+ readonly failures: boolean;
182
193
  }
183
194
  /**
184
195
  * One environment label plus the signal that selects it. Rules are evaluated
@@ -2709,6 +2720,78 @@ declare function collectCarryover(repoRoot: string, ignore?: (repoRelPosixPath:
2709
2720
  interrupted: string | null;
2710
2721
  } | null;
2711
2722
 
2723
+ /**
2724
+ * `vortex guard` — deterministic write-time guards, wired as Claude Code hooks.
2725
+ *
2726
+ * `guard write` is a PreToolUse hook for the file-writing tools
2727
+ * (Write / Edit / MultiEdit / NotebookEdit). It reads the hook payload JSON
2728
+ * from stdin and DENIES the call when the NEW text contains a literal control
2729
+ * character (anything below U+0020 except tab/LF/CR, or U+007F) — the
2730
+ * documented repeat-failure class where escape notation was intended but the
2731
+ * raw byte got written into source files.
2732
+ *
2733
+ * Why a hook and not (another) rule: the failure happens precisely when the
2734
+ * model's active context is saturated with the offending bytes, i.e. when
2735
+ * memory-based discipline is weakest. A deterministic check at the write
2736
+ * boundary does not depend on recall. This is the "3rd occurrence → promote to
2737
+ * a deterministic guard" rung of the failure-ledger ladder, shipped as a
2738
+ * framework default because the class has zero legitimate uses in text writes
2739
+ * (escape notation is always available).
2740
+ *
2741
+ * Contract (mirrors the statusline renderer's "never break the host"):
2742
+ * - only the NEW text is scanned (`content`, `new_string`, `edits[].new_string`,
2743
+ * `new_source`) — `old_string` is deliberately NOT scanned, so cleaning an
2744
+ * already-polluted file stays possible;
2745
+ * - a clean payload produces NO output (exit 0) — the normal permission flow
2746
+ * proceeds untouched;
2747
+ * - a malformed payload, an unexpected tool, or any internal error is
2748
+ * FAIL-OPEN: exit 0, no output, never a blocked write from a guard bug.
2749
+ */
2750
+ /** The PreToolUse hook command `vortex init` wires (self-silencing like the session hooks). */
2751
+ declare const GUARD_WRITE_COMMAND = "npx --no-install vortex guard write || exit 0";
2752
+ /** Tool-name matcher for the guard's hook group. */
2753
+ declare const GUARD_WRITE_MATCHER = "Write|Edit|MultiEdit|NotebookEdit";
2754
+ /** A literal control character found in to-be-written text. */
2755
+ interface GuardFinding {
2756
+ /** Which payload field carried it (e.g. `content`, `edits[2].new_string`). */
2757
+ readonly field: string;
2758
+ /** Character offset within that field. */
2759
+ readonly index: number;
2760
+ readonly codePoint: number;
2761
+ }
2762
+ /** First forbidden control character in `text`, or null. */
2763
+ declare function findControlChar(text: string): {
2764
+ index: number;
2765
+ codePoint: number;
2766
+ } | null;
2767
+ /**
2768
+ * Scan a PreToolUse `tool_input` for forbidden control characters in every
2769
+ * NEW-text field. Returns the first finding, or null when clean.
2770
+ */
2771
+ declare function scanToolInput(toolInput: Record<string, unknown>): GuardFinding | null;
2772
+ /** Build the PreToolUse deny JSON for a finding. */
2773
+ declare function buildDenyDecision(finding: GuardFinding): string;
2774
+ /**
2775
+ * Decide on a raw PreToolUse payload. Returns the hook's stdout JSON (a deny
2776
+ * decision) when a forbidden character is found, or null to stay silent
2777
+ * (allow / not applicable / out-of-scope tool / unparseable — fail-open by design).
2778
+ */
2779
+ declare function guardWriteDecision(payloadText: string): string | null;
2780
+ /**
2781
+ * CLI entry — `vortex guard write` (stdin: PreToolUse payload JSON).
2782
+ * Always exits 0: a deny is expressed via the JSON decision on stdout, and
2783
+ * everything else stays silent so the hook's `|| exit 0` wrapper never fires.
2784
+ */
2785
+ declare function runGuardCli(argv: readonly string[], out: (s: string) => void, err: (s: string) => void): Promise<number>;
2786
+ /**
2787
+ * Nearest VortEX instance root at or above `startDir` (marker:
2788
+ * `.agent/vortex.json`), preferring an explicit `VORTEX_REPO_ROOT`, then the
2789
+ * host-provided `CLAUDE_PROJECT_DIR` — each honored only when it actually IS
2790
+ * an instance. Bounded walk; null when nothing matches (not an instance —
2791
+ * the guard still denies, it just has no ledger to count into).
2792
+ */
2793
+ declare function resolveInstanceRoot(startDir: string): string | null;
2794
+
2712
2795
  /**
2713
2796
  * Hook wiring for `/vortex init`: make sure the instance's
2714
2797
  * `.claude/settings.json` registers the VortEX SessionStart / SessionEnd hooks,
@@ -2722,6 +2805,7 @@ declare function collectCarryover(repoRoot: string, ignore?: (repoRelPosixPath:
2722
2805
  */
2723
2806
  declare const SESSION_START_COMMAND = "npx --no-install vortex session-start || exit 0";
2724
2807
  declare const SESSION_END_COMMAND = "npx --no-install vortex session-end || exit 0";
2808
+
2725
2809
  interface HookCommand {
2726
2810
  readonly type: "command";
2727
2811
  readonly command: string;
@@ -2745,7 +2829,7 @@ interface EnsureHooksResult {
2745
2829
  * migrated/de-duplicated in place (empty when nothing changed). Callers should
2746
2830
  * key "did we need to write?" off `alreadyWired`, not the name "added".
2747
2831
  */
2748
- readonly added: readonly ("SessionStart" | "SessionEnd")[];
2832
+ readonly added: readonly string[];
2749
2833
  /** True when nothing changed — every VortEX hook was already present. */
2750
2834
  readonly alreadyWired: boolean;
2751
2835
  }
@@ -2758,8 +2842,16 @@ declare function parseSettings(text: string | null | undefined): ClaudeSettings;
2758
2842
  * Merge the VortEX hooks into an existing settings object WITHOUT mutating the
2759
2843
  * input. A hook event is left untouched if it already references our command
2760
2844
  * (idempotent); otherwise our group is appended alongside any existing groups.
2845
+ *
2846
+ * `opts.guard` additionally wires the PreToolUse control-byte guard
2847
+ * (`vortex guard write`) for the file-writing tools. It is requested by
2848
+ * `vortex init` (instance settings) but NOT by `vortex global-setup`: a
2849
+ * machine-global deny hook would fire in every project on the machine, which
2850
+ * is a stronger default than "the instance opted into VortEX conventions".
2761
2851
  */
2762
- declare function ensureVortexHooks(existing: ClaudeSettings | null | undefined): EnsureHooksResult;
2852
+ declare function ensureVortexHooks(existing: ClaudeSettings | null | undefined, opts?: {
2853
+ readonly guard?: boolean;
2854
+ }): EnsureHooksResult;
2763
2855
  /** Serialize settings the way Claude writes them (2-space, trailing newline). */
2764
2856
  declare function serializeSettings(settings: ClaudeSettings): string;
2765
2857
 
@@ -3263,6 +3355,24 @@ declare function renderSessionStartReport(report: SessionStartHookReport, extras
3263
3355
  readonly uncommitted: number;
3264
3356
  readonly interrupted: string | null;
3265
3357
  };
3358
+ /**
3359
+ * Failure-ledger recurrence warnings (`data/_failures/`, gated by
3360
+ * `autoRecord.failures`): keys with 2+ open occurrences and their
3361
+ * escalation-ladder stage — 2nd occurrence = the covering rule's gate is
3362
+ * mandatory this session; 3rd+ = propose a deterministic guard (proposal
3363
+ * only). Machine-counted so escalation never depends on anyone remembering.
3364
+ */
3365
+ readonly failures?: {
3366
+ readonly warnings: readonly {
3367
+ readonly key: string;
3368
+ readonly count: number;
3369
+ readonly stage: "recorded" | "gate" | "promote";
3370
+ readonly rule: string | null;
3371
+ readonly lastDate: string;
3372
+ }[];
3373
+ readonly totalOpen: number;
3374
+ readonly omitted: number;
3375
+ };
3266
3376
  }): string;
3267
3377
 
3268
3378
  /**
@@ -3334,6 +3444,278 @@ interface CatchUpOptions {
3334
3444
  }
3335
3445
  declare function catchUpSessions(ctx: ModuleContext, opts?: CatchUpOptions): Promise<CatchUpResult>;
3336
3446
 
3447
+ /**
3448
+ * `vortex statusline` — a Claude Code statusLine renderer.
3449
+ *
3450
+ * Claude Code pipes a JSON snapshot of the session (model, context window,
3451
+ * cost, rate limits, workspace) to the configured statusLine command on every
3452
+ * refresh and renders whatever the command prints. This module turns that
3453
+ * snapshot into a colored status bar:
3454
+ *
3455
+ * full (default, 3 lines + a VortEX line inside an instance):
3456
+ * 🧠 Fable 5 │ █ max │ █░░░░░░░░░ 12% · 120K/1M │ 🕐 22:25 │ 💰 $9.22
3457
+ * 5h ██████░░ 75%(2h13m) │ 7d ███████░ 96%(0d8h) │ 📦 cache 98%
3458
+ * 📁 my-project │ ⎇ main 2b0949d │ ⏱ 1h19m │ +78 -38 │ ⧉ 1
3459
+ * 🌀 VortEX v0.11.0 │ last: 2026-06-10_0452-….md
3460
+ *
3461
+ * lite (1 line):
3462
+ * 📁 my-project │ ⎇ main │ 🧠 Fable 5 │ █ max │ ░░░░░░░░ 12% · 120K/1M │ 5h 75% · 7d 96% │ ⧉ 1 │ 🌀 v0.11.0 │ 🕐 22:25
3463
+ *
3464
+ * Design notes:
3465
+ * - Rendering is PURE (`renderStatusline(data, probes, mode)`) — every
3466
+ * environment lookup (git, process list, clock, VortEX instance files) is
3467
+ * collected separately in `collectStatuslineProbes`, so the composition is
3468
+ * unit-testable without a repo or a terminal.
3469
+ * - Reasoning effort is shown as one bar whose height + color encode the
3470
+ * level. Claude Code reports `ultracode` as plain `xhigh` (ultracode is
3471
+ * "xhigh + workflow orchestration"), so when the level reads `xhigh` we
3472
+ * additionally sniff the session transcript for the last `/effort` change
3473
+ * notice — a best-effort heuristic that degrades to showing `xhigh`.
3474
+ * - Every probe is wrapped: a statusline must NEVER throw or block the bar —
3475
+ * on any failure a segment silently falls back to a neutral value.
3476
+ */
3477
+
3478
+ /** The slice of Claude Code's statusLine input JSON this renderer consumes. */
3479
+ interface StatuslineData {
3480
+ readonly modelName: string;
3481
+ /** Reasoning effort level as reported (`effort.level`), or null. */
3482
+ readonly effortLevel: string | null;
3483
+ readonly transcriptPath: string | null;
3484
+ /** Project directory (workspace.current_dir, falling back to cwd). */
3485
+ readonly dir: string | null;
3486
+ readonly contextWindowSize: number;
3487
+ /** Context used, percent — kept as reported (may be fractional). */
3488
+ readonly usedPercentage: number;
3489
+ readonly cacheReadTokens: number;
3490
+ readonly cacheCreationTokens: number;
3491
+ readonly costUsd: number;
3492
+ readonly durationMs: number;
3493
+ readonly linesAdded: number;
3494
+ readonly linesRemoved: number;
3495
+ readonly fiveHourUsedPct: number;
3496
+ readonly fiveHourResetsAt: number;
3497
+ readonly sevenDayUsedPct: number;
3498
+ readonly sevenDayResetsAt: number;
3499
+ }
3500
+ /** Environment lookups the renderer composes in — collected impurely, injected purely. */
3501
+ interface StatuslineProbes {
3502
+ readonly gitBranch: string;
3503
+ readonly gitHash: string;
3504
+ readonly sessionCount: number;
3505
+ /** Set when `dir` is a VortEX instance root; lastWorklog is the newest worklog file name. */
3506
+ readonly vortex: {
3507
+ readonly version: string | null;
3508
+ readonly lastWorklog: string | null;
3509
+ } | null;
3510
+ /** Effort level after the ultracode transcript sniff (null → use data.effortLevel). */
3511
+ readonly effortLevel: string | null;
3512
+ readonly now: Date;
3513
+ }
3514
+ /**
3515
+ * Make a dynamic string safe to put in a single-line ANSI bar: drop control
3516
+ * chars (incl. ESC — no injected sequences/newlines), collapse whitespace, and
3517
+ * truncate long values. The bar must render intact whatever a branch name,
3518
+ * model name, or worklog filename contains.
3519
+ */
3520
+ declare function safeSegment(s: string, max?: number): string;
3521
+ /** Parse Claude Code's statusLine stdin JSON into the fields the bar uses. Never throws on shape — only on non-JSON. */
3522
+ declare function parseStatuslineInput(text: string): StatuslineData;
3523
+ /** One-character effort meter: height + color encode the level (`█✦` for ultracode). */
3524
+ declare function effortMeter(level: string | null): {
3525
+ meter: string;
3526
+ color: string;
3527
+ } | null;
3528
+ /** `7` → `7`, `70_000` → `70K`, `1_200_000` → `1.2M` (token quantities). */
3529
+ declare function formatTokens(t: number): string;
3530
+ /** Window sizes render without a decimal: `200_000` → `200K`, `1_000_000` → `1M`. */
3531
+ declare function formatWindow(t: number): string;
3532
+ /** `█`-filled gauge, `width` cells, floor-scaled so 100% and only 100% fills it. */
3533
+ declare function makeBar(pct: number, width: number): string;
3534
+ /** Compose the status bar. Pure — see `collectStatuslineProbes` for the impure half. */
3535
+ declare function renderStatusline(d: StatuslineData, p: StatuslineProbes, mode?: "full" | "lite"): string;
3536
+ /**
3537
+ * Claude Code reports `ultracode` as `xhigh`; the transcript keeps the last
3538
+ * `/effort` change notice. Read the transcript tail and return the level named
3539
+ * by the LAST such notice, or null. Best-effort by design — a format change
3540
+ * simply degrades the display to `xhigh`.
3541
+ */
3542
+ declare function sniffEffortFromTranscript(transcriptPath: string, maxBytes?: number): string | null;
3543
+ /** Collect every environment lookup the renderer needs for this input. */
3544
+ declare function collectStatuslineProbes(d: StatuslineData, now?: Date): StatuslineProbes;
3545
+ /**
3546
+ * The statusLine command written by `install`.
3547
+ *
3548
+ * The host runs the statusLine command in the session's CURRENT working
3549
+ * directory — which MOVES as the session `cd`s around (measured: the hook cwd
3550
+ * followed the shell into a sibling repo). Anything cwd-relative (bare `npx`
3551
+ * lookup, `./node_modules/...`) therefore silently resolves nothing the moment
3552
+ * the session leaves the project, and the bar just vanishes. So:
3553
+ * - with a local install (`directRoot`): invoke the bin by ABSOLUTE path —
3554
+ * immune to cwd, and ~0.5s faster per refresh than npx (the other observed
3555
+ * disappearing-bar mode: npx latency under load) — with the npx lookup
3556
+ * chained as a fallback for when the repo has moved;
3557
+ * - global-only installs: the npx form alone (cwd-sensitive, but there is no
3558
+ * local path to pin).
3559
+ * Always self-silencing (`|| exit 0`).
3560
+ */
3561
+ declare function statuslineCommand(lite: boolean, directRoot?: string): string;
3562
+ interface StatuslineInstallResult {
3563
+ readonly status: "installed" | "already-ours" | "kept-existing";
3564
+ readonly settingsPath: string;
3565
+ readonly command?: string;
3566
+ /** Present when status is "kept-existing": the command we refused to overwrite. */
3567
+ readonly existing?: string;
3568
+ }
3569
+ /**
3570
+ * Merge `statusLine` into a settings object. NON-DESTRUCTIVE: an existing
3571
+ * statusLine that is not ours is kept (the user owns their bar) unless `force`.
3572
+ * Switching full↔lite of our own command counts as ours and is updated.
3573
+ */
3574
+ declare function ensureStatusline(existing: ClaudeSettings, lite: boolean, force?: boolean, directRoot?: string): {
3575
+ settings: ClaudeSettings;
3576
+ status: StatuslineInstallResult["status"];
3577
+ existing?: string;
3578
+ };
3579
+ /**
3580
+ * Run the statusline CLI. `install` wires `.claude/settings.json` (at
3581
+ * `repoRoot`); anything else renders the bar from stdin JSON. A render must
3582
+ * never break the bar: bad/absent input prints nothing and exits 0.
3583
+ */
3584
+ declare function runStatuslineCli(argv: readonly string[], repoRoot: string, out: (s: string) => void, err: (s: string) => void): Promise<number>;
3585
+
3586
+ /**
3587
+ * Failure ledger (`data/_failures/`) — the evidence store of the
3588
+ * self-improvement loop.
3589
+ *
3590
+ * The problem this solves: behavioral rules live in `data/_memory/`, but a rule
3591
+ * loaded at session start is *passive knowledge* — at action time the model's
3592
+ * active context is full of the task and the rule slips. The documented result
3593
+ * is the same failure recurring despite a registered rule. The fix is not
3594
+ * another rule; it is a LEDGER that makes recurrence countable by a machine,
3595
+ * plus an escalation ladder that turns counts into stronger defenses:
3596
+ *
3597
+ * 1st occurrence → record (append-only file, one per occurrence)
3598
+ * 2nd (rule held) → the rule's write-time gate becomes MANDATORY
3599
+ * 3rd+ → propose promoting to a deterministic guard (hook /
3600
+ * pre-commit / wrapper) — always a PROPOSAL; the user
3601
+ * approves, nothing self-installs
3602
+ *
3603
+ * Design notes:
3604
+ * - One markdown file per occurrence (`YYYY-MM-DD_HHMM-<key>.md`), frontmatter
3605
+ * carries the machine-read fields; the body is for humans. Append-only —
3606
+ * resolving a pattern flips `status` on its entries, never deletes.
3607
+ * - `recurrence_key` is the grouping identity: a stable kebab-case name for
3608
+ * the ROOT CAUSE (e.g. `literal-control-bytes`), not the symptom of the day.
3609
+ * Same cause → same key, that is what makes counting honest.
3610
+ * - Recording is an agent ritual (auto, append-only, one-line note to the
3611
+ * user — AI-RULES "Default behaviors"); deterministic guards may also append
3612
+ * here directly so counting never depends on the failing agent noticing.
3613
+ * - The session-start report surfaces groups at 2+ open occurrences with their
3614
+ * ladder stage, so escalation never depends on human memory either.
3615
+ */
3616
+ /** Directory name under `data/` holding the ledger. */
3617
+ declare const FAILURES_DIR = "_failures";
3618
+ /** Ladder stages by open-occurrence count. */
3619
+ type LadderStage = "recorded" | "gate" | "promote";
3620
+ /** Stage for a given open-occurrence count (1 → recorded, 2 → gate, 3+ → promote). */
3621
+ declare function ladderStage(count: number): LadderStage;
3622
+ /** One ledger entry (one occurrence), as read back from disk. */
3623
+ interface FailureEntry {
3624
+ /** Path relative to the data dir (`_failures/2026-06-11_0210-….md`). */
3625
+ readonly relPath: string;
3626
+ readonly key: string;
3627
+ readonly title: string;
3628
+ readonly signal: string;
3629
+ readonly severity: string;
3630
+ readonly status: "open" | "resolved";
3631
+ /** `YYYY-MM-DD` from frontmatter `created` (falls back to the filename). */
3632
+ readonly date: string;
3633
+ /** Related rule (memory slug) named at record time, or null. */
3634
+ readonly rule: string | null;
3635
+ }
3636
+ /** All occurrences sharing a recurrence key, with the derived ladder stage. */
3637
+ interface FailureGroup {
3638
+ readonly key: string;
3639
+ /** OPEN occurrences only — resolved history no longer escalates. */
3640
+ readonly count: number;
3641
+ readonly stage: LadderStage;
3642
+ readonly lastDate: string;
3643
+ /** First non-null rule named across the group's entries. */
3644
+ readonly rule: string | null;
3645
+ readonly titles: readonly string[];
3646
+ readonly entries: readonly FailureEntry[];
3647
+ }
3648
+ interface FailureScan {
3649
+ /** Open groups, most occurrences first (ties: most recent first). */
3650
+ readonly groups: readonly FailureGroup[];
3651
+ readonly totalOpen: number;
3652
+ readonly totalResolved: number;
3653
+ }
3654
+ interface RecordFailureInput {
3655
+ /** Stable kebab-case root-cause key (`[a-z0-9-]`, 3..64 chars). */
3656
+ readonly key: string;
3657
+ /** One-line description of what happened. */
3658
+ readonly what: string;
3659
+ /** Signal class — free short token; conventional values: user_pushback, tool_error, test_failure, cross_check_miss, guard_denied, self_detected. */
3660
+ readonly signal?: string;
3661
+ /** low | medium | high (free token, those are the conventional values). */
3662
+ readonly severity?: string;
3663
+ /** Memory slug of the rule that already covered this (if any). */
3664
+ readonly rule?: string;
3665
+ /** Evidence pointers (paths, links) — recorded as a list in the body. */
3666
+ readonly evidence?: readonly string[];
3667
+ }
3668
+ interface RecordFailureResult {
3669
+ readonly path: string;
3670
+ readonly relPath: string;
3671
+ readonly key: string;
3672
+ /** Open occurrences for this key AFTER this record (i.e. includes it). */
3673
+ readonly count: number;
3674
+ readonly stage: LadderStage;
3675
+ /** Agent-facing one-liner explaining the ladder consequence of this count. */
3676
+ readonly note: string;
3677
+ }
3678
+ /** Validate a recurrence key: stable kebab-case, filename-safe by construction. */
3679
+ declare function isValidFailureKey(key: string): boolean;
3680
+ /**
3681
+ * Append one occurrence to the ledger. Creates `data/_failures/` on first use.
3682
+ * Never overwrites: a same-minute collision for the same key gets a numeric
3683
+ * suffix. Returns the post-write open count + ladder stage for the key so the
3684
+ * caller (agent) can relay "this is the Nth time" in its one-line note.
3685
+ */
3686
+ declare function recordFailure(dataDir: string, input: RecordFailureInput, now?: Date): Promise<RecordFailureResult>;
3687
+ declare function scanFailures(dataDir: string): Promise<FailureScan>;
3688
+ /** Compact, report-ready view: groups needing attention (2+ open occurrences). */
3689
+ interface FailureReportSlice {
3690
+ readonly warnings: readonly {
3691
+ readonly key: string;
3692
+ readonly count: number;
3693
+ readonly stage: LadderStage;
3694
+ readonly rule: string | null;
3695
+ readonly lastDate: string;
3696
+ }[];
3697
+ readonly totalOpen: number;
3698
+ readonly omitted: number;
3699
+ }
3700
+ /** Slice a scan down to what the session-start report shows (stage gate/promote only, capped). */
3701
+ declare function failureReportSlice(scan: FailureScan): FailureReportSlice;
3702
+ /** The fixed recurrence key for write-guard denials (one failure class → one key). */
3703
+ declare const GUARD_DENIAL_KEY = "literal-control-bytes";
3704
+ /**
3705
+ * Record a write-guard denial into the ledger — called by the guard itself, so
3706
+ * counting NEVER depends on the failing agent noticing and self-reporting
3707
+ * (the documented stall mode of self-report-only ledgers). Best-effort and
3708
+ * silent: returns null when skipped (recent same-incident entry, or any
3709
+ * error) — a ledger problem must never affect the deny itself.
3710
+ */
3711
+ declare function recordGuardDenial(dataDir: string, what: string, now?: Date): Promise<RecordFailureResult | null>;
3712
+ /**
3713
+ * Run the failure-ledger CLI. `record` appends one occurrence and reports the
3714
+ * post-write count + ladder stage (so the agent can relay "Nth time"); `list`
3715
+ * prints the grouped open ledger. Results are JSON on stdout.
3716
+ */
3717
+ declare function runFailureCli(argv: readonly string[], dataDir: string, out: (s: string) => void, err: (s: string) => void): Promise<number>;
3718
+
3337
3719
  interface ReindexResult {
3338
3720
  readonly dir: string;
3339
3721
  readonly status: "written" | "unchanged" | "missing";
@@ -4016,12 +4398,22 @@ type index_d_CurateResult = CurateResult;
4016
4398
  declare const index_d_DEFAULT_GAP_WINDOW_DAYS: typeof DEFAULT_GAP_WINDOW_DAYS;
4017
4399
  type index_d_EnsureHooksResult = EnsureHooksResult;
4018
4400
  type index_d_EnsureWorklogResult = EnsureWorklogResult;
4401
+ declare const index_d_FAILURES_DIR: typeof FAILURES_DIR;
4402
+ type index_d_FailureEntry = FailureEntry;
4403
+ type index_d_FailureGroup = FailureGroup;
4404
+ type index_d_FailureReportSlice = FailureReportSlice;
4405
+ type index_d_FailureScan = FailureScan;
4406
+ declare const index_d_GUARD_DENIAL_KEY: typeof GUARD_DENIAL_KEY;
4407
+ declare const index_d_GUARD_WRITE_COMMAND: typeof GUARD_WRITE_COMMAND;
4408
+ declare const index_d_GUARD_WRITE_MATCHER: typeof GUARD_WRITE_MATCHER;
4019
4409
  type index_d_GitPullResult = GitPullResult;
4410
+ type index_d_GuardFinding = GuardFinding;
4020
4411
  declare const index_d_HANDOFF_ARCHIVE_DIR: typeof HANDOFF_ARCHIVE_DIR;
4021
4412
  declare const index_d_HANDOFF_DIR: typeof HANDOFF_DIR;
4022
4413
  type index_d_HandoffCreateResult = HandoffCreateResult;
4023
4414
  type index_d_HandoffSummary = HandoffSummary;
4024
4415
  type index_d_HandoffWriteResult = HandoffWriteResult;
4416
+ type index_d_LadderStage = LadderStage;
4025
4417
  type index_d_NewDecisionResult = NewDecisionResult;
4026
4418
  declare const index_d_OWNERSHIP_SCHEMA: typeof OWNERSHIP_SCHEMA;
4027
4419
  type index_d_OpenDecision = OpenDecision;
@@ -4031,12 +4423,17 @@ type index_d_OwnershipEntry = OwnershipEntry;
4031
4423
  type index_d_OwnershipManifest = OwnershipManifest;
4032
4424
  type index_d_RecallOptions = RecallOptions;
4033
4425
  type index_d_RecentWorklog = RecentWorklog;
4426
+ type index_d_RecordFailureInput = RecordFailureInput;
4427
+ type index_d_RecordFailureResult = RecordFailureResult;
4034
4428
  type index_d_ReindexResult = ReindexResult;
4035
4429
  type index_d_RitualRegistryOptions = RitualRegistryOptions;
4036
4430
  declare const index_d_SESSION_END_COMMAND: typeof SESSION_END_COMMAND;
4037
4431
  declare const index_d_SESSION_START_COMMAND: typeof SESSION_START_COMMAND;
4038
4432
  type index_d_SessionStartHookReport = SessionStartHookReport;
4039
4433
  type index_d_SessionStartReport = SessionStartReport;
4434
+ type index_d_StatuslineData = StatuslineData;
4435
+ type index_d_StatuslineInstallResult = StatuslineInstallResult;
4436
+ type index_d_StatuslineProbes = StatuslineProbes;
4040
4437
  type index_d_UpdateCheckResult = UpdateCheckResult;
4041
4438
  type index_d_UpdateFileAction = UpdateFileAction;
4042
4439
  type index_d_UpdateFileActionKind = UpdateFileActionKind;
@@ -4055,6 +4452,7 @@ declare const index_d_aggregateHandoff: typeof aggregateHandoff;
4055
4452
  declare const index_d_applyGlobalSetup: typeof applyGlobalSetup;
4056
4453
  declare const index_d_argvToSlash: typeof argvToSlash;
4057
4454
  declare const index_d_autoReindexMemory: typeof autoReindexMemory;
4455
+ declare const index_d_buildDenyDecision: typeof buildDenyDecision;
4058
4456
  declare const index_d_buildInstallCommand: typeof buildInstallCommand;
4059
4457
  declare const index_d_buildOwnershipManifest: typeof buildOwnershipManifest;
4060
4458
  declare const index_d_buildRegistry: typeof buildRegistry;
@@ -4063,6 +4461,7 @@ declare const index_d_checkBaseUpdate: typeof checkBaseUpdate;
4063
4461
  declare const index_d_collectAgenda: typeof collectAgenda;
4064
4462
  declare const index_d_collectCarryover: typeof collectCarryover;
4065
4463
  declare const index_d_collectSessionStartReport: typeof collectSessionStartReport;
4464
+ declare const index_d_collectStatuslineProbes: typeof collectStatuslineProbes;
4066
4465
  declare const index_d_compareSemver: typeof compareSemver;
4067
4466
  declare const index_d_computeCurateFingerprint: typeof computeCurateFingerprint;
4068
4467
  declare const index_d_countUncommitted: typeof countUncommitted;
@@ -4073,53 +4472,76 @@ declare const index_d_curateCommand: typeof curateCommand;
4073
4472
  declare const index_d_decisionCommand: typeof decisionCommand;
4074
4473
  declare const index_d_detectInterruptedGitOp: typeof detectInterruptedGitOp;
4075
4474
  declare const index_d_detectWorklogGaps: typeof detectWorklogGaps;
4475
+ declare const index_d_effortMeter: typeof effortMeter;
4476
+ declare const index_d_ensureStatusline: typeof ensureStatusline;
4076
4477
  declare const index_d_ensureVortexHooks: typeof ensureVortexHooks;
4077
4478
  declare const index_d_ensureWorklogEntry: typeof ensureWorklogEntry;
4078
4479
  declare const index_d_extractNextUp: typeof extractNextUp;
4079
4480
  declare const index_d_extractOpenTasks: typeof extractOpenTasks;
4481
+ declare const index_d_failureReportSlice: typeof failureReportSlice;
4482
+ declare const index_d_findControlChar: typeof findControlChar;
4483
+ declare const index_d_formatTokens: typeof formatTokens;
4484
+ declare const index_d_formatWindow: typeof formatWindow;
4080
4485
  declare const index_d_gapWindowSinceArg: typeof gapWindowSinceArg;
4081
4486
  declare const index_d_globalMemoryPath: typeof globalMemoryPath;
4082
4487
  declare const index_d_globalSettingsHasHook: typeof globalSettingsHasHook;
4083
4488
  declare const index_d_globalSettingsPath: typeof globalSettingsPath;
4084
4489
  declare const index_d_globalStatePath: typeof globalStatePath;
4490
+ declare const index_d_guardWriteDecision: typeof guardWriteDecision;
4085
4491
  declare const index_d_handoffCommand: typeof handoffCommand;
4086
4492
  declare const index_d_inspectGlobalSetup: typeof inspectGlobalSetup;
4087
4493
  declare const index_d_inspectOwnership: typeof inspectOwnership;
4088
4494
  declare const index_d_isInstanceRoot: typeof isInstanceRoot;
4089
4495
  declare const index_d_isNewer: typeof isNewer;
4090
4496
  declare const index_d_isStableUpdate: typeof isStableUpdate;
4497
+ declare const index_d_isValidFailureKey: typeof isValidFailureKey;
4498
+ declare const index_d_ladderStage: typeof ladderStage;
4091
4499
  declare const index_d_logCommand: typeof logCommand;
4500
+ declare const index_d_makeBar: typeof makeBar;
4092
4501
  declare const index_d_ownershipManifestPath: typeof ownershipManifestPath;
4093
4502
  declare const index_d_parseAdoptArgs: typeof parseAdoptArgs;
4094
4503
  declare const index_d_parseSettings: typeof parseSettings;
4504
+ declare const index_d_parseStatuslineInput: typeof parseStatuslineInput;
4095
4505
  declare const index_d_pruneHandoffs: typeof pruneHandoffs;
4096
4506
  declare const index_d_queryNpmLatest: typeof queryNpmLatest;
4097
4507
  declare const index_d_readGlobalInstancePointer: typeof readGlobalInstancePointer;
4098
4508
  declare const index_d_readInstalledBaseVersion: typeof readInstalledBaseVersion;
4099
4509
  declare const index_d_recallCommand: typeof recallCommand;
4510
+ declare const index_d_recordFailure: typeof recordFailure;
4100
4511
  declare const index_d_recordGlobalSetupDecline: typeof recordGlobalSetupDecline;
4512
+ declare const index_d_recordGuardDenial: typeof recordGuardDenial;
4101
4513
  declare const index_d_reindexCommand: typeof reindexCommand;
4102
4514
  declare const index_d_renderAgenda: typeof renderAgenda;
4103
4515
  declare const index_d_renderGlobalBlock: typeof renderGlobalBlock;
4104
4516
  declare const index_d_renderSessionStartReport: typeof renderSessionStartReport;
4517
+ declare const index_d_renderStatusline: typeof renderStatusline;
4105
4518
  declare const index_d_repairOwnershipManifest: typeof repairOwnershipManifest;
4519
+ declare const index_d_resolveInstanceRoot: typeof resolveInstanceRoot;
4106
4520
  declare const index_d_resolveRepoRoot: typeof resolveRepoRoot;
4107
4521
  declare const index_d_runCurateAccept: typeof runCurateAccept;
4108
4522
  declare const index_d_runCurateCandidates: typeof runCurateCandidates;
4109
4523
  declare const index_d_runCurateDecline: typeof runCurateDecline;
4110
4524
  declare const index_d_runCuratePreview: typeof runCuratePreview;
4525
+ declare const index_d_runFailureCli: typeof runFailureCli;
4526
+ declare const index_d_runGuardCli: typeof runGuardCli;
4527
+ declare const index_d_runStatuslineCli: typeof runStatuslineCli;
4111
4528
  declare const index_d_runTemplatesUpdate: typeof runTemplatesUpdate;
4112
4529
  declare const index_d_runVortexCli: typeof runVortexCli;
4530
+ declare const index_d_safeSegment: typeof safeSegment;
4531
+ declare const index_d_scanFailures: typeof scanFailures;
4113
4532
  declare const index_d_scanHandoffs: typeof scanHandoffs;
4533
+ declare const index_d_scanToolInput: typeof scanToolInput;
4114
4534
  declare const index_d_serializeSettings: typeof serializeSettings;
4115
4535
  declare const index_d_sessionStartCommand: typeof sessionStartCommand;
4536
+ declare const index_d_sniffEffortFromTranscript: typeof sniffEffortFromTranscript;
4537
+ declare const index_d_statuslineCommand: typeof statuslineCommand;
4116
4538
  declare const index_d_templateDestRelPath: typeof templateDestRelPath;
4117
4539
  declare const index_d_upsertGlobalBlock: typeof upsertGlobalBlock;
4118
4540
  declare const index_d_validateCuratePayload: typeof validateCuratePayload;
4119
4541
  declare const index_d_vortexCommand: typeof vortexCommand;
4120
4542
  declare const index_d_writeOwnershipManifest: typeof writeOwnershipManifest;
4121
4543
  declare namespace index_d {
4122
- export { type index_d_AgendaReport as AgendaReport, type index_d_AmbientRecallFactoryOptions as AmbientRecallFactoryOptions, type index_d_CatchUpOptions as CatchUpOptions, type index_d_CatchUpResult as CatchUpResult, type index_d_ClaudeSettings as ClaudeSettings, type index_d_CliIo as CliIo, type index_d_CollectAgendaOptions as CollectAgendaOptions, type index_d_CurateAcceptResult as CurateAcceptResult, type index_d_CurateActionKind as CurateActionKind, type index_d_CurateAnyProposal as CurateAnyProposal, type index_d_CurateCandidate as CurateCandidate, type index_d_CurateCandidatesResult as CurateCandidatesResult, type index_d_CurateDeclineResult as CurateDeclineResult, type index_d_CurateOptions as CurateOptions, type index_d_CuratePayload as CuratePayload, type index_d_CuratePayloadValidation as CuratePayloadValidation, type index_d_CuratePreviewResult as CuratePreviewResult, type index_d_CurateResult as CurateResult, index_d_DEFAULT_GAP_WINDOW_DAYS as DEFAULT_GAP_WINDOW_DAYS, type index_d_EnsureHooksResult as EnsureHooksResult, type index_d_EnsureWorklogResult as EnsureWorklogResult, type index_d_GitPullResult as GitPullResult, index_d_HANDOFF_ARCHIVE_DIR as HANDOFF_ARCHIVE_DIR, index_d_HANDOFF_DIR as HANDOFF_DIR, type index_d_HandoffCreateResult as HandoffCreateResult, type index_d_HandoffSummary as HandoffSummary, type index_d_HandoffWriteResult as HandoffWriteResult, type index_d_NewDecisionResult as NewDecisionResult, index_d_OWNERSHIP_SCHEMA as OWNERSHIP_SCHEMA, type index_d_OpenDecision as OpenDecision, type index_d_OpenTask as OpenTask, type index_d_OwnershipDiagnosis as OwnershipDiagnosis, type index_d_OwnershipEntry as OwnershipEntry, type index_d_OwnershipManifest as OwnershipManifest, type index_d_RecallOptions as RecallOptions, type index_d_RecentWorklog as RecentWorklog, type index_d_ReindexResult as ReindexResult, type index_d_RitualRegistryOptions as RitualRegistryOptions, index_d_SESSION_END_COMMAND as SESSION_END_COMMAND, index_d_SESSION_START_COMMAND as SESSION_START_COMMAND, type index_d_SessionStartHookReport as SessionStartHookReport, type index_d_SessionStartReport as SessionStartReport, type index_d_UpdateCheckResult as UpdateCheckResult, type index_d_UpdateFileAction as UpdateFileAction, type index_d_UpdateFileActionKind as UpdateFileActionKind, type index_d_VortexHelpResult as VortexHelpResult, type index_d_VortexInitResult as VortexInitResult, type index_d_VortexPlannedResult as VortexPlannedResult, type index_d_VortexResult as VortexResult, type index_d_VortexSyncResult as VortexSyncResult, type index_d_VortexSyncStep as VortexSyncStep, type index_d_VortexSyncStepId as VortexSyncStepId, type index_d_VortexSyncStepStatus as VortexSyncStepStatus, type index_d_VortexUpdateResult as VortexUpdateResult, type index_d_WorklogAppendResult as WorklogAppendResult, index_d_agendaCommand as agendaCommand, index_d_aggregateHandoff as aggregateHandoff, index_d_applyGlobalSetup as applyGlobalSetup, index_d_argvToSlash as argvToSlash, index_d_autoReindexMemory as autoReindexMemory, index_d_buildInstallCommand as buildInstallCommand, index_d_buildOwnershipManifest as buildOwnershipManifest, index_d_buildRegistry as buildRegistry, index_d_catchUpSessions as catchUpSessions, index_d_checkBaseUpdate as checkBaseUpdate, index_d_collectAgenda as collectAgenda, index_d_collectCarryover as collectCarryover, index_d_collectSessionStartReport as collectSessionStartReport, index_d_compareSemver as compareSemver, index_d_computeCurateFingerprint as computeCurateFingerprint, index_d_countUncommitted as countUncommitted, index_d_createAmbientRecaller as createAmbientRecaller, index_d_createHandoffSkeleton as createHandoffSkeleton, index_d_createRitualRegistry as createRitualRegistry, index_d_curateCommand as curateCommand, index_d_decisionCommand as decisionCommand, index_d_detectInterruptedGitOp as detectInterruptedGitOp, index_d_detectWorklogGaps as detectWorklogGaps, index_d_ensureVortexHooks as ensureVortexHooks, index_d_ensureWorklogEntry as ensureWorklogEntry, index_d_extractNextUp as extractNextUp, index_d_extractOpenTasks as extractOpenTasks, index_d_gapWindowSinceArg as gapWindowSinceArg, index_d_globalMemoryPath as globalMemoryPath, index_d_globalSettingsHasHook as globalSettingsHasHook, index_d_globalSettingsPath as globalSettingsPath, index_d_globalStatePath as globalStatePath, index_d_handoffCommand as handoffCommand, index_d_inspectGlobalSetup as inspectGlobalSetup, index_d_inspectOwnership as inspectOwnership, index_d_isInstanceRoot as isInstanceRoot, index_d_isNewer as isNewer, index_d_isStableUpdate as isStableUpdate, index_d_logCommand as logCommand, index_d_ownershipManifestPath as ownershipManifestPath, index_d_parseAdoptArgs as parseAdoptArgs, index_d_parseSettings as parseSettings, index_d_pruneHandoffs as pruneHandoffs, index_d_queryNpmLatest as queryNpmLatest, index_d_readGlobalInstancePointer as readGlobalInstancePointer, index_d_readInstalledBaseVersion as readInstalledBaseVersion, index_d_recallCommand as recallCommand, index_d_recordGlobalSetupDecline as recordGlobalSetupDecline, index_d_reindexCommand as reindexCommand, index_d_renderAgenda as renderAgenda, index_d_renderGlobalBlock as renderGlobalBlock, index_d_renderSessionStartReport as renderSessionStartReport, index_d_repairOwnershipManifest as repairOwnershipManifest, index_d_resolveRepoRoot as resolveRepoRoot, index_d_runCurateAccept as runCurateAccept, index_d_runCurateCandidates as runCurateCandidates, index_d_runCurateDecline as runCurateDecline, index_d_runCuratePreview as runCuratePreview, index_d_runTemplatesUpdate as runTemplatesUpdate, index_d_runVortexCli as runVortexCli, index_d_scanHandoffs as scanHandoffs, index_d_serializeSettings as serializeSettings, index_d_sessionStartCommand as sessionStartCommand, index_d_templateDestRelPath as templateDestRelPath, index_d_upsertGlobalBlock as upsertGlobalBlock, index_d_validateCuratePayload as validateCuratePayload, index_d_vortexCommand as vortexCommand, index_d_writeOwnershipManifest as writeOwnershipManifest };
4544
+ export { type index_d_AgendaReport as AgendaReport, type index_d_AmbientRecallFactoryOptions as AmbientRecallFactoryOptions, type index_d_CatchUpOptions as CatchUpOptions, type index_d_CatchUpResult as CatchUpResult, type index_d_ClaudeSettings as ClaudeSettings, type index_d_CliIo as CliIo, type index_d_CollectAgendaOptions as CollectAgendaOptions, type index_d_CurateAcceptResult as CurateAcceptResult, type index_d_CurateActionKind as CurateActionKind, type index_d_CurateAnyProposal as CurateAnyProposal, type index_d_CurateCandidate as CurateCandidate, type index_d_CurateCandidatesResult as CurateCandidatesResult, type index_d_CurateDeclineResult as CurateDeclineResult, type index_d_CurateOptions as CurateOptions, type index_d_CuratePayload as CuratePayload, type index_d_CuratePayloadValidation as CuratePayloadValidation, type index_d_CuratePreviewResult as CuratePreviewResult, type index_d_CurateResult as CurateResult, index_d_DEFAULT_GAP_WINDOW_DAYS as DEFAULT_GAP_WINDOW_DAYS, type index_d_EnsureHooksResult as EnsureHooksResult, type index_d_EnsureWorklogResult as EnsureWorklogResult, index_d_FAILURES_DIR as FAILURES_DIR, type index_d_FailureEntry as FailureEntry, type index_d_FailureGroup as FailureGroup, type index_d_FailureReportSlice as FailureReportSlice, type index_d_FailureScan as FailureScan, index_d_GUARD_DENIAL_KEY as GUARD_DENIAL_KEY, index_d_GUARD_WRITE_COMMAND as GUARD_WRITE_COMMAND, index_d_GUARD_WRITE_MATCHER as GUARD_WRITE_MATCHER, type index_d_GitPullResult as GitPullResult, type index_d_GuardFinding as GuardFinding, index_d_HANDOFF_ARCHIVE_DIR as HANDOFF_ARCHIVE_DIR, index_d_HANDOFF_DIR as HANDOFF_DIR, type index_d_HandoffCreateResult as HandoffCreateResult, type index_d_HandoffSummary as HandoffSummary, type index_d_HandoffWriteResult as HandoffWriteResult, type index_d_LadderStage as LadderStage, type index_d_NewDecisionResult as NewDecisionResult, index_d_OWNERSHIP_SCHEMA as OWNERSHIP_SCHEMA, type index_d_OpenDecision as OpenDecision, type index_d_OpenTask as OpenTask, type index_d_OwnershipDiagnosis as OwnershipDiagnosis, type index_d_OwnershipEntry as OwnershipEntry, type index_d_OwnershipManifest as OwnershipManifest, type index_d_RecallOptions as RecallOptions, type index_d_RecentWorklog as RecentWorklog, type index_d_RecordFailureInput as RecordFailureInput, type index_d_RecordFailureResult as RecordFailureResult, type index_d_ReindexResult as ReindexResult, type index_d_RitualRegistryOptions as RitualRegistryOptions, index_d_SESSION_END_COMMAND as SESSION_END_COMMAND, index_d_SESSION_START_COMMAND as SESSION_START_COMMAND, type index_d_SessionStartHookReport as SessionStartHookReport, type index_d_SessionStartReport as SessionStartReport, type index_d_StatuslineData as StatuslineData, type index_d_StatuslineInstallResult as StatuslineInstallResult, type index_d_StatuslineProbes as StatuslineProbes, type index_d_UpdateCheckResult as UpdateCheckResult, type index_d_UpdateFileAction as UpdateFileAction, type index_d_UpdateFileActionKind as UpdateFileActionKind, type index_d_VortexHelpResult as VortexHelpResult, type index_d_VortexInitResult as VortexInitResult, type index_d_VortexPlannedResult as VortexPlannedResult, type index_d_VortexResult as VortexResult, type index_d_VortexSyncResult as VortexSyncResult, type index_d_VortexSyncStep as VortexSyncStep, type index_d_VortexSyncStepId as VortexSyncStepId, type index_d_VortexSyncStepStatus as VortexSyncStepStatus, type index_d_VortexUpdateResult as VortexUpdateResult, type index_d_WorklogAppendResult as WorklogAppendResult, index_d_agendaCommand as agendaCommand, index_d_aggregateHandoff as aggregateHandoff, index_d_applyGlobalSetup as applyGlobalSetup, index_d_argvToSlash as argvToSlash, index_d_autoReindexMemory as autoReindexMemory, index_d_buildDenyDecision as buildDenyDecision, index_d_buildInstallCommand as buildInstallCommand, index_d_buildOwnershipManifest as buildOwnershipManifest, index_d_buildRegistry as buildRegistry, index_d_catchUpSessions as catchUpSessions, index_d_checkBaseUpdate as checkBaseUpdate, index_d_collectAgenda as collectAgenda, index_d_collectCarryover as collectCarryover, index_d_collectSessionStartReport as collectSessionStartReport, index_d_collectStatuslineProbes as collectStatuslineProbes, index_d_compareSemver as compareSemver, index_d_computeCurateFingerprint as computeCurateFingerprint, index_d_countUncommitted as countUncommitted, index_d_createAmbientRecaller as createAmbientRecaller, index_d_createHandoffSkeleton as createHandoffSkeleton, index_d_createRitualRegistry as createRitualRegistry, index_d_curateCommand as curateCommand, index_d_decisionCommand as decisionCommand, index_d_detectInterruptedGitOp as detectInterruptedGitOp, index_d_detectWorklogGaps as detectWorklogGaps, index_d_effortMeter as effortMeter, index_d_ensureStatusline as ensureStatusline, index_d_ensureVortexHooks as ensureVortexHooks, index_d_ensureWorklogEntry as ensureWorklogEntry, index_d_extractNextUp as extractNextUp, index_d_extractOpenTasks as extractOpenTasks, index_d_failureReportSlice as failureReportSlice, index_d_findControlChar as findControlChar, index_d_formatTokens as formatTokens, index_d_formatWindow as formatWindow, index_d_gapWindowSinceArg as gapWindowSinceArg, index_d_globalMemoryPath as globalMemoryPath, index_d_globalSettingsHasHook as globalSettingsHasHook, index_d_globalSettingsPath as globalSettingsPath, index_d_globalStatePath as globalStatePath, index_d_guardWriteDecision as guardWriteDecision, index_d_handoffCommand as handoffCommand, index_d_inspectGlobalSetup as inspectGlobalSetup, index_d_inspectOwnership as inspectOwnership, index_d_isInstanceRoot as isInstanceRoot, index_d_isNewer as isNewer, index_d_isStableUpdate as isStableUpdate, index_d_isValidFailureKey as isValidFailureKey, index_d_ladderStage as ladderStage, index_d_logCommand as logCommand, index_d_makeBar as makeBar, index_d_ownershipManifestPath as ownershipManifestPath, index_d_parseAdoptArgs as parseAdoptArgs, index_d_parseSettings as parseSettings, index_d_parseStatuslineInput as parseStatuslineInput, index_d_pruneHandoffs as pruneHandoffs, index_d_queryNpmLatest as queryNpmLatest, index_d_readGlobalInstancePointer as readGlobalInstancePointer, index_d_readInstalledBaseVersion as readInstalledBaseVersion, index_d_recallCommand as recallCommand, index_d_recordFailure as recordFailure, index_d_recordGlobalSetupDecline as recordGlobalSetupDecline, index_d_recordGuardDenial as recordGuardDenial, index_d_reindexCommand as reindexCommand, index_d_renderAgenda as renderAgenda, index_d_renderGlobalBlock as renderGlobalBlock, index_d_renderSessionStartReport as renderSessionStartReport, index_d_renderStatusline as renderStatusline, index_d_repairOwnershipManifest as repairOwnershipManifest, index_d_resolveInstanceRoot as resolveInstanceRoot, index_d_resolveRepoRoot as resolveRepoRoot, index_d_runCurateAccept as runCurateAccept, index_d_runCurateCandidates as runCurateCandidates, index_d_runCurateDecline as runCurateDecline, index_d_runCuratePreview as runCuratePreview, index_d_runFailureCli as runFailureCli, index_d_runGuardCli as runGuardCli, index_d_runStatuslineCli as runStatuslineCli, index_d_runTemplatesUpdate as runTemplatesUpdate, index_d_runVortexCli as runVortexCli, index_d_safeSegment as safeSegment, index_d_scanFailures as scanFailures, index_d_scanHandoffs as scanHandoffs, index_d_scanToolInput as scanToolInput, index_d_serializeSettings as serializeSettings, index_d_sessionStartCommand as sessionStartCommand, index_d_sniffEffortFromTranscript as sniffEffortFromTranscript, index_d_statuslineCommand as statuslineCommand, index_d_templateDestRelPath as templateDestRelPath, index_d_upsertGlobalBlock as upsertGlobalBlock, index_d_validateCuratePayload as validateCuratePayload, index_d_vortexCommand as vortexCommand, index_d_writeOwnershipManifest as writeOwnershipManifest };
4123
4545
  }
4124
4546
 
4125
4547
  export { index_d$9 as aiCodingPitfalls, index_d$d as core, index_d$a as dataLint, index_d$5 as decisionLog, index_d$4 as indexGenerator, index_d$2 as linkRewriter, index_d$b as memorySystem, index_d$1 as proactiveCurator, index_d$7 as reportGenerator, index_d$3 as runbooks, index_d as sessionRituals, index_d$c as slashCommands, index_d$8 as toolRules, index_d$6 as worklog };