@tablestore/tablestore-agent-cli 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (753) hide show
  1. package/dist/commands/memory.d.ts.map +1 -1
  2. package/dist/commands/memory.js +20 -16
  3. package/dist/commands/memory.js.map +1 -1
  4. package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
  5. package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +10 -0
  6. package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
  7. package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
  8. package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +4 -4
  9. package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +80 -0
  10. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/api-keys/page.js.nft.json +1 -1
  11. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/api-keys/page_client-reference-manifest.js +1 -1
  12. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  13. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  14. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js.nft.json +1 -1
  15. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page_client-reference-manifest.js +1 -1
  16. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page.js.nft.json +1 -1
  17. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page_client-reference-manifest.js +1 -1
  18. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page.js.nft.json +1 -1
  19. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page_client-reference-manifest.js +1 -1
  20. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page.js.nft.json +1 -1
  21. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page_client-reference-manifest.js +1 -1
  22. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page.js.nft.json +1 -1
  23. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page_client-reference-manifest.js +1 -1
  24. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page.js.nft.json +1 -1
  25. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page_client-reference-manifest.js +1 -1
  26. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page.js.nft.json +1 -1
  27. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page_client-reference-manifest.js +1 -1
  28. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page.js.nft.json +1 -1
  29. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page_client-reference-manifest.js +1 -1
  30. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page.js.nft.json +1 -1
  31. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page_client-reference-manifest.js +1 -1
  32. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
  33. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
  34. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/[dreamId]/page.js.nft.json +1 -1
  35. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/[dreamId]/page_client-reference-manifest.js +1 -1
  36. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/page.js.nft.json +1 -1
  37. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/page_client-reference-manifest.js +1 -1
  38. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page.js.nft.json +1 -1
  39. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page_client-reference-manifest.js +1 -1
  40. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page.js.nft.json +1 -1
  41. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page_client-reference-manifest.js +1 -1
  42. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js.nft.json +1 -1
  43. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page_client-reference-manifest.js +1 -1
  44. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/app-paths-manifest.json +3 -0
  45. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/build-manifest.json +18 -0
  46. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/next-font-manifest.json +8 -0
  47. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/react-loadable-manifest.json +1 -0
  48. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/server-reference-manifest.json +4 -0
  49. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page.js +23 -0
  50. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page.js.map +5 -0
  51. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page.js.nft.json +1 -0
  52. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page_client-reference-manifest.js +3 -0
  53. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js.nft.json +1 -1
  54. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page_client-reference-manifest.js +1 -1
  55. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js.nft.json +1 -1
  56. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page_client-reference-manifest.js +1 -1
  57. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page.js.nft.json +1 -1
  58. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page_client-reference-manifest.js +1 -1
  59. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js.nft.json +1 -1
  60. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
  61. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/app-paths-manifest.json +3 -0
  62. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/build-manifest.json +18 -0
  63. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/next-font-manifest.json +8 -0
  64. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/react-loadable-manifest.json +1 -0
  65. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/server-reference-manifest.json +4 -0
  66. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js +23 -0
  67. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js.map +5 -0
  68. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js.nft.json +1 -0
  69. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page_client-reference-manifest.js +3 -0
  70. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js.nft.json +1 -1
  71. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page_client-reference-manifest.js +1 -1
  72. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
  73. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
  74. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
  75. package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
  76. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
  77. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
  78. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  79. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  80. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  81. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  82. package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
  84. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  85. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
  86. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +16 -16
  87. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
  88. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
  89. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  90. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  91. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  92. package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  93. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/custom-policy/route.js +1 -1
  94. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/custom-policy/route.js.nft.json +1 -1
  95. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/effective-permissions/route.js +1 -1
  96. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/effective-permissions/route.js.nft.json +1 -1
  97. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/policies/route.js +1 -1
  98. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/policies/route.js.nft.json +1 -1
  99. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/route.js +1 -1
  100. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/route.js.nft.json +1 -1
  101. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/filter-by-permission/route.js +1 -1
  102. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/filter-by-permission/route.js.nft.json +1 -1
  103. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/route.js +1 -1
  104. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/route.js.nft.json +1 -1
  105. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js +1 -1
  106. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js.nft.json +1 -1
  107. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js +1 -1
  108. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
  109. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js +1 -1
  110. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
  111. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js +1 -1
  112. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
  113. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js +1 -1
  114. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
  115. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js +1 -1
  116. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js.nft.json +1 -1
  117. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js +1 -1
  118. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
  119. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js +1 -1
  120. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
  121. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js +1 -1
  122. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
  123. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js +1 -1
  124. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
  125. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js +1 -1
  126. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
  127. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js +1 -1
  128. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
  129. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js +1 -1
  130. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
  131. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js +1 -1
  132. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
  133. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js +1 -1
  134. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
  135. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +2 -2
  136. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
  137. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js +1 -1
  138. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
  139. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js +1 -1
  140. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
  141. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js +1 -1
  142. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
  143. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js +1 -1
  144. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
  145. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js +1 -1
  146. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -1
  147. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-kb-sync/route.js +1 -1
  148. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-kb-sync/route.js.nft.json +1 -1
  149. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.js +1 -1
  150. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.js.nft.json +1 -1
  151. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/route.js +1 -1
  152. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/route.js.nft.json +1 -1
  153. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/cancel/route.js +1 -1
  154. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/cancel/route.js.nft.json +1 -1
  155. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/route.js +1 -1
  156. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/route.js.nft.json +1 -1
  157. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/route.js +1 -1
  158. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/route.js.nft.json +1 -1
  159. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js +2 -2
  160. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js.nft.json +1 -1
  161. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +1 -1
  162. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
  163. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js +1 -1
  164. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
  165. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js +2 -2
  166. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
  167. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/scopes/route.js +2 -2
  168. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/scopes/route.js.nft.json +1 -1
  169. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js +2 -2
  170. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
  171. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/[requestId]/route.js +1 -1
  172. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/[requestId]/route.js.nft.json +1 -1
  173. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/route.js +1 -1
  174. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/route.js.nft.json +1 -1
  175. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js +1 -1
  176. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
  177. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js +1 -1
  178. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
  179. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route/app-paths-manifest.json +3 -0
  180. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route/build-manifest.json +9 -0
  181. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route/server-reference-manifest.json +4 -0
  182. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route.js +6 -0
  183. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route.js.map +5 -0
  184. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route.js.nft.json +1 -0
  185. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route_client-reference-manifest.js +3 -0
  186. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route/app-paths-manifest.json +3 -0
  187. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route/build-manifest.json +9 -0
  188. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route/server-reference-manifest.json +4 -0
  189. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js +6 -0
  190. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js.map +5 -0
  191. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js.nft.json +1 -0
  192. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route_client-reference-manifest.js +3 -0
  193. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route/app-paths-manifest.json +3 -0
  194. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route/build-manifest.json +9 -0
  195. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route/server-reference-manifest.json +4 -0
  196. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js +6 -0
  197. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js.map +5 -0
  198. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js.nft.json +1 -0
  199. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route_client-reference-manifest.js +3 -0
  200. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route/app-paths-manifest.json +3 -0
  201. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route/build-manifest.json +9 -0
  202. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route/server-reference-manifest.json +4 -0
  203. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js +6 -0
  204. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js.map +5 -0
  205. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js.nft.json +1 -0
  206. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route_client-reference-manifest.js +3 -0
  207. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route/app-paths-manifest.json +3 -0
  208. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route/build-manifest.json +9 -0
  209. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route/server-reference-manifest.json +4 -0
  210. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js +6 -0
  211. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js.map +5 -0
  212. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js.nft.json +1 -0
  213. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route_client-reference-manifest.js +3 -0
  214. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route/app-paths-manifest.json +3 -0
  215. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route/build-manifest.json +9 -0
  216. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route/server-reference-manifest.json +4 -0
  217. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js +6 -0
  218. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js.map +5 -0
  219. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js.nft.json +1 -0
  220. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route_client-reference-manifest.js +3 -0
  221. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route/app-paths-manifest.json +3 -0
  222. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route/build-manifest.json +9 -0
  223. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route/server-reference-manifest.json +4 -0
  224. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js +6 -0
  225. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js.map +5 -0
  226. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js.nft.json +1 -0
  227. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route_client-reference-manifest.js +3 -0
  228. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route/app-paths-manifest.json +3 -0
  229. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route/build-manifest.json +9 -0
  230. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route/server-reference-manifest.json +4 -0
  231. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js +6 -0
  232. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js.map +5 -0
  233. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js.nft.json +1 -0
  234. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route_client-reference-manifest.js +3 -0
  235. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +2 -2
  236. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
  237. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js +1 -1
  238. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +1 -1
  239. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js +1 -1
  240. package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -1
  241. package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
  242. package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +15 -15
  243. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  244. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +15 -15
  245. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +3 -3
  246. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +11 -11
  247. package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  248. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page.js.nft.json +1 -1
  249. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  250. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.html +1 -1
  251. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.rsc +18 -18
  252. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +18 -18
  253. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +3 -3
  254. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +11 -11
  255. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
  256. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  257. package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +4 -4
  258. package/dist/dashboard-runtime/dashboard/.next/server/app/page.js.nft.json +1 -1
  259. package/dist/dashboard-runtime/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  260. package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +10 -0
  261. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_artifacts_route_actions_0doape5.js +3 -0
  262. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_ingest_route_actions_0ppwgam.js +3 -0
  263. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_page_route_actions_0odivj9.js +3 -0
  264. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_pages_route_actions_0s15y9a.js +3 -0
  265. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_route_actions_0dbjn9p.js +3 -0
  266. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_search_route_actions_108iypz.js +3 -0
  267. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_source_route_actions_0vmf0n5.js +3 -0
  268. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_sources_route_actions_0i4~w4-.js +3 -0
  269. package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +24 -17
  270. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-e5iv2._.js +3 -0
  271. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.hvkwy._.js +1 -1
  272. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03j_ekh._.js +3 -0
  273. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03~qmfv._.js +3 -0
  274. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__07k_8vo._.js +3 -0
  275. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0_g86ij._.js +3 -0
  276. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0db9xtg._.js +40 -0
  277. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ejcow5._.js +1 -1
  278. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0es0s_~._.js +1 -1
  279. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0esucs7._.js +3 -0
  280. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0f~3a2d._.js +3 -0
  281. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0n.tvh_._.js +3 -0
  282. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ohui_o._.js +3 -0
  283. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ssi0g0._.js +3 -0
  284. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0u03tze._.js +1 -1
  285. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ua_nqs._.js +1 -1
  286. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wpch_g._.js +3 -0
  287. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ypo~ko._.js +3 -0
  288. package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0sa.9zr._.js → [root-of-the-server]__0yqtnx6._.js} +9 -9
  289. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0z19yd0._.js +3 -0
  290. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11rxx0.._.js +40 -0
  291. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11wq90l._.js +1 -1
  292. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__120vi1p._.js +3 -0
  293. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13q2wbt._.js +1 -1
  294. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13~-fxp._.js +1 -1
  295. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0b1r_app_(dashboard)_knowledge-base_[name]_documents_documents-client_tsx_0g2uxmt._.js +1 -1
  296. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e95__next-internal_server_app_(dashboard)_memory_[store]_scope_page_actions_0n2kkfu.js +3 -0
  297. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e95__next-internal_server_app_(dashboard)_memory_[store]_wiki_page_actions_01zih-8.js +3 -0
  298. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_07x7aai.js +4 -0
  299. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_0u~m_xi.js +4 -0
  300. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07er-7t._.js +3 -0
  301. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__09556l4._.js +3 -0
  302. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0cn05tt._.js +3 -0
  303. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ejd~qu._.js +3 -0
  304. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0hbevlv._.js +3 -0
  305. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0i9tlv5._.js +3 -0
  306. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ov6305._.js +1 -1
  307. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0xqm21n._.js +3 -0
  308. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0-yhfok._.js +3 -0
  309. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.eh64w._.js +3 -0
  310. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_019ufsh._.js +3 -0
  311. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04wdnle._.js +3 -0
  312. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06umrt-._.js +3 -0
  313. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0a-deba._.js +3 -0
  314. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0au8umj._.js +3 -0
  315. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0bn79mh._.js +3 -0
  316. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0cpcl4p._.js +3 -0
  317. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f3_q1r._.js +3 -0
  318. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fz3kge._.js +1 -1
  319. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0gt9qp0._.js +3 -0
  320. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0gyu-mm._.js +3 -0
  321. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ih5--w._.js +3 -0
  322. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j4mfzx._.js +3 -0
  323. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j_44th._.js +3 -0
  324. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0mn4dgd._.js +3 -0
  325. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0nc~.w2._.js +3 -0
  326. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0p-bup8._.js +3 -0
  327. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0psdvqq._.js +3 -0
  328. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0rd1b-.._.js +3 -0
  329. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t_-u16._.js +3 -0
  330. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0u0~-~-._.js +3 -0
  331. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0vw3mzw._.js +3 -0
  332. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ww5s91._.js +1 -1
  333. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xm2tp8._.js +3 -0
  334. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xutx8t._.js +3 -0
  335. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0ggq95f._.js +3 -0
  336. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0x60pxf._.js +1 -1
  337. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0xaihln._.js +3 -0
  338. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_api-keys_page_tsx_0lb6fu7._.js +1 -1
  339. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_[dreamId]_page_tsx_0wy3tv6._.js +1 -1
  340. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_page_tsx_0uzzpvs._.js +1 -1
  341. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_layout_tsx_0rbi41w._.js +1 -1
  342. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_scope_page_tsx_01rq2zq._.js +3 -0
  343. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_search_page_tsx_0rj3dkc._.js +3 -0
  344. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_tasks_page_tsx_0a_bgx4._.js +1 -1
  345. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_units_page_tsx_0.6xnei._.js +1 -1
  346. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_memory_memory-files-browser_tsx_0o2~94-._.js +1 -1
  347. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_ui_01evqg6._.js +3 -0
  348. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_i18n_i18n-context_tsx_0c39ewr._.js +1 -1
  349. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_03py6n-._.js +3 -0
  350. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_08hzj0f._.js +3 -0
  351. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0_mks~s._.js +3 -0
  352. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0xbb09m._.js +3 -0
  353. package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +8 -0
  354. package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
  355. package/dist/dashboard-runtime/dashboard/.next/server/next-font-manifest.js +1 -1
  356. package/dist/dashboard-runtime/dashboard/.next/server/next-font-manifest.json +2 -0
  357. package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
  358. package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
  359. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
  360. package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
  361. package/dist/dashboard-runtime/dashboard/.next/static/chunks/{01bokygf48bnj.js → 0-b36b4si6az5.js} +1 -1
  362. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-q4fucd6l5ip.js +1 -0
  363. package/dist/dashboard-runtime/dashboard/.next/static/chunks/03qrjs4w.7yz3.js +1 -0
  364. package/dist/dashboard-runtime/dashboard/.next/static/chunks/03rx12c5dxw_4.js +1 -0
  365. package/dist/dashboard-runtime/dashboard/.next/static/chunks/04uxooijjqs-9.js +1 -0
  366. package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tm8srceyz1j.js +1 -0
  367. package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tpejw1f.2jd.js +1 -0
  368. package/dist/dashboard-runtime/dashboard/.next/static/chunks/09hfvw~51z.9o.js +1 -0
  369. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b_~fcwy9vo2r.js +1 -0
  370. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0crw5ciecbvir.js +1 -0
  371. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cy7y~ef_6m-s.js +1 -0
  372. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dl5t6e508o8k.js +1 -0
  373. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0expqv.~8a3wr.js +1 -0
  374. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0f-mf~9z.~82q.js +1 -0
  375. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gdmaffoezvcu.js +1 -0
  376. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hoybc7spk4vg.js +1 -0
  377. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0idr-.ttn_21z.js +1 -0
  378. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k9my4lhyvwbd.js +1 -0
  379. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k_rtgxnq8bsz.js +1 -0
  380. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0lfx3ykqc9uiy.js +1 -0
  381. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m2j5ne9j7dft.js +1 -0
  382. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m50djlkcegw9.js +1 -0
  383. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0mg.g5g33nh.~.js +1 -0
  384. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0mit8g2.vh7a9.js +1 -0
  385. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0nq2xdnij7nqt.js +1 -0
  386. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o9quk2z~1ez0.js +1 -0
  387. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o~zjik9-6a1f.js +1 -0
  388. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0p6zd_ss6.14_.js +1 -0
  389. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0qccdw9ussvne.js +1 -0
  390. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0teq2sa-33s3g.js +1 -0
  391. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0upl.e~taktf9.js +1 -0
  392. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v1ulq51wmrto.js +5 -0
  393. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v5mmaebktnw1.css +1 -0
  394. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vfuo2829nn25.js +4 -0
  395. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vp-dv9_z334e.js +1 -0
  396. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0w9eqc5ya-oai.js +1 -0
  397. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x0ppjv_4yap7.js +1 -0
  398. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xbqtv-jcph-2.js +1 -0
  399. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~m6ml547qzpo.js +1 -0
  400. package/dist/dashboard-runtime/dashboard/.next/static/chunks/10s~90qej98.b.js +1 -0
  401. package/dist/dashboard-runtime/dashboard/.next/static/chunks/12vri~chu44bu.js +9 -0
  402. package/dist/dashboard-runtime/dashboard/.next/static/chunks/13gbu.62oz207.js +138 -0
  403. package/dist/dashboard-runtime/dashboard/.next/static/chunks/13jqvu~hww3b4.js +1 -0
  404. package/dist/dashboard-runtime/dashboard/.next/static/chunks/13wh4v_j6tlns.js +1 -0
  405. package/dist/dashboard-runtime/dashboard/.next/static/chunks/16.18mrzg-4wl.js +1 -0
  406. package/dist/dashboard-runtime/dashboard/.next/static/chunks/162doi8c0o5ot.js +1 -0
  407. package/dist/dashboard-runtime/dashboard/.next/static/chunks/168xs92lu3o~y.js +1 -0
  408. package/dist/dashboard-runtime/dashboard/package.json +1 -1
  409. package/dist/dashboard-runtime/dashboard/server.js +1 -1
  410. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +14 -0
  411. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/[dreamId]/page.tsx +72 -59
  412. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/page.tsx +9 -8
  413. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +39 -9
  414. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/scope/page.tsx +59 -0
  415. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/search/page.tsx +77 -21
  416. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/settings/page.tsx +18 -2
  417. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +89 -47
  418. package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/wiki/page.tsx +157 -0
  419. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-curator.ts +1 -4
  420. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-helpers.ts +6 -6
  421. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-helpers.ts +50 -0
  422. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-retrieval.ts +228 -0
  423. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-security.ts +26 -0
  424. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +477 -285
  425. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/server-file-memory.ts +113 -0
  426. package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/wiki-retrieval.ts +656 -0
  427. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/_scope.ts +67 -0
  428. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/_helpers.ts +5 -23
  429. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/route.ts +19 -2
  430. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/scopes/route.ts +123 -8
  431. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/search/route.ts +21 -8
  432. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/_helpers.ts +317 -0
  433. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/artifacts/route.ts +194 -0
  434. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/ingest/route.ts +60 -0
  435. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/page/route.ts +55 -0
  436. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/pages/route.ts +61 -0
  437. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/route.ts +89 -0
  438. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/search/route.ts +58 -0
  439. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/source/route.ts +230 -0
  440. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/sources/route.ts +295 -0
  441. package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/route.ts +11 -4
  442. package/dist/dashboard-runtime/dashboard/src/components/api-keys/custom-policy-editor.tsx +2 -1
  443. package/dist/dashboard-runtime/dashboard/src/components/api-keys/permission-rule-dialog.tsx +17 -10
  444. package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +178 -32
  445. package/dist/dashboard-runtime/dashboard/src/components/chat/chat-scope-entry-hydrator.tsx +116 -0
  446. package/dist/dashboard-runtime/dashboard/src/components/chat/memory-bind-section.tsx +37 -15
  447. package/dist/dashboard-runtime/dashboard/src/components/chat/wiki-bind-section.tsx +151 -0
  448. package/dist/dashboard-runtime/dashboard/src/components/layout/language-toggle.tsx +19 -16
  449. package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-mobile.tsx +1 -1
  450. package/dist/dashboard-runtime/dashboard/src/components/memory/file-details-panel.tsx +32 -10
  451. package/dist/dashboard-runtime/dashboard/src/components/memory/file-mutation-dialogs.tsx +14 -2
  452. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-add-dialog.tsx +21 -3
  453. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-create-form.tsx +50 -38
  454. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-actions-table.tsx +13 -0
  455. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-create-dialog.tsx +359 -144
  456. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-files-browser.tsx +46 -10
  457. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-requests-table.tsx +7 -6
  458. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +119 -78
  459. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-form.tsx +384 -70
  460. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-results.tsx +238 -57
  461. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-settings-form.tsx +88 -1
  462. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-card.tsx +4 -1
  463. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-tasks-table.tsx +3 -2
  464. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-detail-panel.tsx +19 -4
  465. package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-table.tsx +8 -5
  466. package/dist/dashboard-runtime/dashboard/src/components/memory/scope-combobox.tsx +31 -50
  467. package/dist/dashboard-runtime/dashboard/src/components/memory/scope-directory-explorer.tsx +384 -0
  468. package/dist/dashboard-runtime/dashboard/src/components/memory/scope-filter-builder.tsx +393 -0
  469. package/dist/dashboard-runtime/dashboard/src/components/memory/scope-hierarchy-picker.tsx +274 -0
  470. package/dist/dashboard-runtime/dashboard/src/components/memory/scope-workspace-cards.tsx +475 -0
  471. package/dist/dashboard-runtime/dashboard/src/components/memory/scope-workspace.tsx +201 -0
  472. package/dist/dashboard-runtime/dashboard/src/components/qa/answer-evidence-block.tsx +145 -0
  473. package/dist/dashboard-runtime/dashboard/src/components/qa/memory-evidence-content.tsx +106 -0
  474. package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +68 -84
  475. package/dist/dashboard-runtime/dashboard/src/components/qa/wiki-evidence-block.tsx +326 -0
  476. package/dist/dashboard-runtime/dashboard/src/components/shared/copyable-id.tsx +69 -0
  477. package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-build-panel.tsx +640 -0
  478. package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-detail.tsx +302 -0
  479. package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-edit-dialog.tsx +195 -0
  480. package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-overview.tsx +104 -0
  481. package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-pages-panel.tsx +424 -0
  482. package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-sources-panel.tsx +506 -0
  483. package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +627 -47
  484. package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +329 -94
  485. package/dist/dashboard-runtime/dashboard/src/hooks/use-wiki-build-polling.ts +151 -0
  486. package/dist/dashboard-runtime/dashboard/src/hooks/use-wikis.ts +291 -0
  487. package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +510 -49
  488. package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +472 -37
  489. package/dist/dashboard-runtime/dashboard/src/lib/browser-file-memory.ts +46 -340
  490. package/dist/dashboard-runtime/dashboard/src/lib/chat-scope-entry.ts +59 -0
  491. package/dist/dashboard-runtime/dashboard/src/lib/dream-create-options.ts +27 -0
  492. package/dist/dashboard-runtime/dashboard/src/lib/file-memory-core.ts +744 -0
  493. package/dist/dashboard-runtime/dashboard/src/lib/memory-storage-mode.ts +165 -37
  494. package/dist/dashboard-runtime/dashboard/src/lib/memory-units-view.ts +9 -0
  495. package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +2 -7
  496. package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +106 -0
  497. package/dist/dashboard-runtime/dashboard/src/lib/retrieval-security.ts +54 -0
  498. package/dist/dashboard-runtime/dashboard/src/lib/scope-directory.ts +97 -0
  499. package/dist/dashboard-runtime/dashboard/src/lib/scope-hierarchy.ts +167 -0
  500. package/dist/dashboard-runtime/dashboard/src/lib/scope-workspace.ts +123 -0
  501. package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +46 -3
  502. package/dist/dashboard-runtime/dashboard/src/lib/server/memory-store-contract.ts +41 -0
  503. package/dist/dashboard-runtime/dashboard/src/lib/server/scope-filter-validation.ts +186 -0
  504. package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +3 -0
  505. package/dist/dashboard-runtime/dashboard/src/lib/wiki-metadata-limits.ts +133 -0
  506. package/dist/dashboard-runtime/dashboard/src/lib/wiki-page-tree.ts +153 -0
  507. package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +126 -23
  508. package/dist/dashboard-runtime/dashboard/src/services/memory.ts +16 -6
  509. package/dist/dashboard-runtime/dashboard/src/services/wiki.ts +145 -0
  510. package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +72 -9
  511. package/dist/dashboard-runtime/dashboard/src/types/memory.ts +99 -33
  512. package/dist/dashboard-runtime/dashboard/src/types/wiki.ts +200 -0
  513. package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/README.md +2 -2
  514. package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/glib-2.0/include/glibconfig.h +9 -8
  515. package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib → sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3} +0 -0
  516. package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/package.json +11 -5
  517. package/dist/dashboard-runtime/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
  518. package/dist/dashboard-runtime/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/package.json +13 -7
  519. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/CHANGELOG.md +175 -0
  520. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/LICENSE +201 -0
  521. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/README.md +203 -0
  522. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/package.json +3 -0
  523. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/request-context.js +21 -0
  524. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/sign-base.js +70 -0
  525. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/sign-v2.js +13 -0
  526. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/sign-v4.js +51 -0
  527. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/client/agent-storage-client.js +196 -0
  528. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/errors/client-error.js +10 -0
  529. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/errors/service-error.js +16 -0
  530. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/http/headers.js +31 -0
  531. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/http/md5.js +9 -0
  532. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/http/ots-json-client.js +155 -0
  533. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/base.js +19 -0
  534. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/chunk.js +67 -0
  535. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/document.js +163 -0
  536. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/enums.js +31 -0
  537. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/file.js +27 -0
  538. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/knowledge-base.js +118 -0
  539. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/memory.js +711 -0
  540. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/metadata-filter.js +123 -0
  541. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/retrieve.js +152 -0
  542. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/unset.js +8 -0
  543. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/wiki.js +2 -0
  544. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/serialization/to-json-request.js +9 -0
  545. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/version.js +5 -0
  546. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/index.js +93 -0
  547. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/client/node-agent-storage-client.js +134 -0
  548. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/fs/file-path.js +73 -0
  549. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/fs/file-reader.js +13 -0
  550. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/oss/oss-uploader.js +30 -0
  551. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node.js +5 -0
  552. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/request-context.d.ts +12 -0
  553. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/request-context.js +17 -0
  554. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-base.d.ts +12 -0
  555. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-base.js +63 -0
  556. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v2.d.ts +6 -0
  557. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v2.js +9 -0
  558. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v4.d.ts +15 -0
  559. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v4.js +47 -0
  560. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/client/agent-storage-client.d.ts +78 -0
  561. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/client/agent-storage-client.js +192 -0
  562. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/client-error.d.ts +3 -0
  563. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/client-error.js +6 -0
  564. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/service-error.d.ts +10 -0
  565. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/service-error.js +12 -0
  566. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/headers.d.ts +14 -0
  567. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/headers.js +27 -0
  568. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/md5.d.ts +1 -0
  569. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/md5.js +6 -0
  570. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/ots-json-client.d.ts +27 -0
  571. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/ots-json-client.js +151 -0
  572. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/base.d.ts +5 -0
  573. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/base.js +15 -0
  574. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/chunk.d.ts +47 -0
  575. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/chunk.js +61 -0
  576. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/document.d.ts +107 -0
  577. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/document.js +151 -0
  578. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/enums.d.ts +24 -0
  579. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/enums.js +28 -0
  580. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/file.d.ts +364 -0
  581. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/file.js +24 -0
  582. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/knowledge-base.d.ts +97 -0
  583. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/knowledge-base.js +108 -0
  584. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/memory.d.ts +1018 -0
  585. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/memory.js +684 -0
  586. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/metadata-filter.d.ts +74 -0
  587. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/metadata-filter.js +118 -0
  588. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/retrieve.d.ts +113 -0
  589. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/retrieve.js +140 -0
  590. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/unset.d.ts +3 -0
  591. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/unset.js +4 -0
  592. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/wiki.d.ts +118 -0
  593. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/wiki.js +1 -0
  594. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/serialization/to-json-request.d.ts +2 -0
  595. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/serialization/to-json-request.js +6 -0
  596. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/version.d.ts +2 -0
  597. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/version.js +2 -0
  598. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/index.d.ts +17 -0
  599. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/index.js +16 -0
  600. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/client/node-agent-storage-client.d.ts +39 -0
  601. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/client/node-agent-storage-client.js +130 -0
  602. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-path.d.ts +12 -0
  603. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-path.js +34 -0
  604. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-reader.d.ts +8 -0
  605. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-reader.js +9 -0
  606. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/oss/oss-uploader.d.ts +17 -0
  607. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/oss/oss-uploader.js +23 -0
  608. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node.d.ts +1 -0
  609. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node.js +1 -0
  610. package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/package.json +67 -0
  611. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +1 -0
  612. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
  613. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +1 -0
  614. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
  615. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts +13 -0
  616. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts.map +1 -0
  617. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js +40 -0
  618. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js.map +1 -0
  619. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -1
  620. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
  621. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +21 -9
  622. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
  623. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +7 -7
  624. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
  625. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +27 -20
  626. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
  627. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
  628. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +55 -37
  629. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
  630. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  631. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/types.d.ts +6 -0
  632. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/types.d.ts.map +1 -1
  633. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts +18 -0
  634. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts.map +1 -0
  635. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js +100 -0
  636. package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js.map +1 -0
  637. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +1 -0
  638. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
  639. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +1 -0
  640. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
  641. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts +13 -0
  642. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts.map +1 -0
  643. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js +40 -0
  644. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js.map +1 -0
  645. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -1
  646. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
  647. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +21 -9
  648. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
  649. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +7 -7
  650. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
  651. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +27 -20
  652. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
  653. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
  654. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +55 -37
  655. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
  656. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
  657. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/types.d.ts +6 -0
  658. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/types.d.ts.map +1 -1
  659. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts +18 -0
  660. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts.map +1 -0
  661. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js +100 -0
  662. package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js.map +1 -0
  663. package/dist/output.d.ts.map +1 -1
  664. package/dist/output.js +1 -0
  665. package/dist/output.js.map +1 -1
  666. package/package.json +1 -1
  667. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-wmyic._.js +0 -40
  668. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.li3cj._.js +0 -40
  669. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0is6qso._.js +0 -3
  670. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q9fgt6._.js +0 -3
  671. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0w_ig2a._.js +0 -3
  672. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0y0w3mg._.js +0 -3
  673. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zmo~nd._.js +0 -3
  674. package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13g_f9w._.js +0 -3
  675. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0.ooo1s._.js +0 -3
  676. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07fsbff._.js +0 -3
  677. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0b5cw4e._.js +0 -3
  678. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p1cst6._.js +0 -3
  679. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0xza7lz._.js +0 -3
  680. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.6x0yu._.js +0 -3
  681. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.pa1e6._.js +0 -3
  682. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01snuz~._.js +0 -3
  683. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02waf76._.js +0 -3
  684. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06_hoj_._.js +0 -3
  685. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_aw2vr._.js +0 -3
  686. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0brqbty._.js +0 -3
  687. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0csuit-._.js +0 -3
  688. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0eps5jg._.js +0 -3
  689. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ez3yia._.js +0 -3
  690. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0k7q0ug._.js +0 -3
  691. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0odjvc.._.js +0 -3
  692. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0pwlb77._.js +0 -3
  693. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t.h859._.js +0 -3
  694. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0thp9l5._.js +0 -3
  695. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0wce254._.js +0 -3
  696. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y4mxf8._.js +0 -3
  697. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12l8jkb._.js +0 -3
  698. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_079nj-_._.js +0 -3
  699. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0_z9696._.js +0 -3
  700. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0grv2wq._.js +0 -3
  701. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0jrh7xy._.js +0 -3
  702. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00arje5._.js +0 -3
  703. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_08h.f_8._.js +0 -3
  704. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0jns_ph._.js +0 -3
  705. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0pf30rh._.js +0 -3
  706. package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ymj2~2._.js +0 -3
  707. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-88a30l.a1sg.js +0 -1
  708. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-xwobg-a6si1.js +0 -1
  709. package/dist/dashboard-runtime/dashboard/.next/static/chunks/026lyw-ynx1og.js +0 -1
  710. package/dist/dashboard-runtime/dashboard/.next/static/chunks/04a.1c2rygy08.js +0 -1
  711. package/dist/dashboard-runtime/dashboard/.next/static/chunks/05.2q9f0yx4e_.js +0 -1
  712. package/dist/dashboard-runtime/dashboard/.next/static/chunks/05_iqjh-v2gej.js +0 -1
  713. package/dist/dashboard-runtime/dashboard/.next/static/chunks/05d8-45s941bx.js +0 -1
  714. package/dist/dashboard-runtime/dashboard/.next/static/chunks/07twdccs42b_-.js +0 -1
  715. package/dist/dashboard-runtime/dashboard/.next/static/chunks/09v-qczj__g1x.js +0 -1
  716. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_8~9zgfm5f.8.js +0 -1
  717. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_zw2y~vb_52n.js +0 -1
  718. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a2f-mxepv-y7.js +0 -1
  719. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a9.rr50h5ypa.js +0 -1
  720. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0amex7bwxnme9.js +0 -1
  721. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0apfhv-v7oy7u.js +0 -1
  722. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bxt5icwb83xt.js +0 -1
  723. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dpi1comd-thc.js +0 -1
  724. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0eafb9pun~54k.js +0 -9
  725. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0eerrv808~6bh.js +0 -4
  726. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j6agpotrd_n4.js +0 -1
  727. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jbcdgtcgqemd.js +0 -1
  728. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jp7zmwvyv0bn.js +0 -1
  729. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k8mhea24d_kj.js +0 -1
  730. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0krt75we1wtcy.js +0 -1
  731. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ogrq_r43je48.js +0 -1
  732. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0prl9yrb8ksp8.js +0 -1
  733. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r4azm.3hswcs.js +0 -138
  734. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r6utd8g~.cc1.js +0 -1
  735. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6c8q4k~6aiy.js +0 -1
  736. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uj7ezedkm6ou.css +0 -1
  737. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x5qtkdg2trq9.js +0 -5
  738. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yvc~t7p88wsf.js +0 -1
  739. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zatcw.k613lh.js +0 -1
  740. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zhfdjby7cj-q.js +0 -1
  741. package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~naqbx3873~r.js +0 -1
  742. package/dist/dashboard-runtime/dashboard/.next/static/chunks/13__t3s3ipfzl.js +0 -1
  743. package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.8mq880kjoc.js +0 -1
  744. package/dist/dashboard-runtime/dashboard/.next/static/chunks/14rpr3z1.lmgj.js +0 -1
  745. package/dist/dashboard-runtime/dashboard/.next/static/chunks/16uky1ro-t_~9.js +0 -1
  746. package/dist/dashboard-runtime/dashboard/.next/static/chunks/18absak_u0d85.js +0 -138
  747. package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +0 -1
  748. package/dist/dashboard-runtime/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  749. /package/dist/dashboard-runtime/dashboard/.next/static/{8G6beqTEKH_-N0JljpgWT → mCNgeSYc3Dx3KiZXWf-5A}/_buildManifest.js +0 -0
  750. /package/dist/dashboard-runtime/dashboard/.next/static/{8G6beqTEKH_-N0JljpgWT → mCNgeSYc3Dx3KiZXWf-5A}/_clientMiddlewareManifest.js +0 -0
  751. /package/dist/dashboard-runtime/dashboard/.next/static/{8G6beqTEKH_-N0JljpgWT → mCNgeSYc3Dx3KiZXWf-5A}/_ssgManifest.js +0 -0
  752. /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/index.js +0 -0
  753. /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/versions.json +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309823,e=>{"use strict";let t=(0,e.i(801685).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],309823)},730068,e=>{"use strict";let t=(0,e.i(801685).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],730068)},323516,e=>{"use strict";var t=e.i(44501),s=e.i(861403),r=e.i(465581),a=e.i(979980),n=e.i(515793),i=e.i(856717),l=e.i(876490);let o=new Set(Object.keys(i.messages.header.segments));e.s(["PageHeader",0,function({title:e,description:i,hideBreadcrumb:d,children:c,className:m}){let u=(0,r.usePathname)()??"/",{t:h}=(0,n.useI18n)(),x=d?[]:function(e,t){if(/^\/knowledge-base\/[^/]+(?:\/.*)?$/.test(e)||/^\/memory\/[^/]+(?:\/.*)?$/.test(e))return[];let s=e.split("/").filter(Boolean);if(0===s.length)return[];let r=[],a="";return s.forEach((e,n)=>{a+=`/${e}`;let i=decodeURIComponent(e),l=o.has(i)?t(`header.segments.${i}`):i;r.push({label:l,href:n<s.length-1?a:void 0})}),r}(u,h);return(0,t.jsxs)("div",{className:(0,l.cn)("mb-5 flex flex-col gap-2",m),children:[x.length>1&&(0,t.jsxs)("nav",{"aria-label":h("header.breadcrumb"),className:"flex items-center gap-1 text-[13px] text-[hsl(var(--muted-foreground))]",children:[(0,t.jsx)(s.default,{href:"/",className:"transition-colors hover:text-[hsl(var(--foreground))]",children:h("common.home")}),x.map((e,r)=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(a.ChevronRight,{className:"h-3 w-3 opacity-60"}),e.href?(0,t.jsx)(s.default,{href:e.href,className:"transition-colors hover:text-[hsl(var(--foreground))]",children:e.label}):(0,t.jsx)("span",{className:"font-medium text-[hsl(var(--foreground))]",children:e.label})]},`${e.label}-${r}`))]}),(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold leading-tight text-[hsl(var(--foreground))]",children:e}),i&&(0,t.jsx)("p",{className:"text-[13px] text-[hsl(var(--muted-foreground))]",children:i})]}),c&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:c})]})]})}])},694904,e=>{"use strict";var t=e.i(108365);function s(e){let t=new Date(e);return isNaN(t.getTime())?null:t}e.s(["formatDateTime",0,function(e,r="zh",a={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}){if(!e)return"-";let n=s(e);return n?n.toLocaleString(t.LOCALE_HTML_LANG[r],a):"string"==typeof e?e:"-"},"formatTimeOfDay",0,function(e,r="zh",a={hour:"2-digit",minute:"2-digit",second:"2-digit"}){if(!e)return"-";let n=s(e);return n?n.toLocaleTimeString(t.LOCALE_HTML_LANG[r],a):"string"==typeof e?e:"-"}])},322740,e=>{"use strict";var t=e.i(44501),s=e.i(101685),r=e.i(876490);let a=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("div",{className:"relative w-full overflow-auto",children:(0,t.jsx)("table",{ref:a,className:(0,r.cn)("w-full caption-bottom text-sm",e),...s})}));a.displayName="Table";let n=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("thead",{ref:a,className:(0,r.cn)("[&_tr]:border-b [&_tr]:border-[hsl(var(--border))] [&_tr]:bg-[hsl(var(--secondary))]",e),...s}));n.displayName="TableHeader";let i=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("tbody",{ref:a,className:(0,r.cn)("[&_tr:last-child]:border-0",e),...s}));i.displayName="TableBody",s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("tfoot",{ref:a,className:(0,r.cn)("border-t border-[hsl(var(--border))] bg-[hsl(var(--secondary)/0.5)] font-medium [&>tr]:last:border-b-0",e),...s})).displayName="TableFooter";let l=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("tr",{ref:a,className:(0,r.cn)("border-b border-[hsl(var(--border-light))] transition-colors hover:bg-[hsl(var(--secondary)/0.5)] data-[state=selected]:bg-[hsl(var(--primary-soft))]",e),...s}));l.displayName="TableRow";let o=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("th",{ref:a,className:(0,r.cn)("h-9 px-3 text-left align-middle text-xs font-medium text-[hsl(var(--muted-foreground))] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...s}));o.displayName="TableHead";let d=s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("td",{ref:a,className:(0,r.cn)("px-3 py-2 align-middle text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...s}));d.displayName="TableCell",s.forwardRef(({className:e,...s},a)=>(0,t.jsx)("caption",{ref:a,className:(0,r.cn)("mt-4 text-sm text-[hsl(var(--muted-foreground))]",e),...s})).displayName="TableCaption",e.s(["Table",0,a,"TableBody",0,i,"TableCell",0,d,"TableHead",0,o,"TableHeader",0,n,"TableRow",0,l])},431592,e=>{"use strict";var t=e.i(44501),s=e.i(101685),r=e.i(730068),a=e.i(942595),n=e.i(876490),i=e.i(515793);e.s(["RefreshButton",0,function({loading:e,onClick:l,title:o,className:d,size:c="icon",label:m,variant:u="ghost"}){let{t:h}=(0,i.useI18n)(),x=o??h("common.refresh"),p=(0,s.useRef)(null),f=(0,s.useRef)(null),y=(0,s.useRef)(e),g=()=>{let e=p.current;if(!e||f.current)return;let t=e.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:800,easing:"linear",iterations:1,fill:"none"});f.current=t,t.addEventListener("finish",()=>{f.current=null,y.current&&g()}),t.addEventListener("cancel",()=>{f.current=null})};(0,s.useEffect)(()=>{y.current=e},[e]),(0,s.useEffect)(()=>{e&&g()},[e]),(0,s.useEffect)(()=>()=>{f.current?.cancel(),f.current=null},[]);let v="icon"!==c&&!!m;return(0,t.jsxs)(a.Button,{type:"button",variant:u,size:c,onClick:()=>{e||(g(),l())},title:x,"aria-label":m??x,"aria-busy":e||void 0,className:(0,n.cn)("group text-muted-foreground transition-colors duration-150","hover:text-foreground active:scale-[0.96]","ghost"===u&&"hover:bg-[hsl(var(--accent))]",d),children:[(0,t.jsx)("span",{ref:p,"aria-hidden":!0,className:(0,n.cn)("inline-flex transform-gpu",v&&"mr-1.5"),children:(0,t.jsx)(r.RefreshCw,{className:"sm"===c?"h-3.5 w-3.5":"h-4 w-4"})}),v&&m]})}])},573581,e=>{"use strict";let t=(0,e.i(801685).default)("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"}]]);e.s(["Eye",0,t],573581)},326042,e=>{"use strict";var t=e.i(543876),s=e.i(164204),r=e.i(247570),a=e.i(307166);e.s(["useMemoryUnit",0,function(e,n,i,l=!0){let{context:o,ready:d}=(0,a.useRuntimeContext)();return(0,t.useQuery)({queryKey:r.queryKeys.memoryUnit(o.dataScopeKey,e,n,i),queryFn:()=>(0,s.getMemoryUnit)({memoryStoreName:e,memoryId:n,scope:i}),enabled:d&&l&&!!e&&!!i?.appId&&!!n&&"-"!==n})}])},892362,e=>{"use strict";let t=(0,e.i(801685).default)("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);e.s(["ListOrdered",0,t],892362)},520647,516007,711836,e=>{"use strict";var t=e.i(124561),s=e.i(137500),r=e.i(543876),a=e.i(712984),n=e.i(247570),i=e.i(307166),l=e.i(593321);function o(e,t,s){return(0,l.apiPost)(`/api/v1/memory/stores/${encodeURIComponent(e)}/file-memory/${t}`,s)}function d(e,t){return o(e,"add",t)}function c(e,t){return o(e,"list",t)}function m(e,t){return o(e,"get",t)}function u(e,t){return o(e,"update",t)}function h(e,t){return o(e,"delete",t)}function x(e,t){return o(e,"versions-list",t)}function p(e,t){return o(e,"version-get",t)}function f(e,t){return o(e,"version-redact",t)}function y(e){return!!(e&&e.appId&&e.tenantId&&e.agentId&&e.runId&&!Object.values(e).includes("*"))}function g(e){let t=(0,i.useDataScopeKey)(),r=(0,a.useQueryClient)();return(0,s.useMutation)({mutationFn:({memoryStoreName:t,...s})=>e(t,s),onSuccess:(e,s)=>r.invalidateQueries({queryKey:n.fileMemoryQueryKeys.root(t,s.memoryStoreName,s.scope)})})}e.s(["addItem",0,d,"deleteItem",0,h,"getItem",0,m,"getItemVersion",0,p,"listItemVersions",0,x,"listItems",0,c,"redactItemVersion",0,f,"updateItem",0,u],516007),e.s(["useAddItem",0,function(){return g(d)},"useDeleteItem",0,function(){return g(h)},"useItem",0,function(e,t,s){let a=(0,i.useDataScopeKey)(),l=s?.itemId??s?.path??"";return(0,r.useQuery)({queryKey:n.fileMemoryQueryKeys.item(a,e??"",t,l),queryFn:()=>m(e,{scope:t,...s,view:"full"}),enabled:!!e&&y(t)&&!!l})},"useItemVersion",0,function(e,t,s){let a=(0,i.useDataScopeKey)();return(0,r.useQuery)({queryKey:n.fileMemoryQueryKeys.version(a,e??"",t,s??""),queryFn:()=>p(e,{scope:t,versionId:s,view:"full"}),enabled:!!e&&y(t)&&!!s})},"useItemVersions",0,function(e,s,r,a={}){let l=(0,i.useDataScopeKey)();return(0,t.useInfiniteQuery)({queryKey:n.fileMemoryQueryKeys.versions(l,e??"",s,r??""),queryFn:({pageParam:t})=>x(e,{scope:s,itemId:r,...a,..."string"==typeof t?{nextToken:t}:{}}),getNextPageParam:e=>e.nextToken??void 0,initialPageParam:void 0,enabled:!!e&&y(s)&&!!r})},"useItems",0,function(e,s,r={}){let a=(0,i.useDataScopeKey)();return(0,t.useInfiniteQuery)({queryKey:n.fileMemoryQueryKeys.list(a,e??"",s,r.pathPrefix),queryFn:({pageParam:t})=>c(e,{scope:s,...r.pathPrefix?{pathPrefix:r.pathPrefix}:{},...void 0!==r.depth?{depth:r.depth}:{},...r.view?{view:r.view}:{},...r.limit?{limit:r.limit}:{},..."string"==typeof t?{nextToken:t}:{}}),getNextPageParam:e=>e.nextToken??void 0,initialPageParam:void 0,enabled:!1!==r.enabled&&!!e&&y(s)})},"useRedactItemVersion",0,function(){return g(f)},"useUpdateItem",0,function(){return g(u)}],520647);var v=e.i(44501),b=e.i(101685),j=e.i(309823),N=e.i(179297),I=e.i(51517),w=e.i(45123),k=e.i(515793),S=e.i(876490);function C(e){let t=e.trim().normalize("NFC");return`/${t.replace(/^\/+/,"")}`}e.s(["FileEditor",0,function({path:e,content:t,dirty:s,readOnly:r,loading:a,error:n,conflict:i,onChange:l}){let{t:o}=(0,k.useI18n)(),d=(0,b.useMemo)(()=>new TextEncoder().encode(t).byteLength,[t]);return e?a?(0,v.jsxs)("div",{className:"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,v.jsx)(I.Loader2,{className:"h-4 w-4 animate-spin"}),o("common.loading")]}):n?(0,v.jsx)("div",{className:"flex h-full items-center justify-center p-8 text-sm text-[hsl(var(--destructive))]",children:o("memory.files.readFailed",{error:n})}):(0,v.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,v.jsxs)("div",{className:"flex items-center justify-between border-b border-[hsl(var(--border))] px-3 py-2",children:[(0,v.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,v.jsx)(N.FileText,{className:"h-4 w-4 shrink-0 text-[hsl(var(--primary))]"}),(0,v.jsx)("span",{className:"truncate font-mono text-xs",title:e,children:e}),s?(0,v.jsx)("span",{className:"shrink-0 rounded-full bg-amber-500/15 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-300",children:o("memory.files.unsaved")}):null]}),(0,v.jsx)("span",{className:(0,S.cn)("shrink-0 text-[10px] text-muted-foreground",d>102400&&"text-[hsl(var(--destructive))]"),children:o("memory.files.byteCount",{count:d,limit:102400})})]}),i?(0,v.jsxs)("div",{className:"flex items-start gap-2 border-b border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-800 dark:text-amber-200",children:[(0,v.jsx)(j.AlertTriangle,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,v.jsx)("span",{children:o("memory.files.versionConflict")})]}):null,(0,v.jsx)(w.Textarea,{"aria-label":o("memory.files.editorLabel"),value:t,onChange:e=>l(e.target.value),readOnly:r,spellCheck:!1,className:"min-h-0 flex-1 resize-none rounded-none border-0 bg-transparent p-4 font-mono text-xs leading-5 shadow-none focus-visible:ring-0",placeholder:o("memory.files.editorPlaceholder")})]}):(0,v.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-muted-foreground",children:[(0,v.jsx)(N.FileText,{className:"h-9 w-9 opacity-30"}),(0,v.jsx)("p",{className:"text-sm",children:o("memory.files.selectFile")})]})},"normalizeFileMemoryPath",0,C,"validateFileMemoryContent",0,function(e){return new TextEncoder().encode(e).byteLength>102400?"content-too-large":null},"validateFileMemoryPath",0,function(e){let t=C(e);if("/"===t)return"path-required";let s=t.slice(1).split("/");return t.includes("\\")||t.includes("\0")||s.some(e=>!e||"."===e||".."===e)?"path-traversal":new TextEncoder().encode(t).byteLength>1024?"path-too-large":null}],711836)},51517,e=>{"use strict";let t=(0,e.i(801685).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],51517)},533153,e=>{"use strict";let t=(0,e.i(801685).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],533153)},179297,e=>{"use strict";let t=(0,e.i(801685).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],179297)},124561,e=>{"use strict";var t=e.i(550458),s=e.i(792571),r=class extends t.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,s.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,s.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,a=super.createResult(e,t),{isFetching:n,isRefetching:i,isError:l,isRefetchError:o}=a,d=r.fetchMeta?.fetchMore?.direction,c=l&&"forward"===d,m=n&&"forward"===d,u=l&&"backward"===d,h=n&&"backward"===d;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,s.hasNextPage)(t,r.data),hasPreviousPage:(0,s.hasPreviousPage)(t,r.data),isFetchNextPageError:c,isFetchingNextPage:m,isFetchPreviousPageError:u,isFetchingPreviousPage:h,isRefetchError:o&&!c&&!u,isRefetching:i&&!m&&!h}}},a=e.i(840870);e.s(["useInfiniteQuery",0,function(e,t){return(0,a.useBaseQuery)(e,r,t)}],124561)},551031,e=>{"use strict";let t=(0,e.i(801685).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],551031)},736247,e=>{"use strict";let t=(0,e.i(801685).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],736247)},843226,e=>{"use strict";let t=(0,e.i(801685).default)("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"}]]);e.s(["Save",0,t],843226)},949456,579081,e=>{"use strict";var t=e.i(44501),s=e.i(101685),r=e.i(820268),a=e.i(979980),n=e.i(179297),i=e.i(551031),l=e.i(736247),o=e.i(229025),d=e.i(396416),c=e.i(187014),m=e.i(942595),u=e.i(723888),h=e.i(520647),x=e.i(515793),p=e.i(876490),f=e.i(593321),y=e.i(165658),g=e.i(801685);let v=(0,g.default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),b=(0,g.default)("hard-drive",[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]);var j=e.i(892362);let N=(0,g.default)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]);e.s(["Clock3",0,N],579081);var I=e.i(51517),w=e.i(983823);let k=(0,g.default)("shield-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);function S({memoryStoreName:e,scope:r,file:a,readOnly:n,onRestored:i}){var l;let{t:o}=(0,x.useI18n)(),[d,u]=(0,s.useState)(null),p=(0,h.useItemVersions)(e,r,a.itemId,{view:"basic",limit:50}),f=(0,h.useItemVersion)(e,r,d??void 0),y=(0,h.useAddItem)(),g=(0,h.useUpdateItem)(),v=(0,h.useRedactItemVersion)(),b=(0,s.useMemo)(()=>p.data?.pages.flatMap(e=>e.versions)??[],[p.data?.pages]);async function j(){if(f.data)try{let t=function(e,t,s,r){if(r.redacted)throw Error("VERSION_REDACTED");if(void 0===r.content)throw Error("VERSION_CONTENT_UNAVAILABLE");return s?{kind:"update",request:{memoryStoreName:e,scope:t,itemId:s.itemId,content:r.content,precondition:{expectedVersionId:s.latestVersionId},view:"full"}}:{kind:"add",request:{memoryStoreName:e,scope:t,path:r.path,content:r.content,view:"full"}}}(e,r,a,f.data),s="update"===t.kind?await g.mutateAsync(t.request):await y.mutateAsync(t.request);i?.(s,f.data.content??""),c.toast.success(o("memory.files.restoreSuccess"))}catch(e){c.toast.error(e instanceof Error?e.message:o("memory.files.restoreFailed"))}}async function C(){let t=f.data;if(t&&!t.redacted&&window.confirm(o("memory.files.redactConfirm")))try{await v.mutateAsync({memoryStoreName:e,scope:r,versionId:t.versionId}),await f.refetch(),c.toast.success(o("memory.files.redactSuccess"))}catch(e){c.toast.error(e instanceof Error?e.message:o("memory.files.redactFailed"))}}return n?null:(0,t.jsxs)("section",{className:"min-h-0 border-t border-[hsl(var(--border))] pt-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,t.jsxs)("h4",{className:"flex items-center gap-1.5 text-xs font-semibold",children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5"}),o("memory.files.versionHistory")]}),p.hasNextPage?(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"sm",disabled:p.isFetchingNextPage,onClick:()=>void p.fetchNextPage(),children:o("memory.files.loadMore")}):null]}),p.isLoading?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("common.loading")}):0===b.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o("memory.files.noVersions")}):(0,t.jsx)("div",{className:"max-h-48 space-y-1 overflow-auto pr-1",children:b.map(e=>{var s;return(0,t.jsxs)("button",{type:"button",onClick:()=>u(e.versionId),className:"flex w-full items-center justify-between rounded-md border border-transparent px-2 py-1.5 text-left text-xs hover:border-[hsl(var(--border))] hover:bg-[hsl(var(--accent))]",children:[(0,t.jsxs)("span",{className:"truncate",children:[e.operation," · ",(s=e.versionId).length>12?`${s.slice(0,6)}…${s.slice(-5)}`:s,e.redacted?` \xb7 ${o("memory.files.redacted")}`:""]}),(0,t.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground",children:new Date(e.createdAt).toLocaleString()})]},e.versionId)})}),d?(0,t.jsx)("div",{className:"mt-3 rounded-md border border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.25)] p-2",children:f.isLoading?(0,t.jsx)(I.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):f.data?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"max-h-40 overflow-auto whitespace-pre-wrap break-words font-mono text-[11px] leading-4",children:f.data.content??o("memory.files.contentUnavailable")}),f.data.redacted?(0,t.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:o("memory.files.redactedDetails",{at:f.data.redactedAt?new Date(f.data.redactedAt).toLocaleString():"—",actor:(l=f.data.redactedBy)?`${l.actorType}:${l.actorId}`:"—"})}):null,(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-2 gap-2",children:[(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",disabled:!0===f.data.redacted||void 0===f.data.content||g.isPending||y.isPending,onClick:()=>void j(),children:[(0,t.jsx)(w.RotateCcw,{}),o("memory.files.restoreVersion")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",className:"text-[hsl(var(--destructive))]",disabled:!0===f.data.redacted||v.isPending,onClick:()=>void C(),children:[(0,t.jsx)(k,{}),o("memory.files.redactVersion")]})]})]}):null}):null]})}function C({icon:e,label:s,value:r}){return(0,t.jsxs)("div",{className:"flex items-start gap-2 py-1.5",children:[(0,t.jsx)("span",{className:"mt-0.5 text-muted-foreground",children:e}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:s}),(0,t.jsx)("div",{className:"break-all text-xs",children:r})]})]})}function T({memoryStoreName:e,scope:s,file:r,readOnly:a,onRestored:n}){let{t:i}=(0,x.useI18n)();return r?(0,t.jsxs)("div",{className:"h-full min-h-0 overflow-auto p-3",children:[(0,t.jsx)("h3",{className:"mb-2 text-xs font-semibold",children:i("memory.files.details")}),(0,t.jsx)(C,{icon:(0,t.jsx)(b,{className:"h-3.5 w-3.5"}),label:i("memory.files.size"),value:`${r.contentSizeBytes.toLocaleString()} B`}),(0,t.jsx)(C,{icon:(0,t.jsx)(j.ListOrdered,{className:"h-3.5 w-3.5"}),label:i("memory.files.latestVersion"),value:r.latestVersionId}),(0,t.jsx)(C,{icon:(0,t.jsx)(v,{className:"h-3.5 w-3.5"}),label:"SHA-256",value:(0,t.jsx)("span",{className:"font-mono text-[10px]",children:r.contentSha256})}),(0,t.jsx)(C,{icon:(0,t.jsx)(y.FileClock,{className:"h-3.5 w-3.5"}),label:i("memory.files.updatedAt"),value:new Date(r.updatedAt).toLocaleString()}),(0,t.jsx)(S,{memoryStoreName:e,scope:s,file:r,readOnly:a,onRestored:n})]}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center p-5 text-center text-xs text-muted-foreground",children:i("memory.files.selectForDetails")})}var P=e.i(711836),M=e.i(433253),F=e.i(766476),L=e.i(45123);let R={"path-required":"memory.files.pathRequired","path-traversal":"memory.files.pathTraversal","path-too-large":"memory.files.pathTooLarge","content-too-large":"memory.files.contentTooLarge"};function D({mode:e,selectedPath:r,pending:a,onClose:n,onCreate:i,onRename:l,onDelete:o}){let{t:d}=(0,x.useI18n)(),[c,h]=(0,s.useState)(""),[p,f]=(0,s.useState)(""),[y,g]=(0,s.useState)(null);async function v(){g(null);try{if("delete"===e)await o();else{let t=(0,P.validateFileMemoryPath)(c);if(t)return void g(d(R[t]));if("create"===e){let e=(0,P.validateFileMemoryContent)(p);if(e)return void g(d(R[e]));await i((0,P.normalizeFileMemoryPath)(c),p)}else"rename"===e&&await l((0,P.normalizeFileMemoryPath)(c))}n()}catch(e){g(e instanceof Error?e.message:d("common.unknownError"))}}(0,s.useEffect)(()=>{h("rename"===e?r??"":""),f(""),g(null)},[e,r]);let b={create:d("memory.files.createTitle"),rename:d("memory.files.renameTitle"),delete:d("memory.files.deleteTitle")},j={create:d("common.create"),rename:d("memory.files.rename"),delete:d("common.delete")},N=e?b[e]:"",w=e?j[e]:"";return(0,t.jsx)(M.Dialog,{open:null!==e,onOpenChange:e=>!e&&n(),children:(0,t.jsxs)(M.DialogContent,{className:"sm:max-w-lg",children:[(0,t.jsxs)(M.DialogHeader,{children:[(0,t.jsx)(M.DialogTitle,{children:N}),(0,t.jsx)(M.DialogDescription,{children:"delete"===e?d("memory.files.deleteDescription",{path:r??""}):d("memory.files.pathHelp")})]}),"delete"!==e?(0,t.jsxs)("div",{className:"space-y-4 py-2",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(F.Label,{htmlFor:"file-memory-path",children:d("memory.files.pathLabel")}),(0,t.jsx)(u.Input,{id:"file-memory-path",autoFocus:!0,value:c,onChange:e=>h(e.target.value),placeholder:"/notes/profile.md"})]}),"create"===e?(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(F.Label,{htmlFor:"file-memory-content",children:d("memory.files.initialContent")}),(0,t.jsx)(L.Textarea,{id:"file-memory-content",value:p,onChange:e=>f(e.target.value),rows:8,className:"font-mono text-xs"})]}):null]}):null,y?(0,t.jsx)("p",{className:"text-xs text-[hsl(var(--destructive))]",children:y}):null,(0,t.jsxs)(M.DialogFooter,{children:[(0,t.jsx)(m.Button,{type:"button",variant:"outline",onClick:n,children:d("common.cancel")}),(0,t.jsxs)(m.Button,{type:"button",variant:"delete"===e?"destructive":"default",onClick:()=>void v(),disabled:a,children:[a?(0,t.jsx)(I.Loader2,{className:"animate-spin"}):null,w]})]})]})})}let E=(0,g.default)("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]);var O=e.i(533153),A=e.i(730068),z=e.i(843226),V=e.i(330363);function B({readOnly:e,loading:s,hasSelection:r,dirty:a,saving:n,onCreate:i,onRename:l,onDelete:o,onRefresh:d,onSave:c}){let{t:u}=(0,x.useI18n)();return(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.2)] px-3 py-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)(m.Button,{type:"button",size:"sm",onClick:i,disabled:e||s||a,children:[(0,t.jsx)(E,{}),u("memory.files.newFile")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",onClick:l,disabled:e||!r||a,children:[(0,t.jsx)(O.Pencil,{}),u("memory.files.rename")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",onClick:o,disabled:e||!r||a,className:"text-[hsl(var(--destructive))]",children:[(0,t.jsx)(V.Trash2,{}),u("common.delete")]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:"mr-1 rounded-full border border-[hsl(var(--border))] bg-[hsl(var(--card))] px-2 py-0.5 text-[10px] text-muted-foreground",children:u(e?"memory.files.readOnlyMode":"memory.files.writableMode")}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",variant:"outline",onClick:d,disabled:s,children:[(0,t.jsx)(A.RefreshCw,{className:s?"animate-spin":void 0}),u("common.refresh")]}),(0,t.jsxs)(m.Button,{type:"button",size:"sm",onClick:c,disabled:e||!r||!a||n,children:[n?(0,t.jsx)(I.Loader2,{className:"animate-spin"}):(0,t.jsx)(z.Save,{}),u(n?"common.saving":"common.save")]})]})]})}let H={selectedPath:null,content:"",loadedItemId:null,loadedVersionId:null,dirty:!1,conflict:null};function K(e,t){switch(t.type){case"select":return{...H,selectedPath:t.path};case"load":if(e.selectedPath!==t.path)return e;return{selectedPath:t.path,content:t.content,loadedItemId:t.itemId,loadedVersionId:t.versionId,dirty:!1,conflict:null};case"edit":return{...e,content:t.content,dirty:!0,conflict:null};case"save-success":return{...e,content:t.content??e.content,loadedItemId:t.itemId,loadedVersionId:t.versionId,dirty:!1,conflict:null};case"save-conflict":return{...e,dirty:!0,conflict:t.message}}}function q(e,t,s){return!e.dirty||t===e.selectedPath||s()}o.FolderTree,e.s(["MemoryFilesBrowser",0,function({memoryStoreName:e,scope:o,enabled:y=!0,initialPath:g,className:v}){let{t:b}=(0,x.useI18n)(),[j,N]=(0,s.useReducer)(K,H),I=(0,s.useRef)(j);I.current=j;let w=(0,s.useRef)(b);w.current=b;let[k,S]=(0,s.useState)(new Set),[C,M]=(0,s.useState)(""),[F,L]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(g){let e=(0,P.normalizeFileMemoryPath)(g);q(I.current,e,()=>window.confirm(w.current("memory.files.discardChanges")))&&N({type:"select",path:e})}},[g]);let R=(0,h.useItems)(e,o,{depth:0,view:"basic",limit:100,enabled:y}),E=(0,h.useItem)(e,o,j.selectedPath?{path:j.selectedPath}:null),O=(0,h.useAddItem)(),A=(0,h.useUpdateItem)(),z=(0,h.useDeleteItem)(),V=R.data?.pages,$=(0,s.useMemo)(()=>{let e=new Map;for(let t of V??[])for(let s of t.items)"memoryfile"===s.type&&e.set((0,P.normalizeFileMemoryPath)(s.path),{...s,path:(0,P.normalizeFileMemoryPath)(s.path)});return Array.from(e.values()).sort((e,t)=>e.path.localeCompare(t.path))},[V]),U=(0,s.useMemo)(()=>{let e=C.trim().toLocaleLowerCase();return e?$.filter(t=>t.path.toLocaleLowerCase().includes(e)):$},[C,$]),_=(0,s.useMemo)(()=>new Map($.map(e=>[e.path,e])),[$]),Q=(0,s.useMemo)(()=>{var e;let t,s;return e=function(e){let t={type:"dir",name:"",rel:"",children:[]};for(let s of e){let e=s.rel.split("/").filter(Boolean);if(0===e.length)continue;let r=t;for(let t=0;t<e.length-1;t+=1){let s=e[t],a=e.slice(0,t+1).join("/"),n=r.children.find(e=>"dir"===e.type&&e.name===s);n||(n={type:"dir",name:s,rel:a,children:[]},r.children.push(n)),r=n}let a=e[e.length-1];r.children.some(e=>"file"===e.type&&e.name===a)||r.children.push({type:"file",name:a,rel:s.rel,size:s.size})}return!function e(t){for(let s of(t.sort((e,t)=>e.type!==t.type?"dir"===e.type?-1:1:e.name.localeCompare(t.name)),t))"dir"===s.type&&e(s.children)}(t.children),t}(U.map(e=>({rel:e.path.replace(/^\/+/,""),size:e.contentSizeBytes}))),t=[],(s=(e,r)=>{for(let a of e)t.push({node:a,depth:r}),"dir"!==a.type||k.has(a.rel)||s(a.children,r+1)})(e.children,0),t},[U,k]),J=V?.some(e=>!0===e.readOnly)??!1,G=j.selectedPath?_.get(j.selectedPath)??E.data:void 0;async function W(){var t,s;if((0,P.validateFileMemoryContent)(j.content))return void c.toast.error(b("memory.files.contentTooLarge"));try{if(!j.loadedItemId||!j.loadedVersionId)throw Error("FILE_VERSION_NOT_LOADED");let r=await A.mutateAsync({memoryStoreName:e,scope:o,...(t={itemId:j.loadedItemId,latestVersionId:j.loadedVersionId},s=j.content,{itemId:t.itemId,content:s,precondition:{expectedVersionId:t.latestVersionId},view:"full"})});N({type:"save-success",itemId:r.itemId,versionId:r.latestVersionId,content:j.content}),c.toast.success(b("memory.files.saveSuccess"))}catch(t){let e=t instanceof Error?t.message:String(t);if(t instanceof f.ApiClientError&&"LOCK_CONFLICT"===t.code||t instanceof Error&&t.message.includes("LOCK_CONFLICT"))return void N({type:"save-conflict",message:e});c.toast.error(e||b("memory.files.saveFailed"))}}async function Z(t,s){let r=await O.mutateAsync({memoryStoreName:e,scope:o,path:t,content:s,view:"full"});N({type:"select",path:(0,P.normalizeFileMemoryPath)(r.path)}),c.toast.success(b("memory.files.createSuccess"))}async function X(t){if(!j.selectedPath||!j.loadedItemId||!j.loadedVersionId)return;let s=await A.mutateAsync({memoryStoreName:e,scope:o,itemId:j.loadedItemId,path:t,precondition:{expectedVersionId:j.loadedVersionId},view:"full"});N({type:"select",path:(0,P.normalizeFileMemoryPath)(s.path)}),c.toast.success(b("memory.files.renameSuccess"))}async function Y(){j.loadedItemId&&j.loadedVersionId&&(await z.mutateAsync({memoryStoreName:e,scope:o,itemId:j.loadedItemId,precondition:{expectedVersionId:j.loadedVersionId}}),N({type:"select",path:null}),c.toast.success(b("memory.files.deleteSuccess")))}async function ee(){await R.refetch(),j.selectedPath&&await E.refetch()}(0,s.useEffect)(()=>{let e=E.data;e&&!j.dirty&&j.selectedPath&&null===j.loadedItemId&&N({type:"load",path:(0,P.normalizeFileMemoryPath)(e.path),content:e.content??"",itemId:e.itemId,versionId:e.latestVersionId})},[j.dirty,j.loadedItemId,j.selectedPath,E.data,E.data?.content,E.data?.contentSha256,E.data?.itemId,E.data?.latestVersionId,E.data?.path]);let et=O.isPending||A.isPending||z.isPending;return(0,t.jsxs)("div",{className:(0,p.cn)("flex min-h-[440px] flex-col overflow-hidden rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--card))]",v),children:[(0,t.jsx)(B,{readOnly:J,loading:R.isLoading||R.isRefetching,hasSelection:!!j.selectedPath,dirty:j.dirty,saving:A.isPending,onCreate:()=>L("create"),onRename:()=>L("rename"),onDelete:()=>L("delete"),onRefresh:()=>void ee(),onSave:()=>void W()}),J?(0,t.jsx)("div",{className:"border-b border-blue-500/20 bg-blue-500/10 px-3 py-2 text-xs text-blue-800 dark:text-blue-200",children:b("memory.files.readOnlyGuidance")}):null,(0,t.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-1 lg:grid-cols-[250px_minmax(320px,1fr)_290px]",children:[(0,t.jsxs)("aside",{className:"flex min-h-0 flex-col border-b border-[hsl(var(--border))] lg:border-r lg:border-b-0",children:[(0,t.jsxs)("div",{className:"border-b border-[hsl(var(--border))] p-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(d.Search,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(u.Input,{value:C,onChange:e=>M(e.target.value),placeholder:b("memory.files.searchPlaceholder"),className:"h-7 pl-8 text-xs"})]}),(0,t.jsx)("p",{className:"mt-1.5 px-1 text-[10px] text-muted-foreground",children:b("memory.files.fileCount",{count:$.length})})]}),(0,t.jsxs)("div",{className:"min-h-[160px] flex-1 overflow-auto p-1.5",children:[R.isLoading?(0,t.jsx)("p",{className:"p-2 text-xs text-muted-foreground",children:b("common.loading")}):R.isError?(0,t.jsx)("p",{className:"p-2 text-xs text-[hsl(var(--destructive))]",children:R.error.message}):0===Q.length?(0,t.jsx)("p",{className:"p-3 text-center text-xs text-muted-foreground",children:b("memory.files.emptyHint")}):Q.map(({node:e,depth:s})=>{let o={paddingLeft:`${12*s+6}px`};if("dir"===e.type){let s=!k.has(e.rel);return(0,t.jsxs)("button",{type:"button",onClick:()=>{var t;return t=e.rel,void S(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},style:o,className:"flex w-full items-center gap-1 rounded px-1.5 py-1.5 text-left text-xs hover:bg-[hsl(var(--accent))]",children:[s?(0,t.jsx)(r.ChevronDown,{className:"h-3 w-3"}):(0,t.jsx)(a.ChevronRight,{className:"h-3 w-3"}),s?(0,t.jsx)(l.FolderOpen,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}):(0,t.jsx)(i.Folder,{className:"h-3.5 w-3.5 text-[hsl(var(--primary))]"}),(0,t.jsx)("span",{className:"truncate font-mono",children:e.name})]},`dir:${e.rel}`)}let d=(0,P.normalizeFileMemoryPath)(e.rel);return(0,t.jsxs)("button",{type:"button",onClick:()=>{q(j,d,()=>window.confirm(b("memory.files.discardChanges")))&&N({type:"select",path:d})},style:o,className:(0,p.cn)("flex w-full items-center gap-1.5 rounded px-1.5 py-1.5 text-left text-xs hover:bg-[hsl(var(--accent))]",j.selectedPath===d&&"bg-[hsl(var(--primary-soft))] text-[hsl(var(--primary))]"),title:d,children:[(0,t.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,t.jsx)(n.FileText,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate font-mono",children:e.name})]},`file:${d}`)}),R.hasNextPage?(0,t.jsx)(m.Button,{type:"button",size:"sm",variant:"ghost",className:"mt-2 w-full",disabled:R.isFetchingNextPage,onClick:()=>void R.fetchNextPage(),children:b("memory.files.loadMore")}):null]})]}),(0,t.jsx)("main",{className:"min-h-[280px] border-b border-[hsl(var(--border))] lg:border-r lg:border-b-0",children:(0,t.jsx)(P.FileEditor,{path:j.selectedPath,content:j.content,dirty:j.dirty,readOnly:J,loading:E.isLoading,error:E.error instanceof Error?E.error.message:void 0,conflict:j.conflict,onChange:e=>N({type:"edit",content:e})})}),(0,t.jsx)("aside",{className:"min-h-[220px]",children:(0,t.jsx)(T,{memoryStoreName:e,scope:o,file:G,readOnly:J,onRestored:(e,t)=>N({type:"load",path:(0,P.normalizeFileMemoryPath)(e.path),content:t,itemId:e.itemId,versionId:e.latestVersionId})})})]}),(0,t.jsx)(D,{mode:F,selectedPath:j.selectedPath,pending:et,onClose:()=>L(null),onCreate:Z,onRename:X,onDelete:Y})]})}],949456)},700144,e=>{"use strict";var t=e.i(44501),s=e.i(101685),r=e.i(465581),a=e.i(568432),n=e.i(979980),i=e.i(377163),l=e.i(229025),o=e.i(358204),d=e.i(396416),c=e.i(187014),m=e.i(942595),u=e.i(723888),h=e.i(323516),x=e.i(12251),p=e.i(431592),f=e.i(831211),y=e.i(12122),g=e.i(543876),v=e.i(164204),b=e.i(247570),j=e.i(307166),N=e.i(137500),I=e.i(712984),w=e.i(65958),k=e.i(481015),S=e.i(828772);function C(e,t){return`tsagent.fileScopes.v1:${JSON.stringify([e,t])}`}function T(e){return!e||[e.appId,e.tenantId,e.agentId,e.runId].some(e=>"string"!=typeof e||!e.trim()||"*"===e.trim())?null:{appId:e.appId.trim(),tenantId:e.tenantId.trim(),agentId:e.agentId.trim(),runId:e.runId.trim()}}function P(e,t,s){try{let r=e.getItem(C(t,s));if(!r)return[];let a=JSON.parse(r);if(!Array.isArray(a))return[];return a.map(e=>T(e&&"object"==typeof e?e:null)).filter(e=>null!==e).slice(0,10)}catch{return[]}}function M(e,t,s,r){let a=T(r);if(!a)return P(e,t,s);let n=JSON.stringify(a),i=[a,...P(e,t,s).filter(e=>JSON.stringify(e)!==n)].slice(0,10);try{e.setItem(C(t,s),JSON.stringify(i))}catch{}return i}var F=e.i(876490),L=e.i(433253),R=e.i(766476),D=e.i(45123),E=e.i(515793);function O({memoryStoreName:e,scope:r,open:a,onOpenChange:n,onSuccess:i}){let l,o=(l=(0,I.useQueryClient)(),(0,N.useMutation)({mutationFn:e=>(0,v.addMemory)(e),onSuccess:()=>{(0,b.invalidateMemoryQueries)(l)}})),{t:d}=(0,E.useI18n)(),[u,h]=(0,s.useState)(""),[x,p]=(0,s.useState)("");async function f(){try{let t=(0,k.parseJsonObject)(x);if(!u.trim())return void c.toast.error(d("memory.add.textRequired"));await o.mutateAsync({memoryStoreName:e,scope:r,text:u.trim(),metadata:t,sync:!1}),c.toast.success(d("memory.add.processing")),h(""),p(""),n(!1),i?.()}catch(e){c.toast.error(e instanceof Error?e.message:d("memory.add.failed"))}}return(0,t.jsx)(L.Dialog,{open:a,onOpenChange:n,children:(0,t.jsxs)(L.DialogContent,{className:"max-w-xl",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:d("memory.add.title")})}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(R.Label,{children:d("memory.add.textLabel")}),(0,t.jsx)(D.Textarea,{value:u,onChange:e=>h(e.target.value),placeholder:d("memory.add.textPlaceholder"),rows:5})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(R.Label,{children:d("memory.add.metadataLabel")}),(0,t.jsx)(D.Textarea,{value:x,onChange:e=>p(e.target.value),placeholder:'{"source":"dashboard"}',rows:3})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:d("memory.add.hint")})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(m.Button,{variant:"outline",onClick:()=>n(!1),children:d("common.cancel")}),(0,t.jsx)(m.Button,{onClick:f,disabled:o.isPending,children:o.isPending?d("common.submitting"):d("common.submit")})]})]})})}var A=e.i(573581),z=e.i(533153),V=e.i(330363),B=e.i(322740),H=e.i(694904);function K(e){return e.id??e.memoryId??"-"}let q=(0,s.memo)(function({unit:e,actionDisabled:r,disabledTitle:a,viewTitle:n,editTitle:i,deleteTitle:l,onView:o,onEdit:d,onDelete:c,locale:u}){let h=(0,s.useCallback)(()=>o?.(e),[o,e]),x=(0,s.useCallback)(()=>d?.(e),[d,e]),p=(0,s.useCallback)(()=>c?.(e),[c,e]);return(0,t.jsxs)(B.TableRow,{children:[(0,t.jsx)(B.TableCell,{className:"font-mono text-xs",children:K(e)}),(0,t.jsxs)(B.TableCell,{className:"max-w-[420px]",children:[(0,t.jsx)("p",{className:"line-clamp-2 text-sm",children:e.text}),e.search_text&&(0,t.jsx)("p",{className:"mt-1 line-clamp-1 text-xs text-muted-foreground",children:e.search_text})]}),(0,t.jsx)(B.TableCell,{children:e.unit_type??"-"}),(0,t.jsx)(B.TableCell,{children:e.version??"-"}),(0,t.jsx)(B.TableCell,{className:"text-xs text-muted-foreground",children:function(e,t="zh"){return(0,H.formatDateTime)(e,t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}(e.created_at??e.createdAt,u)}),(0,t.jsx)(B.TableCell,{children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"icon",disabled:r,onClick:h,title:r?a:n,children:(0,t.jsx)(A.Eye,{className:"h-4 w-4"})}),(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"icon",disabled:r,onClick:x,title:r?a:i,children:(0,t.jsx)(z.Pencil,{className:"h-4 w-4"})}),(0,t.jsx)(m.Button,{type:"button",variant:"ghost",size:"icon",disabled:r,onClick:p,title:r?a:l,children:(0,t.jsx)(V.Trash2,{className:"h-4 w-4 text-[hsl(var(--destructive))]"})})]})})]})});function $({units:e,readOnly:s=!1,isActionDisabled:r,onView:a,onEdit:n,onDelete:i}){let{t:l,locale:o}=(0,E.useI18n)(),d=l("memory.units.tableCreatedAtHint");return e.length?(0,t.jsx)("div",{className:"rounded-lg border",children:(0,t.jsxs)(B.Table,{children:[(0,t.jsx)(B.TableHeader,{children:(0,t.jsxs)(B.TableRow,{children:[(0,t.jsx)(B.TableHead,{className:"w-[180px]",children:l("memory.units.tableId")}),(0,t.jsx)(B.TableHead,{children:l("memory.units.tableContent")}),(0,t.jsx)(B.TableHead,{className:"w-[140px]",children:l("memory.units.tableType")}),(0,t.jsx)(B.TableHead,{className:"w-[120px]",children:l("memory.units.tableVersion")}),(0,t.jsx)(B.TableHead,{className:"w-[170px]",title:d,children:l("memory.units.tableCreatedAt")}),(0,t.jsx)(B.TableHead,{className:"w-[160px] text-right",children:l("memory.units.tableActions")})]})}),(0,t.jsx)(B.TableBody,{children:e.map((e,d)=>{let c=s||r?.(e)||!1,m=K(e);return(0,t.jsx)(q,{unit:e,actionDisabled:c,disabledTitle:l("memory.units.disabledTitle"),viewTitle:l("memory.units.view"),editTitle:l("common.edit"),deleteTitle:l("common.delete"),onView:a,onEdit:n,onDelete:i,locale:o},"-"===m?d:m)})})]})}):(0,t.jsx)("div",{className:"rounded-lg border border-dashed py-12 text-center text-sm text-muted-foreground",children:l("memory.units.emptyUnits")})}function U({memoryStoreName:e,scope:s,unit:r,open:a,onOpenChange:n}){let i,l=(i=(0,I.useQueryClient)(),(0,N.useMutation)({mutationFn:e=>(0,v.updateMemoryUnit)(e),onSuccess:()=>{(0,b.invalidateMemoryQueries)(i)}})),{t:o}=(0,E.useI18n)(),d=r?K(r):"empty";async function u(t){if(t.preventDefault(),!r)return;let a=K(r);if("-"===a)return void c.toast.error(o("memory.edit.idMissing"));let i=new FormData(t.currentTarget),d=String(i.get("text")??"").trim(),m=String(i.get("metadata")??"");try{await l.mutateAsync({memoryStoreName:e,memoryId:a,scope:s,text:d||void 0,metadata:(0,k.parseJsonObject)(m)}),c.toast.success(o("memory.edit.updateSuccess")),n(!1)}catch(e){c.toast.error(e instanceof Error?e.message:o("memory.edit.updateFailed"))}}return(0,t.jsx)(L.Dialog,{open:a,onOpenChange:n,children:(0,t.jsxs)(L.DialogContent,{className:"max-w-2xl",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:o("memory.edit.title")})}),(0,t.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(R.Label,{children:o("memory.edit.textLabel")}),(0,t.jsx)(D.Textarea,{name:"text",defaultValue:r?.text??"",rows:5})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(R.Label,{children:o("memory.edit.metadataLabel")}),(0,t.jsx)(D.Textarea,{name:"metadata",defaultValue:r?.metadata?JSON.stringify(r.metadata,null,2):"",rows:4})]}),(0,t.jsxs)(L.DialogFooter,{children:[(0,t.jsx)(m.Button,{type:"button",variant:"outline",onClick:()=>n(!1),children:o("common.cancel")}),(0,t.jsx)(m.Button,{type:"submit",disabled:l.isPending,children:l.isPending?o("common.saving"):o("common.save")})]})]},d)]})})}var _=e.i(326042);function Q({label:e,children:s}){return(0,t.jsxs)("div",{className:"grid grid-cols-[120px_1fr] items-start gap-3",children:[(0,t.jsx)("span",{className:"pt-0.5 text-xs font-medium text-muted-foreground",children:e}),(0,t.jsx)("div",{className:"min-w-0 text-sm text-foreground",children:s})]})}function J({memoryStoreName:e,scope:s,unit:r,open:a,onOpenChange:n}){let{t:i}=(0,E.useI18n)(),l=r?K(r):void 0,o=(0,_.useMemoryUnit)(e,l,s,a),d=o.data?.memory;return(0,t.jsx)(L.Dialog,{open:a,onOpenChange:n,children:(0,t.jsxs)(L.DialogContent,{className:"max-w-2xl",children:[(0,t.jsx)(L.DialogHeader,{children:(0,t.jsx)(L.DialogTitle,{children:i("memory.units.detailTitle")})}),r?"-"===l?(0,t.jsx)("p",{className:"text-sm text-destructive",children:i("memory.units.detailMissingId")}):o.isLoading?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Skeleton,{className:"h-4 w-16"}),(0,t.jsx)(f.Skeleton,{className:"h-5 w-64"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(f.Skeleton,{className:"h-4 w-16"}),(0,t.jsx)(f.Skeleton,{className:"h-24 w-full"})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsx)(f.Skeleton,{className:"h-14 w-full"}),(0,t.jsx)(f.Skeleton,{className:"h-14 w-full"}),(0,t.jsx)(f.Skeleton,{className:"h-14 w-full"}),(0,t.jsx)(f.Skeleton,{className:"h-14 w-full"})]})]}):o.isError?(0,t.jsx)("p",{className:"rounded-md bg-destructive/5 p-3 text-sm text-destructive",children:o.error instanceof Error?o.error.message:i("memory.units.detailLoadError")}):d?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Q,{label:"ID",children:(0,t.jsx)("span",{className:"break-all font-mono text-xs",children:d.id??d.memoryId??"-"})}),(0,t.jsx)(Q,{label:i("memory.units.detailContent"),children:(0,t.jsx)("p",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 text-sm",children:d.text})}),d.search_text&&(0,t.jsx)(Q,{label:i("memory.units.detailSearchText"),children:(0,t.jsx)("p",{className:"whitespace-pre-wrap rounded-md bg-muted p-3 text-sm",children:d.search_text})}),(0,t.jsx)(Q,{label:i("memory.units.detailScope"),children:(0,k.formatScope)(d.scope)}),(0,t.jsx)(Q,{label:i("memory.units.detailType"),children:d.unit_type??"-"}),(0,t.jsx)(Q,{label:i("memory.units.detailSalience"),children:d.salience??"-"}),(0,t.jsx)(Q,{label:i("memory.units.detailVersion"),children:d.version??"-"}),d.metadata&&(0,t.jsx)(Q,{label:i("memory.units.detailMetadata"),children:(0,t.jsx)("pre",{className:"overflow-auto rounded-md bg-muted p-3 text-xs",children:JSON.stringify(d.metadata,null,2)})})]}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i("memory.units.detailNotFound")}):null]})})}var G=e.i(949456),W=e.i(579081);let Z=[{key:"appId",label:"app",placeholder:"appPlaceholder"},{key:"tenantId",label:"tenant",placeholder:"tenantPlaceholder"},{key:"agentId",label:"agent",placeholder:"agentPlaceholder"},{key:"runId",label:"run",placeholder:"runPlaceholder"}];function X(e){let t=e=>e&&"*"!==e?e:"";return{appId:t(e.appId),tenantId:t(e.tenantId),agentId:t(e.agentId),runId:t(e.runId)}}function Y({initialScope:e,recentScopes:r,onApply:a}){let{t:n}=(0,E.useI18n)(),[i,o]=(0,s.useState)(()=>X(e)),[d,c]=(0,s.useState)(null),{appId:h,tenantId:x,agentId:p,runId:f}=e;return(0,s.useEffect)(()=>{o(X({appId:h,tenantId:x,agentId:p,runId:f})),c(null)},[p,h,f,x]),(0,t.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))]",children:[(0,t.jsx)("div",{className:"border-b border-[hsl(var(--border))] bg-[hsl(var(--primary-soft))] px-5 py-4",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-[hsl(var(--primary))] text-[hsl(var(--primary-foreground))]",children:(0,t.jsx)(l.FolderTree,{className:"h-5 w-5"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-semibold text-foreground",children:n("memory.files.scopeOnboardingTitle")}),(0,t.jsx)("p",{className:"mt-1 max-w-2xl text-sm text-muted-foreground",children:n("memory.files.scopeOnboardingDescription")})]})]})}),(0,t.jsxs)("form",{onSubmit:function(e){e.preventDefault();let t=T(i);t?(c(null),a(t)):c(n("memory.files.scopeAllRequired"))},className:"space-y-5 p-5",children:[r.length>0?(0,t.jsxs)("section",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground",children:[(0,t.jsx)(W.Clock3,{className:"h-3.5 w-3.5"}),n("memory.files.recentScopes")]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(e=>{let s=[e.appId,e.tenantId,e.agentId,e.runId].join(" / ");return(0,t.jsx)(m.Button,{type:"button",size:"sm",variant:"outline",title:s,onClick:()=>a(e),className:"max-w-full font-mono text-xs",children:(0,t.jsx)("span",{className:"truncate",children:s})},s)})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("memory.files.recentScopesLocalHint")})]}):null,(0,t.jsx)("section",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:Z.map(({key:e,label:s,placeholder:r})=>(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(R.Label,{htmlFor:`file-scope-${e}`,children:n(`memory.scopeField.${s}`)}),(0,t.jsx)(u.Input,{id:`file-scope-${e}`,value:i[e],placeholder:n(`memory.scopeBar.${r}`),onChange:t=>{o(s=>({...s,[e]:t.target.value})),c(null)}})]},e))}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-[hsl(var(--border))] pt-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,t.jsx)(l.FolderTree,{className:"h-4 w-4"}),d?(0,t.jsx)("span",{className:"text-[hsl(var(--destructive))]",children:d}):n("memory.files.scopeIsolationHint")]}),(0,t.jsxs)(m.Button,{type:"submit",children:[(0,t.jsx)(l.FolderTree,{className:"h-4 w-4"}),n("memory.files.setScopeAndEnter")]})]})]})]})}var ee=e.i(593321);function et({viewMode:e,onChange:s,t:r}){let a=[{value:"units",label:r("memory.units.viewUnits"),icon:(0,t.jsx)(i.Database,{className:"h-3.5 w-3.5"})},{value:"files",label:r("memory.units.viewFiles"),icon:(0,t.jsx)(l.FolderTree,{className:"h-3.5 w-3.5"})}];return(0,t.jsx)("div",{className:"inline-flex items-center rounded-md border border-[hsl(var(--border))] p-0.5",children:a.map(r=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(r.value),"aria-pressed":e===r.value,className:(0,F.cn)("inline-flex items-center gap-1.5 rounded px-2.5 py-1 text-xs transition-colors",e===r.value?"bg-[hsl(var(--primary-soft))] font-medium text-[hsl(var(--primary))]":"text-muted-foreground hover:text-foreground"),children:[r.icon,r.label]},r.value))})}function es({usable:e,writable:s,hasAppId:r,memoryStoreName:a,scope:n,recentScopes:i,onApplyScope:o,initialPath:d}){let{t:c}=(0,E.useI18n)();return e?(0,t.jsx)(G.MemoryFilesBrowser,{memoryStoreName:a,scope:n,initialPath:d,className:"h-[calc(100vh-320px)] min-h-[360px]"}):s?(0,t.jsx)(Y,{initialScope:n,recentScopes:i,onApply:o}):(0,t.jsxs)("div",{className:"rounded-lg border border-dashed border-[hsl(var(--border))] bg-[hsl(var(--muted)/0.25)] p-8 text-center",children:[(0,t.jsx)(l.FolderTree,{className:"mx-auto mb-2 h-6 w-6 text-muted-foreground"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:c(r?"memory.units.fileMemoryWildcardHint":"memory.units.fileMemoryAppHint")})]})}e.s(["default",0,function(){let e,{t:i}=(0,E.useI18n)(),l=(0,r.useParams)(),C=(0,r.useRouter)(),F=(0,r.useSearchParams)(),L=(0,j.useDataScopeKey)(),R=decodeURIComponent(l.store),D=F.toString(),A=(0,s.useMemo)(()=>(0,k.buildMemoryScope)(new URLSearchParams(D)),[D]),z=(0,k.hasWildcardScope)(A),V=(0,s.useMemo)(()=>`${A.appId}|${A.tenantId??""}|${A.agentId??""}|${A.runId??""}`,[A.appId,A.tenantId,A.agentId,A.runId]),{data:B}=(0,w.useMemoryStore)(R),H=(0,S.storageModeCapabilities)(B?.storageMode),q=H.files,_=H.writableFiles,Q=F.get("view"),G=F.get("file"),[W,Z]=(0,s.useState)("files"===Q?"files":"units");(0,s.useEffect)(()=>{B&&(H.structured&&"files"!==Q?H.files||Z("units"):Z(H.files?"files":"units"))},[H.files,H.structured,B,Q]);let X=(0,s.useMemo)(()=>T({appId:A.appId,tenantId:A.tenantId,agentId:A.agentId,runId:A.runId}),[A.appId,A.tenantId,A.agentId,A.runId]),Y=!z&&null!==X,[er,ea]=(0,s.useState)([]);(0,s.useEffect)(()=>{_?ea(X?M(window.localStorage,L,R,X):P(window.localStorage,L,R)):ea([])},[L,X,R,_]);let[en,ei]=(0,s.useState)({scopeKey:V,tokenStack:[]}),[el]=(0,s.useState)(20),[eo,ed]=(0,s.useState)(""),[ec,em]=(0,s.useState)(null),[eu,eh]=(0,s.useState)(!1),[ex,ep]=(0,s.useState)({scopeKey:V,open:!1}),[ef,ey]=(0,s.useState)({scopeKey:V,unit:null}),[eg,ev]=(0,s.useState)({scopeKey:V,unit:null}),[eb,ej]=(0,s.useState)({scopeKey:V,unit:null}),eN=en.scopeKey===V?en.tokenStack:[],eI=en.scopeKey===V?en.currentToken:void 0,ew=ex.scopeKey===V&&ex.open,ek=ef.scopeKey===V?ef.unit:null,eS=eg.scopeKey===V?eg.unit:null,eC=eb.scopeKey===V?eb.unit:null,eT=function(e,t,s,r=20){let{context:a,ready:n}=(0,j.useRuntimeContext)();return(0,g.useQuery)({queryKey:b.queryKeys.memoryUnits(a.dataScopeKey,e,t,s,r),queryFn:()=>(0,v.listMemoryUnits)(e,t,{nextToken:s,limit:r}),enabled:n&&!!e&&!!t?.appId,staleTime:3e4})}(R,"units"===W&&A.appId?A:null,eI,el),eP=(e=(0,I.useQueryClient)(),(0,N.useMutation)({mutationFn:e=>(0,v.deleteMemoryUnit)(e),onSuccess:()=>{(0,b.invalidateMemoryQueries)(e)}})),eM=eT.data?.items??[];function eF(e,t){return e.scope?.appId?e.scope:t}function eL(e,t){let s=K(e),r=eF(e,t);return!!r.appId&&!(0,k.hasWildcardScope)(r)&&"-"!==s}let eR=ek?eF(ek,A):A,eD=eS?eF(eS,A):A,eE=eC?eF(eC,A):A;async function eO(){if(!eC)return;let e=K(eC);if("-"===e)return void c.toast.error(i("memory.units.idMissingDelete"));if(!eL(eC,A))return void c.toast.error(i("memory.units.preciseScopeRequiredDelete"));try{await eP.mutateAsync({memoryStoreName:R,memoryId:e,scope:eE}),c.toast.success(i("memory.units.deleteSuccess")),ej({scopeKey:V,unit:null}),eT.refetch()}catch(e){c.toast.error(e instanceof Error?e.message:i("memory.units.deleteFailed"))}}async function eA(){if(!eo.trim())return void c.toast.error(i("memory.units.searchIdRequired"));if(!A.appId)return void c.toast.error(i("memory.units.preciseScopeRequired"));eh(!0);try{let e=await (0,ee.apiGet)(`/api/v1/memory/stores/${encodeURIComponent(R)}/units/${encodeURIComponent(eo.trim())}?${new URLSearchParams({appId:A.appId,...A.tenantId?{tenantId:A.tenantId}:{},...A.agentId?{agentId:A.agentId}:{},...A.runId?{runId:A.runId}:{}}).toString()}`);em(e.memory),c.toast.success(i("memory.units.found"))}catch(e){em(null),c.toast.error(e instanceof Error?e.message:i("memory.units.notFound"))}finally{eh(!1)}}function ez(){ed(""),em(null)}let eV=ec?[ec]:eM;return"units"===W&&eT.isLoading&&!ec?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(f.Skeleton,{className:"h-8 w-48"}),(0,t.jsx)(f.Skeleton,{className:"h-10 w-full"}),(0,t.jsx)(f.Skeleton,{className:"h-64 w-full"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(h.PageHeader,{title:H.structured?i("memory.units.title"):i("memory.detail.tabFiles"),children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[q&&H.structured&&(0,t.jsx)(et,{viewMode:W,onChange:Z,t:i}),"units"===W&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.RefreshButton,{loading:eT.isRefetching,onClick:()=>{eT.refetch(),ez()}}),z?(0,t.jsx)(y.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)(y.Tooltip,{children:[(0,t.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("span",{tabIndex:0,className:"inline-flex",children:(0,t.jsxs)(m.Button,{disabled:!0,className:"pointer-events-none",children:[(0,t.jsx)(o.Plus,{className:"mr-2 h-4 w-4"}),i("memory.units.addMemory")]})})}),(0,t.jsx)(y.TooltipContent,{side:"bottom",className:"max-w-[240px]",children:(0,t.jsx)("p",{children:i("memory.units.addWildcardHint")})})]})}):(0,t.jsxs)(m.Button,{onClick:()=>ep({scopeKey:V,open:!0}),children:[(0,t.jsx)(o.Plus,{className:"mr-2 h-4 w-4"}),i("memory.units.addMemory")]})]})]})}),"files"===W?(0,t.jsx)(es,{usable:Y,writable:_,hasAppId:!!A.appId&&"*"!==A.appId,memoryStoreName:R,scope:X??{appId:A.appId??"",tenantId:A.tenantId??"",agentId:A.agentId??"",runId:A.runId??""},recentScopes:er,onApplyScope:function(e){var t;let s;ea(M(window.localStorage,L,R,e));let r=(t=new URLSearchParams(D),(s=new URLSearchParams(t)).set("view","files"),s.set("appId",e.appId),s.set("tenantId",e.tenantId),s.set("agentId",e.agentId),s.set("runId",e.runId),s.delete("file"),s);C.replace(`/memory/${encodeURIComponent(R)}/units?${r.toString()}`)},initialPath:G}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(u.Input,{value:eo,onChange:e=>ed(e.target.value),placeholder:i("memory.units.searchIdPlaceholder"),className:"max-w-md",onKeyDown:e=>"Enter"===e.key&&eA()}),(0,t.jsxs)(m.Button,{onClick:eA,disabled:eu||!A.appId,children:[(0,t.jsx)(d.Search,{className:"mr-1.5 h-4 w-4"}),eu?i("memory.units.querying"):i("memory.units.query")]}),ec&&(0,t.jsx)(m.Button,{variant:"outline",onClick:ez,children:i("memory.units.backToList")})]}),z&&!ec&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:i("memory.units.wildcardReadOnly")}),(0,t.jsx)($,{units:eV,readOnly:!!ec,isActionDisabled:e=>!!ec||!eL(e,A),onView:e=>ey({scopeKey:V,unit:e}),onEdit:e=>ev({scopeKey:V,unit:e}),onDelete:e=>ej({scopeKey:V,unit:e})}),!ec&&(0,t.jsxs)("div",{className:"flex items-center justify-between py-2",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:i("memory.units.page",{page:eN.length+1})}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)(m.Button,{variant:"outline",size:"sm",onClick:()=>{ei(e=>{let t=[...e.scopeKey===V?e.tokenStack:[]],s=t.pop();return{scopeKey:V,tokenStack:t,currentToken:s||void 0}})},disabled:0===eN.length,children:[(0,t.jsx)(a.ChevronLeft,{className:"mr-1 h-4 w-4"}),i("common.prevPage")]}),(0,t.jsxs)(m.Button,{variant:"outline",size:"sm",onClick:()=>{eT.data?.nextToken&&ei(e=>({scopeKey:V,tokenStack:[...e.scopeKey===V?e.tokenStack:[],eI??""],currentToken:eT.data.nextToken}))},disabled:!eT.data?.nextToken,children:[i("common.nextPage"),(0,t.jsx)(n.ChevronRight,{className:"ml-1 h-4 w-4"})]})]})]})]}),(0,t.jsx)(O,{memoryStoreName:R,scope:A,open:ew,onOpenChange:e=>ep({scopeKey:V,open:e}),onSuccess:()=>{eT.refetch(),ez()}}),(0,t.jsx)(J,{memoryStoreName:R,scope:eR,unit:ek,open:!!ek&&eL(ek,A),onOpenChange:e=>{e||ey({scopeKey:V,unit:null})}}),(0,t.jsx)(U,{memoryStoreName:R,scope:eD,unit:eS,open:!!eS&&eL(eS,A),onOpenChange:e=>{e||ev({scopeKey:V,unit:null})}}),(0,t.jsx)(x.ConfirmDialog,{open:!!eC&&eL(eC,A),onOpenChange:e=>{e||ej({scopeKey:V,unit:null})},title:i("memory.units.deleteTitle"),description:i("memory.units.deleteConfirm",{id:eC?K(eC):""}),variant:"danger",onConfirm:eO})]})}],700144)}]);
