@farm.js/core 0.1.63 → 0.1.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.
Files changed (186) hide show
  1. package/dist/{agent-mcp-handler-OV4WRFBL.cjs → agent-mcp-handler-OXT73ZBY.cjs} +5 -5
  2. package/dist/{agent-mcp-handler-7QMX2LUY.mjs → agent-mcp-handler-QLFDDTYN.mjs} +4 -4
  3. package/dist/{agent-mcp.d-CCQ-wKwg.d.mts → agent-mcp.d-CO_ABmNK.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-DOJCBSh9.d.ts → agent-mcp.d-QD2WZ9BS.d.ts} +1 -1
  5. package/dist/agent-runtime.d.mts +1 -1
  6. package/dist/agent-runtime.d.ts +1 -1
  7. package/dist/analyzer-ODLF2Z6O.cjs +16 -0
  8. package/dist/{analyzer-WNPQPWFR.mjs → analyzer-Q3QXC6PD.mjs} +3 -2
  9. package/dist/api/route-manager.d.mts +3 -3
  10. package/dist/api/route-manager.d.ts +3 -3
  11. package/dist/api/runtime.d.mts +2 -2
  12. package/dist/api/runtime.d.ts +2 -2
  13. package/dist/api.d.mts +3 -3
  14. package/dist/api.d.ts +3 -3
  15. package/dist/{app-manifest.d-BaA0omsv.d.mts → app-manifest.d-BpKxiU_E.d.mts} +1 -1
  16. package/dist/{app-manifest.d-poayV4lq.d.ts → app-manifest.d-DDmNkYQQ.d.ts} +1 -1
  17. package/dist/app-markdown.cjs +4 -4
  18. package/dist/app-markdown.d.mts +2 -2
  19. package/dist/app-markdown.d.ts +2 -2
  20. package/dist/app-markdown.mjs +3 -3
  21. package/dist/{app.d-DdWxeIGU.d.mts → app.d-kuoVWhWM.d.mts} +4 -4
  22. package/dist/{app.d-D4Dn03E3.d.ts → app.d-x68Cwr0_.d.ts} +4 -4
  23. package/dist/{chunk-LT4VAF5Z.cjs → chunk-2C5L5RPM.cjs} +7 -6
  24. package/dist/{chunk-PVJX4UPA.cjs → chunk-3EBHJET2.cjs} +103 -98
  25. package/dist/{chunk-4DIKLG56.mjs → chunk-6NHSGVVA.mjs} +1 -1
  26. package/dist/{chunk-S2NUYHRY.mjs → chunk-6NNYPY5W.mjs} +327 -13
  27. package/dist/{chunk-PRFNLQSP.cjs → chunk-7XGWBPQQ.cjs} +4 -4
  28. package/dist/{chunk-U6WCUVSV.cjs → chunk-DUSHDZQL.cjs} +9 -9
  29. package/dist/{chunk-GVOMPU3Y.cjs → chunk-EL4364S2.cjs} +209 -32
  30. package/dist/{chunk-QN5WRQSQ.cjs → chunk-FAP7CX7C.cjs} +101 -101
  31. package/dist/{chunk-GPKBUME5.mjs → chunk-FH45OB37.mjs} +2 -2
  32. package/dist/{chunk-55U5QIXQ.mjs → chunk-FIR62CR3.mjs} +1 -1
  33. package/dist/{chunk-MEQN6DDA.cjs → chunk-FJWN7RV4.cjs} +5 -5
  34. package/dist/chunk-IOEXXZK3.mjs +88 -0
  35. package/dist/{chunk-Z74NNER4.cjs → chunk-JCPSA4X5.cjs} +135 -134
  36. package/dist/{chunk-YSXTNSXS.mjs → chunk-K7OZAVOI.mjs} +7 -6
  37. package/dist/{chunk-KVW2M6PI.mjs → chunk-KL7SHLQB.mjs} +1 -1
  38. package/dist/{chunk-RFYL5OLP.mjs → chunk-LQDLEWPO.mjs} +1 -1
  39. package/dist/{chunk-UZZ6IEQP.mjs → chunk-MESQF2JC.mjs} +2 -2
  40. package/dist/{chunk-5L7I6AMY.cjs → chunk-MG356ROI.cjs} +5 -5
  41. package/dist/{chunk-Y2YBNQ3D.cjs → chunk-N3Z3PLHC.cjs} +2 -2
  42. package/dist/{chunk-XICXQXYE.mjs → chunk-NNLFW3P4.mjs} +2 -2
  43. package/dist/{chunk-EYLC6GD6.cjs → chunk-NXFA7G3Y.cjs} +12 -12
  44. package/dist/{chunk-FNHN3RBD.cjs → chunk-O2XFIPNL.cjs} +1 -1
  45. package/dist/{chunk-BA2IA32Q.mjs → chunk-O4FWNLQK.mjs} +3 -3
  46. package/dist/{chunk-DZPR2W6U.cjs → chunk-O6L3YYPM.cjs} +5 -5
  47. package/dist/{chunk-LFFSDZ4Y.cjs → chunk-O7IEMY55.cjs} +3 -3
  48. package/dist/{chunk-6BJJYOFL.cjs → chunk-OLIGNTWU.cjs} +7 -7
  49. package/dist/{chunk-EENTT56C.mjs → chunk-OYF23QLG.mjs} +15 -14
  50. package/dist/{chunk-CBDRR3J3.mjs → chunk-RAH5MT53.mjs} +19 -14
  51. package/dist/{chunk-E72UD6ME.mjs → chunk-RVGSVQWT.mjs} +1 -1
  52. package/dist/{chunk-5IKQ7BIR.cjs → chunk-S25BQIFW.cjs} +16 -16
  53. package/dist/{chunk-LWWDTBGL.cjs → chunk-S7ZW72JH.cjs} +2 -2
  54. package/dist/{chunk-7FFW7DC4.mjs → chunk-SLYDIHLW.mjs} +4 -4
  55. package/dist/{chunk-LA6O5EL2.mjs → chunk-SNFTMSHX.mjs} +1 -1
  56. package/dist/{chunk-PCXIJKPM.mjs → chunk-TNBJ4LZG.mjs} +2 -2
  57. package/dist/{chunk-O27PLNQZ.cjs → chunk-UJ3R2AH2.cjs} +4 -4
  58. package/dist/{chunk-T4TBK5NY.mjs → chunk-VQ4NWOWO.mjs} +2 -2
  59. package/dist/{chunk-ZZ2QKCKW.mjs → chunk-WAY6LOQH.mjs} +1 -1
  60. package/dist/chunk-WBTHHTBO.cjs +88 -0
  61. package/dist/{chunk-O5FCWI6O.mjs → chunk-WFNAOWH4.mjs} +1 -1
  62. package/dist/{chunk-IWRLV46X.cjs → chunk-WMTBBQHY.cjs} +4 -4
  63. package/dist/{chunk-LA45FN37.mjs → chunk-WNYRYI4D.mjs} +10 -10
  64. package/dist/{chunk-CI4UNQHO.cjs → chunk-XBSKPLHF.cjs} +2 -2
  65. package/dist/{chunk-IOF4KXMP.mjs → chunk-XVWSDSUM.mjs} +201 -24
  66. package/dist/{chunk-ANXU3D32.cjs → chunk-XZLZ6YPP.cjs} +346 -32
  67. package/dist/{chunk-QAS7KE7J.cjs → chunk-Y5TOT5F6.cjs} +5 -5
  68. package/dist/{chunk-DPE53XWL.mjs → chunk-ZEXE4TGY.mjs} +1 -1
  69. package/dist/{client-component.d-CSEFlHfG.d.mts → client-component.d-D74pqdea.d.mts} +2 -2
  70. package/dist/{client-component.d-CQLvqLAJ.d.ts → client-component.d-D8VcypQA.d.ts} +2 -2
  71. package/dist/{client-plugins.d-BgPUYPc9.d.ts → client-plugins.d-CXElzotB.d.ts} +8 -1
  72. package/dist/{client-plugins.d-BTF0gZm4.d.mts → client-plugins.d-D4-6hNx7.d.mts} +8 -1
  73. package/dist/client-plugins.d.mts +1 -1
  74. package/dist/client-plugins.d.ts +1 -1
  75. package/dist/client.d.mts +6 -6
  76. package/dist/client.d.ts +6 -6
  77. package/dist/config.d.mts +1 -1
  78. package/dist/config.d.ts +1 -1
  79. package/dist/desktop.d.mts +2 -2
  80. package/dist/desktop.d.ts +2 -2
  81. package/dist/{devtools-HDKTYIZF.mjs → devtools-MX3FE733.mjs} +4 -4
  82. package/dist/{devtools-ZHN5JLVI.cjs → devtools-WET5NAKO.cjs} +5 -5
  83. package/dist/docs.cjs +7 -7
  84. package/dist/docs.d.mts +2 -2
  85. package/dist/docs.d.ts +2 -2
  86. package/dist/docs.mjs +6 -6
  87. package/dist/index.cjs +20 -19
  88. package/dist/{index.d-Coow7bD4.d.ts → index.d-A_x10zGS.d.ts} +1 -1
  89. package/dist/{index.d-Dbjx0ku7.d.mts → index.d-SSgYDv4D.d.mts} +1 -1
  90. package/dist/index.d.mts +16 -16
  91. package/dist/index.d.ts +16 -16
  92. package/dist/index.mjs +19 -18
  93. package/dist/integrations.d.mts +1 -1
  94. package/dist/integrations.d.ts +1 -1
  95. package/dist/internal/app-markdown-runtime.cjs +3 -3
  96. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  97. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  98. package/dist/internal/app-markdown-runtime.mjs +2 -2
  99. package/dist/internal/build-runtime.cjs +21 -20
  100. package/dist/internal/build-runtime.d.mts +3 -3
  101. package/dist/internal/build-runtime.d.ts +3 -3
  102. package/dist/internal/build-runtime.mjs +20 -19
  103. package/dist/internal/cli-runtime.cjs +6 -6
  104. package/dist/internal/cli-runtime.mjs +5 -5
  105. package/dist/internal/client-error-overlay.cjs +4 -4
  106. package/dist/internal/client-error-overlay.mjs +1 -1
  107. package/dist/internal/client-runtime.d.mts +4 -4
  108. package/dist/internal/client-runtime.d.ts +4 -4
  109. package/dist/internal/compression-runtime.d.mts +1 -1
  110. package/dist/internal/compression-runtime.d.ts +1 -1
  111. package/dist/internal/config-runtime.cjs +6 -6
  112. package/dist/internal/config-runtime.d.mts +4 -4
  113. package/dist/internal/config-runtime.d.ts +4 -4
  114. package/dist/internal/config-runtime.mjs +5 -5
  115. package/dist/internal/infra-analytics-runtime.cjs +9 -9
  116. package/dist/internal/infra-analytics-runtime.mjs +7 -7
  117. package/dist/internal/native-server-fns.cjs +5 -4
  118. package/dist/internal/native-server-fns.mjs +4 -3
  119. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  120. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  121. package/dist/internal/production-runtime.cjs +11 -11
  122. package/dist/internal/production-runtime.d.mts +13 -12
  123. package/dist/internal/production-runtime.d.ts +13 -12
  124. package/dist/internal/production-runtime.mjs +10 -10
  125. package/dist/markdown.cjs +2 -2
  126. package/dist/markdown.d.mts +1 -1
  127. package/dist/markdown.d.ts +1 -1
  128. package/dist/markdown.mjs +1 -1
  129. package/dist/middleware.d.mts +3 -3
  130. package/dist/middleware.d.ts +3 -3
  131. package/dist/mobile.d.mts +2 -2
  132. package/dist/mobile.d.ts +2 -2
  133. package/dist/{native-tree-AS5L3ID3.mjs → native-tree-BPEE2LAL.mjs} +2 -2
  134. package/dist/{native-tree-Z2WYUJEV.cjs → native-tree-WOX3JMBG.cjs} +3 -3
  135. package/dist/{navigation-delegate.d-Ca_BV0Wu.d.mts → navigation-delegate.d-DQVYKoaZ.d.mts} +1 -1
  136. package/dist/{navigation-delegate.d-aHiPI6GL.d.ts → navigation-delegate.d-GghbHJuK.d.ts} +1 -1
  137. package/dist/navigation.d.mts +4 -4
  138. package/dist/navigation.d.ts +4 -4
  139. package/dist/plugin.cjs +13 -13
  140. package/dist/plugin.d.mts +3 -3
  141. package/dist/plugin.d.ts +3 -3
  142. package/dist/plugin.mjs +12 -12
  143. package/dist/{production-runtime.d-C0rF7a10.d.ts → production-runtime.d-Bzns3NW9.d.ts} +1 -1
  144. package/dist/{production-runtime.d-CnAsSWgF.d.mts → production-runtime.d-DiFa5vHW.d.mts} +1 -1
  145. package/dist/{render-plan.d-BxeITFT1.d.ts → render-plan.d-CL_Ikfg_.d.ts} +1 -1
  146. package/dist/{render-plan.d-Z-93m5GZ.d.mts → render-plan.d-CcF0MeCf.d.mts} +1 -1
  147. package/dist/renderer-client.d.mts +4 -4
  148. package/dist/renderer-client.d.ts +4 -4
  149. package/dist/{request.d-X7Q1vmGF.d.ts → request.d-B1RnTLri.d.ts} +1 -1
  150. package/dist/{request.d-8_fMFNEb.d.mts → request.d-DarDOCk9.d.mts} +1 -1
  151. package/dist/request.d.mts +2 -2
  152. package/dist/request.d.ts +2 -2
  153. package/dist/{route-rendering.d-BUr3Jp8S.d.ts → route-rendering.d-BTUYCIj4.d.ts} +1 -1
  154. package/dist/{route-rendering.d-BInmBmul.d.mts → route-rendering.d-D_2Ual0-.d.mts} +1 -1
  155. package/dist/{router.d-crorSRiW.d.ts → router.d-CMANF6da.d.ts} +1 -1
  156. package/dist/{router.d-CZQmbpHx.d.mts → router.d-Cuv1jntg.d.mts} +1 -1
  157. package/dist/{routes.d-BknKQcTu.d.ts → routes.d-B6yFe6jm.d.ts} +1 -1
  158. package/dist/{routes.d-D1IrO9KK.d.mts → routes.d-c2HKfrfL.d.mts} +1 -1
  159. package/dist/routes.d.mts +1 -1
  160. package/dist/routes.d.ts +1 -1
  161. package/dist/{rsc-pipeline-3MPRULGA.mjs → rsc-pipeline-3LNVP2OO.mjs} +5 -5
  162. package/dist/{rsc-pipeline-RHEZNBFQ.cjs → rsc-pipeline-G5WELVW3.cjs} +6 -6
  163. package/dist/{runtime-OZKFZQCU.cjs → runtime-DMEULPE7.cjs} +21 -10
  164. package/dist/{runtime-X5UR7VHP.mjs → runtime-HQJ2LLQL.mjs} +19 -8
  165. package/dist/{runtime.d-CCsjTZJW.d.ts → runtime.d-C3RQUj6_.d.ts} +1 -1
  166. package/dist/{runtime.d-CETtpLb-.d.mts → runtime.d-wvh4ngU0.d.mts} +1 -1
  167. package/dist/server-plugins.d.mts +2 -2
  168. package/dist/server-plugins.d.ts +2 -2
  169. package/dist/server.cjs +30 -30
  170. package/dist/server.d.mts +9 -9
  171. package/dist/server.d.ts +9 -9
  172. package/dist/server.mjs +15 -15
  173. package/dist/{spa-router.d-CtSHzXlC.d.mts → spa-router.d-WU_qS5gJ.d.mts} +2 -2
  174. package/dist/{spa-router.d-CCADbSqJ.d.ts → spa-router.d-m8H_Kl_B.d.ts} +2 -2
  175. package/dist/testing.d.mts +1 -1
  176. package/dist/testing.d.ts +1 -1
  177. package/dist/{utils.d-CjyE-npA.d.ts → utils.d-C9dQD5Zg.d.ts} +1 -1
  178. package/dist/{utils.d-zFPHKFFJ.d.mts → utils.d-W9IiEqmW.d.mts} +1 -1
  179. package/dist/version.cjs +2 -2
  180. package/dist/version.mjs +1 -1
  181. package/dist/vite.cjs +13 -13
  182. package/dist/vite.d.mts +4 -4
  183. package/dist/vite.d.ts +4 -4
  184. package/dist/vite.mjs +12 -12
  185. package/package.json +1 -1
  186. package/dist/analyzer-KEA5JVDR.cjs +0 -15
