sqlew 5.0.6 → 5.0.7

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.
Files changed (33) hide show
  1. package/dist/cli/hooks/on-prompt.d.ts +22 -4
  2. package/dist/cli/hooks/on-prompt.d.ts.map +1 -1
  3. package/dist/cli/hooks/on-prompt.js +63 -14
  4. package/dist/cli/hooks/on-prompt.js.map +1 -1
  5. package/dist/cli/hooks/stdin-parser.d.ts +11 -0
  6. package/dist/cli/hooks/stdin-parser.d.ts.map +1 -1
  7. package/dist/cli/hooks/stdin-parser.js +20 -0
  8. package/dist/cli/hooks/stdin-parser.js.map +1 -1
  9. package/dist/cli/hooks/track-plan.d.ts.map +1 -1
  10. package/dist/cli/hooks/track-plan.js +2 -1
  11. package/dist/cli/hooks/track-plan.js.map +1 -1
  12. package/dist/config/global-config.d.ts +2 -0
  13. package/dist/config/global-config.d.ts.map +1 -1
  14. package/dist/config/global-config.js.map +1 -1
  15. package/dist/index.js +9 -34
  16. package/dist/index.js.map +1 -1
  17. package/dist/server/tool-handlers.d.ts +3 -3
  18. package/dist/server/tool-handlers.d.ts.map +1 -1
  19. package/dist/server/tool-handlers.js +4 -4
  20. package/dist/server/tool-handlers.js.map +1 -1
  21. package/dist/server/tool-registration.d.ts +18 -0
  22. package/dist/server/tool-registration.d.ts.map +1 -0
  23. package/dist/server/tool-registration.js +42 -0
  24. package/dist/server/tool-registration.js.map +1 -0
  25. package/dist/server/tool-registry.d.ts +8 -3
  26. package/dist/server/tool-registry.d.ts.map +1 -1
  27. package/dist/server/tool-registry.js +15 -263
  28. package/dist/server/tool-registry.js.map +1 -1
  29. package/dist/server/tool-schemas.d.ts +141 -0
  30. package/dist/server/tool-schemas.d.ts.map +1 -0
  31. package/dist/server/tool-schemas.js +160 -0
  32. package/dist/server/tool-schemas.js.map +1 -0
  33. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/server/tool-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D;;;GAGG;AACH,wBAAgB,eAAe,IAAI,IAAI,EAAE,CAqQxC"}
