@hivelore/mcp 0.30.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/LICENSE +21 -0
- package/README.md +460 -0
- package/dist/index.js +5800 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +819 -0
- package/dist/server.js +5819 -0
- package/dist/server.js.map +1 -0
- package/package.json +59 -0
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,819 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import * as _hivelore_core from '@hivelore/core';
|
|
3
|
+
import { HaivePaths, ConfidenceLevel, ImpactTier, SensorTarget, resolveProjectInfo, readRuntimeJournalTail } from '@hivelore/core';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
interface HaiveContext {
|
|
7
|
+
paths: HaivePaths;
|
|
8
|
+
}
|
|
9
|
+
interface CreateContextOptions {
|
|
10
|
+
root?: string;
|
|
11
|
+
env?: NodeJS.ProcessEnv;
|
|
12
|
+
cwd?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare class SessionTracker {
|
|
16
|
+
private events;
|
|
17
|
+
private startedAt;
|
|
18
|
+
private config;
|
|
19
|
+
private ctx;
|
|
20
|
+
private shutdownRegistered;
|
|
21
|
+
constructor(ctx: HaiveContext);
|
|
22
|
+
init(): Promise<void>;
|
|
23
|
+
record(tool: string, summary?: string): void;
|
|
24
|
+
private registerShutdownHandler;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
type BriefingMemoryPriority = "must_read" | "useful" | "background";
|
|
28
|
+
interface BriefingQuality {
|
|
29
|
+
level: "strong" | "thin" | "noisy";
|
|
30
|
+
reasons: string[];
|
|
31
|
+
}
|
|
32
|
+
interface BriefingMemory {
|
|
33
|
+
id: string;
|
|
34
|
+
scope: string;
|
|
35
|
+
type: string;
|
|
36
|
+
module?: string;
|
|
37
|
+
tags: string[];
|
|
38
|
+
status: string;
|
|
39
|
+
confidence: ConfidenceLevel;
|
|
40
|
+
/** Present when confidence is 'low' or 'unverified' — AI should weight this memory cautiously. */
|
|
41
|
+
unverified?: true;
|
|
42
|
+
read_count: number;
|
|
43
|
+
/** Demonstrated-utility score in [0,1] from the closed-loop impact layer (reads + applied + sensor fires vs rejections/stale/dormancy). */
|
|
44
|
+
impact_score?: number;
|
|
45
|
+
/** Impact tier derived from {@link impact_score}. A nudge in ranking; surfaced for transparency. */
|
|
46
|
+
impact_tier?: ImpactTier;
|
|
47
|
+
reasons: Array<"anchor" | "module" | "domain" | "semantic" | "symbol">;
|
|
48
|
+
match_quality: "exact" | "partial" | "semantic";
|
|
49
|
+
semantic_score?: number;
|
|
50
|
+
/** Relevance tier for the current task. `must_read` should be consumed before edits. */
|
|
51
|
+
priority: BriefingMemoryPriority;
|
|
52
|
+
/** Human/agent-readable explanation for why this record was surfaced. */
|
|
53
|
+
why?: string[];
|
|
54
|
+
body: string;
|
|
55
|
+
file_path: string;
|
|
56
|
+
}
|
|
57
|
+
interface CodeMapSymbolHit {
|
|
58
|
+
symbol: string;
|
|
59
|
+
/** files that export this symbol */
|
|
60
|
+
locations: Array<{
|
|
61
|
+
file: string;
|
|
62
|
+
kind: string;
|
|
63
|
+
line: number;
|
|
64
|
+
description?: string;
|
|
65
|
+
}>;
|
|
66
|
+
}
|
|
67
|
+
interface ActionRequiredItem {
|
|
68
|
+
/** Memory id containing the alert */
|
|
69
|
+
id: string;
|
|
70
|
+
/** Short human-readable summary of the issue */
|
|
71
|
+
summary: string;
|
|
72
|
+
/**
|
|
73
|
+
* The exact message to show the developer before doing anything.
|
|
74
|
+
* Copy-paste this verbatim — do NOT paraphrase or act before confirmation.
|
|
75
|
+
*/
|
|
76
|
+
developer_message: string;
|
|
77
|
+
}
|
|
78
|
+
/** A single structured breadcrumb pointer (machine-readable twin of a `start_here` string). */
|
|
79
|
+
interface BriefingBreadcrumbItem {
|
|
80
|
+
type: "memory" | "code" | "files";
|
|
81
|
+
/** memory: record id (fetch with mem_get). */
|
|
82
|
+
id?: string;
|
|
83
|
+
scope?: string;
|
|
84
|
+
/** memory record type (decision/gotcha/…). */
|
|
85
|
+
mem_type?: string;
|
|
86
|
+
priority?: string;
|
|
87
|
+
/** memory: anchor path the lesson applies to · code: file exporting the symbol · files: a target path. */
|
|
88
|
+
file?: string;
|
|
89
|
+
line?: number;
|
|
90
|
+
kind?: string;
|
|
91
|
+
symbol?: string;
|
|
92
|
+
}
|
|
93
|
+
interface BriefingBreadcrumbs {
|
|
94
|
+
/**
|
|
95
|
+
* Small first-hop map for the agent. These are not full context; they are the best
|
|
96
|
+
* places to look before deciding whether deeper reads are needed.
|
|
97
|
+
*/
|
|
98
|
+
start_here: string[];
|
|
99
|
+
/**
|
|
100
|
+
* Structured twin of {@link start_here} — typed pointers (id / file / line / kind) so an agent can
|
|
101
|
+
* act (open the file, mem_get the id) without parsing strings. Still pointers, never body copies.
|
|
102
|
+
*/
|
|
103
|
+
start_here_items?: BriefingBreadcrumbItem[];
|
|
104
|
+
/**
|
|
105
|
+
* Follow-up calls/reads for progressive disclosure. Agents should pull these only
|
|
106
|
+
* when the task still needs more detail after the briefing.
|
|
107
|
+
*/
|
|
108
|
+
drill_down: string[];
|
|
109
|
+
/** Short operating note for this briefing. */
|
|
110
|
+
note?: string;
|
|
111
|
+
}
|
|
112
|
+
interface BriefingOutput {
|
|
113
|
+
task?: string;
|
|
114
|
+
/** Version of the Hivelore MCP server answering this briefing — lets the agent/human spot a stale server vs the repo. */
|
|
115
|
+
server_version: string;
|
|
116
|
+
search_mode: "semantic" | "literal_fallback" | "literal";
|
|
117
|
+
match_quality_note?: string;
|
|
118
|
+
inferred_modules: string[];
|
|
119
|
+
last_session?: {
|
|
120
|
+
id: string;
|
|
121
|
+
scope: string;
|
|
122
|
+
revision_count: number;
|
|
123
|
+
body: string;
|
|
124
|
+
};
|
|
125
|
+
project_context: {
|
|
126
|
+
content: string;
|
|
127
|
+
truncated: boolean;
|
|
128
|
+
is_template?: boolean;
|
|
129
|
+
auto_generated?: boolean;
|
|
130
|
+
omitted_recent?: boolean;
|
|
131
|
+
} | null;
|
|
132
|
+
module_contexts: Array<{
|
|
133
|
+
name: string;
|
|
134
|
+
content: string;
|
|
135
|
+
truncated: boolean;
|
|
136
|
+
}>;
|
|
137
|
+
memories: BriefingMemory[];
|
|
138
|
+
briefing_quality: BriefingQuality;
|
|
139
|
+
/**
|
|
140
|
+
* Breadcrumbs-first context map: keep the default briefing small, then pull deeper
|
|
141
|
+
* memories/code references only when the task needs them.
|
|
142
|
+
*/
|
|
143
|
+
breadcrumbs?: BriefingBreadcrumbs;
|
|
144
|
+
symbol_locations?: CodeMapSymbolHit[];
|
|
145
|
+
/**
|
|
146
|
+
* Memories that require explicit human confirmation before any code action.
|
|
147
|
+
* IMPORTANT: for each item, show developer_message to the developer and
|
|
148
|
+
* wait for explicit approval before modifying any code.
|
|
149
|
+
*/
|
|
150
|
+
action_required: ActionRequiredItem[];
|
|
151
|
+
decay_warnings: string[];
|
|
152
|
+
setup_warnings: string[];
|
|
153
|
+
/**
|
|
154
|
+
* True when this briefing carries little actionable signal:
|
|
155
|
+
* - project-context.md is still the default template
|
|
156
|
+
* - no memories matched the task (or none exist at all)
|
|
157
|
+
* - no previous session recap
|
|
158
|
+
*/
|
|
159
|
+
low_value?: true;
|
|
160
|
+
/**
|
|
161
|
+
* Whether this briefing carries knowledge a capable model could NOT have inferred on its own.
|
|
162
|
+
* - "high": at least one surfaced memory is arbitrary/team-specific (unguessable).
|
|
163
|
+
* - "low": nothing team-specific matched — a generic agent would reach the same answer.
|
|
164
|
+
*/
|
|
165
|
+
briefing_value?: "high" | "low";
|
|
166
|
+
/**
|
|
167
|
+
* Short, action-oriented hints surfaced to the agent based on the briefing payload.
|
|
168
|
+
*/
|
|
169
|
+
hints?: string[];
|
|
170
|
+
estimated_tokens: number;
|
|
171
|
+
budget: {
|
|
172
|
+
max_tokens: number;
|
|
173
|
+
/** Per-section token spend. `breadcrumbs` is present only when the breadcrumbs map is emitted. */
|
|
174
|
+
spent: {
|
|
175
|
+
project: number;
|
|
176
|
+
modules: number;
|
|
177
|
+
memories: number;
|
|
178
|
+
breadcrumbs?: number;
|
|
179
|
+
};
|
|
180
|
+
preset_applied?: "quick" | "balanced" | "deep";
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare const GetBriefingZod: z.ZodObject<{
|
|
185
|
+
task: z.ZodOptional<z.ZodString>;
|
|
186
|
+
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
187
|
+
max_tokens: z.ZodDefault<z.ZodNumber>;
|
|
188
|
+
max_memories: z.ZodDefault<z.ZodNumber>;
|
|
189
|
+
include_project_context: z.ZodDefault<z.ZodBoolean>;
|
|
190
|
+
dedupe_project_context: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
+
include_module_contexts: z.ZodDefault<z.ZodBoolean>;
|
|
192
|
+
semantic: z.ZodDefault<z.ZodBoolean>;
|
|
193
|
+
include_stale: z.ZodDefault<z.ZodBoolean>;
|
|
194
|
+
track: z.ZodDefault<z.ZodBoolean>;
|
|
195
|
+
format: z.ZodDefault<z.ZodEnum<["full", "compact", "actions"]>>;
|
|
196
|
+
symbols: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
197
|
+
min_semantic_score: z.ZodDefault<z.ZodNumber>;
|
|
198
|
+
budget_preset: z.ZodOptional<z.ZodEnum<["quick", "balanced", "deep"]>>;
|
|
199
|
+
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
symbols: string[];
|
|
201
|
+
format: "full" | "compact" | "actions";
|
|
202
|
+
files: string[];
|
|
203
|
+
max_tokens: number;
|
|
204
|
+
max_memories: number;
|
|
205
|
+
include_project_context: boolean;
|
|
206
|
+
include_module_contexts: boolean;
|
|
207
|
+
semantic: boolean;
|
|
208
|
+
include_stale: boolean;
|
|
209
|
+
track: boolean;
|
|
210
|
+
min_semantic_score: number;
|
|
211
|
+
task?: string | undefined;
|
|
212
|
+
dedupe_project_context?: boolean | undefined;
|
|
213
|
+
budget_preset?: "quick" | "balanced" | "deep" | undefined;
|
|
214
|
+
}, {
|
|
215
|
+
symbols?: string[] | undefined;
|
|
216
|
+
format?: "full" | "compact" | "actions" | undefined;
|
|
217
|
+
task?: string | undefined;
|
|
218
|
+
files?: string[] | undefined;
|
|
219
|
+
max_tokens?: number | undefined;
|
|
220
|
+
max_memories?: number | undefined;
|
|
221
|
+
include_project_context?: boolean | undefined;
|
|
222
|
+
dedupe_project_context?: boolean | undefined;
|
|
223
|
+
include_module_contexts?: boolean | undefined;
|
|
224
|
+
semantic?: boolean | undefined;
|
|
225
|
+
include_stale?: boolean | undefined;
|
|
226
|
+
track?: boolean | undefined;
|
|
227
|
+
min_semantic_score?: number | undefined;
|
|
228
|
+
budget_preset?: "quick" | "balanced" | "deep" | undefined;
|
|
229
|
+
}>;
|
|
230
|
+
type GetBriefingInput = z.infer<typeof GetBriefingZod>;
|
|
231
|
+
declare function getBriefing(input: GetBriefingInput, ctx: HaiveContext): Promise<BriefingOutput>;
|
|
232
|
+
|
|
233
|
+
declare const CodeMapInputZod: z.ZodObject<{
|
|
234
|
+
file: z.ZodOptional<z.ZodString>;
|
|
235
|
+
symbol: z.ZodOptional<z.ZodString>;
|
|
236
|
+
paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
237
|
+
max_files: z.ZodDefault<z.ZodNumber>;
|
|
238
|
+
max_tokens: z.ZodOptional<z.ZodNumber>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
paths: string[];
|
|
241
|
+
max_files: number;
|
|
242
|
+
symbol?: string | undefined;
|
|
243
|
+
max_tokens?: number | undefined;
|
|
244
|
+
file?: string | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
symbol?: string | undefined;
|
|
247
|
+
paths?: string[] | undefined;
|
|
248
|
+
max_tokens?: number | undefined;
|
|
249
|
+
file?: string | undefined;
|
|
250
|
+
max_files?: number | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
type CodeMapInput = z.infer<typeof CodeMapInputZod>;
|
|
253
|
+
interface CodeMapToolOutput {
|
|
254
|
+
available: boolean;
|
|
255
|
+
generated_at?: string;
|
|
256
|
+
total_files?: number;
|
|
257
|
+
files: Array<{
|
|
258
|
+
path: string;
|
|
259
|
+
summary?: string;
|
|
260
|
+
loc: number;
|
|
261
|
+
exports: Array<{
|
|
262
|
+
name: string;
|
|
263
|
+
kind: string;
|
|
264
|
+
description?: string;
|
|
265
|
+
line: number;
|
|
266
|
+
}>;
|
|
267
|
+
}>;
|
|
268
|
+
/** Number of matched files dropped due to max_files / max_tokens. */
|
|
269
|
+
truncated?: number;
|
|
270
|
+
/** True when at least one file was dropped to fit the token budget. */
|
|
271
|
+
budget_clipped?: true;
|
|
272
|
+
notice?: string;
|
|
273
|
+
}
|
|
274
|
+
declare function codeMapTool(input: CodeMapInput, ctx: HaiveContext): Promise<CodeMapToolOutput>;
|
|
275
|
+
|
|
276
|
+
declare const GetRecapInputSchema: {
|
|
277
|
+
scope: z.ZodDefault<z.ZodEnum<["personal", "team", "any"]>>;
|
|
278
|
+
};
|
|
279
|
+
type GetRecapInput = {
|
|
280
|
+
[K in keyof typeof GetRecapInputSchema]: z.infer<(typeof GetRecapInputSchema)[K]>;
|
|
281
|
+
};
|
|
282
|
+
interface GetRecapOutput {
|
|
283
|
+
recap: {
|
|
284
|
+
id: string;
|
|
285
|
+
scope: string;
|
|
286
|
+
revision_count: number;
|
|
287
|
+
created_at: string;
|
|
288
|
+
body: string;
|
|
289
|
+
} | null;
|
|
290
|
+
notice?: string;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Lightweight alternative to get_briefing when you ONLY need the previous
|
|
294
|
+
* session recap (e.g. resuming a long task between sessions). Skips project
|
|
295
|
+
* context, modules, and memory ranking — pays only the recap's token cost.
|
|
296
|
+
*/
|
|
297
|
+
declare function getRecap(input: GetRecapInput, ctx: HaiveContext): Promise<GetRecapOutput>;
|
|
298
|
+
|
|
299
|
+
declare const MemRelevantToInputSchema: {
|
|
300
|
+
task: z.ZodString;
|
|
301
|
+
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
302
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
303
|
+
min_semantic_score: z.ZodDefault<z.ZodNumber>;
|
|
304
|
+
format: z.ZodDefault<z.ZodEnum<["full", "compact", "actions"]>>;
|
|
305
|
+
};
|
|
306
|
+
type MemRelevantToInput = {
|
|
307
|
+
[K in keyof typeof MemRelevantToInputSchema]: z.infer<(typeof MemRelevantToInputSchema)[K]>;
|
|
308
|
+
};
|
|
309
|
+
interface MemRelevantToOutput {
|
|
310
|
+
task: string;
|
|
311
|
+
search_mode: "semantic" | "literal_fallback" | "literal";
|
|
312
|
+
memories: BriefingMemory[];
|
|
313
|
+
briefing_quality: BriefingQuality;
|
|
314
|
+
hints?: string[];
|
|
315
|
+
/**
|
|
316
|
+
* True when the search returned zero memories — clients can skip surfacing
|
|
317
|
+
* an empty payload to the model.
|
|
318
|
+
*/
|
|
319
|
+
empty?: true;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* One-shot ranked memories for a task. Use instead of get_briefing when you
|
|
323
|
+
* already have project context loaded and only want the relevant memory layer.
|
|
324
|
+
*
|
|
325
|
+
* Runs the same ranking (anchor / module / literal / semantic) as get_briefing
|
|
326
|
+
* but skips project_context, module_contexts, action_required, etc. — paying
|
|
327
|
+
* only the cost of the memory bodies you actually get back.
|
|
328
|
+
*/
|
|
329
|
+
declare function memRelevantTo(input: MemRelevantToInput, ctx: HaiveContext): Promise<MemRelevantToOutput>;
|
|
330
|
+
|
|
331
|
+
declare const CodeSearchInputSchema: {
|
|
332
|
+
query: z.ZodString;
|
|
333
|
+
k: z.ZodDefault<z.ZodNumber>;
|
|
334
|
+
min_score: z.ZodDefault<z.ZodNumber>;
|
|
335
|
+
};
|
|
336
|
+
type CodeSearchInput = {
|
|
337
|
+
[K in keyof typeof CodeSearchInputSchema]: z.infer<(typeof CodeSearchInputSchema)[K]>;
|
|
338
|
+
};
|
|
339
|
+
interface CodeSearchHit {
|
|
340
|
+
file: string;
|
|
341
|
+
name: string;
|
|
342
|
+
kind: string;
|
|
343
|
+
line: number;
|
|
344
|
+
description?: string;
|
|
345
|
+
score: number;
|
|
346
|
+
}
|
|
347
|
+
interface CodeSearchOutput {
|
|
348
|
+
available: boolean;
|
|
349
|
+
hits: CodeSearchHit[];
|
|
350
|
+
/** True when the embeddings index was built from an older code-map — results may miss new/moved symbols. */
|
|
351
|
+
stale?: true;
|
|
352
|
+
notice?: string;
|
|
353
|
+
}
|
|
354
|
+
declare function codeSearch(input: CodeSearchInput, ctx: HaiveContext): Promise<CodeSearchOutput>;
|
|
355
|
+
|
|
356
|
+
declare const WhyThisFileInputSchema: {
|
|
357
|
+
path: z.ZodString;
|
|
358
|
+
git_log_limit: z.ZodDefault<z.ZodNumber>;
|
|
359
|
+
memory_limit: z.ZodDefault<z.ZodNumber>;
|
|
360
|
+
};
|
|
361
|
+
type WhyThisFileInput = {
|
|
362
|
+
[K in keyof typeof WhyThisFileInputSchema]: z.infer<(typeof WhyThisFileInputSchema)[K]>;
|
|
363
|
+
};
|
|
364
|
+
interface WhyThisFileOutput {
|
|
365
|
+
file: string;
|
|
366
|
+
exists: boolean;
|
|
367
|
+
recent_commits: Array<{
|
|
368
|
+
sha: string;
|
|
369
|
+
author: string;
|
|
370
|
+
relative_date: string;
|
|
371
|
+
subject: string;
|
|
372
|
+
}>;
|
|
373
|
+
memories: Array<{
|
|
374
|
+
id: string;
|
|
375
|
+
type: string;
|
|
376
|
+
scope: string;
|
|
377
|
+
confidence: string;
|
|
378
|
+
body_preview: string;
|
|
379
|
+
}>;
|
|
380
|
+
code_map_entry: {
|
|
381
|
+
summary?: string;
|
|
382
|
+
loc: number;
|
|
383
|
+
exports: Array<{
|
|
384
|
+
name: string;
|
|
385
|
+
kind: string;
|
|
386
|
+
line: number;
|
|
387
|
+
description?: string;
|
|
388
|
+
}>;
|
|
389
|
+
} | null;
|
|
390
|
+
hints?: string[];
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* One-shot file-context lookup: combines recent git history, memories anchored
|
|
394
|
+
* to the path, and the code-map entry. Designed to answer "why is this file
|
|
395
|
+
* the way it is?" in a single call instead of 3-4 manual ones.
|
|
396
|
+
*/
|
|
397
|
+
declare function whyThisFile(input: WhyThisFileInput, ctx: HaiveContext): Promise<WhyThisFileOutput>;
|
|
398
|
+
|
|
399
|
+
interface AntiPatternsCheckInput {
|
|
400
|
+
diff?: string;
|
|
401
|
+
paths: string[];
|
|
402
|
+
limit: number;
|
|
403
|
+
semantic: boolean;
|
|
404
|
+
min_semantic_score?: number;
|
|
405
|
+
}
|
|
406
|
+
interface AntiPatternsWarning {
|
|
407
|
+
id: string;
|
|
408
|
+
type: "attempt" | "gotcha";
|
|
409
|
+
scope: string;
|
|
410
|
+
confidence: string;
|
|
411
|
+
body_preview: string;
|
|
412
|
+
reasons: Array<"anchor" | "literal" | "semantic" | "sensor">;
|
|
413
|
+
/**
|
|
414
|
+
* True when the LITERAL overlap includes a token that is *distinctive* to this memory
|
|
415
|
+
* (rare across the gotcha corpus) — e.g. `BigInt`, `open-in-view`. Only a distinctive
|
|
416
|
+
* literal overlap is precise enough to hard-block; a shared common word ("memory",
|
|
417
|
+
* "scope", "version") sets only the `literal` reason for review. Powers the gate.
|
|
418
|
+
*/
|
|
419
|
+
distinctive_literal?: boolean;
|
|
420
|
+
semantic_score?: number;
|
|
421
|
+
/** When a regex sensor fired: its self-correction message and severity. */
|
|
422
|
+
sensor_message?: string;
|
|
423
|
+
sensor_severity?: "warn" | "block";
|
|
424
|
+
/** Memory tags — used downstream (e.g. pre_commit_check) to weight a warning by topic. */
|
|
425
|
+
tags?: string[];
|
|
426
|
+
/** Anchor paths of the memory — lets the gate tell what kind of file this warning is about. */
|
|
427
|
+
anchor_paths?: string[];
|
|
428
|
+
/**
|
|
429
|
+
* True when the memory has an executable sensor defined.
|
|
430
|
+
* Used by the pre-commit gate: if a sensor exists but did NOT fire (no "sensor" reason),
|
|
431
|
+
* the sensor is the authoritative check and literal matching alone should not block.
|
|
432
|
+
*/
|
|
433
|
+
has_sensor?: boolean;
|
|
434
|
+
}
|
|
435
|
+
interface AntiPatternsCheckOutput {
|
|
436
|
+
/** Total number of attempt+gotcha memories that exist in this project. */
|
|
437
|
+
scanned: number;
|
|
438
|
+
warnings: AntiPatternsWarning[];
|
|
439
|
+
notice?: string;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Scan a diff (or set of paths) against documented attempt/gotcha memories.
|
|
443
|
+
* Surfaces "you are about to repeat a known mistake" warnings BEFORE you commit.
|
|
444
|
+
*
|
|
445
|
+
* Matching strategy:
|
|
446
|
+
* 1. Anchor — memories anchored to any of the changed paths
|
|
447
|
+
* 2. Literal — tokens from the diff overlap with memory body
|
|
448
|
+
* 3. Semantic — cosine similarity (when enabled and index available)
|
|
449
|
+
*/
|
|
450
|
+
declare function antiPatternsCheck(input: AntiPatternsCheckInput, ctx: HaiveContext): Promise<AntiPatternsCheckOutput>;
|
|
451
|
+
|
|
452
|
+
declare const MemDistillInputSchema: {
|
|
453
|
+
since_days: z.ZodDefault<z.ZodNumber>;
|
|
454
|
+
min_cluster: z.ZodDefault<z.ZodNumber>;
|
|
455
|
+
type_filter: z.ZodDefault<z.ZodEnum<["gotcha", "attempt", "all"]>>;
|
|
456
|
+
scope: z.ZodDefault<z.ZodEnum<["personal", "team", "module", "any"]>>;
|
|
457
|
+
};
|
|
458
|
+
type MemDistillInput = {
|
|
459
|
+
[K in keyof typeof MemDistillInputSchema]: z.infer<(typeof MemDistillInputSchema)[K]>;
|
|
460
|
+
};
|
|
461
|
+
interface DistillCluster {
|
|
462
|
+
suggested_topic: string;
|
|
463
|
+
suggested_type: "convention" | "gotcha";
|
|
464
|
+
member_ids: string[];
|
|
465
|
+
overlapping_paths: string[];
|
|
466
|
+
common_keywords: string[];
|
|
467
|
+
sample_titles: string[];
|
|
468
|
+
/** ISO date of the latest member */
|
|
469
|
+
latest_at: string;
|
|
470
|
+
}
|
|
471
|
+
interface MemDistillOutput {
|
|
472
|
+
scanned: number;
|
|
473
|
+
/** Memories that didn't fit any cluster (kept here so callers can inspect singletons). */
|
|
474
|
+
singletons: number;
|
|
475
|
+
clusters: DistillCluster[];
|
|
476
|
+
notice?: string;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Cluster recurring observations / attempts so a human can collapse N similar
|
|
480
|
+
* memories into one richer convention/gotcha. Uses cheap heuristics (anchor
|
|
481
|
+
* path overlap + body keyword overlap) — no embeddings needed.
|
|
482
|
+
*
|
|
483
|
+
* Output is *advisory*: nothing is written to disk. The caller (CLI / human)
|
|
484
|
+
* decides whether to mem_save the consolidated form.
|
|
485
|
+
*/
|
|
486
|
+
declare function memDistill(input: MemDistillInput, ctx: HaiveContext): Promise<MemDistillOutput>;
|
|
487
|
+
|
|
488
|
+
declare const WhyThisDecisionInputSchema: {
|
|
489
|
+
id: z.ZodString;
|
|
490
|
+
git_log_limit: z.ZodDefault<z.ZodNumber>;
|
|
491
|
+
};
|
|
492
|
+
type WhyThisDecisionInput = {
|
|
493
|
+
[K in keyof typeof WhyThisDecisionInputSchema]: z.infer<(typeof WhyThisDecisionInputSchema)[K]>;
|
|
494
|
+
};
|
|
495
|
+
interface WhyThisDecisionOutput {
|
|
496
|
+
found: boolean;
|
|
497
|
+
decision?: {
|
|
498
|
+
id: string;
|
|
499
|
+
type: string;
|
|
500
|
+
scope: string;
|
|
501
|
+
status: string;
|
|
502
|
+
confidence: string;
|
|
503
|
+
body: string;
|
|
504
|
+
created_at: string;
|
|
505
|
+
};
|
|
506
|
+
/** Memories explicitly linked via related_ids on the decision (or vice versa). */
|
|
507
|
+
related: Array<{
|
|
508
|
+
id: string;
|
|
509
|
+
type: string;
|
|
510
|
+
scope: string;
|
|
511
|
+
confidence: string;
|
|
512
|
+
body_preview: string;
|
|
513
|
+
relation: "explicit" | "back-link";
|
|
514
|
+
}>;
|
|
515
|
+
/** Other memories anchored to overlapping paths — implicit context. */
|
|
516
|
+
path_neighbors: Array<{
|
|
517
|
+
id: string;
|
|
518
|
+
type: string;
|
|
519
|
+
scope: string;
|
|
520
|
+
confidence: string;
|
|
521
|
+
overlap: string[];
|
|
522
|
+
body_preview: string;
|
|
523
|
+
}>;
|
|
524
|
+
/** Recent git commits touching any of the decision's anchored paths. */
|
|
525
|
+
recent_commits: Array<{
|
|
526
|
+
path: string;
|
|
527
|
+
sha: string;
|
|
528
|
+
author: string;
|
|
529
|
+
relative_date: string;
|
|
530
|
+
subject: string;
|
|
531
|
+
}>;
|
|
532
|
+
hints?: string[];
|
|
533
|
+
notice?: string;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Trace the genealogy of a `decision` memory: the decision itself + memories
|
|
537
|
+
* explicitly linked to it + memories anchored to overlapping paths + recent
|
|
538
|
+
* commits touching those paths. One call instead of 4-5 manual lookups.
|
|
539
|
+
*
|
|
540
|
+
* Works on any memory type, but is optimized for `decision` and `architecture`.
|
|
541
|
+
*/
|
|
542
|
+
declare function whyThisDecision(input: WhyThisDecisionInput, ctx: HaiveContext): Promise<WhyThisDecisionOutput>;
|
|
543
|
+
|
|
544
|
+
declare const MemConflictsInputSchema: {
|
|
545
|
+
id: z.ZodString;
|
|
546
|
+
min_score: z.ZodDefault<z.ZodNumber>;
|
|
547
|
+
semantic: z.ZodDefault<z.ZodBoolean>;
|
|
548
|
+
};
|
|
549
|
+
type MemConflictsInput = {
|
|
550
|
+
[K in keyof typeof MemConflictsInputSchema]: z.infer<(typeof MemConflictsInputSchema)[K]>;
|
|
551
|
+
};
|
|
552
|
+
type ConflictReason = "opposite-status" | "attempt-vs-convention-same-paths" | "polarity-keywords" | "explicit-contradiction-tag";
|
|
553
|
+
interface ConflictHit {
|
|
554
|
+
id: string;
|
|
555
|
+
type: string;
|
|
556
|
+
scope: string;
|
|
557
|
+
status: string;
|
|
558
|
+
confidence: string;
|
|
559
|
+
body_preview: string;
|
|
560
|
+
similarity: number | null;
|
|
561
|
+
reasons: ConflictReason[];
|
|
562
|
+
shared_paths: string[];
|
|
563
|
+
}
|
|
564
|
+
interface MemConflictsOutput {
|
|
565
|
+
found: boolean;
|
|
566
|
+
target?: {
|
|
567
|
+
id: string;
|
|
568
|
+
type: string;
|
|
569
|
+
status: string;
|
|
570
|
+
};
|
|
571
|
+
scanned: number;
|
|
572
|
+
conflicts: ConflictHit[];
|
|
573
|
+
notice?: string;
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Find memories that potentially CONTRADICT the given memory. Useful before
|
|
577
|
+
* relying on a memory's advice — surfaces "another memory says the opposite".
|
|
578
|
+
*
|
|
579
|
+
* Detection layers (any of these triggers a hit):
|
|
580
|
+
* - Opposite status: target is validated, neighbor is rejected — for the same topic
|
|
581
|
+
* - Type mismatch on overlapping paths: an `attempt` (don't do X) coexists with
|
|
582
|
+
* a `convention` (do X) anchored to overlapping paths
|
|
583
|
+
* - Polarity keywords: target says "use X" while a semantic neighbor says "don't use X"
|
|
584
|
+
* - Explicit contradiction tag (#contradicts:<id>) in either body
|
|
585
|
+
*/
|
|
586
|
+
declare function memConflicts(input: MemConflictsInput, ctx: HaiveContext): Promise<MemConflictsOutput>;
|
|
587
|
+
|
|
588
|
+
declare const PreCommitCheckInputSchema: {
|
|
589
|
+
diff: z.ZodOptional<z.ZodString>;
|
|
590
|
+
paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
591
|
+
block_on: z.ZodDefault<z.ZodEnum<["any", "high-confidence", "never"]>>;
|
|
592
|
+
semantic: z.ZodDefault<z.ZodBoolean>;
|
|
593
|
+
anchored_blocks: z.ZodDefault<z.ZodBoolean>;
|
|
594
|
+
};
|
|
595
|
+
type PreCommitCheckInput = {
|
|
596
|
+
[K in keyof typeof PreCommitCheckInputSchema]: z.infer<(typeof PreCommitCheckInputSchema)[K]>;
|
|
597
|
+
};
|
|
598
|
+
interface PreCommitCheckOutput {
|
|
599
|
+
/** True when at least one finding meets the configured block_on threshold. */
|
|
600
|
+
should_block: boolean;
|
|
601
|
+
/** Per-section summary; clients should surface the warnings + reasons to the user. */
|
|
602
|
+
summary: {
|
|
603
|
+
anti_patterns: number;
|
|
604
|
+
blocking_warnings?: number;
|
|
605
|
+
review_warnings?: number;
|
|
606
|
+
info_warnings?: number;
|
|
607
|
+
relevant_memories: number;
|
|
608
|
+
stale_anchors: number;
|
|
609
|
+
};
|
|
610
|
+
warnings: ClassifiedAntiPatternsWarning[];
|
|
611
|
+
/** Memories anchored to the touched files — convention reminders for the change author. */
|
|
612
|
+
relevant_memories: Array<{
|
|
613
|
+
id: string;
|
|
614
|
+
type: string;
|
|
615
|
+
confidence: string;
|
|
616
|
+
body_preview: string;
|
|
617
|
+
}>;
|
|
618
|
+
/** Memories whose anchored paths overlap with the diff AND are now stale — likely outdated knowledge. */
|
|
619
|
+
stale_anchors: Array<{
|
|
620
|
+
id: string;
|
|
621
|
+
paths: string[];
|
|
622
|
+
body_preview: string;
|
|
623
|
+
}>;
|
|
624
|
+
notice?: string;
|
|
625
|
+
}
|
|
626
|
+
type AntiPatternLevel = "blocking" | "review" | "info";
|
|
627
|
+
interface ClassifiedAntiPatternsWarning extends AntiPatternsWarning {
|
|
628
|
+
/**
|
|
629
|
+
* blocking = commit gate should fail for the configured threshold;
|
|
630
|
+
* review = plausible but not strong enough to block;
|
|
631
|
+
* info = weak signal, hidden by default in human CLI output.
|
|
632
|
+
*/
|
|
633
|
+
level: AntiPatternLevel;
|
|
634
|
+
rationale: string;
|
|
635
|
+
affected_files: string[];
|
|
636
|
+
repair_command: string;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* One-shot "should I block this commit?" check.
|
|
640
|
+
*
|
|
641
|
+
* Combines three signals into a single call agents and git hooks can consume:
|
|
642
|
+
* 1. anti_patterns_check — known gotchas/attempts that match the diff
|
|
643
|
+
* 2. mem_for_files — conventions/decisions anchored to touched files
|
|
644
|
+
* 3. mem_verify — memories whose anchors are stale (knowledge may be wrong)
|
|
645
|
+
*
|
|
646
|
+
* Returns should_block per the configured threshold, plus the raw findings so
|
|
647
|
+
* the caller can render them. CLI wrapper: `hivelore precommit`.
|
|
648
|
+
*/
|
|
649
|
+
declare function preCommitCheck(input: PreCommitCheckInput, ctx: HaiveContext): Promise<PreCommitCheckOutput>;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Read the PRESUMED-CORRECT contents of anchored files for sensor self-checks.
|
|
653
|
+
*
|
|
654
|
+
* "Silent on current" must test the last COMMITTED state (HEAD), not the working tree: an agent
|
|
655
|
+
* typically proposes a sensor right after hitting the failure, while the bad pattern is still
|
|
656
|
+
* sitting uncommitted in the anchored file — validating against the working tree then rejects
|
|
657
|
+
* every honest proposal with fires-on-current. HEAD already passed the gate, so it is the
|
|
658
|
+
* presumed-correct baseline; fall back to the working tree for files not yet in git.
|
|
659
|
+
*/
|
|
660
|
+
declare function readPresumedCorrectTargets(root: string, relPaths: string[]): Promise<SensorTarget[]>;
|
|
661
|
+
|
|
662
|
+
declare const PatternDetectInputSchema: {
|
|
663
|
+
since_days: z.ZodDefault<z.ZodNumber>;
|
|
664
|
+
dry_run: z.ZodDefault<z.ZodBoolean>;
|
|
665
|
+
scope: z.ZodDefault<z.ZodEnum<["personal", "team"]>>;
|
|
666
|
+
};
|
|
667
|
+
type PatternDetectInput = {
|
|
668
|
+
[K in keyof typeof PatternDetectInputSchema]: z.infer<(typeof PatternDetectInputSchema)[K]>;
|
|
669
|
+
};
|
|
670
|
+
type PatternKind = "config_change" | "repeated_path" | "hot_file";
|
|
671
|
+
interface PatternMatch {
|
|
672
|
+
kind: PatternKind;
|
|
673
|
+
signal: string;
|
|
674
|
+
proposed_type: "convention" | "gotcha";
|
|
675
|
+
proposed_slug: string;
|
|
676
|
+
proposed_body: string;
|
|
677
|
+
anchor_paths: string[];
|
|
678
|
+
}
|
|
679
|
+
interface PatternDetectOutput {
|
|
680
|
+
scanned_events: number;
|
|
681
|
+
matches: PatternMatch[];
|
|
682
|
+
/** Number of proposed memories saved (0 if dry_run). */
|
|
683
|
+
saved: number;
|
|
684
|
+
/** IDs of saved memories. */
|
|
685
|
+
saved_ids: string[];
|
|
686
|
+
notice?: string;
|
|
687
|
+
}
|
|
688
|
+
declare function patternDetect(input: PatternDetectInput, ctx: HaiveContext): Promise<PatternDetectOutput>;
|
|
689
|
+
|
|
690
|
+
/** Input is intentionally minimal — callers may pass cwd for multi-root clients. */
|
|
691
|
+
declare const MemResolveProjectInputSchema: {
|
|
692
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
693
|
+
};
|
|
694
|
+
type MemResolveProjectInput = {
|
|
695
|
+
[K in keyof typeof MemResolveProjectInputSchema]: z.infer<(typeof MemResolveProjectInputSchema)[K]>;
|
|
696
|
+
};
|
|
697
|
+
declare function memResolveProject(input: MemResolveProjectInput, _ctx: HaiveContext): Promise<{
|
|
698
|
+
info: ReturnType<typeof resolveProjectInfo>;
|
|
699
|
+
ok: true;
|
|
700
|
+
}>;
|
|
701
|
+
|
|
702
|
+
declare const MemSuggestTopicInputSchema: {
|
|
703
|
+
type: z.ZodEnum<["convention", "decision", "gotcha", "architecture", "glossary", "skill", "attempt", "session_recap"]>;
|
|
704
|
+
title: z.ZodString;
|
|
705
|
+
};
|
|
706
|
+
type MemSuggestTopicInput = {
|
|
707
|
+
[K in keyof typeof MemSuggestTopicInputSchema]: z.infer<(typeof MemSuggestTopicInputSchema)[K]>;
|
|
708
|
+
};
|
|
709
|
+
declare function memSuggestTopic(input: MemSuggestTopicInput, _ctx: HaiveContext): Promise<{
|
|
710
|
+
topic_key: string;
|
|
711
|
+
family: string;
|
|
712
|
+
type: string;
|
|
713
|
+
}>;
|
|
714
|
+
|
|
715
|
+
declare const MemTimelineInputSchema: {
|
|
716
|
+
memory_id: z.ZodOptional<z.ZodString>;
|
|
717
|
+
topic: z.ZodOptional<z.ZodString>;
|
|
718
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
719
|
+
};
|
|
720
|
+
type MemTimelineInput = {
|
|
721
|
+
[K in keyof typeof MemTimelineInputSchema]: z.infer<(typeof MemTimelineInputSchema)[K]>;
|
|
722
|
+
};
|
|
723
|
+
declare function memTimeline(input: MemTimelineInput, ctx: HaiveContext): Promise<{
|
|
724
|
+
entries: _hivelore_core.TimelineEntry[];
|
|
725
|
+
total: number;
|
|
726
|
+
notice: string | undefined;
|
|
727
|
+
}>;
|
|
728
|
+
|
|
729
|
+
interface SuggestedResolution {
|
|
730
|
+
keep_id: string;
|
|
731
|
+
supersede_id: string;
|
|
732
|
+
reason: string;
|
|
733
|
+
/** Copy-paste command that APPLIES the guided supersede (promotes winner, deprecates loser). */
|
|
734
|
+
command: string;
|
|
735
|
+
}
|
|
736
|
+
declare const MemConflictCandidatesInputSchema: {
|
|
737
|
+
since_days: z.ZodDefault<z.ZodNumber>;
|
|
738
|
+
types: z.ZodDefault<z.ZodArray<z.ZodEnum<["decision", "architecture", "convention", "gotcha"]>, "many">>;
|
|
739
|
+
min_jaccard: z.ZodDefault<z.ZodNumber>;
|
|
740
|
+
max_pairs: z.ZodDefault<z.ZodNumber>;
|
|
741
|
+
max_scan: z.ZodDefault<z.ZodNumber>;
|
|
742
|
+
max_topic_pairs: z.ZodDefault<z.ZodNumber>;
|
|
743
|
+
};
|
|
744
|
+
type MemConflictCandidatesInput = {
|
|
745
|
+
[K in keyof typeof MemConflictCandidatesInputSchema]: z.infer<(typeof MemConflictCandidatesInputSchema)[K]>;
|
|
746
|
+
};
|
|
747
|
+
declare function memConflictCandidates(input: MemConflictCandidatesInput, ctx: HaiveContext): Promise<{
|
|
748
|
+
pairs: {
|
|
749
|
+
suggested_resolution: SuggestedResolution | null;
|
|
750
|
+
id_a: string;
|
|
751
|
+
id_b: string;
|
|
752
|
+
jaccard: number;
|
|
753
|
+
}[];
|
|
754
|
+
topic_status_pairs: {
|
|
755
|
+
suggested_resolution: SuggestedResolution | null;
|
|
756
|
+
id_a: string;
|
|
757
|
+
id_b: string;
|
|
758
|
+
topic: string;
|
|
759
|
+
status_a: string;
|
|
760
|
+
status_b: string;
|
|
761
|
+
}[];
|
|
762
|
+
scanned: number;
|
|
763
|
+
truncated: boolean;
|
|
764
|
+
notice: string | undefined;
|
|
765
|
+
}>;
|
|
766
|
+
|
|
767
|
+
declare const RuntimeJournalAppendInputSchema: {
|
|
768
|
+
message: z.ZodString;
|
|
769
|
+
kind: z.ZodDefault<z.ZodEnum<["note", "session_end", "mcp"]>>;
|
|
770
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
771
|
+
};
|
|
772
|
+
type RuntimeJournalAppendInput = {
|
|
773
|
+
[K in keyof typeof RuntimeJournalAppendInputSchema]: z.infer<(typeof RuntimeJournalAppendInputSchema)[K]>;
|
|
774
|
+
};
|
|
775
|
+
declare function runtimeJournalAppend(input: RuntimeJournalAppendInput, ctx: HaiveContext): Promise<{
|
|
776
|
+
ok: true;
|
|
777
|
+
path_hint: string;
|
|
778
|
+
}>;
|
|
779
|
+
|
|
780
|
+
declare const RuntimeJournalTailInputSchema: {
|
|
781
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
782
|
+
};
|
|
783
|
+
type RuntimeJournalTailInput = {
|
|
784
|
+
[K in keyof typeof RuntimeJournalTailInputSchema]: z.infer<(typeof RuntimeJournalTailInputSchema)[K]>;
|
|
785
|
+
};
|
|
786
|
+
declare function runtimeJournalTail(input: RuntimeJournalTailInput, ctx: HaiveContext): Promise<{
|
|
787
|
+
entries: Awaited<ReturnType<typeof readRuntimeJournalTail>>;
|
|
788
|
+
empty?: boolean;
|
|
789
|
+
}>;
|
|
790
|
+
|
|
791
|
+
declare const SERVER_NAME = "hivelore";
|
|
792
|
+
declare const SERVER_VERSION: string;
|
|
793
|
+
type ToolProfile = "enforcement" | "maintenance" | "experimental" | "full";
|
|
794
|
+
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"];
|
|
795
|
+
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"];
|
|
796
|
+
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", "mem_observe", "why_this_file", "why_this_decision", "mem_conflicts_with", "pattern_detect", "runtime_journal_append", "runtime_journal_tail"];
|
|
797
|
+
declare const TOOL_PROFILES: Record<Exclude<ToolProfile, "full">, ReadonlySet<string>>;
|
|
798
|
+
declare function getAllowedToolsForProfile(profile: ToolProfile): ReadonlySet<string>;
|
|
799
|
+
declare function createHaiveServer(options?: CreateContextOptions): {
|
|
800
|
+
server: McpServer;
|
|
801
|
+
context: HaiveContext;
|
|
802
|
+
tracker: SessionTracker;
|
|
803
|
+
};
|
|
804
|
+
/** Parse argv for the standalone haive-mcp binary / CLI subprocess parity. */
|
|
805
|
+
declare function parseMcpCliArgs(argv: string[]): {
|
|
806
|
+
root?: string;
|
|
807
|
+
versionOnly: boolean;
|
|
808
|
+
};
|
|
809
|
+
/** Print MCP server version (same as haive CLI when bundled together). */
|
|
810
|
+
declare function printHaiveMcpVersion(): void;
|
|
811
|
+
/**
|
|
812
|
+
* Run the MCP server over stdio. Used by `haive-mcp` and by `hivelore mcp --stdio`
|
|
813
|
+
* when the MCP implementation is bundled into the CLI.
|
|
814
|
+
*/
|
|
815
|
+
declare function runHaiveMcpStdio(options: {
|
|
816
|
+
root?: string;
|
|
817
|
+
}): Promise<void>;
|
|
818
|
+
|
|
819
|
+
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, readPresumedCorrectTargets, runHaiveMcpStdio, runtimeJournalAppend, runtimeJournalTail, whyThisDecision, whyThisFile };
|