@hiveai/core 0.10.8 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -66,6 +66,32 @@ declare const SensorSchema: z.ZodObject<{
66
66
  autogen?: boolean | undefined;
67
67
  last_fired?: string | null | undefined;
68
68
  }>;
69
+ /**
70
+ * Progressive-disclosure activation triggers for a `skill` memory.
71
+ *
72
+ * A skill is a reusable playbook (feedforward harness guide). Injecting every skill
73
+ * on every briefing bloats the context and dilutes signal (the "instruction budget"
74
+ * problem). An `activation` block makes a skill surface ONLY when it is relevant:
75
+ * its keywords match the task, or its globs match the files being edited. A skill
76
+ * that defines `activation` and matches none of it is suppressed from the briefing;
77
+ * a skill with no `activation` block keeps the legacy always-eligible behavior.
78
+ */
79
+ declare const ActivationSchema: z.ZodObject<{
80
+ /** Case-insensitive substrings matched against the task text. */
81
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
82
+ /** Glob-ish path patterns matched against the files being edited. */
83
+ globs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
84
+ /** Always activate (rare — for truly universal playbooks). */
85
+ always: z.ZodDefault<z.ZodBoolean>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ keywords: string[];
88
+ globs: string[];
89
+ always: boolean;
90
+ }, {
91
+ keywords?: string[] | undefined;
92
+ globs?: string[] | undefined;
93
+ always?: boolean | undefined;
94
+ }>;
69
95
  declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
70
96
  id: z.ZodString;
71
97
  scope: z.ZodDefault<z.ZodEnum<["personal", "team", "module", "shared"]>>;
@@ -125,6 +151,23 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
125
151
  autogen?: boolean | undefined;
126
152
  last_fired?: string | null | undefined;
127
153
  }>>;
154
+ /** Optional progressive-disclosure triggers — only meaningful for `type: skill`. */
155
+ activation: z.ZodOptional<z.ZodObject<{
156
+ /** Case-insensitive substrings matched against the task text. */
157
+ keywords: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
158
+ /** Glob-ish path patterns matched against the files being edited. */
159
+ globs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
160
+ /** Always activate (rare — for truly universal playbooks). */
161
+ always: z.ZodDefault<z.ZodBoolean>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ keywords: string[];
164
+ globs: string[];
165
+ always: boolean;
166
+ }, {
167
+ keywords?: string[] | undefined;
168
+ globs?: string[] | undefined;
169
+ always?: boolean | undefined;
170
+ }>>;
128
171
  tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
129
172
  domain: z.ZodOptional<z.ZodString>;
130
173
  author: z.ZodOptional<z.ZodString>;
@@ -174,6 +217,11 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
174
217
  flags?: string | undefined;
175
218
  command?: string | undefined;
176
219
  } | undefined;
220
+ activation?: {
221
+ keywords: string[];
222
+ globs: string[];
223
+ always: boolean;
224
+ } | undefined;
177
225
  domain?: string | undefined;
178
226
  author?: string | undefined;
179
227
  topic?: string | undefined;
@@ -200,6 +248,11 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
200
248
  autogen?: boolean | undefined;
201
249
  last_fired?: string | null | undefined;
202
250
  } | undefined;
251
+ activation?: {
252
+ keywords?: string[] | undefined;
253
+ globs?: string[] | undefined;
254
+ always?: boolean | undefined;
255
+ } | undefined;
203
256
  tags?: string[] | undefined;
204
257
  domain?: string | undefined;
205
258
  author?: string | undefined;
@@ -242,6 +295,11 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
242
295
  flags?: string | undefined;
243
296
  command?: string | undefined;
244
297
  } | undefined;
298
+ activation?: {
299
+ keywords: string[];
300
+ globs: string[];
301
+ always: boolean;
302
+ } | undefined;
245
303
  domain?: string | undefined;
246
304
  author?: string | undefined;
247
305
  topic?: string | undefined;
@@ -268,6 +326,11 @@ declare const MemoryFrontmatterSchema: z.ZodEffects<z.ZodObject<{
268
326
  autogen?: boolean | undefined;
269
327
  last_fired?: string | null | undefined;
270
328
  } | undefined;
329
+ activation?: {
330
+ keywords?: string[] | undefined;
331
+ globs?: string[] | undefined;
332
+ always?: boolean | undefined;
333
+ } | undefined;
271
334
  tags?: string[] | undefined;
272
335
  domain?: string | undefined;
273
336
  author?: string | undefined;
