claude-code-workflow 6.3.48 → 6.3.49

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 (211) hide show
  1. package/.claude/CLAUDE.md +6 -8
  2. package/.claude/agents/action-planning-agent.md +28 -45
  3. package/.claude/agents/cli-lite-planning-agent.md +93 -1
  4. package/.claude/agents/code-developer.md +144 -27
  5. package/.claude/commands/ccw-coordinator.md +175 -21
  6. package/.claude/commands/ccw-debug.md +832 -0
  7. package/.claude/commands/ccw.md +90 -9
  8. package/.claude/commands/cli/cli-init.md +1 -0
  9. package/.claude/commands/issue/convert-to-plan.md +718 -0
  10. package/.claude/commands/issue/from-brainstorm.md +382 -0
  11. package/.claude/commands/memory/tips.md +332 -0
  12. package/.claude/commands/workflow/analyze-with-file.md +804 -0
  13. package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
  14. package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
  15. package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
  16. package/.claude/commands/workflow/debug-with-file.md +7 -5
  17. package/.claude/commands/workflow/execute.md +6 -4
  18. package/.claude/commands/workflow/lite-plan.md +2 -2
  19. package/.claude/commands/workflow/plan-verify.md +162 -327
  20. package/.claude/commands/workflow/plan.md +162 -26
  21. package/.claude/commands/workflow/replan.md +78 -2
  22. package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
  23. package/.claude/commands/workflow/review-module-cycle.md +2 -2
  24. package/.claude/commands/workflow/review-session-cycle.md +2 -2
  25. package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
  26. package/.claude/commands/workflow/tools/context-gather.md +81 -118
  27. package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
  28. package/.claude/skills/ccw-help/command.json +4 -4
  29. package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
  30. package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
  31. package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
  32. package/.claude/skills/skill-generator/SKILL.md +277 -85
  33. package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
  34. package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
  35. package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
  36. package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
  37. package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
  38. package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
  39. package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
  40. package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
  41. package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
  42. package/.claude/skills/skill-generator/templates/script-template.md +368 -0
  43. package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
  44. package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
  45. package/.claude/skills/skill-tuning/SKILL.md +130 -266
  46. package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
  47. package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
  48. package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
  49. package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
  50. package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
  51. package/.claude/workflows/cli-tools-usage.md +1 -1
  52. package/.codex/AGENTS.md +1 -3
  53. package/.codex/prompts/analyze-with-file.md +607 -0
  54. package/.codex/prompts/brainstorm-to-cycle.md +455 -0
  55. package/.codex/prompts/brainstorm-with-file.md +933 -0
  56. package/.codex/prompts/debug-with-file.md +15 -20
  57. package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
  58. package/ccw/dist/commands/cli.d.ts.map +1 -1
  59. package/ccw/dist/commands/cli.js +29 -5
  60. package/ccw/dist/commands/cli.js.map +1 -1
  61. package/ccw/dist/commands/issue.d.ts +2 -0
  62. package/ccw/dist/commands/issue.d.ts.map +1 -1
  63. package/ccw/dist/commands/issue.js +62 -20
  64. package/ccw/dist/commands/issue.js.map +1 -1
  65. package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
  66. package/ccw/dist/config/litellm-api-config-manager.js +5 -3
  67. package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
  68. package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
  69. package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
  70. package/ccw/dist/config/litellm-provider-models.js +172 -0
  71. package/ccw/dist/config/litellm-provider-models.js.map +1 -0
  72. package/ccw/dist/config/provider-models.d.ts +25 -51
  73. package/ccw/dist/config/provider-models.d.ts.map +1 -1
  74. package/ccw/dist/config/provider-models.js +84 -149
  75. package/ccw/dist/config/provider-models.js.map +1 -1
  76. package/ccw/dist/config/storage-paths.d.ts.map +1 -1
  77. package/ccw/dist/config/storage-paths.js +23 -5
  78. package/ccw/dist/config/storage-paths.js.map +1 -1
  79. package/ccw/dist/core/auth/csrf-middleware.js +3 -3
  80. package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
  81. package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
  82. package/ccw/dist/core/dashboard-generator.js +3 -1
  83. package/ccw/dist/core/dashboard-generator.js.map +1 -1
  84. package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
  85. package/ccw/dist/core/routes/claude-routes.js +206 -14
  86. package/ccw/dist/core/routes/claude-routes.js.map +1 -1
  87. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  88. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  89. package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
  90. package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
  91. package/ccw/dist/core/routes/commands-routes.js +480 -0
  92. package/ccw/dist/core/routes/commands-routes.js.map +1 -0
  93. package/ccw/dist/core/routes/model-routes.d.ts +11 -0
  94. package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
  95. package/ccw/dist/core/routes/model-routes.js +112 -0
  96. package/ccw/dist/core/routes/model-routes.js.map +1 -0
  97. package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
  98. package/ccw/dist/core/routes/nav-status-routes.js +84 -1
  99. package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
  100. package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
  101. package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
  102. package/ccw/dist/core/routes/provider-routes.js +67 -0
  103. package/ccw/dist/core/routes/provider-routes.js.map +1 -0
  104. package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
  105. package/ccw/dist/core/routes/skills-routes.js +219 -7
  106. package/ccw/dist/core/routes/skills-routes.js.map +1 -1
  107. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
  108. package/ccw/dist/core/routes/system-routes.js +58 -6
  109. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  110. package/ccw/dist/core/server.d.ts.map +1 -1
  111. package/ccw/dist/core/server.js +13 -0
  112. package/ccw/dist/core/server.js.map +1 -1
  113. package/ccw/dist/mcp-server/index.js +2 -2
  114. package/ccw/dist/mcp-server/index.js.map +1 -1
  115. package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
  116. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  117. package/ccw/dist/tools/claude-cli-tools.js +146 -50
  118. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  119. package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
  120. package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
  121. package/ccw/dist/tools/cli-config-manager.js +3 -27
  122. package/ccw/dist/tools/cli-config-manager.js.map +1 -1
  123. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  124. package/ccw/dist/tools/cli-executor-core.js +7 -2
  125. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  126. package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
  127. package/ccw/dist/tools/cli-history-store.d.ts +11 -0
  128. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
  129. package/ccw/dist/tools/cli-history-store.js +82 -2
  130. package/ccw/dist/tools/cli-history-store.js.map +1 -1
  131. package/ccw/dist/tools/command-registry.d.ts +7 -0
  132. package/ccw/dist/tools/command-registry.d.ts.map +1 -1
  133. package/ccw/dist/tools/command-registry.js +14 -1
  134. package/ccw/dist/tools/command-registry.js.map +1 -1
  135. package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
  136. package/ccw/dist/tools/generate-module-docs.js +11 -7
  137. package/ccw/dist/tools/generate-module-docs.js.map +1 -1
  138. package/ccw/dist/tools/litellm-executor.d.ts +1 -0
  139. package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
  140. package/ccw/dist/tools/litellm-executor.js +11 -9
  141. package/ccw/dist/tools/litellm-executor.js.map +1 -1
  142. package/ccw/dist/types/skill-types.d.ts +97 -0
  143. package/ccw/dist/types/skill-types.d.ts.map +1 -0
  144. package/ccw/dist/types/skill-types.js +6 -0
  145. package/ccw/dist/types/skill-types.js.map +1 -0
  146. package/ccw/src/commands/cli.ts +36 -5
  147. package/ccw/src/commands/issue.ts +81 -26
  148. package/ccw/src/config/litellm-api-config-manager.ts +5 -3
  149. package/ccw/src/config/litellm-provider-models.ts +222 -0
  150. package/ccw/src/config/provider-models.ts +91 -190
  151. package/ccw/src/config/storage-paths.ts +20 -5
  152. package/ccw/src/core/auth/csrf-middleware.ts +3 -3
  153. package/ccw/src/core/dashboard-generator.ts +3 -1
  154. package/ccw/src/core/routes/claude-routes.ts +233 -15
  155. package/ccw/src/core/routes/cli-routes.ts +2 -3
  156. package/ccw/src/core/routes/commands-routes.ts +620 -0
  157. package/ccw/src/core/routes/nav-status-routes.ts +95 -1
  158. package/ccw/src/core/routes/provider-routes.ts +78 -0
  159. package/ccw/src/core/routes/skills-routes.ts +266 -45
  160. package/ccw/src/core/routes/system-routes.ts +102 -50
  161. package/ccw/src/core/server.ts +13 -0
  162. package/ccw/src/mcp-server/index.ts +2 -2
  163. package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
  164. package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
  165. package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
  166. package/ccw/src/templates/dashboard-js/i18n.js +116 -0
  167. package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
  168. package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
  169. package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
  170. package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
  171. package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
  172. package/ccw/src/templates/dashboard.html +7 -0
  173. package/ccw/src/tools/claude-cli-tools.ts +170 -56
  174. package/ccw/src/tools/cli-config-manager.ts +2 -33
  175. package/ccw/src/tools/cli-executor-core.ts +8 -2
  176. package/ccw/src/tools/cli-history-store.ts +92 -2
  177. package/ccw/src/tools/command-registry.ts +16 -1
  178. package/ccw/src/tools/generate-module-docs.ts +11 -7
  179. package/ccw/src/tools/litellm-executor.ts +13 -9
  180. package/ccw/src/types/skill-types.ts +99 -0
  181. package/package.json +1 -1
  182. package/.claude/commands/enhance-prompt.md +0 -93
  183. package/.claude/commands/memory/code-map-memory.md +0 -687
  184. package/.claude/commands/memory/docs.md +0 -615
  185. package/.claude/commands/memory/load-skill-memory.md +0 -182
  186. package/.claude/commands/memory/skill-memory.md +0 -525
  187. package/.claude/commands/memory/swagger-docs.md +0 -773
  188. package/.claude/commands/memory/tech-research-rules.md +0 -310
  189. package/.claude/commands/memory/workflow-skill-memory.md +0 -517
  190. package/.claude/commands/task/breakdown.md +0 -208
  191. package/.claude/commands/task/create.md +0 -152
  192. package/.claude/commands/task/execute.md +0 -270
  193. package/.claude/commands/task/replan.md +0 -441
  194. package/.claude/commands/version.md +0 -254
  195. package/.claude/commands/workflow/action-plan-verify.md +0 -485
  196. package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
  197. package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
  198. package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
  199. package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
  200. package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
  201. package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
  202. package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
  203. package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
  204. package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
  205. package/.claude/commands/workflow/debug.md +0 -331
  206. package/.claude/commands/workflow/develop-with-file.md +0 -1044
  207. package/.claude/skills/ccw-loop/README.md +0 -303
  208. package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
  209. package/.claude/skills/skill-generator/templates/script-python.md +0 -198
  210. package/.codex/prompts/debug.md +0 -318
  211. package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
