sqlew 3.7.3 → 3.7.4
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/CHANGELOG.md +184 -0
- package/LICENSE +0 -0
- package/README.md +2 -2
- package/assets/config.example.toml +0 -0
- package/assets/kanban-style.png +0 -0
- package/assets/sample-agents/README.md +0 -0
- package/assets/sample-agents/sqlew-architect.md +0 -0
- package/assets/sample-agents/sqlew-researcher.md +0 -0
- package/assets/sample-agents/sqlew-scrum-master.md +0 -0
- package/assets/schema.sql +0 -0
- package/assets/sqlew-logo.png +0 -0
- package/dist/cli/db-export.d.ts +29 -0
- package/dist/cli/db-export.d.ts.map +1 -0
- package/dist/cli/db-export.js +251 -0
- package/dist/cli/db-export.js.map +1 -0
- package/dist/cli/db-import.d.ts +31 -0
- package/dist/cli/db-import.d.ts.map +1 -0
- package/dist/cli/db-import.js +258 -0
- package/dist/cli/db-import.js.map +1 -0
- package/dist/cli.js +24 -2
- package/dist/cli.js.map +1 -1
- package/dist/tests/migrations/test-all-versions-real.js +3 -2
- package/dist/tests/migrations/test-all-versions-real.js.map +1 -1
- package/dist/types.d.ts +121 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/exporter/export.d.ts +100 -0
- package/dist/utils/exporter/export.d.ts.map +1 -0
- package/dist/utils/exporter/export.js +363 -0
- package/dist/utils/exporter/export.js.map +1 -0
- package/dist/utils/importer/import.d.ts +29 -0
- package/dist/utils/importer/import.d.ts.map +1 -0
- package/dist/utils/importer/import.js +514 -0
- package/dist/utils/importer/import.js.map +1 -0
- package/dist/utils/importer/master-tables.d.ts +18 -0
- package/dist/utils/importer/master-tables.d.ts.map +1 -0
- package/dist/utils/importer/master-tables.js +255 -0
- package/dist/utils/importer/master-tables.js.map +1 -0
- package/dist/utils/importer/topological-sort.d.ts +61 -0
- package/dist/utils/importer/topological-sort.d.ts.map +1 -0
- package/dist/utils/importer/topological-sort.js +143 -0
- package/dist/utils/importer/topological-sort.js.map +1 -0
- package/docs/ACCEPTANCE_CRITERIA.md +0 -0
- package/docs/AI_AGENT_GUIDE.md +0 -0
- package/docs/ARCHITECTURE.md +0 -0
- package/docs/AUTO_FILE_TRACKING.md +0 -1
- package/docs/BEST_PRACTICES.md +0 -0
- package/docs/CONFIGURATION.md +0 -0
- package/docs/DATABASE_AUTH.md +1 -2
- package/docs/DECISION_CONTEXT.md +0 -0
- package/docs/DECISION_TO_TASK_MIGRATION_GUIDE.md +0 -0
- package/docs/GIT_AWARE_AUTO_COMPLETE.md +0 -0
- package/docs/SHARED_CONCEPTS.md +0 -0
- package/docs/SPECIALIZED_AGENTS.md +0 -0
- package/docs/TASK_ACTIONS.md +0 -0
- package/docs/TASK_DEPENDENCIES.md +0 -0
- package/docs/TASK_LINKING.md +0 -0
- package/docs/TASK_MIGRATION.md +0 -0
- package/docs/TASK_OVERVIEW.md +0 -0
- package/docs/TASK_PRUNING.md +0 -0
- package/docs/TASK_SYSTEM.md +0 -0
- package/docs/TOOL_REFERENCE.md +0 -2
- package/docs/TOOL_SELECTION.md +0 -0
- package/docs/WORKFLOWS.md +0 -0
- package/docs/{DATABASE_MIGRATION.md → cli/DATABASE_MIGRATION.md} +71 -32
- package/docs/cli/DATA_EXPORT_IMPORT.md +400 -0
- package/docs/cli/README.md +227 -0
- package/package.json +3 -2
- package/docs/BASEADAPTER_IMPLEMENTATION.md +0 -399
- package/docs/HELP_PREVIEW_COMPARISON.md +0 -259
- package/docs/MIGRATION_CHAIN.md +0 -293
- package/docs/MIGRATION_v2.md +0 -538
- package/docs/MIGRATION_v3.3.md +0 -602
- package/docs/MIGRATION_v3.6.0.md +0 -170
- package/docs/MULTI_PROJECT_ARCHITECTURE.md +0 -497
package/docs/MIGRATION_v2.md
DELETED
|
@@ -1,538 +0,0 @@
|
|
|
1
|
-
# Migration Guide: v1.x → v2.0.0
|
|
2
|
-
|
|
3
|
-
This guide helps you migrate from sqlew v1.x to v2.0.0. The v2.0 release consolidates 20 individual tools into 6 action-based tools for 96% token reduction.
|
|
4
|
-
|
|
5
|
-
## Breaking Changes Summary
|
|
6
|
-
|
|
7
|
-
### What Changed
|
|
8
|
-
- **Tool Names:** All 20 tool names changed
|
|
9
|
-
- **API Structure:** All tools now use action-based routing with an `action` parameter
|
|
10
|
-
- **Tool Count:** 20 → 6 tools
|
|
11
|
-
|
|
12
|
-
### What Didn't Change
|
|
13
|
-
- **Database Schema:** 100% compatible - no migration needed ✅
|
|
14
|
-
- **Functionality:** All 20 original functions preserved
|
|
15
|
-
- **Parameters:** Same parameter names and types (except `action` is now required)
|
|
16
|
-
- **Return Values:** Identical response structures
|
|
17
|
-
|
|
18
|
-
## Database Compatibility
|
|
19
|
-
|
|
20
|
-
**Good news:** Your v1.x database works with v2.0 without any changes!
|
|
21
|
-
|
|
22
|
-
- ✅ v1.x database → v2.0 server (works immediately)
|
|
23
|
-
- ✅ v2.0 database → v1.x server (if you need to downgrade)
|
|
24
|
-
- ✅ No data migration required
|
|
25
|
-
- ✅ No schema changes
|
|
26
|
-
|
|
27
|
-
The v2.0 consolidation is purely an MCP interface redesign - the database layer is unchanged.
|
|
28
|
-
|
|
29
|
-
## Tool Mapping Reference
|
|
30
|
-
|
|
31
|
-
| v1.x Tool | v2.0 Tool | Action |
|
|
32
|
-
|-----------|-----------|--------|
|
|
33
|
-
| `set_decision` | `decision` | `set` |
|
|
34
|
-
| `get_decision` | `decision` | `get` |
|
|
35
|
-
| `get_context` | `decision` | `list` |
|
|
36
|
-
| `search_by_tags` | `decision` | `search_tags` |
|
|
37
|
-
| `search_by_layer` | `decision` | `search_layer` |
|
|
38
|
-
| `get_versions` | `decision` | `versions` |
|
|
39
|
-
| `send_message` | `message` | `send` |
|
|
40
|
-
| `get_messages` | `message` | `get` |
|
|
41
|
-
| `mark_read` | `message` | `mark_read` |
|
|
42
|
-
| `record_file_change` | `file` | `record` |
|
|
43
|
-
| `get_file_changes` | `file` | `get` |
|
|
44
|
-
| `check_file_lock` | `file` | `check_lock` |
|
|
45
|
-
| `add_constraint` | `constraint` | `add` |
|
|
46
|
-
| `get_constraints` | `constraint` | `get` |
|
|
47
|
-
| `deactivate_constraint` | `constraint` | `deactivate` |
|
|
48
|
-
| `get_layer_summary` | `stats` | `layer_summary` |
|
|
49
|
-
| `get_stats` | `stats` | `db_stats` |
|
|
50
|
-
| `clear_old_data` | `stats` | `clear` |
|
|
51
|
-
| `get_config` | `config` | `get` |
|
|
52
|
-
| `update_config` | `config` | `update` |
|
|
53
|
-
|
|
54
|
-
## Migration Examples
|
|
55
|
-
|
|
56
|
-
### Context Management
|
|
57
|
-
|
|
58
|
-
**v1.x:**
|
|
59
|
-
```typescript
|
|
60
|
-
// Set decision
|
|
61
|
-
await callTool('set_decision', {
|
|
62
|
-
key: 'auth_method',
|
|
63
|
-
value: 'JWT',
|
|
64
|
-
tags: ['security']
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// Get decision
|
|
68
|
-
await callTool('get_decision', {
|
|
69
|
-
key: 'auth_method'
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// Search by tags
|
|
73
|
-
await callTool('search_by_tags', {
|
|
74
|
-
tags: ['security', 'api'],
|
|
75
|
-
match_mode: 'AND'
|
|
76
|
-
});
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**v2.0:**
|
|
80
|
-
```typescript
|
|
81
|
-
// Set decision
|
|
82
|
-
await callTool('decision', {
|
|
83
|
-
action: 'set',
|
|
84
|
-
key: 'auth_method',
|
|
85
|
-
value: 'JWT',
|
|
86
|
-
tags: ['security']
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
// Get decision
|
|
90
|
-
await callTool('decision', {
|
|
91
|
-
action: 'get',
|
|
92
|
-
key: 'auth_method'
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// Search by tags
|
|
96
|
-
await callTool('decision', {
|
|
97
|
-
action: 'search_tags',
|
|
98
|
-
tags: ['security', 'api'],
|
|
99
|
-
tag_match: 'AND' // Note: parameter renamed from match_mode
|
|
100
|
-
});
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Messaging
|
|
104
|
-
|
|
105
|
-
**v1.x:**
|
|
106
|
-
```typescript
|
|
107
|
-
// Send message
|
|
108
|
-
await callTool('send_message', {
|
|
109
|
-
from_agent: 'agent1',
|
|
110
|
-
to_agent: 'agent2',
|
|
111
|
-
message: 'Task complete',
|
|
112
|
-
priority: 'high'
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
// Get messages
|
|
116
|
-
await callTool('get_messages', {
|
|
117
|
-
unread_only: true
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
// Mark as read
|
|
121
|
-
await callTool('mark_read', {
|
|
122
|
-
message_ids: [1, 2, 3]
|
|
123
|
-
});
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**v2.0:**
|
|
127
|
-
```typescript
|
|
128
|
-
// Send message
|
|
129
|
-
await callTool('message', {
|
|
130
|
-
action: 'send',
|
|
131
|
-
from_agent: 'agent1',
|
|
132
|
-
to_agent: 'agent2',
|
|
133
|
-
message: 'Task complete',
|
|
134
|
-
priority: 'high'
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
// Get messages
|
|
138
|
-
await callTool('message', {
|
|
139
|
-
action: 'get',
|
|
140
|
-
unread_only: true
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// Mark as read
|
|
144
|
-
await callTool('message', {
|
|
145
|
-
action: 'mark_read',
|
|
146
|
-
message_ids: [1, 2, 3]
|
|
147
|
-
});
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
### File Tracking
|
|
151
|
-
|
|
152
|
-
**v1.x:**
|
|
153
|
-
```typescript
|
|
154
|
-
// Record file change
|
|
155
|
-
await callTool('record_file_change', {
|
|
156
|
-
file_path: '/src/auth.ts',
|
|
157
|
-
agent_name: 'auth-agent',
|
|
158
|
-
change_type: 'modified',
|
|
159
|
-
layer: 'business'
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
// Get file changes
|
|
163
|
-
await callTool('get_file_changes', {
|
|
164
|
-
since: '2025-01-10T10:00:00Z'
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
// Check file lock
|
|
168
|
-
await callTool('check_file_lock', {
|
|
169
|
-
file_path: '/src/auth.ts'
|
|
170
|
-
});
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**v2.0:**
|
|
174
|
-
```typescript
|
|
175
|
-
// Record file change
|
|
176
|
-
await callTool('file', {
|
|
177
|
-
action: 'record',
|
|
178
|
-
file_path: '/src/auth.ts',
|
|
179
|
-
agent_name: 'auth-agent',
|
|
180
|
-
change_type: 'modified',
|
|
181
|
-
layer: 'business'
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
// Get file changes
|
|
185
|
-
await callTool('file', {
|
|
186
|
-
action: 'get',
|
|
187
|
-
since: '2025-01-10T10:00:00Z'
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
// Check file lock
|
|
191
|
-
await callTool('file', {
|
|
192
|
-
action: 'check_lock',
|
|
193
|
-
file_path: '/src/auth.ts'
|
|
194
|
-
});
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Constraints
|
|
198
|
-
|
|
199
|
-
**v1.x:**
|
|
200
|
-
```typescript
|
|
201
|
-
// Add constraint
|
|
202
|
-
await callTool('add_constraint', {
|
|
203
|
-
category: 'performance',
|
|
204
|
-
constraint_text: 'Response time < 200ms',
|
|
205
|
-
priority: 'high'
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
// Get constraints
|
|
209
|
-
await callTool('get_constraints', {
|
|
210
|
-
category: 'performance'
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
// Deactivate constraint
|
|
214
|
-
await callTool('deactivate_constraint', {
|
|
215
|
-
constraint_id: 42
|
|
216
|
-
});
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**v2.0:**
|
|
220
|
-
```typescript
|
|
221
|
-
// Add constraint
|
|
222
|
-
await callTool('constraint', {
|
|
223
|
-
action: 'add',
|
|
224
|
-
category: 'performance',
|
|
225
|
-
constraint_text: 'Response time < 200ms',
|
|
226
|
-
priority: 'high'
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
// Get constraints
|
|
230
|
-
await callTool('constraint', {
|
|
231
|
-
action: 'get',
|
|
232
|
-
category: 'performance'
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
// Deactivate constraint
|
|
236
|
-
await callTool('constraint', {
|
|
237
|
-
action: 'deactivate',
|
|
238
|
-
constraint_id: 42
|
|
239
|
-
});
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Utilities
|
|
243
|
-
|
|
244
|
-
**v1.x:**
|
|
245
|
-
```typescript
|
|
246
|
-
// Layer summary
|
|
247
|
-
await callTool('get_layer_summary');
|
|
248
|
-
|
|
249
|
-
// Database stats
|
|
250
|
-
await callTool('get_stats');
|
|
251
|
-
|
|
252
|
-
// Clear old data
|
|
253
|
-
await callTool('clear_old_data', {
|
|
254
|
-
messages_older_than_hours: 48
|
|
255
|
-
});
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
**v2.0:**
|
|
259
|
-
```typescript
|
|
260
|
-
// Layer summary
|
|
261
|
-
await callTool('stats', {
|
|
262
|
-
action: 'layer_summary'
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
// Database stats
|
|
266
|
-
await callTool('stats', {
|
|
267
|
-
action: 'db_stats'
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
// Clear old data
|
|
271
|
-
await callTool('stats', {
|
|
272
|
-
action: 'clear',
|
|
273
|
-
messages_older_than_hours: 48
|
|
274
|
-
});
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### Configuration
|
|
278
|
-
|
|
279
|
-
**v1.x:**
|
|
280
|
-
```typescript
|
|
281
|
-
// Get config
|
|
282
|
-
await callTool('get_config');
|
|
283
|
-
|
|
284
|
-
// Update config
|
|
285
|
-
await callTool('update_config', {
|
|
286
|
-
ignoreWeekend: true,
|
|
287
|
-
messageRetentionHours: 48
|
|
288
|
-
});
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**v2.0:**
|
|
292
|
-
```typescript
|
|
293
|
-
// Get config
|
|
294
|
-
await callTool('config', {
|
|
295
|
-
action: 'get'
|
|
296
|
-
});
|
|
297
|
-
|
|
298
|
-
// Update config
|
|
299
|
-
await callTool('config', {
|
|
300
|
-
action: 'update',
|
|
301
|
-
ignoreWeekend: true,
|
|
302
|
-
messageRetentionHours: 48
|
|
303
|
-
});
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
## New Feature: Help Actions
|
|
307
|
-
|
|
308
|
-
v2.0 adds `action: "help"` to all tools for on-demand comprehensive documentation:
|
|
309
|
-
|
|
310
|
-
```typescript
|
|
311
|
-
// Get help for any tool
|
|
312
|
-
await callTool('decision', { action: 'help' });
|
|
313
|
-
await callTool('message', { action: 'help' });
|
|
314
|
-
await callTool('file', { action: 'help' });
|
|
315
|
-
await callTool('constraint', { action: 'help' });
|
|
316
|
-
await callTool('stats', { action: 'help' });
|
|
317
|
-
await callTool('config', { action: 'help' });
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
Each help action returns:
|
|
321
|
-
- Tool description
|
|
322
|
-
- Complete action list with parameters
|
|
323
|
-
- Usage examples
|
|
324
|
-
- Parameter requirements
|
|
325
|
-
|
|
326
|
-
**Zero token cost** until explicitly called!
|
|
327
|
-
|
|
328
|
-
## Migration Checklist
|
|
329
|
-
|
|
330
|
-
### 1. Update Package
|
|
331
|
-
```bash
|
|
332
|
-
npm install sqlew@2.0.0
|
|
333
|
-
# or
|
|
334
|
-
npm update sqlew
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### 2. Update Tool Calls
|
|
338
|
-
|
|
339
|
-
Search your codebase for v1.x tool calls:
|
|
340
|
-
|
|
341
|
-
```bash
|
|
342
|
-
# Find all v1.x tool calls
|
|
343
|
-
grep -r "set_decision\|get_decision\|get_context\|search_by_tags" .
|
|
344
|
-
grep -r "send_message\|get_messages\|mark_read" .
|
|
345
|
-
grep -r "record_file_change\|get_file_changes\|check_file_lock" .
|
|
346
|
-
grep -r "add_constraint\|get_constraints\|deactivate_constraint" .
|
|
347
|
-
grep -r "get_layer_summary\|get_stats\|clear_old_data" .
|
|
348
|
-
grep -r "get_config\|update_config" .
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
Replace each with v2.0 equivalent using the mapping table above.
|
|
352
|
-
|
|
353
|
-
### 3. Test Your Changes
|
|
354
|
-
|
|
355
|
-
Use MCP Inspector to verify tool calls:
|
|
356
|
-
|
|
357
|
-
```bash
|
|
358
|
-
npx @modelcontextprotocol/inspector npx sqlew
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
Test each migrated tool call to ensure:
|
|
362
|
-
- ✅ Correct tool name
|
|
363
|
-
- ✅ `action` parameter included
|
|
364
|
-
- ✅ All other parameters unchanged
|
|
365
|
-
- ✅ Response structure matches expectations
|
|
366
|
-
|
|
367
|
-
### 4. Verify Database Works
|
|
368
|
-
|
|
369
|
-
Your existing database should work immediately with v2.0:
|
|
370
|
-
|
|
371
|
-
```bash
|
|
372
|
-
# Start v2.0 server with your existing database
|
|
373
|
-
npx sqlew /path/to/your/existing/v1.db
|
|
374
|
-
|
|
375
|
-
# Test a few operations
|
|
376
|
-
# Your data should be intact
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
## Parameter Changes
|
|
380
|
-
|
|
381
|
-
### search_by_tags
|
|
382
|
-
|
|
383
|
-
**v1.x:** `match_mode` parameter
|
|
384
|
-
**v2.0:** `tag_match` parameter
|
|
385
|
-
|
|
386
|
-
```typescript
|
|
387
|
-
// v1.x
|
|
388
|
-
search_by_tags({ tags: ['api'], match_mode: 'AND' })
|
|
389
|
-
|
|
390
|
-
// v2.0
|
|
391
|
-
decision({ action: 'search_tags', tags: ['api'], tag_match: 'AND' })
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
All other parameters remain unchanged.
|
|
395
|
-
|
|
396
|
-
## Common Pitfalls
|
|
397
|
-
|
|
398
|
-
### ❌ Forgetting `action` Parameter
|
|
399
|
-
|
|
400
|
-
```typescript
|
|
401
|
-
// WRONG - will fail
|
|
402
|
-
await callTool('decision', { key: 'auth_method' });
|
|
403
|
-
|
|
404
|
-
// CORRECT
|
|
405
|
-
await callTool('decision', { action: 'get', key: 'auth_method' });
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
### ❌ Using Old Tool Names
|
|
409
|
-
|
|
410
|
-
```typescript
|
|
411
|
-
// WRONG - tool doesn't exist
|
|
412
|
-
await callTool('set_decision', { action: 'set', key: 'auth' });
|
|
413
|
-
|
|
414
|
-
// CORRECT
|
|
415
|
-
await callTool('decision', { action: 'set', key: 'auth' });
|
|
416
|
-
```
|
|
417
|
-
|
|
418
|
-
### ❌ Wrong Action Name
|
|
419
|
-
|
|
420
|
-
```typescript
|
|
421
|
-
// WRONG - action doesn't exist
|
|
422
|
-
await callTool('decision', { action: 'search_tags', match_mode: 'AND' });
|
|
423
|
-
|
|
424
|
-
// CORRECT - parameter also renamed
|
|
425
|
-
await callTool('decision', { action: 'search_tags', tag_match: 'AND' });
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
## Rollback Plan
|
|
429
|
-
|
|
430
|
-
If you need to rollback to v1.x:
|
|
431
|
-
|
|
432
|
-
```bash
|
|
433
|
-
# Downgrade package
|
|
434
|
-
npm install sqlew@1.1.2
|
|
435
|
-
|
|
436
|
-
# Your database will continue to work
|
|
437
|
-
# No schema migration needed
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
Your v2.0 database is 100% compatible with v1.x servers.
|
|
441
|
-
|
|
442
|
-
## Benefits of v2.0
|
|
443
|
-
|
|
444
|
-
After migration, you'll enjoy:
|
|
445
|
-
|
|
446
|
-
- **96% Token Reduction:** Tool definitions use 481 tokens instead of 12,848
|
|
447
|
-
- **67% MCP Context Reduction:** From ~13,730 to ~4,482 tokens
|
|
448
|
-
- **On-Demand Help:** Use `action: "help"` for comprehensive documentation
|
|
449
|
-
- **Same Functionality:** All 20 original functions preserved
|
|
450
|
-
- **Better Organization:** Related operations grouped into single tools
|
|
451
|
-
|
|
452
|
-
## Support
|
|
453
|
-
|
|
454
|
-
Need help with migration?
|
|
455
|
-
|
|
456
|
-
- **Issues:** [GitHub Issues](https://github.com/sin5ddd/mcp-sqlew/issues)
|
|
457
|
-
- **Changelog:** See [CHANGELOG.md](CHANGELOG.md) for complete v2.0 details
|
|
458
|
-
- **Documentation:** Updated [README.md](README.md) with v2.0 examples
|
|
459
|
-
|
|
460
|
-
## Example: Complete Migration
|
|
461
|
-
|
|
462
|
-
Here's a complete before/after example showing typical usage:
|
|
463
|
-
|
|
464
|
-
### Before (v1.x)
|
|
465
|
-
|
|
466
|
-
```typescript
|
|
467
|
-
// Set up authentication decision
|
|
468
|
-
await callTool('set_decision', {
|
|
469
|
-
key: 'auth_method',
|
|
470
|
-
value: 'JWT',
|
|
471
|
-
tags: ['security', 'api'],
|
|
472
|
-
layer: 'business'
|
|
473
|
-
});
|
|
474
|
-
|
|
475
|
-
// Send notification
|
|
476
|
-
await callTool('send_message', {
|
|
477
|
-
from_agent: 'auth-agent',
|
|
478
|
-
to_agent: 'api-agent',
|
|
479
|
-
message: 'Auth configured',
|
|
480
|
-
priority: 'high'
|
|
481
|
-
});
|
|
482
|
-
|
|
483
|
-
// Track file change
|
|
484
|
-
await callTool('record_file_change', {
|
|
485
|
-
file_path: '/src/auth.ts',
|
|
486
|
-
agent_name: 'auth-agent',
|
|
487
|
-
change_type: 'created',
|
|
488
|
-
layer: 'business'
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
// Add constraint
|
|
492
|
-
await callTool('add_constraint', {
|
|
493
|
-
category: 'security',
|
|
494
|
-
constraint_text: 'Use JWT with RS256',
|
|
495
|
-
priority: 'critical'
|
|
496
|
-
});
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
### After (v2.0)
|
|
500
|
-
|
|
501
|
-
```typescript
|
|
502
|
-
// Set up authentication decision
|
|
503
|
-
await callTool('decision', {
|
|
504
|
-
action: 'set',
|
|
505
|
-
key: 'auth_method',
|
|
506
|
-
value: 'JWT',
|
|
507
|
-
tags: ['security', 'api'],
|
|
508
|
-
layer: 'business'
|
|
509
|
-
});
|
|
510
|
-
|
|
511
|
-
// Send notification
|
|
512
|
-
await callTool('message', {
|
|
513
|
-
action: 'send',
|
|
514
|
-
from_agent: 'auth-agent',
|
|
515
|
-
to_agent: 'api-agent',
|
|
516
|
-
message: 'Auth configured',
|
|
517
|
-
priority: 'high'
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
// Track file change
|
|
521
|
-
await callTool('file', {
|
|
522
|
-
action: 'record',
|
|
523
|
-
file_path: '/src/auth.ts',
|
|
524
|
-
agent_name: 'auth-agent',
|
|
525
|
-
change_type: 'created',
|
|
526
|
-
layer: 'business'
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
// Add constraint
|
|
530
|
-
await callTool('constraint', {
|
|
531
|
-
action: 'add',
|
|
532
|
-
category: 'security',
|
|
533
|
-
constraint_text: 'Use JWT with RS256',
|
|
534
|
-
priority: 'critical'
|
|
535
|
-
});
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
Only changes: tool names and added `action` parameters. All other parameters identical!
|