@hivelore/mcp 0.39.1 → 0.42.1

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
@@ -507,7 +507,7 @@ declare function preCommitCheck(input: PreCommitCheckInput, ctx: HaiveContext):
507
507
 
508
508
  declare const ProposeSensorInputSchema: {
509
509
  memory_id: z.ZodString;
510
- kind: z.ZodDefault<z.ZodEnum<["regex", "shell", "test"]>>;
510
+ kind: z.ZodDefault<z.ZodEnum<["regex", "ast", "shell", "test"]>>;
511
511
  pattern: z.ZodOptional<z.ZodString>;
512
512
  command: z.ZodOptional<z.ZodString>;
513
513
  timeout_ms: z.ZodOptional<z.ZodNumber>;
@@ -516,6 +516,7 @@ declare const ProposeSensorInputSchema: {
516
516
  severity: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
517
517
  message: z.ZodOptional<z.ZodString>;
518
518
  incident: z.ZodOptional<z.ZodString>;
519
+ red_ref: z.ZodOptional<z.ZodString>;
519
520
  flags: z.ZodOptional<z.ZodString>;
520
521
  paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
521
522
  };
@@ -548,6 +549,40 @@ interface ProposeSensorOutput {
548
549
  declare function readPresumedCorrectTargets(root: string, relPaths: string[]): Promise<SensorTarget[]>;
549
550
  declare function proposeSensor(input: ProposeSensorInput, ctx: HaiveContext): Promise<ProposeSensorOutput>;
550
551
 
552
+ interface AstMatch {
553
+ /** 1-indexed line range of the matched node. */
554
+ startLine: number;
555
+ endLine: number;
556
+ /** Matched source text (trimmed, capped) for review output. */
557
+ text: string;
558
+ }
559
+ interface AstScanResult {
560
+ status: "ok" | "engine-missing" | "unsupported-language" | "parse-error" | "invalid-pattern";
561
+ matches: AstMatch[];
562
+ detail?: string;
563
+ }
564
+ declare function astEngineAvailable(): Promise<boolean>;
565
+ /** Map a file extension to a built-in ast-grep language. Unknown → null (unsupported, warn only). */
566
+ declare function astLangForPath(filePath: string): "TypeScript" | "Tsx" | "JavaScript" | null;
567
+ /**
568
+ * Run one AST pattern (with optional `absent` sub-pattern) over a file's FULL content.
569
+ * A match is suppressed when `absent` matches INSIDE the matched node — the structural version of
570
+ * the regex `absent` window: the required companion lives in the call's own arguments.
571
+ */
572
+ declare function runAstPattern(content: string, filePath: string, pattern: string, absent?: string): Promise<AstScanResult>;
573
+ /**
574
+ * Gate-side evaluation: matches on the full content, FIRES only when a match intersects the added
575
+ * lines (introduction, not mere presence). `addedLines` empty/undefined = validation mode (any
576
+ * match counts — used for silent-on-current / fires-on-bad checks).
577
+ */
578
+ declare function runAstSensorOnContent(input: {
579
+ pattern: string;
580
+ absent?: string;
581
+ content: string;
582
+ filePath: string;
583
+ addedLines?: Set<number>;
584
+ }): Promise<AstScanResult>;
585
+
551
586
  declare const MemTriedInputSchema: {
552
587
  what: z.ZodString;
553
588
  why_failed: z.ZodString;
@@ -566,6 +601,7 @@ declare const MemTriedInputSchema: {
566
601
  severity: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
567
602
  message: z.ZodOptional<z.ZodString>;
568
603
  incident: z.ZodOptional<z.ZodString>;
604
+ red_ref: z.ZodOptional<z.ZodString>;
569
605
  bad_example: z.ZodOptional<z.ZodString>;
570
606
  }, "strip", z.ZodTypeAny, {
571
607
  kind: "regex" | "shell" | "test";
@@ -576,6 +612,7 @@ declare const MemTriedInputSchema: {
576
612
  timeout_ms?: number | undefined;
577
613
  absent?: string | undefined;
578
614
  incident?: string | undefined;
615
+ red_ref?: string | undefined;
579
616
  bad_example?: string | undefined;
580
617
  }, {
581
618
  pattern?: string | undefined;
@@ -586,6 +623,7 @@ declare const MemTriedInputSchema: {
586
623
  absent?: string | undefined;
587
624
  severity?: "warn" | "block" | undefined;
588
625
  incident?: string | undefined;
626
+ red_ref?: string | undefined;
589
627
  bad_example?: string | undefined;
590
628
  }>>;
591
629
  };
@@ -780,4 +818,4 @@ declare function runHaiveMcpStdio(options: {
780
818
  root?: string;
781
819
  }): Promise<void>;
782
820
 
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 };
821
+ 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 };