@farming-labs/docs 0.1.20 → 0.1.22

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as ThemeToggleConfig, A as DocsTheme, B as OpenGraphImage, C as DocsSearchConfig, D as DocsSearchResult, E as DocsSearchQuery, F as LlmsTxtConfig, G as PageTwitter, H as PageActionsConfig, I as McpDocsSearchConfig, J as SidebarFolderNode, K as SidebarComponentProps, L as OGConfig, M as FontStyle, N as GithubConfig, O as DocsSearchResultType, P as LastUpdatedConfig, Q as SimpleDocsSearchConfig, R as OpenDocsConfig, S as DocsSearchChunkingConfig, T as DocsSearchEmbeddingsConfig, U as PageFrontmatter, V as OrderingItem, W as PageOpenGraph, X as SidebarPageNode, Y as SidebarNode, Z as SidebarTree, _ as DocsMetadata, a as BreadcrumbConfig, b as DocsSearchAdapterContext, c as CodeBlockCopyData, d as DocsConfig, et as TypesenseDocsSearchConfig, f as DocsFeedbackData, g as DocsMcpToolsConfig, h as DocsMcpConfig, i as ApiReferenceRenderer, j as FeedbackConfig, k as DocsSearchSourcePage, l as CopyMarkdownConfig, m as DocsI18nConfig, n as AlgoliaDocsSearchConfig, nt as UIConfig, o as ChangelogConfig, p as DocsFeedbackValue, q as SidebarConfig, r as ApiReferenceConfig, s as ChangelogFrontmatter, t as AIConfig, tt as TypographyConfig, u as CustomDocsSearchConfig, v as DocsNav, w as DocsSearchDocument, x as DocsSearchAdapterFactory, y as DocsSearchAdapter, z as OpenDocsProvider } from "./types-Du01bck0.mjs";
2
- import { a as createSimpleSearchAdapter, c as resolveSearchRequestConfig, i as createMcpSearchAdapter, n as createAlgoliaSearchAdapter, o as createTypesenseSearchAdapter, r as createCustomSearchAdapter, s as performDocsSearch, t as buildDocsSearchDocuments } from "./search-CzTO1EMx.mjs";
1
+ import { $ as SidebarPageNode, A as DocsSearchResult, B as OGConfig, C as DocsSearchAdapterContext, D as DocsSearchDocument, E as DocsSearchConfig, F as FontStyle, G as PageActionsConfig, H as OpenDocsProvider, I as GithubConfig, J as PageTwitter, K as PageFrontmatter, L as LastUpdatedConfig, M as DocsSearchSourcePage, N as DocsTheme, O as DocsSearchEmbeddingsConfig, P as FeedbackConfig, Q as SidebarNode, R as LlmsTxtConfig, S as DocsSearchAdapter, T as DocsSearchChunkingConfig, U as OpenGraphImage, V as OpenDocsConfig, W as OrderingItem, X as SidebarConfig, Y as SidebarComponentProps, Z as SidebarFolderNode, _ as DocsI18nConfig, a as ApiReferenceRenderer, at as UIConfig, b as DocsMetadata, c as ChangelogFrontmatter, d as CustomDocsSearchConfig, et as SidebarTree, f as DocsAgentFeedbackContext, g as DocsFeedbackValue, h as DocsFeedbackData, i as ApiReferenceConfig, it as TypographyConfig, j as DocsSearchResultType, k as DocsSearchQuery, l as CodeBlockCopyData, m as DocsConfig, n as AgentFeedbackConfig, nt as ThemeToggleConfig, o as BreadcrumbConfig, p as DocsAgentFeedbackData, q as PageOpenGraph, r as AlgoliaDocsSearchConfig, rt as TypesenseDocsSearchConfig, s as ChangelogConfig, t as AIConfig, tt as SimpleDocsSearchConfig, u as CopyMarkdownConfig, v as DocsMcpConfig, w as DocsSearchAdapterFactory, x as DocsNav, y as DocsMcpToolsConfig, z as McpDocsSearchConfig } from "./types-PtqFsv4_.mjs";
2
+ import { a as createSimpleSearchAdapter, c as resolveSearchRequestConfig, i as createMcpSearchAdapter, n as createAlgoliaSearchAdapter, o as createTypesenseSearchAdapter, r as createCustomSearchAdapter, s as performDocsSearch, t as buildDocsSearchDocuments } from "./search-BHH5dMjh.mjs";
3
3
 
4
4
  //#region src/define-docs.d.ts
5
5
  /**
@@ -115,4 +115,4 @@ declare function buildPageOpenGraph(page: Pick<PageFrontmatter, "title" | "descr
115
115
  */
116
116
  declare function buildPageTwitter(page: Pick<PageFrontmatter, "title" | "description" | "ogImage" | "openGraph" | "twitter">, ogConfig?: OGConfig, baseUrl?: string): PageTwitter | undefined;
