@hiveai/mcp 0.9.15 → 0.9.16

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
@@ -675,6 +675,12 @@ declare function runtimeJournalTail(input: RuntimeJournalTailInput, ctx: HaiveCo
675
675
 
676
676
  declare const SERVER_NAME = "haive";
677
677
  declare const SERVER_VERSION: string;
678
+ type ToolProfile = "enforcement" | "maintenance" | "experimental" | "full";
679
+ declare const ENFORCEMENT_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "pre_commit_check", "mem_session_end"];
680
+ declare const MAINTENANCE_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "pre_commit_check", "mem_session_end", "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", "code_search", "anti_patterns_check", "mem_distill", "mem_timeline", "mem_conflict_candidates"];
681
+ declare const EXPERIMENTAL_PROFILE_TOOLS: readonly ["get_briefing", "mem_save", "mem_tried", "mem_search", "mem_get", "mem_verify", "mem_relevant_to", "code_map", "pre_commit_check", "mem_session_end", "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", "code_search", "anti_patterns_check", "mem_distill", "mem_timeline", "mem_conflict_candidates", "mem_observe", "why_this_file", "why_this_decision", "mem_conflicts_with", "pattern_detect", "runtime_journal_append", "runtime_journal_tail"];
682
+ declare const TOOL_PROFILES: Record<Exclude<ToolProfile, "full">, ReadonlySet<string>>;
683
+ declare function getAllowedToolsForProfile(profile: ToolProfile): ReadonlySet<string>;
678
684
  declare function createHaiveServer(options?: CreateContextOptions): {
679
685
  server: McpServer;
680
686
  context: HaiveContext;
@@ -695,4 +701,4 @@ declare function runHaiveMcpStdio(options: {
695
701
  root?: string;
696
702
  }): Promise<void>;
697
703
 
698
- export { type AntiPatternsCheckInput, type AntiPatternsCheckOutput, type BriefingOutput, type CodeMapInput, type CodeMapToolOutput, type CodeSearchInput, type CodeSearchOutput, type GetBriefingInput, type GetRecapInput, type GetRecapOutput, type MemConflictCandidatesInput, type MemConflictsInput, type MemConflictsOutput, type MemDistillInput, type MemDistillOutput, type MemRelevantToInput, type MemRelevantToOutput, type MemResolveProjectInput, type MemSuggestTopicInput, type MemTimelineInput, type PatternDetectInput, type PatternDetectOutput, type PreCommitCheckInput, type PreCommitCheckOutput, type RuntimeJournalAppendInput, type RuntimeJournalTailInput, SERVER_NAME, SERVER_VERSION, type WhyThisDecisionInput, type WhyThisDecisionOutput, type WhyThisFileInput, type WhyThisFileOutput, antiPatternsCheck, codeMapTool, codeSearch, createHaiveServer, getBriefing, getRecap, memConflictCandidates, memConflicts, memDistill, memRelevantTo, memResolveProject, memSuggestTopic, memTimeline, parseMcpCliArgs, patternDetect, preCommitCheck, printHaiveMcpVersion, runHaiveMcpStdio, runtimeJournalAppend, runtimeJournalTail, whyThisDecision, whyThisFile };
704
+ 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 MemConflictsInput, type MemConflictsOutput, type MemDistillInput, type MemDistillOutput, type MemRelevantToInput, type MemRelevantToOutput, type MemResolveProjectInput, type MemSuggestTopicInput, type MemTimelineInput, type PatternDetectInput, type PatternDetectOutput, type PreCommitCheckInput, type PreCommitCheckOutput, type RuntimeJournalAppendInput, type RuntimeJournalTailInput, SERVER_NAME, SERVER_VERSION, TOOL_PROFILES, type ToolProfile, type WhyThisDecisionInput, type WhyThisDecisionOutput, type WhyThisFileInput, type WhyThisFileOutput, antiPatternsCheck, codeMapTool, codeSearch, createHaiveServer, getAllowedToolsForProfile, getBriefing, getRecap, memConflictCandidates, memConflicts, memDistill, memRelevantTo, memResolveProject, memSuggestTopic, memTimeline, parseMcpCliArgs, patternDetect, preCommitCheck, printHaiveMcpVersion, runHaiveMcpStdio, runtimeJournalAppend, runtimeJournalTail, whyThisDecision, whyThisFile };
package/dist/server.js CHANGED
@@ -3528,7 +3528,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
3528
3528
  // src/server.ts
3529
3529
  import { loadConfigSync } from "@hiveai/core";
3530
3530
  var SERVER_NAME = "haive";
