@farming-labs/docs 0.1.1-beta.2 → 0.1.1
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/api-reference-wh4_pwG8.mjs +802 -0
- package/dist/cli/index.d.mts +8 -1
- package/dist/cli/index.mjs +117 -8
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -0
- package/dist/mcp.d.mts +86 -0
- package/dist/mcp.mjs +485 -0
- package/dist/server.d.mts +3 -2
- package/dist/server.mjs +3 -801
- package/dist/{types-DpijZMth.d.mts → types-Bd3kyFF1.d.mts} +52 -1
- package/package.json +10 -3
|
@@ -571,6 +571,49 @@ interface LlmsTxtConfig {
|
|
|
571
571
|
*/
|
|
572
572
|
siteDescription?: string;
|
|
573
573
|
}
|
|
574
|
+
/**
|
|
575
|
+
* Tool-level toggles for the built-in MCP server.
|
|
576
|
+
*
|
|
577
|
+
* All tools default to `true` when omitted.
|
|
578
|
+
*/
|
|
579
|
+
interface DocsMcpToolsConfig {
|
|
580
|
+
/** Expose a `list_pages` tool that returns the known docs pages. */
|
|
581
|
+
listPages?: boolean;
|
|
582
|
+
/** Expose a `read_page` tool that returns a page by slug or URL path. */
|
|
583
|
+
readPage?: boolean;
|
|
584
|
+
/** Expose a `search_docs` tool for keyword search over page content. */
|
|
585
|
+
searchDocs?: boolean;
|
|
586
|
+
/** Expose a `get_navigation` tool for the docs tree. */
|
|
587
|
+
getNavigation?: boolean;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* Built-in MCP server configuration.
|
|
591
|
+
*
|
|
592
|
+
* When enabled, adapters can expose a Streamable HTTP endpoint for your docs
|
|
593
|
+
* at `/api/docs/mcp` by default. The same config is also reused by the local
|
|
594
|
+
* `docs mcp` stdio command.
|
|
595
|
+
*/
|
|
596
|
+
interface DocsMcpConfig {
|
|
597
|
+
/** Whether to enable the built-in MCP server. Defaults to `true` when this object is provided. */
|
|
598
|
+
enabled?: boolean;
|
|
599
|
+
/**
|
|
600
|
+
* Streamable HTTP route for the MCP endpoint.
|
|
601
|
+
* Defaults to `/api/docs/mcp`.
|
|
602
|
+
*/
|
|
603
|
+
route?: string;
|
|
604
|
+
/**
|
|
605
|
+
* Human-readable MCP server name shown to clients.
|
|
606
|
+
* Defaults to the string `nav.title` when available, otherwise `@farming-labs/docs`.
|
|
607
|
+
*/
|
|
608
|
+
name?: string;
|
|
609
|
+
/**
|
|
610
|
+
* Version string reported by the MCP server.
|
|
611
|
+
* Defaults to `"0.0.0"` when not set.
|
|
612
|
+
*/
|
|
613
|
+
version?: string;
|
|
614
|
+
/** Fine-grained tool toggles. Omitted tools stay enabled. */
|
|
615
|
+
tools?: DocsMcpToolsConfig;
|
|
616
|
+
}
|
|
574
617
|
interface LastUpdatedConfig {
|
|
575
618
|
/**
|
|
576
619
|
* Whether to show the "Last updated" date.
|
|
@@ -1253,6 +1296,14 @@ interface DocsConfig {
|
|
|
1253
1296
|
* ```
|
|
1254
1297
|
*/
|
|
1255
1298
|
feedback?: boolean | FeedbackConfig;
|
|
1299
|
+
/**
|
|
1300
|
+
* Built-in MCP server for agent/assistant access to your docs content.
|
|
1301
|
+
*
|
|
1302
|
+
* - `true` → enable the default MCP surface at `/api/docs/mcp`
|
|
1303
|
+
* - `{ route: "/api/docs/mcp" }` → enable with explicit route/config
|
|
1304
|
+
* - `false` or omitted → MCP stays disabled
|
|
1305
|
+
*/
|
|
1306
|
+
mcp?: boolean | DocsMcpConfig;
|
|
1256
1307
|
/**
|
|
1257
1308
|
* Icon registry for sidebar items.
|
|
1258
1309
|
*
|
|
@@ -1430,4 +1481,4 @@ interface DocsConfig {
|
|
|
1430
1481
|
og?: OGConfig;
|
|
1431
1482
|
}
|
|
1432
1483
|
//#endregion
|
|
1433
|
-
export {
|
|
1484
|
+
export { SidebarConfig as A, OpenGraphImage as C, PageOpenGraph as D, PageFrontmatter as E, ThemeToggleConfig as F, TypographyConfig as I, UIConfig as L, SidebarNode as M, SidebarPageNode as N, PageTwitter as O, SidebarTree as P, OpenDocsProvider as S, PageActionsConfig as T, GithubConfig as _, CopyMarkdownConfig as a, OGConfig as b, DocsFeedbackValue as c, DocsMcpToolsConfig as d, DocsMetadata as f, FontStyle as g, FeedbackConfig as h, CodeBlockCopyData as i, SidebarFolderNode as j, SidebarComponentProps as k, DocsI18nConfig as l, DocsTheme as m, ApiReferenceConfig as n, DocsConfig as o, DocsNav as p, BreadcrumbConfig as r, DocsFeedbackData as s, AIConfig as t, DocsMcpConfig as u, LastUpdatedConfig as v, OrderingItem as w, OpenDocsConfig as x, LlmsTxtConfig as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/docs",
|
|
3
|
-
"version": "0.1.1
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -29,13 +29,20 @@
|
|
|
29
29
|
"types": "./dist/server.d.mts",
|
|
30
30
|
"import": "./dist/server.mjs",
|
|
31
31
|
"default": "./dist/server.mjs"
|
|
32
|
+
},
|
|
33
|
+
"./mcp": {
|
|
34
|
+
"types": "./dist/mcp.d.mts",
|
|
35
|
+
"import": "./dist/mcp.mjs",
|
|
36
|
+
"default": "./dist/mcp.mjs"
|
|
32
37
|
}
|
|
33
38
|
},
|
|
34
39
|
"dependencies": {
|
|
35
|
-
"@scalar/core": "^0.4.3",
|
|
36
40
|
"@clack/prompts": "^0.9.1",
|
|
41
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
42
|
+
"@scalar/core": "^0.4.3",
|
|
37
43
|
"gray-matter": "^4.0.3",
|
|
38
|
-
"picocolors": "^1.1.1"
|
|
44
|
+
"picocolors": "^1.1.1",
|
|
45
|
+
"zod": "^3.25.76"
|
|
39
46
|
},
|
|
40
47
|
"devDependencies": {
|
|
41
48
|
"@types/node": "^22.10.0",
|