117
117
  //#endregion
118
- export { type AIConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsPathMatch, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsTheme, type FeedbackConfig, type FontStyle, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageTwitter, type ResolvedChangelogConfig, type ResolvedDocsI18n, type SidebarComponentProps, type SidebarConfig, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, buildDocsSearchDocuments, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, extendTheme, performDocsSearch, resolveChangelogConfig, resolveDocsI18n, resolveDocsLocale, resolveDocsPath, resolveOGImage, resolveSearchRequestConfig, resolveTitle };
118
+ export { type AIConfig, type AgentFeedbackConfig, type AlgoliaDocsSearchConfig, type ApiReferenceConfig, type ApiReferenceRenderer, type BreadcrumbConfig, type ChangelogConfig, type ChangelogEntrySummary, type ChangelogFrontmatter, type CodeBlockCopyData, type CopyMarkdownConfig, type CustomDocsSearchConfig, type DocsAgentFeedbackContext, type DocsAgentFeedbackData, type DocsConfig, type DocsFeedbackData, type DocsFeedbackValue, type DocsI18nConfig, type DocsMcpConfig, type DocsMcpToolsConfig, type DocsMetadata, type DocsNav, type DocsPathMatch, type DocsSearchAdapter, type DocsSearchAdapterContext, type DocsSearchAdapterFactory, type DocsSearchChunkingConfig, type DocsSearchConfig, type DocsSearchDocument, type DocsSearchEmbeddingsConfig, type DocsSearchQuery, type DocsSearchResult, type DocsSearchResultType, type DocsSearchSourcePage, type DocsTheme, type FeedbackConfig, type FontStyle, type GithubConfig, type LastUpdatedConfig, type LlmsTxtConfig, type McpDocsSearchConfig, type OGConfig, type OpenDocsConfig, type OpenDocsProvider, type OpenGraphImage, type OrderingItem, type PageActionsConfig, type PageFrontmatter, type PageOpenGraph, type PageTwitter, type ResolvedChangelogConfig, type ResolvedDocsI18n, type SidebarComponentProps, type SidebarConfig, type SidebarFolderNode, type SidebarNode, type SidebarPageNode, type SidebarTree, type SimpleDocsSearchConfig, type ThemeToggleConfig, type TypesenseDocsSearchConfig, type TypographyConfig, type UIConfig, buildDocsSearchDocuments, buildPageOpenGraph, buildPageTwitter, createAlgoliaSearchAdapter, createCustomSearchAdapter, createMcpSearchAdapter, createSimpleSearchAdapter, createTheme, createTypesenseSearchAdapter, deepMerge, defineDocs, extendTheme, performDocsSearch, resolveChangelogConfig, resolveDocsI18n, resolveDocsLocale, resolveDocsPath, resolveOGImage, resolveSearchRequestConfig, resolveTitle };
package/dist/mcp.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as DocsSearchConfig, V as OrderingItem, h as DocsMcpConfig } from "./types-Du01bck0.mjs";
1
+ import { E as DocsSearchConfig, W as OrderingItem, v as DocsMcpConfig } from "./types-PtqFsv4_.mjs";
2
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
3
 
4
4
  //#region src/mcp.d.ts
@@ -1,4 +1,4 @@
1
- import { C as DocsSearchConfig, D as DocsSearchResult, I as McpDocsSearchConfig, S as DocsSearchChunkingConfig, et as TypesenseDocsSearchConfig, k as DocsSearchSourcePage, n as AlgoliaDocsSearchConfig, u as CustomDocsSearchConfig, w as DocsSearchDocument, x as DocsSearchAdapterFactory, y as DocsSearchAdapter } from "./types-Du01bck0.mjs";
1
+ import { A as DocsSearchResult, D as DocsSearchDocument, E as DocsSearchConfig, M as DocsSearchSourcePage, S as DocsSearchAdapter, T as DocsSearchChunkingConfig, d as CustomDocsSearchConfig, r as AlgoliaDocsSearchConfig, rt as TypesenseDocsSearchConfig, w as DocsSearchAdapterFactory, z as McpDocsSearchConfig } from "./types-PtqFsv4_.mjs";
2
2
 
3
3
  //#region src/search.d.ts
4
4
  declare function buildDocsSearchDocuments(pages: DocsSearchSourcePage[], chunking?: DocsSearchChunkingConfig): DocsSearchDocument[];