3531
- var SERVER_VERSION = "0.9.15";
3531
+ var SERVER_VERSION = "0.9.16";
3532
3532
  function jsonResult(data) {
3533
3533
  return {
3534
3534
  content: [
@@ -3539,7 +3539,7 @@ function jsonResult(data) {
3539
3539
  ]
3540
3540
  };
3541
3541
  }
3542
- var ENFORCEMENT_PROFILE_TOOLS = /* @__PURE__ */ new Set([
3542
+ var ENFORCEMENT_PROFILE_TOOLS = [
3543
3543
  "get_briefing",
3544
3544
  "mem_save",
3545
3545
  "mem_tried",
@@ -3550,7 +3550,47 @@ var ENFORCEMENT_PROFILE_TOOLS = /* @__PURE__ */ new Set([
3550
3550
  "code_map",
3551
3551
  "pre_commit_check",
3552
3552
  "mem_session_end"
3553
- ]);
3553
+ ];
3554
+ var MAINTENANCE_PROFILE_TOOLS = [
3555
+ ...ENFORCEMENT_PROFILE_TOOLS,
3556
+ "mem_suggest_topic",
3557
+ "mem_for_files",
3558
+ "mem_list",
3559
+ "get_project_context",
3560
+ "bootstrap_project_save",
3561
+ "mem_resolve_project",
3562
+ "mem_update",
3563
+ "mem_approve",
3564
+ "mem_reject",
3565
+ "mem_pending",
3566
+ "mem_delete",
3567
+ "mem_diff",
3568
+ "get_recap",
3569
+ "code_search",
3570
+ "anti_patterns_check",
3571
+ "mem_distill",
3572
+ "mem_timeline",
3573
+ "mem_conflict_candidates"
3574
+ ];
3575
+ var EXPERIMENTAL_PROFILE_TOOLS = [
3576
+ ...MAINTENANCE_PROFILE_TOOLS,
3577
+ "mem_observe",
3578
+ "why_this_file",
3579
+ "why_this_decision",
3580
+ "mem_conflicts_with",
3581
+ "pattern_detect",
3582
+ "runtime_journal_append",
3583
+ "runtime_journal_tail"
3584
+ ];
3585
+ var TOOL_PROFILES = {
3586
+ enforcement: new Set(ENFORCEMENT_PROFILE_TOOLS),
3587
+ maintenance: new Set(MAINTENANCE_PROFILE_TOOLS),
3588
+ experimental: new Set(EXPERIMENTAL_PROFILE_TOOLS)
3589
+ };
3590
+ function getAllowedToolsForProfile(profile) {
3591
+ if (profile === "full") return TOOL_PROFILES.experimental;
3592
+ return TOOL_PROFILES[profile] ?? TOOL_PROFILES.enforcement;
3593
+ }
3554
3594
  var BRIEFING_TOOLS = /* @__PURE__ */ new Set(["get_briefing", "mem_relevant_to"]);
3555
3595
  var MUTATING_TOOLS = /* @__PURE__ */ new Set([
3556
3596
  "mem_save",
@@ -3577,7 +3617,8 @@ function createHaiveServer(options = {}) {
3577
3617
  { name: SERVER_NAME, version: SERVER_VERSION },
3578
3618
  { capabilities: { tools: {}, prompts: {} } }
3579
3619
  );
3580
- const shouldRegisterTool = (name) => toolProfile === "full" || ENFORCEMENT_PROFILE_TOOLS.has(name);
3620
+ const allowedTools = getAllowedToolsForProfile(toolProfile);
3621
+ const shouldRegisterTool = (name) => allowedTools.has(name);
3581
3622
  const registerTool = (name, description, schema, handler) => {
3582
3623
  if (!shouldRegisterTool(name)) return;
3583
3624
  const tool = server.tool.bind(server);
@@ -3601,7 +3642,11 @@ function createHaiveServer(options = {}) {
3601
3642
  }
3602
3643
  );
3603
3644
  };
3604
- const shouldRegisterPrompt = (name) => toolProfile === "full" || name === "bootstrap_project" || name === "post_task";
3645
+ const shouldRegisterPrompt = (name) => {
3646
+ if (name === "bootstrap_project" || name === "post_task") return true;
3647
+ if (name === "import_docs") return toolProfile !== "enforcement";
3648
+ return toolProfile === "experimental" || toolProfile === "full";
3649
+ };
3605
3650
  registerTool(
3606
3651
  "mem_save",
3607
3652
  [
@@ -4454,12 +4499,17 @@ async function runHaiveMcpStdio(options) {
4454
4499
  await server.connect(new StdioServerTransport());
4455
4500
  }
4456
4501
  export {
4502
+ ENFORCEMENT_PROFILE_TOOLS,
4503
+ EXPERIMENTAL_PROFILE_TOOLS,
4504
+ MAINTENANCE_PROFILE_TOOLS,
4457
4505
  SERVER_NAME,
4458
4506
  SERVER_VERSION,
4507
+ TOOL_PROFILES,
4459
4508
  antiPatternsCheck,
4460
4509
  codeMapTool,
4461
4510
  codeSearch,
4462
4511
  createHaiveServer,
4512
+ getAllowedToolsForProfile,
4463
4513
  getBriefing,
4464
4514
  getRecap,
4465
4515
  memConflictCandidates,