@planu/cli 1.2.0 → 1.3.0

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 (146) hide show
  1. package/dist/config/dev-lifecycle-catalog.json +22 -0
  2. package/dist/config/license-plans.json +17 -1
  3. package/dist/engine/aider-prompt-generator.d.ts +26 -0
  4. package/dist/engine/aider-prompt-generator.d.ts.map +1 -0
  5. package/dist/engine/aider-prompt-generator.js +144 -0
  6. package/dist/engine/aider-prompt-generator.js.map +1 -0
  7. package/dist/engine/claude-config-auditor/settings-auditor.d.ts.map +1 -1
  8. package/dist/engine/claude-config-auditor/settings-auditor.js +20 -1
  9. package/dist/engine/claude-config-auditor/settings-auditor.js.map +1 -1
  10. package/dist/engine/code-graph-configurator.d.ts +23 -0
  11. package/dist/engine/code-graph-configurator.d.ts.map +1 -0
  12. package/dist/engine/code-graph-configurator.js +80 -0
  13. package/dist/engine/code-graph-configurator.js.map +1 -0
  14. package/dist/engine/continue-config-generator.d.ts +15 -0
  15. package/dist/engine/continue-config-generator.d.ts.map +1 -0
  16. package/dist/engine/continue-config-generator.js +53 -0
  17. package/dist/engine/continue-config-generator.js.map +1 -0
  18. package/dist/engine/e2e-test-generator.d.ts +19 -0
  19. package/dist/engine/e2e-test-generator.d.ts.map +1 -0
  20. package/dist/engine/e2e-test-generator.js +210 -0
  21. package/dist/engine/e2e-test-generator.js.map +1 -0
  22. package/dist/engine/ecosystem-detector.d.ts +13 -0
  23. package/dist/engine/ecosystem-detector.d.ts.map +1 -0
  24. package/dist/engine/ecosystem-detector.js +128 -0
  25. package/dist/engine/ecosystem-detector.js.map +1 -0
  26. package/dist/engine/memory-config-generator.d.ts +8 -0
  27. package/dist/engine/memory-config-generator.d.ts.map +1 -0
  28. package/dist/engine/memory-config-generator.js +101 -0
  29. package/dist/engine/memory-config-generator.js.map +1 -0
  30. package/dist/engine/pr-spec-validator.d.ts +25 -0
  31. package/dist/engine/pr-spec-validator.d.ts.map +1 -0
  32. package/dist/engine/pr-spec-validator.js +172 -0
  33. package/dist/engine/pr-spec-validator.js.map +1 -0
  34. package/dist/engine/sweep-issue-generator.d.ts +14 -0
  35. package/dist/engine/sweep-issue-generator.d.ts.map +1 -0
  36. package/dist/engine/sweep-issue-generator.js +140 -0
  37. package/dist/engine/sweep-issue-generator.js.map +1 -0
  38. package/dist/index.js +16 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/tools/aider-launcher-handler.d.ts +4 -0
  41. package/dist/tools/aider-launcher-handler.d.ts.map +1 -0
  42. package/dist/tools/aider-launcher-handler.js +69 -0
  43. package/dist/tools/aider-launcher-handler.js.map +1 -0
  44. package/dist/tools/code-graph-handler.d.ts +6 -0
  45. package/dist/tools/code-graph-handler.d.ts.map +1 -0
  46. package/dist/tools/code-graph-handler.js +68 -0
  47. package/dist/tools/code-graph-handler.js.map +1 -0
  48. package/dist/tools/continue-config-handler.d.ts +4 -0
  49. package/dist/tools/continue-config-handler.d.ts.map +1 -0
  50. package/dist/tools/continue-config-handler.js +88 -0
  51. package/dist/tools/continue-config-handler.js.map +1 -0
  52. package/dist/tools/e2e-test-generator-handler.d.ts +12 -0
  53. package/dist/tools/e2e-test-generator-handler.d.ts.map +1 -0
  54. package/dist/tools/e2e-test-generator-handler.js +54 -0
  55. package/dist/tools/e2e-test-generator-handler.js.map +1 -0
  56. package/dist/tools/ecosystem-tools-handler.d.ts +4 -0
  57. package/dist/tools/ecosystem-tools-handler.d.ts.map +1 -0
  58. package/dist/tools/ecosystem-tools-handler.js +57 -0
  59. package/dist/tools/ecosystem-tools-handler.js.map +1 -0
  60. package/dist/tools/memory-config-handler.d.ts +4 -0
  61. package/dist/tools/memory-config-handler.d.ts.map +1 -0
  62. package/dist/tools/memory-config-handler.js +110 -0
  63. package/dist/tools/memory-config-handler.js.map +1 -0
  64. package/dist/tools/pr-agent-handler.d.ts +12 -0
  65. package/dist/tools/pr-agent-handler.d.ts.map +1 -0
  66. package/dist/tools/pr-agent-handler.js +47 -0
  67. package/dist/tools/pr-agent-handler.js.map +1 -0
  68. package/dist/tools/register-aider-tools.d.ts +3 -0
  69. package/dist/tools/register-aider-tools.d.ts.map +1 -0
  70. package/dist/tools/register-aider-tools.js +28 -0
  71. package/dist/tools/register-aider-tools.js.map +1 -0
  72. package/dist/tools/register-code-graph-tools.d.ts +3 -0
  73. package/dist/tools/register-code-graph-tools.d.ts.map +1 -0
  74. package/dist/tools/register-code-graph-tools.js +36 -0
  75. package/dist/tools/register-code-graph-tools.js.map +1 -0
  76. package/dist/tools/register-continue-tools.d.ts +3 -0
  77. package/dist/tools/register-continue-tools.d.ts.map +1 -0
  78. package/dist/tools/register-continue-tools.js +38 -0
  79. package/dist/tools/register-continue-tools.js.map +1 -0
  80. package/dist/tools/register-e2e-test-generator-tools.d.ts +3 -0
  81. package/dist/tools/register-e2e-test-generator-tools.d.ts.map +1 -0
  82. package/dist/tools/register-e2e-test-generator-tools.js +35 -0
  83. package/dist/tools/register-e2e-test-generator-tools.js.map +1 -0
  84. package/dist/tools/register-memory-config-tools.d.ts +3 -0
  85. package/dist/tools/register-memory-config-tools.d.ts.map +1 -0
  86. package/dist/tools/register-memory-config-tools.js +34 -0
  87. package/dist/tools/register-memory-config-tools.js.map +1 -0
  88. package/dist/tools/register-pr-agent-tools.d.ts +3 -0
  89. package/dist/tools/register-pr-agent-tools.d.ts.map +1 -0
  90. package/dist/tools/register-pr-agent-tools.js +34 -0
  91. package/dist/tools/register-pr-agent-tools.js.map +1 -0
  92. package/dist/tools/register-sweep-tools.d.ts +3 -0
  93. package/dist/tools/register-sweep-tools.d.ts.map +1 -0
  94. package/dist/tools/register-sweep-tools.js +42 -0
  95. package/dist/tools/register-sweep-tools.js.map +1 -0
  96. package/dist/tools/register-token-optimizer-tools.d.ts +3 -0
  97. package/dist/tools/register-token-optimizer-tools.d.ts.map +1 -0
  98. package/dist/tools/register-token-optimizer-tools.js +22 -0
  99. package/dist/tools/register-token-optimizer-tools.js.map +1 -0
  100. package/dist/tools/sweep-integration-handler.d.ts +4 -0
  101. package/dist/tools/sweep-integration-handler.d.ts.map +1 -0
  102. package/dist/tools/sweep-integration-handler.js +60 -0
  103. package/dist/tools/sweep-integration-handler.js.map +1 -0
  104. package/dist/types/aider.d.ts +21 -0
  105. package/dist/types/aider.d.ts.map +1 -0
  106. package/dist/types/aider.js +3 -0
  107. package/dist/types/aider.js.map +1 -0
  108. package/dist/types/code-graph-integration.d.ts +22 -0
  109. package/dist/types/code-graph-integration.d.ts.map +1 -0
  110. package/dist/types/code-graph-integration.js +3 -0
  111. package/dist/types/code-graph-integration.js.map +1 -0
  112. package/dist/types/continue-integration.d.ts +32 -0
  113. package/dist/types/continue-integration.d.ts.map +1 -0
  114. package/dist/types/continue-integration.js +3 -0
  115. package/dist/types/continue-integration.js.map +1 -0
  116. package/dist/types/e2e-test-generator.d.ts +27 -0
  117. package/dist/types/e2e-test-generator.d.ts.map +1 -0
  118. package/dist/types/e2e-test-generator.js +3 -0
  119. package/dist/types/e2e-test-generator.js.map +1 -0
  120. package/dist/types/index.d.ts +6 -0
  121. package/dist/types/index.d.ts.map +1 -1
  122. package/dist/types/index.js +6 -0
  123. package/dist/types/index.js.map +1 -1
  124. package/dist/types/pr-agent.d.ts +28 -0
  125. package/dist/types/pr-agent.d.ts.map +1 -0
  126. package/dist/types/pr-agent.js +3 -0
  127. package/dist/types/pr-agent.js.map +1 -0
  128. package/dist/types/sweep.d.ts +22 -0
  129. package/dist/types/sweep.d.ts.map +1 -0
  130. package/dist/types/sweep.js +3 -0
  131. package/dist/types/sweep.js.map +1 -0
  132. package/dist/types/tooling/index.d.ts +2 -0
  133. package/dist/types/tooling/index.d.ts.map +1 -1
  134. package/dist/types/tooling/memory-config.d.ts +25 -0
  135. package/dist/types/tooling/memory-config.d.ts.map +1 -0
  136. package/dist/types/tooling/memory-config.js +3 -0
  137. package/dist/types/tooling/memory-config.js.map +1 -0
  138. package/dist/types/tooling/token-optimizer.d.ts +42 -0
  139. package/dist/types/tooling/token-optimizer.d.ts.map +1 -0
  140. package/dist/types/tooling/token-optimizer.js +3 -0
  141. package/dist/types/tooling/token-optimizer.js.map +1 -0
  142. package/dist/types/tooling.d.ts +1 -1
  143. package/dist/types/tooling.d.ts.map +1 -1
  144. package/package.json +1 -1
  145. package/src/config/dev-lifecycle-catalog.json +22 -0
  146. package/src/config/license-plans.json +17 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continue-config-handler.d.ts","sourceRoot":"","sources":["../../src/tools/continue-config-handler.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,sBAAsB,EACtB,mBAAmB,EAGnB,UAAU,EACX,MAAM,mBAAmB,CAAC;AA8B3B,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,CAoChG;AAMD,wBAAsB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,CA+B1F"}
