@sovant/claude-code-mcp 0.3.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/CHANGELOG.md +15 -0
- package/LICENSE +21 -0
- package/README.md +110 -0
- package/dist/commands/memory.d.ts +28 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +166 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/recall.d.ts +32 -0
- package/dist/commands/recall.d.ts.map +1 -0
- package/dist/commands/recall.js +124 -0
- package/dist/commands/recall.js.map +1 -0
- package/dist/commands/remember.d.ts +20 -0
- package/dist/commands/remember.d.ts.map +1 -0
- package/dist/commands/remember.js +103 -0
- package/dist/commands/remember.js.map +1 -0
- package/dist/commands/shared.d.ts +56 -0
- package/dist/commands/shared.d.ts.map +1 -0
- package/dist/commands/shared.js +182 -0
- package/dist/commands/shared.js.map +1 -0
- package/dist/format.d.ts +54 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +158 -0
- package/dist/format.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +332 -0
- package/dist/index.js.map +1 -0
- package/dist/localStore.d.ts +39 -0
- package/dist/localStore.d.ts.map +1 -0
- package/dist/localStore.js +93 -0
- package/dist/localStore.js.map +1 -0
- package/dist/repo.d.ts +23 -0
- package/dist/repo.d.ts.map +1 -0
- package/dist/repo.js +93 -0
- package/dist/repo.js.map +1 -0
- package/dist/sovant.d.ts +22 -0
- package/dist/sovant.d.ts.map +1 -0
- package/dist/sovant.js +57 -0
- package/dist/sovant.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for command handlers
|
|
3
|
+
*
|
|
4
|
+
* Manages thread initialization and caching across commands.
|
|
5
|
+
*/
|
|
6
|
+
import { type RepoInfo } from "../repo.js";
|
|
7
|
+
/**
|
|
8
|
+
* Build standard tags for all memories
|
|
9
|
+
*
|
|
10
|
+
* Returns tags: source:claude-code, repo:<org/name>, and optionally branch:<branch>
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildMemoryTags(repoInfo?: RepoInfo): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Initialize the thread for this repo
|
|
15
|
+
*
|
|
16
|
+
* 1. Try to load from .sovant/thread.json
|
|
17
|
+
* 2. If not found, create a new Sovant thread
|
|
18
|
+
* 3. Save the config if possible
|
|
19
|
+
* 4. Run session-start recall
|
|
20
|
+
*/
|
|
21
|
+
export declare function initializeThread(): Promise<{
|
|
22
|
+
threadId: string;
|
|
23
|
+
summary: string;
|
|
24
|
+
isNew: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Get the thread ID for the current repo
|
|
28
|
+
* Initializes if not already done
|
|
29
|
+
*/
|
|
30
|
+
export declare function getThreadId(): Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Check if session has been initialized
|
|
33
|
+
*/
|
|
34
|
+
export declare function isSessionInitialized(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Get session summary (for explicit /status command if needed)
|
|
37
|
+
*/
|
|
38
|
+
export declare function getSessionSummary(): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Get thread info for the current repo
|
|
41
|
+
*
|
|
42
|
+
* Fetches live data from the API (thread title, memory count, created_at).
|
|
43
|
+
* Falls back to local-only data if the API call fails.
|
|
44
|
+
* Output includes a (live) or (local fallback) indicator.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getThreadInfo(): Promise<{
|
|
47
|
+
repo: string;
|
|
48
|
+
thread_id: string;
|
|
49
|
+
thread_title: string;
|
|
50
|
+
memory_count?: number;
|
|
51
|
+
created_at?: string;
|
|
52
|
+
config_path: string;
|
|
53
|
+
branch?: string;
|
|
54
|
+
data_source: "live" | "local fallback";
|
|
55
|
+
}>;
|
|
56
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAUxD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,EAAE,CAe7D;AAQD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC,CAiED;AAED;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,CAOnD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AA0BD;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAGzD;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACxC,CAAC,CAkCD"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared utilities for command handlers
|
|
3
|
+
*
|
|
4
|
+
* Manages thread initialization and caching across commands.
|
|
5
|
+
*/
|
|
6
|
+
import { getSovantClient, formatSovantError } from "../sovant.js";
|
|
7
|
+
import { getRepoInfo } from "../repo.js";
|
|
8
|
+
import { loadThreadConfig, saveThreadConfig, canWriteConfig, getConfigPath, } from "../localStore.js";
|
|
9
|
+
import { formatSessionSummary } from "../format.js";
|
|
10
|
+
/**
|
|
11
|
+
* Build standard tags for all memories
|
|
12
|
+
*
|
|
13
|
+
* Returns tags: source:claude-code, repo:<org/name>, and optionally branch:<branch>
|
|
14
|
+
*/
|
|
15
|
+
export function buildMemoryTags(repoInfo) {
|
|
16
|
+
const info = repoInfo || getRepoInfo();
|
|
17
|
+
const tags = ["source:claude-code"];
|
|
18
|
+
// Always add repo tag
|
|
19
|
+
if (info.repo) {
|
|
20
|
+
tags.push(`repo:${info.repo}`);
|
|
21
|
+
}
|
|
22
|
+
// Add branch tag if available
|
|
23
|
+
if (info.branch) {
|
|
24
|
+
tags.push(`branch:${info.branch}`);
|
|
25
|
+
}
|
|
26
|
+
return tags;
|
|
27
|
+
}
|
|
28
|
+
/** Cached thread ID for the current session */
|
|
29
|
+
let cachedThreadId = null;
|
|
30
|
+
/** Whether we've run session initialization */
|
|
31
|
+
let sessionInitialized = false;
|
|
32
|
+
/**
|
|
33
|
+
* Initialize the thread for this repo
|
|
34
|
+
*
|
|
35
|
+
* 1. Try to load from .sovant/thread.json
|
|
36
|
+
* 2. If not found, create a new Sovant thread
|
|
37
|
+
* 3. Save the config if possible
|
|
38
|
+
* 4. Run session-start recall
|
|
39
|
+
*/
|
|
40
|
+
export async function initializeThread() {
|
|
41
|
+
const repoInfo = getRepoInfo();
|
|
42
|
+
const client = getSovantClient();
|
|
43
|
+
// Try to load existing config
|
|
44
|
+
let config = loadThreadConfig();
|
|
45
|
+
if (config && config.repo === repoInfo.repo) {
|
|
46
|
+
// Existing thread for this repo
|
|
47
|
+
cachedThreadId = config.thread_id;
|
|
48
|
+
// Update last_seen
|
|
49
|
+
config.last_seen = new Date().toISOString();
|
|
50
|
+
saveThreadConfig(config);
|
|
51
|
+
// Run session-start recall
|
|
52
|
+
const summary = await runSessionRecall(config.thread_id);
|
|
53
|
+
sessionInitialized = true;
|
|
54
|
+
return {
|
|
55
|
+
threadId: config.thread_id,
|
|
56
|
+
summary,
|
|
57
|
+
isNew: false,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
// Create new thread
|
|
61
|
+
try {
|
|
62
|
+
const createdAt = new Date().toISOString();
|
|
63
|
+
const result = await client.threads.create({
|
|
64
|
+
title: repoInfo.repo,
|
|
65
|
+
description: `Project memory for ${repoInfo.repo}`,
|
|
66
|
+
metadata: {
|
|
67
|
+
source: "claude-code",
|
|
68
|
+
repo: repoInfo.repo,
|
|
69
|
+
branch: repoInfo.branch,
|
|
70
|
+
created_at: createdAt,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
const threadId = result.id;
|
|
74
|
+
cachedThreadId = threadId;
|
|
75
|
+
// Save config
|
|
76
|
+
const newConfig = {
|
|
77
|
+
thread_id: threadId,
|
|
78
|
+
repo: repoInfo.repo,
|
|
79
|
+
created_at: new Date().toISOString(),
|
|
80
|
+
last_seen: new Date().toISOString(),
|
|
81
|
+
};
|
|
82
|
+
const saved = saveThreadConfig(newConfig);
|
|
83
|
+
if (!saved && canWriteConfig()) {
|
|
84
|
+
console.warn("[sovant] Could not persist thread config to disk");
|
|
85
|
+
}
|
|
86
|
+
sessionInitialized = true;
|
|
87
|
+
return {
|
|
88
|
+
threadId,
|
|
89
|
+
summary: `Created new project thread for ${repoInfo.repo}. Start saving memories with /remember.`,
|
|
90
|
+
isNew: true,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
throw new Error(`Failed to create thread: ${formatSovantError(error)}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Get the thread ID for the current repo
|
|
99
|
+
* Initializes if not already done
|
|
100
|
+
*/
|
|
101
|
+
export async function getThreadId() {
|
|
102
|
+
if (cachedThreadId) {
|
|
103
|
+
return cachedThreadId;
|
|
104
|
+
}
|
|
105
|
+
const { threadId } = await initializeThread();
|
|
106
|
+
return threadId;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Check if session has been initialized
|
|
110
|
+
*/
|
|
111
|
+
export function isSessionInitialized() {
|
|
112
|
+
return sessionInitialized;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Run session-start recall and format summary
|
|
116
|
+
*/
|
|
117
|
+
async function runSessionRecall(threadId) {
|
|
118
|
+
try {
|
|
119
|
+
const client = getSovantClient();
|
|
120
|
+
// Recall important project context
|
|
121
|
+
const result = await client.memory.recall({
|
|
122
|
+
query: "Summarize the most important decisions, constraints, preferences, and open TODOs for this project.",
|
|
123
|
+
thread_id: threadId,
|
|
124
|
+
limit: 8,
|
|
125
|
+
});
|
|
126
|
+
const results = result?.results || [];
|
|
127
|
+
return formatSessionSummary(results);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.error("[sovant] Session recall failed:", error);
|
|
131
|
+
return "Could not load project context. Memories are still accessible via /recall.";
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Get session summary (for explicit /status command if needed)
|
|
136
|
+
*/
|
|
137
|
+
export async function getSessionSummary() {
|
|
138
|
+
const threadId = await getThreadId();
|
|
139
|
+
return runSessionRecall(threadId);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get thread info for the current repo
|
|
143
|
+
*
|
|
144
|
+
* Fetches live data from the API (thread title, memory count, created_at).
|
|
145
|
+
* Falls back to local-only data if the API call fails.
|
|
146
|
+
* Output includes a (live) or (local fallback) indicator.
|
|
147
|
+
*/
|
|
148
|
+
export async function getThreadInfo() {
|
|
149
|
+
const repoInfo = getRepoInfo();
|
|
150
|
+
const threadId = await getThreadId();
|
|
151
|
+
const configPath = getConfigPath();
|
|
152
|
+
// Try to fetch live thread data from the API
|
|
153
|
+
try {
|
|
154
|
+
const client = getSovantClient();
|
|
155
|
+
const result = await client.threads.get(threadId, {
|
|
156
|
+
include_memories: false,
|
|
157
|
+
});
|
|
158
|
+
const thread = result.thread;
|
|
159
|
+
return {
|
|
160
|
+
repo: repoInfo.repo,
|
|
161
|
+
thread_id: threadId,
|
|
162
|
+
thread_title: thread.title || repoInfo.repo,
|
|
163
|
+
memory_count: thread.memory_ids?.length,
|
|
164
|
+
created_at: thread.created_at,
|
|
165
|
+
config_path: configPath,
|
|
166
|
+
branch: repoInfo.branch,
|
|
167
|
+
data_source: "live",
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
// API unavailable — return local-only data
|
|
172
|
+
return {
|
|
173
|
+
repo: repoInfo.repo,
|
|
174
|
+
thread_id: threadId,
|
|
175
|
+
thread_title: repoInfo.repo,
|
|
176
|
+
config_path: configPath,
|
|
177
|
+
branch: repoInfo.branch,
|
|
178
|
+
data_source: "local fallback",
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/commands/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAC;AACxD,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,aAAa,GAEd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,QAAmB;IACjD,MAAM,IAAI,GAAG,QAAQ,IAAI,WAAW,EAAE,CAAC;IACvC,MAAM,IAAI,GAAa,CAAC,oBAAoB,CAAC,CAAC;IAE9C,sBAAsB;IACtB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,8BAA8B;IAC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KAAK,IAAI,QAAQ,CAAC,IAAI;YAC3C,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM;YACvC,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,WAAW,EAAE,UAAU;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,WAAW,EAAE,MAAM;SACpB,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,2CAA2C;QAC3C,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,SAAS,EAAE,QAAQ;YACnB,YAAY,EAAE,QAAQ,CAAC,IAAI;YAC3B,WAAW,EAAE,UAAU;YACvB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,WAAW,EAAE,gBAAgB;SAC9B,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/format.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output formatting utilities for Claude Code MCP plugin
|
|
3
|
+
*
|
|
4
|
+
* Formats Sovant API responses into human-readable text
|
|
5
|
+
* optimized for display in Claude Code.
|
|
6
|
+
*/
|
|
7
|
+
export interface MemoryItem {
|
|
8
|
+
id: string;
|
|
9
|
+
content: string;
|
|
10
|
+
type: string;
|
|
11
|
+
tags?: string[];
|
|
12
|
+
created_at?: string;
|
|
13
|
+
relevance?: number;
|
|
14
|
+
importance_score?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Truncate text to a maximum length, adding ellipsis if needed
|
|
18
|
+
*/
|
|
19
|
+
export declare function truncate(text: string, maxLength?: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* Shorten a UUID for display (first 8 chars)
|
|
22
|
+
*/
|
|
23
|
+
export declare function shortId(id: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Format a date for display
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatDate(dateStr: string | undefined): string;
|
|
28
|
+
/**
|
|
29
|
+
* Format a single memory for list display
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatMemoryListItem(memory: MemoryItem): string;
|
|
32
|
+
/**
|
|
33
|
+
* Format a single memory for recall display (with relevance)
|
|
34
|
+
*/
|
|
35
|
+
export declare function formatRecallItem(memory: MemoryItem, index: number): string;
|
|
36
|
+
/**
|
|
37
|
+
* Format a list of memories for display
|
|
38
|
+
*/
|
|
39
|
+
export declare function formatMemoryList(memories: MemoryItem[], total?: number): string;
|
|
40
|
+
/**
|
|
41
|
+
* Format recall results for display
|
|
42
|
+
*/
|
|
43
|
+
export declare function formatRecallResults(results: MemoryItem[], query: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Format search results with explicit scope header
|
|
46
|
+
*
|
|
47
|
+
* When showRepo is true (global scope), prints the repo tag for each result.
|
|
48
|
+
*/
|
|
49
|
+
export declare function formatSearchResults(results: MemoryItem[], query: string, scopeHeader: string, showRepo: boolean): string;
|
|
50
|
+
/**
|
|
51
|
+
* Format session start summary grouped by type
|
|
52
|
+
*/
|
|
53
|
+
export declare function formatSessionSummary(memories: MemoryItem[]): string;
|
|
54
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY,GAAG,MAAM,CAGtE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAc9D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAO/D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS1E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,UAAU,EAAE,EACtB,KAAK,CAAC,EAAE,MAAM,GACb,MAAM,CAYR;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,UAAU,EAAE,EACrB,KAAK,EAAE,MAAM,GACZ,MAAM,CAOR;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,UAAU,EAAE,EACrB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,OAAO,GAChB,MAAM,CAoBR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,MAAM,CA+DnE"}
|
package/dist/format.js
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output formatting utilities for Claude Code MCP plugin
|
|
3
|
+
*
|
|
4
|
+
* Formats Sovant API responses into human-readable text
|
|
5
|
+
* optimized for display in Claude Code.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Truncate text to a maximum length, adding ellipsis if needed
|
|
9
|
+
*/
|
|
10
|
+
export function truncate(text, maxLength = 120) {
|
|
11
|
+
if (text.length <= maxLength)
|
|
12
|
+
return text;
|
|
13
|
+
return text.slice(0, maxLength - 3) + "...";
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Shorten a UUID for display (first 8 chars)
|
|
17
|
+
*/
|
|
18
|
+
export function shortId(id) {
|
|
19
|
+
return id.slice(0, 8);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format a date for display
|
|
23
|
+
*/
|
|
24
|
+
export function formatDate(dateStr) {
|
|
25
|
+
if (!dateStr)
|
|
26
|
+
return "unknown";
|
|
27
|
+
try {
|
|
28
|
+
const date = new Date(dateStr);
|
|
29
|
+
return date.toLocaleDateString("en-US", {
|
|
30
|
+
month: "short",
|
|
31
|
+
day: "numeric",
|
|
32
|
+
hour: "2-digit",
|
|
33
|
+
minute: "2-digit",
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return dateStr;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Format a single memory for list display
|
|
42
|
+
*/
|
|
43
|
+
export function formatMemoryListItem(memory) {
|
|
44
|
+
const id = shortId(memory.id);
|
|
45
|
+
const type = memory.type || "unknown";
|
|
46
|
+
const date = formatDate(memory.created_at);
|
|
47
|
+
const content = truncate(memory.content.replace(/\n/g, " "));
|
|
48
|
+
return `[${id}] ${type} (${date})\n ${content}`;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Format a single memory for recall display (with relevance)
|
|
52
|
+
*/
|
|
53
|
+
export function formatRecallItem(memory, index) {
|
|
54
|
+
const id = shortId(memory.id);
|
|
55
|
+
const type = memory.type || "unknown";
|
|
56
|
+
const content = truncate(memory.content.replace(/\n/g, " "));
|
|
57
|
+
const relevance = memory.relevance
|
|
58
|
+
? ` (${Math.round(memory.relevance * 100)}%)`
|
|
59
|
+
: "";
|
|
60
|
+
return `${index + 1}. [${id}] ${type}${relevance}\n ${content}`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Format a list of memories for display
|
|
64
|
+
*/
|
|
65
|
+
export function formatMemoryList(memories, total) {
|
|
66
|
+
if (memories.length === 0) {
|
|
67
|
+
return "No memories found.";
|
|
68
|
+
}
|
|
69
|
+
const lines = memories.map((m) => formatMemoryListItem(m));
|
|
70
|
+
const header = total !== undefined
|
|
71
|
+
? `Showing ${memories.length} of ${total} memories:\n`
|
|
72
|
+
: `Found ${memories.length} memories:\n`;
|
|
73
|
+
return header + lines.join("\n\n");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Format recall results for display
|
|
77
|
+
*/
|
|
78
|
+
export function formatRecallResults(results, query) {
|
|
79
|
+
if (results.length === 0) {
|
|
80
|
+
return `No relevant memories found for: "${query}"`;
|
|
81
|
+
}
|
|
82
|
+
const lines = results.map((m, i) => formatRecallItem(m, i));
|
|
83
|
+
return `Found ${results.length} relevant memories:\n\n` + lines.join("\n\n");
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Format search results with explicit scope header
|
|
87
|
+
*
|
|
88
|
+
* When showRepo is true (global scope), prints the repo tag for each result.
|
|
89
|
+
*/
|
|
90
|
+
export function formatSearchResults(results, query, scopeHeader, showRepo) {
|
|
91
|
+
if (results.length === 0) {
|
|
92
|
+
return `${scopeHeader}\n\nNo results found for: "${query}"`;
|
|
93
|
+
}
|
|
94
|
+
const lines = results.map((m, i) => {
|
|
95
|
+
const base = formatRecallItem(m, i);
|
|
96
|
+
if (showRepo) {
|
|
97
|
+
const repoTag = (m.tags || []).find((t) => t.startsWith("repo:"));
|
|
98
|
+
if (repoTag) {
|
|
99
|
+
return `${base}\n Repo: ${repoTag.replace("repo:", "")}`;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return base;
|
|
103
|
+
});
|
|
104
|
+
return (`${scopeHeader}\n\nFound ${results.length} results:\n\n` +
|
|
105
|
+
lines.join("\n\n"));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Format session start summary grouped by type
|
|
109
|
+
*/
|
|
110
|
+
export function formatSessionSummary(memories) {
|
|
111
|
+
if (memories.length === 0) {
|
|
112
|
+
return "No project context loaded. Start saving memories with /remember.";
|
|
113
|
+
}
|
|
114
|
+
// Group by type/tag
|
|
115
|
+
const groups = {
|
|
116
|
+
decisions: [],
|
|
117
|
+
preferences: [],
|
|
118
|
+
tasks: [],
|
|
119
|
+
other: [],
|
|
120
|
+
};
|
|
121
|
+
for (const memory of memories) {
|
|
122
|
+
const tags = memory.tags || [];
|
|
123
|
+
const type = memory.type || "journal";
|
|
124
|
+
if (tags.includes("decision") || type === "insight") {
|
|
125
|
+
groups.decisions.push(memory);
|
|
126
|
+
}
|
|
127
|
+
else if (type === "preference" || tags.includes("preference")) {
|
|
128
|
+
groups.preferences.push(memory);
|
|
129
|
+
}
|
|
130
|
+
else if (type === "task" || tags.includes("todo")) {
|
|
131
|
+
groups.tasks.push(memory);
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
groups.other.push(memory);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const sections = [];
|
|
138
|
+
if (groups.decisions.length > 0) {
|
|
139
|
+
sections.push("**Decisions:**\n" +
|
|
140
|
+
groups.decisions.map((m) => `- ${truncate(m.content, 100)}`).join("\n"));
|
|
141
|
+
}
|
|
142
|
+
if (groups.preferences.length > 0) {
|
|
143
|
+
sections.push("**Preferences:**\n" +
|
|
144
|
+
groups.preferences
|
|
145
|
+
.map((m) => `- ${truncate(m.content, 100)}`)
|
|
146
|
+
.join("\n"));
|
|
147
|
+
}
|
|
148
|
+
if (groups.tasks.length > 0) {
|
|
149
|
+
sections.push("**Tasks/TODOs:**\n" +
|
|
150
|
+
groups.tasks.map((m) => `- ${truncate(m.content, 100)}`).join("\n"));
|
|
151
|
+
}
|
|
152
|
+
if (groups.other.length > 0) {
|
|
153
|
+
sections.push("**Other notes:**\n" +
|
|
154
|
+
groups.other.map((m) => `- ${truncate(m.content, 100)}`).join("\n"));
|
|
155
|
+
}
|
|
156
|
+
return (`Loaded ${memories.length} project memories:\n\n` + sections.join("\n\n"));
|
|
157
|
+
}
|
|
158
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","s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
|
+
*
|
|
5
|
+
* Provides persistent project memory through Sovant's governed memory layer.
|
|
6
|
+
* Creates/loads a thread per git repository and exposes tools for:
|
|
7
|
+
* - Saving memories (/remember, /remember-pref, /remember-decision)
|
|
8
|
+
* - Recalling memories (/recall)
|
|
9
|
+
* - Managing memories (/memory list, /memory delete)
|
|
10
|
+
*
|
|
11
|
+
* On session start, runs a recall to load project context.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;GAUG"}
|