@tablestore/tablestore-agent-cli 0.3.1 → 0.4.0
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/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +20 -16
- 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 +10 -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 +3 -3
- package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +80 -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]/scope/page/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/build-manifest.json +18 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/next-font-manifest.json +8 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/react-loadable-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page.js +23 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page_client-reference-manifest.js +3 -0
- 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/[store]/wiki/page/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/build-manifest.json +18 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/next-font-manifest.json +8 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/react-loadable-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js +23 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page_client-reference-manifest.js +3 -0
- 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.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/connectivity/route.js.nft.json +1 -1
- 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 +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 +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 +2 -2
- 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/[store]/wikis/artifacts/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/artifacts/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route_client-reference-manifest.js +3 -0
- 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 +10 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_artifacts_route_actions_0doape5.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_ingest_route_actions_0ppwgam.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_page_route_actions_0odivj9.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_pages_route_actions_0s15y9a.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_route_actions_0dbjn9p.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_search_route_actions_108iypz.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_source_route_actions_0vmf0n5.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0ndq_server_app_api_v1_memory_stores_[store]_wikis_sources_route_actions_0i4~w4-.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +24 -17
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.hvkwy._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03~qmfv._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0_g86ij._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0db9xtg._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ejcow5._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0es0s_~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0f~3a2d._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0is6qso._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0n.tvh_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ohui_o._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ssi0g0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0u03tze._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ua_nqs._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wpch_g._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ypo~ko._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0sa.9zr._.js → [root-of-the-server]__0yqtnx6._.js} +9 -9
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11rxx0.._.js +40 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11wq90l._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__120vi1p._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13q2wbt._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13~-fxp._.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/0e95__next-internal_server_app_(dashboard)_memory_[store]_scope_page_actions_0n2kkfu.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e95__next-internal_server_app_(dashboard)_memory_[store]_wiki_page_actions_01zih-8.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_07x7aai.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0p91_next_dist_esm_build_templates_app-page_0u~m_xi.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__05kcz99._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06l7w~r._.js +3 -0
- 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]__0_6myqa._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0cn05tt._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0d-z.x1._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0i9tlv5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ov6305._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_02waf76._.js → _00.la1c._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_019ufsh._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01r6jx1._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04rasxw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04wdnle._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0thp9l5._.js → _05__-74._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_05wwgdw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06.3nzk._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06ofr7j._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0bn79mh._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0cpcl4p._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0d_nd-j._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f.xs7l._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fz3kge._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0gyu-mm._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jt60z2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0kaclzw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0lstkpb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0qw41co._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0t.h859._.js → _0vfgz-v._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ww5s91._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_119lxvo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{dashboard_src_0jrh7xy._.js → dashboard_src_0bhjp9s._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0xaihln._.js +3 -0
- 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_components_memory_memory-files-browser_tsx_0o2~94-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_ui_01evqg6._.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/node_modules__pnpm_0..ymrl._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_12_d6fg._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +8 -0
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/next-font-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/next-font-manifest.json +2 -0
- 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/01nixb3ddw4hy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01u9hj_9~5-vg.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02q3tpry1ajx9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/03rx12c5dxw_4.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/057-rg6~0wki8.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07q8af71w17xl.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07v6llp0fv6iq.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09hfvw~51z.9o.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0axnv6wy1_hr7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bbcwyy.xvpd0.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0eafb9pun~54k.js → 0cfrd_r4jr_ip.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dpj.6wcf.qn8.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0f-mf~9z.~82q.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gt8u.o_c_nix.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hh2728tmgrdk.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0idn9fvygbi9d.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0idr-.ttn_21z.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0amex7bwxnme9.js → 0jjiw-agnutux.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k6m5~gmu0f8w.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k_rtgxnq8bsz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0nq2xdnij7nqt.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0nw7q~w~vg.-y.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o-j8g9gp_c1r.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pm6vv5wntle..js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0qr499bd44k.g.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0sx_fx5r7nq4b.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0tbu6y0a22ok8.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u7fh6be6noif.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vfuo2829nn25.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wcf_hdt9arma.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xash~4j8pl87.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xi6y8g4l~vzr.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0y45-~ia9sqr0.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/10684vn7g6wln.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/1204oli3aouy7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13gbu.62oz207.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14t.r5~ls3k0x.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/15043qe~kvq-v.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/168xs92lu3o~y.js +1 -0
- package/dist/dashboard-runtime/dashboard/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +14 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/[dreamId]/page.tsx +66 -58
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/page.tsx +6 -6
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +36 -9
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/scope/page.tsx +51 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/wiki/page.tsx +157 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-curator.ts +1 -4
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/file-memory-helpers.ts +6 -6
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-helpers.ts +50 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-retrieval.ts +160 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-security.ts +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +477 -285
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/server-file-memory.ts +113 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/wiki-retrieval.ts +656 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/_scope.ts +67 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/file-memory/_helpers.ts +5 -23
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/_helpers.ts +317 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/artifacts/route.ts +194 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/ingest/route.ts +60 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/page/route.ts +55 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/pages/route.ts +61 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/route.ts +89 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/search/route.ts +58 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/source/route.ts +230 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/wikis/sources/route.ts +295 -0
- package/dist/dashboard-runtime/dashboard/src/components/api-keys/custom-policy-editor.tsx +2 -1
- package/dist/dashboard-runtime/dashboard/src/components/api-keys/permission-rule-dialog.tsx +17 -10
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +181 -32
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-scope-entry-hydrator.tsx +116 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/memory-bind-section.tsx +37 -15
- package/dist/dashboard-runtime/dashboard/src/components/chat/wiki-bind-section.tsx +153 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-actions-table.tsx +13 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-dream-create-dialog.tsx +359 -144
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +108 -76
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-combobox.tsx +31 -50
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-hierarchy-picker.tsx +274 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-workspace-cards.tsx +475 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-workspace.tsx +197 -0
- package/dist/dashboard-runtime/dashboard/src/components/qa/answer-evidence-block.tsx +145 -0
- package/dist/dashboard-runtime/dashboard/src/components/qa/memory-evidence-content.tsx +106 -0
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +68 -84
- package/dist/dashboard-runtime/dashboard/src/components/qa/wiki-evidence-block.tsx +326 -0
- package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-build-panel.tsx +640 -0
- package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-detail.tsx +302 -0
- package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-edit-dialog.tsx +195 -0
- package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-overview.tsx +104 -0
- package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-pages-panel.tsx +424 -0
- package/dist/dashboard-runtime/dashboard/src/components/wiki/wiki-sources-panel.tsx +506 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +625 -44
- package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +329 -94
- package/dist/dashboard-runtime/dashboard/src/hooks/use-wiki-build-polling.ts +151 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-wikis.ts +291 -0
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +389 -35
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +356 -25
- package/dist/dashboard-runtime/dashboard/src/lib/browser-file-memory.ts +46 -340
- package/dist/dashboard-runtime/dashboard/src/lib/chat-scope-entry.ts +59 -0
- package/dist/dashboard-runtime/dashboard/src/lib/dream-create-options.ts +27 -0
- package/dist/dashboard-runtime/dashboard/src/lib/file-memory-core.ts +744 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory-storage-mode.ts +25 -4
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +93 -0
- package/dist/dashboard-runtime/dashboard/src/lib/retrieval-security.ts +54 -0
- package/dist/dashboard-runtime/dashboard/src/lib/scope-hierarchy.ts +167 -0
- package/dist/dashboard-runtime/dashboard/src/lib/scope-workspace.ts +123 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +46 -3
- package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/lib/wiki-metadata-limits.ts +133 -0
- package/dist/dashboard-runtime/dashboard/src/lib/wiki-page-tree.ts +153 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +121 -21
- package/dist/dashboard-runtime/dashboard/src/services/wiki.ts +145 -0
- package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +72 -9
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +4 -29
- package/dist/dashboard-runtime/dashboard/src/types/wiki.ts +200 -0
- package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/CHANGELOG.md +175 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/LICENSE +201 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/README.md +203 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/package.json +3 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/request-context.js +21 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/sign-base.js +70 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/sign-v2.js +13 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/auth/sign-v4.js +51 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/client/agent-storage-client.js +196 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/errors/client-error.js +10 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/errors/service-error.js +16 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/http/headers.js +31 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/http/md5.js +9 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/http/ots-json-client.js +155 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/base.js +19 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/chunk.js +67 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/document.js +163 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/enums.js +31 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/file.js +27 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/knowledge-base.js +118 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/memory.js +711 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/metadata-filter.js +123 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/retrieve.js +152 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/unset.js +8 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/models/wiki.js +2 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/serialization/to-json-request.js +9 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/core/version.js +5 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/index.js +93 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/client/node-agent-storage-client.js +134 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/fs/file-path.js +73 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/fs/file-reader.js +13 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node/oss/oss-uploader.js +30 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/cjs/src/node.js +5 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/request-context.d.ts +12 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/request-context.js +17 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-base.d.ts +12 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-base.js +63 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v2.d.ts +6 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v2.js +9 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v4.d.ts +15 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/auth/sign-v4.js +47 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/client/agent-storage-client.d.ts +78 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/client/agent-storage-client.js +192 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/client-error.d.ts +3 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/client-error.js +6 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/service-error.d.ts +10 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/errors/service-error.js +12 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/headers.d.ts +14 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/headers.js +27 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/md5.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/md5.js +6 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/ots-json-client.d.ts +27 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/http/ots-json-client.js +151 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/base.d.ts +5 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/base.js +15 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/chunk.d.ts +47 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/chunk.js +61 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/document.d.ts +107 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/document.js +151 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/enums.d.ts +24 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/enums.js +28 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/file.d.ts +364 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/file.js +24 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/knowledge-base.d.ts +97 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/knowledge-base.js +108 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/memory.d.ts +1018 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/memory.js +684 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/metadata-filter.d.ts +74 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/metadata-filter.js +118 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/retrieve.d.ts +113 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/retrieve.js +140 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/unset.d.ts +3 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/unset.js +4 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/wiki.d.ts +118 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/models/wiki.js +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/serialization/to-json-request.d.ts +2 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/serialization/to-json-request.js +6 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/version.d.ts +2 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/core/version.js +2 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/index.d.ts +17 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/index.js +16 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/client/node-agent-storage-client.d.ts +39 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/client/node-agent-storage-client.js +130 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-path.d.ts +12 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-path.js +34 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-reader.d.ts +8 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/fs/file-reader.js +9 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/oss/oss-uploader.d.ts +17 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node/oss/oss-uploader.js +23 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/dist/src/node.js +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/agent-storage/package.json +67 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +1 -0
- 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 +1 -0
- 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/internal/abortable-fetch.d.ts +13 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js +40 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +21 -9
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +7 -7
- 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 +27 -20
- 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 +55 -37
- 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/dist/types.d.ts +6 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/types.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts +18 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js +100 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.d.ts +1 -0
- 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 +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/index.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts +13 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.d.ts.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js +40 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/internal/abortable-fetch.js.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js +21 -9
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.d.ts +7 -7
- 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 +27 -20
- 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 +55 -37
- 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/dist/types.d.ts +6 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts +18 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.d.ts.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js +100 -0
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/wiki-client.js.map +1 -0
- package/dist/output.d.ts.map +1 -1
- package/dist/output.js +1 -0
- package/dist/output.js.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-wmyic._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.li3cj._.js +0 -40
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0y0w3mg._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0.ooo1s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0b5cw4e._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p1cst6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0xza7lz._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.6x0yu._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.pa1e6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01snuz~._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06_hoj_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_aw2vr._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0brqbty._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0csuit-._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0eps5jg._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ez3yia._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0odjvc.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0pwlb77._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0wce254._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12l8jkb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0_z9696._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0grv2wq._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0jns_ph._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ymj2~2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-xwobg-a6si1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01bokygf48bnj.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/026lyw-ynx1og.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/04a.1c2rygy08.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05.2q9f0yx4e_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05_iqjh-v2gej.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07twdccs42b_-.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09v-qczj__g1x.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_8~9zgfm5f.8.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0_zw2y~vb_52n.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a2f-mxepv-y7.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0apfhv-v7oy7u.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bxt5icwb83xt.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dpi1comd-thc.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0eerrv808~6bh.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j6agpotrd_n4.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jbcdgtcgqemd.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jp7zmwvyv0bn.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k8mhea24d_kj.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0krt75we1wtcy.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ogrq_r43je48.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0prl9yrb8ksp8.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r4azm.3hswcs.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r6utd8g~.cc1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uj7ezedkm6ou.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x5qtkdg2trq9.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zatcw.k613lh.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zhfdjby7cj-q.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~naqbx3873~r.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13__t3s3ipfzl.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.8mq880kjoc.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16uky1ro-t_~9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/18absak_u0d85.js +0 -138
- /package/dist/dashboard-runtime/dashboard/.next/static/{8G6beqTEKH_-N0JljpgWT → bKUtNfKb47TOc1cpUk74A}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{8G6beqTEKH_-N0JljpgWT → bKUtNfKb47TOc1cpUk74A}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{8G6beqTEKH_-N0JljpgWT → bKUtNfKb47TOc1cpUk74A}/_ssgManifest.js +0 -0
|
@@ -7,7 +7,31 @@ import {
|
|
|
7
7
|
normalizeMemoryRunId,
|
|
8
8
|
type StorageMode,
|
|
9
9
|
} from "@/lib/memory-storage-mode";
|
|
10
|
-
import
|
|
10
|
+
import {
|
|
11
|
+
clampWikiEvidence,
|
|
12
|
+
clampWikiRetrievalError,
|
|
13
|
+
clampWikiRetrievalGroup,
|
|
14
|
+
MAX_WIKI_ERRORS,
|
|
15
|
+
MAX_WIKI_EVIDENCE,
|
|
16
|
+
MAX_WIKI_GROUPS,
|
|
17
|
+
MAX_WIKI_SOURCES,
|
|
18
|
+
normalizeRequiredWikiMetadata,
|
|
19
|
+
} from "@/lib/wiki-metadata-limits";
|
|
20
|
+
import type {
|
|
21
|
+
ChatMessage,
|
|
22
|
+
MemoryFilesCacheSummary,
|
|
23
|
+
RetrievedChunk,
|
|
24
|
+
RetrievalGroup,
|
|
25
|
+
WikiEvidence,
|
|
26
|
+
WikiRetrievalError,
|
|
27
|
+
WikiRetrievalGroup,
|
|
28
|
+
} from "@/types/llm-chat";
|
|
29
|
+
import type {
|
|
30
|
+
MemoryScope,
|
|
31
|
+
MemorySearchHit,
|
|
32
|
+
MemoryUnit,
|
|
33
|
+
SourceTurnRef,
|
|
34
|
+
} from "@/types/memory";
|
|
11
35
|
|
|
12
36
|
/** Legacy global key kept for read-only migration. */
|
|
13
37
|
export const CHAT_HISTORY_LEGACY_STORAGE_KEY = "tsagent.chat.sessions.v1";
|
|
@@ -95,6 +119,8 @@ export interface ChatSessionConfig {
|
|
|
95
119
|
retrieval?: ChatRetrievalConfig;
|
|
96
120
|
mounts: ChatSessionMount[];
|
|
97
121
|
memory?: ChatSessionMemoryBinding;
|
|
122
|
+
/** Allowlisted scalar config for the single Wiki owned by `memory` Scope. */
|
|
123
|
+
wiki?: { enabled: true; topK: number };
|
|
98
124
|
}
|
|
99
125
|
|
|
100
126
|
export interface ChatSession {
|
|
@@ -143,16 +169,448 @@ function belongsToScope(
|
|
|
143
169
|
);
|
|
144
170
|
}
|
|
145
171
|
|
|
172
|
+
function isRecord(raw: unknown): raw is Record<string, unknown> {
|
|
173
|
+
return !!raw && typeof raw === "object" && !Array.isArray(raw);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function isFiniteNumber(raw: unknown): raw is number {
|
|
177
|
+
return typeof raw === "number" && Number.isFinite(raw);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function sanitizeRetrievedChunk(raw: unknown): RetrievedChunk | null {
|
|
181
|
+
if (!isRecord(raw)) return null;
|
|
182
|
+
if (
|
|
183
|
+
typeof raw.docId !== "string" ||
|
|
184
|
+
!isFiniteNumber(raw.chunkId) ||
|
|
185
|
+
typeof raw.ossKey !== "string" ||
|
|
186
|
+
!isFiniteNumber(raw.score) ||
|
|
187
|
+
typeof raw.content !== "string" ||
|
|
188
|
+
typeof raw.chunkType !== "string"
|
|
189
|
+
) {
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const chunk: RetrievedChunk = {
|
|
194
|
+
docId: raw.docId,
|
|
195
|
+
chunkId: raw.chunkId,
|
|
196
|
+
ossKey: raw.ossKey,
|
|
197
|
+
score: raw.score,
|
|
198
|
+
content: raw.content,
|
|
199
|
+
chunkType: raw.chunkType,
|
|
200
|
+
};
|
|
201
|
+
if (typeof raw.imageBase64 === "string") chunk.imageBase64 = raw.imageBase64;
|
|
202
|
+
if (typeof raw.subspace === "string") chunk.subspace = raw.subspace;
|
|
203
|
+
if (typeof raw.knowledgeBaseName === "string") {
|
|
204
|
+
chunk.knowledgeBaseName = raw.knowledgeBaseName;
|
|
205
|
+
}
|
|
206
|
+
return chunk;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function sanitizeRetrievalGroup(raw: unknown): RetrievalGroup | null {
|
|
210
|
+
if (
|
|
211
|
+
!isRecord(raw) ||
|
|
212
|
+
typeof raw.knowledgeBaseName !== "string" ||
|
|
213
|
+
!Array.isArray(raw.chunks)
|
|
214
|
+
) {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
const group: RetrievalGroup = {
|
|
218
|
+
knowledgeBaseName: raw.knowledgeBaseName,
|
|
219
|
+
chunks: raw.chunks
|
|
220
|
+
.map(sanitizeRetrievedChunk)
|
|
221
|
+
.filter((chunk): chunk is RetrievedChunk => chunk !== null),
|
|
222
|
+
};
|
|
223
|
+
if (typeof raw.error === "string") group.error = raw.error;
|
|
224
|
+
return group;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function sanitizeMemoryScope(raw: unknown): MemoryScope | undefined {
|
|
228
|
+
if (!isRecord(raw) || typeof raw.appId !== "string") return undefined;
|
|
229
|
+
const scope: MemoryScope = { appId: raw.appId };
|
|
230
|
+
if (typeof raw.tenantId === "string") scope.tenantId = raw.tenantId;
|
|
231
|
+
if (typeof raw.agentId === "string") scope.agentId = raw.agentId;
|
|
232
|
+
if (typeof raw.runId === "string") scope.runId = raw.runId;
|
|
233
|
+
return scope;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function sanitizeSourceTurnRef(raw: unknown): SourceTurnRef | null {
|
|
237
|
+
if (
|
|
238
|
+
!isRecord(raw) ||
|
|
239
|
+
typeof raw.messageId !== "string" ||
|
|
240
|
+
!isFiniteNumber(raw.timestampMs)
|
|
241
|
+
) {
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
return { messageId: raw.messageId, timestampMs: raw.timestampMs };
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function sanitizeMemoryUnit(raw: unknown): MemoryUnit | null {
|
|
248
|
+
if (!isRecord(raw) || typeof raw.text !== "string") return null;
|
|
249
|
+
const unit: MemoryUnit = { text: raw.text };
|
|
250
|
+
if (typeof raw.id === "string") unit.id = raw.id;
|
|
251
|
+
if (typeof raw.memoryId === "string") unit.memoryId = raw.memoryId;
|
|
252
|
+
if (typeof raw.conversation_key === "string") {
|
|
253
|
+
unit.conversation_key = raw.conversation_key;
|
|
254
|
+
}
|
|
255
|
+
const scope = sanitizeMemoryScope(raw.scope);
|
|
256
|
+
if (scope) unit.scope = scope;
|
|
257
|
+
if (typeof raw.memcell_id === "string") unit.memcell_id = raw.memcell_id;
|
|
258
|
+
if (typeof raw.unit_type === "string") unit.unit_type = raw.unit_type;
|
|
259
|
+
if (Array.isArray(raw.source_turn_ids)) {
|
|
260
|
+
unit.source_turn_ids = raw.source_turn_ids.filter(
|
|
261
|
+
(item): item is string => typeof item === "string",
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
if (Array.isArray(raw.source_turn_refs)) {
|
|
265
|
+
unit.source_turn_refs = raw.source_turn_refs
|
|
266
|
+
.map(sanitizeSourceTurnRef)
|
|
267
|
+
.filter((item): item is SourceTurnRef => item !== null);
|
|
268
|
+
}
|
|
269
|
+
if (typeof raw.search_text === "string") unit.search_text = raw.search_text;
|
|
270
|
+
if (isFiniteNumber(raw.salience)) unit.salience = raw.salience;
|
|
271
|
+
if (isFiniteNumber(raw.version)) unit.version = raw.version;
|
|
272
|
+
if (typeof raw.deleted === "boolean") unit.deleted = raw.deleted;
|
|
273
|
+
if (typeof raw.created_at === "string") unit.created_at = raw.created_at;
|
|
274
|
+
if (typeof raw.updated_at === "string") unit.updated_at = raw.updated_at;
|
|
275
|
+
if (isFiniteNumber(raw.score)) unit.score = raw.score;
|
|
276
|
+
if (typeof raw.createdAt === "string" || isFiniteNumber(raw.createdAt)) {
|
|
277
|
+
unit.createdAt = raw.createdAt;
|
|
278
|
+
}
|
|
279
|
+
if (typeof raw.updatedAt === "string" || isFiniteNumber(raw.updatedAt)) {
|
|
280
|
+
unit.updatedAt = raw.updatedAt;
|
|
281
|
+
}
|
|
282
|
+
return unit;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function sanitizeMemorySearchHit(raw: unknown): MemorySearchHit | null {
|
|
286
|
+
if (!isRecord(raw)) return null;
|
|
287
|
+
const unit = sanitizeMemoryUnit(raw.unit);
|
|
288
|
+
if (!unit) return null;
|
|
289
|
+
const hit: MemorySearchHit = { unit };
|
|
290
|
+
if (isFiniteNumber(raw.score)) hit.score = raw.score;
|
|
291
|
+
if (isFiniteNumber(raw.similarity)) hit.similarity = raw.similarity;
|
|
292
|
+
if (typeof raw.source === "string") hit.source = raw.source;
|
|
293
|
+
return hit;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function sanitizeMemoryFiles(raw: unknown): ChatMessage["memoryFiles"] {
|
|
297
|
+
if (!Array.isArray(raw)) return undefined;
|
|
298
|
+
return raw.flatMap((item) => {
|
|
299
|
+
if (
|
|
300
|
+
!isRecord(item) ||
|
|
301
|
+
typeof item.rel !== "string" ||
|
|
302
|
+
!isFiniteNumber(item.size)
|
|
303
|
+
) {
|
|
304
|
+
return [];
|
|
305
|
+
}
|
|
306
|
+
return [
|
|
307
|
+
{
|
|
308
|
+
rel: item.rel,
|
|
309
|
+
size: item.size,
|
|
310
|
+
...(typeof item.sha256 === "string" ? { sha256: item.sha256 } : {}),
|
|
311
|
+
},
|
|
312
|
+
];
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function sanitizeMemoryFilesCache(
|
|
317
|
+
raw: unknown,
|
|
318
|
+
): MemoryFilesCacheSummary | undefined {
|
|
319
|
+
if (
|
|
320
|
+
!isRecord(raw) ||
|
|
321
|
+
typeof raw.ok !== "boolean" ||
|
|
322
|
+
!isFiniteNumber(raw.listed) ||
|
|
323
|
+
!isFiniteNumber(raw.loaded) ||
|
|
324
|
+
!isFiniteNumber(raw.reused) ||
|
|
325
|
+
!isFiniteNumber(raw.totalBytes) ||
|
|
326
|
+
typeof raw.truncated !== "boolean"
|
|
327
|
+
) {
|
|
328
|
+
return undefined;
|
|
329
|
+
}
|
|
330
|
+
const cache: MemoryFilesCacheSummary = {
|
|
331
|
+
ok: raw.ok,
|
|
332
|
+
listed: raw.listed,
|
|
333
|
+
loaded: raw.loaded,
|
|
334
|
+
reused: raw.reused,
|
|
335
|
+
totalBytes: raw.totalBytes,
|
|
336
|
+
truncated: raw.truncated,
|
|
337
|
+
};
|
|
338
|
+
if (typeof raw.error === "string") cache.error = raw.error;
|
|
339
|
+
return cache;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function sanitizeSessionWikiConfig(
|
|
343
|
+
raw: unknown,
|
|
344
|
+
hasValidMemoryBinding: boolean,
|
|
345
|
+
): ChatSessionConfig["wiki"] | undefined {
|
|
346
|
+
if (!hasValidMemoryBinding || !isRecord(raw)) return undefined;
|
|
347
|
+
if (
|
|
348
|
+
raw.enabled !== true ||
|
|
349
|
+
!Number.isInteger(raw.topK) ||
|
|
350
|
+
(raw.topK as number) < 1 ||
|
|
351
|
+
(raw.topK as number) > 10
|
|
352
|
+
) {
|
|
353
|
+
return undefined;
|
|
354
|
+
}
|
|
355
|
+
return { enabled: true, topK: raw.topK as number };
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function sanitizeWikiEvidence(raw: unknown): WikiEvidence | null {
|
|
359
|
+
if (!raw || typeof raw !== "object") return null;
|
|
360
|
+
const value = raw as Record<string, unknown>;
|
|
361
|
+
const wikiName = normalizeRequiredWikiMetadata(value.wikiName);
|
|
362
|
+
const path = normalizeRequiredWikiMetadata(value.path);
|
|
363
|
+
if (
|
|
364
|
+
typeof value.reference !== "string" ||
|
|
365
|
+
!/^W[1-6]$/.test(value.reference) ||
|
|
366
|
+
!wikiName ||
|
|
367
|
+
!path ||
|
|
368
|
+
typeof value.truncated !== "boolean" ||
|
|
369
|
+
!Number.isInteger(value.injectedChars) ||
|
|
370
|
+
(value.injectedChars as number) < 0 ||
|
|
371
|
+
(value.injectedChars as number) > 8_000
|
|
372
|
+
) {
|
|
373
|
+
return null;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return clampWikiEvidence({
|
|
377
|
+
reference: value.reference as `W${number}`,
|
|
378
|
+
wikiName,
|
|
379
|
+
path,
|
|
380
|
+
...(typeof value.title === "string" ? { title: value.title } : {}),
|
|
381
|
+
...(typeof value.type === "string" ? { type: value.type } : {}),
|
|
382
|
+
...(typeof value.description === "string"
|
|
383
|
+
? { description: value.description }
|
|
384
|
+
: {}),
|
|
385
|
+
...(typeof value.score === "number" ? { score: value.score } : {}),
|
|
386
|
+
...(Array.isArray(value.sources)
|
|
387
|
+
? {
|
|
388
|
+
sources: value.sources
|
|
389
|
+
.slice(0, MAX_WIKI_SOURCES)
|
|
390
|
+
.filter((item): item is string => typeof item === "string"),
|
|
391
|
+
}
|
|
392
|
+
: {}),
|
|
393
|
+
truncated: value.truncated,
|
|
394
|
+
injectedChars: value.injectedChars as number,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function sanitizeWikiRetrievalError(raw: unknown): WikiRetrievalError | null {
|
|
399
|
+
if (!raw || typeof raw !== "object") return null;
|
|
400
|
+
const value = raw as Record<string, unknown>;
|
|
401
|
+
const code = normalizeRequiredWikiMetadata(value.code);
|
|
402
|
+
const message = normalizeRequiredWikiMetadata(value.message);
|
|
403
|
+
if (
|
|
404
|
+
!code ||
|
|
405
|
+
!message ||
|
|
406
|
+
(value.stage !== "validate" &&
|
|
407
|
+
value.stage !== "search" &&
|
|
408
|
+
value.stage !== "read" &&
|
|
409
|
+
value.stage !== "budget")
|
|
410
|
+
) {
|
|
411
|
+
return null;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return clampWikiRetrievalError({
|
|
415
|
+
code,
|
|
416
|
+
message,
|
|
417
|
+
...(typeof value.requestId === "string"
|
|
418
|
+
? { requestId: value.requestId }
|
|
419
|
+
: {}),
|
|
420
|
+
...(typeof value.httpStatus === "number"
|
|
421
|
+
? { httpStatus: value.httpStatus }
|
|
422
|
+
: {}),
|
|
423
|
+
stage: value.stage,
|
|
424
|
+
...(typeof value.path === "string" ? { path: value.path } : {}),
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
function sanitizeWikiRetrievalGroup(raw: unknown): WikiRetrievalGroup | null {
|
|
429
|
+
if (!raw || typeof raw !== "object") return null;
|
|
430
|
+
const value = raw as Record<string, unknown>;
|
|
431
|
+
const wikiName = normalizeRequiredWikiMetadata(value.wikiName);
|
|
432
|
+
if (!wikiName || !Array.isArray(value.pages)) {
|
|
433
|
+
return null;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
return clampWikiRetrievalGroup({
|
|
437
|
+
wikiName,
|
|
438
|
+
pages: value.pages
|
|
439
|
+
.slice(0, MAX_WIKI_EVIDENCE)
|
|
440
|
+
.map(sanitizeWikiEvidence)
|
|
441
|
+
.filter((page): page is WikiEvidence => page !== null),
|
|
442
|
+
...(Array.isArray(value.errors)
|
|
443
|
+
? {
|
|
444
|
+
errors: value.errors
|
|
445
|
+
.slice(0, MAX_WIKI_ERRORS)
|
|
446
|
+
.map(sanitizeWikiRetrievalError)
|
|
447
|
+
.filter((error): error is WikiRetrievalError => error !== null),
|
|
448
|
+
}
|
|
449
|
+
: {}),
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
function sanitizeWikiScope(raw: unknown): ChatMessage["wikiScope"] | null {
|
|
454
|
+
if (!raw || typeof raw !== "object") return null;
|
|
455
|
+
const value = raw as Record<string, unknown>;
|
|
456
|
+
if (
|
|
457
|
+
typeof value.appId !== "string" ||
|
|
458
|
+
typeof value.tenantId !== "string" ||
|
|
459
|
+
typeof value.agentId !== "string" ||
|
|
460
|
+
typeof value.runId !== "string"
|
|
461
|
+
) {
|
|
462
|
+
return null;
|
|
463
|
+
}
|
|
464
|
+
return {
|
|
465
|
+
appId: value.appId,
|
|
466
|
+
tenantId: value.tenantId,
|
|
467
|
+
agentId: value.agentId,
|
|
468
|
+
runId: value.runId,
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
|
|
146
472
|
function sanitizeSessionMessages(messages: unknown[]): ChatMessage[] {
|
|
147
473
|
return messages.flatMap((message) => {
|
|
148
|
-
if (!message
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
474
|
+
if (!isRecord(message)) return [];
|
|
475
|
+
const { id, role, content, createdAt } = message;
|
|
476
|
+
if (
|
|
477
|
+
typeof id !== "string" ||
|
|
478
|
+
(role !== "user" && role !== "assistant" && role !== "system") ||
|
|
479
|
+
typeof content !== "string" ||
|
|
480
|
+
!isFiniteNumber(createdAt)
|
|
481
|
+
) {
|
|
482
|
+
return [];
|
|
483
|
+
}
|
|
484
|
+
const value = message;
|
|
485
|
+
const sanitized: ChatMessage = {
|
|
486
|
+
id,
|
|
487
|
+
role,
|
|
488
|
+
content,
|
|
489
|
+
createdAt,
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
if (typeof value.reasoning === "string")
|
|
493
|
+
sanitized.reasoning = value.reasoning;
|
|
494
|
+
if (isFiniteNumber(value.reasoningStartedAt)) {
|
|
495
|
+
sanitized.reasoningStartedAt = value.reasoningStartedAt;
|
|
496
|
+
}
|
|
497
|
+
if (isFiniteNumber(value.reasoningCompletedAt)) {
|
|
498
|
+
sanitized.reasoningCompletedAt = value.reasoningCompletedAt;
|
|
499
|
+
}
|
|
500
|
+
if (typeof value.usingRag === "boolean")
|
|
501
|
+
sanitized.usingRag = value.usingRag;
|
|
502
|
+
if (typeof value.queryRewriteFailed === "boolean") {
|
|
503
|
+
sanitized.queryRewriteFailed = value.queryRewriteFailed;
|
|
504
|
+
}
|
|
505
|
+
if (typeof value.queryRewriteError === "string") {
|
|
506
|
+
sanitized.queryRewriteError = value.queryRewriteError;
|
|
507
|
+
}
|
|
508
|
+
if (typeof value.retrievalQuery === "string") {
|
|
509
|
+
sanitized.retrievalQuery = value.retrievalQuery;
|
|
510
|
+
}
|
|
511
|
+
if (typeof value.retrievalQueryRewritten === "boolean") {
|
|
512
|
+
sanitized.retrievalQueryRewritten = value.retrievalQueryRewritten;
|
|
513
|
+
}
|
|
514
|
+
if (Array.isArray(value.retrievedChunks)) {
|
|
515
|
+
sanitized.retrievedChunks = value.retrievedChunks
|
|
516
|
+
.map(sanitizeRetrievedChunk)
|
|
517
|
+
.filter((chunk): chunk is RetrievedChunk => chunk !== null);
|
|
518
|
+
}
|
|
519
|
+
if (Array.isArray(value.retrievalGroups)) {
|
|
520
|
+
sanitized.retrievalGroups = value.retrievalGroups
|
|
521
|
+
.map(sanitizeRetrievalGroup)
|
|
522
|
+
.filter((group): group is RetrievalGroup => group !== null);
|
|
523
|
+
}
|
|
524
|
+
if (Array.isArray(value.memoryHits)) {
|
|
525
|
+
sanitized.memoryHits = value.memoryHits
|
|
526
|
+
.map(sanitizeMemorySearchHit)
|
|
527
|
+
.filter((hit): hit is MemorySearchHit => hit !== null);
|
|
528
|
+
}
|
|
529
|
+
if (typeof value.memoryQuery === "string") {
|
|
530
|
+
sanitized.memoryQuery = value.memoryQuery;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (typeof value.wikiQuery === "string") {
|
|
534
|
+
sanitized.wikiQuery = value.wikiQuery;
|
|
535
|
+
}
|
|
536
|
+
if (Number.isInteger(value.wikiCount) && (value.wikiCount as number) >= 0) {
|
|
537
|
+
sanitized.wikiCount = value.wikiCount as number;
|
|
538
|
+
}
|
|
539
|
+
if (typeof value.wikiRetrievalDone === "boolean") {
|
|
540
|
+
sanitized.wikiRetrievalDone = value.wikiRetrievalDone;
|
|
541
|
+
}
|
|
542
|
+
if (Array.isArray(value.wikiEvidence)) {
|
|
543
|
+
sanitized.wikiEvidence = value.wikiEvidence
|
|
544
|
+
.slice(0, MAX_WIKI_EVIDENCE)
|
|
545
|
+
.map(sanitizeWikiEvidence)
|
|
546
|
+
.filter((page): page is WikiEvidence => page !== null);
|
|
547
|
+
}
|
|
548
|
+
if (Array.isArray(value.wikiRetrievalGroups)) {
|
|
549
|
+
sanitized.wikiRetrievalGroups = value.wikiRetrievalGroups
|
|
550
|
+
.slice(0, MAX_WIKI_GROUPS)
|
|
551
|
+
.map(sanitizeWikiRetrievalGroup)
|
|
552
|
+
.filter((group): group is WikiRetrievalGroup => group !== null);
|
|
553
|
+
}
|
|
554
|
+
if (
|
|
555
|
+
Number.isInteger(value.wikiTotalContextChars) &&
|
|
556
|
+
(value.wikiTotalContextChars as number) >= 0
|
|
557
|
+
) {
|
|
558
|
+
sanitized.wikiTotalContextChars = value.wikiTotalContextChars as number;
|
|
559
|
+
}
|
|
560
|
+
if (typeof value.wikiMemoryStoreName === "string") {
|
|
561
|
+
sanitized.wikiMemoryStoreName = value.wikiMemoryStoreName;
|
|
562
|
+
}
|
|
563
|
+
const wikiScope = sanitizeWikiScope(value.wikiScope);
|
|
564
|
+
if (wikiScope) sanitized.wikiScope = wikiScope;
|
|
565
|
+
|
|
566
|
+
const memoryFiles = sanitizeMemoryFiles(value.memoryFiles);
|
|
567
|
+
if (memoryFiles) sanitized.memoryFiles = memoryFiles;
|
|
568
|
+
const memoryFilesCache = sanitizeMemoryFilesCache(value.memoryFilesCache);
|
|
569
|
+
if (memoryFilesCache) sanitized.memoryFilesCache = memoryFilesCache;
|
|
570
|
+
if (typeof value.memoryFilesStoreName === "string") {
|
|
571
|
+
sanitized.memoryFilesStoreName = value.memoryFilesStoreName;
|
|
572
|
+
}
|
|
573
|
+
if (typeof value.memoryFilesWritable === "boolean") {
|
|
574
|
+
sanitized.memoryFilesWritable = value.memoryFilesWritable;
|
|
575
|
+
}
|
|
576
|
+
const memoryFilesScope = sanitizeWikiScope(value.memoryFilesScope);
|
|
577
|
+
if (memoryFilesScope) sanitized.memoryFilesScope = memoryFilesScope;
|
|
578
|
+
|
|
579
|
+
if (
|
|
580
|
+
value.memorySaveStatus === "saving" ||
|
|
581
|
+
value.memorySaveStatus === "saved" ||
|
|
582
|
+
value.memorySaveStatus === "unchanged" ||
|
|
583
|
+
value.memorySaveStatus === "error"
|
|
584
|
+
) {
|
|
585
|
+
sanitized.memorySaveStatus = value.memorySaveStatus;
|
|
586
|
+
}
|
|
587
|
+
if (typeof value.memorySavePath === "string") {
|
|
588
|
+
sanitized.memorySavePath = value.memorySavePath;
|
|
589
|
+
}
|
|
590
|
+
if (isFiniteNumber(value.memorySaveCount)) {
|
|
591
|
+
sanitized.memorySaveCount = value.memorySaveCount;
|
|
592
|
+
}
|
|
593
|
+
if (typeof value.memorySaveError === "string") {
|
|
594
|
+
sanitized.memorySaveError = value.memorySaveError;
|
|
595
|
+
}
|
|
596
|
+
if (typeof value.turnId === "string") sanitized.turnId = value.turnId;
|
|
597
|
+
if (
|
|
598
|
+
value.status === "streaming" ||
|
|
599
|
+
value.status === "done" ||
|
|
600
|
+
value.status === "error"
|
|
601
|
+
) {
|
|
602
|
+
sanitized.status = value.status;
|
|
603
|
+
}
|
|
604
|
+
if (typeof value.errorMessage === "string") {
|
|
605
|
+
sanitized.errorMessage = value.errorMessage;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
if (sanitized.memorySaveStatus === "saving") {
|
|
609
|
+
delete sanitized.memorySaveStatus;
|
|
610
|
+
delete sanitized.memorySavePath;
|
|
611
|
+
delete sanitized.memorySaveCount;
|
|
612
|
+
delete sanitized.memorySaveError;
|
|
613
|
+
}
|
|
156
614
|
return [sanitized];
|
|
157
615
|
});
|
|
158
616
|
}
|
|
@@ -169,6 +627,116 @@ function createLegacyRunId(seed: string): string {
|
|
|
169
627
|
return `run_legacy_${hash.toString(16).padStart(16, "0")}`;
|
|
170
628
|
}
|
|
171
629
|
|
|
630
|
+
function sanitizeRetrievalConfig(
|
|
631
|
+
raw: unknown,
|
|
632
|
+
): ChatRetrievalConfig | undefined {
|
|
633
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return undefined;
|
|
634
|
+
const value = raw as Record<string, unknown>;
|
|
635
|
+
const retrieval: ChatRetrievalConfig = {};
|
|
636
|
+
if (Array.isArray(value.searchType)) {
|
|
637
|
+
retrieval.searchType = value.searchType.filter(
|
|
638
|
+
(item): item is "DENSE_VECTOR" | "FULL_TEXT" =>
|
|
639
|
+
item === "DENSE_VECTOR" || item === "FULL_TEXT",
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
if (
|
|
643
|
+
value.rerankType === "RRF" ||
|
|
644
|
+
value.rerankType === "WEIGHT" ||
|
|
645
|
+
value.rerankType === "MODEL"
|
|
646
|
+
) {
|
|
647
|
+
retrieval.rerankType = value.rerankType;
|
|
648
|
+
}
|
|
649
|
+
if (isFiniteNumber(value.rrfK)) retrieval.rrfK = value.rrfK;
|
|
650
|
+
if (isFiniteNumber(value.rrfDenseWeight)) {
|
|
651
|
+
retrieval.rrfDenseWeight = value.rrfDenseWeight;
|
|
652
|
+
}
|
|
653
|
+
if (isFiniteNumber(value.rrfFullTextWeight)) {
|
|
654
|
+
retrieval.rrfFullTextWeight = value.rrfFullTextWeight;
|
|
655
|
+
}
|
|
656
|
+
if (isFiniteNumber(value.weightDense)) {
|
|
657
|
+
retrieval.weightDense = value.weightDense;
|
|
658
|
+
}
|
|
659
|
+
if (isFiniteNumber(value.weightFullText)) {
|
|
660
|
+
retrieval.weightFullText = value.weightFullText;
|
|
661
|
+
}
|
|
662
|
+
if (typeof value.modelName === "string") {
|
|
663
|
+
retrieval.modelName = value.modelName;
|
|
664
|
+
}
|
|
665
|
+
if (typeof value.modelProvider === "string") {
|
|
666
|
+
retrieval.modelProvider = value.modelProvider;
|
|
667
|
+
}
|
|
668
|
+
return retrieval;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
function sanitizeSessionMounts(raw: unknown): ChatSessionMount[] {
|
|
672
|
+
if (!Array.isArray(raw)) return [];
|
|
673
|
+
return raw.flatMap((item) => {
|
|
674
|
+
if (!item || typeof item !== "object") return [];
|
|
675
|
+
const value = item as Record<string, unknown>;
|
|
676
|
+
if (
|
|
677
|
+
typeof value.id !== "string" ||
|
|
678
|
+
typeof value.knowledgeBaseName !== "string"
|
|
679
|
+
) {
|
|
680
|
+
return [];
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
const mount: ChatSessionMount = {
|
|
684
|
+
id: value.id,
|
|
685
|
+
knowledgeBaseName: value.knowledgeBaseName,
|
|
686
|
+
};
|
|
687
|
+
if (
|
|
688
|
+
Array.isArray(value.subspace) &&
|
|
689
|
+
value.subspace.length > 0 &&
|
|
690
|
+
value.subspace.every((entry) => typeof entry === "string")
|
|
691
|
+
) {
|
|
692
|
+
mount.subspace = value.subspace as string[];
|
|
693
|
+
}
|
|
694
|
+
const retrieval = sanitizeRetrievalConfig(value.retrieval);
|
|
695
|
+
if (retrieval) mount.retrieval = retrieval;
|
|
696
|
+
if (isFiniteNumber(value.topK)) mount.topK = value.topK;
|
|
697
|
+
return [mount];
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
function sanitizeSessionConfig(
|
|
702
|
+
raw: unknown,
|
|
703
|
+
sessionId: string,
|
|
704
|
+
normalizeRunId: boolean,
|
|
705
|
+
): ChatSessionConfig {
|
|
706
|
+
const value =
|
|
707
|
+
raw && typeof raw === "object" && !Array.isArray(raw)
|
|
708
|
+
? (raw as Record<string, unknown>)
|
|
709
|
+
: {};
|
|
710
|
+
const memory = sanitizeMemoryBinding(value.memory, sessionId, normalizeRunId);
|
|
711
|
+
const config: ChatSessionConfig = {
|
|
712
|
+
mounts: sanitizeSessionMounts(value.mounts),
|
|
713
|
+
};
|
|
714
|
+
if (typeof value.providerId === "string")
|
|
715
|
+
config.providerId = value.providerId;
|
|
716
|
+
if (typeof value.model === "string") config.model = value.model;
|
|
717
|
+
if (typeof value.systemPrompt === "string") {
|
|
718
|
+
config.systemPrompt = value.systemPrompt;
|
|
719
|
+
}
|
|
720
|
+
if (isFiniteNumber(value.temperature)) {
|
|
721
|
+
config.temperature = value.temperature;
|
|
722
|
+
}
|
|
723
|
+
if (isFiniteNumber(value.aggregateTopK)) {
|
|
724
|
+
config.aggregateTopK = value.aggregateTopK;
|
|
725
|
+
}
|
|
726
|
+
if (isFiniteNumber(value.perKbTopK)) {
|
|
727
|
+
config.perKbTopK = value.perKbTopK;
|
|
728
|
+
}
|
|
729
|
+
const retrieval = sanitizeRetrievalConfig(value.retrieval);
|
|
730
|
+
if (retrieval) config.retrieval = retrieval;
|
|
731
|
+
if (memory) config.memory = memory;
|
|
732
|
+
const wiki = sanitizeSessionWikiConfig(
|
|
733
|
+
value.wiki,
|
|
734
|
+
memory?.storageMode !== undefined,
|
|
735
|
+
);
|
|
736
|
+
if (wiki) config.wiki = wiki;
|
|
737
|
+
return config;
|
|
738
|
+
}
|
|
739
|
+
|
|
172
740
|
function sanitizeSessions(parsed: unknown): ChatSession[] {
|
|
173
741
|
if (!Array.isArray(parsed)) return [];
|
|
174
742
|
const sessions = parsed.filter(
|
|
@@ -176,29 +744,26 @@ function sanitizeSessions(parsed: unknown): ChatSession[] {
|
|
|
176
744
|
!!s &&
|
|
177
745
|
typeof s === "object" &&
|
|
178
746
|
typeof (s as ChatSession).id === "string" &&
|
|
747
|
+
typeof (s as ChatSession).title === "string" &&
|
|
748
|
+
isFiniteNumber((s as ChatSession).updatedAt) &&
|
|
179
749
|
Array.isArray((s as ChatSession).messages),
|
|
180
750
|
);
|
|
181
|
-
return sessions.map((s) =>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
...(m.retrieval ? { retrieval: m.retrieval } : {}),
|
|
192
|
-
...(typeof m.topK === "number" ? { topK: m.topK } : {}),
|
|
193
|
-
})),
|
|
194
|
-
memory: sanitizeMemoryBinding(s.config?.memory, s.id),
|
|
195
|
-
},
|
|
196
|
-
}));
|
|
751
|
+
return sessions.map((s) => {
|
|
752
|
+
return {
|
|
753
|
+
id: s.id,
|
|
754
|
+
title: s.title,
|
|
755
|
+
updatedAt: s.updatedAt,
|
|
756
|
+
activeInstance: normalizeActiveInstance(s.activeInstance),
|
|
757
|
+
config: sanitizeSessionConfig(s.config, s.id, true),
|
|
758
|
+
messages: sanitizeSessionMessages(s.messages),
|
|
759
|
+
};
|
|
760
|
+
});
|
|
197
761
|
}
|
|
198
762
|
|
|
199
763
|
function sanitizeMemoryBinding(
|
|
200
764
|
raw: unknown,
|
|
201
765
|
sessionId: string,
|
|
766
|
+
normalizeRunId = true,
|
|
202
767
|
): ChatSessionMemoryBinding | undefined {
|
|
203
768
|
if (!raw || typeof raw !== "object") return undefined;
|
|
204
769
|
const r = raw as Partial<ChatSessionMemoryBinding>;
|
|
@@ -217,17 +782,19 @@ function sanitizeMemoryBinding(
|
|
|
217
782
|
) {
|
|
218
783
|
return undefined;
|
|
219
784
|
}
|
|
220
|
-
const runId =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
785
|
+
const runId = normalizeRunId
|
|
786
|
+
? normalizeMemoryRunId(r.storageMode, s.runId, () =>
|
|
787
|
+
createLegacyRunId(
|
|
788
|
+
JSON.stringify([
|
|
789
|
+
sessionId,
|
|
790
|
+
r.memoryStoreName,
|
|
791
|
+
s.appId,
|
|
792
|
+
s.tenantId,
|
|
793
|
+
s.agentId,
|
|
794
|
+
]),
|
|
795
|
+
),
|
|
796
|
+
)
|
|
797
|
+
: s.runId;
|
|
231
798
|
return {
|
|
232
799
|
// 缺失 binding id 只可能来自老快照或手动损坏的数据;写 scope 的 runId
|
|
233
800
|
// 则在上方用会话与 scope seed 做确定性修复,不依赖这个临时 UI key。
|
|
@@ -398,18 +965,32 @@ export function upsertSession(
|
|
|
398
965
|
session: ChatSession,
|
|
399
966
|
activeInstance: string | null | undefined,
|
|
400
967
|
): void {
|
|
968
|
+
if (
|
|
969
|
+
typeof session.id !== "string" ||
|
|
970
|
+
typeof session.title !== "string" ||
|
|
971
|
+
!isFiniteNumber(session.updatedAt) ||
|
|
972
|
+
!Array.isArray(session.messages)
|
|
973
|
+
) {
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
401
976
|
const scope = normalizeActiveInstance(activeInstance);
|
|
402
977
|
const all = readAll(scope);
|
|
403
978
|
// Truncate the session's message list to the tail so a single runaway
|
|
404
979
|
// conversation cannot consume the whole localStorage budget.
|
|
405
|
-
const scopedSession = {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
980
|
+
const scopedSession: ChatSession = {
|
|
981
|
+
id: session.id,
|
|
982
|
+
title: session.title,
|
|
983
|
+
updatedAt: session.updatedAt,
|
|
984
|
+
activeInstance: scope,
|
|
985
|
+
config: sanitizeSessionConfig(session.config, session.id, false),
|
|
986
|
+
messages: sanitizeSessionMessages(session.messages),
|
|
987
|
+
};
|
|
988
|
+
if (scopedSession.messages.length > MAX_MESSAGES_PER_SESSION) {
|
|
989
|
+
scopedSession.messages = scopedSession.messages.slice(
|
|
990
|
+
-MAX_MESSAGES_PER_SESSION,
|
|
991
|
+
);
|
|
992
|
+
}
|
|
993
|
+
const capped = scopedSession;
|
|
413
994
|
const idx = all.findIndex((s) => s.id === capped.id);
|
|
414
995
|
if (idx >= 0) {
|
|
415
996
|
all[idx] = capped;
|