@beehexa/hexasync-template-ide-mcp 2610.4.7 → 2610.12.2
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/README.md +85 -0
- package/dist/buildIdentity.node.d.ts +10 -0
- package/dist/buildIdentity.node.d.ts.map +1 -0
- package/dist/buildIdentity.node.js +22 -0
- package/dist/buildIdentity.node.js.map +1 -0
- package/dist/bundledKnowledge.d.ts +12 -0
- package/dist/bundledKnowledge.d.ts.map +1 -0
- package/dist/bundledKnowledge.js +85 -0
- package/dist/bundledKnowledge.js.map +1 -0
- package/dist/index.d.ts +2 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -28
- package/dist/index.js.map +1 -1
- package/dist/knowledgeBase.generated.d.ts +29 -0
- package/dist/knowledgeBase.generated.d.ts.map +1 -0
- package/dist/knowledgeBase.generated.js +8370 -0
- package/dist/knowledgeBase.generated.js.map +1 -0
- package/dist/mcp/package.json +1 -0
- package/dist/mcp/prebuilds/darwin-arm64/root-authority.node +0 -0
- package/dist/mcp/prebuilds/darwin-x64/root-authority.node +0 -0
- package/dist/mcp/prebuilds/integrity.json +10 -0
- package/dist/mcp/prebuilds/linux-arm64-gnu/root-authority.node +0 -0
- package/dist/mcp/prebuilds/linux-arm64-musl/root-authority.node +0 -0
- package/dist/mcp/prebuilds/linux-x64-gnu/root-authority.node +0 -0
- package/dist/mcp/prebuilds/linux-x64-musl/root-authority.node +0 -0
- package/dist/mcp/prebuilds/win32-arm64/root-authority.node +0 -0
- package/dist/mcp/prebuilds/win32-x64/root-authority.node +0 -0
- package/dist/mcp/server-build.json +7 -0
- package/dist/mcp/server.js +64712 -41428
- package/dist/mcpServer.node.d.ts +12 -1
- package/dist/mcpServer.node.d.ts.map +1 -1
- package/dist/mcpServer.node.js +529 -378
- package/dist/mcpServer.node.js.map +1 -1
- package/package.json +43 -17
- package/dist/mcpServer.entry.d.ts +0 -3
- package/dist/mcpServer.entry.d.ts.map +0 -1
- package/dist/mcpServer.entry.js +0 -17
- package/dist/mcpServer.entry.js.map +0 -1
- package/dist/mcpServer.npm.node.d.ts +0 -3
- package/dist/mcpServer.npm.node.d.ts.map +0 -1
- package/dist/mcpServer.npm.node.js +0 -19
- package/dist/mcpServer.npm.node.js.map +0 -1
- package/dist/release-payload.json +0 -1
- package/dist/server.node.d.ts +0 -3
- package/dist/server.node.d.ts.map +0 -1
- package/dist/server.node.js +0 -6717
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# @beehexa/hexasync-template-ide-mcp
|
|
2
|
+
|
|
3
|
+
The HexaSync Template IDE MCP server. It gives any MCP client the HexaSync profile template knowledge
|
|
4
|
+
base: syntax and meaning of every component and property, 1,000+ authored YAML examples, expression
|
|
5
|
+
roots per authoring position, rule explanations, and validation of a template project in your workspace.
|
|
6
|
+
|
|
7
|
+
The package is a single self-contained executable (`hexasync-template-ide`). It has no runtime
|
|
8
|
+
dependencies; `npx` downloads it once and caches it.
|
|
9
|
+
|
|
10
|
+
- Node.js **22.13 or newer**. Older runtimes exit with a message naming the required version.
|
|
11
|
+
- Transport: stdio. Seven read-only tools, the knowledge base as `hexasync://` resources, and prompts.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
The fastest path installs the server **and** the HexaSync agent skills into every supported client:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx -y @beehexa/hexasync-ai-toolkit install --client all --scope user
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or register only the MCP server by hand:
|
|
22
|
+
|
|
23
|
+
| Client | Command or file |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| Claude Code | `claude mcp add --scope user --transport stdio hexasync-template-ide -- npx -y @beehexa/hexasync-template-ide-mcp@latest` |
|
|
26
|
+
| Codex | `~/.codex/config.toml` → see below |
|
|
27
|
+
| Cursor | `~/.cursor/mcp.json` → `mcpServers` |
|
|
28
|
+
| Antigravity | `~/.gemini/config/mcp_config.json` → `mcpServers` |
|
|
29
|
+
| pi | `~/.pi/agent/mcp.json` → `mcpServers` (with `"exposure": "direct"`) |
|
|
30
|
+
| OpenClaw | `openclaw mcp set hexasync-template-ide '{"command":"npx","args":["-y","@beehexa/hexasync-template-ide-mcp@latest"]}'` |
|
|
31
|
+
| VS Code (without the HexaSync extension) | user `mcp.json` → `servers` |
|
|
32
|
+
|
|
33
|
+
JSON clients (`mcpServers`, or `servers` for VS Code):
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"hexasync-template-ide": {
|
|
39
|
+
"command": "npx",
|
|
40
|
+
"args": ["-y", "@beehexa/hexasync-template-ide-mcp@latest"]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Codex (`~/.codex/config.toml`):
|
|
47
|
+
|
|
48
|
+
```toml
|
|
49
|
+
[mcp_servers."hexasync-template-ide"]
|
|
50
|
+
command = "npx"
|
|
51
|
+
args = ["-y", "@beehexa/hexasync-template-ide-mcp@latest"]
|
|
52
|
+
startup_timeout_sec = 30
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
On native Windows, launch through the shell: `"command": "cmd", "args": ["/c", "npx", "-y", "@beehexa/hexasync-template-ide-mcp@latest"]`.
|
|
56
|
+
|
|
57
|
+
The VS Code HexaSync Template IDE extension already provides this server; do not register it a second
|
|
58
|
+
time in a VS Code where the extension is installed.
|
|
59
|
+
|
|
60
|
+
## Project roots
|
|
61
|
+
|
|
62
|
+
Validation needs to know which folder holds your template project. The server uses, in order:
|
|
63
|
+
|
|
64
|
+
1. the roots your client negotiates (`roots/list`);
|
|
65
|
+
2. `--root <absolute path>` arguments;
|
|
66
|
+
3. `HEXASYNC_WORKSPACE_ROOTS` (absolute paths separated by `:`; `;` on Windows);
|
|
67
|
+
4. `CLAUDE_PROJECT_DIR`, when the client sets it and offers no roots;
|
|
68
|
+
5. the server's working directory.
|
|
69
|
+
|
|
70
|
+
If no root resolves, the tool answer names `--root` and `HEXASYNC_WORKSPACE_ROOTS`.
|
|
71
|
+
|
|
72
|
+
## Updating
|
|
73
|
+
|
|
74
|
+
`@latest` in the launch command means a client restart picks up new releases (`npx` re-resolves the tag
|
|
75
|
+
when its cache expires; `npx clear-npx-cache` or `npm cache clean --force` forces it).
|
|
76
|
+
|
|
77
|
+
## Diagnostics
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
npx -y @beehexa/hexasync-template-ide-mcp@latest --build-identity
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
prints the build identity (version and artifact digest) and exits without starting the transport.
|
|
84
|
+
|
|
85
|
+
Full documentation: [AI toolkit guide](https://github.com/hexasync-saas/hexasync-templates-vscode-ext/blob/main/docs/ai-toolkit.md).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ServerBuildIdentity {
|
|
2
|
+
readonly schemaVersion: '1.0.0';
|
|
3
|
+
readonly productId: 'hexasync-template-ide';
|
|
4
|
+
readonly version: string;
|
|
5
|
+
readonly artifactDigest: string;
|
|
6
|
+
readonly identity: string;
|
|
7
|
+
}
|
|
8
|
+
/** Wrappers consume the shipped identity; they never manufacture a version or digest. */
|
|
9
|
+
export declare function loadServerBuildIdentity(serverPath: string): Promise<ServerBuildIdentity>;
|
|
10
|
+
//# sourceMappingURL=buildIdentity.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildIdentity.node.d.ts","sourceRoot":"","sources":["../src/buildIdentity.node.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,yFAAyF;AACzF,wBAAsB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc9F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
/** Wrappers consume the shipped identity; they never manufacture a version or digest. */
|
|
5
|
+
export async function loadServerBuildIdentity(serverPath) {
|
|
6
|
+
const value = JSON.parse(await readFile(join(dirname(serverPath), 'server-build.json'), 'utf8'));
|
|
7
|
+
if (value === null || typeof value !== 'object')
|
|
8
|
+
throw new Error('SERVER_BUILD_IDENTITY_INVALID');
|
|
9
|
+
const record = value;
|
|
10
|
+
if (Object.keys(record).length !== 5 || record.schemaVersion !== '1.0.0' || record.productId !== 'hexasync-template-ide'
|
|
11
|
+
|| typeof record.version !== 'string' || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(record.version)
|
|
12
|
+
|| typeof record.artifactDigest !== 'string' || !/^sha256:[a-f0-9]{64}$/.test(record.artifactDigest)
|
|
13
|
+
|| record.identity !== `${record.productId}@${record.version}#${record.artifactDigest}`) {
|
|
14
|
+
throw new Error('SERVER_BUILD_IDENTITY_INVALID');
|
|
15
|
+
}
|
|
16
|
+
const digest = 'sha256:' + createHash('sha256').update(await readFile(serverPath)).digest('hex');
|
|
17
|
+
if (digest !== record.artifactDigest)
|
|
18
|
+
throw new Error('SERVER_BUILD_ARTIFACT_MISMATCH');
|
|
19
|
+
return Object.freeze({ schemaVersion: '1.0.0', productId: 'hexasync-template-ide',
|
|
20
|
+
version: record.version, artifactDigest: record.artifactDigest, identity: record.identity });
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=buildIdentity.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildIdentity.node.js","sourceRoot":"","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AAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjG,IAAI,MAAM,KAAK,MAAM,CAAC,cAAc;QAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACxF,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,uBAAuB;QAC/E,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAkB,EAAE,CAAC,CAAC;AAC3G,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type KnowledgeResource } from './knowledgeBase.generated.js';
|
|
2
|
+
import { type AgentKnowledgeDocs, type BundledAgentKnowledge } from '@beehexa/hexasync-template-validate';
|
|
3
|
+
/**
|
|
4
|
+
* The bundled resource a URI names. A fragment names a heading: on a page served in sections it resolves to the
|
|
5
|
+
* section holding that heading, otherwise to the page itself.
|
|
6
|
+
*/
|
|
7
|
+
export declare function bundledKnowledgeResource(uri: string): KnowledgeResource | undefined;
|
|
8
|
+
/** The bundled documentation as Tool-answer facts: every heading, and the text and title of every resource. */
|
|
9
|
+
export declare const BUNDLED_KNOWLEDGE_DOCS: AgentKnowledgeDocs;
|
|
10
|
+
/** Static local data only; safe in both Native web and MCP Node composition. */
|
|
11
|
+
export declare function readBundledAgentKnowledge(relativePath: string): BundledAgentKnowledge | undefined;
|
|
12
|
+
//# sourceMappingURL=bundledKnowledge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundledKnowledge.d.ts","sourceRoot":"","sources":["../src/bundledKnowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoF,KAAK,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACxJ,OAAO,EAAwD,KAAK,kBAAkB,EAAE,KAAK,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAIhK;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAUnF;AAED,+GAA+G;AAC/G,eAAO,MAAM,sBAAsB,EAAE,kBAInC,CAAC;AA4BH,gFAAgF;AAChF,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAkBjG"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { KNOWLEDGE_BASE, KNOWLEDGE_HEADINGS, KNOWLEDGE_SECTION_ANCHORS, KNOWLEDGE_VERSION } from './knowledgeBase.generated.js';
|
|
2
|
+
import { AgentToolPreconditionError, AGENT_TOOL_FAILURE_CODES } from '@beehexa/hexasync-template-validate';
|
|
3
|
+
const RESOURCES = new Map(KNOWLEDGE_BASE.map((resource) => [resource.uri, resource]));
|
|
4
|
+
/**
|
|
5
|
+
* The bundled resource a URI names. A fragment names a heading: on a page served in sections it resolves to the
|
|
6
|
+
* section holding that heading, otherwise to the page itself.
|
|
7
|
+
*/
|
|
8
|
+
export function bundledKnowledgeResource(uri) {
|
|
9
|
+
const exact = RESOURCES.get(uri);
|
|
10
|
+
if (exact !== undefined)
|
|
11
|
+
return exact;
|
|
12
|
+
const hash = uri.indexOf('#');
|
|
13
|
+
if (hash === -1)
|
|
14
|
+
return undefined;
|
|
15
|
+
const page = uri.slice(0, hash);
|
|
16
|
+
let anchor;
|
|
17
|
+
try {
|
|
18
|
+
anchor = decodeURIComponent(uri.slice(hash + 1));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
anchor = uri.slice(hash + 1);
|
|
22
|
+
}
|
|
23
|
+
const section = KNOWLEDGE_SECTION_ANCHORS[page]?.[anchor];
|
|
24
|
+
return (section === undefined ? undefined : RESOURCES.get(section)) ?? RESOURCES.get(page);
|
|
25
|
+
}
|
|
26
|
+
/** The bundled documentation as Tool-answer facts: every heading, and the text and title of every resource. */
|
|
27
|
+
export const BUNDLED_KNOWLEDGE_DOCS = Object.freeze({
|
|
28
|
+
headings: KNOWLEDGE_HEADINGS,
|
|
29
|
+
text: (uri) => RESOURCES.get(uri)?.text,
|
|
30
|
+
title: (uri) => RESOURCES.get(uri)?.title,
|
|
31
|
+
});
|
|
32
|
+
const malformed = () => new AgentToolPreconditionError({
|
|
33
|
+
code: AGENT_TOOL_FAILURE_CODES.knowledgeMalformedJson,
|
|
34
|
+
message: 'The bundled local reference has no readable canonical JSON.',
|
|
35
|
+
});
|
|
36
|
+
/** A JSON asset served in parts, put back together: each placeholder is replaced by the value its resource holds. */
|
|
37
|
+
function assembled(value) {
|
|
38
|
+
if (Array.isArray(value))
|
|
39
|
+
return value.map(assembled);
|
|
40
|
+
if (value === null || typeof value !== 'object')
|
|
41
|
+
return value;
|
|
42
|
+
const record = value;
|
|
43
|
+
const part = record['$resource'];
|
|
44
|
+
if (typeof part === 'string') {
|
|
45
|
+
const resource = RESOURCES.get(part);
|
|
46
|
+
if (resource === undefined)
|
|
47
|
+
throw malformed();
|
|
48
|
+
return assembled(JSON.parse(resource.text));
|
|
49
|
+
}
|
|
50
|
+
const parts = record['$parts'];
|
|
51
|
+
if (Array.isArray(parts))
|
|
52
|
+
return parts.flatMap((entry) => {
|
|
53
|
+
const items = assembled(entry);
|
|
54
|
+
if (!Array.isArray(items))
|
|
55
|
+
throw malformed();
|
|
56
|
+
return items;
|
|
57
|
+
});
|
|
58
|
+
return Object.fromEntries(Object.entries(record).filter(([key]) => key !== '$split')
|
|
59
|
+
.map(([key, child]) => [key, assembled(child)]));
|
|
60
|
+
}
|
|
61
|
+
const assembledTexts = new Map();
|
|
62
|
+
/** Static local data only; safe in both Native web and MCP Node composition. */
|
|
63
|
+
export function readBundledAgentKnowledge(relativePath) {
|
|
64
|
+
const doc = relativePath === 'docs/AI-INDEX.md'
|
|
65
|
+
? RESOURCES.get('hexasync://docs/AI-INDEX')
|
|
66
|
+
: KNOWLEDGE_BASE.find((candidate) => candidate.assetPath === `assets/${relativePath}`);
|
|
67
|
+
if (doc === undefined)
|
|
68
|
+
return undefined;
|
|
69
|
+
if (relativePath === 'docs/AI-INDEX.md')
|
|
70
|
+
return { text: doc.text, uri: doc.uri, version: KNOWLEDGE_VERSION };
|
|
71
|
+
let text = assembledTexts.get(doc.uri);
|
|
72
|
+
if (text === undefined) {
|
|
73
|
+
try {
|
|
74
|
+
const value = JSON.parse(doc.text);
|
|
75
|
+
const split = value !== null && typeof value === 'object' && !Array.isArray(value) && '$split' in value;
|
|
76
|
+
text = split ? JSON.stringify(assembled(value)) : doc.text;
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
throw error instanceof AgentToolPreconditionError ? error : malformed();
|
|
80
|
+
}
|
|
81
|
+
assembledTexts.set(doc.uri, text);
|
|
82
|
+
}
|
|
83
|
+
return { text, uri: doc.uri, version: KNOWLEDGE_VERSION };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=bundledKnowledge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundledKnowledge.js","sourceRoot":"","sources":["../src/bundledKnowledge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,iBAAiB,EAA0B,MAAM,8BAA8B,CAAC;AACxJ,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAuD,MAAM,qCAAqC,CAAC;AAEhK,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AAEtF;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAW;IAClD,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,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EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC5D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
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';
|
|
1
|
+
export type { ServerBuildIdentity } from './buildIdentity.node.js';
|
|
2
|
+
export { startMcpServer, answerMcpTool, type McpDiagnosticPort } from './mcpServer.node.js';
|
|
12
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
export
|
|
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
|
-
};
|
|
1
|
+
export { startMcpServer, answerMcpTool } from './mcpServer.node.js';
|
|
29
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,aAAa,EAA0B,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** GENERATED by tools/bundle-knowledge-base.mjs — do not edit. */
|
|
2
|
+
export declare const KNOWLEDGE_VERSION = "asset bundle 99";
|
|
3
|
+
/** Largest resource text in UTF-8 bytes; larger pages and assets are served as linked sections. */
|
|
4
|
+
export declare const KNOWLEDGE_RESOURCE_BYTE_LIMIT = 25600;
|
|
5
|
+
export interface KnowledgeResource {
|
|
6
|
+
readonly uri: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly description: string;
|
|
10
|
+
readonly mimeType: 'text/markdown' | 'application/json';
|
|
11
|
+
readonly text: string;
|
|
12
|
+
/** The `assets/**` JSON file this resource serves, on the file's top resource only. */
|
|
13
|
+
readonly assetPath?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const KNOWLEDGE_BASE: readonly KnowledgeResource[];
|
|
16
|
+
/** Pages served in sections: heading anchor → the section resource holding that heading. */
|
|
17
|
+
export declare const KNOWLEDGE_SECTION_ANCHORS: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
18
|
+
/** Every page heading in document order: its page-wide anchor, the resource holding it, and its code spans. */
|
|
19
|
+
export declare const KNOWLEDGE_HEADINGS: readonly {
|
|
20
|
+
readonly page: string;
|
|
21
|
+
readonly anchor: string;
|
|
22
|
+
readonly depth: number;
|
|
23
|
+
readonly text: string;
|
|
24
|
+
readonly codes: readonly string[];
|
|
25
|
+
readonly holder: string;
|
|
26
|
+
/** The heading's own Markdown line. */
|
|
27
|
+
readonly raw: string;
|
|
28
|
+
}[];
|
|
29
|
+
//# sourceMappingURL=knowledgeBase.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledgeBase.generated.d.ts","sourceRoot":"","sources":["../src/knowledgeBase.generated.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,iBAAiB,oBAAoB,CAAC;AAEnD,mGAAmG;AACnG,eAAO,MAAM,6BAA6B,QAAQ,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ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