@vortex-os/base 0.1.0 → 0.2.3

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/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { vector, recall, sessionArchive } from '@vortex-os/memory-extended';
2
+
1
3
  /**
2
4
  * Three-tier privacy classification used across VortEX.
3
5
  *
@@ -82,20 +84,95 @@ declare function makeContext(repoRoot: string): ModuleContext;
82
84
  */
83
85
  declare function moduleDir(ctx: ModuleContext, moduleName: string): string;
84
86
 
87
+ /**
88
+ * Instance configuration for VortEX, read from `<agentDir>/vortex.json`.
89
+ *
90
+ * The config exists to give the user control over the **auto-maintained**
91
+ * operational behaviors (see `AGENT.md` → "Default behaviors") without
92
+ * touching code: toggle any auto-record off, and declare how this machine's
93
+ * environment is detected. A fresh instance has no config file — everything
94
+ * is on, no environment — so the framework works out of the box and the file
95
+ * is purely opt-in tuning.
96
+ */
97
+ /** Which auto-maintained operational records are enabled. Default: all on. */
98
+ interface AutoRecordConfig {
99
+ readonly sessionStart: boolean;
100
+ readonly worklog: boolean;
101
+ readonly decision: boolean;
102
+ readonly ambientRecall: boolean;
103
+ /**
104
+ * Catch-up: at session start, ingest conversation transcripts that have not
105
+ * been archived yet (the host's own machine only). Text is stored
106
+ * immediately; vectorization is deferred to recall/rebuild so start stays
107
+ * fast. Off → no automatic ingest; the archive only grows when explicitly
108
+ * rebuilt.
109
+ */
110
+ readonly archive: boolean;
111
+ }
112
+ /**
113
+ * One environment label plus the signal that selects it. Rules are evaluated
114
+ * in order; the first match wins. Generalizes the operator's home/work
115
+ * `Test-Path` pattern into a portable, declarative form.
116
+ */
117
+ interface EnvironmentRule {
118
+ readonly label: string;
119
+ /** Match when this absolute path exists on the machine. */
120
+ readonly pathExists?: string;
121
+ /** Match when the OS hostname equals this (case-insensitive). */
122
+ readonly hostname?: string;
123
+ /**
124
+ * Match when an environment variable is set. A bare string matches on
125
+ * presence; the object form additionally requires a specific value.
126
+ */
127
+ readonly envVar?: string | {
128
+ readonly name: string;
129
+ readonly equals?: string;
130
+ };
131
+ }
132
+ interface VortexConfig {
133
+ readonly autoRecord: AutoRecordConfig;
134
+ readonly environments: readonly EnvironmentRule[];
135
+ }
136
+ /** Path of the instance config file: `<agentDir>/vortex.json`. */
137
+ declare function vortexConfigPath(ctx: ModuleContext): string;
138
+ /**
139
+ * Load the instance config, merged over defaults. A missing, unreadable, or
140
+ * invalid file yields defaults (everything on, no environments) rather than
141
+ * throwing — config is opt-in tuning, never a prerequisite.
142
+ */
143
+ declare function loadVortexConfig(ctx: ModuleContext): VortexConfig;
144
+ /**
145
+ * Resolve the active environment label from the config rules (first match
146
+ * wins), or null when none match. Pure — the caller injects the signals
147
+ * (hostname, env vars, a path-existence probe) so this stays testable and
148
+ * free of direct OS access.
149
+ */
150
+ declare function resolveEnvironment(config: VortexConfig, signals: {
151
+ readonly hostname?: string;
152
+ readonly env?: Record<string, string | undefined>;
153
+ readonly pathExists?: (p: string) => boolean;
154
+ }): string | null;
155
+
85
156
  //# sourceMappingURL=index.d.ts.map
86
157
 