1
+ {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/server/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI1D;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,EAAE,CAMxC"}
@@ -1,271 +1,23 @@
1
1
  /**
2
2
  * MCP Server - Tool Registry
3
- * Defines available MCP tools and their metadata
3
+ * Generates MCP Tool[] list from Zod schemas.
4
+ *
5
+ * Previously: hand-written JSON Schema (273 lines)
6
+ * Now: Zod schemas → toJSONSchema() + description
7
+ *
8
+ * Note: This function is no longer used by index.ts (registerTool handles ListTools
9
+ * automatically), but is retained for verification and external consumers.
4
10
  */
11
+ import { toJSONSchema } from 'zod';
12
+ import { TOOL_SCHEMAS, TOOL_DESCRIPTIONS } from './tool-schemas.js';
5
13
  /**
6
- * Get list of all available MCP tools
7
- * Used by ListToolsRequest handler
14
+ * Get list of all available MCP tools (JSON Schema format)
8
15
  */
9
16
  export function getToolRegistry() {
10
- return [
11
- {
12
- name: 'decision',
13
- description: 'Context Management - Store decisions with versioning and metadata. Use action: "help" for documentation.',
14
- inputSchema: {
15
- type: 'object',
16
- properties: {
17
- action: {
18
- type: 'string',
19
- description: 'Action',
20
- enum: ['set', 'get', 'list', 'search_tags', 'search_layer', 'versions', 'quick_set', 'search_advanced', 'set_batch', 'has_updates', 'set_from_template', 'create_template', 'list_templates', 'hard_delete', 'add_decision_context', 'list_decision_contexts', 'analytics', 'create_policy', 'list_policies', 'set_from_policy', 'help', 'example', 'use_case']
21
- }
22
- },
23
- required: ['action'],
24
- additionalProperties: true, // Allow action-specific parameters (key, value, tags, etc.)
25
- },
26
- },
27
- {
28
- name: 'constraint',
29
- description: 'Architectural Rules - Define and manage project constraints with priorities. Use action: "help" for documentation.',
30
- inputSchema: {
31
- type: 'object',
32
- properties: {
33
- action: {
34
- type: 'string',
35
- description: 'Action',
36
- enum: ['add', 'get', 'deactivate', 'suggest_pending', 'help', 'example', 'use_case']
37
- }
38
- },
39
- required: ['action'],
40
- additionalProperties: true, // Allow action-specific parameters (constraint_text, priority, etc.)
41
- },
42
- },
43
- {
44
- name: 'help',
45
- description: `**REQUIRED PARAMETER**: action (must be specified in ALL calls)
46
-
47
- Help System - Query action documentation, parameters, and workflow guidance
48
-
49
- Actions:
50
- - query_action: Get action documentation with parameters and examples
51
- - query_params: Get parameter list only (quick reference)
52
- - query_tool: Get tool overview and all actions
53
- - workflow_hints: Get common next actions after current action
54
- - batch_guide: Get guidance for batch operations
55
- - error_recovery: Analyze errors and suggest fixes
56
-
57
- Use this tool to understand how to use other sqlew tools. Returns only requested information (80-95% token reduction vs legacy help).`,
58
- inputSchema: {
59
- type: 'object',
60
- properties: {
61
- action: {
62
- type: 'string',
63
- description: 'Help action to perform',
64
- enum: ['query_action', 'query_params', 'query_tool', 'workflow_hints', 'batch_guide', 'error_recovery', 'help', 'example']
65
- },
66
- tool: {
67
- type: 'string',
68
- description: 'Target tool name (for query_action, query_params, query_tool, workflow_hints)'
69
- },
70
- target_action: {
71
- type: 'string',
72
- description: 'Target action name (for query_action, query_params)'
73
- },
74
- current_action: {
75
- type: 'string',
76
- description: 'Current action name (for workflow_hints)'
77
- },
78
- operation: {
79
- type: 'string',
80
- description: 'Batch operation name in format "tool.action" (for batch_guide)'
81
- },
82
- error_message: {
83
- type: 'string',
84
- description: 'Error message to analyze (for error_recovery)'
85
- }
86
- },
87
- required: ['action'],
88
- },
89
- },
90
- {
91
- name: 'example',
92
- description: `**REQUIRED PARAMETER**: action (must be specified in ALL calls)
93
-
94
- Example System - Browse and search code examples for sqlew tools
95
-
96
- Actions:
97
- - get: Get examples by tool, action, or topic
98
- - search: Search examples by keyword
99
- - list_all: List all available examples with filtering
100
-
101
- Use this tool to find working code snippets. Returns only requested examples (token-efficient).`,
102
- inputSchema: {
103
- type: 'object',
104
- properties: {
105
- action: {
106
- type: 'string',
107
- description: 'Example action to perform',
108
- enum: ['get', 'search', 'list_all', 'help', 'example']
109
- },
110
- tool: {
111
- type: 'string',
112
- description: 'Filter by tool name (for get, search, list_all)'
113
- },
114
- action_name: {
115
- type: 'string',
116
- description: 'Filter by action name (for get, search)'
117
- },
118
- topic: {
119
- type: 'string',
120
- description: 'Search by topic in title or explanation (for get)'
121
- },
122
- keyword: {
123
- type: 'string',
124
- description: 'Keyword to search (for search)'
125
- },
126
- complexity: {
127
- type: 'string',
128
- description: 'Filter by complexity: basic|intermediate|advanced (for search, list_all)'
129
- },
130
- limit: {
131
- type: 'number',
132
- description: 'Maximum results to return (default: 20, for list_all)'
133
- },
134
- offset: {
135
- type: 'number',
136
- description: 'Result offset for pagination (default: 0, for list_all)'
137
- }
138
- },
139
- required: ['action'],
140
- },
141
- },
142
- {
143
- name: 'use_case',
144
- description: `**REQUIRED PARAMETER**: action (must be specified in ALL calls)
145
-
146
- Use Case Catalog - Browse and search complete workflow scenarios
147
-
148
- Actions:
149
- - get: Get complete use case workflow by ID
150
- - search: Search use cases by keyword/category
151
- - list_all: List all use cases with filtering and pagination
152
-
153
- Use this tool to learn end-to-end workflows and multi-step operations. Returns workflow steps with executable code examples.`,
154
- inputSchema: {
155
- type: 'object',
156
- properties: {
157
- action: {
158
- type: 'string',
159
- description: 'Use case action to perform',
160
- enum: ['get', 'search', 'list_all', 'help', 'example']
161
- },
162
- use_case_id: {
163
- type: 'number',
164
- description: 'Use case ID to retrieve (for get)'
165
- },
166
- keyword: {
167
- type: 'string',
168
- description: 'Search keyword - searches title and description (for search)'
169
- },
170
- category: {
171
- type: 'string',
172
- description: 'Filter by category (optional for search, list_all)'
173
- },
174
- complexity: {
175
- type: 'string',
176
- description: 'Filter by complexity level',
177
- enum: ['basic', 'intermediate', 'advanced']
178
- },
179
- limit: {
180
- type: 'number',
181
- description: 'Maximum results to return (default: 20, for list_all)'
182
- },
183
- offset: {
184
- type: 'number',
185
- description: 'Result offset for pagination (default: 0, for list_all)'
186
- }
187
- },
188
- required: ['action'],
189
- },
190
- },
191
- {
192
- name: 'suggest',
193
- description: 'Intelligent decision/constraint suggestion system. Find related decisions by key pattern, tags, or full context. Prevents duplicates and ensures consistency.',
194
- inputSchema: {
195
- type: 'object',
196
- properties: {
197
- action: {
198
- type: 'string',
199
- description: 'Suggestion action to perform',
200
- enum: ['by_key', 'by_tags', 'by_context', 'check_duplicate', 'help']
201
- },
202
- target: {
203
- type: 'string',
204
- description: 'Target type for suggestions (default: decision)',
205
- enum: ['decision', 'constraint']
206
- },
207
- key: {
208
- type: 'string',
209
- description: 'Decision key (for by_key, by_context, check_duplicate when target=decision)'
210
- },
211
- text: {
212
- type: 'string',
213
- description: 'Constraint text to search (for by_key, by_context, check_duplicate when target=constraint)'
214
- },
215
- constraint_text: {
216
- type: 'string',
217
- description: 'Alias for text parameter (constraint text to search)'
218
- },
219
- category: {
220
- type: 'string',
221
- description: 'Constraint category filter (optional, when target=constraint)'
222
- },
223
- tags: {
224
- type: 'array',
225
- items: { type: 'string' },
226
- description: 'Tags array (for by_tags, by_context)'
227
- },
228
- layer: {
229
- type: 'string',
230
- description: 'Layer filter (optional)'
231
- },
232
- priority: {
233
- type: 'number',
234
- description: 'Priority level (optional)'
235
- },
236
- limit: {
237
- type: 'number',
238
- description: 'Max suggestions (default: 5)'
239
- },
240
- min_score: {
241
- type: 'number',
242
- description: 'Minimum relevance score (default: 30)'
243
- }
244
- },
245
- required: ['action'],
246
- additionalProperties: false,
247
- },
248
- },
249
- {
250
- name: 'queue',
251
- description: 'Hook queue management - list, clear, remove pending items from .sqlew/queue/pending.json. Use action: "help" for documentation.',
252
- inputSchema: {
253
- type: 'object',
254
- properties: {
255
- action: {
256
- type: 'string',
257
- description: 'Queue action to perform',
258
- enum: ['list', 'clear', 'remove', 'help', 'example']
259
- },
260
- index: {
261
- type: 'number',
262
- description: 'Item index for remove action (0-based)'
263
- }
264
- },
265
- required: ['action'],
266
- additionalProperties: false,
267
- },
268
- },
269
- ];
17
+ return Object.entries(TOOL_SCHEMAS).map(([name, schema]) => ({
18
+ name,
19
+ description: TOOL_DESCRIPTIONS[name],
20
+ inputSchema: toJSONSchema(schema),
21
+ }));
270
22
  }
271
23
  //# sourceMappingURL=tool-registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/server/tool-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL;YACE,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,0GAA0G;YACvH,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,QAAQ;wBACrB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC;qBAChW;iBACF;gBACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;gBACpB,oBAAoB,EAAE,IAAI,EAAG,4DAA4D;aAC1F;SACF;QACD;YACE,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,oHAAoH;YACjI,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE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CAAC,MAAM,CAAwB;KACzD,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * MCP Server - Tool Schemas (Zod)
3
+ * Source of truth for tool input validation and JSON Schema generation.
4
+ *
5
+ * Each schema corresponds to one MCP tool. The Zod schema is used by:
6
+ * 1. registerTool() for automatic input validation
7
+ * 2. toJSONSchema() for ListTools response generation
8
+ *
9
+ * additionalProperties strategy:
10
+ * - decision, constraint: .passthrough() — action-specific params vary per action
11
+ * - help, example, use_case: default (strip) — all params explicitly defined
12
+ * - suggest, queue: .strict() — closed set, unknown params rejected
13
+ */
14
+ import { z } from 'zod';
15
+ export declare const decisionSchema: z.ZodObject<{
16
+ action: z.ZodEnum<{
17
+ set: "set";
18
+ get: "get";
19
+ list: "list";
20
+ search_tags: "search_tags";
21
+ search_layer: "search_layer";
22
+ versions: "versions";
23
+ quick_set: "quick_set";
24
+ search_advanced: "search_advanced";
25
+ set_batch: "set_batch";
26
+ has_updates: "has_updates";
27
+ set_from_template: "set_from_template";
28
+ create_template: "create_template";
29
+ list_templates: "list_templates";
30
+ hard_delete: "hard_delete";
31
+ add_decision_context: "add_decision_context";
32
+ list_decision_contexts: "list_decision_contexts";
33
+ create_policy: "create_policy";
34
+ list_policies: "list_policies";
35
+ set_from_policy: "set_from_policy";
36
+ analytics: "analytics";
37
+ help: "help";
38
+ example: "example";
39
+ use_case: "use_case";
40
+ }>;
41
+ }, z.core.$loose>;
42
+ export declare const constraintSchema: z.ZodObject<{
43
+ action: z.ZodEnum<{
44
+ get: "get";
45
+ help: "help";
46
+ example: "example";
47
+ use_case: "use_case";
48
+ add: "add";
49
+ deactivate: "deactivate";
50
+ suggest_pending: "suggest_pending";
51
+ }>;
52
+ }, z.core.$loose>;
53
+ export declare const helpSchema: z.ZodObject<{
54
+ action: z.ZodEnum<{
55
+ help: "help";
56
+ example: "example";
57
+ query_action: "query_action";
58
+ query_params: "query_params";
59
+ query_tool: "query_tool";
60
+ workflow_hints: "workflow_hints";
61
+ batch_guide: "batch_guide";
62
+ error_recovery: "error_recovery";
63
+ }>;
64
+ tool: z.ZodOptional<z.ZodString>;
65
+ target_action: z.ZodOptional<z.ZodString>;
66
+ current_action: z.ZodOptional<z.ZodString>;
67
+ operation: z.ZodOptional<z.ZodString>;
68
+ error_message: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>;
70
+ export declare const exampleSchema: z.ZodObject<{
71
+ action: z.ZodEnum<{
72
+ search: "search";
73
+ get: "get";
74
+ help: "help";
75
+ example: "example";
76
+ list_all: "list_all";
77
+ }>;
78
+ tool: z.ZodOptional<z.ZodString>;
79
+ action_name: z.ZodOptional<z.ZodString>;
80
+ topic: z.ZodOptional<z.ZodString>;
81
+ keyword: z.ZodOptional<z.ZodString>;
82
+ complexity: z.ZodOptional<z.ZodString>;
83
+ limit: z.ZodOptional<z.ZodNumber>;
84
+ offset: z.ZodOptional<z.ZodNumber>;
85
+ }, z.core.$strip>;
86
+ export declare const useCaseSchema: z.ZodObject<{
87
+ action: z.ZodEnum<{
88
+ search: "search";
89
+ get: "get";
90
+ help: "help";
91
+ example: "example";
92
+ list_all: "list_all";
93
+ }>;
94
+ use_case_id: z.ZodOptional<z.ZodNumber>;
95
+ keyword: z.ZodOptional<z.ZodString>;
96
+ category: z.ZodOptional<z.ZodString>;
97
+ complexity: z.ZodOptional<z.ZodEnum<{
98
+ basic: "basic";
99
+ intermediate: "intermediate";
100
+ advanced: "advanced";
101
+ }>>;
102
+ limit: z.ZodOptional<z.ZodNumber>;
103
+ offset: z.ZodOptional<z.ZodNumber>;
104
+ }, z.core.$strip>;
105
+ export declare const suggestSchema: z.ZodObject<{
106
+ action: z.ZodEnum<{
107
+ help: "help";
108
+ by_key: "by_key";
109
+ by_tags: "by_tags";
110
+ by_context: "by_context";
111
+ check_duplicate: "check_duplicate";
112
+ }>;
113
+ target: z.ZodOptional<z.ZodEnum<{
114
+ decision: "decision";
115
+ constraint: "constraint";
116
+ }>>;
117
+ key: z.ZodOptional<z.ZodString>;
118
+ text: z.ZodOptional<z.ZodString>;
119
+ constraint_text: z.ZodOptional<z.ZodString>;
120
+ category: z.ZodOptional<z.ZodString>;
121
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
+ layer: z.ZodOptional<z.ZodString>;
123
+ priority: z.ZodOptional<z.ZodNumber>;
124
+ limit: z.ZodOptional<z.ZodNumber>;
125
+ min_score: z.ZodOptional<z.ZodNumber>;
126
+ }, z.core.$strict>;
127
+ export declare const queueSchema: z.ZodObject<{
128
+ action: z.ZodEnum<{
129
+ clear: "clear";
130
+ list: "list";
131
+ help: "help";
132
+ example: "example";
133
+ remove: "remove";
134
+ }>;
135
+ index: z.ZodOptional<z.ZodNumber>;
136
+ }, z.core.$strict>;
137
+ /** Tool name → Zod schema mapping */
138
+ export declare const TOOL_SCHEMAS: Record<string, z.ZodType>;
139
+ /** Tool name → description mapping */
140
+ export declare const TOOL_DESCRIPTIONS: Record<string, string>;
141
+ //# sourceMappingURL=tool-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-schemas.d.ts","sourceRoot":"","sources":["../../src/server/tool-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;iBASX,CAAC;AAKjB,eAAO,MAAM,gBAAgB;;;;;;;;;;iBAKb,CAAC;AAKjB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;iBAUrB,CAAC;AAKH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;iBAWxB,CAAC;AAKH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;iBAUxB,CAAC;AAKH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;kBAcf,CAAC;AAKZ,eAAO,MAAM,WAAW;;;;;;;;;kBAKb,CAAC;AAMZ,qCAAqC;AACrC,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAQlD,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsCpD,CAAC"}
@@ -0,0 +1,160 @@
1
+ /**
2
+ * MCP Server - Tool Schemas (Zod)
3
+ * Source of truth for tool input validation and JSON Schema generation.
4
+ *
5
+ * Each schema corresponds to one MCP tool. The Zod schema is used by:
6
+ * 1. registerTool() for automatic input validation
7
+ * 2. toJSONSchema() for ListTools response generation
8
+ *
9
+ * additionalProperties strategy:
10
+ * - decision, constraint: .passthrough() — action-specific params vary per action
11
+ * - help, example, use_case: default (strip) — all params explicitly defined
12
+ * - suggest, queue: .strict() — closed set, unknown params rejected
13
+ */
14
+ import { z } from 'zod';
15
+ // ---------------------------------------------------------------------------
16
+ // decision: action enum + passthrough (additionalProperties: true)
17
+ // ---------------------------------------------------------------------------
18
+ export const decisionSchema = z.object({
19
+ action: z.enum([
20
+ 'set', 'get', 'list', 'search_tags', 'search_layer', 'versions',
21
+ 'quick_set', 'search_advanced', 'set_batch', 'has_updates',
22
+ 'set_from_template', 'create_template', 'list_templates', 'hard_delete',
23
+ 'add_decision_context', 'list_decision_contexts', 'analytics',
24
+ 'create_policy', 'list_policies', 'set_from_policy',
25
+ 'help', 'example', 'use_case',
26
+ ]).describe('Action'),
27
+ }).passthrough();
28
+ // ---------------------------------------------------------------------------
29
+ // constraint: action enum + passthrough (additionalProperties: true)
30
+ // ---------------------------------------------------------------------------
31
+ export const constraintSchema = z.object({
32
+ action: z.enum([
33
+ 'add', 'get', 'deactivate', 'suggest_pending',
34
+ 'help', 'example', 'use_case',
35
+ ]).describe('Action'),
36
+ }).passthrough();
37
+ // ---------------------------------------------------------------------------
38
+ // help: all params explicitly defined (additionalProperties: false by default)
39
+ // ---------------------------------------------------------------------------
40
+ export const helpSchema = z.object({
41
+ action: z.enum([
42
+ 'query_action', 'query_params', 'query_tool', 'workflow_hints',
43
+ 'batch_guide', 'error_recovery', 'help', 'example',
44
+ ]).describe('Help action to perform'),
45
+ tool: z.string().describe('Target tool name (for query_action, query_params, query_tool, workflow_hints)').optional(),
46
+ target_action: z.string().describe('Target action name (for query_action, query_params)').optional(),
47
+ current_action: z.string().describe('Current action name (for workflow_hints)').optional(),
48
+ operation: z.string().describe('Batch operation name in format "tool.action" (for batch_guide)').optional(),
49
+ error_message: z.string().describe('Error message to analyze (for error_recovery)').optional(),
50
+ });
51
+ // ---------------------------------------------------------------------------
52
+ // example: all params explicitly defined (additionalProperties: false by default)
53
+ // ---------------------------------------------------------------------------
54
+ export const exampleSchema = z.object({
55
+ action: z.enum([
56
+ 'get', 'search', 'list_all', 'help', 'example',
57
+ ]).describe('Example action to perform'),
58
+ tool: z.string().describe('Filter by tool name (for get, search, list_all)').optional(),
59
+ action_name: z.string().describe('Filter by action name (for get, search)').optional(),
60
+ topic: z.string().describe('Search by topic in title or explanation (for get)').optional(),
61
+ keyword: z.string().describe('Keyword to search (for search)').optional(),
62
+ complexity: z.string().describe('Filter by complexity: basic|intermediate|advanced (for search, list_all)').optional(),
63
+ limit: z.number().describe('Maximum results to return (default: 20, for list_all)').optional(),
64
+ offset: z.number().describe('Result offset for pagination (default: 0, for list_all)').optional(),
65
+ });
66
+ // ---------------------------------------------------------------------------
67
+ // use_case: all params explicitly defined (additionalProperties: false by default)
68
+ // ---------------------------------------------------------------------------
69
+ export const useCaseSchema = z.object({
70
+ action: z.enum([
71
+ 'get', 'search', 'list_all', 'help', 'example',
72
+ ]).describe('Use case action to perform'),
73
+ use_case_id: z.number().describe('Use case ID to retrieve (for get)').optional(),
74
+ keyword: z.string().describe('Search keyword - searches title and description (for search)').optional(),
75
+ category: z.string().describe('Filter by category (optional for search, list_all)').optional(),
76
+ complexity: z.enum(['basic', 'intermediate', 'advanced']).describe('Filter by complexity level').optional(),
77
+ limit: z.number().describe('Maximum results to return (default: 20, for list_all)').optional(),
78
+ offset: z.number().describe('Result offset for pagination (default: 0, for list_all)').optional(),
79
+ });
80
+ // ---------------------------------------------------------------------------
81
+ // suggest: strict (additionalProperties: false)
82
+ // ---------------------------------------------------------------------------
83
+ export const suggestSchema = z.object({
84
+ action: z.enum([
85
+ 'by_key', 'by_tags', 'by_context', 'check_duplicate', 'help',
86
+ ]).describe('Suggestion action to perform'),
87
+ target: z.enum(['decision', 'constraint']).describe('Target type for suggestions (default: decision)').optional(),
88
+ key: z.string().describe('Decision key (for by_key, by_context, check_duplicate when target=decision)').optional(),
89
+ text: z.string().describe('Constraint text to search (for by_key, by_context, check_duplicate when target=constraint)').optional(),
90
+ constraint_text: z.string().describe('Alias for text parameter (constraint text to search)').optional(),
91
+ category: z.string().describe('Constraint category filter (optional, when target=constraint)').optional(),
92
+ tags: z.array(z.string()).describe('Tags array (for by_tags, by_context)').optional(),
93
+ layer: z.string().describe('Layer filter (optional)').optional(),
94
+ priority: z.number().describe('Priority level (optional)').optional(),
95
+ limit: z.number().describe('Max suggestions (default: 5)').optional(),
96
+ min_score: z.number().describe('Minimum relevance score (default: 30)').optional(),
97
+ }).strict();
98
+ // ---------------------------------------------------------------------------
99
+ // queue: strict (additionalProperties: false)
100
+ // ---------------------------------------------------------------------------
101
+ export const queueSchema = z.object({
102
+ action: z.enum([
103
+ 'list', 'clear', 'remove', 'help', 'example',
104
+ ]).describe('Queue action to perform'),
105
+ index: z.number().describe('Item index for remove action (0-based)').optional(),
106
+ }).strict();
107
+ // ---------------------------------------------------------------------------
108
+ // Aggregated exports
109
+ // ---------------------------------------------------------------------------
110
+ /** Tool name → Zod schema mapping */
111
+ export const TOOL_SCHEMAS = {
112
+ decision: decisionSchema,
113
+ constraint: constraintSchema,
114
+ help: helpSchema,
115
+ example: exampleSchema,
116
+ use_case: useCaseSchema,
117
+ suggest: suggestSchema,
118
+ queue: queueSchema,
119
+ };
120
+ /** Tool name → description mapping */
121
+ export const TOOL_DESCRIPTIONS = {
122
+ decision: 'Context Management - Store decisions with versioning and metadata. Use action: "help" for documentation.',
123
+ constraint: 'Architectural Rules - Define and manage project constraints with priorities. Use action: "help" for documentation.',
124
+ help: `**REQUIRED PARAMETER**: action (must be specified in ALL calls)
125
+
126
+ Help System - Query action documentation, parameters, and workflow guidance
127
+
128
+ Actions:
129
+ - query_action: Get action documentation with parameters and examples
130
+ - query_params: Get parameter list only (quick reference)
131
+ - query_tool: Get tool overview and all actions
132
+ - workflow_hints: Get common next actions after current action
133
+ - batch_guide: Get guidance for batch operations
134
+ - error_recovery: Analyze errors and suggest fixes
135
+
136
+ Use this tool to understand how to use other sqlew tools. Returns only requested information (80-95% token reduction vs legacy help).`,
137
+ example: `**REQUIRED PARAMETER**: action (must be specified in ALL calls)
138
+
139
+ Example System - Browse and search code examples for sqlew tools
140
+
141
+ Actions:
142
+ - get: Get examples by tool, action, or topic
143
+ - search: Search examples by keyword
144
+ - list_all: List all available examples with filtering
145
+
146
+ Use this tool to find working code snippets. Returns only requested examples (token-efficient).`,
147
+ use_case: `**REQUIRED PARAMETER**: action (must be specified in ALL calls)
148
+
149
+ Use Case Catalog - Browse and search complete workflow scenarios
150
+
151
+ Actions:
152
+ - get: Get complete use case workflow by ID
153
+ - search: Search use cases by keyword/category
154
+ - list_all: List all use cases with filtering and pagination
155
+
156
+ Use this tool to learn end-to-end workflows and multi-step operations. Returns workflow steps with executable code examples.`,
157
+ suggest: 'Intelligent decision/constraint suggestion system. Find related decisions by key pattern, tags, or full context. Prevents duplicates and ensures consistency.',
158
+ queue: 'Hook queue management - list, clear, remove pending items from .sqlew/queue/pending.json. Use action: "help" for documentation.',
159
+ };
160
+ //# sourceMappingURL=tool-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-schemas.js","sourceRoot":"","sources":["../../src/server/tool-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,mEAAmE;AACn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O,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS;KAC7C,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC,CAAC,QAAQ,EAAE;CAChF,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,8EAA8E;AAC9E,qBAAqB;AACrB,8EAA8E;AAE9E,qCAAqC;AACrC,MAAM,CAAC,MAAM,YAAY,GAA8B;IACrD,QAAQ,EAAE,cAAc;IACxB,UAAU,EAAE,gBAAgB;IAC5B,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,aAAa;IACvB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,sCAAsC;AACtC,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,QAAQ,EAAE,0GAA0G;IACpH,UAAU,EAAE,oHAAoH;IAChI,IAAI,EAAE;;;;;;;;;;;;sIAY8H;IACpI,OAAO,EAAE;;;;;;;;;gGASqF;IAC9F,QAAQ,EAAE;;;;;;;;;6HASiH;IAC3H,OAAO,EAAE,+JAA+J;IACxK,KAAK,EAAE,iIAAiI;CACzI,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sqlew",
3
3
  "description": "Automated ADR (Architecture Decision Records) for Claude Code - MCP server with SQL-backed decision repository",
4
- "version": "5.0.6",
4
+ "version": "5.0.7",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "bin": {
@@ -72,7 +72,8 @@
72
72
  "knex-schema-inspector": "^3.1.0",
73
73
  "mysql2": "^3.15.3",
74
74
  "pg": "^8.16.3",
75
- "smol-toml": "^1.4.2"
75
+ "smol-toml": "^1.4.2",
76
+ "zod": "^4.0.0"
76
77
  },
77
78
  "devDependencies": {
78
79
  "@types/better-sqlite3": "^7.6.0",