@geminilight/mindos-windows-arm64 1.0.6 → 1.0.8

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 (483) hide show
  1. package/_standalone/.mindos-build-version +1 -1
  2. package/_standalone/__next/BUILD_ID +1 -1
  3. package/_standalone/__next/app-path-routes-manifest.json +24 -24
  4. package/_standalone/__next/build-manifest.json +3 -3
  5. package/_standalone/__next/prerender-manifest.json +3 -3
  6. package/_standalone/__next/react-loadable-manifest.json +48 -7
  7. package/_standalone/__next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  8. package/_standalone/__next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/_standalone/__next/server/app/_global-error.html +2 -2
  10. package/_standalone/__next/server/app/_global-error.rsc +1 -1
  11. package/_standalone/__next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/_standalone/__next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/_standalone/__next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/_standalone/__next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/_standalone/__next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/_standalone/__next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/_standalone/__next/server/app/_not-found/page.js +1 -1
  18. package/_standalone/__next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/_standalone/__next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/_standalone/__next/server/app/agents/[agentKey]/page.js +2 -2
  21. package/_standalone/__next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  22. package/_standalone/__next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  23. package/_standalone/__next/server/app/agents/page.js +2 -2
  24. package/_standalone/__next/server/app/agents/page.js.nft.json +1 -1
  25. package/_standalone/__next/server/app/agents/page_client-reference-manifest.js +1 -1
  26. package/_standalone/__next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  27. package/_standalone/__next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  28. package/_standalone/__next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  29. package/_standalone/__next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  30. package/_standalone/__next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  31. package/_standalone/__next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  32. package/_standalone/__next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  33. package/_standalone/__next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  34. package/_standalone/__next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  35. package/_standalone/__next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  36. package/_standalone/__next/server/app/api/agents/copy-skill/route_client-reference-manifest.js +1 -1
  37. package/_standalone/__next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
  38. package/_standalone/__next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
  39. package/_standalone/__next/server/app/api/ask/route.js +2 -2
  40. package/_standalone/__next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  41. package/_standalone/__next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  42. package/_standalone/__next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  43. package/_standalone/__next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  44. package/_standalone/__next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  45. package/_standalone/__next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  46. package/_standalone/__next/server/app/api/channels/verify/route_client-reference-manifest.js +1 -1
  47. package/_standalone/__next/server/app/api/connect/route_client-reference-manifest.js +1 -1
  48. package/_standalone/__next/server/app/api/embedding/route_client-reference-manifest.js +1 -1
  49. package/_standalone/__next/server/app/api/export/route_client-reference-manifest.js +1 -1
  50. package/_standalone/__next/server/app/api/extract-docx/route_client-reference-manifest.js +1 -1
  51. package/_standalone/__next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  52. package/_standalone/__next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  53. package/_standalone/__next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
  54. package/_standalone/__next/server/app/api/file/route_client-reference-manifest.js +1 -1
  55. package/_standalone/__next/server/app/api/files/route_client-reference-manifest.js +1 -1
  56. package/_standalone/__next/server/app/api/git/route_client-reference-manifest.js +1 -1
  57. package/_standalone/__next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  58. package/_standalone/__next/server/app/api/health/route_client-reference-manifest.js +1 -1
  59. package/_standalone/__next/server/app/api/im/activity/route_client-reference-manifest.js +1 -1
  60. package/_standalone/__next/server/app/api/im/config/route_client-reference-manifest.js +1 -1
  61. package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route_client-reference-manifest.js +1 -1
  62. package/_standalone/__next/server/app/api/im/feishu/long-connection/route_client-reference-manifest.js +1 -1
  63. package/_standalone/__next/server/app/api/im/status/route_client-reference-manifest.js +1 -1
  64. package/_standalone/__next/server/app/api/im/test/route_client-reference-manifest.js +1 -1
  65. package/_standalone/__next/server/app/api/im/webhook/feishu/route_client-reference-manifest.js +1 -1
  66. package/_standalone/__next/server/app/api/im/webhook-status/route_client-reference-manifest.js +1 -1
  67. package/_standalone/__next/server/app/api/inbox/clip/route_client-reference-manifest.js +1 -1
  68. package/_standalone/__next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  69. package/_standalone/__next/server/app/api/init/route_client-reference-manifest.js +1 -1
  70. package/_standalone/__next/server/app/api/lint/route_client-reference-manifest.js +1 -1
  71. package/_standalone/__next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  72. package/_standalone/__next/server/app/api/mcp/direct-tools/route_client-reference-manifest.js +1 -1
  73. package/_standalone/__next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  74. package/_standalone/__next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  75. package/_standalone/__next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  76. package/_standalone/__next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  77. package/_standalone/__next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  78. package/_standalone/__next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
  79. package/_standalone/__next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  80. package/_standalone/__next/server/app/api/obsidian/compat-report/route_client-reference-manifest.js +1 -1
  81. package/_standalone/__next/server/app/api/obsidian/import/route_client-reference-manifest.js +1 -1
  82. package/_standalone/__next/server/app/api/obsidian-plugins/settings/route_client-reference-manifest.js +1 -1
  83. package/_standalone/__next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  84. package/_standalone/__next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  85. package/_standalone/__next/server/app/api/search/prewarm/route_client-reference-manifest.js +1 -1
  86. package/_standalone/__next/server/app/api/search/route_client-reference-manifest.js +1 -1
  87. package/_standalone/__next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  88. package/_standalone/__next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  89. package/_standalone/__next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  90. package/_standalone/__next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  91. package/_standalone/__next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  92. package/_standalone/__next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  93. package/_standalone/__next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  94. package/_standalone/__next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  95. package/_standalone/__next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  96. package/_standalone/__next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  97. package/_standalone/__next/server/app/api/space-overview/route_client-reference-manifest.js +1 -1
  98. package/_standalone/__next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  99. package/_standalone/__next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  100. package/_standalone/__next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  101. package/_standalone/__next/server/app/api/update/route_client-reference-manifest.js +1 -1
  102. package/_standalone/__next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  103. package/_standalone/__next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  104. package/_standalone/__next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  105. package/_standalone/__next/server/app/capture/history/page.js +1 -1
  106. package/_standalone/__next/server/app/capture/history/page.js.nft.json +1 -1
  107. package/_standalone/__next/server/app/capture/history/page_client-reference-manifest.js +1 -1
  108. package/_standalone/__next/server/app/capture/page.js +1 -1
  109. package/_standalone/__next/server/app/capture/page.js.nft.json +1 -1
  110. package/_standalone/__next/server/app/capture/page_client-reference-manifest.js +1 -1
  111. package/_standalone/__next/server/app/changelog/page.js +1 -1
  112. package/_standalone/__next/server/app/changelog/page.js.nft.json +1 -1
  113. package/_standalone/__next/server/app/changelog/page_client-reference-manifest.js +1 -1
  114. package/_standalone/__next/server/app/changes/page.js +1 -1
  115. package/_standalone/__next/server/app/changes/page.js.nft.json +1 -1
  116. package/_standalone/__next/server/app/changes/page_client-reference-manifest.js +1 -1
  117. package/_standalone/__next/server/app/echo/[segment]/page.js +4 -4
  118. package/_standalone/__next/server/app/echo/[segment]/page.js.nft.json +1 -1
  119. package/_standalone/__next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  120. package/_standalone/__next/server/app/echo/page.js +1 -1
  121. package/_standalone/__next/server/app/echo/page.js.nft.json +1 -1
  122. package/_standalone/__next/server/app/echo/page_client-reference-manifest.js +1 -1
  123. package/_standalone/__next/server/app/explore/page.js +3 -3
  124. package/_standalone/__next/server/app/explore/page.js.nft.json +1 -1
  125. package/_standalone/__next/server/app/explore/page_client-reference-manifest.js +1 -1
  126. package/_standalone/__next/server/app/help/page.js +2 -2
  127. package/_standalone/__next/server/app/help/page.js.nft.json +1 -1
  128. package/_standalone/__next/server/app/help/page_client-reference-manifest.js +1 -1
  129. package/_standalone/__next/server/app/inbox/history/page.js +1 -1
  130. package/_standalone/__next/server/app/inbox/history/page.js.nft.json +1 -1
  131. package/_standalone/__next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
  132. package/_standalone/__next/server/app/login/page.js +1 -1
  133. package/_standalone/__next/server/app/login/page.js.nft.json +1 -1
  134. package/_standalone/__next/server/app/login/page_client-reference-manifest.js +1 -1
  135. package/_standalone/__next/server/app/page.js +1 -1
  136. package/_standalone/__next/server/app/page.js.nft.json +1 -1
  137. package/_standalone/__next/server/app/page_client-reference-manifest.js +1 -1
  138. package/_standalone/__next/server/app/settings/page.js +8 -3
  139. package/_standalone/__next/server/app/settings/page.js.nft.json +1 -1
  140. package/_standalone/__next/server/app/settings/page_client-reference-manifest.js +1 -1
  141. package/_standalone/__next/server/app/setup/page.js +1 -1
  142. package/_standalone/__next/server/app/setup/page.js.nft.json +1 -1
  143. package/_standalone/__next/server/app/setup/page_client-reference-manifest.js +1 -1
  144. package/_standalone/__next/server/app/todo/page.js +1 -1
  145. package/_standalone/__next/server/app/todo/page.js.nft.json +1 -1
  146. package/_standalone/__next/server/app/todo/page_client-reference-manifest.js +1 -1
  147. package/_standalone/__next/server/app/trash/page.js +2 -2
  148. package/_standalone/__next/server/app/trash/page.js.nft.json +1 -1
  149. package/_standalone/__next/server/app/trash/page_client-reference-manifest.js +1 -1
  150. package/_standalone/__next/server/app/view/[...path]/page.js +3 -3
  151. package/_standalone/__next/server/app/view/[...path]/page.js.nft.json +1 -1
  152. package/_standalone/__next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  153. package/_standalone/__next/server/app/wiki/page.js +1 -1
  154. package/_standalone/__next/server/app/wiki/page.js.nft.json +1 -1
  155. package/_standalone/__next/server/app/wiki/page_client-reference-manifest.js +1 -1
  156. package/_standalone/__next/server/app-paths-manifest.json +24 -24
  157. package/_standalone/__next/server/chunks/103.js +1 -1
  158. package/_standalone/__next/server/chunks/1976.js +1 -1
  159. package/_standalone/__next/server/chunks/6602.js +43 -66
  160. package/_standalone/__next/server/chunks/6646.js +16 -0
  161. package/_standalone/__next/server/chunks/8461.js +7 -7
  162. package/_standalone/__next/server/chunks/9868.js +2 -0
  163. package/_standalone/__next/server/chunks/{3219.js → 9969.js} +4 -4
  164. package/_standalone/__next/server/middleware-build-manifest.js +1 -1
  165. package/_standalone/__next/server/middleware-react-loadable-manifest.js +1 -1
  166. package/_standalone/__next/server/pages/500.html +2 -2
  167. package/_standalone/__next/server/server-reference-manifest.js +1 -1
  168. package/_standalone/__next/server/server-reference-manifest.json +1 -1
  169. package/_standalone/__next/static/chunks/{1430-c4ffa328888515c1.js → 1104-0822d9349a412b9b.js} +7 -2
  170. package/_standalone/__next/static/chunks/1655.0a559759973b42e9.js +1 -0
  171. package/_standalone/__next/static/chunks/{2073-3f913ebb13702b7e.js → 2073-fadffc82a27afdc7.js} +2 -2
  172. package/{static-web/_next/static/chunks/9216.d3339c27169b21bf.js → _standalone/__next/static/chunks/2245.ef71edb24c5232c2.js} +1 -1
  173. package/_standalone/__next/static/chunks/2258-2d3b5aac6a1fa92a.js +53 -0
  174. package/{static-web/_next/static/chunks/4937-4101fcdadacf46e3.js → _standalone/__next/static/chunks/2409-244f9b90dceb0c04.js} +1 -1
  175. package/_standalone/__next/static/chunks/3279-b49c25a4f2964b16.js +1 -0
  176. package/_standalone/__next/static/chunks/3807-115388f118106ca8.js +1 -0
  177. package/_standalone/__next/static/chunks/3966.ea75f9c5490955de.js +1 -0
  178. package/_standalone/__next/static/chunks/4010.48b219cb22dfa5d8.js +10 -0
  179. package/_standalone/__next/static/chunks/5026-7fed7ca22272c18f.js +1 -0
  180. package/_standalone/__next/static/chunks/5152-87e6ed56dfd7d17d.js +1 -0
  181. package/_standalone/__next/static/chunks/577.5e448c99068f1323.js +1 -0
  182. package/_standalone/__next/static/chunks/5913.a0a734f87b13f81a.js +1 -0
  183. package/_standalone/__next/static/chunks/596.9cbaf6ba90cb204f.js +7 -0
  184. package/_standalone/__next/static/chunks/6223-3fb90852221bda56.js +1 -0
  185. package/_standalone/__next/static/chunks/6343.582d063078c45d73.js +6 -0
  186. package/_standalone/__next/static/chunks/8174-50048777dc2469c0.js +1 -0
  187. package/_standalone/__next/static/chunks/{5913.3cee388e26959b62.js → 8294.cc9f9ff2f8b219ed.js} +1 -1
  188. package/_standalone/__next/static/chunks/8626-7da79d9ab2504eed.js +1 -0
  189. package/_standalone/__next/static/chunks/{8732.9002f42201b06fe8.js → 8732.87554c78e8825fac.js} +4 -4
  190. package/_standalone/__next/static/chunks/8922-3babcd35e18e9e4f.js +1 -0
  191. package/_standalone/__next/static/chunks/9440-eee639175695be7d.js +33 -0
  192. package/_standalone/__next/static/chunks/9479-b48d19e3588823c1.js +34 -0
  193. package/_standalone/__next/static/chunks/{9602.4e99e3525e5f062c.js → 9602.218427fc7b3d6b11.js} +1 -1
  194. package/_standalone/__next/static/chunks/app/agents/[agentKey]/page-ef111ea0a3368752.js +1 -0
  195. package/_standalone/__next/static/chunks/app/agents/page-aacead0f47cedb0d.js +1 -0
  196. package/_standalone/__next/static/chunks/app/layout-ed608bbf9585e78f.js +99 -0
  197. package/_standalone/__next/static/chunks/app/page-d22928276c36528c.js +1 -0
  198. package/_standalone/__next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-045afd8c0908f923.js} +1 -1
  199. package/{static-web/_next/static/chunks/app/setup/page-f5de08d0d588c778.js → _standalone/__next/static/chunks/app/setup/page-034a608f19d04653.js} +1 -1
  200. package/_standalone/__next/static/chunks/app/trash/page-251aaf5aac9d5a0b.js +1 -0
  201. package/_standalone/__next/static/chunks/app/view/[...path]/page-7e17c3d13fe2e275.js +12 -0
  202. package/_standalone/__next/static/chunks/webpack-1decda0633a8a874.js +1 -0
  203. package/_standalone/__next/static/css/5f000212c8b2e09a.css +1 -0
  204. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  205. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  206. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  207. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  208. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  209. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  210. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  211. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  212. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  213. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  214. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  215. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  216. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  217. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  218. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  219. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  220. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  221. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  222. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  223. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  224. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  225. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  226. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  227. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  228. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  229. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  230. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  231. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  232. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  233. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  234. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  235. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  236. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  237. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  238. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  239. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  240. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  241. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  242. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  243. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  244. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/index.js +14 -0
  245. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/license +9 -0
  246. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/package.json +61 -0
  247. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  248. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  249. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  250. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  251. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  252. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  253. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  254. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  255. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  256. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  257. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  258. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  259. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  260. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  261. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  262. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  263. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  264. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  265. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  266. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  267. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  268. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  269. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  270. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  271. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  272. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  273. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  274. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  275. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  276. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  277. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  278. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  279. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  280. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  281. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  282. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  283. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  284. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  285. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  286. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  287. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  288. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  289. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  290. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  291. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  292. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  293. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  294. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  295. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  296. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  297. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  298. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  299. package/_standalone/__node_modules/bignumber.js/doc/API.html +2249 -0
  300. package/_standalone/__node_modules/entities/LICENSE +11 -0
  301. package/_standalone/__node_modules/entities/dist/decode-codepoint.js +46 -0
  302. package/_standalone/__node_modules/entities/dist/decode.js +544 -0
  303. package/_standalone/__node_modules/entities/dist/encode.js +90 -0
  304. package/_standalone/__node_modules/entities/dist/escape.js +132 -0
  305. package/_standalone/__node_modules/entities/dist/generated/decode-data-html.js +5 -0
  306. package/_standalone/__node_modules/entities/dist/generated/decode-data-xml.js +5 -0
  307. package/_standalone/__node_modules/entities/dist/generated/encode-html.js +12 -0
  308. package/_standalone/__node_modules/entities/dist/index.js +91 -0
  309. package/_standalone/__node_modules/entities/dist/internal/bin-trie-flags.js +18 -0
  310. package/_standalone/__node_modules/entities/dist/internal/decode-shared.js +17 -0
  311. package/_standalone/__node_modules/entities/dist/internal/encode-shared.js +93 -0
  312. package/_standalone/__node_modules/entities/package.json +83 -0
  313. package/_standalone/__node_modules/entities/src/decode-codepoint.ts +50 -0
  314. package/_standalone/__node_modules/entities/src/decode.ts +671 -0
  315. package/_standalone/__node_modules/entities/src/encode.ts +95 -0
  316. package/_standalone/__node_modules/entities/src/escape.ts +160 -0
  317. package/_standalone/__node_modules/entities/src/generated/decode-data-html.ts +7 -0
  318. package/_standalone/__node_modules/entities/src/generated/decode-data-xml.ts +7 -0
  319. package/_standalone/__node_modules/entities/src/generated/encode-html.ts +18 -0
  320. package/_standalone/__node_modules/entities/src/index.ts +162 -0
  321. package/_standalone/__node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
  322. package/_standalone/__node_modules/entities/src/internal/decode-shared.ts +18 -0
  323. package/_standalone/__node_modules/entities/src/internal/encode-shared.ts +123 -0
  324. package/_standalone/__node_modules/has-flag/index.js +8 -0
  325. package/_standalone/__node_modules/has-flag/license +9 -0
  326. package/_standalone/__node_modules/has-flag/package.json +46 -0
  327. package/_standalone/__node_modules/koffi/doc/benchmarks.md +126 -0
  328. package/_standalone/__node_modules/koffi/doc/callbacks.md +210 -0
  329. package/_standalone/__node_modules/koffi/doc/contribute.md +148 -0
  330. package/_standalone/__node_modules/koffi/doc/functions.md +250 -0
  331. package/_standalone/__node_modules/koffi/doc/index.md +61 -0
  332. package/_standalone/__node_modules/koffi/doc/input.md +471 -0
  333. package/_standalone/__node_modules/koffi/doc/migration.md +159 -0
  334. package/_standalone/__node_modules/koffi/doc/misc.md +180 -0
  335. package/_standalone/__node_modules/koffi/doc/output.md +305 -0
  336. package/_standalone/__node_modules/koffi/doc/packaging.md +88 -0
  337. package/_standalone/__node_modules/koffi/doc/platforms.md +36 -0
  338. package/_standalone/__node_modules/koffi/doc/pointers.md +328 -0
  339. package/_standalone/__node_modules/koffi/doc/start.md +118 -0
  340. package/_standalone/__node_modules/koffi/doc/unions.md +186 -0
  341. package/_standalone/__node_modules/koffi/doc/variables.md +102 -0
  342. package/_standalone/__node_modules/supports-color/browser.js +5 -0
  343. package/_standalone/__node_modules/supports-color/index.js +135 -0
  344. package/_standalone/__node_modules/supports-color/license +9 -0
  345. package/_standalone/__node_modules/supports-color/package.json +53 -0
  346. package/_standalone/__node_modules/yaml/browser/dist/doc/Document.js +335 -0
  347. package/_standalone/__node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  348. package/_standalone/__node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  349. package/_standalone/__node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  350. package/_standalone/__node_modules/yaml/browser/dist/doc/directives.js +176 -0
  351. package/_standalone/__node_modules/yaml/dist/doc/Document.js +337 -0
  352. package/_standalone/__node_modules/yaml/dist/doc/anchors.js +76 -0
  353. package/_standalone/__node_modules/yaml/dist/doc/applyReviver.js +57 -0
  354. package/_standalone/__node_modules/yaml/dist/doc/createNode.js +90 -0
  355. package/_standalone/__node_modules/yaml/dist/doc/directives.js +178 -0
  356. package/_standalone/public/agent-icons/claude.svg +1 -0
  357. package/_standalone/public/agent-icons/cursor.svg +1 -0
  358. package/_standalone/public/agent-icons/github-copilot.svg +1 -0
  359. package/_standalone/public/agent-icons/google.svg +1 -0
  360. package/_standalone/public/agent-icons/openai.svg +1 -0
  361. package/_standalone/public/agent-icons/windsurf.svg +1 -0
  362. package/bin/lib/stop.js +45 -0
  363. package/bin/lib/sync.js +32 -19
  364. package/dist/server/handlers/file.js +5 -2
  365. package/dist/server/handlers/file.js.map +1 -1
  366. package/dist/server/handlers/mcp-restart.d.ts +2 -0
  367. package/dist/server/handlers/mcp-restart.d.ts.map +1 -1
  368. package/dist/server/handlers/mcp-restart.js +45 -2
  369. package/dist/server/handlers/mcp-restart.js.map +1 -1
  370. package/dist/server/handlers/skills.d.ts.map +1 -1
  371. package/dist/server/handlers/skills.js +17 -3
  372. package/dist/server/handlers/skills.js.map +1 -1
  373. package/dist/server/handlers/sync.d.ts.map +1 -1
  374. package/dist/server/handlers/sync.js +28 -10
  375. package/dist/server/handlers/sync.js.map +1 -1
  376. package/dist/server/index.d.ts +1 -1
  377. package/dist/server/index.d.ts.map +1 -1
  378. package/dist/server/index.js +1 -1
  379. package/dist/server/index.js.map +1 -1
  380. package/dist/server/runtime.d.ts.map +1 -1
  381. package/dist/server/runtime.js +20 -21
  382. package/dist/server/runtime.js.map +1 -1
  383. package/package.json +1 -1
  384. package/runtime-manifest.json +1 -1
  385. package/scripts/build-bun-binary.mjs +139 -6
  386. package/scripts/prepare-standalone.mjs +0 -1
  387. package/scripts/prepare-static-web.mjs +52 -4
  388. package/scripts/release.sh +1 -1
  389. package/scripts/setup.js +115 -2
  390. package/scripts/verify-standalone.mjs +12 -0
  391. package/static-web/.mindos-build-version +1 -1
  392. package/static-web/_next/static/chunks/{1430-c4ffa328888515c1.js → 1104-0822d9349a412b9b.js} +7 -2
  393. package/static-web/_next/static/chunks/1655.0a559759973b42e9.js +1 -0
  394. package/static-web/_next/static/chunks/{2073-3f913ebb13702b7e.js → 2073-fadffc82a27afdc7.js} +2 -2
  395. package/{_standalone/__next/static/chunks/9216.d3339c27169b21bf.js → static-web/_next/static/chunks/2245.ef71edb24c5232c2.js} +1 -1
  396. package/static-web/_next/static/chunks/2258-2d3b5aac6a1fa92a.js +53 -0
  397. package/{_standalone/__next/static/chunks/4937-4101fcdadacf46e3.js → static-web/_next/static/chunks/2409-244f9b90dceb0c04.js} +1 -1
  398. package/static-web/_next/static/chunks/3279-b49c25a4f2964b16.js +1 -0
  399. package/static-web/_next/static/chunks/3807-115388f118106ca8.js +1 -0
  400. package/static-web/_next/static/chunks/3966.ea75f9c5490955de.js +1 -0
  401. package/static-web/_next/static/chunks/4010.48b219cb22dfa5d8.js +10 -0
  402. package/static-web/_next/static/chunks/5026-7fed7ca22272c18f.js +1 -0
  403. package/static-web/_next/static/chunks/5152-87e6ed56dfd7d17d.js +1 -0
  404. package/static-web/_next/static/chunks/577.5e448c99068f1323.js +1 -0
  405. package/static-web/_next/static/chunks/5913.a0a734f87b13f81a.js +1 -0
  406. package/static-web/_next/static/chunks/596.9cbaf6ba90cb204f.js +7 -0
  407. package/static-web/_next/static/chunks/6223-3fb90852221bda56.js +1 -0
  408. package/static-web/_next/static/chunks/6343.582d063078c45d73.js +6 -0
  409. package/static-web/_next/static/chunks/8174-50048777dc2469c0.js +1 -0
  410. package/static-web/_next/static/chunks/{5913.3cee388e26959b62.js → 8294.cc9f9ff2f8b219ed.js} +1 -1
  411. package/static-web/_next/static/chunks/8626-7da79d9ab2504eed.js +1 -0
  412. package/static-web/_next/static/chunks/{8732.9002f42201b06fe8.js → 8732.87554c78e8825fac.js} +4 -4
  413. package/static-web/_next/static/chunks/8922-3babcd35e18e9e4f.js +1 -0
  414. package/static-web/_next/static/chunks/9440-eee639175695be7d.js +33 -0
  415. package/static-web/_next/static/chunks/9479-b48d19e3588823c1.js +34 -0
  416. package/static-web/_next/static/chunks/{9602.4e99e3525e5f062c.js → 9602.218427fc7b3d6b11.js} +1 -1
  417. package/static-web/_next/static/chunks/app/agents/[agentKey]/page-ef111ea0a3368752.js +1 -0
  418. package/static-web/_next/static/chunks/app/agents/page-aacead0f47cedb0d.js +1 -0
  419. package/static-web/_next/static/chunks/app/layout-ed608bbf9585e78f.js +99 -0
  420. package/static-web/_next/static/chunks/app/page-d22928276c36528c.js +1 -0
  421. package/static-web/_next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-045afd8c0908f923.js} +1 -1
  422. package/{_standalone/__next/static/chunks/app/setup/page-f5de08d0d588c778.js → static-web/_next/static/chunks/app/setup/page-034a608f19d04653.js} +1 -1
  423. package/static-web/_next/static/chunks/app/trash/page-251aaf5aac9d5a0b.js +1 -0
  424. package/static-web/_next/static/chunks/app/view/[...path]/page-7e17c3d13fe2e275.js +12 -0
  425. package/static-web/_next/static/chunks/webpack-1decda0633a8a874.js +1 -0
  426. package/static-web/_next/static/css/5f000212c8b2e09a.css +1 -0
  427. package/static-web/agent-icons/claude.svg +1 -0
  428. package/static-web/agent-icons/cursor.svg +1 -0
  429. package/static-web/agent-icons/github-copilot.svg +1 -0
  430. package/static-web/agent-icons/google.svg +1 -0
  431. package/static-web/agent-icons/openai.svg +1 -0
  432. package/static-web/agent-icons/windsurf.svg +1 -0
  433. package/static-web/help/index.html +5 -20
  434. package/static-web/index.html +8 -22
  435. package/static-web/setup/index.html +5 -20
  436. package/static-web/static-web-manifest.json +1 -1
  437. package/static-web/wiki/index.html +5 -20
  438. package/_standalone/__next/server/chunks/2037.js +0 -2
  439. package/_standalone/__next/server/chunks/9350.js +0 -11
  440. package/_standalone/__next/static/chunks/2288-4dcb8ad3ccbd651e.js +0 -1
  441. package/_standalone/__next/static/chunks/2461-a1073a0bd04c228a.js +0 -33
  442. package/_standalone/__next/static/chunks/3424-060f01a8983e438d.js +0 -1
  443. package/_standalone/__next/static/chunks/4172-4fc551f07f7d082f.js +0 -1
  444. package/_standalone/__next/static/chunks/4454-f582e17b76ccf1d1.js +0 -1
  445. package/_standalone/__next/static/chunks/47-41e1a06e6d389b69.js +0 -48
  446. package/_standalone/__next/static/chunks/5152-2db55438be7ecb94.js +0 -1
  447. package/_standalone/__next/static/chunks/5200-6c82e5ce54a95b4b.js +0 -6
  448. package/_standalone/__next/static/chunks/6274-f173cb227ad1ef21.js +0 -1
  449. package/_standalone/__next/static/chunks/6947.7e50e18da7dc4aef.js +0 -1
  450. package/_standalone/__next/static/chunks/725-3b648bf7929ff78d.js +0 -1
  451. package/_standalone/__next/static/chunks/9479-7b304601a56304cd.js +0 -32
  452. package/_standalone/__next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js +0 -1
  453. package/_standalone/__next/static/chunks/app/agents/page-6591b482a193e657.js +0 -1
  454. package/_standalone/__next/static/chunks/app/layout-5966cd317bbed698.js +0 -114
  455. package/_standalone/__next/static/chunks/app/page-5c9489e28657376e.js +0 -1
  456. package/_standalone/__next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  457. package/_standalone/__next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  458. package/_standalone/__next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  459. package/_standalone/__next/static/css/0d2fd378b5449176.css +0 -1
  460. package/static-web/_next/static/chunks/2288-4dcb8ad3ccbd651e.js +0 -1
  461. package/static-web/_next/static/chunks/2461-a1073a0bd04c228a.js +0 -33
  462. package/static-web/_next/static/chunks/3424-060f01a8983e438d.js +0 -1
  463. package/static-web/_next/static/chunks/4172-4fc551f07f7d082f.js +0 -1
  464. package/static-web/_next/static/chunks/4454-f582e17b76ccf1d1.js +0 -1
  465. package/static-web/_next/static/chunks/47-41e1a06e6d389b69.js +0 -48
  466. package/static-web/_next/static/chunks/5152-2db55438be7ecb94.js +0 -1
  467. package/static-web/_next/static/chunks/5200-6c82e5ce54a95b4b.js +0 -6
  468. package/static-web/_next/static/chunks/6274-f173cb227ad1ef21.js +0 -1
  469. package/static-web/_next/static/chunks/6947.7e50e18da7dc4aef.js +0 -1
  470. package/static-web/_next/static/chunks/725-3b648bf7929ff78d.js +0 -1
  471. package/static-web/_next/static/chunks/9479-7b304601a56304cd.js +0 -32
  472. package/static-web/_next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js +0 -1
  473. package/static-web/_next/static/chunks/app/agents/page-6591b482a193e657.js +0 -1
  474. package/static-web/_next/static/chunks/app/layout-5966cd317bbed698.js +0 -114
  475. package/static-web/_next/static/chunks/app/page-5c9489e28657376e.js +0 -1
  476. package/static-web/_next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  477. package/static-web/_next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  478. package/static-web/_next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  479. package/static-web/_next/static/css/0d2fd378b5449176.css +0 -1
  480. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_buildManifest.js +0 -0
  481. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_ssgManifest.js +0 -0
  482. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_buildManifest.js +0 -0
  483. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";exports.id=1976,exports.ids=[1976],exports.modules={7017:(a,b,c)=>{c.d(b,{G:()=>h});var d=c(33873),e=c.n(d),f=c(31751),g=c(59349);function h(a,b,c,d){let h=[],i=e().basename(b,".md"),j=b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),k=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=[RegExp(`\\[\\[${k}(?:[|#][^\\]]*)?\\]\\]`,"i"),RegExp(`\\[\\[${j}(?:[|#][^\\]]*)?\\]\\]`,"i"),RegExp(`\\[[^\\]]+\\]\\(${j}(?:#[^)]*)?\\)`,"i"),RegExp(`\\[[^\\]]+\\]\\([^)]*${k}\\.md(?:#[^)]*)?\\)`,"i"),RegExp("`"+j.replace(/\//g,"\\/")+"`")];for(let e of c||(d?d.filter(a=>a.endsWith(".md")&&a!==b):(0,f.f)(a).filter(a=>a.endsWith(".md")&&a!==b))){let c;if(e===b)continue;try{c=(0,g.TA)(a,e)}catch{continue}let d=c.split("\n");for(let a=0;a<d.length;a++)if(l.some(b=>b.test(d[a]))){let b=a;for(;b>0&&b>a-3&&""!==d[b].trim();)b--;let c=a;for(;c<d.length-1&&c<a+3&&""!==d[c].trim();)c++;let f=d.slice(b,c+1).join("\n").trim();f=f.replace(/\n{2,}/g," ↵ "),h.push({source:e,line:a+1,context:f});break}}return h}},11976:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{El:()=>y,F2:()=>G,FR:()=>I,G1:()=>L,H5:()=>C,JX:()=>p,WZ:()=>D,_P:()=>z,f:()=>x,fu:()=>A,g7:()=>J,getFileTree:()=>w,gm:()=>q,mV:()=>H,startFileWatcher:()=>t,vg:()=>F,wf:()=>E,x3:()=>B,zK:()=>K});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(39852),j=c(72385),k=c(23414),l=c(28647),m=c(82614),n=c(28287),o=a([j,k]);function p(){return(0,k.kh)()}[j,k]=o.then?(await o)():o;let M=new Set([".git","node_modules","app",".next",".DS_Store",".media","mcp"]),N=new Set([".md",".csv",".json",".pdf",".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".mp3",".wav",".m4a",".ogg",".flac",".aac",".mp4",".webm",".mov",".mkv"]),O=null,P=0,Q=new j.Xs;function q(){O=null,P++,(0,j._E)(),Q.invalidate()}function r(a){O=null,P++,(0,j.KZ)(p(),a),Q.isBuilt()&&Q.updateFile(p(),a)}function s(){var a;let b,c,d,e;return null!==O&&Date.now()-O.timestamp<3e4?O:(a=p(),b=m.Y.startTimer("tree.cache.build"),c=function a(b,c){let d,e=c??p();try{d=f().readdirSync(b,{withFileTypes:!0})}catch{return[]}let g=[];for(let c of d){let d=h().join(b,c.name),i=h().relative(e,d);if(c.isDirectory()){if(M.has(c.name))continue;let b=a(d,e);if(b.length>0){let a=b.some(a=>"file"===a.type&&"INSTRUCTION.md"===a.name),e={name:c.name,path:i,type:"directory",children:b};a&&(e.isSpace=!0,e.spacePreview=function(a){let b,c=h().join(a,"INSTRUCTION.md"),d=h().join(a,"README.md"),e=v(d);try{let a=f().readFileSync(d,"utf-8").match(/<!-- mindos:compiled (\S+) files:\d+ -->/);a&&(b=a[1])}catch{}return{instructionLines:u(c,3),readmeLines:u(d,3),isTemplate:v(c)&&e,readmeIsTemplate:e,lastCompiled:b}}(d)),g.push(e)}}else if(c.isFile()){let a=h().extname(c.name).toLowerCase();N.has(a)&&g.push({name:c.name,path:i,type:"file",extension:a})}}return g.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),g}(a),d=[],e=0,function a(b){for(let c of b)"file"===c.type?d.push(c.path):c.children&&(e++,a(c.children))}(c),b({fileCount:d.length,directoryCount:e}),O={tree:c,allFiles:d,timestamp:Date.now()},R||t(),O)}let R=null,S=null;function t(){let a;if(!R){try{a=p()}catch{return}try{(R=f().watch(a,{recursive:!0},(a,b)=>{!b||b.startsWith(".git")||b.includes("node_modules")||b.includes(".next")||(S&&clearTimeout(S),S=setTimeout(()=>{O=null,P++,S=null},500))})).on("error",()=>{S&&(clearTimeout(S),S=null),R&&(R.close(),R=null)})}catch{R=null}}}function u(a,b){try{let c=f().readFileSync(a,"utf-8"),d=[];for(let a of c.split("\n")){let c=a.trim();if(!(!c||c.startsWith("#"))&&(d.push(c),d.length>=b))break}return d}catch{return[]}}let T=["Define local execution rules for this directory.","(your files here)","(Describe the purpose and usage of this space.)","(Add usage guidelines for this space.)"];function v(a){try{let b=f().readFileSync(a,"utf-8");return T.some(a=>b.includes(a))}catch{return!1}}function w(){return s().tree}function x(){return s().allFiles}function y(a=10){let b=p(),c=x().map(a=>{try{let c=(0,j.n2)(b,a),d=f().statSync(c);return{path:a,mtime:d.mtimeMs}}catch{return null}}).filter(Boolean);return c.sort((a,b)=>b.mtime-a.mtime),c.slice(0,a)}function z(a){let b=p();if(".pdf"===h().extname(a).toLowerCase()){let c=(0,j.n2)(b,a);if(!f().existsSync(c))throw new i.Vt(i.tG.FILE_NOT_FOUND,`File not found: ${a}`,{filePath:a});let d=(0,l.b)(c);if(!d)throw new i.Vt(i.tG.INTERNAL_ERROR,`Could not extract text from PDF: ${a}`,{filePath:a});return d}return(0,j.TA)(b,a)}function A(a,b){(0,j._h)(p(),a,b),r(a)}function B(a,b=""){(0,j.x3)(p(),a,b),O=null,P++,(0,j.As)(p(),a),Q.isBuilt()&&Q.updateFile(p(),a)}function C(a,b){let c=(0,j.H5)(p(),a,b);return q(),c}function D(a,b){(0,j.WZ)(p(),a,b),r(a)}function E(a,b,c){(0,j.wf)(p(),a,b,c),r(a)}function F(a,b,c){(0,j.vg)(p(),a,b,c),r(a)}function G(a,b){let c=(0,j.F2)(p(),a,b);return r(a),c}function H(a,b){let c=(0,j.mV)(p(),a,b,j.G1);return q(),c}function I(a,b=10){return(0,j.FR)(p(),a,b)}function J(a,b){return(0,j.g7)(p(),a,b)}function K(a){let b=(0,n.F0)(p(),a);return q(),b}function L(a){let b,c=p(),d=(b=p(),!Q.isBuiltFor(b)&&Q.rebuild(b),Q).getBacklinks(a);return(0,j.G1)(c,a,d)}d()}catch(a){d(a)}})},12169:(a,b,c)=>{c.d(b,{FR:()=>f,g7:()=>g});var d=c(79646),e=c(13308);function f(a,b,c){let f=(0,e.n2)(a,b),g=(0,d.execFileSync)("git",["log","--follow","--format=%H%x00%aI%x00%s%x00%an","-n",String(c),"--",f],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();return g?g.split("\n").map(a=>{let[b,c,d,e]=a.split("\0");return{hash:b,date:c,message:d,author:e}}):[]}function g(a,b,c){let f=(0,e.n2)(a,b),g=(0,d.execFileSync)("git",["ls-files","--full-name",f],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();return g?(0,d.execFileSync)("git",["show",`${c}:${g}`],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}):(0,d.execFileSync)("git",["show",`${c}:${b}`],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}},13308:(a,b,c)=>{c.d(b,{cP:()=>A,n2:()=>B});var d=c(33873),e=c.n(d),f=c(29021),g=c.n(f);class h extends Error{constructor(a,b,c,d){super(a),this.name=this.constructor.name,this.code=b,this.statusCode=c,this.context=d?.context,this.cause=d?.cause,this.metadata={timestamp:Date.now(),...d?.metadata},Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,context:this.context,metadata:this.metadata,stack:this.stack}}toUserMessage(){return this.message}}let i={VALIDATION_ERROR:400,NOT_FOUND:404,UNAUTHORIZED:401,FORBIDDEN:403,CONFLICT:409,INTERNAL_ERROR:500,SERVICE_UNAVAILABLE:503,TIMEOUT:408,RATE_LIMIT_EXCEEDED:429,FILE_SYSTEM_ERROR:500,FILE_READ_ERROR:500,FILE_WRITE_ERROR:500,FILE_STAT_ERROR:500,FILE_REMOVE_ERROR:500,FILE_COPY_ERROR:500,FILE_MOVE_ERROR:500,FILE_WATCH_ERROR:500,DIRECTORY_READ_ERROR:500,DIRECTORY_CREATE_ERROR:500,DATABASE_ERROR:500,NETWORK_ERROR:500,CONFIGURATION_ERROR:500,SEARCH_ERROR:500,VECTOR_ERROR:500,MCP_ERROR:500},j={VALIDATION_ERROR:"Validation failed",NOT_FOUND:"Resource not found",UNAUTHORIZED:"Unauthorized access",FORBIDDEN:"Access forbidden",CONFLICT:"Resource conflict",INTERNAL_ERROR:"Internal server error",SERVICE_UNAVAILABLE:"Service unavailable",TIMEOUT:"Operation timed out",RATE_LIMIT_EXCEEDED:"Rate limit exceeded",FILE_SYSTEM_ERROR:"File system operation failed",FILE_READ_ERROR:"Failed to read file",FILE_WRITE_ERROR:"Failed to write file",FILE_STAT_ERROR:"Failed to get file stats",FILE_REMOVE_ERROR:"Failed to remove file",FILE_COPY_ERROR:"Failed to copy file",FILE_MOVE_ERROR:"Failed to move file",FILE_WATCH_ERROR:"Failed to watch file",DIRECTORY_READ_ERROR:"Failed to read directory",DIRECTORY_CREATE_ERROR:"Failed to create directory",DATABASE_ERROR:"Database operation failed",NETWORK_ERROR:"Network operation failed",CONFIGURATION_ERROR:"Configuration error",SEARCH_ERROR:"Search operation failed",VECTOR_ERROR:"Vector operation failed",MCP_ERROR:"MCP operation failed"};function k(a,b,c){let d=i[a],e=j[a];return new h(b??e,a,d,{...c,metadata:{...c?.metadata,retryable:["SERVICE_UNAVAILABLE","TIMEOUT","NETWORK_ERROR"].includes(a),retryAfter:function(a){switch(a){case"RATE_LIMIT_EXCEEDED":return 6e4;case"SERVICE_UNAVAILABLE":return 5e3;case"TIMEOUT":return 1e3;case"NETWORK_ERROR":return 2e3;default:return 0}}(a)}})}let l=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,m=/[<>:"|?*\x00-\x1f]/;function n(a){return/^[A-Za-z]:/.test(a)}function o(a,b){let c,e,f;if(c=d.resolve(b),e=d.resolve(a),""!==(f=d.relative(c,e))&&(".."===f||f.startsWith(`..${d.sep}`)||d.isAbsolute(f)))throw k("VALIDATION_ERROR","Access denied: path outside root",{context:{resolved:a,root:b}})}function p(a,b,c,d,e,f){return{path:a,webRouteFile:`packages/web/app${a}/route.ts`,owner:b,adapter:c,phase:d,risk:e,residualRisk:f}}let q=(a,b="low")=>p(a,"product-owned","next-response","Phase 1: migrated Product Server adapter",b,"No residual product ownership expected; this route should remain a thin Next adapter."),r=(a,b,c,d)=>p(a,"optional-capability","optional-capability",b,c,d),s=(a,b,c="medium")=>p(a,"host-owned","host","Host-owned",c,b);[q("/api/a2a/agents","medium"),q("/api/a2a/delegations","medium"),q("/api/a2a/discover","medium"),q("/api/a2a","medium"),q("/api/acp/config","high"),q("/api/acp/detect","medium"),q("/api/acp/install","high"),q("/api/acp/registry","medium"),q("/api/acp/session","high"),q("/api/agent-activity"),q("/api/agents/copy-skill","high"),q("/api/agents/custom/detect","medium"),q("/api/agents/custom","high"),q("/api/ask-sessions"),p("/api/ask","product-owned","stream","Phase 6: generated client and stream adapter","high","Ask is mostly Product runtime-owned through session and agent modules, but the streaming Web route still owns host assembly and should become a generated stream adapter."),s("/api/auth","Auth cookie/session handling is host-specific today; Product Server will need an auth context adapter before direct HTTP exposure.","high"),q("/api/backlinks"),q("/api/bootstrap"),q("/api/changes"),q("/api/channels/verify","medium"),q("/api/connect"),q("/api/embedding","medium"),r("/api/export","Phase 5: content ingestion optional capabilities","high","Export/archive logic carries heavy dependencies and filesystem writes that need optional capability packaging."),r("/api/extract-docx","Phase 5: content ingestion optional capabilities","high","DOCX extraction should be Product-owned but lazy-loaded so parser dependencies do not inflate the default package."),r("/api/extract-pdf","Phase 5: content ingestion optional capabilities","high","PDF extraction should be Product-owned but lazy-loaded so parser dependencies do not inflate the default package."),r("/api/file/import","Phase 5: content ingestion optional capabilities","high","File import is a content-ingestion write path and needs capability-level size limits, conflict checks, and rollback."),q("/api/file/raw"),q("/api/file","high"),q("/api/files"),q("/api/git"),q("/api/graph"),q("/api/health"),q("/api/im/activity","medium"),q("/api/im/config","high"),s("/api/im/feishu/long-connection/event","Raw long-connection event delivery is host-specific, but event parsing and state updates should stay behind Product protocol handlers.","medium"),q("/api/im/feishu/long-connection","high"),q("/api/im/status","medium"),q("/api/im/test","medium"),q("/api/im/webhook-status","medium"),s("/api/im/webhook/feishu","Raw inbound Feishu webhook receipt is host-owned, while signature verification and state writes should move to Product protocol handlers.","high"),r("/api/inbox/clip","Phase 5: content ingestion optional capabilities","high","Inbox clipping is still Web-owned ingestion and needs optional capability packaging plus fetch timeout and content limits."),q("/api/inbox","medium"),q("/api/init","high"),r("/api/lint","Phase 5: content ingestion optional capabilities","medium","Knowledge linting remains Web-owned and should become an optional Product capability with bounded filesystem traversal."),q("/api/mcp/agents","high"),q("/api/mcp/direct-tools","medium"),q("/api/mcp/install-skill","high"),q("/api/mcp/install","high"),q("/api/mcp/restart","high"),q("/api/mcp/status"),q("/api/mcp/tools","medium"),q("/api/mcp/uninstall","high"),q("/api/monitoring","medium"),r("/api/obsidian-plugins/settings","Phase 5: content ingestion optional capabilities","medium","Obsidian plugin settings remain Web-owned and should be modeled as an optional Product compatibility capability."),r("/api/obsidian/compat-report","Phase 5: content ingestion optional capabilities","medium","Obsidian compatibility reporting remains Web-owned and should use optional capability diagnostics."),r("/api/obsidian/import","Phase 5: content ingestion optional capabilities","high","Obsidian import remains a Web-owned bulk write path and needs optional capability size limits and rollback."),q("/api/recent-files"),q("/api/restart","high"),q("/api/search/prewarm"),q("/api/search"),q("/api/settings/list-models","medium"),q("/api/settings/reset-token","high"),q("/api/settings","medium"),q("/api/settings/test-key","medium"),q("/api/setup/check-path","medium"),q("/api/setup/check-port","medium"),q("/api/setup/generate-token","medium"),q("/api/setup/ls","medium"),q("/api/setup","high"),q("/api/skills","high"),q("/api/space-overview"),q("/api/sync","high"),q("/api/tree-version"),q("/api/uninstall","high"),q("/api/update-check"),q("/api/update-status"),q("/api/update","high"),q("/api/workflows","medium")].map(a=>[a.path,a]),c(51455),c(73024);var t=c(76760);c(77598);var u=c(48161);function v(a){return"darwin"===process.platform?a.darwin:"win32"===process.platform?`${(process.env.APPDATA||(0,t.join)((0,u.homedir)(),"AppData","Roaming")).replace(/\\/g,"/").replace(/\/+$/,"")}/${a.win32}`:a.linux}c(37067),c(73136),v({darwin:"~/Library/Application Support/Code/User",linux:"~/.config/Code/User",win32:"Code/User"}),v({darwin:"~/Library/Application Support/Code",linux:"~/.config/Code",win32:"Code"}),v({darwin:"~/Library/Application Support/Trae CN",linux:"~/.config/Trae CN",win32:"Trae CN"}),c(31421),c(50294);var w=c(79646);(0,c(28354).promisify)(w.execFile),(0,t.join)((0,u.homedir)(),".mindos","im-activity.json"),(0,t.join)((0,u.homedir)(),".mindos","im.json"),(0,t.join)((0,u.homedir)(),".mindos","im.json"),(0,t.join)((0,u.homedir)(),".mindos","im.json"),c(21820),c(77030),c(38264);let x=(0,t.join)((0,u.homedir)(),".mindos");(0,t.join)(x,"config.json"),(0,t.join)(x,"sync-state.json"),[{id:"health",method:"GET",path:"/api/health",auth:"public"},{id:"files",method:"GET",path:"/api/files",auth:"required"},{id:"recent-files",method:"GET",path:"/api/recent-files",auth:"required"},{id:"tree-version",method:"GET",path:"/api/tree-version",auth:"required"},{id:"file.read",method:"GET",path:"/api/file",auth:"required"},{id:"file.write",method:"POST",path:"/api/file",auth:"required"},{id:"file.raw",method:"GET",path:"/api/file/raw",auth:"required"},{id:"search",method:"GET",path:"/api/search",auth:"required"},{id:"search.prewarm",method:"GET",path:"/api/search/prewarm",auth:"required"},{id:"a2a",method:"POST",path:"/api/a2a",auth:"required"},{id:"a2a.options",method:"OPTIONS",path:"/api/a2a",auth:"public"},{id:"a2a.agents",method:"GET",path:"/api/a2a/agents",auth:"required"},{id:"a2a.delegations",method:"GET",path:"/api/a2a/delegations",auth:"required"},{id:"a2a.discover",method:"POST",path:"/api/a2a/discover",auth:"required"},{id:"acp.config",method:"GET",path:"/api/acp/config",auth:"required"},{id:"acp.config.update",method:"POST",path:"/api/acp/config",auth:"required"},{id:"acp.config.delete",method:"DELETE",path:"/api/acp/config",auth:"required"},{id:"acp.detect",method:"GET",path:"/api/acp/detect",auth:"required"},{id:"acp.install",method:"POST",path:"/api/acp/install",auth:"required"},{id:"acp.registry",method:"GET",path:"/api/acp/registry",auth:"required"},{id:"acp.session",method:"GET",path:"/api/acp/session",auth:"required"},{id:"acp.session.action",method:"POST",path:"/api/acp/session",auth:"required"},{id:"acp.session.close",method:"DELETE",path:"/api/acp/session",auth:"required"},{id:"backlinks",method:"GET",path:"/api/backlinks",auth:"required"},{id:"graph",method:"GET",path:"/api/graph",auth:"required"},{id:"agent-activity",method:"GET",path:"/api/agent-activity",auth:"required"},{id:"bootstrap",method:"GET",path:"/api/bootstrap",auth:"required"},{id:"connect",method:"GET",path:"/api/connect",auth:"required"},{id:"embedding",method:"GET",path:"/api/embedding",auth:"required"},{id:"embedding.action",method:"POST",path:"/api/embedding",auth:"required"},{id:"channels.verify",method:"POST",path:"/api/channels/verify",auth:"required"},{id:"im.activity",method:"GET",path:"/api/im/activity",auth:"required"},{id:"im.config",method:"GET",path:"/api/im/config",auth:"required"},{id:"im.config.update",method:"PUT",path:"/api/im/config",auth:"required"},{id:"im.config.delete",method:"DELETE",path:"/api/im/config",auth:"required"},{id:"im.status",method:"GET",path:"/api/im/status",auth:"required"},{id:"im.test",method:"POST",path:"/api/im/test",auth:"required"},{id:"im.webhook-status",method:"GET",path:"/api/im/webhook-status",auth:"required"},{id:"im.feishu.long-connection",method:"GET",path:"/api/im/feishu/long-connection",auth:"required"},{id:"im.feishu.long-connection.start",method:"POST",path:"/api/im/feishu/long-connection",auth:"required"},{id:"im.feishu.long-connection.stop",method:"DELETE",path:"/api/im/feishu/long-connection",auth:"required"},{id:"monitoring",method:"GET",path:"/api/monitoring",auth:"required"},{id:"update-status",method:"GET",path:"/api/update-status",auth:"required"},{id:"update-check",method:"GET",path:"/api/update-check",auth:"required"},{id:"restart",method:"POST",path:"/api/restart",auth:"required"},{id:"update",method:"POST",path:"/api/update",auth:"required"},{id:"uninstall",method:"POST",path:"/api/uninstall",auth:"required"},{id:"init",method:"POST",path:"/api/init",auth:"required"},{id:"sync",method:"GET",path:"/api/sync",auth:"required"},{id:"sync.action",method:"POST",path:"/api/sync",auth:"required"},{id:"inbox",method:"GET",path:"/api/inbox",auth:"required"},{id:"inbox.save",method:"POST",path:"/api/inbox",auth:"required"},{id:"inbox.archive",method:"DELETE",path:"/api/inbox",auth:"required"},{id:"setup.check-path",method:"POST",path:"/api/setup/check-path",auth:"required"},{id:"setup.check-port",method:"POST",path:"/api/setup/check-port",auth:"required"},{id:"setup.generate-token",method:"POST",path:"/api/setup/generate-token",auth:"required"},{id:"setup.ls",method:"POST",path:"/api/setup/ls",auth:"required"},{id:"setup",method:"GET",path:"/api/setup",auth:"required"},{id:"setup.apply",method:"POST",path:"/api/setup",auth:"required"},{id:"setup.guide-state",method:"PATCH",path:"/api/setup",auth:"required"},{id:"workflows",method:"GET",path:"/api/workflows",auth:"required"},{id:"workflows.create",method:"POST",path:"/api/workflows",auth:"required"},{id:"ask.stream",method:"POST",path:"/api/ask",auth:"required"},{id:"ask-sessions",method:"GET",path:"/api/ask-sessions",auth:"required"},{id:"ask-sessions.save",method:"POST",path:"/api/ask-sessions",auth:"required"},{id:"ask-sessions.delete",method:"DELETE",path:"/api/ask-sessions",auth:"required"},{id:"space-overview",method:"GET",path:"/api/space-overview",auth:"required"},{id:"git",method:"GET",path:"/api/git",auth:"required"},{id:"settings",method:"GET",path:"/api/settings",auth:"required"},{id:"settings.update",method:"POST",path:"/api/settings",auth:"required"},{id:"settings.reset-token",method:"POST",path:"/api/settings/reset-token",auth:"required"},{id:"settings.test-key",method:"POST",path:"/api/settings/test-key",auth:"required"},{id:"settings.list-models",method:"POST",path:"/api/settings/list-models",auth:"required"},{id:"mcp.status",method:"GET",path:"/api/mcp/status",auth:"required"},{id:"mcp.agents",method:"GET",path:"/api/mcp/agents",auth:"required"},{id:"mcp.tools",method:"GET",path:"/api/mcp/tools",auth:"required"},{id:"mcp.direct-tools",method:"POST",path:"/api/mcp/direct-tools",auth:"required"},{id:"mcp.install",method:"POST",path:"/api/mcp/install",auth:"required"},{id:"mcp.install-skill",method:"POST",path:"/api/mcp/install-skill",auth:"required"},{id:"mcp.restart",method:"POST",path:"/api/mcp/restart",auth:"required"},{id:"mcp.uninstall",method:"POST",path:"/api/mcp/uninstall",auth:"required"},{id:"skills",method:"GET",path:"/api/skills",auth:"required"},{id:"skills.action",method:"POST",path:"/api/skills",auth:"required"},{id:"changes",method:"GET",path:"/api/changes",auth:"required"},{id:"changes.mark-seen",method:"POST",path:"/api/changes",auth:"required"},{id:"agents.custom.create",method:"POST",path:"/api/agents/custom",auth:"required"},{id:"agents.custom.update",method:"PUT",path:"/api/agents/custom",auth:"required"},{id:"agents.custom.delete",method:"DELETE",path:"/api/agents/custom",auth:"required"},{id:"agents.custom.detect",method:"POST",path:"/api/agents/custom/detect",auth:"required"},{id:"agents.copy-skill",method:"POST",path:"/api/agents/copy-skill",auth:"required"}].map(a=>[`${a.method} ${a.path}`,a.auth]),c(84389);var y=c(39852);function z(a,b){return a instanceof y.Vt?a:new y.Vt(y.tG.PATH_OUTSIDE_ROOT,a?.message||"Access denied: path outside MIND_ROOT",a?.context??b)}function A(a,b){try{o(a,b)}catch(c){throw z(c,{resolved:a,root:b})}}function B(a,b){var c,f;let h,i,j,p,q,r=function(a,b){try{let g=b.replace(/\\/g,"/");if(d.isAbsolute(g)||d.win32.isAbsolute(b)||d.win32.isAbsolute(g)||n(b)||n(g))throw k("VALIDATION_ERROR","Access denied: absolute paths are not allowed",{context:{root:a,filePath:b}});var c=a,e=b,f=g;for(let a of f.split("/"))if(a&&"."!==a&&(a.endsWith(".")||a.endsWith(" ")||l.test(a)||m.test(a)))throw k("VALIDATION_ERROR","Access denied: path contains a Windows-invalid file name segment",{context:{root:c,filePath:e,segment:a}});let h=d.resolve(a),i=d.resolve(d.join(h,g));return o(i,h),i}catch(c){throw z(c,{mindRoot:a,filePath:b})}}(a,b),s=function(a){let b=a;for(;!g().existsSync(b);){let a=e().dirname(b);if(a===b)break;b=a}return b}(r);try{h=g().realpathSync(e().resolve(a)),i=g().realpathSync(s)}catch(c){throw z(c,{mindRoot:a,filePath:b,resolved:r,existing:s})}if(c=i,f=h,j=e().resolve(f),p=e().resolve(c),""!==(q=e().relative(j,p))&&(".."===q||q.startsWith(`..${e().sep}`)||e().isAbsolute(q)))throw new y.Vt(y.tG.PATH_OUTSIDE_ROOT,"Access denied: symlink resolves outside MIND_ROOT",{mindRoot:a,filePath:b,resolved:r,existing:s,targetReal:i});return r}},14360:(a,b,c)=>{c.d(b,{P2:()=>j,WZ:()=>k,vg:()=>m,wf:()=>l});var d=c(29021),e=c.n(d),f=c(59349),g=c(39852),h=c(13308);function i(a,b){return(0,f.TA)(a,b).split("\n")}function j(a,b,c,d,e){let h=i(a,b);var j=h.length;if(c<0||d<0)throw new g.Vt(g.tG.INVALID_RANGE,"Invalid line index: indices must be >= 0",{start:c,end:d});if(c>d)throw new g.Vt(g.tG.INVALID_RANGE,`Invalid range: start (${c}) > end (${d})`,{start:c,end:d});if(c>=j)throw new g.Vt(g.tG.INVALID_RANGE,`Invalid line index: start (${c}) >= total lines (${j})`,{start:c,totalLines:j});h.splice(c,d-c+1,...e),(0,f._h)(a,b,h.join("\n"))}function k(a,b,c){let d=(0,h.n2)(a,b);try{let a=e().statSync(d);if(0===a.size)return void e().appendFileSync(d,c,"utf-8");let b=Math.min(8,a.size),f=e().openSync(d,"r");try{let g=Buffer.alloc(b);e().readSync(f,g,0,b,Math.max(0,a.size-b));let h=g.toString("utf-8").endsWith("\n\n")?"":"\n";e().appendFileSync(d,h+c,"utf-8")}finally{e().closeSync(f)}}catch(g){let d=(0,f.TA)(a,b),e=d.length>0&&!d.endsWith("\n\n")?"\n":"";(0,f._h)(a,b,d+e+c)}}function l(a,b,c,d){let e=i(a,b),h=e.findIndex(a=>{let b=a.trim();return b===c||b.replace(/^#+\s*/,"")===c.replace(/^#+\s*/,"")});if(-1===h)throw new g.Vt(g.tG.HEADING_NOT_FOUND,`Heading not found: "${c}"`,{heading:c});let j=h+1;for(;j<e.length&&""===e[j].trim();)j++;!function(a,b,c,d){let e=i(a,b);if(c>=e.length)throw new g.Vt(g.tG.INVALID_RANGE,`Invalid after_index: ${c} >= total lines (${e.length})`,{afterIndex:c,totalLines:e.length});e.splice(c<0?0:c+1,0,...d),(0,f._h)(a,b,e.join("\n"))}(a,b,j-1,["",d])}function m(a,b,c,d){let e=i(a,b),f=e.findIndex(a=>{let b=a.trim();return b===c||b.replace(/^#+\s*/,"")===c.replace(/^#+\s*/,"")});if(-1===f)throw new g.Vt(g.tG.HEADING_NOT_FOUND,`Heading not found: "${c}"`,{heading:c});let h=(e[f].match(/^#+/)??[""])[0].length,k=e.length-1;for(let a=f+1;a<e.length;a++){let b=e[a].match(/^(#+)\s/);if(b&&b[1].length<=h){k=a-1;break}}for(;k>f&&""===e[k].trim();)k--;j(a,b,f+1,k,["",d])}},22288:(a,b,c)=>{var d=c(73566),e=c(31751),f=c(59349),g=c(13308),h=c(28647),i=c(87155),j=c(33873),k=c.n(j);let l="u">typeof Intl&&Intl.Segmenter?new Intl.Segmenter("zh",{granularity:"word"}):null;function m(a,b){for(let c=0;c<a.length;c++)b.add(a[c]),c+1<a.length&&b.add(a[c]+a[c+1])}if(d.parentPort&&d.workerData?.mindRoot)try{let a=function(a){let b=(0,e.f)(a),c={},d={},j=0;for(let e of b){let b;if(".pdf"===k().extname(e).toLowerCase())try{let c=(0,g.n2)(a,e);if(!(b=(0,h.b)(c)))continue}catch{continue}else try{b=(0,f.TA)(a,e)}catch{continue}for(let a of(d[e]=b.length,j+=b.length,b.length>5e4&&(b=b.slice(0,5e4)),function(a){let b=new Set,c=a.toLowerCase(),d=c.match(/[a-z0-9_$@#]+/g);if(d)for(let a of d)a.length>=2&&b.add(a);if(i.y.test(c))if(l)for(let{segment:a,isWordLike:d}of l.segment(c)){if(!d)continue;let c=a.trim();if(c)for(let a of(b.add(c),c))i.y.test(a)&&b.add(a)}else{let a=[];for(let d of c)i.y.test(d)?a.push(d):a.length>0&&(m(a,b),a.length=0);a.length>0&&m(a,b)}return b}(e+"\n"+b)))c[a]||(c[a]=[]),c[a].push(e)}return{version:1,builtForRoot:a,fileCount:b.length,totalChars:j,docLengths:d,invertedIndex:c,timestamp:Date.now()}}(d.workerData.mindRoot);d.parentPort.postMessage({ok:!0,data:a})}catch(a){d.parentPort.postMessage({ok:!1,error:a instanceof Error?a.message:String(a)})}},23414:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Sf:()=>p,kh:()=>q,sb:()=>o});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(21820),j=c.n(i),k=c(28696),l=c(31756),m=c(62697),n=a([l,m]);[l,m]=n.then?(await n)():n;let r=h().join(j().homedir(),".mindos","config.json"),s={ai:{activeProvider:"",providers:[]},mindRoot:""},t=new Set(["free","tavily","brave","serper","bing-api"]);function o(){try{var a;let c=f().readFileSync(r,"utf-8"),d=JSON.parse(c),e=d.ai,g=e&&!Array.isArray(e.providers),i={ai:function(a){let b=a.ai;if(!b)return{...s.ai};if(Array.isArray(b.providers)){let a=(0,m.S9)(b.providers),c="string"==typeof b.activeProvider?b.activeProvider:"";return{activeProvider:function(a,b){if(a&&(0,m.Ny)(a)&&(0,m.lh)(b,a))return a;if(a&&(0,l.rl)(a)){let c=b.find(b=>b.protocol===a);if(c)return c.id}return b[0]?.id??""}(c,a),providers:a}}let c=(0,m.Ko)(a);return c?{activeProvider:c.activeProvider,providers:c.providers}:{...s.ai}}(d),agent:function(a){if(!a||"object"!=typeof a)return;let b={};return"number"==typeof a.maxSteps&&(b.maxSteps=Math.min(999,Math.max(1,a.maxSteps))),"boolean"==typeof a.enableThinking&&(b.enableThinking=a.enableThinking),"number"==typeof a.thinkingBudget&&(b.thinkingBudget=Math.min(5e4,Math.max(1e3,a.thinkingBudget))),("auto"===a.contextStrategy||"off"===a.contextStrategy)&&(b.contextStrategy=a.contextStrategy),"number"==typeof a.reconnectRetries&&(b.reconnectRetries=Math.min(10,Math.max(0,a.reconnectRetries))),Object.keys(b).length>0?b:void 0}(d.agent),embedding:function(a){if(!a||"object"!=typeof a||"boolean"!=typeof a.enabled)return;let b="local"===a.provider||"api"===a.provider?a.provider:"api";return{enabled:a.enabled,provider:b,baseUrl:"string"==typeof a.baseUrl?a.baseUrl:"",apiKey:"string"==typeof a.apiKey?a.apiKey:"",model:"string"==typeof a.model?a.model:""}}(d.embedding),webSearch:function(a){if(a&&"object"==typeof a)return{provider:"string"==typeof a.provider&&t.has(a.provider)?a.provider:"free",apiKey:"string"==typeof a.apiKey?a.apiKey:""}}(d.webSearch),acpAgents:(a=d.acpAgents,(0,k.gG)(a)),mindRoot:d.mindRoot??s.mindRoot,webPassword:"string"==typeof d.webPassword?d.webPassword:void 0,authToken:"string"==typeof d.authToken?d.authToken:void 0,allowNetworkAccess:!0===d.allowNetworkAccess,mcpPort:"number"==typeof d.mcpPort?d.mcpPort:void 0,port:"number"==typeof d.port?d.port:void 0,startMode:"string"==typeof d.startMode?d.startMode:void 0,setupPending:!0===d.setupPending||void 0,disabledSkills:Array.isArray(d.disabledSkills)?d.disabledSkills:void 0,guideState:function(a){if(!a||"object"!=typeof a||!0!==a.active)return;let b="en"===a.template||"zh"===a.template||"empty"===a.template?a.template:"en";return{active:!0,dismissed:!0===a.dismissed,template:b,step1Done:!0===a.step1Done,askedAI:!0===a.askedAI,nextStepIndex:"number"==typeof a.nextStepIndex?a.nextStepIndex:0,walkthroughStep:"number"==typeof a.walkthroughStep?a.walkthroughStep:void 0,walkthroughDismissed:"boolean"==typeof a.walkthroughDismissed?a.walkthroughDismissed:void 0}}(d.guideState),baseUrlCompat:(()=>{let a=d.baseUrlCompat;if(!a||"object"!=typeof a)return;let b={};for(let[c,d]of Object.entries(a))("streaming"===d||"non-streaming"===d)&&(b[c]=d);return Object.keys(b).length>0?b:void 0})(),connectionMode:function(a){if(a.connectionMode&&"object"==typeof a.connectionMode){let b=a.connectionMode;if("boolean"==typeof b.cli&&"boolean"==typeof b.mcp)return{cli:b.cli,mcp:b.mcp}}let b=!0===a.setupPending||!a.mindRoot;return{cli:!0,mcp:!b}}(d),customAgents:Array.isArray(d.customAgents)?d.customAgents:void 0};if(g)try{var b=i;let a=h().dirname(r);f().existsSync(a)||f().mkdirSync(a,{recursive:!0});let c={};try{c=JSON.parse(f().readFileSync(r,"utf-8"))}catch{}let d={...c,ai:b.ai,mindRoot:b.mindRoot};void 0!==b.agent&&(d.agent=b.agent),void 0!==b.embedding&&(d.embedding=b.embedding),void 0!==b.webSearch&&(d.webSearch=b.webSearch),void 0!==b.webPassword&&(d.webPassword=b.webPassword),void 0!==b.authToken&&(d.authToken=b.authToken),"boolean"==typeof b.allowNetworkAccess&&(d.allowNetworkAccess=b.allowNetworkAccess),void 0!==b.port&&(d.port=b.port),void 0!==b.mcpPort&&(d.mcpPort=b.mcpPort),void 0!==b.startMode&&(d.startMode=b.startMode),void 0!==b.disabledSkills&&(d.disabledSkills=b.disabledSkills),void 0!==b.guideState&&(d.guideState=b.guideState),void 0!==b.acpAgents&&(d.acpAgents=b.acpAgents),void 0!==b.baseUrlCompat&&(d.baseUrlCompat=b.baseUrlCompat),void 0!==b.connectionMode&&(d.connectionMode=b.connectionMode),void 0!==b.customAgents&&(d.customAgents=b.customAgents),void 0!==b.skillPaths&&(d.skillPaths=b.skillPaths),delete d.customProviders,"setupPending"in b&&(b.setupPending?d.setupPending=!0:delete d.setupPending),"setupPort"in b&&(b.setupPort?d.setupPort=b.setupPort:delete d.setupPort),f().writeFileSync(r,JSON.stringify(d,null,2)+"\n","utf-8")}catch{}return i}catch{return{...s,ai:{...s.ai,providers:[]},setupPending:!0,connectionMode:{cli:!0,mcp:!1},allowNetworkAccess:!1}}}function p(a){let b=o(),c=a||b.ai.activeProvider,d=c?(0,m.lh)(b.ai.providers,c):void 0;if(!d&&a&&(0,l.rl)(a)){let c=b.ai.activeProvider?(0,m.lh)(b.ai.providers,b.ai.activeProvider):void 0;d=c?.protocol===a?c:b.ai.providers.find(b=>b.protocol===a)}if(d){let a=l.T_[d.protocol],b=d.apiKey||(0,l.lr)(d.protocol)||a?.apiKeyFallback||"",c=d.model||a?.defaultModel||"",e=d.baseUrl||a?.fixedBaseUrl||"";return{provider:d.protocol,apiKey:b,model:c,baseUrl:e}}let e=a&&(0,l.rl)(a)?a:process.env.AI_PROVIDER,f=e&&(0,l.rl)(e)?e:"anthropic",g=l.T_[f]??l.T_.anthropic;return{provider:f,apiKey:(0,l.lr)(f)||g.apiKeyFallback||"",model:g.defaultModel,baseUrl:g.fixedBaseUrl||""}}function q(){return o().mindRoot||process.env.MIND_ROOT||h().join(j().homedir(),"MindOS","mind")}d()}catch(a){d(a)}})},27152:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Bk:()=>p,II:()=>o,s7:()=>q});var e=c(23414),f=c(79646),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(33873),l=c.n(k),m=c(79551),n=a([e]);function o(){try{let a=(0,e.sb)().embedding;if(!a||!a.enabled||"api"===a.provider&&(!a.baseUrl||!a.model)||"local"===a.provider&&!a.model)return null;return{enabled:!0,provider:a.provider||"api",baseUrl:(a.baseUrl||"").replace(/\/+$/,""),apiKey:a.apiKey||"",model:a.model}}catch{return null}}async function p(a){let b=o();if(!b||0===a.length)return[];try{if("local"===b.provider)return await x(b.model,a);return await y(b,a)}catch(a){return console.error("[embedding] Failed to get embeddings:",a instanceof Error?a.message:a),[]}}async function q(a){let b=await p([a]);return b.length>0?b[0]:null}e=(n.then?(await n)():n)[0];let B=["@huggingface/transformers@4.2.0","onnxruntime-node@1.24.3","onnxruntime-web@1.26.0-dev.20260416-b7804b056c"],C=Function("specifier","return import(specifier)");class D extends Error{constructor(a="Local embedding runtime is not installed. Install it from Settings > AI > Embedding Search, or use API mode."){super(a),this.name="LocalEmbeddingRuntimeMissingError"}}function r(){return process.env.MINDOS_LOCAL_EMBEDDING_RUNTIME_DIR||l().join(j().homedir(),".mindos","local-embedding-runtime")}let E=null,F=null,G=null;async function s(){let a=r();h().mkdirSync(a,{recursive:!0});let b=l().join(a,"package.json");h().existsSync(b)||h().writeFileSync(b,JSON.stringify({private:!0,name:"mindos-local-embedding-runtime",description:"Optional MindOS local embedding runtime installed on user request."},null,2)+"\n");let c=function(){if(process.env.MINDOS_NPM_BIN)return{command:process.env.MINDOS_NPM_BIN,args:[]};let a=process.env.MINDOS_PROJECT_ROOT;if(a){let b=l().join(a,"node","lib","node_modules","npm","bin","npm-cli.js");if(h().existsSync(b))return{command:process.env.MINDOS_NODE_BIN||process.execPath,args:[b]}}return{command:"win32"===process.platform?"npm.cmd":"npm",args:[]}}(),d=[...c.args,"install","--prefix",a,"--omit=dev","--no-audit","--no-fund","--ignore-scripts",...B];await t(c.command,d,6e5)}async function t(a,b,c){await new Promise((d,e)=>{let g=(0,f.spawn)(a,b,{stdio:["ignore","pipe","pipe"],env:process.env}),h="",i=setTimeout(()=>{g.kill("SIGTERM"),e(Error("Local embedding runtime install timed out. Check your network and try again, or use API mode."))},c);g.stdout.on("data",a=>{(h+=a.toString()).length>8e3&&(h=h.slice(-8e3))}),g.stderr.on("data",a=>{(h+=a.toString()).length>8e3&&(h=h.slice(-8e3))}),g.on("error",a=>{clearTimeout(i),"ENOENT"===a.code?e(Error("npm is required to install the optional local embedding runtime. Install Node.js/npm, or use API embedding mode.")):e(a)}),g.on("exit",a=>{clearTimeout(i),0===a?d():e(Error(`Local embedding runtime install failed with exit code ${a}. ${h.trim().slice(-1e3)}`))})})}async function u(a){return E&&F===a?E:G&&F===a?G:(F=a,G=(async()=>{for(let b=0;b<=2;b++){let c=null,d=!1,e=null;try{let{pipeline:e,env:f}=await v({installIfMissing:!1});process.env.HF_ENDPOINT||f.remoteHost||(console.log("[embedding] Configuring hf-mirror.com for better connectivity in China"),f.remoteHost="https://hf-mirror.com",f.remotePathTemplate="{model}/resolve/{revision}/{fileName}"),c=setTimeout(()=>{d=!0},3e5),console.log(`[embedding] Attempt ${b+1}/3: Loading pipeline for ${a}...`);let g=e("feature-extraction",a,{dtype:"fp32"});return E=await g,c&&clearTimeout(c),console.log(`[embedding] Successfully loaded pipeline for ${a}`),E}catch(f){e=f instanceof Error?f:Error(String(f)),c&&clearTimeout(c),d&&(e=Error("Request timeout (>300s)"));let a=function(a){if(!(a instanceof Error))return!1;let b=a.message.toLowerCase();return b.includes("enotfound")||b.includes("econnrefused")||b.includes("econnreset")||b.includes("etimedout")||b.includes("timeout")||b.includes("temporarily unavailable")||b.includes("connect econnrefused")||b.includes("net::err_internet_disconnected")||b.includes("eaddrnotavail")||b.includes("enetunreach")||b.includes("socket hang up")}(e)&&b<2;if(console.error(`[embedding] Download attempt ${b+1}/3 failed: ${e.message}`+(a?` — retrying...`:" — giving up")),a){let a=1e3*Math.pow(2,b);console.log(`[embedding] Waiting ${a}ms before retry...`),await new Promise(b=>setTimeout(b,a));continue}throw E=null,F=null,G=null,e}}})())}async function v({installIfMissing:a}){try{return await Promise.resolve().then(c.bind(c,99253))}catch(c){let b=w();if(b)return await C((0,m.pathToFileURL)(b).href);if(a){await s();let a=w();if(a)return await C((0,m.pathToFileURL)(a).href)}throw new D(c instanceof Error&&c.message.includes("@huggingface/transformers")?void 0:`Local embedding runtime is unavailable: ${c instanceof Error?c.message:String(c)}`)}}function w(){let a=l().join(r(),"node_modules","@huggingface","transformers"),b=l().join(a,"package.json");if(!h().existsSync(b))return null;try{let c=JSON.parse(h().readFileSync(b,"utf-8")),d=c.exports?.node?.import?.default,e="string"==typeof d?d:"string"==typeof c.module?c.module:c.main;if("string"!=typeof e)return null;let f=l().resolve(a,e);return h().existsSync(f)?f:null}catch{return null}}async function x(a,b){let c=await u(a);if(!c)return[];let d=[];for(let a=0;a<b.length;a+=32)for(let e of b.slice(a,a+32)){let a=(await c(e,{pooling:"mean",normalize:!0})).data;d.push(new Float32Array(a))}return d}async function y(a,b){let c=[];for(let d=0;d<b.length;d+=100){let e=b.slice(d,d+100),f=await z(a,e);if(0===f.length)return[];c.push(...f)}return c}async function z(a,b){let c=`${a.baseUrl}/embeddings`,d=JSON.stringify({model:a.model,input:b}),e={"Content-Type":"application/json"};a.apiKey&&(e.Authorization=`Bearer ${a.apiKey}`);for(let a=0;a<=2;a++)try{let b=new AbortController,f=setTimeout(()=>b.abort(),3e4),g=await fetch(c,{method:"POST",headers:e,body:d,signal:b.signal});if(clearTimeout(f),!g.ok){let b=g.status;if((429===b||b>=500)&&a<2){let a=parseInt(g.headers.get("retry-after")||"1",10);await A(Math.min(1e3*a,5e3));continue}let c=await g.text().catch(()=>"");return console.error(`[embedding] API error ${b}: ${c.slice(0,200)}`),[]}let h=await g.json();if(!h.data||!Array.isArray(h.data))return console.error("[embedding] Unexpected response shape"),[];return h.data.sort((a,b)=>a.index-b.index),h.data.map(a=>new Float32Array(a.embedding))}catch(b){if(a<2){await A(1e3*(a+1));continue}console.error("[embedding] Request failed:",b instanceof Error?b.message:b);break}return[]}function A(a){return new Promise(b=>setTimeout(b,a))}d()}catch(a){d(a)}})},28287:(a,b,c)=>{c.d(b,{F0:()=>m});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(13308);function i(a){return k(a,".trash")}function j(a){return k(a,".trash-meta")}function k(a,b){l(b);let c=g().resolve(g().dirname(a)),d=g().resolve(c,b),f=g().relative(c,d);if(".."===f||f.startsWith(`..${g().sep}`)||g().isAbsolute(f))throw Error("Access denied: trash directory outside root parent");if(e().existsSync(d)){if(e().lstatSync(d).isSymbolicLink())throw Error("Access denied: trash directory must not be a symlink");let a=e().realpathSync(c),b=e().realpathSync(d),f=g().relative(a,b);if(".."===f||f.startsWith(`..${g().sep}`)||g().isAbsolute(f))throw Error("Access denied: trash directory outside root parent")}return d}function l(a){if(!a||a.includes("/")||a.includes("\\")||g().basename(a)!==a)throw Error("Invalid trash id")}function m(a,b){let c,d;e().mkdirSync(i(a),{recursive:!0}),e().mkdirSync(j(a),{recursive:!0});let f=(0,h.n2)(a,b);if(!e().existsSync(f))throw Error(`File not found: ${b}`);let k=e().statSync(f).isDirectory(),m=g().basename(b),n=(c=m.replace(/[^a-zA-Z0-9._\-\u4e00-\u9fff]/g,"_"),`${Date.now()}_${c}`),o=g().join(i(a),n);if(e().mkdirSync(g().dirname(o),{recursive:!0}),k)e().cpSync(f,o,{recursive:!0}),e().rmSync(f,{recursive:!0,force:!0});else try{e().renameSync(f,o)}catch(a){if("EXDEV"===a.code)e().copyFileSync(f,o),e().unlinkSync(f);else throw a}let p=new Date,q={id:n,originalPath:b,deletedAt:p.toISOString(),expiresAt:new Date(p.getTime()+2592e6).toISOString(),fileName:m,isDirectory:k};return l(q.id),d=g().join(j(a),`${q.id}.json`),e().writeFileSync(d,JSON.stringify(q,null,2),"utf-8"),q}},28647:(a,b,c)=>{c.d(b,{b:()=>i});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g);function i(a){try{let b=function(a){let b=[],c=process.env.MINDOS_PROJECT_ROOT;c&&b.push(h().join(c,"packages","web","scripts",a));let d=process.cwd();for(let c of(b.push(h().join(d,"scripts",a)),b.push(h().resolve(d,"..","..","scripts",a)),b.push(h().join(d,".next","standalone","scripts",a)),b))if(f().existsSync(c))return c;return null}("extract-pdf.cjs");if(!b)return"";let c=(0,d.execFileSync)(function(a=process.env){return a.MINDOS_NODE_BIN?.trim()||process.execPath}(),[b,a],{encoding:"utf-8",timeout:15e3,maxBuffer:5242880});return JSON.parse(c).text||""}catch{return""}}},28696:(a,b,c)=>{c.d(b,{gG:()=>d.gG});var d=c(50294)},30281:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{O:()=>o});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(21820),j=c.n(i),k=c(31751),l=c(59349),m=c(27152),n=a([m]);m=(n.then?(await n)():n)[0];class o{isReady(){return this._ready}isBuilding(){return this._building}getDocCount(){return this.vectors.size}getDimensions(){return this.dimensions}async rebuild(a){if(!this._building){this._building=!0;try{if(!(0,m.II)()){this._building=!1;return}let b=(0,k.f)(a),c=[],d=[];for(let e of b){let b,f=h().extname(e).toLowerCase();if(".md"!==f&&".csv"!==f)continue;try{b=(0,l.TA)(a,e)}catch{continue}let g=`${e}
1
+ "use strict";exports.id=1976,exports.ids=[1976],exports.modules={7017:(a,b,c)=>{c.d(b,{G:()=>h});var d=c(33873),e=c.n(d),f=c(31751),g=c(59349);function h(a,b,c,d){let h=[],i=e().basename(b,".md"),j=b.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),k=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=[RegExp(`\\[\\[${k}(?:[|#][^\\]]*)?\\]\\]`,"i"),RegExp(`\\[\\[${j}(?:[|#][^\\]]*)?\\]\\]`,"i"),RegExp(`\\[[^\\]]+\\]\\(${j}(?:#[^)]*)?\\)`,"i"),RegExp(`\\[[^\\]]+\\]\\([^)]*${k}\\.md(?:#[^)]*)?\\)`,"i"),RegExp("`"+j.replace(/\//g,"\\/")+"`")];for(let e of c||(d?d.filter(a=>a.endsWith(".md")&&a!==b):(0,f.f)(a).filter(a=>a.endsWith(".md")&&a!==b))){let c;if(e===b)continue;try{c=(0,g.TA)(a,e)}catch{continue}let d=c.split("\n");for(let a=0;a<d.length;a++)if(l.some(b=>b.test(d[a]))){let b=a;for(;b>0&&b>a-3&&""!==d[b].trim();)b--;let c=a;for(;c<d.length-1&&c<a+3&&""!==d[c].trim();)c++;let f=d.slice(b,c+1).join("\n").trim();f=f.replace(/\n{2,}/g," ↵ "),h.push({source:e,line:a+1,context:f});break}}return h}},11976:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{El:()=>y,F2:()=>G,FR:()=>I,G1:()=>L,H5:()=>C,JX:()=>p,WZ:()=>D,_P:()=>z,f:()=>x,fu:()=>A,g7:()=>J,getFileTree:()=>w,gm:()=>q,mV:()=>H,startFileWatcher:()=>t,vg:()=>F,wf:()=>E,x3:()=>B,zK:()=>K});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(39852),j=c(72385),k=c(23414),l=c(28647),m=c(82614),n=c(28287),o=a([j,k]);function p(){return(0,k.kh)()}[j,k]=o.then?(await o)():o;let M=new Set([".git","node_modules","app",".next",".DS_Store",".media","mcp"]),N=new Set([".md",".csv",".json",".pdf",".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".mp3",".wav",".m4a",".ogg",".flac",".aac",".mp4",".webm",".mov",".mkv"]),O=null,P=0,Q=new j.Xs;function q(){O=null,P++,(0,j._E)(),Q.invalidate()}function r(a){O=null,P++,(0,j.KZ)(p(),a),Q.isBuilt()&&Q.updateFile(p(),a)}function s(){var a;let b,c,d,e;return null!==O&&Date.now()-O.timestamp<3e4?O:(a=p(),b=m.Y.startTimer("tree.cache.build"),c=function a(b,c){let d,e=c??p();try{d=f().readdirSync(b,{withFileTypes:!0})}catch{return[]}let g=[];for(let c of d){let d=h().join(b,c.name),i=h().relative(e,d);if(c.isDirectory()){if(M.has(c.name))continue;let b=a(d,e);if(b.length>0){let a=b.some(a=>"file"===a.type&&"INSTRUCTION.md"===a.name),e={name:c.name,path:i,type:"directory",children:b};a&&(e.isSpace=!0,e.spacePreview=function(a){let b,c=h().join(a,"INSTRUCTION.md"),d=h().join(a,"README.md"),e=v(d);try{let a=f().readFileSync(d,"utf-8").match(/<!-- mindos:compiled (\S+) files:\d+ -->/);a&&(b=a[1])}catch{}return{instructionLines:u(c,3),readmeLines:u(d,3),isTemplate:v(c)&&e,readmeIsTemplate:e,lastCompiled:b}}(d)),g.push(e)}}else if(c.isFile()){let a=h().extname(c.name).toLowerCase();N.has(a)&&g.push({name:c.name,path:i,type:"file",extension:a})}}return g.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),g}(a),d=[],e=0,function a(b){for(let c of b)"file"===c.type?d.push(c.path):c.children&&(e++,a(c.children))}(c),b({fileCount:d.length,directoryCount:e}),O={tree:c,allFiles:d,timestamp:Date.now()},R||t(),O)}let R=null,S=null;function t(){let a;if(!R){try{a=p()}catch{return}try{(R=f().watch(a,{recursive:!0},(a,b)=>{!b||b.startsWith(".git")||b.includes("node_modules")||b.includes(".next")||(S&&clearTimeout(S),S=setTimeout(()=>{O=null,P++,S=null},500))})).on("error",()=>{S&&(clearTimeout(S),S=null),R&&(R.close(),R=null)})}catch{R=null}}}function u(a,b){try{let c=f().readFileSync(a,"utf-8"),d=[];for(let a of c.split("\n")){let c=a.trim();if(!(!c||c.startsWith("#"))&&(d.push(c),d.length>=b))break}return d}catch{return[]}}let T=["Define local execution rules for this directory.","(your files here)","(Describe the purpose and usage of this space.)","(Add usage guidelines for this space.)"];function v(a){try{let b=f().readFileSync(a,"utf-8");return T.some(a=>b.includes(a))}catch{return!1}}function w(){return s().tree}function x(){return s().allFiles}function y(a=10){let b=p(),c=x().map(a=>{try{let c=(0,j.n2)(b,a),d=f().statSync(c);return{path:a,mtime:d.mtimeMs}}catch{return null}}).filter(Boolean);return c.sort((a,b)=>b.mtime-a.mtime),c.slice(0,a)}function z(a){let b=p();if(".pdf"===h().extname(a).toLowerCase()){let c=(0,j.n2)(b,a);if(!f().existsSync(c))throw new i.Vt(i.tG.FILE_NOT_FOUND,`File not found: ${a}`,{filePath:a});let d=(0,l.b)(c);if(!d)throw new i.Vt(i.tG.INTERNAL_ERROR,`Could not extract text from PDF: ${a}`,{filePath:a});return d}return(0,j.TA)(b,a)}function A(a,b){(0,j._h)(p(),a,b),r(a)}function B(a,b=""){(0,j.x3)(p(),a,b),O=null,P++,(0,j.As)(p(),a),Q.isBuilt()&&Q.updateFile(p(),a)}function C(a,b){let c=(0,j.H5)(p(),a,b);return q(),c}function D(a,b){(0,j.WZ)(p(),a,b),r(a)}function E(a,b,c){(0,j.wf)(p(),a,b,c),r(a)}function F(a,b,c){(0,j.vg)(p(),a,b,c),r(a)}function G(a,b){let c=(0,j.F2)(p(),a,b);return r(a),c}function H(a,b){let c=(0,j.mV)(p(),a,b,j.G1);return q(),c}function I(a,b=10){return(0,j.FR)(p(),a,b)}function J(a,b){return(0,j.g7)(p(),a,b)}function K(a){let b=(0,n.F0)(p(),a);return q(),b}function L(a){let b,c=p(),d=(b=p(),!Q.isBuiltFor(b)&&Q.rebuild(b),Q).getBacklinks(a);return(0,j.G1)(c,a,d)}d()}catch(a){d(a)}})},12169:(a,b,c)=>{c.d(b,{FR:()=>f,g7:()=>g});var d=c(79646),e=c(13308);function f(a,b,c){let f=(0,e.n2)(a,b),g=(0,d.execFileSync)("git",["log","--follow","--format=%H%x00%aI%x00%s%x00%an","-n",String(c),"--",f],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();return g?g.split("\n").map(a=>{let[b,c,d,e]=a.split("\0");return{hash:b,date:c,message:d,author:e}}):[]}function g(a,b,c){let f=(0,e.n2)(a,b),g=(0,d.execFileSync)("git",["ls-files","--full-name",f],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();return g?(0,d.execFileSync)("git",["show",`${c}:${g}`],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}):(0,d.execFileSync)("git",["show",`${c}:${b}`],{cwd:a,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}},13308:(a,b,c)=>{c.d(b,{cP:()=>A,n2:()=>B});var d=c(33873),e=c.n(d),f=c(29021),g=c.n(f);class h extends Error{constructor(a,b,c,d){super(a),this.name=this.constructor.name,this.code=b,this.statusCode=c,this.context=d?.context,this.cause=d?.cause,this.metadata={timestamp:Date.now(),...d?.metadata},Error.captureStackTrace(this,this.constructor)}toJSON(){return{name:this.name,message:this.message,code:this.code,statusCode:this.statusCode,context:this.context,metadata:this.metadata,stack:this.stack}}toUserMessage(){return this.message}}let i={VALIDATION_ERROR:400,NOT_FOUND:404,UNAUTHORIZED:401,FORBIDDEN:403,CONFLICT:409,INTERNAL_ERROR:500,SERVICE_UNAVAILABLE:503,TIMEOUT:408,RATE_LIMIT_EXCEEDED:429,FILE_SYSTEM_ERROR:500,FILE_READ_ERROR:500,FILE_WRITE_ERROR:500,FILE_STAT_ERROR:500,FILE_REMOVE_ERROR:500,FILE_COPY_ERROR:500,FILE_MOVE_ERROR:500,FILE_WATCH_ERROR:500,DIRECTORY_READ_ERROR:500,DIRECTORY_CREATE_ERROR:500,DATABASE_ERROR:500,NETWORK_ERROR:500,CONFIGURATION_ERROR:500,SEARCH_ERROR:500,VECTOR_ERROR:500,MCP_ERROR:500},j={VALIDATION_ERROR:"Validation failed",NOT_FOUND:"Resource not found",UNAUTHORIZED:"Unauthorized access",FORBIDDEN:"Access forbidden",CONFLICT:"Resource conflict",INTERNAL_ERROR:"Internal server error",SERVICE_UNAVAILABLE:"Service unavailable",TIMEOUT:"Operation timed out",RATE_LIMIT_EXCEEDED:"Rate limit exceeded",FILE_SYSTEM_ERROR:"File system operation failed",FILE_READ_ERROR:"Failed to read file",FILE_WRITE_ERROR:"Failed to write file",FILE_STAT_ERROR:"Failed to get file stats",FILE_REMOVE_ERROR:"Failed to remove file",FILE_COPY_ERROR:"Failed to copy file",FILE_MOVE_ERROR:"Failed to move file",FILE_WATCH_ERROR:"Failed to watch file",DIRECTORY_READ_ERROR:"Failed to read directory",DIRECTORY_CREATE_ERROR:"Failed to create directory",DATABASE_ERROR:"Database operation failed",NETWORK_ERROR:"Network operation failed",CONFIGURATION_ERROR:"Configuration error",SEARCH_ERROR:"Search operation failed",VECTOR_ERROR:"Vector operation failed",MCP_ERROR:"MCP operation failed"};function k(a,b,c){let d=i[a],e=j[a];return new h(b??e,a,d,{...c,metadata:{...c?.metadata,retryable:["SERVICE_UNAVAILABLE","TIMEOUT","NETWORK_ERROR"].includes(a),retryAfter:function(a){switch(a){case"RATE_LIMIT_EXCEEDED":return 6e4;case"SERVICE_UNAVAILABLE":return 5e3;case"TIMEOUT":return 1e3;case"NETWORK_ERROR":return 2e3;default:return 0}}(a)}})}let l=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,m=/[<>:"|?*\x00-\x1f]/;function n(a){return/^[A-Za-z]:/.test(a)}function o(a,b){let c,e,f;if(c=d.resolve(b),e=d.resolve(a),""!==(f=d.relative(c,e))&&(".."===f||f.startsWith(`..${d.sep}`)||d.isAbsolute(f)))throw k("VALIDATION_ERROR","Access denied: path outside root",{context:{resolved:a,root:b}})}function p(a,b,c,d,e,f){return{path:a,webRouteFile:`packages/web/app${a}/route.ts`,owner:b,adapter:c,phase:d,risk:e,residualRisk:f}}let q=(a,b="low")=>p(a,"product-owned","next-response","Phase 1: migrated Product Server adapter",b,"No residual product ownership expected; this route should remain a thin Next adapter."),r=(a,b,c,d)=>p(a,"optional-capability","optional-capability",b,c,d),s=(a,b,c="medium")=>p(a,"host-owned","host","Host-owned",c,b);[q("/api/a2a/agents","medium"),q("/api/a2a/delegations","medium"),q("/api/a2a/discover","medium"),q("/api/a2a","medium"),q("/api/acp/config","high"),q("/api/acp/detect","medium"),q("/api/acp/install","high"),q("/api/acp/registry","medium"),q("/api/acp/session","high"),q("/api/agent-activity"),q("/api/agents/copy-skill","high"),q("/api/agents/custom/detect","medium"),q("/api/agents/custom","high"),q("/api/ask-sessions"),p("/api/ask","product-owned","stream","Phase 6: generated client and stream adapter","high","Ask is mostly Product runtime-owned through session and agent modules, but the streaming Web route still owns host assembly and should become a generated stream adapter."),s("/api/auth","Auth cookie/session handling is host-specific today; Product Server will need an auth context adapter before direct HTTP exposure.","high"),q("/api/backlinks"),q("/api/bootstrap"),q("/api/changes"),q("/api/channels/verify","medium"),q("/api/connect"),q("/api/embedding","medium"),r("/api/export","Phase 5: content ingestion optional capabilities","high","Export/archive logic carries heavy dependencies and filesystem writes that need optional capability packaging."),r("/api/extract-docx","Phase 5: content ingestion optional capabilities","high","DOCX extraction should be Product-owned but lazy-loaded so parser dependencies do not inflate the default package."),r("/api/extract-pdf","Phase 5: content ingestion optional capabilities","high","PDF extraction should be Product-owned but lazy-loaded so parser dependencies do not inflate the default package."),r("/api/file/import","Phase 5: content ingestion optional capabilities","high","File import is a content-ingestion write path and needs capability-level size limits, conflict checks, and rollback."),q("/api/file/raw"),q("/api/file","high"),q("/api/files"),q("/api/git"),q("/api/graph"),q("/api/health"),q("/api/im/activity","medium"),q("/api/im/config","high"),s("/api/im/feishu/long-connection/event","Raw long-connection event delivery is host-specific, but event parsing and state updates should stay behind Product protocol handlers.","medium"),q("/api/im/feishu/long-connection","high"),q("/api/im/status","medium"),q("/api/im/test","medium"),q("/api/im/webhook-status","medium"),s("/api/im/webhook/feishu","Raw inbound Feishu webhook receipt is host-owned, while signature verification and state writes should move to Product protocol handlers.","high"),r("/api/inbox/clip","Phase 5: content ingestion optional capabilities","high","Inbox clipping is still Web-owned ingestion and needs optional capability packaging plus fetch timeout and content limits."),q("/api/inbox","medium"),q("/api/init","high"),r("/api/lint","Phase 5: content ingestion optional capabilities","medium","Knowledge linting remains Web-owned and should become an optional Product capability with bounded filesystem traversal."),q("/api/mcp/agents","high"),q("/api/mcp/direct-tools","medium"),q("/api/mcp/install-skill","high"),q("/api/mcp/install","high"),q("/api/mcp/restart","high"),q("/api/mcp/status"),q("/api/mcp/tools","medium"),q("/api/mcp/uninstall","high"),q("/api/monitoring","medium"),r("/api/obsidian-plugins/settings","Phase 5: content ingestion optional capabilities","medium","Obsidian plugin settings remain Web-owned and should be modeled as an optional Product compatibility capability."),r("/api/obsidian/compat-report","Phase 5: content ingestion optional capabilities","medium","Obsidian compatibility reporting remains Web-owned and should use optional capability diagnostics."),r("/api/obsidian/import","Phase 5: content ingestion optional capabilities","high","Obsidian import remains a Web-owned bulk write path and needs optional capability size limits and rollback."),q("/api/recent-files"),q("/api/restart","high"),q("/api/search/prewarm"),q("/api/search"),q("/api/settings/list-models","medium"),q("/api/settings/reset-token","high"),q("/api/settings","medium"),q("/api/settings/test-key","medium"),q("/api/setup/check-path","medium"),q("/api/setup/check-port","medium"),q("/api/setup/generate-token","medium"),q("/api/setup/ls","medium"),q("/api/setup","high"),q("/api/skills","high"),q("/api/space-overview"),q("/api/sync","high"),q("/api/tree-version"),q("/api/uninstall","high"),q("/api/update-check"),q("/api/update-status"),q("/api/update","high"),q("/api/workflows","medium")].map(a=>[a.path,a]),c(51455),c(73024);var t=c(76760);c(77598);var u=c(48161);function v(a){return"darwin"===process.platform?a.darwin:"win32"===process.platform?`${(process.env.APPDATA||(0,t.join)((0,u.homedir)(),"AppData","Roaming")).replace(/\\/g,"/").replace(/\/+$/,"")}/${a.win32}`:a.linux}c(37067),c(73136),v({darwin:"~/Library/Application Support/Code/User",linux:"~/.config/Code/User",win32:"Code/User"}),v({darwin:"~/Library/Application Support/Code",linux:"~/.config/Code",win32:"Code"}),v({darwin:"~/Library/Application Support/Trae CN",linux:"~/.config/Trae CN",win32:"Trae CN"}),c(31421),c(50294);var w=c(79646);(0,c(28354).promisify)(w.execFile),(0,t.join)((0,u.homedir)(),".mindos","im-activity.json"),(0,t.join)((0,u.homedir)(),".mindos","im.json"),(0,t.join)((0,u.homedir)(),".mindos","im.json"),(0,t.join)((0,u.homedir)(),".mindos","im.json"),c(21820),c(77030),c(38264);let x=(0,t.join)((0,u.homedir)(),".mindos");(0,t.join)(x,"config.json"),(0,t.join)(x,"sync-state.json"),[{id:"health",method:"GET",path:"/api/health",auth:"public"},{id:"files",method:"GET",path:"/api/files",auth:"required"},{id:"recent-files",method:"GET",path:"/api/recent-files",auth:"required"},{id:"tree-version",method:"GET",path:"/api/tree-version",auth:"required"},{id:"file.read",method:"GET",path:"/api/file",auth:"required"},{id:"file.write",method:"POST",path:"/api/file",auth:"required"},{id:"file.raw",method:"GET",path:"/api/file/raw",auth:"required"},{id:"search",method:"GET",path:"/api/search",auth:"required"},{id:"search.prewarm",method:"GET",path:"/api/search/prewarm",auth:"required"},{id:"a2a",method:"POST",path:"/api/a2a",auth:"required"},{id:"a2a.options",method:"OPTIONS",path:"/api/a2a",auth:"public"},{id:"a2a.agents",method:"GET",path:"/api/a2a/agents",auth:"required"},{id:"a2a.delegations",method:"GET",path:"/api/a2a/delegations",auth:"required"},{id:"a2a.discover",method:"POST",path:"/api/a2a/discover",auth:"required"},{id:"acp.config",method:"GET",path:"/api/acp/config",auth:"required"},{id:"acp.config.update",method:"POST",path:"/api/acp/config",auth:"required"},{id:"acp.config.delete",method:"DELETE",path:"/api/acp/config",auth:"required"},{id:"acp.detect",method:"GET",path:"/api/acp/detect",auth:"required"},{id:"acp.install",method:"POST",path:"/api/acp/install",auth:"required"},{id:"acp.registry",method:"GET",path:"/api/acp/registry",auth:"required"},{id:"acp.session",method:"GET",path:"/api/acp/session",auth:"required"},{id:"acp.session.action",method:"POST",path:"/api/acp/session",auth:"required"},{id:"acp.session.close",method:"DELETE",path:"/api/acp/session",auth:"required"},{id:"backlinks",method:"GET",path:"/api/backlinks",auth:"required"},{id:"graph",method:"GET",path:"/api/graph",auth:"required"},{id:"agent-activity",method:"GET",path:"/api/agent-activity",auth:"required"},{id:"bootstrap",method:"GET",path:"/api/bootstrap",auth:"required"},{id:"connect",method:"GET",path:"/api/connect",auth:"required"},{id:"embedding",method:"GET",path:"/api/embedding",auth:"required"},{id:"embedding.action",method:"POST",path:"/api/embedding",auth:"required"},{id:"channels.verify",method:"POST",path:"/api/channels/verify",auth:"required"},{id:"im.activity",method:"GET",path:"/api/im/activity",auth:"required"},{id:"im.config",method:"GET",path:"/api/im/config",auth:"required"},{id:"im.config.update",method:"PUT",path:"/api/im/config",auth:"required"},{id:"im.config.delete",method:"DELETE",path:"/api/im/config",auth:"required"},{id:"im.status",method:"GET",path:"/api/im/status",auth:"required"},{id:"im.test",method:"POST",path:"/api/im/test",auth:"required"},{id:"im.webhook-status",method:"GET",path:"/api/im/webhook-status",auth:"required"},{id:"im.feishu.long-connection",method:"GET",path:"/api/im/feishu/long-connection",auth:"required"},{id:"im.feishu.long-connection.start",method:"POST",path:"/api/im/feishu/long-connection",auth:"required"},{id:"im.feishu.long-connection.stop",method:"DELETE",path:"/api/im/feishu/long-connection",auth:"required"},{id:"monitoring",method:"GET",path:"/api/monitoring",auth:"required"},{id:"update-status",method:"GET",path:"/api/update-status",auth:"required"},{id:"update-check",method:"GET",path:"/api/update-check",auth:"required"},{id:"restart",method:"POST",path:"/api/restart",auth:"required"},{id:"update",method:"POST",path:"/api/update",auth:"required"},{id:"uninstall",method:"POST",path:"/api/uninstall",auth:"required"},{id:"init",method:"POST",path:"/api/init",auth:"required"},{id:"sync",method:"GET",path:"/api/sync",auth:"required"},{id:"sync.action",method:"POST",path:"/api/sync",auth:"required"},{id:"inbox",method:"GET",path:"/api/inbox",auth:"required"},{id:"inbox.save",method:"POST",path:"/api/inbox",auth:"required"},{id:"inbox.archive",method:"DELETE",path:"/api/inbox",auth:"required"},{id:"setup.check-path",method:"POST",path:"/api/setup/check-path",auth:"required"},{id:"setup.check-port",method:"POST",path:"/api/setup/check-port",auth:"required"},{id:"setup.generate-token",method:"POST",path:"/api/setup/generate-token",auth:"required"},{id:"setup.ls",method:"POST",path:"/api/setup/ls",auth:"required"},{id:"setup",method:"GET",path:"/api/setup",auth:"required"},{id:"setup.apply",method:"POST",path:"/api/setup",auth:"required"},{id:"setup.guide-state",method:"PATCH",path:"/api/setup",auth:"required"},{id:"workflows",method:"GET",path:"/api/workflows",auth:"required"},{id:"workflows.create",method:"POST",path:"/api/workflows",auth:"required"},{id:"ask.stream",method:"POST",path:"/api/ask",auth:"required"},{id:"ask-sessions",method:"GET",path:"/api/ask-sessions",auth:"required"},{id:"ask-sessions.save",method:"POST",path:"/api/ask-sessions",auth:"required"},{id:"ask-sessions.delete",method:"DELETE",path:"/api/ask-sessions",auth:"required"},{id:"space-overview",method:"GET",path:"/api/space-overview",auth:"required"},{id:"git",method:"GET",path:"/api/git",auth:"required"},{id:"settings",method:"GET",path:"/api/settings",auth:"required"},{id:"settings.update",method:"POST",path:"/api/settings",auth:"required"},{id:"settings.reset-token",method:"POST",path:"/api/settings/reset-token",auth:"required"},{id:"settings.test-key",method:"POST",path:"/api/settings/test-key",auth:"required"},{id:"settings.list-models",method:"POST",path:"/api/settings/list-models",auth:"required"},{id:"mcp.status",method:"GET",path:"/api/mcp/status",auth:"required"},{id:"mcp.agents",method:"GET",path:"/api/mcp/agents",auth:"required"},{id:"mcp.tools",method:"GET",path:"/api/mcp/tools",auth:"required"},{id:"mcp.direct-tools",method:"POST",path:"/api/mcp/direct-tools",auth:"required"},{id:"mcp.install",method:"POST",path:"/api/mcp/install",auth:"required"},{id:"mcp.install-skill",method:"POST",path:"/api/mcp/install-skill",auth:"required"},{id:"mcp.restart",method:"POST",path:"/api/mcp/restart",auth:"required"},{id:"mcp.uninstall",method:"POST",path:"/api/mcp/uninstall",auth:"required"},{id:"skills",method:"GET",path:"/api/skills",auth:"required"},{id:"skills.action",method:"POST",path:"/api/skills",auth:"required"},{id:"changes",method:"GET",path:"/api/changes",auth:"required"},{id:"changes.mark-seen",method:"POST",path:"/api/changes",auth:"required"},{id:"agents.custom.create",method:"POST",path:"/api/agents/custom",auth:"required"},{id:"agents.custom.update",method:"PUT",path:"/api/agents/custom",auth:"required"},{id:"agents.custom.delete",method:"DELETE",path:"/api/agents/custom",auth:"required"},{id:"agents.custom.detect",method:"POST",path:"/api/agents/custom/detect",auth:"required"},{id:"agents.copy-skill",method:"POST",path:"/api/agents/copy-skill",auth:"required"}].map(a=>[`${a.method} ${a.path}`,a.auth]),c(84389);var y=c(39852);function z(a,b){return a instanceof y.Vt?a:new y.Vt(y.tG.PATH_OUTSIDE_ROOT,a?.message||"Access denied: path outside MIND_ROOT",a?.context??b)}function A(a,b){try{o(a,b)}catch(c){throw z(c,{resolved:a,root:b})}}function B(a,b){var c,f;let h,i,j,p,q,r=function(a,b){try{let g=b.replace(/\\/g,"/");if(d.isAbsolute(g)||d.win32.isAbsolute(b)||d.win32.isAbsolute(g)||n(b)||n(g))throw k("VALIDATION_ERROR","Access denied: absolute paths are not allowed",{context:{root:a,filePath:b}});var c=a,e=b,f=g;for(let a of f.split("/"))if(a&&"."!==a&&(a.endsWith(".")||a.endsWith(" ")||l.test(a)||m.test(a)))throw k("VALIDATION_ERROR","Access denied: path contains a Windows-invalid file name segment",{context:{root:c,filePath:e,segment:a}});let h=d.resolve(a),i=d.resolve(d.join(h,g));return o(i,h),i}catch(c){throw z(c,{mindRoot:a,filePath:b})}}(a,b),s=function(a){let b=a;for(;!g().existsSync(b);){let a=e().dirname(b);if(a===b)break;b=a}return b}(r);try{h=g().realpathSync(e().resolve(a)),i=g().realpathSync(s)}catch(c){throw z(c,{mindRoot:a,filePath:b,resolved:r,existing:s})}if(c=i,f=h,j=e().resolve(f),p=e().resolve(c),""!==(q=e().relative(j,p))&&(".."===q||q.startsWith(`..${e().sep}`)||e().isAbsolute(q)))throw new y.Vt(y.tG.PATH_OUTSIDE_ROOT,"Access denied: symlink resolves outside MIND_ROOT",{mindRoot:a,filePath:b,resolved:r,existing:s,targetReal:i});return r}},14360:(a,b,c)=>{c.d(b,{P2:()=>j,WZ:()=>k,vg:()=>m,wf:()=>l});var d=c(29021),e=c.n(d),f=c(59349),g=c(39852),h=c(13308);function i(a,b){return(0,f.TA)(a,b).split("\n")}function j(a,b,c,d,e){let h=i(a,b);var j=h.length;if(c<0||d<0)throw new g.Vt(g.tG.INVALID_RANGE,"Invalid line index: indices must be >= 0",{start:c,end:d});if(c>d)throw new g.Vt(g.tG.INVALID_RANGE,`Invalid range: start (${c}) > end (${d})`,{start:c,end:d});if(c>=j)throw new g.Vt(g.tG.INVALID_RANGE,`Invalid line index: start (${c}) >= total lines (${j})`,{start:c,totalLines:j});h.splice(c,d-c+1,...e),(0,f._h)(a,b,h.join("\n"))}function k(a,b,c){let d=(0,h.n2)(a,b);try{let a=e().statSync(d);if(0===a.size)return void e().appendFileSync(d,c,"utf-8");let b=Math.min(8,a.size),f=e().openSync(d,"r");try{let g=Buffer.alloc(b);e().readSync(f,g,0,b,Math.max(0,a.size-b));let h=g.toString("utf-8").endsWith("\n\n")?"":"\n";e().appendFileSync(d,h+c,"utf-8")}finally{e().closeSync(f)}}catch(g){let d=(0,f.TA)(a,b),e=d.length>0&&!d.endsWith("\n\n")?"\n":"";(0,f._h)(a,b,d+e+c)}}function l(a,b,c,d){let e=i(a,b),h=e.findIndex(a=>{let b=a.trim();return b===c||b.replace(/^#+\s*/,"")===c.replace(/^#+\s*/,"")});if(-1===h)throw new g.Vt(g.tG.HEADING_NOT_FOUND,`Heading not found: "${c}"`,{heading:c});let j=h+1;for(;j<e.length&&""===e[j].trim();)j++;!function(a,b,c,d){let e=i(a,b);if(c>=e.length)throw new g.Vt(g.tG.INVALID_RANGE,`Invalid after_index: ${c} >= total lines (${e.length})`,{afterIndex:c,totalLines:e.length});e.splice(c<0?0:c+1,0,...d),(0,f._h)(a,b,e.join("\n"))}(a,b,j-1,["",d])}function m(a,b,c,d){let e=i(a,b),f=e.findIndex(a=>{let b=a.trim();return b===c||b.replace(/^#+\s*/,"")===c.replace(/^#+\s*/,"")});if(-1===f)throw new g.Vt(g.tG.HEADING_NOT_FOUND,`Heading not found: "${c}"`,{heading:c});let h=(e[f].match(/^#+/)??[""])[0].length,k=e.length-1;for(let a=f+1;a<e.length;a++){let b=e[a].match(/^(#+)\s/);if(b&&b[1].length<=h){k=a-1;break}}for(;k>f&&""===e[k].trim();)k--;j(a,b,f+1,k,["",d])}},22288:(a,b,c)=>{var d=c(73566),e=c(31751),f=c(59349),g=c(13308),h=c(28647),i=c(87155),j=c(33873),k=c.n(j);let l="u">typeof Intl&&Intl.Segmenter?new Intl.Segmenter("zh",{granularity:"word"}):null;function m(a,b){for(let c=0;c<a.length;c++)b.add(a[c]),c+1<a.length&&b.add(a[c]+a[c+1])}if(d.parentPort&&d.workerData?.mindRoot)try{let a=function(a){let b=(0,e.f)(a),c={},d={},j=0;for(let e of b){let b;if(".pdf"===k().extname(e).toLowerCase())try{let c=(0,g.n2)(a,e);if(!(b=(0,h.b)(c)))continue}catch{continue}else try{b=(0,f.TA)(a,e)}catch{continue}for(let a of(d[e]=b.length,j+=b.length,b.length>5e4&&(b=b.slice(0,5e4)),function(a){let b=new Set,c=a.toLowerCase(),d=c.match(/[a-z0-9_$@#]+/g);if(d)for(let a of d)a.length>=2&&b.add(a);if(i.y.test(c))if(l)for(let{segment:a,isWordLike:d}of l.segment(c)){if(!d)continue;let c=a.trim();if(c)for(let a of(b.add(c),c))i.y.test(a)&&b.add(a)}else{let a=[];for(let d of c)i.y.test(d)?a.push(d):a.length>0&&(m(a,b),a.length=0);a.length>0&&m(a,b)}return b}(e+"\n"+b)))c[a]||(c[a]=[]),c[a].push(e)}return{version:1,builtForRoot:a,fileCount:b.length,totalChars:j,docLengths:d,invertedIndex:c,timestamp:Date.now()}}(d.workerData.mindRoot);d.parentPort.postMessage({ok:!0,data:a})}catch(a){d.parentPort.postMessage({ok:!1,error:a instanceof Error?a.message:String(a)})}},23414:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Sf:()=>p,kh:()=>q,sb:()=>o});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(21820),j=c.n(i),k=c(28696),l=c(31756),m=c(62697),n=a([l,m]);[l,m]=n.then?(await n)():n;let r=h().join(j().homedir(),".mindos","config.json"),s={ai:{activeProvider:"",providers:[]},mindRoot:""},t=new Set(["free","tavily","brave","serper","bing-api"]);function o(){try{var a;let c=f().readFileSync(r,"utf-8"),d=JSON.parse(c),e=d.ai,g=e&&!Array.isArray(e.providers),i={ai:function(a){let b=a.ai;if(!b)return{...s.ai};if(Array.isArray(b.providers)){let a=(0,m.S9)(b.providers),c="string"==typeof b.activeProvider?b.activeProvider:"";return{activeProvider:function(a,b){if(a&&(0,m.Ny)(a)&&(0,m.lh)(b,a))return a;if(a&&(0,l.rl)(a)){let c=b.find(b=>b.protocol===a);if(c)return c.id}return b[0]?.id??""}(c,a),providers:a}}let c=(0,m.Ko)(a);return c?{activeProvider:c.activeProvider,providers:c.providers}:{...s.ai}}(d),agent:function(a){if(!a||"object"!=typeof a)return;let b={};return"number"==typeof a.maxSteps&&(b.maxSteps=Math.min(999,Math.max(1,a.maxSteps))),"boolean"==typeof a.enableThinking&&(b.enableThinking=a.enableThinking),"number"==typeof a.thinkingBudget&&(b.thinkingBudget=Math.min(5e4,Math.max(1e3,a.thinkingBudget))),("auto"===a.contextStrategy||"off"===a.contextStrategy)&&(b.contextStrategy=a.contextStrategy),"number"==typeof a.reconnectRetries&&(b.reconnectRetries=Math.min(10,Math.max(0,a.reconnectRetries))),Object.keys(b).length>0?b:void 0}(d.agent),embedding:function(a){if(!a||"object"!=typeof a||"boolean"!=typeof a.enabled)return;let b="local"===a.provider||"api"===a.provider?a.provider:"api";return{enabled:a.enabled,provider:b,baseUrl:"string"==typeof a.baseUrl?a.baseUrl:"",apiKey:"string"==typeof a.apiKey?a.apiKey:"",model:"string"==typeof a.model?a.model:""}}(d.embedding),webSearch:function(a){if(a&&"object"==typeof a)return{provider:"string"==typeof a.provider&&t.has(a.provider)?a.provider:"free",apiKey:"string"==typeof a.apiKey?a.apiKey:""}}(d.webSearch),acpAgents:(a=d.acpAgents,(0,k.gG)(a)),mindRoot:d.mindRoot??s.mindRoot,webPassword:"string"==typeof d.webPassword?d.webPassword:void 0,authToken:"string"==typeof d.authToken?d.authToken:void 0,allowNetworkAccess:!0===d.allowNetworkAccess,mcpPort:"number"==typeof d.mcpPort?d.mcpPort:void 0,port:"number"==typeof d.port?d.port:void 0,startMode:"string"==typeof d.startMode?d.startMode:void 0,setupPending:!0===d.setupPending||void 0,disabledSkills:Array.isArray(d.disabledSkills)?d.disabledSkills:void 0,guideState:function(a){if(!a||"object"!=typeof a||!0!==a.active)return;let b="en"===a.template||"zh"===a.template||"empty"===a.template?a.template:"en";return{active:!0,dismissed:!0===a.dismissed,template:b,step1Done:!0===a.step1Done,askedAI:!0===a.askedAI,nextStepIndex:"number"==typeof a.nextStepIndex?a.nextStepIndex:0,walkthroughStep:"number"==typeof a.walkthroughStep?a.walkthroughStep:void 0,walkthroughDismissed:"boolean"==typeof a.walkthroughDismissed?a.walkthroughDismissed:void 0}}(d.guideState),baseUrlCompat:(()=>{let a=d.baseUrlCompat;if(!a||"object"!=typeof a)return;let b={};for(let[c,d]of Object.entries(a))("streaming"===d||"non-streaming"===d)&&(b[c]=d);return Object.keys(b).length>0?b:void 0})(),connectionMode:function(a){if(a.connectionMode&&"object"==typeof a.connectionMode){let b=a.connectionMode;if("boolean"==typeof b.cli&&"boolean"==typeof b.mcp)return{cli:b.cli,mcp:b.mcp}}let b=!0===a.setupPending||!a.mindRoot;return{cli:!0,mcp:!b}}(d),customAgents:Array.isArray(d.customAgents)?d.customAgents:void 0,skillPaths:function(a){if(!a||"object"!=typeof a)return;let b={};if("boolean"==typeof a.enableAgentsDir&&(b.enableAgentsDir=a.enableAgentsDir),Array.isArray(a.custom)){let c=a.custom.filter(a=>"string"==typeof a).map(a=>a.trim()).filter(Boolean);c.length>0&&(b.custom=c)}return Object.keys(b).length>0?b:void 0}(d.skillPaths)};if(g)try{var b=i;let a=h().dirname(r);f().existsSync(a)||f().mkdirSync(a,{recursive:!0});let c={};try{c=JSON.parse(f().readFileSync(r,"utf-8"))}catch{}let d={...c,ai:b.ai,mindRoot:b.mindRoot};void 0!==b.agent&&(d.agent=b.agent),void 0!==b.embedding&&(d.embedding=b.embedding),void 0!==b.webSearch&&(d.webSearch=b.webSearch),void 0!==b.webPassword&&(d.webPassword=b.webPassword),void 0!==b.authToken&&(d.authToken=b.authToken),"boolean"==typeof b.allowNetworkAccess&&(d.allowNetworkAccess=b.allowNetworkAccess),void 0!==b.port&&(d.port=b.port),void 0!==b.mcpPort&&(d.mcpPort=b.mcpPort),void 0!==b.startMode&&(d.startMode=b.startMode),void 0!==b.disabledSkills&&(d.disabledSkills=b.disabledSkills),void 0!==b.guideState&&(d.guideState=b.guideState),void 0!==b.acpAgents&&(d.acpAgents=b.acpAgents),void 0!==b.baseUrlCompat&&(d.baseUrlCompat=b.baseUrlCompat),void 0!==b.connectionMode&&(d.connectionMode=b.connectionMode),void 0!==b.customAgents&&(d.customAgents=b.customAgents),void 0!==b.skillPaths&&(d.skillPaths=b.skillPaths),delete d.customProviders,"setupPending"in b&&(b.setupPending?d.setupPending=!0:delete d.setupPending),"setupPort"in b&&(b.setupPort?d.setupPort=b.setupPort:delete d.setupPort),f().writeFileSync(r,JSON.stringify(d,null,2)+"\n","utf-8")}catch{}return i}catch{return{...s,ai:{...s.ai,providers:[]},setupPending:!0,connectionMode:{cli:!0,mcp:!1},allowNetworkAccess:!1}}}function p(a){let b=o(),c=a||b.ai.activeProvider,d=c?(0,m.lh)(b.ai.providers,c):void 0;if(!d&&a&&(0,l.rl)(a)){let c=b.ai.activeProvider?(0,m.lh)(b.ai.providers,b.ai.activeProvider):void 0;d=c?.protocol===a?c:b.ai.providers.find(b=>b.protocol===a)}if(d){let a=l.T_[d.protocol],b=d.apiKey||(0,l.lr)(d.protocol)||a?.apiKeyFallback||"",c=d.model||a?.defaultModel||"",e=d.baseUrl||a?.fixedBaseUrl||"";return{provider:d.protocol,apiKey:b,model:c,baseUrl:e}}let e=a&&(0,l.rl)(a)?a:process.env.AI_PROVIDER,f=e&&(0,l.rl)(e)?e:"anthropic",g=l.T_[f]??l.T_.anthropic;return{provider:f,apiKey:(0,l.lr)(f)||g.apiKeyFallback||"",model:g.defaultModel,baseUrl:g.fixedBaseUrl||""}}function q(){return o().mindRoot||process.env.MIND_ROOT||h().join(j().homedir(),"MindOS","mind")}d()}catch(a){d(a)}})},27152:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Bk:()=>p,II:()=>o,s7:()=>q});var e=c(23414),f=c(79646),g=c(29021),h=c.n(g),i=c(21820),j=c.n(i),k=c(33873),l=c.n(k),m=c(79551),n=a([e]);function o(){try{let a=(0,e.sb)().embedding;if(!a||!a.enabled||"api"===a.provider&&(!a.baseUrl||!a.model)||"local"===a.provider&&!a.model)return null;return{enabled:!0,provider:a.provider||"api",baseUrl:(a.baseUrl||"").replace(/\/+$/,""),apiKey:a.apiKey||"",model:a.model}}catch{return null}}async function p(a){let b=o();if(!b||0===a.length)return[];try{if("local"===b.provider)return await x(b.model,a);return await y(b,a)}catch(a){return console.error("[embedding] Failed to get embeddings:",a instanceof Error?a.message:a),[]}}async function q(a){let b=await p([a]);return b.length>0?b[0]:null}e=(n.then?(await n)():n)[0];let B=["@huggingface/transformers@4.2.0","onnxruntime-node@1.24.3","onnxruntime-web@1.26.0-dev.20260416-b7804b056c"],C=Function("specifier","return import(specifier)");class D extends Error{constructor(a="Local embedding runtime is not installed. Install it from Settings > AI > Embedding Search, or use API mode."){super(a),this.name="LocalEmbeddingRuntimeMissingError"}}function r(){return process.env.MINDOS_LOCAL_EMBEDDING_RUNTIME_DIR||l().join(j().homedir(),".mindos","local-embedding-runtime")}let E=null,F=null,G=null;async function s(){let a=r();h().mkdirSync(a,{recursive:!0});let b=l().join(a,"package.json");h().existsSync(b)||h().writeFileSync(b,JSON.stringify({private:!0,name:"mindos-local-embedding-runtime",description:"Optional MindOS local embedding runtime installed on user request."},null,2)+"\n");let c=function(){if(process.env.MINDOS_NPM_BIN)return{command:process.env.MINDOS_NPM_BIN,args:[]};let a=process.env.MINDOS_PROJECT_ROOT;if(a){let b=l().join(a,"node","lib","node_modules","npm","bin","npm-cli.js");if(h().existsSync(b))return{command:process.env.MINDOS_NODE_BIN||process.execPath,args:[b]}}return{command:"win32"===process.platform?"npm.cmd":"npm",args:[]}}(),d=[...c.args,"install","--prefix",a,"--omit=dev","--no-audit","--no-fund","--ignore-scripts",...B];await t(c.command,d,6e5)}async function t(a,b,c){await new Promise((d,e)=>{let g=(0,f.spawn)(a,b,{stdio:["ignore","pipe","pipe"],env:process.env}),h="",i=setTimeout(()=>{g.kill("SIGTERM"),e(Error("Local embedding runtime install timed out. Check your network and try again, or use API mode."))},c);g.stdout.on("data",a=>{(h+=a.toString()).length>8e3&&(h=h.slice(-8e3))}),g.stderr.on("data",a=>{(h+=a.toString()).length>8e3&&(h=h.slice(-8e3))}),g.on("error",a=>{clearTimeout(i),"ENOENT"===a.code?e(Error("npm is required to install the optional local embedding runtime. Install Node.js/npm, or use API embedding mode.")):e(a)}),g.on("exit",a=>{clearTimeout(i),0===a?d():e(Error(`Local embedding runtime install failed with exit code ${a}. ${h.trim().slice(-1e3)}`))})})}async function u(a){return E&&F===a?E:G&&F===a?G:(F=a,G=(async()=>{for(let b=0;b<=2;b++){let c=null,d=!1,e=null;try{let{pipeline:e,env:f}=await v({installIfMissing:!1});process.env.HF_ENDPOINT||f.remoteHost||(console.log("[embedding] Configuring hf-mirror.com for better connectivity in China"),f.remoteHost="https://hf-mirror.com",f.remotePathTemplate="{model}/resolve/{revision}/{fileName}"),c=setTimeout(()=>{d=!0},3e5),console.log(`[embedding] Attempt ${b+1}/3: Loading pipeline for ${a}...`);let g=e("feature-extraction",a,{dtype:"fp32"});return E=await g,c&&clearTimeout(c),console.log(`[embedding] Successfully loaded pipeline for ${a}`),E}catch(f){e=f instanceof Error?f:Error(String(f)),c&&clearTimeout(c),d&&(e=Error("Request timeout (>300s)"));let a=function(a){if(!(a instanceof Error))return!1;let b=a.message.toLowerCase();return b.includes("enotfound")||b.includes("econnrefused")||b.includes("econnreset")||b.includes("etimedout")||b.includes("timeout")||b.includes("temporarily unavailable")||b.includes("connect econnrefused")||b.includes("net::err_internet_disconnected")||b.includes("eaddrnotavail")||b.includes("enetunreach")||b.includes("socket hang up")}(e)&&b<2;if(console.error(`[embedding] Download attempt ${b+1}/3 failed: ${e.message}`+(a?` — retrying...`:" — giving up")),a){let a=1e3*Math.pow(2,b);console.log(`[embedding] Waiting ${a}ms before retry...`),await new Promise(b=>setTimeout(b,a));continue}throw E=null,F=null,G=null,e}}})())}async function v({installIfMissing:a}){try{return await Promise.resolve().then(c.bind(c,99253))}catch(c){let b=w();if(b)return await C((0,m.pathToFileURL)(b).href);if(a){await s();let a=w();if(a)return await C((0,m.pathToFileURL)(a).href)}throw new D(c instanceof Error&&c.message.includes("@huggingface/transformers")?void 0:`Local embedding runtime is unavailable: ${c instanceof Error?c.message:String(c)}`)}}function w(){let a=l().join(r(),"node_modules","@huggingface","transformers"),b=l().join(a,"package.json");if(!h().existsSync(b))return null;try{let c=JSON.parse(h().readFileSync(b,"utf-8")),d=c.exports?.node?.import?.default,e="string"==typeof d?d:"string"==typeof c.module?c.module:c.main;if("string"!=typeof e)return null;let f=l().resolve(a,e);return h().existsSync(f)?f:null}catch{return null}}async function x(a,b){let c=await u(a);if(!c)return[];let d=[];for(let a=0;a<b.length;a+=32)for(let e of b.slice(a,a+32)){let a=(await c(e,{pooling:"mean",normalize:!0})).data;d.push(new Float32Array(a))}return d}async function y(a,b){let c=[];for(let d=0;d<b.length;d+=100){let e=b.slice(d,d+100),f=await z(a,e);if(0===f.length)return[];c.push(...f)}return c}async function z(a,b){let c=`${a.baseUrl}/embeddings`,d=JSON.stringify({model:a.model,input:b}),e={"Content-Type":"application/json"};a.apiKey&&(e.Authorization=`Bearer ${a.apiKey}`);for(let a=0;a<=2;a++)try{let b=new AbortController,f=setTimeout(()=>b.abort(),3e4),g=await fetch(c,{method:"POST",headers:e,body:d,signal:b.signal});if(clearTimeout(f),!g.ok){let b=g.status;if((429===b||b>=500)&&a<2){let a=parseInt(g.headers.get("retry-after")||"1",10);await A(Math.min(1e3*a,5e3));continue}let c=await g.text().catch(()=>"");return console.error(`[embedding] API error ${b}: ${c.slice(0,200)}`),[]}let h=await g.json();if(!h.data||!Array.isArray(h.data))return console.error("[embedding] Unexpected response shape"),[];return h.data.sort((a,b)=>a.index-b.index),h.data.map(a=>new Float32Array(a.embedding))}catch(b){if(a<2){await A(1e3*(a+1));continue}console.error("[embedding] Request failed:",b instanceof Error?b.message:b);break}return[]}function A(a){return new Promise(b=>setTimeout(b,a))}d()}catch(a){d(a)}})},28287:(a,b,c)=>{c.d(b,{F0:()=>m});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(13308);function i(a){return k(a,".trash")}function j(a){return k(a,".trash-meta")}function k(a,b){l(b);let c=g().resolve(g().dirname(a)),d=g().resolve(c,b),f=g().relative(c,d);if(".."===f||f.startsWith(`..${g().sep}`)||g().isAbsolute(f))throw Error("Access denied: trash directory outside root parent");if(e().existsSync(d)){if(e().lstatSync(d).isSymbolicLink())throw Error("Access denied: trash directory must not be a symlink");let a=e().realpathSync(c),b=e().realpathSync(d),f=g().relative(a,b);if(".."===f||f.startsWith(`..${g().sep}`)||g().isAbsolute(f))throw Error("Access denied: trash directory outside root parent")}return d}function l(a){if(!a||a.includes("/")||a.includes("\\")||g().basename(a)!==a)throw Error("Invalid trash id")}function m(a,b){let c,d;e().mkdirSync(i(a),{recursive:!0}),e().mkdirSync(j(a),{recursive:!0});let f=(0,h.n2)(a,b);if(!e().existsSync(f))throw Error(`File not found: ${b}`);let k=e().statSync(f).isDirectory(),m=g().basename(b),n=(c=m.replace(/[^a-zA-Z0-9._\-\u4e00-\u9fff]/g,"_"),`${Date.now()}_${c}`),o=g().join(i(a),n);if(e().mkdirSync(g().dirname(o),{recursive:!0}),k)e().cpSync(f,o,{recursive:!0}),e().rmSync(f,{recursive:!0,force:!0});else try{e().renameSync(f,o)}catch(a){if("EXDEV"===a.code)e().copyFileSync(f,o),e().unlinkSync(f);else throw a}let p=new Date,q={id:n,originalPath:b,deletedAt:p.toISOString(),expiresAt:new Date(p.getTime()+2592e6).toISOString(),fileName:m,isDirectory:k};return l(q.id),d=g().join(j(a),`${q.id}.json`),e().writeFileSync(d,JSON.stringify(q,null,2),"utf-8"),q}},28647:(a,b,c)=>{c.d(b,{b:()=>i});var d=c(79646),e=c(29021),f=c.n(e),g=c(33873),h=c.n(g);function i(a){try{let b=function(a){let b=[],c=process.env.MINDOS_PROJECT_ROOT;c&&b.push(h().join(c,"packages","web","scripts",a));let d=process.cwd();for(let c of(b.push(h().join(d,"scripts",a)),b.push(h().resolve(d,"..","..","scripts",a)),b.push(h().join(d,".next","standalone","scripts",a)),b))if(f().existsSync(c))return c;return null}("extract-pdf.cjs");if(!b)return"";let c=(0,d.execFileSync)(function(a=process.env){return a.MINDOS_NODE_BIN?.trim()||process.execPath}(),[b,a],{encoding:"utf-8",timeout:15e3,maxBuffer:5242880});return JSON.parse(c).text||""}catch{return""}}},28696:(a,b,c)=>{c.d(b,{gG:()=>d.gG});var d=c(50294)},30281:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{O:()=>o});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(21820),j=c.n(i),k=c(31751),l=c(59349),m=c(27152),n=a([m]);m=(n.then?(await n)():n)[0];class o{isReady(){return this._ready}isBuilding(){return this._building}getDocCount(){return this.vectors.size}getDimensions(){return this.dimensions}async rebuild(a){if(!this._building){this._building=!0;try{if(!(0,m.II)()){this._building=!1;return}let b=(0,k.f)(a),c=[],d=[];for(let e of b){let b,f=h().extname(e).toLowerCase();if(".md"!==f&&".csv"!==f)continue;try{b=(0,l.TA)(a,e)}catch{continue}let g=`${e}
2
2
  ${b}`.slice(0,8e3);c.push(g),d.push(e)}if(0===c.length){this._building=!1,this._ready=!0,this.builtForRoot=a;return}let e=await (0,m.Bk)(c);if(e.length!==c.length){console.error(`[embedding-index] Expected ${c.length} vectors, got ${e.length}`),this._building=!1;return}this.vectors.clear(),this.dimensions=e[0].length;for(let a=0;a<d.length;a++)this.vectors.set(d[a],e[a]);this.builtForRoot=a,this._ready=!0;try{this.persist()}catch{}}catch(a){console.error("[embedding-index] Rebuild failed:",a instanceof Error?a.message:a)}finally{this._building=!1}}}async updateFile(a,b){let c;if(!this._ready)return;let d=h().extname(b).toLowerCase();if(".md"!==d&&".csv"!==d)return;try{c=(0,l.TA)(a,b)}catch{return}let e=`${b}
3
3
  ${c}`.slice(0,8e3),f=await (0,m.s7)(e);f&&(this.vectors.set(b,f),0===this.dimensions&&(this.dimensions=f.length))}removeFile(a){this.vectors.delete(a)}searchByVector(a,b=20){if(!this._ready||0===this.vectors.size)return[];if(this.dimensions>0&&a.length!==this.dimensions)return console.warn(`[embedding-index] Dimension mismatch: query has ${a.length} dimensions, index has ${this.dimensions}. Returning empty results.`),[];let c=[];for(let[b,d]of this.vectors){let e=function(a,b){if(a.length!==b.length||0===a.length)return 0;let c=0,d=0,e=0;for(let f=0;f<a.length;f++)c+=a[f]*b[f],d+=a[f]*a[f],e+=b[f]*b[f];let f=Math.sqrt(d)*Math.sqrt(e);return 0===f?0:Math.max(0,Math.min(1,c/f))}(a,d);c.push({path:b,similarity:e})}return c.sort((a,b)=>b.similarity-a.similarity),c.slice(0,b)}async search(a,b=20){if(!this._ready)return[];let c=await (0,m.s7)(a);return c?this.searchByVector(c,b):[]}get persistPath(){return h().join(j().homedir(),".mindos","embedding-index.json")}persist(){if(0===this.vectors.size)return;let a={version:1,builtForRoot:this.builtForRoot??"",dimensions:this.dimensions,docCount:this.vectors.size,timestamp:Date.now(),vectors:{}};for(let[b,c]of this.vectors)a.vectors[b]=Array.from(c);let b=h().dirname(this.persistPath);try{f().mkdirSync(b,{recursive:!0}),f().writeFileSync(this.persistPath,JSON.stringify(a),"utf-8")}catch{}}load(a){try{let b=f().readFileSync(this.persistPath,"utf-8"),c=JSON.parse(b);if(1!==c.version||c.builtForRoot!==a)return!1;let d=(0,k.f)(a).filter(a=>{let b=h().extname(a).toLowerCase();return".md"===b||".csv"===b}).length;if(Math.abs(d-c.docCount)>Math.max(5,.1*d))return!1;for(let[a,b]of(this.vectors.clear(),this.dimensions=c.dimensions,Object.entries(c.vectors)))this.vectors.set(a,new Float32Array(b));return this.builtForRoot=c.builtForRoot,this._ready=!0,!0}catch{return!1}}invalidate(){this.vectors.clear(),this.dimensions=0,this.builtForRoot=null,this._ready=!1}isBuiltFor(a){return this._ready&&this.builtForRoot===a}constructor(){this.vectors=new Map,this.dimensions=0,this.builtForRoot=null,this._ready=!1,this._building=!1}}d()}catch(a){d(a)}})},31751:(a,b,c)=>{c.d(b,{f:()=>function a(b,c,d={}){let f,k=function(a,b){let c=g().resolve(a),d=b?g().resolve(b):c;try{var f;let a,b=e().realpathSync(c);if(f=e().realpathSync(d),a=g().relative(b,f),""!==a&&(".."===a||a.startsWith(`..${g().sep}`)||g().isAbsolute(a)))return null}catch{return null}return{root:c,dir:d}}(b,c);if(!k)return[];let{root:l,dir:m}=k,n=d.ignoredDirs??h,o=d.allowedExtensions??i;try{f=e().readdirSync(m,{withFileTypes:!0})}catch{return[]}let p=[];for(let c of f){let e=g().join(m,c.name);if(c.isDirectory()){if(n.has(c.name))continue;p.push(...a(b,e,d))}else if(c.isFile()){var q;if(m===l&&j.has(c.name))continue;let a=g().extname(c.name).toLowerCase();o.has(a)&&p.push((q=g().relative(l,e),"win32"===process.platform?q.replace(/\\/g,"/"):q))}}return p}});var d=c(29021),e=c.n(d);c(79748);var f=c(33873),g=c.n(f);let h=new Set([".git","node_modules","app",".next",".DS_Store","mcp",".media"]),i=new Set([".md",".csv",".pdf",".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".mp3",".wav",".m4a",".ogg",".flac",".aac",".mp4",".webm",".mov",".mkv"]),j=new Set(["INSTRUCTION.md","README.md","CONFIG.json","CHANGELOG.md"])},31756:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{KP:()=>i,Ot:()=>k,T_:()=>m,im:()=>h,lr:()=>j,rl:()=>g,us:()=>l});var e=c(14270);c(84389);var f=a([e]);e=(f.then?(await f)():f)[0];let m={anthropic:{id:"anthropic",name:"Anthropic",nameZh:"Anthropic",shortLabel:"Anthropic",defaultModel:"claude-sonnet-4-6",supportsBaseUrl:!0,supportsThinking:!0,supportsListModels:!0,signupUrl:"https://console.anthropic.com/settings/keys",category:"primary"},openai:{id:"openai",name:"OpenAI",nameZh:"OpenAI",shortLabel:"OpenAI",defaultModel:"gpt-5.4",supportsBaseUrl:!0,supportsThinking:!0,supportsListModels:!0,signupUrl:"https://platform.openai.com/api-keys",category:"primary"},google:{id:"google",name:"Google Gemini",nameZh:"Google Gemini",shortLabel:"Gemini",defaultModel:"gemini-2.5-flash",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,signupUrl:"https://aistudio.google.com/apikey",category:"primary"},groq:{id:"groq",name:"Groq",nameZh:"Groq",shortLabel:"Groq",defaultModel:"llama-3.3-70b-versatile",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,signupUrl:"https://console.groq.com/keys",category:"more"},xai:{id:"xai",name:"xAI (Grok)",nameZh:"xAI (Grok)",shortLabel:"xAI",defaultModel:"grok-3",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},openrouter:{id:"openrouter",name:"OpenRouter",nameZh:"OpenRouter",shortLabel:"OpenRouter",defaultModel:"anthropic/claude-sonnet-4",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},mistral:{id:"mistral",name:"Mistral",nameZh:"Mistral",shortLabel:"Mistral",defaultModel:"mistral-large-latest",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},deepseek:{id:"deepseek",name:"DeepSeek",nameZh:"DeepSeek",shortLabel:"DeepSeek",defaultModel:"deepseek-chat",piProviderOverride:"openai",fixedBaseUrl:"https://api.deepseek.com/v1",supportsBaseUrl:!0,supportsThinking:!0,supportsListModels:!0,signupUrl:"https://platform.deepseek.com/api_keys",category:"more"},zai:{id:"zai",name:"ZhipuAI (GLM)",nameZh:"智谱 AI (GLM 国际版)",shortLabel:"智谱GLM",defaultModel:"glm-4-plus",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},"zai-cn":{id:"zai-cn",name:"ZhipuAI (GLM China)",nameZh:"智谱 AI (GLM 国内版)",shortLabel:"智谱GLM-CN",description:"China region version",descriptionZh:"中国区版本",defaultModel:"glm-4-plus",piProviderOverride:"zai",fixedBaseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,signupUrl:"https://open.bigmodel.cn/",category:"more"},"kimi-coding":{id:"kimi-coding",name:"Kimi Coding",nameZh:"Kimi Coding (月之暗面)",shortLabel:"Kimi Coding",defaultModel:"kimi-k2-thinking",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},cerebras:{id:"cerebras",name:"Cerebras",nameZh:"Cerebras",shortLabel:"Cerebras",defaultModel:"llama-4-scout-17b-16e",supportsBaseUrl:!1,supportsThinking:!1,supportsListModels:!0,category:"more"},minimax:{id:"minimax",name:"MiniMax",nameZh:"MiniMax (国际版)",shortLabel:"MiniMax",defaultModel:"MiniMax-M2.5",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},"minimax-cn":{id:"minimax-cn",name:"MiniMax (China)",nameZh:"MiniMax (国内版)",shortLabel:"MiniMax-CN",description:"China region version",descriptionZh:"中国区版本",defaultModel:"MiniMax-M2.5",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},huggingface:{id:"huggingface",name:"Hugging Face",nameZh:"Hugging Face",shortLabel:"HuggingFace",defaultModel:"Qwen/Qwen3-235B-A22B-Thinking-2507",supportsBaseUrl:!1,supportsThinking:!0,supportsListModels:!1,category:"more"},ollama:{id:"ollama",name:"Ollama",nameZh:"Ollama (本地)",shortLabel:"Ollama",description:"Local server (requires setup)",descriptionZh:"本地服务器 (需要本地部署)",defaultModel:"llama3.2",piProviderOverride:"openai",fixedBaseUrl:"http://localhost:11434/v1",apiKeyFallback:"ollama",supportsBaseUrl:!0,supportsThinking:!1,supportsListModels:!0,signupUrl:"https://ollama.com/download",category:"local"},"lm-studio":{id:"lm-studio",name:"LM Studio",nameZh:"LM Studio (本地)",shortLabel:"LM Studio",description:"Local OpenAI-compatible server",descriptionZh:"本地 OpenAI 兼容服务",defaultModel:"local-model",piProviderOverride:"openai",fixedBaseUrl:"http://localhost:1234/v1",apiKeyFallback:"lm-studio",supportsBaseUrl:!0,supportsThinking:!1,supportsListModels:!0,signupUrl:"https://lmstudio.ai/",category:"local"},vllm:{id:"vllm",name:"vLLM",nameZh:"vLLM (本地)",shortLabel:"vLLM",description:"Local OpenAI-compatible server",descriptionZh:"本地 OpenAI 兼容服务",defaultModel:"local-model",piProviderOverride:"openai",fixedBaseUrl:"http://localhost:8000/v1",apiKeyFallback:"vllm",supportsBaseUrl:!0,supportsThinking:!1,supportsListModels:!0,signupUrl:"https://docs.vllm.ai/",category:"local"}};function g(a){return a in m}function h(a){return m[a]??m.anthropic}function i(a){return m[a].piProviderOverride??a}function j(a){return"deepseek"===a?process.env.DEEPSEEK_API_KEY:(0,e.getEnvApiKey)(i(a))}function k(a){let b=m[a];if(b.fixedBaseUrl)return b.fixedBaseUrl;try{let b=(0,e.getModels)(i(a));return b[0]?.baseUrl??""}catch{return""}}function l(a){try{let b=(0,e.getModels)(i(a));return b[0]?.api??"openai-completions"}catch{return"openai-completions"}}Object.keys(m),d()}catch(a){d(a)}})},36057:(a,b,c)=>{c(33873),c(59349)},37700:(a,b,c)=>{c.d(b,{d:()=>q});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(31751),i=c(59349),j=c(13308),k=c(28647),l=c(87155),m=c(82614);let n="u">typeof Intl&&Intl.Segmenter?new Intl.Segmenter("zh",{granularity:"word"}):null;function o(a){let b=new Set,c=a.toLowerCase(),d=c.match(/[a-z0-9_$@#]+/g);if(d)for(let a of d)a.length>=2&&b.add(a);if(l.y.test(c))if(n)for(let{segment:a,isWordLike:d}of n.segment(c)){if(!d)continue;let c=a.trim();if(c)for(let a of(b.add(c),c))l.y.test(a)&&b.add(a)}else{let a=[];for(let d of c)l.y.test(d)?a.push(d):a.length>0&&(p(a,b),a.length=0);a.length>0&&p(a,b)}return b}function p(a,b){for(let c=0;c<a.length;c++)b.add(a[c]),c+1<a.length&&b.add(a[c]+a[c+1])}class q{async rebuildAsync(a){let b=m.Y.startTimer("search.index.rebuild.async");try{let d,{Worker:e}=await Promise.resolve().then(c.t.bind(c,73566,23)),{existsSync:f}=await Promise.resolve().then(c.t.bind(c,29021,23));try{if(d=22288,!f(d))throw Error("Worker file not found")}catch{this.rebuild(a),b({fileCount:this.fileCount,tokenCount:this.invertedIndex?.size??0,method:"sync_no_worker"});return}let g=await new Promise((b,c)=>{let f=new e(d,{workerData:{mindRoot:a},execArgv:process.execArgv.filter(a=>a.startsWith("--require")||a.startsWith("--loader"))}),g=setTimeout(()=>{f.terminate(),c(Error("Search rebuild worker timed out"))},3e4);f.on("message",a=>{clearTimeout(g),f.terminate(),a.ok&&a.data?b(a.data):c(Error(a.error||"Worker failed"))}),f.on("error",a=>{clearTimeout(g),f.terminate(),c(a)})});this.restoreFromPersisted(g),b({fileCount:this.fileCount,tokenCount:this.invertedIndex?.size??0,method:"worker"})}catch{this.rebuild(a),b({fileCount:this.fileCount,tokenCount:this.invertedIndex?.size??0,method:"sync_fallback"})}}restoreFromPersisted(a){this.builtForRoot=a.builtForRoot,this.fileCount=a.fileCount,this.totalChars=a.totalChars,this.docLengths=new Map(Object.entries(a.docLengths).map(([a,b])=>[a,b]));let b=new Map,c=new Map;for(let[d,e]of Object.entries(a.invertedIndex)){let a=new Set(e);for(let e of(b.set(d,a),a)){let a=c.get(e);a||(a=new Set,c.set(e,a)),a.add(d)}}this.invertedIndex=b,this.fileTokens=c}rebuild(a){let b=m.Y.startTimer("search.index.rebuild"),c=(0,h.f)(a),d=new Map,e=new Map,f=new Map,l=0,n=0;for(let b of c){let c;if(".pdf"===g().extname(b).toLowerCase())try{let d=(0,j.n2)(a,b);if(!(c=(0,k.b)(d)))continue}catch{continue}else try{c=(0,i.TA)(a,b)}catch{continue}e.set(b,c.length),l+=c.length,c.length>5e4&&(c=c.slice(0,5e4));let h=o(b+"\n"+c);for(let a of(n+=h.size,f.set(b,h),h)){let c=d.get(a);c||(c=new Set,d.set(a,c)),c.add(b)}}this.invertedIndex=d,this.builtForRoot=a,this.fileCount=c.length,this.docLengths=e,this.totalChars=l,this.fileTokens=f,b({fileCount:c.length,tokenCount:n})}invalidate(){this.invertedIndex=null,this.builtForRoot=null,this.fileCount=0,this.docLengths.clear(),this.totalChars=0,this.fileTokens.clear()}removeFile(a){if(!this.invertedIndex)return;let b=this.fileTokens.get(a);if(b){for(let c of b)this.invertedIndex.get(c)?.delete(a);this.fileTokens.delete(a)}let c=this.docLengths.get(a)??0;this.totalChars-=c,this.docLengths.delete(a),this.fileCount=Math.max(0,this.fileCount-1)}addFile(a,b){let c;if(!this.invertedIndex)return;if(".pdf"===g().extname(b).toLowerCase())try{let d=(0,j.n2)(a,b);if(!(c=(0,k.b)(d)))return}catch{return}else try{c=(0,i.TA)(a,b)}catch{return}this.docLengths.set(b,c.length),this.totalChars+=c.length,this.fileCount++,c.length>5e4&&(c=c.slice(0,5e4));let d=o(b+"\n"+c);for(let a of(this.fileTokens.set(b,d),d)){let c=this.invertedIndex.get(a);c||(c=new Set,this.invertedIndex.set(a,c)),c.add(b)}}updateFile(a,b){this.invertedIndex&&(this.removeFile(b),this.addFile(a,b))}isBuiltFor(a){return null!==this.invertedIndex&&this.builtForRoot===a}isBuilt(){return null!==this.invertedIndex}getFileCount(){return this.fileCount}getAvgDocLength(){return this.fileCount>0?this.totalChars/this.fileCount:0}getDocLength(a){return this.docLengths.get(a)??0}getDocFrequency(a){return this.invertedIndex?this.invertedIndex.get(a)?.size??0:0}getCandidatesUnion(a){if(!a.trim()||!this.invertedIndex)return null;let b=o(a.toLowerCase().trim());if(0===b.size)return null;let c=new Map;for(let a of b){let b=this.invertedIndex.get(a);if(b)for(let a of b)c.set(a,(c.get(a)??0)+1)}if(0===c.size)return[];let d=b.size;if(d>=3){let a=Math.max(1,Math.floor(d/2)),b=[...c.entries()].filter(([,b])=>b>=a).map(([a])=>a);if(b.length>0)return b}return[...c.keys()]}getCandidates(a){if(!a.trim()||!this.invertedIndex)return null;let b=o(a.toLowerCase().trim());if(0===b.size)return null;let c=null;for(let a of b){let b=this.invertedIndex.get(a);if(!b)return[];if(null===c)c=new Set(b);else{for(let a of c)b.has(a)||c.delete(a);if(0===c.size)return[]}}return c?Array.from(c):[]}persist(a){if(!this.invertedIndex)return;let b={version:1,builtForRoot:this.builtForRoot??"",fileCount:this.fileCount,totalChars:this.totalChars,docLengths:Object.fromEntries(this.docLengths),invertedIndex:{},timestamp:Date.now()};for(let[a,c]of this.invertedIndex)b.invertedIndex[a]=[...c];let c=g().join(a,"search-index.json");try{e().mkdirSync(a,{recursive:!0}),e().writeFileSync(c,JSON.stringify(b),"utf-8")}catch{}}load(a,b){let c,d,f=g().join(a,"search-index.json");try{c=e().readFileSync(f,"utf-8")}catch{return!1}try{d=JSON.parse(c)}catch{return!1}if(1!==d.version||d.builtForRoot!==b||(0,h.f)(b).length!==d.fileCount)return!1;let i=Object.keys(d.docLengths);if(Math.min(50,i.length)===i.length)for(let a of i)try{if(e().statSync((0,j.n2)(b,a)).mtimeMs>d.timestamp)return!1}catch{return!1}else{let a=Math.max(1,Math.floor(i.length/40)),c=new Set;for(let b=0;b<i.length;b+=a)c.add(b);for(let a=Math.max(0,i.length-10);a<i.length;a++)c.add(a);for(let a of c)try{if(e().statSync((0,j.n2)(b,i[a])).mtimeMs>d.timestamp)return!1}catch{return!1}}return this.restoreFromPersisted(d),!0}constructor(){this.invertedIndex=null,this.builtForRoot=null,this.fileCount=0,this.docLengths=new Map,this.totalChars=0,this.fileTokens=new Map}}},38264:(a,b,c)=>{function d(a){return!!a&&"object"==typeof a}function e(a,b){let c=a[b];return d(c)?c:void 0}function f(a){return!!d(a)&&"message_update"===a.type&&e(a,"assistantMessageEvent")?.type==="text_delta"}function g(a){if(!d(a))return"";let b=e(a,"assistantMessageEvent");return"string"==typeof b?.delta?b.delta:""}function h(a){return!!d(a)&&"message_update"===a.type&&e(a,"assistantMessageEvent")?.type==="thinking_delta"}function i(a){return g(a)}function j(a){return d(a)&&"tool_execution_start"===a.type}function k(a){return d(a)?{toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"",toolName:"string"==typeof a.toolName?a.toolName:"unknown",args:a.args??{}}:{toolCallId:"",toolName:"unknown",args:{}}}function l(a){return d(a)&&"tool_execution_end"===a.type}function m(a){if(!d(a))return{toolCallId:"",output:"",isError:!1};let b=e(a,"result"),c=(Array.isArray(b?.content)?b.content:[]).filter(a=>d(a)&&"text"===a.type).map(a=>a.text??"").join("");return{toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"",output:c,isError:!0===a.isError}}function n(a){return"organize"===a?"organize":"chat"===a?"chat":"agent"}function o(a){return Math.min(1e3*2**a,1e4)}function p(a,b){return new Promise((c,d)=>{let e=()=>b?.reason??new DOMException("The operation was aborted.","AbortError");if(b?.aborted)return void d(e());let f=setTimeout(c,a);b?.addEventListener("abort",()=>{clearTimeout(f),d(e())},{once:!0})})}async function q(a){let b=a.messages.length>0?a.messages[a.messages.length-1]:void 0,c=b?.role==="user"?b.content:"",d=b?.role==="user"&&"string"==typeof b.skillName?b.skillName:void 0,e=r(b),f=a.services.resolveModelConfig({providerOverride:a.providerOverride,modelOverride:a.modelOverride,messages:a.messages,hasImages:a.messages.some(a=>(r(a)?.length??0)>0)}),g=a.systemPrompt;if("ollama"===f.provider&&a.services.getOllamaContextWindow&&a.services.estimateTokens&&a.services.compactPrompt){let b=f.baseUrl||"http://localhost:11434/v1",c=await a.services.getOllamaContextWindow(b,f.modelName),d=a.services.estimateTokens(g),e=c?Math.floor(.7*c):void 0;a.services.onOllamaContext?.({modelName:f.modelName,contextWindow:c,promptTokens:d,maxPromptTokens:e}),e&&d>e&&(g=a.services.compactPrompt(g,{maxPromptTokens:e,estimateTokens:a.services.estimateTokens,onStrip:a.services.onOllamaCompactStrip}),a.services.onOllamaCompacted?.({beforeTokens:d,afterTokens:a.services.estimateTokens(g)}))}let h=(function(a){let b=[];for(let c of a){let a=c.timestamp??Date.now();if("user"===c.role){b.push({role:"user",content:function(a,b){let c=b?.filter(a=>a.data);if(!c||0===c.length)return a;let d=c.map(a=>({type:"image",data:a.data,mimeType:a.mimeType}));return a&&d.push({type:"text",text:a}),d}(c.content,c.images),timestamp:a});continue}if(c.content.startsWith("__error__"))continue;if(!c.parts||0===c.parts.length){c.content&&b.push(s({content:[{type:"text",text:c.content}],stopReason:"stop",timestamp:a}));continue}let d=[],e=[];for(let a of c.parts)"text"===a.type?a.text&&d.push({type:"text",text:a.text}):"tool-call"===a.type&&(d.push({type:"toolCall",id:a.toolCallId,name:a.toolName,arguments:a.input??{}}),e.push(a));for(let c of(d.length>0&&b.push(s({content:d,stopReason:e.length>0?"toolUse":"stop",timestamp:a})),e))b.push({role:"toolResult",toolCallId:c.toolCallId,toolName:c.toolName,content:[{type:"text",text:c.output??""}],isError:"error"===c.state,timestamp:a})}return b})(a.messages).slice(0,-1),i=a.services.convertToLlm(h);a.services.setKbMode(a.mode);let j=a.services.createAuthStorage();j.setRuntimeApiKey(a.services.toRuntimeProvider(f.provider),f.apiKey);let k=a.services.createModelRegistry(j),l=a.services.createSettingsManager(function(a={},b){return{enableSkillCommands:!0,...a.enableThinking&&"anthropic"===b?{thinkingBudgets:{medium:a.thinkingBudget??5e3}}:{},..."off"===a.contextStrategy?{compaction:{enabled:!1}}:{}}}(a.agentConfig,f.provider)),m=new Set(["mindos","mindos-zh","mindos-max","mindos-max-zh"]),n=a.services.createResourceLoader({cwd:a.projectRoot,settingsManager:l,systemPromptOverride:()=>g,appendSystemPromptOverride:()=>[],agentsFilesOverride:()=>({agentsFiles:[]}),skillsOverride:a=>({...a,skills:a.skills.filter(a=>!m.has(a.name))}),additionalSkillPaths:a.additionalSkillPaths??[],additionalExtensionPaths:a.additionalExtensionPaths??[]});if(await n.reload(),"agent"===a.mode){let b=new Set(a.serverSettings?.disabledSkills??[]),c=(n.getSkills?.().skills??[]).filter(a=>!m.has(a.name)&&!a.disableModelInvocation&&!b.has(a.name));c.length>0&&a.services.generateSkillsXml&&(g+=`
4
4