@moreih29/nexus-core 0.12.0 → 0.14.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 (245) hide show
  1. package/README.md +76 -57
  2. package/assets/agents/architect/body.ko.md +177 -0
  3. package/{agents → assets/agents}/architect/body.md +16 -0
  4. package/assets/agents/designer/body.ko.md +125 -0
  5. package/{agents → assets/agents}/designer/body.md +16 -0
  6. package/assets/agents/engineer/body.ko.md +106 -0
  7. package/{agents → assets/agents}/engineer/body.md +14 -0
  8. package/assets/agents/lead/body.ko.md +70 -0
  9. package/assets/agents/lead/body.md +70 -0
  10. package/assets/agents/postdoc/body.ko.md +122 -0
  11. package/{agents → assets/agents}/postdoc/body.md +16 -0
  12. package/assets/agents/researcher/body.ko.md +137 -0
  13. package/{agents → assets/agents}/researcher/body.md +15 -0
  14. package/assets/agents/reviewer/body.ko.md +138 -0
  15. package/{agents → assets/agents}/reviewer/body.md +15 -0
  16. package/assets/agents/strategist/body.ko.md +116 -0
  17. package/{agents → assets/agents}/strategist/body.md +16 -0
  18. package/assets/agents/tester/body.ko.md +195 -0
  19. package/{agents → assets/agents}/tester/body.md +15 -0
  20. package/assets/agents/writer/body.ko.md +122 -0
  21. package/{agents → assets/agents}/writer/body.md +14 -0
  22. package/assets/capability-matrix.yml +198 -0
  23. package/assets/hooks/agent-bootstrap/handler.test.ts +368 -0
  24. package/assets/hooks/agent-bootstrap/handler.ts +119 -0
  25. package/assets/hooks/agent-bootstrap/meta.yml +10 -0
  26. package/assets/hooks/agent-finalize/handler.test.ts +368 -0
  27. package/assets/hooks/agent-finalize/handler.ts +76 -0
  28. package/assets/hooks/agent-finalize/meta.yml +10 -0
  29. package/assets/hooks/capability-matrix.yml +313 -0
  30. package/assets/hooks/post-tool-telemetry/handler.test.ts +302 -0
  31. package/assets/hooks/post-tool-telemetry/handler.ts +49 -0
  32. package/assets/hooks/post-tool-telemetry/meta.yml +11 -0
  33. package/assets/hooks/prompt-router/handler.test.ts +801 -0
  34. package/assets/hooks/prompt-router/handler.ts +261 -0
  35. package/assets/hooks/prompt-router/meta.yml +11 -0
  36. package/assets/hooks/session-init/handler.test.ts +274 -0
  37. package/assets/hooks/session-init/handler.ts +30 -0
  38. package/assets/hooks/session-init/meta.yml +9 -0
  39. package/assets/lsp-servers.json +55 -0
  40. package/assets/schema/lsp-servers.schema.json +67 -0
  41. package/assets/skills/nx-init/body.ko.md +197 -0
  42. package/{skills → assets/skills}/nx-init/body.md +11 -0
  43. package/assets/skills/nx-plan/body.ko.md +361 -0
  44. package/{skills → assets/skills}/nx-plan/body.md +13 -0
  45. package/assets/skills/nx-run/body.ko.md +161 -0
  46. package/{skills → assets/skills}/nx-run/body.md +11 -0
  47. package/assets/skills/nx-sync/body.ko.md +92 -0
  48. package/{skills → assets/skills}/nx-sync/body.md +10 -0
  49. package/assets/tools/tool-name-map.yml +353 -0
  50. package/dist/assets/hooks/agent-bootstrap/handler.d.ts +4 -0
  51. package/dist/assets/hooks/agent-bootstrap/handler.d.ts.map +1 -0
  52. package/dist/assets/hooks/agent-bootstrap/handler.js +100 -0
  53. package/dist/assets/hooks/agent-bootstrap/handler.js.map +1 -0
  54. package/dist/assets/hooks/agent-finalize/handler.d.ts +4 -0
  55. package/dist/assets/hooks/agent-finalize/handler.d.ts.map +1 -0
  56. package/dist/assets/hooks/agent-finalize/handler.js +63 -0
  57. package/dist/assets/hooks/agent-finalize/handler.js.map +1 -0
  58. package/dist/assets/hooks/post-tool-telemetry/handler.d.ts +4 -0
  59. package/dist/assets/hooks/post-tool-telemetry/handler.d.ts.map +1 -0
  60. package/dist/assets/hooks/post-tool-telemetry/handler.js +40 -0
  61. package/dist/assets/hooks/post-tool-telemetry/handler.js.map +1 -0
  62. package/dist/assets/hooks/prompt-router/handler.d.ts +4 -0
  63. package/dist/assets/hooks/prompt-router/handler.d.ts.map +1 -0
  64. package/dist/assets/hooks/prompt-router/handler.js +204 -0
  65. package/dist/assets/hooks/prompt-router/handler.js.map +1 -0
  66. package/dist/assets/hooks/session-init/handler.d.ts +4 -0
  67. package/dist/assets/hooks/session-init/handler.d.ts.map +1 -0
  68. package/dist/assets/hooks/session-init/handler.js +23 -0
  69. package/dist/assets/hooks/session-init/handler.js.map +1 -0
  70. package/dist/hooks/agent-bootstrap.js +105 -0
  71. package/dist/hooks/agent-finalize.js +164 -0
  72. package/dist/hooks/post-tool-telemetry.js +55 -0
  73. package/dist/hooks/prompt-router.js +7300 -0
  74. package/dist/hooks/session-init.js +21 -0
  75. package/dist/manifests/claude-hooks.json +52 -0
  76. package/dist/manifests/codex-hooks.json +28 -0
  77. package/dist/manifests/opencode-manifest.json +44 -0
  78. package/dist/manifests/portability-report.json +87 -0
  79. package/dist/scripts/build-agents.d.ts +157 -0
  80. package/dist/scripts/build-agents.d.ts.map +1 -0
  81. package/dist/scripts/build-agents.js +737 -0
  82. package/dist/scripts/build-agents.js.map +1 -0
  83. package/dist/scripts/build-hooks.d.ts +16 -0
  84. package/dist/scripts/build-hooks.d.ts.map +1 -0
  85. package/dist/scripts/build-hooks.js +388 -0
  86. package/dist/scripts/build-hooks.js.map +1 -0
  87. package/dist/scripts/cli.d.ts +54 -0
  88. package/dist/scripts/cli.d.ts.map +1 -0
  89. package/dist/scripts/cli.js +467 -0
  90. package/dist/scripts/cli.js.map +1 -0
  91. package/dist/src/hooks/opencode-mount.d.ts +35 -0
  92. package/dist/src/hooks/opencode-mount.d.ts.map +1 -0
  93. package/dist/src/hooks/opencode-mount.js +352 -0
  94. package/dist/src/hooks/opencode-mount.js.map +1 -0
  95. package/dist/src/hooks/runtime.d.ts +37 -0
  96. package/dist/src/hooks/runtime.d.ts.map +1 -0
  97. package/dist/src/hooks/runtime.js +274 -0
  98. package/dist/src/hooks/runtime.js.map +1 -0
  99. package/dist/src/hooks/types.d.ts +196 -0
  100. package/dist/src/hooks/types.d.ts.map +1 -0
  101. package/dist/src/hooks/types.js +85 -0
  102. package/dist/src/hooks/types.js.map +1 -0
  103. package/dist/src/lsp/cache.d.ts +9 -0
  104. package/dist/src/lsp/cache.d.ts.map +1 -0
  105. package/dist/src/lsp/cache.js +216 -0
  106. package/dist/src/lsp/cache.js.map +1 -0
  107. package/dist/src/lsp/client.d.ts +24 -0
  108. package/dist/src/lsp/client.d.ts.map +1 -0
  109. package/dist/src/lsp/client.js +166 -0
  110. package/dist/src/lsp/client.js.map +1 -0
  111. package/dist/src/lsp/detect.d.ts +77 -0
  112. package/dist/src/lsp/detect.d.ts.map +1 -0
  113. package/dist/src/lsp/detect.js +116 -0
  114. package/dist/src/lsp/detect.js.map +1 -0
  115. package/dist/src/mcp/server.d.ts +5 -0
  116. package/dist/src/mcp/server.d.ts.map +1 -0
  117. package/dist/src/mcp/server.js +34 -0
  118. package/dist/src/mcp/server.js.map +1 -0
  119. package/dist/src/mcp/tools/artifact.d.ts +4 -0
  120. package/dist/src/mcp/tools/artifact.d.ts.map +1 -0
  121. package/dist/src/mcp/tools/artifact.js +36 -0
  122. package/dist/src/mcp/tools/artifact.js.map +1 -0
  123. package/dist/src/mcp/tools/history.d.ts +3 -0
  124. package/dist/src/mcp/tools/history.d.ts.map +1 -0
  125. package/dist/src/mcp/tools/history.js +29 -0
  126. package/dist/src/mcp/tools/history.js.map +1 -0
  127. package/dist/src/mcp/tools/lsp.d.ts +13 -0
  128. package/dist/src/mcp/tools/lsp.d.ts.map +1 -0
  129. package/dist/src/mcp/tools/lsp.js +225 -0
  130. package/dist/src/mcp/tools/lsp.js.map +1 -0
  131. package/dist/src/mcp/tools/plan.d.ts +3 -0
  132. package/dist/src/mcp/tools/plan.d.ts.map +1 -0
  133. package/dist/src/mcp/tools/plan.js +317 -0
  134. package/dist/src/mcp/tools/plan.js.map +1 -0
  135. package/dist/src/mcp/tools/task.d.ts +3 -0
  136. package/dist/src/mcp/tools/task.d.ts.map +1 -0
  137. package/dist/src/mcp/tools/task.js +252 -0
  138. package/dist/src/mcp/tools/task.js.map +1 -0
  139. package/dist/src/shared/invocations.d.ts +74 -0
  140. package/dist/src/shared/invocations.d.ts.map +1 -0
  141. package/dist/src/shared/invocations.js +247 -0
  142. package/dist/src/shared/invocations.js.map +1 -0
  143. package/dist/src/shared/json-store.d.ts +37 -0
  144. package/dist/src/shared/json-store.d.ts.map +1 -0
  145. package/dist/src/shared/json-store.js +163 -0
  146. package/dist/src/shared/json-store.js.map +1 -0
  147. package/dist/src/shared/mcp-utils.d.ts +3 -0
  148. package/dist/src/shared/mcp-utils.d.ts.map +1 -0
  149. package/dist/src/shared/mcp-utils.js +6 -0
  150. package/dist/src/shared/mcp-utils.js.map +1 -0
  151. package/dist/src/shared/paths.d.ts +21 -0
  152. package/dist/src/shared/paths.d.ts.map +1 -0
  153. package/dist/src/shared/paths.js +81 -0
  154. package/dist/src/shared/paths.js.map +1 -0
  155. package/dist/src/shared/tool-log.d.ts +8 -0
  156. package/dist/src/shared/tool-log.d.ts.map +1 -0
  157. package/dist/src/shared/tool-log.js +22 -0
  158. package/dist/src/shared/tool-log.js.map +1 -0
  159. package/dist/src/types/state.d.ts +862 -0
  160. package/dist/src/types/state.d.ts.map +1 -0
  161. package/dist/src/types/state.js +66 -0
  162. package/dist/src/types/state.js.map +1 -0
  163. package/docs/consuming/codex-lead-merge.md +106 -0
  164. package/docs/plugin-guide.md +396 -0
  165. package/docs/plugin-template/claude/.github/workflows/build.yml +60 -0
  166. package/docs/plugin-template/claude/README.md +110 -0
  167. package/docs/plugin-template/claude/package.json +16 -0
  168. package/docs/plugin-template/codex/.github/workflows/build.yml +51 -0
  169. package/docs/plugin-template/codex/README.md +147 -0
  170. package/docs/plugin-template/codex/package.json +17 -0
  171. package/docs/plugin-template/opencode/.github/workflows/build.yml +61 -0
  172. package/docs/plugin-template/opencode/README.md +121 -0
  173. package/docs/plugin-template/opencode/package.json +25 -0
  174. package/package.json +36 -28
  175. package/agents/architect/meta.yml +0 -13
  176. package/agents/designer/meta.yml +0 -13
  177. package/agents/engineer/meta.yml +0 -11
  178. package/agents/postdoc/meta.yml +0 -13
  179. package/agents/researcher/meta.yml +0 -12
  180. package/agents/reviewer/meta.yml +0 -12
  181. package/agents/strategist/meta.yml +0 -13
  182. package/agents/tester/meta.yml +0 -12
  183. package/agents/writer/meta.yml +0 -11
  184. package/conformance/README.md +0 -311
  185. package/conformance/examples/plan.extension.schema.example.json +0 -25
  186. package/conformance/lifecycle/README.md +0 -48
  187. package/conformance/lifecycle/agent-complete.json +0 -44
  188. package/conformance/lifecycle/agent-resume.json +0 -43
  189. package/conformance/lifecycle/agent-spawn.json +0 -36
  190. package/conformance/lifecycle/memory-access-record.json +0 -27
  191. package/conformance/lifecycle/session-end.json +0 -48
  192. package/conformance/scenarios/full-plan-cycle.json +0 -147
  193. package/conformance/scenarios/task-deps-ordering.json +0 -95
  194. package/conformance/schema/fixture.schema.json +0 -354
  195. package/conformance/state-schemas/agent-tracker.schema.json +0 -63
  196. package/conformance/state-schemas/history.schema.json +0 -134
  197. package/conformance/state-schemas/memory-access.schema.json +0 -36
  198. package/conformance/state-schemas/plan.schema.json +0 -77
  199. package/conformance/state-schemas/tasks.schema.json +0 -98
  200. package/conformance/tools/artifact-write.json +0 -97
  201. package/conformance/tools/context.json +0 -172
  202. package/conformance/tools/history-search.json +0 -219
  203. package/conformance/tools/plan-decide.json +0 -139
  204. package/conformance/tools/plan-start.json +0 -81
  205. package/conformance/tools/plan-status.json +0 -127
  206. package/conformance/tools/plan-update.json +0 -341
  207. package/conformance/tools/task-add.json +0 -156
  208. package/conformance/tools/task-close.json +0 -161
  209. package/conformance/tools/task-list.json +0 -177
  210. package/conformance/tools/task-update.json +0 -167
  211. package/docs/behavioral-contracts.md +0 -145
  212. package/docs/consumer-implementation-guide.md +0 -840
  213. package/docs/memory-lifecycle-contract.md +0 -119
  214. package/docs/nexus-layout.md +0 -224
  215. package/docs/nexus-outputs-contract.md +0 -344
  216. package/docs/nexus-state-overview.md +0 -170
  217. package/docs/nexus-tools-contract.md +0 -438
  218. package/manifest.json +0 -448
  219. package/schema/README.md +0 -69
  220. package/schema/agent.schema.json +0 -23
  221. package/schema/common.schema.json +0 -17
  222. package/schema/manifest.schema.json +0 -78
  223. package/schema/memory-policy.schema.json +0 -98
  224. package/schema/skill.schema.json +0 -54
  225. package/schema/task-exceptions.schema.json +0 -40
  226. package/schema/vocabulary.schema.json +0 -167
  227. package/scripts/.gitkeep +0 -0
  228. package/scripts/conformance-coverage.ts +0 -466
  229. package/scripts/import-from-claude-nexus.ts +0 -403
  230. package/scripts/lib/frontmatter.ts +0 -71
  231. package/scripts/lib/lint.ts +0 -348
  232. package/scripts/lib/structure.ts +0 -159
  233. package/scripts/lib/validate.ts +0 -796
  234. package/scripts/validate.ts +0 -90
  235. package/skills/nx-init/meta.yml +0 -8
  236. package/skills/nx-plan/meta.yml +0 -10
  237. package/skills/nx-run/meta.yml +0 -8
  238. package/skills/nx-sync/meta.yml +0 -7
  239. package/vocabulary/capabilities.yml +0 -65
  240. package/vocabulary/categories.yml +0 -11
  241. package/vocabulary/invocations.yml +0 -147
  242. package/vocabulary/memory_policy.yml +0 -88
  243. package/vocabulary/resume-tiers.yml +0 -11
  244. package/vocabulary/tags.yml +0 -60
  245. package/vocabulary/task-exceptions.yml +0 -29
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { registerPlanTools } from "./tools/plan.js";
5
+ import { registerTaskTools } from "./tools/task.js";
6
+ import { registerHistoryTools } from "./tools/history.js";
7
+ import { registerArtifactTools } from "./tools/artifact.js";
8
+ import { registerLspTools } from "./tools/lsp.js";
9
+ export function createServer() {
10
+ const server = new McpServer({
11
+ name: "nexus-core",
12
+ version: "0.13.0",
13
+ });
14
+ registerPlanTools(server);
15
+ registerTaskTools(server);
16
+ registerHistoryTools(server);
17
+ registerArtifactTools(server);
18
+ registerLspTools(server);
19
+ return server;
20
+ }
21
+ export async function main() {
22
+ const server = createServer();
23
+ const transport = new StdioServerTransport();
24
+ await server.connect(transport);
25
+ }
26
+ // Direct execution detection (node·bun 양립)
27
+ const isDirectRun = import.meta.url === `file://${process.argv[1]}`;
28
+ if (isDirectRun) {
29
+ main().catch((err) => {
30
+ console.error("[nexus-mcp] fatal:", err);
31
+ process.exit(1);
32
+ });
33
+ }
34
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,UAAU,YAAY;IAC1B,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,QAAQ;KAClB,CAAC,CAAC;IACH,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC1B,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC7B,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,IAAI;IACxB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,2CAA2C;AAC3C,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACpE,IAAI,WAAW,EAAE,CAAC;IAChB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function sanitizeName(input: string): string;
3
+ export declare function registerArtifactTools(server: McpServer): void;
4
+ //# sourceMappingURL=artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/artifact.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAOzE,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0B7D"}
@@ -0,0 +1,36 @@
1
+ import { z } from "zod";
2
+ import { mkdir, realpath, writeFile } from "node:fs/promises";
3
+ import { dirname, join, relative } from "node:path";
4
+ import { findProjectRoot, getSessionRoot } from "../../shared/paths.js";
5
+ import { textResult } from "../../shared/mcp-utils.js";
6
+ export function sanitizeName(input) {
7
+ const normalized = input.replace(/\\/g, "/");
8
+ const segments = normalized.split("/").filter((s) => s && s !== "." && s !== "..");
9
+ if (segments.length === 0) {
10
+ throw new Error("Invalid filename: empty after sanitize");
11
+ }
12
+ return segments.join("/");
13
+ }
14
+ export function registerArtifactTools(server) {
15
+ server.tool("nx_artifact_write", "Write a team artifact (report, synthesis, analysis) to the project's nexus state", {
16
+ filename: z.string().describe("Filename to write (e.g. 'findings.md', 'sub/synthesis.md')"),
17
+ content: z.string().describe("File content"),
18
+ }, async ({ filename, content }) => {
19
+ const safeName = sanitizeName(filename);
20
+ const artifactsDir = join(getSessionRoot(), "artifacts");
21
+ const outputPath = join(artifactsDir, safeName);
22
+ const outputDir = dirname(outputPath);
23
+ await mkdir(outputDir, { recursive: true });
24
+ // Resolve symlinks in the output directory and verify it stays inside artifactsDir
25
+ const realOutputDir = await realpath(outputDir);
26
+ const realArtifactsDir = await realpath(artifactsDir);
27
+ if (!realOutputDir.startsWith(realArtifactsDir + "/") && realOutputDir !== realArtifactsDir) {
28
+ throw new Error("Security: resolved path escapes artifactsDir");
29
+ }
30
+ await writeFile(outputPath, content, "utf-8");
31
+ const projectRoot = findProjectRoot();
32
+ const relPath = relative(projectRoot, outputPath);
33
+ return textResult({ success: true, path: relPath });
34
+ });
35
+ }
36
+ //# sourceMappingURL=artifact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.js","sourceRoot":"","sources":["../../../../src/mcp/tools/artifact.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CA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AClE,CAAC;QACD,MAAM,SAAS,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9C,MAAM,WAAW,GAAG,eAAe,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAClD,OAAO,UAAU,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerHistoryTools(server: McpServer): void;
3
+ //# sourceMappingURL=history.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/history.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAQzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA8B5D"}
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ import { join } from "node:path";
3
+ import { readJsonFile } from "../../shared/json-store.js";
4
+ import { textResult } from "../../shared/mcp-utils.js";
5
+ import { getNexusRoot } from "../../shared/paths.js";
6
+ export function registerHistoryTools(server) {
7
+ server.tool("nx_history_search", "Search past cycles in .nexus/history.json by full-text or get most recent N", {
8
+ query: z.string().optional().describe("Full-text search term against cycle JSON"),
9
+ last_n: z.number().optional().describe("Max cycles to return (default: 10)"),
10
+ }, async ({ query, last_n }) => {
11
+ const historyPath = join(getNexusRoot(), "history.json");
12
+ const history = await readJsonFile(historyPath, { cycles: [] });
13
+ let cycles = Array.isArray(history.cycles) ? history.cycles : [];
14
+ if (query && query.length > 0) {
15
+ const q = query.toLowerCase();
16
+ cycles = cycles.filter((c) => JSON.stringify(c).toLowerCase().includes(q));
17
+ }
18
+ const total = cycles.length;
19
+ const reversed = [...cycles].reverse(); // newest → oldest
20
+ const limit = last_n ?? 10;
21
+ const showing = reversed.slice(0, limit);
22
+ return textResult({
23
+ total,
24
+ showing: showing.length,
25
+ cycles: showing,
26
+ });
27
+ });
28
+ }
29
+ //# sourceMappingURL=history.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.js","sourceRoot":"","sources":["../../../../src/mcp/tools/history.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IACpD,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,6EAA6E,EAC7E;QACE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;QACjF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;KAC7E,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE,cAAc,CAAC,CAAC;QACzD,MAAM,OAAO,GAAG,MAAM,YAAY,CAAc,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7E,IAAI,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QAEjE,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,MAAM,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;YAC9B,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7E,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,CAAG,kBAAkB;QAC5D,MAAM,KAAK,GAAG,MAAM,IAAI,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAEzC,OAAO,UAAU,CAAC;YAChB,KAAK;YACL,OAAO,EAAE,OAAO,CAAC,MAAM;YACvB,MAAM,EAAE,OAAO;SAChB,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare function formatMarkupContent(content: unknown): string;
3
+ export declare function formatLocation(loc: {
4
+ uri?: string;
5
+ range?: {
6
+ start: {
7
+ line: number;
8
+ character: number;
9
+ };
10
+ };
11
+ }, projectRoot: string): string;
12
+ export declare function registerLspTools(server: McpServer): void;
13
+ //# sourceMappingURL=lsp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/lsp.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAUzE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAY5D;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,EAC7E,WAAW,EAAE,MAAM,GAClB,MAAM,CAUR;AAmCD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmOxD"}
@@ -0,0 +1,225 @@
1
+ import { z } from 'zod';
2
+ import { resolve, sep } from 'node:path';
3
+ import { pathToFileURL } from 'node:url';
4
+ import { ensureClient, ensureFileSync } from '../../lsp/cache.js';
5
+ import { findProjectRoot } from '../../shared/paths.js';
6
+ import { textResult } from '../../shared/mcp-utils.js';
7
+ // ---------------------------------------------------------------------------
8
+ // Helpers
9
+ // ---------------------------------------------------------------------------
10
+ export function formatMarkupContent(content) {
11
+ if (!content)
12
+ return '';
13
+ if (typeof content === 'string')
14
+ return content;
15
+ if (Array.isArray(content)) {
16
+ return content.map(formatMarkupContent).filter(Boolean).join('\n\n');
17
+ }
18
+ if (typeof content === 'object' && content !== null) {
19
+ const obj = content;
20
+ if (obj.value !== undefined)
21
+ return String(obj.value);
22
+ if (obj.contents !== undefined)
23
+ return formatMarkupContent(obj.contents);
24
+ }
25
+ return JSON.stringify(content);
26
+ }
27
+ export function formatLocation(loc, projectRoot) {
28
+ const rootUri = pathToFileURL(projectRoot).href;
29
+ const file = loc.uri
30
+ ? loc.uri.startsWith(rootUri + '/')
31
+ ? loc.uri.slice(rootUri.length + 1)
32
+ : loc.uri
33
+ : 'unknown';
34
+ const line = (loc.range?.start.line ?? 0) + 1;
35
+ const col = (loc.range?.start.character ?? 0) + 1;
36
+ return `${file}:${line}:${col}`;
37
+ }
38
+ // ---------------------------------------------------------------------------
39
+ // withClient — shared error-handling wrapper
40
+ // ---------------------------------------------------------------------------
41
+ async function withClient(file, op) {
42
+ // Path escape guard: file must resolve inside project root.
43
+ const root = findProjectRoot();
44
+ const absFile = resolve(root, file);
45
+ if (absFile !== root && !absFile.startsWith(root + sep)) {
46
+ return textResult({ error: `File path escapes project root: ${file}` });
47
+ }
48
+ const result = await ensureClient(file);
49
+ if ('error' in result) {
50
+ return textResult(result);
51
+ }
52
+ const client = result;
53
+ await ensureFileSync(client, file);
54
+ const uri = pathToFileURL(absFile).href;
55
+ try {
56
+ return textResult(await op(client, uri));
57
+ }
58
+ catch (err) {
59
+ return textResult({ error: String(err) });
60
+ }
61
+ }
62
+ // ---------------------------------------------------------------------------
63
+ // Tool registration
64
+ // ---------------------------------------------------------------------------
65
+ export function registerLspTools(server) {
66
+ // 1. nx_lsp_hover
67
+ server.tool('nx_lsp_hover', 'Get type information for a symbol at a specific position', {
68
+ file: z.string().describe('File path (relative to project root)'),
69
+ line: z.coerce.number().describe('Line number (1-based)'),
70
+ character: z.coerce.number().describe('Column number (1-based)'),
71
+ }, async ({ file, line, character }) => {
72
+ return withClient(file, async (client, uri) => {
73
+ const result = (await client.request('textDocument/hover', {
74
+ textDocument: { uri },
75
+ position: { line: line - 1, character: character - 1 },
76
+ }));
77
+ if (!result) {
78
+ return { hover: null, file, line, character };
79
+ }
80
+ return { hover: formatMarkupContent(result.contents), file, line, character };
81
+ });
82
+ });
83
+ // 2. nx_lsp_diagnostics
84
+ server.tool('nx_lsp_diagnostics', 'Get compiler/linter errors and warnings for a file', {
85
+ file: z.string().describe('File path (relative to project root)'),
86
+ }, async ({ file }) => {
87
+ return withClient(file, async (client, uri) => {
88
+ const diagnostics = [];
89
+ const handler = (params) => {
90
+ const p = params;
91
+ if (p.uri === uri) {
92
+ diagnostics.push(...p.diagnostics);
93
+ }
94
+ };
95
+ client.on('textDocument/publishDiagnostics', handler);
96
+ await new Promise((r) => setTimeout(r, 2000));
97
+ client.removeListener('textDocument/publishDiagnostics', handler);
98
+ const severityMap = {
99
+ 1: 'error',
100
+ 2: 'warning',
101
+ 3: 'info',
102
+ 4: 'hint',
103
+ };
104
+ const formatted = diagnostics.map((d) => ({
105
+ severity: severityMap[d.severity] ?? 'unknown',
106
+ message: d.message,
107
+ line: (d.range?.start?.line ?? 0) + 1,
108
+ character: (d.range?.start?.character ?? 0) + 1,
109
+ }));
110
+ return { diagnostics: formatted, count: formatted.length, file };
111
+ });
112
+ });
113
+ // 3. nx_lsp_find_references
114
+ server.tool('nx_lsp_find_references', 'Find all references to a symbol', {
115
+ file: z.string().describe('File path (relative to project root)'),
116
+ line: z.coerce.number().describe('Line number (1-based)'),
117
+ character: z.coerce.number().describe('Column number (1-based)'),
118
+ includeDeclaration: z.boolean().optional().describe('Include the declaration itself (default: true)'),
119
+ }, async ({ file, line, character, includeDeclaration }) => {
120
+ return withClient(file, async (client, uri) => {
121
+ const result = await client.request('textDocument/references', {
122
+ textDocument: { uri },
123
+ position: { line: line - 1, character: character - 1 },
124
+ context: { includeDeclaration: includeDeclaration ?? true },
125
+ });
126
+ const root = findProjectRoot();
127
+ const locations = Array.isArray(result) ? result : [];
128
+ const formatted = locations.map((loc) => formatLocation(loc, root));
129
+ return { references: formatted, count: formatted.length, file, line, character };
130
+ });
131
+ });
132
+ // 4. nx_lsp_rename
133
+ server.tool('nx_lsp_rename', 'Rename a symbol across the project (returns list of edits to apply, does not modify files)', {
134
+ file: z.string().describe('File path (relative to project root)'),
135
+ line: z.coerce.number().describe('Line number (1-based)'),
136
+ character: z.coerce.number().describe('Column number (1-based)'),
137
+ newName: z.string().describe('New name for the symbol'),
138
+ }, async ({ file, line, character, newName }) => {
139
+ return withClient(file, async (client, uri) => {
140
+ const result = (await client.request('textDocument/rename', {
141
+ textDocument: { uri },
142
+ position: { line: line - 1, character: character - 1 },
143
+ newName,
144
+ }));
145
+ if (!result) {
146
+ return { error: 'Rename not supported at this position' };
147
+ }
148
+ const root = findProjectRoot();
149
+ const rootUri = pathToFileURL(root).href;
150
+ const edits = [];
151
+ if (result.changes) {
152
+ for (const [fileUri, changes] of Object.entries(result.changes)) {
153
+ const relFile = fileUri.startsWith(rootUri + '/')
154
+ ? fileUri.slice(rootUri.length + 1)
155
+ : fileUri;
156
+ for (const change of changes) {
157
+ edits.push({
158
+ file: relFile,
159
+ line: (change.range?.start?.line ?? 0) + 1,
160
+ newText: change.newText,
161
+ });
162
+ }
163
+ }
164
+ }
165
+ if (result.documentChanges) {
166
+ for (const dc of result.documentChanges) {
167
+ if (dc.textDocument && dc.edits) {
168
+ const fileUri = dc.textDocument.uri;
169
+ const relFile = fileUri.startsWith(rootUri + '/')
170
+ ? fileUri.slice(rootUri.length + 1)
171
+ : fileUri;
172
+ for (const edit of dc.edits) {
173
+ edits.push({
174
+ file: relFile,
175
+ line: (edit.range?.start?.line ?? 0) + 1,
176
+ newText: edit.newText,
177
+ });
178
+ }
179
+ }
180
+ }
181
+ }
182
+ return { edits, count: edits.length, newName };
183
+ });
184
+ });
185
+ // 5. nx_lsp_code_actions
186
+ server.tool('nx_lsp_code_actions', 'Get suggested fixes and refactoring actions for a code range', {
187
+ file: z.string().describe('File path (relative to project root)'),
188
+ startLine: z.coerce.number().describe('Start line number (1-based)'),
189
+ endLine: z.coerce.number().describe('End line number (1-based)'),
190
+ }, async ({ file, startLine, endLine }) => {
191
+ return withClient(file, async (client, uri) => {
192
+ // Collect diagnostics for the range
193
+ const diagnostics = [];
194
+ const handler = (params) => {
195
+ const p = params;
196
+ if (p.uri === uri)
197
+ diagnostics.push(...p.diagnostics);
198
+ };
199
+ client.on('textDocument/publishDiagnostics', handler);
200
+ await new Promise((r) => setTimeout(r, 2000));
201
+ client.removeListener('textDocument/publishDiagnostics', handler);
202
+ // Filter diagnostics within the requested range
203
+ const rangeDiags = diagnostics.filter((d) => {
204
+ const line = d.range?.start?.line ?? 0;
205
+ return line >= startLine - 1 && line <= endLine - 1;
206
+ });
207
+ const result = await client.request('textDocument/codeAction', {
208
+ textDocument: { uri },
209
+ range: {
210
+ start: { line: startLine - 1, character: 0 },
211
+ end: { line: endLine - 1, character: 999 },
212
+ },
213
+ context: { diagnostics: rangeDiags },
214
+ });
215
+ const actions = Array.isArray(result) ? result : [];
216
+ const formatted = actions.map((a) => ({
217
+ title: a.title,
218
+ kind: a.kind ?? 'unknown',
219
+ isPreferred: a.isPreferred ?? false,
220
+ }));
221
+ return { actions: formatted, count: formatted.length, file, startLine, endLine };
222
+ });
223
+ });
224
+ }
225
+ //# sourceMappingURL=lsp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lsp.js","sourceRoot":"","sources":["../../../../src/mcp/tools/lsp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC;IAChD,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;IACD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACpD,MAAM,GAAG,GAAG,OAAkC,CAAC;QAC/C,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtD,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS;YAAE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,UAAU,EAAE;aACrC,CAAC,CAAC;YAEH,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAC3B,CAAC,CAA0D,EAAE,EAAE,CAAC,CAAC;gBAC/D,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,SAAS;gBACzB,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,KAAK;aACpC,CAAC,CACH,CAAC;YAEF,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function registerPlanTools(server: McpServer): void;
3
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/plan.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkCzE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4VzD"}