@@ -6,6 +6,7 @@ import type { Server } from 'http';
6
6
  import { readFileSync, existsSync, promises as fsPromises } from 'fs';
7
7
  import { join } from 'path';
8
8
  import { resolvePath, getRecentPaths, trackRecentPath, removeRecentPath, normalizePathForDisplay } from '../../utils/path-resolver.js';
9
+ import { validatePath as validateAllowedPath } from '../../utils/path-validator.js';
9
10
  import { scanSessions } from '../session-scanner.js';
10
11
  import { aggregateData } from '../data-aggregator.js';
11
12
  import {
@@ -276,26 +277,47 @@ export async function handleSystemRoutes(ctx: SystemRouteContext): Promise<boole
276
277
  return true;
277
278
  }
278
279
 
279
- // API: Read a JSON file (for fix progress tracking)
280
- if (pathname === '/api/file') {
281
- const filePath = url.searchParams.get('path');
282
- if (!filePath) {
283
- res.writeHead(400, { 'Content-Type': 'application/json' });
284
- res.end(JSON.stringify({ error: 'File path is required' }));
285
- return true;
286
- }
287
-
288
- try {
289
- const content = await fsPromises.readFile(filePath, 'utf-8');
290
- const json = JSON.parse(content);
291
- res.writeHead(200, { 'Content-Type': 'application/json' });
292
- res.end(JSON.stringify(json));
293
- } catch (err) {
294
- res.writeHead(404, { 'Content-Type': 'application/json' });
295
- res.end(JSON.stringify({ error: 'File not found or invalid JSON' }));
296
- }
297
- return true;
298
- }
280
+ // API: Read a JSON file (for fix progress tracking)
281
+ if (pathname === '/api/file') {
282
+ const filePath = url.searchParams.get('path');
283
+ if (!filePath) {
284
+ res.writeHead(400, { 'Content-Type': 'application/json' });
285
+ res.end(JSON.stringify({ error: 'File path is required' }));
286
+ return true;
287
+ }
288
+
289
+ let validatedPath: string;
290
+ try {
291
+ // Validate path is within allowed directories (fix: sec-001-a1b2c3d4)
292
+ validatedPath = await validateAllowedPath(filePath, { mustExist: true, allowedDirectories: [initialPath] });
293
+ } catch (err) {
294
+ const message = err instanceof Error ? err.message : String(err);
295
+ const status = message.includes('Access denied') ? 403 : (message.includes('File not found') ? 404 : 400);
296
+ console.error(`[System] Path validation failed: ${message}`);
297
+ res.writeHead(status, { 'Content-Type': 'application/json' });
298
+ res.end(JSON.stringify({
299
+ error: status === 403 ? 'Access denied' : (status === 404 ? 'File not found' : 'Invalid path')
300
+ }));
301
+ return true;
302
+ }
303
+
304
+ try {
305
+ const content = await fsPromises.readFile(validatedPath, 'utf-8');
306
+ const json = JSON.parse(content);
307
+ res.writeHead(200, { 'Content-Type': 'application/json' });
308
+ res.end(JSON.stringify(json));
309
+ } catch (err: unknown) {
310
+ const errno = typeof err === 'object' && err !== null && 'code' in err ? String((err as any).code) : null;
311
+ const status = err instanceof SyntaxError ? 400 : (errno === 'EACCES' ? 403 : 404);
312
+ const message = err instanceof Error ? err.message : String(err);
313
+ console.error(`[System] Failed to read JSON file: ${message}`);
314
+ res.writeHead(status, { 'Content-Type': 'application/json' });
315
+ res.end(JSON.stringify({
316
+ error: status === 403 ? 'Access denied' : (status === 400 ? 'Invalid JSON' : 'File not found')
317
+ }));
318
+ }
319
+ return true;
320
+ }
299
321
 