87
- type index_d$c_FrontmatterDoc<T = Record<string, unknown>> = FrontmatterDoc<T>;
88
- type index_d$c_ModuleContext = ModuleContext;
89
- type index_d$c_Privacy = Privacy;
90
- declare const index_d$c_isVisibleAt: typeof isVisibleAt;
91
- declare const index_d$c_makeContext: typeof makeContext;
92
- declare const index_d$c_maxPrivacy: typeof maxPrivacy;
93
- declare const index_d$c_moduleDir: typeof moduleDir;
94
- declare const index_d$c_normalizePrivacy: typeof normalizePrivacy;
95
- declare const index_d$c_parseFrontmatter: typeof parseFrontmatter;
96
- declare const index_d$c_serializeFrontmatter: typeof serializeFrontmatter;
97
- declare namespace index_d$c {
98
- export { type index_d$c_FrontmatterDoc as FrontmatterDoc, type index_d$c_ModuleContext as ModuleContext, type index_d$c_Privacy as Privacy, index_d$c_isVisibleAt as isVisibleAt, index_d$c_makeContext as makeContext, index_d$c_maxPrivacy as maxPrivacy, index_d$c_moduleDir as moduleDir, index_d$c_normalizePrivacy as normalizePrivacy, index_d$c_parseFrontmatter as parseFrontmatter, index_d$c_serializeFrontmatter as serializeFrontmatter };
158
+ type index_d$d_AutoRecordConfig = AutoRecordConfig;
159
+ type index_d$d_EnvironmentRule = EnvironmentRule;
160
+ type index_d$d_FrontmatterDoc<T = Record<string, unknown>> = FrontmatterDoc<T>;
161
+ type index_d$d_ModuleContext = ModuleContext;
162
+ type index_d$d_Privacy = Privacy;
163
+ type index_d$d_VortexConfig = VortexConfig;
164
+ declare const index_d$d_isVisibleAt: typeof isVisibleAt;
165
+ declare const index_d$d_loadVortexConfig: typeof loadVortexConfig;
166
+ declare const index_d$d_makeContext: typeof makeContext;
167
+ declare const index_d$d_maxPrivacy: typeof maxPrivacy;
168
+ declare const index_d$d_moduleDir: typeof moduleDir;
169
+ declare const index_d$d_normalizePrivacy: typeof normalizePrivacy;
170
+ declare const index_d$d_parseFrontmatter: typeof parseFrontmatter;
171
+ declare const index_d$d_resolveEnvironment: typeof resolveEnvironment;
172
+ declare const index_d$d_serializeFrontmatter: typeof serializeFrontmatter;
173
+ declare const index_d$d_vortexConfigPath: typeof vortexConfigPath;
174
+ declare namespace index_d$d {
175
+ export { type index_d$d_AutoRecordConfig as AutoRecordConfig, type index_d$d_EnvironmentRule as EnvironmentRule, type index_d$d_FrontmatterDoc as FrontmatterDoc, type index_d$d_ModuleContext as ModuleContext, type index_d$d_Privacy as Privacy, type index_d$d_VortexConfig as VortexConfig, index_d$d_isVisibleAt as isVisibleAt, index_d$d_loadVortexConfig as loadVortexConfig, index_d$d_makeContext as makeContext, index_d$d_maxPrivacy as maxPrivacy, index_d$d_moduleDir as moduleDir, index_d$d_normalizePrivacy as normalizePrivacy, index_d$d_parseFrontmatter as parseFrontmatter, index_d$d_resolveEnvironment as resolveEnvironment, index_d$d_serializeFrontmatter as serializeFrontmatter, index_d$d_vortexConfigPath as vortexConfigPath };
99
176
  }
100
177
 
101
178
  /**
@@ -180,17 +257,17 @@ declare function runSlash(input: string, { registry, context }: RunOptions): Pro
180
257
 
181
258
  //# sourceMappingURL=index.d.ts.map
182
259
 
183
- type index_d$b_Command<Result = unknown> = Command<Result>;
184
- type index_d$b_CommandArg = CommandArg;
185
- type index_d$b_CommandInput = CommandInput;
186
- type index_d$b_CommandNotFoundError = CommandNotFoundError;
187
- declare const index_d$b_CommandNotFoundError: typeof CommandNotFoundError;
188
- type index_d$b_CommandRegistry = CommandRegistry;
189
- declare const index_d$b_CommandRegistry: typeof CommandRegistry;
190
- type index_d$b_RunOptions = RunOptions;
191
- declare const index_d$b_runSlash: typeof runSlash;
192
- declare namespace index_d$b {
193
- export { type index_d$b_Command as Command, type index_d$b_CommandArg as CommandArg, type index_d$b_CommandInput as CommandInput, index_d$b_CommandNotFoundError as CommandNotFoundError, index_d$b_CommandRegistry as CommandRegistry, type index_d$b_RunOptions as RunOptions, index_d$b_runSlash as runSlash };
260
+ type index_d$c_Command<Result = unknown> = Command<Result>;
261
+ type index_d$c_CommandArg = CommandArg;
262
+ type index_d$c_CommandInput = CommandInput;
263
+ type index_d$c_CommandNotFoundError = CommandNotFoundError;
264
+ declare const index_d$c_CommandNotFoundError: typeof CommandNotFoundError;
265
+ type index_d$c_CommandRegistry = CommandRegistry;
266
+ declare const index_d$c_CommandRegistry: typeof CommandRegistry;
267
+ type index_d$c_RunOptions = RunOptions;
268
+ declare const index_d$c_runSlash: typeof runSlash;
269
+ declare namespace index_d$c {
270
+ export { type index_d$c_Command as Command, type index_d$c_CommandArg as CommandArg, type index_d$c_CommandInput as CommandInput, index_d$c_CommandNotFoundError as CommandNotFoundError, index_d$c_CommandRegistry as CommandRegistry, type index_d$c_RunOptions as RunOptions, index_d$c_runSlash as runSlash };
194
271
  }
195
272
 
196
273
  /**
@@ -303,17 +380,17 @@ declare function diffStores(a: MemoryStore, b: MemoryStore): Promise<SyncDiff>;
303
380
 
304
381
  //# sourceMappingURL=index.d.ts.map
305
382
 
306
- type index_d$a_Memory = Memory;
307
- type index_d$a_MemoryFrontmatter = MemoryFrontmatter;
308
- type index_d$a_MemoryStore = MemoryStore;
309
- declare const index_d$a_MemoryStore: typeof MemoryStore;
310
- type index_d$a_MemoryType = MemoryType;
311
- type index_d$a_SyncDiff = SyncDiff;
312
- type index_d$a_WriteMemoryIndexOptions = WriteMemoryIndexOptions;
313
- declare const index_d$a_diffStores: typeof diffStores;
314
- declare const index_d$a_writeMemoryIndex: typeof writeMemoryIndex;
315
- declare namespace index_d$a {
316
- export { type index_d$a_Memory as Memory, type index_d$a_MemoryFrontmatter as MemoryFrontmatter, index_d$a_MemoryStore as MemoryStore, type index_d$a_MemoryType as MemoryType, type index_d$a_SyncDiff as SyncDiff, type index_d$a_WriteMemoryIndexOptions as WriteMemoryIndexOptions, index_d$a_diffStores as diffStores, index_d$a_writeMemoryIndex as writeMemoryIndex };
383
+ type index_d$b_Memory = Memory;
384
+ type index_d$b_MemoryFrontmatter = MemoryFrontmatter;
385
+ type index_d$b_MemoryStore = MemoryStore;
386
+ declare const index_d$b_MemoryStore: typeof MemoryStore;
387
+ type index_d$b_MemoryType = MemoryType;
388
+ type index_d$b_SyncDiff = SyncDiff;
389
+ type index_d$b_WriteMemoryIndexOptions = WriteMemoryIndexOptions;
390
+ declare const index_d$b_diffStores: typeof diffStores;
391
+ declare const index_d$b_writeMemoryIndex: typeof writeMemoryIndex;
392
+ declare namespace index_d$b {
393
+ export { type index_d$b_Memory as Memory, type index_d$b_MemoryFrontmatter as MemoryFrontmatter, index_d$b_MemoryStore as MemoryStore, type index_d$b_MemoryType as MemoryType, type index_d$b_SyncDiff as SyncDiff, type index_d$b_WriteMemoryIndexOptions as WriteMemoryIndexOptions, index_d$b_diffStores as diffStores, index_d$b_writeMemoryIndex as writeMemoryIndex };
317
394
  }
318
395
 
319
396
  type Severity = "error" | "warning" | "info";
@@ -409,20 +486,20 @@ declare function wikiLinkResolves(options: WikiLinkResolvesOptions): LintRule;
409
486
 
410
487
  //# sourceMappingURL=index.d.ts.map
411
488
 
412
- type index_d$9_LintFinding = LintFinding;
413
- type index_d$9_LintInput = LintInput;
414
- type index_d$9_LintOptions = LintOptions;
415
- type index_d$9_LintReport = LintReport;
416
- type index_d$9_LintRule = LintRule;
417
- type index_d$9_RequireFrontmatterOptions = RequireFrontmatterOptions;
418
- type index_d$9_Severity = Severity;
419
- type index_d$9_WikiLinkResolvesOptions = WikiLinkResolvesOptions;
420
- declare const index_d$9_lintDirectory: typeof lintDirectory;
421
- declare const index_d$9_privacyValid: typeof privacyValid;
422
- declare const index_d$9_requireFrontmatter: typeof requireFrontmatter;
423
- declare const index_d$9_wikiLinkResolves: typeof wikiLinkResolves;
424
- declare namespace index_d$9 {
425
- export { type index_d$9_LintFinding as LintFinding, type index_d$9_LintInput as LintInput, type index_d$9_LintOptions as LintOptions, type index_d$9_LintReport as LintReport, type index_d$9_LintRule as LintRule, type index_d$9_RequireFrontmatterOptions as RequireFrontmatterOptions, type index_d$9_Severity as Severity, type index_d$9_WikiLinkResolvesOptions as WikiLinkResolvesOptions, index_d$9_lintDirectory as lintDirectory, index_d$9_privacyValid as privacyValid, index_d$9_requireFrontmatter as requireFrontmatter, index_d$9_wikiLinkResolves as wikiLinkResolves };
489
+ type index_d$a_LintFinding = LintFinding;
490
+ type index_d$a_LintInput = LintInput;
491
+ type index_d$a_LintOptions = LintOptions;
492
+ type index_d$a_LintReport = LintReport;
493
+ type index_d$a_LintRule = LintRule;
494
+ type index_d$a_RequireFrontmatterOptions = RequireFrontmatterOptions;
495
+ type index_d$a_Severity = Severity;
496
+ type index_d$a_WikiLinkResolvesOptions = WikiLinkResolvesOptions;
497
+ declare const index_d$a_lintDirectory: typeof lintDirectory;
498
+ declare const index_d$a_privacyValid: typeof privacyValid;
499
+ declare const index_d$a_requireFrontmatter: typeof requireFrontmatter;
500
+ declare const index_d$a_wikiLinkResolves: typeof wikiLinkResolves;
501
+ declare namespace index_d$a {
502
+ export { type index_d$a_LintFinding as LintFinding, type index_d$a_LintInput as LintInput, type index_d$a_LintOptions as LintOptions, type index_d$a_LintReport as LintReport, type index_d$a_LintRule as LintRule, type index_d$a_RequireFrontmatterOptions as RequireFrontmatterOptions, type index_d$a_Severity as Severity, type index_d$a_WikiLinkResolvesOptions as WikiLinkResolvesOptions, index_d$a_lintDirectory as lintDirectory, index_d$a_privacyValid as privacyValid, index_d$a_requireFrontmatter as requireFrontmatter, index_d$a_wikiLinkResolves as wikiLinkResolves };
426
503
  }
427
504
 
428
505
  type PitfallSeverity = "info" | "warning" | "error";
@@ -481,13 +558,13 @@ declare class PitfallCatalog {
481
558
 
482
559
  //# sourceMappingURL=index.d.ts.map
483
560
 
484
- type index_d$8_Pitfall = Pitfall;
485
- type index_d$8_PitfallCatalog = PitfallCatalog;
486
- declare const index_d$8_PitfallCatalog: typeof PitfallCatalog;
487
- type index_d$8_PitfallFrontmatter = PitfallFrontmatter;
488
- type index_d$8_PitfallSeverity = PitfallSeverity;
489
- declare namespace index_d$8 {
490
- export { type index_d$8_Pitfall as Pitfall, index_d$8_PitfallCatalog as PitfallCatalog, type index_d$8_PitfallFrontmatter as PitfallFrontmatter, type index_d$8_PitfallSeverity as PitfallSeverity };
561
+ type index_d$9_Pitfall = Pitfall;
562
+ type index_d$9_PitfallCatalog = PitfallCatalog;
563
+ declare const index_d$9_PitfallCatalog: typeof PitfallCatalog;
564
+ type index_d$9_PitfallFrontmatter = PitfallFrontmatter;
565
+ type index_d$9_PitfallSeverity = PitfallSeverity;
566
+ declare namespace index_d$9 {
567
+ export { type index_d$9_Pitfall as Pitfall, index_d$9_PitfallCatalog as PitfallCatalog, type index_d$9_PitfallFrontmatter as PitfallFrontmatter, type index_d$9_PitfallSeverity as PitfallSeverity };
491
568
  }
492
569
 
493
570
  type ToolRuleSeverity = "advisory" | "strict" | "absolute";
@@ -543,13 +620,13 @@ declare class ToolRuleCatalog {
543
620
 
544
621
  //# sourceMappingURL=index.d.ts.map
545
622
 
546
- type index_d$7_ToolRule = ToolRule;
547
- type index_d$7_ToolRuleCatalog = ToolRuleCatalog;
548
- declare const index_d$7_ToolRuleCatalog: typeof ToolRuleCatalog;
549
- type index_d$7_ToolRuleFrontmatter = ToolRuleFrontmatter;
550
- type index_d$7_ToolRuleSeverity = ToolRuleSeverity;
551
- declare namespace index_d$7 {
552
- export { type index_d$7_ToolRule as ToolRule, index_d$7_ToolRuleCatalog as ToolRuleCatalog, type index_d$7_ToolRuleFrontmatter as ToolRuleFrontmatter, type index_d$7_ToolRuleSeverity as ToolRuleSeverity };
623
+ type index_d$8_ToolRule = ToolRule;
624
+ type index_d$8_ToolRuleCatalog = ToolRuleCatalog;
625
+ declare const index_d$8_ToolRuleCatalog: typeof ToolRuleCatalog;
626
+ type index_d$8_ToolRuleFrontmatter = ToolRuleFrontmatter;
627
+ type index_d$8_ToolRuleSeverity = ToolRuleSeverity;
628
+ declare namespace index_d$8 {
629
+ export { type index_d$8_ToolRule as ToolRule, index_d$8_ToolRuleCatalog as ToolRuleCatalog, type index_d$8_ToolRuleFrontmatter as ToolRuleFrontmatter, type index_d$8_ToolRuleSeverity as ToolRuleSeverity };
553
630
  }
554
631
 
555
632
  interface RenderOptions {
@@ -618,25 +695,25 @@ declare function applyTemplate(template: string, vars: Readonly<Record<string, s
618
695
 
619
696
  //# sourceMappingURL=index.d.ts.map
620
697
 
621
- declare const index_d$6_DEFAULT_TEMPLATE: typeof DEFAULT_TEMPLATE;
622
- type index_d$6_RenderOptions = RenderOptions;
623
- type index_d$6_RenderResult = RenderResult;
624
- type index_d$6_RenderWarning = RenderWarning;
625
- type index_d$6_StripResult = StripResult;
626
- type index_d$6_WarningKind = WarningKind;
627
- declare const index_d$6_applyTemplate: typeof applyTemplate;
628
- declare const index_d$6_renderHtml: typeof renderHtml;
629
- declare const index_d$6_stripPrivateSections: typeof stripPrivateSections;
630
- declare namespace index_d$6 {
631
- export { index_d$6_DEFAULT_TEMPLATE as DEFAULT_TEMPLATE, type index_d$6_RenderOptions as RenderOptions, type index_d$6_RenderResult as RenderResult, type index_d$6_RenderWarning as RenderWarning, type index_d$6_StripResult as StripResult, type index_d$6_WarningKind as WarningKind, index_d$6_applyTemplate as applyTemplate, index_d$6_renderHtml as renderHtml, index_d$6_stripPrivateSections as stripPrivateSections };
698
+ declare const index_d$7_DEFAULT_TEMPLATE: typeof DEFAULT_TEMPLATE;
699
+ type index_d$7_RenderOptions = RenderOptions;
700
+ type index_d$7_RenderResult = RenderResult;
701
+ type index_d$7_RenderWarning = RenderWarning;
702
+ type index_d$7_StripResult = StripResult;
703
+ type index_d$7_WarningKind = WarningKind;
704
+ declare const index_d$7_applyTemplate: typeof applyTemplate;
705
+ declare const index_d$7_renderHtml: typeof renderHtml;
706
+ declare const index_d$7_stripPrivateSections: typeof stripPrivateSections;
707
+ declare namespace index_d$7 {
708
+ export { index_d$7_DEFAULT_TEMPLATE as DEFAULT_TEMPLATE, type index_d$7_RenderOptions as RenderOptions, type index_d$7_RenderResult as RenderResult, type index_d$7_RenderWarning as RenderWarning, type index_d$7_StripResult as StripResult, type index_d$7_WarningKind as WarningKind, index_d$7_applyTemplate as applyTemplate, index_d$7_renderHtml as renderHtml, index_d$7_stripPrivateSections as stripPrivateSections };
632
709
  }
633
710
 
634
711
  /**
635
- * Frontmatter expected on a TIL file. All fields besides `type` are
712
+ * Frontmatter expected on a worklog file. All fields besides `type` are
636
713
  * conventional — the store tolerates absence and surfaces what is present.
637
714
  */
638
- interface TilFrontmatter {
639
- type: "til";
715
+ interface WorklogFrontmatter {
716
+ type: "worklog";
640
717
  status?: string;
641
718
  privacy?: string;
642
719
  created?: string;
@@ -646,41 +723,41 @@ interface TilFrontmatter {
646
723
  [key: string]: unknown;
647
724
  }
648
725
  /**
649
- * A parsed TIL entry.
726
+ * A parsed worklog entry.
650
727
  *
651
728
  * `date` is the ISO date portion of the filename (`YYYY-MM-DD`).
652
729
  * `keyword` is the trailing slug portion of the filename without `.md`.
653
730
  * `path` is the absolute path of the file on disk.
654
731
  */
655
- interface TilEntry {
732
+ interface WorklogEntry {
656
733
  readonly date: string;
657
734
  readonly keyword: string;
658
735
  readonly path: string;
659
- readonly frontmatter: TilFrontmatter;
736
+ readonly frontmatter: WorklogFrontmatter;
660
737
  readonly body: string;
661
738
  }
662
739
 
663
740
  /**
664
- * Directory-backed TIL store. Expected layout: `<rootDir>/YYYY/MM/YYYY-MM-DD-keyword.md`.
741
+ * Directory-backed worklog store. Expected layout: `<rootDir>/YYYY/MM/YYYY-MM-DD-keyword.md`.
665
742
  *
666
743
  * The store treats missing subdirectories as empty, never as errors —
667
744
  * a brand-new month with no entries returns an empty list, not a throw.
668
745
  */
669
- declare class TilStore {
746
+ declare class WorklogStore {
670
747
  readonly rootDir: string;
671
748
  constructor(rootDir: string);
672
749
  /** All entries across all years and months, sorted by date ascending. */
673
- list(): Promise<readonly TilEntry[]>;
750
+ list(): Promise<readonly WorklogEntry[]>;
674
751
  /** Entries within one calendar month. */
675
- listByMonth(year: number, month: number): Promise<readonly TilEntry[]>;
752
+ listByMonth(year: number, month: number): Promise<readonly WorklogEntry[]>;
676
753
  /**
677
754
  * The first entry matching `date` (`YYYY-MM-DD`). If multiple files exist
678
755
  * for that date with different keywords, the lexicographically-first one
679
756
  * is returned. Use `list()` when all are needed.
680
757
  */
681
- get(date: string): Promise<TilEntry | undefined>;
758
+ get(date: string): Promise<WorklogEntry | undefined>;
682
759
  /** Most recent entry by date (descending), then keyword (descending). */
683
- getLatest(): Promise<TilEntry | undefined>;
760
+ getLatest(): Promise<WorklogEntry | undefined>;
684
761
  /** Resolve the file path for a given (date, keyword), without creating it. */
685
762
  pathFor(date: string, keyword: string): string;
686
763
  private listSubdirs;
@@ -688,24 +765,24 @@ declare class TilStore {
688
765
  }
689
766
 
690
767
  /**
691
- * Append a new section to the end of an existing TIL entry's file.
768
+ * Append a new section to the end of an existing worklog entry's file.
692
769
  *
693
770
  * The resulting markdown adds two leading blank lines, then `## <title>`,
694
771
  * then a blank line, then the body. The entry's frontmatter is not touched.
695
772
  *
696
773
  * Returns the updated raw markdown that was written.
697
774
  */
698
- declare function appendSection(entry: TilEntry, title: string, body: string): Promise<string>;
775
+ declare function appendSection(entry: WorklogEntry, title: string, body: string): Promise<string>;
699
776
 
700
777
  //# sourceMappingURL=index.d.ts.map
701
778
 
702
- type index_d$5_TilEntry = TilEntry;
703
- type index_d$5_TilFrontmatter = TilFrontmatter;
704
- type index_d$5_TilStore = TilStore;
705
- declare const index_d$5_TilStore: typeof TilStore;
706
- declare const index_d$5_appendSection: typeof appendSection;
707
- declare namespace index_d$5 {
708
- export { type index_d$5_TilEntry as TilEntry, type index_d$5_TilFrontmatter as TilFrontmatter, index_d$5_TilStore as TilStore, index_d$5_appendSection as appendSection };
779
+ type index_d$6_WorklogEntry = WorklogEntry;
780
+ type index_d$6_WorklogFrontmatter = WorklogFrontmatter;
781
+ type index_d$6_WorklogStore = WorklogStore;
782
+ declare const index_d$6_WorklogStore: typeof WorklogStore;
783
+ declare const index_d$6_appendSection: typeof appendSection;
784
+ declare namespace index_d$6 {
785
+ export { type index_d$6_WorklogEntry as WorklogEntry, type index_d$6_WorklogFrontmatter as WorklogFrontmatter, index_d$6_WorklogStore as WorklogStore, index_d$6_appendSection as appendSection };
709
786
  }
710
787
 
711
788
  /**
@@ -814,15 +891,15 @@ declare function renderTemplate(input: DecisionTemplateInput): string;
814
891
 
815
892
  //# sourceMappingURL=index.d.ts.map
816
893
 
817
- type index_d$4_DecisionEntry = DecisionEntry;
818
- type index_d$4_DecisionFilter = DecisionFilter;
819
- type index_d$4_DecisionLogFrontmatter = DecisionLogFrontmatter;
820
- type index_d$4_DecisionStore = DecisionStore;
821
- declare const index_d$4_DecisionStore: typeof DecisionStore;
822
- type index_d$4_DecisionTemplateInput = DecisionTemplateInput;
823
- declare const index_d$4_renderTemplate: typeof renderTemplate;
824
- declare namespace index_d$4 {
825
- export { type index_d$4_DecisionEntry as DecisionEntry, type index_d$4_DecisionFilter as DecisionFilter, type index_d$4_DecisionLogFrontmatter as DecisionLogFrontmatter, index_d$4_DecisionStore as DecisionStore, type index_d$4_DecisionTemplateInput as DecisionTemplateInput, index_d$4_renderTemplate as renderTemplate };
894
+ type index_d$5_DecisionEntry = DecisionEntry;
895
+ type index_d$5_DecisionFilter = DecisionFilter;
896
+ type index_d$5_DecisionLogFrontmatter = DecisionLogFrontmatter;
897
+ type index_d$5_DecisionStore = DecisionStore;
898
+ declare const index_d$5_DecisionStore: typeof DecisionStore;
899
+ type index_d$5_DecisionTemplateInput = DecisionTemplateInput;
900
+ declare const index_d$5_renderTemplate: typeof renderTemplate;
901
+ declare namespace index_d$5 {
902
+ export { type index_d$5_DecisionEntry as DecisionEntry, type index_d$5_DecisionFilter as DecisionFilter, type index_d$5_DecisionLogFrontmatter as DecisionLogFrontmatter, index_d$5_DecisionStore as DecisionStore, type index_d$5_DecisionTemplateInput as DecisionTemplateInput, index_d$5_renderTemplate as renderTemplate };
826
903
  }
827
904
 
828
905
  /**
@@ -837,7 +914,7 @@ interface IndexEntry {
837
914
  readonly title: string;
838
915
  /** Short description — frontmatter `description`, or first body paragraph fallback. */
839
916
  readonly description?: string;
840
- /** Frontmatter `type` value, if present (e.g. `til`, `decision-log`, `memory`). */
917
+ /** Frontmatter `type` value, if present (e.g. `worklog`, `decision-log`, `memory`). */
841
918
  readonly type?: string;
842
919
  /** Frontmatter `updated` or `created` value, ISO `YYYY-MM-DD` when parseable. */
843
920
  readonly updated?: string;
@@ -869,7 +946,7 @@ interface ScanOptions {
869
946
  * Input for {@link renderIndex}.
870
947
  */
871
948
  interface RenderIndexInput {
872
- /** Page H1 — typically the directory's human name (e.g. "Memory", "TIL"). */
949
+ /** Page H1 — typically the directory's human name (e.g. "Memory", "Worklog"). */
873
950
  title: string;
874
951
  /**
875
952
  * One-line blockquote shown beneath the H1. Pass an empty string to omit
@@ -964,14 +1041,14 @@ declare function findIndexableDirs(rootDir: string, options?: {
964
1041
 
965
1042
  //# sourceMappingURL=index.d.ts.map
966
1043
 
967
- type index_d$3_IndexEntry = IndexEntry;
968
- type index_d$3_RenderIndexInput = RenderIndexInput;
969
- type index_d$3_ScanOptions = ScanOptions;
970
- declare const index_d$3_findIndexableDirs: typeof findIndexableDirs;
971
- declare const index_d$3_renderIndex: typeof renderIndex;
972
- declare const index_d$3_scanDirectory: typeof scanDirectory;
973
- declare namespace index_d$3 {
974
- export { type index_d$3_IndexEntry as IndexEntry, type index_d$3_RenderIndexInput as RenderIndexInput, type index_d$3_ScanOptions as ScanOptions, index_d$3_findIndexableDirs as findIndexableDirs, index_d$3_renderIndex as renderIndex, index_d$3_scanDirectory as scanDirectory };
1044
+ type index_d$4_IndexEntry = IndexEntry;
1045
+ type index_d$4_RenderIndexInput = RenderIndexInput;
1046
+ type index_d$4_ScanOptions = ScanOptions;
1047
+ declare const index_d$4_findIndexableDirs: typeof findIndexableDirs;
1048
+ declare const index_d$4_renderIndex: typeof renderIndex;
1049
+ declare const index_d$4_scanDirectory: typeof scanDirectory;
1050
+ declare namespace index_d$4 {
1051
+ export { type index_d$4_IndexEntry as IndexEntry, type index_d$4_RenderIndexInput as RenderIndexInput, type index_d$4_ScanOptions as ScanOptions, index_d$4_findIndexableDirs as findIndexableDirs, index_d$4_renderIndex as renderIndex, index_d$4_scanDirectory as scanDirectory };
975
1052
  }
976
1053
 
977
1054
  /**
@@ -984,7 +1061,7 @@ interface RunbookFrontmatter {
984
1061
  privacy?: "public" | "internal" | "personal" | string;
985
1062
  /** ISO date (`YYYY-MM-DD`) when this runbook was last verified end-to-end. */
986
1063
  last_tested?: string;
987
- /** Free-form incident category (e.g. `네트워크-순단`, `mail-outage`). */
1064
+ /** Free-form incident category (e.g. `network-outage`, `mail-outage`). */
988
1065
  "incident-type"?: string;
989
1066
  created?: string;
990
1067
  updated?: string;
@@ -997,7 +1074,7 @@ interface RunbookFrontmatter {
997
1074
  *
998
1075
  * `slug` is the filename without the `.md` extension. Runbooks live in a
999
1076
  * flat directory — no date-prefix convention, since the name is typically
1000
- * descriptive (`K3s-노드-재부팅-절차`, `메일서버-Mbox-장애복구`).
1077
+ * descriptive (`service-restart-procedure`, `database-restore`).
1001
1078
  */
1002
1079
  interface RunbookEntry {
1003
1080
  readonly slug: string;
@@ -1048,13 +1125,13 @@ declare class RunbookStore {
1048
1125
 
1049
1126
  //# sourceMappingURL=index.d.ts.map
1050
1127
 
1051
- type index_d$2_RunbookEntry = RunbookEntry;
1052
- type index_d$2_RunbookFilter = RunbookFilter;
1053
- type index_d$2_RunbookFrontmatter = RunbookFrontmatter;
1054
- type index_d$2_RunbookStore = RunbookStore;
1055
- declare const index_d$2_RunbookStore: typeof RunbookStore;
1056
- declare namespace index_d$2 {
1057
- export { type index_d$2_RunbookEntry as RunbookEntry, type index_d$2_RunbookFilter as RunbookFilter, type index_d$2_RunbookFrontmatter as RunbookFrontmatter, index_d$2_RunbookStore as RunbookStore };
1128
+ type index_d$3_RunbookEntry = RunbookEntry;
1129
+ type index_d$3_RunbookFilter = RunbookFilter;
1130
+ type index_d$3_RunbookFrontmatter = RunbookFrontmatter;
1131
+ type index_d$3_RunbookStore = RunbookStore;
1132
+ declare const index_d$3_RunbookStore: typeof RunbookStore;
1133
+ declare namespace index_d$3 {
1134
+ export { type index_d$3_RunbookEntry as RunbookEntry, type index_d$3_RunbookFilter as RunbookFilter, type index_d$3_RunbookFrontmatter as RunbookFrontmatter, index_d$3_RunbookStore as RunbookStore };
1058
1135
  }
1059
1136
 
1060
1137
  /**
@@ -1358,37 +1435,979 @@ declare function rewriteBody(body: string, redirections: RedirectionMap): {
1358
1435
 
1359
1436
  //# sourceMappingURL=index.d.ts.map
1360
1437
 
1361
- type index_d$1_BrokenLink = BrokenLink;
1362
- type index_d$1_BuildIndexOptions = BuildIndexOptions;
1363
- type index_d$1_CheckDirectoryOptions = CheckDirectoryOptions;
1364
- type index_d$1_FileIndex = FileIndex;
1365
- type index_d$1_FileRewrite = FileRewrite;
1366
- type index_d$1_LinkCheckResult = LinkCheckResult;
1367
- type index_d$1_RedirectionMap = RedirectionMap;
1368
- type index_d$1_ResolveOpts = ResolveOpts;
1369
- type index_d$1_ResolveOutcome = ResolveOutcome;
1370
- type index_d$1_RewriteOptions = RewriteOptions;
1371
- type index_d$1_RewriteResult = RewriteResult;
1372
- type index_d$1_WikiLink = WikiLink;
1373
- declare const index_d$1_buildFileIndex: typeof buildFileIndex;
1374
- declare const index_d$1_checkDirectory: typeof checkDirectory;
1375
- declare const index_d$1_extractWikiLinks: typeof extractWikiLinks;
1376
- declare const index_d$1_resolveLink: typeof resolveLink;
1377
- declare const index_d$1_rewriteBody: typeof rewriteBody;
1378
- declare const index_d$1_rewriteDirectory: typeof rewriteDirectory;
1379
- declare const index_d$1_toRel: typeof toRel;
1380
- declare const index_d$1_topBrokenTargets: typeof topBrokenTargets;
1438
+ type index_d$2_BrokenLink = BrokenLink;
1439
+ type index_d$2_BuildIndexOptions = BuildIndexOptions;
1440
+ type index_d$2_CheckDirectoryOptions = CheckDirectoryOptions;
1441
+ type index_d$2_FileIndex = FileIndex;
1442
+ type index_d$2_FileRewrite = FileRewrite;
1443
+ type index_d$2_LinkCheckResult = LinkCheckResult;
1444
+ type index_d$2_RedirectionMap = RedirectionMap;
1445
+ type index_d$2_ResolveOpts = ResolveOpts;
1446
+ type index_d$2_ResolveOutcome = ResolveOutcome;
1447
+ type index_d$2_RewriteOptions = RewriteOptions;
1448
+ type index_d$2_RewriteResult = RewriteResult;
1449
+ type index_d$2_WikiLink = WikiLink;
1450
+ declare const index_d$2_buildFileIndex: typeof buildFileIndex;
1451
+ declare const index_d$2_checkDirectory: typeof checkDirectory;
1452
+ declare const index_d$2_extractWikiLinks: typeof extractWikiLinks;
1453
+ declare const index_d$2_resolveLink: typeof resolveLink;
1454
+ declare const index_d$2_rewriteBody: typeof rewriteBody;
1455
+ declare const index_d$2_rewriteDirectory: typeof rewriteDirectory;
1456
+ declare const index_d$2_toRel: typeof toRel;
1457
+ declare const index_d$2_topBrokenTargets: typeof topBrokenTargets;
1458
+ declare namespace index_d$2 {
1459
+ export { type index_d$2_BrokenLink as BrokenLink, type index_d$2_BuildIndexOptions as BuildIndexOptions, type index_d$2_CheckDirectoryOptions as CheckDirectoryOptions, type index_d$2_FileIndex as FileIndex, type index_d$2_FileRewrite as FileRewrite, type index_d$2_LinkCheckResult as LinkCheckResult, type index_d$2_RedirectionMap as RedirectionMap, type index_d$2_ResolveOpts as ResolveOpts, type index_d$2_ResolveOutcome as ResolveOutcome, type index_d$2_RewriteOptions as RewriteOptions, type index_d$2_RewriteResult as RewriteResult, type index_d$2_WikiLink as WikiLink, index_d$2_buildFileIndex as buildFileIndex, index_d$2_checkDirectory as checkDirectory, index_d$2_extractWikiLinks as extractWikiLinks, index_d$2_resolveLink as resolveLink, index_d$2_rewriteBody as rewriteBody, index_d$2_rewriteDirectory as rewriteDirectory, index_d$2_toRel as toRel, index_d$2_topBrokenTargets as topBrokenTargets };
1460
+ }
1461
+
1462
+ /**
1463
+ * Host-supplied LLM adapter. The proposer asks structured questions
1464
+ * (a prompt plus a JSON-shaped expected answer); the host runs the question
1465
+ * against whatever LLM facility it has — a sub-agent tool call (Claude Code),
1466
+ * an inline completion (Codex), an MCP call (Gemini), or a Claude Desktop
1467
+ * surface. The proposer does not care which.
1468
+ *
1469
+ * The interface is intentionally narrow: prompt in, structured answer out.
1470
+ * No streaming, no tool registration, no token budget knobs. Each
1471
+ * `LLMJudge.ask()` call is a single-shot decision query.
1472
+ *
1473
+ * This mirrors the `TranscriptAdapter` pattern in `@vortex-os/memory-extended`
1474
+ * — host-specific work is isolated to one adapter per host; the consumer
1475
+ * (`InsightProposer`, `HubProposer`) is host-agnostic.
1476
+ */
1477
+ interface LLMJudge {
1478
+ /**
1479
+ * Identifier of the host this adapter speaks to. Used for diagnostics and
1480
+ * for proposals to record which judge approved them (`accepted.log`).
1481
+ * Open-ended string so third-party hosts can register their own identifier.
1482
+ */
1483
+ readonly host: string;
1484
+ /**
1485
+ * Run a single-shot decision query against the host LLM.
1486
+ *
1487
+ * Implementations must:
1488
+ * - Pass `prompt` to the underlying LLM with whatever system instructions
1489
+ * the host normally uses (no special framing required from the caller).
1490
+ * - Constrain the response to match `expected.shape` — either by JSON-
1491
+ * mode generation, by structured output, or by a retry loop that
1492
+ * reformats the response. The proposer assumes the returned value
1493
+ * conforms to `expected.shape`.
1494
+ * - Throw on persistent format failure rather than returning malformed
1495
+ * data. Callers handle the rejection rather than the host masking it.
1496
+ *
1497
+ * The return type is `unknown` because the caller knows the shape it
1498
+ * expects (it supplied `expected.shape`) and runtime-validates after the
1499
+ * call. Keeping the static return loose avoids coupling the interface to
1500
+ * a particular validation library.
1501
+ */
1502
+ ask(prompt: string, expected: ExpectedShape): Promise<unknown>;
1503
+ }
1504
+ /**
1505
+ * Shape descriptor for the expected LLM response. Kept minimal so any
1506
+ * validation library (zod, valibot, hand-rolled) can produce one.
1507
+ *
1508
+ * - `shape: "string"` — a single free-form string answer (e.g. a yes/no,
1509
+ * a slug, a summary).
1510
+ * - `shape: "json"` — a JSON value matching the supplied JSON-Schema-like
1511
+ * descriptor. Implementations may pass the descriptor to a structured-
1512
+ * output mode if the underlying LLM supports it; otherwise they must
1513
+ * validate after generation.
1514
+ */
1515
+ type ExpectedShape = {
1516
+ readonly shape: "string";
1517
+ } | {
1518
+ readonly shape: "json";
1519
+ /**
1520
+ * Free-form schema descriptor — passed through to the host's structured
1521
+ * output mechanism if any, otherwise informational only. The proposer
1522
+ * still runs its own runtime check on the returned value, so this
1523
+ * field's contract is best-effort.
1524
+ */
1525
+ readonly schema: unknown;
1526
+ };
1527
+
1528
+ /**
1529
+ * The single contract that both proposer surfaces (insight capture, hub
1530
+ * auto-curation) implement. Generic over the input shape so each surface can
1531
+ * declare its own evaluation input — a recent-turns buffer for the insight
1532
+ * surface, a filesystem snapshot for the hub surface.
1533
+ *
1534
+ * `evaluate()` is intentionally pure: it inspects its input, optionally
1535
+ * consults the LLM, and returns either a {@link Proposal} or `null`. Side
1536
+ * effects (writing the captured insight, recording the decline) are
1537
+ * captured as thunks inside the returned Proposal and only run after the
1538
+ * user decides.
1539
+ *
1540
+ * A `null` return means "no proposal at this time" — the proposer's
1541
+ * thresholds were not met, the LLM declined, the input fingerprint was
1542
+ * already on the decline list, or nothing meaningful changed since the last
1543
+ * evaluation. The caller must not treat `null` as an error.
1544
+ */
1545
+ interface Proposer<Input, P extends Proposal = Proposal> {
1546
+ readonly kind: string;
1547
+ evaluate(input: Input, ctx: ProposerContext): Promise<P | null>;
1548
+ }
1549
+ /**
1550
+ * Shared evaluation context handed to every proposer call.
1551
+ *
1552
+ * - `cwd` is the instance's repository root — proposers resolve `data/`
1553
+ * paths relative to it. Absolute paths never leak into proposals (the
1554
+ * proposal's action carries data-relative paths).
1555
+ * - `declinedFingerprints` is pre-loaded by the orchestrator so the
1556
+ * proposer can do its decline check without touching the filesystem
1557
+ * during evaluation.
1558
+ * - `llm` is the host-supplied judge. Injected so the proposer stays
1559
+ * host-agnostic.
1560
+ * - `now` is injected (rather than `new Date()` inside the proposer) so
1561
+ * verify scenarios can pin time for deterministic fingerprints.
1562
+ */
1563
+ interface ProposerContext {
1564
+ readonly cwd: string;
1565
+ readonly declinedFingerprints: ReadonlySet<string>;
1566
+ readonly llm: LLMJudge;
1567
+ readonly now: Date;
1568
+ }
1569
+ /**
1570
+ * A single proposal handed to the host for the user to accept or decline.
1571
+ *
1572
+ * The proposal carries enough preview content that the user can decide
1573
+ * without further round-trips. `onAccept` / `onDecline` are thunks — the
1574
+ * side-effect logic was captured at evaluation time but does not run until
1575
+ * the user decides. This keeps `Proposer.evaluate()` pure.
1576
+ *
1577
+ * `fingerprint` identifies the proposal for decline-tracking. It must
1578
+ * include the chosen `action.kind` and target path so the same topic can
1579
+ * re-surface with a different placement decision if the LLM's call shifts
1580
+ * (e.g. user declined an `append-section` to file X, but a later evaluation
1581
+ * proposes `create-file` in a sibling folder — different fingerprint,
1582
+ * eligible to surface).
1583
+ */
1584
+ interface Proposal {
1585
+ readonly kind: string;
1586
+ readonly fingerprint: string;
1587
+ readonly action: ProposalAction;
1588
+ readonly preview: string;
1589
+ readonly rationale: string;
1590
+ readonly sourceRefs: readonly string[];
1591
+ readonly onAccept: () => Promise<AcceptResult>;
1592
+ readonly onDecline: () => Promise<void>;
1593
+ }
1594
+ /**
1595
+ * Placement action chosen by the proposer. Four kinds cover the full
1596
+ * lifecycle of topic-aware capture; the proposer biases toward the *least*
1597
+ * structural change consistent with the captured content.
1598
+ *
1599
+ * Preference order (extend before create):
1600
+ * `append-section` > `create-file` > `create-folder` > `update-file`
1601
+ *
1602
+ * - `create-folder` — topic is new; create the folder and seed the first
1603
+ * file inside it.
1604
+ * - `create-file` — topic folder exists; create a new sibling file. The
1605
+ * proposer chose this because the content does not belong in any
1606
+ * existing file in the folder.
1607
+ * - `append-section` — an existing file is the right home; append a new
1608
+ * `## <sectionHeader>` section to it. Use this for an ongoing topic
1609
+ * where the new content is an addition, not a rewrite.
1610
+ * - `update-file` — an existing file needs in-place revision (status
1611
+ * update, factual correction, summary refresh). Rare; prefer
1612
+ * `append-section` when the new content is additive.
1613
+ *
1614
+ * All paths are relative to `data/` so proposals never embed absolute paths
1615
+ * (proposals can be serialized into `_proactive-curator/` and re-evaluated
1616
+ * later without being tied to a particular workspace location).
1617
+ */
1618
+ type ProposalAction = {
1619
+ readonly kind: "create-folder";
1620
+ readonly folderPath: string;
1621
+ readonly filename: string;
1622
+ readonly body: string;
1623
+ } | {
1624
+ readonly kind: "create-file";
1625
+ readonly folderPath: string;
1626
+ readonly filename: string;
1627
+ readonly body: string;
1628
+ } | {
1629
+ readonly kind: "append-section";
1630
+ readonly filePath: string;
1631
+ readonly sectionHeader: string;
1632
+ readonly body: string;
1633
+ } | {
1634
+ readonly kind: "update-file";
1635
+ readonly filePath: string;
1636
+ readonly body: string;
1637
+ readonly reason: string;
1638
+ };
1639
+ /**
1640
+ * Result returned by {@link Proposal.onAccept}. The host uses this to
1641
+ * confirm the write succeeded and to surface the next-action hint to the
1642
+ * user in plain language.
1643
+ */
1644
+ interface AcceptResult {
1645
+ readonly writtenPath: string;
1646
+ readonly actionApplied: ProposalAction["kind"];
1647
+ readonly nextActionHint?: string;
1648
+ }
1649
+
1650
+ /**
1651
+ * Input to {@link computeFingerprint}. Two shapes — one per surface — share
1652
+ * a single function so the decline store can carry both kinds of
1653
+ * fingerprints in the same lookup set.
1654
+ *
1655
+ * The action-aware fingerprint is the load-bearing design choice: declining
1656
+ * an `append-section` proposal for topic X does *not* prevent a later
1657
+ * `create-file` proposal for the same topic from surfacing. The LLM's
1658
+ * placement decision is part of the fingerprint, so a shifted decision is
1659
+ * a new proposal.
1660
+ */
1661
+ type FingerprintInput = {
1662
+ readonly kind: "capture-insight";
1663
+ readonly turnIds: readonly string[];
1664
+ readonly topic: string;
1665
+ readonly actionKind: ProposalAction["kind"];
1666
+ readonly targetPath: string;
1667
+ } | {
1668
+ readonly kind: "create-hub";
1669
+ readonly topic: string;
1670
+ readonly sourceDocs: readonly string[];
1671
+ readonly actionKind: ProposalAction["kind"];
1672
+ readonly targetPath: string;
1673
+ };
1674
+ /**
1675
+ * Compute a stable 16-hex-char fingerprint for a proposal. Stable means:
1676
+ * identical logical input — regardless of source ordering of array fields or
1677
+ * path separator style — produces an identical fingerprint, so the decline
1678
+ * lookup is reliable across machines (work / home) and across path-separator
1679
+ * regimes (Windows backslash vs POSIX slash).
1680
+ *
1681
+ * SHA-256 truncated to 16 hex chars (64 bits) is enough collision resistance
1682
+ * for a per-instance decline set; the full hash adds storage with no
1683
+ * practical benefit at this scale.
1684
+ */
1685
+ declare function computeFingerprint(input: FingerprintInput): string;
1686
+
1687
+ type ProposalKind = "capture-insight" | "create-hub";
1688
+ interface DeclinedEntry {
1689
+ /** ISO-8601 timestamp of when the user declined. */
1690
+ readonly declinedAt: string;
1691
+ /** Topic slug at decline time (for the audit trail; not part of the fingerprint). */
1692
+ readonly topic: string;
1693
+ /** ISO-8601 timestamp after which this entry is eligible for re-evaluation. */
1694
+ readonly expiresAt: string;
1695
+ /** The action the user declined — `create-file`, `append-section`, etc. */
1696
+ readonly actionKind: ProposalAction["kind"];
1697
+ /** Target path the declined action would have written/touched (data-relative). */
1698
+ readonly targetPath: string;
1699
+ /** Hub proposals only — the source-doc cluster that triggered this proposal. */
1700
+ readonly sourceDocs?: readonly string[];
1701
+ }
1702
+ /**
1703
+ * Load the active (un-expired) declined fingerprints. The returned set is
1704
+ * what {@link ProposerContext.declinedFingerprints} carries during
1705
+ * `evaluate()` so the proposer can do its decline check without filesystem
1706
+ * access at evaluation time.
1707
+ *
1708
+ * Missing or corrupt store files return an empty set rather than throwing —
1709
+ * a first-run instance simply has nothing declined.
1710
+ */
1711
+ declare function loadDeclinedFingerprints(cwd: string, now: Date): Promise<ReadonlySet<string>>;
1712
+ /**
1713
+ * Persist a decline. Purges expired entries from disk in the same write so
1714
+ * the store does not grow unbounded.
1715
+ */
1716
+ declare function recordDecline(cwd: string, args: {
1717
+ readonly kind: ProposalKind;
1718
+ readonly fingerprint: string;
1719
+ readonly topic: string;
1720
+ readonly actionKind: ProposalAction["kind"];
1721
+ readonly targetPath: string;
1722
+ readonly sourceDocs?: readonly string[];
1723
+ readonly now: Date;
1724
+ readonly expiryDays?: number;
1725
+ }): Promise<void>;
1726
+ /**
1727
+ * Append an acceptance record to the audit trail. Newline-delimited JSON so
1728
+ * the file is grep-friendly and tail-friendly without a parser.
1729
+ */
1730
+ declare function recordAcceptance(cwd: string, args: {
1731
+ readonly kind: ProposalKind;
1732
+ readonly fingerprint: string;
1733
+ readonly topic: string;
1734
+ readonly actionKind: ProposalAction["kind"];
1735
+ readonly writtenPath: string;
1736
+ readonly now: Date;
1737
+ }): Promise<void>;
1738
+ /**
1739
+ * Clear declined entries. Optional `kind` argument scopes the reset to
1740
+ * just one surface. Called by `/curate --reset-declined` (sub-phase c).
1741
+ * Missing store file is a no-op — nothing to reset.
1742
+ */
1743
+ declare function resetDeclined(cwd: string, kind?: ProposalKind): Promise<void>;
1744
+
1745
+ interface InsightProposerOptions {
1746
+ /** Below this token count the proposer never asks the LLM. */
1747
+ readonly minTokensAccumulated: number;
1748
+ /** Below this turn count the proposer never asks the LLM. */
1749
+ readonly minTurnsBeforeFirstCheck: number;
1750
+ /**
1751
+ * Cap on how many topic folders to surface to the placement LLM call.
1752
+ * Large instance trees will exceed any practical LLM context budget;
1753
+ * truncation keeps the call tractable. Default 100.
1754
+ */
1755
+ readonly maxTreeEntries?: number;
1756
+ /** Days after which a decline becomes eligible for re-evaluation. */
1757
+ readonly declineExpiryDays?: number;
1758
+ }
1759
+ interface TurnRecord {
1760
+ readonly turnId: string;
1761
+ readonly role: "user" | "assistant" | "system";
1762
+ readonly content: string;
1763
+ }
1764
+ interface InsightInput {
1765
+ readonly recentTurns: readonly TurnRecord[];
1766
+ readonly accumulatedTokens: number;
1767
+ }
1768
+ interface InsightProposal extends Proposal {
1769
+ readonly kind: "capture-insight";
1770
+ }
1771
+ interface TopicFile {
1772
+ readonly path: string;
1773
+ readonly filename: string;
1774
+ readonly frontmatterTopic?: string;
1775
+ readonly tags?: readonly string[];
1776
+ }
1777
+ interface TopicFolderSnapshot {
1778
+ readonly path: string;
1779
+ readonly files: readonly TopicFile[];
1780
+ }
1781
+ interface TopicTreeSnapshot {
1782
+ readonly folders: readonly TopicFolderSnapshot[];
1783
+ /** True when the scan was truncated by `maxTreeEntries`. */
1784
+ readonly truncated: boolean;
1785
+ }
1786
+ declare class InsightProposer implements Proposer<InsightInput, InsightProposal> {
1787
+ private readonly options;
1788
+ readonly kind = "capture-insight";
1789
+ constructor(options: InsightProposerOptions);
1790
+ evaluate(input: InsightInput, ctx: ProposerContext): Promise<InsightProposal | null>;
1791
+ }
1792
+
1793
+ interface HubProposerOptions {
1794
+ /** Threshold for triggering propose-veto LLM gate. Below this, no proposal. Default 3. */
1795
+ readonly weakSignalAt: number;
1796
+ /** Threshold for switching to suppress-veto LLM gate. Default 5. */
1797
+ readonly strongSignalAt: number;
1798
+ /**
1799
+ * Content categories (data-relative) to scan for topic clusters. Default
1800
+ * `worklog`, `decision-log`, `runbooks`. Hub itself, `_memory/`, and the
1801
+ * curator's own `_proactive-curator/` are never scanned (a hub-of-hubs
1802
+ * is out of scope; memory is not topical content).
1803
+ */
1804
+ readonly scanCategories?: readonly string[];
1805
+ /** Decline expiry in days. Default 30. */
1806
+ readonly declineExpiryDays?: number;
1807
+ }
1808
+ interface HubInput {
1809
+ /**
1810
+ * Hub evaluation has no per-call input beyond context — the filesystem is
1811
+ * the input. This shape is kept for future extension (e.g. a hint to scan
1812
+ * only a specific category) without breaking the `Proposer<Input, P>`
1813
+ * contract.
1814
+ */
1815
+ readonly hint?: {
1816
+ readonly onlyCategories?: readonly string[];
1817
+ };
1818
+ }
1819
+ interface HubProposal extends Proposal {
1820
+ readonly kind: "create-hub";
1821
+ }
1822
+ declare class HubProposer implements Proposer<HubInput, HubProposal> {
1823
+ private readonly options;
1824
+ readonly kind = "create-hub";
1825
+ constructor(options: HubProposerOptions);
1826
+ evaluate(input: HubInput, ctx: ProposerContext): Promise<HubProposal | null>;
1827
+ }
1828
+
1829
+ /**
1830
+ * Sliding buffer of recent conversation turns. The host pushes each turn as
1831
+ * it occurs; the buffer caps at `maxTurns` and discards the oldest entries
1832
+ * past the cap. Token count is estimated cheaply so the host can poll
1833
+ * `tokenCount()` to decide when InsightProposer's threshold has been met.
1834
+ *
1835
+ * Default estimator is `chars / 4` — a rough baseline that overshoots for
1836
+ * CJK content and undershoots for ASCII code. Hosts that have a real
1837
+ * tokenizer can inject one via the `estimator` option.
1838
+ *
1839
+ * The buffer is process-local and not persisted — a new session starts
1840
+ * with an empty buffer, which is the intended UX (proactive proposals are
1841
+ * about *this conversation*, not a re-ingestion of past sessions; that is
1842
+ * what `memory-extended/consolidate` is for).
1843
+ */
1844
+ declare class TurnBuffer {
1845
+ private readonly turns;
1846
+ private readonly maxTurns;
1847
+ private readonly estimator;
1848
+ constructor(options?: {
1849
+ readonly maxTurns?: number;
1850
+ readonly estimator?: (turn: TurnRecord) => number;
1851
+ });
1852
+ /** Append a turn, evicting the oldest entry if the buffer is full. */
1853
+ add(turn: TurnRecord): void;
1854
+ /** Return the most recent `n` turns (or fewer if the buffer has fewer). */
1855
+ recent(n: number): readonly TurnRecord[];
1856
+ /** Number of turns currently buffered. */
1857
+ get length(): number;
1858
+ /** Estimated total token count over the entire buffer. */
1859
+ tokenCount(): number;
1860
+ /** Reset the buffer — typically called at session-end. */
1861
+ clear(): void;
1862
+ }
1863
+ /**
1864
+ * Backpressure controller for ambient mid-session triggers. When the user
1865
+ * declines several proposals in a row, the controller flips into
1866
+ * `active=true` and the host should pause ambient evaluations for the
1867
+ * remainder of the session. Manual `/curate` invocations are still
1868
+ * allowed — the controller exists only to suppress unsolicited prompts.
1869
+ *
1870
+ * Reset semantics:
1871
+ * - `recordAccept()` — any acceptance clears the streak.
1872
+ * - `recordIgnored()` — proposals the host surfaced but the user did not
1873
+ * explicitly accept/decline do not count toward the streak.
1874
+ * - `reset()` — explicit reset, used by `/curate` (the user re-engaging
1875
+ * after backpressure kicked in).
1876
+ */
1877
+ declare class AmbientBackpressure {
1878
+ private declineStreak;
1879
+ private readonly maxStreak;
1880
+ constructor(options?: {
1881
+ readonly maxStreak?: number;
1882
+ });
1883
+ /** Record a user decline. Counts toward backpressure. */
1884
+ recordDecline(): void;
1885
+ /** Record a user acceptance. Clears the streak. */
1886
+ recordAccept(): void;
1887
+ /** Explicit reset (e.g. user runs `/curate` after backpressure activated). */
1888
+ reset(): void;
1889
+ /** True when the streak has reached the maximum and ambient should pause. */
1890
+ isActive(): boolean;
1891
+ /** Current decline streak — exposed for diagnostics. */
1892
+ get streak(): number;
1893
+ }
1894
+
1895
+ /**
1896
+ * Minimal shape of a recall hit the ambient recaller consumes.
1897
+ *
1898
+ * Defined locally — `proactive-curator` does not depend on
1899
+ * `@vortex-os/memory-extended`. The host injects a {@link RecallFn} whose
1900
+ * result structurally satisfies this shape (memory-extended's `RecallHit`
1901
+ * carries all of these fields plus a few extra, so the wiring is
1902
+ * zero-friction). This mirrors how `LLMJudge` keeps the host's LLM facility
1903
+ * behind an injected adapter: the recall *engine* lives in another package;
1904
+ * the *decision of when to surface a hit in conversation* lives here.
1905
+ */
1906
+ interface AmbientRecallHit {
1907
+ readonly id: string;
1908
+ /** Cosine similarity to the query (1 = identical direction). */
1909
+ readonly score: number;
1910
+ readonly name: string;
1911
+ /** Short body excerpt for the host to weave into prose. */
1912
+ readonly excerpt: string;
1913
+ /** Corpus the hit came from (e.g. "memory", "session-archive"). */
1914
+ readonly source: string;
1915
+ readonly type: string;
1916
+ readonly updated: string | null;
1917
+ readonly tags: readonly string[];
1918
+ }
1919
+ /**
1920
+ * Host-injected recall function. The host wires its `memory-extended` recall
1921
+ * engine (sqlite + vector + embedder + session chunks) behind this single
1922
+ * call so the recaller stays engine-agnostic and `proactive-curator` stays
1923
+ * free of any `memory-extended` dependency.
1924
+ */
1925
+ interface RecallFn {
1926
+ (query: string, opts?: {
1927
+ readonly k?: number;
1928
+ }): Promise<{
1929
+ readonly hits: readonly AmbientRecallHit[];
1930
+ }>;
1931
+ }
1932
+ /** One surfaced suggestion — a recall hit that passed the ambient gate. */
1933
+ interface RecallSuggestion {
1934
+ readonly hit: AmbientRecallHit;
1935
+ /** Convenience copy of `hit.score` (the gate's ranking key). */
1936
+ readonly score: number;
1937
+ }
1938
+ /**
1939
+ * Result of one {@link AmbientRecaller.consider} call. Carries the surviving
1940
+ * suggestion(s) plus diagnostics (how many hits the engine returned, how many
1941
+ * each gate dropped) so an instance can tune `minScore` against real
1942
+ * conversations rather than guessing.
1943
+ */
1944
+ interface AmbientRecallResult {
1945
+ /** Hits that passed every gate, best-first, capped at `maxSuggestions`. */
1946
+ readonly suggestions: readonly RecallSuggestion[];
1947
+ /** True when backpressure is active — the recaller stayed silent. */
1948
+ readonly suppressed: boolean;
1949
+ /** The query actually used (derived or explicit); null if none/empty. */
1950
+ readonly query: string | null;
1951
+ /** Hits returned by the engine before filtering (transparency for tuning). */
1952
+ readonly considered: number;
1953
+ /** Hits dropped for scoring below `minScore`. */
1954
+ readonly belowThreshold: number;
1955
+ /** Hits dropped as already surfaced earlier this session. */
1956
+ readonly deduped: number;
1957
+ }
1958
+ interface AmbientRecallerOptions {
1959
+ readonly recall: RecallFn;
1960
+ /**
1961
+ * Minimum cosine score for a hit to be worth surfacing unprompted. The
1962
+ * single most important tuning knob — too low surfaces noise (naggy), too
1963
+ * high never fires. The right value depends on the embedder; calibrate per
1964
+ * instance against real conversations (the result diagnostics help). The
1965
+ * default 0.5 is a conservative starting point for the bundled e5-small
1966
+ * embedder.
1967
+ */
1968
+ readonly minScore?: number;
1969
+ /** Max suggestions per `consider()`. Default 1 — ambient is one nudge, not a list. */
1970
+ readonly maxSuggestions?: number;
1971
+ /** Below this query length, do not even call the engine. Default 12. */
1972
+ readonly minQueryChars?: number;
1973
+ /**
1974
+ * How many candidates to ask the engine for. Defaults to
1975
+ * `maxSuggestions + 4` so dedup/threshold filtering has headroom.
1976
+ */
1977
+ readonly candidateK?: number;
1978
+ /** Shared backpressure controller. Omit to use a fresh one. */
1979
+ readonly backpressure?: AmbientBackpressure;
1980
+ }
1981
+ /**
1982
+ * Decides *whether* and *which* past memory to surface in the flow of a live
1983
+ * conversation — the ambient counterpart to the explicit `/recall` command
1984
+ * (memory-extended-design.md deferred this "notice and offer" reliability to
1985
+ * a proactive-curator-connected follow-up; this is it).
1986
+ *
1987
+ * It does not embed, search, or format anything itself. It takes the recent
1988
+ * conversation, derives a query, asks the injected recall engine, and applies
1989
+ * three gates so the surface stays useful and non-naggy:
1990
+ *
1991
+ * 1. **Backpressure** — after N consecutive declines (see
1992
+ * {@link AmbientBackpressure}) it goes silent for the rest of the session.
1993
+ * 2. **Score threshold** — only confident hits surface.
1994
+ * 3. **Session dedup** — a hit already offered this session is not re-offered.
1995
+ *
1996
+ * Stateful by design (the dedup set + backpressure streak live across turns),
1997
+ * so a host keeps ONE instance alive for the session — a long-lived runtime
1998
+ * or the opt-in embedder daemon. A stateless per-call host (a plain slash
1999
+ * command) cannot carry the gate state; that is exactly why the default
2000
+ * Claude Code surface is agent-guidance, not a command (see the design docs).
2001
+ */
2002
+ declare class AmbientRecaller {
2003
+ private readonly recall;
2004
+ private readonly minScore;
2005
+ private readonly maxSuggestions;
2006
+ private readonly minQueryChars;
2007
+ private readonly candidateK;
2008
+ private readonly backpressure;
2009
+ private readonly surfaced;
2010
+ constructor(options: AmbientRecallerOptions);
2011
+ /**
2012
+ * Consider surfacing a memory given the current conversation. Pass an
2013
+ * explicit `query` (the host knows what the user is referencing) or recent
2014
+ * `turns` to derive one from. Returns the gated suggestions plus diagnostics.
2015
+ *
2016
+ * Does not catch errors from the injected engine — a failing embedder
2017
+ * should surface to the host (which decides whether to swallow it for the
2018
+ * turn), not be masked here.
2019
+ */
2020
+ consider(input: {
2021
+ readonly query?: string;
2022
+ readonly turns?: readonly TurnRecord[];
2023
+ }): Promise<AmbientRecallResult>;
2024
+ /** The user engaged with a surfaced suggestion — clears the decline streak. */
2025
+ recordAccept(): void;
2026
+ /** The user dismissed a surfaced suggestion — counts toward backpressure. */
2027
+ recordDecline(): void;
2028
+ /** True when backpressure has silenced ambient surfacing for the session. */
2029
+ get suppressed(): boolean;
2030
+ /**
2031
+ * Re-engage after backpressure (the user explicitly asks for suggestions
2032
+ * again, e.g. via `/curate`). Clears the decline streak AND the dedup set
2033
+ * so previously surfaced hits can be offered again.
2034
+ */
2035
+ reset(): void;
2036
+ }
2037
+ /**
2038
+ * Build a recall query from recent turns. Uses the most recent *user* turn —
2039
+ * in ambient use the trigger is the user's latest utterance ("didn't I do
2040
+ * this before?"), and that utterance is the query. Falls back to the most
2041
+ * recent turn of any role if the window has no user turn.
2042
+ */
2043
+ declare function deriveQueryFromTurns(turns: readonly TurnRecord[]): string;
2044
+
2045
+ /**
2046
+ * Shared building blocks for host `LLMJudge` adapters that work by injecting a
2047
+ * single-shot "prompt in, string out" call.
2048
+ *
2049
+ * Every first-party host (Claude Code, Codex, Gemini, Claude Desktop) reaches
2050
+ * its LLM differently — a sub-agent tool call, an inline completion, an MCP
2051
+ * call, a desktop surface — but that difference is entirely in the *raw
2052
+ * invoker* the host injects. The work *around* the call is identical: frame
2053
+ * the proposer's prompt so the model returns only the requested shape, then
2054
+ * parse the raw response tolerantly. That shared work lives here so each host
2055
+ * adapter is a thin shell over one injected function (the design's
2056
+ * "subsequent hosts inherit the pattern").
2057
+ */
2058
+ /** A host's single-shot LLM call: a prompt in, a raw string out. */
2059
+ interface InjectedInvoker {
2060
+ (input: {
2061
+ readonly prompt: string;
2062
+ }): Promise<string>;
2063
+ }
2064
+ /**
2065
+ * Base error for injected-host LLMJudge adapters. Each host subclass narrows
2066
+ * the `name` (e.g. `ClaudeCodeLLMJudgeError`) so callers can distinguish the
2067
+ * source host while still catching the family with `instanceof LLMJudgeError`.
2068
+ */
2069
+ declare class LLMJudgeError extends Error {
2070
+ readonly raw?: string | undefined;
2071
+ constructor(message: string, raw?: string | undefined);
2072
+ }
2073
+ /**
2074
+ * Frame a proposer prompt for a single-shot host LLM call. Host-agnostic —
2075
+ * the instruction constrains the response to the expected shape and names no
2076
+ * host facility, so every adapter shares it verbatim.
2077
+ */
2078
+ declare function frameForJudge(prompt: string, expected: ExpectedShape): string;
2079
+ /**
2080
+ * Parse a raw host response into the expected shape. Strings pass through
2081
+ * trimmed; JSON answers are extracted tolerantly (a leading/trailing ```json
2082
+ * fence, or a sentence wrapped around the object) and `JSON.parse`'d.
2083
+ * Persistent format failure throws via the injected `makeError` factory so
2084
+ * each adapter raises its own typed error rather than the base masking it.
2085
+ */
2086
+ declare function parseJudgeResponse(raw: string, expected: ExpectedShape, makeError: (message: string, raw?: string) => Error): unknown;
2087
+ /**
2088
+ * Shared base for host adapters built on an injected invoker. The base owns
2089
+ * framing + parsing; a subclass declares only the host id and (optionally)
2090
+ * overrides {@link makeError} to raise a host-named error type.
2091
+ */
2092
+ declare abstract class InjectedLLMJudge implements LLMJudge {
2093
+ protected readonly invoker: InjectedInvoker;
2094
+ abstract readonly host: string;
2095
+ constructor(invoker: InjectedInvoker);
2096
+ /** Host adapters override to raise a host-named error subclass. */
2097
+ protected makeError(message: string, raw?: string): Error;
2098
+ ask(prompt: string, expected: ExpectedShape): Promise<unknown>;
2099
+ }
2100
+
2101
+ /**
2102
+ * Claude Code host adapter for `LLMJudge`.
2103
+ *
2104
+ * Claude Code's natural surface for a single-shot decision query is a
2105
+ * **sub-agent tool call** — a separate, ephemeral agent invoked by the outer
2106
+ * session with a focused prompt, returning its single answer. The adapter
2107
+ * does not know how to invoke a sub-agent itself (that is Claude Code runtime
2108
+ * territory); the host injects an invoker callback at construction time, and
2109
+ * the shared {@link InjectedLLMJudge} base handles prompt framing + tolerant
2110
+ * response parsing on top of it.
2111
+ *
2112
+ * The invoker callback is intentionally minimal — a single async function
2113
+ * that takes a string and returns a string. Hosts that want to thread
2114
+ * additional metadata (session id, tool budget) can capture them in the
2115
+ * closure when they create the invoker.
2116
+ */
2117
+ /** Claude Code's sub-agent invoker — a `prompt in, string out` call. */
2118
+ type ClaudeCodeSubAgentInvoker = InjectedInvoker;
2119
+ declare class ClaudeCodeLLMJudgeError extends LLMJudgeError {
2120
+ constructor(message: string, raw?: string);
2121
+ }
2122
+ declare class ClaudeCodeLLMJudge extends InjectedLLMJudge {
2123
+ readonly host = "claude-code";
2124
+ protected makeError(message: string, raw?: string): Error;
2125
+ }
2126
+
2127
+ /**
2128
+ * Codex CLI host adapter for `LLMJudge`.
2129
+ *
2130
+ * Codex's natural surface for a single-shot decision query is an **inline
2131
+ * completion** — the host runs the framed prompt as a one-off completion and
2132
+ * returns the text. As with every adapter, the host injects that call; the
2133
+ * shared base supplies framing + parsing. The only host-specific surface here
2134
+ * is the `host` identifier (`"codex"`, matching the sessionArchive adapter
2135
+ * convention) and the typed error.
2136
+ */
2137
+ /** Codex's inline-completion invoker — a `prompt in, string out` call. */
2138
+ type CodexCompletionInvoker = InjectedInvoker;
2139
+ declare class CodexLLMJudgeError extends LLMJudgeError {
2140
+ constructor(message: string, raw?: string);
2141
+ }
2142
+ declare class CodexLLMJudge extends InjectedLLMJudge {
2143
+ readonly host = "codex";
2144
+ protected makeError(message: string, raw?: string): Error;
2145
+ }
2146
+
2147
+ /**
2148
+ * Gemini CLI host adapter for `LLMJudge`.
2149
+ *
2150
+ * Gemini's natural surface for a single-shot decision query is an **MCP call**
2151
+ * — the host routes the framed prompt through its model-call tool and returns
2152
+ * the text. The host injects that call; the shared base supplies framing +
2153
+ * parsing. Host-specific surface is the `host` identifier (`"gemini"`,
2154
+ * matching the sessionArchive adapter convention) and the typed error.
2155
+ */
2156
+ /** Gemini's MCP-call invoker — a `prompt in, string out` call. */
2157
+ type GeminiMcpInvoker = InjectedInvoker;
2158
+ declare class GeminiLLMJudgeError extends LLMJudgeError {
2159
+ constructor(message: string, raw?: string);
2160
+ }
2161
+ declare class GeminiLLMJudge extends InjectedLLMJudge {
2162
+ readonly host = "gemini";
2163
+ protected makeError(message: string, raw?: string): Error;
2164
+ }
2165
+
2166
+ /**
2167
+ * Claude Desktop host adapter for `LLMJudge`.
2168
+ *
2169
+ * Claude Desktop's natural surface for a single-shot decision query is a
2170
+ * **response on its own conversation surface** — the host poses the framed
2171
+ * prompt and returns the model's reply. The host injects that call; the
2172
+ * shared base supplies framing + parsing. Host-specific surface is the `host`
2173
+ * identifier (`"claude-desktop"`, matching the sessionArchive adapter
2174
+ * convention) and the typed error.
2175
+ */
2176
+ /** Claude Desktop's response invoker — a `prompt in, string out` call. */
2177
+ type ClaudeDesktopInvoker = InjectedInvoker;
2178
+ declare class ClaudeDesktopLLMJudgeError extends LLMJudgeError {
2179
+ constructor(message: string, raw?: string);
2180
+ }
2181
+ declare class ClaudeDesktopLLMJudge extends InjectedLLMJudge {
2182
+ readonly host = "claude-desktop";
2183
+ protected makeError(message: string, raw?: string): Error;
2184
+ }
2185
+
2186
+ //# sourceMappingURL=index.d.ts.map
2187
+
2188
+ type index_d$1_AcceptResult = AcceptResult;
2189
+ type index_d$1_AmbientBackpressure = AmbientBackpressure;
2190
+ declare const index_d$1_AmbientBackpressure: typeof AmbientBackpressure;
2191
+ type index_d$1_AmbientRecallHit = AmbientRecallHit;
2192
+ type index_d$1_AmbientRecallResult = AmbientRecallResult;
2193
+ type index_d$1_AmbientRecaller = AmbientRecaller;
2194
+ declare const index_d$1_AmbientRecaller: typeof AmbientRecaller;
2195
+ type index_d$1_AmbientRecallerOptions = AmbientRecallerOptions;
2196
+ type index_d$1_ClaudeCodeLLMJudge = ClaudeCodeLLMJudge;
2197
+ declare const index_d$1_ClaudeCodeLLMJudge: typeof ClaudeCodeLLMJudge;
2198
+ type index_d$1_ClaudeCodeLLMJudgeError = ClaudeCodeLLMJudgeError;
2199
+ declare const index_d$1_ClaudeCodeLLMJudgeError: typeof ClaudeCodeLLMJudgeError;
2200
+ type index_d$1_ClaudeCodeSubAgentInvoker = ClaudeCodeSubAgentInvoker;
2201
+ type index_d$1_ClaudeDesktopInvoker = ClaudeDesktopInvoker;
2202
+ type index_d$1_ClaudeDesktopLLMJudge = ClaudeDesktopLLMJudge;
2203
+ declare const index_d$1_ClaudeDesktopLLMJudge: typeof ClaudeDesktopLLMJudge;
2204
+ type index_d$1_ClaudeDesktopLLMJudgeError = ClaudeDesktopLLMJudgeError;
2205
+ declare const index_d$1_ClaudeDesktopLLMJudgeError: typeof ClaudeDesktopLLMJudgeError;
2206
+ type index_d$1_CodexCompletionInvoker = CodexCompletionInvoker;
2207
+ type index_d$1_CodexLLMJudge = CodexLLMJudge;
2208
+ declare const index_d$1_CodexLLMJudge: typeof CodexLLMJudge;
2209
+ type index_d$1_CodexLLMJudgeError = CodexLLMJudgeError;
2210
+ declare const index_d$1_CodexLLMJudgeError: typeof CodexLLMJudgeError;
2211
+ type index_d$1_DeclinedEntry = DeclinedEntry;
2212
+ type index_d$1_ExpectedShape = ExpectedShape;
2213
+ type index_d$1_FingerprintInput = FingerprintInput;
2214
+ type index_d$1_GeminiLLMJudge = GeminiLLMJudge;
2215
+ declare const index_d$1_GeminiLLMJudge: typeof GeminiLLMJudge;
2216
+ type index_d$1_GeminiLLMJudgeError = GeminiLLMJudgeError;
2217
+ declare const index_d$1_GeminiLLMJudgeError: typeof GeminiLLMJudgeError;
2218
+ type index_d$1_GeminiMcpInvoker = GeminiMcpInvoker;
2219
+ type index_d$1_HubInput = HubInput;
2220
+ type index_d$1_HubProposal = HubProposal;
2221
+ type index_d$1_HubProposer = HubProposer;
2222
+ declare const index_d$1_HubProposer: typeof HubProposer;
2223
+ type index_d$1_HubProposerOptions = HubProposerOptions;
2224
+ type index_d$1_InjectedInvoker = InjectedInvoker;
2225
+ type index_d$1_InjectedLLMJudge = InjectedLLMJudge;
2226
+ declare const index_d$1_InjectedLLMJudge: typeof InjectedLLMJudge;
2227
+ type index_d$1_InsightInput = InsightInput;
2228
+ type index_d$1_InsightProposal = InsightProposal;
2229
+ type index_d$1_InsightProposer = InsightProposer;
2230
+ declare const index_d$1_InsightProposer: typeof InsightProposer;
2231
+ type index_d$1_InsightProposerOptions = InsightProposerOptions;
2232
+ type index_d$1_LLMJudge = LLMJudge;
2233
+ type index_d$1_LLMJudgeError = LLMJudgeError;
2234
+ declare const index_d$1_LLMJudgeError: typeof LLMJudgeError;
2235
+ type index_d$1_Proposal = Proposal;
2236
+ type index_d$1_ProposalAction = ProposalAction;
2237
+ type index_d$1_ProposalKind = ProposalKind;
2238
+ type index_d$1_Proposer<Input, P extends Proposal = Proposal> = Proposer<Input, P>;
2239
+ type index_d$1_ProposerContext = ProposerContext;
2240
+ type index_d$1_RecallFn = RecallFn;
2241
+ type index_d$1_RecallSuggestion = RecallSuggestion;
2242
+ type index_d$1_TopicTreeSnapshot = TopicTreeSnapshot;
2243
+ type index_d$1_TurnBuffer = TurnBuffer;
2244
+ declare const index_d$1_TurnBuffer: typeof TurnBuffer;
2245
+ type index_d$1_TurnRecord = TurnRecord;
2246
+ declare const index_d$1_computeFingerprint: typeof computeFingerprint;
2247
+ declare const index_d$1_deriveQueryFromTurns: typeof deriveQueryFromTurns;
2248
+ declare const index_d$1_frameForJudge: typeof frameForJudge;
2249
+ declare const index_d$1_loadDeclinedFingerprints: typeof loadDeclinedFingerprints;
2250
+ declare const index_d$1_parseJudgeResponse: typeof parseJudgeResponse;
2251
+ declare const index_d$1_recordAcceptance: typeof recordAcceptance;
2252
+ declare const index_d$1_recordDecline: typeof recordDecline;
2253
+ declare const index_d$1_resetDeclined: typeof resetDeclined;
1381
2254
  declare namespace index_d$1 {
1382
- export { type index_d$1_BrokenLink as BrokenLink, type index_d$1_BuildIndexOptions as BuildIndexOptions, type index_d$1_CheckDirectoryOptions as CheckDirectoryOptions, type index_d$1_FileIndex as FileIndex, type index_d$1_FileRewrite as FileRewrite, type index_d$1_LinkCheckResult as LinkCheckResult, type index_d$1_RedirectionMap as RedirectionMap, type index_d$1_ResolveOpts as ResolveOpts, type index_d$1_ResolveOutcome as ResolveOutcome, type index_d$1_RewriteOptions as RewriteOptions, type index_d$1_RewriteResult as RewriteResult, type index_d$1_WikiLink as WikiLink, index_d$1_buildFileIndex as buildFileIndex, index_d$1_checkDirectory as checkDirectory, index_d$1_extractWikiLinks as extractWikiLinks, index_d$1_resolveLink as resolveLink, index_d$1_rewriteBody as rewriteBody, index_d$1_rewriteDirectory as rewriteDirectory, index_d$1_toRel as toRel, index_d$1_topBrokenTargets as topBrokenTargets };
2255
+ export { type index_d$1_AcceptResult as AcceptResult, index_d$1_AmbientBackpressure as AmbientBackpressure, type index_d$1_AmbientRecallHit as AmbientRecallHit, type index_d$1_AmbientRecallResult as AmbientRecallResult, index_d$1_AmbientRecaller as AmbientRecaller, type index_d$1_AmbientRecallerOptions as AmbientRecallerOptions, index_d$1_ClaudeCodeLLMJudge as ClaudeCodeLLMJudge, index_d$1_ClaudeCodeLLMJudgeError as ClaudeCodeLLMJudgeError, type index_d$1_ClaudeCodeSubAgentInvoker as ClaudeCodeSubAgentInvoker, type index_d$1_ClaudeDesktopInvoker as ClaudeDesktopInvoker, index_d$1_ClaudeDesktopLLMJudge as ClaudeDesktopLLMJudge, index_d$1_ClaudeDesktopLLMJudgeError as ClaudeDesktopLLMJudgeError, type index_d$1_CodexCompletionInvoker as CodexCompletionInvoker, index_d$1_CodexLLMJudge as CodexLLMJudge, index_d$1_CodexLLMJudgeError as CodexLLMJudgeError, type index_d$1_DeclinedEntry as DeclinedEntry, type index_d$1_ExpectedShape as ExpectedShape, type index_d$1_FingerprintInput as FingerprintInput, index_d$1_GeminiLLMJudge as GeminiLLMJudge, index_d$1_GeminiLLMJudgeError as GeminiLLMJudgeError, type index_d$1_GeminiMcpInvoker as GeminiMcpInvoker, type index_d$1_HubInput as HubInput, type index_d$1_HubProposal as HubProposal, index_d$1_HubProposer as HubProposer, type index_d$1_HubProposerOptions as HubProposerOptions, type index_d$1_InjectedInvoker as InjectedInvoker, index_d$1_InjectedLLMJudge as InjectedLLMJudge, type index_d$1_InsightInput as InsightInput, type index_d$1_InsightProposal as InsightProposal, index_d$1_InsightProposer as InsightProposer, type index_d$1_InsightProposerOptions as InsightProposerOptions, type index_d$1_LLMJudge as LLMJudge, index_d$1_LLMJudgeError as LLMJudgeError, type index_d$1_Proposal as Proposal, type index_d$1_ProposalAction as ProposalAction, type index_d$1_ProposalKind as ProposalKind, type index_d$1_Proposer as Proposer, type index_d$1_ProposerContext as ProposerContext, type index_d$1_RecallFn as RecallFn, type index_d$1_RecallSuggestion as RecallSuggestion, type index_d$1_TopicTreeSnapshot as TopicTreeSnapshot, index_d$1_TurnBuffer as TurnBuffer, type index_d$1_TurnRecord as TurnRecord, index_d$1_computeFingerprint as computeFingerprint, index_d$1_deriveQueryFromTurns as deriveQueryFromTurns, index_d$1_frameForJudge as frameForJudge, index_d$1_loadDeclinedFingerprints as loadDeclinedFingerprints, index_d$1_parseJudgeResponse as parseJudgeResponse, index_d$1_recordAcceptance as recordAcceptance, index_d$1_recordDecline as recordDecline, index_d$1_resetDeclined as resetDeclined };
2256
+ }
2257
+
2258
+ /**
2259
+ * `/curate` — surface accumulated proposals from the proactive-curator
2260
+ * module. Two surfaces share one command:
2261
+ *
2262
+ * - `/curate` — run both proposers; surface any results.
2263
+ * - `/curate --insight` — InsightProposer only.
2264
+ * - `/curate --hub` — HubProposer only.
2265
+ * - `/curate --reset-declined` — clear the decline list (escape hatch).
2266
+ *
2267
+ * Host integration:
2268
+ * 1. Construct an `LLMJudge` adapter for the host (Claude Code / Codex /
2269
+ * Gemini / Claude Desktop) — see `@vortex-os/proactive-curator`.
2270
+ * 2. Optionally provide an `insightInputProvider` callback that returns
2271
+ * the current `InsightInput` (recent turns + accumulated tokens) when
2272
+ * the host wants the in-session insight surface. Without this provider
2273
+ * the insight proposer is skipped.
2274
+ * 3. Pass both to `createRitualRegistry({ llm, insightInputProvider })`.
2275
+ * The `/curate` command is registered only when an LLMJudge is
2276
+ * supplied — instances that have not wired up a host LLM get the rest
2277
+ * of the rituals without a half-broken curate command.
2278
+ *
2279
+ * Result shape carries the full `Proposal` objects (with `onAccept` and
2280
+ * `onDecline` thunks). Hosts render the previews, ask the user to decide,
2281
+ * then call the thunks. This is the one command in `session-rituals`
2282
+ * whose result is intentionally non-serializable — the thunks are the
2283
+ * point.
2284
+ */
2285
+ interface CurateOptions {
2286
+ readonly llm: LLMJudge;
2287
+ /**
2288
+ * Returns the current InsightInput when the host wants the in-session
2289
+ * surface to run. Absence is a feature: hosts that only want hub
2290
+ * curation can omit it and the insight proposer is skipped without
2291
+ * error.
2292
+ */
2293
+ readonly insightInputProvider?: () => InsightInput | null;
2294
+ readonly insightProposer?: InsightProposer;
2295
+ readonly hubProposer?: HubProposer;
2296
+ }
2297
+ type CurateAnyProposal = InsightProposal | HubProposal;
2298
+ interface CurateResult {
2299
+ readonly subcommand: "curate";
2300
+ readonly status: "ok" | "reset-declined";
2301
+ readonly proposals: readonly CurateAnyProposal[];
2302
+ readonly skipped: {
2303
+ readonly insight: boolean;
2304
+ readonly hub: boolean;
2305
+ };
2306
+ readonly nextActions: readonly string[];
1383
2307
  }
2308
+ /**
2309
+ * Build the `/curate` command bound to a particular LLMJudge and optional
2310
+ * input provider. Returned as a factory so the registry can decide at
2311
+ * registration time whether to install the command at all.
2312
+ */
2313
+ declare function curateCommand(options: CurateOptions): Command<CurateResult>;
1384
2314
 
2315
+ /**
2316
+ * `/recall <query>` — hybrid semantic search over memories, defined in the
2317
+ * plugin over the `@vortex-os/memory-extended` engine (mirrors how
2318
+ * `/curate` is defined here over `proactive-curator`). Keeping the command
2319
+ * in the plugin lets the module stay free of any slash-commands dependency.
2320
+ *
2321
+ * Host integration:
2322
+ * 1. Supply an embedder. `vector.createLocalEmbedder()` is the bundled
2323
+ * default (local MiniLM, model downloads on first use); pass an
2324
+ * OpenAI/Voyage adapter to use an API instead.
2325
+ * 2. Pass it to `createRitualRegistry({ recall: { embed } })`. The command
2326
+ * is registered only when an embedder is supplied — instances that have
2327
+ * not wired one up get the rest of the rituals without a half-broken
2328
+ * recall command (same graceful-degradation rule as `/curate`).
2329
+ *
2330
+ * The handler returns the structured `RecallResult` (data, not a report —
2331
+ * operator decision 5 / 2026-05-29). The host renders a list with
2332
+ * `vector`/`recall` render helpers for an explicit search, or reads the
2333
+ * hits and phrases one in conversation for ambient use.
2334
+ */
2335
+ interface RecallOptions {
2336
+ /** Embedding function. `vector.createLocalEmbedder()` for the default. */
2337
+ readonly embed: vector.EmbedFn;
2338
+ /** Override the DB path. Default `<dataDir>/_indexes/memory.sqlite`. */
2339
+ readonly dbPath?: (ctx: ModuleContext) => string;
2340
+ /** Default hit count when `--k` is absent. Default 5. */
2341
+ readonly defaultK?: number;
2342
+ }
2343
+ declare function recallCommand(options: RecallOptions): Command<recall.RecallResult>;
2344
+
2345
+ /**
2346
+ * Options accepted by {@link createRitualRegistry}. All fields are optional;
2347
+ * each one unlocks an additional command surface when supplied:
2348
+ *
2349
+ * - `curate` — when an `LLMJudge` is provided, the `/curate` command from
2350
+ * `@vortex-os/proactive-curator` is registered. Without it the rest of
2351
+ * the rituals work as before and `/curate` is simply absent (graceful
2352
+ * degradation rather than a half-broken command).
2353
+ * - `recall` — when an embedder is provided, the `/recall` command over
2354
+ * `@vortex-os/memory-extended` is registered. Same graceful-degradation
2355
+ * rule: absent the embedder, semantic recall would not work, so the
2356
+ * command is simply not installed.
2357
+ */
2358
+ interface RitualRegistryOptions {
2359
+ readonly curate?: CurateOptions;
2360
+ readonly recall?: RecallOptions;
2361
+ }
1385
2362
  /**
1386
2363
  * Build a {@link CommandRegistry} with all ritual commands registered.
1387
2364
  *
1388
2365
  * Hosts that want a subset can register the individual exports instead.
1389
- * This factory exists for the common case — "give me everything."
2366
+ * This factory exists for the common case — "give me everything" — plus
2367
+ * opt-in surfaces that depend on host-supplied adapters (currently
2368
+ * `/curate`, which needs an `LLMJudge`).
1390
2369
  */
1391
- declare function createRitualRegistry(): CommandRegistry;
2370
+ declare function createRitualRegistry(options?: RitualRegistryOptions): CommandRegistry;
2371
+
2372
+ /**
2373
+ * Bridge the `@vortex-os/memory-extended` recall engine into a
2374
+ * `@vortex-os/proactive-curator` {@link AmbientRecaller} — defined in the
2375
+ * plugin, exactly where `/recall` and `/curate` are defined over their
2376
+ * respective engines. This keeps both modules free of a dependency on each
2377
+ * other; the plugin is the only place that knows about both.
2378
+ *
2379
+ * This is deliberately **not** a slash command. Ambient recall is stateful
2380
+ * across turns (its dedup set + backpressure streak), so it belongs to a
2381
+ * long-lived host — the opt-in embedder daemon / `UserPromptSubmit` hook, or
2382
+ * any host runtime that keeps one instance alive for the session. The default
2383
+ * Claude Code surface is agent-guidance (see `docs/proactive-curator-design.md`);
2384
+ * this factory is for hosts that opt into the *automatic* surface.
2385
+ *
2386
+ * Construct **once per session** and reuse the returned recaller so its gate
2387
+ * state persists. The injected `RecallFn` opens DB handles lazily per call
2388
+ * and closes them in a `finally`, so a long-lived process never holds a file
2389
+ * lock between turns. The embedder (the expensive, warm-able part) is
2390
+ * supplied by the host so it can keep the model resident across calls.
2391
+ */
2392
+ interface AmbientRecallFactoryOptions {
2393
+ /** Embedding function. The host keeps this warm (daemon) to avoid per-call model loads. */
2394
+ readonly embed: vector.EmbedFn;
2395
+ /** Override the DB path. Default `<dataDir>/_indexes/memory.sqlite`. */
2396
+ readonly dbPath?: (ctx: ModuleContext) => string;
2397
+ /** Restrict recall to one corpus. Omit to search all. */
2398
+ readonly source?: vector.VectorSource;
2399
+ /** Forwarded to AmbientRecaller — minimum cosine score to surface. Default 0.5. */
2400
+ readonly minScore?: number;
2401
+ /** Forwarded to AmbientRecaller — max suggestions per consider(). Default 1. */
2402
+ readonly maxSuggestions?: number;
2403
+ /** Forwarded to AmbientRecaller — skip the engine below this query length. Default 12. */
2404
+ readonly minQueryChars?: number;
2405
+ }
2406
+ /**
2407
+ * Build a session-scoped {@link AmbientRecaller} wired to the recall engine.
2408
+ * Returns `undefined`-free — the caller owns the lifecycle.
2409
+ */
2410
+ declare function createAmbientRecaller(ctx: ModuleContext, options: AmbientRecallFactoryOptions): AmbientRecaller;
1392
2411
 
1393
2412
  /**
1394
2413
  * Output of {@link sessionStartCommand}'s handler. Pure data — the host
@@ -1412,6 +2431,175 @@ interface SessionStartReport {
1412
2431
  */
1413
2432
  declare const sessionStartCommand: Command<SessionStartReport>;
1414
2433
 
2434
+ interface RecentWorklog {
2435
+ /** Path relative to the data directory (e.g. `worklog/2026/05/2026-05-30-foo.md`). */
2436
+ readonly path: string;
2437
+ /** First `# ` heading, else the filename without extension. */
2438
+ readonly title: string;
2439
+ }
2440
+ /** Outcome of the optional `git pull` the hook runs before reporting. */
2441
+ interface GitPullResult {
2442
+ readonly ran: boolean;
2443
+ readonly summary: string;
2444
+ /** True when the pull could not fast-forward (divergence / dirty tree). Never auto-resolved. */
2445
+ readonly conflict: boolean;
2446
+ }
2447
+ interface SessionStartHookReport {
2448
+ readonly time: string;
2449
+ readonly repoRoot: string;
2450
+ readonly dataDir: string;
2451
+ readonly counts: Readonly<Record<string, number>>;
2452
+ readonly missing: readonly string[];
2453
+ readonly recentWorklog: RecentWorklog | null;
2454
+ /** Worklog dates (`YYYY-MM-DD`) present within the gap window — for backfill detection. */
2455
+ readonly recentWorklogDates: readonly string[];
2456
+ /** Resolved environment label (e.g. home/work), or null when none is configured. */
2457
+ readonly environment: string | null;
2458
+ }
2459
+ /**
2460
+ * Gather the read-only facts for a start-of-session report: data-dir counts,
2461
+ * the most recent worklog, recent worklog dates, and an optional environment
2462
+ * label. Mirrors the `/session-start` command's counting.
2463
+ */
2464
+ declare function collectSessionStartReport(ctx: ModuleContext, opts?: {
2465
+ readonly now?: Date;
2466
+ readonly environment?: string | null;
2467
+ readonly gapWindowDays?: number;
2468
+ }): Promise<SessionStartHookReport>;
2469
+ /**
2470
+ * Days that have commits but no worklog — backfill candidates. Pure set
2471
+ * difference (`commitDays` − `presentDates`), de-duplicated and sorted. The
2472
+ * hook supplies `commitDays` from git; the report supplies the present dates.
2473
+ */
2474
+ declare function detectWorklogGaps(commitDays: readonly string[], presentDates: readonly string[]): string[];
2475
+ /**
2476
+ * Render a session-start report as a compact markdown block for a host hook
2477
+ * to inject as session context. A pull conflict and any worklog gaps are
2478
+ * surfaced as warnings (the agent acts on the gaps — see AGENT.md).
2479
+ */
2480
+ declare function renderSessionStartReport(report: SessionStartHookReport, extras?: {
2481
+ readonly git?: GitPullResult | null;
2482
+ readonly missingWorklogDays?: readonly string[];
2483
+ readonly catchUp?: {
2484
+ readonly ingestedLocal: number;
2485
+ readonly indexedPulled: number;
2486
+ readonly errors: number;
2487
+ };
2488
+ }): string;
2489
+
2490
+ /**
2491
+ * Ensure a dated worklog entry exists — the host-side **create** primitive
2492
+ * the worklog module deliberately leaves out (`WorklogStore` reads; `/log`
2493
+ * only appends and errors when today's entry is missing). Auto-worklog
2494
+ * (the agent at wind-down, or the SessionEnd net) needs *creation*, so it
2495
+ * lives here, where instance frontmatter conventions belong.
2496
+ *
2497
+ * Idempotent: if a worklog already exists for the date (with any keyword), it
2498
+ * is returned untouched (`created: false`) — never overwritten. Pair with
2499
+ * `appendSection` from `@vortex-os/worklog` to add the session's content.
2500
+ */
2501
+ interface EnsureWorklogResult {
2502
+ readonly path: string;
2503
+ readonly date: string;
2504
+ readonly keyword: string;
2505
+ /** True when this call created the file; false when one already existed. */
2506
+ readonly created: boolean;
2507
+ }
2508
+ declare function ensureWorklogEntry(ctx: ModuleContext, opts?: {
2509
+ readonly now?: Date;
2510
+ readonly keyword?: string;
2511
+ readonly title?: string;
2512
+ readonly body?: string;
2513
+ }): Promise<EnsureWorklogResult>;
2514
+
2515
+ /**
2516
+ * Start-of-session "catch-up": fold conversation transcripts into the local
2517
+ * search archive without the user ever having to wrap up a session.
2518
+ *
2519
+ * Two sources, one pass:
2520
+ * - **local (a)** — this machine's own transcripts that are not archived yet,
2521
+ * read from the agent's transcript store and scoped to the current project.
2522
+ * - **pulled (b)** — transcripts created on another machine that arrived as
2523
+ * normalized text via git sync. Their text is present but this machine's
2524
+ * DB (local, derived, gitignored) has never indexed them.
2525
+ *
2526
+ * Text only — vectorization is deferred to recall/rebuild so session start
2527
+ * stays fast. The whole step is gated by `autoRecord.archive` at the call site
2528
+ * and is best-effort: callers should treat a thrown archive backend (e.g. the
2529
+ * native sqlite module not built) as "skip", never as a fatal start error.
2530
+ */
2531
+ interface CatchUpResult {
2532
+ /** Local transcripts newly archived this run (source a). */
2533
+ readonly ingestedLocal: number;
2534
+ /** Normalized transcripts from another machine newly indexed (source b). */
2535
+ readonly indexedPulled: number;
2536
+ /** Per-session ingest errors (source a). */
2537
+ readonly errors: number;
2538
+ }
2539
+ interface CatchUpOptions {
2540
+ /** Restrict local ingest to one project's transcripts. Default: `ctx.repoRoot`. */
2541
+ readonly cwd?: string;
2542
+ /**
2543
+ * Transcript adapters for local ingest. Default: Claude Code only. Other
2544
+ * hosts (Codex, Gemini) can be added by a caller; tests inject fakes so the
2545
+ * scan never touches the real home directory.
2546
+ */
2547
+ readonly adapters?: sessionArchive.IngestParams["adapters"];
2548
+ /** Adapter environment override (e.g. a sandbox HOME). Tests use this. */
2549
+ readonly env?: sessionArchive.IngestParams["env"];
2550
+ }
2551
+ declare function catchUpSessions(ctx: ModuleContext, opts?: CatchUpOptions): Promise<CatchUpResult>;
2552
+
2553
+ /**
2554
+ * Hook wiring for `/vortex init`: make sure the instance's
2555
+ * `.claude/settings.json` registers the VortEX SessionStart / SessionEnd hooks,
2556
+ * so the boot report + worklog-net fire automatically without the user knowing
2557
+ * any command. NON-DESTRUCTIVE — like the MCP install merge, this preserves
2558
+ * every other hook and top-level field and only adds our two entries if absent.
2559
+ *
2560
+ * Pure functions here (parse / merge / detect); the command does the actual
2561
+ * file read/write around them. Keeping them pure makes the merge unit-testable
2562
+ * and the "writes only what's missing" guarantee verifiable.
2563
+ */
2564
+ declare const SESSION_START_COMMAND = "node plugins/session-rituals/scripts/session-start-hook.mjs";
2565
+ declare const SESSION_END_COMMAND = "node plugins/session-rituals/scripts/session-end-hook.mjs";
2566
+ interface HookCommand {
2567
+ readonly type: "command";
2568
+ readonly command: string;
2569
+ }
2570
+ interface HookGroup {
2571
+ readonly hooks: readonly HookCommand[];
2572
+ readonly matcher?: string;
2573
+ }
2574
+ interface ClaudeSettings {
2575
+ hooks?: {
2576
+ SessionStart?: HookGroup[];
2577
+ SessionEnd?: HookGroup[];
2578
+ [event: string]: HookGroup[] | undefined;
2579
+ };
2580
+ [key: string]: unknown;
2581
+ }
2582
+ interface EnsureHooksResult {
2583
+ readonly settings: ClaudeSettings;
2584
+ /** Which hook events we added a VortEX entry to (empty if already wired). */
2585
+ readonly added: readonly ("SessionStart" | "SessionEnd")[];
2586
+ /** True when nothing changed — every VortEX hook was already present. */
2587
+ readonly alreadyWired: boolean;
2588
+ }
2589
+ /**
2590
+ * Parse existing settings.json text. Empty/whitespace → `{}` (fresh). Throws on
2591
+ * malformed JSON so the caller aborts rather than clobbering a hand-edited file.
2592
+ */
2593
+ declare function parseSettings(text: string | null | undefined): ClaudeSettings;
2594
+ /**
2595
+ * Merge the VortEX hooks into an existing settings object WITHOUT mutating the
2596
+ * input. A hook event is left untouched if it already references our command
2597
+ * (idempotent); otherwise our group is appended alongside any existing groups.
2598
+ */
2599
+ declare function ensureVortexHooks(existing: ClaudeSettings | null | undefined): EnsureHooksResult;
2600
+ /** Serialize settings the way Claude writes them (2-space, trailing newline). */
2601
+ declare function serializeSettings(settings: ClaudeSettings): string;
2602
+
1415
2603
  interface ReindexResult {
1416
2604
  readonly dir: string;
1417
2605
  readonly status: "written" | "unchanged" | "missing";
@@ -1444,38 +2632,143 @@ interface NewDecisionResult {
1444
2632
  */
1445
2633
  declare const decisionCommand: Command<NewDecisionResult>;
1446
2634
 
1447
- interface TilAppendResult {
2635
+ interface WorklogAppendResult {
1448
2636
  readonly path: string;
1449
2637
  readonly date: string;
1450
2638
  readonly keyword: string;
1451
2639
  readonly sectionTitle: string;
1452
2640
  }
1453
2641
  /**
1454
- * `/til <section-title>` — Append a `## <section-title>` section to today's
1455
- * TIL entry. If no TIL exists for today, the command errors (entry creation
1456
- * with frontmatter is left to the host so it can apply project-specific
1457
- * conventions). The body of the new section is left empty for the caller
1458
- * to fill in.
2642
+ * `/log <section-title>` — Append a `## <section-title>` section to today's
2643
+ * worklog entry. If no worklog exists for today, the command errors (entry
2644
+ * creation with frontmatter is left to the host so it can apply
2645
+ * project-specific conventions). The body of the new section is left empty
2646
+ * for the caller to fill in.
1459
2647
  *
1460
2648
  * This is a deliberately small command — the goal is to make "add a quick
1461
- * note to today's TIL" a one-liner, not to replace a real editor.
2649
+ * note to today's worklog" a one-liner, not to replace a real editor.
1462
2650
  */
1463
- declare const tilCommand: Command<TilAppendResult>;
2651
+ declare const logCommand: Command<WorklogAppendResult>;
2652
+
2653
+ /**
2654
+ * "What should I do today?" — a read-only synthesis over existing records
2655
+ * (worklog + decision-log + open `- [ ]` checkboxes), the P2 work-management
2656
+ * surface. No new store: it reads what's already written and answers
2657
+ * "what were you doing, what's open, what's next" from it.
2658
+ *
2659
+ * Design goal (operator, 2026-05-30): adapt to EVERY data state — a brand-new
2660
+ * user with nothing, a partly-used instance, and a rich history must each get a
2661
+ * sensible report. So the collector returns a structured, presence-flagged
2662
+ * shape and the renderer branches on what's actually there rather than assuming
2663
+ * any section exists.
2664
+ */
2665
+ /** An unchecked `- [ ]` item lifted from a recent worklog body. */
2666
+ interface OpenTask {
2667
+ readonly text: string;
2668
+ /** Worklog date the task was found in (`YYYY-MM-DD`). */
2669
+ readonly fromDate: string;
2670
+ }
2671
+ interface OpenDecision {
2672
+ readonly title: string;
2673
+ readonly date: string;
2674
+ readonly slug: string;
2675
+ }
2676
+ interface AgendaReport {
2677
+ /** Most recent worklog (what you were last doing), or null if none. */
2678
+ readonly lastWorklog: {
2679
+ readonly date: string;
2680
+ readonly title: string;
2681
+ readonly path: string;
2682
+ } | null;
2683
+ /**
2684
+ * "Next up" lines lifted from the most recent worklog's hand-off section
2685
+ * (`## 다음 작업` / `## Next` / a `📋`-marked heading) — the planned-work
2686
+ * pointer, mirroring the vault TIL hand-off block. Empty if none.
2687
+ */
2688
+ readonly nextUp: readonly string[];
2689
+ /** Date of the worklog the nextUp lines came from (or null). */
2690
+ readonly nextUpFrom: string | null;
2691
+ /** Unchecked checkboxes from recent worklogs, newest first, capped. */
2692
+ readonly openTasks: readonly OpenTask[];
2693
+ /** Active (non-archived) decisions, newest first, capped. */
2694
+ readonly openDecisions: readonly OpenDecision[];
2695
+ /** Total worklog / decision counts — used to distinguish "new" from "quiet". */
2696
+ readonly worklogCount: number;
2697
+ readonly decisionCount: number;
2698
+ /** True when there is essentially nothing yet (brand-new instance). */
2699
+ readonly isEmpty: boolean;
2700
+ /** True when there are records but nothing actionable surfaced. */
2701
+ readonly nothingOpen: boolean;
2702
+ }
2703
+ interface CollectAgendaOptions {
2704
+ /** How many recent worklogs to scan for open tasks. Default 7. */
2705
+ readonly recentWorklogs?: number;
2706
+ /** Max open tasks / decisions to surface. Default 8 each. */
2707
+ readonly maxTasks?: number;
2708
+ readonly maxDecisions?: number;
2709
+ }
2710
+ /**
2711
+ * Pull unchecked GitHub-style checkboxes (`- [ ]` / `* [ ]`, any indent) from a
2712
+ * worklog body. Checked items (`- [x]`) are ignored. Returns the trimmed label.
2713
+ */
2714
+ /**
2715
+ * Lift the "next up / hand-off" section from a worklog body — the planned-work
2716
+ * pointer the agent leaves at wind-down (mirrors the vault's TIL `## 📋 다음
2717
+ * 작업` block). Matches a heading whose text contains any of: "다음 작업",
2718
+ * "다음 세션", "next", "next up", "todo", "후속", "📋". Returns the section's
2719
+ * content lines (bullets de-marked, blanks dropped), capped. Empty if no such
2720
+ * section. Stops at the next heading of the same-or-higher level.
2721
+ */
2722
+ declare function extractNextUp(body: string, max?: number): string[];
2723
+ /**
2724
+ * Pull unchecked GitHub-style checkboxes (`- [ ]` / `* [ ]`, any indent) from a
2725
+ * worklog body. Checked items (`- [x]`) are ignored. Returns the trimmed label.
2726
+ */
2727
+ declare function extractOpenTasks(body: string): string[];
2728
+ /**
2729
+ * Collect the agenda inputs. Read-only; tolerant of missing dirs (both stores
2730
+ * return empty rather than throwing), so a brand-new instance yields an empty —
2731
+ * but well-formed — report.
2732
+ */
2733
+ declare function collectAgenda(ctx: ModuleContext, opts?: CollectAgendaOptions): Promise<AgendaReport>;
2734
+ /**
2735
+ * Render the agenda as a compact markdown block. Branches on data state so the
2736
+ * output is sensible whether the instance is brand-new, quiet, or busy:
2737
+ * - brand-new (no records) → a short "getting started" nudge
2738
+ * - records but nothing open → "you're clear" + last activity
2739
+ * - open tasks / decisions → an actionable list
2740
+ */
2741
+ declare function renderAgenda(report: AgendaReport): string;
2742
+
2743
+ /**
2744
+ * `/agenda` — "What should I do today?" Read-only synthesis over existing
2745
+ * worklog + decision-log records (open `- [ ]` tasks, active decisions, last
2746
+ * activity). Returns structured {@link AgendaReport} data; the host renders it
2747
+ * (or calls `renderAgenda`). No writes, no new store — answers from what's
2748
+ * already recorded, and adapts to any data state (new / quiet / busy).
2749
+ */
2750
+ declare const agendaCommand: Command<AgendaReport>;
1464
2751
 
1465
2752
  /**
1466
2753
  * `/vortex <sub>` — Root command for VortEX instance operations.
1467
2754
  *
1468
2755
  * Subcommands:
1469
- * init — first-time setup wizard (creates user profile memory, first TIL, first topic hub)
1470
- * status — (planned) instance state report
1471
- * import(planned) bring an existing folder into data/imported/
1472
- * doctor(planned) diagnose common setup issues
2756
+ * init — first-time setup wizard (user profile + first worklog; detects
2757
+ * external folders in $HOME and surfaces an import hint)
2758
+ * statusinstance state report (counts, profile, latestWorklog, missing)
2759
+ * importcopy a folder into the instance, auto-classify into 5 categories
2760
+ * or preserve user folder structure, inject frontmatter, scan
2761
+ * wiki-link health via @vortex-os/link-rewriter
2762
+ * doctor — 8-check health diagnosis (system dirs, profile, indexes,
2763
+ * wiki links, data-lint rules, runbook aging, node version,
2764
+ * git remote)
2765
+ * sync — framework-developer workflow: git pull → npm install → npm run
2766
+ * build → npm run verify. Stops on first failure with stdout/stderr
2767
+ * tail. End users who consume vortex from npm registry do not need
2768
+ * this — they get pre-built dist via `npm install @vortex-os/*`.
1473
2769
  * help — list available subcommands
1474
- *
1475
- * Phase 8 ships `init` and `help` as active; the rest are stubs that
1476
- * advertise their planned name so users can discover them.
1477
2770
  */
1478
- declare const PLANNED_SUBS: readonly ["status", "import", "doctor"];
2771
+ declare const PLANNED_SUBS: readonly [];
1479
2772
  type PlannedSub = (typeof PLANNED_SUBS)[number];
1480
2773
  interface VortexInitResult {
1481
2774
  readonly subcommand: "init";
@@ -1486,6 +2779,11 @@ interface VortexInitResult {
1486
2779
  name: string;
1487
2780
  prompt: string;
1488
2781
  }[];
2782
+ readonly externalFolders?: readonly {
2783
+ readonly path: string;
2784
+ readonly basename: string;
2785
+ readonly mdCount: number;
2786
+ }[];
1489
2787
  }
1490
2788
  interface VortexPlannedResult {
1491
2789
  readonly subcommand: PlannedSub | "unknown";
@@ -1495,33 +2793,178 @@ interface VortexPlannedResult {
1495
2793
  interface VortexHelpResult {
1496
2794
  readonly subcommand: "help";
1497
2795
  readonly status: "ok";
2796
+ /** `/vortex <sub>` subcommands routed inside this command. */
1498
2797
  readonly subcommands: readonly {
1499
2798
  readonly name: string;
1500
2799
  readonly description: string;
1501
2800
  readonly state: "active" | "planned";
1502
2801
  }[];
2802
+ /**
2803
+ * Other top-level slash commands shipped by the same plugin
2804
+ * (`session-rituals`). Independent commands, not `/vortex` subcommands —
2805
+ * surfaced here so users discover the full plugin surface from a single
2806
+ * `/vortex help` call instead of needing to know they exist separately.
2807
+ */
2808
+ readonly siblingCommands: readonly {
2809
+ readonly name: string;
2810
+ readonly description: string;
2811
+ }[];
2812
+ }
2813
+ interface VortexStatusResult {
2814
+ readonly subcommand: "status";
2815
+ readonly status: "ok" | "uninitialized";
2816
+ readonly instance: {
2817
+ readonly dataDir: string;
2818
+ readonly initialized: boolean;
2819
+ readonly profile?: {
2820
+ readonly name?: string;
2821
+ readonly role?: string;
2822
+ };
2823
+ };
2824
+ readonly counts: {
2825
+ readonly memory: number;
2826
+ readonly worklog: number;
2827
+ readonly decisionLog: number;
2828
+ readonly runbooks: number;
2829
+ readonly hubs: number;
2830
+ };
2831
+ readonly latestWorklog?: {
2832
+ readonly date: string;
2833
+ readonly keyword: string;
2834
+ readonly path: string;
2835
+ };
2836
+ readonly missing: readonly string[];
2837
+ readonly nextActions: readonly string[];
2838
+ }
2839
+ interface VortexImportResult {
2840
+ readonly subcommand: "import";
2841
+ readonly status: "completed" | "dry-run" | "needs-input" | "source-missing";
2842
+ readonly source?: string;
2843
+ readonly totalFiles: number;
2844
+ readonly copied: number;
2845
+ readonly classified: {
2846
+ readonly worklog: number;
2847
+ readonly decisionLog: number;
2848
+ readonly runbooks: number;
2849
+ readonly hubs: number;
2850
+ readonly memory: number;
2851
+ readonly preserved: number;
2852
+ };
2853
+ readonly frontmatterInjected: number;
2854
+ readonly frontmatterPreserved: number;
2855
+ readonly systemDirsCreated: readonly string[];
2856
+ readonly skipped: number;
2857
+ readonly links?: {
2858
+ readonly filesScanned: number;
2859
+ readonly total: number;
2860
+ readonly resolved: number;
2861
+ readonly broken: number;
2862
+ readonly ambiguous: number;
2863
+ };
2864
+ readonly missingInputs?: readonly {
2865
+ name: string;
2866
+ prompt: string;
2867
+ }[];
2868
+ readonly nextActions: readonly string[];
2869
+ }
2870
+ type DoctorCheckStatus = "pass" | "warn" | "fail" | "info";
2871
+ interface DoctorCheck {
2872
+ readonly id: string;
2873
+ readonly label: string;
2874
+ readonly status: DoctorCheckStatus;
2875
+ readonly detail?: string;
2876
+ }
2877
+ interface VortexDoctorResult {
2878
+ readonly subcommand: "doctor";
2879
+ readonly status: "ok" | "warnings" | "errors";
2880
+ readonly checks: readonly DoctorCheck[];
2881
+ readonly summary: {
2882
+ readonly pass: number;
2883
+ readonly warn: number;
2884
+ readonly fail: number;
2885
+ readonly info: number;
2886
+ };
2887
+ readonly nextActions: readonly string[];
2888
+ }
2889
+ type VortexSyncStepId = "pull" | "install" | "build" | "verify";
2890
+ type VortexSyncStepStatus = "ok" | "failed" | "skipped";
2891
+ interface VortexSyncStep {
2892
+ readonly id: VortexSyncStepId;
2893
+ readonly label: string;
2894
+ readonly status: VortexSyncStepStatus;
2895
+ readonly exitCode?: number;
2896
+ readonly durationMs?: number;
2897
+ readonly stdoutTail?: string;
2898
+ readonly stderrTail?: string;
2899
+ }
2900
+ interface VortexSyncResult {
2901
+ readonly subcommand: "sync";
2902
+ readonly status: "completed" | "failed" | "dry-run";
2903
+ readonly steps: readonly VortexSyncStep[];
2904
+ readonly failedAt?: VortexSyncStepId;
2905
+ readonly nextActions: readonly string[];
1503
2906
  }
1504
- type VortexResult = VortexInitResult | VortexPlannedResult | VortexHelpResult;
2907
+ type VortexResult = VortexInitResult | VortexStatusResult | VortexImportResult | VortexDoctorResult | VortexSyncResult | VortexPlannedResult | VortexHelpResult;
1505
2908
  declare const vortexCommand: Command<VortexResult>;
1506
2909
 
1507
2910
  //# sourceMappingURL=index.d.ts.map
1508
2911
 
2912
+ type index_d_AgendaReport = AgendaReport;
2913
+ type index_d_AmbientRecallFactoryOptions = AmbientRecallFactoryOptions;
2914
+ type index_d_CatchUpOptions = CatchUpOptions;
2915
+ type index_d_CatchUpResult = CatchUpResult;
2916
+ type index_d_ClaudeSettings = ClaudeSettings;
2917
+ type index_d_CollectAgendaOptions = CollectAgendaOptions;
2918
+ type index_d_CurateAnyProposal = CurateAnyProposal;
2919
+ type index_d_CurateOptions = CurateOptions;
2920
+ type index_d_CurateResult = CurateResult;
2921
+ type index_d_EnsureHooksResult = EnsureHooksResult;
2922
+ type index_d_EnsureWorklogResult = EnsureWorklogResult;
2923
+ type index_d_GitPullResult = GitPullResult;
1509
2924
  type index_d_NewDecisionResult = NewDecisionResult;
2925
+ type index_d_OpenDecision = OpenDecision;
2926
+ type index_d_OpenTask = OpenTask;
2927
+ type index_d_RecallOptions = RecallOptions;
2928
+ type index_d_RecentWorklog = RecentWorklog;
1510
2929
  type index_d_ReindexResult = ReindexResult;
2930
+ type index_d_RitualRegistryOptions = RitualRegistryOptions;
2931
+ declare const index_d_SESSION_END_COMMAND: typeof SESSION_END_COMMAND;
2932
+ declare const index_d_SESSION_START_COMMAND: typeof SESSION_START_COMMAND;
2933
+ type index_d_SessionStartHookReport = SessionStartHookReport;
1511
2934
  type index_d_SessionStartReport = SessionStartReport;
1512
- type index_d_TilAppendResult = TilAppendResult;
1513
2935
  type index_d_VortexHelpResult = VortexHelpResult;
1514
2936
  type index_d_VortexInitResult = VortexInitResult;
1515
2937
  type index_d_VortexPlannedResult = VortexPlannedResult;
1516
2938
  type index_d_VortexResult = VortexResult;
2939
+ type index_d_VortexSyncResult = VortexSyncResult;
2940
+ type index_d_VortexSyncStep = VortexSyncStep;
2941
+ type index_d_VortexSyncStepId = VortexSyncStepId;
2942
+ type index_d_VortexSyncStepStatus = VortexSyncStepStatus;
2943
+ type index_d_WorklogAppendResult = WorklogAppendResult;
2944
+ declare const index_d_agendaCommand: typeof agendaCommand;
2945
+ declare const index_d_catchUpSessions: typeof catchUpSessions;
2946
+ declare const index_d_collectAgenda: typeof collectAgenda;
2947
+ declare const index_d_collectSessionStartReport: typeof collectSessionStartReport;
2948
+ declare const index_d_createAmbientRecaller: typeof createAmbientRecaller;
1517
2949
  declare const index_d_createRitualRegistry: typeof createRitualRegistry;
2950
+ declare const index_d_curateCommand: typeof curateCommand;
1518
2951
  declare const index_d_decisionCommand: typeof decisionCommand;
2952
+ declare const index_d_detectWorklogGaps: typeof detectWorklogGaps;
2953
+ declare const index_d_ensureVortexHooks: typeof ensureVortexHooks;
2954
+ declare const index_d_ensureWorklogEntry: typeof ensureWorklogEntry;
2955
+ declare const index_d_extractNextUp: typeof extractNextUp;
2956
+ declare const index_d_extractOpenTasks: typeof extractOpenTasks;
2957
+ declare const index_d_logCommand: typeof logCommand;
2958
+ declare const index_d_parseSettings: typeof parseSettings;
2959
+ declare const index_d_recallCommand: typeof recallCommand;
1519
2960
  declare const index_d_reindexCommand: typeof reindexCommand;
2961
+ declare const index_d_renderAgenda: typeof renderAgenda;
2962
+ declare const index_d_renderSessionStartReport: typeof renderSessionStartReport;
2963
+ declare const index_d_serializeSettings: typeof serializeSettings;
1520
2964
  declare const index_d_sessionStartCommand: typeof sessionStartCommand;
1521
- declare const index_d_tilCommand: typeof tilCommand;
1522
2965
  declare const index_d_vortexCommand: typeof vortexCommand;
1523
2966
  declare namespace index_d {
1524
- export { type index_d_NewDecisionResult as NewDecisionResult, type index_d_ReindexResult as ReindexResult, type index_d_SessionStartReport as SessionStartReport, type index_d_TilAppendResult as TilAppendResult, type index_d_VortexHelpResult as VortexHelpResult, type index_d_VortexInitResult as VortexInitResult, type index_d_VortexPlannedResult as VortexPlannedResult, type index_d_VortexResult as VortexResult, index_d_createRitualRegistry as createRitualRegistry, index_d_decisionCommand as decisionCommand, index_d_reindexCommand as reindexCommand, index_d_sessionStartCommand as sessionStartCommand, index_d_tilCommand as tilCommand, index_d_vortexCommand as vortexCommand };
2967
+ 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_CollectAgendaOptions as CollectAgendaOptions, type index_d_CurateAnyProposal as CurateAnyProposal, type index_d_CurateOptions as CurateOptions, type index_d_CurateResult as CurateResult, type index_d_EnsureHooksResult as EnsureHooksResult, type index_d_EnsureWorklogResult as EnsureWorklogResult, type index_d_GitPullResult as GitPullResult, type index_d_NewDecisionResult as NewDecisionResult, type index_d_OpenDecision as OpenDecision, type index_d_OpenTask as OpenTask, 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_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_WorklogAppendResult as WorklogAppendResult, index_d_agendaCommand as agendaCommand, index_d_catchUpSessions as catchUpSessions, index_d_collectAgenda as collectAgenda, index_d_collectSessionStartReport as collectSessionStartReport, index_d_createAmbientRecaller as createAmbientRecaller, index_d_createRitualRegistry as createRitualRegistry, index_d_curateCommand as curateCommand, index_d_decisionCommand as decisionCommand, 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_logCommand as logCommand, index_d_parseSettings as parseSettings, index_d_recallCommand as recallCommand, index_d_reindexCommand as reindexCommand, index_d_renderAgenda as renderAgenda, index_d_renderSessionStartReport as renderSessionStartReport, index_d_serializeSettings as serializeSettings, index_d_sessionStartCommand as sessionStartCommand, index_d_vortexCommand as vortexCommand };
1525
2968
  }
1526
2969
 
1527
- export { index_d$8 as aiCodingPitfalls, index_d$c as core, index_d$9 as dataLint, index_d$4 as decisionLog, index_d$3 as indexGenerator, index_d$1 as linkRewriter, index_d$a as memorySystem, index_d$6 as reportGenerator, index_d$2 as runbooks, index_d as sessionRituals, index_d$b as slashCommands, index_d$5 as til, index_d$7 as toolRules };
2970
+ 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 };