couchloop-eq-mcp 1.1.4 → 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/dist/clients/shrinkChatClient.d.ts +4 -4
- package/dist/index.js +80 -5
- package/dist/index.js.map +1 -1
- package/dist/tools/check-versions.d.ts +7 -7
- package/dist/tools/checkpoint.d.ts +2 -19
- package/dist/tools/checkpoint.d.ts.map +1 -1
- package/dist/tools/checkpoint.js +68 -2
- 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 -1018
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +29 -554
- 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.map +1 -1
- package/dist/tools/sendMessage.js +10 -7
- package/dist/tools/sendMessage.js.map +1 -1
- 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/types/checkpoint.d.ts +26 -1
- package/dist/types/checkpoint.d.ts.map +1 -1
- package/dist/types/checkpoint.js +17 -0
- 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 +1 -1
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool: smart_context
|
|
3
|
+
*
|
|
4
|
+
* Intelligent context management that bundles:
|
|
5
|
+
* - Save checkpoint (progress capture)
|
|
6
|
+
* - Save insight (meaningful realizations)
|
|
7
|
+
* - Preserve context (project knowledge)
|
|
8
|
+
* - Build context detection (understand project setup)
|
|
9
|
+
*
|
|
10
|
+
* One call to capture everything important from a conversation.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { saveCheckpoint } from './checkpoint.js';
|
|
14
|
+
import { saveInsight } from './insight.js';
|
|
15
|
+
import { storeContext } from './preserve-context.js';
|
|
16
|
+
import { handleDetectBuildContext } from './detect-build-context.js';
|
|
17
|
+
import { logger } from '../utils/logger.js';
|
|
18
|
+
const SmartContextInputSchema = z.object({
|
|
19
|
+
// What to capture
|
|
20
|
+
content: z.string().describe('The content to capture'),
|
|
21
|
+
key: z.string().optional().describe('Key/label for the content'),
|
|
22
|
+
// Context type - determines what gets saved where
|
|
23
|
+
type: z.enum([
|
|
24
|
+
'checkpoint', // Progress in a journey
|
|
25
|
+
'insight', // User realization/learning
|
|
26
|
+
'decision', // Architectural decision
|
|
27
|
+
'requirement', // Project requirement
|
|
28
|
+
'constraint', // Technical constraint
|
|
29
|
+
'pattern', // Code pattern to remember
|
|
30
|
+
'conversation', // General conversation context
|
|
31
|
+
]).describe('Type of context being saved'),
|
|
32
|
+
// Optional enrichment
|
|
33
|
+
tags: z.array(z.string()).optional().describe('Tags for categorization'),
|
|
34
|
+
session_id: z.string().uuid().optional().describe('Session to associate with'),
|
|
35
|
+
detect_project: z.boolean().default(false).describe('Also detect and store build context'),
|
|
36
|
+
// Auth
|
|
37
|
+
auth: z.any().optional(),
|
|
38
|
+
});
|
|
39
|
+
export const smartContextTool = {
|
|
40
|
+
name: 'smart_context',
|
|
41
|
+
description: 'Intelligently capture and preserve context from conversations. Automatically routes to the right storage: checkpoints for progress, insights for realizations, context for technical decisions. One tool to remember everything important.',
|
|
42
|
+
annotations: {
|
|
43
|
+
readOnlyHint: false,
|
|
44
|
+
destructiveHint: false,
|
|
45
|
+
openWorldHint: false,
|
|
46
|
+
},
|
|
47
|
+
inputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
content: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'The content to capture',
|
|
53
|
+
},
|
|
54
|
+
key: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Key/label for the content',
|
|
57
|
+
},
|
|
58
|
+
type: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
enum: ['checkpoint', 'insight', 'decision', 'requirement', 'constraint', 'pattern', 'conversation'],
|
|
61
|
+
description: 'Type of context being saved',
|
|
62
|
+
},
|
|
63
|
+
tags: {
|
|
64
|
+
type: 'array',
|
|
65
|
+
items: { type: 'string' },
|
|
66
|
+
description: 'Tags for categorization',
|
|
67
|
+
},
|
|
68
|
+
session_id: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: 'Session to associate with',
|
|
71
|
+
},
|
|
72
|
+
detect_project: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
description: 'Also detect and store build context (default: false)',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
required: ['content', 'type'],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
export async function handleSmartContext(args) {
|
|
81
|
+
try {
|
|
82
|
+
const input = SmartContextInputSchema.parse(args);
|
|
83
|
+
const key = input.key || input.type;
|
|
84
|
+
logger.info(`Smart context capture: ${input.type}`);
|
|
85
|
+
const results = {};
|
|
86
|
+
// Route based on type
|
|
87
|
+
switch (input.type) {
|
|
88
|
+
case 'checkpoint':
|
|
89
|
+
// Save as checkpoint
|
|
90
|
+
results.checkpoint = await saveCheckpoint({
|
|
91
|
+
key,
|
|
92
|
+
value: { content: input.content, tags: input.tags },
|
|
93
|
+
session_id: input.session_id,
|
|
94
|
+
save_as_insight: false,
|
|
95
|
+
preserve_context: false,
|
|
96
|
+
auth: input.auth,
|
|
97
|
+
});
|
|
98
|
+
break;
|
|
99
|
+
case 'insight':
|
|
100
|
+
// Save as insight
|
|
101
|
+
results.insight = await saveInsight({
|
|
102
|
+
content: input.content,
|
|
103
|
+
session_id: input.session_id,
|
|
104
|
+
tags: input.tags || ['insight'],
|
|
105
|
+
auth: input.auth,
|
|
106
|
+
});
|
|
107
|
+
break;
|
|
108
|
+
case 'decision':
|
|
109
|
+
case 'requirement':
|
|
110
|
+
case 'constraint':
|
|
111
|
+
case 'pattern': {
|
|
112
|
+
// Map to context categories
|
|
113
|
+
const categoryMap = {
|
|
114
|
+
decision: 'decisions',
|
|
115
|
+
requirement: 'requirements',
|
|
116
|
+
constraint: 'constraints',
|
|
117
|
+
pattern: 'technical-patterns',
|
|
118
|
+
};
|
|
119
|
+
const category = categoryMap[input.type] || 'decisions';
|
|
120
|
+
await storeContext(category, `[${key}] ${input.content}`);
|
|
121
|
+
results.context = { category, stored: true };
|
|
122
|
+
// Also save as insight for searchability
|
|
123
|
+
results.insight = await saveInsight({
|
|
124
|
+
content: input.content,
|
|
125
|
+
session_id: input.session_id,
|
|
126
|
+
tags: [input.type, ...(input.tags || [])],
|
|
127
|
+
auth: input.auth,
|
|
128
|
+
});
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'conversation':
|
|
132
|
+
// Save to both checkpoint and context
|
|
133
|
+
if (input.session_id) {
|
|
134
|
+
results.checkpoint = await saveCheckpoint({
|
|
135
|
+
key: key || 'conversation',
|
|
136
|
+
value: { content: input.content, tags: input.tags },
|
|
137
|
+
session_id: input.session_id,
|
|
138
|
+
auth: input.auth,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// Also preserve as context
|
|
142
|
+
await storeContext('project-metadata', `[conversation] ${input.content}`);
|
|
143
|
+
results.context = { category: 'project-metadata', stored: true };
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
// Optionally detect build context
|
|
147
|
+
if (input.detect_project) {
|
|
148
|
+
results.build_context = await handleDetectBuildContext({});
|
|
149
|
+
}
|
|
150
|
+
// Log full results server-side
|
|
151
|
+
logger.debug('[SmartContext] Full results:', results);
|
|
152
|
+
// Return sanitized response
|
|
153
|
+
return {
|
|
154
|
+
success: true,
|
|
155
|
+
type: input.type,
|
|
156
|
+
message: `Context captured as ${input.type}`,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
catch (error) {
|
|
160
|
+
logger.error('Error in smart_context:', error);
|
|
161
|
+
return {
|
|
162
|
+
success: false,
|
|
163
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=smart-context.js.map
|
|
@@ -0,0 +1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C/B,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,OAAO,CAAC,CAAC;QAEtD,4BAA4B;QAC5B,OAAO;YACL,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,uBAAuB,KAAK,CAAC,IAAI,EAAE;SAC7C,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAC/C,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;SAChE,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
declare const ContextCategoryEnum: z.ZodEnum<["architecture", "requirements", "constraints", "decisions", "technical-patterns", "project-metadata"]>;
|
|
2
3
|
export declare const SaveCheckpointSchema: z.ZodObject<{
|
|
3
4
|
session_id: z.ZodOptional<z.ZodString>;
|
|
4
5
|
key: z.ZodString;
|
|
@@ -20,9 +21,17 @@ export declare const SaveCheckpointSchema: z.ZodObject<{
|
|
|
20
21
|
token?: string | undefined;
|
|
21
22
|
conversation_id?: string | undefined;
|
|
22
23
|
}>>;
|
|
24
|
+
save_as_insight: z.ZodDefault<z.ZodBoolean>;
|
|
25
|
+
insight_tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
preserve_context: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
+
context_category: z.ZodOptional<z.ZodEnum<["architecture", "requirements", "constraints", "decisions", "technical-patterns", "project-metadata"]>>;
|
|
28
|
+
governance_check: z.ZodDefault<z.ZodBoolean>;
|
|
23
29
|
}, "strip", z.ZodTypeAny, {
|
|
24
30
|
key: string;
|
|
25
31
|
advance_step: boolean;
|
|
32
|
+
save_as_insight: boolean;
|
|
33
|
+
preserve_context: boolean;
|
|
34
|
+
governance_check: boolean;
|
|
26
35
|
session_id?: string | undefined;
|
|
27
36
|
value?: any;
|
|
28
37
|
auth?: {
|
|
@@ -31,6 +40,8 @@ export declare const SaveCheckpointSchema: z.ZodObject<{
|
|
|
31
40
|
token?: string | undefined;
|
|
32
41
|
conversation_id?: string | undefined;
|
|
33
42
|
} | undefined;
|
|
43
|
+
insight_tags?: string[] | undefined;
|
|
44
|
+
context_category?: "architecture" | "requirements" | "constraints" | "decisions" | "technical-patterns" | "project-metadata" | undefined;
|
|
34
45
|
}, {
|
|
35
46
|
key: string;
|
|
36
47
|
session_id?: string | undefined;
|
|
@@ -42,14 +53,28 @@ export declare const SaveCheckpointSchema: z.ZodObject<{
|
|
|
42
53
|
conversation_id?: string | undefined;
|
|
43
54
|
} | undefined;
|
|
44
55
|
advance_step?: boolean | undefined;
|
|
56
|
+
save_as_insight?: boolean | undefined;
|
|
57
|
+
insight_tags?: string[] | undefined;
|
|
58
|
+
preserve_context?: boolean | undefined;
|
|
59
|
+
context_category?: "architecture" | "requirements" | "constraints" | "decisions" | "technical-patterns" | "project-metadata" | undefined;
|
|
60
|
+
governance_check?: boolean | undefined;
|
|
45
61
|
}>;
|
|
46
62
|
export type SaveCheckpointInput = z.infer<typeof SaveCheckpointSchema>;
|
|
63
|
+
export type ContextCategory = z.infer<typeof ContextCategoryEnum>;
|
|
47
64
|
export interface CheckpointResponse {
|
|
48
65
|
checkpoint_id: string;
|
|
49
66
|
session_id: string;
|
|
50
67
|
session_created: boolean;
|
|
51
|
-
next_step:
|
|
68
|
+
next_step: unknown | null;
|
|
52
69
|
journey_complete: boolean;
|
|
53
70
|
message: string;
|
|
71
|
+
insight_id?: string;
|
|
72
|
+
context_stored?: boolean;
|
|
73
|
+
governance_result?: {
|
|
74
|
+
allowed: boolean;
|
|
75
|
+
issues: string[];
|
|
76
|
+
confidence: number;
|
|
77
|
+
};
|
|
54
78
|
}
|
|
79
|
+
export {};
|
|
55
80
|
//# sourceMappingURL=checkpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/types/checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../src/types/checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,QAAA,MAAM,mBAAmB,mHAOvB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB/B,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElE,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
|
package/dist/types/checkpoint.js
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AuthContextSchema } from './auth.js';
|
|
3
|
+
// Context categories for preserve_context integration
|
|
4
|
+
const ContextCategoryEnum = z.enum([
|
|
5
|
+
'architecture',
|
|
6
|
+
'requirements',
|
|
7
|
+
'constraints',
|
|
8
|
+
'decisions',
|
|
9
|
+
'technical-patterns',
|
|
10
|
+
'project-metadata'
|
|
11
|
+
]);
|
|
3
12
|
export const SaveCheckpointSchema = z.object({
|
|
4
13
|
session_id: z.string().uuid().optional().describe('Active session ID (auto-created if not provided)'),
|
|
5
14
|
key: z.string().describe('What is being captured (e.g., "mood", "reflection", "gratitude")'),
|
|
6
15
|
value: z.any().describe('The captured content'),
|
|
7
16
|
advance_step: z.boolean().default(true).describe('Whether to advance to next journey step'),
|
|
8
17
|
auth: AuthContextSchema.optional().describe('Authentication context for user identification'),
|
|
18
|
+
// === Consolidated from save_insight ===
|
|
19
|
+
save_as_insight: z.boolean().default(false).describe('Also save this as a user insight'),
|
|
20
|
+
insight_tags: z.array(z.string()).optional().describe('Tags for the insight if saving as insight'),
|
|
21
|
+
// === Consolidated from preserve_context ===
|
|
22
|
+
preserve_context: z.boolean().default(false).describe('Also store as persistent project context'),
|
|
23
|
+
context_category: ContextCategoryEnum.optional().describe('Category for context preservation'),
|
|
24
|
+
// === Governance metadata ===
|
|
25
|
+
governance_check: z.boolean().default(true).describe('Run governance validation on the value'),
|
|
9
26
|
});
|
|
10
27
|
//# sourceMappingURL=checkpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint.js","sourceRoot":"","sources":["../../src/types/checkpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;IACrG,GAAG,EAAE,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AE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IACxF,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAElG,6CAA6C;IAC7C,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACjG,gBAAgB,EAAE,mBAAmB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAE9F,8BAA8B;IAC9B,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;CAC/F,CAAC,CAAC"}
|
package/dist/types/journey.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export declare const JourneyStepSchema: z.ZodObject<{
|
|
|
27
27
|
instructions?: string | undefined;
|
|
28
28
|
};
|
|
29
29
|
type: "prompt" | "checkpoint" | "summary";
|
|
30
|
-
order: number;
|
|
31
30
|
optional: boolean;
|
|
31
|
+
order: number;
|
|
32
32
|
}, {
|
|
33
33
|
id: string;
|
|
34
34
|
content: {
|
|
@@ -37,8 +37,8 @@ export declare const JourneyStepSchema: z.ZodObject<{
|
|
|
37
37
|
instructions?: string | undefined;
|
|
38
38
|
};
|
|
39
39
|
type: "prompt" | "checkpoint" | "summary";
|
|
40
|
-
order: number;
|
|
41
40
|
optional: boolean;
|
|
41
|
+
order: number;
|
|
42
42
|
}>;
|
|
43
43
|
export type JourneyStep = z.infer<typeof JourneyStepSchema>;
|
|
44
44
|
export declare const JourneySchema: z.ZodObject<{
|
|
@@ -72,8 +72,8 @@ export declare const JourneySchema: z.ZodObject<{
|
|
|
72
72
|
instructions?: string | undefined;
|
|
73
73
|
};
|
|
74
74
|
type: "prompt" | "checkpoint" | "summary";
|
|
75
|
-
order: number;
|
|
76
75
|
optional: boolean;
|
|
76
|
+
order: number;
|
|
77
77
|
}, {
|
|
78
78
|
id: string;
|
|
79
79
|
content: {
|
|
@@ -82,8 +82,8 @@ export declare const JourneySchema: z.ZodObject<{
|
|
|
82
82
|
instructions?: string | undefined;
|
|
83
83
|
};
|
|
84
84
|
type: "prompt" | "checkpoint" | "summary";
|
|
85
|
-
order: number;
|
|
86
85
|
optional: boolean;
|
|
86
|
+
order: number;
|
|
87
87
|
}>, "many">;
|
|
88
88
|
estimatedMinutes: z.ZodNumber;
|
|
89
89
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
@@ -99,8 +99,8 @@ export declare const JourneySchema: z.ZodObject<{
|
|
|
99
99
|
instructions?: string | undefined;
|
|
100
100
|
};
|
|
101
101
|
type: "prompt" | "checkpoint" | "summary";
|
|
102
|
-
order: number;
|
|
103
102
|
optional: boolean;
|
|
103
|
+
order: number;
|
|
104
104
|
}[];
|
|
105
105
|
estimatedMinutes: number;
|
|
106
106
|
tags: string[];
|
|
@@ -117,8 +117,8 @@ export declare const JourneySchema: z.ZodObject<{
|
|
|
117
117
|
instructions?: string | undefined;
|
|
118
118
|
};
|
|
119
119
|
type: "prompt" | "checkpoint" | "summary";
|
|
120
|
-
order: number;
|
|
121
120
|
optional: boolean;
|
|
121
|
+
order: number;
|
|
122
122
|
}[];
|
|
123
123
|
estimatedMinutes: number;
|
|
124
124
|
tags: string[];
|
package/dist/types/session.d.ts
CHANGED
|
@@ -21,23 +21,23 @@ export declare const CreateSessionSchema: z.ZodObject<{
|
|
|
21
21
|
conversation_id?: string | undefined;
|
|
22
22
|
}>>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
journey_slug?: string | undefined;
|
|
25
|
-
context?: string | undefined;
|
|
26
24
|
auth?: {
|
|
27
25
|
user_id?: string | undefined;
|
|
28
26
|
client_id?: string | undefined;
|
|
29
27
|
token?: string | undefined;
|
|
30
28
|
conversation_id?: string | undefined;
|
|
31
29
|
} | undefined;
|
|
32
|
-
}, {
|
|
33
30
|
journey_slug?: string | undefined;
|
|
34
31
|
context?: string | undefined;
|
|
32
|
+
}, {
|
|
35
33
|
auth?: {
|
|
36
34
|
user_id?: string | undefined;
|
|
37
35
|
client_id?: string | undefined;
|
|
38
36
|
token?: string | undefined;
|
|
39
37
|
conversation_id?: string | undefined;
|
|
40
38
|
} | undefined;
|
|
39
|
+
journey_slug?: string | undefined;
|
|
40
|
+
context?: string | undefined;
|
|
41
41
|
}>;
|
|
42
42
|
export type CreateSessionInput = z.infer<typeof CreateSessionSchema>;
|
|
43
43
|
export declare const ResumeSessionSchema: z.ZodObject<{
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response Sanitization Utilities
|
|
3
|
+
*
|
|
4
|
+
* Strips sensitive internal metadata from responses before returning to users.
|
|
5
|
+
* Full data is logged server-side for debugging.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Sanitize a response object by removing sensitive fields
|
|
9
|
+
*/
|
|
10
|
+
export declare function sanitizeResponse<T extends Record<string, unknown>>(response: T, options?: {
|
|
11
|
+
logLevel?: 'debug' | 'info' | 'none';
|
|
12
|
+
allowFields?: string[];
|
|
13
|
+
}): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Sanitize an array of objects
|
|
16
|
+
*/
|
|
17
|
+
export declare function sanitizeArray<T extends Record<string, unknown>>(items: T[], options?: {
|
|
18
|
+
allowFields?: string[];
|
|
19
|
+
}): Record<string, unknown>[];
|
|
20
|
+
/**
|
|
21
|
+
* Check if a response contains any sensitive fields
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasSensitiveData(obj: Record<string, unknown>): boolean;
|
|
24
|
+
//# sourceMappingURL=sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.d.ts","sourceRoot":"","sources":["../../src/utils/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmDH;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,QAAQ,EAAE,CAAC,EACX,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,GACA,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAyCzB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7D,KAAK,EAAE,CAAC,EAAE,EACV,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAE3B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAatE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response Sanitization Utilities
|
|
3
|
+
*
|
|
4
|
+
* Strips sensitive internal metadata from responses before returning to users.
|
|
5
|
+
* Full data is logged server-side for debugging.
|
|
6
|
+
*/
|
|
7
|
+
import { logger } from './logger.js';
|
|
8
|
+
/**
|
|
9
|
+
* Fields that should NEVER be exposed to end users
|
|
10
|
+
*/
|
|
11
|
+
const SENSITIVE_FIELDS = [
|
|
12
|
+
'sessionId',
|
|
13
|
+
'session_id',
|
|
14
|
+
'threadId',
|
|
15
|
+
'thread_id',
|
|
16
|
+
'messageId',
|
|
17
|
+
'message_id',
|
|
18
|
+
'userId',
|
|
19
|
+
'user_id',
|
|
20
|
+
'insightId',
|
|
21
|
+
'insight_id',
|
|
22
|
+
'checkpointId',
|
|
23
|
+
'checkpoint_id',
|
|
24
|
+
'crisisLevel',
|
|
25
|
+
'crisis_level',
|
|
26
|
+
'crisisConfidence',
|
|
27
|
+
'crisis_confidence',
|
|
28
|
+
'crisisIndicators',
|
|
29
|
+
'crisis_indicators',
|
|
30
|
+
'selfCorrected',
|
|
31
|
+
'self_corrected',
|
|
32
|
+
'currentStep',
|
|
33
|
+
'current_step',
|
|
34
|
+
'internalId',
|
|
35
|
+
'internal_id',
|
|
36
|
+
'auth',
|
|
37
|
+
'token',
|
|
38
|
+
'apiKey',
|
|
39
|
+
'api_key',
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* Fields that ARE safe to expose
|
|
43
|
+
*/
|
|
44
|
+
const SAFE_FIELDS = [
|
|
45
|
+
'success',
|
|
46
|
+
'content',
|
|
47
|
+
'message',
|
|
48
|
+
'timestamp',
|
|
49
|
+
'type',
|
|
50
|
+
'error',
|
|
51
|
+
'crisis_resources', // Only if crisis detected
|
|
52
|
+
];
|
|
53
|
+
/**
|
|
54
|
+
* Sanitize a response object by removing sensitive fields
|
|
55
|
+
*/
|
|
56
|
+
export function sanitizeResponse(response, options) {
|
|
57
|
+
const { logLevel = 'debug', allowFields = [] } = options || {};
|
|
58
|
+
// Log full response server-side before sanitizing
|
|
59
|
+
if (logLevel === 'debug') {
|
|
60
|
+
logger.debug('[Sanitize] Full response (internal):', response);
|
|
61
|
+
}
|
|
62
|
+
else if (logLevel === 'info') {
|
|
63
|
+
logger.info('[Sanitize] Full response (internal):', response);
|
|
64
|
+
}
|
|
65
|
+
const safeFields = [...SAFE_FIELDS, ...allowFields];
|
|
66
|
+
const sanitized = {};
|
|
67
|
+
for (const [key, value] of Object.entries(response)) {
|
|
68
|
+
// Skip sensitive fields
|
|
69
|
+
if (SENSITIVE_FIELDS.includes(key)) {
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
// Skip nested metadata objects (they often contain sensitive data)
|
|
73
|
+
if (key === 'metadata' && typeof value === 'object' && value !== null) {
|
|
74
|
+
// Only extract crisis detection status for safety messaging
|
|
75
|
+
const meta = value;
|
|
76
|
+
if (meta.crisisDetected === true) {
|
|
77
|
+
sanitized.crisis_resources = '988 Suicide & Crisis Lifeline • Crisis Text Line: text HOME to 741741';
|
|
78
|
+
}
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
// Include safe fields
|
|
82
|
+
if (safeFields.includes(key) || !SENSITIVE_FIELDS.some(s => key.toLowerCase().includes(s.toLowerCase()))) {
|
|
83
|
+
// Recursively sanitize nested objects
|
|
84
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
85
|
+
sanitized[key] = sanitizeResponse(value, { logLevel: 'none' });
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
sanitized[key] = value;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return sanitized;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Sanitize an array of objects
|
|
96
|
+
*/
|
|
97
|
+
export function sanitizeArray(items, options) {
|
|
98
|
+
return items.map(item => sanitizeResponse(item, { ...options, logLevel: 'none' }));
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Check if a response contains any sensitive fields
|
|
102
|
+
*/
|
|
103
|
+
export function hasSensitiveData(obj) {
|
|
104
|
+
for (const key of Object.keys(obj)) {
|
|
105
|
+
if (SENSITIVE_FIELDS.includes(key)) {
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
const value = obj[key];
|
|
109
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
110
|
+
if (hasSensitiveData(value)) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=sanitize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../../src/utils/sanitize.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH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AAC,GAA4B;IAC3D,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,IAAI,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACzE,IAAI,gBAAgB,CAAC,KAAgC,CAAC,EAAE,CAAC;gBACvD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "couchloop-eq-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Behavioral governance layer for LLMs - monitors for hallucination, inconsistency, tone drift, and unsafe reasoning while managing stateful AI sessions",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|