300
322
  // API: System notify - CLI to Server communication bridge
301
323
  // Allows CLI commands to trigger WebSocket broadcasts for UI updates
@@ -437,10 +459,23 @@ export async function handleSystemRoutes(ctx: SystemRouteContext): Promise<boole
437
459
  targetPath = path.join(os.homedir(), targetPath.slice(1));
438
460
  }
439
461
 
440
- // Resolve to absolute path
441
- if (!path.isAbsolute(targetPath)) {
442
- targetPath = path.resolve(targetPath);
443
- }
462
+ // Resolve to absolute path
463
+ if (!path.isAbsolute(targetPath)) {
464
+ targetPath = path.resolve(targetPath);
465
+ }
466
+
467
+ // Validate path is within allowed directories (fix: sec-003-c3d4e5f6)
468
+ try {
469
+ targetPath = await validateAllowedPath(targetPath, {
470
+ mustExist: true,
471
+ allowedDirectories: [initialPath, os.homedir()]
472
+ });
473
+ } catch (err) {
474
+ const message = err instanceof Error ? err.message : String(err);
475
+ const status = message.includes('Access denied') ? 403 : 400;
476
+ console.error(`[System] Path validation failed: ${message}`);
477
+ return { error: status === 403 ? 'Access denied' : 'Invalid path', status };
478
+ }
444
479
 