@@ -5,14 +5,14 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkIWRLV46Xcjs = require('./chunk-IWRLV46X.cjs');
8
+ var _chunkWMTBBQHYcjs = require('./chunk-WMTBBQHY.cjs');
9
9
 
10
10
 
11
11
 
12
12
  var _chunkV3UOEWCBcjs = require('./chunk-V3UOEWCB.cjs');
13
13
 
14
14
 
15
- var _chunkU6WCUVSVcjs = require('./chunk-U6WCUVSV.cjs');
15
+ var _chunkDUSHDZQLcjs = require('./chunk-DUSHDZQL.cjs');
16
16
 
17
17
 
18
18
 
@@ -30,7 +30,7 @@ function hasFarmDocsRuntimeAdapter(docs) {
30
30
  }
31
31
  function assertFarmDocsAdapterServesNoGuardedPages(docs, options, isPathGuarded) {
32
32
  if (!isPathGuarded || !hasFarmDocsRuntimeAdapter(docs)) return;
33
- const guarded = _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, docs).flatMap((root) => _chunkIWRLV46Xcjs.discoverFarmDocsPages.call(void 0, _chunkIWRLV46Xcjs.resolveFarmDocsContentDir.call(void 0, root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunkIWRLV46Xcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
33
+ const guarded = _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, docs).flatMap((root) => _chunkWMTBBQHYcjs.discoverFarmDocsPages.call(void 0, _chunkWMTBBQHYcjs.resolveFarmDocsContentDir.call(void 0, root, options), root)).filter((page) => isPathGuarded(page.href) || isPathGuarded(_chunkWMTBBQHYcjs.getFarmDocsMarkdownPath.call(void 0, page.href))).map((page) => page.href);
34
34
  if (guarded.length === 0) return;
35
35
  throw new Error(
36
36
  `Docs pages behind a path guard (${guarded.join(", ")}) would be public: the docs adapter ${JSON.stringify(docs.adapter.id)} serves their content in llms-full.txt, search, Markdown, and MCP without running the app's guards. Move those pages out of the docs content directory, or set docs.adapter = false to use Farm's built-in docs runtime, which keeps guarded pages off anonymous surfaces.`
@@ -56,7 +56,7 @@ function createFarmDocsAdapterRuntimeConfig(docs, options, moduleConfig) {
56
56
  ...moduleConfig ? { ...getFarmDocsConfigModuleRoot(moduleConfig, docs.entry), ...docs.configOverrides } : _nullishCoalesce(docs.runtimeConfig, () => ( docs.config)),
57
57
  entry: docs.config.entry || docs.entry.replace(/^\/+|\/+$/g, "") || "docs",
58
58
  docsPath: docs.entry,
59
- contentDir: _chunkIWRLV46Xcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
59
+ contentDir: _chunkWMTBBQHYcjs.resolveFarmDocsContentDir.call(void 0, docs, options)
60
60
  };
61
61
  }
62
62
  function getFarmDocsAdapterStylesheets(options) {
@@ -123,7 +123,7 @@ async function listFarmDocsAdapterPages(docs, options) {
123
123
  if (typeof serverModule.listFarmDocsPages !== "function") return null;
124
124
  const listPages = serverModule.listFarmDocsPages;
125
125
  const pages = (await Promise.all(
126
- _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, docs).map(
126
+ _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, docs).map(
127
127
  (root) => listPages(createFarmDocsAdapterRuntimeConfig(root, options), { rootDir: options.root })
128
128
  )
129
129
  )).flat();
@@ -162,7 +162,7 @@ async function createFarmDocsAdapterHandler(docs, options) {
162
162
  };
163
163
  if (multiRoot) {
164
164
  return serverModule.createFarmDocsMultiRuntimeHandler(
165
- _chunkIWRLV46Xcjs.getFarmDocsRoots.call(void 0, docs).map(
165
+ _chunkWMTBBQHYcjs.getFarmDocsRoots.call(void 0, docs).map(
166
166
  (root) => createFarmDocsAdapterRuntimeConfig(root, options, moduleConfig)
167
167
  ),
168
168
  handlerOptions
@@ -308,22 +308,22 @@ function getDocsDescription(docs) {
308
308
  return _optionalChain([docs, 'access', _15 => _15.config, 'access', _16 => _16.metadata, 'optionalAccess', _17 => _17.description]);
309
309
  }
310
310
  function getLoadedDocsPages(context) {
311
- return _chunkIWRLV46Xcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunkIWRLV46Xcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
311
+ return _chunkWMTBBQHYcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter((page) => !context.isPathGuarded(page.href)).map((page) => _chunkWMTBBQHYcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, page.slug)).filter((page) => Boolean(page));
312
312
  }
313
313
  function toDocsSourcePage(page) {
314
314
  return {
315
- ..._chunkIWRLV46Xcjs.toFarmDocsMarkdownPage.call(void 0, page),
315
+ ..._chunkWMTBBQHYcjs.toFarmDocsMarkdownPage.call(void 0, page),
316
316
  sourcePath: page.sourcePath
317
317
  };
318
318
  }
319
319
  function toDocsSitemapPage(page) {
320
320
  return {
321
- ..._chunkIWRLV46Xcjs.toFarmDocsMarkdownPage.call(void 0, page),
321
+ ..._chunkWMTBBQHYcjs.toFarmDocsMarkdownPage.call(void 0, page),
322
322
  sourcePath: page.sourcePath
323
323
  };
324
324
  }
325
325
  function toDocsLlmsPage(page) {
326
- return _chunkIWRLV46Xcjs.toFarmDocsMarkdownPage.call(void 0, page);
326
+ return _chunkWMTBBQHYcjs.toFarmDocsMarkdownPage.call(void 0, page);
327
327
  }
328
328
  function getDocsLlmsOptions(context, request) {
329
329
  const configured = isRecord(context.docs.config.llmsTxt) ? context.docs.config.llmsTxt : {};
@@ -410,7 +410,7 @@ function renderAgentsDocument(context, request) {
410
410
  function buildAgentSpec(context, request) {
411
411
  const url = new URL(request.url);
412
412
  const origin = url.origin;
413
- const pages = _chunkIWRLV46Xcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
413
+ const pages = _chunkWMTBBQHYcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs).filter(
414
414
  (page) => !context.isPathGuarded(page.href)
415
415
  );
416
416
  const spec = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsAgentDiscoverySpec(getDocsDiscoveryOptions(context, request));
@@ -498,7 +498,7 @@ function buildPublicConfig(context) {
498
498
  };
499
499
  }
500
500
  function buildDiagnostics(context) {
501
- const pages = _chunkIWRLV46Xcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
501
+ const pages = _chunkWMTBBQHYcjs.discoverFarmDocsPages.call(void 0, context.contentDir, context.docs);
502
502
  const diagnostics = _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).buildDocsDiagnostics(context.docs.config, {
503
503
  entry: context.docs.entry,
504
504
  mcp: {
@@ -568,13 +568,13 @@ async function resolveAPIContext(options) {
568
568
  config: options.config,
569
569
  configPath: options.configPath
570
570
  }));
571
- const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkU6WCUVSVcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
571
+ const docs = isResolvedDocsConfig(docsInput) ? docsInput : await _chunkDUSHDZQLcjs.resolveDocsConfig.call(void 0, docsInput, { root, srcDir });
572
572
  const guardedPaths = new Set(_nullishCoalesce(_optionalChain([runtimeConfig, 'optionalAccess', _24 => _24.guardedPaths]), () => ( [])));
573
573
  return {
574
574
  root,
575
575
  srcDir,
576
576
  docs,
577
- contentDir: _chunkIWRLV46Xcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
577
+ contentDir: _chunkWMTBBQHYcjs.resolveFarmDocsContentDir.call(void 0, docs, { root, srcDir }),
578
578
  diagnostics: options.diagnostics === true,
579
579
  isPathGuarded: _nullishCoalesce(options.isPathGuarded, () => ( ((pathname) => guardedPaths.has(pathname))))
580
580
  };
@@ -633,12 +633,12 @@ async function handleDocsAPIGet(request, context) {
633
633
  if (format === "markdown" || url.pathname.endsWith(".md")) {
634
634
  const pathParam = url.searchParams.get("path") || url.searchParams.get("slug");
635
635
  const slug = normalizeDocsApiSlug(_nullishCoalesce(_nullishCoalesce(pathParam, () => ( pathTarget.slug)), () => ( "")), context.docs);
636
- const page = _chunkIWRLV46Xcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
636
+ const page = _chunkWMTBBQHYcjs.loadFarmDocsPage.call(void 0, context.contentDir, context.docs, slug);
637
637
  if (!page || context.isPathGuarded(page.href)) {
638
638
  return text("Docs page not found\n", "text/plain; charset=utf-8", { status: 404 });
639
639
  }
640
640
  return text(
641
- _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkIWRLV46Xcjs.toFarmDocsMarkdownPage.call(void 0, page), {
641
+ _chunkV3UOEWCBcjs.docsEngine.call(void 0, ).renderDocsMarkdownDocument(_chunkWMTBBQHYcjs.toFarmDocsMarkdownPage.call(void 0, page), {
642
642
  origin: new URL(request.url).origin,
643
643
  llms: getDocsLlmsOptions(context, request),
644
644
  sitemap: context.docs.config.sitemap
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkFNHN3RBDcjs = require('./chunk-FNHN3RBD.cjs');
3
+ var _chunkO2XFIPNLcjs = require('./chunk-O2XFIPNL.cjs');
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -90,7 +90,7 @@ function createFarmProductionSiteReporter(options) {
90
90
  schemaVersion: FARM_PRODUCTION_SITE_TELEMETRY_SCHEMA_VERSION,
91
91
  eventType: FARM_PRODUCTION_SITE_ATTESTATION_EVENT_TYPE,
92
92
  packageName: FARM_PRODUCTION_SITE_TELEMETRY_PACKAGE_NAME,
93
- packageVersion: sanitizeDetail(_chunkFNHN3RBDcjs.FARM_VERSION, "unknown"),
93
+ packageVersion: sanitizeDetail(_chunkO2XFIPNLcjs.FARM_VERSION, "unknown"),
94
94
  renderer: sanitizeDetail(options.renderer, "custom"),
95
95
  deployTarget: sanitizeDetail(options.deployTarget, "custom")
96
96
  };
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  FARM_DEFAULT_MCP_PATH,
3
3
  FARM_DEFAULT_MCP_TOOLS
4
- } from "./chunk-UZZ6IEQP.mjs";
4
+ } from "./chunk-MESQF2JC.mjs";
5
5
  import {
6
6
  normalizeFarmProductionSiteOrigin
7
- } from "./chunk-LA6O5EL2.mjs";
7
+ } from "./chunk-SNFTMSHX.mjs";
8
8
  import {
9
9
  resolveFarmAppManifestConfig
10
10
  } from "./chunk-SQ5O7I3L.mjs";
11
11
  import {
12
12
  emitFarmAgentRead,
13
13
  getFarmMarkdownMirrorPath
14
- } from "./chunk-YSXTNSXS.mjs";
14
+ } from "./chunk-K7OZAVOI.mjs";
15
15
  import {
16
16
  readFarmEnvironmentValue
17
17
  } from "./chunk-WXFY5JIY.mjs";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-QDWMCFTH.mjs";
30
30
  import {
31
31
  FARM_VERSION
32
- } from "./chunk-RFYL5OLP.mjs";
32
+ } from "./chunk-LQDLEWPO.mjs";
33
33
  import {
34
34
  applyFarmBasePath
35
35
  } from "./chunk-SF3JB56B.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  FARM_VERSION
3
- } from "./chunk-RFYL5OLP.mjs";
3
+ } from "./chunk-LQDLEWPO.mjs";
4
4
 
5
5
  // src/deployment-environment.ts
6
6
  function isFarmProductionDeploymentEnvironment(env = process.env) {
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-22W4FNTG.mjs";
7
7
  import {
8
8
  serializeFarmLlmsTxt
9
- } from "./chunk-KVW2M6PI.mjs";
9
+ } from "./chunk-KL7SHLQB.mjs";
10
10
  import {
11
11
  emitFarmAgentRead
12
- } from "./chunk-YSXTNSXS.mjs";
12
+ } from "./chunk-K7OZAVOI.mjs";
13
13
  import {
14
14
  resolveFarmThemeConfig
15
15
  } from "./chunk-YWPNIYUP.mjs";
@@ -6,10 +6,10 @@ var _chunkOWOUTKIJcjs = require('./chunk-OWOUTKIJ.cjs');
6
6
  var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
7
7
 
8
8
 
9
- var _chunkMEQN6DDAcjs = require('./chunk-MEQN6DDA.cjs');
9
+ var _chunkFJWN7RV4cjs = require('./chunk-FJWN7RV4.cjs');
10
10
 
11
11
 
12
- var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
12
+ var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
13
13
 
14
14
 
15
15
  var _chunkWT6RAN2Icjs = require('./chunk-WT6RAN2I.cjs');
@@ -603,12 +603,12 @@ function createFarmMetadataRouteResponse(kind, value, routeModule = {}, options
603
603
  return new Response(null, { status: 405, headers: { Allow: "GET, HEAD" } });
604
604
  }
605
605
  if ((kind === "llms" || kind === "llms-full") && options.request) {
606
- _chunkLT4VAF5Zcjs.emitFarmAgentRead.call(void 0, options.request, kind, isResponse(value) ? value.status : 200);
606
+ _chunk2C5L5RPMcjs.emitFarmAgentRead.call(void 0, options.request, kind, isResponse(value) ? value.status : 200);
607
607
  }
608
608
  if (isResponse(value)) {
609
609
  return method === "HEAD" ? _chunk4DCWVSL2cjs.omitFarmResponseBody.call(void 0, value) : value;
610
610
  }
611
- const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ? _chunkMEQN6DDAcjs.serializeFarmLlmsTxt.call(void 0, value) : serializeManifest(value);
611
+ const body = kind === "sitemap" ? serializeSitemap(value) : kind === "robots" ? serializeRobots(value) : kind === "llms" || kind === "llms-full" ? _chunkFJWN7RV4cjs.serializeFarmLlmsTxt.call(void 0, value) : serializeManifest(value);
612
612
  const contentType = kind === "sitemap" ? "application/xml; charset=utf-8" : kind === "robots" || kind === "llms" || kind === "llms-full" ? "text/plain; charset=utf-8" : "application/manifest+json; charset=utf-8";
613
613
  return new Response(method === "HEAD" ? null : body, {
614
614
  headers: {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  isFarmMetadataNoIndex
3
- } from "./chunk-KVW2M6PI.mjs";
3
+ } from "./chunk-KL7SHLQB.mjs";
4
4
  import {
5
5
  matchesFarmMarkdownRoutePattern
6
- } from "./chunk-YSXTNSXS.mjs";
6
+ } from "./chunk-K7OZAVOI.mjs";
7
7
  import {
8
8
  applyFarmBasePath
9
9
  } from "./chunk-SF3JB56B.mjs";
@@ -2,7 +2,7 @@ import {
2
2
  FARM_DEFAULT_MCP_DESCRIPTION,
3
3
  FARM_DEFAULT_MCP_PROTOCOL_VERSIONS,
4
4
  FARM_DEFAULT_MCP_TOOLS
5
- } from "./chunk-UZZ6IEQP.mjs";
5
+ } from "./chunk-MESQF2JC.mjs";
6
6
  import {
7
7
  stripFarmBasePath
8
8
  } from "./chunk-SF3JB56B.mjs";
@@ -0,0 +1,88 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/mobile/component-blocks.ts
2
+ function farmComponentKind(file) {
3
+ return file.endsWith(".vue") ? "vue" : file.endsWith(".svelte") ? "svelte" : void 0;
4
+ }
5
+ function readAttributes(text) {
6
+ const attributes = {};
7
+ for (const match of text.matchAll(
8
+ /([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+)))?/g
9
+ )) {
10
+ attributes[match[1].toLowerCase()] = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(match[2], () => ( match[3])), () => ( match[4])), () => ( true));
11
+ }
12
+ return attributes;
13
+ }
14
+ function readFarmComponentBlocks(file, source) {
15
+ const kind = farmComponentKind(file);
16
+ if (!kind) throw new TypeError(`${file} is not a .vue or .svelte component`);
17
+ const scripts = [];
18
+ const styles = [];
19
+ const taken = [];
20
+ for (const name of ["script", "style"]) {
21
+ const open = new RegExp(`<${name}\\b((?:[^>"']|"[^"]*"|'[^']*')*)>`, "gi");
22
+ let match;
23
+ while (match = open.exec(source)) {
24
+ const start = match.index + match[0].length;
25
+ const close = source.toLowerCase().indexOf(`</${name}>`, start);
26
+ const end = close === -1 ? source.length : close;
27
+ (name === "script" ? scripts : styles).push({
28
+ start,
29
+ end,
30
+ attributes: readAttributes(_nullishCoalesce(match[1], () => ( "")))
31
+ });
32
+ taken.push({ start: match.index, end: close === -1 ? end : close + name.length + 3 });
33
+ open.lastIndex = end;
34
+ }
35
+ }
36
+ taken.sort((left, right) => left.start - right.start);
37
+ const markup = [];
38
+ if (kind === "svelte") {
39
+ let cursor = 0;
40
+ for (const range of taken) {
41
+ if (range.start > cursor) markup.push({ start: cursor, end: range.start });
42
+ cursor = Math.max(cursor, range.end);
43
+ }
44
+ if (cursor < source.length) markup.push({ start: cursor, end: source.length });
45
+ } else {
46
+ const tag = /<(\/?)template\b(?:[^>"']|"[^"]*"|'[^']*')*?(\/?)>/gi;
47
+ let depth = 0;
48
+ let start = -1;
49
+ let match;
50
+ while (match = tag.exec(source)) {
51
+ if (taken.some((range) => match.index >= range.start && match.index < range.end)) continue;
52
+ if (match[2]) continue;
53
+ if (!match[1]) {
54
+ if (depth === 0) start = match.index + match[0].length;
55
+ depth += 1;
56
+ } else if (depth > 0) {
57
+ depth -= 1;
58
+ if (depth === 0) {
59
+ markup.push({ start, end: match.index });
60
+ break;
61
+ }
62
+ }
63
+ }
64
+ }
65
+ return { kind, scripts, styles, markup };
66
+ }
67
+ function keepFarmComponentRanges(source, ranges) {
68
+ let out = "";
69
+ let cursor = 0;
70
+ const blank = (text) => text.replace(/[^\n]/g, " ");
71
+ for (const range of [...ranges].sort((left, right) => left.start - right.start)) {
72
+ out += blank(source.slice(cursor, range.start)) + source.slice(range.start, range.end);
73
+ cursor = range.end;
74
+ }
75
+ return out + blank(source.slice(cursor));
76
+ }
77
+ function farmComponentModuleScripts(blocks) {
78
+ return blocks.scripts.filter(
79
+ (script) => blocks.kind === "vue" ? script.attributes.setup === void 0 : script.attributes.module !== void 0 || script.attributes.context === "module"
80
+ );
81
+ }
82
+
83
+
84
+
85
+
86
+
87
+
88
+ exports.farmComponentKind = farmComponentKind; exports.readFarmComponentBlocks = readFarmComponentBlocks; exports.keepFarmComponentRanges = keepFarmComponentRanges; exports.farmComponentModuleScripts = farmComponentModuleScripts;
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-FN5UEC7I.mjs";
8
8
  import {
9
9
  resolveDeployOutputPath
10
- } from "./chunk-BA2IA32Q.mjs";
10
+ } from "./chunk-O4FWNLQK.mjs";
11
11
  import {
12
12
  farmDesktopDevGuardPlugin,
13
13
  loadFarmReactPlugin
@@ -18,7 +18,7 @@ var _chunkERMUL73Lcjs = require('./chunk-ERMUL73L.cjs');
18
18
  var _chunk6JHZPB52cjs = require('./chunk-6JHZPB52.cjs');
19
19
 
20
20
 
21
- var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
21
+ var _chunk2C5L5RPMcjs = require('./chunk-2C5L5RPM.cjs');
22
22
 
23
23
 
24
24
  var _chunkCFG4QERRcjs = require('./chunk-CFG4QERR.cjs');
@@ -1179,11 +1179,11 @@ function shouldReturnMarkdown(request) {
1179
1179
  if (url.pathname.endsWith(".md")) return true;
1180
1180
  const accept = request.headers.get("accept");
1181
1181
  const markdown = Math.max(
1182
- _chunkLT4VAF5Zcjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
1183
- _chunkLT4VAF5Zcjs.farmAcceptQuality.call(void 0, accept, "text/plain")
1182
+ _chunk2C5L5RPMcjs.farmAcceptQuality.call(void 0, accept, "text/markdown"),
1183
+ _chunk2C5L5RPMcjs.farmAcceptQuality.call(void 0, accept, "text/plain")
1184
1184
  );
1185
1185
  if (markdown <= 0) return false;
1186
- return markdown >= _chunkLT4VAF5Zcjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
1186
+ return markdown >= _chunk2C5L5RPMcjs.farmAcceptQuality.call(void 0, accept, "text/html", { wildcards: true });
1187
1187
  }
1188
1188
  function escapeAttribute(value) {
1189
1189
  return escapeHtml(value).replace(/'/g, "&#39;");
@@ -35,13 +35,13 @@ import {
35
35
  renderFarmLocaleAlternateLinks,
36
36
  resolveDefaultErrorStatus,
37
37
  routeBoundaryCoversDirectory
38
- } from "./chunk-PCXIJKPM.mjs";
38
+ } from "./chunk-TNBJ4LZG.mjs";
39
39
  import {
40
40
  handleFarmFormActionRequest
41
41
  } from "./chunk-MK5E44WP.mjs";
42
42
  import {
43
43
  listFarmMCPLlmsTxtLinks
44
- } from "./chunk-7FFW7DC4.mjs";
44
+ } from "./chunk-SLYDIHLW.mjs";
45
45
  import {
46
46
  FARM_DEFAULT_MCP_PATH,
47
47
  collectFarmDefaultMCPPages,
@@ -49,7 +49,7 @@ import {
49
49
  farmConfigMountsMCP,
50
50
  isFarmDefaultMCPPathname,
51
51
  resolveFarmDefaultMCPServer
52
- } from "./chunk-UZZ6IEQP.mjs";
52
+ } from "./chunk-MESQF2JC.mjs";
53
53
  import {
54
54
  installFarmIslandValues,
55
55
  uninstallFarmIslandValues
@@ -96,7 +96,7 @@ import {
96
96
  resolveFarmAgentCrawlers,
97
97
  resolveFarmAgentSitemap,
98
98
  resolveFarmPerformanceConfig
99
- } from "./chunk-T4TBK5NY.mjs";
99
+ } from "./chunk-VQ4NWOWO.mjs";
100
100
  import {
101
101
  createFarmCspNonce,
102
102
  createFarmCspNonceRewriter,
@@ -111,7 +111,7 @@ import {
111
111
  createFarmLlmsMarkdownReader,
112
112
  renderFarmLlmsFullTxt,
113
113
  resolveFarmLlmsTxtConfig
114
- } from "./chunk-KVW2M6PI.mjs";
114
+ } from "./chunk-KL7SHLQB.mjs";
115
115
  import {
116
116
  getFarmAppDirectories,
117
117
  getFarmSourceRoots
@@ -122,10 +122,10 @@ import {
122
122
  import {
123
123
  createFarmMarkdownRouteModuleFromFile,
124
124
  loadFarmMdxComponents
125
- } from "./chunk-55U5QIXQ.mjs";
125
+ } from "./chunk-FIR62CR3.mjs";
126
126
  import {
127
127
  isFarmMarkdownPageFile
128
- } from "./chunk-E72UD6ME.mjs";
128
+ } from "./chunk-RVGSVQWT.mjs";
129
129
  import {
130
130
  resolveFarmMdxComponentsModulePath,
131
131
  resolveMdxConfig
@@ -138,7 +138,7 @@ import {
138
138
  farmRequestWantsMarkdown,
139
139
  getFarmMarkdownAlternatePath,
140
140
  resolveMarkdownConfig
141
- } from "./chunk-YSXTNSXS.mjs";
141
+ } from "./chunk-K7OZAVOI.mjs";
142
142
  import {
143
143
  resolveWorkflowsConfig
144
144
  } from "./chunk-TZVUF5JJ.mjs";
@@ -256,7 +256,7 @@ import {
256
256
  } from "./chunk-D2LCAV6L.mjs";
257
257
  import {
258
258
  FARM_VERSION
259
- } from "./chunk-RFYL5OLP.mjs";
259
+ } from "./chunk-LQDLEWPO.mjs";
260
260
  import {
261
261
  resolveFarmTrailingSlashRedirect,
262
262
  setFarmTrailingSlashPreference
@@ -7783,7 +7783,7 @@ var ServerRenderer = class {
7783
7783
  const server = this.getDefaultMCPServer();
7784
7784
  const request2 = getCurrentRequestOrNull() ?? createWebRequestFromFarmRequest(req, { trustProxy: this.config.server?.trustProxy });
7785
7785
  try {
7786
- const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-7QMX2LUY.mjs");
7786
+ const { handleFarmDefaultMCPRequest } = await import("./agent-mcp-handler-QLFDDTYN.mjs");
7787
7787
  const origin = new URL(request2.url).origin;
7788
7788
  const response = await handleFarmDefaultMCPRequest(request2, {
7789
7789
  server,
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkPRFNLQSPcjs = require('./chunk-PRFNLQSP.cjs');
3
+ var _chunk7XGWBPQQcjs = require('./chunk-7XGWBPQQ.cjs');
4
4
 
5
5
  // src/app-markdown.ts
6
6
  var _promises = require('fs/promises');
@@ -8,7 +8,7 @@ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
8
8
  var _url = require('url');
9
9
  async function createFarmMarkdownRouteModuleFromFile(filePath, options = {}) {
10
10
  const source = await _promises.readFile.call(void 0, filePath, "utf8");
11
- return _chunkPRFNLQSPcjs.createFarmMarkdownRouteModule.call(void 0, {
11
+ return _chunk7XGWBPQQcjs.createFarmMarkdownRouteModule.call(void 0, {
12
12
  source,
13
13
  filePath,
14
14
  components: options.components,