stellar-memory 0.5.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 +362 -0
- package/dist/api/routes/analytics.d.ts +15 -0
- package/dist/api/routes/analytics.js +131 -0
- package/dist/api/routes/analytics.js.map +1 -0
- package/dist/api/routes/conflicts.d.ts +12 -0
- package/dist/api/routes/conflicts.js +67 -0
- package/dist/api/routes/conflicts.js.map +1 -0
- package/dist/api/routes/consolidation.d.ts +11 -0
- package/dist/api/routes/consolidation.js +63 -0
- package/dist/api/routes/consolidation.js.map +1 -0
- package/dist/api/routes/constellation.d.ts +4 -0
- package/dist/api/routes/constellation.js +84 -0
- package/dist/api/routes/constellation.js.map +1 -0
- package/dist/api/routes/memories.d.ts +4 -0
- package/dist/api/routes/memories.js +219 -0
- package/dist/api/routes/memories.js.map +1 -0
- package/dist/api/routes/observations.d.ts +10 -0
- package/dist/api/routes/observations.js +42 -0
- package/dist/api/routes/observations.js.map +1 -0
- package/dist/api/routes/orbit.d.ts +4 -0
- package/dist/api/routes/orbit.js +71 -0
- package/dist/api/routes/orbit.js.map +1 -0
- package/dist/api/routes/projects.d.ts +15 -0
- package/dist/api/routes/projects.js +121 -0
- package/dist/api/routes/projects.js.map +1 -0
- package/dist/api/routes/scan.d.ts +4 -0
- package/dist/api/routes/scan.js +403 -0
- package/dist/api/routes/scan.js.map +1 -0
- package/dist/api/routes/sun.d.ts +4 -0
- package/dist/api/routes/sun.js +43 -0
- package/dist/api/routes/sun.js.map +1 -0
- package/dist/api/routes/system.d.ts +4 -0
- package/dist/api/routes/system.js +70 -0
- package/dist/api/routes/system.js.map +1 -0
- package/dist/api/routes/temporal.d.ts +13 -0
- package/dist/api/routes/temporal.js +82 -0
- package/dist/api/routes/temporal.js.map +1 -0
- package/dist/api/server.d.ts +2 -0
- package/dist/api/server.js +99 -0
- package/dist/api/server.js.map +1 -0
- package/dist/api/websocket.d.ts +53 -0
- package/dist/api/websocket.js +168 -0
- package/dist/api/websocket.js.map +1 -0
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.js +35 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +10 -0
- package/dist/cli/init.js +163 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/engine/analytics.d.ts +93 -0
- package/dist/engine/analytics.js +437 -0
- package/dist/engine/analytics.js.map +1 -0
- package/dist/engine/conflict.d.ts +54 -0
- package/dist/engine/conflict.js +322 -0
- package/dist/engine/conflict.js.map +1 -0
- package/dist/engine/consolidation.d.ts +83 -0
- package/dist/engine/consolidation.js +368 -0
- package/dist/engine/consolidation.js.map +1 -0
- package/dist/engine/constellation.d.ts +66 -0
- package/dist/engine/constellation.js +382 -0
- package/dist/engine/constellation.js.map +1 -0
- package/dist/engine/corona.d.ts +53 -0
- package/dist/engine/corona.js +181 -0
- package/dist/engine/corona.js.map +1 -0
- package/dist/engine/embedding.d.ts +44 -0
- package/dist/engine/embedding.js +168 -0
- package/dist/engine/embedding.js.map +1 -0
- package/dist/engine/gravity.d.ts +63 -0
- package/dist/engine/gravity.js +121 -0
- package/dist/engine/gravity.js.map +1 -0
- package/dist/engine/multiproject.d.ts +75 -0
- package/dist/engine/multiproject.js +241 -0
- package/dist/engine/multiproject.js.map +1 -0
- package/dist/engine/observation.d.ts +82 -0
- package/dist/engine/observation.js +357 -0
- package/dist/engine/observation.js.map +1 -0
- package/dist/engine/orbit.d.ts +91 -0
- package/dist/engine/orbit.js +249 -0
- package/dist/engine/orbit.js.map +1 -0
- package/dist/engine/planet.d.ts +64 -0
- package/dist/engine/planet.js +432 -0
- package/dist/engine/planet.js.map +1 -0
- package/dist/engine/procedural.d.ts +71 -0
- package/dist/engine/procedural.js +259 -0
- package/dist/engine/procedural.js.map +1 -0
- package/dist/engine/quality.d.ts +48 -0
- package/dist/engine/quality.js +245 -0
- package/dist/engine/quality.js.map +1 -0
- package/dist/engine/repository.d.ts +79 -0
- package/dist/engine/repository.js +13 -0
- package/dist/engine/repository.js.map +1 -0
- package/dist/engine/sun.d.ts +61 -0
- package/dist/engine/sun.js +240 -0
- package/dist/engine/sun.js.map +1 -0
- package/dist/engine/temporal.d.ts +67 -0
- package/dist/engine/temporal.js +283 -0
- package/dist/engine/temporal.js.map +1 -0
- package/dist/engine/types.d.ts +179 -0
- package/dist/engine/types.js +27 -0
- package/dist/engine/types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/connector-registry.d.ts +20 -0
- package/dist/mcp/connector-registry.js +35 -0
- package/dist/mcp/connector-registry.js.map +1 -0
- package/dist/mcp/server.d.ts +13 -0
- package/dist/mcp/server.js +242 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/daemon-tool.d.ts +16 -0
- package/dist/mcp/tools/daemon-tool.js +58 -0
- package/dist/mcp/tools/daemon-tool.js.map +1 -0
- package/dist/mcp/tools/ingestion-tools.d.ts +20 -0
- package/dist/mcp/tools/ingestion-tools.js +34 -0
- package/dist/mcp/tools/ingestion-tools.js.map +1 -0
- package/dist/mcp/tools/memory-tools.d.ts +122 -0
- package/dist/mcp/tools/memory-tools.js +1037 -0
- package/dist/mcp/tools/memory-tools.js.map +1 -0
- package/dist/scanner/cloud/github.d.ts +34 -0
- package/dist/scanner/cloud/github.js +260 -0
- package/dist/scanner/cloud/github.js.map +1 -0
- package/dist/scanner/cloud/google-drive.d.ts +30 -0
- package/dist/scanner/cloud/google-drive.js +289 -0
- package/dist/scanner/cloud/google-drive.js.map +1 -0
- package/dist/scanner/cloud/notion.d.ts +33 -0
- package/dist/scanner/cloud/notion.js +231 -0
- package/dist/scanner/cloud/notion.js.map +1 -0
- package/dist/scanner/cloud/slack.d.ts +38 -0
- package/dist/scanner/cloud/slack.js +282 -0
- package/dist/scanner/cloud/slack.js.map +1 -0
- package/dist/scanner/cloud/types.d.ts +73 -0
- package/dist/scanner/cloud/types.js +9 -0
- package/dist/scanner/cloud/types.js.map +1 -0
- package/dist/scanner/index.d.ts +35 -0
- package/dist/scanner/index.js +420 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/scanner/local/filesystem.d.ts +33 -0
- package/dist/scanner/local/filesystem.js +203 -0
- package/dist/scanner/local/filesystem.js.map +1 -0
- package/dist/scanner/local/git.d.ts +24 -0
- package/dist/scanner/local/git.js +161 -0
- package/dist/scanner/local/git.js.map +1 -0
- package/dist/scanner/local/parsers/code.d.ts +3 -0
- package/dist/scanner/local/parsers/code.js +127 -0
- package/dist/scanner/local/parsers/code.js.map +1 -0
- package/dist/scanner/local/parsers/index.d.ts +11 -0
- package/dist/scanner/local/parsers/index.js +24 -0
- package/dist/scanner/local/parsers/index.js.map +1 -0
- package/dist/scanner/local/parsers/json-parser.d.ts +3 -0
- package/dist/scanner/local/parsers/json-parser.js +117 -0
- package/dist/scanner/local/parsers/json-parser.js.map +1 -0
- package/dist/scanner/local/parsers/markdown.d.ts +3 -0
- package/dist/scanner/local/parsers/markdown.js +120 -0
- package/dist/scanner/local/parsers/markdown.js.map +1 -0
- package/dist/scanner/local/parsers/text.d.ts +3 -0
- package/dist/scanner/local/parsers/text.js +41 -0
- package/dist/scanner/local/parsers/text.js.map +1 -0
- package/dist/scanner/metadata-scanner.d.ts +67 -0
- package/dist/scanner/metadata-scanner.js +356 -0
- package/dist/scanner/metadata-scanner.js.map +1 -0
- package/dist/scanner/types.d.ts +47 -0
- package/dist/scanner/types.js +19 -0
- package/dist/scanner/types.js.map +1 -0
- package/dist/service/daemon.d.ts +23 -0
- package/dist/service/daemon.js +105 -0
- package/dist/service/daemon.js.map +1 -0
- package/dist/service/scheduler.d.ts +73 -0
- package/dist/service/scheduler.js +281 -0
- package/dist/service/scheduler.js.map +1 -0
- package/dist/storage/database.d.ts +10 -0
- package/dist/storage/database.js +265 -0
- package/dist/storage/database.js.map +1 -0
- package/dist/storage/queries.d.ts +85 -0
- package/dist/storage/queries.js +865 -0
- package/dist/storage/queries.js.map +1 -0
- package/dist/storage/sqlite-repository.d.ts +32 -0
- package/dist/storage/sqlite-repository.js +68 -0
- package/dist/storage/sqlite-repository.js.map +1 -0
- package/dist/storage/vec.d.ts +62 -0
- package/dist/storage/vec.js +111 -0
- package/dist/storage/vec.js.map +1 -0
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.js +60 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/logger.d.ts +36 -0
- package/dist/utils/logger.js +86 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/time.d.ts +21 -0
- package/dist/utils/time.js +42 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/tokenizer.d.ts +13 -0
- package/dist/utils/tokenizer.js +46 -0
- package/dist/utils/tokenizer.js.map +1 -0
- package/package.json +77 -0
- package/scripts/check-node.mjs +36 -0
- package/scripts/setup.mjs +157 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp/server.ts — Thin factory that wires tool handlers to the MCP server.
|
|
3
|
+
*
|
|
4
|
+
* Responsibilities:
|
|
5
|
+
* 1. Instantiate McpServer.
|
|
6
|
+
* 2. Register the stellar://sun resource.
|
|
7
|
+
* 3. Register each tool, forwarding parsed args to the appropriate handler.
|
|
8
|
+
*
|
|
9
|
+
* Business logic lives in mcp/tools/. This file contains no logic beyond wiring.
|
|
10
|
+
*/
|
|
11
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { handleStatus, handleCommit, handleRecall, handleRemember, handleOrbit, handleForget, handleExport, handleConstellation, handleGalaxy, handleAnalytics, handleSunResource, handleObserve, handleConsolidate, handleResolveConflict, handleTemporal, } from './tools/memory-tools.js';
|
|
14
|
+
import { handleScan } from './tools/ingestion-tools.js';
|
|
15
|
+
import { handleDaemon } from './tools/daemon-tool.js';
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// Server factory
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
export function createStellarServer() {
|
|
20
|
+
const server = new McpServer({ name: 'stellar-memory', version: '0.4.0' });
|
|
21
|
+
// ── Resource: stellar://sun ───────────────────────────────────────────────
|
|
22
|
+
server.resource('sun', 'stellar://sun', {
|
|
23
|
+
description: 'Current working context (the Sun). Contains active project state, recent decisions, and next steps. ' +
|
|
24
|
+
'Read this at the start of every session to restore context.\n\n' +
|
|
25
|
+
'[AUTO-TRIGGER] Read this resource at the very beginning of every conversation before any other action.',
|
|
26
|
+
mimeType: 'text/plain',
|
|
27
|
+
}, (uri) => handleSunResource(uri.href));
|
|
28
|
+
// ── Tool: status ──────────────────────────────────────────────────────────
|
|
29
|
+
server.tool('status', 'View the current state of your stellar memory system. Shows memories grouped by orbital zone ' +
|
|
30
|
+
'(core = actively working, forgotten = nearly forgotten), and optionally lists registered data sources. ' +
|
|
31
|
+
'Use this to get a snapshot of what the system knows.\n\n' +
|
|
32
|
+
'[AUTO-TRIGGER] Call at the start of every session alongside recall to restore full context.', {
|
|
33
|
+
zone: z.enum(['all', 'core', 'near', 'active', 'archive', 'fading', 'forgotten'])
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('Filter memories to a specific orbital zone. Defaults to "all".'),
|
|
36
|
+
limit: z.number().int().min(1).max(200)
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Maximum number of memories to return. Defaults to 50.'),
|
|
39
|
+
show: z.enum(['memories', 'sources', 'all'])
|
|
40
|
+
.optional()
|
|
41
|
+
.describe('What to display: memories, data sources, or both. Default: "memories".'),
|
|
42
|
+
}, (args) => handleStatus(args));
|
|
43
|
+
// ── Tool: commit ──────────────────────────────────────────────────────────
|
|
44
|
+
server.tool('commit', 'Save the current session state into the Sun (working context). Call this at the end of each session ' +
|
|
45
|
+
'or when switching tasks to preserve your progress.\n\n' +
|
|
46
|
+
'[AUTO-TRIGGER] Call automatically before a conversation ends. This is the most critical auto-trigger.', {
|
|
47
|
+
current_work: z.string().min(1)
|
|
48
|
+
.describe('A clear description of what you are currently working on.'),
|
|
49
|
+
decisions: z.array(z.string()).optional()
|
|
50
|
+
.describe('Key decisions made during this session.'),
|
|
51
|
+
next_steps: z.array(z.string()).optional()
|
|
52
|
+
.describe('Concrete next actions to take in future sessions.'),
|
|
53
|
+
errors: z.array(z.string()).optional()
|
|
54
|
+
.describe('Active errors or blockers that need attention.'),
|
|
55
|
+
context: z.string().optional()
|
|
56
|
+
.describe('Additional background context for the project.'),
|
|
57
|
+
}, (args) => handleCommit(args));
|
|
58
|
+
// ── Tool: recall ──────────────────────────────────────────────────────────
|
|
59
|
+
server.tool('recall', 'Search memories by content and pull relevant ones closer to the Sun. ' +
|
|
60
|
+
'Uses hybrid FTS5 + vector search for best results.\n\n' +
|
|
61
|
+
'[AUTO-TRIGGER] Call at session start with keywords from the user\'s first message.', {
|
|
62
|
+
query: z.string().min(1)
|
|
63
|
+
.describe('Search query to find relevant memories.'),
|
|
64
|
+
type: z.enum(['all', 'decision', 'observation', 'task', 'context', 'error', 'milestone'])
|
|
65
|
+
.optional()
|
|
66
|
+
.describe('Filter by memory type. Defaults to "all".'),
|
|
67
|
+
max_au: z.number().min(0.1).max(100).optional()
|
|
68
|
+
.describe('Only return memories within this distance in AU.'),
|
|
69
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
70
|
+
.describe('Maximum number of memories to return. Defaults to 10.'),
|
|
71
|
+
include_universal: z.boolean().optional()
|
|
72
|
+
.describe('Also include universal memories from other projects. Default: false.'),
|
|
73
|
+
at: z.string().optional()
|
|
74
|
+
.describe('ISO date string. If provided, returns memories that were active at this point in time (temporal query) instead of normal recall.'),
|
|
75
|
+
}, (args) => handleRecall(args));
|
|
76
|
+
// ── Tool: remember ────────────────────────────────────────────────────────
|
|
77
|
+
server.tool('remember', 'Store a new memory in the stellar system. Memories are automatically placed in an orbital zone ' +
|
|
78
|
+
'based on their type and impact.\n\n' +
|
|
79
|
+
'[AUTO-TRIGGER] Call immediately when: (1) a design decision is made, (2) a bug is resolved, ' +
|
|
80
|
+
'(3) a feature milestone is reached, (4) important technical context is discovered.', {
|
|
81
|
+
content: z.string().min(1)
|
|
82
|
+
.describe('The full content of the memory to store.'),
|
|
83
|
+
summary: z.string().optional()
|
|
84
|
+
.describe('A short one-line summary. If omitted, first 50 chars of content are used.'),
|
|
85
|
+
type: z.enum(['decision', 'observation', 'task', 'context', 'error', 'milestone'])
|
|
86
|
+
.optional()
|
|
87
|
+
.describe('Memory type. Defaults to "observation".'),
|
|
88
|
+
impact: z.number().min(0).max(1).optional()
|
|
89
|
+
.describe('Impact score 0.0–1.0 affecting orbital distance.'),
|
|
90
|
+
tags: z.array(z.string()).optional()
|
|
91
|
+
.describe('Tags for categorizing and searching this memory.'),
|
|
92
|
+
}, (args) => handleRemember(args));
|
|
93
|
+
// ── Tool: orbit ───────────────────────────────────────────────────────────
|
|
94
|
+
server.tool('orbit', 'Force a recalculation of all orbital positions for the project.\n\n' +
|
|
95
|
+
'[AUTO-TRIGGER] Call after storing 5+ memories in a single session.', {}, () => handleOrbit({}));
|
|
96
|
+
// ── Tool: forget ──────────────────────────────────────────────────────────
|
|
97
|
+
server.tool('forget', 'Push a memory into a distant orbit (soft forget) or permanently delete it.', {
|
|
98
|
+
id: z.string().min(1)
|
|
99
|
+
.describe('The ID of the memory to forget.'),
|
|
100
|
+
mode: z.enum(['push', 'delete']).optional()
|
|
101
|
+
.describe('"push" moves to Oort Cloud; "delete" permanently removes. Defaults to "push".'),
|
|
102
|
+
}, (args) => handleForget(args));
|
|
103
|
+
// ── Tool: scan ────────────────────────────────────────────────────────────
|
|
104
|
+
server.tool('scan', 'Scan a local directory and automatically convert files into memories. ' +
|
|
105
|
+
'Files already indexed (same content hash) are skipped — scanning is idempotent.', {
|
|
106
|
+
path: z.string().min(1)
|
|
107
|
+
.describe('Absolute or relative path to the directory to scan.'),
|
|
108
|
+
recursive: z.boolean().optional()
|
|
109
|
+
.describe('Recurse into subdirectories. Defaults to true.'),
|
|
110
|
+
git: z.boolean().optional()
|
|
111
|
+
.describe('Also import recent git commit history as memories. Defaults to true.'),
|
|
112
|
+
max_kb: z.number().int().min(1).max(10240).optional()
|
|
113
|
+
.describe('Maximum individual file size in KB to process. Defaults to 1024 KB.'),
|
|
114
|
+
}, (args) => handleScan(args));
|
|
115
|
+
// ── Tool: daemon ──────────────────────────────────────────────────────────
|
|
116
|
+
server.tool('daemon', 'Control the background scheduler daemon. ' +
|
|
117
|
+
'The scheduler automatically recalculates orbits, runs local scans, ' +
|
|
118
|
+
'and cleans up the Oort cloud on configurable intervals.', {
|
|
119
|
+
action: z.enum(['status', 'start', 'stop'])
|
|
120
|
+
.describe('"status" — show state, "start" — start scheduler, "stop" — stop scheduler.'),
|
|
121
|
+
}, (args) => handleDaemon(args));
|
|
122
|
+
// ── Tool: constellation ───────────────────────────────────────────────────
|
|
123
|
+
server.tool('constellation', 'Explore the Knowledge Graph (constellation) of relationships between memories. ' +
|
|
124
|
+
'Use action="graph" to see the full graph around a memory, "related" to list connected memories, ' +
|
|
125
|
+
'or "extract" to auto-discover relationships from content similarity.', {
|
|
126
|
+
id: z.string().min(1)
|
|
127
|
+
.describe('The memory ID to explore.'),
|
|
128
|
+
action: z.enum(['graph', 'related', 'extract']).optional()
|
|
129
|
+
.describe('"graph" — show constellation graph (default). "related" — list related memories. "extract" — auto-extract relationships.'),
|
|
130
|
+
depth: z.number().int().min(1).max(3).optional()
|
|
131
|
+
.describe('Graph traversal depth for action="graph". Default: 1.'),
|
|
132
|
+
limit: z.number().int().min(1).max(50).optional()
|
|
133
|
+
.describe('Max memories to return for action="related". Default: 10.'),
|
|
134
|
+
}, (args) => handleConstellation(args));
|
|
135
|
+
// ── Tool: export ──────────────────────────────────────────────────────────
|
|
136
|
+
server.tool('export', 'Export all memories as JSON or Markdown for backup or migration.', {
|
|
137
|
+
type: z.enum(['all', 'decision', 'observation', 'task', 'context', 'error', 'milestone'])
|
|
138
|
+
.optional()
|
|
139
|
+
.describe('Filter by memory type. Defaults to all.'),
|
|
140
|
+
zone: z.enum(['all', 'core', 'near', 'active', 'archive', 'fading', 'forgotten'])
|
|
141
|
+
.optional()
|
|
142
|
+
.describe('Filter by orbital zone. Defaults to all.'),
|
|
143
|
+
format: z.enum(['json', 'markdown']).optional()
|
|
144
|
+
.describe('Output format. Defaults to json.'),
|
|
145
|
+
}, (args) => handleExport(args));
|
|
146
|
+
// ── Tool: galaxy ───────────────────────────────────────────────────────────
|
|
147
|
+
server.tool('galaxy', 'Manage multiple projects (star systems) in your stellar memory galaxy.\n\n' +
|
|
148
|
+
'Actions:\n' +
|
|
149
|
+
' switch — switch the active project at runtime (no restart needed)\n' +
|
|
150
|
+
' list — list all projects with memory counts and stats\n' +
|
|
151
|
+
' create — create a new project\n' +
|
|
152
|
+
' stats — detailed statistics for a project\n' +
|
|
153
|
+
' mark_universal — mark a memory as universal (visible in all projects)\n' +
|
|
154
|
+
' universal_context — retrieve universal memories from other projects\n' +
|
|
155
|
+
' candidates — detect memories that are good candidates to become universal', {
|
|
156
|
+
action: z.enum(['switch', 'list', 'create', 'stats', 'mark_universal', 'universal_context', 'candidates'])
|
|
157
|
+
.describe('Action to perform.'),
|
|
158
|
+
project: z.string().optional()
|
|
159
|
+
.describe('Project name. Required for switch/create; optional for stats/universal_context/candidates (defaults to current).'),
|
|
160
|
+
memory_id: z.string().optional()
|
|
161
|
+
.describe('Memory ID. Required for mark_universal.'),
|
|
162
|
+
is_universal: z.boolean().optional()
|
|
163
|
+
.describe('Whether to mark as universal (true) or project-specific (false). Default: true.'),
|
|
164
|
+
limit: z.number().int().min(1).max(100).optional()
|
|
165
|
+
.describe('Maximum results to return for universal_context. Default: 10.'),
|
|
166
|
+
}, (args) => handleGalaxy(args));
|
|
167
|
+
// ── Tool: analytics ───────────────────────────────────────────────────────
|
|
168
|
+
server.tool('analytics', 'Get insights and analytics about your memory system. Includes survival curves, topic clusters, ' +
|
|
169
|
+
'health metrics, and recommendations.\n\n' +
|
|
170
|
+
'Reports:\n' +
|
|
171
|
+
' summary — full analytics summary (zone/type distribution, quality, recall rate)\n' +
|
|
172
|
+
' health — health metrics + actionable recommendations\n' +
|
|
173
|
+
' topics — topic cluster heatmap (most active topics)\n' +
|
|
174
|
+
' survival — memory survival curve by age bucket\n' +
|
|
175
|
+
' movements — orbit movement timeline (which memories moved most)\n' +
|
|
176
|
+
' full — full text report combining all analytics', {
|
|
177
|
+
report: z.enum(['summary', 'health', 'topics', 'survival', 'movements', 'full'])
|
|
178
|
+
.describe('Type of analytics report to generate.'),
|
|
179
|
+
project: z.string().optional()
|
|
180
|
+
.describe('Project to analyse. Defaults to the current active project.'),
|
|
181
|
+
days: z.number().int().min(1).max(365).optional()
|
|
182
|
+
.describe('Lookback window in days for report="movements". Default: 30.'),
|
|
183
|
+
}, (args) => handleAnalytics(args));
|
|
184
|
+
// ── Tool: observe ─────────────────────────────────────────────────────────
|
|
185
|
+
server.tool('observe', 'Process a conversation chunk to automatically extract and store memories. ' +
|
|
186
|
+
'The Observer phase extracts key facts, decisions, and errors. ' +
|
|
187
|
+
'The Reflector phase compares against existing memories to categorize as novel, reinforcing, or conflicting.', {
|
|
188
|
+
conversation: z.string().min(1)
|
|
189
|
+
.describe('The conversation text to observe and extract memories from.'),
|
|
190
|
+
project: z.string().optional()
|
|
191
|
+
.describe('Project context. Defaults to the current active project.'),
|
|
192
|
+
}, (args) => handleObserve(args));
|
|
193
|
+
// ── Tool: consolidate ─────────────────────────────────────────────────────
|
|
194
|
+
server.tool('consolidate', 'Find and merge similar memories to reduce redundancy and improve quality. ' +
|
|
195
|
+
'Memories with high similarity are combined into richer single memories. ' +
|
|
196
|
+
'Use dry_run=true (default) to preview candidates before merging.', {
|
|
197
|
+
project: z.string().optional()
|
|
198
|
+
.describe('Project context. Defaults to the current active project.'),
|
|
199
|
+
dry_run: z.boolean().optional()
|
|
200
|
+
.describe('If true, only report candidates without merging. Default: true.'),
|
|
201
|
+
}, (args) => handleConsolidate(args));
|
|
202
|
+
// ── Tool: resolve_conflict ────────────────────────────────────────────────
|
|
203
|
+
server.tool('resolve_conflict', 'View and resolve memory conflicts. Conflicts are detected when new memories contradict existing ones.\n\n' +
|
|
204
|
+
'Actions:\n' +
|
|
205
|
+
' list — list all unresolved conflicts\n' +
|
|
206
|
+
' resolve — resolve a conflict (supersede, dismiss, or keep_both)\n' +
|
|
207
|
+
' dismiss — dismiss a conflict without changes', {
|
|
208
|
+
action: z.enum(['list', 'resolve', 'dismiss'])
|
|
209
|
+
.describe('Action to perform: list conflicts, resolve one, or dismiss one.'),
|
|
210
|
+
conflict_id: z.string().optional()
|
|
211
|
+
.describe('Conflict ID. Required for resolve/dismiss actions.'),
|
|
212
|
+
resolution: z.string().optional()
|
|
213
|
+
.describe('Human-readable description of how the conflict was resolved.'),
|
|
214
|
+
resolve_action: z.enum(['supersede', 'dismiss', 'keep_both']).optional()
|
|
215
|
+
.describe('How to resolve: supersede the older memory, dismiss without changes, or keep both. Default: supersede.'),
|
|
216
|
+
project: z.string().optional()
|
|
217
|
+
.describe('Project context. Defaults to the current active project.'),
|
|
218
|
+
}, (args) => handleResolveConflict(args));
|
|
219
|
+
// ── Tool: temporal ────────────────────────────────────────────────────────
|
|
220
|
+
server.tool('temporal', 'Query memories at a specific point in time or view how knowledge has evolved. ' +
|
|
221
|
+
'Supports temporal browsing and evolution chain tracking.\n\n' +
|
|
222
|
+
'Actions:\n' +
|
|
223
|
+
' at — get memories that were active at a specific timestamp\n' +
|
|
224
|
+
' chain — view the full evolution chain of a memory\n' +
|
|
225
|
+
' summary — temporal summary (active vs superseded counts)\n' +
|
|
226
|
+
' set_bounds — set valid_from / valid_until bounds on a memory', {
|
|
227
|
+
action: z.enum(['at', 'chain', 'summary', 'set_bounds'])
|
|
228
|
+
.describe('Action to perform.'),
|
|
229
|
+
timestamp: z.string().optional()
|
|
230
|
+
.describe('ISO date string. Required for action="at".'),
|
|
231
|
+
memory_id: z.string().optional()
|
|
232
|
+
.describe('Memory ID. Required for action="chain" and "set_bounds".'),
|
|
233
|
+
valid_from: z.string().optional()
|
|
234
|
+
.describe('ISO date. For set_bounds — when the memory became valid.'),
|
|
235
|
+
valid_until: z.string().optional()
|
|
236
|
+
.describe('ISO date. For set_bounds — when the memory stopped being valid.'),
|
|
237
|
+
project: z.string().optional()
|
|
238
|
+
.describe('Project context. Defaults to the current active project.'),
|
|
239
|
+
}, (args) => handleTemporal(args));
|
|
240
|
+
return server;
|
|
241
|
+
}
|
|
242
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IAE3E,6EAA6E;IAE7E,MAAM,CAAC,QAAQ,CACb,KAAK,EACL,eAAe,EACf;QACE,WAAW,EACT,sGAAsG;YACtG,iEAAiE;YACjE,wGAAwG;QAC1G,QAAQ,EAAE,YAAY;KACvB,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,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aAC7B,QAAQ,CAAC,0DAA0D,CAAC;QACvE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC9B,QAAQ,CAAC,0DAA0D,CAAC;QACvE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC/B,QAAQ,CAAC,iEAAiE,CAAC;QAC9E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC3B,QAAQ,CAAC,0DAA0D,CAAC;KACxE,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAC/B,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp/tools/daemon-tool.ts — Handler function for the daemon MCP tool.
|
|
3
|
+
*
|
|
4
|
+
* The daemon tool manages the background StellarScheduler.
|
|
5
|
+
*/
|
|
6
|
+
type McpResponse = {
|
|
7
|
+
content: [{
|
|
8
|
+
type: 'text';
|
|
9
|
+
text: string;
|
|
10
|
+
}];
|
|
11
|
+
};
|
|
12
|
+
export declare function handleDaemon(args: {
|
|
13
|
+
action: 'status' | 'start' | 'stop';
|
|
14
|
+
}): Promise<McpResponse>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=daemon-tool.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp/tools/daemon-tool.ts — Handler function for the daemon MCP tool.
|
|
3
|
+
*
|
|
4
|
+
* The daemon tool manages the background StellarScheduler.
|
|
5
|
+
*/
|
|
6
|
+
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import { StellarScheduler, DEFAULT_SCHEDULE_CONFIG } from '../../service/scheduler.js';
|
|
8
|
+
// Module-level scheduler state (one daemon per process)
|
|
9
|
+
let _scheduler = null;
|
|
10
|
+
let _schedulerStartedAt = null;
|
|
11
|
+
function getOrCreateScheduler() {
|
|
12
|
+
if (!_scheduler) {
|
|
13
|
+
_scheduler = new StellarScheduler(DEFAULT_SCHEDULE_CONFIG);
|
|
14
|
+
}
|
|
15
|
+
return _scheduler;
|
|
16
|
+
}
|
|
17
|
+
// ---------------------------------------------------------------------------
|
|
18
|
+
// daemon
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
export async function handleDaemon(args) {
|
|
21
|
+
try {
|
|
22
|
+
const scheduler = getOrCreateScheduler();
|
|
23
|
+
switch (args.action) {
|
|
24
|
+
case 'start': {
|
|
25
|
+
scheduler.start();
|
|
26
|
+
_schedulerStartedAt = new Date();
|
|
27
|
+
return { content: [{ type: 'text', text: 'Daemon: started.' }] };
|
|
28
|
+
}
|
|
29
|
+
case 'stop': {
|
|
30
|
+
scheduler.stop();
|
|
31
|
+
_schedulerStartedAt = null;
|
|
32
|
+
return { content: [{ type: 'text', text: 'Daemon: stopped.' }] };
|
|
33
|
+
}
|
|
34
|
+
case 'status': {
|
|
35
|
+
const taskStatus = scheduler.getStatus();
|
|
36
|
+
const isRunning = _schedulerStartedAt !== null;
|
|
37
|
+
const startedStr = _schedulerStartedAt ? _schedulerStartedAt.toISOString() : '—';
|
|
38
|
+
const lines = [
|
|
39
|
+
`Daemon: ${isRunning ? 'RUNNING' : 'STOPPED'} | started: ${startedStr}`,
|
|
40
|
+
'',
|
|
41
|
+
];
|
|
42
|
+
for (const [name, status] of Object.entries(taskStatus)) {
|
|
43
|
+
const last = status.lastRunAt ? status.lastRunAt.toISOString() : 'never';
|
|
44
|
+
const dur = status.lastDuration !== null ? `${status.lastDuration}ms` : '—';
|
|
45
|
+
const err = status.lastError ? ` ERR: ${status.lastError}` : '';
|
|
46
|
+
lines.push(` ${name.padEnd(22)} runs=${status.runCount} last=${last} dur=${dur}${err}`);
|
|
47
|
+
}
|
|
48
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
if (err instanceof McpError)
|
|
54
|
+
throw err;
|
|
55
|
+
throw new McpError(ErrorCode.InternalError, `daemon failed: ${String(err)}`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=daemon-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daemon-tool.js","sourceRoot":"","sources":["../../../src/mcp/tools/daemon-tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAEvF,wDAAwD;AACxD,IAAI,UAAU,GAA4B,IAAI,CAAC;AAC/C,IAAI,mBAAmB,GAAmB,IAAI,CAAC;AAE/C,SAAS,oBAAoB;IAC3B,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,UAAU,GAAG,IAAI,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAID,8EAA8E;AAC9E,SAAS;AACT,8EAA8E;AAE9E,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,IAA6C;IAE7C,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,oBAAoB,EAAE,CAAC;QAEzC,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;YACpB,KAAK,OAAO,CAAC,CAAC,CAAC;gBACb,SAAS,CAAC,KAAK,EAAE,CAAC;gBAClB,mBAAmB,GAAG,IAAI,IAAI,EAAE,CAAC;gBACjC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC;YAC5E,CAAC;YAED,KAAK,MAAM,CAAC,CAAC,CAAC;gBACZ,SAAS,CAAC,IAAI,EAAE,CA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E,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YAC1E,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,QAAQ;YAAE,MAAM,GAAG,CAAC;QACvC,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE,kBAAkB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp/tools/ingestion-tools.ts — Handler functions for scan MCP tool.
|
|
3
|
+
*
|
|
4
|
+
* Exported functions:
|
|
5
|
+
* handleScan — scan tool (local directory ingestion)
|
|
6
|
+
*/
|
|
7
|
+
type McpResponse = {
|
|
8
|
+
content: [{
|
|
9
|
+
type: 'text';
|
|
10
|
+
text: string;
|
|
11
|
+
}];
|
|
12
|
+
};
|
|
13
|
+
export declare function handleScan(args: {
|
|
14
|
+
path: string;
|
|
15
|
+
recursive?: boolean;
|
|
16
|
+
git?: boolean;
|
|
17
|
+
max_kb?: number;
|
|
18
|
+
}): Promise<McpResponse>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=ingestion-tools.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp/tools/ingestion-tools.ts — Handler functions for scan MCP tool.
|
|
3
|
+
*
|
|
4
|
+
* Exported functions:
|
|
5
|
+
* handleScan — scan tool (local directory ingestion)
|
|
6
|
+
*/
|
|
7
|
+
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
+
import { StellarScanner } from '../../scanner/index.js';
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
// scan
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
export async function handleScan(args) {
|
|
13
|
+
try {
|
|
14
|
+
const scanner = new StellarScanner({
|
|
15
|
+
paths: [args.path],
|
|
16
|
+
maxFileSize: (args.max_kb ?? 1024) * 1024,
|
|
17
|
+
});
|
|
18
|
+
const result = await scanner.scanPath(args.path, {
|
|
19
|
+
recursive: args.recursive ?? true,
|
|
20
|
+
includeGit: args.git ?? true,
|
|
21
|
+
});
|
|
22
|
+
const lines = [
|
|
23
|
+
`Scan: ${args.path} | ${(result.durationMs / 1000).toFixed(2)}s`,
|
|
24
|
+
` files: ${result.scannedFiles} new: ${result.createdMemories} skipped: ${result.skippedFiles} errors: ${result.errorFiles}`,
|
|
25
|
+
];
|
|
26
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
if (err instanceof McpError)
|
|
30
|
+
throw err;
|
|
31
|
+
throw new McpError(ErrorCode.InternalError, `scan failed: ${String(err)}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ingestion-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingestion-tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/ingestion-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,8EAA8E;AAC9E,OAAO;AACP,8EAA8E;AAE9E,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAKhC;IACC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC;YACjC,KAAK,EAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACxB,WAAW,EAAE,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI;SAC1C,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE;YAC/C,SAAS,EAAG,IAAI,CAAC,SAAS,IAAI,IAAI;YAClC,UAAU,EAAE,IAAI,CAAC,GAAG,IAAI,IAAI;SAC7B,CAAC,CAAC;QAEH,MAAM,KAAK,GAAa;YACtB,SAAS,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG;YAChE,YAAY,MAAM,CAAC,YAAY,UAAU,MAAM,CAAC,eAAe,cAAc,MAAM,CAAC,YAAY,aAAa,MAAM,CAAC,UAAU,EAAE;SACjI,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IAC1E,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,QAAQ;YAAE,MAAM,GAAG,CAAC;QACvC,MAAM,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE,gBAAgB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp/tools/memory-tools.ts — Handler functions for memory-related MCP tools.
|
|
3
|
+
*
|
|
4
|
+
* Exported functions:
|
|
5
|
+
* handleStatus — status tool
|
|
6
|
+
* handleCommit — commit tool
|
|
7
|
+
* handleRecall — recall tool
|
|
8
|
+
* handleRemember — remember tool
|
|
9
|
+
* handleOrbit — orbit tool
|
|
10
|
+
* handleForget — forget tool
|
|
11
|
+
* handleExport — export tool
|
|
12
|
+
*
|
|
13
|
+
* Each function receives only the parsed tool arguments it needs plus any
|
|
14
|
+
* dependencies injected at call-site. It returns the MCP response object
|
|
15
|
+
* `{ content: [{ type: 'text', text: string }] }`.
|
|
16
|
+
*
|
|
17
|
+
* No McpServer or SDK imports are needed here — that coupling lives in server.ts.
|
|
18
|
+
*/
|
|
19
|
+
import type { OrbitZone } from '../../engine/types.js';
|
|
20
|
+
import type { MemoryType } from '../../engine/types.js';
|
|
21
|
+
declare const bgErrors: {
|
|
22
|
+
embedding: number;
|
|
23
|
+
constellation: number;
|
|
24
|
+
consolidation: number;
|
|
25
|
+
};
|
|
26
|
+
/** Increment a background error counter. Called from fire-and-forget tasks. */
|
|
27
|
+
export declare function trackBgError(category: keyof typeof bgErrors): void;
|
|
28
|
+
/** Get background error stats snapshot. */
|
|
29
|
+
export declare function getBgErrorStats(): typeof bgErrors;
|
|
30
|
+
type McpResponse = {
|
|
31
|
+
content: [{
|
|
32
|
+
type: 'text';
|
|
33
|
+
text: string;
|
|
34
|
+
}];
|
|
35
|
+
};
|
|
36
|
+
export declare function handleStatus(args: {
|
|
37
|
+
zone?: 'all' | 'core' | 'near' | 'active' | 'archive' | 'fading' | 'forgotten';
|
|
38
|
+
limit?: number;
|
|
39
|
+
show?: 'memories' | 'sources' | 'all';
|
|
40
|
+
}): Promise<McpResponse>;
|
|
41
|
+
export declare function handleCommit(args: {
|
|
42
|
+
current_work: string;
|
|
43
|
+
decisions?: string[];
|
|
44
|
+
next_steps?: string[];
|
|
45
|
+
errors?: string[];
|
|
46
|
+
context?: string;
|
|
47
|
+
}): Promise<McpResponse>;
|
|
48
|
+
export declare function handleRecall(args: {
|
|
49
|
+
query: string;
|
|
50
|
+
type?: 'all' | MemoryType;
|
|
51
|
+
max_au?: number;
|
|
52
|
+
limit?: number;
|
|
53
|
+
include_universal?: boolean;
|
|
54
|
+
at?: string;
|
|
55
|
+
}): Promise<McpResponse>;
|
|
56
|
+
export declare function handleRemember(args: {
|
|
57
|
+
content: string;
|
|
58
|
+
summary?: string;
|
|
59
|
+
type?: MemoryType;
|
|
60
|
+
impact?: number;
|
|
61
|
+
tags?: string[];
|
|
62
|
+
}): Promise<McpResponse>;
|
|
63
|
+
export declare function handleOrbit(_args: Record<string, never>): Promise<McpResponse>;
|
|
64
|
+
export declare function handleForget(args: {
|
|
65
|
+
id: string;
|
|
66
|
+
mode?: 'push' | 'delete';
|
|
67
|
+
}): Promise<McpResponse>;
|
|
68
|
+
export declare function handleExport(args: {
|
|
69
|
+
type?: 'all' | MemoryType;
|
|
70
|
+
zone?: 'all' | OrbitZone;
|
|
71
|
+
format?: 'json' | 'markdown';
|
|
72
|
+
}): Promise<McpResponse>;
|
|
73
|
+
export declare function handleConstellation(args: {
|
|
74
|
+
id: string;
|
|
75
|
+
action?: 'graph' | 'related' | 'extract';
|
|
76
|
+
depth?: number;
|
|
77
|
+
limit?: number;
|
|
78
|
+
}): Promise<McpResponse>;
|
|
79
|
+
export declare function handleGalaxy(args: {
|
|
80
|
+
action: 'switch' | 'list' | 'create' | 'stats' | 'mark_universal' | 'universal_context' | 'candidates';
|
|
81
|
+
project?: string;
|
|
82
|
+
memory_id?: string;
|
|
83
|
+
is_universal?: boolean;
|
|
84
|
+
limit?: number;
|
|
85
|
+
}): Promise<McpResponse>;
|
|
86
|
+
export declare function handleAnalytics(args: {
|
|
87
|
+
report?: 'summary' | 'health' | 'topics' | 'survival' | 'movements' | 'full';
|
|
88
|
+
action?: 'overview' | 'survival' | 'movements' | 'clusters' | 'patterns' | 'health' | 'report';
|
|
89
|
+
project?: string;
|
|
90
|
+
days?: number;
|
|
91
|
+
}): Promise<McpResponse>;
|
|
92
|
+
export declare function handleSunResource(uriHref: string): {
|
|
93
|
+
contents: [{
|
|
94
|
+
uri: string;
|
|
95
|
+
text: string;
|
|
96
|
+
}];
|
|
97
|
+
};
|
|
98
|
+
export declare function handleObserve(args: {
|
|
99
|
+
conversation: string;
|
|
100
|
+
project?: string;
|
|
101
|
+
}): Promise<McpResponse>;
|
|
102
|
+
export declare function handleConsolidate(args: {
|
|
103
|
+
project?: string;
|
|
104
|
+
dry_run?: boolean;
|
|
105
|
+
}): Promise<McpResponse>;
|
|
106
|
+
export declare function handleResolveConflict(args: {
|
|
107
|
+
action: 'list' | 'resolve' | 'dismiss';
|
|
108
|
+
conflict_id?: string;
|
|
109
|
+
resolution?: string;
|
|
110
|
+
resolve_action?: 'supersede' | 'dismiss' | 'keep_both';
|
|
111
|
+
project?: string;
|
|
112
|
+
}): Promise<McpResponse>;
|
|
113
|
+
export declare function handleTemporal(args: {
|
|
114
|
+
action: 'at' | 'chain' | 'summary' | 'set_bounds';
|
|
115
|
+
timestamp?: string;
|
|
116
|
+
memory_id?: string;
|
|
117
|
+
valid_from?: string;
|
|
118
|
+
valid_until?: string;
|
|
119
|
+
project?: string;
|
|
120
|
+
}): Promise<McpResponse>;
|
|
121
|
+
export {};
|
|
122
|
+
//# sourceMappingURL=memory-tools.d.ts.map
|