445
480
  try {
446
481
  const stat = await fs.promises.stat(targetPath);
@@ -464,18 +499,20 @@ export async function handleSystemRoutes(ctx: SystemRouteContext): Promise<boole
464
499
  return a.name.localeCompare(b.name);
465
500
  });
466
501
 
467
- return {
468
- currentPath: targetPath,
469
- parentPath: path.dirname(targetPath),
470
- items,
471
- homePath: os.homedir()
472
- };
473
- } catch (err) {
474
- return { error: 'Cannot access directory: ' + (err as Error).message, status: 400 };
475
- }
476
- });
477
- return true;
478
- }
502
+ return {
503
+ currentPath: targetPath,
504
+ parentPath: path.dirname(targetPath),
505
+ items,
506
+ homePath: os.homedir()
507
+ };
508
+ } catch (err) {
509
+ const message = err instanceof Error ? err.message : String(err);
510
+ console.error(`[System] Failed to browse directory: ${message}`);
511
+ return { error: 'Cannot access directory', status: 400 };
512
+ }
513
+ });
514
+ return true;
515
+ }
479
516
 
480
517
  // API: File dialog - select file (validate path exists)
481
518
  if (pathname === '/api/dialog/open-file' && req.method === 'POST') {
@@ -497,10 +534,23 @@ export async function handleSystemRoutes(ctx: SystemRouteContext): Promise<boole
497
534
  targetPath = path.join(os.homedir(), targetPath.slice(1));
498
535
  }
499
536
 
500
- // Resolve to absolute path
501
- if (!path.isAbsolute(targetPath)) {
502
- targetPath = path.resolve(targetPath);
503
- }
537
+ // Resolve to absolute path
538
+ if (!path.isAbsolute(targetPath)) {
539
+ targetPath = path.resolve(targetPath);
540
+ }
541
+
542
+ // Validate path is within allowed directories (fix: sec-003-c3d4e5f6)
543
+ try {
544
+ targetPath = await validateAllowedPath(targetPath, {
545
+ mustExist: true,
546
+ allowedDirectories: [initialPath, os.homedir()]
547
+ });
548
+ } catch (err) {
549
+ const message = err instanceof Error ? err.message : String(err);
550
+ const status = message.includes('Access denied') ? 403 : 400;
551
+ console.error(`[System] Path validation failed: ${message}`);
552
+ return { error: status === 403 ? 'Access denied' : 'Invalid path', status };
553
+ }
504
554
 
505
555
  try {
506
556
  await fs.promises.access(targetPath, fs.constants.R_OK);
@@ -508,16 +558,18 @@ export async function handleSystemRoutes(ctx: SystemRouteContext): Promise<boole
508
558
 
509
559
  return {
510
560
  success: true,
511
- path: targetPath,
512
- isFile: stat.isFile(),
513
- isDirectory: stat.isDirectory()
514
- };
515
- } catch {
516
- return { error: 'File not accessible', status: 404 };
517
- }
518
- });
519
- return true;
520
- }
561
+ path: targetPath,
562
+ isFile: stat.isFile(),
563
+ isDirectory: stat.isDirectory()
564
+ };
565
+ } catch (err: unknown) {
566
+ const errno = typeof err === 'object' && err !== null && 'code' in err ? String((err as any).code) : null;
567
+ const status = errno === 'EACCES' ? 403 : 404;
568
+ return { error: status === 403 ? 'Access denied' : 'File not accessible', status };
569
+ }
570
+ });
571
+ return true;
572
+ }
521
573
 
522
574
  return false;
523
575
  }
@@ -8,6 +8,7 @@ import { resolvePath, getRecentPaths, normalizePathForDisplay } from '../utils/p
8
8
  import { handleStatusRoutes } from './routes/status-routes.js';
9
9
  import { handleCliRoutes, cleanupStaleExecutions } from './routes/cli-routes.js';
