@beehexa/hexasync-template-ide-mcp 0.0.0-stage → 2610.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/mcpServer.entry.d.ts +3 -0
- package/dist/mcpServer.entry.d.ts.map +1 -0
- package/dist/mcpServer.entry.js +17 -0
- package/dist/mcpServer.entry.js.map +1 -0
- package/dist/mcpServer.node.d.ts +2 -0
- package/dist/mcpServer.node.d.ts.map +1 -0
- package/dist/mcpServer.node.js +318 -0
- package/dist/mcpServer.node.js.map +1 -0
- package/dist/release-payload.json +1 -0
- package/dist/server.node.d.ts +3 -0
- package/dist/server.node.d.ts.map +1 -0
- package/dist/server.node.js +6716 -0
- package/package.json +40 -3
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { DocumentationKnowledgeResolver, DocumentationResourceListOutcome, DocumentationResourceReadOutcome } from '@beehexa/hexasync-template-agent-core';
|
|
2
|
+
export interface PortableDocumentationResourceReadRequest {
|
|
3
|
+
readonly uri: string;
|
|
4
|
+
readonly maxBytes: number;
|
|
5
|
+
}
|
|
6
|
+
export interface PortableDocumentationResourceAdapter {
|
|
7
|
+
readonly listResources: () => Promise<DocumentationResourceListOutcome>;
|
|
8
|
+
readonly readResource: (request: PortableDocumentationResourceReadRequest) => Promise<DocumentationResourceReadOutcome>;
|
|
9
|
+
}
|
|
10
|
+
export declare const createPortableDocumentationResourceAdapter: (resolver: DocumentationKnowledgeResolver) => PortableDocumentationResourceAdapter;
|
|
11
|
+
export type { DocumentationKnowledgeResolver, DocumentationResourceListOutcome, DocumentationResourceReadOutcome, } from '@beehexa/hexasync-template-agent-core';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,8BAA8B,EAC9B,gCAAgC,EAChC,gCAAgC,EACjC,MAAM,uCAAuC,CAAC;AAE/C,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,oCAAoC;IACnD,QAAQ,CAAC,aAAa,EAAE,MAAM,OAAO,CAAC,gCAAgC,CAAC,CAAC;IACxE,QAAQ,CAAC,YAAY,EAAE,CACrB,OAAO,EAAE,wCAAwC,KAC9C,OAAO,CAAC,gCAAgC,CAAC,CAAC;CAChD;AAED,eAAO,MAAM,0CAA0C,aAC3C,8BAA8B,KACvC,oCAgCF,CAAC;AAEF,YAAY,EACV,8BAA8B,EAC9B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,uCAAuC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const createPortableDocumentationResourceAdapter = (resolver) => {
|
|
2
|
+
const resolverDescriptors = Object.getOwnPropertyDescriptors(resolver);
|
|
3
|
+
const listOperation = resolverDescriptors.listDocumentationResources?.value;
|
|
4
|
+
const readOperation = resolverDescriptors.readDocumentationResource?.value;
|
|
5
|
+
if (typeof listOperation !== 'function' || typeof readOperation !== 'function') {
|
|
6
|
+
throw new TypeError('A KnowledgeResolver with manifest list/read operations is required.');
|
|
7
|
+
}
|
|
8
|
+
const listResources = async () => listOperation.call(resolver);
|
|
9
|
+
const readResource = async (request) => {
|
|
10
|
+
let descriptors = {};
|
|
11
|
+
if (request !== null && typeof request === 'object') {
|
|
12
|
+
try {
|
|
13
|
+
descriptors = Object.getOwnPropertyDescriptors(request);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
descriptors = {};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
const uri = descriptors.uri?.get === undefined && descriptors.uri?.set === undefined
|
|
20
|
+
? descriptors.uri?.value
|
|
21
|
+
: undefined;
|
|
22
|
+
const maxBytes = descriptors.maxBytes?.get === undefined && descriptors.maxBytes?.set === undefined
|
|
23
|
+
? descriptors.maxBytes?.value
|
|
24
|
+
: undefined;
|
|
25
|
+
return readOperation.call(resolver, uri, maxBytes);
|
|
26
|
+
};
|
|
27
|
+
return Object.freeze({ listResources, readResource });
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAC,MAAM,0CAA0C,GAAG,CACxD,QAAwC,EACF,EAAE;IACxC,MAAM,mBAAmB,GAAG,MAAM,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IACvE,MAAM,aAAa,GAAG,mBAAmB,CAAC,0BAA0B,EAAE,KAAK,CAAC;IAC5E,MAAM,aAAa,GAAG,mBAAmB,CAAC,yBAAyB,EAAE,KAAK,CAAC;IAC3E,IAAI,OAAO,aAAa,KAAK,UAAU,IAAI,OAAO,aAAa,KAAK,UAAU,EAAE,CAAC;QAC/E,MAAM,IAAI,SAAS,CAAC,qEAAqE,CAAC,CAAC;IAC7F,CAAC;IAED,MAAM,aAAa,GAAG,KAAK,IAA+C,EAAE,CAC1E,aAAa,CAAC,IAAI,CAAC,QAAQ,CAA8C,CAAC;IAE5E,MAAM,YAAY,GAAG,KAAK,EACxB,OAAiD,EACN,EAAE;QAC7C,IAAI,WAAW,GAAmD,EAAE,CAAC;QACrE,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YACpD,IAAI,CAAC;gBACH,WAAW,GAAG,MAAM,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;YAC1D,CAAC;YAAC,MAAM,CAAC;gBACP,WAAW,GAAG,EAAE,CAAC;YACnB,CAAC;QACH,CAAC;QACD,MAAM,GAAG,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,SAAS,IAAI,WAAW,CAAC,GAAG,EAAE,GAAG,KAAK,SAAS;YAClF,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK;YACxB,CAAC,CAAC,SAAS,CAAC;QACd,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,EAAE,GAAG,KAAK,SAAS,IAAI,WAAW,CAAC,QAAQ,EAAE,GAAG,KAAK,SAAS;YACjG,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK;YAC7B,CAAC,CAAC,SAAS,CAAC;QACd,OAAO,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,QAAQ,CAA8C,CAAC;IAClG,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpServer.entry.d.ts","sourceRoot":"","sources":["../src/mcpServer.entry.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* The process entry point, and nothing else.
|
|
4
|
+
*
|
|
5
|
+
* ⛔ A separate file rather than an `invokedDirectly` guard inside `mcpServer.node.ts`. The guard was written as
|
|
6
|
+
* `realpathSync(process.argv[1]) === realpathSync(new URL(import.meta.url).pathname)` — correct in ESM, and silently
|
|
7
|
+
* FALSE once esbuild bundles the module to CJS, where it rewrites `import.meta` to `{}`. The built server then
|
|
8
|
+
* started nothing, exited 0, and wrote not one byte to stdout: a server that fails by succeeding, which is the
|
|
9
|
+
* hardest shape to notice. Splitting the entry out means there is no condition left to get wrong — importing the
|
|
10
|
+
* module has no side effect because the module has no top-level call, and this file exists only to make one.
|
|
11
|
+
*/
|
|
12
|
+
import { startMcpServer } from './mcpServer.node.js';
|
|
13
|
+
startMcpServer().catch((error) => {
|
|
14
|
+
process.stderr.write(`hexasync mcp server failed to start: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=mcpServer.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpServer.entry.js","sourceRoot":"","sources":["../src/mcpServer.entry.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACxC,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,wCAAwC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CACnG,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpServer.node.d.ts","sourceRoot":"","sources":["../src/mcpServer.node.ts"],"names":[],"mappings":"AAgPA,wBAAsB,cAAc,CAAC,IAAI,GAAE,SAAS,MAAM,EAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CA+GnG"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The MCP server the VSIX SHIPS and launches (Phase 1 + Phase 2 of `HEXASYNC-MCP-IMPLEMENTATION-PLAN.md`).
|
|
3
|
+
*
|
|
4
|
+
* ### Why it is here and not in the CLI
|
|
5
|
+
*
|
|
6
|
+
* It used to be `hexasync-cli-nodejs/apps/cli/src/commands/mcpCommand.ts`, reachable only as `hexasync mcp` — which
|
|
7
|
+
* meant the editor could offer MCP only to users who had separately installed a global CLI, and `mcpClients.ts`
|
|
8
|
+
* wrote `{ command: 'hexasync', args: ['mcp'] }` into every client config on that assumption. The CLI is being
|
|
9
|
+
* retired, so a server that only it can start is a server that is about to stop existing. It lives in this package
|
|
10
|
+
* now, bundles into `dist/mcp/server.js`, and is launched by the extension itself.
|
|
11
|
+
*
|
|
12
|
+
* ### It answers nothing of its own
|
|
13
|
+
*
|
|
14
|
+
* Every tool call goes to `answerAgentTool` in `@beehexa/hexasync-template-validate` — the same body the editor's
|
|
15
|
+
* `src/adapters/agentTools.ts` calls. This file supplies only the two things that are genuinely different on a
|
|
16
|
+
* stdio host: reading a file with `node:fs`, and validating on demand rather than reading the editor's diagnostics.
|
|
17
|
+
* That is the whole reason the extraction happened: before it, the editor's answers and the server's were two
|
|
18
|
+
* implementations that had already drifted twice.
|
|
19
|
+
*
|
|
20
|
+
* ### ⛔ Roots, not `process.cwd()`
|
|
21
|
+
*
|
|
22
|
+
* The old server took `process.cwd()` as authority, so the answer depended on whichever directory the CLIENT
|
|
23
|
+
* happened to launch it from — a workspace-shaped question answered by a process detail. Roots are explicit here:
|
|
24
|
+
* `--root <dir>` (repeatable) from the launcher, else the roots the client negotiates over MCP, and only then the
|
|
25
|
+
* working directory. Every file read is confined to them.
|
|
26
|
+
*
|
|
27
|
+
* ### ⛔ No port, no network, no spawn, no credential
|
|
28
|
+
*
|
|
29
|
+
* stdio only. The SDK's *declared* dependencies include `express`, `hono`, `cors`, `cross-spawn`, `jose` and
|
|
30
|
+
* `pkce-challenge` — an HTTP stack, a process spawner and OAuth. They live behind its OTHER entry points (the HTTP
|
|
31
|
+
* and SSE transports, the OAuth helpers), and this file imports neither. `test/mcpServerSurface.spec.ts` walks the
|
|
32
|
+
* reachable module graph and fails if any of them becomes reachable, so that is a checked property rather than a
|
|
33
|
+
* promise about someone else's package.
|
|
34
|
+
*/
|
|
35
|
+
import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from 'node:fs';
|
|
36
|
+
import { isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
37
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
38
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
39
|
+
import { RootsListChangedNotificationSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
40
|
+
import { KNOWLEDGE_BASE } from './knowledgeBase.generated.js';
|
|
41
|
+
import { z } from 'zod';
|
|
42
|
+
import { parse } from 'yaml';
|
|
43
|
+
import { AGENT_TOOLS, answerAgentTool, findingsTouching, renderFindings, VALIDATION_RULES, } from '@beehexa/hexasync-template-validate';
|
|
44
|
+
/** Where `Install IntelliSense` puts the knowledge surface. Kept as a literal so this package needs no asset dep. */
|
|
45
|
+
const CANONICAL_SUBPATH = '.hexasync/intellisense';
|
|
46
|
+
/**
|
|
47
|
+
* `serverInfo`, as SPEC-template-ide-mcp-documentation CAP-8 fixes it.
|
|
48
|
+
*
|
|
49
|
+
* ⛔ `name` was `'hexasync'` — the vendor, not the product. HexaSync ships sibling MCP servers (Connector
|
|
50
|
+
* Builder, Metric Apps, Account, Template IDE); a client that logs `hexasync` records which company the server came
|
|
51
|
+
* from and nothing about which one it is talking to. `title` carries the human-readable product name for clients
|
|
52
|
+
* that show one.
|
|
53
|
+
*
|
|
54
|
+
* ⚠️ The raw tool names stay `hexasync_*` and are NOT renamed — CAP-8 lists that as a non-goal, because an
|
|
55
|
+
* existing prompt or configuration refers to them.
|
|
56
|
+
*/
|
|
57
|
+
const SERVER_NAME = 'hexasync-template-ide';
|
|
58
|
+
const SERVER_TITLE = 'HexaSync Template IDE MCP Server';
|
|
59
|
+
/**
|
|
60
|
+
* Roots, in the order of authority the spec sets out.
|
|
61
|
+
*
|
|
62
|
+
* ⚠️ `--root` wins over a negotiated root deliberately: the extension knows which workspace folder it is launching
|
|
63
|
+
* this server for, and a client that also advertises roots should not be able to redirect it.
|
|
64
|
+
*/
|
|
65
|
+
function rootsFromArgv(argv) {
|
|
66
|
+
const roots = [];
|
|
67
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
68
|
+
if (argv[i] !== '--root')
|
|
69
|
+
continue;
|
|
70
|
+
const value = argv[i + 1];
|
|
71
|
+
if (value !== undefined && !value.startsWith('--'))
|
|
72
|
+
roots.push(resolve(value));
|
|
73
|
+
}
|
|
74
|
+
return roots;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* ⛔ Confinement is by resolved REAL path, not by string prefix.
|
|
78
|
+
*
|
|
79
|
+
* `startsWith(root)` accepts `/ws-evil` for root `/ws`, and follows a symlink out of the tree without noticing.
|
|
80
|
+
* Resolving both ends and comparing path SEGMENTS is what makes "inside the workspace" mean it.
|
|
81
|
+
*/
|
|
82
|
+
function withinRoots(candidate, roots) {
|
|
83
|
+
let real;
|
|
84
|
+
try {
|
|
85
|
+
real = realpathSync(candidate);
|
|
86
|
+
}
|
|
87
|
+
catch {
|
|
88
|
+
// A path that does not exist yet is judged on where it WOULD be, not refused outright.
|
|
89
|
+
real = resolve(candidate);
|
|
90
|
+
}
|
|
91
|
+
return roots.some((root) => {
|
|
92
|
+
let base;
|
|
93
|
+
try {
|
|
94
|
+
base = realpathSync(root);
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
base = resolve(root);
|
|
98
|
+
}
|
|
99
|
+
if (real === base)
|
|
100
|
+
return true;
|
|
101
|
+
const rel = relative(base, real);
|
|
102
|
+
return rel !== '' && !rel.startsWith('..') && !isAbsolute(rel);
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** Every `*.yaml` under `dir`, confined to `roots`, without following a link out of them. */
|
|
106
|
+
function confinedYamlFiles(dir, roots) {
|
|
107
|
+
const found = [];
|
|
108
|
+
const walk = (at) => {
|
|
109
|
+
if (!withinRoots(at, roots))
|
|
110
|
+
return;
|
|
111
|
+
// ⚠️ Inferred, not annotated: `ReturnType<typeof readdirSync>` picks the Buffer overload under this
|
|
112
|
+
// TypeScript, and the resulting `Dirent<NonSharedBuffer>` makes every `entry.name` a Buffer.
|
|
113
|
+
let entries;
|
|
114
|
+
try {
|
|
115
|
+
entries = readdirSync(at, { withFileTypes: true });
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
for (const entry of entries) {
|
|
121
|
+
const full = join(at, entry.name);
|
|
122
|
+
if (!withinRoots(full, roots))
|
|
123
|
+
continue;
|
|
124
|
+
if (entry.isDirectory())
|
|
125
|
+
walk(full);
|
|
126
|
+
else if (entry.isFile() && /\.ya?ml$/i.test(entry.name))
|
|
127
|
+
found.push(full);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
walk(dir);
|
|
131
|
+
return found;
|
|
132
|
+
}
|
|
133
|
+
/** A file as the author knows it — relative to its root — never the absolute host path. */
|
|
134
|
+
function projectRelative(file, root) {
|
|
135
|
+
const rel = relative(root, file);
|
|
136
|
+
return rel.startsWith('..') ? file : rel.split(sep).join('/');
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The host half: `node:fs`, confined to the roots.
|
|
140
|
+
*
|
|
141
|
+
* ⚠️ The FIRST root that has the surface installed answers. A multi-root workspace where two folders each carry a
|
|
142
|
+
* surface is a real possibility and there is no honest way to merge them, so the order the launcher passed wins and
|
|
143
|
+
* this is stated rather than silently arbitrary.
|
|
144
|
+
*/
|
|
145
|
+
function nodeHost(roots) {
|
|
146
|
+
const surfaceRoot = () => roots.find((root) => existsSync(join(root, CANONICAL_SUBPATH)));
|
|
147
|
+
return {
|
|
148
|
+
readInstalled: async (relativePath) => {
|
|
149
|
+
const root = surfaceRoot();
|
|
150
|
+
if (root === undefined)
|
|
151
|
+
return undefined;
|
|
152
|
+
const full = join(root, CANONICAL_SUBPATH, ...relativePath.split('/'));
|
|
153
|
+
if (!withinRoots(full, roots))
|
|
154
|
+
return undefined;
|
|
155
|
+
try {
|
|
156
|
+
return readFileSync(full, 'utf8');
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
validateProject: async ({ full }) => {
|
|
163
|
+
/**
|
|
164
|
+
* ⛔ The honest difference from the editor, stated in the answer rather than hidden.
|
|
165
|
+
*
|
|
166
|
+
* The editor validates the EFFECTIVE graph — what a component composes to — because it has already run
|
|
167
|
+
* `runValidation` over it. A stdio server has no such graph without composing the project itself, so it runs
|
|
168
|
+
* the same `VALIDATION_RULES` registry over each authored document. Same rules, narrower input; an agent that
|
|
169
|
+
* gets a clean answer here has not been told the project composes.
|
|
170
|
+
*/
|
|
171
|
+
const root = roots.find((each) => existsSync(join(each, 'partials')));
|
|
172
|
+
if (root === undefined) {
|
|
173
|
+
return ('No HexaSync project is visible from this server’s roots — none of them contains a `partials/` ' +
|
|
174
|
+
'directory. Open the project folder, or pass it with `--root`.');
|
|
175
|
+
}
|
|
176
|
+
const documents = [];
|
|
177
|
+
for (const file of confinedYamlFiles(join(root, 'partials'), roots)) {
|
|
178
|
+
try {
|
|
179
|
+
const doc = parse(readFileSync(file, 'utf8'));
|
|
180
|
+
if (doc && typeof doc === 'object')
|
|
181
|
+
documents.push({ ...doc, __file: file });
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
// A file that does not parse is the schema's business, not this tool's.
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const all = documents.flatMap((document) => {
|
|
188
|
+
const file = String(document['__file'] ?? '');
|
|
189
|
+
return VALIDATION_RULES.flatMap((rule) => rule.run({ tokenForm: document }).map((issue) => ({
|
|
190
|
+
...issue,
|
|
191
|
+
sourceFile: projectRelative(String(issue.sourceFile ?? file), root),
|
|
192
|
+
})));
|
|
193
|
+
});
|
|
194
|
+
const findings = findingsTouching(all, []).map((issue) => ({
|
|
195
|
+
ruleId: String(issue['ruleId'] ?? ''),
|
|
196
|
+
message: String(issue['message'] ?? ''),
|
|
197
|
+
sourceFile: String(issue['sourceFile'] ?? ''),
|
|
198
|
+
line: Number(issue['line'] ?? 0),
|
|
199
|
+
}));
|
|
200
|
+
return renderFindings(findings, {
|
|
201
|
+
full,
|
|
202
|
+
emptyNote: 'No findings against the authored documents. ⚠️ This server validates what is WRITTEN, not what it ' +
|
|
203
|
+
'composes to — run the composition report for the whole project before reporting success.',
|
|
204
|
+
});
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/** The shared argument list, as the SDK wants it. One conversion, driven by `AGENT_TOOLS`. */
|
|
209
|
+
function schemaOf(tool) {
|
|
210
|
+
const shape = {};
|
|
211
|
+
for (const arg of tool.args) {
|
|
212
|
+
const base = arg.type === 'boolean'
|
|
213
|
+
? z.boolean()
|
|
214
|
+
: arg.type === 'string[]'
|
|
215
|
+
? z.array(z.string())
|
|
216
|
+
: z.string();
|
|
217
|
+
shape[arg.name] = arg.required
|
|
218
|
+
? base.describe(arg.description)
|
|
219
|
+
: base.optional().describe(arg.description);
|
|
220
|
+
}
|
|
221
|
+
return shape;
|
|
222
|
+
}
|
|
223
|
+
export async function startMcpServer(argv = process.argv.slice(2)) {
|
|
224
|
+
const explicit = rootsFromArgv(argv);
|
|
225
|
+
const server = new McpServer({
|
|
226
|
+
name: SERVER_NAME,
|
|
227
|
+
title: SERVER_TITLE,
|
|
228
|
+
version: process.env['HEXASYNC_MCP_VERSION'] ?? '0.0.0',
|
|
229
|
+
}, { capabilities: { tools: {}, resources: {} } });
|
|
230
|
+
/**
|
|
231
|
+
* Roots are resolved PER CALL, not once at startup.
|
|
232
|
+
*
|
|
233
|
+
* A client may add a workspace folder after connecting, and a server that cached its roots at startup would keep
|
|
234
|
+
* answering about the folder set it was born with — which is the `process.cwd()` defect in a new costume.
|
|
235
|
+
*/
|
|
236
|
+
let negotiated = [];
|
|
237
|
+
const rootsNow = () => {
|
|
238
|
+
const chosen = explicit.length ? explicit : negotiated.length ? negotiated : [process.cwd()];
|
|
239
|
+
return chosen.filter((root) => {
|
|
240
|
+
try {
|
|
241
|
+
return statSync(root).isDirectory();
|
|
242
|
+
}
|
|
243
|
+
catch {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
for (const tool of AGENT_TOOLS) {
|
|
249
|
+
server.registerTool(tool.name, {
|
|
250
|
+
title: tool.title,
|
|
251
|
+
description: tool.description,
|
|
252
|
+
inputSchema: schemaOf(tool),
|
|
253
|
+
}, async (args) => {
|
|
254
|
+
const roots = rootsNow();
|
|
255
|
+
if (roots.length === 0) {
|
|
256
|
+
return {
|
|
257
|
+
content: [
|
|
258
|
+
{
|
|
259
|
+
type: 'text',
|
|
260
|
+
text: 'This server has no usable root. The editor normally passes one with `--root`; an external ' +
|
|
261
|
+
'client must either advertise roots or be started in the project directory.',
|
|
262
|
+
},
|
|
263
|
+
],
|
|
264
|
+
isError: true,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const text = await answerAgentTool(tool.name, args ?? {}, nodeHost(roots));
|
|
268
|
+
return { content: [{ type: 'text', text }] };
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The knowledge base, served as resources.
|
|
273
|
+
*
|
|
274
|
+
* ⛔ Tools answer a question; resources are what somebody READS to learn to write a profile. A server with only
|
|
275
|
+
* tools can be interrogated but cannot be studied, and "how do I write a puller" is not a lookup — it is a page.
|
|
276
|
+
*
|
|
277
|
+
* These are embedded (`knowledgeBase.generated.ts`) rather than read from disk: the server runs from
|
|
278
|
+
* `dist/mcp/server.js` inside a packaged VSIX, where no docs directory is guaranteed to sit beside it. They also
|
|
279
|
+
* need no workspace root, so they answer in an empty window.
|
|
280
|
+
*/
|
|
281
|
+
for (const doc of KNOWLEDGE_BASE) {
|
|
282
|
+
server.registerResource(doc.slug, doc.uri, { title: doc.title, description: doc.title, mimeType: 'text/markdown' }, async () => ({ contents: [{ uri: doc.uri, mimeType: 'text/markdown', text: doc.text }] }));
|
|
283
|
+
}
|
|
284
|
+
const transport = new StdioServerTransport();
|
|
285
|
+
await server.connect(transport);
|
|
286
|
+
/**
|
|
287
|
+
* Ask the client for its roots once connected, and keep them current.
|
|
288
|
+
*
|
|
289
|
+
* ⚠️ Guarded: `roots/list` is optional, and a client that does not implement it must not turn every tool call
|
|
290
|
+
* into an error. When it is absent, `--root` or the working directory still answers.
|
|
291
|
+
*/
|
|
292
|
+
const refreshRoots = async () => {
|
|
293
|
+
try {
|
|
294
|
+
const listed = await server.server.listRoots();
|
|
295
|
+
negotiated = (listed.roots ?? [])
|
|
296
|
+
.map((root) => root.uri)
|
|
297
|
+
.filter((uri) => uri.startsWith('file://'))
|
|
298
|
+
.map((uri) => resolve(decodeURIComponent(new URL(uri).pathname)));
|
|
299
|
+
}
|
|
300
|
+
catch {
|
|
301
|
+
negotiated = [];
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
server.server.oninitialized = () => {
|
|
305
|
+
void refreshRoots();
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* ⛔ The SDK's own schema, not a `{ method: '...' }` literal.
|
|
309
|
+
*
|
|
310
|
+
* A literal type-checks through `as never` and then fails at CONNECT time with `Schema is missing a method
|
|
311
|
+
* literal` — the handler is registered by parsing the schema, not by reading a string. It took the whole server
|
|
312
|
+
* down on startup, before any tool could be listed.
|
|
313
|
+
*/
|
|
314
|
+
server.server.setNotificationHandler(RootsListChangedNotificationSchema, async () => {
|
|
315
|
+
await refreshRoots();
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
//# sourceMappingURL=mcpServer.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcpServer.node.js","sourceRoot":"","sources":["../src/mcpServer.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,E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