couchloop-eq-mcp 2.0.0 → 2.0.2
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 +41 -50
- package/dist/developer/managers/context-manager.d.ts +24 -45
- package/dist/developer/managers/context-manager.d.ts.map +1 -1
- package/dist/developer/managers/context-manager.js +177 -244
- package/dist/developer/managers/context-manager.js.map +1 -1
- package/dist/tools/couchloop-v2.d.ts +6 -0
- package/dist/tools/couchloop-v2.d.ts.map +1 -1
- package/dist/tools/couchloop-v2.js +78 -30
- package/dist/tools/couchloop-v2.js.map +1 -1
- package/dist/tools/generate-upgrade-report.d.ts +2 -2
- package/dist/tools/pre-review-code.d.ts +2 -2
- package/dist/tools/prevent-ai-errors.d.ts +1 -1
- package/dist/tools/primary-tools.d.ts +6 -0
- package/dist/tools/primary-tools.d.ts.map +1 -1
- package/dist/tools/primary-tools.js +13 -6
- package/dist/tools/primary-tools.js.map +1 -1
- package/dist/tools/protect-files.d.ts +1 -1
- package/dist/tools/status.d.ts +2 -2
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +2 -3
- package/dist/tools/status.js.map +1 -1
- package/dist/types/context.d.ts +4 -4
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/context.js +1 -1
- package/dist/types/context.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,159 +1,142 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
3
1
|
import { nanoid } from 'nanoid';
|
|
2
|
+
import { getSupabase } from '../../db/client.js';
|
|
4
3
|
import { logger } from '../../utils/logger.js';
|
|
5
|
-
const
|
|
6
|
-
const MAX_CONTEXT_WINDOW_TOKENS =
|
|
7
|
-
const AVG_CHARS_PER_TOKEN = 4;
|
|
4
|
+
const TABLE = 'context_entries';
|
|
5
|
+
const MAX_CONTEXT_WINDOW_TOKENS = 200_000;
|
|
6
|
+
const AVG_CHARS_PER_TOKEN = 4;
|
|
7
|
+
/**
|
|
8
|
+
* ContextManager — Supabase-backed context storage.
|
|
9
|
+
*
|
|
10
|
+
* Replaces the previous filesystem implementation (context-store.json)
|
|
11
|
+
* which failed in containerised deployments (Railway) where the application
|
|
12
|
+
* filesystem is read-only at runtime.
|
|
13
|
+
*
|
|
14
|
+
* Uses the existing getSupabase() singleton from db/client.ts — no new
|
|
15
|
+
* connections, no environment branching. Works identically in local dev,
|
|
16
|
+
* staging, and production as long as SUPABASE_* env vars are set.
|
|
17
|
+
*
|
|
18
|
+
* Falls back gracefully (degraded mode) when Supabase is unavailable so
|
|
19
|
+
* the MCP server can still respond to tool/list requests.
|
|
20
|
+
*/
|
|
8
21
|
export class ContextManager {
|
|
9
|
-
store;
|
|
10
|
-
isInitialized = false;
|
|
11
|
-
constructor() {
|
|
12
|
-
this.store = {
|
|
13
|
-
version: '1.0.0',
|
|
14
|
-
entries: [],
|
|
15
|
-
metadata: {
|
|
16
|
-
created_at: new Date().toISOString(),
|
|
17
|
-
last_updated: new Date().toISOString(),
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Initialize the context store from disk
|
|
23
|
-
*/
|
|
24
|
-
async initialize() {
|
|
25
|
-
try {
|
|
26
|
-
// Create parent directory if it doesn't exist
|
|
27
|
-
const dir = path.dirname(CONTEXT_STORE_PATH);
|
|
28
|
-
if (!fs.existsSync(dir)) {
|
|
29
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
30
|
-
}
|
|
31
|
-
// Load existing store or create new one
|
|
32
|
-
if (fs.existsSync(CONTEXT_STORE_PATH)) {
|
|
33
|
-
const data = fs.readFileSync(CONTEXT_STORE_PATH, 'utf-8');
|
|
34
|
-
this.store = JSON.parse(data);
|
|
35
|
-
logger.info(`Loaded context store with ${this.store.entries.length} entries`);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.createDefaultStore();
|
|
39
|
-
this.save();
|
|
40
|
-
logger.info('Created new context store');
|
|
41
|
-
}
|
|
42
|
-
this.isInitialized = true;
|
|
43
|
-
}
|
|
44
|
-
catch (error) {
|
|
45
|
-
logger.error('Failed to initialize context manager:', error);
|
|
46
|
-
throw new Error(`Context manager initialization failed: ${error}`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
22
|
/**
|
|
50
|
-
* Store a context entry
|
|
23
|
+
* Store a context entry.
|
|
51
24
|
*/
|
|
52
25
|
async storeEntry(category, content) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
this.save();
|
|
66
|
-
logger.info(`Stored context entry: ${entry.id} in category: ${category}`);
|
|
26
|
+
const supabase = getSupabase();
|
|
27
|
+
if (!supabase) {
|
|
28
|
+
return this.degraded('store', 'Supabase client unavailable — check SUPABASE_* env vars');
|
|
29
|
+
}
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
const { data, error } = await supabase
|
|
32
|
+
.from(TABLE)
|
|
33
|
+
.insert({ id: nanoid(), category, content, usage_count: 0, tags: [] })
|
|
34
|
+
.select()
|
|
35
|
+
.single();
|
|
36
|
+
if (error) {
|
|
37
|
+
logger.error('[ContextManager] storeEntry error:', error.message);
|
|
67
38
|
return {
|
|
68
|
-
success:
|
|
39
|
+
success: false,
|
|
69
40
|
action: 'store',
|
|
70
|
-
message: `
|
|
71
|
-
data: [entry],
|
|
41
|
+
message: `Failed to store context: ${error.message}`,
|
|
72
42
|
};
|
|
73
43
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
44
|
+
logger.info(`[ContextManager] Stored entry id=${data.id} category=${category}`);
|
|
45
|
+
return {
|
|
46
|
+
success: true,
|
|
47
|
+
action: 'store',
|
|
48
|
+
message: `Successfully stored context in "${category}" category`,
|
|
49
|
+
data: [this.toEntry(data)],
|
|
50
|
+
};
|
|
78
51
|
}
|
|
79
52
|
/**
|
|
80
|
-
* Retrieve context entries by category or search term
|
|
53
|
+
* Retrieve context entries — optionally filtered by category and/or search term.
|
|
54
|
+
* Increments usage_count and updates last_accessed as a fire-and-forget side effect.
|
|
81
55
|
*/
|
|
82
56
|
async retrieve(category, searchTerm) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return {
|
|
104
|
-
success: true,
|
|
105
|
-
action: 'retrieve',
|
|
106
|
-
message: `No context found${category ? ` in category "${category}"` : ''}${searchTerm ? ` matching "${searchTerm}"` : ''}`,
|
|
107
|
-
data: null,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
logger.info(`Retrieved ${results.length} context entries`);
|
|
57
|
+
const supabase = getSupabase();
|
|
58
|
+
if (!supabase) {
|
|
59
|
+
return this.degraded('retrieve', 'Supabase client unavailable');
|
|
60
|
+
}
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
+
let query = supabase
|
|
63
|
+
.from(TABLE)
|
|
64
|
+
.select('*')
|
|
65
|
+
.order('created_at', { ascending: false });
|
|
66
|
+
if (category) {
|
|
67
|
+
query = query.eq('category', category);
|
|
68
|
+
}
|
|
69
|
+
if (searchTerm) {
|
|
70
|
+
// Escape SQL LIKE wildcards in the search term
|
|
71
|
+
const escaped = searchTerm.replace(/[%_]/g, '\\$&');
|
|
72
|
+
query = query.ilike('content', `%${escaped}%`);
|
|
73
|
+
}
|
|
74
|
+
const { data, error } = await query;
|
|
75
|
+
if (error) {
|
|
76
|
+
logger.error('[ContextManager] retrieve error:', error.message);
|
|
111
77
|
return {
|
|
112
|
-
success:
|
|
78
|
+
success: false,
|
|
113
79
|
action: 'retrieve',
|
|
114
|
-
message: `
|
|
115
|
-
data: results,
|
|
80
|
+
message: `Failed to retrieve context: ${error.message}`,
|
|
116
81
|
};
|
|
117
82
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
83
|
+
if (!data || data.length === 0) {
|
|
84
|
+
return {
|
|
85
|
+
success: true,
|
|
86
|
+
action: 'retrieve',
|
|
87
|
+
message: `No context found${category ? ` in category "${category}"` : ''}${searchTerm ? ` matching "${searchTerm}"` : ''}`,
|
|
88
|
+
data: null,
|
|
89
|
+
};
|
|
121
90
|
}
|
|
91
|
+
// Fire-and-forget: bump usage stats on retrieved rows
|
|
92
|
+
const ids = data.map((r) => r.id);
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
|
+
supabase
|
|
95
|
+
.rpc('increment_usage_count', { row_ids: ids })
|
|
96
|
+
.then(() => { }, (err) => {
|
|
97
|
+
// Fallback: update each row individually if RPC not available
|
|
98
|
+
ids.forEach((id) => {
|
|
99
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
100
|
+
supabase
|
|
101
|
+
.from(TABLE)
|
|
102
|
+
.update({ last_accessed: new Date().toISOString() })
|
|
103
|
+
.eq('id', id)
|
|
104
|
+
.then(() => { }, () => { });
|
|
105
|
+
});
|
|
106
|
+
logger.warn('[ContextManager] usage RPC failed, used fallback:', err);
|
|
107
|
+
});
|
|
108
|
+
logger.info(`[ContextManager] Retrieved ${data.length} entries`);
|
|
109
|
+
return {
|
|
110
|
+
success: true,
|
|
111
|
+
action: 'retrieve',
|
|
112
|
+
message: `Retrieved ${data.length} context entries`,
|
|
113
|
+
data: data.map((r) => this.toEntry(r)),
|
|
114
|
+
};
|
|
122
115
|
}
|
|
123
116
|
/**
|
|
124
|
-
* Check context window
|
|
117
|
+
* Check context window usage and return store metadata.
|
|
125
118
|
*/
|
|
126
119
|
async check(includeMetadata = false) {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
success:
|
|
120
|
+
const supabase = getSupabase();
|
|
121
|
+
if (!supabase) {
|
|
122
|
+
return this.degraded('check', 'Supabase client unavailable');
|
|
123
|
+
}
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
125
|
+
const { data, error } = await supabase
|
|
126
|
+
.from(TABLE)
|
|
127
|
+
.select('category, content');
|
|
128
|
+
if (error) {
|
|
129
|
+
logger.error('[ContextManager] check error:', error.message);
|
|
130
|
+
return {
|
|
131
|
+
success: false,
|
|
139
132
|
action: 'check',
|
|
140
|
-
message: `
|
|
141
|
-
warning,
|
|
133
|
+
message: `Failed to check context: ${error.message}`,
|
|
142
134
|
};
|
|
143
|
-
if (includeMetadata) {
|
|
144
|
-
response.data = metadata;
|
|
145
|
-
}
|
|
146
|
-
return response;
|
|
147
135
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Get metadata about the context store
|
|
155
|
-
*/
|
|
156
|
-
getMetadata() {
|
|
136
|
+
const rows = data ?? [];
|
|
137
|
+
const totalBytes = rows.reduce((sum, r) => sum + (r.content?.length ?? 0), 0);
|
|
138
|
+
const estimatedTokens = totalBytes / AVG_CHARS_PER_TOKEN;
|
|
139
|
+
const usagePct = Math.min((estimatedTokens / MAX_CONTEXT_WINDOW_TOKENS) * 100, 100);
|
|
157
140
|
const entriesByCategory = {
|
|
158
141
|
architecture: 0,
|
|
159
142
|
requirements: 0,
|
|
@@ -162,140 +145,90 @@ export class ContextManager {
|
|
|
162
145
|
'technical-patterns': 0,
|
|
163
146
|
'project-metadata': 0,
|
|
164
147
|
};
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
148
|
+
rows.forEach((r) => {
|
|
149
|
+
if (r.category in entriesByCategory) {
|
|
150
|
+
entriesByCategory[r.category]++;
|
|
151
|
+
}
|
|
169
152
|
});
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
153
|
+
let warning;
|
|
154
|
+
if (usagePct > 80) {
|
|
155
|
+
warning = `Context store is ${usagePct.toFixed(1)}% full. Consider cleaning up old entries.`;
|
|
156
|
+
}
|
|
157
|
+
else if (usagePct > 60) {
|
|
158
|
+
warning = `Context store is ${usagePct.toFixed(1)}% full.`;
|
|
159
|
+
}
|
|
160
|
+
const metadata = {
|
|
161
|
+
total_entries: rows.length,
|
|
174
162
|
entries_by_category: entriesByCategory,
|
|
175
163
|
total_stored_bytes: totalBytes,
|
|
176
|
-
last_updated: new Date(
|
|
177
|
-
context_window_usage_percent:
|
|
164
|
+
last_updated: new Date(),
|
|
165
|
+
context_window_usage_percent: usagePct,
|
|
166
|
+
};
|
|
167
|
+
return {
|
|
168
|
+
success: true,
|
|
169
|
+
action: 'check',
|
|
170
|
+
message: `Context store contains ${rows.length} entries`,
|
|
171
|
+
warning,
|
|
172
|
+
...(includeMetadata ? { data: metadata } : {}),
|
|
178
173
|
};
|
|
179
174
|
}
|
|
180
175
|
/**
|
|
181
|
-
*
|
|
176
|
+
* Remove entries older than `daysOld` days.
|
|
182
177
|
*/
|
|
183
178
|
async cleanup(daysOld = 30) {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
logger.
|
|
179
|
+
const supabase = getSupabase();
|
|
180
|
+
if (!supabase) {
|
|
181
|
+
return this.degraded('cleanup', 'Supabase client unavailable');
|
|
182
|
+
}
|
|
183
|
+
const cutoff = new Date();
|
|
184
|
+
cutoff.setDate(cutoff.getDate() - daysOld);
|
|
185
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
186
|
+
const { error, count } = await supabase
|
|
187
|
+
.from(TABLE)
|
|
188
|
+
.delete({ count: 'exact' })
|
|
189
|
+
.lt('created_at', cutoff.toISOString());
|
|
190
|
+
if (error) {
|
|
191
|
+
logger.error('[ContextManager] cleanup error:', error.message);
|
|
197
192
|
return {
|
|
198
|
-
success:
|
|
199
|
-
action: '
|
|
200
|
-
message: `
|
|
193
|
+
success: false,
|
|
194
|
+
action: 'cleanup',
|
|
195
|
+
message: `Cleanup failed: ${error.message}`,
|
|
201
196
|
};
|
|
202
197
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Export all context for backup
|
|
210
|
-
*/
|
|
211
|
-
async export() {
|
|
212
|
-
this.ensureInitialized();
|
|
213
|
-
return JSON.parse(JSON.stringify(this.store));
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Import context from backup
|
|
217
|
-
*/
|
|
218
|
-
async import(store) {
|
|
219
|
-
try {
|
|
220
|
-
this.store = store;
|
|
221
|
-
this.store.metadata.last_updated = new Date().toISOString();
|
|
222
|
-
this.save();
|
|
223
|
-
logger.info('Imported context store');
|
|
224
|
-
}
|
|
225
|
-
catch (error) {
|
|
226
|
-
logger.error('Error importing context:', error);
|
|
227
|
-
throw new Error(`Failed to import context: ${error}`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Create default context store
|
|
232
|
-
*/
|
|
233
|
-
createDefaultStore() {
|
|
234
|
-
this.store = {
|
|
235
|
-
version: '1.0.0',
|
|
236
|
-
entries: [
|
|
237
|
-
{
|
|
238
|
-
id: nanoid(),
|
|
239
|
-
category: 'project-metadata',
|
|
240
|
-
content: 'CouchLoop MCP Server - Model Context Protocol server for stateful conversation management',
|
|
241
|
-
timestamp: new Date(),
|
|
242
|
-
usage_count: 0,
|
|
243
|
-
last_retrieved: null,
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
id: nanoid(),
|
|
247
|
-
category: 'architecture',
|
|
248
|
-
content: 'CouchLoop uses PostgreSQL via Supabase with Drizzle ORM. MCP protocol via stdio for communication. Session/journey/checkpoint management.',
|
|
249
|
-
timestamp: new Date(),
|
|
250
|
-
usage_count: 0,
|
|
251
|
-
last_retrieved: null,
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
id: nanoid(),
|
|
255
|
-
category: 'requirements',
|
|
256
|
-
content: 'Must support multi-turn conversations, session persistence across interruptions, guided journeys, crisis detection via shrink-chat integration',
|
|
257
|
-
timestamp: new Date(),
|
|
258
|
-
usage_count: 0,
|
|
259
|
-
last_retrieved: null,
|
|
260
|
-
},
|
|
261
|
-
],
|
|
262
|
-
metadata: {
|
|
263
|
-
created_at: new Date().toISOString(),
|
|
264
|
-
last_updated: new Date().toISOString(),
|
|
265
|
-
},
|
|
198
|
+
logger.info(`[ContextManager] Cleaned up ${count ?? 0} entries older than ${daysOld} days`);
|
|
199
|
+
return {
|
|
200
|
+
success: true,
|
|
201
|
+
action: 'cleanup',
|
|
202
|
+
message: `Removed ${count ?? 0} entries older than ${daysOld} days`,
|
|
266
203
|
};
|
|
267
204
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}
|
|
279
|
-
catch (error) {
|
|
280
|
-
logger.error('Failed to save context store:', error);
|
|
281
|
-
throw new Error(`Failed to persist context: ${error}`);
|
|
282
|
-
}
|
|
205
|
+
// ── Helpers ────────────────────────────────────────────────────────────────
|
|
206
|
+
/** Map a raw Supabase row to the ContextEntry shape used by the rest of the codebase. */
|
|
207
|
+
toEntry(row) {
|
|
208
|
+
return {
|
|
209
|
+
id: row.id,
|
|
210
|
+
category: row.category,
|
|
211
|
+
content: row.content,
|
|
212
|
+
timestamp: new Date(row.created_at),
|
|
213
|
+
usage_count: row.usage_count ?? 0,
|
|
214
|
+
last_retrieved: row.last_accessed ? new Date(row.last_accessed) : null,
|
|
215
|
+
};
|
|
283
216
|
}
|
|
284
|
-
/**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
217
|
+
/** Return a consistent degraded-mode response when Supabase is unavailable. */
|
|
218
|
+
degraded(action, reason) {
|
|
219
|
+
logger.warn(`[ContextManager] Degraded mode — ${reason}`);
|
|
220
|
+
return {
|
|
221
|
+
success: false,
|
|
222
|
+
action,
|
|
223
|
+
message: `Context storage unavailable: ${reason}`,
|
|
224
|
+
};
|
|
291
225
|
}
|
|
292
226
|
}
|
|
293
|
-
// Singleton
|
|
227
|
+
// Singleton — no initialize() needed; Supabase client handles its own lifecycle.
|
|
294
228
|
let instance = null;
|
|
295
229
|
export async function getContextManager() {
|
|
296
230
|
if (!instance) {
|
|
297
231
|
instance = new ContextManager();
|
|
298
|
-
await instance.initialize();
|
|
299
232
|
}
|
|
300
233
|
return instance;
|
|
301
234
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../../src/developer/managers/context-manager.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"context-manager.js","sourceRoot":"","sources":["../../../src/developer/managers/context-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQ/C,MAAM,KAAK,GAAG,iBAAiB,CAAC;AAChC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAC1C,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAG9B;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,cAAc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C,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;IAClC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -22,6 +22,12 @@ export declare const couchloopV2Tool: {
|
|
|
22
22
|
definition: {
|
|
23
23
|
name: string;
|
|
24
24
|
description: string;
|
|
25
|
+
annotations: {
|
|
26
|
+
readOnlyHint: boolean;
|
|
27
|
+
destructiveHint: boolean;
|
|
28
|
+
idempotentHint: boolean;
|
|
29
|
+
openWorldHint: boolean;
|
|
30
|
+
};
|
|
25
31
|
inputSchema: {
|
|
26
32
|
type: string;
|
|
27
33
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"couchloop-v2.d.ts","sourceRoot":"","sources":["../../src/tools/couchloop-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"couchloop-v2.d.ts","sourceRoot":"","sources":["../../src/tools/couchloop-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAiDH;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAkUxF;AA6FD;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC3B,CAAC"}
|