package/dist/server.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as DocsSearchConfig, D as DocsSearchResult, E as DocsSearchQuery, I as McpDocsSearchConfig, b as DocsSearchAdapterContext, d as DocsConfig, i as ApiReferenceRenderer, k as DocsSearchSourcePage, w as DocsSearchDocument, x as DocsSearchAdapterFactory, y as DocsSearchAdapter } from "./types-Du01bck0.mjs";
2
- import { a as createSimpleSearchAdapter, c as resolveSearchRequestConfig, i as createMcpSearchAdapter, n as createAlgoliaSearchAdapter, o as createTypesenseSearchAdapter, r as createCustomSearchAdapter, s as performDocsSearch, t as buildDocsSearchDocuments } from "./search-CzTO1EMx.mjs";
1
+ import { A as DocsSearchResult, C as DocsSearchAdapterContext, D as DocsSearchDocument, E as DocsSearchConfig, M as DocsSearchSourcePage, S as DocsSearchAdapter, a as ApiReferenceRenderer, k as DocsSearchQuery, m as DocsConfig, w as DocsSearchAdapterFactory, z as McpDocsSearchConfig } from "./types-PtqFsv4_.mjs";
2
+ import { a as createSimpleSearchAdapter, c as resolveSearchRequestConfig, i as createMcpSearchAdapter, n as createAlgoliaSearchAdapter, o as createTypesenseSearchAdapter, r as createCustomSearchAdapter, s as performDocsSearch, t as buildDocsSearchDocuments } from "./search-BHH5dMjh.mjs";
3
3
  import { DocsMcpHttpHandlers, DocsMcpNavigationNode, DocsMcpNavigationTree, DocsMcpPage, DocsMcpResolvedConfig, DocsMcpSource, createDocsMcpHttpHandler, createDocsMcpServer, createFilesystemDocsMcpSource, normalizeDocsMcpRoute, resolveDocsMcpConfig, runDocsMcpStdio } from "./mcp.mjs";
4
4
 
5
5
  //#region src/api-reference.d.ts
@@ -1212,6 +1212,69 @@ interface DocsFeedbackData {
1212
1212
  /** Active locale, when docs i18n is enabled. */
1213
1213
  locale?: string;
1214
1214
  }
1215
+ /**
1216
+ * Page and transport context supplied alongside agent feedback payloads.
1217
+ *
1218
+ * The `payload` itself is customizable through `feedback.agent.schema`; this
1219
+ * context object keeps a small stable envelope for route-aware metadata.
1220
+ */
1221
+ interface DocsAgentFeedbackContext {
1222
+ /** Docs page path, e.g. `"/docs/installation"`. */
1223
+ page?: string;
1224
+ /** Full docs URL, when the caller has one available. */
1225
+ url?: string;
1226
+ /** Docs slug relative to the entry root, e.g. `"installation"`. */
1227
+ slug?: string;
1228
+ /** Active locale when docs i18n is enabled. */
1229
+ locale?: string;
1230
+ /** Arbitrary source label such as `"md-route"`, `"mcp"`, or `"api"`. */
1231
+ source?: string;
1232
+ }
1233
+ /**
1234
+ * Data passed to `feedback.agent.onFeedback`.
1235
+ *
1236
+ * The request body always follows the stable `{ context?, payload }` envelope
1237
+ * while `payload` stays schema-driven so projects can add or remove agent
1238
+ * fields without changing the callback contract.
1239
+ */
1240
+ interface DocsAgentFeedbackData {
1241
+ /** Optional docs/page context associated with the agent feedback. */
1242
+ context?: DocsAgentFeedbackContext;
1243
+ /** Arbitrary payload validated by the configured agent feedback schema. */
1244
+ payload: Record<string, unknown>;
1245
+ }
1246
+ /**
1247
+ * Agent feedback endpoint configuration served through the shared `/api/docs`
1248
+ * route wrapper.
1249
+ */
1250
+ interface AgentFeedbackConfig {
1251
+ /** Enable the agent feedback endpoints. Defaults to `true` when provided. */
1252
+ enabled?: boolean;
1253
+ /**
1254
+ * Public HTTP route for posting agent feedback.
1255
+ * @default "/api/docs/agent/feedback"
1256
+ */
1257
+ route?: string;
1258
+ /**
1259
+ * Public HTTP route for the machine-readable schema describing the agent
1260
+ * feedback payload.
1261
+ *
1262
+ * Defaults to `${route}/schema`.
1263
+ */
1264
+ schemaRoute?: string;
1265
+ /**
1266
+ * JSON Schema object describing the `payload` field of the request body.
1267
+ *
1268
+ * The shared docs API wraps this under a stable top-level envelope:
1269
+ * `{ context?: DocsAgentFeedbackContext, payload: <schema> }`.
1270
+ */
1271
+ schema?: Record<string, unknown>;
1272
+ /**
1273
+ * Async callback fired when the agent feedback endpoint receives a valid
1274
+ * `{ context?, payload }` body.
1275
+ */
1276
+ onFeedback?: (data: DocsAgentFeedbackData) => void | Promise<void>;
1277
+ }
1215
1278
  /**
1216
1279
  * Built-in page feedback configuration.
1217
1280
  *
@@ -1241,6 +1304,14 @@ interface FeedbackConfig {
1241
1304
  * `fd:feedback` custom event.
1242
1305
  */
