@jiangxiaosheng/digital-agent-platform 1.0.0 → 1.0.2

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 (302) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +316 -0
  3. package/.next/app-path-routes-manifest.json +1 -0
  4. package/.next/build-manifest.json +33 -0
  5. package/.next/cache/.rscinfo +1 -0
  6. package/.next/cache/.tsbuildinfo +1 -0
  7. package/.next/cache/eslint/.cache_1bmmeh3 +1 -0
  8. package/.next/cache/webpack/client-production/0.pack +0 -0
  9. package/.next/cache/webpack/client-production/index.pack +0 -0
  10. package/.next/cache/webpack/edge-server-production/0.pack +0 -0
  11. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  12. package/.next/cache/webpack/server-production/0.pack +0 -0
  13. package/.next/cache/webpack/server-production/index.pack +0 -0
  14. package/.next/diagnostics/build-diagnostics.json +6 -0
  15. package/.next/diagnostics/framework.json +1 -0
  16. package/.next/export-marker.json +1 -0
  17. package/.next/images-manifest.json +1 -0
  18. package/.next/next-minimal-server.js.nft.json +1 -0
  19. package/.next/next-server.js.nft.json +1 -0
  20. package/.next/package.json +1 -0
  21. package/.next/prerender-manifest.json +1 -0
  22. package/.next/react-loadable-manifest.json +1 -0
  23. package/.next/required-server-files.json +1 -0
  24. package/.next/routes-manifest.json +1 -0
  25. package/.next/server/app/[locale]/agents/[id]/chat/page.js +1 -0
  26. package/.next/server/app/[locale]/agents/[id]/chat/page.js.nft.json +1 -0
  27. package/.next/server/app/[locale]/agents/[id]/chat/page_client-reference-manifest.js +1 -0
  28. package/.next/server/app/[locale]/agents/[id]/edit/page.js +1 -0
  29. package/.next/server/app/[locale]/agents/[id]/edit/page.js.nft.json +1 -0
  30. package/.next/server/app/[locale]/agents/[id]/edit/page_client-reference-manifest.js +1 -0
  31. package/.next/server/app/[locale]/agents/new/page.js +1 -0
  32. package/.next/server/app/[locale]/agents/new/page.js.nft.json +1 -0
  33. package/.next/server/app/[locale]/agents/new/page_client-reference-manifest.js +1 -0
  34. package/.next/server/app/[locale]/agents/page.js +1 -0
  35. package/.next/server/app/[locale]/agents/page.js.nft.json +1 -0
  36. package/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -0
  37. package/.next/server/app/[locale]/knowledge/page.js +1 -0
  38. package/.next/server/app/[locale]/knowledge/page.js.nft.json +1 -0
  39. package/.next/server/app/[locale]/knowledge/page_client-reference-manifest.js +1 -0
  40. package/.next/server/app/[locale]/page.js +1 -0
  41. package/.next/server/app/[locale]/page.js.nft.json +1 -0
  42. package/.next/server/app/[locale]/page_client-reference-manifest.js +1 -0
  43. package/.next/server/app/[locale]/settings/page.js +1 -0
  44. package/.next/server/app/[locale]/settings/page.js.nft.json +1 -0
  45. package/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -0
  46. package/.next/server/app/_not-found/page.js +1 -0
  47. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  48. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  49. package/.next/server/app/_not-found.html +1 -0
  50. package/.next/server/app/_not-found.meta +8 -0
  51. package/.next/server/app/_not-found.rsc +12 -0
  52. package/.next/server/app/api/agents/[id]/route.js +1 -0
  53. package/.next/server/app/api/agents/[id]/route.js.nft.json +1 -0
  54. package/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/agents/route.js +1 -0
  56. package/.next/server/app/api/agents/route.js.nft.json +1 -0
  57. package/.next/server/app/api/agents/route_client-reference-manifest.js +1 -0
  58. package/.next/server/app/api/auth-config/test/route.js +1 -0
  59. package/.next/server/app/api/auth-config/test/route.js.nft.json +1 -0
  60. package/.next/server/app/api/auth-config/test/route_client-reference-manifest.js +1 -0
  61. package/.next/server/app/api/bash-output/route.js +1 -0
  62. package/.next/server/app/api/bash-output/route.js.nft.json +1 -0
  63. package/.next/server/app/api/bash-output/route_client-reference-manifest.js +1 -0
  64. package/.next/server/app/api/chat/[agentId]/route.js +5 -0
  65. package/.next/server/app/api/chat/[agentId]/route.js.nft.json +1 -0
  66. package/.next/server/app/api/chat/[agentId]/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/env-vars/[key]/route.js +1 -0
  68. package/.next/server/app/api/env-vars/[key]/route.js.nft.json +1 -0
  69. package/.next/server/app/api/env-vars/[key]/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/env-vars/route.js +1 -0
  71. package/.next/server/app/api/env-vars/route.js.nft.json +1 -0
  72. package/.next/server/app/api/env-vars/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/env-vars/scan/route.js +1 -0
  74. package/.next/server/app/api/env-vars/scan/route.js.nft.json +1 -0
  75. package/.next/server/app/api/env-vars/scan/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/file-serve/route.js +1 -0
  77. package/.next/server/app/api/file-serve/route.js.nft.json +1 -0
  78. package/.next/server/app/api/file-serve/route_client-reference-manifest.js +1 -0
  79. package/.next/server/app/api/fs/browse/route.js +1 -0
  80. package/.next/server/app/api/fs/browse/route.js.nft.json +1 -0
  81. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/knowledge/[id]/documents/[docId]/route.js +60 -0
  83. package/.next/server/app/api/knowledge/[id]/documents/[docId]/route.js.nft.json +1 -0
  84. package/.next/server/app/api/knowledge/[id]/documents/[docId]/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/knowledge/[id]/route.js +1 -0
  86. package/.next/server/app/api/knowledge/[id]/route.js.nft.json +1 -0
  87. package/.next/server/app/api/knowledge/[id]/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/knowledge/[id]/upload/route.js +62 -0
  89. package/.next/server/app/api/knowledge/[id]/upload/route.js.nft.json +1 -0
  90. package/.next/server/app/api/knowledge/[id]/upload/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/knowledge/route.js +1 -0
  92. package/.next/server/app/api/knowledge/route.js.nft.json +1 -0
  93. package/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/knowledge/search/route.js +1 -0
  95. package/.next/server/app/api/knowledge/search/route.js.nft.json +1 -0
  96. package/.next/server/app/api/knowledge/search/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/models/route.js +1 -0
  98. package/.next/server/app/api/models/route.js.nft.json +1 -0
  99. package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
  100. package/.next/server/app/api/models-config/route.js +1 -0
  101. package/.next/server/app/api/models-config/route.js.nft.json +1 -0
  102. package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
  103. package/.next/server/app/api/models-config/test/route.js +1 -0
  104. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
  105. package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
  106. package/.next/server/app/api/sessions/[agentId]/[sessionId]/route.js +1 -0
  107. package/.next/server/app/api/sessions/[agentId]/[sessionId]/route.js.nft.json +1 -0
  108. package/.next/server/app/api/sessions/[agentId]/[sessionId]/route_client-reference-manifest.js +1 -0
  109. package/.next/server/app/api/sessions/[agentId]/route.js +1 -0
  110. package/.next/server/app/api/sessions/[agentId]/route.js.nft.json +1 -0
  111. package/.next/server/app/api/sessions/[agentId]/route_client-reference-manifest.js +1 -0
  112. package/.next/server/app/api/sessions/history/route.js +1 -0
  113. package/.next/server/app/api/sessions/history/route.js.nft.json +1 -0
  114. package/.next/server/app/api/sessions/history/route_client-reference-manifest.js +1 -0
  115. package/.next/server/app/api/settings/route.js +1 -0
  116. package/.next/server/app/api/settings/route.js.nft.json +1 -0
  117. package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -0
  118. package/.next/server/app/api/skills/[name]/route.js +1 -0
  119. package/.next/server/app/api/skills/[name]/route.js.nft.json +1 -0
  120. package/.next/server/app/api/skills/[name]/route_client-reference-manifest.js +1 -0
  121. package/.next/server/app/api/skills/install/route.js +1 -0
  122. package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
  123. package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
  124. package/.next/server/app/api/skills/route.js +1 -0
  125. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  126. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  127. package/.next/server/app/api/skills/search/route.js +1 -0
  128. package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
  129. package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
  130. package/.next/server/app/api/tts/route.js +8 -0
  131. package/.next/server/app/api/tts/route.js.nft.json +1 -0
  132. package/.next/server/app/api/tts/route_client-reference-manifest.js +1 -0
  133. package/.next/server/app/api/voice-provider/route.js +1 -0
  134. package/.next/server/app/api/voice-provider/route.js.nft.json +1 -0
  135. package/.next/server/app/api/voice-provider/route_client-reference-manifest.js +1 -0
  136. package/.next/server/app/api/workspace-files/route.js +1 -0
  137. package/.next/server/app/api/workspace-files/route.js.nft.json +1 -0
  138. package/.next/server/app/api/workspace-files/route_client-reference-manifest.js +1 -0
  139. package/.next/server/app/index.html +1 -0
  140. package/.next/server/app/index.meta +9 -0
  141. package/.next/server/app/index.rsc +13 -0
  142. package/.next/server/app/page.js +1 -0
  143. package/.next/server/app/page.js.nft.json +1 -0
  144. package/.next/server/app/page_client-reference-manifest.js +1 -0
  145. package/.next/server/app-paths-manifest.json +40 -0
  146. package/.next/server/chunks/1285.js +1 -0
  147. package/.next/server/chunks/2112.js +1 -0
  148. package/.next/server/chunks/2961.js +1 -0
  149. package/.next/server/chunks/3651.js +1 -0
  150. package/.next/server/chunks/407.js +1 -0
  151. package/.next/server/chunks/4125.js +1 -0
  152. package/.next/server/chunks/4127.js +1 -0
  153. package/.next/server/chunks/4907.js +1 -0
  154. package/.next/server/chunks/5051.js +1 -0
  155. package/.next/server/chunks/5452.js +1 -0
  156. package/.next/server/chunks/5994.js +13 -0
  157. package/.next/server/chunks/6777.js +1 -0
  158. package/.next/server/chunks/7368.js +1 -0
  159. package/.next/server/chunks/7627.js +6 -0
  160. package/.next/server/chunks/763.js +1 -0
  161. package/.next/server/chunks/7682.js +1 -0
  162. package/.next/server/chunks/8403.js +3 -0
  163. package/.next/server/chunks/8405.js +12 -0
  164. package/.next/server/chunks/9251.js +1 -0
  165. package/.next/server/edge-runtime-webpack.js +2 -0
  166. package/.next/server/edge-runtime-webpack.js.map +1 -0
  167. package/.next/server/functions-config-manifest.json +1 -0
  168. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  169. package/.next/server/middleware-build-manifest.js +1 -0
  170. package/.next/server/middleware-manifest.json +32 -0
  171. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  172. package/.next/server/next-font-manifest.js +1 -0
  173. package/.next/server/next-font-manifest.json +1 -0
  174. package/.next/server/pages/404.html +1 -0
  175. package/.next/server/pages/500.html +1 -0
  176. package/.next/server/pages/_app.js +1 -0
  177. package/.next/server/pages/_app.js.nft.json +1 -0
  178. package/.next/server/pages/_document.js +1 -0
  179. package/.next/server/pages/_document.js.nft.json +1 -0
  180. package/.next/server/pages/_error.js +1 -0
  181. package/.next/server/pages/_error.js.nft.json +1 -0
  182. package/.next/server/pages-manifest.json +1 -0
  183. package/.next/server/server-reference-manifest.js +1 -0
  184. package/.next/server/server-reference-manifest.json +1 -0
  185. package/.next/server/src/middleware.js +14 -0
  186. package/.next/server/src/middleware.js.map +1 -0
  187. package/.next/server/webpack-runtime.js +1 -0
  188. package/.next/static/VoyTtGCQMPGM_4nEMWYg5/_buildManifest.js +1 -0
  189. package/.next/static/VoyTtGCQMPGM_4nEMWYg5/_ssgManifest.js +1 -0
  190. package/.next/static/chunks/1517-9c89c425ac486877.js +2 -0
  191. package/.next/static/chunks/1868-9f3e42aa5a6ea9d2.js +1 -0
  192. package/.next/static/chunks/2733-714d0e6cd51477c7.js +1 -0
  193. package/.next/static/chunks/3259-52b0aabc8fbba4a9.js +1 -0
  194. package/.next/static/chunks/3923-e04a628626d77a16.js +1 -0
  195. package/.next/static/chunks/4bd1b696-c90310bf0ab1fbc7.js +1 -0
  196. package/.next/static/chunks/5663-7b816438e0166950.js +1 -0
  197. package/.next/static/chunks/6742-ad22486f7c4c8592.js +1 -0
  198. package/.next/static/chunks/7200-c9c613d1b11207fb.js +1 -0
  199. package/.next/static/chunks/8173-6258ed62b7084bda.js +1 -0
  200. package/.next/static/chunks/8313-cd4e4ad40e185f1c.js +1 -0
  201. package/.next/static/chunks/app/[locale]/agents/[id]/chat/page-95dc12875cda0b9c.js +1 -0
  202. package/.next/static/chunks/app/[locale]/agents/[id]/edit/page-8d0cc73c7aff7774.js +1 -0
  203. package/.next/static/chunks/app/[locale]/agents/new/page-aeaa197c0ccfd2f9.js +1 -0
  204. package/.next/static/chunks/app/[locale]/agents/page-243c454594122944.js +1 -0
  205. package/.next/static/chunks/app/[locale]/knowledge/page-7b4b6aa0a07d7da3.js +1 -0
  206. package/.next/static/chunks/app/[locale]/layout-48d759d6db5dd8ae.js +1 -0
  207. package/.next/static/chunks/app/[locale]/page-b9ea4f8cf8aeb0f1.js +1 -0
  208. package/.next/static/chunks/app/[locale]/settings/page-71d67c3b9f712584.js +1 -0
  209. package/.next/static/chunks/app/_not-found/page-f97d2843fca4f7e9.js +1 -0
  210. package/.next/static/chunks/app/api/agents/[id]/route-2c9f12e90dc8bc05.js +1 -0
  211. package/.next/static/chunks/app/api/agents/route-e227ba4be09c8ea2.js +1 -0
  212. package/.next/static/chunks/app/api/auth-config/test/route-1a6a754ae71e89f0.js +1 -0
  213. package/.next/static/chunks/app/api/bash-output/route-0bfb3c0f9ff5859a.js +1 -0
  214. package/.next/static/chunks/app/api/chat/[agentId]/route-f7318b5c8e97f243.js +1 -0
  215. package/.next/static/chunks/app/api/env-vars/[key]/route-567c08ee1be81799.js +1 -0
  216. package/.next/static/chunks/app/api/env-vars/route-146d3ab2015e6fe6.js +1 -0
  217. package/.next/static/chunks/app/api/env-vars/scan/route-2910d42f96d76168.js +1 -0
  218. package/.next/static/chunks/app/api/file-serve/route-76913780801418d4.js +1 -0
  219. package/.next/static/chunks/app/api/fs/browse/route-85da11c8b91bfc41.js +1 -0
  220. package/.next/static/chunks/app/api/knowledge/[id]/documents/[docId]/route-db2e1804b71004c5.js +1 -0
  221. package/.next/static/chunks/app/api/knowledge/[id]/route-501735d3dfb2e743.js +1 -0
  222. package/.next/static/chunks/app/api/knowledge/[id]/upload/route-fb036c262ee843f0.js +1 -0
  223. package/.next/static/chunks/app/api/knowledge/route-f5adfe5daf2e157c.js +1 -0
  224. package/.next/static/chunks/app/api/knowledge/search/route-54c8135ac355fe2e.js +1 -0
  225. package/.next/static/chunks/app/api/models/route-9e102c5352543aea.js +1 -0
  226. package/.next/static/chunks/app/api/models-config/route-ad2d0c9262659d68.js +1 -0
  227. package/.next/static/chunks/app/api/models-config/test/route-272aea5aa29f1429.js +1 -0
  228. package/.next/static/chunks/app/api/sessions/[agentId]/[sessionId]/route-4ed9dc6ddb3b98da.js +1 -0
  229. package/.next/static/chunks/app/api/sessions/[agentId]/route-2fa7611378376ed4.js +1 -0
  230. package/.next/static/chunks/app/api/sessions/history/route-5a455eb0be9b3a33.js +1 -0
  231. package/.next/static/chunks/app/api/settings/route-969f9ac513905ffe.js +1 -0
  232. package/.next/static/chunks/app/api/skills/[name]/route-7df36eded75e7234.js +1 -0
  233. package/.next/static/chunks/app/api/skills/install/route-0ab555085d740ab8.js +1 -0
  234. package/.next/static/chunks/app/api/skills/route-e5affcfa067cf550.js +1 -0
  235. package/.next/static/chunks/app/api/skills/search/route-b5b24854e46bb392.js +1 -0
  236. package/.next/static/chunks/app/api/tts/route-8186cb3d5316250e.js +1 -0
  237. package/.next/static/chunks/app/api/voice-provider/route-df0bb3cf19b0296c.js +1 -0
  238. package/.next/static/chunks/app/api/workspace-files/route-2abf9592333cfebc.js +1 -0
  239. package/.next/static/chunks/app/layout-4af7a40b1f262149.js +1 -0
  240. package/.next/static/chunks/app/page-6c018b7c1e2b97bc.js +1 -0
  241. package/.next/static/chunks/framework-a08059d19b5ea91c.js +1 -0
  242. package/.next/static/chunks/main-294df54c69003650.js +1 -0
  243. package/.next/static/chunks/main-app-07be5f69ef8a336a.js +1 -0
  244. package/.next/static/chunks/pages/_app-00b41aece417ee52.js +1 -0
  245. package/.next/static/chunks/pages/_error-6b43ce36a8d09a61.js +1 -0
  246. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  247. package/.next/static/chunks/webpack-9b9d7723f8078270.js +1 -0
  248. package/.next/static/css/632ce3b5496b50af.css +1 -0
  249. package/.next/static/css/7e7d96b1e6991756.css +1 -0
  250. package/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  251. package/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  252. package/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  253. package/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  254. package/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  255. package/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  256. package/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  257. package/.next/trace +35 -0
  258. package/.next/types/app/[locale]/agents/[id]/chat/page.ts +84 -0
  259. package/.next/types/app/[locale]/agents/[id]/edit/page.ts +84 -0
  260. package/.next/types/app/[locale]/agents/new/page.ts +84 -0
  261. package/.next/types/app/[locale]/agents/page.ts +84 -0
  262. package/.next/types/app/[locale]/knowledge/page.ts +84 -0
  263. package/.next/types/app/[locale]/page.ts +84 -0
  264. package/.next/types/app/[locale]/settings/page.ts +84 -0
  265. package/.next/types/app/api/agents/[id]/route.ts +347 -0
  266. package/.next/types/app/api/agents/route.ts +347 -0
  267. package/.next/types/app/api/auth-config/test/route.ts +347 -0
  268. package/.next/types/app/api/bash-output/route.ts +347 -0
  269. package/.next/types/app/api/chat/[agentId]/route.ts +347 -0
  270. package/.next/types/app/api/env-vars/[key]/route.ts +347 -0
  271. package/.next/types/app/api/env-vars/route.ts +347 -0
  272. package/.next/types/app/api/env-vars/scan/route.ts +347 -0
  273. package/.next/types/app/api/file-serve/route.ts +347 -0
  274. package/.next/types/app/api/fs/browse/route.ts +347 -0
  275. package/.next/types/app/api/knowledge/[id]/documents/[docId]/route.ts +347 -0
  276. package/.next/types/app/api/knowledge/[id]/route.ts +347 -0
  277. package/.next/types/app/api/knowledge/[id]/upload/route.ts +347 -0
  278. package/.next/types/app/api/knowledge/route.ts +347 -0
  279. package/.next/types/app/api/knowledge/search/route.ts +347 -0
  280. package/.next/types/app/api/models/route.ts +347 -0
  281. package/.next/types/app/api/models-config/route.ts +347 -0
  282. package/.next/types/app/api/models-config/test/route.ts +347 -0
  283. package/.next/types/app/api/sessions/[agentId]/[sessionId]/route.ts +347 -0
  284. package/.next/types/app/api/sessions/[agentId]/route.ts +347 -0
  285. package/.next/types/app/api/sessions/history/route.ts +347 -0
  286. package/.next/types/app/api/settings/route.ts +347 -0
  287. package/.next/types/app/api/skills/[name]/route.ts +347 -0
  288. package/.next/types/app/api/skills/install/route.ts +347 -0
  289. package/.next/types/app/api/skills/route.ts +347 -0
  290. package/.next/types/app/api/skills/search/route.ts +347 -0
  291. package/.next/types/app/api/tts/route.ts +347 -0
  292. package/.next/types/app/api/voice-provider/route.ts +347 -0
  293. package/.next/types/app/api/workspace-files/route.ts +347 -0
  294. package/.next/types/app/layout.ts +84 -0
  295. package/.next/types/app/page.ts +84 -0
  296. package/.next/types/cache-life.d.ts +141 -0
  297. package/.next/types/package.json +1 -0
  298. package/bin/dap.js +85 -0
  299. package/package.json +15 -1
  300. package/src/types/agent.ts +4 -0
  301. package/eslint.config.mjs +0 -20
  302. package/next-env.d.ts +0 -5
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=2455,e.ids=[2455],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},33989:(e,s,a)=>{"use strict";a.r(s),a.d(s,{GlobalError:()=>l.a,__next_app__:()=>x,pages:()=>c,routeModule:()=>m,tree:()=>o});var t=a(70260),r=a(28203),n=a(25155),l=a.n(n),i=a(67292),d={};for(let e in i)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>i[e]);a.d(s,d);let o=["",{children:["[locale]",{children:["settings",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(a.bind(a,28660)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(a.bind(a,51341)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(a.bind(a,71354)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(a.t.bind(a,19937,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(a.t.bind(a,69116,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(a.t.bind(a,41485,23)),"next/dist/client/components/unauthorized-error"]}],c=["/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx"],x={require:a,loadChunk:()=>Promise.resolve()},m=new t.AppPageRouteModule({definition:{kind:r.RouteKind.APP_PAGE,page:"/[locale]/settings/page",pathname:"/[locale]/settings",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},40363:(e,s,a)=>{Promise.resolve().then(a.bind(a,28660))},16387:(e,s,a)=>{Promise.resolve().then(a.bind(a,51890))},42163:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},86235:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},18741:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},49656:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},51890:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>M});var t=a(45512),r=a(58009),n=a(29362),l=a(3371),i=a(79334),d=a(86235),o=a(24849),c=a(41680);let x=(0,c.A)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var m=a(18741),p=a(98755),u=a(99905),h=a(49656);let g=(0,c.A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),v=(0,c.A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),f=(0,c.A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var j=a(92557),b=a(20169),y=a(39400),N=a(77722),k=a(52628),w=a(28712),C=a(17524),S=a(93732),A=a(78447),E=a(44195),K=a(16873),z=a(42163);let T=(0,c.A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var P=a(75002),B=a(43264);function $({enabledSkills:e,onChange:s}){let[a,n]=(0,r.useState)([]),[l,i]=(0,r.useState)(!1),[o,c]=(0,r.useState)(!1),x=(0,r.useCallback)(()=>{i(!0),fetch("/api/skills").then(e=>e.json()).then(n).finally(()=>i(!1))},[]),p=async a=>{await fetch(`/api/skills/${encodeURIComponent(a)}`,{method:"DELETE"}),n(e=>e.filter(e=>e.name!==a)),s&&e&&s(e.filter(e=>e!==a))};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-muted-foreground",children:["已安装 ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:a.length})," 个 Skill"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(y.$,{variant:"ghost",size:"sm",onClick:x,disabled:l,className:"gap-1.5 h-8",children:[(0,t.jsx)(j.A,{className:(0,E.cn)("h-3.5 w-3.5",l&&"animate-spin")}),"刷新"]}),(0,t.jsxs)(y.$,{variant:"outline",size:"sm",onClick:()=>c(!0),className:"gap-1.5 h-8",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"安装 Skill"]})]})]}),l?(0,t.jsxs)("div",{className:"flex items-center justify-center py-10 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"加载中…"]}):0===a.length?(0,t.jsxs)("div",{className:"rounded-xl border border-dashed p-10 text-center text-sm text-muted-foreground",children:[(0,t.jsx)("p",{className:"mb-2",children:"还没有安装任何 Skill"}),(0,t.jsxs)(y.$,{variant:"outline",size:"sm",onClick:()=>c(!0),className:"gap-1.5",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"安装第一个 Skill"]})]}):(0,t.jsx)("div",{className:"space-y-2",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-3 rounded-xl border p-3.5 hover:bg-secondary/20 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),e.hasSetup&&(0,t.jsx)(A.E,{variant:"outline",className:"text-[10px] h-4 px-1.5 font-normal",children:"含 Setup"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||"暂无描述"}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground/60 mt-0.5 font-mono truncate",children:e.filePath})]}),(0,t.jsx)("button",{type:"button",onClick:()=>p(e.name),title:"卸载",className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all shrink-0",children:(0,t.jsx)(h.A,{className:"h-4 w-4"})})]},e.name))}),(0,t.jsx)(I,{open:o,onClose:()=>c(!1),onInstalled:x,installed:a})]})}function I({open:e,onClose:s,onInstalled:a,installed:n}){let l=new Set(n.map(e=>e.name)),[i,c]=(0,r.useState)("search"),[x,m]=(0,r.useState)(""),[p,u]=(0,r.useState)([]),[h,g]=(0,r.useState)(!1),[v,j]=(0,r.useState)(""),[b,w]=(0,r.useState)(null),[S,$]=(0,r.useState)({}),[I,J]=(0,r.useState)(""),[M,D]=(0,r.useState)(""),[L,R]=(0,r.useState)(""),[O,U]=(0,r.useState)("idle"),[q,_]=(0,r.useState)("");(0,r.useRef)(null),(0,r.useCallback)(async e=>{if(!e.trim()){u([]);return}g(!0),j("");try{let s=await fetch("/api/skills/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e.trim(),limit:30})}),a=await s.json();if(!s.ok)throw Error(a.error??`HTTP ${s.status}`);u(a.results??[])}catch(e){j(String(e)),u([])}finally{g(!1)}},[]);let V=async e=>{w(e);try{let s=await fetch("/api/skills/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({package:e})}),t=await s.json();if(!s.ok||!t.success)throw Error(t.error??"安装失败");$(s=>({...s,[e]:"ok"})),a()}catch(s){$(s=>({...s,[e]:"err"})),console.error(s)}finally{w(null)}},F=async()=>{U("loading"),_("");try{let e="url"===i?{url:I.trim()}:{content:M.trim(),name:L.trim()},t=await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw Error(r.error??"安装失败");U("ok"),a(),setTimeout(()=>{s(),X()},1200)}catch(e){U("err"),_(String(e))}},X=()=>{m(""),u([]),j(""),J(""),D(""),R(""),U("idle"),_(""),$({})};return(0,t.jsx)(B.lG,{open:e,onOpenChange:e=>{e||(s(),X())},children:(0,t.jsxs)(B.Cf,{className:"max-w-xl max-h-[85vh] flex flex-col",children:[(0,t.jsx)(B.c7,{children:(0,t.jsx)(B.L3,{children:"安装 Skill"})}),(0,t.jsxs)(C.tU,{value:i,onValueChange:e=>c(e),className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)(C.j7,{className:"shrink-0",children:[(0,t.jsx)(C.Xi,{value:"search",children:"\uD83D\uDD0D 社区搜索"}),(0,t.jsx)(C.Xi,{value:"url",children:"\uD83D\uDD17 URL 安装"}),(0,t.jsx)(C.Xi,{value:"paste",children:"\uD83D\uDCCB 粘贴内容"})]}),(0,t.jsxs)(C.av,{value:"search",className:"flex-1 flex flex-col min-h-0 space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)(K.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,t.jsx)(N.p,{value:x,onChange:e=>m(e.target.value),placeholder:"搜索社区 Skills,例如:web search、pdf、code review…",className:"pl-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto min-h-0 space-y-1.5 pr-1",children:[h&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"搜索中…"]}),!h&&v&&(0,t.jsx)("div",{className:"py-8 text-center text-sm text-destructive",children:v}),!h&&!v&&x&&0===p.length&&(0,t.jsxs)("div",{className:"py-8 text-center text-sm text-muted-foreground",children:["未找到「",x,"」相关 Skill"]}),!h&&!v&&!x&&(0,t.jsxs)("div",{className:"py-8 text-center text-sm text-muted-foreground",children:["输入关键词搜索 ",(0,t.jsx)("a",{href:"https://skills.sh",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"skills.sh"})," 社区 Skills"]}),p.map(e=>{let s=S[e.package],a=b===e.package,r=l.has(e.name);return(0,t.jsxs)("div",{className:(0,E.cn)("flex items-start gap-3 rounded-xl border p-3 transition-colors",r?"bg-[#57BE6B]/5 border-[#57BE6B]/30":"hover:bg-secondary/30"),children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),r&&(0,t.jsx)(A.E,{className:"text-[10px] h-4 px-1.5 bg-[#57BE6B]/15 text-[#57BE6B] border-0 font-normal",children:"已安装"}),e.installs>0&&(0,t.jsxs)("span",{className:"text-[10px] text-muted-foreground bg-secondary px-1.5 py-0.5 rounded",children:["↓ ",e.installsDisplay]})]}),(0,t.jsx)("p",{className:"text-[11px] font-mono text-muted-foreground/70 mt-0.5",children:e.package}),(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-blue-500 hover:underline flex items-center gap-0.5 mt-0.5 w-fit",children:[(0,t.jsx)(z.A,{className:"h-2.5 w-2.5"}),"查看详情"]})]}),r?(0,t.jsxs)("div",{className:"flex items-center gap-1 h-7 px-2 text-xs text-[#57BE6B] shrink-0",children:[(0,t.jsx)(o.A,{className:"h-3.5 w-3.5"}),"已安装"]}):(0,t.jsx)(y.$,{size:"sm",variant:"ok"===s?"ghost":"outline",className:(0,E.cn)("h-7 text-xs shrink-0 gap-1 min-w-[56px]","ok"===s&&"text-green-600 dark:text-green-400"),disabled:a||"ok"===s,onClick:()=>V(e.package),children:a?(0,t.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):"ok"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{className:"h-3 w-3"}),"已装"]}):"err"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f,{className:"h-3 w-3 text-destructive"}),"失败"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T,{className:"h-3 w-3"}),"安装"]})})]},e.package)})]})]}),(0,t.jsxs)(C.av,{value:"url",className:"space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"SKILL.md 的原始 URL"}),(0,t.jsx)(N.p,{value:I,onChange:e=>J(e.target.value),placeholder:"https://raw.githubusercontent.com/user/repo/main/skill/SKILL.md",className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"支持 GitHub raw 链接或任意可访问的 markdown 地址"})]}),"ok"===O&&(0,t.jsxs)("p",{className:"text-sm text-green-600 flex items-center gap-1",children:[(0,t.jsx)(o.A,{className:"h-4 w-4"}),"安装成功!"]}),"err"===O&&(0,t.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-1",children:[(0,t.jsx)(f,{className:"h-4 w-4"}),q]}),(0,t.jsxs)(B.Es,{children:[(0,t.jsx)(y.$,{variant:"outline",onClick:()=>{s(),X()},children:"取消"}),(0,t.jsxs)(y.$,{onClick:F,disabled:"loading"===O||!I.trim(),children:["loading"===O&&(0,t.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),"安装"]})]})]}),(0,t.jsxs)(C.av,{value:"paste",className:"space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"Skill 名称(slug)"}),(0,t.jsx)(N.p,{value:L,onChange:e=>R(e.target.value),placeholder:"my-skill",className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"SKILL.md 内容"}),(0,t.jsx)(P.T,{value:M,onChange:e=>D(e.target.value),placeholder:"---\nname: my-skill\ndescription: 描述这个 skill 的用途\n---\n\n# My Skill\n\n...",rows:8,className:"font-mono text-xs"})]}),"ok"===O&&(0,t.jsxs)("p",{className:"text-sm text-green-600 flex items-center gap-1",children:[(0,t.jsx)(o.A,{className:"h-4 w-4"}),"安装成功!"]}),"err"===O&&(0,t.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-1",children:[(0,t.jsx)(f,{className:"h-4 w-4"}),q]}),(0,t.jsxs)(B.Es,{children:[(0,t.jsx)(y.$,{variant:"outline",onClick:()=>{s(),X()},children:"取消"}),(0,t.jsxs)(y.$,{onClick:F,disabled:"loading"===O||!M.trim(),children:["loading"===O&&(0,t.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),"安装"]})]})]})]})]})})}let J=[{value:"anthropic-messages",label:"Anthropic Messages"},{value:"openai-responses",label:"OpenAI Responses"},{value:"openai-completions",label:"OpenAI Completions (Legacy)"},{value:"google-generative-ai",label:"Google Generative AI"},{value:"bedrock-converse-stream",label:"AWS Bedrock Converse"}];function M(){let e=(0,n.useTranslations)("settings"),s=(0,n.useTranslations)("common"),{theme:a,setTheme:c}=(0,l.D)(),p=(0,n.useLocale)(),u=(0,i.useRouter)(),h=(0,i.usePathname)(),[g,v]=(0,r.useState)({}),[f,j]=(0,r.useState)({providers:{}}),[b,w]=(0,r.useState)({currentProvider:"openai",providers:{}}),[A,E]=(0,r.useState)("idle"),K=(0,r.useCallback)(async()=>{E("saving"),await fetch("/api/models-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({auth:g,modelsConfig:f})}),await fetch("/api/voice-provider",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),E("saved"),setTimeout(()=>E("idle"),2500),await fetch("/api/models")},[g,f,b]);return(0,t.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,t.jsxs)("div",{className:"mb-6 flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-800/50 backdrop-blur-sm border border-gray-200 dark:border-slate-700/50 neo-card",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-gray-900 dark:bg-gradient-to-r dark:from-cyan-400 dark:to-blue-400 dark:bg-clip-text dark:text-transparent",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-400 mt-1",children:e("subtitle")})]}),(0,t.jsxs)(y.$,{onClick:K,disabled:"saving"===A,className:"neo-button gap-2 bg-gradient-to-r from-blue-500 to-indigo-500 dark:from-cyan-600 dark:to-blue-600 hover:from-blue-600 hover:to-indigo-600 dark:hover:from-cyan-500 dark:hover:to-blue-500 text-white border-0 shadow-lg hover:shadow-blue-500/30 dark:hover:shadow-cyan-500/50 transition-all duration-200 hover:scale-105",children:["saving"===A?(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin"}):"saved"===A?(0,t.jsx)(o.A,{className:"h-4 w-4"}):(0,t.jsx)(x,{className:"h-4 w-4"}),"saving"===A?"保存中…":"saved"===A?"已保存":s("save")]})]}),(0,t.jsxs)(C.tU,{defaultValue:"providers",children:[(0,t.jsxs)(C.j7,{className:"mb-6 neo-card bg-gray-50 dark:bg-slate-800/50 backdrop-blur-sm border border-gray-200 dark:border-slate-700/50 p-1",children:[(0,t.jsx)(C.Xi,{value:"providers",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"内置提供商"}),(0,t.jsx)(C.Xi,{value:"custom",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"自定义提供商"}),(0,t.jsx)(C.Xi,{value:"voice",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"语音供应商"}),(0,t.jsx)(C.Xi,{value:"envvars",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"环境变量"}),(0,t.jsx)(C.Xi,{value:"skills",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"Skills 管理"}),(0,t.jsx)(C.Xi,{value:"appearance",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"外观 & 语言"})]}),(0,t.jsx)(C.av,{value:"providers",className:"space-y-4",children:(0,t.jsx)(U,{apiKeys:g,onKeysChange:v,onSave:K})}),(0,t.jsxs)(C.av,{value:"custom",className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["添加兼容 OpenAI / Anthropic API 的自定义提供商。配置存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/models.json"}),"。"]})}),(0,t.jsxs)(y.$,{variant:"outline",size:"sm",className:"neo-button hover:scale-105 transition-transform",onClick:()=>{let e=`custom-provider-${Date.now()}`;j(s=>({providers:{...s.providers,[e]:{baseUrl:"",api:"openai-completions",apiKey:"",models:[]}}}))},children:[(0,t.jsx)(m.A,{className:"mr-2 h-4 w-4"}),"添加提供商"]})]}),0===Object.keys(f.providers).length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-8 text-center text-muted-foreground text-sm",children:"暂无自定义提供商。点击「添加提供商」创建一个。"}):(0,t.jsx)("div",{className:"space-y-4",children:Object.entries(f.providers).map(([e,s])=>(0,t.jsx)(D,{name:e,provider:s,onChange:s=>j(a=>({providers:{...a.providers,[e]:s}})),onRename:s=>{s!==e&&s&&j(a=>{let{[e]:t,...r}=a.providers;return{providers:{...r,[s]:t}}})},onDelete:()=>j(s=>{let{[e]:a,...t}=s.providers;return{providers:t}})},e))})]}),(0,t.jsxs)(C.av,{value:"voice",className:"space-y-4",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["选择一个语音供应商并配置API密钥,全局生效。配置存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/voice-provider.json"}),"。"]})}),(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl",children:[(0,t.jsx)(k.J,{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block",children:"当前语音供应商"}),(0,t.jsxs)(S.l6,{value:b.currentProvider,onValueChange:e=>w(s=>({...s,currentProvider:e})),children:[(0,t.jsx)(S.bq,{className:"neo-card-inset",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"openai",children:"OpenAI TTS"}),(0,t.jsx)(S.eb,{value:"aliyun",children:"阿里云语音合成"}),(0,t.jsx)(S.eb,{value:"tencent",children:"腾讯云TTS"}),(0,t.jsx)(S.eb,{value:"baidu",children:"百度语音合成"})]})]})]}),"openai"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"OpenAI TTS 配置"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"API Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"sk-...",value:b.providers.openai?.apiKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,openai:{...s.providers.openai,apiKey:e.target.value}}}))})]})]}),"aliyun"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"阿里云配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"AppKey"}),(0,t.jsx)(N.p,{placeholder:"...",value:b.providers.aliyun?.appKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:e.target.value,accessKeyId:s.providers.aliyun?.accessKeyId||"",accessKeySecret:s.providers.aliyun?.accessKeySecret||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Access Key ID"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.aliyun?.accessKeyId||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:s.providers.aliyun?.appKey||"",accessKeyId:e.target.value,accessKeySecret:s.providers.aliyun?.accessKeySecret||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Access Key Secret"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.aliyun?.accessKeySecret||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:s.providers.aliyun?.appKey||"",accessKeyId:s.providers.aliyun?.accessKeyId||"",accessKeySecret:e.target.value}}}))})]})]})]}),"tencent"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"腾讯云配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret ID"}),(0,t.jsx)(N.p,{type:"password",placeholder:"AKID...",value:b.providers.tencent?.secretId||"",onChange:e=>w(s=>({...s,providers:{...s.providers,tencent:{...s.providers.tencent,secretId:e.target.value,secretKey:s.providers.tencent?.secretKey||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.tencent?.secretKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,tencent:{...s.providers.tencent,secretId:s.providers.tencent?.secretId||"",secretKey:e.target.value}}}))})]})]})]}),"baidu"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"百度配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"API Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.baidu?.apiKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,baidu:{...s.providers.baidu,apiKey:e.target.value,secretKey:s.providers.baidu?.secretKey||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.baidu?.secretKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,baidu:{...s.providers.baidu,apiKey:s.providers.baidu?.apiKey||"",secretKey:e.target.value}}}))})]})]})]})]}),(0,t.jsx)(C.av,{value:"envvars",children:(0,t.jsx)(R,{})}),(0,t.jsxs)(C.av,{value:"skills",className:"space-y-2",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["安装、卸载 Skills。Skills 存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/skills/"}),", 对所有数字人共享。在数字人配置中可按需启用/禁用。"]})}),(0,t.jsx)($,{})]}),(0,t.jsxs)(C.av,{value:"appearance",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{children:e("theme")}),(0,t.jsxs)(S.l6,{value:a,onValueChange:c,children:[(0,t.jsx)(S.bq,{className:"w-48",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"light",children:e("themeLight")}),(0,t.jsx)(S.eb,{value:"dark",children:e("themeDark")}),(0,t.jsx)(S.eb,{value:"system",children:e("themeSystem")})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{children:e("language")}),(0,t.jsxs)(S.l6,{value:p,onValueChange:e=>{u.push(h.replace(/^\/(zh|en)/,`/${e}`))},children:[(0,t.jsx)(S.bq,{className:"w-48",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"zh",children:"中文"}),(0,t.jsx)(S.eb,{value:"en",children:"English"})]})]})]})]})]})]})}function D({name:e,provider:s,onChange:a,onRename:n,onDelete:l}){let[i,d]=(0,r.useState)(!0),[c,x]=(0,r.useState)(e),[j,b]=(0,r.useState)(!1),[w,C]=(0,r.useState)({phase:"idle"}),K=(e,t)=>a({...s,[e]:t}),z=async a=>{C({phase:"testing"});try{let t=await fetch("/api/models-config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerName:e,provider:s,model:a})}),r=await t.json();r.ok?C({phase:"success",latencyMs:r.latencyMs,responseText:r.responseText}):C({phase:"error",message:r.error,latencyMs:r.latencyMs})}catch(e){C({phase:"error",message:String(e)})}},T=(e,a,t)=>{let r=[...s.models??[]];r[e]={...r[e],[a]:t},K("models",r)},P=e=>{let a=[...s.models??[]];a.splice(e,1),K("models",a)};return(0,t.jsxs)("div",{className:"rounded-xl border bg-card overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer hover:bg-secondary/30 transition-colors",onClick:()=>d(!i),children:[i?(0,t.jsx)(p.A,{className:"h-4 w-4 text-muted-foreground"}):(0,t.jsx)(u.A,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-sm font-medium flex-1 truncate",children:e}),(0,t.jsx)(A.E,{variant:"outline",className:"text-xs",children:s.api??"—"}),(0,t.jsxs)(A.E,{variant:"secondary",className:"text-xs",children:[s.models?.length??0," models"]}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),l()},className:"ml-1 text-muted-foreground hover:text-destructive transition-colors",children:(0,t.jsx)(h.A,{className:"h-4 w-4"})})]}),i&&(0,t.jsxs)("div",{className:"px-4 pb-4 space-y-4 border-t",children:[(0,t.jsxs)("div",{className:"pt-4 space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"提供商名称(唯一标识)"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.p,{value:c,onChange:e=>x(e.target.value),className:"font-mono text-sm",placeholder:"my-custom-provider"}),c!==e&&c.trim()&&(0,t.jsx)(y.$,{size:"sm",onClick:()=>n(c.trim()),children:"重命名"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Base URL"}),(0,t.jsx)(N.p,{value:s.baseUrl??"",onChange:e=>K("baseUrl",e.target.value||void 0),placeholder:"https://api.example.com/v1",className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"API 协议"}),(0,t.jsxs)(S.l6,{value:s.api??"openai-completions",onValueChange:e=>K("api",e),children:[(0,t.jsx)(S.bq,{children:(0,t.jsx)(S.yv,{})}),(0,t.jsx)(S.gC,{children:J.map(e=>(0,t.jsx)(S.eb,{value:e.value,children:e.label},e.value))})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"API Key"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(N.p,{type:j?"text":"password",value:s.apiKey??"",onChange:e=>K("apiKey",e.target.value||void 0),placeholder:"ENV_VAR_NAME, !shell-command, 或直接填写密钥",className:"pr-10 font-mono text-sm"}),(0,t.jsx)("button",{type:"button",onClick:()=>b(!j),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:j?(0,t.jsx)(g,{className:"h-4 w-4"}):(0,t.jsx)(v,{className:"h-4 w-4"})})]}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["前缀 ",(0,t.jsx)("code",{className:"font-mono",children:"!"})," 运行 Shell 命令,或填写环境变量名(自动读取)"]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"模型列表"}),(0,t.jsxs)(y.$,{variant:"ghost",size:"sm",onClick:()=>{K("models",[...s.models??[],{id:"",name:"",contextWindow:128e3,maxTokens:4096,input:["text","image"],reasoning:!1,cost:{input:0,output:0}}])},className:"h-7 text-xs",children:[(0,t.jsx)(m.A,{className:"mr-1 h-3 w-3"}),"添加模型"]})]}),0===(s.models??[]).length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-4 border border-dashed rounded-lg",children:"暂无模型,点击「添加模型」"}):(0,t.jsx)("div",{className:"space-y-3",children:(s.models??[]).map((e,s)=>(0,t.jsx)(L,{model:e,onUpdate:(e,a)=>T(s,e,a),onDelete:()=>P(s),onTest:()=>z(e),testState:w},s))})]}),"idle"!==w.phase&&"testing"!==w.phase&&(0,t.jsxs)("div",{className:(0,E.cn)("flex items-start gap-2 rounded-lg px-3 py-2 text-sm","success"===w.phase?"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400"),children:["success"===w.phase?(0,t.jsx)(o.A,{className:"h-4 w-4 mt-0.5 shrink-0"}):(0,t.jsx)(f,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,t.jsx)("div",{children:"success"===w.phase?`连接成功 (${w.latencyMs}ms)${w.responseText?` — "${w.responseText}"`:""}`:`连接失败: ${w.message}${w.latencyMs?` (${w.latencyMs}ms)`:""}`}),(0,t.jsx)("button",{onClick:()=>C({phase:"idle"}),className:"ml-auto text-current opacity-50 hover:opacity-100",children:(0,t.jsx)(f,{className:"h-3 w-3"})})]})]})]})}function L({model:e,onUpdate:s,onDelete:a,onTest:r,testState:n}){let l="testing"===n.phase;return(0,t.jsxs)("div",{className:"rounded-lg border bg-secondary/20 p-3 space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 grid grid-cols-2 gap-2",children:[(0,t.jsx)(N.p,{value:e.id,onChange:e=>s("id",e.target.value),placeholder:"model-id(如 gpt-4o)",className:"font-mono text-xs h-8"}),(0,t.jsx)(N.p,{value:e.name??"",onChange:e=>s("name",e.target.value||void 0),placeholder:"显示名称(可选)",className:"text-xs h-8"})]}),(0,t.jsxs)(y.$,{variant:"ghost",size:"sm",onClick:r,disabled:!e.id||l,className:"h-8 text-xs shrink-0 gap-1",title:"测试连接",children:[l?(0,t.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(j.A,{className:"h-3 w-3"}),"测试"]}),(0,t.jsx)("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-destructive transition-colors",children:(0,t.jsx)(h.A,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"Context Window"}),(0,t.jsx)(N.p,{type:"number",value:e.contextWindow??128e3,onChange:e=>s("contextWindow",Number(e.target.value)),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"Max Output Tokens"}),(0,t.jsx)(N.p,{type:"number",value:e.maxTokens??4096,onChange:e=>s("maxTokens",Number(e.target.value)),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsx)("div",{className:"flex flex-col justify-end",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 h-7",children:[(0,t.jsx)(w.d,{id:`reasoning-${e.id}`,checked:e.reasoning??!1,onCheckedChange:e=>s("reasoning",e),className:"scale-75"}),(0,t.jsx)(k.J,{htmlFor:`reasoning-${e.id}`,className:"text-[11px] cursor-pointer",children:"支持 Thinking"})]})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"输入价格 ($/1M tokens)"}),(0,t.jsx)(N.p,{type:"number",step:"0.01",value:e.cost?.input??0,onChange:a=>s("cost",{...e.cost,input:Number(a.target.value)}),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"输出价格 ($/1M tokens)"}),(0,t.jsx)(N.p,{type:"number",step:"0.01",value:e.cost?.output??0,onChange:a=>s("cost",{...e.cost,output:Number(a.target.value)}),className:"text-xs h-7 mt-0.5"})]})]})]})}function R(){let[e,s]=(0,r.useState)({}),[a,n]=(0,r.useState)(!0),[l,i]=(0,r.useState)(""),[c,x]=(0,r.useState)(""),[p,u]=(0,r.useState)(null),[g,v]=(0,r.useState)(""),[k,w]=(0,r.useState)(""),[C,S]=(0,r.useState)(null),[A,K]=(0,r.useState)(null),[z,T]=(0,r.useState)(!1),[P,B]=(0,r.useState)({}),$=(0,r.useCallback)(()=>{n(!0),fetch("/api/env-vars",{cache:"no-store"}).then(e=>e.json()).then(e=>{s(e),n(!1)}).catch(()=>n(!1))},[]),I=async(e=l,s=c)=>{if(w(""),!e.trim()){w("变量名不能为空");return}let a=await fetch("/api/env-vars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.trim(),value:s})}),t=await a.json();if(!a.ok){w(t.error??"保存失败");return}e===l&&(i(""),x("")),S(e.trim()),setTimeout(()=>S(null),2500),$(),K(null)},J=async e=>{await fetch(`/api/env-vars/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:g})}),u(null),S(e),setTimeout(()=>S(null),2500),$()},M=async e=>{await fetch(`/api/env-vars/${encodeURIComponent(e)}`,{method:"DELETE"}),$(),K(null)},D=async()=>{T(!0),K(await fetch("/api/env-vars/scan").then(e=>e.json())),B({}),T(!1)},L=async e=>{await I(e,P[e]??""),B(s=>{let a={...s};return delete a[e],a}),setTimeout(D,300)},R=Object.entries(e).sort(([e],[s])=>e.localeCompare(s)),O=A?.summary.filter(e=>!e.stored)??[];return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 p-4",children:[(0,t.jsx)(b.A,{className:"h-5 w-5 text-zinc-500 shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"全局环境变量"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["存于 ",(0,t.jsx)("code",{className:"font-mono bg-zinc-100 dark:bg-zinc-800 px-1 rounded",children:"~/.digital-agents/env.json"}),", Bash 工具执行时自动注入。"]})]}),(0,t.jsxs)(y.$,{size:"sm",variant:"outline",onClick:D,disabled:z,className:"gap-1.5 shrink-0",children:[z?(0,t.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(j.A,{className:"h-3.5 w-3.5"}),"扫描 Skill 变量"]})]}),A&&(0,t.jsxs)("div",{className:"rounded-xl border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b bg-secondary/30",children:[(0,t.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Skill 引用的环境变量"}),(0,t.jsx)("button",{type:"button",onClick:()=>K(null),className:"text-muted-foreground hover:text-foreground text-xs",children:"关闭"})]}),(0,t.jsx)("div",{className:"p-3 space-y-2",children:0===A.summary.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-4",children:"未发现 Skill 引用的环境变量"}):A.summary.map(e=>(0,t.jsxs)("div",{className:(0,E.cn)("flex items-center gap-2 rounded-lg border px-3 py-2.5 transition-all",e.stored?"border-[#57BE6B]/40 bg-[#57BE6B]/8 dark:bg-[#57BE6B]/10":"border-amber-300 dark:border-amber-700 bg-amber-50/50 dark:bg-amber-900/10"),children:[e.stored?(0,t.jsx)(o.A,{className:"h-4 w-4 text-[#57BE6B] shrink-0"}):(0,t.jsx)("span",{className:"h-4 w-4 rounded-full border-2 border-amber-400 shrink-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-400"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("code",{className:"text-xs font-mono font-semibold",children:e.name}),(0,t.jsxs)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:["引用于:",e.skills.join("、")]})]}),e.stored?(0,t.jsx)("span",{className:"text-[10px] text-[#57BE6B] shrink-0",children:"已配置"}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(N.p,{value:P[e.name]??"",onChange:s=>B(a=>({...a,[e.name]:s.target.value})),onKeyDown:s=>"Enter"===s.key&&L(e.name),placeholder:"输入值...",className:"h-7 w-36 text-xs font-mono"}),(0,t.jsxs)(y.$,{size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:()=>L(e.name),children:[(0,t.jsx)(m.A,{className:"h-3 w-3"}),"添加"]})]})]},e.name))}),O.length>0&&(0,t.jsx)("div",{className:"px-4 py-2.5 border-t bg-amber-50/30 dark:bg-amber-900/10",children:(0,t.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["⚠️ ",O.length," 个变量尚未配置 — 相关 Skill 执行时可能报错"]})})]}),(0,t.jsxs)("div",{className:"rounded-xl border p-4 space-y-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"手动添加变量"}),(0,t.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,t.jsx)(N.p,{value:l,onChange:e=>{i(e.target.value),w("")},onKeyDown:e=>"Enter"===e.key&&I(),placeholder:"VARIABLE_NAME",className:"font-mono text-sm flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground pt-2 text-sm shrink-0",children:"="}),(0,t.jsx)(N.p,{value:c,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:"value",className:"font-mono text-sm flex-1"}),(0,t.jsxs)(y.$,{size:"sm",onClick:()=>I(),className:"gap-1.5 shrink-0",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"添加"]})]}),k&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:k})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:["已配置 (",R.length,")"]}),R.length>0&&(0,t.jsx)("button",{type:"button",onClick:async()=>{confirm("确认清空所有环境变量?")&&(await fetch("/api/env-vars",{method:"DELETE"}),$(),K(null))},className:"text-xs text-destructive hover:underline",children:"清空全部"})]}),a?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"加载中…"]}):0===R.length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-8 text-center text-sm text-muted-foreground",children:"暂无环境变量。点击「扫描 Skill 变量」自动发现 Skill 所需的变量名,或手动添加。"}):R.map(([e,s])=>(0,t.jsxs)("div",{className:(0,E.cn)("group flex items-center gap-2 rounded-lg border px-3 py-2.5 transition-all",C===e?"border-[#57BE6B]/60 bg-[#57BE6B]/10":"border-border hover:border-zinc-300 dark:hover:border-zinc-600"),children:[(0,t.jsx)("code",{className:"text-xs font-mono font-semibold shrink-0 min-w-[140px] truncate",children:e}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs shrink-0",children:"="}),p===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.p,{value:g,onChange:e=>v(e.target.value),onKeyDown:s=>{"Enter"===s.key&&J(e),"Escape"===s.key&&u(null)},className:"h-7 text-xs font-mono flex-1",autoFocus:!0}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-[#57BE6B]",onClick:()=>J(e),children:(0,t.jsx)(o.A,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>u(null),children:(0,t.jsx)(f,{className:"h-3.5 w-3.5"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs font-mono text-muted-foreground flex-1 truncate cursor-pointer hover:text-foreground",onClick:()=>{u(e),v(s)},title:s||"(空)",children:s||(0,t.jsx)("em",{className:"opacity-40 not-italic",children:"(空)"})}),C===e&&(0,t.jsx)("span",{className:"text-[10px] text-[#57BE6B] shrink-0",children:"已保存"}),(0,t.jsx)("button",{type:"button",className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground transition-all",onClick:()=>{u(e),v(s)},title:"编辑",children:(0,t.jsx)(j.A,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-all",onClick:()=>M(e),title:"删除",children:(0,t.jsx)(h.A,{className:"h-3.5 w-3.5"})})]})]},e))]})]})}let O={anthropic:{name:"Anthropic",placeholder:"sk-ant-api03-...",color:"bg-orange-50 dark:bg-orange-900/20 border-orange-200 dark:border-orange-800"},openai:{name:"OpenAI",placeholder:"sk-proj-...",color:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800"},google:{name:"Google AI",placeholder:"AIzaSy...",color:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},groq:{name:"Groq",placeholder:"gsk_...",color:"bg-purple-50 dark:bg-purple-900/20 border-purple-200 dark:border-purple-800"},deepseek:{name:"DeepSeek",placeholder:"sk-...",color:"bg-cyan-50 dark:bg-cyan-900/20 border-cyan-200 dark:border-cyan-800"},xai:{name:"xAI (Grok)",placeholder:"xai-...",color:"bg-zinc-50 dark:bg-zinc-800/50 border-zinc-200 dark:border-zinc-700"},mistral:{name:"Mistral",placeholder:"...",color:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800"}};function U({apiKeys:e,onKeysChange:s,onSave:a}){let[n,l]=(0,r.useState)(""),[i,c]=(0,r.useState)(""),[x,p]=(0,r.useState)({phase:"idle"}),[u,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),[w,C]=(0,r.useState)(""),S=Object.entries(e).filter(([,e])=>e&&""!==e.trim()),A=Object.entries(O).filter(([s])=>!e[s]),K=async(e,s)=>{p({phase:"testing"});try{let a=await fetch("/api/auth-config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,key:s})}),t=await a.json();t.ok?p({phase:"ok",ms:t.latencyMs}):p({phase:"err",msg:t.error??`HTTP ${t.status}`})}catch(e){p({phase:"err",msg:String(e)})}},z=async()=>{n&&i.trim()&&await K(n,i.trim())},T=async()=>{s({...e,[n]:i.trim()}),await a(),l(""),c(""),p({phase:"idle"}),g(!1)},P=async t=>{let r={...e};delete r[t],s(r),await a()},B=async t=>{s({...e,[t]:w.trim()}),await a(),b(null),C("")};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"LLM 提供商"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["密钥存储于 ",(0,t.jsx)("code",{className:"font-mono bg-secondary px-1 rounded",children:"~/.pi/agent/auth.json"})]})]}),!u&&(0,t.jsxs)(y.$,{variant:"outline",size:"sm",onClick:()=>g(!0),className:"gap-1.5",disabled:0===A.length,children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"添加提供商"]})]}),0===S.length&&!u&&(0,t.jsx)("div",{className:"rounded-xl border border-dashed p-8 text-center text-sm text-muted-foreground",children:"还没有配置任何 LLM 提供商。点击「添加提供商」开始配置。"}),(0,t.jsx)("div",{className:"space-y-2",children:S.map(([e,s])=>{let a=O[e],r=v===e;return(0,t.jsxs)("div",{className:(0,E.cn)("group flex items-center gap-3 rounded-xl border p-3.5 transition-all",a?.color??""),children:[(0,t.jsxs)("div",{className:"w-28 shrink-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:a?.name??e}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono",children:e})]}),r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.p,{type:"password",value:w,onChange:e=>C(e.target.value),onKeyDown:s=>{"Enter"===s.key&&B(e),"Escape"===s.key&&b(null)},placeholder:a?.placeholder??"API Key",className:"flex-1 font-mono text-xs h-8",autoFocus:!0}),(0,t.jsxs)(y.$,{size:"sm",className:"h-7 px-2 gap-1 text-xs",onClick:()=>B(e),children:[(0,t.jsx)(o.A,{className:"h-3 w-3"}),"保存"]}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>b(null),children:(0,t.jsx)(f,{className:"h-3.5 w-3.5"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 font-mono text-xs text-muted-foreground",children:s.startsWith("***")?s:"••••••••"+s.slice(-4)}),(0,t.jsxs)("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>{b(e),C(s.startsWith("***")?"":s)},children:"编辑"}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-destructive hover:text-destructive",onClick:()=>P(e),children:(0,t.jsx)(h.A,{className:"h-3.5 w-3.5"})})]})]})]},e)})}),u&&(0,t.jsxs)("div",{className:"rounded-xl border-2 border-dashed border-[#57BE6B]/50 p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm font-semibold",children:"添加提供商"}),(0,t.jsx)("button",{type:"button",onClick:()=>{g(!1),p({phase:"idle"}),c(""),l("")},className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(f,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"提供商"}),(0,t.jsxs)("select",{value:n,onChange:e=>{l(e.target.value),p({phase:"idle"})},className:"w-full h-9 rounded-md border border-input bg-white dark:bg-zinc-800 px-3 text-sm focus:outline-none focus:ring-1 focus:ring-ring",children:[(0,t.jsx)("option",{value:"",children:"选择提供商…"}),A.map(([e,s])=>(0,t.jsx)("option",{value:e,children:s.name},e))]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"API Key"}),(0,t.jsx)(N.p,{type:"password",value:i,onChange:e=>{c(e.target.value),p({phase:"idle"})},onKeyDown:e=>"Enter"===e.key&&z(),placeholder:n?O[n]?.placeholder??"API Key":"先选择提供商",className:"font-mono text-sm",disabled:!n})]})]}),"idle"!==x.phase&&(0,t.jsxs)("div",{className:(0,E.cn)("flex items-center gap-2 rounded-lg px-3 py-2 text-sm","testing"===x.phase?"bg-secondary":"ok"===x.phase?"bg-[#57BE6B]/10 text-[#57BE6B]":"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400"),children:["testing"===x.phase&&(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin"}),"ok"===x.phase&&(0,t.jsx)(o.A,{className:"h-4 w-4"}),"err"===x.phase&&(0,t.jsx)(f,{className:"h-4 w-4"}),(0,t.jsxs)("span",{children:["testing"===x.phase&&"测试连通性中…","ok"===x.phase&&`连接成功 (${x.ms}ms) — 点击「确认添加」保存`,"err"===x.phase&&`连接失败: ${x.msg}`]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(y.$,{variant:"outline",className:"flex-1 gap-1.5",disabled:!n||!i.trim()||"testing"===x.phase,onClick:z,children:["testing"===x.phase?(0,t.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(j.A,{className:"h-3.5 w-3.5"}),"测试连通性"]}),"ok"===x.phase&&(0,t.jsxs)(y.$,{className:"flex-1 gap-1.5 bg-[#57BE6B] hover:bg-[#4aaa5d]",onClick:T,children:[(0,t.jsx)(o.A,{className:"h-3.5 w-3.5"}),"确认添加"]})]})]})]})}},78447:(e,s,a)=>{"use strict";a.d(s,{E:()=>i});var t=a(45512);a(58009);var r=a(21643),n=a(44195);let l=(0,r.F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,...a}){return(0,t.jsx)("div",{className:(0,n.cn)(l({variant:s}),e),...a})}},39400:(e,s,a)=>{"use strict";a.d(s,{$:()=>o});var t=a(45512),r=a(58009),n=a(12705),l=a(21643),i=a(44195);let d=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),o=r.forwardRef(({className:e,variant:s,size:a,asChild:r=!1,...l},o)=>{let c=r?n.DX:"button";return(0,t.jsx)(c,{className:(0,i.cn)(d({variant:s,size:a,className:e})),ref:o,...l})});o.displayName="Button"},43264:(e,s,a)=>{"use strict";a.d(s,{Cf:()=>m,Es:()=>u,L3:()=>h,c7:()=>p,lG:()=>d,rr:()=>g});var t=a(45512),r=a(58009),n=a(27553),l=a(44269),i=a(44195);let d=n.bL;n.l9;let o=n.ZL,c=n.bm,x=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.hJ,{ref:a,className:(0,i.cn)("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...s}));x.displayName=n.hJ.displayName;let m=r.forwardRef(({className:e,children:s,...a},r)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(x,{}),(0,t.jsxs)(n.UC,{ref:r,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-lg",e),...a,children:[s,(0,t.jsx)(c,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring disabled:pointer-events-none",children:(0,t.jsx)(l.A,{className:"h-4 w-4"})})]})]}));m.displayName=n.UC.displayName;let p=({className:e,...s})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...s});p.displayName="DialogHeader";let u=({className:e,...s})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});u.displayName="DialogFooter";let h=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.hE,{ref:a,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",e),...s}));h.displayName=n.hE.displayName;let g=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.VY,{ref:a,className:(0,i.cn)("text-sm text-muted-foreground",e),...s}));g.displayName=n.VY.displayName},77722:(e,s,a)=>{"use strict";a.d(s,{p:()=>l});var t=a(45512),r=a(58009),n=a(44195);let l=r.forwardRef(({className:e,type:s,...a},r)=>(0,t.jsx)("input",{type:s,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...a}));l.displayName="Input"},52628:(e,s,a)=>{"use strict";a.d(s,{J:()=>i});var t=a(45512),r=a(58009),n=a(92405),l=a(44195);let i=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.b,{ref:a,className:(0,l.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...s}));i.displayName=n.b.displayName},93732:(e,s,a)=>{"use strict";a.d(s,{bq:()=>x,eb:()=>p,gC:()=>m,l6:()=>o,yv:()=>c});var t=a(45512),r=a(58009),n=a(16091),l=a(98755),i=a(24849),d=a(44195);let o=n.bL;n.YJ;let c=n.WT,x=r.forwardRef(({className:e,children:s,...a},r)=>(0,t.jsxs)(n.l9,{ref:r,className:(0,d.cn)("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...a,children:[s,(0,t.jsx)(n.In,{asChild:!0,children:(0,t.jsx)(l.A,{className:"h-4 w-4 opacity-50"})})]}));x.displayName=n.l9.displayName;let m=r.forwardRef(({className:e,children:s,position:a="popper",...r},l)=>(0,t.jsx)(n.ZL,{children:(0,t.jsx)(n.UC,{ref:l,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-white dark:bg-zinc-800 text-foreground shadow-xl animate-in fade-in-0 zoom-in-95","popper"===a&&"translate-y-1",e),position:a,...r,children:(0,t.jsx)(n.LM,{className:(0,d.cn)("p-1","popper"===a&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})}));m.displayName=n.UC.displayName;let p=r.forwardRef(({className:e,children:s,...a},r)=>(0,t.jsxs)(n.q7,{ref:r,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(n.VF,{children:(0,t.jsx)(i.A,{className:"h-4 w-4"})})}),(0,t.jsx)(n.p4,{children:s})]}));p.displayName=n.q7.displayName,r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.JU,{ref:a,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-xs font-semibold",e),...s})).displayName=n.JU.displayName,r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.wv,{ref:a,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",e),...s})).displayName=n.wv.displayName},28712:(e,s,a)=>{"use strict";a.d(s,{d:()=>i});var t=a(45512),r=a(58009),n=a(84969),l=a(44195);let i=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.bL,{className:(0,l.cn)("peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=unchecked]:bg-zinc-300 dark:data-[state=unchecked]:bg-zinc-600","data-[state=checked]:bg-[#57BE6B]",e),...s,ref:a,children:(0,t.jsx)(n.zi,{className:(0,l.cn)("pointer-events-none block h-[16px] w-[16px] rounded-full bg-white shadow-md ring-0","transition-transform duration-200","data-[state=checked]:translate-x-[18px] data-[state=unchecked]:translate-x-0")})}));i.displayName=n.bL.displayName},17524:(e,s,a)=>{"use strict";a.d(s,{Xi:()=>o,av:()=>c,j7:()=>d,tU:()=>i});var t=a(45512),r=a(58009),n=a(93607),l=a(44195);let i=n.bL,d=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.B8,{ref:a,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...s}));d.displayName=n.B8.displayName;let o=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.l9,{ref:a,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...s}));o.displayName=n.l9.displayName;let c=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.UC,{ref:a,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...s}));c.displayName=n.UC.displayName},75002:(e,s,a)=>{"use strict";a.d(s,{T:()=>l});var t=a(45512),r=a(58009),n=a(44195);let l=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)("textarea",{className:(0,n.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...s}));l.displayName="Textarea"},28660:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>t});let t=(0,a(46760).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx","default")}};var s=require("../../../webpack-runtime.js");s.C(e);var a=e=>s(s.s=e),t=s.X(0,[5994,8403,5051,763,1285,9251],()=>a(33989));module.exports=t})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../package.json","../../../chunks/1285.js","../../../chunks/2961.js","../../../chunks/5051.js","../../../chunks/5994.js","../../../chunks/7368.js","../../../chunks/763.js","../../../chunks/8403.js","../../../chunks/9251.js","../../../webpack-runtime.js","page_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/[locale]/settings/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","3259","static/chunks/3259-52b0aabc8fbba4a9.js","6742","static/chunks/6742-ad22486f7c4c8592.js","2455","static/chunks/app/%5Blocale%5D/settings/page-71d67c3b9f712584.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/layout":[{"inlined":false,"path":"static/css/7e7d96b1e6991756.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=9492,e.ids=[9492],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},32347:(e,r,t)=>{"use strict";t.r(r),t.d(r,{GlobalError:()=>i.a,__next_app__:()=>p,pages:()=>u,routeModule:()=>m,tree:()=>l});var n=t(70260),s=t(28203),o=t(25155),i=t.n(o),d=t(67292),a={};for(let e in d)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(a[e]=()=>d[e]);t.d(r,a);let l=["",{children:["/_not-found",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(t.t.bind(t,19937,23)),"next/dist/client/components/not-found-error"]}]},{}]},{layout:[()=>Promise.resolve().then(t.bind(t,71354)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(t.t.bind(t,19937,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(t.t.bind(t,69116,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(t.t.bind(t,41485,23)),"next/dist/client/components/unauthorized-error"]}],u=[],p={require:t,loadChunk:()=>Promise.resolve()},m=new n.AppPageRouteModule({definition:{kind:s.RouteKind.APP_PAGE,page:"/_not-found/page",pathname:"/_not-found",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:l}})},22537:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,13219,23)),Promise.resolve().then(t.t.bind(t,34863,23)),Promise.resolve().then(t.t.bind(t,25155,23)),Promise.resolve().then(t.t.bind(t,40802,23)),Promise.resolve().then(t.t.bind(t,9350,23)),Promise.resolve().then(t.t.bind(t,48530,23)),Promise.resolve().then(t.t.bind(t,88921,23))},64393:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,66959,23)),Promise.resolve().then(t.t.bind(t,33875,23)),Promise.resolve().then(t.t.bind(t,88903,23)),Promise.resolve().then(t.t.bind(t,57174,23)),Promise.resolve().then(t.t.bind(t,84178,23)),Promise.resolve().then(t.t.bind(t,87190,23)),Promise.resolve().then(t.t.bind(t,61365,23))},26339:()=>{},40411:()=>{},71354:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>s,metadata:()=>n}),t(61135);let n={title:"Digital Agent Platform",description:"Configure and chat with your AI digital agents"};function s({children:e}){return e}},61135:()=>{}};var r=require("../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),n=r.X(0,[5994,8403],()=>t(32347));module.exports=n})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../node_modules/next/package.json","../../../package.json","../../chunks/5994.js","../../chunks/8403.js","../../webpack-runtime.js","page_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/_not-found/page":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -0,0 +1 @@
1
+ <meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/632ce3b5496b50af.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9b9d7723f8078270.js"/><script src="/_next/static/chunks/4bd1b696-c90310bf0ab1fbc7.js" async=""></script><script src="/_next/static/chunks/1517-9c89c425ac486877.js" async=""></script><script src="/_next/static/chunks/main-app-07be5f69ef8a336a.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Digital Agent Platform</title><meta name="description" content="Configure and chat with your AI digital agents"/><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-9b9d7723f8078270.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5244,[],\"\"]\n3:I[3866,[],\"\"]\n4:I[6213,[],\"OutletBoundary\"]\n6:I[6213,[],\"MetadataBoundary\"]\n8:I[6213,[],\"ViewportBoundary\"]\na:I[4835,[],\"\"]\n:HL[\"/_next/static/css/632ce3b5496b50af.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"VoyTtGCQMPGM_4nEMWYg5\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/632ce3b5496b50af.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":\"$L5\"}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"oxTVIa0gpq0qdBiafNYtO\",{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"$L7\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$a\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n7:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Digital Agent Platform\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Configure and chat with your AI digital agents\"}]]\n"])</script><script>self.__next_f.push([1,"5:null\n"])</script></body></html>
@@ -0,0 +1,8 @@
1
+ {
2
+ "status": 404,
3
+ "headers": {
4
+ "x-nextjs-stale-time": "4294967294",
5
+ "x-nextjs-prerender": "1",
6
+ "x-next-cache-tags": "_N_T_/layout,_N_T_/_not-found/layout,_N_T_/_not-found/page,_N_T_/_not-found"
7
+ }
8
+ }
@@ -0,0 +1,12 @@
1
+ 1:"$Sreact.fragment"
2
+ 2:I[5244,[],""]
3
+ 3:I[3866,[],""]
4
+ 4:I[6213,[],"OutletBoundary"]
5
+ 6:I[6213,[],"MetadataBoundary"]
6
+ 8:I[6213,[],"ViewportBoundary"]
7
+ a:I[4835,[],""]
8
+ :HL["/_next/static/css/632ce3b5496b50af.css","style"]
9
+ 0:{"P":null,"b":"VoyTtGCQMPGM_4nEMWYg5","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/632ce3b5496b50af.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":"$L5"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","oxTVIa0gpq0qdBiafNYtO",{"children":[["$","$L6",null,{"children":"$L7"}],["$","$L8",null,{"children":"$L9"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$a","$undefined"],"s":false,"S":true}
10
+ 9:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
11
+ 7:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Digital Agent Platform"}],["$","meta","2",{"name":"description","content":"Configure and chat with your AI digital agents"}]]
12
+ 5:null
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=7574,e.ids=[7574],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},55511:e=>{"use strict";e.exports=require("crypto")},29021:e=>{"use strict";e.exports=require("fs")},79868:e=>{"use strict";e.exports=require("node:sqlite")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},87848:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>R,routeModule:()=>l,serverHooks:()=>f,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>E});var s={};r.r(s),r.d(s,{DELETE:()=>c,GET:()=>d,PUT:()=>p});var n=r(42706),a=r(28203),i=r(45994),o=r(39187),u=r(47628);async function d(e,{params:t}){let{id:r}=await t,s=u.h.getById(r);return s?o.NextResponse.json(s):o.NextResponse.json({error:"Not found"},{status:404})}async function p(e,{params:t}){let{id:r}=await t,s=await e.json(),n=u.h.update(r,s);return n?o.NextResponse.json(n):o.NextResponse.json({error:"Not found"},{status:404})}async function c(e,{params:t}){let{id:r}=await t;return u.h.delete(r)?o.NextResponse.json({success:!0}):o.NextResponse.json({error:"Not found"},{status:404})}let l=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/agents/[id]/route",pathname:"/api/agents/[id]",filename:"route",bundlePath:"app/api/agents/[id]/route"},resolvedPagePath:"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/agents/[id]/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:E,serverHooks:f}=l;function R(){return(0,i.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:E})}},96487:()=>{},78335:()=>{},47628:(e,t,r)=>{"use strict";r.d(t,{e:()=>o,h:()=>i});var s=r(78490),n=r(691);function a(e){return{...JSON.parse(e.config),id:e.id,createdAt:new Date(e.created_at).toISOString(),updatedAt:new Date(e.updated_at).toISOString()}}let i={list:()=>(0,s.L)().prepare("SELECT * FROM agents ORDER BY created_at DESC").all().map(a),getById(e){let t=(0,s.L)().prepare("SELECT * FROM agents WHERE id = ?").get(e);return t?a(t):void 0},create(e){let t=(0,s.L)(),r=(0,n.A)(),i=Date.now(),o={...e};return t.prepare("INSERT INTO agents (id, config, created_at, updated_at) VALUES (?, ?, ?, ?)").run(r,JSON.stringify(o),i,i),a({id:r,config:JSON.stringify(o),created_at:i,updated_at:i})},update(e,t){let r=(0,s.L)(),n=this.getById(e);if(!n)return;let a=Date.now(),{createdAt:i,updatedAt:o,...u}={...n,...t,id:n.id};return r.prepare("UPDATE agents SET config = ?, updated_at = ? WHERE id = ?").run(JSON.stringify(u),a,e),this.getById(e)},delete:e=>(0,s.L)().prepare("DELETE FROM agents WHERE id = ?").run(e).changes>0},o={list:e=>(0,s.L)().prepare("SELECT * FROM sessions WHERE agent_id = ? ORDER BY created_at DESC").all(e),create(e,t,r){let a=(0,s.L)(),i=(0,n.A)();return a.prepare("INSERT INTO sessions (id, agent_id, title, session_file, created_at) VALUES (?, ?, ?, ?, ?)").run(i,e,r??"New Session",t,Date.now()),i},updateFile(e,t){(0,s.L)().prepare("UPDATE sessions SET session_file = ? WHERE id = ?").run(t,e)},delete:e=>(0,s.L)().prepare("DELETE FROM sessions WHERE id = ?").run(e).changes>0,deleteByAgent:e=>Number((0,s.L)().prepare("DELETE FROM sessions WHERE agent_id = ?").run(e).changes)}},78490:(e,t,r)=>{"use strict";r.d(t,{L:()=>c});var s=r(79868),n=r(33873),a=r.n(n),i=r(21820),o=r.n(i),u=r(29021),d=r.n(u);let p=null;function c(){if(p)return p;let e=process.env.STORAGE_PATH||a().join(o().homedir(),".digital-agents");d().existsSync(e)||d().mkdirSync(e,{recursive:!0});let t=a().join(e,"agents.db");return(p=new s.DatabaseSync(t)).exec("PRAGMA journal_mode = WAL"),p.exec("PRAGMA foreign_keys = ON"),p}},691:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var s=r(55511);let n={randomUUID:s.randomUUID},a=new Uint8Array(256),i=a.length,o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));let u=function(e,t,r){if(n.randomUUID&&!t&&!e)return n.randomUUID();let u=(e=e||{}).random??e.rng?.()??(i>a.length-16&&((0,s.randomFillSync)(a),i=0),a.slice(i,i+=16));if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=u[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(u)}}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[5994,5452],()=>r(87848));module.exports=s})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/5452.js","../../../../chunks/5994.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/agents/[id]/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/agents/route":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/agents/[id]/route":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=3004,e.ids=[3004],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},55511:e=>{"use strict";e.exports=require("crypto")},29021:e=>{"use strict";e.exports=require("fs")},79868:e=>{"use strict";e.exports=require("node:sqlite")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},4108:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>f,routeModule:()=>c,serverHooks:()=>E,workAsyncStorage:()=>l,workUnitAsyncStorage:()=>g});var s={};r.r(s),r.d(s,{GET:()=>d,POST:()=>p});var n=r(42706),a=r(28203),i=r(45994),o=r(39187),u=r(47628);async function d(){try{let e=u.h.list();return o.NextResponse.json(e)}catch(e){return o.NextResponse.json({error:String(e)},{status:500})}}async function p(e){try{let t=await e.json();if(!t.name?.trim())return o.NextResponse.json({error:"Name is required"},{status:400});let r=u.h.create(t);return o.NextResponse.json(r,{status:201})}catch(e){return o.NextResponse.json({error:String(e)},{status:500})}}let c=new n.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/agents/route",pathname:"/api/agents",filename:"route",bundlePath:"app/api/agents/route"},resolvedPagePath:"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/agents/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:l,workUnitAsyncStorage:g,serverHooks:E}=c;function f(){return(0,i.patchFetch)({workAsyncStorage:l,workUnitAsyncStorage:g})}},96487:()=>{},78335:()=>{},47628:(e,t,r)=>{"use strict";r.d(t,{e:()=>o,h:()=>i});var s=r(78490),n=r(691);function a(e){return{...JSON.parse(e.config),id:e.id,createdAt:new Date(e.created_at).toISOString(),updatedAt:new Date(e.updated_at).toISOString()}}let i={list:()=>(0,s.L)().prepare("SELECT * FROM agents ORDER BY created_at DESC").all().map(a),getById(e){let t=(0,s.L)().prepare("SELECT * FROM agents WHERE id = ?").get(e);return t?a(t):void 0},create(e){let t=(0,s.L)(),r=(0,n.A)(),i=Date.now(),o={...e};return t.prepare("INSERT INTO agents (id, config, created_at, updated_at) VALUES (?, ?, ?, ?)").run(r,JSON.stringify(o),i,i),a({id:r,config:JSON.stringify(o),created_at:i,updated_at:i})},update(e,t){let r=(0,s.L)(),n=this.getById(e);if(!n)return;let a=Date.now(),{createdAt:i,updatedAt:o,...u}={...n,...t,id:n.id};return r.prepare("UPDATE agents SET config = ?, updated_at = ? WHERE id = ?").run(JSON.stringify(u),a,e),this.getById(e)},delete:e=>(0,s.L)().prepare("DELETE FROM agents WHERE id = ?").run(e).changes>0},o={list:e=>(0,s.L)().prepare("SELECT * FROM sessions WHERE agent_id = ? ORDER BY created_at DESC").all(e),create(e,t,r){let a=(0,s.L)(),i=(0,n.A)();return a.prepare("INSERT INTO sessions (id, agent_id, title, session_file, created_at) VALUES (?, ?, ?, ?, ?)").run(i,e,r??"New Session",t,Date.now()),i},updateFile(e,t){(0,s.L)().prepare("UPDATE sessions SET session_file = ? WHERE id = ?").run(t,e)},delete:e=>(0,s.L)().prepare("DELETE FROM sessions WHERE id = ?").run(e).changes>0,deleteByAgent:e=>Number((0,s.L)().prepare("DELETE FROM sessions WHERE agent_id = ?").run(e).changes)}},78490:(e,t,r)=>{"use strict";r.d(t,{L:()=>c});var s=r(79868),n=r(33873),a=r.n(n),i=r(21820),o=r.n(i),u=r(29021),d=r.n(u);let p=null;function c(){if(p)return p;let e=process.env.STORAGE_PATH||a().join(o().homedir(),".digital-agents");d().existsSync(e)||d().mkdirSync(e,{recursive:!0});let t=a().join(e,"agents.db");return(p=new s.DatabaseSync(t)).exec("PRAGMA journal_mode = WAL"),p.exec("PRAGMA foreign_keys = ON"),p}},691:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var s=r(55511);let n={randomUUID:s.randomUUID},a=new Uint8Array(256),i=a.length,o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));let u=function(e,t,r){if(n.randomUUID&&!t&&!e)return n.randomUUID();let u=(e=e||{}).random??e.rng?.()??(i>a.length-16&&((0,s.randomFillSync)(a),i=0),a.slice(i,i+=16));if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=u[e];return t}return function(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}(u)}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[5994,5452],()=>r(4108));module.exports=s})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/5452.js","../../../chunks/5994.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/agents/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/agents/route":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=4566,e.ids=[4566],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},2646:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>g,routeModule:()=>d,serverHooks:()=>m,workAsyncStorage:()=>c,workUnitAsyncStorage:()=>h});var s={};r.r(s),r.d(s,{POST:()=>l,dynamic:()=>u});var a=r(42706),o=r(28203),n=r(45994),i=r(39187);let u="force-dynamic",p={anthropic:{url:"https://api.anthropic.com/v1/messages",authHeader:e=>({"x-api-key":e,"anthropic-version":"2023-06-01"}),body:{model:"claude-haiku-4-5-20251001",max_tokens:5,messages:[{role:"user",content:"hi"}]}},openai:{url:"https://api.openai.com/v1/chat/completions",authHeader:e=>({Authorization:`Bearer ${e}`}),body:{model:"gpt-4o-mini",max_tokens:5,messages:[{role:"user",content:"hi"}]}},google:{url:"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",authHeader:e=>({"x-goog-api-key":e}),body:{contents:[{parts:[{text:"hi"}]}]}},groq:{url:"https://api.groq.com/openai/v1/chat/completions",authHeader:e=>({Authorization:`Bearer ${e}`}),body:{model:"llama-3.1-8b-instant",max_tokens:5,messages:[{role:"user",content:"hi"}]}},deepseek:{url:"https://api.deepseek.com/chat/completions",authHeader:e=>({Authorization:`Bearer ${e}`}),body:{model:"deepseek-chat",max_tokens:5,messages:[{role:"user",content:"hi"}]}},xai:{url:"https://api.x.ai/v1/chat/completions",authHeader:e=>({Authorization:`Bearer ${e}`}),body:{model:"grok-2-latest",max_tokens:5,messages:[{role:"user",content:"hi"}]}},mistral:{url:"https://api.mistral.ai/v1/chat/completions",authHeader:e=>({Authorization:`Bearer ${e}`}),body:{model:"mistral-small-latest",max_tokens:5,messages:[{role:"user",content:"hi"}]}}};async function l(e){let t=Date.now();try{let{provider:r,key:s}=await e.json();if(!r||!s)return i.NextResponse.json({ok:!1,error:"provider and key required"},{status:400});let a=p[r];if(!a)return i.NextResponse.json({ok:!0,message:"No test defined for this provider, assuming OK"});let o=await fetch(a.url,{method:"POST",headers:{"Content-Type":"application/json",...a.authHeader(s)},body:JSON.stringify(a.body),signal:AbortSignal.timeout(12e3)}),n=Date.now()-t;if(o.ok||400===o.status)return i.NextResponse.json({ok:!0,latencyMs:n,status:o.status});let u=await o.text().catch(()=>"");return i.NextResponse.json({ok:!1,latencyMs:n,status:o.status,error:u.slice(0,200)})}catch(e){return i.NextResponse.json({ok:!1,latencyMs:Date.now()-t,error:String(e)},{status:500})}}let d=new a.AppRouteRouteModule({definition:{kind:o.RouteKind.APP_ROUTE,page:"/api/auth-config/test/route",pathname:"/api/auth-config/test",filename:"route",bundlePath:"app/api/auth-config/test/route"},resolvedPagePath:"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/auth-config/test/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:c,workUnitAsyncStorage:h,serverHooks:m}=d;function g(){return(0,n.patchFetch)({workAsyncStorage:c,workUnitAsyncStorage:h})}},96487:()=>{},78335:()=>{}};var t=require("../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[5994,5452],()=>r(2646));module.exports=s})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/package.json","../../../../../../package.json","../../../../../package.json","../../../../chunks/5452.js","../../../../chunks/5994.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/auth-config/test/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/auth-config/test/route":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=4526,e.ids=[4526],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},29021:e=>{"use strict";e.exports=require("fs")},21820:e=>{"use strict";e.exports=require("os")},33873:e=>{"use strict";e.exports=require("path")},64825:(e,t,r)=>{"use strict";r.r(t),r.d(t,{patchFetch:()=>b,routeModule:()=>g,serverHooks:()=>y,workAsyncStorage:()=>j,workUnitAsyncStorage:()=>v});var s={};r.r(s),r.d(s,{GET:()=>m,dynamic:()=>f});var o=r(42706),n=r(28203),a=r(45994),u=r(39187),i=r(29021),p=r.n(i),d=r(21820),c=r.n(d),l=r(33873),x=r.n(l);let f="force-dynamic",h=/^pi-bash-[A-Za-z0-9_-]+\.log$/;async function m(e){let t=e.nextUrl.searchParams.get("path");if(!t)return u.NextResponse.json({error:"path required"},{status:400});let r=function(e){let t=c().tmpdir(),r=x().resolve(e);return x().dirname(r)===t&&h.test(x().basename(r))?{ok:!0}:{ok:!1,error:"forbidden",status:403}}(t);if(!r.ok)return u.NextResponse.json({error:r.error},{status:r.status});try{let e=p().statSync(t);if(!e.isFile())return u.NextResponse.json({error:"not a file"},{status:404});if(e.size>5242880)return u.NextResponse.json({error:`Output too large (${e.size} bytes, limit 5242880)`,truncated:!0},{status:413});let r=p().readFileSync(t,"utf8");return u.NextResponse.json({output:r})}catch(e){if("ENOENT"===e.code)return u.NextResponse.json({error:"file not found"},{status:404});return u.NextResponse.json({error:String(e)},{status:500})}}let g=new o.AppRouteRouteModule({definition:{kind:n.RouteKind.APP_ROUTE,page:"/api/bash-output/route",pathname:"/api/bash-output",filename:"route",bundlePath:"app/api/bash-output/route"},resolvedPagePath:"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/bash-output/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:j,workUnitAsyncStorage:v,serverHooks:y}=g;function b(){return(0,a.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:v})}},96487:()=>{},78335:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[5994,5452],()=>r(64825));module.exports=s})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../../package.json","../../../../package.json","../../../chunks/5452.js","../../../chunks/5994.js","../../../webpack-runtime.js","route_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/bash-output/route"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/bash-output/route":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -0,0 +1,5 @@
1
+ "use strict";(()=>{var e={};e.id=9719,e.ids=[9719],e.modules={10846:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},44870:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},29294:e=>{e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},55511:e=>{e.exports=require("crypto")},29021:e=>{e.exports=require("fs")},79868:e=>{e.exports=require("node:sqlite")},21820:e=>{e.exports=require("os")},33873:e=>{e.exports=require("path")},75430:e=>{e.exports=import("@earendil-works/pi-coding-agent")},19329:(e,t,a)=>{a.r(t),a.d(t,{patchFetch:()=>v,routeModule:()=>u,serverHooks:()=>y,workAsyncStorage:()=>g,workUnitAsyncStorage:()=>m});var s={};a.r(s),a.d(s,{POST:()=>c,dynamic:()=>d,maxDuration:()=>p});var o=a(42706),r=a(28203),n=a(45994),i=a(47628),l=a(670);let d="force-dynamic",p=300;async function c(e,{params:t}){let{agentId:a}=await t,s=await e.json(),o=i.h.getById(a);if(!o)return new Response(`data: ${JSON.stringify({type:"error",message:"Agent not found"})}
2
+
3
+ `,{status:404,headers:{"Content-Type":"text/event-stream"}});let r={...o,...void 0!==s.overrideSkills&&{enabledSkills:s.overrideSkills},...s.overrideProvider&&s.overrideModelId&&{model:{...o.model,provider:s.overrideProvider,modelId:s.overrideModelId}}},n=new TextEncoder,d=!1,p=null;return new Response(new ReadableStream({async start(t){let o=e=>{try{t.enqueue(n.encode(`data: ${JSON.stringify(e)}
4
+
5
+ `))}catch{}};e.signal.addEventListener("abort",()=>{o({type:"aborted"}),p?.dispose();try{t.close()}catch{}});try{let n=(p=await (0,l.jw)(r,s.message,s.sessionFile)).subscribe(r=>{if(e.signal.aborted){n();return}try{switch(r.type){case"message_update":r.assistantMessageEvent?.type==="text_delta"?o({type:"message_update",delta:r.assistantMessageEvent.delta}):r.assistantMessageEvent?.type==="thinking_delta"&&o({type:"thinking_delta",delta:r.assistantMessageEvent.delta});break;case"tool_execution_start":o({type:"tool_start",toolName:r.toolName,toolCallId:r.toolCallId??r.toolName});break;case"tool_execution_update":{let e=r.args,t=r.partialResult,a="string"==typeof e?.command?e.command:JSON.stringify(t??e??"");o({type:"tool_update",toolCallId:r.toolCallId??"",content:a});break}case"tool_execution_end":{let e=r.result,t=!!r.isError,a=e?"string"==typeof e.output?e.output:"string"==typeof e?e:void 0!==e.content?String(e.content):void 0:void 0;o({type:"tool_end",toolCallId:r.toolCallId??"",toolName:r.toolName,isError:t,output:a,fullOutputPath:"string"==typeof e?.fullOutputPath?e.fullOutputPath:void 0,truncated:"boolean"==typeof e?.truncated&&e.truncated});break}case"compaction_start":o({type:"compaction_start"});break;case"compaction_end":o({type:"compaction_end"});break;case"agent_settled":{try{let e=p.getSessionStats();o({type:"session_stats",stats:{tokens:e.tokens,cost:e.cost,contextUsage:e.contextUsage,userMessages:e.userMessages,assistantMessages:e.assistantMessages}})}catch{}let e=p.sessionFile;!e||d||(d=!0,o({type:"session_file",path:e}),s.sessionId||i.e.create(a,e,s.message.slice(0,60))),o({type:"done"}),n(),p.dispose(),p=null;try{t.close()}catch{}}}}catch{}});if(!e.signal.aborted){let e=s.images?.length?s.images.map(e=>({type:"image",data:e.data,mimeType:e.mimeType})):void 0;await p.prompt(s.message,e?{images:e}:void 0)}}catch(e){o({type:"error",message:String(e)});try{t.close()}catch{}}},cancel(){p?.dispose(),p=null}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive","X-Accel-Buffering":"no"}})}let u=new o.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/chat/[agentId]/route",pathname:"/api/chat/[agentId]",filename:"route",bundlePath:"app/api/chat/[agentId]/route"},resolvedPagePath:"/Users/duan/files/pi-web/digital-agent-platform/src/app/api/chat/[agentId]/route.ts",nextConfigOutput:"",userland:s}),{workAsyncStorage:g,workUnitAsyncStorage:m,serverHooks:y}=u;function v(){return(0,n.patchFetch)({workAsyncStorage:g,workUnitAsyncStorage:m})}},42706:(e,t,a)=>{e.exports=a(44870)}};var t=require("../../../../webpack-runtime.js");t.C(e);var a=e=>t(t.s=e),s=t.X(0,[5994,8405],()=>a(19329));module.exports=s})();