@beehexa/hexasync-template-ide-mcp 2610.4.7 → 2610.12.1

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 (38) hide show
  1. package/dist/buildIdentity.node.d.ts +10 -0
  2. package/dist/buildIdentity.node.d.ts.map +1 -0
  3. package/dist/buildIdentity.node.js +22 -0
  4. package/dist/buildIdentity.node.js.map +1 -0
  5. package/dist/bundledKnowledge.d.ts +12 -0
  6. package/dist/bundledKnowledge.d.ts.map +1 -0
  7. package/dist/bundledKnowledge.js +85 -0
  8. package/dist/bundledKnowledge.js.map +1 -0
  9. package/dist/index.d.ts +2 -11
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -28
  12. package/dist/index.js.map +1 -1
  13. package/dist/knowledgeBase.generated.d.ts +29 -0
  14. package/dist/knowledgeBase.generated.d.ts.map +1 -0
  15. package/dist/knowledgeBase.generated.js +8350 -0
  16. package/dist/knowledgeBase.generated.js.map +1 -0
  17. package/dist/mcp/package.json +1 -0
  18. package/dist/mcp/root-authority.integrity.json +1 -0
  19. package/dist/mcp/root-authority.node +0 -0
  20. package/dist/mcp/server-build.json +7 -0
  21. package/dist/mcp/server.js +64134 -41436
  22. package/dist/mcpServer.node.d.ts +12 -1
  23. package/dist/mcpServer.node.d.ts.map +1 -1
  24. package/dist/mcpServer.node.js +518 -378
  25. package/dist/mcpServer.node.js.map +1 -1
  26. package/package.json +17 -11
  27. package/dist/mcpServer.entry.d.ts +0 -3
  28. package/dist/mcpServer.entry.d.ts.map +0 -1
  29. package/dist/mcpServer.entry.js +0 -17
  30. package/dist/mcpServer.entry.js.map +0 -1
  31. package/dist/mcpServer.npm.node.d.ts +0 -3
  32. package/dist/mcpServer.npm.node.d.ts.map +0 -1
  33. package/dist/mcpServer.npm.node.js +0 -19
  34. package/dist/mcpServer.npm.node.js.map +0 -1
  35. package/dist/release-payload.json +0 -1
  36. package/dist/server.node.d.ts +0 -3
  37. package/dist/server.node.d.ts.map +0 -1
  38. package/dist/server.node.js +0 -6717
@@ -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":"","sources":["../src/buildIdentity.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAU1C,yFAAyF;AACzF,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,UAAkB;IAC9D,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1G,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAClG,MAAM,MAAM,GAAG,KAAgC,CAAC;IAChD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,aAAa,KAAK,OAAO,IAAI,MAAM,CAAC,SAAS,KAAK,uBAAuB;WACnH,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,qCAAqC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;WACjG,OAAO,MAAM,CAAC,cAAc,KAAK,QAAQ,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;WACjG,MAAM,CAAC,QAAQ,KAAK,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,cAAc,EAAE,EAAE,CAAC;QAC1F,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACnD,CAAC;IACD,MAAM,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,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,CAAC;IAC9B,IAAI,IAAI,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAClC,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IAChC,IAAI,MAAc,CAAC;IACnB,IAAI,CAAC;QAAC,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,C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I,GAAG,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,YAAY,KAAK,kBAAkB;QAAE,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7G,IAAI,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,IAAI,CAAC;YACH,MAAM,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC5C,MAAM,KAAK,GAAG,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,QAAQ,IAAI,KAAK,CAAC;YACxG,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;QAC7D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,KAAK,YAAY,0BAA0B,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;QAC1E,CAAC;QACD,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,EAAE,IAAI,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
- 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';
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
@@ -1 +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"}
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 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
- };
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":"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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-knowledge-base.mjs — do not edit. */
2
+ export declare const KNOWLEDGE_VERSION = "asset bundle 98";
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,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAA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