@farming-labs/docs 0.2.62 → 0.2.64
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-CQTH7NFu.mjs +624 -0
- package/dist/agent-DKKptIgy.mjs +4365 -0
- package/dist/agent-evals-B7MIxuEX.mjs +2144 -0
- package/dist/agent-export-CBgWgPvH.mjs +910 -0
- package/dist/agent-scope-C_U--OZ7.mjs +283 -0
- package/dist/agent-skills-bundle.d.mts +13 -0
- package/dist/agent-skills-bundle.mjs +12 -0
- package/dist/agent-skills-server-CPja6Syt.d.mts +14 -0
- package/dist/agent-skills-server-DraIb6FV.mjs +415 -0
- package/dist/agent-skills-vite.d.mts +31 -0
- package/dist/agent-skills-vite.mjs +70 -0
- package/dist/agents-XWZBub6f.mjs +221 -0
- package/dist/analytics-Bx44lg6d.mjs +177 -0
- package/dist/cli/index.d.mts +15 -0
- package/dist/cli/index.mjs +452 -0
- package/dist/client/react.d.mts +45 -0
- package/dist/client/react.mjs +223 -0
- package/dist/cloud-analytics-CSyFE6SS.mjs +132 -0
- package/dist/cloud-ask-ai-sbpjOR2K.mjs +382 -0
- package/dist/cloud-ask-ai-zpwkdwnF.d.mts +23 -0
- package/dist/cloud-pdNC-tyj.mjs +1615 -0
- package/dist/code-blocks-DnNVNK2M.mjs +871 -0
- package/dist/codeblocks-CFuurVIH.mjs +250 -0
- package/dist/config-Wcdj-D0a.mjs +369 -0
- package/dist/dev-Cmy6DtdF.mjs +1333 -0
- package/dist/docs-cloud-server.d.mts +70 -0
- package/dist/docs-cloud-server.mjs +310 -0
- package/dist/doctor-DtGYZ41i.mjs +2036 -0
- package/dist/downgrade-w7e6Se0L.mjs +184 -0
- package/dist/errors-DbOhkE1h.mjs +20 -0
- package/dist/golden-evaluations-Dj-9Eo3v.mjs +1785 -0
- package/dist/i18n-CCaFUnAN.mjs +40 -0
- package/dist/index.d.mts +1150 -0
- package/dist/index.mjs +10 -0
- package/dist/init-CQY0Woe3.mjs +1264 -0
- package/dist/mcp-B9dcsivk.mjs +156 -0
- package/dist/mcp.d.mts +298 -0
- package/dist/mcp.mjs +4430 -0
- package/dist/metadata-DWExHQnx.mjs +237 -0
- package/dist/package-version-n5AFur8a.mjs +128 -0
- package/dist/reading-time-CYZ5VvKU.mjs +742 -0
- package/dist/review-CLoHTywU.mjs +673 -0
- package/dist/robots-BIpC4j4P.mjs +201 -0
- package/dist/robots-CUTahhoY.mjs +179 -0
- package/dist/search-B6V6qtiI.mjs +1826 -0
- package/dist/search-CaSyi6H6.d.mts +279 -0
- package/dist/search-DSjCeOk7.mjs +104 -0
- package/dist/server.d.mts +343 -0
- package/dist/server.mjs +14 -0
- package/dist/sitemap-Cykpe3Tz.mjs +249 -0
- package/dist/sitemap-server-C_6Wes83.mjs +1137 -0
- package/dist/standards-discovery-C4HUqMd2.d.mts +227 -0
- package/dist/standards-discovery-jkykaXq1.mjs +519 -0
- package/dist/templates-Bq_P7ctv.mjs +2465 -0
- package/dist/types-lMBIdZg0.d.mts +3315 -0
- package/dist/upgrade-oz-GChgt.mjs +56 -0
- package/dist/utils-DpiIioYb.mjs +225 -0
- package/package.json +1 -1
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
//#region src/agent-scope.ts
|
|
2
|
+
/** Normalize framework aliases used by page metadata, agent contracts, MCP, and evaluations. */
|
|
3
|
+
function normalizeAgentFramework(value) {
|
|
4
|
+
const normalized = value.toLowerCase().replace(/[^a-z0-9]/gu, "");
|
|
5
|
+
if ([
|
|
6
|
+
"next",
|
|
7
|
+
"nextjs",
|
|
8
|
+
"nextjsapp",
|
|
9
|
+
"reactnext"
|
|
10
|
+
].includes(normalized)) return "nextjs";
|
|
11
|
+
if ([
|
|
12
|
+
"tanstack",
|
|
13
|
+
"tanstackstart",
|
|
14
|
+
"start"
|
|
15
|
+
].includes(normalized)) return "tanstackstart";
|
|
16
|
+
if (["svelte", "sveltekit"].includes(normalized)) return "sveltekit";
|
|
17
|
+
if (["nuxt", "nuxtjs"].includes(normalized)) return "nuxt";
|
|
18
|
+
return normalized;
|
|
19
|
+
}
|
|
20
|
+
function normalizeAgentLocale(value) {
|
|
21
|
+
return value.trim().toLowerCase().replace(/_/gu, "-");
|
|
22
|
+
}
|
|
23
|
+
function normalizeAgentVersion(value) {
|
|
24
|
+
return value.trim().toLowerCase().replace(/^v(?=\d)/u, "");
|
|
25
|
+
}
|
|
26
|
+
function normalizeAgentScopeValues(value) {
|
|
27
|
+
const values = Array.isArray(value) ? value : typeof value === "string" ? [value] : [];
|
|
28
|
+
return Array.from(new Set(values.map((item) => item.trim()).filter(Boolean)));
|
|
29
|
+
}
|
|
30
|
+
function compareVersions(left, right) {
|
|
31
|
+
for (let index = 0; index < 3; index += 1) if (left[index] !== right[index]) return left[index] > right[index] ? 1 : -1;
|
|
32
|
+
return 0;
|
|
33
|
+
}
|
|
34
|
+
function parseExactVersion(value) {
|
|
35
|
+
const match = normalizeAgentVersion(value).match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-[0-9a-z.-]+)?(?:\+[0-9a-z.-]+)?$/iu);
|
|
36
|
+
if (!match) return void 0;
|
|
37
|
+
return [
|
|
38
|
+
Number(match[1]),
|
|
39
|
+
Number(match[2] ?? 0),
|
|
40
|
+
Number(match[3] ?? 0)
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
function parseVersionOperand(value) {
|
|
44
|
+
const normalized = normalizeAgentVersion(value);
|
|
45
|
+
if (normalized === "*" || normalized === "x") return {
|
|
46
|
+
version: [
|
|
47
|
+
0,
|
|
48
|
+
0,
|
|
49
|
+
0
|
|
50
|
+
],
|
|
51
|
+
components: 0,
|
|
52
|
+
wildcard: true
|
|
53
|
+
};
|
|
54
|
+
const match = normalized.match(/^(\d+)(?:\.(\d+|x|\*))?(?:\.(\d+|x|\*))?$/iu);
|
|
55
|
+
if (!match) return void 0;
|
|
56
|
+
const raw = [
|
|
57
|
+
match[1],
|
|
58
|
+
match[2],
|
|
59
|
+
match[3]
|
|
60
|
+
];
|
|
61
|
+
const wildcardIndex = raw.findIndex((part, index) => index > 0 && (part?.toLowerCase() === "x" || part === "*"));
|
|
62
|
+
if (wildcardIndex >= 0 && raw.slice(wildcardIndex + 1).some((part) => part && part.toLowerCase() !== "x" && part !== "*")) return;
|
|
63
|
+
const components = wildcardIndex >= 0 ? wildcardIndex : raw.filter(Boolean).length;
|
|
64
|
+
return {
|
|
65
|
+
version: [
|
|
66
|
+
Number(raw[0]),
|
|
67
|
+
Number(raw[1] ?? 0) || 0,
|
|
68
|
+
Number(raw[2] ?? 0) || 0
|
|
69
|
+
],
|
|
70
|
+
components,
|
|
71
|
+
wildcard: wildcardIndex >= 0
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function nextVersionBoundary(operand) {
|
|
75
|
+
const [major, minor] = operand.version;
|
|
76
|
+
if (operand.components <= 0) return void 0;
|
|
77
|
+
if (operand.components === 1) return [
|
|
78
|
+
major + 1,
|
|
79
|
+
0,
|
|
80
|
+
0
|
|
81
|
+
];
|
|
82
|
+
return [
|
|
83
|
+
major,
|
|
84
|
+
minor + 1,
|
|
85
|
+
0
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
function operandRange(operand) {
|
|
89
|
+
if (operand.components === 0) return {
|
|
90
|
+
minimumInclusive: true,
|
|
91
|
+
maximumInclusive: false
|
|
92
|
+
};
|
|
93
|
+
if (operand.components < 3 || operand.wildcard) return {
|
|
94
|
+
minimum: operand.version,
|
|
95
|
+
minimumInclusive: true,
|
|
96
|
+
maximum: nextVersionBoundary(operand),
|
|
97
|
+
maximumInclusive: false
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
minimum: operand.version,
|
|
101
|
+
minimumInclusive: true,
|
|
102
|
+
maximum: operand.version,
|
|
103
|
+
maximumInclusive: true
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function caretRange(operand) {
|
|
107
|
+
const [major, minor, patch] = operand.version;
|
|
108
|
+
let maximum;
|
|
109
|
+
if (major > 0) maximum = [
|
|
110
|
+
major + 1,
|
|
111
|
+
0,
|
|
112
|
+
0
|
|
113
|
+
];
|
|
114
|
+
else if (operand.components <= 1) maximum = [
|
|
115
|
+
1,
|
|
116
|
+
0,
|
|
117
|
+
0
|
|
118
|
+
];
|
|
119
|
+
else if (minor > 0 || operand.components === 2) maximum = [
|
|
120
|
+
0,
|
|
121
|
+
minor + 1,
|
|
122
|
+
0
|
|
123
|
+
];
|
|
124
|
+
else maximum = [
|
|
125
|
+
0,
|
|
126
|
+
0,
|
|
127
|
+
patch + 1
|
|
128
|
+
];
|
|
129
|
+
return {
|
|
130
|
+
minimum: operand.version,
|
|
131
|
+
minimumInclusive: true,
|
|
132
|
+
maximum,
|
|
133
|
+
maximumInclusive: false
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function tildeRange(operand) {
|
|
137
|
+
const [major, minor] = operand.version;
|
|
138
|
+
const maximum = operand.components <= 1 ? [
|
|
139
|
+
major + 1,
|
|
140
|
+
0,
|
|
141
|
+
0
|
|
142
|
+
] : [
|
|
143
|
+
major,
|
|
144
|
+
minor + 1,
|
|
145
|
+
0
|
|
146
|
+
];
|
|
147
|
+
return {
|
|
148
|
+
minimum: operand.version,
|
|
149
|
+
minimumInclusive: true,
|
|
150
|
+
maximum,
|
|
151
|
+
maximumInclusive: false
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function intersectRanges(left, right) {
|
|
155
|
+
let minimum = left.minimum;
|
|
156
|
+
let minimumInclusive = left.minimumInclusive;
|
|
157
|
+
if (!minimum || right.minimum && compareVersions(right.minimum, minimum) > 0) {
|
|
158
|
+
minimum = right.minimum;
|
|
159
|
+
minimumInclusive = right.minimumInclusive;
|
|
160
|
+
} else if (right.minimum && compareVersions(right.minimum, minimum) === 0) minimumInclusive = minimumInclusive && right.minimumInclusive;
|
|
161
|
+
let maximum = left.maximum;
|
|
162
|
+
let maximumInclusive = left.maximumInclusive;
|
|
163
|
+
if (!maximum || right.maximum && compareVersions(right.maximum, maximum) < 0) {
|
|
164
|
+
maximum = right.maximum;
|
|
165
|
+
maximumInclusive = right.maximumInclusive;
|
|
166
|
+
} else if (right.maximum && compareVersions(right.maximum, maximum) === 0) maximumInclusive = maximumInclusive && right.maximumInclusive;
|
|
167
|
+
if (minimum && maximum) {
|
|
168
|
+
const compared = compareVersions(minimum, maximum);
|
|
169
|
+
if (compared > 0 || compared === 0 && !(minimumInclusive && maximumInclusive)) return void 0;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
minimum,
|
|
173
|
+
minimumInclusive,
|
|
174
|
+
maximum,
|
|
175
|
+
maximumInclusive
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function comparatorRange(operator, operand) {
|
|
179
|
+
if (!operator || operator === "=") return operandRange(operand);
|
|
180
|
+
if (operator === ">=") return {
|
|
181
|
+
minimum: operand.version,
|
|
182
|
+
minimumInclusive: true,
|
|
183
|
+
maximumInclusive: false
|
|
184
|
+
};
|
|
185
|
+
if (operator === ">") {
|
|
186
|
+
const partialBoundary = operand.components < 3 ? nextVersionBoundary(operand) : void 0;
|
|
187
|
+
return {
|
|
188
|
+
minimum: partialBoundary ?? operand.version,
|
|
189
|
+
minimumInclusive: Boolean(partialBoundary),
|
|
190
|
+
maximumInclusive: false
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if (operator === "<") return {
|
|
194
|
+
minimumInclusive: true,
|
|
195
|
+
maximum: operand.version,
|
|
196
|
+
maximumInclusive: false
|
|
197
|
+
};
|
|
198
|
+
const partialBoundary = operand.components < 3 ? nextVersionBoundary(operand) : void 0;
|
|
199
|
+
return {
|
|
200
|
+
minimumInclusive: true,
|
|
201
|
+
maximum: partialBoundary ?? operand.version,
|
|
202
|
+
maximumInclusive: !partialBoundary
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function parseVersionRangeBranch(value) {
|
|
206
|
+
const branch = normalizeAgentVersion(value).trim();
|
|
207
|
+
if (!branch) return void 0;
|
|
208
|
+
const hyphen = branch.match(/^(.+?)\s+-\s+(.+)$/u);
|
|
209
|
+
if (hyphen) {
|
|
210
|
+
const minimumOperand = parseVersionOperand(hyphen[1]);
|
|
211
|
+
const maximumOperand = parseVersionOperand(hyphen[2]);
|
|
212
|
+
if (!minimumOperand || !maximumOperand) return void 0;
|
|
213
|
+
const maximumBoundary = maximumOperand.components < 3 ? nextVersionBoundary(maximumOperand) : maximumOperand.version;
|
|
214
|
+
return intersectRanges({
|
|
215
|
+
minimum: minimumOperand.version,
|
|
216
|
+
minimumInclusive: true,
|
|
217
|
+
maximumInclusive: false
|
|
218
|
+
}, {
|
|
219
|
+
minimumInclusive: true,
|
|
220
|
+
maximum: maximumBoundary,
|
|
221
|
+
maximumInclusive: maximumOperand.components === 3
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
const special = branch.match(/^(\^|~)\s*(.+)$/u);
|
|
225
|
+
if (special) {
|
|
226
|
+
const operand = parseVersionOperand(special[2]);
|
|
227
|
+
if (!operand || operand.components === 0) return void 0;
|
|
228
|
+
return special[1] === "^" ? caretRange(operand) : tildeRange(operand);
|
|
229
|
+
}
|
|
230
|
+
const comparators = Array.from(branch.matchAll(/(>=|<=|>|<|=)\s*([^\s]+)/gu));
|
|
231
|
+
if (comparators.length > 0) {
|
|
232
|
+
if (comparators.map((match) => match[0]).join(" ").replace(/\s+/gu, " ") !== branch.replace(/\s+/gu, " ")) return void 0;
|
|
233
|
+
let range = {
|
|
234
|
+
minimumInclusive: true,
|
|
235
|
+
maximumInclusive: false
|
|
236
|
+
};
|
|
237
|
+
for (const comparator of comparators) {
|
|
238
|
+
const operand = parseVersionOperand(comparator[2]);
|
|
239
|
+
if (!operand) return void 0;
|
|
240
|
+
const next = intersectRanges(range, comparatorRange(comparator[1], operand));
|
|
241
|
+
if (!next) return void 0;
|
|
242
|
+
range = next;
|
|
243
|
+
}
|
|
244
|
+
return range;
|
|
245
|
+
}
|
|
246
|
+
const operand = parseVersionOperand(branch);
|
|
247
|
+
return operand ? operandRange(operand) : void 0;
|
|
248
|
+
}
|
|
249
|
+
function parseVersionRanges(value) {
|
|
250
|
+
return normalizeAgentVersion(value).split("||").map((branch) => parseVersionRangeBranch(branch)).filter((range) => Boolean(range));
|
|
251
|
+
}
|
|
252
|
+
function rangeContains(range, version) {
|
|
253
|
+
if (range.minimum) {
|
|
254
|
+
const compared = compareVersions(version, range.minimum);
|
|
255
|
+
if (compared < 0 || compared === 0 && !range.minimumInclusive) return false;
|
|
256
|
+
}
|
|
257
|
+
if (range.maximum) {
|
|
258
|
+
const compared = compareVersions(version, range.maximum);
|
|
259
|
+
if (compared > 0 || compared === 0 && !range.maximumInclusive) return false;
|
|
260
|
+
}
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
function rangesOverlap(left, right) {
|
|
264
|
+
return Boolean(intersectRanges(left, right));
|
|
265
|
+
}
|
|
266
|
+
/** Match an exact requested version against an exact or range-like documented constraint. */
|
|
267
|
+
function agentVersionConstraintMatches(requested, constraint) {
|
|
268
|
+
if (normalizeAgentVersion(requested) === normalizeAgentVersion(constraint)) return Boolean(normalizeAgentVersion(requested));
|
|
269
|
+
const wanted = parseExactVersion(requested);
|
|
270
|
+
if (!wanted) return false;
|
|
271
|
+
return parseVersionRanges(constraint).some((range) => rangeContains(range, wanted));
|
|
272
|
+
}
|
|
273
|
+
/** Return true when two exact or range-like documented version constraints can select one version. */
|
|
274
|
+
function agentVersionConstraintsOverlap(left, right) {
|
|
275
|
+
const normalizedLeft = normalizeAgentVersion(left);
|
|
276
|
+
if (normalizedLeft === normalizeAgentVersion(right)) return Boolean(normalizedLeft);
|
|
277
|
+
const leftRanges = parseVersionRanges(left);
|
|
278
|
+
const rightRanges = parseVersionRanges(right);
|
|
279
|
+
return leftRanges.some((leftRange) => rightRanges.some((rightRange) => rangesOverlap(leftRange, rightRange)));
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
//#endregion
|
|
283
|
+
export { normalizeAgentScopeValues as a, normalizeAgentLocale as i, agentVersionConstraintsOverlap as n, normalizeAgentVersion as o, normalizeAgentFramework as r, agentVersionConstraintMatches as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { A as DocsPublishedAgentSkill } from "./standards-discovery-C4HUqMd2.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/agent-skills-bundle.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Build-time snapshot of configured Agent Skills.
|
|
6
|
+
*
|
|
7
|
+
* `docsAgentSkills()` replaces this module in production bundles. The undefined
|
|
8
|
+
* fallback keeps direct Node usage and development setups on the filesystem
|
|
9
|
+
* resolver when the build plugin is not installed.
|
|
10
|
+
*/
|
|
11
|
+
declare const bundledAgentSkills: readonly DocsPublishedAgentSkill[] | undefined;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { bundledAgentSkills };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/agent-skills-bundle.ts
|
|
2
|
+
/**
|
|
3
|
+
* Build-time snapshot of configured Agent Skills.
|
|
4
|
+
*
|
|
5
|
+
* `docsAgentSkills()` replaces this module in production bundles. The undefined
|
|
6
|
+
* fallback keeps direct Node usage and development setups on the filesystem
|
|
7
|
+
* resolver when the build plugin is not installed.
|
|
8
|
+
*/
|
|
9
|
+
const bundledAgentSkills = void 0;
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { bundledAgentSkills };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { A as DocsPublishedAgentSkill } from "./standards-discovery-C4HUqMd2.mjs";
|
|
2
|
+
import { P as DocsAgentSkillsInput } from "./types-lMBIdZg0.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/agent-skills-server.d.ts
|
|
5
|
+
interface ResolveConfiguredAgentSkillsOptions {
|
|
6
|
+
rootDir?: string;
|
|
7
|
+
workspaceRoot?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Resolve and safely package all project skills configured through `agent.skills` synchronously. */
|
|
10
|
+
declare function resolveConfiguredAgentSkillsSync(input: DocsAgentSkillsInput | undefined, options?: ResolveConfiguredAgentSkillsOptions): DocsPublishedAgentSkill[];
|
|
11
|
+
/** Resolve and package configured skills without blocking runtime filesystem or compression work. */
|
|
12
|
+
declare function resolveConfiguredAgentSkills(input: DocsAgentSkillsInput | undefined, options?: ResolveConfiguredAgentSkillsOptions): Promise<DocsPublishedAgentSkill[]>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { resolveConfiguredAgentSkills as n, resolveConfiguredAgentSkillsSync as r, ResolveConfiguredAgentSkillsOptions as t };
|