@farming-labs/docs 0.2.116 → 0.2.118
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/{agent-CEZCaYto.mjs → agent-BErhm-eR.mjs} +16 -8
- package/dist/{agent-DGNTD-N6.mjs → agent-DAjdIdoL.mjs} +4 -4
- package/dist/{agent-evals-CmeTjDMC.mjs → agent-evals-BHXe_A2m.mjs} +5 -5
- package/dist/{agent-export-DIKwVWYN.mjs → agent-export-B849tzbg.mjs} +17 -14
- package/dist/{agent-feedback-evaluations-DQCTFegz.mjs → agent-feedback-evaluations-UhAdMoIY.mjs} +1 -1
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-progressive-disclosure-BDSjGGFd.mjs → agent-skills-progressive-disclosure-1XPV0wCN.mjs} +1 -1
- package/dist/{agent-skills-server-Ddm90WL6.mjs → agent-skills-server-CJh3EGWC.mjs} +224 -46
- package/dist/{agent-skills-server-BWRJjIQG.d.mts → agent-skills-server-DiXUcYNy.d.mts} +2 -2
- package/dist/agent-skills-vite.d.mts +3 -3
- package/dist/agent-skills-vite.mjs +2 -2
- package/dist/{agents-l8RtkFim.mjs → agents-Dwys0Wr7.mjs} +15 -12
- package/dist/{analytics-R9c-Md4b.d.mts → analytics-BvUjK_oC.d.mts} +1 -1
- package/dist/{analytics-CqfcIBdg.mjs → analytics-p8Vhhu2P.mjs} +1 -1
- package/dist/{api-reference-0XdEWya8.mjs → api-reference-DafuHRtc.mjs} +2 -2
- package/dist/{authoring-CvsCmYuq.mjs → authoring-BqcSw2Ok.mjs} +7 -6
- package/dist/{authoring-mcp-C35lj3cI.mjs → authoring-mcp-BmohXL7E.mjs} +2 -2
- package/dist/browser.d.mts +3 -3
- package/dist/browser.mjs +3 -3
- package/dist/cli/index.mjs +38 -38
- package/dist/client/react.d.mts +1 -1
- package/dist/client/react.mjs +1 -1
- package/dist/{cloud-DtmNQJg2.mjs → cloud-BllEwBht.mjs} +3 -3
- package/dist/{cloud-ask-ai-BDtBbbZZ.mjs → cloud-ask-ai-Bq_njfjh.mjs} +8 -7
- package/dist/{cloud-ask-ai-DLyrydIR.d.mts → cloud-ask-ai-nlKU13he.d.mts} +1 -1
- package/dist/{codeblocks-DEcqNXve.mjs → codeblocks-Cbo7uzxr.mjs} +2 -2
- package/dist/{content-change-hydration-BWJNUIot.d.mts → content-change-hydration-Cr07LmBu.d.mts} +3 -3
- package/dist/{dev-Df77AKR1.mjs → dev-QxIXdG0G.mjs} +2 -2
- package/dist/docs-cloud-server.d.mts +2 -2
- package/dist/docs-cloud-server.mjs +3 -2
- package/dist/{doctor-zNmt9s6j.mjs → doctor-Cysov9LX.mjs} +22 -19
- package/dist/{downgrade-C6DSsOO9.mjs → downgrade-Cx3FnovE.mjs} +2 -2
- package/dist/{feedback-CNsQP2jY.mjs → feedback-Dfgt_WD5.mjs} +1 -1
- package/dist/{feedback-evals-CYuS2wTu.mjs → feedback-evals-DI_JNN5M.mjs} +1 -1
- package/dist/{golden-evaluations-B1QDOzYj.mjs → golden-evaluations-BqdWUUE7.mjs} +3 -3
- package/dist/http-body-DkAPk6D5.mjs +64 -0
- package/dist/index.d.mts +26 -8
- package/dist/index.mjs +16 -15
- package/dist/{init-BXKzipSS.mjs → init-CW922o9v.mjs} +3 -3
- package/dist/markdown-rendering.mjs +1 -1
- package/dist/{mcp-Bj3ZoEtt.mjs → mcp-CqtJYU0Y.mjs} +16 -13
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.mjs +80 -23
- package/dist/{metadata-7htr-Xj_.mjs → metadata-DoUinS1I.mjs} +1 -1
- package/dist/{openapi-diff-DKW3xkQU.mjs → openapi-diff-Cf1dguBv.mjs} +7 -6
- package/dist/{openapi-mcp-UF4Cx885.mjs → openapi-mcp-gbEUXMkc.mjs} +4 -4
- package/dist/{openapi-sdk-DqRHPsCb.mjs → openapi-sdk-G7RtjWc5.mjs} +7 -6
- package/dist/{openapi-source-CiKbUK71.mjs → openapi-source-1ubEyHMO.mjs} +1 -1
- package/dist/{package-version-CTkii52k.mjs → package-version-CiVXOONu.mjs} +1 -1
- package/dist/{prompt-references-Cficetgk.mjs → prompt-references-C1nDPYdm.mjs} +20 -4
- package/dist/{sitemap-server-C4bpuoLi.mjs → prompt-utils-Dj8-I3Jw.mjs} +1 -17
- package/dist/{propose-ZH_mGMY_.mjs → propose-B_yerUFm.mjs} +1 -1
- package/dist/{retrieval-digest-PD4fFy7P.d.mts → retrieval-digest-ueYW3S6P.d.mts} +2 -109
- package/dist/{review-CcplK9Hj.mjs → review-Df62iFE4.mjs} +13 -12
- package/dist/{robots-BPYWIGqD.mjs → robots-CRIXPOiX.mjs} +2 -2
- package/dist/{robots-D4T3zZr_.mjs → robots-vdQ4tLzZ.mjs} +7 -6
- package/dist/runtime.d.mts +5 -0
- package/dist/runtime.mjs +11 -0
- package/dist/{search-BNmlDQJ2.mjs → search-Cso57KVB.mjs} +17 -14
- package/dist/server.d.mts +8 -116
- package/dist/server.mjs +17 -15
- package/dist/{sidebar-CGbvEPTX.d.mts → sidebar-CAncgoWu.d.mts} +1 -1
- package/dist/sitemap-BEUEeKbt.d.mts +110 -0
- package/dist/{sitemap-Bc4LkIcm.mjs → sitemap-Du2wWBmo.mjs} +15 -12
- package/dist/sitemap-server-CClBRp7_.mjs +18 -0
- package/dist/sitemap-server-DNsVKCnP.d.mts +114 -0
- package/dist/{skills-B6wl1bUL.mjs → skills-BC0GTdUM.mjs} +15 -12
- package/dist/{standards-discovery-Bpz90VYq.mjs → standards-discovery-BQQ3CAzz.mjs} +1 -1
- package/dist/{standards-discovery-C1RLKwV9.d.mts → standards-discovery-C3AB6qNv.d.mts} +1 -1
- package/dist/{upgrade-8zStRidw.mjs → upgrade-CXIQlLWx.mjs} +2 -2
- package/package.json +7 -2
- /package/dist/{agent-feedback-loop-CcZL_sb1.mjs → agent-feedback-loop-DpZ9ZdFB.mjs} +0 -0
- /package/dist/{agent-maintenance-CuZ7iAKq.mjs → agent-maintenance-CZLly8It.mjs} +0 -0
- /package/dist/{audience-exposure-DVsfT9Sx.mjs → audience-exposure-P69ZKRec.mjs} +0 -0
- /package/dist/{audience-exposure-BAjHjaTT.d.mts → audience-exposure-PMCEve-s.d.mts} +0 -0
- /package/dist/{cloud-analytics-Ci1yiwD8.mjs → cloud-analytics-D14HplI7.mjs} +0 -0
- /package/dist/{code-blocks-GYdvS3BH.mjs → code-blocks-BE3sEayp.mjs} +0 -0
- /package/dist/{config-BnUOoj07.mjs → config-DDuQ4Qma.mjs} +0 -0
- /package/dist/{errors-BkS29NUA.mjs → errors-CBmy95z2.mjs} +0 -0
- /package/dist/{i18n-B1gJ9EW0.mjs → i18n-DKGg_G0f.mjs} +0 -0
- /package/dist/{markdown-sections-BKy4labo.mjs → markdown-sections-9Oxr33b-.mjs} +0 -0
- /package/dist/{openapi-anOaQn9o.mjs → openapi-BkQGpZEg.mjs} +0 -0
- /package/dist/{openapi-mcp-node-C4jUpZG6.mjs → openapi-mcp-node-DiqMH9Ao.mjs} +0 -0
- /package/dist/{openapi-operations-DFpaqOqA.mjs → openapi-operations-CsXLUD3Z.mjs} +0 -0
- /package/dist/{retrieval-digest-B-SgtXKK.mjs → retrieval-digest-CT-eIEcp.mjs} +0 -0
- /package/dist/{sidebar-3W51s2sF.mjs → sidebar-mI70dH_0.mjs} +0 -0
- /package/dist/{templates-BiORflC3.mjs → templates-2nnlhcmo.mjs} +0 -0
- /package/dist/{types-Dkl2DUfp.d.mts → types-Ba9Dd_fe.d.mts} +0 -0
- /package/dist/{utils-c9arebCi.mjs → utils-8H7dkC8w.mjs} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { n as readDocsJsonBody } from "./http-body-DkAPk6D5.mjs";
|
|
2
|
+
import { C as filterDocsPagesByAccess, S as upsertPageAgentContractMarkdown, T as isDocsPageAccessAllowed, a as findDocsGeneratedAgentContractRanges, b as renderPageAgentFrontmatterYamlLines, d as PAGE_AGENT_CONTRACT_END_MARKER, l as stripDocsGeneratedAgentContractMarkers, m as PAGE_AGENT_CONTRACT_START_MARKER, o as findDocsMarkdownSection, p as PAGE_AGENT_CONTRACT_FIELD_SCHEMA, s as parseDocsMarkdownSections, y as renderPageAgentContractMarkdown } from "./markdown-sections-9Oxr33b-.mjs";
|
|
3
|
+
import { n as digestDocsRetrievalContent, r as isDocsRetrievalCanonicalUrl } from "./retrieval-digest-CT-eIEcp.mjs";
|
|
4
|
+
import { t as resolveDocsAudienceExposure } from "./audience-exposure-P69ZKRec.mjs";
|
|
5
|
+
import { B as createDocsCacheableResponse, F as isDocsStandardsDiscoveryRequest, I as resolveDocsDiscoveryApiRoute, M as createDocsStandardsResponse, S as DOCS_AGENT_MANIFEST_FORMAT, T as DOCS_AGENT_MANIFEST_VERSION, W as resolveDocsHttpDate, _ as DEFAULT_API_CATALOG_FORMAT, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, c as DEFAULT_AGENT_SKILLS_ARCHIVE_ROUTE_PATTERN, d as DEFAULT_AGENT_SKILLS_ROUTE_PATTERN, k as buildDocsApiCatalog, l as DEFAULT_AGENT_SKILLS_INDEX_FORMAT, n as API_CATALOG_MEDIA_TYPE, r as API_CATALOG_PROFILE_URI, t as AGENT_SKILLS_DISCOVERY_SCHEMA_URI, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, v as DEFAULT_API_CATALOG_ROUTE, w as DOCS_AGENT_MANIFEST_SCHEMA_URI } from "./standards-discovery-BQQ3CAzz.mjs";
|
|
5
6
|
import { createProcessor } from "@mdx-js/mdx";
|
|
6
7
|
|
|
7
8
|
//#region src/okf.ts
|
|
@@ -7081,15 +7082,22 @@ function normalizeDocsAgentFeedbackContext(value) {
|
|
|
7081
7082
|
return Object.keys(context).length > 0 ? context : void 0;
|
|
7082
7083
|
}
|
|
7083
7084
|
async function parseDocsAgentFeedbackData(request) {
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7085
|
+
const parsed = await readDocsJsonBody(request);
|
|
7086
|
+
if (!parsed.ok) {
|
|
7087
|
+
if (parsed.reason === "request_too_large") return {
|
|
7088
|
+
ok: false,
|
|
7089
|
+
response: Response.json({
|
|
7090
|
+
error: `Request body exceeds the ${parsed.maxBodyBytes} byte limit`,
|
|
7091
|
+
code: parsed.reason,
|
|
7092
|
+
maxBodyBytes: parsed.maxBodyBytes
|
|
7093
|
+
}, { status: 413 })
|
|
7094
|
+
};
|
|
7088
7095
|
return {
|
|
7089
7096
|
ok: false,
|
|
7090
7097
|
response: Response.json({ error: "Agent feedback body must be valid JSON" }, { status: 400 })
|
|
7091
7098
|
};
|
|
7092
7099
|
}
|
|
7100
|
+
const body = parsed.value;
|
|
7093
7101
|
if (!isPlainObject(body)) return {
|
|
7094
7102
|
ok: false,
|
|
7095
7103
|
response: Response.json({ error: "Agent feedback body must be an object" }, { status: 400 })
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { v as normalizePageAgentFrontmatter, x as stripGeneratedPageAgentContractMarkdown } from "./markdown-sections-
|
|
2
|
-
import { V as findDocsMarkdownPage, ot as renderDocsMarkdownDocument } from "./agent-
|
|
3
|
-
import { d as GENERATED_AGENT_PROVENANCE_VERSION, f as hashGeneratedAgentContent, h as serializeGeneratedAgentDocument, m as parseGeneratedAgentDocument } from "./openapi-mcp-
|
|
1
|
+
import { v as normalizePageAgentFrontmatter, x as stripGeneratedPageAgentContractMarkdown } from "./markdown-sections-9Oxr33b-.mjs";
|
|
2
|
+
import { V as findDocsMarkdownPage, ot as renderDocsMarkdownDocument } from "./agent-BErhm-eR.mjs";
|
|
3
|
+
import { d as GENERATED_AGENT_PROVENANCE_VERSION, f as hashGeneratedAgentContent, h as serializeGeneratedAgentDocument, m as parseGeneratedAgentDocument } from "./openapi-mcp-gbEUXMkc.mjs";
|
|
4
4
|
import { createFilesystemDocsMcpSource } from "./mcp.mjs";
|
|
5
|
-
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, c as loadProjectEnv, d as readNavTitle, f as readNumberProperty, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral, u as readEnvReferenceProperty } from "./config-
|
|
5
|
+
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, c as loadProjectEnv, d as readNavTitle, f as readNumberProperty, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral, u as readEnvReferenceProperty } from "./config-DDuQ4Qma.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import matter from "gray-matter";
|
|
8
8
|
import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-
|
|
2
|
-
import { $t as buildDocsAskAIContext, An as agentVersionConstraintsOverlap, Mn as normalizeAgentLocale, Nn as normalizeAgentScopeValues, On as agentVersionConstraintGroupsOverlap, Pn as normalizeAgentVersion, Sn as resolveSearchRequestConfig, fn as normalizeDocsSearchFilters, jn as normalizeAgentFramework, kn as agentVersionConstraintMatches, pn as performDocsSearch, tn as buildDocsRetrievalDigestProjection } from "./agent-
|
|
3
|
-
import { n as digestDocsRetrievalContent } from "./retrieval-digest-
|
|
4
|
-
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-
|
|
1
|
+
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-9Oxr33b-.mjs";
|
|
2
|
+
import { $t as buildDocsAskAIContext, An as agentVersionConstraintsOverlap, Mn as normalizeAgentLocale, Nn as normalizeAgentScopeValues, On as agentVersionConstraintGroupsOverlap, Pn as normalizeAgentVersion, Sn as resolveSearchRequestConfig, fn as normalizeDocsSearchFilters, jn as normalizeAgentFramework, kn as agentVersionConstraintMatches, pn as performDocsSearch, tn as buildDocsRetrievalDigestProjection } from "./agent-BErhm-eR.mjs";
|
|
3
|
+
import { n as digestDocsRetrievalContent } from "./retrieval-digest-CT-eIEcp.mjs";
|
|
4
|
+
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-CJh3EGWC.mjs";
|
|
5
5
|
import { buildDocsMcpContext } from "./mcp.mjs";
|
|
6
|
-
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-
|
|
6
|
+
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-BE3sEayp.mjs";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { dirname, isAbsolute, join, relative } from "node:path";
|
|
9
9
|
import { createJiti } from "jiti";
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import "./
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import "./agent-
|
|
1
|
+
import "./http-body-DkAPk6D5.mjs";
|
|
2
|
+
import { w as isDocsAgentPageAccessible } from "./markdown-sections-9Oxr33b-.mjs";
|
|
3
|
+
import { A as buildDocsAgentDiscoverySpec, It as renderDocsSitemapMarkdown, Lt as renderDocsSitemapXml, Nt as buildDocsSitemapManifest, Rt as resolveDocsSitemapConfig, S as DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE, Tt as toDocsMarkdownUrl, a as DEFAULT_AGENT_MD_ROUTE, at as renderDocsLlmsTxt, c as DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE, cr as resolveDocsOkfConfig, ct as renderDocsSkillDocument, g as DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE, h as DEFAULT_LLMS_FULL_TXT_ROUTE, it as renderDocsAgentsDocument, l as DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, or as buildDocsOkfBundle, ot as renderDocsMarkdownDocument, t as DEFAULT_AGENTS_MD_ROUTE, ut as resolveDocsAgentFeedbackConfig, v as DEFAULT_LLMS_TXT_ROUTE, x as DEFAULT_SKILL_MD_ROUTE, y as DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE } from "./agent-BErhm-eR.mjs";
|
|
4
|
+
import { A as buildDocsLegacySkillsIndex, D as buildDocsA2AAgentCard, L as resolveDocsPublishedAgentSkill, O as buildDocsAgentSkillsIndex, V as formatDocsContentDigest, W as resolveDocsHttpDate, a as DEFAULT_A2A_AGENT_CARD_ROUTE, b as DEFAULT_LEGACY_SKILLS_INDEX_ROUTE, f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, u as DEFAULT_AGENT_SKILLS_INDEX_ROUTE, x as DEFAULT_LEGACY_SKILLS_ROUTE_PREFIX } from "./standards-discovery-BQQ3CAzz.mjs";
|
|
5
|
+
import "./openapi-mcp-gbEUXMkc.mjs";
|
|
6
|
+
import { t as resolveDocsI18n } from "./i18n-DKGg_G0f.mjs";
|
|
7
|
+
import { c as renderDocsRobotsGeneratedBlock, f as upsertDocsRobotsGeneratedBlock, i as DOCS_ROBOTS_GENERATED_BLOCK_START, r as DOCS_ROBOTS_GENERATED_BLOCK_END, u as resolveDocsRobotsConfig } from "./robots-CRIXPOiX.mjs";
|
|
8
|
+
import "./prompt-utils-Dj8-I3Jw.mjs";
|
|
9
|
+
import "./api-reference-DafuHRtc.mjs";
|
|
10
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-CJh3EGWC.mjs";
|
|
11
|
+
import "./agent-evals-BHXe_A2m.mjs";
|
|
11
12
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
12
|
-
import "./authoring-mcp-
|
|
13
|
-
import "./
|
|
13
|
+
import "./authoring-mcp-BmohXL7E.mjs";
|
|
14
|
+
import "./cloud-ask-ai-Bq_njfjh.mjs";
|
|
15
|
+
import "./code-blocks-BE3sEayp.mjs";
|
|
16
|
+
import "./sitemap-server-CClBRp7_.mjs";
|
|
14
17
|
import "./server.mjs";
|
|
15
|
-
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, m as readTopLevelBooleanProperty, p as readStringProperty, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-
|
|
16
|
-
import { t as detectFramework } from "./utils-
|
|
18
|
+
import { _ as resolveDocsContentDir, a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, m as readTopLevelBooleanProperty, p as readStringProperty, r as extractTopLevelConfigObject, t as extractNestedObjectLiteral } from "./config-DDuQ4Qma.mjs";
|
|
19
|
+
import { t as detectFramework } from "./utils-8H7dkC8w.mjs";
|
|
17
20
|
import { existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
18
21
|
import path from "node:path";
|
|
19
22
|
import { createHash, randomUUID } from "node:crypto";
|
package/dist/{agent-feedback-evaluations-DQCTFegz.mjs → agent-feedback-evaluations-UhAdMoIY.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as sha256DocsContent } from "./retrieval-digest-
|
|
1
|
+
import { i as sha256DocsContent } from "./retrieval-digest-CT-eIEcp.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/agent-feedback-evaluations.ts
|
|
4
4
|
const DOCS_AGENT_FEEDBACK_EVALUATION_CANDIDATES_FORMAT = "farming-labs-agent-feedback-evaluation-candidates.v1";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { validateDocsAgentSkillFrontmatter } from "./agent-skills-spec.mjs";
|
|
2
|
-
import { n as resolveConfiguredAgentSkillPathsSync } from "./agent-skills-server-
|
|
2
|
+
import { n as resolveConfiguredAgentSkillPathsSync } from "./agent-skills-server-CJh3EGWC.mjs";
|
|
3
3
|
import { existsSync, lstatSync, readFileSync, readdirSync } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, j as buildDocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { f as DEFAULT_AGENT_SKILLS_ROUTE_PREFIX, j as buildDocsPublishedAgentSkill } from "./standards-discovery-BQQ3CAzz.mjs";
|
|
2
2
|
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
3
3
|
import { access, lstat, readFile, readdir, realpath, stat } from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
@@ -21,27 +21,72 @@ function isInside(parent, candidate) {
|
|
|
21
21
|
return relative === "" || !relative.startsWith("..") && !path.isAbsolute(relative);
|
|
22
22
|
}
|
|
23
23
|
function findWorkspaceRoot(rootDir) {
|
|
24
|
-
let current = realpathSync(
|
|
24
|
+
let current = realpathSync(
|
|
25
|
+
/* turbopackIgnore: true */
|
|
26
|
+
rootDir
|
|
27
|
+
);
|
|
25
28
|
for (;;) {
|
|
26
|
-
if (existsSync(
|
|
29
|
+
if (existsSync(
|
|
30
|
+
/* turbopackIgnore: true */
|
|
31
|
+
path.join(
|
|
32
|
+
/* turbopackIgnore: true */
|
|
33
|
+
current,
|
|
34
|
+
".git"
|
|
35
|
+
)
|
|
36
|
+
) || existsSync(
|
|
37
|
+
/* turbopackIgnore: true */
|
|
38
|
+
path.join(
|
|
39
|
+
/* turbopackIgnore: true */
|
|
40
|
+
current,
|
|
41
|
+
"pnpm-workspace.yaml"
|
|
42
|
+
)
|
|
43
|
+
) || existsSync(
|
|
44
|
+
/* turbopackIgnore: true */
|
|
45
|
+
path.join(
|
|
46
|
+
/* turbopackIgnore: true */
|
|
47
|
+
current,
|
|
48
|
+
"pnpm-workspace.yml"
|
|
49
|
+
)
|
|
50
|
+
)) return current;
|
|
27
51
|
const parent = path.dirname(current);
|
|
28
|
-
if (parent === current) return realpathSync(
|
|
52
|
+
if (parent === current) return realpathSync(
|
|
53
|
+
/* turbopackIgnore: true */
|
|
54
|
+
rootDir
|
|
55
|
+
);
|
|
29
56
|
current = parent;
|
|
30
57
|
}
|
|
31
58
|
}
|
|
32
59
|
async function pathExists(candidate) {
|
|
33
60
|
try {
|
|
34
|
-
await access(
|
|
61
|
+
await access(
|
|
62
|
+
/* turbopackIgnore: true */
|
|
63
|
+
candidate
|
|
64
|
+
);
|
|
35
65
|
return true;
|
|
36
66
|
} catch {
|
|
37
67
|
return false;
|
|
38
68
|
}
|
|
39
69
|
}
|
|
40
70
|
async function findWorkspaceRootAsync(rootDir) {
|
|
41
|
-
const resolvedRoot = await realpath(
|
|
71
|
+
const resolvedRoot = await realpath(
|
|
72
|
+
/* turbopackIgnore: true */
|
|
73
|
+
rootDir
|
|
74
|
+
);
|
|
42
75
|
let current = resolvedRoot;
|
|
43
76
|
for (;;) {
|
|
44
|
-
if (await pathExists(path.join(
|
|
77
|
+
if (await pathExists(path.join(
|
|
78
|
+
/* turbopackIgnore: true */
|
|
79
|
+
current,
|
|
80
|
+
".git"
|
|
81
|
+
)) || await pathExists(path.join(
|
|
82
|
+
/* turbopackIgnore: true */
|
|
83
|
+
current,
|
|
84
|
+
"pnpm-workspace.yaml"
|
|
85
|
+
)) || await pathExists(path.join(
|
|
86
|
+
/* turbopackIgnore: true */
|
|
87
|
+
current,
|
|
88
|
+
"pnpm-workspace.yml"
|
|
89
|
+
))) return current;
|
|
45
90
|
const parent = path.dirname(current);
|
|
46
91
|
if (parent === current) return resolvedRoot;
|
|
47
92
|
current = parent;
|
|
@@ -53,44 +98,91 @@ function getDocsAgentSkillsConfiguredPaths(input) {
|
|
|
53
98
|
return (typeof value === "string" ? [value] : [...value]).map((candidate) => candidate.trim()).filter(Boolean);
|
|
54
99
|
}
|
|
55
100
|
function resolveSafeConfiguredPath(configuredPath, rootDir, workspaceRoot) {
|
|
56
|
-
const candidate = path.resolve(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
101
|
+
const candidate = path.resolve(
|
|
102
|
+
/* turbopackIgnore: true */
|
|
103
|
+
rootDir,
|
|
104
|
+
configuredPath
|
|
105
|
+
);
|
|
106
|
+
if (!existsSync(
|
|
107
|
+
/* turbopackIgnore: true */
|
|
108
|
+
candidate
|
|
109
|
+
)) throw new Error(`Configured Agent Skill path does not exist: ${configuredPath}`);
|
|
110
|
+
if (lstatSync(
|
|
111
|
+
/* turbopackIgnore: true */
|
|
112
|
+
candidate
|
|
113
|
+
).isSymbolicLink()) throw new Error(`Configured Agent Skill paths may not be symlinks: ${configuredPath}`);
|
|
114
|
+
const resolved = realpathSync(
|
|
115
|
+
/* turbopackIgnore: true */
|
|
116
|
+
candidate
|
|
117
|
+
);
|
|
60
118
|
if (!isInside(workspaceRoot, resolved)) throw new Error(`Agent Skill symlink escapes the workspace: ${configuredPath}`);
|
|
61
119
|
return resolved;
|
|
62
120
|
}
|
|
63
121
|
async function resolveSafeConfiguredPathAsync(configuredPath, rootDir, workspaceRoot) {
|
|
64
|
-
const candidate = path.resolve(
|
|
122
|
+
const candidate = path.resolve(
|
|
123
|
+
/* turbopackIgnore: true */
|
|
124
|
+
rootDir,
|
|
125
|
+
configuredPath
|
|
126
|
+
);
|
|
65
127
|
if (!await pathExists(candidate)) throw new Error(`Configured Agent Skill path does not exist: ${configuredPath}`);
|
|
66
|
-
if ((await lstat(
|
|
67
|
-
|
|
128
|
+
if ((await lstat(
|
|
129
|
+
/* turbopackIgnore: true */
|
|
130
|
+
candidate
|
|
131
|
+
)).isSymbolicLink()) throw new Error(`Configured Agent Skill paths may not be symlinks: ${configuredPath}`);
|
|
132
|
+
const resolved = await realpath(
|
|
133
|
+
/* turbopackIgnore: true */
|
|
134
|
+
candidate
|
|
135
|
+
);
|
|
68
136
|
if (!isInside(workspaceRoot, resolved)) throw new Error(`Agent Skill symlink escapes the workspace: ${configuredPath}`);
|
|
69
137
|
return resolved;
|
|
70
138
|
}
|
|
71
139
|
function collectSkillDocuments(candidate, workspaceRoot, results, visited, depth = 0) {
|
|
72
140
|
if (depth > MAX_COLLECTION_DEPTH) throw new Error(`Agent Skill collection exceeds ${MAX_COLLECTION_DEPTH} directory levels.`);
|
|
73
|
-
const resolved = realpathSync(
|
|
141
|
+
const resolved = realpathSync(
|
|
142
|
+
/* turbopackIgnore: true */
|
|
143
|
+
candidate
|
|
144
|
+
);
|
|
74
145
|
if (!isInside(workspaceRoot, resolved)) throw new Error(`Agent Skill symlink escapes the workspace: ${candidate}`);
|
|
75
146
|
if (visited.has(resolved)) return;
|
|
76
147
|
visited.add(resolved);
|
|
77
|
-
const info = statSync(
|
|
148
|
+
const info = statSync(
|
|
149
|
+
/* turbopackIgnore: true */
|
|
150
|
+
resolved
|
|
151
|
+
);
|
|
78
152
|
if (info.isFile()) {
|
|
79
153
|
if (path.basename(resolved) !== "SKILL.md") throw new Error(`Agent Skill file must be named SKILL.md: ${candidate}`);
|
|
80
154
|
results.add(resolved);
|
|
81
155
|
return;
|
|
82
156
|
}
|
|
83
157
|
if (!info.isDirectory()) throw new Error(`Agent Skill path must be a regular file or directory: ${candidate}`);
|
|
84
|
-
const directSkill = path.join(
|
|
85
|
-
|
|
86
|
-
|
|
158
|
+
const directSkill = path.join(
|
|
159
|
+
/* turbopackIgnore: true */
|
|
160
|
+
resolved,
|
|
161
|
+
"SKILL.md"
|
|
162
|
+
);
|
|
163
|
+
if (existsSync(
|
|
164
|
+
/* turbopackIgnore: true */
|
|
165
|
+
directSkill
|
|
166
|
+
)) {
|
|
167
|
+
const directInfo = lstatSync(
|
|
168
|
+
/* turbopackIgnore: true */
|
|
169
|
+
directSkill
|
|
170
|
+
);
|
|
87
171
|
if (!directInfo.isFile() || directInfo.isSymbolicLink()) throw new Error(`Agent Skill SKILL.md must be a non-symlink regular file: ${directSkill}`);
|
|
88
172
|
results.add(directSkill);
|
|
89
173
|
return;
|
|
90
174
|
}
|
|
91
|
-
for (const entry of readdirSync(
|
|
175
|
+
for (const entry of readdirSync(
|
|
176
|
+
/* turbopackIgnore: true */
|
|
177
|
+
resolved,
|
|
178
|
+
{ withFileTypes: true }
|
|
179
|
+
).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
92
180
|
if (IGNORED_COLLECTION_DIRECTORIES.has(entry.name) || entry.name.startsWith(".") || COMPANION_DIRECTORIES.has(entry.name)) continue;
|
|
93
|
-
const entryPath = path.join(
|
|
181
|
+
const entryPath = path.join(
|
|
182
|
+
/* turbopackIgnore: true */
|
|
183
|
+
resolved,
|
|
184
|
+
entry.name
|
|
185
|
+
);
|
|
94
186
|
if (entry.isSymbolicLink()) throw new Error(`Agent Skill collections may not contain symlinks: ${entryPath}`);
|
|
95
187
|
else if (entry.isDirectory() || entry.isFile()) {
|
|
96
188
|
if (entry.isDirectory() || entry.name === "SKILL.md") collectSkillDocuments(entryPath, workspaceRoot, results, visited, depth + 1);
|
|
@@ -99,28 +191,49 @@ function collectSkillDocuments(candidate, workspaceRoot, results, visited, depth
|
|
|
99
191
|
}
|
|
100
192
|
async function collectSkillDocumentsAsync(candidate, workspaceRoot, results, visited, depth = 0) {
|
|
101
193
|
if (depth > MAX_COLLECTION_DEPTH) throw new Error(`Agent Skill collection exceeds ${MAX_COLLECTION_DEPTH} directory levels.`);
|
|
102
|
-
const resolved = await realpath(
|
|
194
|
+
const resolved = await realpath(
|
|
195
|
+
/* turbopackIgnore: true */
|
|
196
|
+
candidate
|
|
197
|
+
);
|
|
103
198
|
if (!isInside(workspaceRoot, resolved)) throw new Error(`Agent Skill symlink escapes the workspace: ${candidate}`);
|
|
104
199
|
if (visited.has(resolved)) return;
|
|
105
200
|
visited.add(resolved);
|
|
106
|
-
const info = await stat(
|
|
201
|
+
const info = await stat(
|
|
202
|
+
/* turbopackIgnore: true */
|
|
203
|
+
resolved
|
|
204
|
+
);
|
|
107
205
|
if (info.isFile()) {
|
|
108
206
|
if (path.basename(resolved) !== "SKILL.md") throw new Error(`Agent Skill file must be named SKILL.md: ${candidate}`);
|
|
109
207
|
results.add(resolved);
|
|
110
208
|
return;
|
|
111
209
|
}
|
|
112
210
|
if (!info.isDirectory()) throw new Error(`Agent Skill path must be a regular file or directory: ${candidate}`);
|
|
113
|
-
const directSkill = path.join(
|
|
211
|
+
const directSkill = path.join(
|
|
212
|
+
/* turbopackIgnore: true */
|
|
213
|
+
resolved,
|
|
214
|
+
"SKILL.md"
|
|
215
|
+
);
|
|
114
216
|
if (await pathExists(directSkill)) {
|
|
115
|
-
const directInfo = await lstat(
|
|
217
|
+
const directInfo = await lstat(
|
|
218
|
+
/* turbopackIgnore: true */
|
|
219
|
+
directSkill
|
|
220
|
+
);
|
|
116
221
|
if (!directInfo.isFile() || directInfo.isSymbolicLink()) throw new Error(`Agent Skill SKILL.md must be a non-symlink regular file: ${directSkill}`);
|
|
117
222
|
results.add(directSkill);
|
|
118
223
|
return;
|
|
119
224
|
}
|
|
120
|
-
const entries = await readdir(
|
|
225
|
+
const entries = await readdir(
|
|
226
|
+
/* turbopackIgnore: true */
|
|
227
|
+
resolved,
|
|
228
|
+
{ withFileTypes: true }
|
|
229
|
+
);
|
|
121
230
|
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
122
231
|
if (IGNORED_COLLECTION_DIRECTORIES.has(entry.name) || entry.name.startsWith(".") || COMPANION_DIRECTORIES.has(entry.name)) continue;
|
|
123
|
-
const entryPath = path.join(
|
|
232
|
+
const entryPath = path.join(
|
|
233
|
+
/* turbopackIgnore: true */
|
|
234
|
+
resolved,
|
|
235
|
+
entry.name
|
|
236
|
+
);
|
|
124
237
|
if (entry.isSymbolicLink()) throw new Error(`Agent Skill collections may not contain symlinks: ${entryPath}`);
|
|
125
238
|
else if (entry.isDirectory() || entry.isFile()) {
|
|
126
239
|
if (entry.isDirectory() || entry.name === "SKILL.md") await collectSkillDocumentsAsync(entryPath, workspaceRoot, results, visited, depth + 1);
|
|
@@ -181,8 +294,16 @@ function readCompanionFiles(skillDir, name, rootSkillBytes) {
|
|
|
181
294
|
let totalBytes = rootSkillBytes;
|
|
182
295
|
function visit(absoluteDir, relativeDir, depth = 0) {
|
|
183
296
|
if (depth > MAX_COLLECTION_DEPTH) throw new Error(`Agent Skill companion tree exceeds ${MAX_COLLECTION_DEPTH} levels: ${skillDir}`);
|
|
184
|
-
for (const entry of readdirSync(
|
|
185
|
-
|
|
297
|
+
for (const entry of readdirSync(
|
|
298
|
+
/* turbopackIgnore: true */
|
|
299
|
+
absoluteDir,
|
|
300
|
+
{ withFileTypes: true }
|
|
301
|
+
).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
302
|
+
const absolutePath = path.join(
|
|
303
|
+
/* turbopackIgnore: true */
|
|
304
|
+
absoluteDir,
|
|
305
|
+
entry.name
|
|
306
|
+
);
|
|
186
307
|
const relativePath = path.posix.join(relativeDir, entry.name);
|
|
187
308
|
if (entry.isSymbolicLink()) throw new Error(`Agent Skill companion files may not be symlinks: ${absolutePath}`);
|
|
188
309
|
if (entry.isDirectory()) {
|
|
@@ -190,8 +311,14 @@ function readCompanionFiles(skillDir, name, rootSkillBytes) {
|
|
|
190
311
|
continue;
|
|
191
312
|
}
|
|
192
313
|
if (!entry.isFile()) throw new Error(`Unsafe filesystem entry in Agent Skill: ${absolutePath}`);
|
|
193
|
-
const executable = (statSync(
|
|
194
|
-
|
|
314
|
+
const executable = (statSync(
|
|
315
|
+
/* turbopackIgnore: true */
|
|
316
|
+
absolutePath
|
|
317
|
+
).mode & 73) !== 0;
|
|
318
|
+
const content = readFileSync(
|
|
319
|
+
/* turbopackIgnore: true */
|
|
320
|
+
absolutePath
|
|
321
|
+
);
|
|
195
322
|
if (content.byteLength > MAX_FILE_BYTES) throw new Error(`Agent Skill file exceeds ${MAX_FILE_BYTES} bytes: ${absolutePath}`);
|
|
196
323
|
totalBytes += content.byteLength;
|
|
197
324
|
if (totalBytes > MAX_SKILL_BYTES || files.length >= MAX_FILES_PER_SKILL - 1) throw new Error(`Agent Skill exceeds safe publication limits: ${skillDir}`);
|
|
@@ -210,9 +337,19 @@ function readCompanionFiles(skillDir, name, rootSkillBytes) {
|
|
|
210
337
|
}
|
|
211
338
|
}
|
|
212
339
|
for (const directory of [...COMPANION_DIRECTORIES].sort()) {
|
|
213
|
-
const absoluteDir = path.join(
|
|
214
|
-
|
|
215
|
-
|
|
340
|
+
const absoluteDir = path.join(
|
|
341
|
+
/* turbopackIgnore: true */
|
|
342
|
+
skillDir,
|
|
343
|
+
directory
|
|
344
|
+
);
|
|
345
|
+
if (!existsSync(
|
|
346
|
+
/* turbopackIgnore: true */
|
|
347
|
+
absoluteDir
|
|
348
|
+
)) continue;
|
|
349
|
+
const info = lstatSync(
|
|
350
|
+
/* turbopackIgnore: true */
|
|
351
|
+
absoluteDir
|
|
352
|
+
);
|
|
216
353
|
if (info.isSymbolicLink() || !info.isDirectory()) throw new Error(`Agent Skill ${directory}/ must be a non-symlink directory: ${absoluteDir}`);
|
|
217
354
|
visit(absoluteDir, directory);
|
|
218
355
|
}
|
|
@@ -223,9 +360,17 @@ async function readCompanionFilesAsync(skillDir, name, rootSkillBytes) {
|
|
|
223
360
|
let totalBytes = rootSkillBytes;
|
|
224
361
|
async function visit(absoluteDir, relativeDir, depth = 0) {
|
|
225
362
|
if (depth > MAX_COLLECTION_DEPTH) throw new Error(`Agent Skill companion tree exceeds ${MAX_COLLECTION_DEPTH} levels: ${skillDir}`);
|
|
226
|
-
const entries = await readdir(
|
|
363
|
+
const entries = await readdir(
|
|
364
|
+
/* turbopackIgnore: true */
|
|
365
|
+
absoluteDir,
|
|
366
|
+
{ withFileTypes: true }
|
|
367
|
+
);
|
|
227
368
|
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
228
|
-
const absolutePath = path.join(
|
|
369
|
+
const absolutePath = path.join(
|
|
370
|
+
/* turbopackIgnore: true */
|
|
371
|
+
absoluteDir,
|
|
372
|
+
entry.name
|
|
373
|
+
);
|
|
229
374
|
const relativePath = path.posix.join(relativeDir, entry.name);
|
|
230
375
|
if (entry.isSymbolicLink()) throw new Error(`Agent Skill companion files may not be symlinks: ${absolutePath}`);
|
|
231
376
|
if (entry.isDirectory()) {
|
|
@@ -233,8 +378,14 @@ async function readCompanionFilesAsync(skillDir, name, rootSkillBytes) {
|
|
|
233
378
|
continue;
|
|
234
379
|
}
|
|
235
380
|
if (!entry.isFile()) throw new Error(`Unsafe filesystem entry in Agent Skill: ${absolutePath}`);
|
|
236
|
-
const executable = ((await stat(
|
|
237
|
-
|
|
381
|
+
const executable = ((await stat(
|
|
382
|
+
/* turbopackIgnore: true */
|
|
383
|
+
absolutePath
|
|
384
|
+
)).mode & 73) !== 0;
|
|
385
|
+
const content = await readFile(
|
|
386
|
+
/* turbopackIgnore: true */
|
|
387
|
+
absolutePath
|
|
388
|
+
);
|
|
238
389
|
if (content.byteLength > MAX_FILE_BYTES) throw new Error(`Agent Skill file exceeds ${MAX_FILE_BYTES} bytes: ${absolutePath}`);
|
|
239
390
|
totalBytes += content.byteLength;
|
|
240
391
|
if (totalBytes > MAX_SKILL_BYTES || files.length >= MAX_FILES_PER_SKILL - 1) throw new Error(`Agent Skill exceeds safe publication limits: ${skillDir}`);
|
|
@@ -253,9 +404,16 @@ async function readCompanionFilesAsync(skillDir, name, rootSkillBytes) {
|
|
|
253
404
|
}
|
|
254
405
|
}
|
|
255
406
|
for (const directory of [...COMPANION_DIRECTORIES].sort()) {
|
|
256
|
-
const absoluteDir = path.join(
|
|
407
|
+
const absoluteDir = path.join(
|
|
408
|
+
/* turbopackIgnore: true */
|
|
409
|
+
skillDir,
|
|
410
|
+
directory
|
|
411
|
+
);
|
|
257
412
|
if (!await pathExists(absoluteDir)) continue;
|
|
258
|
-
const info = await lstat(
|
|
413
|
+
const info = await lstat(
|
|
414
|
+
/* turbopackIgnore: true */
|
|
415
|
+
absoluteDir
|
|
416
|
+
);
|
|
259
417
|
if (info.isSymbolicLink() || !info.isDirectory()) throw new Error(`Agent Skill ${directory}/ must be a non-symlink directory: ${absoluteDir}`);
|
|
260
418
|
await visit(absoluteDir, directory);
|
|
261
419
|
}
|
|
@@ -326,7 +484,11 @@ function createDeterministicTarGzipAsync(files) {
|
|
|
326
484
|
}
|
|
327
485
|
function publishSkillDocumentSync(skillPath) {
|
|
328
486
|
const skillDir = path.dirname(skillPath);
|
|
329
|
-
const skillDocument = readFileSync(
|
|
487
|
+
const skillDocument = readFileSync(
|
|
488
|
+
/* turbopackIgnore: true */
|
|
489
|
+
skillPath,
|
|
490
|
+
"utf8"
|
|
491
|
+
);
|
|
330
492
|
const skillDocumentBytes = Buffer.byteLength(skillDocument, "utf8");
|
|
331
493
|
if (skillDocumentBytes > MAX_FILE_BYTES) throw new Error(`Agent Skill SKILL.md exceeds ${MAX_FILE_BYTES} bytes: ${skillPath}`);
|
|
332
494
|
const base = buildDocsPublishedAgentSkill(skillDocument, hashBytes(skillDocument), {
|
|
@@ -355,7 +517,11 @@ function publishSkillDocumentSync(skillPath) {
|
|
|
355
517
|
}
|
|
356
518
|
async function publishSkillDocumentAsync(skillPath) {
|
|
357
519
|
const skillDir = path.dirname(skillPath);
|
|
358
|
-
const skillDocument = await readFile(
|
|
520
|
+
const skillDocument = await readFile(
|
|
521
|
+
/* turbopackIgnore: true */
|
|
522
|
+
skillPath,
|
|
523
|
+
"utf8"
|
|
524
|
+
);
|
|
359
525
|
const skillDocumentBytes = Buffer.byteLength(skillDocument, "utf8");
|
|
360
526
|
if (skillDocumentBytes > MAX_FILE_BYTES) throw new Error(`Agent Skill SKILL.md exceeds ${MAX_FILE_BYTES} bytes: ${skillPath}`);
|
|
361
527
|
const base = buildDocsPublishedAgentSkill(skillDocument, hashBytes(skillDocument), {
|
|
@@ -399,8 +565,14 @@ function validateAndSortSkills(published) {
|
|
|
399
565
|
function resolveConfiguredAgentSkillPathsSync(input, options = {}) {
|
|
400
566
|
const configuredPaths = getDocsAgentSkillsConfiguredPaths(input);
|
|
401
567
|
if (configuredPaths.length === 0) return [];
|
|
402
|
-
const rootDir = realpathSync(
|
|
403
|
-
|
|
568
|
+
const rootDir = realpathSync(
|
|
569
|
+
/* turbopackIgnore: true */
|
|
570
|
+
options.rootDir ?? process.cwd()
|
|
571
|
+
);
|
|
572
|
+
const workspaceRoot = realpathSync(
|
|
573
|
+
/* turbopackIgnore: true */
|
|
574
|
+
options.workspaceRoot ?? findWorkspaceRoot(rootDir)
|
|
575
|
+
);
|
|
404
576
|
if (!isInside(workspaceRoot, rootDir)) throw new Error("Agent Skill rootDir must stay inside the configured workspace root.");
|
|
405
577
|
const documents = /* @__PURE__ */ new Set();
|
|
406
578
|
const visited = /* @__PURE__ */ new Set();
|
|
@@ -415,8 +587,14 @@ function resolveConfiguredAgentSkillsSync(input, options = {}) {
|
|
|
415
587
|
async function resolveConfiguredAgentSkills(input, options = {}) {
|
|
416
588
|
const configuredPaths = getDocsAgentSkillsConfiguredPaths(input);
|
|
417
589
|
if (configuredPaths.length === 0) return [];
|
|
418
|
-
const rootDir = await realpath(
|
|
419
|
-
|
|
590
|
+
const rootDir = await realpath(
|
|
591
|
+
/* turbopackIgnore: true */
|
|
592
|
+
options.rootDir ?? process.cwd()
|
|
593
|
+
);
|
|
594
|
+
const workspaceRoot = options.workspaceRoot === void 0 ? await findWorkspaceRootAsync(rootDir) : await realpath(
|
|
595
|
+
/* turbopackIgnore: true */
|
|
596
|
+
options.workspaceRoot
|
|
597
|
+
);
|
|
420
598
|
if (!isInside(workspaceRoot, rootDir)) throw new Error("Agent Skill rootDir must stay inside the configured workspace root.");
|
|
421
599
|
const documents = /* @__PURE__ */ new Set();
|
|
422
600
|
const visited = /* @__PURE__ */ new Set();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { dt as DocsAgentSkillsInput } from "./types-
|
|
2
|
-
import { z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
1
|
+
import { dt as DocsAgentSkillsInput } from "./types-Ba9Dd_fe.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-C3AB6qNv.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-skills-server.d.ts
|
|
5
5
|
interface ResolveConfiguredAgentSkillsOptions {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dt as DocsAgentSkillsInput } from "./types-
|
|
2
|
-
import { z as DocsPublishedAgentSkill } from "./standards-discovery-
|
|
3
|
-
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-
|
|
1
|
+
import { dt as DocsAgentSkillsInput } from "./types-Ba9Dd_fe.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-C3AB6qNv.mjs";
|
|
3
|
+
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-DiXUcYNy.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/agent-skills-vite.d.ts
|
|
6
6
|
declare const DOCS_AGENT_SKILLS_BUNDLE_MODULE = "@farming-labs/docs/agent-skills-bundle";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./standards-discovery-
|
|
2
|
-
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-
|
|
1
|
+
import "./standards-discovery-BQQ3CAzz.mjs";
|
|
2
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-CJh3EGWC.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/agent-skills-vite.ts
|
|
5
5
|
const DOCS_AGENT_SKILLS_BUNDLE_MODULE = "@farming-labs/docs/agent-skills-bundle";
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import
|
|
7
|
-
import "./
|
|
8
|
-
import "./agent-
|
|
1
|
+
import "./http-body-DkAPk6D5.mjs";
|
|
2
|
+
import "./markdown-sections-9Oxr33b-.mjs";
|
|
3
|
+
import { a as DEFAULT_AGENT_MD_ROUTE, it as renderDocsAgentsDocument, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, t as DEFAULT_AGENTS_MD_ROUTE, ut as resolveDocsAgentFeedbackConfig } from "./agent-BErhm-eR.mjs";
|
|
4
|
+
import "./standards-discovery-BQQ3CAzz.mjs";
|
|
5
|
+
import "./openapi-mcp-gbEUXMkc.mjs";
|
|
6
|
+
import "./prompt-utils-Dj8-I3Jw.mjs";
|
|
7
|
+
import { p as resolveApiReferenceOpenApiDiscovery } from "./api-reference-DafuHRtc.mjs";
|
|
8
|
+
import "./agent-skills-server-CJh3EGWC.mjs";
|
|
9
|
+
import "./agent-evals-BHXe_A2m.mjs";
|
|
9
10
|
import { resolveDocsMcpConfig } from "./mcp.mjs";
|
|
10
|
-
import "./authoring-mcp-
|
|
11
|
-
import "./
|
|
11
|
+
import "./authoring-mcp-BmohXL7E.mjs";
|
|
12
|
+
import "./cloud-ask-ai-Bq_njfjh.mjs";
|
|
13
|
+
import "./code-blocks-BE3sEayp.mjs";
|
|
14
|
+
import "./sitemap-server-CClBRp7_.mjs";
|
|
12
15
|
import "./server.mjs";
|
|
13
|
-
import { a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-
|
|
14
|
-
import { t as detectFramework } from "./utils-
|
|
16
|
+
import { a as loadDocsConfigModule, d as readNavTitle, g as resolveDocsConfigPath, h as readTopLevelStringProperty, l as readBooleanProperty, p as readStringProperty, t as extractNestedObjectLiteral } from "./config-DDuQ4Qma.mjs";
|
|
17
|
+
import { t as detectFramework } from "./utils-8H7dkC8w.mjs";
|
|
15
18
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
16
19
|
import path from "node:path";
|
|
17
20
|
import pc from "picocolors";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _t as DocsAnalyticsEvent, gn as DocsObservabilityEventInput, gt as DocsAnalyticsConfig, hn as DocsObservabilityEvent, mn as DocsObservabilityConfig, pt as DocsAgentTraceEventInput, vt as DocsAnalyticsEventInput } from "./types-
|
|
1
|
+
import { _t as DocsAnalyticsEvent, gn as DocsObservabilityEventInput, gt as DocsAnalyticsConfig, hn as DocsObservabilityEvent, mn as DocsObservabilityConfig, pt as DocsAgentTraceEventInput, vt as DocsAnalyticsEventInput } from "./types-Ba9Dd_fe.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/analytics.d.ts
|
|
4
4
|
declare const DOCS_AGENT_TRACE_EVENT_TYPES: readonly ["run.start", "run.end", "run.error", "user.input", "prompt.build", "retrieval.query", "retrieval.result", "retrieval.error", "model.call", "model.response", "model.stream", "model.error", "tool.call", "tool.result", "tool.error", "retry", "timeout", "error", "agent.final"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as sendDocsCloudAnalyticsEvent, t as resolveDocsCloudAnalyticsOptions } from "./cloud-analytics-
|
|
1
|
+
import { n as sendDocsCloudAnalyticsEvent, t as resolveDocsCloudAnalyticsOptions } from "./cloud-analytics-D14HplI7.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/analytics.ts
|
|
4
4
|
const ANALYTICS_LOG_PREFIX = "[@farming-labs/docs:analytics]";
|