couchloop-eq-mcp 1.3.3 → 1.4.1
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 +4 -2
- package/dist/clients/shrinkChatClient.d.ts +10 -10
- package/dist/clients/shrinkChatClient.d.ts.map +1 -1
- package/dist/clients/shrinkChatClient.js +5 -3
- package/dist/clients/shrinkChatClient.js.map +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +6 -3
- package/dist/db/client.js.map +1 -1
- package/dist/index.js +5 -85
- package/dist/index.js.map +1 -1
- package/dist/server/sse.d.ts.map +1 -1
- package/dist/server/sse.js +4 -2
- package/dist/server/sse.js.map +1 -1
- package/dist/tools/Hallucinated Packages Corpus from Claude.d.ts +72 -0
- package/dist/tools/Hallucinated Packages Corpus from Claude.d.ts.map +1 -0
- package/dist/tools/Hallucinated Packages Corpus from Claude.js +447 -0
- package/dist/tools/Hallucinated Packages Corpus from Claude.js.map +1 -0
- package/dist/tools/MCP Usage Takeaways.guard.d.ts +4 -0
- package/dist/tools/MCP Usage Takeaways.guard.d.ts.map +1 -0
- package/dist/tools/MCP Usage Takeaways.guard.js +343 -0
- package/dist/tools/MCP Usage Takeaways.guard.js.map +1 -0
- package/dist/tools/checkpoint.d.ts.map +1 -1
- package/dist/tools/checkpoint.js +4 -20
- package/dist/tools/checkpoint.js.map +1 -1
- package/dist/tools/detect-build-context.d.ts +1 -1
- package/dist/tools/generate-upgrade-report.d.ts +2 -2
- package/dist/tools/guard.d.ts +120 -0
- package/dist/tools/guard.d.ts.map +1 -0
- package/dist/tools/guard.js +345 -0
- package/dist/tools/guard.js.map +1 -0
- package/dist/tools/hallucinated-packages-corpus.d.ts +7 -0
- package/dist/tools/hallucinated-packages-corpus.d.ts.map +1 -0
- package/dist/tools/hallucinated-packages-corpus.js +7 -0
- package/dist/tools/hallucinated-packages-corpus.js.map +1 -0
- package/dist/tools/intent-router.d.ts +20 -24
- package/dist/tools/intent-router.d.ts.map +1 -1
- package/dist/tools/intent-router.js +39 -7
- package/dist/tools/intent-router.js.map +1 -1
- package/dist/tools/pre-review-code.d.ts +2 -2
- package/dist/tools/prevent-ai-errors.d.ts +3 -3
- package/dist/tools/primary-tools.d.ts +84 -275
- package/dist/tools/primary-tools.d.ts.map +1 -1
- package/dist/tools/primary-tools.js +52 -9
- package/dist/tools/primary-tools.js.map +1 -1
- package/dist/tools/protect-files.d.ts +1 -1
- package/dist/tools/sendMessage.d.ts.map +1 -1
- package/dist/tools/sendMessage.js +17 -34
- package/dist/tools/sendMessage.js.map +1 -1
- package/dist/tools/session-manager.d.ts +5 -1
- package/dist/tools/session-manager.d.ts.map +1 -1
- package/dist/tools/session-manager.js +23 -19
- package/dist/tools/session-manager.js.map +1 -1
- package/dist/tools/smart-context.d.ts +1 -1
- package/dist/tools/verify.d.ts +5 -5
- package/dist/types/session.d.ts +2 -2
- package/package.json +9 -2
- package/assets/screenshots/checkpoint_session.png +0 -0
- package/assets/screenshots/code_review_workflow.png +0 -0
- package/assets/screenshots/insight_retrieve.png +0 -0
- package/assets/screenshots/insight_save.png +0 -0
- package/assets/screenshots/save_insights.png +0 -0
|
@@ -48,8 +48,8 @@ export declare function handlePreventAIErrors(args: unknown): Promise<{
|
|
|
48
48
|
errors: {
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
-
impact: "medium" | "
|
|
52
|
-
category: "
|
|
51
|
+
impact: "medium" | "critical" | "high" | "low";
|
|
52
|
+
category: "build" | "syntax" | "logic" | "security" | "performance" | "architecture";
|
|
53
53
|
description: string;
|
|
54
54
|
locations: {
|
|
55
55
|
line: number;
|
|
@@ -62,7 +62,7 @@ export declare function handlePreventAIErrors(args: unknown): Promise<{
|
|
|
62
62
|
warnings: string[];
|
|
63
63
|
prevented_errors: string[];
|
|
64
64
|
build_context: {
|
|
65
|
-
language: "
|
|
65
|
+
language: "javascript" | "typescript" | "python" | "java" | "unknown";
|
|
66
66
|
module_system: "commonjs" | "esm" | "umd" | "amd" | undefined;
|
|
67
67
|
package_manager: "npm" | "yarn" | "pnpm" | "pip" | "maven" | "gradle" | undefined;
|
|
68
68
|
requires_js_extensions: boolean;
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* This module exports only the PRIMARY tools that users should see.
|
|
5
5
|
* All granular tools are internal engines used by these primary tools.
|
|
6
6
|
*
|
|
7
|
-
* PUBLIC TOOLS (
|
|
7
|
+
* PUBLIC TOOLS (10):
|
|
8
8
|
* 0. couchloop - Intent router (discoverability layer for loose commands)
|
|
9
|
-
* 1.
|
|
9
|
+
* 1. guard - Invisible per-turn governance (called automatically by companion skill)
|
|
10
|
+
* 2. verify - Pre-delivery verification (catches AI hallucinations, validates packages)
|
|
10
11
|
* 2. status - Dashboard (session progress, history, context, protection)
|
|
11
12
|
* 3. conversation - AI conversation with guided journeys and session memory
|
|
12
13
|
* 4. brainstorm - Dev thinking partner (reflective questioning, architecture, trade-offs)
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
import { handleComprehensiveCodeReview } from './comprehensive-code-review.js';
|
|
19
20
|
import { handleComprehensivePackageAudit } from './comprehensive-package-audit.js';
|
|
20
21
|
import { handleSmartContext } from './smart-context.js';
|
|
22
|
+
import { type PolicyContext } from '../policy/index.js';
|
|
21
23
|
export declare function setupTools(): Promise<({
|
|
22
24
|
definition: {
|
|
23
25
|
name: string;
|
|
@@ -56,10 +58,8 @@ export declare function setupTools(): Promise<({
|
|
|
56
58
|
examples?: undefined;
|
|
57
59
|
classification?: undefined;
|
|
58
60
|
registeredTools?: undefined;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
result?: undefined;
|
|
62
|
-
args_passed?: undefined;
|
|
61
|
+
success?: undefined;
|
|
62
|
+
routing_confidence?: undefined;
|
|
63
63
|
} | {
|
|
64
64
|
routed_to: string;
|
|
65
65
|
message: string;
|
|
@@ -79,10 +79,8 @@ export declare function setupTools(): Promise<({
|
|
|
79
79
|
error?: undefined;
|
|
80
80
|
classification?: undefined;
|
|
81
81
|
registeredTools?: undefined;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
result?: undefined;
|
|
85
|
-
args_passed?: undefined;
|
|
82
|
+
success?: undefined;
|
|
83
|
+
routing_confidence?: undefined;
|
|
86
84
|
} | {
|
|
87
85
|
error: string;
|
|
88
86
|
classification: import("./intent-router.js").ClassificationResult;
|
|
@@ -92,10 +90,8 @@ export declare function setupTools(): Promise<({
|
|
|
92
90
|
message?: undefined;
|
|
93
91
|
tools?: undefined;
|
|
94
92
|
examples?: undefined;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
result?: undefined;
|
|
98
|
-
args_passed?: undefined;
|
|
93
|
+
success?: undefined;
|
|
94
|
+
routing_confidence?: undefined;
|
|
99
95
|
} | {
|
|
100
96
|
routed_to: string;
|
|
101
97
|
message: string;
|
|
@@ -105,38 +101,41 @@ export declare function setupTools(): Promise<({
|
|
|
105
101
|
examples?: undefined;
|
|
106
102
|
classification?: undefined;
|
|
107
103
|
registeredTools?: undefined;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
result?: undefined;
|
|
111
|
-
args_passed?: undefined;
|
|
104
|
+
success?: undefined;
|
|
105
|
+
routing_confidence?: undefined;
|
|
112
106
|
} | {
|
|
107
|
+
policy_trace: import("../policy/types.js").PolicyDecisionTrace;
|
|
108
|
+
error?: string | undefined;
|
|
109
|
+
verify_result?: {} | null | undefined;
|
|
110
|
+
requires_approval?: boolean | undefined;
|
|
111
|
+
blocked?: boolean | undefined;
|
|
112
|
+
partial?: boolean | undefined;
|
|
113
113
|
routed_to: string;
|
|
114
114
|
action: string | undefined;
|
|
115
|
-
|
|
115
|
+
routing_confidence: number;
|
|
116
|
+
success: boolean;
|
|
117
|
+
tool: import("../policy/types.js").PublicToolName;
|
|
116
118
|
result: unknown;
|
|
117
|
-
error?: undefined;
|
|
118
119
|
hint?: undefined;
|
|
119
120
|
message?: undefined;
|
|
120
121
|
tools?: undefined;
|
|
121
122
|
examples?: undefined;
|
|
122
123
|
classification?: undefined;
|
|
123
124
|
registeredTools?: undefined;
|
|
124
|
-
args_passed?: undefined;
|
|
125
125
|
} | {
|
|
126
|
+
success: boolean;
|
|
126
127
|
routed_to: string;
|
|
127
128
|
error: string;
|
|
128
|
-
|
|
129
|
-
args_passed: Record<string, unknown>;
|
|
129
|
+
routing_confidence: number;
|
|
130
130
|
hint?: undefined;
|
|
131
131
|
message?: undefined;
|
|
132
132
|
tools?: undefined;
|
|
133
133
|
examples?: undefined;
|
|
134
|
+
classification?: undefined;
|
|
134
135
|
registeredTools?: undefined;
|
|
135
|
-
action?: undefined;
|
|
136
|
-
confidence?: undefined;
|
|
137
|
-
result?: undefined;
|
|
138
136
|
}>;
|
|
139
137
|
} | {
|
|
138
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
140
139
|
definition: {
|
|
141
140
|
name: string;
|
|
142
141
|
description: string;
|
|
@@ -175,8 +174,8 @@ export declare function setupTools(): Promise<({
|
|
|
175
174
|
required: string[];
|
|
176
175
|
};
|
|
177
176
|
};
|
|
178
|
-
handler: typeof import("./verify.js").handleVerify;
|
|
179
177
|
} | {
|
|
178
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
180
179
|
definition: {
|
|
181
180
|
name: string;
|
|
182
181
|
description: string;
|
|
@@ -202,8 +201,61 @@ export declare function setupTools(): Promise<({
|
|
|
202
201
|
required: string[];
|
|
203
202
|
};
|
|
204
203
|
};
|
|
205
|
-
handler: typeof import("./status.js").handleStatus;
|
|
206
204
|
} | {
|
|
205
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
206
|
+
definition: {
|
|
207
|
+
readonly name: "guard";
|
|
208
|
+
readonly description: string;
|
|
209
|
+
readonly annotations: {
|
|
210
|
+
readonly readOnlyHint: true;
|
|
211
|
+
readonly destructiveHint: false;
|
|
212
|
+
readonly idempotentHint: true;
|
|
213
|
+
readonly openWorldHint: false;
|
|
214
|
+
};
|
|
215
|
+
readonly inputSchema: {
|
|
216
|
+
readonly type: "object";
|
|
217
|
+
readonly properties: {
|
|
218
|
+
readonly response: {
|
|
219
|
+
readonly type: "string";
|
|
220
|
+
readonly description: "Draft response to evaluate";
|
|
221
|
+
};
|
|
222
|
+
readonly conversation: {
|
|
223
|
+
readonly type: "array";
|
|
224
|
+
readonly items: {
|
|
225
|
+
readonly type: "object";
|
|
226
|
+
readonly properties: {
|
|
227
|
+
readonly role: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly enum: readonly ["user", "assistant"];
|
|
230
|
+
};
|
|
231
|
+
readonly content: {
|
|
232
|
+
readonly type: "string";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly required: readonly ["role", "content"];
|
|
236
|
+
};
|
|
237
|
+
readonly description: "Recent conversation history";
|
|
238
|
+
};
|
|
239
|
+
readonly domain: {
|
|
240
|
+
readonly type: "string";
|
|
241
|
+
readonly enum: readonly ["dev", "clinical", "auto"];
|
|
242
|
+
readonly description: "Governance domain. 'auto' detects from context.";
|
|
243
|
+
};
|
|
244
|
+
readonly session_id: {
|
|
245
|
+
readonly type: "string";
|
|
246
|
+
readonly description: "Session ID for audit trail";
|
|
247
|
+
};
|
|
248
|
+
readonly mode: {
|
|
249
|
+
readonly type: "string";
|
|
250
|
+
readonly enum: readonly ["enforce", "shadow", "bypass"];
|
|
251
|
+
readonly description: "Governance mode";
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
readonly required: readonly ["response"];
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
} | {
|
|
258
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
207
259
|
definition: {
|
|
208
260
|
name: string;
|
|
209
261
|
description: string;
|
|
@@ -228,8 +280,8 @@ export declare function setupTools(): Promise<({
|
|
|
228
280
|
required: string[];
|
|
229
281
|
};
|
|
230
282
|
};
|
|
231
|
-
handler: (args: Record<string, unknown>) => Promise<unknown>;
|
|
232
283
|
} | {
|
|
284
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
233
285
|
definition: {
|
|
234
286
|
name: string;
|
|
235
287
|
description: string;
|
|
@@ -258,8 +310,8 @@ export declare function setupTools(): Promise<({
|
|
|
258
310
|
required: string[];
|
|
259
311
|
};
|
|
260
312
|
};
|
|
261
|
-
handler: typeof handleComprehensiveCodeReview;
|
|
262
313
|
} | {
|
|
314
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
263
315
|
definition: {
|
|
264
316
|
name: string;
|
|
265
317
|
description: string;
|
|
@@ -288,8 +340,8 @@ export declare function setupTools(): Promise<({
|
|
|
288
340
|
required: string[];
|
|
289
341
|
};
|
|
290
342
|
};
|
|
291
|
-
handler: typeof handleComprehensivePackageAudit;
|
|
292
343
|
} | {
|
|
344
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
293
345
|
definition: {
|
|
294
346
|
name: string;
|
|
295
347
|
description: string;
|
|
@@ -331,113 +383,8 @@ export declare function setupTools(): Promise<({
|
|
|
331
383
|
required: string[];
|
|
332
384
|
};
|
|
333
385
|
};
|
|
334
|
-
handler: (args: Record<string, unknown>) => Promise<{
|
|
335
|
-
error: string;
|
|
336
|
-
details?: Record<string, unknown>;
|
|
337
|
-
} | {
|
|
338
|
-
insights: {
|
|
339
|
-
id: string;
|
|
340
|
-
createdAt: Date;
|
|
341
|
-
tags: string[];
|
|
342
|
-
userId: string;
|
|
343
|
-
sessionId: string | null;
|
|
344
|
-
content: string;
|
|
345
|
-
}[];
|
|
346
|
-
count: number;
|
|
347
|
-
} | {
|
|
348
|
-
success: boolean;
|
|
349
|
-
type: "checkpoint" | "pattern" | "conversation" | "insight" | "decision" | "requirement" | "constraint";
|
|
350
|
-
message: string;
|
|
351
|
-
error?: undefined;
|
|
352
|
-
} | {
|
|
353
|
-
success: boolean;
|
|
354
|
-
error: string;
|
|
355
|
-
type?: undefined;
|
|
356
|
-
message?: undefined;
|
|
357
|
-
} | {
|
|
358
|
-
checkpoints: {
|
|
359
|
-
error: string;
|
|
360
|
-
details?: Record<string, unknown>;
|
|
361
|
-
} | {
|
|
362
|
-
session_id: string;
|
|
363
|
-
session_created: boolean;
|
|
364
|
-
checkpoints: {
|
|
365
|
-
key: string;
|
|
366
|
-
id: string;
|
|
367
|
-
createdAt: Date;
|
|
368
|
-
sessionId: string;
|
|
369
|
-
stepId: string;
|
|
370
|
-
value: unknown;
|
|
371
|
-
}[];
|
|
372
|
-
count: number;
|
|
373
|
-
};
|
|
374
|
-
insights: {
|
|
375
|
-
error: string;
|
|
376
|
-
details?: Record<string, unknown>;
|
|
377
|
-
} | {
|
|
378
|
-
insights: {
|
|
379
|
-
id: string;
|
|
380
|
-
createdAt: Date;
|
|
381
|
-
tags: string[];
|
|
382
|
-
userId: string;
|
|
383
|
-
sessionId: string | null;
|
|
384
|
-
content: string;
|
|
385
|
-
}[];
|
|
386
|
-
count: number;
|
|
387
|
-
};
|
|
388
|
-
user_context: {
|
|
389
|
-
error: string;
|
|
390
|
-
details?: Record<string, unknown>;
|
|
391
|
-
} | {
|
|
392
|
-
user: {
|
|
393
|
-
id: string;
|
|
394
|
-
externalId: string;
|
|
395
|
-
isTestAccount: boolean;
|
|
396
|
-
createdAt: Date;
|
|
397
|
-
updatedAt: Date;
|
|
398
|
-
preferences: {
|
|
399
|
-
timezone?: string;
|
|
400
|
-
preferredJourneyLength?: "short" | "medium" | "long";
|
|
401
|
-
} | null;
|
|
402
|
-
} | undefined;
|
|
403
|
-
recent_insights: never[];
|
|
404
|
-
recent_sessions: never[];
|
|
405
|
-
active_session: null;
|
|
406
|
-
} | {
|
|
407
|
-
user: {
|
|
408
|
-
id: string;
|
|
409
|
-
preferences: {
|
|
410
|
-
timezone?: string;
|
|
411
|
-
preferredJourneyLength?: "short" | "medium" | "long";
|
|
412
|
-
} | null;
|
|
413
|
-
created_at: Date;
|
|
414
|
-
};
|
|
415
|
-
recent_insights: {
|
|
416
|
-
id: string;
|
|
417
|
-
createdAt: Date;
|
|
418
|
-
tags: string[];
|
|
419
|
-
userId: string;
|
|
420
|
-
sessionId: string | null;
|
|
421
|
-
content: string;
|
|
422
|
-
}[];
|
|
423
|
-
recent_sessions: import("./insight.js").RecentSession[];
|
|
424
|
-
active_session: {
|
|
425
|
-
id: string;
|
|
426
|
-
updatedAt: Date;
|
|
427
|
-
userId: string;
|
|
428
|
-
journeyId: string | null;
|
|
429
|
-
status: "active" | "paused" | "completed" | "abandoned";
|
|
430
|
-
currentStep: number;
|
|
431
|
-
startedAt: Date;
|
|
432
|
-
lastActiveAt: Date;
|
|
433
|
-
completedAt: Date | null;
|
|
434
|
-
metadata: unknown;
|
|
435
|
-
threadId: string | null;
|
|
436
|
-
lastSyncedAt: Date | null;
|
|
437
|
-
} | undefined;
|
|
438
|
-
};
|
|
439
|
-
}>;
|
|
440
386
|
} | {
|
|
387
|
+
handler: (args: Record<string, unknown>, _routedVia?: PolicyContext["routedVia"]) => Promise<import("../policy/types.js").NormalizedToolResponse<unknown>>;
|
|
441
388
|
definition: {
|
|
442
389
|
name: string;
|
|
443
390
|
description: string;
|
|
@@ -472,144 +419,6 @@ export declare function setupTools(): Promise<({
|
|
|
472
419
|
required: string[];
|
|
473
420
|
};
|
|
474
421
|
};
|
|
475
|
-
handler: (args: Record<string, unknown>) => Promise<{
|
|
476
|
-
error: string;
|
|
477
|
-
details?: Record<string, unknown>;
|
|
478
|
-
} | {
|
|
479
|
-
success: boolean;
|
|
480
|
-
operation_id: string;
|
|
481
|
-
allowed: boolean;
|
|
482
|
-
message: string;
|
|
483
|
-
violations: import("../types/file-protection.js").ProtectionViolation[];
|
|
484
|
-
recommendation: string;
|
|
485
|
-
action_required: string;
|
|
486
|
-
requires_approval?: undefined;
|
|
487
|
-
severity?: undefined;
|
|
488
|
-
suggested_backup?: undefined;
|
|
489
|
-
reason?: undefined;
|
|
490
|
-
status?: undefined;
|
|
491
|
-
operation_details?: undefined;
|
|
492
|
-
next_steps?: undefined;
|
|
493
|
-
safety_measures?: undefined;
|
|
494
|
-
error?: undefined;
|
|
495
|
-
details?: undefined;
|
|
496
|
-
} | {
|
|
497
|
-
success: boolean;
|
|
498
|
-
operation_id: string;
|
|
499
|
-
allowed: boolean;
|
|
500
|
-
requires_approval: boolean;
|
|
501
|
-
message: string;
|
|
502
|
-
violations: import("../types/file-protection.js").ProtectionViolation[];
|
|
503
|
-
severity: "medium" | "low" | "high" | "critical";
|
|
504
|
-
recommendation: string;
|
|
505
|
-
suggested_backup: string;
|
|
506
|
-
action_required?: undefined;
|
|
507
|
-
reason?: undefined;
|
|
508
|
-
status?: undefined;
|
|
509
|
-
operation_details?: undefined;
|
|
510
|
-
next_steps?: undefined;
|
|
511
|
-
safety_measures?: undefined;
|
|
512
|
-
error?: undefined;
|
|
513
|
-
details?: undefined;
|
|
514
|
-
} | {
|
|
515
|
-
success: boolean;
|
|
516
|
-
operation_id: string;
|
|
517
|
-
message: string;
|
|
518
|
-
reason: string;
|
|
519
|
-
allowed?: undefined;
|
|
520
|
-
violations?: undefined;
|
|
521
|
-
recommendation?: undefined;
|
|
522
|
-
action_required?: undefined;
|
|
523
|
-
requires_approval?: undefined;
|
|
524
|
-
severity?: undefined;
|
|
525
|
-
suggested_backup?: undefined;
|
|
526
|
-
status?: undefined;
|
|
527
|
-
operation_details?: undefined;
|
|
528
|
-
next_steps?: undefined;
|
|
529
|
-
safety_measures?: undefined;
|
|
530
|
-
error?: undefined;
|
|
531
|
-
details?: undefined;
|
|
532
|
-
} | {
|
|
533
|
-
success: boolean;
|
|
534
|
-
operation_id: string;
|
|
535
|
-
allowed: boolean;
|
|
536
|
-
status: string;
|
|
537
|
-
message: string;
|
|
538
|
-
operation_details: {
|
|
539
|
-
type: "delete" | "overwrite" | "move";
|
|
540
|
-
path: string;
|
|
541
|
-
target_path: string | null;
|
|
542
|
-
backup_path: string | null;
|
|
543
|
-
};
|
|
544
|
-
next_steps: string[];
|
|
545
|
-
safety_measures: {
|
|
546
|
-
backup_created: boolean;
|
|
547
|
-
backup_location: string;
|
|
548
|
-
rollback_available: boolean;
|
|
549
|
-
operation_logged: boolean;
|
|
550
|
-
};
|
|
551
|
-
violations?: undefined;
|
|
552
|
-
recommendation?: undefined;
|
|
553
|
-
action_required?: undefined;
|
|
554
|
-
requires_approval?: undefined;
|
|
555
|
-
severity?: undefined;
|
|
556
|
-
suggested_backup?: undefined;
|
|
557
|
-
reason?: undefined;
|
|
558
|
-
error?: undefined;
|
|
559
|
-
details?: undefined;
|
|
560
|
-
} | {
|
|
561
|
-
success: boolean;
|
|
562
|
-
protection_status: {
|
|
563
|
-
code_freeze_mode: boolean;
|
|
564
|
-
protected_patterns: string[];
|
|
565
|
-
forbidden_paths: string[];
|
|
566
|
-
critical_system_files: string[];
|
|
567
|
-
};
|
|
568
|
-
backup_stats: {
|
|
569
|
-
total_backups: number;
|
|
570
|
-
total_size_mb: number;
|
|
571
|
-
oldest_backup: Date | undefined;
|
|
572
|
-
newest_backup: Date | undefined;
|
|
573
|
-
disk_usage_percent: number;
|
|
574
|
-
};
|
|
575
|
-
protection_report: {
|
|
576
|
-
code_freeze_enabled: boolean;
|
|
577
|
-
operations_logged: number;
|
|
578
|
-
protected_items_count: number;
|
|
579
|
-
recent_violations_count: number;
|
|
580
|
-
};
|
|
581
|
-
} | {
|
|
582
|
-
success: boolean;
|
|
583
|
-
backup_count: number;
|
|
584
|
-
backups: {
|
|
585
|
-
id: string;
|
|
586
|
-
original_path: string;
|
|
587
|
-
backup_path: string;
|
|
588
|
-
timestamp: Date;
|
|
589
|
-
file_size_kb: number;
|
|
590
|
-
operation: "delete" | "overwrite" | "move";
|
|
591
|
-
reason: string | null;
|
|
592
|
-
}[];
|
|
593
|
-
} | {
|
|
594
|
-
success: boolean;
|
|
595
|
-
message: string;
|
|
596
|
-
backup_id: {};
|
|
597
|
-
restored_path?: undefined;
|
|
598
|
-
backup_path?: undefined;
|
|
599
|
-
timestamp?: undefined;
|
|
600
|
-
} | {
|
|
601
|
-
success: boolean;
|
|
602
|
-
message: string;
|
|
603
|
-
restored_path: string;
|
|
604
|
-
backup_id: {};
|
|
605
|
-
backup_path: string;
|
|
606
|
-
timestamp: Date;
|
|
607
|
-
} | {
|
|
608
|
-
success: boolean;
|
|
609
|
-
message: string;
|
|
610
|
-
status: string;
|
|
611
|
-
effect: string;
|
|
612
|
-
}>;
|
|
613
422
|
})[]>;
|
|
614
423
|
export { handleComprehensiveCodeReview, handleComprehensivePackageAudit, handleSmartContext, };
|
|
615
424
|
//# sourceMappingURL=primary-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primary-tools.d.ts","sourceRoot":"","sources":["../../src/tools/primary-tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"primary-tools.d.ts","sourceRoot":"","sources":["../../src/tools/primary-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,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;AAexD,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAiY3E,wBAAsB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAZV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAhE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,aAAa,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiDrF;AAGD,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,kBAAkB,GACnB,CAAC"}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* This module exports only the PRIMARY tools that users should see.
|
|
5
5
|
* All granular tools are internal engines used by these primary tools.
|
|
6
6
|
*
|
|
7
|
-
* PUBLIC TOOLS (
|
|
7
|
+
* PUBLIC TOOLS (10):
|
|
8
8
|
* 0. couchloop - Intent router (discoverability layer for loose commands)
|
|
9
|
-
* 1.
|
|
9
|
+
* 1. guard - Invisible per-turn governance (called automatically by companion skill)
|
|
10
|
+
* 2. verify - Pre-delivery verification (catches AI hallucinations, validates packages)
|
|
10
11
|
* 2. status - Dashboard (session progress, history, context, protection)
|
|
11
12
|
* 3. conversation - AI conversation with guided journeys and session memory
|
|
12
13
|
* 4. brainstorm - Dev thinking partner (reflective questioning, architecture, trade-offs)
|
|
@@ -28,6 +29,8 @@ import { getCheckpoints } from './checkpoint.js';
|
|
|
28
29
|
import { getInsights, getUserContext } from './insight.js';
|
|
29
30
|
import { verifyTool } from './verify.js';
|
|
30
31
|
import { statusTool } from './status.js';
|
|
32
|
+
import { guardTool } from './guard.js';
|
|
33
|
+
import { runToolWithPolicy } from '../policy/index.js';
|
|
31
34
|
import { logger } from '../utils/logger.js';
|
|
32
35
|
// ============================================================
|
|
33
36
|
// PRIMARY TOOL DEFINITIONS
|
|
@@ -331,6 +334,14 @@ const protectTool = {
|
|
|
331
334
|
},
|
|
332
335
|
handler: async (args) => {
|
|
333
336
|
const action = args.action;
|
|
337
|
+
// path is required for check and backup — validate before delegating
|
|
338
|
+
if ((action === 'check' || action === 'backup') && !args.path) {
|
|
339
|
+
return {
|
|
340
|
+
success: false,
|
|
341
|
+
error: `path is required for action='${action}'`,
|
|
342
|
+
action,
|
|
343
|
+
};
|
|
344
|
+
}
|
|
334
345
|
switch (action) {
|
|
335
346
|
case 'check':
|
|
336
347
|
return protectFiles({
|
|
@@ -361,21 +372,53 @@ const protectTool = {
|
|
|
361
372
|
// ============================================================
|
|
362
373
|
// EXPORT ONLY PRIMARY TOOLS
|
|
363
374
|
// ============================================================
|
|
375
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
376
|
+
// Policy wrapper helpers
|
|
377
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
378
|
+
/**
|
|
379
|
+
* Wrap a tool handler so every call goes through:
|
|
380
|
+
* execute → sanitize → verify-if-required → normalize → log
|
|
381
|
+
*
|
|
382
|
+
* The wrapped handler is used for BOTH direct MCP calls and intent-router
|
|
383
|
+
* (couchloop) delegated calls, since registerTools() stores references to
|
|
384
|
+
* these same handler functions.
|
|
385
|
+
*/
|
|
386
|
+
function withPolicy(toolName, handler, routedVia = 'direct') {
|
|
387
|
+
return async (args, _routedVia) => {
|
|
388
|
+
const via = _routedVia ?? routedVia;
|
|
389
|
+
const ctx = {
|
|
390
|
+
toolName,
|
|
391
|
+
routedVia: via,
|
|
392
|
+
sessionId: typeof args.session_id === 'string' ? args.session_id : undefined,
|
|
393
|
+
startedAt: Date.now(),
|
|
394
|
+
};
|
|
395
|
+
return runToolWithPolicy(ctx, args, handler);
|
|
396
|
+
};
|
|
397
|
+
}
|
|
364
398
|
export async function setupTools() {
|
|
365
|
-
// Domain-specific tools
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
399
|
+
// Domain-specific tools — handlers wrapped with the policy layer.
|
|
400
|
+
// The same wrapped handlers are registered in the intent router so that
|
|
401
|
+
// couchloop-routed calls go through the same policy path as direct calls.
|
|
402
|
+
const rawDomainTools = [
|
|
403
|
+
guardTool,
|
|
404
|
+
verifyTool,
|
|
405
|
+
statusTool,
|
|
369
406
|
conversationTool,
|
|
370
|
-
brainstormTool,
|
|
407
|
+
brainstormTool,
|
|
371
408
|
codeReviewTool,
|
|
372
409
|
packageAuditTool,
|
|
373
410
|
rememberTool,
|
|
374
411
|
protectTool,
|
|
375
412
|
];
|
|
376
|
-
|
|
413
|
+
const domainTools = rawDomainTools.map((tool) => ({
|
|
414
|
+
...tool,
|
|
415
|
+
handler: withPolicy(tool.definition.name, tool.handler),
|
|
416
|
+
}));
|
|
417
|
+
// Register wrapped domain tools with the intent router.
|
|
418
|
+
// Couchloop delegates to these handlers; routedVia will be overridden
|
|
419
|
+
// inside the couchloop handler by passing 'couchloop' explicitly.
|
|
377
420
|
registerTools(domainTools);
|
|
378
|
-
// Intent router (couchloop) goes FIRST for maximum discoverability
|
|
421
|
+
// Intent router (couchloop) goes FIRST for maximum discoverability.
|
|
379
422
|
const tools = [
|
|
380
423
|
intentRouterTool,
|
|
381
424
|
...domainTools,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primary-tools.js","sourceRoot":"","sources":["../../src/tools/primary-tools.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"primary-tools.js","sourceRoot":"","sources":["../../src/tools/primary-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACrE,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,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,EACL,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAsB,MAAM,oBA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I;QACP,OAAO,EAAE,UAAU,CACjB,IAAI,CAAC,UAAU,CAAC,IAA2D,EAC3E,IAAI,CAAC,OAA8D,CACpE;KACF,CAAC,CAAC,CAAC;IAEJ,wDAAwD;IACxD,sEAAsE;IACtE,kEAAkE;IAClE,aAAa,CAAC,WAAW,CAAC,CAAC;IAE3B,oEAAoE;IACpE,MAAM,KAAK,GAAG;QACZ,gBAAgB;QAChB,GAAG,WAAW;KACf,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,MAAM,8CAA8C,CAAC,CAAC;IACpF,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+BAA+B;AAC/B,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,kBAAkB,GACnB,CAAC"}
|
|
@@ -31,7 +31,7 @@ export declare function protectFiles(args: unknown): Promise<{
|
|
|
31
31
|
requires_approval: boolean;
|
|
32
32
|
message: string;
|
|
33
33
|
violations: import("../types/file-protection.js").ProtectionViolation[];
|
|
34
|
-
severity: "medium" | "
|
|
34
|
+
severity: "medium" | "critical" | "high" | "low";
|
|
35
35
|
recommendation: string;
|
|
36
36
|
suggested_backup: string;
|
|
37
37
|
action_required?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendMessage.d.ts","sourceRoot":"","sources":["../../src/tools/sendMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sendMessage.d.ts","sourceRoot":"","sources":["../../src/tools/sendMessage.ts"],"names":[],"mappings":"AAqEA;;;GAGG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,OAAO,oBAE9C"}
|