@farming-labs/docs 0.2.114 → 0.2.115
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.
|
@@ -9,5 +9,11 @@ import { z as DocsPublishedAgentSkill } from "./standards-discovery-CjyUCxdy.mjs
|
|
|
9
9
|
* resolver when the build plugin is not installed.
|
|
10
10
|
*/
|
|
11
11
|
declare const bundledAgentSkills: readonly DocsPublishedAgentSkill[] | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Build-time snapshot of the project-root agent documents (`skill.md`,
|
|
14
|
+
* `AGENTS.md`, `AGENT.md`), keyed by filename. Replaced together with
|
|
15
|
+
* `bundledAgentSkills`; consumers fall back to the filesystem when undefined.
|
|
16
|
+
*/
|
|
17
|
+
declare const bundledRootDocuments: Readonly<Record<string, string>> | undefined;
|
|
12
18
|
//#endregion
|
|
13
|
-
export { bundledAgentSkills };
|
|
19
|
+
export { bundledAgentSkills, bundledRootDocuments };
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
* resolver when the build plugin is not installed.
|
|
8
8
|
*/
|
|
9
9
|
const bundledAgentSkills = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Build-time snapshot of the project-root agent documents (`skill.md`,
|
|
12
|
+
* `AGENTS.md`, `AGENT.md`), keyed by filename. Replaced together with
|
|
13
|
+
* `bundledAgentSkills`; consumers fall back to the filesystem when undefined.
|
|
14
|
+
*/
|
|
15
|
+
const bundledRootDocuments = void 0;
|
|
10
16
|
|
|
11
17
|
//#endregion
|
|
12
|
-
export { bundledAgentSkills };
|
|
18
|
+
export { bundledAgentSkills, bundledRootDocuments };
|
|
@@ -19,7 +19,7 @@ interface DocsAgentSkillsBuildPlugin {
|
|
|
19
19
|
load(id: string): Promise<string | undefined>;
|
|
20
20
|
}
|
|
21
21
|
/** Render a self-contained virtual module without relying on Node at runtime. */
|
|
22
|
-
declare function renderDocsAgentSkillsBundle(skills: readonly DocsPublishedAgentSkill[]): string;
|
|
22
|
+
declare function renderDocsAgentSkillsBundle(skills: readonly DocsPublishedAgentSkill[], rootDocuments?: Readonly<Record<string, string>>): string;
|
|
23
23
|
/**
|
|
24
24
|
* Snapshot configured Agent Skills into the server bundle.
|
|
25
25
|
*
|
|
@@ -22,9 +22,12 @@ function serializeSkill(skill) {
|
|
|
22
22
|
}))
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
function serializeSnapshotLiteral(value) {
|
|
26
|
+
return JSON.stringify(value).replaceAll("\u2028", "\\u2028").replaceAll("\u2029", "\\u2029");
|
|
27
|
+
}
|
|
25
28
|
/** Render a self-contained virtual module without relying on Node at runtime. */
|
|
26
|
-
function renderDocsAgentSkillsBundle(skills) {
|
|
27
|
-
return `const snapshot = ${
|
|
29
|
+
function renderDocsAgentSkillsBundle(skills, rootDocuments) {
|
|
30
|
+
return `const snapshot = ${serializeSnapshotLiteral(skills.map(serializeSkill))};
|
|
28
31
|
function decodeBase64(value) {
|
|
29
32
|
const binary = globalThis.atob(value);
|
|
30
33
|
const bytes = new Uint8Array(binary.length);
|
|
@@ -39,6 +42,7 @@ export const bundledAgentSkills = snapshot.map((skill) => ({
|
|
|
39
42
|
content: hydrateContent(skill.content),
|
|
40
43
|
files: skill.files.map((file) => ({ ...file, content: hydrateContent(file.content) })),
|
|
41
44
|
}));
|
|
45
|
+
export const bundledRootDocuments = ${rootDocuments ? serializeSnapshotLiteral(rootDocuments) : "undefined"};
|
|
42
46
|
`;
|
|
43
47
|
}
|
|
44
48
|
/**
|