@hivelore/mcp 0.37.0 → 0.38.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/server.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import * as _hivelore_core from '@hivelore/core';
3
- import { HaivePaths, ConfidenceLevel, ImpactTier, SensorTarget, resolveProjectInfo } from '@hivelore/core';
3
+ import { HaivePaths, ConfidenceLevel, ImpactTier, SensorTarget, TestFramework, resolveProjectInfo } from '@hivelore/core';
4
4
  import { z } from 'zod';
5
5
 
6
6
  interface HaiveContext {
@@ -619,6 +619,43 @@ interface MemTriedOutput {
619
619
  }
620
620
  declare function memTried(input: MemTriedInput, ctx: HaiveContext): Promise<MemTriedOutput>;
621
621
 
622
+ /**
623
+ * Detect the test framework + owning package dir (repo-relative) for an incident's anchor paths.
624
+ * Walks up from each anchor path's directory to the repo root and uses the NEAREST enclosing manifest
625
+ * (package.json / go.mod / a python signal); falls back to the repo root with a vitest default. This
626
+ * is FS I/O, so it lives in the MCP layer (imported by the CLI too) rather than in pure core.
627
+ */
628
+ declare function detectTestFrameworkForPaths(root: string, anchorPaths: string[]): Promise<{
629
+ framework: TestFramework;
630
+ baseDir: string;
631
+ }>;
632
+ declare const ScaffoldTestInputSchema: {
633
+ memory_id: z.ZodString;
634
+ framework: z.ZodOptional<z.ZodEnum<["vitest", "jest", "pytest", "gotest"]>>;
635
+ out_path: z.ZodOptional<z.ZodString>;
636
+ write: z.ZodDefault<z.ZodBoolean>;
637
+ };
638
+ type ScaffoldTestInput = {
639
+ [K in keyof typeof ScaffoldTestInputSchema]: z.infer<(typeof ScaffoldTestInputSchema)[K]>;
640
+ };
641
+ interface ScaffoldTestOutput {
642
+ ok: boolean;
643
+ error?: string;
644
+ memory_id: string;
645
+ framework?: TestFramework;
646
+ /** Repo-relative path of the generated (or would-be) test file. */
647
+ path?: string;
648
+ /** Command that runs ONLY this test — becomes the sensor's oracle once the assertion is written. */
649
+ run_command?: string;
650
+ /** The exact `sensors propose --kind test` command to arm it AFTER the assertion is written. */
651
+ propose_command?: string;
652
+ content?: string;
653
+ written?: boolean;
654
+ already_exists?: boolean;
655
+ notice?: string;
656
+ }
657
+ declare function scaffoldTest(input: ScaffoldTestInput, ctx: HaiveContext): Promise<ScaffoldTestOutput>;
658
+
622
659
  /** Input is intentionally minimal — callers may pass cwd for multi-root clients. */
623
660
  declare const MemResolveProjectInputSchema: {
624
661
  cwd: z.ZodOptional<z.ZodString>;
@@ -699,9 +736,9 @@ declare function memConflictCandidates(input: MemConflictCandidatesInput, ctx: H
699
736
  declare const SERVER_NAME = "hivelore";
700
737
  declare const SERVER_VERSION: string;
701
738
  type ToolProfile = "enforcement" | "maintenance" | "experimental" | "full";
702
- declare const ENFORCEMENT_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "code_search", "pre_commit_check", "mem_session_end", "propose_sensor"];
703
- declare const MAINTENANCE_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "code_search", "pre_commit_check", "mem_session_end", "propose_sensor", "mem_suggest_topic", "mem_for_files", "mem_list", "get_project_context", "bootstrap_project_save", "mem_resolve_project", "mem_update", "mem_approve", "mem_reject", "mem_pending", "mem_delete", "mem_diff", "get_recap", "anti_patterns_check", "mem_distill", "mem_timeline", "mem_conflict_candidates", "mem_feedback", "ingest_findings"];
704
- declare const EXPERIMENTAL_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "code_search", "pre_commit_check", "mem_session_end", "propose_sensor", "mem_suggest_topic", "mem_for_files", "mem_list", "get_project_context", "bootstrap_project_save", "mem_resolve_project", "mem_update", "mem_approve", "mem_reject", "mem_pending", "mem_delete", "mem_diff", "get_recap", "anti_patterns_check", "mem_distill", "mem_timeline", "mem_conflict_candidates", "mem_feedback", "ingest_findings"];
739
+ declare const ENFORCEMENT_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "code_search", "pre_commit_check", "mem_session_end", "propose_sensor", "scaffold_test"];
740
+ declare const MAINTENANCE_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "code_search", "pre_commit_check", "mem_session_end", "propose_sensor", "scaffold_test", "mem_suggest_topic", "mem_for_files", "mem_list", "get_project_context", "bootstrap_project_save", "mem_resolve_project", "mem_update", "mem_approve", "mem_reject", "mem_pending", "mem_delete", "mem_diff", "get_recap", "anti_patterns_check", "mem_distill", "mem_timeline", "mem_conflict_candidates", "mem_feedback", "ingest_findings"];
741
+ declare const EXPERIMENTAL_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "code_search", "pre_commit_check", "mem_session_end", "propose_sensor", "scaffold_test", "mem_suggest_topic", "mem_for_files", "mem_list", "get_project_context", "bootstrap_project_save", "mem_resolve_project", "mem_update", "mem_approve", "mem_reject", "mem_pending", "mem_delete", "mem_diff", "get_recap", "anti_patterns_check", "mem_distill", "mem_timeline", "mem_conflict_candidates", "mem_feedback", "ingest_findings"];
705
742
  declare const TOOL_PROFILES: Record<Exclude<ToolProfile, "full">, ReadonlySet<string>>;
706
743
  declare function getAllowedToolsForProfile(profile: ToolProfile): ReadonlySet<string>;
707
744
  declare function createHaiveServer(options?: CreateContextOptions): {
@@ -724,4 +761,4 @@ declare function runHaiveMcpStdio(options: {
724
761
  root?: string;
725
762
  }): Promise<void>;
726
763
 
727
- export { 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, TOOL_PROFILES, type ToolProfile, antiPatternsCheck, codeMapTool, codeSearch, createHaiveServer, getAllowedToolsForProfile, getBriefing, getRecap, memConflictCandidates, memDistill, memRelevantTo, memResolveProject, memSuggestTopic, memTimeline, memTried, parseMcpCliArgs, preCommitCheck, printHaiveMcpVersion, proposeSensor, readPresumedCorrectTargets, runHaiveMcpStdio };
764
+ export { 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, getAllowedToolsForProfile, getBriefing, getRecap, memConflictCandidates, memDistill, memRelevantTo, memResolveProject, memSuggestTopic, memTimeline, memTried, parseMcpCliArgs, preCommitCheck, printHaiveMcpVersion, proposeSensor, readPresumedCorrectTargets, runHaiveMcpStdio, scaffoldTest };