couchloop-eq-mcp 1.1.3 → 1.1.6
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/README.md +6 -0
- package/dist/clients/shrinkChatClient.d.ts +4 -4
- package/dist/index.js +168 -6
- package/dist/index.js.map +1 -1
- package/dist/server/chatgpt-mcp.d.ts.map +1 -1
- package/dist/server/chatgpt-mcp.js +112 -2
- package/dist/server/chatgpt-mcp.js.map +1 -1
- package/dist/server/http-mcp.d.ts +11 -0
- package/dist/server/http-mcp.d.ts.map +1 -0
- package/dist/server/http-mcp.js +431 -0
- package/dist/server/http-mcp.js.map +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +28 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/sse.d.ts +1 -1
- package/dist/server/sse.d.ts.map +1 -1
- package/dist/server/sse.js +320 -69
- package/dist/server/sse.js.map +1 -1
- package/dist/tools/check-versions.d.ts +7 -7
- package/dist/tools/check-versions.d.ts.map +1 -1
- package/dist/tools/check-versions.js +17 -22
- package/dist/tools/check-versions.js.map +1 -1
- package/dist/tools/checkpoint.d.ts +4 -18
- package/dist/tools/checkpoint.d.ts.map +1 -1
- package/dist/tools/checkpoint.js +85 -11
- package/dist/tools/checkpoint.js.map +1 -1
- package/dist/tools/comprehensive-code-review.d.ts +78 -0
- package/dist/tools/comprehensive-code-review.d.ts.map +1 -0
- package/dist/tools/comprehensive-code-review.js +177 -0
- package/dist/tools/comprehensive-code-review.js.map +1 -0
- package/dist/tools/comprehensive-package-audit.d.ts +75 -0
- package/dist/tools/comprehensive-package-audit.d.ts.map +1 -0
- package/dist/tools/comprehensive-package-audit.js +151 -0
- package/dist/tools/comprehensive-package-audit.js.map +1 -0
- package/dist/tools/detect-build-context.d.ts +59 -0
- package/dist/tools/detect-build-context.d.ts.map +1 -0
- package/dist/tools/detect-build-context.js +80 -0
- package/dist/tools/detect-build-context.js.map +1 -0
- package/dist/tools/generate-upgrade-report.d.ts +85 -0
- package/dist/tools/generate-upgrade-report.d.ts.map +1 -0
- package/dist/tools/generate-upgrade-report.js +102 -0
- package/dist/tools/generate-upgrade-report.js.map +1 -0
- package/dist/tools/index-full.d.ts +1355 -0
- package/dist/tools/index-full.d.ts.map +1 -0
- package/dist/tools/index-full.js +611 -0
- package/dist/tools/index-full.js.map +1 -0
- package/dist/tools/index.d.ts +27 -968
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +29 -531
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/insight.d.ts +25 -6
- package/dist/tools/insight.d.ts.map +1 -1
- package/dist/tools/insight.js +2 -1
- package/dist/tools/insight.js.map +1 -1
- package/dist/tools/prevent-ai-errors.d.ts +85 -0
- package/dist/tools/prevent-ai-errors.d.ts.map +1 -0
- package/dist/tools/prevent-ai-errors.js +97 -0
- package/dist/tools/prevent-ai-errors.js.map +1 -0
- package/dist/tools/primary-tools.d.ts +430 -0
- package/dist/tools/primary-tools.d.ts.map +1 -0
- package/dist/tools/primary-tools.js +294 -0
- package/dist/tools/primary-tools.js.map +1 -0
- package/dist/tools/sendMessage.d.ts +3 -5
- package/dist/tools/sendMessage.d.ts.map +1 -1
- package/dist/tools/sendMessage.js +47 -22
- package/dist/tools/sendMessage.js.map +1 -1
- package/dist/tools/session-manager.d.ts +32 -0
- package/dist/tools/session-manager.d.ts.map +1 -0
- package/dist/tools/session-manager.js +184 -0
- package/dist/tools/session-manager.js.map +1 -0
- package/dist/tools/smart-context.d.ts +66 -0
- package/dist/tools/smart-context.d.ts.map +1 -0
- package/dist/tools/smart-context.js +167 -0
- package/dist/tools/smart-context.js.map +1 -0
- package/dist/tools/validate_packages.d.ts.map +1 -1
- package/dist/tools/validate_packages.js +6 -4
- package/dist/tools/validate_packages.js.map +1 -1
- package/dist/types/checkpoint.d.ts +59 -4
- package/dist/types/checkpoint.d.ts.map +1 -1
- package/dist/types/checkpoint.js +20 -1
- package/dist/types/checkpoint.js.map +1 -1
- package/dist/types/journey.d.ts +6 -6
- package/dist/types/session.d.ts +3 -3
- package/dist/utils/sanitize.d.ts +24 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +117 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/workflows/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -1,532 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
description: 'Optional journey to follow (e.g., "daily-reflection")',
|
|
31
|
-
},
|
|
32
|
-
context: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: 'Brief context for this session',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
required: [],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
handler: createSession
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
definition: {
|
|
44
|
-
name: 'send_message',
|
|
45
|
-
description: 'Send a message through the therapeutic AI stack with crisis detection and emotional support.',
|
|
46
|
-
annotations: {
|
|
47
|
-
readOnlyHint: false,
|
|
48
|
-
destructiveHint: false,
|
|
49
|
-
openWorldHint: true,
|
|
50
|
-
},
|
|
51
|
-
inputSchema: {
|
|
52
|
-
type: 'object',
|
|
53
|
-
properties: {
|
|
54
|
-
session_id: {
|
|
55
|
-
type: 'string',
|
|
56
|
-
description: 'Active session ID',
|
|
57
|
-
},
|
|
58
|
-
message: {
|
|
59
|
-
type: 'string',
|
|
60
|
-
description: 'The message to send',
|
|
61
|
-
},
|
|
62
|
-
save_checkpoint: {
|
|
63
|
-
type: 'boolean',
|
|
64
|
-
description: 'Whether to save this exchange as a checkpoint (default: false)',
|
|
65
|
-
},
|
|
66
|
-
checkpoint_key: {
|
|
67
|
-
type: 'string',
|
|
68
|
-
description: 'Custom key for the checkpoint if saving',
|
|
69
|
-
},
|
|
70
|
-
advance_step: {
|
|
71
|
-
type: 'boolean',
|
|
72
|
-
description: 'Whether to advance to next journey step after response (default: false)',
|
|
73
|
-
},
|
|
74
|
-
include_memory: {
|
|
75
|
-
type: 'boolean',
|
|
76
|
-
description: 'Include session memory context (default: true)',
|
|
77
|
-
},
|
|
78
|
-
system_prompt: {
|
|
79
|
-
type: 'string',
|
|
80
|
-
description: 'Optional custom system prompt',
|
|
81
|
-
},
|
|
82
|
-
conversation_type: {
|
|
83
|
-
type: 'string',
|
|
84
|
-
description: 'Type of conversation (e.g., "therapeutic", "crisis", "casual")',
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
required: ['session_id', 'message'],
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
handler: sendMessage
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
definition: {
|
|
94
|
-
name: 'resume_session',
|
|
95
|
-
description: 'Resume a previously paused session. Returns current state and next step.',
|
|
96
|
-
annotations: {
|
|
97
|
-
readOnlyHint: true,
|
|
98
|
-
destructiveHint: false,
|
|
99
|
-
openWorldHint: false,
|
|
100
|
-
},
|
|
101
|
-
inputSchema: {
|
|
102
|
-
type: 'object',
|
|
103
|
-
properties: {
|
|
104
|
-
session_id: {
|
|
105
|
-
type: 'string',
|
|
106
|
-
description: 'Session ID to resume (omit to resume most recent)',
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
required: [],
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
handler: resumeSession
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
definition: {
|
|
116
|
-
name: 'save_checkpoint',
|
|
117
|
-
description: 'Save progress or capture a key moment in the current session.',
|
|
118
|
-
annotations: {
|
|
119
|
-
readOnlyHint: false,
|
|
120
|
-
destructiveHint: false,
|
|
121
|
-
openWorldHint: false,
|
|
122
|
-
},
|
|
123
|
-
inputSchema: {
|
|
124
|
-
type: 'object',
|
|
125
|
-
properties: {
|
|
126
|
-
session_id: {
|
|
127
|
-
type: 'string',
|
|
128
|
-
description: 'Active session ID',
|
|
129
|
-
},
|
|
130
|
-
key: {
|
|
131
|
-
type: 'string',
|
|
132
|
-
description: 'What is being captured (e.g., "mood", "reflection", "gratitude")',
|
|
133
|
-
},
|
|
134
|
-
value: {
|
|
135
|
-
// Using empty schema {} to allow any JSON value type
|
|
136
|
-
type: 'object',
|
|
137
|
-
additionalProperties: true,
|
|
138
|
-
description: 'The captured content (can be any JSON value: string, number, object, array, etc.)',
|
|
139
|
-
},
|
|
140
|
-
advance_step: {
|
|
141
|
-
type: 'boolean',
|
|
142
|
-
description: 'Whether to advance to next journey step (default: true)',
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
required: ['session_id', 'key', 'value'],
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
handler: saveCheckpoint
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
definition: {
|
|
152
|
-
name: 'get_checkpoints',
|
|
153
|
-
description: 'Get all checkpoints for a session.',
|
|
154
|
-
annotations: {
|
|
155
|
-
readOnlyHint: true,
|
|
156
|
-
destructiveHint: false,
|
|
157
|
-
openWorldHint: false,
|
|
158
|
-
},
|
|
159
|
-
inputSchema: {
|
|
160
|
-
type: 'object',
|
|
161
|
-
properties: {
|
|
162
|
-
session_id: {
|
|
163
|
-
type: 'string',
|
|
164
|
-
description: 'Session ID to get checkpoints for',
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
required: ['session_id'],
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
handler: getCheckpoints
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
definition: {
|
|
174
|
-
name: 'list_journeys',
|
|
175
|
-
description: 'List available guided journeys/experiences.',
|
|
176
|
-
annotations: {
|
|
177
|
-
readOnlyHint: true,
|
|
178
|
-
destructiveHint: false,
|
|
179
|
-
openWorldHint: false,
|
|
180
|
-
},
|
|
181
|
-
inputSchema: {
|
|
182
|
-
type: 'object',
|
|
183
|
-
properties: {
|
|
184
|
-
tag: {
|
|
185
|
-
type: 'string',
|
|
186
|
-
description: 'Filter by tag (e.g., "reflection", "gratitude")',
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
required: [],
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
handler: listJourneys
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
definition: {
|
|
196
|
-
name: 'get_journey_status',
|
|
197
|
-
description: 'Get current progress in a session/journey.',
|
|
198
|
-
annotations: {
|
|
199
|
-
readOnlyHint: true,
|
|
200
|
-
destructiveHint: false,
|
|
201
|
-
openWorldHint: false,
|
|
202
|
-
},
|
|
203
|
-
inputSchema: {
|
|
204
|
-
type: 'object',
|
|
205
|
-
properties: {
|
|
206
|
-
session_id: {
|
|
207
|
-
type: 'string',
|
|
208
|
-
description: 'Session ID to check',
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
required: ['session_id'],
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
handler: getJourneyStatus
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
definition: {
|
|
218
|
-
name: 'save_insight',
|
|
219
|
-
description: 'Capture a meaningful insight or realization from the conversation.',
|
|
220
|
-
annotations: {
|
|
221
|
-
readOnlyHint: false,
|
|
222
|
-
destructiveHint: false,
|
|
223
|
-
openWorldHint: false,
|
|
224
|
-
},
|
|
225
|
-
inputSchema: {
|
|
226
|
-
type: 'object',
|
|
227
|
-
properties: {
|
|
228
|
-
content: {
|
|
229
|
-
type: 'string',
|
|
230
|
-
description: 'The insight to save',
|
|
231
|
-
},
|
|
232
|
-
session_id: {
|
|
233
|
-
type: 'string',
|
|
234
|
-
description: 'Optional session to link this insight to',
|
|
235
|
-
},
|
|
236
|
-
tags: {
|
|
237
|
-
type: 'array',
|
|
238
|
-
items: { type: 'string' },
|
|
239
|
-
description: 'Optional tags for categorization',
|
|
240
|
-
},
|
|
241
|
-
},
|
|
242
|
-
required: ['content'],
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
handler: saveInsight
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
definition: {
|
|
249
|
-
name: 'get_insights',
|
|
250
|
-
description: 'Get user insights, optionally filtered by session.',
|
|
251
|
-
annotations: {
|
|
252
|
-
readOnlyHint: true,
|
|
253
|
-
destructiveHint: false,
|
|
254
|
-
openWorldHint: false,
|
|
255
|
-
},
|
|
256
|
-
inputSchema: {
|
|
257
|
-
type: 'object',
|
|
258
|
-
properties: {
|
|
259
|
-
session_id: {
|
|
260
|
-
type: 'string',
|
|
261
|
-
description: 'Optional session ID to filter insights',
|
|
262
|
-
},
|
|
263
|
-
limit: {
|
|
264
|
-
type: 'number',
|
|
265
|
-
description: 'Maximum number of insights to return (default: 10)',
|
|
266
|
-
},
|
|
267
|
-
auth: {
|
|
268
|
-
type: 'object',
|
|
269
|
-
description: 'Authentication context for user identification',
|
|
270
|
-
properties: {
|
|
271
|
-
token: {
|
|
272
|
-
type: 'string',
|
|
273
|
-
description: 'OAuth access token or session identifier',
|
|
274
|
-
},
|
|
275
|
-
user_id: {
|
|
276
|
-
type: 'string',
|
|
277
|
-
description: 'External user identifier from OAuth provider',
|
|
278
|
-
},
|
|
279
|
-
client_id: {
|
|
280
|
-
type: 'string',
|
|
281
|
-
description: 'Client application identifier',
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
required: [],
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
handler: getInsights
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
definition: {
|
|
293
|
-
name: 'get_user_context',
|
|
294
|
-
description: 'Get relevant context about this user for personalization.',
|
|
295
|
-
annotations: {
|
|
296
|
-
readOnlyHint: true,
|
|
297
|
-
destructiveHint: false,
|
|
298
|
-
openWorldHint: false,
|
|
299
|
-
},
|
|
300
|
-
inputSchema: {
|
|
301
|
-
type: 'object',
|
|
302
|
-
properties: {
|
|
303
|
-
include_recent_insights: {
|
|
304
|
-
type: 'boolean',
|
|
305
|
-
description: 'Include recent insights (default: true)',
|
|
306
|
-
},
|
|
307
|
-
include_session_history: {
|
|
308
|
-
type: 'boolean',
|
|
309
|
-
description: 'Include recent session summaries (default: true)',
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
required: [],
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
handler: getUserContext
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
definition: validatePackagesTool,
|
|
319
|
-
handler: handleValidatePackages
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
definition: preReviewCodeTool,
|
|
323
|
-
handler: handlePreReviewCode
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
definition: scanSecurityTool,
|
|
327
|
-
handler: handleScanSecurity
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
definition: detectCodeSmellTool,
|
|
331
|
-
handler: handleDetectCodeSmell
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
definition: {
|
|
335
|
-
name: 'protect_files',
|
|
336
|
-
description: 'Prevents accidental file deletion and destructive operations. Validates operations against protected paths and patterns, creates automatic backups, and provides rollback capability.',
|
|
337
|
-
annotations: {
|
|
338
|
-
readOnlyHint: false,
|
|
339
|
-
destructiveHint: false,
|
|
340
|
-
openWorldHint: false,
|
|
341
|
-
},
|
|
342
|
-
inputSchema: {
|
|
343
|
-
type: 'object',
|
|
344
|
-
properties: {
|
|
345
|
-
operation: {
|
|
346
|
-
type: 'string',
|
|
347
|
-
enum: ['delete', 'overwrite', 'move'],
|
|
348
|
-
description: 'Type of file operation to protect',
|
|
349
|
-
},
|
|
350
|
-
path: {
|
|
351
|
-
type: 'string',
|
|
352
|
-
description: 'Path to file or directory being modified',
|
|
353
|
-
},
|
|
354
|
-
target_path: {
|
|
355
|
-
type: 'string',
|
|
356
|
-
description: 'Destination path (required for move operations)',
|
|
357
|
-
},
|
|
358
|
-
force: {
|
|
359
|
-
type: 'boolean',
|
|
360
|
-
description: 'Force operation (bypasses some safety checks)',
|
|
361
|
-
},
|
|
362
|
-
reason: {
|
|
363
|
-
type: 'string',
|
|
364
|
-
description: 'Reason for the operation',
|
|
365
|
-
},
|
|
366
|
-
},
|
|
367
|
-
required: ['operation', 'path'],
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
handler: protectFiles,
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
definition: {
|
|
374
|
-
name: 'get_protection_status',
|
|
375
|
-
description: 'Get current file protection status, configuration, and backup statistics.',
|
|
376
|
-
annotations: {
|
|
377
|
-
readOnlyHint: true,
|
|
378
|
-
destructiveHint: false,
|
|
379
|
-
openWorldHint: false,
|
|
380
|
-
},
|
|
381
|
-
inputSchema: {
|
|
382
|
-
type: 'object',
|
|
383
|
-
properties: {},
|
|
384
|
-
required: [],
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
|
-
handler: getProtectionStatus,
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
definition: {
|
|
391
|
-
name: 'get_operation_history',
|
|
392
|
-
description: 'Get history of file operations that were attempted or executed.',
|
|
393
|
-
annotations: {
|
|
394
|
-
readOnlyHint: true,
|
|
395
|
-
destructiveHint: false,
|
|
396
|
-
openWorldHint: false,
|
|
397
|
-
},
|
|
398
|
-
inputSchema: {
|
|
399
|
-
type: 'object',
|
|
400
|
-
properties: {
|
|
401
|
-
limit: {
|
|
402
|
-
type: 'number',
|
|
403
|
-
description: 'Maximum number of operations to return (default: 50)',
|
|
404
|
-
},
|
|
405
|
-
},
|
|
406
|
-
required: [],
|
|
407
|
-
},
|
|
408
|
-
},
|
|
409
|
-
handler: getOperationHistory,
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
definition: {
|
|
413
|
-
name: 'list_backups',
|
|
414
|
-
description: 'List all available backup snapshots that can be restored.',
|
|
415
|
-
annotations: {
|
|
416
|
-
readOnlyHint: true,
|
|
417
|
-
destructiveHint: false,
|
|
418
|
-
openWorldHint: false,
|
|
419
|
-
},
|
|
420
|
-
inputSchema: {
|
|
421
|
-
type: 'object',
|
|
422
|
-
properties: {},
|
|
423
|
-
required: [],
|
|
424
|
-
},
|
|
425
|
-
},
|
|
426
|
-
handler: listBackups,
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
definition: {
|
|
430
|
-
name: 'rollback_file',
|
|
431
|
-
description: 'Restore a file from a backup snapshot (undo a file modification/deletion).',
|
|
432
|
-
annotations: {
|
|
433
|
-
readOnlyHint: false,
|
|
434
|
-
destructiveHint: true,
|
|
435
|
-
openWorldHint: false,
|
|
436
|
-
},
|
|
437
|
-
inputSchema: {
|
|
438
|
-
type: 'object',
|
|
439
|
-
properties: {
|
|
440
|
-
backup_id: {
|
|
441
|
-
type: 'string',
|
|
442
|
-
description: 'ID of the backup to restore from',
|
|
443
|
-
},
|
|
444
|
-
},
|
|
445
|
-
required: ['backup_id'],
|
|
446
|
-
},
|
|
447
|
-
},
|
|
448
|
-
handler: rollbackFile,
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
definition: {
|
|
452
|
-
name: 'enable_code_freeze',
|
|
453
|
-
description: 'Enable code freeze mode - all file operations require explicit approval (critical protection mode).',
|
|
454
|
-
annotations: {
|
|
455
|
-
readOnlyHint: false,
|
|
456
|
-
destructiveHint: false,
|
|
457
|
-
openWorldHint: false,
|
|
458
|
-
},
|
|
459
|
-
inputSchema: {
|
|
460
|
-
type: 'object',
|
|
461
|
-
properties: {},
|
|
462
|
-
required: [],
|
|
463
|
-
},
|
|
464
|
-
},
|
|
465
|
-
handler: enableCodeFreeze,
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
definition: {
|
|
469
|
-
name: 'disable_code_freeze',
|
|
470
|
-
description: 'Disable code freeze mode - resume normal file operation protection rules.',
|
|
471
|
-
annotations: {
|
|
472
|
-
readOnlyHint: false,
|
|
473
|
-
destructiveHint: false,
|
|
474
|
-
openWorldHint: false,
|
|
475
|
-
},
|
|
476
|
-
inputSchema: {
|
|
477
|
-
type: 'object',
|
|
478
|
-
properties: {},
|
|
479
|
-
required: [],
|
|
480
|
-
},
|
|
481
|
-
},
|
|
482
|
-
handler: disableCodeFreeze,
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
definition: {
|
|
486
|
-
name: 'preserve_context',
|
|
487
|
-
description: 'Store, retrieve, and manage important project context to prevent AI amnesia when context windows fill up. Preserves architectural decisions, requirements, constraints, and technical patterns across conversations.',
|
|
488
|
-
annotations: {
|
|
489
|
-
readOnlyHint: false,
|
|
490
|
-
destructiveHint: false,
|
|
491
|
-
openWorldHint: false,
|
|
492
|
-
},
|
|
493
|
-
inputSchema: {
|
|
494
|
-
type: 'object',
|
|
495
|
-
properties: {
|
|
496
|
-
action: {
|
|
497
|
-
type: 'string',
|
|
498
|
-
enum: ['store', 'retrieve', 'check'],
|
|
499
|
-
description: 'Action to perform: "store" (save context), "retrieve" (get stored context), or "check" (view status)',
|
|
500
|
-
},
|
|
501
|
-
category: {
|
|
502
|
-
type: 'string',
|
|
503
|
-
enum: ['architecture', 'requirements', 'constraints', 'decisions', 'technical-patterns', 'project-metadata'],
|
|
504
|
-
description: 'Context category (required for store, optional for retrieve)',
|
|
505
|
-
},
|
|
506
|
-
content: {
|
|
507
|
-
type: 'string',
|
|
508
|
-
description: 'Content to store (required for store action)',
|
|
509
|
-
},
|
|
510
|
-
search_term: {
|
|
511
|
-
type: 'string',
|
|
512
|
-
description: 'Search term for retrieving context (optional)',
|
|
513
|
-
},
|
|
514
|
-
include_metadata: {
|
|
515
|
-
type: 'boolean',
|
|
516
|
-
description: 'Include usage metadata in response (for check action, default: false)',
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
required: ['action'],
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
handler: preserveContext,
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
definition: checkVersionsTool,
|
|
526
|
-
handler: handleCheckVersions
|
|
527
|
-
}
|
|
528
|
-
];
|
|
529
|
-
logger.info(`Prepared ${tools.length} MCP tools`);
|
|
530
|
-
return tools;
|
|
531
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools - Main Export
|
|
3
|
+
*
|
|
4
|
+
* This module provides two modes:
|
|
5
|
+
* 1. SIMPLE MODE (default): 5 primary tools that bundle all functionality
|
|
6
|
+
* 2. FULL MODE: All 30 granular tools for power users
|
|
7
|
+
*
|
|
8
|
+
* Set MCP_TOOL_MODE=full in environment for full mode
|
|
9
|
+
*/
|
|
10
|
+
// Re-export the primary tools setup as default
|
|
11
|
+
export { setupTools } from './primary-tools.js';
|
|
12
|
+
// Also export granular tools for internal use
|
|
13
|
+
export { saveCheckpoint, getCheckpoints } from './checkpoint.js';
|
|
14
|
+
export { saveInsight, getInsights, getUserContext } from './insight.js';
|
|
15
|
+
export { sendMessage } from './sendMessage.js';
|
|
16
|
+
export { createSession, resumeSession } from './session.js';
|
|
17
|
+
export { endSession } from './session-manager.js';
|
|
18
|
+
export { preserveContext, storeContext, retrieveContext } from './preserve-context.js';
|
|
19
|
+
export { handleComprehensiveCodeReview } from './comprehensive-code-review.js';
|
|
20
|
+
export { handleComprehensivePackageAudit } from './comprehensive-package-audit.js';
|
|
21
|
+
export { handleSmartContext } from './smart-context.js';
|
|
22
|
+
export { handlePreventAIErrors } from './prevent-ai-errors.js';
|
|
23
|
+
export { handleDetectBuildContext } from './detect-build-context.js';
|
|
24
|
+
export { handleGenerateUpgradeReport } from './generate-upgrade-report.js';
|
|
25
|
+
export { handleScanSecurity } from './scan-security.js';
|
|
26
|
+
export { handlePreReviewCode } from './pre-review-code.js';
|
|
27
|
+
export { handleDetectCodeSmell } from './detect-code-smell.js';
|
|
28
|
+
export { handleValidatePackages } from './validate_packages.js';
|
|
29
|
+
export { handleCheckVersions } from './check-versions.js';
|
|
532
30
|
//# sourceMappingURL=index.js.map
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,+CAA+C;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,8CAA8C;AAC9C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/tools/insight.d.ts
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
import { type SaveInsightInput, type GetUserContextInput } from '../types/insight.js';
|
|
2
|
+
export interface RecentSession {
|
|
3
|
+
id: string;
|
|
4
|
+
status: string;
|
|
5
|
+
started_at: Date;
|
|
6
|
+
completed_at: Date | null;
|
|
7
|
+
journey_id: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare function saveInsight(args: SaveInsightInput): Promise<{
|
|
2
10
|
error: string;
|
|
3
11
|
details?: any;
|
|
4
12
|
} | {
|
|
5
|
-
|
|
13
|
+
success: boolean;
|
|
6
14
|
message: string;
|
|
7
15
|
}>;
|
|
8
|
-
export declare function getInsights(args:
|
|
16
|
+
export declare function getInsights(args: {
|
|
17
|
+
session_id?: string;
|
|
18
|
+
limit?: number;
|
|
19
|
+
auth?: Record<string, unknown>;
|
|
20
|
+
}): Promise<{
|
|
9
21
|
error: string;
|
|
10
22
|
details?: any;
|
|
11
23
|
} | {
|
|
@@ -19,7 +31,7 @@ export declare function getInsights(args: any): Promise<{
|
|
|
19
31
|
}[];
|
|
20
32
|
count: number;
|
|
21
33
|
}>;
|
|
22
|
-
export declare function getUserContext(args:
|
|
34
|
+
export declare function getUserContext(args: GetUserContextInput): Promise<{
|
|
23
35
|
error: string;
|
|
24
36
|
details?: any;
|
|
25
37
|
} | {
|
|
@@ -46,8 +58,15 @@ export declare function getUserContext(args: any): Promise<{
|
|
|
46
58
|
} | null;
|
|
47
59
|
created_at: Date;
|
|
48
60
|
};
|
|
49
|
-
recent_insights:
|
|
50
|
-
|
|
61
|
+
recent_insights: {
|
|
62
|
+
id: string;
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
tags: string[];
|
|
65
|
+
userId: string;
|
|
66
|
+
sessionId: string | null;
|
|
67
|
+
content: string;
|
|
68
|
+
}[];
|
|
69
|
+
recent_sessions: RecentSession[];
|
|
51
70
|
active_session: {
|
|
52
71
|
id: string;
|
|
53
72
|
updatedAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insight.d.ts","sourceRoot":"","sources":["../../src/tools/insight.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"insight.d.ts","sourceRoot":"","sources":["../../src/tools/insight.ts"],"names":[],"mappings":"AAGA,OAAO,EAA2C,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAO/H,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,IAAI,CAAC;IACjB,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,gBAAgB;;;;;;GA6DvD;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE;;;;;;;;;;;;;GA6D9G;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoF7D"}
|
package/dist/tools/insight.js
CHANGED
|
@@ -46,8 +46,9 @@ export async function saveInsight(args) {
|
|
|
46
46
|
.returning();
|
|
47
47
|
const insight = insightResult[0];
|
|
48
48
|
logger.info(`Saved insight: ${insight.id}`);
|
|
49
|
+
// Return sanitized response (no internal IDs)
|
|
49
50
|
return {
|
|
50
|
-
|
|
51
|
+
success: true,
|
|
51
52
|
message: 'Insight captured successfully.',
|
|
52
53
|
};
|
|
53
54
|
}
|