10
10
  import { handleCliSettingsRoutes } from './routes/cli-settings-routes.js';
11
+ import { handleProviderRoutes } from './routes/provider-routes.js';
11
12
  import { handleMemoryRoutes } from './routes/memory-routes.js';
12
13
  import { handleCoreMemoryRoutes } from './routes/core-memory-routes.js';
13
14
  import { handleMcpRoutes } from './routes/mcp-routes.js';
@@ -17,6 +18,7 @@ import { handleGraphRoutes } from './routes/graph-routes.js';
17
18
  import { handleSystemRoutes } from './routes/system-routes.js';
18
19
  import { handleFilesRoutes } from './routes/files-routes.js';
19
20
  import { handleSkillsRoutes } from './routes/skills-routes.js';
21
+ import { handleCommandsRoutes } from './routes/commands-routes.js';
20
22
  import { handleIssueRoutes } from './routes/issue-routes.js';
21
23
  import { handleDiscoveryRoutes } from './routes/discovery-routes.js';
22
24
  import { handleRulesRoutes } from './routes/rules-routes.js';
@@ -162,6 +164,7 @@ const MODULE_FILES = [
162
164
  'views/prompt-history.js',
163
165
  'views/skills-manager.js',
164
166
  'views/rules-manager.js',
167
+ 'views/commands-manager.js',
165
168
  'views/claude-manager.js',
166
169
  'views/api-settings.js',
167
170
  'views/help.js',
@@ -518,6 +521,11 @@ export async function startServer(options: ServerOptions = {}): Promise<http.Ser
518
521
  if (await handleCliRoutes(routeContext)) return;
519
522
  }
520
523
 
524
+ // Provider routes (/api/providers/*)
525
+ if (pathname.startsWith('/api/providers')) {
526
+ if (await handleProviderRoutes(routeContext)) return;
527
+ }
528
+
521
529
  // Claude CLAUDE.md routes (/api/memory/claude/*) and Language routes (/api/language/*)
522
530
  if (pathname.startsWith('/api/memory/claude/') || pathname.startsWith('/api/language/')) {
523
531
  if (await handleClaudeRoutes(routeContext)) return;
@@ -594,6 +602,11 @@ export async function startServer(options: ServerOptions = {}): Promise<http.Ser
594
602
  if (await handleSkillsRoutes(routeContext)) return;
595
603
  }
596
604
 
605
+ // Commands routes (/api/commands*)
606
+ if (pathname.startsWith('/api/commands')) {
607
+ if (await handleCommandsRoutes(routeContext)) return;
608
+ }
609
+
597
610
  // Queue routes (/api/queue*) - top-level queue API