@@ -0,0 +1,88 @@
1
+ // tools/continue-config-handler.ts — Handler for Continue.dev MCP integration tools (SPEC-377)
2
+ import { readFile, writeFile, mkdir } from 'node:fs/promises';
3
+ import { join } from 'node:path';
4
+ import { generateContinueConfig, detectPlanuTransport, } from '../engine/continue-config-generator.js';
5
+ const CONTINUE_DIR = '.continue';
6
+ const CONFIG_FILE = 'config.json';
7
+ // ---------------------------------------------------------------------------
8
+ // Helpers
9
+ // ---------------------------------------------------------------------------
10
+ function continueConfigPath(projectPath) {
11
+ return join(projectPath, CONTINUE_DIR, CONFIG_FILE);
12
+ }
13
+ async function readContinueConfig(projectPath) {
14
+ try {
15
+ const raw = await readFile(continueConfigPath(projectPath), 'utf8');
16
+ return JSON.parse(raw);
17
+ }
18
+ catch {
19
+ return null;
20
+ }
21
+ }
22
+ // ---------------------------------------------------------------------------
23
+ // configure_continue
24
+ // ---------------------------------------------------------------------------
25
+ export async function handleConfigureContinue(input) {
26
+ const { projectPath, transport, hostedUrl } = input;
27
+ if (transport === 'sse' && !hostedUrl) {
28
+ return {
29
+ content: [
30
+ {
31
+ type: 'text',
32
+ text: 'Error: hostedUrl is required when transport is "sse". Provide the URL of the running Planu SSE server.',
33
+ },
34
+ ],
35
+ };
36
+ }
37
+ const config = generateContinueConfig(transport, hostedUrl);
38
+ const configPath = continueConfigPath(projectPath);
39
+ await mkdir(join(projectPath, CONTINUE_DIR), { recursive: true });
40
+ await writeFile(configPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
41
+ const lines = [
42
+ 'Continue.dev MCP integration configured.',
43
+ '',
44
+ `Config written to: ${configPath}`,
45
+ '',
46
+ '```json',
47
+ JSON.stringify(config, null, 2),
48
+ '```',
49
+ '',
50
+ 'Restart Continue.dev to activate the Planu MCP server.',
51
+ '',
52
+ 'Available slash commands:',
53
+ ...config.slashCommands.map((cmd) => ` /${cmd.name} — ${cmd.description}`),
54
+ ];
55
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
56
+ }
57
+ // ---------------------------------------------------------------------------
58
+ // continue_status
59
+ // ---------------------------------------------------------------------------
60
+ export async function handleContinueStatus(input) {
61
+ const configPath = continueConfigPath(input.projectPath);
62
+ const config = await readContinueConfig(input.projectPath);
63
+ let result;
64
+ if (!config) {
65
+ result = { configured: false, transport: null, configPath };
66
+ }
67
+ else {
68
+ const transport = detectPlanuTransport(config);
69
+ result = {
70
+ configured: transport !== null,
71
+ transport,
72
+ configPath,
73
+ };
74
+ }
75
+ const lines = [
76
+ 'Continue.dev Integration Status',
77
+ '================================',
78
+ '',
79
+ `Configured: ${result.configured ? 'yes' : 'no'}`,
80
+ `Transport: ${result.transport ?? 'n/a'}`,
81
+ `Config path: ${result.configPath}`,
82
+ ];
83
+ if (!result.configured) {
84
+ lines.push('', 'Run `configure_continue` to set up the Planu MCP server in Continue.dev.');
85
+ }
86
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
87
+ }
88
+ //# sourceMappingURL=continue-config-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"continue-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GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,GAAG;YACP,UAAU,EAAE,SAAS,KAAK,IAAI;YAC9B,SAAS;YACT,UAAU;SACX,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG;QACZ,iCAAiC;QACjC,kCAAkC;QAClC,EAAE;QACF,eAAe,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QACjD,eAAe,MAAM,CAAC,SAAS,IAAI,KAAK,EAAE;QAC1C,gBAAgB,MAAM,CAAC,UAAU,EAAE;KACpC,CAAC;IAEF,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,0EAA0E,CAAC,CAAC;IAC7F,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ToolResult, GenerateE2eTestsInput, E2eTestStatusInput } from '../types/index.js';
2
+ /**
3
+ * Handle generate_e2e_tests tool call.
4
+ * Generates E2E tests in the chosen framework from spec acceptance criteria.
5
+ */
6
+ export declare function handleGenerateE2eTests(input: GenerateE2eTestsInput): Promise<ToolResult>;
7
+ /**
8
+ * Handle e2e_test_status tool call.
9
+ * Lists E2E test files matching SPEC-XXX pattern in tests/e2e/.
10
+ */
11
+ export declare function handleE2eTestStatus(input: E2eTestStatusInput): Promise<ToolResult>;
12
+ //# sourceMappingURL=e2e-test-generator-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2e-test-generator-handler.d.ts","sourceRoot":"","sources":["../../src/tools/e2e-test-generator-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG/F;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwB9F;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwBxF"}
@@ -0,0 +1,54 @@
1
+ import { generateE2eTests, getE2eTestStatus } from '../engine/e2e-test-generator.js';
2
+ /**
3
+ * Handle generate_e2e_tests tool call.
4
+ * Generates E2E tests in the chosen framework from spec acceptance criteria.
5
+ */
6
+ export async function handleGenerateE2eTests(input) {
7
+ const { specId, projectPath, framework = 'gherkin', outputPath } = input;
8
+ const result = await generateE2eTests(specId, projectPath, framework, outputPath);
9
+ if ('isError' in result) {
10
+ return {
11
+ content: [{ type: 'text', text: `Error: ${result.message}` }],
12
+ isError: true,
13
+ };
14
+ }
15
+ const lines = [
16
+ `E2E Tests Generated — ${result.specId}`,
17
+ '='.repeat(50),
18
+ `Framework: ${result.framework}`,
19
+ `Test count: ${result.testCount}`,
20
+ `Output: ${result.outputPath ?? '(not written to disk)'}`,
21
+ ``,
22
+ `--- Generated Content ---`,
23
+ result.content,
24
+ `--- End ---`,
25
+ ];
26
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
27
+ }
28
+ /**
29
+ * Handle e2e_test_status tool call.
30
+ * Lists E2E test files matching SPEC-XXX pattern in tests/e2e/.
31
+ */
32
+ export async function handleE2eTestStatus(input) {
33
+ const result = await getE2eTestStatus(input.projectPath);
34
+ if (result.total === 0) {
35
+ return {
36
+ content: [
37
+ {
38
+ type: 'text',
39
+ text: `No E2E test files found in ${input.projectPath}/tests/e2e/\nRun generate_e2e_tests to create tests from your specs.`,
40
+ },
41
+ ],
42
+ };
43
+ }
44
+ const lines = [
45
+ `E2E Test Status`,
46
+ `===============`,
47
+ `Total files: ${result.total}`,
48
+ ``,
49
+ `Files:`,
50
+ ...result.testFiles.map((f) => ` [${f.specId}] ${f.file} (${f.framework})`),
51
+ ];
52
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
53
+ }
54
+ //# sourceMappingURL=e2e-test-generator-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"e2e-test-generator-handler.js","sourceRoot":"","sources":["../../src/tools/e2e-test-generator-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAErF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,KAA4B;IACvE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,GAAG,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAElF,IAAI,SAAS,IAAI,MAAM,EAAE,CAAC;QACxB,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YAC7D,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAa;QACtB,yBAAyB,MAAM,CAAC,MAAM,EAAE;QACxC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACd,cAAc,MAAM,CAAC,SAAS,EAAE;QAChC,eAAe,MAAM,CAAC,SAAS,EAAE;QACjC,WAAW,MAAM,CAAC,UAAU,IAAI,uBAAuB,EAAE;QACzD,EAAE;QACF,2BAA2B;QAC3B,MAAM,CAAC,OAAO;QACd,aAAa;KACd,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,KAAyB;IACjE,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAEzD,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,8BAA8B,KAAK,CAAC,WAAW,sEAAsE;iBAC5H;aACF;SACF,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAa;QACtB,iBAAiB;QACjB,iBAAiB;QACjB,gBAAgB,MAAM,CAAC,KAAK,EAAE;QAC9B,EAAE;QACF,QAAQ;QACR,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,SAAS,GAAG,CAAC;KAC7E,CAAC;IAEF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ToolResult, SuggestTokenOptimizerInput, TokenOptimizerStatusInput } from '../types/index.js';
2
+ export declare function handleSuggestTokenOptimizer(input: SuggestTokenOptimizerInput): Promise<ToolResult>;
3
+ export declare function handleTokenOptimizerStatus(input: TokenOptimizerStatusInput): Promise<ToolResult>;
4
+ //# sourceMappingURL=ecosystem-tools-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecosystem-tools-handler.d.ts","sourceRoot":"","sources":["../../src/tools/ecosystem-tools-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAM3B,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,UAAU,CAAC,CAkCrB;AAED,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,UAAU,CAAC,CAyBrB"}
@@ -0,0 +1,57 @@
1
+ import { buildTokenOptimizerRecommendations, getTokenOptimizerStatus, } from '../engine/ecosystem-detector.js';
2
+ export async function handleSuggestTokenOptimizer(input) {
3
+ const { projectPath } = input;
4
+ const recommendations = await buildTokenOptimizerRecommendations(projectPath);
5
+ const lines = [
6
+ 'Token Optimizer Recommendations',
7
+ '================================',
8
+ '',
9
+ ];
10
+ for (const rec of recommendations) {
11
+ const statusLabel = rec.installed ? '[installed]' : '[not installed]';
12
+ lines.push(`## ${rec.tool.toUpperCase()} ${statusLabel}`);
13
+ lines.push(rec.reason);
14
+ if (!rec.installed) {
15
+ lines.push('');
16
+ lines.push(`Install: ${rec.installCommand}`);
17
+ if (rec.configExample) {
18
+ lines.push('');
19
+ lines.push('Example .claude/settings.json configuration:');
20
+ lines.push('```json');
21
+ lines.push(rec.configExample);
22
+ lines.push('```');
23
+ }
24
+ }
25
+ lines.push('');
26
+ }
27
+ const allInstalled = recommendations.every((r) => r.installed);
28
+ if (allInstalled) {
29
+ lines.push('All token optimization tools are installed and configured.');
30
+ }
31
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
32
+ }
33
+ export async function handleTokenOptimizerStatus(input) {
34
+ const { projectPath } = input;
35
+ const status = await getTokenOptimizerStatus(projectPath);
36
+ const lines = [
37
+ 'Token Optimizer Status',
38
+ '======================',
39
+ '',
40
+ `RTK:`,
41
+ ` installed: ${String(status.rtk.installed)}`,
42
+ ` version: ${status.rtk.version ?? 'n/a'}`,
43
+ ` hooks configured: ${String(status.rtk.hooksConfigured)}`,
44
+ '',
45
+ `Headroom:`,
46
+ ` installed: ${String(status.headroom.installed)}`,
47
+ ` version: ${status.headroom.version ?? 'n/a'}`,
48
+ ];
49
+ return {
50
+ content: [{ type: 'text', text: lines.join('\n') }],
51
+ structuredContent: {
52
+ rtk: status.rtk,
53
+ headroom: status.headroom,
54
+ },
55
+ };
56
+ }
57
+ //# sourceMappingURL=ecosystem-tools-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecosystem-tools-handler.js","sourceRoot":"","sources":["../../src/tools/ecosystem-tools-handler.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,kCAAkC,EAClC,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,KAAiC;IAEjC,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,eAAe,GAAG,MAAM,kCAAkC,CAAC,WAAW,CAAC,CAAC;IAE9E,MAAM,KAAK,GAAa;QACtB,iCAAiC;QACjC,kCAAkC;QAClC,EAAE;KACH,CAAC;IAEF,KAAK,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,iBAAiB,CAAC;QACtE,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,WAAW,EAAE,CAAC,CAAC;QAC1D,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACvB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,YAAY,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC;YAC7C,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;gBACtB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACf,KAAK,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;gBAC3D,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBACtB,KAAK,CAA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AC,IAAI,CAAC,EAAE,CAAC;QACnD,iBAAiB,EAAE;YACjB,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,QAAQ,EAAE,MAAM,CAAC,QAAQ;SAC1B;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ToolResult, ConfigureMemoryInput, MemoryStatusInput } from '../types/index.js';
2
+ export declare function handleConfigureMemory(input: ConfigureMemoryInput): Promise<ToolResult>;
3
+ export declare function handleMemoryStatus(input: MemoryStatusInput): Promise<ToolResult>;
4
+ //# sourceMappingURL=memory-config-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-config-handler.d.ts","sourceRoot":"","sources":["../../src/tools/memory-config-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAQ7F,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmG5F;AAED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAkBtF"}
@@ -0,0 +1,110 @@
1
+ import { getMemoryStatus, setupOpenMemory, setupMem0Cloud, resetMemoryConfig, } from '../engine/memory-config-generator.js';
2
+ export async function handleConfigureMemory(input) {
3
+ const { projectPath, action, apiKey } = input;
4
+ switch (action) {
5
+ case 'setup-openmemory': {
6
+ const configPath = await setupOpenMemory(projectPath);
7
+ const lines = [
8
+ 'OpenMemory (mem0) configured successfully.',
9
+ '',
10
+ `Config written to: ${configPath}`,
11
+ '',
12
+ 'The following MCP server entry was added to .claude.json:',
13
+ '```json',
14
+ JSON.stringify({
15
+ mcpServers: {
16
+ memory: {
17
+ command: 'npx',
18
+ args: ['-y', '@mem0/mcp'],
19
+ },
20
+ },
21
+ }, null, 2),
22
+ '```',
23
+ '',
24
+ 'Restart Claude Code to activate the memory MCP server.',
25
+ ];
26
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
27
+ }
28
+ case 'setup-mem0-cloud': {
29
+ if (!apiKey) {
30
+ return {
31
+ content: [
32
+ {
33
+ type: 'text',
34
+ text: 'Error: apiKey is required for setup-mem0-cloud action. Get your API key from https://app.mem0.ai',
35
+ },
36
+ ],
37
+ isError: true,
38
+ };
39
+ }
40
+ const configPath = await setupMem0Cloud(projectPath, apiKey);
41
+ const lines = [
42
+ 'Mem0 Cloud configured successfully.',
43
+ '',
44
+ `Config written to: ${configPath}`,
45
+ '',
46
+ 'The memory MCP server with your API key has been added to .claude.json.',
47
+ '',
48
+ 'Restart Claude Code to activate the memory MCP server.',
49
+ ];
50
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
51
+ }
52
+ case 'status': {
53
+ const status = await getMemoryStatus(projectPath);
54
+ const lines = [
55
+ 'Memory Configuration Status',
56
+ '===========================',
57
+ '',
58
+ `Provider: ${status.provider}`,
59
+ `Connected: ${String(status.connected)}`,
60
+ `Memory count: ${String(status.memoryCount)}`,
61
+ `Config path: ${status.configPath}`,
62
+ ];
63
+ return {
64
+ content: [{ type: 'text', text: lines.join('\n') }],
65
+ structuredContent: { ...status },
66
+ };
67
+ }
68
+ case 'reset': {
69
+ const configPath = await resetMemoryConfig(projectPath);
70
+ return {
71
+ content: [
72
+ {
73
+ type: 'text',
74
+ text: `Memory MCP configuration removed from ${configPath}.\n\nRestart Claude Code to deactivate the memory server.`,
75
+ },
76
+ ],
77
+ };
78
+ }
79
+ default: {
80
+ const _never = action;
81
+ return {
82
+ content: [
83
+ {
84
+ type: 'text',
85
+ text: `Unknown action: ${String(_never)}. Valid actions: setup-openmemory, setup-mem0-cloud, status, reset`,
86
+ },
87
+ ],
88
+ isError: true,
89
+ };
90
+ }
91
+ }
92
+ }
93
+ export async function handleMemoryStatus(input) {
94
+ const { projectPath } = input;
95
+ const status = await getMemoryStatus(projectPath);
96
+ const lines = [
97
+ 'Memory Status',
98
+ '=============',
99
+ '',
100
+ `Provider: ${status.provider}`,
101
+ `Connected: ${String(status.connected)}`,
102
+ `Memory count: ${String(status.memoryCount)}`,
103
+ `Config path: ${status.configPath}`,
104
+ ];
105
+ return {
106
+ content: [{ type: 'text', text: lines.join('\n') }],
107
+ structuredContent: { ...status },
108
+ };
109
+ }
110
+ //# sourceMappingURL=memory-config-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-config-handler.js","sourceRoot":"","sources":["../../src/tools/memory-config-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,GAClB,MAAM,sCAAsC,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAA2B;IACrE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAE9C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,MAAM,UAAU,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;YACtD,MAAM,KAAK,GAAG;gBACZ,4CAA4C;gBAC5C,EAAE;gBACF,sBAAsB,UAAU,EAAE;gBAClC,EAAE;gBACF,2DAA2D;gBAC3D,SAAS;gBACT,IAAI,CAAC,SAAS,CACZ;oBACE,UAAU,EAAE;wBACV,MAAM,EAAE;4BACN,OAAO,EAAE,KAAK;4BACd,IAAI,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC;yBAC1B;qBACF;iBACF,EACD,IAAI,EACJ,CAAC,CACF;gBACD,KAAK;gBACL,EAAE;gBACF,wDAAwD;aACzD,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACjE,CAAC;QAED,KAAK,kBAAkB,CAAC,CAAC,CAAC;YACxB,IAAI,CAAC,MAAM,EAAE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AI,EAAE,MAAM;wBACZ,IAAI,EAAE,yCAAyC,UAAU,2DAA2D;qBACrH;iBACF;aACF,CAAC;QACJ,CAAC;QAED,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,MAAM,GAAU,MAAM,CAAC;YAC7B,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mBAAmB,MAAM,CAAC,MAAM,CAAC,oEAAoE;qBAC5G;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAwB;IAC/D,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC,WAAW,CAAC,CAAC;IAElD,MAAM,KAAK,GAAG;QACZ,eAAe;QACf,eAAe;QACf,EAAE;QACF,aAAa,MAAM,CAAC,QAAQ,EAAE;QAC9B,cAAc,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;QACxC,iBAAiB,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;QAC7C,gBAAgB,MAAM,CAAC,UAAU,EAAE;KACpC,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,iBAAiB,EAAE,EAAE,GAAG,MAAM,EAAE;KACjC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ToolResult, ReviewPrAgainstSpecInput, PrAgentStatusInput } from '../types/index.js';
2
+ /**
3
+ * Handle review_pr_against_spec tool call.
4
+ * Returns per-criterion compliance results and overall score.
5
+ */
6
+ export declare function handleReviewPrAgainstSpec(input: ReviewPrAgainstSpecInput): Promise<ToolResult>;
7
+ /**
8
+ * Handle pr_agent_status tool call.
9
+ * Returns gh CLI installation status and PR agent configuration.
10
+ */
11
+ export declare function handlePrAgentStatus(input: PrAgentStatusInput): ToolResult;
12
+ //# sourceMappingURL=pr-agent-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pr-agent-handler.d.ts","sourceRoot":"","sources":["../../src/tools/pr-agent-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGlG;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,UAAU,CAAC,CA0BrB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,UAAU,CAsBzE"}
@@ -0,0 +1,47 @@
1
+ import { reviewPrAgainstSpec, checkPrAgentStatus } from '../engine/pr-spec-validator.js';
2
+ /**
3
+ * Handle review_pr_against_spec tool call.
4
+ * Returns per-criterion compliance results and overall score.
5
+ */
6
+ export async function handleReviewPrAgainstSpec(input) {
7
+ const { specId, projectPath, prNumber, githubRepo } = input;
8
+ const result = await reviewPrAgainstSpec(specId, projectPath, prNumber, githubRepo);
9
+ if ('isError' in result) {
10
+ return {
11
+ content: [{ type: 'text', text: `Error: ${result.message}` }],
12
+ isError: true,
13
+ };
14
+ }
15
+ const lines = [
16
+ `PR #${result.prNumber} Compliance Report — ${result.specId}`,
17
+ '='.repeat(60),
18
+ `Compliance Score: ${result.complianceScore}%`,
19
+ ``,
20
+ `Criteria Results:`,
21
+ ...result.criteria.map((c) => ` [${c.status === 'matched' ? 'PASS' : c.status === 'unmatched' ? 'FAIL' : ' '}] ${c.criterion}`),
22
+ ``,
23
+ result.summary,
24
+ ];
25
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
26
+ }
27
+ /**
28
+ * Handle pr_agent_status tool call.
29
+ * Returns gh CLI installation status and PR agent configuration.
30
+ */
31
+ export function handlePrAgentStatus(input) {
32
+ const result = checkPrAgentStatus(input.projectPath);
33
+ const lines = [
34
+ `PR Agent Status`,
35
+ `===============`,
36
+ `gh CLI installed: ${result.ghInstalled ? 'yes' : 'no'}`,
37
+ `PR Agent configured: ${result.prAgentConfigured ? `yes (${result.configuredTool ?? 'unknown'})` : 'no'}`,
38
+ ];
39
+ if (!result.ghInstalled) {
40
+ lines.push(``, `To install gh CLI: https://cli.github.com/`);
41
+ }
42
+ if (!result.prAgentConfigured) {
43
+ lines.push(``, `No PR agent workflow detected in .github/workflows/.`, `Consider adding qodo-ai/pr-agent or a similar tool for automated PR reviews.`);
44
+ }
45
+ return { content: [{ type: 'text', text: lines.join('\n') }] };
46
+ }
47
+ //# sourceMappingURL=pr-agent-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pr-agent-handler.js","sourceRoot":"","sources":["../../src/tools/pr-agent-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzF;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,KAA+B;IAE/B,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAC5D,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;IAEpF,IAAI,SAAS,IAAI,MAAM,EAAE,CAAC;QACxB,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YAC7D,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAa;QACtB,OAAO,MAAM,CAAC,QAAQ,wBAAwB,MAAM,CAAC,MAAM,EAAE;QAC7D,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACd,qBAA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AAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;AACjE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerAiderTools(server: McpServer): void;
3
+ //# sourceMappingURL=register-aider-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-aider-tools.d.ts","sourceRoot":"","sources":["../../src/tools/register-aider-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwC1D"}
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { safeLicensed } from './safe-handler.js';
3
+ import { handleGenerateAiderPrompt, handleAiderStatus } from './aider-launcher-handler.js';
4
+ export function registerAiderTools(server) {
5
+ server.registerTool('generate_aider_prompt', {
6
+ description: 'Generate a ready-to-run aider CLI command from a Planu spec. ' +
7
+ 'Reads acceptance criteria and affected files from spec.md and technical.md, ' +
8
+ 'selects the optimal model based on difficulty, and returns the command plus ' +
9
+ 'an .aider.conf.yml configuration snippet.',
10
+ annotations: { title: 'Generate Aider Prompt', readOnlyHint: true },
11
+ inputSchema: {
12
+ specId: z
13
+ .string()
14
+ .describe('Spec ID to generate the aider command for (e.g. SPEC-042). ' +
15
+ 'Must match a directory in planu/specs/ following the SPEC-NNN-slug convention.'),
16
+ projectPath: z.string().describe('Absolute path to the project root'),
17
+ },
18
+ }, safeLicensed('generate_aider_prompt', (args) => handleGenerateAiderPrompt(args)));
19
+ server.registerTool('aider_status', {
20
+ description: 'Check whether aider is installed, show its version, and report the config path. ' +
21
+ 'Run this before generate_aider_prompt to confirm aider is available.',
22
+ annotations: { title: 'Aider Status', readOnlyHint: true },
23
+ inputSchema: {
24
+ projectPath: z.string().describe('Absolute path to the project root'),
25
+ },
26
+ }, safeLicensed('aider_status', (args) => Promise.resolve(handleAiderStatus(args))));
27
+ }
28
+ //# sourceMappingURL=register-aider-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-aider-tools.js","sourceRoot":"","sources":["../../src/tools/register-aider-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAG3F,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,WAAW,EACT,+DAA+D;YAC/D,8EAA8E;YAC9E,8EAA8E;YAC9E,2CAA2C;QAC7C,WAAW,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,IAAI,EAAE;QACnE,WAAW,EAAE;YACX,MAAM,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,QAAQ,CACP,6DAA6D;gBAC3D,gFAAgF,CACnF;YACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;SACtE;KACF,EACD,YAAY,CAAC,uBAAuB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC7C,yBAAyB,CAAC,IAAgC,CAAC,CAC5D,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,cAAc,EACd;QACE,WAAW,EACT,kFAAkF;YAClF,sEAAsE;QACxE,WAAW,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,IAAI,EAAE;QAC1D,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;SACtE;KACF,EACD,YAAY,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,CACpC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAwB,CAAC,CAAC,CAC7D,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerCodeGraphTools(server: McpServer): void;
3
+ //# sourceMappingURL=register-code-graph-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-code-graph-tools.d.ts","sourceRoot":"","sources":["../../src/tools/register-code-graph-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAYzE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2C9D"}
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ import { safeLicensed } from './safe-handler.js';
3
+ import { handleConfigureCodeGraph, handleCodeGraphStatus } from './code-graph-handler.js';
4
+ const projectPathSchema = z
5
+ .string()
6
+ .min(1)
7
+ .max(4096)
8
+ .describe('Absolute path to the project root.');
9
+ export function registerCodeGraphTools(server) {
10
+ server.registerTool('configure_code_graph', {
11
+ description: 'Configure a Code Graph MCP provider for semantic code navigation. ' +
12
+ 'Supports CodeGraphContext, Pathfinder, and Axon. ' +
13
+ 'Each setup action adds the provider to .claude.json so it is available in Claude Code. ' +
14
+ 'Actions: "setup-codegraph-context" | "setup-pathfinder" | "setup-axon" | "status".',
15
+ inputSchema: {
16
+ projectPath: projectPathSchema,
17
+ action: z
18
+ .enum(['setup-codegraph-context', 'setup-pathfinder', 'setup-axon', 'status'])
19
+ .describe('Action to perform. ' +
20
+ '"setup-codegraph-context" adds the CodeGraphContext MCP server. ' +
21
+ '"setup-pathfinder" adds the Pathfinder MCP server. ' +
22
+ '"setup-axon" adds the Axon MCP server. ' +
23
+ '"status" reports which providers are currently configured.'),
24
+ },
25
+ annotations: { title: 'Configure Code Graph Provider' },
26
+ }, safeLicensed('configure_code_graph', (args) => handleConfigureCodeGraph(args)));
27
+ server.registerTool('code_graph_status', {
28
+ description: 'Report which Code Graph MCP providers are configured in .claude.json. ' +
29
+ 'Returns providers list and the first active provider name.',
30
+ inputSchema: {
31
+ projectPath: projectPathSchema,
32
+ },
33
+ annotations: { title: 'Code Graph Status', readOnlyHint: true },
34
+ }, safeLicensed('code_graph_status', (args) => handleCodeGraphStatus(args)));
35
+ }
36
+ //# sourceMappingURL=register-code-graph-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-code-graph-tools.js","sourceRoot":"","sources":["../../src/tools/register-code-graph-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,IAAI,CAAC;KACT,QAAQ,CAAC,oCAAoC,CAAC,CAAC;AAElD,MAAM,UAAU,sBAAsB,CAAC,MAAiB;IACtD,MAAM,CAAC,YAAY,CACjB,sBAAsB,EACtB;QACE,WAAW,EACT,oEAAoE;YACpE,mDAAmD;YACnD,yFAAyF;YACzF,oFAAoF;QACtF,WAAW,EAAE;YACX,WAAW,EAAE,iBAAiB;YAC9B,MAAM,EAAE,CAAC;iBACN,IAAI,CAAC,CAAC,yBAAyB,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;iBAC7E,QAAQ,CACP,qBAAqB;gBACnB,kEAAkE;gBAClE,qDAAqD;gBACrD,yCAAyC;gBACzC,4DAA4D,CAC/D;SACJ;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,+BAA+B,EAAE;KACxD,EACD,YAAY,CAAC,sBAAsB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC5C,wBAAwB,CAAC,IAA2B,CAAC,CACtD,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,WAAW,EACT,wEAAwE;YACxE,4DAA4D;QAC9D,WAAW,EAAE;YACX,WAAW,EAAE,iBAAiB;SAC/B;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,IAAI,EAAE;KAChE,EACD,YAAY,CAAC,mBAAmB,EAAE,CAAC,IAAI,EAAE,EAAE,CACzC,qBAAqB,CAAC,IAA+B,CAAC,CACvD,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerContinueTools(server: McpServer): void;
3
+ //# sourceMappingURL=register-continue-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-continue-tools.d.ts","sourceRoot":"","sources":["../../src/tools/register-continue-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAYzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6C7D"}
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ import { safeLicensed } from './safe-handler.js';
3
+ import { handleConfigureContinue, handleContinueStatus } from './continue-config-handler.js';
4
+ const projectPathSchema = z
5
+ .string()
6
+ .min(1)
7
+ .max(4096)
8
+ .describe('Absolute path to the project root.');
9
+ export function registerContinueTools(server) {
10
+ server.registerTool('configure_continue', {
11
+ description: 'Generate .continue/config.json with a Planu MCP server entry for real-time spec adherence in the IDE. ' +
12
+ 'Supports stdio (local npx) and sse (hosted) transports. ' +
13
+ 'Adds slash commands: /spec, /validate, /criteria.',
14
+ inputSchema: {
15
+ projectPath: projectPathSchema,
16
+ transport: z
17
+ .enum(['stdio', 'sse'])
18
+ .describe('MCP transport to use. ' +
19
+ '"stdio" runs Planu locally via npx (recommended for local dev). ' +
20
+ '"sse" connects to a hosted Planu server — requires hostedUrl.'),
21
+ hostedUrl: z
22
+ .url()
23
+ .optional()
24
+ .describe('URL of the hosted Planu SSE server. Required when transport is "sse". ' +
25
+ 'Example: "https://planu.example.com/mcp/sse".'),
26
+ },
27
+ annotations: { title: 'Configure Continue.dev Integration' },
28
+ }, safeLicensed('configure_continue', (args) => handleConfigureContinue(args)));
29
+ server.registerTool('continue_status', {
30
+ description: 'Check whether .continue/config.json exists and has a Planu MCP entry. ' +
31
+ 'Returns configured status, transport type, and config file path.',
32
+ inputSchema: {
33
+ projectPath: projectPathSchema,
34
+ },
35
+ annotations: { title: 'Continue.dev Integration Status', readOnlyHint: true },
36
+ }, safeLicensed('continue_status', (args) => handleContinueStatus(args)));
37
+ }
38
+ //# sourceMappingURL=register-continue-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-continue-tools.js","sourceRoot":"","sources":["../../src/tools/register-continue-tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAG7F,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,IAAI,CAAC;KACT,QAAQ,CAAC,oCAAoC,CAAC,CAAC;AAElD,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,WAAW,EACT,wGAAwG;YACxG,0DAA0D;YAC1D,mDAAmD;QACrD,WAAW,EAAE;YACX,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,CAAC;iBACT,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;iBACtB,QAAQ,CACP,wBAAwB;gBACtB,kEAAkE;gBAClE,+DAA+D,CAClE;YACH,SAAS,EAAE,CAAC;iBACT,GAAG,EAAE;iBACL,QAAQ,EAAE;iBACV,QAAQ,CACP,wEAAwE;gBACtE,+CAA+C,CAClD;SACJ;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,oCAAoC,EAAE;KAC7D,EACD,YAAY,CAAC,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1C,uBAAuB,CAAC,IAA8B,CAAC,CACxD,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB;QACE,WAAW,EACT,wEAAwE;YACxE,kEAAkE;QACpE,WAAW,EAAE;YACX,WAAW,EAAE,iBAAiB;SAC/B;QACD,WAAW,EAAE,EAAE,KAAK,EAAE,iCAAiC,EAAE,YAAY,EAAE,IAAI,EAAE;KAC9E,EACD,YAAY,CAAC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAA2B,CAAC,CAAC,CAC7F,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function registerE2eTestGeneratorTools(server: McpServer): void;
3
+ //# sourceMappingURL=register-e2e-test-generator-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-e2e-test-generator-tools.d.ts","sourceRoot":"","sources":["../../src/tools/register-e2e-test-generator-tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA+CrE"}