@farming-labs/docs 0.2.117 → 0.2.119
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-DGNTD-N6.mjs → agent-CYk2DxY7.mjs} +4 -4
- package/dist/{agent-CEZCaYto.mjs → agent-DkAidqtV.mjs} +23 -9
- package/dist/{agent-evals-CmeTjDMC.mjs → agent-evals-BLNLvXbG.mjs} +4 -4
- package/dist/{agent-export-DIKwVWYN.mjs → agent-export-Cxljt6RP.mjs} +16 -12
- package/dist/{agent-feedback-evaluations-DQCTFegz.mjs → agent-feedback-evaluations-CcMGlgsO.mjs} +1 -1
- package/dist/agent-skills-bundle.d.mts +1 -1
- package/dist/{agent-skills-progressive-disclosure-BDSjGGFd.mjs → agent-skills-progressive-disclosure-PjPtTYL-.mjs} +1 -1
- package/dist/{agent-skills-server-Ddm90WL6.mjs → agent-skills-server-BC7md56k.mjs} +224 -46
- package/dist/{agent-skills-server-BWRJjIQG.d.mts → agent-skills-server-CTNWr23x.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-jtn256sz.mjs} +15 -11
- package/dist/{analytics-R9c-Md4b.d.mts → analytics-B8RZiKUt.d.mts} +1 -1
- package/dist/{analytics-CqfcIBdg.mjs → analytics-p8Vhhu2P.mjs} +1 -1
- package/dist/{api-reference-0XdEWya8.mjs → api-reference-By_LokQ-.mjs} +1 -1
- package/dist/{authoring-CvsCmYuq.mjs → authoring-C2ymvYWl.mjs} +8 -6
- package/dist/{authoring-mcp-C35lj3cI.mjs → authoring-mcp-CiCUQe3o.mjs} +1 -1
- package/dist/browser.d.mts +4 -4
- package/dist/browser.mjs +7 -4
- 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-6eKrlmKd.mjs} +3 -3
- package/dist/{cloud-ask-ai-DLyrydIR.d.mts → cloud-ask-ai-BOahlsIZ.d.mts} +1 -1
- package/dist/{cloud-ask-ai-BDtBbbZZ.mjs → cloud-ask-ai-BqKhjpS5.mjs} +8 -7
- package/dist/{codeblocks-DEcqNXve.mjs → codeblocks-CHpgAwY-.mjs} +1 -1
- package/dist/{content-change-hydration-BWJNUIot.d.mts → content-change-hydration-CvHJadhE.d.mts} +3 -3
- package/dist/{dev-Df77AKR1.mjs → dev-Bnn-NUNa.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-CUMgbglt.mjs} +21 -17
- package/dist/{downgrade-C6DSsOO9.mjs → downgrade-CHMta85e.mjs} +2 -2
- package/dist/{feedback-evals-CYuS2wTu.mjs → feedback-evals-DMilg9pY.mjs} +1 -1
- package/dist/{golden-evaluations-B1QDOzYj.mjs → golden-evaluations-CLUViycJ.mjs} +2 -2
- package/dist/http-body-DkAPk6D5.mjs +64 -0
- package/dist/index.d.mts +26 -43
- package/dist/index.mjs +13 -13
- package/dist/{init-BXKzipSS.mjs → init-K0LmXDZ5.mjs} +3 -3
- package/dist/markdown-rendering.mjs +1 -1
- package/dist/{mcp-Bj3ZoEtt.mjs → mcp-Bvha6_mG.mjs} +16 -12
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.mjs +79 -22
- package/dist/{metadata-7htr-Xj_.mjs → metadata-BOHn0Y5K.mjs} +1 -1
- package/dist/{openapi-diff-DKW3xkQU.mjs → openapi-diff-BOESBfnP.mjs} +6 -5
- package/dist/{openapi-mcp-UF4Cx885.mjs → openapi-mcp-BIOTLiA7.mjs} +4 -316
- package/dist/{openapi-sdk-DqRHPsCb.mjs → openapi-sdk-DJutz2AC.mjs} +6 -5
- package/dist/{openapi-source-CiKbUK71.mjs → openapi-source-CiX3hwFp.mjs} +1 -1
- package/dist/{package-version-CTkii52k.mjs → package-version-HJhYeq4M.mjs} +1 -1
- package/dist/{prompt-references-Cficetgk.mjs → prompt-references-DMgbu_dz.mjs} +20 -4
- package/dist/{sitemap-server-C4bpuoLi.mjs → prompt-utils-B5g-bv7o.mjs} +1 -17
- package/dist/{retrieval-digest-PD4fFy7P.d.mts → retrieval-digest-DLAQsQmx.d.mts} +2 -109
- package/dist/{review-CcplK9Hj.mjs → review-C6EmbV0l.mjs} +13 -11
- package/dist/{robots-BPYWIGqD.mjs → robots-BYJAVeI6.mjs} +2 -2
- package/dist/{robots-D4T3zZr_.mjs → robots-DteZB8vl.mjs} +7 -6
- package/dist/runtime.d.mts +5 -0
- package/dist/runtime.mjs +12 -0
- package/dist/{search-BNmlDQJ2.mjs → search-DKcdZgGx.mjs} +16 -12
- package/dist/server.d.mts +8 -116
- package/dist/server.mjs +15 -12
- package/dist/sidebar-C2LKcU7n.d.mts +63 -0
- package/dist/sidebar-CFHBj29f.mjs +421 -0
- package/dist/{sitemap-Bc4LkIcm.mjs → sitemap-CBQoERNz.mjs} +15 -11
- package/dist/sitemap-DafdOrxK.d.mts +110 -0
- package/dist/sitemap-server-C9r22_06.d.mts +114 -0
- package/dist/sitemap-server-Lg3YhUx4.mjs +18 -0
- package/dist/{skills-B6wl1bUL.mjs → skills-a90P31sJ.mjs} +15 -11
- package/dist/{standards-discovery-C1RLKwV9.d.mts → standards-discovery-1fiUVDAo.d.mts} +1 -1
- package/dist/{standards-discovery-Bpz90VYq.mjs → standards-discovery-sSEojU80.mjs} +1 -1
- package/dist/{types-Dkl2DUfp.d.mts → types-BncG8J3g.d.mts} +1 -1
- package/dist/{upgrade-8zStRidw.mjs → upgrade-DlQMOFV1.mjs} +2 -2
- package/package.json +8 -3
- package/dist/audience-exposure-DVsfT9Sx.mjs +0 -8
- package/dist/sidebar-3W51s2sF.mjs +0 -73
- package/dist/sidebar-CGbvEPTX.d.mts +0 -15
- /package/dist/{audience-exposure-BAjHjaTT.d.mts → audience-exposure-DBrFWULA.d.mts} +0 -0
- /package/dist/{cloud-analytics-Ci1yiwD8.mjs → cloud-analytics-D14HplI7.mjs} +0 -0
- /package/dist/{config-BnUOoj07.mjs → config-BZnKAj_Y.mjs} +0 -0
- /package/dist/{errors-BkS29NUA.mjs → errors-BtnVLhNF.mjs} +0 -0
- /package/dist/{feedback-CNsQP2jY.mjs → feedback-DL4T5oIO.mjs} +0 -0
- /package/dist/{markdown-sections-BKy4labo.mjs → markdown-sections-9Oxr33b-.mjs} +0 -0
- /package/dist/{openapi-anOaQn9o.mjs → openapi-CfCzX_a1.mjs} +0 -0
- /package/dist/{propose-ZH_mGMY_.mjs → propose-JmUv_BTt.mjs} +0 -0
- /package/dist/{retrieval-digest-B-SgtXKK.mjs → retrieval-digest-CT-eIEcp.mjs} +0 -0
- /package/dist/{templates-BiORflC3.mjs → templates-BuQ8YsGv.mjs} +0 -0
- /package/dist/{utils-c9arebCi.mjs → utils-C7KDrPpA.mjs} +0 -0
|
@@ -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-DkAidqtV.mjs";
|
|
3
|
+
import { d as GENERATED_AGENT_PROVENANCE_VERSION, f as hashGeneratedAgentContent, h as serializeGeneratedAgentDocument, m as parseGeneratedAgentDocument } from "./openapi-mcp-BIOTLiA7.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-BZnKAj_Y.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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
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-
|
|
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 { 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-sSEojU80.mjs";
|
|
5
5
|
import { createProcessor } from "@mdx-js/mdx";
|
|
6
6
|
|
|
7
7
|
//#region src/okf.ts
|
|
@@ -711,6 +711,13 @@ function agentVersionConstraintsOverlap(left, right) {
|
|
|
711
711
|
return leftRanges.some((leftRange) => rightRanges.some((rightRange) => rangesOverlap(leftRange, rightRange)));
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
+
//#endregion
|
|
715
|
+
//#region src/audience-exposure.ts
|
|
716
|
+
/** Resolve whether content with an optional audience restriction is visible. */
|
|
717
|
+
function resolveDocsAudienceExposure(only, audience) {
|
|
718
|
+
return only !== "human" && only !== "agent" || only === audience;
|
|
719
|
+
}
|
|
720
|
+
|
|
714
721
|
//#endregion
|
|
715
722
|
//#region src/audience.ts
|
|
716
723
|
const DOCS_AUDIENCE_TAG_NAMES = [
|
|
@@ -7081,15 +7088,22 @@ function normalizeDocsAgentFeedbackContext(value) {
|
|
|
7081
7088
|
return Object.keys(context).length > 0 ? context : void 0;
|
|
7082
7089
|
}
|
|
7083
7090
|
async function parseDocsAgentFeedbackData(request) {
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7091
|
+
const parsed = await readDocsJsonBody(request);
|
|
7092
|
+
if (!parsed.ok) {
|
|
7093
|
+
if (parsed.reason === "request_too_large") return {
|
|
7094
|
+
ok: false,
|
|
7095
|
+
response: Response.json({
|
|
7096
|
+
error: `Request body exceeds the ${parsed.maxBodyBytes} byte limit`,
|
|
7097
|
+
code: parsed.reason,
|
|
7098
|
+
maxBodyBytes: parsed.maxBodyBytes
|
|
7099
|
+
}, { status: 413 })
|
|
7100
|
+
};
|
|
7088
7101
|
return {
|
|
7089
7102
|
ok: false,
|
|
7090
7103
|
response: Response.json({ error: "Agent feedback body must be valid JSON" }, { status: 400 })
|
|
7091
7104
|
};
|
|
7092
7105
|
}
|
|
7106
|
+
const body = parsed.value;
|
|
7093
7107
|
if (!isPlainObject(body)) return {
|
|
7094
7108
|
ok: false,
|
|
7095
7109
|
response: Response.json({ error: "Agent feedback body must be an object" }, { status: 400 })
|
|
@@ -9009,4 +9023,4 @@ function toYamlString(value) {
|
|
|
9009
9023
|
}
|
|
9010
9024
|
|
|
9011
9025
|
//#endregion
|
|
9012
|
-
export { isDocsSkillRequest as $,
|
|
9026
|
+
export { isDocsSkillRequest as $, isDocsMcpResourcePath as $n, buildDocsAskAIContext as $t, buildDocsAgentDiscoverySpec as A, agentVersionConstraintMatches as An, DEFAULT_SITEMAP_MD_ROUTE as At, detectDocsMarkdownAgentRequest as B, normalizeDocsRelated as Bn, resolveDocsSitemapRequest as Bt, DOCS_AI_AGENT_USER_AGENT_HEADER_PATTERN as C, extractDocsMarkdownPromptBlocks as Cn, selectDocsLlmsTxtContent as Ct, DOCS_MARKDOWN_SIGNATURE_AGENT_HEADER as D, resolveDocsAudienceMdxContent as Dn, withDocsOpenApiOperationCounts as Dt, DOCS_MARKDOWN_SECTION_INDEX_FORMAT as E, resolveDocsAgentMdxContent as En, validateDocsAgentFeedbackPayload as Et, buildDocsMcpEndpointCandidates as F, normalizeAgentVersion as Fn, readDocsSitemapManifestFromContentMap as Ft, hasDocsMarkdownSignatureAgent as G, DEFAULT_MCP_WELL_KNOWN_ROUTE as Gn, DocsContentChangesRequestError as Gt, getDocsLlmsTxtMaxCharsIssue as H, DEFAULT_MCP_PROTECTED_RESOURCE_METADATA_ROUTE as Hn, DOCS_CONTENT_CHANGES_FORMAT as Ht, collectDocsMarkdownSections as I, DocsPaginationCursorError as In, renderDocsSitemapMarkdown as It, isDocsConfigRequest as J, getDocsMcpResourcePaths as Jn, isDocsContentChangeGeneration as Jt, isDocsAgentDiscoveryRequest as K, buildDocsMcpProtectedResourceMetadataRoute as Kn, createDocsContentChangeFeed as Kt, compactDocsAgentDiscoverySpec as L, createDocsPaginationCursor as Ln, renderDocsSitemapXml as Lt, buildDocsConfigMap as M, normalizeAgentFramework as Mn, DEFAULT_SITEMAP_XML_ROUTE as Mt, buildDocsDiagnostics as N, normalizeAgentLocale as Nn, buildDocsSitemapManifest as Nt, DOCS_TRADITIONAL_BOT_USER_AGENT_HEADER_PATTERN as O, resolveDocsAudienceExposure as On, DEFAULT_SITEMAP_MANIFEST_PATH as Ot, buildDocsMarkdownSectionIndex as P, normalizeAgentScopeValues as Pn, createDocsSitemapResponse as Pt, isDocsPublicGetRequest as Q, isDocsMcpRequest as Qn, DocsSearchRequestError as Qt, createDocsMarkdownResponse as R, paginateDocsItems as Rn, resolveDocsSitemapConfig as Rt, DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE as S, resolveSearchRequestConfig as Sn, resolveDocsSkillFormat as St, DOCS_CONFIG_MAP_TOP_LEVEL_KEYS as T, findDocsAudienceMdxTags as Tn, toDocsMarkdownUrl as Tt, getDocsMarkdownCanonicalLinkHeader as U, DEFAULT_MCP_PUBLIC_ROUTE as Un, DOCS_CONTENT_CHANGES_RESPONSE_VALUE as Ut, findDocsMarkdownPage as V, renderDocsRelatedMarkdownLines as Vn, toDocsSitemapMarkdownUrl as Vt, getDocsMarkdownVaryHeader as W, DEFAULT_MCP_ROUTE as Wn, DOCS_CONTENT_SNAPSHOT_FORMAT as Wt, isDocsLlmsTxtPublicRequest as X, isDocsMcpOAuthScopeToken as Xn, resolveDocsContentChangesConfig as Xt, isDocsDiagnosticsRequest as Y, hasDocsMcpProtectedResourceConfig as Yn, isDocsContentChangesRequest as Yt, isDocsMarkdownSectionIndexRequest as Z, isDocsMcpProtectedResourceMetadataPath as Zn, resolveDocsContentChangesRequest as Zt, DEFAULT_LLMS_TXT_MAX_CHARS as _, resolveDocsSearchAudience as _n, resolveDocsMarkdownRecovery as _t, DEFAULT_AGENT_MD_ROUTE as a, createCustomSearchAdapter as an, DOCS_OKF_BUNDLE_FORMAT as ar, renderDocsLlmsTxt as at, DEFAULT_OPENAPI_SCHEMA_ROUTE as b, resolveDocsSearchRequest as bn, resolveDocsOpenApiDiscoveryConfig as bt, DEFAULT_AGENT_SPEC_WELL_KNOWN_JSON_ROUTE as c, createTypesenseSearchAdapter as cn, normalizeDocsOkfTrustMetadataInput as cr, renderDocsSkillDocument as ct, DEFAULT_DOCS_CONFIG_FORMAT as d, inferDocsAskAIPackageHints as dn, resolveDocsAgentFeedbackRequest as dt, buildDocsContentSnapshot as en, normalizeDocsMcpAuthorizationServerUrls as er, matchesDocsLlmsTxtSection as et, DEFAULT_DOCS_CONFIG_ROUTE as f, normalizeDocsSearchFilters as fn, resolveDocsAgentsFormat as ft, DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE as g, resolveDocsRetrievalLastModified as gn, resolveDocsMarkdownCanonicalUrl as gt, DEFAULT_LLMS_FULL_TXT_ROUTE as h, resolveAskAISearchRequestConfig as hn, resolveDocsLlmsTxtSections as ht, DEFAULT_AGENT_FEEDBACK_ROUTE as i, createAlgoliaSearchAdapter as in, DEFAULT_DOCS_OKF_ROUTE as ir, renderDocsAgentsDocument as it, buildDocsAgentFeedbackSchema as j, agentVersionConstraintsOverlap as jn, DEFAULT_SITEMAP_MD_WELL_KNOWN_ROUTE as jt, acceptsDocsMarkdown as k, agentVersionConstraintGroupsOverlap as kn, DEFAULT_SITEMAP_MD_DOCS_ROUTE as kt, DEFAULT_AGENT_SPEC_WELL_KNOWN_ROUTE as l, enrichDocsSearchDocumentsWithProvenance as ln, resolveDocsOkfConfig as lr, resolveDocsAgentContractMcpTools as lt, DEFAULT_DOCS_DIAGNOSTICS_ROUTE as m, performDocsSearchWithMetadata as mn, resolveDocsLlmsTxtRequest as mt, DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE as n, buildDocsSearchDocuments as nn, resolveDocsMcpProtectedResourceMetadataLocation as nr, normalizeDocsUrlPath as nt, DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE as o, createMcpSearchAdapter as on, DOCS_OKF_VERSION as or, renderDocsMarkdownDocument as ot, DEFAULT_DOCS_DIAGNOSTICS_FORMAT as p, performDocsSearch as pn, resolveDocsLlmsTxtFormat as pt, isDocsAgentsRequest as q, getDocsMcpProtectedResourceMetadataRoutes as qn, createDocsContentChangesHttpResponse as qt, DEFAULT_AGENT_FEEDBACK_PAYLOAD_SCHEMA as r, buildDocsSearchFacets as rn, resolveDocsMcpResourceLocation as rr, parseDocsAgentFeedbackData as rt, DEFAULT_AGENT_SPEC_ROUTE as s, createSimpleSearchAdapter as sn, buildDocsOkfBundle as sr, renderDocsMarkdownNotFound as st, DEFAULT_AGENTS_MD_ROUTE as t, buildDocsRetrievalDigestProjection as tn, normalizeDocsMcpEndpointPath as tr, normalizeDocsPathSegment as tt, DEFAULT_DOCS_API_ROUTE as u, formatDocsAskAIPackageHints as un, resolveDocsOkfTrustMetadata as ur, resolveDocsAgentFeedbackConfig as ut, DEFAULT_LLMS_TXT_ROUTE as v, resolveDocsSearchError as vn, resolveDocsMarkdownRequest as vt, DOCS_BOT_LIKE_USER_AGENT_HEADER_PATTERN as w, findDocsAudienceMdxIssues as wn, selectDocsMarkdownSection as wt, DEFAULT_SKILL_MD_ROUTE as x, resolveLocalDocsMcpSearchConfig as xn, resolveDocsRequestApiRoute as xt, DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE as y, resolveDocsSearchFilters as yn, resolveDocsMarkdownSectionRequest as yt, createDocsStandardsDiscoveryResponse as z, resolveDocsPaginationOffset as zn, resolveDocsSitemapPageLastmod as zt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as upsertPageAgentContractMarkdown, l as stripDocsGeneratedAgentContractMarkers, o as findDocsMarkdownSection } from "./markdown-sections-
|
|
2
|
-
import { $t as buildDocsAskAIContext, An as
|
|
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 agentVersionConstraintMatches, Fn as normalizeAgentVersion, Mn as normalizeAgentFramework, Nn as normalizeAgentLocale, Pn as normalizeAgentScopeValues, Sn as resolveSearchRequestConfig, fn as normalizeDocsSearchFilters, jn as agentVersionConstraintsOverlap, kn as agentVersionConstraintGroupsOverlap, pn as performDocsSearch, tn as buildDocsRetrievalDigestProjection } from "./agent-DkAidqtV.mjs";
|
|
3
|
+
import { n as digestDocsRetrievalContent } from "./retrieval-digest-CT-eIEcp.mjs";
|
|
4
|
+
import { t as getDocsAgentSkillsConfiguredPaths } from "./agent-skills-server-BC7md56k.mjs";
|
|
5
5
|
import { buildDocsMcpContext } from "./mcp.mjs";
|
|
6
6
|
import { i as validateCodeBlockPlans, n as planCodeBlockTargets, r as resolveDocsCodeBlocksValidateConfig, t as extractCodeBlocksFromMarkdown } from "./code-blocks-GYdvS3BH.mjs";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import "./
|
|
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, 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, lr as resolveDocsOkfConfig, n as DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE, o as DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE, ot as renderDocsMarkdownDocument, sr as buildDocsOkfBundle, 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-DkAidqtV.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-sSEojU80.mjs";
|
|
5
|
+
import "./sidebar-CFHBj29f.mjs";
|
|
5
6
|
import { t as resolveDocsI18n } from "./i18n-B1gJ9EW0.mjs";
|
|
6
|
-
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-
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import "./agent-
|
|
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-BYJAVeI6.mjs";
|
|
8
|
+
import "./openapi-mcp-BIOTLiA7.mjs";
|
|
9
|
+
import "./prompt-utils-B5g-bv7o.mjs";
|
|
10
|
+
import "./api-reference-By_LokQ-.mjs";
|
|
11
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-BC7md56k.mjs";
|
|
12
|
+
import "./agent-evals-BLNLvXbG.mjs";
|
|
11
13
|
import { createFilesystemDocsMcpSource, resolveDocsMcpConfig } from "./mcp.mjs";
|
|
12
|
-
import "./authoring-mcp-
|
|
14
|
+
import "./authoring-mcp-CiCUQe3o.mjs";
|
|
15
|
+
import "./cloud-ask-ai-BqKhjpS5.mjs";
|
|
13
16
|
import "./code-blocks-GYdvS3BH.mjs";
|
|
17
|
+
import "./sitemap-server-Lg3YhUx4.mjs";
|
|
14
18
|
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-
|
|
19
|
+
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-BZnKAj_Y.mjs";
|
|
20
|
+
import { t as detectFramework } from "./utils-C7KDrPpA.mjs";
|
|
17
21
|
import { existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
18
22
|
import path from "node:path";
|
|
19
23
|
import { createHash, randomUUID } from "node:crypto";
|
package/dist/{agent-feedback-evaluations-DQCTFegz.mjs → agent-feedback-evaluations-CcMGlgsO.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-BC7md56k.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-sSEojU80.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-BncG8J3g.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-1fiUVDAo.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-BncG8J3g.mjs";
|
|
2
|
+
import { z as DocsPublishedAgentSkill } from "./standards-discovery-1fiUVDAo.mjs";
|
|
3
|
+
import { t as ResolveConfiguredAgentSkillsOptions } from "./agent-skills-server-CTNWr23x.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-sSEojU80.mjs";
|
|
2
|
+
import { r as resolveConfiguredAgentSkills } from "./agent-skills-server-BC7md56k.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";
|