thread-mcp 1.0.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 +674 -0
- package/README.md +497 -0
- package/dist/formatters/index.d.ts +5 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +12 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/json.d.ts +3 -0
- package/dist/formatters/json.d.ts.map +1 -0
- package/dist/formatters/json.js +25 -0
- package/dist/formatters/json.js.map +1 -0
- package/dist/formatters/markdown.d.ts +3 -0
- package/dist/formatters/markdown.d.ts.map +1 -0
- package/dist/formatters/markdown.js +134 -0
- package/dist/formatters/markdown.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +175 -0
- package/dist/server.js.map +1 -0
- package/dist/storage/index.d.ts +3 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +3 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/local.d.ts +23 -0
- package/dist/storage/local.d.ts.map +1 -0
- package/dist/storage/local.js +126 -0
- package/dist/storage/local.js.map +1 -0
- package/dist/storage/remote.d.ts +15 -0
- package/dist/storage/remote.d.ts.map +1 -0
- package/dist/storage/remote.js +91 -0
- package/dist/storage/remote.js.map +1 -0
- package/dist/tools/delete-thread.d.ts +71 -0
- package/dist/tools/delete-thread.d.ts.map +1 -0
- package/dist/tools/delete-thread.js +74 -0
- package/dist/tools/delete-thread.js.map +1 -0
- package/dist/tools/find-threads.d.ts +175 -0
- package/dist/tools/find-threads.d.ts.map +1 -0
- package/dist/tools/find-threads.js +265 -0
- package/dist/tools/find-threads.js.map +1 -0
- package/dist/tools/index.d.ts +270 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +18 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/resume-thread.d.ts +138 -0
- package/dist/tools/resume-thread.d.ts.map +1 -0
- package/dist/tools/resume-thread.js +191 -0
- package/dist/tools/resume-thread.js.map +1 -0
- package/dist/tools/save-thread.d.ts +155 -0
- package/dist/tools/save-thread.d.ts.map +1 -0
- package/dist/tools/save-thread.js +116 -0
- package/dist/tools/save-thread.js.map +1 -0
- package/dist/tools/update-thread.d.ts +180 -0
- package/dist/tools/update-thread.d.ts.map +1 -0
- package/dist/tools/update-thread.js +159 -0
- package/dist/tools/update-thread.js.map +1 -0
- package/dist/types.d.ts +177 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +41 -0
- package/dist/types.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
export { saveThreadTool, saveThread, SaveThreadInputSchema } from "./save-thread.js";
|
|
2
|
+
export { findThreadsTool, findThreads, FindThreadsInputSchema } from "./find-threads.js";
|
|
3
|
+
export { updateThreadTool, updateThread, UpdateThreadInputSchema } from "./update-thread.js";
|
|
4
|
+
export { deleteThreadTool, deleteThread, DeleteThreadInputSchema } from "./delete-thread.js";
|
|
5
|
+
export { resumeThreadTool, resumeThread, ResumeThreadInputSchema } from "./resume-thread.js";
|
|
6
|
+
export declare const allTools: readonly [{
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
inputSchema: import("zod").ZodObject<{
|
|
10
|
+
title: import("zod").ZodString;
|
|
11
|
+
messages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
12
|
+
role: import("zod").ZodEnum<["user", "assistant", "system"]>;
|
|
13
|
+
content: import("zod").ZodString;
|
|
14
|
+
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
16
|
+
role: "user" | "assistant" | "system";
|
|
17
|
+
content: string;
|
|
18
|
+
timestamp?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
role: "user" | "assistant" | "system";
|
|
21
|
+
content: string;
|
|
22
|
+
timestamp?: string | undefined;
|
|
23
|
+
}>, "many">;
|
|
24
|
+
destination: import("zod").ZodDefault<import("zod").ZodEnum<["local", "remote"]>>;
|
|
25
|
+
format: import("zod").ZodDefault<import("zod").ZodEnum<["markdown", "json"]>>;
|
|
26
|
+
sourceApp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
27
|
+
tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
28
|
+
summary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
outputDir: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
remoteUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
33
|
+
includeMetadata: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
34
|
+
includeTimestamps: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
35
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
36
|
+
title: string;
|
|
37
|
+
messages: {
|
|
38
|
+
role: "user" | "assistant" | "system";
|
|
39
|
+
content: string;
|
|
40
|
+
timestamp?: string | undefined;
|
|
41
|
+
}[];
|
|
42
|
+
format: "markdown" | "json";
|
|
43
|
+
includeMetadata: boolean;
|
|
44
|
+
includeTimestamps: boolean;
|
|
45
|
+
destination: "local" | "remote";
|
|
46
|
+
sourceApp?: string | undefined;
|
|
47
|
+
tags?: string[] | undefined;
|
|
48
|
+
summary?: string | undefined;
|
|
49
|
+
apiKey?: string | undefined;
|
|
50
|
+
headers?: Record<string, string> | undefined;
|
|
51
|
+
remoteUrl?: string | undefined;
|
|
52
|
+
outputDir?: string | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
title: string;
|
|
55
|
+
messages: {
|
|
56
|
+
role: "user" | "assistant" | "system";
|
|
57
|
+
content: string;
|
|
58
|
+
timestamp?: string | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
sourceApp?: string | undefined;
|
|
61
|
+
tags?: string[] | undefined;
|
|
62
|
+
summary?: string | undefined;
|
|
63
|
+
format?: "markdown" | "json" | undefined;
|
|
64
|
+
includeMetadata?: boolean | undefined;
|
|
65
|
+
includeTimestamps?: boolean | undefined;
|
|
66
|
+
apiKey?: string | undefined;
|
|
67
|
+
headers?: Record<string, string> | undefined;
|
|
68
|
+
remoteUrl?: string | undefined;
|
|
69
|
+
destination?: "local" | "remote" | undefined;
|
|
70
|
+
outputDir?: string | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
handler: typeof import("./save-thread.js").saveThread;
|
|
73
|
+
}, {
|
|
74
|
+
name: string;
|
|
75
|
+
description: string;
|
|
76
|
+
inputSchema: import("zod").ZodObject<{
|
|
77
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
78
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
79
|
+
titleContains: import("zod").ZodOptional<import("zod").ZodString>;
|
|
80
|
+
query: import("zod").ZodOptional<import("zod").ZodString>;
|
|
81
|
+
tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
82
|
+
sourceApp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
83
|
+
dateFrom: import("zod").ZodOptional<import("zod").ZodString>;
|
|
84
|
+
dateTo: import("zod").ZodOptional<import("zod").ZodString>;
|
|
85
|
+
includeContent: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
86
|
+
includeRelevanceInfo: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
87
|
+
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
88
|
+
source: import("zod").ZodDefault<import("zod").ZodEnum<["local", "remote"]>>;
|
|
89
|
+
outputDir: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
+
remoteUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
91
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
93
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
94
|
+
includeContent: boolean;
|
|
95
|
+
includeRelevanceInfo: boolean;
|
|
96
|
+
limit: number;
|
|
97
|
+
source: "local" | "remote";
|
|
98
|
+
title?: string | undefined;
|
|
99
|
+
sourceApp?: string | undefined;
|
|
100
|
+
tags?: string[] | undefined;
|
|
101
|
+
id?: string | undefined;
|
|
102
|
+
apiKey?: string | undefined;
|
|
103
|
+
headers?: Record<string, string> | undefined;
|
|
104
|
+
remoteUrl?: string | undefined;
|
|
105
|
+
outputDir?: string | undefined;
|
|
106
|
+
titleContains?: string | undefined;
|
|
107
|
+
query?: string | undefined;
|
|
108
|
+
dateFrom?: string | undefined;
|
|
109
|
+
dateTo?: string | undefined;
|
|
110
|
+
}, {
|
|
111
|
+
title?: string | undefined;
|
|
112
|
+
sourceApp?: string | undefined;
|
|
113
|
+
tags?: string[] | undefined;
|
|
114
|
+
id?: string | undefined;
|
|
115
|
+
apiKey?: string | undefined;
|
|
116
|
+
headers?: Record<string, string> | undefined;
|
|
117
|
+
remoteUrl?: string | undefined;
|
|
118
|
+
outputDir?: string | undefined;
|
|
119
|
+
titleContains?: string | undefined;
|
|
120
|
+
query?: string | undefined;
|
|
121
|
+
dateFrom?: string | undefined;
|
|
122
|
+
dateTo?: string | undefined;
|
|
123
|
+
includeContent?: boolean | undefined;
|
|
124
|
+
includeRelevanceInfo?: boolean | undefined;
|
|
125
|
+
limit?: number | undefined;
|
|
126
|
+
source?: "local" | "remote" | undefined;
|
|
127
|
+
}>;
|
|
128
|
+
handler: typeof import("./find-threads.js").findThreads;
|
|
129
|
+
}, {
|
|
130
|
+
name: string;
|
|
131
|
+
description: string;
|
|
132
|
+
inputSchema: import("zod").ZodObject<{
|
|
133
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
134
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
135
|
+
messages: import("zod").ZodArray<import("zod").ZodObject<{
|
|
136
|
+
role: import("zod").ZodEnum<["user", "assistant", "system"]>;
|
|
137
|
+
content: import("zod").ZodString;
|
|
138
|
+
timestamp: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
140
|
+
role: "user" | "assistant" | "system";
|
|
141
|
+
content: string;
|
|
142
|
+
timestamp?: string | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
role: "user" | "assistant" | "system";
|
|
145
|
+
content: string;
|
|
146
|
+
timestamp?: string | undefined;
|
|
147
|
+
}>, "many">;
|
|
148
|
+
mode: import("zod").ZodDefault<import("zod").ZodEnum<["append", "replace"]>>;
|
|
149
|
+
deduplicate: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
150
|
+
newTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
151
|
+
newTags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
152
|
+
newSummary: import("zod").ZodOptional<import("zod").ZodString>;
|
|
153
|
+
source: import("zod").ZodDefault<import("zod").ZodEnum<["local", "remote"]>>;
|
|
154
|
+
outputDir: import("zod").ZodOptional<import("zod").ZodString>;
|
|
155
|
+
remoteUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
156
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
157
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
158
|
+
format: import("zod").ZodOptional<import("zod").ZodEnum<["markdown", "json"]>>;
|
|
159
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
160
|
+
messages: {
|
|
161
|
+
role: "user" | "assistant" | "system";
|
|
162
|
+
content: string;
|
|
163
|
+
timestamp?: string | undefined;
|
|
164
|
+
}[];
|
|
165
|
+
source: "local" | "remote";
|
|
166
|
+
mode: "replace" | "append";
|
|
167
|
+
deduplicate: boolean;
|
|
168
|
+
title?: string | undefined;
|
|
169
|
+
id?: string | undefined;
|
|
170
|
+
format?: "markdown" | "json" | undefined;
|
|
171
|
+
apiKey?: string | undefined;
|
|
172
|
+
headers?: Record<string, string> | undefined;
|
|
173
|
+
remoteUrl?: string | undefined;
|
|
174
|
+
outputDir?: string | undefined;
|
|
175
|
+
newTitle?: string | undefined;
|
|
176
|
+
newTags?: string[] | undefined;
|
|
177
|
+
newSummary?: string | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
messages: {
|
|
180
|
+
role: "user" | "assistant" | "system";
|
|
181
|
+
content: string;
|
|
182
|
+
timestamp?: string | undefined;
|
|
183
|
+
}[];
|
|
184
|
+
title?: string | undefined;
|
|
185
|
+
id?: string | undefined;
|
|
186
|
+
format?: "markdown" | "json" | undefined;
|
|
187
|
+
apiKey?: string | undefined;
|
|
188
|
+
headers?: Record<string, string> | undefined;
|
|
189
|
+
remoteUrl?: string | undefined;
|
|
190
|
+
outputDir?: string | undefined;
|
|
191
|
+
source?: "local" | "remote" | undefined;
|
|
192
|
+
mode?: "replace" | "append" | undefined;
|
|
193
|
+
deduplicate?: boolean | undefined;
|
|
194
|
+
newTitle?: string | undefined;
|
|
195
|
+
newTags?: string[] | undefined;
|
|
196
|
+
newSummary?: string | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
handler: typeof import("./update-thread.js").updateThread;
|
|
199
|
+
}, {
|
|
200
|
+
name: string;
|
|
201
|
+
description: string;
|
|
202
|
+
inputSchema: import("zod").ZodObject<{
|
|
203
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
204
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
205
|
+
source: import("zod").ZodDefault<import("zod").ZodEnum<["local", "remote"]>>;
|
|
206
|
+
outputDir: import("zod").ZodOptional<import("zod").ZodString>;
|
|
207
|
+
remoteUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
208
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
209
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
210
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
211
|
+
source: "local" | "remote";
|
|
212
|
+
title?: string | undefined;
|
|
213
|
+
id?: string | undefined;
|
|
214
|
+
apiKey?: string | undefined;
|
|
215
|
+
headers?: Record<string, string> | undefined;
|
|
216
|
+
remoteUrl?: string | undefined;
|
|
217
|
+
outputDir?: string | undefined;
|
|
218
|
+
}, {
|
|
219
|
+
title?: string | undefined;
|
|
220
|
+
id?: string | undefined;
|
|
221
|
+
apiKey?: string | undefined;
|
|
222
|
+
headers?: Record<string, string> | undefined;
|
|
223
|
+
remoteUrl?: string | undefined;
|
|
224
|
+
outputDir?: string | undefined;
|
|
225
|
+
source?: "local" | "remote" | undefined;
|
|
226
|
+
}>;
|
|
227
|
+
handler: typeof import("./delete-thread.js").deleteThread;
|
|
228
|
+
}, {
|
|
229
|
+
name: string;
|
|
230
|
+
description: string;
|
|
231
|
+
inputSchema: import("zod").ZodObject<{
|
|
232
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
233
|
+
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
234
|
+
titleContains: import("zod").ZodOptional<import("zod").ZodString>;
|
|
235
|
+
format: import("zod").ZodDefault<import("zod").ZodEnum<["structured", "narrative", "messages"]>>;
|
|
236
|
+
maxMessages: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
237
|
+
includeSummary: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
238
|
+
source: import("zod").ZodDefault<import("zod").ZodEnum<["local", "remote"]>>;
|
|
239
|
+
outputDir: import("zod").ZodOptional<import("zod").ZodString>;
|
|
240
|
+
remoteUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
241
|
+
apiKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
242
|
+
headers: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
|
|
243
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
244
|
+
format: "messages" | "structured" | "narrative";
|
|
245
|
+
source: "local" | "remote";
|
|
246
|
+
includeSummary: boolean;
|
|
247
|
+
title?: string | undefined;
|
|
248
|
+
id?: string | undefined;
|
|
249
|
+
apiKey?: string | undefined;
|
|
250
|
+
headers?: Record<string, string> | undefined;
|
|
251
|
+
remoteUrl?: string | undefined;
|
|
252
|
+
outputDir?: string | undefined;
|
|
253
|
+
titleContains?: string | undefined;
|
|
254
|
+
maxMessages?: number | undefined;
|
|
255
|
+
}, {
|
|
256
|
+
title?: string | undefined;
|
|
257
|
+
id?: string | undefined;
|
|
258
|
+
format?: "messages" | "structured" | "narrative" | undefined;
|
|
259
|
+
apiKey?: string | undefined;
|
|
260
|
+
headers?: Record<string, string> | undefined;
|
|
261
|
+
remoteUrl?: string | undefined;
|
|
262
|
+
outputDir?: string | undefined;
|
|
263
|
+
titleContains?: string | undefined;
|
|
264
|
+
source?: "local" | "remote" | undefined;
|
|
265
|
+
maxMessages?: number | undefined;
|
|
266
|
+
includeSummary?: boolean | undefined;
|
|
267
|
+
}>;
|
|
268
|
+
handler: typeof import("./resume-thread.js").resumeThread;
|
|
269
|
+
}];
|
|
270
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7F,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMX,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { saveThreadTool } from "./save-thread.js";
|
|
2
|
+
import { findThreadsTool } from "./find-threads.js";
|
|
3
|
+
import { updateThreadTool } from "./update-thread.js";
|
|
4
|
+
import { deleteThreadTool } from "./delete-thread.js";
|
|
5
|
+
import { resumeThreadTool } from "./resume-thread.js";
|
|
6
|
+
export { saveThreadTool, saveThread, SaveThreadInputSchema } from "./save-thread.js";
|
|
7
|
+
export { findThreadsTool, findThreads, FindThreadsInputSchema } from "./find-threads.js";
|
|
8
|
+
export { updateThreadTool, updateThread, UpdateThreadInputSchema } from "./update-thread.js";
|
|
9
|
+
export { deleteThreadTool, deleteThread, DeleteThreadInputSchema } from "./delete-thread.js";
|
|
10
|
+
export { resumeThreadTool, resumeThread, ResumeThreadInputSchema } from "./resume-thread.js";
|
|
11
|
+
export const allTools = [
|
|
12
|
+
saveThreadTool,
|
|
13
|
+
findThreadsTool,
|
|
14
|
+
updateThreadTool,
|
|
15
|
+
deleteThreadTool,
|
|
16
|
+
resumeThreadTool,
|
|
17
|
+
];
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7F,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;CACR,CAAC"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Message } from "../types.js";
|
|
3
|
+
export declare const ResumeThreadInputSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5
|
+
title: z.ZodOptional<z.ZodString>;
|
|
6
|
+
titleContains: z.ZodOptional<z.ZodString>;
|
|
7
|
+
format: z.ZodDefault<z.ZodEnum<["structured", "narrative", "messages"]>>;
|
|
8
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
includeSummary: z.ZodDefault<z.ZodBoolean>;
|
|
10
|
+
source: z.ZodDefault<z.ZodEnum<["local", "remote"]>>;
|
|
11
|
+
outputDir: z.ZodOptional<z.ZodString>;
|
|
12
|
+
remoteUrl: z.ZodOptional<z.ZodString>;
|
|
13
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
14
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
format: "messages" | "structured" | "narrative";
|
|
17
|
+
source: "local" | "remote";
|
|
18
|
+
includeSummary: boolean;
|
|
19
|
+
title?: string | undefined;
|
|
20
|
+
id?: string | undefined;
|
|
21
|
+
apiKey?: string | undefined;
|
|
22
|
+
headers?: Record<string, string> | undefined;
|
|
23
|
+
remoteUrl?: string | undefined;
|
|
24
|
+
outputDir?: string | undefined;
|
|
25
|
+
titleContains?: string | undefined;
|
|
26
|
+
maxMessages?: number | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
title?: string | undefined;
|
|
29
|
+
id?: string | undefined;
|
|
30
|
+
format?: "messages" | "structured" | "narrative" | undefined;
|
|
31
|
+
apiKey?: string | undefined;
|
|
32
|
+
headers?: Record<string, string> | undefined;
|
|
33
|
+
remoteUrl?: string | undefined;
|
|
34
|
+
outputDir?: string | undefined;
|
|
35
|
+
titleContains?: string | undefined;
|
|
36
|
+
source?: "local" | "remote" | undefined;
|
|
37
|
+
maxMessages?: number | undefined;
|
|
38
|
+
includeSummary?: boolean | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type ResumeThreadInput = z.infer<typeof ResumeThreadInputSchema>;
|
|
41
|
+
export declare function resumeThread(input: ResumeThreadInput): Promise<{
|
|
42
|
+
found: boolean;
|
|
43
|
+
error: string;
|
|
44
|
+
source: "local" | "remote";
|
|
45
|
+
id?: undefined;
|
|
46
|
+
title?: undefined;
|
|
47
|
+
format?: undefined;
|
|
48
|
+
messages?: undefined;
|
|
49
|
+
totalMessages?: undefined;
|
|
50
|
+
content?: undefined;
|
|
51
|
+
} | {
|
|
52
|
+
found: boolean;
|
|
53
|
+
id: string | undefined;
|
|
54
|
+
title: string;
|
|
55
|
+
source: "local" | "remote";
|
|
56
|
+
format: string;
|
|
57
|
+
messages: {
|
|
58
|
+
role: "user" | "assistant" | "system";
|
|
59
|
+
content: string;
|
|
60
|
+
timestamp?: string | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
totalMessages: number;
|
|
63
|
+
error?: undefined;
|
|
64
|
+
content?: undefined;
|
|
65
|
+
} | {
|
|
66
|
+
found: boolean;
|
|
67
|
+
id: string | undefined;
|
|
68
|
+
title: string;
|
|
69
|
+
source: "local" | "remote";
|
|
70
|
+
format: string;
|
|
71
|
+
content: string;
|
|
72
|
+
totalMessages: number;
|
|
73
|
+
error?: undefined;
|
|
74
|
+
messages?: undefined;
|
|
75
|
+
} | {
|
|
76
|
+
totalMessages: number;
|
|
77
|
+
context: {
|
|
78
|
+
title: string;
|
|
79
|
+
summary?: string;
|
|
80
|
+
tags?: string[];
|
|
81
|
+
sourceApp?: string;
|
|
82
|
+
messageCount: number;
|
|
83
|
+
startedAt: string;
|
|
84
|
+
lastUpdated?: string;
|
|
85
|
+
};
|
|
86
|
+
messages: Message[];
|
|
87
|
+
continuationHint: string;
|
|
88
|
+
found: boolean;
|
|
89
|
+
id: string | undefined;
|
|
90
|
+
source: "local" | "remote";
|
|
91
|
+
format: string;
|
|
92
|
+
error?: undefined;
|
|
93
|
+
title?: undefined;
|
|
94
|
+
content?: undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const resumeThreadTool: {
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
inputSchema: z.ZodObject<{
|
|
100
|
+
id: z.ZodOptional<z.ZodString>;
|
|
101
|
+
title: z.ZodOptional<z.ZodString>;
|
|
102
|
+
titleContains: z.ZodOptional<z.ZodString>;
|
|
103
|
+
format: z.ZodDefault<z.ZodEnum<["structured", "narrative", "messages"]>>;
|
|
104
|
+
maxMessages: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
includeSummary: z.ZodDefault<z.ZodBoolean>;
|
|
106
|
+
source: z.ZodDefault<z.ZodEnum<["local", "remote"]>>;
|
|
107
|
+
outputDir: z.ZodOptional<z.ZodString>;
|
|
108
|
+
remoteUrl: z.ZodOptional<z.ZodString>;
|
|
109
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
110
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
111
|
+
}, "strip", z.ZodTypeAny, {
|
|
112
|
+
format: "messages" | "structured" | "narrative";
|
|
113
|
+
source: "local" | "remote";
|
|
114
|
+
includeSummary: boolean;
|
|
115
|
+
title?: string | undefined;
|
|
116
|
+
id?: string | undefined;
|
|
117
|
+
apiKey?: string | undefined;
|
|
118
|
+
headers?: Record<string, string> | undefined;
|
|
119
|
+
remoteUrl?: string | undefined;
|
|
120
|
+
outputDir?: string | undefined;
|
|
121
|
+
titleContains?: string | undefined;
|
|
122
|
+
maxMessages?: number | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
title?: string | undefined;
|
|
125
|
+
id?: string | undefined;
|
|
126
|
+
format?: "messages" | "structured" | "narrative" | undefined;
|
|
127
|
+
apiKey?: string | undefined;
|
|
128
|
+
headers?: Record<string, string> | undefined;
|
|
129
|
+
remoteUrl?: string | undefined;
|
|
130
|
+
outputDir?: string | undefined;
|
|
131
|
+
titleContains?: string | undefined;
|
|
132
|
+
source?: "local" | "remote" | undefined;
|
|
133
|
+
maxMessages?: number | undefined;
|
|
134
|
+
includeSummary?: boolean | undefined;
|
|
135
|
+
}>;
|
|
136
|
+
handler: typeof resumeThread;
|
|
137
|
+
};
|
|
138
|
+
//# sourceMappingURL=resume-thread.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume-thread.d.ts","sourceRoot":"","sources":["../../src/tools/resume-thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAgB,OAAO,EAAE,MAAM,aAAa,CAAC;AAIzD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAyFxE,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA3ChD;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;cACS,OAAO,EAAE;sBACD,MAAM;;;;;;;;GA2IzB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAS5B,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { getDefaultLocalStorage, createLocalStorage } from "../storage/local.js";
|
|
3
|
+
import { createRemoteStorage } from "../storage/remote.js";
|
|
4
|
+
export const ResumeThreadInputSchema = z.object({
|
|
5
|
+
// Lookup (use one)
|
|
6
|
+
id: z.string().optional().describe("ID of the thread to resume"),
|
|
7
|
+
title: z.string().optional().describe("Find thread by exact title match"),
|
|
8
|
+
titleContains: z.string().optional().describe("Find most recent thread with title containing this"),
|
|
9
|
+
// Output format
|
|
10
|
+
format: z
|
|
11
|
+
.enum(["structured", "narrative", "messages"])
|
|
12
|
+
.default("structured")
|
|
13
|
+
.describe("'structured' returns organized context, 'narrative' returns readable summary, 'messages' returns raw messages"),
|
|
14
|
+
// Options
|
|
15
|
+
maxMessages: z
|
|
16
|
+
.number()
|
|
17
|
+
.positive()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("Limit to last N messages (default: all)"),
|
|
20
|
+
includeSummary: z.boolean().default(true).describe("Include thread summary if available"),
|
|
21
|
+
// Source
|
|
22
|
+
source: z
|
|
23
|
+
.enum(["local", "remote"])
|
|
24
|
+
.default("local")
|
|
25
|
+
.describe("Source where thread is stored"),
|
|
26
|
+
outputDir: z.string().optional().describe("Custom directory for local storage"),
|
|
27
|
+
remoteUrl: z.string().url().optional().describe("Remote server URL"),
|
|
28
|
+
apiKey: z.string().optional().describe("API key for remote"),
|
|
29
|
+
headers: z.record(z.string()).optional().describe("Additional headers for remote"),
|
|
30
|
+
});
|
|
31
|
+
function formatNarrative(conversation, maxMessages) {
|
|
32
|
+
const lines = [];
|
|
33
|
+
lines.push(`# Resuming: ${conversation.metadata.title}`);
|
|
34
|
+
lines.push("");
|
|
35
|
+
if (conversation.metadata.summary) {
|
|
36
|
+
lines.push(`**Summary:** ${conversation.metadata.summary}`);
|
|
37
|
+
lines.push("");
|
|
38
|
+
}
|
|
39
|
+
if (conversation.metadata.tags && conversation.metadata.tags.length > 0) {
|
|
40
|
+
lines.push(`**Topics:** ${conversation.metadata.tags.join(", ")}`);
|
|
41
|
+
lines.push("");
|
|
42
|
+
}
|
|
43
|
+
const messages = maxMessages
|
|
44
|
+
? conversation.messages.slice(-maxMessages)
|
|
45
|
+
: conversation.messages;
|
|
46
|
+
if (maxMessages && conversation.messages.length > maxMessages) {
|
|
47
|
+
lines.push(`*Showing last ${maxMessages} of ${conversation.messages.length} messages*`);
|
|
48
|
+
lines.push("");
|
|
49
|
+
}
|
|
50
|
+
lines.push("## Previous Conversation");
|
|
51
|
+
lines.push("");
|
|
52
|
+
for (const msg of messages) {
|
|
53
|
+
const role = msg.role.charAt(0).toUpperCase() + msg.role.slice(1);
|
|
54
|
+
lines.push(`**${role}:** ${msg.content}`);
|
|
55
|
+
lines.push("");
|
|
56
|
+
}
|
|
57
|
+
lines.push("---");
|
|
58
|
+
lines.push("*Continue the conversation from here...*");
|
|
59
|
+
return lines.join("\n");
|
|
60
|
+
}
|
|
61
|
+
function formatStructured(conversation, maxMessages) {
|
|
62
|
+
const messages = maxMessages
|
|
63
|
+
? conversation.messages.slice(-maxMessages)
|
|
64
|
+
: conversation.messages;
|
|
65
|
+
// Generate a continuation hint based on the last message
|
|
66
|
+
const lastMessage = messages[messages.length - 1];
|
|
67
|
+
let continuationHint = "Continue the conversation.";
|
|
68
|
+
if (lastMessage) {
|
|
69
|
+
if (lastMessage.role === "user") {
|
|
70
|
+
continuationHint = "The user's last message is awaiting a response.";
|
|
71
|
+
}
|
|
72
|
+
else if (lastMessage.role === "assistant") {
|
|
73
|
+
continuationHint = "The assistant last responded. The user may have follow-up questions.";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
context: {
|
|
78
|
+
title: conversation.metadata.title,
|
|
79
|
+
summary: conversation.metadata.summary,
|
|
80
|
+
tags: conversation.metadata.tags,
|
|
81
|
+
sourceApp: conversation.metadata.sourceApp,
|
|
82
|
+
messageCount: conversation.messages.length,
|
|
83
|
+
startedAt: conversation.metadata.createdAt,
|
|
84
|
+
lastUpdated: conversation.metadata.updatedAt,
|
|
85
|
+
},
|
|
86
|
+
messages,
|
|
87
|
+
continuationHint,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export async function resumeThread(input) {
|
|
91
|
+
if (!input.id && !input.title && !input.titleContains) {
|
|
92
|
+
throw new Error("One of 'id', 'title', or 'titleContains' must be provided");
|
|
93
|
+
}
|
|
94
|
+
if (input.source === "remote" && !input.remoteUrl) {
|
|
95
|
+
throw new Error("remoteUrl is required when source is 'remote'");
|
|
96
|
+
}
|
|
97
|
+
const storage = input.source === "remote"
|
|
98
|
+
? createRemoteStorage({
|
|
99
|
+
url: input.remoteUrl,
|
|
100
|
+
apiKey: input.apiKey,
|
|
101
|
+
headers: input.headers,
|
|
102
|
+
})
|
|
103
|
+
: input.outputDir
|
|
104
|
+
? createLocalStorage(input.outputDir)
|
|
105
|
+
: getDefaultLocalStorage();
|
|
106
|
+
// Find the thread
|
|
107
|
+
let conversation = null;
|
|
108
|
+
let threadId;
|
|
109
|
+
if (input.id) {
|
|
110
|
+
conversation = await storage.get(input.id);
|
|
111
|
+
threadId = input.id;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const allInfos = await storage.list();
|
|
115
|
+
for (const info of allInfos) {
|
|
116
|
+
const conv = await storage.get(info.id);
|
|
117
|
+
if (!conv)
|
|
118
|
+
continue;
|
|
119
|
+
if (input.title && conv.metadata.title === input.title) {
|
|
120
|
+
conversation = conv;
|
|
121
|
+
threadId = info.id;
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
if (input.titleContains &&
|
|
125
|
+
conv.metadata.title.toLowerCase().includes(input.titleContains.toLowerCase())) {
|
|
126
|
+
// Take the first (most recent) match
|
|
127
|
+
conversation = conv;
|
|
128
|
+
threadId = info.id;
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (!conversation) {
|
|
134
|
+
const lookupMethod = input.id
|
|
135
|
+
? `ID '${input.id}'`
|
|
136
|
+
: input.title
|
|
137
|
+
? `title '${input.title}'`
|
|
138
|
+
: `title containing '${input.titleContains}'`;
|
|
139
|
+
return {
|
|
140
|
+
found: false,
|
|
141
|
+
error: `Thread not found with ${lookupMethod}`,
|
|
142
|
+
source: input.source,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
// Format output based on requested format
|
|
146
|
+
if (input.format === "messages") {
|
|
147
|
+
const messages = input.maxMessages
|
|
148
|
+
? conversation.messages.slice(-input.maxMessages)
|
|
149
|
+
: conversation.messages;
|
|
150
|
+
return {
|
|
151
|
+
found: true,
|
|
152
|
+
id: threadId,
|
|
153
|
+
title: conversation.metadata.title,
|
|
154
|
+
source: input.source,
|
|
155
|
+
format: "messages",
|
|
156
|
+
messages,
|
|
157
|
+
totalMessages: conversation.messages.length,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
if (input.format === "narrative") {
|
|
161
|
+
return {
|
|
162
|
+
found: true,
|
|
163
|
+
id: threadId,
|
|
164
|
+
title: conversation.metadata.title,
|
|
165
|
+
source: input.source,
|
|
166
|
+
format: "narrative",
|
|
167
|
+
content: formatNarrative(conversation, input.maxMessages),
|
|
168
|
+
totalMessages: conversation.messages.length,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
// Default: structured
|
|
172
|
+
const structured = formatStructured(conversation, input.maxMessages);
|
|
173
|
+
return {
|
|
174
|
+
found: true,
|
|
175
|
+
id: threadId,
|
|
176
|
+
source: input.source,
|
|
177
|
+
format: "structured",
|
|
178
|
+
...structured,
|
|
179
|
+
totalMessages: conversation.messages.length,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
export const resumeThreadTool = {
|
|
183
|
+
name: "resume_thread",
|
|
184
|
+
description: "Load a saved conversation thread to continue where you left off. " +
|
|
185
|
+
"Returns the conversation context in different formats: " +
|
|
186
|
+
"'structured' (organized data), 'narrative' (readable summary), or 'messages' (raw). " +
|
|
187
|
+
"Use this to pick up previous conversations.",
|
|
188
|
+
inputSchema: ResumeThreadInputSchema,
|
|
189
|
+
handler: resumeThread,
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=resume-thread.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume-thread.js","sourceRoot":"","sources":["../../src/tools/resume-thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,mBAAmB;IACnB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CA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