@@ -1,9 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,338309,e=>{"use strict";var s=e.i(44501),a=e.i(101685),t=e.i(736664),i=e.i(358204),r=e.i(801685);let n=(0,r.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var l=e.i(942595),c=e.i(831211),o=e.i(799877),d=e.i(323516),m=e.i(187014),u=e.i(192988);let p=(0,r.default)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);var x=e.i(51517);let y=(0,r.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);var h=e.i(330363),j=e.i(322740),g=e.i(162769),N=e.i(666458),v=e.i(490314),f=e.i(515793),b=e.i(137500),K=e.i(712984),C=e.i(593321);async function w(){return(await (0,C.apiGet)("/api/v1/api-keys")).apiKeys}async function k(e){let s={};return e?.serviceCredentialName&&(s.serviceCredentialName=e.serviceCredentialName),e?.credentialAgeDays&&e.credentialAgeDays>0&&(s.credentialAgeDays=e.credentialAgeDays),(await (0,C.apiPost)("/api/v1/api-keys",Object.keys(s).length>0?s:void 0)).apiKey}async function S(e){await (0,C.apiDelete)(`/api/v1/api-keys/${encodeURIComponent(e.serviceCredentialId)}`,{userPrincipalName:e.userPrincipalName,deleteCustomPolicy:e.deleteCustomPolicy??!0,deleteRamUser:e.deleteRamUser??!0})}async function I(e){await (0,C.apiPatch)(`/api/v1/api-keys/${encodeURIComponent(e.serviceCredentialId)}`,{userPrincipalName:e.userPrincipalName,status:e.status})}async function T(e,s){return(await (0,C.apiGet)(`/api/v1/api-keys/${encodeURIComponent(e)}/policies?userName=${encodeURIComponent(s)}`)).policies}async function D(e,s){await (0,C.apiPost)(`/api/v1/api-keys/${encodeURIComponent(e)}/policies`,s)}async function P(e,s){await (0,C.apiDelete)(`/api/v1/api-keys/${encodeURIComponent(e)}/policies`,s)}async function A(e,s){return(0,C.apiGet)(`/api/v1/api-keys/${encodeURIComponent(e)}/custom-policy?userName=${encodeURIComponent(s)}`)}async function B(e,s){await (0,C.apiPut)(`/api/v1/api-keys/${encodeURIComponent(e)}/custom-policy`,s)}async function M(e,s){return(0,C.apiGet)(`/api/v1/api-keys/${encodeURIComponent(e)}/effective-permissions?userName=${encodeURIComponent(s)}`)}async function R(e){let s=new URLSearchParams({resourceType:e.resourceType,resourceName:e.resourceName,operationGroup:e.operationGroup});return(0,C.apiGet)(`/api/v1/api-keys/filter-by-permission?${s.toString()}`)}async function L(e,s){await (0,C.apiDelete)(`/api/v1/api-keys/${encodeURIComponent(e)}/custom-policy`,s)}var F=e.i(247570),O=e.i(543876),$=e.i(307166);function U(e,s){let{context:a,ready:t}=(0,$.useRuntimeContext)();return(0,O.useQuery)({queryKey:F.queryKeys.effectivePermissions(a.dataScopeKey,e??""),queryFn:()=>M(e,s),enabled:t&&!!e&&!!s,staleTime:15e3})}function E({apiKeys:e,onDelete:a,onDetail:t}){let{t:i}=(0,f.useI18n)();return(0,s.jsx)("div",{className:"rounded-lg border border-[hsl(var(--border))]",children:(0,s.jsxs)(j.Table,{children:[(0,s.jsx)(j.TableHeader,{children:(0,s.jsxs)(j.TableRow,{children:[(0,s.jsx)(j.TableHead,{children:i("apiKeys.table.credentialName")}),(0,s.jsx)(j.TableHead,{className:"w-[8rem]",children:i("apiKeys.table.status")}),(0,s.jsx)(j.TableHead,{children:i("apiKeys.table.accessibleKnowledgeBase")}),(0,s.jsx)(j.TableHead,{children:i("apiKeys.table.accessibleMemoryStore")}),(0,s.jsx)(j.TableHead,{className:"w-[10rem]",children:i("apiKeys.table.createdAt")}),(0,s.jsx)(j.TableHead,{className:"w-[11rem] text-right",children:i("apiKeys.table.actions")})]})}),(0,s.jsx)(j.TableBody,{children:e.map(e=>(0,s.jsx)(Q,{apiKey:e,onDelete:a,onDetail:t},e.serviceCredentialId))})]})})}function Q({apiKey:e,onDelete:t,onDetail:i}){let r,{t:n}=(0,f.useI18n)(),c=(r=(0,K.useQueryClient)(),(0,b.useMutation)({mutationFn:e=>I(e),onSuccess:()=>{(0,F.invalidateApiKeyQueries)(r)}})),[o,d]=(0,a.useState)(null),u=o??"Active"===e.status,p=Number.isFinite(Date.parse(e.createTime))?Date.parse(e.createTime):null;async function N(s){d(s);try{await c.mutateAsync({serviceCredentialId:e.serviceCredentialId,userPrincipalName:e.userPrincipalName,status:s?"Active":"Inactive"}),m.toast.success(s?n("apiKeys.table.enabled"):n("apiKeys.table.disabled"))}catch(e){d(null),m.toast.error(e instanceof Error?e.message:n("apiKeys.table.operationFailed"))}}return(0,s.jsxs)(j.TableRow,{className:"cursor-pointer",onClick:()=>i(e),children:[(0,s.jsx)(j.TableCell,{children:(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-foreground",children:e.serviceCredentialName}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e.userPrincipalName})]})}),(0,s.jsx)(j.TableCell,{onClick:e=>e.stopPropagation(),children:(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(g.Switch,{checked:u,onCheckedChange:N,disabled:c.isPending,"aria-label":u?n("apiKeys.table.disable"):n("apiKeys.table.enable")}),(0,s.jsx)("span",{className:u?"text-xs font-medium text-success":"text-xs font-medium text-muted-foreground",children:c.isPending?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,s.jsx)(x.Loader2,{className:"h-3 w-3 animate-spin"}),n("apiKeys.table.toggling")]}):u?n("apiKeys.table.statusActive"):n("apiKeys.table.statusInactive")})]})}),(0,s.jsx)(j.TableCell,{onClick:e=>e.stopPropagation(),children:(0,s.jsx)(H,{serviceCredentialId:e.serviceCredentialId,userName:e.userPrincipalName,resourceType:"knowledgebase"})}),(0,s.jsx)(j.TableCell,{onClick:e=>e.stopPropagation(),children:(0,s.jsx)(H,{serviceCredentialId:e.serviceCredentialId,userName:e.userPrincipalName,resourceType:"memorystore"})}),(0,s.jsx)(j.TableCell,{children:p?(0,s.jsx)(v.RelativeTime,{timestamp:p}):(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"})}),(0,s.jsxs)(j.TableCell,{className:"text-right",children:[(0,s.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-8",onClick:s=>{s.stopPropagation(),i(e)},children:[(0,s.jsx)(y,{className:"mr-1 h-3.5 w-3.5"}),n("apiKeys.table.permission")]}),(0,s.jsxs)(l.Button,{variant:"ghost",size:"sm",className:`h-8 text-[hsl(var(--destructive))] hover:bg-[hsl(var(--destructive))/0.08] hover:text-[hsl(var(--destructive))] ${u?"opacity-50 cursor-not-allowed":""}`,onClick:s=>{s.stopPropagation(),u?m.toast.info(n("apiKeys.table.disableBeforeDelete")):t(e)},children:[(0,s.jsx)(h.Trash2,{className:"mr-1 h-3.5 w-3.5"}),n("common.delete")]})]})]})}function H({serviceCredentialId:e,userName:a,resourceType:t}){let{t:i}=(0,f.useI18n)(),{data:r,isLoading:n,isError:l}=U(e,a);if(n)return(0,s.jsx)(x.Loader2,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"});if(l)return(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"});let c=(r?.resources?.filter(e=>e.resourceType===t)??[]).filter(e=>e.permissions.read||e.permissions.write||e.permissions.manage);if(0===c.length)return(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:i("apiKeys.table.none")});let o="knowledgebase"===t?u.BookOpen:p;return(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:c.map(e=>(0,s.jsxs)(N.Badge,{variant:"secondary",className:"gap-1 text-[11px] font-normal",children:[(0,s.jsx)(o,{className:"h-3 w-3"}),e.resourceName]},e.resourceName))})}var q=e.i(309823),z=e.i(723888),G=e.i(766476),V=e.i(433253);function W({open:e,onOpenChange:t,onCreated:i}){let r,{t:n}=(0,f.useI18n)(),c=(r=(0,K.useQueryClient)(),(0,b.useMutation)({mutationFn:e=>k(e),onSuccess:()=>{(0,F.invalidateApiKeyQueries)(r)}})),[o,d]=(0,a.useState)(""),[u,p]=(0,a.useState)("");async function x(){let e=o.trim();if(!e)return void m.toast.error(n("apiKeys.create.nameRequired"));let s=u?Number(u):void 0;if(void 0!==s&&(s<1||s>365||!Number.isInteger(s)))return void m.toast.error(n("apiKeys.create.ageDaysInvalid"));try{let a=await c.mutateAsync({serviceCredentialName:e,credentialAgeDays:s});t(!1),i(a)}catch(e){m.toast.error(e instanceof Error?e.message:n("apiKeys.create.createFailed"))}}return(0,a.useEffect)(()=>{e&&(d("ots_apikey_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6)),p(""))},[e]),(0,s.jsx)(V.Dialog,{open:e,onOpenChange:e=>{t(e)},children:(0,s.jsxs)(V.DialogContent,{className:"sm:max-w-md",children:[(0,s.jsx)(V.DialogHeader,{children:(0,s.jsx)(V.DialogTitle,{className:"text-xl",children:n("apiKeys.create.title")})}),(0,s.jsxs)("div",{className:"space-y-3 py-1 text-sm leading-relaxed text-muted-foreground",children:[(0,s.jsxs)("p",{children:[n("apiKeys.create.introPrefix"),(0,s.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground",children:"ots.aliyuncs.com"}),n("apiKeys.create.introSuffix")]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-foreground",children:n("apiKeys.create.credentialName")}),(0,s.jsx)(z.Input,{value:o,onChange:e=>d(e.target.value),placeholder:n("apiKeys.create.credentialNamePlaceholder"),className:"h-9"}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:n("apiKeys.create.credentialNameHelp")})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-foreground",children:n("apiKeys.create.ageDays")}),(0,s.jsx)(z.Input,{type:"number",min:1,max:365,value:u,onChange:e=>p(e.target.value),placeholder:n("apiKeys.create.ageDaysPlaceholder"),className:"h-9"}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:n("apiKeys.create.ageDaysHelp")})]}),(0,s.jsx)("div",{className:"rounded-md border border-[hsl(var(--warning))/0.5] bg-[hsl(var(--warning))/0.08] px-4 py-3 text-sm",children:(0,s.jsxs)("p",{className:"text-foreground",children:[(0,s.jsx)(q.AlertTriangle,{className:"mr-1 -mt-0.5 inline h-4 w-4 text-warning"}),n("apiKeys.create.secretWarning")]})})]}),(0,s.jsxs)(V.DialogFooter,{children:[(0,s.jsx)(l.Button,{variant:"outline",onClick:()=>t(!1),disabled:c.isPending,children:n("common.cancel")}),(0,s.jsx)(l.Button,{onClick:x,disabled:c.isPending,children:c.isPending?n("common.creating"):n("apiKeys.create.confirm")})]})]})})}var _=e.i(663630);function X({apiKey:e,open:t,onOpenChange:i}){let r,{t:n}=(0,f.useI18n)(),c=(r=(0,K.useQueryClient)(),(0,b.useMutation)({mutationFn:e=>S(e),onSuccess:()=>{(0,F.invalidateApiKeyQueries)(r)}})),[o,d]=(0,a.useState)(!0),[u,p]=(0,a.useState)(!0);async function x(){if(e)try{await c.mutateAsync({serviceCredentialId:e.serviceCredentialId,userPrincipalName:e.userPrincipalName,deleteCustomPolicy:o,deleteRamUser:u}),m.toast.success(n("apiKeys.delete.deleteSuccess")),i(!1)}catch(e){m.toast.error(e instanceof Error?e.message:n("apiKeys.delete.deleteFailed"))}}return(0,a.useEffect)(()=>{t&&(d(!0),p(!0))},[t]),(0,s.jsx)(V.Dialog,{open:t,onOpenChange:i,children:(0,s.jsxs)(V.DialogContent,{className:"sm:max-w-md",children:[(0,s.jsx)(V.DialogHeader,{children:(0,s.jsx)(V.DialogTitle,{className:"text-xl",children:n("apiKeys.delete.title")})}),(0,s.jsxs)("div",{className:"rounded-md border border-[hsl(var(--destructive))] bg-[hsl(var(--destructive))/0.06] px-4 py-3 text-sm leading-relaxed",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)(q.AlertTriangle,{className:"mr-1 -mt-0.5 inline h-4 w-4 text-destructive"}),n("apiKeys.delete.warning")]}),e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"mt-3",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:n("apiKeys.delete.credentialNameLabel")}),(0,s.jsx)("code",{className:"font-mono text-xs",children:e.serviceCredentialName})]}),"Active"===e.status?(0,s.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:n("apiKeys.delete.activeHint")}):null]}):null]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:n("apiKeys.delete.cleanupHint")}),(0,s.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,s.jsx)(_.Checkbox,{checked:o,onCheckedChange:e=>d(!!e),className:"mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(G.Label,{className:"text-sm cursor-pointer",children:n("apiKeys.delete.deleteCustomPolicy")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:n("apiKeys.delete.deleteCustomPolicyDesc")})]})]}),(0,s.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,s.jsx)(_.Checkbox,{checked:u,onCheckedChange:e=>p(!!e),className:"mt-0.5"}),(0,s.jsxs)("div",{children:[(0,s.jsx)(G.Label,{className:"text-sm cursor-pointer",children:n("apiKeys.delete.deleteRamUser")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:n("apiKeys.delete.deleteRamUserDesc")})]})]})]}),(0,s.jsxs)(V.DialogFooter,{children:[(0,s.jsx)(l.Button,{variant:"outline",onClick:()=>i(!1),disabled:c.isPending,children:n("common.cancel")}),(0,s.jsx)(l.Button,{variant:"destructive",disabled:c.isPending,onClick:x,children:c.isPending?n("common.deleting"):n("apiKeys.delete.confirm")})]})]})})}var Z=e.i(882652),J=e.i(103343),Y=e.i(144308);async function ee(e){if(navigator.clipboard&&window.isSecureContext)return void await navigator.clipboard.writeText(e);let s=document.createElement("textarea");s.value=e,s.style.position="fixed",s.style.opacity="0",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}function es(){let e=(0,K.useQueryClient)();return(0,b.useMutation)({mutationFn:e=>D(e.serviceCredentialId,{userName:e.userName,policyName:e.policyName,policyType:e.policyType}),onSuccess:()=>{(0,F.invalidateApiKeyPolicyQueries)(e),(0,F.invalidateEffectivePermissionsQueries)(e)}})}function ea(){let e=(0,K.useQueryClient)();return(0,b.useMutation)({mutationFn:e=>P(e.serviceCredentialId,{userName:e.userName,policyName:e.policyName,policyType:e.policyType}),onSuccess:()=>{(0,F.invalidateApiKeyPolicyQueries)(e),(0,F.invalidateEffectivePermissionsQueries)(e)}})}let et="ts-ots-bearer-token-access";function ei({serviceCredentialId:e,userName:t,policies:i}){let{t:r}=(0,f.useI18n)(),n=es(),l=ea(),[c,o]=(0,a.useState)(!1),d=i?.some(e=>e.policyName===et)??!1;async function u(s){o(!0);try{s?(await n.mutateAsync({serviceCredentialId:e,userName:t,policyName:et,policyType:"Custom"}),m.toast.success(r("apiKeys.bearer.enableSuccess"))):(await l.mutateAsync({serviceCredentialId:e,userName:t,policyName:et,policyType:"Custom"}),m.toast.success(r("apiKeys.bearer.disableSuccess")))}catch(e){m.toast.error(e instanceof Error?e.message:r("apiKeys.bearer.operationFailed"))}finally{o(!1)}}return(0,s.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-[hsl(var(--border))] px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"space-y-0.5",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:r("apiKeys.bearer.title")}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:r("apiKeys.bearer.description")})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 shrink-0 ml-3",children:[c?(0,s.jsx)(x.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"}):null,(0,s.jsx)(g.Switch,{checked:d,onCheckedChange:u,disabled:c||!i})]})]})}var er=e.i(18722),en=e.i(533153),el=e.i(843226),ec=e.i(166473),eo=e.i(247932),ed=e.i(754614),em=e.i(164204);let eu=["ots:DescribeKnowledgeBase","ots:ListKnowledgeBase","ots:GetDocument","ots:ListDocuments","ots:ListChunks","ots:Retrieve"],ep=["ots:AddDocuments","ots:UpdateDocument","ots:UpdateChunks","ots:DeleteDocuments","ots:UploadDocuments"],ex=["ots:CreateKnowledgeBase","ots:DeleteKnowledgeBase","ots:UpdateKnowledgeBase"],ey=["ots:GetMemoryStore","ots:ListMemoryStores","ots:SearchMemories","ots:ListMemories","ots:GetMemory","ots:ListMemoryStoreMessages","ots:ListMemoryStoreRequests","ots:ListMemoryStoreScopes","ots:GetMemoryTask","ots:ListMemoryTasks","ots:GetMemoryDreamTask","ots:ListMemoryDreamTasks","ots:ListMemoryDreamActions"],eh=["ots:AddMemories","ots:UpdateMemory","ots:DeleteMemory","ots:ApplyMemoryDreamActions","ots:CreateMemoryDreamTask","ots:CancelMemoryDreamTask"],ej=["ots:CreateMemoryStore","ots:DeleteMemoryStore","ots:UpdateMemoryStore"];function eg(e,s){return"knowledgebase"===e?"read"===s?eu:"write"===s?ep:ex:"read"===s?ey:"write"===s?eh:ej}[...eu,...ep,...ex],[...ey,...eh,...ej];let eN={read:"apiKeys.operations.read",write:"apiKeys.operations.write",manage:"apiKeys.operations.manage"},ev={knowledgebase:{read:"apiKeys.operations.knowledgeBaseReadDesc",write:"apiKeys.operations.knowledgeBaseWriteDesc",manage:"apiKeys.operations.knowledgeBaseManageDesc"},memorystore:{read:"apiKeys.operations.memoryStoreReadDesc",write:"apiKeys.operations.memoryStoreWriteDesc",manage:"apiKeys.operations.memoryStoreManageDesc"}};function ef(e){return[e.appId??"",e.tenantId??"",e.agentId??"",e.runId??""].join("|")}function eb({open:e,onOpenChange:t,onSave:i,initial:r}){let{t:n}=(0,f.useI18n)(),[c,o]=(0,a.useState)(r?.resourceType??"knowledgebase"),[d,m]=(0,a.useState)(r?.resourceName??"*"),[p,y]=(0,a.useState)(new Set(r?.operationGroups??["read"])),[h,j]=(0,a.useState)(r?.scope??{}),[g,N]=(0,a.useState)(r?.condition?.sourceIp?.join(", ")??""),[v,b]=(0,a.useState)(!!(r?.scope&&(r.scope.appId||r.scope.tenantId||r.scope.agentId||r.scope.runId))),[K,C]=(0,a.useState)("manual"),{data:w}=(0,eo.useKnowledgeBases)(),{data:k}=(0,ed.useMemoryStores)(),S=e&&"memorystore"===c&&"*"!==d&&v,{data:I,isLoading:T}=(0,O.useQuery)({queryKey:["memory-store-scopes-for-rule",d],queryFn:()=>(0,em.listMemoryStoreScopesUnfiltered)(d),enabled:S,staleTime:3e4}),D=I?.items??[];(0,a.useEffect)(()=>{e&&(o(r?.resourceType??"knowledgebase"),m(r?.resourceName??"*"),y(new Set(r?.operationGroups??["read"])),j(r?.scope??{}),N(r?.condition?.sourceIp?.join(", ")??""),b(!!(r?.scope&&(r.scope.appId||r.scope.tenantId||r.scope.agentId||r.scope.runId))),C("manual"))},[e,r]);let P="knowledgebase"===c?(w?.items??[]).map(e=>e.knowledgeBaseName):(k?.items??[]).map(e=>e.memoryStoreName);return(0,s.jsx)(V.Dialog,{open:e,onOpenChange:t,children:(0,s.jsxs)(V.DialogContent,{className:"sm:max-w-lg max-h-[85vh] overflow-y-auto",children:[(0,s.jsx)(V.DialogHeader,{children:(0,s.jsx)(V.DialogTitle,{children:r?n("apiKeys.rule.editTitle"):n("apiKeys.rule.addTitle")})}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:n("apiKeys.rule.resourceType")}),(0,s.jsxs)(ec.Select,{value:c,onValueChange:e=>{o(e),m("*"),b(!1),j({})},children:[(0,s.jsx)(ec.SelectTrigger,{children:(0,s.jsx)(ec.SelectValue,{})}),(0,s.jsxs)(ec.SelectContent,{children:[(0,s.jsx)(ec.SelectItem,{value:"knowledgebase",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(u.BookOpen,{className:"h-3.5 w-3.5"}),n("common.knowledgeBase")]})}),(0,s.jsx)(ec.SelectItem,{value:"memorystore",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(er.Brain,{className:"h-3.5 w-3.5"}),n("common.memory")]})})]})]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:n("apiKeys.rule.resourceName")}),(0,s.jsxs)(ec.Select,{value:d,onValueChange:e=>{m(e),b(!1),j({})},children:[(0,s.jsx)(ec.SelectTrigger,{children:(0,s.jsx)(ec.SelectValue,{})}),(0,s.jsxs)(ec.SelectContent,{children:[(0,s.jsx)(ec.SelectItem,{value:"*",children:n("apiKeys.rule.allResource",{resource:"knowledgebase"===c?n("common.knowledgeBase"):n("common.memory")})}),P.map(e=>(0,s.jsx)(ec.SelectItem,{value:e,children:e},e))]})]})]}),"memorystore"===c&&"*"!==d&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(_.Checkbox,{checked:v,onCheckedChange:e=>{b(!!e),e||j({})}}),(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:n("apiKeys.rule.scopeConfig")})]}),v&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(l.Button,{variant:"select"===K?"default":"outline",size:"sm",className:"h-7 text-xs",onClick:()=>C("select"),children:n("apiKeys.rule.selectFromExisting")}),(0,s.jsx)(l.Button,{variant:"manual"===K?"default":"outline",size:"sm",className:"h-7 text-xs",onClick:()=>C("manual"),children:n("apiKeys.rule.manualInput")})]}),"select"===K?(0,s.jsx)("div",{className:"rounded-md border border-[hsl(var(--border))] p-3 space-y-1.5",children:T?(0,s.jsxs)("div",{className:"flex items-center gap-2 py-2 text-xs text-muted-foreground",children:[(0,s.jsx)(x.Loader2,{className:"h-3.5 w-3.5 animate-spin"}),n("apiKeys.rule.loadingScopes")]}):0===D.length?(0,s.jsx)("p",{className:"py-2 text-xs text-muted-foreground",children:n("apiKeys.rule.noScopes")}):(0,s.jsx)("div",{className:"max-h-40 overflow-y-auto space-y-1",children:D.map(e=>{let a,t=ef(e),i=ef(h)===t;return(0,s.jsxs)("label",{className:`flex items-center gap-2 rounded px-2 py-1.5 cursor-pointer hover:bg-muted/50 ${i?"bg-muted":""}`,children:[(0,s.jsx)(_.Checkbox,{checked:i,onCheckedChange:()=>{if(i)j({});else j({appId:e.appId||void 0,tenantId:e.tenantId||void 0,agentId:e.agentId||void 0,runId:e.runId||void 0})}}),(0,s.jsx)("span",{className:"text-xs font-mono truncate",children:(a=[],e.appId&&a.push(`app:${e.appId}`),e.tenantId&&a.push(`tenant:${e.tenantId}`),e.agentId&&a.push(`agent:${e.agentId}`),e.runId&&a.push(`run:${e.runId}`),a.join(", "))})]},t)})})}):(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 rounded-md border border-[hsl(var(--border))] p-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(G.Label,{className:"text-[11px] text-muted-foreground",children:"App ID"}),(0,s.jsx)(z.Input,{value:h.appId??"",onChange:e=>j(s=>({...s,appId:e.target.value||void 0})),placeholder:n("apiKeys.rule.optional"),className:"h-8 text-xs"})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(G.Label,{className:"text-[11px] text-muted-foreground",children:"Tenant ID"}),(0,s.jsx)(z.Input,{value:h.tenantId??"",onChange:e=>j(s=>({...s,tenantId:e.target.value||void 0})),placeholder:n("apiKeys.rule.optional"),className:"h-8 text-xs"})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(G.Label,{className:"text-[11px] text-muted-foreground",children:"Agent ID"}),(0,s.jsx)(z.Input,{value:h.agentId??"",onChange:e=>j(s=>({...s,agentId:e.target.value||void 0})),placeholder:n("apiKeys.rule.optional"),className:"h-8 text-xs"})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(G.Label,{className:"text-[11px] text-muted-foreground",children:"Run ID"}),(0,s.jsx)(z.Input,{value:h.runId??"",onChange:e=>j(s=>({...s,runId:e.target.value||void 0})),placeholder:n("apiKeys.rule.optional"),className:"h-8 text-xs"})]})]})]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:n("apiKeys.rule.operationPermission")}),(0,s.jsx)("div",{className:"space-y-2",children:["read","write","manage"].map(e=>{let a;return(0,s.jsxs)("label",{className:"flex items-start gap-2 rounded-md border border-[hsl(var(--border))] px-3 py-2 cursor-pointer hover:bg-muted/30",children:[(0,s.jsx)(_.Checkbox,{checked:p.has(e),onCheckedChange:()=>{y(s=>{let a=new Set(s);return a.has(e)?a.delete(e):a.add(e),a})},className:"mt-0.5"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:n(eN[e])}),(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:(a=ev[c]?.[e])?n(a):null}),(0,s.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground/60",children:eg(c,e).map(e=>e.replace("ots:","")).join(", ")})]})]},e)})})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:n("apiKeys.rule.ipWhitelist")}),(0,s.jsx)(z.Input,{value:g,onChange:e=>N(e.target.value),placeholder:n("apiKeys.rule.ipPlaceholder"),className:"text-xs"}),(0,s.jsx)("p",{className:"text-[11px] text-muted-foreground",children:n("apiKeys.rule.ipHelp")})]})]}),(0,s.jsxs)(V.DialogFooter,{children:[(0,s.jsx)(l.Button,{variant:"outline",onClick:()=>t(!1),children:n("common.cancel")}),(0,s.jsx)(l.Button,{disabled:0===p.size,onClick:function(){var e;let s=Array.from(p),a=function(e,s){let a=[];for(let t of s)a.push(...eg(e,t));return[...new Set(a)]}(c,s),r=g.split(/[,,\s]+/).map(e=>e.trim()).filter(Boolean);i({resourceType:c,resourceName:d,operationGroups:s,actions:a,..."memorystore"===c&&v&&((e=h).appId||e.tenantId||e.agentId||e.runId)?{scope:h}:{},...r.length>0?{condition:{sourceIp:r}}:{}}),t(!1)},children:r?n("apiKeys.rule.saveChanges"):n("apiKeys.rule.add")})]})]})})}let eK={read:"apiKeys.operations.read",write:"apiKeys.operations.write",manage:"apiKeys.operations.manage"};function eC({serviceCredentialId:e,userName:t}){let r,n,{t:o}=(0,f.useI18n)(),{data:d,isLoading:u}=function(e,s){let{context:a,ready:t}=(0,$.useRuntimeContext)();return(0,O.useQuery)({queryKey:F.queryKeys.customPolicy(a.dataScopeKey,e??""),queryFn:()=>A(e,s),enabled:t&&!!e&&!!s,staleTime:15e3})}(e,t),p=(r=(0,K.useQueryClient)(),(0,b.useMutation)({mutationFn:e=>B(e.serviceCredentialId,{userName:e.userName,rules:e.rules}),onSuccess:()=>{(0,F.invalidateCustomPolicyQueries)(r),(0,F.invalidateApiKeyPolicyQueries)(r),(0,F.invalidateEffectivePermissionsQueries)(r)}})),y=(n=(0,K.useQueryClient)(),(0,b.useMutation)({mutationFn:e=>L(e.serviceCredentialId,{userName:e.userName}),onSuccess:()=>{(0,F.invalidateCustomPolicyQueries)(n),(0,F.invalidateApiKeyPolicyQueries)(n),(0,F.invalidateEffectivePermissionsQueries)(n)}})),[j,g]=(0,a.useState)([]),[N,v]=(0,a.useState)(!1),[C,w]=(0,a.useState)(!1),[k,S]=(0,a.useState)(null);async function I(){try{await p.mutateAsync({serviceCredentialId:e,userName:t,rules:j}),v(!1),m.toast.success(o("apiKeys.customPolicy.saveSuccess"))}catch(e){m.toast.error(e instanceof Error?e.message:o("apiKeys.customPolicy.saveFailed"))}}async function T(){try{await y.mutateAsync({serviceCredentialId:e,userName:t}),g([]),v(!1),m.toast.success(o("apiKeys.customPolicy.deleteSuccess"))}catch(e){m.toast.error(e instanceof Error?e.message:o("apiKeys.customPolicy.deleteFailed"))}}return(0,a.useEffect)(()=>{d&&(g(d.rules),v(!1))},[d]),u?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(c.Skeleton,{className:"h-8 w-full"}),(0,s.jsx)(c.Skeleton,{className:"h-8 w-full"})]}):(0,s.jsxs)("div",{className:"space-y-3",children:[0===j.length?(0,s.jsx)("p",{className:"py-3 text-center text-sm text-muted-foreground",children:o("apiKeys.customPolicy.empty")}):(0,s.jsx)("div",{className:"space-y-1.5",children:j.map((e,a)=>(0,s.jsx)(ew,{rule:e,t:o,onEdit:()=>{S(a),w(!0)},onRemove:()=>{g(e=>e.filter((e,s)=>s!==a)),v(!0)}},a))}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)(l.Button,{variant:"outline",size:"sm",className:"h-8",onClick:()=>{S(null),w(!0)},children:[(0,s.jsx)(i.Plus,{className:"mr-1 h-3.5 w-3.5"}),o("apiKeys.customPolicy.addRule")]}),N&&(0,s.jsxs)(l.Button,{size:"sm",className:"h-8",disabled:p.isPending,onClick:I,children:[p.isPending?(0,s.jsx)(x.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(el.Save,{className:"mr-1 h-3.5 w-3.5"}),o("common.save")]}),d&&d.rules.length>0&&(0,s.jsxs)(l.Button,{variant:"ghost",size:"sm",className:"h-8 text-destructive hover:text-destructive",disabled:y.isPending,onClick:T,children:[y.isPending?(0,s.jsx)(x.Loader2,{className:"mr-1 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(h.Trash2,{className:"mr-1 h-3.5 w-3.5"}),o("apiKeys.customPolicy.clearAll")]})]}),(0,s.jsx)(eb,{open:C,onOpenChange:w,onSave:function(e){null!==k?(g(s=>{let a=[...s];return a[k]=e,a}),S(null)):g(s=>[...s,e]),v(!0)},initial:null!==k?j[k]:void 0})]})}function ew({rule:e,t:a,onEdit:t,onRemove:i}){let r="knowledgebase"===e.resourceType?u.BookOpen:er.Brain,n="knowledgebase"===e.resourceType?a("common.knowledgeBase"):a("common.memory"),c="*"===e.resourceName?a("apiKeys.rule.allResource",{resource:n}):e.resourceName,o="";if(e.scope){let s=[];e.scope.appId&&s.push(`app:${e.scope.appId}`),e.scope.tenantId&&s.push(`tenant:${e.scope.tenantId}`),e.scope.agentId&&s.push(`agent:${e.scope.agentId}`),e.scope.runId&&s.push(`run:${e.scope.runId}`),s.length>0&&(o=` (${s.join(", ")})`)}return(0,s.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-[hsl(var(--border))] px-3 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(r,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,s.jsxs)("span",{className:"truncate text-sm font-medium",children:[c,o&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:o})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[e.operationGroups.map(e=>(0,s.jsx)(N.Badge,{variant:"secondary",className:"text-[10px]",children:eK[e]?a(eK[e]):e},e)),e.condition?.sourceIp&&e.condition.sourceIp.length>0&&(0,s.jsx)(N.Badge,{variant:"outline",className:"text-[10px]",children:a("apiKeys.customPolicy.ipLimit")})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[(0,s.jsx)(l.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t,children:(0,s.jsx)(en.Pencil,{className:"h-3.5 w-3.5"})}),(0,s.jsx)(l.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:i,children:(0,s.jsx)(h.Trash2,{className:"h-3.5 w-3.5"})})]})]})}var ek=e.i(506703),eS=e.i(546398);function eI({serviceCredentialId:e,userName:a}){let{t}=(0,f.useI18n)(),{data:i,isLoading:r,error:n}=U(e,a);if(r)return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(c.Skeleton,{className:"h-10 w-full"}),(0,s.jsx)(c.Skeleton,{className:"h-10 w-full"}),(0,s.jsx)(c.Skeleton,{className:"h-10 w-full"})]});if(n)return(0,s.jsx)("p",{className:"py-3 text-center text-sm text-destructive",children:t("apiKeys.overview.loadFailed")});if(!i||0===i.resources.length)return(0,s.jsx)("p",{className:"py-3 text-center text-sm text-muted-foreground",children:t("apiKeys.overview.empty")});let l=i.resources.filter(e=>"knowledgebase"===e.resourceType),o=i.resources.filter(e=>"memorystore"===e.resourceType);return(0,s.jsxs)("div",{className:"space-y-4",children:[l.length>0&&(0,s.jsx)(eT,{icon:(0,s.jsx)(u.BookOpen,{className:"h-3.5 w-3.5"}),label:t("common.knowledgeBase"),resources:l}),o.length>0&&(0,s.jsx)(eT,{icon:(0,s.jsx)(er.Brain,{className:"h-3.5 w-3.5"}),label:t("common.memory"),resources:o})]})}function eT({icon:e,label:a,resources:t}){let{t:i}=(0,f.useI18n)();return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted-foreground",children:[e,a]}),(0,s.jsx)("div",{className:"rounded-md border border-[hsl(var(--border))]",children:(0,s.jsxs)(j.Table,{children:[(0,s.jsx)(j.TableHeader,{children:(0,s.jsxs)(j.TableRow,{children:[(0,s.jsx)(j.TableHead,{className:"text-xs",children:i("apiKeys.overview.name")}),(0,s.jsx)(j.TableHead,{className:"w-16 text-center text-xs",children:i("apiKeys.overview.read")}),(0,s.jsx)(j.TableHead,{className:"w-16 text-center text-xs",children:i("apiKeys.overview.write")}),(0,s.jsx)(j.TableHead,{className:"w-16 text-center text-xs",children:i("apiKeys.overview.manage")})]})}),(0,s.jsx)(j.TableBody,{children:t.map(e=>(0,s.jsxs)(j.TableRow,{children:[(0,s.jsx)(j.TableCell,{className:"py-1.5",children:(0,s.jsx)("code",{className:"font-mono text-xs",children:e.resourceName})}),(0,s.jsx)(j.TableCell,{className:"py-1.5 text-center",children:(0,s.jsx)(eD,{allowed:e.permissions.read})}),(0,s.jsx)(j.TableCell,{className:"py-1.5 text-center",children:(0,s.jsx)(eD,{allowed:e.permissions.write})}),(0,s.jsx)(j.TableCell,{className:"py-1.5 text-center",children:(0,s.jsx)(eD,{allowed:e.permissions.manage})})]},e.resourceName))})]})})]})}function eD({allowed:e}){return e?(0,s.jsx)(ek.Check,{className:"mx-auto h-4 w-4 text-success"}):(0,s.jsx)(eS.X,{className:"mx-auto h-4 w-4 text-muted-foreground/40"})}var eP=e.i(573581),eA=e.i(608984);let eB=["AliyunOTSFullAccess","AliyunOTSReadOnlyAccess","AliyunOTSWriteOnlyAccess"],eM=[{key:"readonly",labelKey:"apiKeys.presets.readonlyLabel",descriptionKey:"apiKeys.presets.readonlyDesc",icon:eP.Eye,attach:["AliyunOTSReadOnlyAccess"]},{key:"full",labelKey:"apiKeys.presets.fullLabel",descriptionKey:"apiKeys.presets.fullDesc",icon:y,attach:["AliyunOTSFullAccess"]}];function eR({serviceCredentialId:e,userName:t,policies:i}){let{t:r}=(0,f.useI18n)(),n=es(),c=ea(),[o,d]=(0,a.useState)(null),u=function(e){if(!e)return null;let s=new Set(e.filter(e=>eB.includes(e.policyName)).map(e=>e.policyName));return s.has("AliyunOTSFullAccess")?"full":s.has("AliyunOTSReadOnlyAccess")&&!s.has("AliyunOTSWriteOnlyAccess")?"readonly":null}(i);async function p(s){if(u===s.key)return void await y();d(s.key);try{let a=(i??[]).filter(e=>eB.includes(e.policyName));for(let i of a)s.attach.includes(i.policyName)||await c.mutateAsync({serviceCredentialId:e,userName:t,policyName:i.policyName,policyType:i.policyType});let l=new Set(a.map(e=>e.policyName));for(let a of s.attach)l.has(a)||await n.mutateAsync({serviceCredentialId:e,userName:t,policyName:a,policyType:"System"});m.toast.success(r("apiKeys.presets.applySuccess",{preset:r(s.labelKey)}))}catch(e){m.toast.error(e instanceof Error?e.message:r("apiKeys.presets.applyFailed"))}finally{d(null)}}async function y(){d("cancel");try{for(let s of(i??[]).filter(e=>eB.includes(e.policyName)))await c.mutateAsync({serviceCredentialId:e,userName:t,policyName:s.policyName,policyType:s.policyType});m.toast.success(r("apiKeys.presets.cancelSuccess"))}catch(e){m.toast.error(e instanceof Error?e.message:r("apiKeys.presets.cancelFailed"))}finally{d(null)}}return(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2",children:eM.map(e=>{let a=u===e.key,t=o===e.key,i=e.icon;return(0,s.jsxs)(l.Button,{variant:"outline",className:`relative flex h-auto flex-col items-center gap-1.5 px-3 py-3 text-center ${a?"border-[hsl(var(--primary))] bg-[hsl(var(--primary))/0.06]":""}`,disabled:null!==o,onClick:()=>p(e),children:[t||"cancel"===o&&a?(0,s.jsx)(x.Loader2,{className:"h-5 w-5 animate-spin text-primary"}):a?(0,s.jsx)(ek.Check,{className:"h-5 w-5 text-primary"}):(0,s.jsx)(i,{className:"h-5 w-5 text-muted-foreground"}),(0,s.jsx)("span",{className:"text-xs font-medium",children:r(e.labelKey)}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground leading-tight",children:r(e.descriptionKey)}),a?(0,s.jsx)(eA.Lock,{className:"absolute right-1.5 top-1.5 h-3 w-3 text-primary"}):null]},e.key)})})}function eL({apiKey:e,onClose:a}){let{t}=(0,f.useI18n)(),i=!!e,{data:r}=function(e,s){let{context:a,ready:t}=(0,$.useRuntimeContext)();return(0,O.useQuery)({queryKey:F.queryKeys.apiKeyPolicies(a.dataScopeKey,e??""),queryFn:()=>T(e,s),enabled:t&&!!e&&!!s,staleTime:15e3})}(e?.serviceCredentialId,e?.userPrincipalName);async function n(e,s){try{await ee(e),m.toast.success(`${t("common.copied")} ${s}`)}catch{m.toast.error(t("common.copyFailed"))}}let c=e&&Number.isFinite(Date.parse(e.createTime))?Date.parse(e.createTime):null;return(0,s.jsx)(Y.Sheet,{open:i,onOpenChange:e=>!e&&a(),children:(0,s.jsxs)(Y.SheetContent,{side:"right",className:"w-full max-w-xl overflow-y-auto",children:[(0,s.jsxs)(Y.SheetHeader,{children:[(0,s.jsx)(Y.SheetTitle,{children:t("apiKeys.detail.title")}),(0,s.jsx)(Y.SheetDescription,{children:t("apiKeys.detail.description")})]}),e?(0,s.jsxs)("div",{className:"space-y-5 mt-2",children:[(0,s.jsxs)("section",{className:"space-y-2.5",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:t("apiKeys.detail.basicInfo")}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(eF,{label:t("apiKeys.detail.credentialId"),children:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("code",{className:"break-all font-mono text-xs",children:e.serviceCredentialId}),(0,s.jsx)(l.Button,{variant:"ghost",size:"icon",className:"h-5 w-5 shrink-0",onClick:()=>n(e.serviceCredentialId,t("apiKeys.detail.credentialId")),children:(0,s.jsx)(Z.Copy,{className:"h-3 w-3"})})]})}),(0,s.jsx)(eF,{label:t("apiKeys.detail.credentialName"),children:(0,s.jsx)("span",{className:"text-sm",children:e.serviceCredentialName})}),(0,s.jsx)(eF,{label:t("apiKeys.detail.status"),children:(0,s.jsx)(N.Badge,{variant:"Active"===e.status?"success":"secondary",children:e.status})}),(0,s.jsx)(eF,{label:t("apiKeys.detail.ramUser"),children:(0,s.jsx)("span",{className:"break-all font-mono text-xs text-muted-foreground",children:e.userPrincipalName})}),(0,s.jsx)(eF,{label:t("apiKeys.detail.createdAt"),children:c?(0,s.jsx)(v.RelativeTime,{timestamp:c}):(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"—"})})]})]}),(0,s.jsx)(J.Separator,{}),(0,s.jsxs)("section",{className:"space-y-2.5",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:t("apiKeys.detail.permissionOverview")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:t("apiKeys.detail.permissionOverviewDesc")}),(0,s.jsx)(eI,{serviceCredentialId:e.serviceCredentialId,userName:e.userPrincipalName})]}),(0,s.jsx)(J.Separator,{}),(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-foreground",children:t("apiKeys.detail.permissionConfig")}),(0,s.jsx)(ei,{serviceCredentialId:e.serviceCredentialId,userName:e.userPrincipalName,policies:r}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsx)("h4",{className:"text-xs font-medium text-foreground",children:t("apiKeys.detail.defaultAuth")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:t("apiKeys.detail.defaultAuthDesc")}),(0,s.jsx)(eR,{serviceCredentialId:e.serviceCredentialId,userName:e.userPrincipalName,policies:r})]}),(0,s.jsxs)("div",{className:"space-y-2.5",children:[(0,s.jsx)("h4",{className:"text-xs font-medium text-foreground",children:t("apiKeys.detail.customAuth")}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:t("apiKeys.detail.customAuthDesc")}),(0,s.jsx)(eC,{serviceCredentialId:e.serviceCredentialId,userName:e.userPrincipalName})]})]})]}):null]})})}function eF({label:e,children:a}){return(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(G.Label,{className:"w-20 shrink-0 pt-0.5 text-xs text-muted-foreground",children:e}),(0,s.jsx)("div",{className:"min-w-0 flex-1",children:a})]})}let eO=(0,r.default)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),e$={read:"apiKeys.operations.read",write:"apiKeys.operations.write",manage:"apiKeys.operations.manage"};function eU({onFilterResults:e}){let{t}=(0,f.useI18n)(),[i,r]=(0,a.useState)(!1),[n,c]=(0,a.useState)("knowledgebase"),[o,d]=(0,a.useState)(""),[m,p]=(0,a.useState)("read"),{data:y}=(0,eo.useKnowledgeBases)(),{data:h}=(0,ed.useMemoryStores)(),j="knowledgebase"===n?(y?.items??[]).map(e=>e.knowledgeBaseName):(h?.items??[]).map(e=>e.memoryStoreName),g=!!o,{data:v,isFetching:b,refetch:K}=(0,O.useQuery)({queryKey:["api-keys-filter-by-permission",n,o,m],queryFn:()=>R({resourceType:n,resourceName:o,operationGroup:m}),enabled:!1});return i?(0,s.jsxs)("div",{className:"rounded-lg border border-[hsl(var(--border))] p-3 space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:t("apiKeys.filter.title")}),(0,s.jsx)(l.Button,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:function(){r(!1),d(""),e(null)},children:(0,s.jsx)(eS.X,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"space-y-1 min-w-[120px]",children:[(0,s.jsx)("label",{className:"text-[11px] text-muted-foreground",children:t("apiKeys.common.resourceType")}),(0,s.jsxs)(ec.Select,{value:n,onValueChange:s=>{c(s),d(""),e(null)},children:[(0,s.jsx)(ec.SelectTrigger,{className:"h-8 text-xs",children:(0,s.jsx)(ec.SelectValue,{})}),(0,s.jsxs)(ec.SelectContent,{children:[(0,s.jsx)(ec.SelectItem,{value:"knowledgebase",children:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(u.BookOpen,{className:"h-3 w-3"}),t("common.knowledgeBase")]})}),(0,s.jsx)(ec.SelectItem,{value:"memorystore",children:(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(er.Brain,{className:"h-3 w-3"}),t("common.memory")]})})]})]})]}),(0,s.jsxs)("div",{className:"space-y-1 min-w-[160px] flex-1",children:[(0,s.jsx)("label",{className:"text-[11px] text-muted-foreground",children:t("apiKeys.common.resourceName")}),(0,s.jsxs)(ec.Select,{value:o,onValueChange:s=>{d(s),e(null)},children:[(0,s.jsx)(ec.SelectTrigger,{className:"h-8 text-xs",children:(0,s.jsx)(ec.SelectValue,{placeholder:t("apiKeys.filter.selectResource")})}),(0,s.jsx)(ec.SelectContent,{children:j.map(e=>(0,s.jsx)(ec.SelectItem,{value:e,children:e},e))})]})]}),(0,s.jsxs)("div",{className:"space-y-1 min-w-[100px]",children:[(0,s.jsx)("label",{className:"text-[11px] text-muted-foreground",children:t("apiKeys.common.operationPermission")}),(0,s.jsxs)(ec.Select,{value:m,onValueChange:s=>{p(s),e(null)},children:[(0,s.jsx)(ec.SelectTrigger,{className:"h-8 text-xs",children:(0,s.jsx)(ec.SelectValue,{})}),(0,s.jsx)(ec.SelectContent,{children:["read","write","manage"].map(e=>(0,s.jsx)(ec.SelectItem,{value:e,children:t(e$[e])},e))})]})]}),(0,s.jsxs)(l.Button,{size:"sm",className:"h-8",disabled:!g||b,onClick:function(){g&&K().then(s=>{s.data&&e(new Set(s.data.apiKeys.map(e=>e.serviceCredentialId)))})},children:[b?(0,s.jsx)(x.Loader2,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):(0,s.jsx)(eO,{className:"mr-1.5 h-3.5 w-3.5"}),t("apiKeys.filter.filter")]}),v?(0,s.jsx)(l.Button,{variant:"ghost",size:"sm",className:"h-8 text-xs",onClick:function(){d(""),e(null)},children:t("common.clearSearch")}):null]}),v?(0,s.jsxs)("div",{className:"text-xs text-muted-foreground",children:[t("apiKeys.filter.resultPrefix")," ",(0,s.jsx)(N.Badge,{variant:"secondary",className:"px-1.5 py-0 text-xs",children:v.apiKeys.length})," ",t("apiKeys.filter.resultSuffix",{resource:"knowledgebase"===n?t("common.knowledgeBase"):t("common.memory"),name:o,operation:t(e$[m])})]}):null]}):(0,s.jsxs)(l.Button,{variant:"outline",size:"sm",onClick:()=>r(!0),children:[(0,s.jsx)(eO,{className:"mr-2 h-3.5 w-3.5"}),t("apiKeys.filter.byPermission")]})}let eE=(0,r.default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);function eQ({apiKey:e,onClose:t}){let{t:i}=(0,f.useI18n)(),[r,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&c(!1)},[e]);let o=!!e;async function d(e,s){try{await ee(e),m.toast.success(`${i("common.copied")} ${s}`)}catch{m.toast.error(i("common.copyFailed"))}}return(0,s.jsx)(V.Dialog,{open:o,onOpenChange:function(e){(e||r)&&(e||t())},children:(0,s.jsxs)(V.DialogContent,{className:"sm:max-w-lg",onEscapeKeyDown:e=>{r||e.preventDefault()},onPointerDownOutside:e=>{r||e.preventDefault()},children:[(0,s.jsxs)(V.DialogHeader,{children:[(0,s.jsx)(V.DialogTitle,{className:"text-xl",children:i("apiKeys.secret.title")}),(0,s.jsx)(V.DialogDescription,{children:i("apiKeys.secret.description")})]}),e?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:i("apiKeys.secret.credentialIdLabel")}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"flex-1 break-all rounded border border-[hsl(var(--border))] bg-muted/40 px-3 py-2 font-mono text-[13px]",children:e.serviceCredentialId}),(0,s.jsx)(l.Button,{variant:"outline",size:"icon",onClick:()=>d(e.serviceCredentialId,i("apiKeys.common.credentialId")),"aria-label":i("apiKeys.secret.copyCredentialId"),children:(0,s.jsx)(Z.Copy,{className:"h-4 w-4"})})]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(G.Label,{className:"text-xs text-muted-foreground",children:i("apiKeys.secret.secretLabel")}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"flex-1 break-all rounded border border-[hsl(var(--warning))/0.5] bg-[hsl(var(--warning))/0.06] px-3 py-2 font-mono text-[13px]",children:e.serviceCredentialSecret}),(0,s.jsx)(l.Button,{variant:"outline",size:"icon",onClick:()=>d(e.serviceCredentialSecret,"Secret"),"aria-label":i("apiKeys.secret.copySecret"),children:(0,s.jsx)(Z.Copy,{className:"h-4 w-4"})})]})]}),(0,s.jsxs)(l.Button,{variant:"outline",className:"w-full",onClick:function(){if(!e)return;let s=e.serviceCredentialId.slice(-6),a=new Date().toISOString().replace(/[:.]/g,"-"),t=new Blob([`ServiceCredentialId: ${e.serviceCredentialId}
2
- ServiceCredentialSecret: ${e.serviceCredentialSecret}
3
- ServiceCredentialName: ${e.serviceCredentialName}
4
- ServiceName: ${e.serviceName}
5
- CreateTime: ${e.createTime}
6
- UserPrincipalName: ${e.userPrincipalName}
7
-
8
- WARNING: This secret cannot be retrieved again. Store it safely.
9
- `],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=`tablestore-api-key-${s}-${a}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)},children:[(0,s.jsx)(eE,{className:"mr-2 h-4 w-4"}),i("apiKeys.secret.download")]}),(0,s.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-[hsl(var(--destructive))/0.4] bg-[hsl(var(--destructive))/0.05] px-3 py-2.5",children:[(0,s.jsx)(n,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),(0,s.jsxs)(G.Label,{className:"flex items-start gap-2 text-xs leading-relaxed text-foreground",children:[(0,s.jsx)(_.Checkbox,{checked:r,onCheckedChange:e=>c(!!e),className:"mt-0.5"}),(0,s.jsx)("span",{children:i("apiKeys.secret.confirmSaved")})]})]})]}):null,(0,s.jsx)(V.DialogFooter,{children:(0,s.jsx)(l.Button,{variant:"default",disabled:!r,onClick:()=>t(),children:i("common.done")})})]})})}function eH({message:e}){let{t:a}=(0,f.useI18n)();return(0,s.jsx)("div",{className:"rounded-lg border border-[hsl(var(--destructive))/0.5] bg-[hsl(var(--destructive))/0.05] p-6",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(n,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),(0,s.jsxs)("div",{className:"space-y-2 text-sm leading-relaxed",children:[(0,s.jsx)("p",{className:"font-semibold text-foreground",children:a("apiKeys.page.forbiddenTitle")}),(0,s.jsx)("p",{className:"text-muted-foreground",children:a("apiKeys.page.forbiddenIntro")}),(0,s.jsxs)("ul",{className:"list-disc space-y-1 pl-5 text-muted-foreground",children:[(0,s.jsx)("li",{children:a("apiKeys.page.forbiddenSwitchAccount")}),(0,s.jsxs)("li",{children:[a("apiKeys.page.forbiddenAttachPrefix"),(0,s.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs",children:"AliyunRAMReadOnlyAccess"}),a("apiKeys.page.forbiddenAttachMiddle"),(0,s.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-xs",children:"AliyunRAMFullAccess"}),a("apiKeys.page.forbiddenAttachSuffix")]})]}),e?(0,s.jsx)("p",{className:"break-all rounded bg-muted/50 px-3 py-2 font-mono text-xs text-muted-foreground",children:e}):null]})]})})}e.s(["default",0,function(){let{t:e}=(0,f.useI18n)(),{data:r,isLoading:m,isError:u,error:p,refetch:x}=function(){let{context:e,ready:s}=(0,$.useRuntimeContext)();return(0,O.useQuery)({queryKey:F.queryKeys.apiKeys(e.dataScopeKey),queryFn:w,enabled:s,staleTime:3e4})}(),[y,h]=(0,a.useState)(!1),[j,g]=(0,a.useState)(null),[N,v]=(0,a.useState)(null),[b,K]=(0,a.useState)(null),[k,S]=(0,a.useState)(null),I=r??[],T=null!==k?I.filter(e=>k.has(e.serviceCredentialId)):I,D=u&&p instanceof C.ApiClientError&&"FORBIDDEN"===p.code;return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(d.PageHeader,{title:e("apiKeys.page.title"),description:e("apiKeys.page.description"),children:(0,s.jsxs)(l.Button,{onClick:()=>h(!0),disabled:u&&!D,children:[(0,s.jsx)(i.Plus,{className:"mr-2 h-4 w-4"}),e("apiKeys.page.create")]})}),m?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(c.Skeleton,{className:"h-10 w-full"}),(0,s.jsx)(c.Skeleton,{className:"h-12 w-full"}),(0,s.jsx)(c.Skeleton,{className:"h-12 w-full"}),(0,s.jsx)(c.Skeleton,{className:"h-12 w-full"})]}):D?(0,s.jsx)(eH,{message:p instanceof Error?p.message:""}):u?(0,s.jsx)(o.EmptyState,{icon:n,title:e("apiKeys.page.loadFailed"),description:p instanceof Error?p.message:e("common.unknownError"),action:(0,s.jsx)(l.Button,{variant:"outline",onClick:()=>x(),children:e("common.retry")})}):0===I.length?(0,s.jsx)(o.EmptyState,{icon:t.KeyRound,title:e("apiKeys.page.emptyTitle"),description:e("apiKeys.page.emptyDescription"),action:(0,s.jsxs)(l.Button,{onClick:()=>h(!0),children:[(0,s.jsx)(i.Plus,{className:"mr-2 h-4 w-4"}),e("apiKeys.page.create")]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eU,{onFilterResults:S}),(0,s.jsx)(E,{apiKeys:T,onDelete:e=>g(e),onDetail:e=>v(e)})]}),(0,s.jsx)(W,{open:y,onOpenChange:h,onCreated:e=>K(e)}),(0,s.jsx)(eQ,{apiKey:b,onClose:()=>K(null)}),(0,s.jsx)(eL,{apiKey:N,onClose:()=>v(null)}),(0,s.jsx)(X,{apiKey:j,open:!!j,onOpenChange:e=>{e||g(null)}})]})}],338309)}]);