598
611
  if (pathname.startsWith('/api/queue')) {
599
612
  if (await handleIssueRoutes(routeContext)) return;
@@ -21,8 +21,8 @@ const SERVER_VERSION = '6.2.0';
21
21
  const ENV_PROJECT_ROOT = 'CCW_PROJECT_ROOT';
22
22
  const ENV_ALLOWED_DIRS = 'CCW_ALLOWED_DIRS';
23
23
 
24
- // Default enabled tools (core set)
25
- const DEFAULT_TOOLS: string[] = ['write_file', 'edit_file', 'read_file', 'smart_search', 'core_memory', 'context_cache'];
24
+ // Default enabled tools (core set - file operations and core memory only)
25
+ const DEFAULT_TOOLS: string[] = ['write_file', 'edit_file', 'read_file', 'core_memory'];
26
26
 
27
27
  /**
28
28
  * Get list of enabled tools from environment or defaults
@@ -65,6 +65,41 @@
65
65
  .cli-setting-control {
66
66
  margin-bottom: 0.5rem;
67
67
  flex-shrink: 0;
68
+ display: flex;
69
+ align-items: center;
70
+ gap: 0.5rem;
71
+ }
72
+
73
+ /* Small icon button for refresh etc */
74
+ .btn-icon-sm {
75
+ display: inline-flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ width: 24px;
79
+ height: 24px;
80
+ padding: 0;
81
+ border: 1px solid hsl(var(--border));
82
+ border-radius: 0.375rem;
83
+ background: hsl(var(--background));
84
+ color: hsl(var(--muted-foreground));
85
+ cursor: pointer;
86
+ transition: all 0.15s ease;
87
+ }
88
+
89
+ .btn-icon-sm:hover:not(:disabled) {
90
+ border-color: hsl(var(--primary) / 0.5);
91
+ color: hsl(var(--primary));
92
+ background: hsl(var(--primary) / 0.05);
93
+ }
94
+
95
+ .btn-icon-sm:disabled {
96
+ opacity: 0.5;
97
+ cursor: not-allowed;
98
+ }
99
+
100
+ .btn-icon-sm i {
101
+ width: 12px;
102
+ height: 12px;
68
103
  }
69
104
 
70
105
  .cli-setting-select {
@@ -0,0 +1,193 @@
1
+ /* ==========================================
2
+ COMMANDS MANAGER STYLES
3
+ ========================================== */
4
+
5
+ /* Commands Manager */
6
+ .commands-manager {
7
+ width: 100%;
8
+ }
9
+
10
+ .commands-manager.loading {
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: center;
14
+ justify-content: center;
15
+ min-height: 300px;
16
+ color: hsl(var(--muted-foreground));
17
+ }
18
+
19
+ /* Commands Header */
20
+ .commands-header {
21
+ width: 100%;
22
+ }
23
+
24
+ /* Commands Stats */
25
+ .commands-stats {
26
+ width: 100%;
27
+ }
28
+
29
+ /* Accordion Groups */
30
+ .commands-accordion {
31
+ width: 100%;
32
+ }
33
+
34
+ .accordion-group {
35
+ width: 100%;
36
+ }
37
+
38
+ .accordion-header {
39
+ user-select: none;
40
+ }
41
+
42
+ .accordion-header:active {
43
+ transform: scale(0.995);
44
+ }
45
+
46
+ .accordion-content {
47
+ animation: expandAccordion 0.2s ease-out;
48
+ }
49
+
50
+ @keyframes expandAccordion {
51
+ from {
52
+ opacity: 0;
53
+ max-height: 0;
54
+ }
55
+ to {
56
+ opacity: 1;
57
+ max-height: 2000px;
58
+ }
59
+ }
60
+
61
+ /* Commands Grid */
62
+ .commands-grid {
63
+ width: 100%;
64
+ }
65
+
66
+ /* Command Card */
67
+ .command-card {
68
+ position: relative;
69
+ transition: all 0.2s ease;
70
+ }
71
+
72
+ .command-card:hover {
73
+ border-color: hsl(var(--primary));
74
+ transform: translateY(-2px);
75
+ }
76
+
77
+ /* Toggle Switch */
78
+ .command-toggle-switch {
79
+ display: inline-block;
80
+ position: relative;
81
+ }
82
+
83
+ .command-toggle-switch input {
84
+ opacity: 0;
85
+ width: 0;
86
+ height: 0;
87
+ }
88
+
89
+ .command-toggle-slider {
90
+ position: relative;
91
+ display: block;
92
+ cursor: pointer;
93
+ user-select: none;
94
+ }
95
+
96
+ .command-toggle-slider::before {
97
+ position: absolute;
98
+ content: "";
99
+ height: 18px;
100
+ width: 18px;
101
+ left: 2px;
102
+ top: 50%;
103
+ transform: translateY(-50%);
104
+ background-color: white;
105
+ transition: 0.2s;
106
+ border-radius: 50%;
107
+ }
108
+
109
+ .command-toggle-switch input:checked + .command-toggle-slider::before {
110
+ transform: translate(20px, -50%);
111
+ }
112
+
113
+ .command-toggle-switch input:disabled + .command-toggle-slider {
114
+ opacity: 0.6;
115
+ cursor: not-allowed;
116
+ }
117
+
118
+ /* Disabled Command State */
119
+ .command-card.opacity-60 {
120
+ opacity: 0.6;
121
+ filter: grayscale(0.3);
122
+ }
123
+
124
+ .command-card.opacity-60:hover {
125
+ opacity: 0.8;
126
+ }
127
+
128
+ /* Line clamp utility for card descriptions */
129
+ .line-clamp-2 {
130
+ display: -webkit-box;
131
+ -webkit-line-clamp: 2;
132
+ -webkit-box-orient: vertical;
133
+ overflow: hidden;
134
+ }
135
+
136
+ /* Responsive adjustments */
137
+ @media (max-width: 768px) {
138
+ .commands-grid {
139
+ grid-template-columns: 1fr;
140
+ }
141
+
142
+ .commands-stats .grid {
143
+ grid-template-columns: 1fr;
144
+ }
145
+
146
+ .accordion-header {
147
+ flex-wrap: wrap;
148
+ }
149
+ }
150
+
151
+ /* Badge styles for groups */
152
+ .command-card .badge {
153
+ font-size: 0.75rem;
154
+ font-weight: 500;
155
+ }
156
+
157
+ /* Hover effects */
158
+ .accordion-header:hover {
159
+ background-color: hsl(var(--hover));
160
+ }
161
+
162
+ /* Active state for toggle button */
163
+ .commands-header button.bg-primary {
164
+ background-color: hsl(var(--primary));
165
+ color: hsl(var(--primary-foreground));
166
+ }
167
+
168
+ .commands-header button.bg-muted {
169
+ background-color: hsl(var(--muted));
170
+ color: hsl(var(--muted-foreground));
171
+ }
172
+
173
+ /* Smooth transitions */
174
+ .command-toggle-slider,
175
+ .command-toggle-slider::before {
176
+ transition: all 0.2s ease;
177
+ }
178
+
179
+ /* Icon animations */
180
+ .accordion-header i[data-lucide="chevron-down"],
181
+ .accordion-header i[data-lucide="chevron-right"] {
182
+ transition: transform 0.2s ease;
183
+ }
184
+
185
+ /* Focus states for accessibility */
186
+ .command-toggle-switch input:focus + .command-toggle-slider {
187
+ box-shadow: 0 0 0 2px hsl(var(--ring));
188
+ }
189
+
190
+ /* Tooltip for disabled date */
191
+ .command-card .text-muted-foreground\/70 {
192
+ opacity: 0.7;
193
+ }
@@ -143,6 +143,8 @@ function initNavigation() {
143
143
  renderSkillsManager();
144
144
  } else if (currentView === 'rules-manager') {
145
145
  renderRulesManager();
146
+ } else if (currentView === 'commands-manager') {
147
+ renderCommandsManager();
146
148
  } else if (currentView === 'claude-manager') {
147
149
  renderClaudeManager();
148
150
  // Register destroy function for claude-manager view
@@ -223,6 +225,8 @@ function updateContentTitle() {
223
225
  titleEl.textContent = t('title.skillsManager');
224
226
  } else if (currentView === 'rules-manager') {
225
227
  titleEl.textContent = t('title.rulesManager');
228
+ } else if (currentView === 'commands-manager') {
229
+ titleEl.textContent = t('title.commandsManager') || 'Commands Manager';
226
230
  } else if (currentView === 'claude-manager') {
227
231
  titleEl.textContent = t('title.claudeManager');
228
232
  } else if (currentView === 'graph-explorer') {
@@ -1588,9 +1588,67 @@ const i18n = {
1588
1588
  'skills.generate': 'Generate',
1589
1589
  'skills.cliGenerateInfo': 'AI will generate a complete skill based on your description',
1590
1590
  'skills.cliGenerateTimeHint': 'Generation may take a few minutes depending on complexity',
1591
+ 'skills.disable': 'Disable',
1592
+ 'skills.enable': 'Enable',
1593
+ 'skills.disabled': 'Disabled',
1594
+ 'skills.enabled': 'Enabled',
1595
+ 'skills.disabledSkills': 'Disabled Skills',
1596
+ 'skills.disabledAt': 'Disabled at',
1597
+ 'skills.enableConfirm': 'Are you sure you want to enable the skill "{name}"?',
1598
+ 'skills.disableConfirm': 'Are you sure you want to disable the skill "{name}"?',
1599
+ 'skills.noDisabledSkills': 'No disabled skills',
1600
+ 'skills.toggleError': 'Failed to toggle skill status',
1601
+ 'skills.enableSuccess': 'Skill "{name}" enabled successfully',
1602
+ 'skills.disableSuccess': 'Skill "{name}" disabled successfully',
1591
1603
 
1592
1604
  // Rules
1593
1605
  'nav.rules': 'Rules',
1606
+ 'nav.commands': 'Commands',
1607
+ 'title.commandsManager': 'Commands Manager',
1608
+ 'commands.title': 'Commands Manager',
1609
+ 'commands.description': 'Manage Claude Code commands - enable, disable, and organize by group',
1610
+ 'commands.totalCommands': 'Total Commands',
1611
+ 'commands.enabledCommands': 'Enabled Commands',
1612
+ 'commands.disabledCommands': 'Disabled Commands',
1613
+ 'commands.showDisabled': 'Show Disabled',
1614
+ 'commands.hideDisabled': 'Hide Disabled',
1615
+ 'commands.noDescription': 'No description',
1616
+ 'commands.disabledAt': 'Disabled at',
1617
+ 'commands.enableConfirm': 'Enable command "{name}"?',
1618
+ 'commands.disableConfirm': 'Disable command "{name}"?',
1619
+ 'commands.enableSuccess': 'Command "{name}" enabled successfully',
1620
+ 'commands.disableSuccess': 'Command "{name}" disabled successfully',
1621
+ 'commands.toggleError': 'Failed to toggle command status',
1622
+ 'commands.enabled': 'enabled',
1623
+ 'commands.disabled': 'disabled',
1624
+ 'commands.name': 'Name',
1625
+ 'commands.description': 'Description',
1626
+ 'commands.scope': 'Scope',
1627
+ 'commands.status': 'Status',
1628
+ 'commands.group.cli': 'CLI',
1629
+ 'commands.group.workflow': 'Workflow',
1630
+ 'commands.group.memory': 'Memory',
1631
+ 'commands.group.task': 'Task',
1632
+ 'commands.group.issue': 'Issue',
1633
+ 'commands.group.other': 'Other',
1634
+ 'commands.group.review': 'Review',
1635
+ 'commands.group.execute': 'Execute',
1636
+ 'commands.group.plan': 'Plan',
1637
+ 'commands.group.test': 'Test',
1638
+ 'commands.group.debug': 'Debug',
1639
+ 'commands.group.tools': 'Tools',
1640
+ 'commands.enableAll': 'Enable All',
1641
+ 'commands.disableAll': 'Disable All',
1642
+ 'commands.enableGroupConfirm': 'Enable all commands in "{group}" group?',
1643
+ 'commands.disableGroupConfirm': 'Disable all commands in "{group}" group?',
1644
+ 'commands.enableGroupSuccess': 'Group "{group}" enabled successfully',
1645
+ 'commands.disableGroupSuccess': 'Group "{group}" disabled successfully',
1646
+ 'commands.locationProject': 'Project',
1647
+ 'commands.locationUser': 'Global',
1648
+ 'commands.clickToEnableAll': 'Click to enable all commands in this group',
1649
+ 'commands.clickToDisableAll': 'Click to disable all commands in this group',
1650
+
1651
+ // Rules
1594
1652
  'title.rulesManager': 'Rules Manager',
1595
1653
  'rules.title': 'Rules Manager',
1596
1654
  'rules.description': 'Manage project and user rules for Claude Code',
@@ -4212,9 +4270,67 @@ const i18n = {
4212
4270
  'skills.generate': '生成',
4213
4271
  'skills.cliGenerateInfo': 'AI 将根据你的描述生成完整的技能',
4214
4272
  'skills.cliGenerateTimeHint': '生成时间取决于复杂度,可能需要几分钟',
4273
+ 'skills.disable': '禁用',
4274
+ 'skills.enable': '启用',
4275
+ 'skills.disabled': '已禁用',
4276
+ 'skills.enabled': '已启用',
4277
+ 'skills.disabledSkills': '已禁用的技能',
4278
+ 'skills.disabledAt': '禁用时间',
4279
+ 'skills.enableConfirm': '确定要启用技能 "{name}" 吗?',
4280
+ 'skills.disableConfirm': '确定要禁用技能 "{name}" 吗?',
4281
+ 'skills.noDisabledSkills': '没有已禁用的技能',
4282
+ 'skills.toggleError': '切换技能状态失败',
4283
+ 'skills.enableSuccess': '技能 "{name}" 启用成功',
4284
+ 'skills.disableSuccess': '技能 "{name}" 禁用成功',
4215
4285
 
4216
4286
  // Rules
4217
4287
  'nav.rules': '规则',
4288
+ 'nav.commands': '命令',
4289
+ 'title.commandsManager': '命令管理',
4290
+ 'commands.title': '命令管理',
4291
+ 'commands.description': '管理 Claude Code 命令 - 启用、禁用和按组织分组',
4292
+ 'commands.totalCommands': '总命令数',
4293
+ 'commands.enabledCommands': '已启用命令',
4294
+ 'commands.disabledCommands': '已禁用命令',
4295
+ 'commands.showDisabled': '显示已禁用',
4296
+ 'commands.hideDisabled': '隐藏已禁用',
4297
+ 'commands.noDescription': '无描述',
4298
+ 'commands.disabledAt': '禁用于',
4299
+ 'commands.enableConfirm': '启用命令 "{name}"?',
4300
+ 'commands.disableConfirm': '禁用命令 "{name}"?',
4301
+ 'commands.enableSuccess': '命令 "{name}" 已成功启用',
4302
+ 'commands.disableSuccess': '命令 "{name}" 已成功禁用',
4303
+ 'commands.toggleError': '切换命令状态失败',
4304
+ 'commands.enabled': '已启用',
4305
+ 'commands.disabled': '已禁用',
4306
+ 'commands.name': '名称',
4307
+ 'commands.description': '描述',
4308
+ 'commands.scope': '作用域',
4309
+ 'commands.status': '状态',
4310
+ 'commands.group.cli': 'CLI',
4311
+ 'commands.group.workflow': '工作流',
4312
+ 'commands.group.memory': '记忆',
4313
+ 'commands.group.task': '任务',
4314
+ 'commands.group.issue': '问题',
4315
+ 'commands.group.other': '其他',
4316
+ 'commands.group.review': '审查',
4317
+ 'commands.group.execute': '执行',
4318
+ 'commands.group.plan': '规划',
4319
+ 'commands.group.test': '测试',
4320
+ 'commands.group.debug': '调试',
4321
+ 'commands.group.tools': '工具',
4322
+ 'commands.enableAll': '全部启用',
4323
+ 'commands.disableAll': '全部禁用',
4324
+ 'commands.enableGroupConfirm': '启用 "{group}" 分组中的所有命令?',
4325
+ 'commands.disableGroupConfirm': '禁用 "{group}" 分组中的所有命令?',
4326
+ 'commands.enableGroupSuccess': '分组 "{group}" 已全部启用',
4327
+ 'commands.disableGroupSuccess': '分组 "{group}" 已全部禁用',
4328
+ 'commands.locationProject': '项目',
4329
+ 'commands.locationUser': '全局',
4330
+ 'commands.clickToEnableAll': '点击启用该分组所有命令',
4331
+ 'commands.clickToDisableAll': '点击禁用该分组所有命令',
4332
+
4333
+ // Rules
4218
4334
  'title.rulesManager': '规则管理',
4219
4335
  'rules.title': '规则管理',
4220
4336
  'rules.description': '管理 Claude Code 的项目和用户规则',