1243
1306
  onFeedback?: (data: DocsFeedbackData) => void | Promise<void>;
1307
+ /**
1308
+ * Machine-oriented feedback endpoints exposed through the shared `/api/docs`
1309
+ * route when configured.
1310
+ *
1311
+ * This does not enable the human page feedback UI by itself. To show the
1312
+ * built-in footer prompt, keep using `feedback: true` or `feedback.enabled`.
1313
+ */
1314
+ agent?: boolean | AgentFeedbackConfig;
1244
1315
  }
1245
1316
  interface DocsI18nConfig {
1246
1317
  /** Supported locale identifiers (e.g. ["en", "fr"]). */
@@ -1740,4 +1811,4 @@ interface DocsConfig {
1740
1811
  og?: OGConfig;
1741
1812
  }
1742
1813
  //#endregion
1743
- export { ThemeToggleConfig as $, DocsTheme as A, OpenGraphImage as B, DocsSearchConfig as C, DocsSearchResult as D, DocsSearchQuery as E, LlmsTxtConfig as F, PageTwitter as G, PageActionsConfig as H, McpDocsSearchConfig as I, SidebarFolderNode as J, SidebarComponentProps as K, OGConfig as L, FontStyle as M, GithubConfig as N, DocsSearchResultType as O, LastUpdatedConfig as P, SimpleDocsSearchConfig as Q, OpenDocsConfig as R, DocsSearchChunkingConfig as S, DocsSearchEmbeddingsConfig as T, PageFrontmatter as U, OrderingItem as V, PageOpenGraph as W, SidebarPageNode as X, SidebarNode as Y, SidebarTree as Z, DocsMetadata as _, BreadcrumbConfig as a, DocsSearchAdapterContext as b, CodeBlockCopyData as c, DocsConfig as d, TypesenseDocsSearchConfig as et, DocsFeedbackData as f, DocsMcpToolsConfig as g, DocsMcpConfig as h, ApiReferenceRenderer as i, FeedbackConfig as j, DocsSearchSourcePage as k, CopyMarkdownConfig as l, DocsI18nConfig as m, AlgoliaDocsSearchConfig as n, UIConfig as nt, ChangelogConfig as o, DocsFeedbackValue as p, SidebarConfig as q, ApiReferenceConfig as r, ChangelogFrontmatter as s, AIConfig as t, TypographyConfig as tt, CustomDocsSearchConfig as u, DocsNav as v, DocsSearchDocument as w, DocsSearchAdapterFactory as x, DocsSearchAdapter as y, OpenDocsProvider as z };
1814
+ export { SidebarPageNode as $, DocsSearchResult as A, OGConfig as B, DocsSearchAdapterContext as C, DocsSearchDocument as D, DocsSearchConfig as E, FontStyle as F, PageActionsConfig as G, OpenDocsProvider as H, GithubConfig as I, PageTwitter as J, PageFrontmatter as K, LastUpdatedConfig as L, DocsSearchSourcePage as M, DocsTheme as N, DocsSearchEmbeddingsConfig as O, FeedbackConfig as P, SidebarNode as Q, LlmsTxtConfig as R, DocsSearchAdapter as S, DocsSearchChunkingConfig as T, OpenGraphImage as U, OpenDocsConfig as V, OrderingItem as W, SidebarConfig as X, SidebarComponentProps as Y, SidebarFolderNode as Z, DocsI18nConfig as _, ApiReferenceRenderer as a, UIConfig as at, DocsMetadata as b, ChangelogFrontmatter as c, CustomDocsSearchConfig as d, SidebarTree as et, DocsAgentFeedbackContext as f, DocsFeedbackValue as g, DocsFeedbackData as h, ApiReferenceConfig as i, TypographyConfig as it, DocsSearchResultType as j, DocsSearchQuery as k, CodeBlockCopyData as l, DocsConfig as m, AgentFeedbackConfig as n, ThemeToggleConfig as nt, BreadcrumbConfig as o, DocsAgentFeedbackData as p, PageOpenGraph as q, AlgoliaDocsSearchConfig as r, TypesenseDocsSearchConfig as rt, ChangelogConfig as s, AIConfig as t, SimpleDocsSearchConfig as tt, CopyMarkdownConfig as u, DocsMcpConfig as v, DocsSearchAdapterFactory as w, DocsNav as x, DocsMcpToolsConfig as y, McpDocsSearchConfig as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farming-labs/docs",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Modern, flexible MDX-based docs framework — core types, config, and CLI",
5
5
  "keywords": [
6
6
  "docs",