@memstack/mcp 0.7.2 → 0.8.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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MemStackConfig, MemStack } from '@memstack/core';
1
+ import { MemStackConfig, MemStack, HarnessMemory } from '@memstack/core';
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
 
4
4
  declare function loadConfig(): Promise<{
@@ -13,4 +13,24 @@ declare function createServer({ config, defaultActorId, ms: providedMs, }: {
13
13
  ms?: MemStack;
14
14
  }): Server;
15
15
 
16
- export { createServer, loadConfig };
16
+ declare const HARNESS_INSTRUCTIONS: string;
17
+ interface HarnessServerOptions {
18
+ memory: HarnessMemory;
19
+ projectId: string;
20
+ /** Harness that launched the server, e.g. "claude-code". Falls back to the MCP client's name. */
21
+ harness?: string;
22
+ cwd?: string;
23
+ }
24
+ declare function createHarnessServer({ memory, projectId, harness, cwd }: HarnessServerOptions): Server;
25
+
26
+ /** Characters of memory text a hook prints, well under Claude Code's 10,000 and Codex's ~2,500-token limits. */
27
+ declare const HOOK_MAX_CHARS = 6000;
28
+ interface HookInput {
29
+ cwd?: string;
30
+ session_id?: string;
31
+ source?: string;
32
+ }
33
+ /** The context a session starts with, or an empty string when the project has no memories. */
34
+ declare function sessionStartContext(input: HookInput, env?: NodeJS.ProcessEnv): Promise<string>;
35
+
36
+ export { HARNESS_INSTRUCTIONS, HOOK_MAX_CHARS, type HarnessServerOptions, type HookInput, createHarnessServer, createServer, loadConfig, sessionStartContext };