@farming-labs/next 0.1.101 → 0.1.103
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/config.mjs +29 -0
- package/package.json +3 -3
package/dist/config.mjs
CHANGED
|
@@ -151,6 +151,10 @@ const DEFAULT_LLMS_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms.txt";
|
|
|
151
151
|
const DEFAULT_LLMS_FULL_TXT_WELL_KNOWN_ROUTE = "/.well-known/llms-full.txt";
|
|
152
152
|
const DEFAULT_SKILL_MD_ROUTE = "/skill.md";
|
|
153
153
|
const DEFAULT_SKILL_MD_WELL_KNOWN_ROUTE = "/.well-known/skill.md";
|
|
154
|
+
const DEFAULT_AGENTS_MD_ROUTE = "/AGENTS.md";
|
|
155
|
+
const DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENTS.md";
|
|
156
|
+
const DEFAULT_AGENT_MD_ROUTE = "/AGENT.md";
|
|
157
|
+
const DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE = "/.well-known/AGENT.md";
|
|
154
158
|
const DEFAULT_ROBOTS_TXT_ROUTE = "/robots.txt";
|
|
155
159
|
const DEFAULT_SITEMAP_XML_ROUTE = "/sitemap.xml";
|
|
156
160
|
const DEFAULT_SITEMAP_MD_ROUTE = "/sitemap.md";
|
|
@@ -1003,6 +1007,26 @@ function buildSkillMdRewrites() {
|
|
|
1003
1007
|
destination: "/api/docs?format=skill"
|
|
1004
1008
|
}];
|
|
1005
1009
|
}
|
|
1010
|
+
function buildAgentsMdRewrites() {
|
|
1011
|
+
return [
|
|
1012
|
+
{
|
|
1013
|
+
source: DEFAULT_AGENTS_MD_ROUTE,
|
|
1014
|
+
destination: "/api/docs?format=agents"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
source: DEFAULT_AGENTS_MD_WELL_KNOWN_ROUTE,
|
|
1018
|
+
destination: "/api/docs?format=agents"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
source: DEFAULT_AGENT_MD_ROUTE,
|
|
1022
|
+
destination: "/api/docs?format=agents"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
source: DEFAULT_AGENT_MD_WELL_KNOWN_ROUTE,
|
|
1026
|
+
destination: "/api/docs?format=agents"
|
|
1027
|
+
}
|
|
1028
|
+
];
|
|
1029
|
+
}
|
|
1006
1030
|
function buildSitemapRewrites(config) {
|
|
1007
1031
|
if (!config.enabled) return [];
|
|
1008
1032
|
const prefix = config.routePrefix;
|
|
@@ -1165,6 +1189,7 @@ function mergeDocsMarkdownRewrites(entry, mcp, sitemap, agentFeedback, robots, r
|
|
|
1165
1189
|
const autoBeforeFilesRewrites = [
|
|
1166
1190
|
...buildAgentSpecRewrites(),
|
|
1167
1191
|
...buildMcpRewrites(mcp),
|
|
1192
|
+
...buildAgentsMdRewrites(),
|
|
1168
1193
|
...buildSkillMdRewrites(),
|
|
1169
1194
|
...buildSitemapRewrites(sitemap),
|
|
1170
1195
|
...buildRobotsRewrites(robots),
|
|
@@ -1371,6 +1396,8 @@ function withDocs(nextConfig = {}) {
|
|
|
1371
1396
|
const existingTracingIncludes = nextConfig.outputFileTracingIncludes ?? {};
|
|
1372
1397
|
const docsTraceGlob = docsContentDir.replace(/\\/g, "/").replace(/^\.?\//, "") + "/**/*";
|
|
1373
1398
|
const skillTraceFile = "skill.md";
|
|
1399
|
+
const agentsTraceFile = "AGENTS.md";
|
|
1400
|
+
const agentTraceFile = "AGENT.md";
|
|
1374
1401
|
const sitemapManifestTraceFile = DEFAULT_SITEMAP_MANIFEST_PATH;
|
|
1375
1402
|
const docsContentRoot = isAbsolute(docsContentDir) ? docsContentDir : join(root, docsContentDir);
|
|
1376
1403
|
if (!isStaticExport) {
|
|
@@ -1392,6 +1419,8 @@ function withDocs(nextConfig = {}) {
|
|
|
1392
1419
|
...existingTracingIncludes["/api/docs"] ?? [],
|
|
1393
1420
|
docsTraceGlob,
|
|
1394
1421
|
skillTraceFile,
|
|
1422
|
+
agentsTraceFile,
|
|
1423
|
+
agentTraceFile,
|
|
1395
1424
|
sitemapManifestTraceFile
|
|
1396
1425
|
])],
|
|
1397
1426
|
[DEFAULT_MCP_ROUTE]: [...new Set([...existingTracingIncludes[DEFAULT_MCP_ROUTE] ?? [], docsTraceGlob])]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.103",
|
|
4
4
|
"description": "Next.js adapter for @farming-labs/docs — MDX config wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"tsdown": "^0.20.3",
|
|
101
101
|
"typescript": "^5.9.3",
|
|
102
102
|
"vitest": "^3.2.4",
|
|
103
|
-
"@farming-labs/docs": "0.1.
|
|
104
|
-
"@farming-labs/theme": "0.1.
|
|
103
|
+
"@farming-labs/docs": "0.1.103",
|
|
104
|
+
"@farming-labs/theme": "0.1.103"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@farming-labs/docs": ">=0.0.1",
|