@tablestore/tablestore-agent-cli 0.2.10 → 0.3.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.
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +3 -0
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +10 -11
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/memory-items.d.ts +3 -0
- package/dist/commands/memory-items.d.ts.map +1 -0
- package/dist/commands/memory-items.js +375 -0
- package/dist/commands/memory-items.js.map +1 -0
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +133 -122
- package/dist/commands/memory.js.map +1 -1
- package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +2 -3
- package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +4 -4
- package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +11 -20
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/api-keys/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/api-keys/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/[dreamId]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/[dreamId]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/dream/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +16 -16
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/custom-policy/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/custom-policy/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/effective-permissions/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/effective-permissions/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/policies/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/policies/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/filter-by-permission/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/filter-by-permission/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-kb-sync/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-kb-sync/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/cancel/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/cancel/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/dream-tasks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{sync → [action]}/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/scopes/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/scopes/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/[requestId]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/[requestId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/tasks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +15 -15
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.rsc +18 -18
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +18 -18
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_index.segment.rsc +11 -11
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/onboarding.segment.rsc +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +2 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/05a2_app_api_v1_memory_stores_[store]_file-memory_[action]_route_actions_0m70if_.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0e95__next-internal_server_app_api_v1_instances_connectivity_route_actions_0hc.k~w.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +19 -12
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0--nu07._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-pbmiq._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-wmyic._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.gylau._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.hvkwy._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.li3cj._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.qtdn4._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02p1x3t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03og44p._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04dd04u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04ujbw-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04zbudf._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0-3~.bv._.js → [root-of-the-server]__052epg.._.js} +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05eryp~._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06fva9g._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08_2avk._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0acvvri._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0byveuc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cee_lo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cyd2qb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ecs-9r._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ejcow5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0es0s_~._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fglxiw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g3yw6w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0i1_p1s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0is6qso._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0no9qm0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q8vcw8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q9fgt6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0rx9hon._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__089es3y._.js → [root-of-the-server]__0sa.9zr._.js} +10 -10
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0tc-.6s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0u03tze._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ua_nqs._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0uebf40._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0v0il3n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0w_ig2a._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0y0w3mg._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zmo~nd._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__10m-wmo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11s_zx6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11wq90l._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__126srko._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12e1t6o._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12ylr4n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13g_f9w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13q2wbt._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13~-fxp._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0b1r_app_(dashboard)_knowledge-base_[name]_documents_documents-client_tsx_0g2uxmt._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0.ooo1s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07fsbff._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0b5cw4e._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p1cst6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0xza7lz._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.6x0yu._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.pa1e6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01snuz~._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0251rsp._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02waf76._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06_hoj_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_aw2vr._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0brqbty._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0csuit-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ep_q37._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0eps5jg._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ez3yia._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fttf6a._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fz3kge._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hx2079._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0k7q0ug._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0oiggmj._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0p0sh02._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0pwlb77._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t.h859._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0thp9l5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0uc_gmf._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0wce254._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ww5s91._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y4mxf8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12l8jkb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_079nj-_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0_z9696._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0grv2wq._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0jrh7xy._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0x60pxf._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_api-keys_page_tsx_0lb6fu7._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_[dreamId]_page_tsx_0wy3tv6._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_page_tsx_0uzzpvs._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_layout_tsx_0rbi41w._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_messages_page_tsx_0votz-n._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_tasks_page_tsx_0a_bgx4._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_units_page_tsx_0.6xnei._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_memory_memory-files-browser_tsx_0o2~94-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_i18n_i18n-context_tsx_0c39ewr._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_providers_runtime-context-provider_tsx_0wmj66z._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ymj2~2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +2 -3
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-xwobg-a6si1.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0.hi0qmo.f-h4.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01bokygf48bnj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/026lyw-ynx1og.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/04a.1c2rygy08.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05.2q9f0yx4e_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05_iqjh-v2gej.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05f4mjbi6x-tm.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07twdccs42b_-.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/090n1_814n.n~.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09v-qczj__g1x.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{08nzc9sye_0~h.js → 0_8~9zgfm5f.8.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_zw2y~vb_52n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a2f-mxepv-y7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0amex7bwxnme9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0apfhv-v7oy7u.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bxt5icwb83xt.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dpi1comd-thc.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0eafb9pun~54k.js +9 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{010bpq~3ntjcm.js → 0eerrv808~6bh.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j6agpotrd_n4.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jbcdgtcgqemd.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jp7zmwvyv0bn.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k8mhea24d_kj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0krt75we1wtcy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0l~3_bvic.da3.js → 0ogrq_r43je48.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0prl9yrb8ksp8.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r4azm.3hswcs.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r6utd8g~.cc1.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6c8q4k~6aiy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uj7ezedkm6ou.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uu2cjfwvbn3y.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x5qtkdg2trq9.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yvc~t7p88wsf.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zhfdjby7cj-q.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{02u9ocsl0a12t.js → 0~naqbx3873~r.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0~a4ig2x9z8uq.js → 13__t3s3ipfzl.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.8mq880kjoc.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/145hqnc~4wc~n.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14rpr3z1.lmgj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16uky1ro-t_~9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/18absak_u0d85.js +138 -0
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/qa/page.tsx +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/[dreamId]/page.tsx +187 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/page.tsx +14 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +59 -8
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx +15 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/tasks/page.tsx +9 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +123 -24
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/page.tsx +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/connectivity/route.ts +66 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-curator.ts +496 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-helpers.ts +12 -81
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-helpers.ts +3 -3
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +200 -39
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/dream-tasks/[dreamId]/actions/apply/route.ts +39 -6
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/[action]/route.ts +86 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/_helpers.ts +26 -36
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/_request.ts +49 -0
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/page.tsx +1 -3
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +48 -9
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-bind-section.tsx +66 -18
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-files-dialog.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-picker.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/instance/instance-connectivity-dot.tsx +96 -0
- package/dist/dashboard-runtime/dashboard/src/components/instance/project-card.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/subspace-gate.tsx +23 -5
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/subspace-switcher.tsx +23 -5
- package/dist/dashboard-runtime/dashboard/src/components/layout/instance-switcher.tsx +13 -1
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-instance-card.tsx +29 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-details-panel.tsx +91 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-editor.tsx +144 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-mutation-dialogs.tsx +181 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-scope-onboarding.tsx +154 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-version-history.tsx +251 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-workspace-toolbar.tsx +101 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-create-form.tsx +166 -75
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-create-dialog.tsx +385 -73
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-plan-approval-dialog.tsx +172 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-files-browser.tsx +500 -168
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +230 -72
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-form.tsx +51 -14
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-results.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-settings-form.tsx +54 -46
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-card.tsx +126 -69
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-table.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-combobox.tsx +169 -42
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +233 -38
- package/dist/dashboard-runtime/dashboard/src/components/shared/error-state.tsx +3 -2
- package/dist/dashboard-runtime/dashboard/src/components/shared/llm-model-selector.tsx +5 -1
- package/dist/dashboard-runtime/dashboard/src/components/ui/dialog.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/contexts/subspace-context.tsx +144 -30
- package/dist/dashboard-runtime/dashboard/src/hooks/use-approve-dream-plan.ts +25 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +125 -47
- package/dist/dashboard-runtime/dashboard/src/hooks/use-file-memory.ts +185 -29
- package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +40 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-store-scopes.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +188 -23
- package/dist/dashboard-runtime/dashboard/src/hooks/use-subspace-history.ts +64 -75
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +198 -14
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +188 -14
- package/dist/dashboard-runtime/dashboard/src/lib/api-error-toast.ts +9 -1
- package/dist/dashboard-runtime/dashboard/src/lib/browser-file-memory.ts +397 -0
- package/dist/dashboard-runtime/dashboard/src/lib/file-scope-history.ts +108 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory-scope-history.ts +165 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory-storage-mode.ts +193 -31
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +29 -4
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +63 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +5 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/instance-connectivity.ts +136 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +25 -3
- package/dist/dashboard-runtime/dashboard/src/lib/subspace-history.ts +151 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +58 -13
- package/dist/dashboard-runtime/dashboard/src/services/file-memory.ts +80 -46
- package/dist/dashboard-runtime/dashboard/src/services/instances.ts +5 -0
- package/dist/dashboard-runtime/dashboard/src/services/memory.ts +45 -5
- package/dist/dashboard-runtime/dashboard/src/types/file-memory.ts +150 -0
- package/dist/dashboard-runtime/dashboard/src/types/instance.ts +17 -0
- package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +49 -13
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +59 -5
- package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +1 -0
- package/dist/dashboard-runtime/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/dist/dashboard-runtime/node_modules/@img/{sharp-linux-x64 → sharp-darwin-arm64}/package.json +7 -13
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/README.md +2 -2
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/glib-2.0/include/glibconfig.h +8 -9
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 → sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib} +0 -0
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/package.json +5 -11
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +9 -8
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +24 -10
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +5 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/package.json +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +9 -8
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js +24 -10
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js +5 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/response.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/package.json +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route/app-paths-manifest.json +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route.js +0 -6
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route.js.nft.json +0 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/file/route_client-reference-manifest.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route/app-paths-manifest.json +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route.js +0 -6
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/sync/route_client-reference-manifest.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route/app-paths-manifest.json +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route/build-manifest.json +0 -9
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route/server-reference-manifest.json +0 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route.js +0 -6
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route.js.map +0 -5
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route.js.nft.json +0 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/tree/route_client-reference-manifest.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_file-memory_file_route_actions_06~k01v.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_file-memory_sync_route_actions_0rt6p8e.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_file-memory_tree_route_actions_0wl_n8b.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-dt7~s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.-~ff4._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.l706t._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.nejw_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__00_mrad._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__00i.7se._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__00r7uqs._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02~yw7n._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04kpzpa._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04p1a88._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05x0k4d._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__060s~oe._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06fanvv._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06tci88._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08bzgzm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08d7wb.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08p_m_c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__095xiwn._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__09h95i6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ai2k_o._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0alcygi._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0aspytx._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cq-9s~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cyiuai._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0d4zrpj._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0d~m09k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0f1lugp._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g1cfb7._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0gpz.~y._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0i3u9x3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0iromt6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0j8.u0y._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0k-pfaj._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0kcbz7k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0nrl-.g._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0o5mf4h._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0omyr40._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ty8jgt._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ug_2kc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0v98i9~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wt0ksb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ya_8d2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zfg-ml._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~9ru5n._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~f7ckz._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__109i6ps._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__10o5zq5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12ls5l8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0w-2_lucide-react_dist_esm_icons_0h-3_0x._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0k0es2c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ky8i.~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ocsrt0._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ys4x_n._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10rkv6z._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_002mc1c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04f2u4t._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06ny.4k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0b9pl2d._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0e.ehti._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f8moq0._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f8yv4v._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fvg_xo._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0h9c.8m._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ip4ncy._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0izjcsk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j.62sb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0mdbcju._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0p_s55v._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0qiamjd._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xp94lc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13730cz._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13ctfae._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_00.1.s_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_04o7mfc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0bhjp9s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0qlyj-q._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00usyu3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0791f2k._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0--dupndun7xc.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0.uxk~hsm6yi8.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00eggrx~.4c55.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00lvoeu_v3253.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00o9vmhspv._3.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00x1.t633f041.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02p7gke47s.2~.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/03dth-av1gl-h.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07s0f6938um2v.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09y30vyml4r.b.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0au0pbejtwahz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b-ei8-g7ceug.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0chiv044h3u58.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fcdli-~wmvvx.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fz_9~-rxluly.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0i55cqygnl-a9.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j8p7vk~awgs..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j_.hkhjix9hw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ll488v66ycn1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0naliud7av3p1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pbfl~23ac79y.js +0 -9
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u3qx.qasmdx9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vuh8jgeqqdy..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wbevjtr1_grz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0y-gjpq3kxsbz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0z_pq4ttgotxw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/10i~m4_8ainxw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12535rmhzbk63.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13uk2uuzuop5e.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13vd4hv~l95-c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16.2aecdwo6w_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16yu0g~7n~33c.js +0 -1
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/file/route.ts +0 -69
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/sync/route.ts +0 -69
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/tree/route.ts +0 -44
- package/dist/dashboard-runtime/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts +0 -153
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts.map +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js +0 -451
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js.map +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts +0 -153
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.d.ts.map +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js +0 -451
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/file-memory.js.map +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/{memory/stores/[store]/file-memory/file → instances/connectivity}/route/build-manifest.json +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/{memory/stores/[store]/file-memory/file → instances/connectivity}/route/server-reference-manifest.json +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/{memory/stores/[store]/file-memory/file → instances/connectivity}/route.js.map +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{sync → [action]}/route/build-manifest.json +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{sync → [action]}/route/server-reference-manifest.json +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/{sync → [action]}/route.js.map +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{5irIRCYtKcYh5T_Bewihp → 8G6beqTEKH_-N0JljpgWT}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{5irIRCYtKcYh5T_Bewihp → 8G6beqTEKH_-N0JljpgWT}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{5irIRCYtKcYh5T_Bewihp → 8G6beqTEKH_-N0JljpgWT}/_ssgManifest.js +0 -0
- /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/index.js +0 -0
- /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/versions.json +0 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import type { ChatMemoryWriteScope } from "@/components/chat/chat-config-context";
|
|
4
|
+
import {
|
|
5
|
+
getItem as getItemService,
|
|
6
|
+
listItems as listItemsService,
|
|
7
|
+
} from "@/services/file-memory";
|
|
8
|
+
import type { FileMemoryItem, FileMemoryScope } from "@/types/file-memory";
|
|
9
|
+
|
|
10
|
+
export const BROWSER_FILE_MEMORY_LABEL =
|
|
11
|
+
"标签页内容缓存 · 通过 Item API 按 SHA 复用";
|
|
12
|
+
export const MAX_BROWSER_FILE_MEMORY_FILES = 300;
|
|
13
|
+
export const MAX_BROWSER_FILE_MEMORY_BYTES = 3 * 1024 * 1024;
|
|
14
|
+
export const MAX_BROWSER_FILE_MEMORY_SNAPSHOTS = 8;
|
|
15
|
+
|
|
16
|
+
const LIST_PAGE_SIZE = 100;
|
|
17
|
+
const READ_CONCURRENCY = 8;
|
|
18
|
+
const MAX_LIST_PAGES = 1_000;
|
|
19
|
+
const SNIPPET_LINES = 10;
|
|
20
|
+
|
|
21
|
+
export interface BrowserFileMemoryEntry {
|
|
22
|
+
rel: string;
|
|
23
|
+
size: number;
|
|
24
|
+
sha256: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface BrowserFileMemoryHit {
|
|
28
|
+
text: string;
|
|
29
|
+
source: string;
|
|
30
|
+
score: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface BrowserFileMemoryCacheSummary {
|
|
34
|
+
ok: boolean;
|
|
35
|
+
listed: number;
|
|
36
|
+
loaded: number;
|
|
37
|
+
reused: number;
|
|
38
|
+
totalBytes: number;
|
|
39
|
+
truncated: boolean;
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface CachedFile extends BrowserFileMemoryEntry {
|
|
44
|
+
path: string;
|
|
45
|
+
itemId: string;
|
|
46
|
+
text: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface BrowserFileMemorySnapshot {
|
|
50
|
+
files: Map<string, CachedFile>;
|
|
51
|
+
updatedAt: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type ListItems = typeof listItemsService;
|
|
55
|
+
type GetItem = typeof getItemService;
|
|
56
|
+
|
|
57
|
+
export interface LoadBrowserFileMemoryOptions {
|
|
58
|
+
dataScopeKey: string;
|
|
59
|
+
memoryStoreName: string;
|
|
60
|
+
scope: ChatMemoryWriteScope;
|
|
61
|
+
listItems?: ListItems;
|
|
62
|
+
getItem?: GetItem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface LoadBrowserFileMemoryResult {
|
|
66
|
+
key: string;
|
|
67
|
+
files: BrowserFileMemoryEntry[];
|
|
68
|
+
cache: BrowserFileMemoryCacheSummary;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const snapshots = new Map<string, BrowserFileMemorySnapshot>();
|
|
72
|
+
const inflight = new Map<string, Promise<LoadBrowserFileMemoryResult>>();
|
|
73
|
+
|
|
74
|
+
function readSnapshot(key: string): BrowserFileMemorySnapshot | undefined {
|
|
75
|
+
const snapshot = snapshots.get(key);
|
|
76
|
+
if (snapshot) {
|
|
77
|
+
snapshots.delete(key);
|
|
78
|
+
snapshots.set(key, snapshot);
|
|
79
|
+
}
|
|
80
|
+
return snapshot;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function storeSnapshot(key: string, snapshot: BrowserFileMemorySnapshot): void {
|
|
84
|
+
snapshots.delete(key);
|
|
85
|
+
snapshots.set(key, snapshot);
|
|
86
|
+
while (snapshots.size > MAX_BROWSER_FILE_MEMORY_SNAPSHOTS) {
|
|
87
|
+
const oldestKey = snapshots.keys().next().value;
|
|
88
|
+
if (oldestKey === undefined) break;
|
|
89
|
+
snapshots.delete(oldestKey);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function normalizeScope(scope: ChatMemoryWriteScope): FileMemoryScope {
|
|
94
|
+
const read = (value: string, field: string) => {
|
|
95
|
+
const normalized = value.trim();
|
|
96
|
+
if (!normalized || normalized === "*") {
|
|
97
|
+
throw new Error(`file memory requires an exact ${field}`);
|
|
98
|
+
}
|
|
99
|
+
return normalized;
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
appId: read(scope.appId, "appId"),
|
|
103
|
+
tenantId: read(scope.tenantId, "tenantId"),
|
|
104
|
+
agentId: read(scope.agentId, "agentId"),
|
|
105
|
+
runId: read(scope.runId, "runId"),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function browserFileMemoryKey(opts: {
|
|
110
|
+
dataScopeKey: string;
|
|
111
|
+
memoryStoreName: string;
|
|
112
|
+
scope: ChatMemoryWriteScope;
|
|
113
|
+
}): string {
|
|
114
|
+
const scope = normalizeScope(opts.scope);
|
|
115
|
+
return JSON.stringify([
|
|
116
|
+
opts.dataScopeKey,
|
|
117
|
+
opts.memoryStoreName,
|
|
118
|
+
scope.appId,
|
|
119
|
+
scope.tenantId,
|
|
120
|
+
scope.agentId,
|
|
121
|
+
scope.runId,
|
|
122
|
+
]);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function normalizePath(path: string): { path: string; rel: string } {
|
|
126
|
+
const absolute = `/${path.trim().replace(/^\/+/, "")}`;
|
|
127
|
+
const parts = absolute.slice(1).split("/");
|
|
128
|
+
if (
|
|
129
|
+
absolute === "/" ||
|
|
130
|
+
absolute.includes("\\") ||
|
|
131
|
+
parts.some((part) => !part || part === "." || part === "..")
|
|
132
|
+
) {
|
|
133
|
+
throw new Error(`invalid file-memory path: ${path}`);
|
|
134
|
+
}
|
|
135
|
+
return { path: absolute, rel: parts.join("/") };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function validateMetadata(file: FileMemoryItem): void {
|
|
139
|
+
normalizePath(file.path);
|
|
140
|
+
if (
|
|
141
|
+
file.type !== "memoryfile" ||
|
|
142
|
+
!file.itemId ||
|
|
143
|
+
!file.latestVersionId ||
|
|
144
|
+
!file.contentSha256 ||
|
|
145
|
+
!Number.isSafeInteger(file.contentSizeBytes) ||
|
|
146
|
+
file.contentSizeBytes < 0
|
|
147
|
+
) {
|
|
148
|
+
throw new Error(`invalid file-memory metadata: ${file.path}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async function collectMetadata(
|
|
153
|
+
opts: LoadBrowserFileMemoryOptions,
|
|
154
|
+
scope: FileMemoryScope,
|
|
155
|
+
): Promise<{ files: FileMemoryItem[]; truncated: boolean }> {
|
|
156
|
+
const list = opts.listItems ?? listItemsService;
|
|
157
|
+
const files = new Map<string, FileMemoryItem>();
|
|
158
|
+
const tokens = new Set<string>();
|
|
159
|
+
let nextToken: string | undefined;
|
|
160
|
+
let truncated = false;
|
|
161
|
+
|
|
162
|
+
for (let page = 0; page < MAX_LIST_PAGES; page += 1) {
|
|
163
|
+
const response = await list(opts.memoryStoreName, {
|
|
164
|
+
scope,
|
|
165
|
+
view: "basic",
|
|
166
|
+
limit: LIST_PAGE_SIZE,
|
|
167
|
+
...(nextToken ? { nextToken } : {}),
|
|
168
|
+
});
|
|
169
|
+
const itemEntries = response.items.filter(
|
|
170
|
+
(entry): entry is FileMemoryItem => entry.type === "memoryfile",
|
|
171
|
+
);
|
|
172
|
+
for (const [index, file] of itemEntries.entries()) {
|
|
173
|
+
validateMetadata(file);
|
|
174
|
+
const { path } = normalizePath(file.path);
|
|
175
|
+
if (!files.has(path)) files.set(path, { ...file, path });
|
|
176
|
+
if (files.size >= MAX_BROWSER_FILE_MEMORY_FILES) {
|
|
177
|
+
truncated = index < itemEntries.length - 1 || !!response.nextToken;
|
|
178
|
+
return { files: [...files.values()], truncated };
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (!response.nextToken) return { files: [...files.values()], truncated };
|
|
182
|
+
if (tokens.has(response.nextToken)) {
|
|
183
|
+
throw new Error("ListItems repeated a pagination token");
|
|
184
|
+
}
|
|
185
|
+
tokens.add(response.nextToken);
|
|
186
|
+
nextToken = response.nextToken;
|
|
187
|
+
}
|
|
188
|
+
throw new Error("ListItems exceeded the pagination limit");
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async function mapConcurrent<T, TResult>(
|
|
192
|
+
items: T[],
|
|
193
|
+
concurrency: number,
|
|
194
|
+
worker: (item: T) => Promise<TResult>,
|
|
195
|
+
): Promise<TResult[]> {
|
|
196
|
+
const results = new Array<TResult>(items.length);
|
|
197
|
+
let cursor = 0;
|
|
198
|
+
await Promise.all(
|
|
199
|
+
Array.from({ length: Math.min(concurrency, items.length) }, async () => {
|
|
200
|
+
while (cursor < items.length) {
|
|
201
|
+
const index = cursor;
|
|
202
|
+
cursor += 1;
|
|
203
|
+
results[index] = await worker(items[index]);
|
|
204
|
+
}
|
|
205
|
+
}),
|
|
206
|
+
);
|
|
207
|
+
return results;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function snapshotEntries(
|
|
211
|
+
snapshot: BrowserFileMemorySnapshot | undefined,
|
|
212
|
+
): BrowserFileMemoryEntry[] {
|
|
213
|
+
if (!snapshot) return [];
|
|
214
|
+
return [...snapshot.files.values()]
|
|
215
|
+
.map(({ rel, size, sha256 }) => ({ rel, size, sha256 }))
|
|
216
|
+
.sort((a, b) => a.rel.localeCompare(b.rel));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
async function performLoad(
|
|
220
|
+
opts: LoadBrowserFileMemoryOptions,
|
|
221
|
+
key: string,
|
|
222
|
+
scope: FileMemoryScope,
|
|
223
|
+
): Promise<LoadBrowserFileMemoryResult> {
|
|
224
|
+
const previous = readSnapshot(key);
|
|
225
|
+
try {
|
|
226
|
+
const collected = await collectMetadata(opts, scope);
|
|
227
|
+
const selected: FileMemoryItem[] = [];
|
|
228
|
+
let totalBytes = 0;
|
|
229
|
+
let truncated = collected.truncated;
|
|
230
|
+
for (const file of collected.files) {
|
|
231
|
+
if (totalBytes + file.contentSizeBytes > MAX_BROWSER_FILE_MEMORY_BYTES) {
|
|
232
|
+
truncated = true;
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
selected.push(file);
|
|
236
|
+
totalBytes += file.contentSizeBytes;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
const candidate = new Map<string, CachedFile>();
|
|
240
|
+
const toRead: FileMemoryItem[] = [];
|
|
241
|
+
let reused = 0;
|
|
242
|
+
for (const file of selected) {
|
|
243
|
+
const { rel } = normalizePath(file.path);
|
|
244
|
+
const cached = previous?.files.get(rel);
|
|
245
|
+
if (cached?.sha256 === file.contentSha256) {
|
|
246
|
+
candidate.set(rel, {
|
|
247
|
+
...cached,
|
|
248
|
+
path: file.path,
|
|
249
|
+
itemId: file.itemId,
|
|
250
|
+
size: file.contentSizeBytes,
|
|
251
|
+
});
|
|
252
|
+
reused += 1;
|
|
253
|
+
} else {
|
|
254
|
+
toRead.push(file);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const read = opts.getItem ?? getItemService;
|
|
259
|
+
const loaded = await mapConcurrent(
|
|
260
|
+
toRead,
|
|
261
|
+
READ_CONCURRENCY,
|
|
262
|
+
async (file) => {
|
|
263
|
+
const response = await read(opts.memoryStoreName, {
|
|
264
|
+
scope,
|
|
265
|
+
path: file.path,
|
|
266
|
+
view: "full",
|
|
267
|
+
});
|
|
268
|
+
if (response.content === undefined) {
|
|
269
|
+
throw new Error(`GetItem omitted content for ${file.path}`);
|
|
270
|
+
}
|
|
271
|
+
const { path, rel } = normalizePath(file.path);
|
|
272
|
+
return {
|
|
273
|
+
path,
|
|
274
|
+
rel,
|
|
275
|
+
itemId: file.itemId,
|
|
276
|
+
size: file.contentSizeBytes,
|
|
277
|
+
sha256: file.contentSha256,
|
|
278
|
+
text: response.content,
|
|
279
|
+
} satisfies CachedFile;
|
|
280
|
+
},
|
|
281
|
+
);
|
|
282
|
+
for (const file of loaded) candidate.set(file.rel, file);
|
|
283
|
+
|
|
284
|
+
const snapshot = { files: candidate, updatedAt: Date.now() };
|
|
285
|
+
storeSnapshot(key, snapshot);
|
|
286
|
+
return {
|
|
287
|
+
key,
|
|
288
|
+
files: snapshotEntries(snapshot),
|
|
289
|
+
cache: {
|
|
290
|
+
ok: true,
|
|
291
|
+
listed: collected.files.length,
|
|
292
|
+
loaded: loaded.length,
|
|
293
|
+
reused,
|
|
294
|
+
totalBytes,
|
|
295
|
+
truncated,
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
} catch (error) {
|
|
299
|
+
const files = snapshotEntries(previous);
|
|
300
|
+
return {
|
|
301
|
+
key,
|
|
302
|
+
files,
|
|
303
|
+
cache: {
|
|
304
|
+
ok: false,
|
|
305
|
+
listed: files.length,
|
|
306
|
+
loaded: 0,
|
|
307
|
+
reused: files.length,
|
|
308
|
+
totalBytes: files.reduce((sum, file) => sum + file.size, 0),
|
|
309
|
+
truncated: false,
|
|
310
|
+
error: error instanceof Error ? error.message : String(error),
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export function loadBrowserFileMemory(
|
|
317
|
+
opts: LoadBrowserFileMemoryOptions,
|
|
318
|
+
): Promise<LoadBrowserFileMemoryResult> {
|
|
319
|
+
const scope = normalizeScope(opts.scope);
|
|
320
|
+
const key = browserFileMemoryKey({ ...opts, scope });
|
|
321
|
+
const existing = inflight.get(key);
|
|
322
|
+
if (existing) return existing;
|
|
323
|
+
const run = performLoad(opts, key, scope).finally(() => inflight.delete(key));
|
|
324
|
+
inflight.set(key, run);
|
|
325
|
+
return run;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export function readBrowserFileMemoryFile(key: string, rel: string): string {
|
|
329
|
+
const normalized = normalizePath(rel).rel;
|
|
330
|
+
const file = readSnapshot(key)?.files.get(normalized);
|
|
331
|
+
if (!file) throw new Error(`browser file-memory file not found: ${rel}`);
|
|
332
|
+
return file.text;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function tokenizeQuery(query: string): string[] {
|
|
336
|
+
const terms = new Set<string>();
|
|
337
|
+
for (const token of query.toLowerCase().match(/[a-z0-9]+/g) ?? []) {
|
|
338
|
+
if (token.length >= 2) terms.add(token);
|
|
339
|
+
}
|
|
340
|
+
for (const run of query.match(/[一-鿿㐀-䶿]+/g) ?? []) {
|
|
341
|
+
for (const char of run) terms.add(char);
|
|
342
|
+
for (let index = 0; index + 1 < run.length; index += 1) {
|
|
343
|
+
terms.add(run[index] + run[index + 1]);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return [...terms];
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
function scoreSnippet(
|
|
350
|
+
text: string,
|
|
351
|
+
terms: string[],
|
|
352
|
+
fullQuery: string,
|
|
353
|
+
): number {
|
|
354
|
+
const lower = text.toLowerCase();
|
|
355
|
+
const matched = terms.reduce(
|
|
356
|
+
(count, term) => count + (lower.includes(term) ? 1 : 0),
|
|
357
|
+
0,
|
|
358
|
+
);
|
|
359
|
+
if (!matched) return 0;
|
|
360
|
+
const bonus =
|
|
361
|
+
fullQuery.length > 4 && lower.includes(fullQuery.toLowerCase()) ? 0.1 : 0;
|
|
362
|
+
return Math.min(1, matched / Math.max(1, terms.length) + bonus);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export function searchBrowserFileMemory(opts: {
|
|
366
|
+
key: string;
|
|
367
|
+
query: string;
|
|
368
|
+
topK: number;
|
|
369
|
+
}): { results: BrowserFileMemoryHit[]; skipped?: boolean } {
|
|
370
|
+
const query = opts.query.trim();
|
|
371
|
+
const snapshot = readSnapshot(opts.key);
|
|
372
|
+
const terms = tokenizeQuery(query);
|
|
373
|
+
if (!query || !snapshot || terms.length === 0) {
|
|
374
|
+
return { results: [], skipped: true };
|
|
375
|
+
}
|
|
376
|
+
const hits: BrowserFileMemoryHit[] = [];
|
|
377
|
+
for (const file of snapshot.files.values()) {
|
|
378
|
+
const lines = file.text.split("\n");
|
|
379
|
+
for (let index = 0; index < lines.length; index += SNIPPET_LINES) {
|
|
380
|
+
const text = lines
|
|
381
|
+
.slice(index, index + SNIPPET_LINES)
|
|
382
|
+
.join("\n")
|
|
383
|
+
.trim();
|
|
384
|
+
if (!text) continue;
|
|
385
|
+
const score = scoreSnippet(text, terms, query);
|
|
386
|
+
if (score > 0) hits.push({ text, source: file.rel, score });
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
hits.sort((a, b) => b.score - a.score || a.source.localeCompare(b.source));
|
|
390
|
+
const topK = Math.max(1, Math.min(50, Math.trunc(opts.topK) || 1));
|
|
391
|
+
return { results: hits.slice(0, topK) };
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export function clearBrowserFileMemoryForTests(): void {
|
|
395
|
+
snapshots.clear();
|
|
396
|
+
inflight.clear();
|
|
397
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { FileMemoryScope } from "@/types/file-memory";
|
|
2
|
+
|
|
3
|
+
export const MAX_RECENT_FILE_SCOPES = 10;
|
|
4
|
+
const STORAGE_KEY_PREFIX = "tsagent.fileScopes.v1";
|
|
5
|
+
|
|
6
|
+
type ScopeStorage = Pick<Storage, "getItem" | "setItem">;
|
|
7
|
+
|
|
8
|
+
export function getRecentFileScopeStorageKey(
|
|
9
|
+
dataScopeKey: string,
|
|
10
|
+
memoryStoreName: string,
|
|
11
|
+
): string {
|
|
12
|
+
return `${STORAGE_KEY_PREFIX}:${JSON.stringify([dataScopeKey, memoryStoreName])}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function normalizeExactFileMemoryScope(
|
|
16
|
+
value: Partial<FileMemoryScope> | null | undefined,
|
|
17
|
+
): FileMemoryScope | null {
|
|
18
|
+
if (!value) return null;
|
|
19
|
+
const fields = [value.appId, value.tenantId, value.agentId, value.runId];
|
|
20
|
+
if (
|
|
21
|
+
fields.some(
|
|
22
|
+
(field) =>
|
|
23
|
+
typeof field !== "string" || !field.trim() || field.trim() === "*",
|
|
24
|
+
)
|
|
25
|
+
) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
appId: value.appId!.trim(),
|
|
30
|
+
tenantId: value.tenantId!.trim(),
|
|
31
|
+
agentId: value.agentId!.trim(),
|
|
32
|
+
runId: value.runId!.trim(),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function isExactFileMemoryScope(
|
|
37
|
+
value: Partial<FileMemoryScope> | null | undefined,
|
|
38
|
+
): value is FileMemoryScope {
|
|
39
|
+
return normalizeExactFileMemoryScope(value) !== null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function applyFileScopeToSearchParams(
|
|
43
|
+
current: URLSearchParams,
|
|
44
|
+
scope: FileMemoryScope,
|
|
45
|
+
): URLSearchParams {
|
|
46
|
+
const next = new URLSearchParams(current);
|
|
47
|
+
next.set("view", "files");
|
|
48
|
+
next.set("appId", scope.appId);
|
|
49
|
+
next.set("tenantId", scope.tenantId);
|
|
50
|
+
next.set("agentId", scope.agentId);
|
|
51
|
+
next.set("runId", scope.runId);
|
|
52
|
+
next.delete("file");
|
|
53
|
+
return next;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function readRecentFileScopes(
|
|
57
|
+
storage: Pick<ScopeStorage, "getItem">,
|
|
58
|
+
dataScopeKey: string,
|
|
59
|
+
memoryStoreName: string,
|
|
60
|
+
): FileMemoryScope[] {
|
|
61
|
+
try {
|
|
62
|
+
const raw = storage.getItem(
|
|
63
|
+
getRecentFileScopeStorageKey(dataScopeKey, memoryStoreName),
|
|
64
|
+
);
|
|
65
|
+
if (!raw) return [];
|
|
66
|
+
const parsed = JSON.parse(raw) as unknown;
|
|
67
|
+
if (!Array.isArray(parsed)) return [];
|
|
68
|
+
return parsed
|
|
69
|
+
.map((item) =>
|
|
70
|
+
normalizeExactFileMemoryScope(
|
|
71
|
+
item && typeof item === "object"
|
|
72
|
+
? (item as Partial<FileMemoryScope>)
|
|
73
|
+
: null,
|
|
74
|
+
),
|
|
75
|
+
)
|
|
76
|
+
.filter((item): item is FileMemoryScope => item !== null)
|
|
77
|
+
.slice(0, MAX_RECENT_FILE_SCOPES);
|
|
78
|
+
} catch {
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function rememberRecentFileScope(
|
|
84
|
+
storage: ScopeStorage,
|
|
85
|
+
dataScopeKey: string,
|
|
86
|
+
memoryStoreName: string,
|
|
87
|
+
value: Partial<FileMemoryScope>,
|
|
88
|
+
): FileMemoryScope[] {
|
|
89
|
+
const scope = normalizeExactFileMemoryScope(value);
|
|
90
|
+
if (!scope)
|
|
91
|
+
return readRecentFileScopes(storage, dataScopeKey, memoryStoreName);
|
|
92
|
+
const identity = JSON.stringify(scope);
|
|
93
|
+
const next = [
|
|
94
|
+
scope,
|
|
95
|
+
...readRecentFileScopes(storage, dataScopeKey, memoryStoreName).filter(
|
|
96
|
+
(item) => JSON.stringify(item) !== identity,
|
|
97
|
+
),
|
|
98
|
+
].slice(0, MAX_RECENT_FILE_SCOPES);
|
|
99
|
+
try {
|
|
100
|
+
storage.setItem(
|
|
101
|
+
getRecentFileScopeStorageKey(dataScopeKey, memoryStoreName),
|
|
102
|
+
JSON.stringify(next),
|
|
103
|
+
);
|
|
104
|
+
} catch {
|
|
105
|
+
// Recent navigation history must never block file-memory access.
|
|
106
|
+
}
|
|
107
|
+
return next;
|
|
108
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { MemoryScope } from "@/types/memory";
|
|
2
|
+
|
|
3
|
+
export const MAX_RECENT_MEMORY_SCOPES = 10;
|
|
4
|
+
const STORAGE_KEY_PREFIX = "tsagent.memoryScopes.v1";
|
|
5
|
+
|
|
6
|
+
type ScopeStorage = Pick<Storage, "getItem" | "setItem" | "removeItem">;
|
|
7
|
+
type OptionalScopeField = "tenantId" | "agentId" | "runId";
|
|
8
|
+
|
|
9
|
+
const OPTIONAL_SCOPE_FIELDS: OptionalScopeField[] = [
|
|
10
|
+
"tenantId",
|
|
11
|
+
"agentId",
|
|
12
|
+
"runId",
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export function getRecentMemoryScopeStorageKey(
|
|
16
|
+
dataScopeKey: string,
|
|
17
|
+
memoryStoreName: string,
|
|
18
|
+
): string {
|
|
19
|
+
return `${STORAGE_KEY_PREFIX}:${JSON.stringify([dataScopeKey, memoryStoreName])}`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function isAllWildcardMemoryScope(
|
|
23
|
+
value: Partial<MemoryScope> | null | undefined,
|
|
24
|
+
): boolean {
|
|
25
|
+
if (!value || typeof value.appId !== "string" || value.appId.trim() !== "*") {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return OPTIONAL_SCOPE_FIELDS.every((field) => {
|
|
30
|
+
const fieldValue = value[field];
|
|
31
|
+
if (fieldValue === undefined) return true;
|
|
32
|
+
if (typeof fieldValue !== "string") return false;
|
|
33
|
+
const normalized = fieldValue.trim();
|
|
34
|
+
return !normalized || normalized === "*";
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function normalizeRecentMemoryScope(
|
|
39
|
+
value: Partial<MemoryScope> | null | undefined,
|
|
40
|
+
): MemoryScope | null {
|
|
41
|
+
if (!value || typeof value.appId !== "string" || !value.appId.trim()) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const scope: MemoryScope = { appId: value.appId.trim() };
|
|
46
|
+
for (const field of OPTIONAL_SCOPE_FIELDS) {
|
|
47
|
+
const fieldValue = value[field];
|
|
48
|
+
if (typeof fieldValue === "string" && fieldValue.trim()) {
|
|
49
|
+
scope[field] = fieldValue.trim();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return isAllWildcardMemoryScope(scope) ? null : scope;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function scopeIdentity(scope: MemoryScope): string {
|
|
57
|
+
return JSON.stringify([
|
|
58
|
+
scope.appId,
|
|
59
|
+
scope.tenantId ?? "",
|
|
60
|
+
scope.agentId ?? "",
|
|
61
|
+
scope.runId ?? "",
|
|
62
|
+
]);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function readRecentMemoryScopes(
|
|
66
|
+
storage: Pick<ScopeStorage, "getItem">,
|
|
67
|
+
dataScopeKey: string,
|
|
68
|
+
memoryStoreName: string,
|
|
69
|
+
): MemoryScope[] {
|
|
70
|
+
try {
|
|
71
|
+
const raw = storage.getItem(
|
|
72
|
+
getRecentMemoryScopeStorageKey(dataScopeKey, memoryStoreName),
|
|
73
|
+
);
|
|
74
|
+
if (!raw) return [];
|
|
75
|
+
|
|
76
|
+
const parsed = JSON.parse(raw) as unknown;
|
|
77
|
+
if (!Array.isArray(parsed)) return [];
|
|
78
|
+
|
|
79
|
+
const identities = new Set<string>();
|
|
80
|
+
const scopes: MemoryScope[] = [];
|
|
81
|
+
for (const item of parsed) {
|
|
82
|
+
const value =
|
|
83
|
+
item && typeof item === "object"
|
|
84
|
+
? (item as Partial<MemoryScope>)
|
|
85
|
+
: null;
|
|
86
|
+
if (isAllWildcardMemoryScope(value)) continue;
|
|
87
|
+
|
|
88
|
+
const scope = normalizeRecentMemoryScope(value);
|
|
89
|
+
if (!scope) continue;
|
|
90
|
+
|
|
91
|
+
const identity = scopeIdentity(scope);
|
|
92
|
+
if (identities.has(identity)) continue;
|
|
93
|
+
identities.add(identity);
|
|
94
|
+
scopes.push(scope);
|
|
95
|
+
if (scopes.length === MAX_RECENT_MEMORY_SCOPES) break;
|
|
96
|
+
}
|
|
97
|
+
return scopes;
|
|
98
|
+
} catch {
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function rememberRecentMemoryScope(
|
|
104
|
+
storage: Pick<ScopeStorage, "getItem" | "setItem">,
|
|
105
|
+
dataScopeKey: string,
|
|
106
|
+
memoryStoreName: string,
|
|
107
|
+
value: Partial<MemoryScope>,
|
|
108
|
+
): MemoryScope[] {
|
|
109
|
+
const current = readRecentMemoryScopes(
|
|
110
|
+
storage,
|
|
111
|
+
dataScopeKey,
|
|
112
|
+
memoryStoreName,
|
|
113
|
+
);
|
|
114
|
+
if (isAllWildcardMemoryScope(value)) return current;
|
|
115
|
+
|
|
116
|
+
const scope = normalizeRecentMemoryScope(value);
|
|
117
|
+
if (!scope) return current;
|
|
118
|
+
|
|
119
|
+
const identity = scopeIdentity(scope);
|
|
120
|
+
const next = [
|
|
121
|
+
scope,
|
|
122
|
+
...current.filter((item) => scopeIdentity(item) !== identity),
|
|
123
|
+
].slice(0, MAX_RECENT_MEMORY_SCOPES);
|
|
124
|
+
|
|
125
|
+
try {
|
|
126
|
+
storage.setItem(
|
|
127
|
+
getRecentMemoryScopeStorageKey(dataScopeKey, memoryStoreName),
|
|
128
|
+
JSON.stringify(next),
|
|
129
|
+
);
|
|
130
|
+
} catch {
|
|
131
|
+
// Scope history must never block memory navigation.
|
|
132
|
+
}
|
|
133
|
+
return next;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function clearRecentMemoryScopes(
|
|
137
|
+
storage: Pick<ScopeStorage, "removeItem">,
|
|
138
|
+
dataScopeKey: string,
|
|
139
|
+
memoryStoreName: string,
|
|
140
|
+
): void {
|
|
141
|
+
try {
|
|
142
|
+
storage.removeItem(
|
|
143
|
+
getRecentMemoryScopeStorageKey(dataScopeKey, memoryStoreName),
|
|
144
|
+
);
|
|
145
|
+
} catch {
|
|
146
|
+
// Scope history must never block memory navigation.
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function excludeRecentMemoryScopes(
|
|
151
|
+
knownScopes: readonly MemoryScope[],
|
|
152
|
+
recentScopes: readonly MemoryScope[],
|
|
153
|
+
): MemoryScope[] {
|
|
154
|
+
const recentIdentities = new Set(
|
|
155
|
+
recentScopes
|
|
156
|
+
.map(normalizeRecentMemoryScope)
|
|
157
|
+
.filter((scope): scope is MemoryScope => scope !== null)
|
|
158
|
+
.map(scopeIdentity),
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
return knownScopes.filter((scope) => {
|
|
162
|
+
const normalized = normalizeRecentMemoryScope(scope);
|
|
163
|
+
return !normalized || !recentIdentities.has(scopeIdentity(normalized));
|
|
164
|
+
});
|
|
165
|
+
}
|