@hivelore/mcp 0.39.2 → 0.43.2

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/server.d.ts CHANGED
@@ -192,6 +192,8 @@ declare const GetBriefingZod: z.ZodObject<{
192
192
  semantic: z.ZodDefault<z.ZodBoolean>;
193
193
  include_stale: z.ZodDefault<z.ZodBoolean>;
194
194
  track: z.ZodDefault<z.ZodBoolean>;
195
+ memory_scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<["personal", "team", "module", "shared"]>, "many">>;
196
+ deterministic: z.ZodOptional<z.ZodBoolean>;
195
197
  format: z.ZodDefault<z.ZodEnum<["full", "compact", "actions"]>>;
196
198
  symbols: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
197
199
  min_semantic_score: z.ZodDefault<z.ZodNumber>;
@@ -210,6 +212,8 @@ declare const GetBriefingZod: z.ZodObject<{
210
212
  min_semantic_score: number;
211
213
  task?: string | undefined;
212
214
  dedupe_project_context?: boolean | undefined;
215
+ memory_scopes?: ("personal" | "team" | "module" | "shared")[] | undefined;
216
+ deterministic?: boolean | undefined;
213
217
  budget_preset?: "quick" | "balanced" | "deep" | undefined;
214
218
  }, {
215
219
  symbols?: string[] | undefined;
@@ -224,6 +228,8 @@ declare const GetBriefingZod: z.ZodObject<{
224
228
  semantic?: boolean | undefined;
225
229
  include_stale?: boolean | undefined;
226
230
  track?: boolean | undefined;
231
+ memory_scopes?: ("personal" | "team" | "module" | "shared")[] | undefined;
232
+ deterministic?: boolean | undefined;
227
233
  min_semantic_score?: number | undefined;
228
234
  budget_preset?: "quick" | "balanced" | "deep" | undefined;
229
235
  }>;
@@ -507,8 +513,10 @@ declare function preCommitCheck(input: PreCommitCheckInput, ctx: HaiveContext):
507
513
 
508
514
  declare const ProposeSensorInputSchema: {
509
515
  memory_id: z.ZodString;
510
- kind: z.ZodDefault<z.ZodEnum<["regex", "shell", "test"]>>;
516
+ kind: z.ZodDefault<z.ZodEnum<["regex", "ast", "shell", "test"]>>;
511
517
  pattern: z.ZodOptional<z.ZodString>;
518
+ rule: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
519
+ language: z.ZodOptional<z.ZodString>;
512
520
  command: z.ZodOptional<z.ZodString>;
513
521
  timeout_ms: z.ZodOptional<z.ZodNumber>;
514
522
  absent: z.ZodOptional<z.ZodString>;
@@ -516,6 +524,7 @@ declare const ProposeSensorInputSchema: {
516
524
  severity: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
517
525
  message: z.ZodOptional<z.ZodString>;
518
526
  incident: z.ZodOptional<z.ZodString>;
527
+ red_ref: z.ZodOptional<z.ZodString>;
519
528
  flags: z.ZodOptional<z.ZodString>;
520
529
  paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
521
530
  };
@@ -548,6 +557,43 @@ interface ProposeSensorOutput {
548
557
  declare function readPresumedCorrectTargets(root: string, relPaths: string[]): Promise<SensorTarget[]>;
549
558
  declare function proposeSensor(input: ProposeSensorInput, ctx: HaiveContext): Promise<ProposeSensorOutput>;
550
559
 
560
+ interface AstMatch {
561
+ /** 1-indexed line range of the matched node. */
562
+ startLine: number;
563
+ endLine: number;
564
+ /** Matched source text (trimmed, capped) for review output. */
565
+ text: string;
566
+ }
567
+ interface AstScanResult {
568
+ status: "ok" | "engine-missing" | "unsupported-language" | "parse-error" | "invalid-pattern";
569
+ matches: AstMatch[];
570
+ detail?: string;
571
+ }
572
+ type AstRule = Record<string, unknown>;
573
+ declare function astEngineAvailable(): Promise<boolean>;
574
+ /** Map a file extension to a built-in ast-grep language. Unknown → null (unsupported, warn only). */
575
+ declare function astLangForPath(filePath: string, explicitLanguage?: string): string | null;
576
+ /**
577
+ * Run one AST pattern (with optional `absent` sub-pattern) over a file's FULL content.
578
+ * A match is suppressed when `absent` matches INSIDE the matched node — the structural version of
579
+ * the regex `absent` window: the required companion lives in the call's own arguments.
580
+ */
581
+ declare function runAstPattern(content: string, filePath: string, pattern?: string, absent?: string, rule?: AstRule, language?: string): Promise<AstScanResult>;
582
+ /**
583
+ * Gate-side evaluation: matches on the full content, FIRES only when a match intersects the added
584
+ * lines (introduction, not mere presence). `addedLines` empty/undefined = validation mode (any
585
+ * match counts — used for silent-on-current / fires-on-bad checks).
586
+ */
587
+ declare function runAstSensorOnContent(input: {
588
+ pattern?: string;
589
+ rule?: AstRule;
590
+ language?: string;
591
+ absent?: string;
592
+ content: string;
593
+ filePath: string;
594
+ addedLines?: Set<number>;
595
+ }): Promise<AstScanResult>;
596
+
551
597
  declare const MemTriedInputSchema: {
552
598
  what: z.ZodString;
553
599
  why_failed: z.ZodString;
@@ -558,34 +604,43 @@ declare const MemTriedInputSchema: {
558
604
  paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
559
605
  author: z.ZodOptional<z.ZodString>;
560
606
  sensor: z.ZodOptional<z.ZodObject<{
561
- kind: z.ZodDefault<z.ZodEnum<["regex", "shell", "test"]>>;
607
+ kind: z.ZodDefault<z.ZodEnum<["regex", "ast", "shell", "test"]>>;
562
608
  pattern: z.ZodOptional<z.ZodString>;
609
+ rule: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
610
+ language: z.ZodOptional<z.ZodString>;
563
611
  command: z.ZodOptional<z.ZodString>;
564
612
  timeout_ms: z.ZodOptional<z.ZodNumber>;
565
613
  absent: z.ZodOptional<z.ZodString>;
566
614
  severity: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
567
615
  message: z.ZodOptional<z.ZodString>;
568
616
  incident: z.ZodOptional<z.ZodString>;
617
+ red_ref: z.ZodOptional<z.ZodString>;
569
618
  bad_example: z.ZodOptional<z.ZodString>;
570
619
  }, "strip", z.ZodTypeAny, {
571
- kind: "regex" | "shell" | "test";
620
+ kind: "regex" | "ast" | "shell" | "test";
572
621
  severity: "warn" | "block";
573
622
  pattern?: string | undefined;
574
623
  message?: string | undefined;
624
+ rule?: Record<string, unknown> | undefined;
625
+ language?: string | undefined;
575
626
  command?: string | undefined;
576
627
  timeout_ms?: number | undefined;
577
628
  absent?: string | undefined;
578
629
  incident?: string | undefined;
630
+ red_ref?: string | undefined;
579
631
  bad_example?: string | undefined;
580
632
  }, {
581
633
  pattern?: string | undefined;
582
634
  message?: string | undefined;
583
- kind?: "regex" | "shell" | "test" | undefined;
635
+ kind?: "regex" | "ast" | "shell" | "test" | undefined;
636
+ rule?: Record<string, unknown> | undefined;
637
+ language?: string | undefined;
584
638
  command?: string | undefined;
585
639
  timeout_ms?: number | undefined;
586
640
  absent?: string | undefined;
587
641
  severity?: "warn" | "block" | undefined;
588
642
  incident?: string | undefined;
643
+ red_ref?: string | undefined;
589
644
  bad_example?: string | undefined;
590
645
  }>>;
591
646
  };
@@ -780,4 +835,4 @@ declare function runHaiveMcpStdio(options: {
780
835
  root?: string;
781
836
  }): Promise<void>;
782
837
 
783
- export { type AnchorFrameworkGroup, type AntiPatternsCheckInput, type AntiPatternsCheckOutput, type BriefingOutput, type CodeMapInput, type CodeMapToolOutput, type CodeSearchInput, type CodeSearchOutput, ENFORCEMENT_PROFILE_TOOLS, EXPERIMENTAL_PROFILE_TOOLS, type GetBriefingInput, type GetRecapInput, type GetRecapOutput, MAINTENANCE_PROFILE_TOOLS, type MemConflictCandidatesInput, type MemDistillInput, type MemDistillOutput, type MemRelevantToInput, type MemRelevantToOutput, type MemResolveProjectInput, type MemSuggestTopicInput, type MemTimelineInput, type MemTriedOutput, type PreCommitCheckInput, type PreCommitCheckOutput, type ProposeSensorOutput, SERVER_NAME, SERVER_VERSION, type ScaffoldTestOutput, TOOL_PROFILES, type ToolProfile, antiPatternsCheck, codeMapTool, codeSearch, createHaiveServer, detectTestFrameworkForPaths, detectTestFrameworksForAnchors, getAllowedToolsForProfile, getBriefing, getRecap, memConflictCandidates, memDistill, memRelevantTo, memResolveProject, memSuggestTopic, memTimeline, memTried, parseMcpCliArgs, preCommitCheck, printHaiveMcpVersion, proposeSensor, readPresumedCorrectTargets, runHaiveMcpStdio, scaffoldTest };
838
+ export { type AnchorFrameworkGroup, type AntiPatternsCheckInput, type AntiPatternsCheckOutput, type AstMatch, type AstScanResult, type BriefingOutput, type CodeMapInput, type CodeMapToolOutput, type CodeSearchInput, type CodeSearchOutput, ENFORCEMENT_PROFILE_TOOLS, EXPERIMENTAL_PROFILE_TOOLS, type GetBriefingInput, type GetRecapInput, type GetRecapOutput, MAINTENANCE_PROFILE_TOOLS, type MemConflictCandidatesInput, type MemDistillInput, type MemDistillOutput, type MemRelevantToInput, type MemRelevantToOutput, type MemResolveProjectInput, type MemSuggestTopicInput, type MemTimelineInput, type MemTriedOutput, type PreCommitCheckInput, type PreCommitCheckOutput, type ProposeSensorOutput, SERVER_NAME, SERVER_VERSION, type ScaffoldTestOutput, TOOL_PROFILES, type ToolProfile, antiPatternsCheck, astEngineAvailable, astLangForPath, codeMapTool, codeSearch, createHaiveServer, detectTestFrameworkForPaths, detectTestFrameworksForAnchors, getAllowedToolsForProfile, getBriefing, getRecap, memConflictCandidates, memDistill, memRelevantTo, memResolveProject, memSuggestTopic, memTimeline, memTried, parseMcpCliArgs, preCommitCheck, printHaiveMcpVersion, proposeSensor, readPresumedCorrectTargets, runAstPattern, runAstSensorOnContent, runHaiveMcpStdio, scaffoldTest };