@tablestore/tablestore-agent-cli 0.2.11 → 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 +131 -196
- 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 +1 -0
- 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 +6 -0
- 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_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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route/server-reference-manifest.json +4 -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.map +5 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +1 -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 +8 -8
- 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.li3cj._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0w56nne._.js → [root-of-the-server]__0sa.9zr._.js} +6 -6
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0tc-.6s._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0y0w3mg._.js +1 -1
- 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 +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07fsbff._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0b5cw4e._.js +1 -1
- 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 +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01snuz~._.js +1 -1
- 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/_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/_0eps5jg._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ez3yia._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0k7q0ug._.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 +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0thp9l5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0_z9696._.js +1 -1
- 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_0bhjp9s._.js → dashboard_src_0jrh7xy._.js} +2 -2
- 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)_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_components_memory_memory-files-browser_tsx_0o2~94-._.js +1 -1
- 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/node_modules__pnpm_0ymj2~2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +1 -0
- 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/01bokygf48bnj.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/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/{0jjiw-agnutux.js → 0amex7bwxnme9.js} +1 -1
- 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/{08h7wustf~cl4.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/{01xcynczarvq~.js → 0jp7zmwvyv0bn.js} +1 -1
- 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/0prl9yrb8ksp8.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{01xuyqw7ivp3n.js → 0r4azm.3hswcs.js} +3 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uj7ezedkm6ou.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x5qtkdg2trq9.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zhfdjby7cj-q.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0~a4ig2x9z8uq.js → 13__t3s3ipfzl.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16uky1ro-t_~9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0hnqmb1a7y7x1.js → 18absak_u0d85.js} +3 -3
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- 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)/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 +57 -52
- 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 +22 -28
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/page.tsx +1 -3
- 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 +4 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-editor.tsx +9 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-version-history.tsx +107 -57
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-create-dialog.tsx +253 -68
- 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 +104 -56
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +204 -52
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-combobox.tsx +169 -42
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +4 -3
- 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-file-memory.ts +73 -72
- package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +40 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-subspace-history.ts +64 -75
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +82 -7
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +80 -7
- package/dist/dashboard-runtime/dashboard/src/lib/browser-file-memory.ts +31 -25
- package/dist/dashboard-runtime/dashboard/src/lib/memory-scope-history.ts +165 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +13 -0
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +10 -14
- 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/services/file-memory.ts +48 -56
- 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 +96 -43
- package/dist/dashboard-runtime/dashboard/src/types/instance.ts +17 -0
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +50 -3
- package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +1 -1
- 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/memory-client.d.ts +9 -55
- 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 +25 -93
- 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 +4 -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/main.js +0 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +9 -55
- 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 +25 -93
- 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 +4 -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/package.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0dzh4cj._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0k7ex0r._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__01f7est._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0cj2gsm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_05bw0~2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_071hi50._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0hy21o9._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xrd8-1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y7vx.d._.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/node_modules__pnpm_0sr_ner._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-~e5~2eoun8n.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/029zyc1pxa~4m.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05vzt~ml0z7~9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08o2~c-80nbla.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_osn.dm_85jw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0aj~rx1m.91ur.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dx_8pb_z_xy6.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k9guaejnlc0r.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ll488v66ycn1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pxisu-1mnehf.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vn5pp.3keyh5.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wbozn0wq-4ls.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12iur8ibdfi5_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13kxz9vygidrz.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/165fwg-5at5cq.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17b4md7atp39z.js +0 -1
- 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/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +0 -56
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +0 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +0 -120
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +0 -1
- package/dist/dashboard-runtime/node_modules/semver/node_modules/.bin/semver +0 -21
- 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/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts +0 -56
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.d.ts.map +0 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js +0 -120
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/oss-uploader.js.map +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/static/{AgybWIwFBY3-L1V2Copiq → 8G6beqTEKH_-N0JljpgWT}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{AgybWIwFBY3-L1V2Copiq → 8G6beqTEKH_-N0JljpgWT}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{AgybWIwFBY3-L1V2Copiq → 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,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
|
+
}
|
|
@@ -53,6 +53,19 @@ export function formatScope(scope?: MemoryScope): string {
|
|
|
53
53
|
.join(" / ");
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Positional four-tuple label for the scope pickers. Unlike
|
|
58
|
+
* {@link formatScope}, an empty dimension keeps its slot as `—`, so rows line
|
|
59
|
+
* up column-wise in a dropdown and "no tenant" reads differently from "no
|
|
60
|
+
* agent". Shared by both pickers (ScopeCombobox and the ScopeBar) so their
|
|
61
|
+
* labels can't drift apart.
|
|
62
|
+
*/
|
|
63
|
+
export function scopeLabel(scope: MemoryScope): string {
|
|
64
|
+
return [scope.appId, scope.tenantId, scope.agentId, scope.runId]
|
|
65
|
+
.map((v) => v || "—")
|
|
66
|
+
.join(" / ");
|
|
67
|
+
}
|
|
68
|
+
|
|
56
69
|
/**
|
|
57
70
|
* A set of dream tasks that share the same input scope.
|
|
58
71
|
*
|
|
@@ -29,50 +29,46 @@ export const fileMemoryQueryKeys = {
|
|
|
29
29
|
"list",
|
|
30
30
|
pathPrefix,
|
|
31
31
|
] as const,
|
|
32
|
-
|
|
32
|
+
item: (
|
|
33
33
|
dataScopeKey: string,
|
|
34
34
|
memoryStoreName: string,
|
|
35
35
|
scope: FileMemoryScope,
|
|
36
|
-
|
|
36
|
+
address: string,
|
|
37
37
|
) =>
|
|
38
38
|
[
|
|
39
39
|
...fileMemoryQueryKeys.root(dataScopeKey, memoryStoreName, scope),
|
|
40
|
-
"
|
|
41
|
-
|
|
40
|
+
"item",
|
|
41
|
+
address,
|
|
42
42
|
] as const,
|
|
43
43
|
versions: (
|
|
44
44
|
dataScopeKey: string,
|
|
45
45
|
memoryStoreName: string,
|
|
46
46
|
scope: FileMemoryScope,
|
|
47
|
-
|
|
48
|
-
path?: string,
|
|
47
|
+
itemId: string,
|
|
49
48
|
) =>
|
|
50
49
|
[
|
|
51
50
|
...fileMemoryQueryKeys.root(dataScopeKey, memoryStoreName, scope),
|
|
52
51
|
"versions",
|
|
53
|
-
|
|
54
|
-
path,
|
|
52
|
+
itemId,
|
|
55
53
|
] as const,
|
|
56
54
|
version: (
|
|
57
55
|
dataScopeKey: string,
|
|
58
56
|
memoryStoreName: string,
|
|
59
57
|
scope: FileMemoryScope,
|
|
60
|
-
|
|
61
|
-
memoryVersionId: string,
|
|
62
|
-
versionSeq: number,
|
|
58
|
+
versionId: string,
|
|
63
59
|
) =>
|
|
64
60
|
[
|
|
65
61
|
...fileMemoryQueryKeys.root(dataScopeKey, memoryStoreName, scope),
|
|
66
62
|
"version",
|
|
67
|
-
|
|
68
|
-
memoryVersionId,
|
|
69
|
-
versionSeq,
|
|
63
|
+
versionId,
|
|
70
64
|
] as const,
|
|
71
65
|
};
|
|
72
66
|
|
|
73
67
|
export const queryKeys = {
|
|
74
68
|
runtimeContext: RUNTIME_CONTEXT_QUERY_KEY,
|
|
75
69
|
instances: (scope: string) => ["instances", scope] as const,
|
|
70
|
+
instanceConnectivity: (scope: string) =>
|
|
71
|
+
["instance-connectivity", scope] as const,
|
|
76
72
|
instance: (scope: string, name: string | null | undefined) =>
|
|
77
73
|
["instance", scope, name] as const,
|
|
78
74
|
knowledgeBases: (scope: string) => ["knowledge-bases", scope] as const,
|
|
@@ -44,6 +44,11 @@ const CODE_TO_HTTP_STATUS: Record<string, number> = {
|
|
|
44
44
|
UNAUTHORIZED: 401,
|
|
45
45
|
FORBIDDEN: 403,
|
|
46
46
|
CONFLICT: 409,
|
|
47
|
+
PATH_EXISTS: 409,
|
|
48
|
+
LOCK_CONFLICT: 409,
|
|
49
|
+
QUOTA_EXCEEDED: 409,
|
|
50
|
+
READ_ONLY_STORE: 409,
|
|
51
|
+
PAYLOAD_TOO_LARGE: 413,
|
|
47
52
|
QUOTA_EXHAUSTED: 429,
|
|
48
53
|
FLOW_CONTROL: 429,
|
|
49
54
|
INTERNAL_SERVER_ERROR: 500,
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
InstanceConnectivity,
|
|
3
|
+
InstanceConnectivityReason,
|
|
4
|
+
} from "@/types/instance";
|
|
5
|
+
|
|
6
|
+
const DEFAULT_TIMEOUT_MS = 3_000;
|
|
7
|
+
const MAX_MESSAGE_LENGTH = 240;
|
|
8
|
+
|
|
9
|
+
const DNS_CODES = new Set(["ENOTFOUND", "EAI_AGAIN", "EAI_FAIL"]);
|
|
10
|
+
const CONNECTION_CODES = new Set([
|
|
11
|
+
"ECONNREFUSED",
|
|
12
|
+
"ECONNRESET",
|
|
13
|
+
"EHOSTUNREACH",
|
|
14
|
+
"ENETUNREACH",
|
|
15
|
+
]);
|
|
16
|
+
const TLS_CODES = new Set([
|
|
17
|
+
"CERT_HAS_EXPIRED",
|
|
18
|
+
"CERT_NOT_YET_VALID",
|
|
19
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
20
|
+
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
21
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
22
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
23
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
interface ProbeOptions {
|
|
27
|
+
fetchImpl?: typeof fetch;
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
now?: () => number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface ErrorDetails {
|
|
33
|
+
reason: InstanceConnectivityReason;
|
|
34
|
+
message: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function safeMessage(value: unknown): string {
|
|
38
|
+
const message =
|
|
39
|
+
value instanceof Error && value.message.trim()
|
|
40
|
+
? value.message
|
|
41
|
+
: "Network request failed";
|
|
42
|
+
return message.replace(/\s+/g, " ").slice(0, MAX_MESSAGE_LENGTH);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function errorDetails(error: unknown): ErrorDetails {
|
|
46
|
+
let current: unknown = error;
|
|
47
|
+
let deepestMessage = safeMessage(error);
|
|
48
|
+
const seen = new Set<unknown>();
|
|
49
|
+
|
|
50
|
+
while (current && typeof current === "object" && !seen.has(current)) {
|
|
51
|
+
seen.add(current);
|
|
52
|
+
const record = current as {
|
|
53
|
+
cause?: unknown;
|
|
54
|
+
code?: unknown;
|
|
55
|
+
message?: unknown;
|
|
56
|
+
name?: unknown;
|
|
57
|
+
};
|
|
58
|
+
if (typeof record.message === "string" && record.message.trim()) {
|
|
59
|
+
deepestMessage = record.message.replace(/\s+/g, " ");
|
|
60
|
+
}
|
|
61
|
+
if (record.name === "TimeoutError" || record.name === "AbortError") {
|
|
62
|
+
return { reason: "timeout", message: safeMessage(current) };
|
|
63
|
+
}
|
|
64
|
+
const code = typeof record.code === "string" ? record.code : "";
|
|
65
|
+
if (DNS_CODES.has(code)) {
|
|
66
|
+
return { reason: "dns", message: safeMessage(current) };
|
|
67
|
+
}
|
|
68
|
+
if (CONNECTION_CODES.has(code)) {
|
|
69
|
+
return { reason: "connection", message: safeMessage(current) };
|
|
70
|
+
}
|
|
71
|
+
if (TLS_CODES.has(code) || code.startsWith("ERR_TLS_")) {
|
|
72
|
+
return { reason: "tls", message: safeMessage(current) };
|
|
73
|
+
}
|
|
74
|
+
current = record.cause;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
reason: "network",
|
|
79
|
+
message: deepestMessage.replace(/\s+/g, " ").slice(0, MAX_MESSAGE_LENGTH),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export async function probeInstanceEndpoint(
|
|
84
|
+
endpoint: string,
|
|
85
|
+
options: ProbeOptions = {},
|
|
86
|
+
): Promise<InstanceConnectivity> {
|
|
87
|
+
const now = options.now ?? Date.now;
|
|
88
|
+
const startedAt = now();
|
|
89
|
+
const checkedAt = () => new Date(now()).toISOString();
|
|
90
|
+
|
|
91
|
+
if (!endpoint.trim()) {
|
|
92
|
+
return { configured: false, reachable: null, checkedAt: checkedAt() };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
let url: string;
|
|
96
|
+
try {
|
|
97
|
+
const parsed = new URL(endpoint);
|
|
98
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
99
|
+
throw new TypeError("unsupported protocol");
|
|
100
|
+
}
|
|
101
|
+
url = parsed.toString();
|
|
102
|
+
} catch {
|
|
103
|
+
return {
|
|
104
|
+
configured: true,
|
|
105
|
+
reachable: false,
|
|
106
|
+
checkedAt: checkedAt(),
|
|
107
|
+
latencyMs: Math.max(0, now() - startedAt),
|
|
108
|
+
reason: "network",
|
|
109
|
+
message: "Invalid endpoint URL",
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
try {
|
|
114
|
+
const response = await (options.fetchImpl ?? fetch)(url, {
|
|
115
|
+
method: "HEAD",
|
|
116
|
+
signal: AbortSignal.timeout(options.timeoutMs ?? DEFAULT_TIMEOUT_MS),
|
|
117
|
+
redirect: "manual",
|
|
118
|
+
cache: "no-store",
|
|
119
|
+
});
|
|
120
|
+
return {
|
|
121
|
+
configured: true,
|
|
122
|
+
reachable: true,
|
|
123
|
+
checkedAt: checkedAt(),
|
|
124
|
+
latencyMs: Math.max(0, now() - startedAt),
|
|
125
|
+
httpStatus: response.status,
|
|
126
|
+
};
|
|
127
|
+
} catch (error) {
|
|
128
|
+
return {
|
|
129
|
+
configured: true,
|
|
130
|
+
reachable: false,
|
|
131
|
+
checkedAt: checkedAt(),
|
|
132
|
+
latencyMs: Math.max(0, now() - startedAt),
|
|
133
|
+
...errorDetails(error),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -57,6 +57,7 @@ export const TOKEN_SOURCE_COOKIE_NAME = "tablestore_token_source";
|
|
|
57
57
|
const COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 30; // 30 days
|
|
58
58
|
const RAW_TOKEN_SOURCE = "raw";
|
|
59
59
|
const INSTANCE_TOKEN_SOURCE = "instance";
|
|
60
|
+
const FORCE_ENV_VALUE = "1";
|
|
60
61
|
|
|
61
62
|
const COOKIE_OPTIONS = {
|
|
62
63
|
httpOnly: true,
|
|
@@ -272,6 +273,10 @@ function configFromEnv(): Record<string, string> | null {
|
|
|
272
273
|
};
|
|
273
274
|
}
|
|
274
275
|
|
|
276
|
+
function shouldForceEnvCredentials(): boolean {
|
|
277
|
+
return process.env.TABLESTORE_DASHBOARD_FORCE_ENV === FORCE_ENV_VALUE;
|
|
278
|
+
}
|
|
279
|
+
|
|
275
280
|
function configFromToken(token: string): Record<string, string> {
|
|
276
281
|
// decodeToken throws on malformed input; callers translate to 401.
|
|
277
282
|
return decodeToken(token);
|
|
@@ -521,12 +526,13 @@ function cacheSet(key: string, value: ResolvedClients): void {
|
|
|
521
526
|
*/
|
|
522
527
|
export function resolveClients(request: NextRequest): ResolvedClients {
|
|
523
528
|
const token = request.cookies.get(SESSION_COOKIE_NAME)?.value;
|
|
529
|
+
const forceEnv = shouldForceEnvCredentials();
|
|
524
530
|
|
|
525
|
-
let fields: Record<string, string> | null = null;
|
|
531
|
+
let fields: Record<string, string> | null = forceEnv ? configFromEnv() : null;
|
|
526
532
|
let source: CredentialSource = "env";
|
|
527
533
|
let instanceName: string | null = null;
|
|
528
534
|
|
|
529
|
-
if (token) {
|
|
535
|
+
if (!forceEnv && token) {
|
|
530
536
|
try {
|
|
531
537
|
const tokenFields = configFromToken(token);
|
|
532
538
|
if (shouldUseCookieCredentials(request, tokenFields)) {
|
|
@@ -542,7 +548,7 @@ export function resolveClients(request: NextRequest): ResolvedClients {
|
|
|
542
548
|
}
|
|
543
549
|
}
|
|
544
550
|
|
|
545
|
-
if (!fields) {
|
|
551
|
+
if (!forceEnv && !fields) {
|
|
546
552
|
const fromInstance = configFromActiveInstance();
|
|
547
553
|
if (fromInstance) {
|
|
548
554
|
fields = fromInstance.fields;
|
|
@@ -591,6 +597,22 @@ export function inspectCredentials(request: NextRequest): {
|
|
|
591
597
|
activeInstance: string | null;
|
|
592
598
|
credentialFingerprint: string;
|
|
593
599
|
} | null {
|
|
600
|
+
if (shouldForceEnvCredentials()) {
|
|
601
|
+
const fields = configFromEnv();
|
|
602
|
+
if (!fields) return null;
|
|
603
|
+
const region =
|
|
604
|
+
fields.region ||
|
|
605
|
+
inferRegionFromOtsEndpoint(fields.ots_endpoint) ||
|
|
606
|
+
DEFAULT_REGION;
|
|
607
|
+
return {
|
|
608
|
+
instanceName: fields.ots_instance_name,
|
|
609
|
+
region,
|
|
610
|
+
source: "env",
|
|
611
|
+
activeInstance: null,
|
|
612
|
+
credentialFingerprint: computeCredentialFingerprint(fields),
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
|
|
594
616
|
const token = request.cookies.get(SESSION_COOKIE_NAME)?.value;
|
|
595
617
|
if (token) {
|
|
596
618
|
try {
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
export const MAX_RECENT_SUBSPACES = 10;
|
|
2
|
+
|
|
3
|
+
const RECENT_STORAGE_KEY_PREFIX = "tsagent.kbSubspaces.v2";
|
|
4
|
+
const ACTIVE_STORAGE_KEY_PREFIX = "tsagent.kbActiveSubspace.v2";
|
|
5
|
+
|
|
6
|
+
type SubspaceStorage = Pick<Storage, "getItem" | "setItem" | "removeItem">;
|
|
7
|
+
|
|
8
|
+
function normalizeSubspace(value: unknown): string | null {
|
|
9
|
+
if (typeof value !== "string") return null;
|
|
10
|
+
const normalized = value.trim();
|
|
11
|
+
return normalized || null;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function getRecentSubspaceStorageKey(
|
|
15
|
+
dataScopeKey: string,
|
|
16
|
+
knowledgeBaseName: string,
|
|
17
|
+
): string {
|
|
18
|
+
return `${RECENT_STORAGE_KEY_PREFIX}:${JSON.stringify([
|
|
19
|
+
dataScopeKey,
|
|
20
|
+
knowledgeBaseName,
|
|
21
|
+
])}`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function getActiveSubspaceStorageKey(
|
|
25
|
+
dataScopeKey: string,
|
|
26
|
+
knowledgeBaseName: string,
|
|
27
|
+
): string {
|
|
28
|
+
return `${ACTIVE_STORAGE_KEY_PREFIX}:${JSON.stringify([
|
|
29
|
+
dataScopeKey,
|
|
30
|
+
knowledgeBaseName,
|
|
31
|
+
])}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function readRecentSubspaces(
|
|
35
|
+
storage: Pick<SubspaceStorage, "getItem">,
|
|
36
|
+
dataScopeKey: string,
|
|
37
|
+
knowledgeBaseName: string,
|
|
38
|
+
): string[] {
|
|
39
|
+
try {
|
|
40
|
+
const raw = storage.getItem(
|
|
41
|
+
getRecentSubspaceStorageKey(dataScopeKey, knowledgeBaseName),
|
|
42
|
+
);
|
|
43
|
+
if (!raw) return [];
|
|
44
|
+
const parsed = JSON.parse(raw) as unknown;
|
|
45
|
+
if (!Array.isArray(parsed)) return [];
|
|
46
|
+
|
|
47
|
+
const seen = new Set<string>();
|
|
48
|
+
return parsed.reduce<string[]>((recent, item) => {
|
|
49
|
+
const subspace = normalizeSubspace(item);
|
|
50
|
+
if (
|
|
51
|
+
!subspace ||
|
|
52
|
+
seen.has(subspace) ||
|
|
53
|
+
recent.length >= MAX_RECENT_SUBSPACES
|
|
54
|
+
) {
|
|
55
|
+
return recent;
|
|
56
|
+
}
|
|
57
|
+
seen.add(subspace);
|
|
58
|
+
recent.push(subspace);
|
|
59
|
+
return recent;
|
|
60
|
+
}, []);
|
|
61
|
+
} catch {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function rememberRecentSubspace(
|
|
67
|
+
storage: Pick<SubspaceStorage, "getItem" | "setItem">,
|
|
68
|
+
dataScopeKey: string,
|
|
69
|
+
knowledgeBaseName: string,
|
|
70
|
+
value: unknown,
|
|
71
|
+
): string[] {
|
|
72
|
+
const subspace = normalizeSubspace(value);
|
|
73
|
+
const recent = readRecentSubspaces(storage, dataScopeKey, knowledgeBaseName);
|
|
74
|
+
if (!subspace) return recent;
|
|
75
|
+
|
|
76
|
+
const next = [subspace, ...recent.filter((item) => item !== subspace)].slice(
|
|
77
|
+
0,
|
|
78
|
+
MAX_RECENT_SUBSPACES,
|
|
79
|
+
);
|
|
80
|
+
try {
|
|
81
|
+
storage.setItem(
|
|
82
|
+
getRecentSubspaceStorageKey(dataScopeKey, knowledgeBaseName),
|
|
83
|
+
JSON.stringify(next),
|
|
84
|
+
);
|
|
85
|
+
} catch {
|
|
86
|
+
// Browser storage availability must not block navigation.
|
|
87
|
+
}
|
|
88
|
+
return next;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function clearRecentSubspaces(
|
|
92
|
+
storage: Pick<SubspaceStorage, "removeItem">,
|
|
93
|
+
dataScopeKey: string,
|
|
94
|
+
knowledgeBaseName: string,
|
|
95
|
+
): void {
|
|
96
|
+
try {
|
|
97
|
+
storage.removeItem(
|
|
98
|
+
getRecentSubspaceStorageKey(dataScopeKey, knowledgeBaseName),
|
|
99
|
+
);
|
|
100
|
+
} catch {
|
|
101
|
+
// Browser storage availability must not block navigation.
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function readActiveSubspace(
|
|
106
|
+
storage: Pick<SubspaceStorage, "getItem">,
|
|
107
|
+
dataScopeKey: string,
|
|
108
|
+
knowledgeBaseName: string,
|
|
109
|
+
): string | null {
|
|
110
|
+
try {
|
|
111
|
+
return normalizeSubspace(
|
|
112
|
+
storage.getItem(
|
|
113
|
+
getActiveSubspaceStorageKey(dataScopeKey, knowledgeBaseName),
|
|
114
|
+
),
|
|
115
|
+
);
|
|
116
|
+
} catch {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function writeActiveSubspace(
|
|
122
|
+
storage: Pick<SubspaceStorage, "setItem">,
|
|
123
|
+
dataScopeKey: string,
|
|
124
|
+
knowledgeBaseName: string,
|
|
125
|
+
value: unknown,
|
|
126
|
+
): void {
|
|
127
|
+
const subspace = normalizeSubspace(value);
|
|
128
|
+
if (!subspace) return;
|
|
129
|
+
try {
|
|
130
|
+
storage.setItem(
|
|
131
|
+
getActiveSubspaceStorageKey(dataScopeKey, knowledgeBaseName),
|
|
132
|
+
subspace,
|
|
133
|
+
);
|
|
134
|
+
} catch {
|
|
135
|
+
// Browser storage availability must not block navigation.
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function clearActiveSubspace(
|
|
140
|
+
storage: Pick<SubspaceStorage, "removeItem">,
|
|
141
|
+
dataScopeKey: string,
|
|
142
|
+
knowledgeBaseName: string,
|
|
143
|
+
): void {
|
|
144
|
+
try {
|
|
145
|
+
storage.removeItem(
|
|
146
|
+
getActiveSubspaceStorageKey(dataScopeKey, knowledgeBaseName),
|
|
147
|
+
);
|
|
148
|
+
} catch {
|
|
149
|
+
// Browser storage availability must not block navigation.
|
|
150
|
+
}
|
|
151
|
+
}
|