@@ -302,6 +365,7 @@ type MemoryStatus = z.infer<typeof MemoryStatusSchema>;
302
365
  type MemoryType = z.infer<typeof MemoryTypeSchema>;
303
366
  type Anchor = z.infer<typeof AnchorSchema>;
304
367
  type Sensor = z.infer<typeof SensorSchema>;
368
+ type Activation = z.infer<typeof ActivationSchema>;
305
369
  type MemoryFrontmatter = z.infer<typeof MemoryFrontmatterSchema>;
306
370
  interface Memory {
307
371
  frontmatter: MemoryFrontmatter;
@@ -327,6 +391,7 @@ declare function buildFrontmatter(input: {
327
391
  status?: MemoryFrontmatter["status"];
328
392
  relatedIds?: string[];
329
393
  sensor?: Sensor;
394
+ activation?: Activation;
330
395
  }): MemoryFrontmatter;
331
396
 
332
397
  declare const HAIVE_DIR = ".ai";
@@ -395,6 +460,15 @@ interface MemoryUsage {
395
460
  rejected_count: number;
396
461
  last_rejected_at: string | null;
397
462
  rejection_reason: string | null;
463
+ /**
464
+ * Number of times the memory was explicitly confirmed *useful* — i.e. an agent
465
+ * or human recorded that it changed what they did (the closed-loop "applied"
466
+ * outcome, recorded via `mem_feedback`). A far stronger utility signal than a
467
+ * read: a memory can be surfaced many times and ignored, but `applied` means it
468
+ * demonstrably steered work. Drives impact scoring in {@link ./impact.js}.
469
+ */
470
+ applied_count: number;
471
+ last_applied_at: string | null;
398
472
  }
399
473
  interface UsageIndex {
400
474
  version: 1;
@@ -410,10 +484,172 @@ declare function saveUsageIndex(paths: HaivePaths, index: UsageIndex): Promise<v
410
484
  declare function getUsage(index: UsageIndex, id: string): MemoryUsage;
411
485
  declare function bumpRead(index: UsageIndex, ids: string[]): UsageIndex;
412
486
  declare function recordRejection(index: UsageIndex, id: string, reason: string | null): UsageIndex;
487
+ /**
488
+ * Record that a memory was *applied* — explicitly confirmed to have changed what
489
+ * the agent/human did. This is the closed-loop utility signal that distinguishes
490
+ * a memory that merely got surfaced from one that demonstrably steered work.
491
+ */
492
+ declare function recordApplied(index: UsageIndex, id: string): UsageIndex;
413
493
  declare const DECAY_DAYS = 90;
414
494
  declare function isDecaying(usage: MemoryUsage, createdAt: string): boolean;
415
495
  declare function trackReads(paths: HaivePaths, ids: string[]): Promise<UsageIndex>;
416
496
 
497
+ /**
498
+ * Closed-loop memory-utility scoring — the "did this memory actually help?" layer.
499
+ *
500
+ * hAIve already tracks reads ({@link ./usage.js}) and derives a trust level from
501
+ * status + read_count ({@link ./confidence.js}). But a read only means a memory was
502
+ * *surfaced*, not that it *helped* — a memory can be injected on every briefing and
503
+ * silently ignored. Harness engineering's core loop (Fowler / LangChain) is to
504
+ * measure what demonstrably steers work and let that feed back into recall.
505
+ *
506
+ * `computeImpact` combines the signals hAIve already records but never correlated:
507
+ * POSITIVE reads · applied outcomes (mem_feedback) · a sensor that actually fired
508
+ * NEGATIVE rejections · stale/deprecated/rejected status · dormancy
509
+ * into a single 0..1 utility score, a tier, and a prune-candidate flag. It is a pure
510
+ * function (no I/O), unit-tested in `packages/core/test/impact.test.ts`.
511
+ */
512
+ type ImpactTier = "high" | "medium" | "low" | "dormant";
513
+ interface ImpactScore {
514
+ /** Normalized utility score in [0, 1]. */
515
+ score: number;
516
+ tier: ImpactTier;
517
+ /** Human-readable breakdown of the signals that produced the score. */
518
+ signals: string[];
519
+ /**
520
+ * True when the memory looks like dead weight worth reviewing/pruning:
521
+ * more rejections than reads, or never used with no guardrail, or already
522
+ * stale/deprecated/rejected. A memory carrying a `sensor` or with `applied`
523
+ * outcomes is never a prune candidate — it earns its keep as a guardrail.
524
+ */
525
+ pruneCandidate: boolean;
526
+ }
527
+ interface ImpactOptions {
528
+ /** Days with no read AND no applied outcome after which a memory is "dormant". */
529
+ dormantDays?: number;
530
+ now?: Date;
531
+ }
532
+ /** Default dormancy window — half the confidence hard-decay (365d), so impact reacts sooner. */
533
+ declare const DEFAULT_DORMANT_DAYS = 120;
534
+ /**
535
+ * Compute the demonstrated utility of a single memory from its frontmatter + usage.
536
+ * Pure and deterministic given `now`.
537
+ */
538
+ declare function computeImpact(fm: MemoryFrontmatter, usage: MemoryUsage, options?: ImpactOptions): ImpactScore;
539
+ /** Sort comparator: highest impact first, prune candidates last on ties. */
540
+ declare function compareImpact(a: ImpactScore, b: ImpactScore): number;
541
+ interface ImpactSummary {
542
+ total: number;
543
+ high: number;
544
+ medium: number;
545
+ low: number;
546
+ dormant: number;
547
+ prune_candidates: number;
548
+ }
549
+ /** Roll up a set of impact scores into tier counts. */
550
+ declare function summarizeImpact(scores: ImpactScore[]): ImpactSummary;
551
+
552
+ /**
553
+ * A rigorous, model-free, repeatable evaluation of hAIve's core promise: surfacing
554
+ * the right knowledge and guardrails at the right moment. Unlike the agent benchmark
555
+ * (which parses human-written reports), this is deterministic and CI-runnable — it
556
+ * produces a chiffré quality score from labeled cases, so a regression in ranking or
557
+ * sensor coverage fails the build instead of silently degrading every agent session.
558
+ *
559
+ * Two case families:
560
+ * - RETRIEVAL — given a task (+optional files/symbols), do the expected memories
561
+ * surface in the briefing top-k? Measured by recall and mean reciprocal rank.
562
+ * - SENSORS — given a known-bad diff, does the expected memory's sensor fire?
563
+ * Measured by catch-rate.
564
+ *
565
+ * This module is pure: it defines the case/result types, the scoring math, and case
566
+ * synthesis from a repo's own anchored memories. Orchestration (calling get_briefing
567
+ * / anti_patterns_check) lives in the CLI, since core cannot depend on the MCP layer.
568
+ */
569
+ interface RetrievalCase {
570
+ name: string;
571
+ task: string;
572
+ files?: string[];
573
+ symbols?: string[];
574
+ /** Memory ids that SHOULD surface in the briefing for this case. */
575
+ expect_ids: string[];
576
+ }
577
+ interface SensorCase {
578
+ name: string;
579
+ /** Unified diff (or added-line text) the sensors run against. */
580
+ diff: string;
581
+ paths?: string[];
582
+ /** Memory ids whose sensor SHOULD fire on this diff. */
583
+ expect_fire_ids: string[];
584
+ }
585
+ interface EvalSpec {
586
+ retrieval?: RetrievalCase[];
587
+ sensors?: SensorCase[];
588
+ }
589
+ interface RetrievalCaseResult {
590
+ name: string;
591
+ expect_ids: string[];
592
+ /** Surfaced memory ids, in ranked order, capped at k. */
593
+ surfaced_ids: string[];
594
+ hits: string[];
595
+ misses: string[];
596
+ precision: number;
597
+ recall: number;
598
+ /** 1-based rank of the first expected id among surfaced ids; null if none surfaced. */
599
+ best_rank: number | null;
600
+ }
601
+ interface SensorCaseResult {
602
+ name: string;
603
+ expect_fire_ids: string[];
604
+ fired_ids: string[];
605
+ hits: string[];
606
+ misses: string[];
607
+ recall: number;
608
+ }
609
+ interface RetrievalAggregate {
610
+ cases: RetrievalCaseResult[];
611
+ mean_precision: number;
612
+ mean_recall: number;
613
+ /** Mean reciprocal rank of the first expected hit — rewards ranking the right memory high. */
614
+ mrr: number;
615
+ }
616
+ interface SensorAggregate {
617
+ cases: SensorCaseResult[];
618
+ catch_rate: number;
619
+ }
620
+ interface EvalReport {
621
+ retrieval: RetrievalAggregate | null;
622
+ sensors: SensorAggregate | null;
623
+ /** Overall quality score 0..100. */
624
+ score: number;
625
+ }
626
+ /**
627
+ * Score one retrieval case from the (ranked) ids the briefing surfaced.
628
+ * `surfacedRanked` should already be capped to the top-k the caller cares about.
629
+ */
630
+ declare function scoreRetrievalCase(name: string, expectIds: string[], surfacedRanked: string[]): RetrievalCaseResult;
631
+ declare function aggregateRetrieval(cases: RetrievalCaseResult[]): RetrievalAggregate;
632
+ declare function scoreSensorCase(name: string, expectFireIds: string[], firedIds: string[]): SensorCaseResult;
633
+ declare function aggregateSensors(cases: SensorCaseResult[]): SensorAggregate;
634
+ /** Combine retrieval + sensor aggregates into a single 0..100 quality score. */
635
+ declare function overallScore(retrieval: RetrievalAggregate | null, sensors: SensorAggregate | null): number;
636
+ declare function buildReport(retrieval: RetrievalAggregate | null, sensors: SensorAggregate | null): EvalReport;
637
+ /** Extract a short task-like title from a memory body (first heading or first line). */
638
+ declare function titleFromBody(body: string): string;
639
+ interface SelfEvalOptions {
640
+ /** Include each memory's anchor paths as the case files (tests anchored retrieval). */
641
+ includeFiles?: boolean;
642
+ /** Skip memories with these statuses (default: stale/deprecated/rejected). */
643
+ skipStatuses?: string[];
644
+ }
645
+ /**
646
+ * Synthesize retrieval cases from a repo's own anchored memories — zero-setup eval.
647
+ * Each anchored, non-recap, non-dead memory becomes a case: "when working on the
648
+ * file(s) this memory anchors, with its title as the task, does hAIve surface it?".
649
+ * With `includeFiles: false` it becomes a harder semantic-only probe (title alone).
650
+ */
651
+ declare function synthesizeSelfEvalCases(memories: LoadedMemory[], options?: SelfEvalOptions): RetrievalCase[];
652
+
417
653
  type ConfidenceLevel = "unverified" | "low" | "trusted" | "authoritative" | "stale";
418
654
  interface ConfidenceThresholds {
419
655
  trustedReads: number;
@@ -482,6 +718,34 @@ declare function isGlobPath(p: string): boolean;
482
718
  declare function globToRegExp(pattern: string): RegExp;
483
719
  declare function relPathFrom(root: string, abs: string): string;
484
720
 
721
+ /**
722
+ * Progressive disclosure for `skill` memories.
723
+ *
724
+ * Skills are reusable playbooks. Surfacing all of them on every briefing wastes the
725
+ * instruction budget and buries the relevant one. A skill with an `activation` block
726
+ * is disclosed ONLY when it is relevant to the current task/files; a skill without
727
+ * one keeps the legacy always-eligible behavior. This module is pure (no I/O).
728
+ */
729
+ interface ActivationContext {
730
+ task?: string;
731
+ files?: string[];
732
+ }
733
+ interface SkillActivation {
734
+ applicable: boolean;
735
+ activated: boolean;
736
+ reasons: string[];
737
+ }
738
+ declare function isSkill(fm: Pick<MemoryFrontmatter, "type">): boolean;
739
+ /**
740
+ * Decide whether a skill should be disclosed for the given context.
741
+ * For non-skills, or skills with no `activation` block, returns `activated: true`
742
+ * (never suppress them). Otherwise activates on `always`, a keyword substring match
743
+ * against the task, or a glob match against the edited files.
744
+ */
745
+ declare function evaluateSkillActivation(fm: Pick<MemoryFrontmatter, "type" | "activation">, ctx: ActivationContext): SkillActivation;
746
+ /** Convenience: true when a skill defines activation triggers that the context does NOT satisfy. */
747
+ declare function isSkillSuppressed(fm: Pick<MemoryFrontmatter, "type" | "activation">, ctx: ActivationContext): boolean;
748
+
485
749
  /**
486
750
  * Specificity ("surprise") scoring for memories.
487
751
  *
@@ -1153,4 +1417,4 @@ interface SensorSuggestionOptions {
1153
1417
  */
1154
1418
  declare function suggestSensorFromMemory(body: string, anchorPaths: string[], options?: SensorSuggestionOptions): Sensor | null;
1155
1419
 
1156
- export { AUTOPILOT_DEFAULTS, type Anchor, AnchorSchema, type AntiPatternGate, type AutoPromoteRule, BRIEFING_MARKER_TTL_MS, BRIEFING_PRESET_DEFAULTS, type BreakingChange, type BriefingBudgetNumbers, type BriefingBudgetPreset, type BriefingMarker, type BudgetPart, type BudgetSlice, type BuildCodeMapOptions, CHARS_PER_TOKEN, CODE_MAP_FILE, CONFIG_FILE, type CodeExport, type CodeExportKind, type CodeFileEntry, type CodeMap, type CodeMapQueryOptions, type CollectTimelineOpts, type ConfidenceLevel, type ConfidenceThresholds, type ConflictCandidatePair, type ConflictCandidatesOpts, type ContractDiffResult, type ContractFile, type ContractSnapshot, CrossRepoProvenanceSchema, type CrossRepoReport, type CrossRepoSource, DECAY_DAYS, DEFAULT_AUTO_PROMOTE_RULE, DEFAULT_CONFIDENCE_THRESHOLDS, DEFAULT_CONFIG, type DepChange, type DepTrackResult, type DependencySnapshot, GUESSABLE_THRESHOLD, HAIVE_DIR, type HaiveConfig, type HaivePaths, type LexicalRankResult, type LoadedMemory, MEMORIES_DIR, type Memory, type MemoryFrontmatter, MemoryFrontmatterSchema, type MemoryScope, MemoryScopeSchema, type MemoryStatus, MemoryStatusSchema, type MemoryType, MemoryTypeSchema, type MemoryUsage, PROJECT_CONTEXT_FILE, RUNTIME_JOURNAL_FILENAME, type ResolveProjectInfo, type RetirementSignal, type RuntimeJournalEntry, SESSION_RECAP_TTL_MS, STACK_PACK_TAG, type Sensor, type SensorHit, SensorSchema, type SensorSuggestionOptions, type SensorTarget, type TimelineEntry, type TopicStatusPair, type TruncateOptions, type TruncateResult, USAGE_FILE, USAGE_LOG_DIR, USAGE_LOG_FILE, type UsageAggregate, type UsageEvent, type UsageIndex, type VerifyOptions, type VerifyResult, addedLinesFromDiff, aggregateUsage, allocateBudget, antiPatternGateParams, appendRuntimeJournalEntry, appendUsageEvent, briefingMarkerPath, briefingMarkersDir, buildCodeMap, buildFrontmatter, bumpRead, codeMapPath, collectTimelineEntries, compileRegexSensor, configPath, contractLockPath, deriveConfidence, diffContract, emptyUsage, emptyUsageIndex, enforcementDir, estimateTokens, extractActionsBriefBody, extractSnippet, findLexicalConflictPairs, findProjectRoot, findTopicStatusConflictPairs, firstMemoryOneLine, getUsage, globToRegExp, hasRecentBriefingMarker, inferModulesFromPaths, isAutoPromoteEligible, isDecaying, isFreshIsoDate, isGlobPath, isLikelyGuessable, isRetiredMemory, isStackPackSeed, listMarkdownFilesRecursive, literalMatchesAllTokens, literalMatchesAnyToken, loadCodeMap, loadConfig, loadConfigSync, loadMemoriesFromDir, loadMemory, loadUsageIndex, memoryFilePath, memoryMatchesAnchorPaths, newMemoryId, normalizeSessionId, parseMemory, parseSince, pathsOverlap, pickSnippetNeedle, pullCrossRepoSources, queryCodeMap, rankMemoriesLexical, readRecentBriefingMarker, readRuntimeJournalTail, readUsageEvents, recordRejection, relPathFrom, resolveBriefingBudget, resolveHaivePaths, resolveManifestFiles, resolveProjectInfo, retirementSignal, runRegexSensor, runSensors, runtimeJournalPath, saveCodeMap, saveConfig, saveUsageIndex, sensorAppliesToPath, sensorTargetsFromDiff, serializeMemory, snapshotContract, specificityScore, stripPrivate, suggestSensorFromMemory, suggestTopicKey, tokenizeQuery, trackDependencies, trackReads, truncateToTokens, usageLogPath, usageLogSize, usagePath, verifyAnchor, watchContracts, writeBriefingMarker };
1420
+ export { AUTOPILOT_DEFAULTS, type Activation, type ActivationContext, ActivationSchema, type Anchor, AnchorSchema, type AntiPatternGate, type AutoPromoteRule, BRIEFING_MARKER_TTL_MS, BRIEFING_PRESET_DEFAULTS, type BreakingChange, type BriefingBudgetNumbers, type BriefingBudgetPreset, type BriefingMarker, type BudgetPart, type BudgetSlice, type BuildCodeMapOptions, CHARS_PER_TOKEN, CODE_MAP_FILE, CONFIG_FILE, type CodeExport, type CodeExportKind, type CodeFileEntry, type CodeMap, type CodeMapQueryOptions, type CollectTimelineOpts, type ConfidenceLevel, type ConfidenceThresholds, type ConflictCandidatePair, type ConflictCandidatesOpts, type ContractDiffResult, type ContractFile, type ContractSnapshot, CrossRepoProvenanceSchema, type CrossRepoReport, type CrossRepoSource, DECAY_DAYS, DEFAULT_AUTO_PROMOTE_RULE, DEFAULT_CONFIDENCE_THRESHOLDS, DEFAULT_CONFIG, DEFAULT_DORMANT_DAYS, type DepChange, type DepTrackResult, type DependencySnapshot, type EvalReport, type EvalSpec, GUESSABLE_THRESHOLD, HAIVE_DIR, type HaiveConfig, type HaivePaths, type ImpactOptions, type ImpactScore, type ImpactSummary, type ImpactTier, type LexicalRankResult, type LoadedMemory, MEMORIES_DIR, type Memory, type MemoryFrontmatter, MemoryFrontmatterSchema, type MemoryScope, MemoryScopeSchema, type MemoryStatus, MemoryStatusSchema, type MemoryType, MemoryTypeSchema, type MemoryUsage, PROJECT_CONTEXT_FILE, RUNTIME_JOURNAL_FILENAME, type ResolveProjectInfo, type RetirementSignal, type RetrievalAggregate, type RetrievalCase, type RetrievalCaseResult, type RuntimeJournalEntry, SESSION_RECAP_TTL_MS, STACK_PACK_TAG, type SelfEvalOptions, type Sensor, type SensorAggregate, type SensorCase, type SensorCaseResult, type SensorHit, SensorSchema, type SensorSuggestionOptions, type SensorTarget, type SkillActivation, type TimelineEntry, type TopicStatusPair, type TruncateOptions, type TruncateResult, USAGE_FILE, USAGE_LOG_DIR, USAGE_LOG_FILE, type UsageAggregate, type UsageEvent, type UsageIndex, type VerifyOptions, type VerifyResult, addedLinesFromDiff, aggregateRetrieval, aggregateSensors, aggregateUsage, allocateBudget, antiPatternGateParams, appendRuntimeJournalEntry, appendUsageEvent, briefingMarkerPath, briefingMarkersDir, buildCodeMap, buildFrontmatter, buildReport, bumpRead, codeMapPath, collectTimelineEntries, compareImpact, compileRegexSensor, computeImpact, configPath, contractLockPath, deriveConfidence, diffContract, emptyUsage, emptyUsageIndex, enforcementDir, estimateTokens, evaluateSkillActivation, extractActionsBriefBody, extractSnippet, findLexicalConflictPairs, findProjectRoot, findTopicStatusConflictPairs, firstMemoryOneLine, getUsage, globToRegExp, hasRecentBriefingMarker, inferModulesFromPaths, isAutoPromoteEligible, isDecaying, isFreshIsoDate, isGlobPath, isLikelyGuessable, isRetiredMemory, isSkill, isSkillSuppressed, isStackPackSeed, listMarkdownFilesRecursive, literalMatchesAllTokens, literalMatchesAnyToken, loadCodeMap, loadConfig, loadConfigSync, loadMemoriesFromDir, loadMemory, loadUsageIndex, memoryFilePath, memoryMatchesAnchorPaths, newMemoryId, normalizeSessionId, overallScore, parseMemory, parseSince, pathsOverlap, pickSnippetNeedle, pullCrossRepoSources, queryCodeMap, rankMemoriesLexical, readRecentBriefingMarker, readRuntimeJournalTail, readUsageEvents, recordApplied, recordRejection, relPathFrom, resolveBriefingBudget, resolveHaivePaths, resolveManifestFiles, resolveProjectInfo, retirementSignal, runRegexSensor, runSensors, runtimeJournalPath, saveCodeMap, saveConfig, saveUsageIndex, scoreRetrievalCase, scoreSensorCase, sensorAppliesToPath, sensorTargetsFromDiff, serializeMemory, snapshotContract, specificityScore, stripPrivate, suggestSensorFromMemory, suggestTopicKey, summarizeImpact, synthesizeSelfEvalCases, titleFromBody, tokenizeQuery, trackDependencies, trackReads, truncateToTokens, usageLogPath, usageLogSize, usagePath, verifyAnchor, watchContracts, writeBriefingMarker };