@tablestore/tablestore-agent-cli 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +4 -4
- package/dist/dashboard-runtime/dashboard/.next/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.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/scope/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/tasks/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/wiki/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.rsc +16 -16
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +16 -16
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/api-keys/[id]/custom-policy/route.js.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +3 -3
- 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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/file-memory/[action]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +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.nft.json +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.nft.json +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.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/ingest/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/page/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/pages/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/search/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/source/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/wikis/sources/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +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.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +11 -11
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0-e5iv2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03j_ekh._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__07k_8vo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0esucs7._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0z19yd0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07er-7t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__09556l4._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ejd~qu._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0hbevlv._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0xqm21n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0-yhfok._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.eh64w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06umrt-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0a-deba._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0au8umj._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f3_q1r._.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/_0gt9qp0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ih5--w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0j4mfzx._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_06ofr7j._.js → _0j_44th._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_06.3nzk._.js → _0mn4dgd._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0d_nd-j._.js → _0nc~.w2._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0p-bup8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0psdvqq._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0rd1b-.._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t_-u16._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0u0~-~-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0vw3mzw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ww5s91._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xm2tp8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xutx8t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0ggq95f._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0x60pxf._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0xaihln._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_api-keys_page_tsx_0lb6fu7._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_[dreamId]_page_tsx_0wy3tv6._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_dream_page_tsx_0uzzpvs._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_layout_tsx_0rbi41w._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_scope_page_tsx_01rq2zq._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_search_page_tsx_0rj3dkc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_tasks_page_tsx_0a_bgx4._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_units_page_tsx_0.6xnei._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_memory_memory-files-browser_tsx_0o2~94-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_i18n_i18n-context_tsx_0c39ewr._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_03py6n-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_08hzj0f._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0_mks~s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0xbb09m._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/pages/404.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/pages/500.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/server-reference-manifest.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-b36b4si6az5.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-q4fucd6l5ip.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{14t.r5~ls3k0x.js → 03qrjs4w.7yz3.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/04uxooijjqs-9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tm8srceyz1j.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tpejw1f.2jd.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b_~fcwy9vo2r.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0crw5ciecbvir.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cy7y~ef_6m-s.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dl5t6e508o8k.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0expqv.~8a3wr.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gdmaffoezvcu.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hoybc7spk4vg.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0k6m5~gmu0f8w.js → 0k9my4lhyvwbd.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0lfx3ykqc9uiy.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m2j5ne9j7dft.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m50djlkcegw9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0mg.g5g33nh.~.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0mit8g2.vh7a9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o9quk2z~1ez0.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o~zjik9-6a1f.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0p6zd_ss6.14_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0qccdw9ussvne.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{1204oli3aouy7.js → 0teq2sa-33s3g.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0upl.e~taktf9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v1ulq51wmrto.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v5mmaebktnw1.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0vp-dv9_z334e.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0w9eqc5ya-oai.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x0ppjv_4yap7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xbqtv-jcph-2.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~m6ml547qzpo.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/10s~90qej98.b.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/12vri~chu44bu.js +9 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/13jqvu~hww3b4.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{0idn9fvygbi9d.js → 13wh4v_j6tlns.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/16.18mrzg-4wl.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/162doi8c0o5ot.js +1 -0
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/[dreamId]/page.tsx +6 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/dream/page.tsx +3 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +5 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/scope/page.tsx +24 -16
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/search/page.tsx +77 -21
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/settings/page.tsx +18 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +89 -47
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/memory-retrieval.ts +72 -4
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/route.ts +19 -2
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/scopes/route.ts +123 -8
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/search/route.ts +21 -8
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/route.ts +11 -4
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-config-context.tsx +2 -5
- package/dist/dashboard-runtime/dashboard/src/components/chat/wiki-bind-section.tsx +2 -4
- package/dist/dashboard-runtime/dashboard/src/components/layout/language-toggle.tsx +19 -16
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar-mobile.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-details-panel.tsx +32 -10
- package/dist/dashboard-runtime/dashboard/src/components/memory/file-mutation-dialogs.tsx +14 -2
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-add-dialog.tsx +21 -3
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-create-form.tsx +50 -38
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-files-browser.tsx +46 -10
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-requests-table.tsx +7 -6
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-scope-bar.tsx +13 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-form.tsx +384 -70
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-search-results.tsx +238 -57
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-settings-form.tsx +88 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-card.tsx +4 -1
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-tasks-table.tsx +3 -2
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-detail-panel.tsx +19 -4
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-unit-table.tsx +8 -5
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-directory-explorer.tsx +384 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-filter-builder.tsx +393 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/scope-workspace.tsx +6 -2
- package/dist/dashboard-runtime/dashboard/src/components/shared/copyable-id.tsx +69 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +2 -3
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/en.ts +121 -14
- package/dist/dashboard-runtime/dashboard/src/i18n/locales/zh.ts +116 -12
- package/dist/dashboard-runtime/dashboard/src/lib/memory-storage-mode.ts +140 -33
- package/dist/dashboard-runtime/dashboard/src/lib/memory-units-view.ts +9 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +2 -7
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +13 -0
- package/dist/dashboard-runtime/dashboard/src/lib/scope-directory.ts +97 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/memory-store-contract.ts +41 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/scope-filter-validation.ts +186 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/services/memory.ts +16 -6
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +95 -4
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/README.md +2 -2
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/glib-2.0/include/glibconfig.h +9 -8
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib → sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3} +0 -0
- package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/package.json +11 -5
- package/dist/dashboard-runtime/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/dist/dashboard-runtime/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/package.json +13 -7
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0is6qso._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q9fgt6._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0w_ig2a._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zmo~nd._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13g_f9w._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__05kcz99._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__06l7w~r._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__07fsbff._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0_6myqa._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0d-z.x1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_00.la1c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_01r6jx1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04rasxw._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_05__-74._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_05wwgdw._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f.xs7l._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jt60z2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0k7q0ug._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0kaclzw._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0lstkpb._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0qw41co._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0vfgz-v._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0y4mxf8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_119lxvo._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_079nj-_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0bhjp9s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0..ymrl._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00arje5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_08h.f_8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0pf30rh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_12_d6fg._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-88a30l.a1sg.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01nixb3ddw4hy.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/01u9hj_9~5-vg.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02q3tpry1ajx9.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/057-rg6~0wki8.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05d8-45s941bx.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07q8af71w17xl.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07v6llp0fv6iq.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a9.rr50h5ypa.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0axnv6wy1_hr7.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bbcwyy.xvpd0.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cfrd_r4jr_ip.js +0 -9
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dpj.6wcf.qn8.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gt8u.o_c_nix.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hh2728tmgrdk.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jjiw-agnutux.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0nw7q~w~vg.-y.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o-j8g9gp_c1r.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pm6vv5wntle..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0qr499bd44k.g.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0sx_fx5r7nq4b.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0tbu6y0a22ok8.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u6c8q4k~6aiy.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u7fh6be6noif.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wcf_hdt9arma.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xash~4j8pl87.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xi6y8g4l~vzr.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0y45-~ia9sqr0.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yvc~t7p88wsf.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/10684vn7g6wln.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14rpr3z1.lmgj.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/15043qe~kvq-v.js +0 -1
- package/dist/dashboard-runtime/dashboard/tsconfig.tsbuildinfo +0 -1
- package/dist/dashboard-runtime/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{bKUtNfKb47TOc1cpUk74A → mCNgeSYc3Dx3KiZXWf-5A}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{bKUtNfKb47TOc1cpUk74A → mCNgeSYc3Dx3KiZXWf-5A}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{bKUtNfKb47TOc1cpUk74A → mCNgeSYc3Dx3KiZXWf-5A}/_ssgManifest.js +0 -0
- /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/index.js +0 -0
- /package/dist/dashboard-runtime/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/versions.json +0 -0
|
@@ -13,6 +13,13 @@ import {
|
|
|
13
13
|
import { toast } from "sonner";
|
|
14
14
|
import { Button } from "@/components/ui/button";
|
|
15
15
|
import { Input } from "@/components/ui/input";
|
|
16
|
+
import {
|
|
17
|
+
Select,
|
|
18
|
+
SelectContent,
|
|
19
|
+
SelectItem,
|
|
20
|
+
SelectTrigger,
|
|
21
|
+
SelectValue,
|
|
22
|
+
} from "@/components/ui/select";
|
|
16
23
|
import { PageHeader } from "@/components/layout/page-header";
|
|
17
24
|
import { ConfirmDialog } from "@/components/shared/confirm-dialog";
|
|
18
25
|
import { RefreshButton } from "@/components/shared/refresh-button";
|
|
@@ -26,7 +33,11 @@ import {
|
|
|
26
33
|
import { useMemoryUnits } from "@/hooks/use-memory-units";
|
|
27
34
|
import { useDeleteMemoryUnit } from "@/hooks/use-delete-memory-unit";
|
|
28
35
|
import { useMemoryStore } from "@/hooks/use-memory-store";
|
|
29
|
-
import {
|
|
36
|
+
import {
|
|
37
|
+
buildMemoryScope,
|
|
38
|
+
hasPreciseScope,
|
|
39
|
+
hasWildcardScope,
|
|
40
|
+
} from "@/lib/memory";
|
|
30
41
|
import { storageModeCapabilities } from "@/lib/memory-storage-mode";
|
|
31
42
|
import {
|
|
32
43
|
applyFileScopeToSearchParams,
|
|
@@ -49,6 +60,10 @@ import { FileScopeOnboarding } from "@/components/memory/file-scope-onboarding";
|
|
|
49
60
|
import { apiGet } from "@/services/api-client";
|
|
50
61
|
import { useI18n } from "@/i18n/i18n-context";
|
|
51
62
|
import { useDataScopeKey } from "@/providers/runtime-context-provider";
|
|
63
|
+
import {
|
|
64
|
+
shouldRefreshUnitsAfterAdd,
|
|
65
|
+
type MemoryUnitsViewMode,
|
|
66
|
+
} from "@/lib/memory-units-view";
|
|
52
67
|
|
|
53
68
|
export default function MemoryUnitsPage() {
|
|
54
69
|
const { t } = useI18n();
|
|
@@ -75,7 +90,7 @@ export default function MemoryUnitsPage() {
|
|
|
75
90
|
const writableFileMemory = capabilities.writableFiles;
|
|
76
91
|
const requestedView = searchParams.get("view");
|
|
77
92
|
const requestedFile = searchParams.get("file");
|
|
78
|
-
const [viewMode, setViewMode] = useState<
|
|
93
|
+
const [viewMode, setViewMode] = useState<MemoryUnitsViewMode>(
|
|
79
94
|
requestedView === "files" ? "files" : "units",
|
|
80
95
|
);
|
|
81
96
|
useEffect(() => {
|
|
@@ -144,7 +159,7 @@ export default function MemoryUnitsPage() {
|
|
|
144
159
|
tokenStack: string[];
|
|
145
160
|
currentToken?: string;
|
|
146
161
|
}>({ scopeKey, tokenStack: [] });
|
|
147
|
-
const [pageSize] = useState(20);
|
|
162
|
+
const [pageSize, setPageSize] = useState(20);
|
|
148
163
|
const [searchId, setSearchId] = useState("");
|
|
149
164
|
const [searchedUnit, setSearchedUnit] = useState<MemoryUnit | null>(null);
|
|
150
165
|
const [searching, setSearching] = useState(false);
|
|
@@ -247,8 +262,8 @@ export default function MemoryUnitsPage() {
|
|
|
247
262
|
toast.error(t("memory.units.searchIdRequired"));
|
|
248
263
|
return;
|
|
249
264
|
}
|
|
250
|
-
if (!scope
|
|
251
|
-
toast.error(t("memory.units.
|
|
265
|
+
if (!hasPreciseScope(scope)) {
|
|
266
|
+
toast.error(t("memory.units.idSearchPreciseScopeRequired"));
|
|
252
267
|
return;
|
|
253
268
|
}
|
|
254
269
|
setSearching(true);
|
|
@@ -309,41 +324,41 @@ export default function MemoryUnitsPage() {
|
|
|
309
324
|
{fileMemory && capabilities.structured && (
|
|
310
325
|
<UnitsViewToggle viewMode={viewMode} onChange={setViewMode} t={t} />
|
|
311
326
|
)}
|
|
312
|
-
{viewMode === "units"
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
</
|
|
331
|
-
</
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
</
|
|
335
|
-
</
|
|
336
|
-
</
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
)}
|
|
327
|
+
{viewMode === "units" ? (
|
|
328
|
+
<RefreshButton
|
|
329
|
+
loading={unitsQuery.isRefetching}
|
|
330
|
+
onClick={() => {
|
|
331
|
+
unitsQuery.refetch();
|
|
332
|
+
clearSearch();
|
|
333
|
+
}}
|
|
334
|
+
/>
|
|
335
|
+
) : null}
|
|
336
|
+
{capabilities.acceptsMessages ? (
|
|
337
|
+
wildcard ? (
|
|
338
|
+
<TooltipProvider delayDuration={200}>
|
|
339
|
+
<Tooltip>
|
|
340
|
+
<TooltipTrigger asChild>
|
|
341
|
+
<span tabIndex={0} className="inline-flex">
|
|
342
|
+
<Button disabled className="pointer-events-none">
|
|
343
|
+
<Plus className="mr-2 h-4 w-4" />
|
|
344
|
+
{t("memory.units.addMemory")}
|
|
345
|
+
</Button>
|
|
346
|
+
</span>
|
|
347
|
+
</TooltipTrigger>
|
|
348
|
+
<TooltipContent side="bottom" className="max-w-[240px]">
|
|
349
|
+
<p>{t("memory.units.addWildcardHint")}</p>
|
|
350
|
+
</TooltipContent>
|
|
351
|
+
</Tooltip>
|
|
352
|
+
</TooltipProvider>
|
|
353
|
+
) : (
|
|
354
|
+
<Button
|
|
355
|
+
onClick={() => setAddDialogState({ scopeKey, open: true })}
|
|
356
|
+
>
|
|
357
|
+
<Plus className="mr-2 h-4 w-4" />
|
|
358
|
+
{t("memory.units.addMemory")}
|
|
359
|
+
</Button>
|
|
360
|
+
)
|
|
361
|
+
) : null}
|
|
347
362
|
</div>
|
|
348
363
|
</PageHeader>
|
|
349
364
|
|
|
@@ -378,7 +393,7 @@ export default function MemoryUnitsPage() {
|
|
|
378
393
|
/>
|
|
379
394
|
<Button
|
|
380
395
|
onClick={handleSearchById}
|
|
381
|
-
disabled={searching || !scope
|
|
396
|
+
disabled={searching || !hasPreciseScope(scope)}
|
|
382
397
|
>
|
|
383
398
|
<Search className="mr-1.5 h-4 w-4" />
|
|
384
399
|
{searching ? t("memory.units.querying") : t("memory.units.query")}
|
|
@@ -408,11 +423,35 @@ export default function MemoryUnitsPage() {
|
|
|
408
423
|
/>
|
|
409
424
|
|
|
410
425
|
{!searchedUnit && (
|
|
411
|
-
<div className="flex items-center justify-between py-2">
|
|
426
|
+
<div className="flex flex-wrap items-center justify-between gap-3 py-2">
|
|
412
427
|
<span className="text-sm text-muted-foreground">
|
|
413
|
-
{t("memory.units.
|
|
428
|
+
{t("memory.units.pagination", {
|
|
429
|
+
page: tokenStack.length + 1,
|
|
430
|
+
total: unitsQuery.data?.totalCount ?? units.length,
|
|
431
|
+
})}
|
|
414
432
|
</span>
|
|
415
|
-
<div className="flex items-center gap-
|
|
433
|
+
<div className="flex items-center gap-3">
|
|
434
|
+
<Select
|
|
435
|
+
value={String(pageSize)}
|
|
436
|
+
onValueChange={(value) => {
|
|
437
|
+
setPageSize(Number(value));
|
|
438
|
+
setPagination({ scopeKey, tokenStack: [] });
|
|
439
|
+
}}
|
|
440
|
+
>
|
|
441
|
+
<SelectTrigger
|
|
442
|
+
className="h-8 w-[112px]"
|
|
443
|
+
aria-label={t("memory.units.pageSize")}
|
|
444
|
+
>
|
|
445
|
+
<SelectValue />
|
|
446
|
+
</SelectTrigger>
|
|
447
|
+
<SelectContent>
|
|
448
|
+
{[10, 20, 50].map((size) => (
|
|
449
|
+
<SelectItem key={size} value={String(size)}>
|
|
450
|
+
{t("memory.units.pageSizeValue", { size })}
|
|
451
|
+
</SelectItem>
|
|
452
|
+
))}
|
|
453
|
+
</SelectContent>
|
|
454
|
+
</Select>
|
|
416
455
|
<Button
|
|
417
456
|
variant="outline"
|
|
418
457
|
size="sm"
|
|
@@ -465,11 +504,14 @@ export default function MemoryUnitsPage() {
|
|
|
465
504
|
<MemoryAddDialog
|
|
466
505
|
memoryStoreName={memoryStoreName}
|
|
467
506
|
scope={scope}
|
|
507
|
+
projectsToFiles={capabilities.files}
|
|
468
508
|
open={showAddDialog}
|
|
469
509
|
onOpenChange={(open) => setAddDialogState({ scopeKey, open })}
|
|
470
510
|
onSuccess={() => {
|
|
471
|
-
unitsQuery.refetch();
|
|
472
511
|
clearSearch();
|
|
512
|
+
if (shouldRefreshUnitsAfterAdd(viewMode)) {
|
|
513
|
+
void unitsQuery.refetch();
|
|
514
|
+
}
|
|
473
515
|
}}
|
|
474
516
|
/>
|
|
475
517
|
<MemoryUnitDetailPanel
|
|
@@ -512,8 +554,8 @@ function UnitsViewToggle({
|
|
|
512
554
|
onChange,
|
|
513
555
|
t,
|
|
514
556
|
}: {
|
|
515
|
-
viewMode:
|
|
516
|
-
onChange: (mode:
|
|
557
|
+
viewMode: MemoryUnitsViewMode;
|
|
558
|
+
onChange: (mode: MemoryUnitsViewMode) => void;
|
|
517
559
|
t: ReturnType<typeof useI18n>["t"];
|
|
518
560
|
}) {
|
|
519
561
|
const options: Array<{
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
ChatStreamEvent,
|
|
6
6
|
RetrievalFailure,
|
|
7
7
|
} from "@/types/llm-chat";
|
|
8
|
-
import type { MemorySearchHit } from "@/types/memory";
|
|
8
|
+
import type { MemoryFileSearchHit, MemorySearchHit } from "@/types/memory";
|
|
9
9
|
import { normalizeFileMemoryStoreName } from "@/lib/file-memory-core";
|
|
10
10
|
import { formatFileMemoryBlock } from "./file-memory-helpers";
|
|
11
11
|
import { loadServerFileMemory } from "./server-file-memory";
|
|
@@ -31,6 +31,54 @@ const FILE_MEMORY_CACHE_UNAVAILABLE: RetrievalFailure = {
|
|
|
31
31
|
message: "File memory cache is unavailable",
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
35
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function isMemorySearchHit(value: unknown): value is MemorySearchHit {
|
|
39
|
+
return (
|
|
40
|
+
isRecord(value) &&
|
|
41
|
+
isRecord(value.unit) &&
|
|
42
|
+
typeof value.unit.text === "string"
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function isMemoryFileSearchHit(value: unknown): value is MemoryFileSearchHit {
|
|
47
|
+
return (
|
|
48
|
+
isRecord(value) &&
|
|
49
|
+
typeof value.itemId === "string" &&
|
|
50
|
+
value.itemId.length > 0 &&
|
|
51
|
+
typeof value.path === "string" &&
|
|
52
|
+
value.path.length > 0 &&
|
|
53
|
+
(value.summary === undefined || typeof value.summary === "string")
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function memoryHitRank(hit: MemorySearchHit): number {
|
|
58
|
+
for (const value of [hit.rankingScore, hit.score, hit.similarity]) {
|
|
59
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
60
|
+
}
|
|
61
|
+
return Number.NEGATIVE_INFINITY;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Merge the server's per-output buckets into one bounded Chat context. */
|
|
65
|
+
export function mergeMemorySearchHits(
|
|
66
|
+
structuredHits: MemorySearchHit[],
|
|
67
|
+
managedFileHits: MemorySearchHit[],
|
|
68
|
+
topK: number,
|
|
69
|
+
): MemorySearchHit[] {
|
|
70
|
+
return [...structuredHits, ...managedFileHits]
|
|
71
|
+
.map((hit, index) => ({ hit, index }))
|
|
72
|
+
.sort((left, right) => {
|
|
73
|
+
const leftRank = memoryHitRank(left.hit);
|
|
74
|
+
const rightRank = memoryHitRank(right.hit);
|
|
75
|
+
if (leftRank !== rightRank) return rightRank > leftRank ? 1 : -1;
|
|
76
|
+
return left.index - right.index;
|
|
77
|
+
})
|
|
78
|
+
.slice(0, topK)
|
|
79
|
+
.map(({ hit }) => hit);
|
|
80
|
+
}
|
|
81
|
+
|
|
34
82
|
function isAbortError(error: unknown): boolean {
|
|
35
83
|
return (
|
|
36
84
|
error !== null &&
|
|
@@ -110,6 +158,7 @@ export async function retrieveMemoryContext({
|
|
|
110
158
|
}
|
|
111
159
|
|
|
112
160
|
try {
|
|
161
|
+
const topK = binding.topK ?? 5;
|
|
113
162
|
const response = await waitWithSignal(
|
|
114
163
|
Promise.resolve(
|
|
115
164
|
client.searchMemories(
|
|
@@ -117,7 +166,7 @@ export async function retrieveMemoryContext({
|
|
|
117
166
|
memoryStoreName: binding.memoryStoreName,
|
|
118
167
|
scope: deriveReadScope(binding.scope as MemoryWriteScope),
|
|
119
168
|
query,
|
|
120
|
-
topK
|
|
169
|
+
topK,
|
|
121
170
|
},
|
|
122
171
|
signal,
|
|
123
172
|
),
|
|
@@ -137,8 +186,27 @@ export async function retrieveMemoryContext({
|
|
|
137
186
|
}
|
|
138
187
|
|
|
139
188
|
// The SDK wire field is `results`, not the historic dashboard-only `hits`.
|
|
140
|
-
const data = response.data
|
|
141
|
-
const
|
|
189
|
+
const data = isRecord(response.data) ? response.data : {};
|
|
190
|
+
const structuredHits = Array.isArray(data.results)
|
|
191
|
+
? data.results.filter(isMemorySearchHit)
|
|
192
|
+
: [];
|
|
193
|
+
const fileResults = Array.isArray(data.fileResults)
|
|
194
|
+
? data.fileResults.filter(isMemoryFileSearchHit)
|
|
195
|
+
: [];
|
|
196
|
+
const managedFileHits = fileResults.map<MemorySearchHit>((hit) => ({
|
|
197
|
+
unit: {
|
|
198
|
+
memoryId: hit.itemId,
|
|
199
|
+
text: hit.summary || hit.path,
|
|
200
|
+
metadata: {
|
|
201
|
+
path: hit.path,
|
|
202
|
+
...(hit.versionId ? { versionId: hit.versionId } : {}),
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
score: hit.score,
|
|
206
|
+
similarity: hit.similarity,
|
|
207
|
+
source: `managed-file:${hit.path}`,
|
|
208
|
+
}));
|
|
209
|
+
const hits = mergeMemorySearchHits(structuredHits, managedFileHits, topK);
|
|
142
210
|
return {
|
|
143
211
|
query,
|
|
144
212
|
hits,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type NextRequest } from "next/server";
|
|
2
|
+
import type { StandardResponse } from "@tablestore/tablestore-agent-sdk";
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
forwardResponse,
|
|
5
6
|
handleApiError,
|
|
6
7
|
requireClients,
|
|
7
8
|
} from "@/lib/server/api-helpers";
|
|
9
|
+
import { normalizeMemoryStoreContract } from "@/lib/server/memory-store-contract";
|
|
8
10
|
|
|
9
11
|
export const runtime = "nodejs";
|
|
10
12
|
export const dynamic = "force-dynamic";
|
|
@@ -19,6 +21,21 @@ interface RouteContext {
|
|
|
19
21
|
params: Promise<{ store: string }>;
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
function forwardNormalizedStoreResponse(resp: StandardResponse) {
|
|
25
|
+
if (
|
|
26
|
+
resp.code === "SUCCESS" &&
|
|
27
|
+
resp.data &&
|
|
28
|
+
typeof resp.data === "object" &&
|
|
29
|
+
!Array.isArray(resp.data)
|
|
30
|
+
) {
|
|
31
|
+
return forwardResponse({
|
|
32
|
+
...resp,
|
|
33
|
+
data: normalizeMemoryStoreContract(resp.data as Record<string, unknown>),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return forwardResponse(resp);
|
|
37
|
+
}
|
|
38
|
+
|
|
22
39
|
export async function GET(request: NextRequest, context: RouteContext) {
|
|
23
40
|
try {
|
|
24
41
|
const { store } = await context.params;
|
|
@@ -27,7 +44,7 @@ export async function GET(request: NextRequest, context: RouteContext) {
|
|
|
27
44
|
const { memory } = auth;
|
|
28
45
|
|
|
29
46
|
const resp = await memory.getMemoryStore({ memoryStoreName: store });
|
|
30
|
-
return
|
|
47
|
+
return forwardNormalizedStoreResponse(resp);
|
|
31
48
|
} catch (error) {
|
|
32
49
|
return handleApiError(error);
|
|
33
50
|
}
|
|
@@ -57,7 +74,7 @@ export async function PUT(request: NextRequest, context: RouteContext) {
|
|
|
57
74
|
...safeBody,
|
|
58
75
|
memoryStoreName: store,
|
|
59
76
|
});
|
|
60
|
-
return
|
|
77
|
+
return forwardNormalizedStoreResponse(resp);
|
|
61
78
|
} catch (error) {
|
|
62
79
|
return handleApiError(error);
|
|
63
80
|
}
|
package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/scopes/route.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
requireClients,
|
|
10
10
|
successResponse,
|
|
11
11
|
} from "@/lib/server/api-helpers";
|
|
12
|
+
import { parseScopeDirectoryFilter } from "@/lib/server/scope-filter-validation";
|
|
12
13
|
|
|
13
14
|
import { readPaginationFromQuery, readScopeFromQuery } from "../_scope";
|
|
14
15
|
|
|
@@ -23,6 +24,88 @@ interface RouteContext {
|
|
|
23
24
|
params: Promise<{ store: string }>;
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
const SCOPE_FIELDS = ["appId", "tenantId", "agentId", "runId"] as const;
|
|
28
|
+
const MAX_SCOPE_DIRECTORY_LIMIT = 100;
|
|
29
|
+
|
|
30
|
+
function badRequest(message: string) {
|
|
31
|
+
return forwardResponse({ code: "BAD_REQUEST", data: null, message });
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
35
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function buildScopeDirectoryRequest(
|
|
39
|
+
body: Record<string, unknown>,
|
|
40
|
+
): { request: Record<string, unknown> } | { error: string } {
|
|
41
|
+
const safeBody: Record<string, unknown> = {};
|
|
42
|
+
|
|
43
|
+
if (body.scope !== undefined && body.scope !== null) {
|
|
44
|
+
if (!isRecord(body.scope)) {
|
|
45
|
+
return { error: "scope must be a JSON object" };
|
|
46
|
+
}
|
|
47
|
+
for (const field of Object.keys(body.scope)) {
|
|
48
|
+
if (!SCOPE_FIELDS.includes(field as (typeof SCOPE_FIELDS)[number])) {
|
|
49
|
+
return { error: `Unknown scope field: ${field}` };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
const scope: Record<string, string> = {};
|
|
53
|
+
for (const field of SCOPE_FIELDS) {
|
|
54
|
+
const value = body.scope[field];
|
|
55
|
+
if (value === undefined) continue;
|
|
56
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
57
|
+
return { error: `scope.${field} must be a non-empty string` };
|
|
58
|
+
}
|
|
59
|
+
scope[field] = value;
|
|
60
|
+
}
|
|
61
|
+
if (Object.keys(scope).length > 0) safeBody.scope = scope;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (body.filter !== undefined && body.filter !== null) {
|
|
65
|
+
const parsedFilter = parseScopeDirectoryFilter(body.filter);
|
|
66
|
+
if ("error" in parsedFilter) return { error: parsedFilter.error };
|
|
67
|
+
safeBody.filter = parsedFilter.filter;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (body.limit !== undefined) {
|
|
71
|
+
if (
|
|
72
|
+
typeof body.limit !== "number" ||
|
|
73
|
+
!Number.isInteger(body.limit) ||
|
|
74
|
+
body.limit <= 0 ||
|
|
75
|
+
body.limit > MAX_SCOPE_DIRECTORY_LIMIT
|
|
76
|
+
) {
|
|
77
|
+
return {
|
|
78
|
+
error: `limit must be an integer between 1 and ${MAX_SCOPE_DIRECTORY_LIMIT}`,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
safeBody.limit = body.limit;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (body.nextToken !== undefined) {
|
|
85
|
+
if (typeof body.nextToken !== "string") {
|
|
86
|
+
return { error: "nextToken must be a string" };
|
|
87
|
+
}
|
|
88
|
+
if (body.nextToken) safeBody.nextToken = body.nextToken;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return { request: safeBody };
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function normalizedScopeResponse(
|
|
95
|
+
data: Record<string, unknown>,
|
|
96
|
+
store: string,
|
|
97
|
+
fallbackScope?: unknown,
|
|
98
|
+
) {
|
|
99
|
+
const items = Array.isArray(data.scopes) ? data.scopes : [];
|
|
100
|
+
return successResponse({
|
|
101
|
+
items,
|
|
102
|
+
totalCount: items.length,
|
|
103
|
+
nextToken: typeof data.nextToken === "string" ? data.nextToken : undefined,
|
|
104
|
+
scope: data.scope ?? fallbackScope ?? {},
|
|
105
|
+
memoryStoreName: store,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
26
109
|
export async function GET(request: NextRequest, context: RouteContext) {
|
|
27
110
|
try {
|
|
28
111
|
const { store } = await context.params;
|
|
@@ -49,16 +132,48 @@ export async function GET(request: NextRequest, context: RouteContext) {
|
|
|
49
132
|
// shape so the dashboard frontend's paginated list helpers can
|
|
50
133
|
// consume scopes/tasks/dream-tasks/actions through one unified
|
|
51
134
|
// contract instead of branching on per-route field names.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
135
|
+
return normalizedScopeResponse(
|
|
136
|
+
(response.data ?? {}) as Record<string, unknown>,
|
|
137
|
+
store,
|
|
138
|
+
scope,
|
|
139
|
+
);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
return handleApiError(error);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* POST keeps the structured Filter AST and opaque nextToken in the request
|
|
147
|
+
* body. The legacy GET route remains for ScopeBar compatibility.
|
|
148
|
+
*/
|
|
149
|
+
export async function POST(request: NextRequest, context: RouteContext) {
|
|
150
|
+
try {
|
|
151
|
+
const { store } = await context.params;
|
|
152
|
+
const auth = requireClients(request);
|
|
153
|
+
if (!("memory" in auth)) return auth;
|
|
154
|
+
|
|
155
|
+
let rawBody: unknown;
|
|
156
|
+
try {
|
|
157
|
+
rawBody = await request.json();
|
|
158
|
+
} catch {
|
|
159
|
+
return badRequest("Request body must be JSON");
|
|
160
|
+
}
|
|
161
|
+
if (!isRecord(rawBody)) {
|
|
162
|
+
return badRequest("Request body must be a JSON object");
|
|
163
|
+
}
|
|
164
|
+
const parsedBody = buildScopeDirectoryRequest(rawBody);
|
|
165
|
+
if ("error" in parsedBody) return badRequest(parsedBody.error);
|
|
166
|
+
const safeBody = parsedBody.request;
|
|
167
|
+
const response = await auth.memory.listMemoryStoreScopes({
|
|
168
|
+
...safeBody,
|
|
60
169
|
memoryStoreName: store,
|
|
61
170
|
});
|
|
171
|
+
if (response.code !== "SUCCESS") return forwardResponse(response);
|
|
172
|
+
return normalizedScopeResponse(
|
|
173
|
+
(response.data ?? {}) as Record<string, unknown>,
|
|
174
|
+
store,
|
|
175
|
+
safeBody.scope,
|
|
176
|
+
);
|
|
62
177
|
} catch (error) {
|
|
63
178
|
return handleApiError(error);
|
|
64
179
|
}
|
package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/search/route.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
handleApiError,
|
|
6
6
|
requireClients,
|
|
7
7
|
} from "@/lib/server/api-helpers";
|
|
8
|
+
import { parseScopeDirectoryFilter } from "@/lib/server/scope-filter-validation";
|
|
8
9
|
|
|
9
10
|
export const runtime = "nodejs";
|
|
10
11
|
export const dynamic = "force-dynamic";
|
|
@@ -17,6 +18,14 @@ interface RouteContext {
|
|
|
17
18
|
params: Promise<{ store: string }>;
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
function badRequest(message: string) {
|
|
22
|
+
return forwardResponse({ code: "BAD_REQUEST", data: null, message });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
26
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
27
|
+
}
|
|
28
|
+
|
|
20
29
|
export async function POST(request: NextRequest, context: RouteContext) {
|
|
21
30
|
try {
|
|
22
31
|
const { store } = await context.params;
|
|
@@ -24,20 +33,24 @@ export async function POST(request: NextRequest, context: RouteContext) {
|
|
|
24
33
|
if (!("memory" in auth)) return auth;
|
|
25
34
|
const { memory } = auth;
|
|
26
35
|
|
|
27
|
-
let
|
|
36
|
+
let rawBody: unknown;
|
|
28
37
|
try {
|
|
29
|
-
|
|
38
|
+
rawBody = await request.json();
|
|
30
39
|
} catch {
|
|
31
|
-
return
|
|
32
|
-
code: "BAD_REQUEST",
|
|
33
|
-
data: null,
|
|
34
|
-
message: "Request body must be JSON",
|
|
35
|
-
});
|
|
40
|
+
return badRequest("Request body must be JSON");
|
|
36
41
|
}
|
|
42
|
+
if (!isRecord(rawBody)) return badRequest("Request body must be an object");
|
|
37
43
|
|
|
38
44
|
// Strip client-supplied memoryStoreName so the URL-derived value wins (D2).
|
|
39
|
-
const { memoryStoreName: _ignored, ...safeBody } =
|
|
45
|
+
const { memoryStoreName: _ignored, ...safeBody } = rawBody;
|
|
40
46
|
void _ignored;
|
|
47
|
+
if (safeBody.filter === null) {
|
|
48
|
+
delete safeBody.filter;
|
|
49
|
+
} else if (safeBody.filter !== undefined) {
|
|
50
|
+
const parsedFilter = parseScopeDirectoryFilter(safeBody.filter);
|
|
51
|
+
if ("error" in parsedFilter) return badRequest(parsedFilter.error);
|
|
52
|
+
safeBody.filter = parsedFilter.filter;
|
|
53
|
+
}
|
|
41
54
|
const resp = await memory.searchMemories({
|
|
42
55
|
...safeBody,
|
|
43
56
|
memoryStoreName: store,
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
successResponse,
|
|
11
11
|
} from "@/lib/server/api-helpers";
|
|
12
12
|
import { paginateAll } from "@tablestore/tablestore-agent-sdk";
|
|
13
|
+
import { normalizeMemoryStoreContract } from "@/lib/server/memory-store-contract";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* GET /api/v1/memory/stores List all memory stores (auto-paginated).
|
|
@@ -36,18 +37,24 @@ export async function GET(request: NextRequest) {
|
|
|
36
37
|
const resp = await memory.getMemoryStore({
|
|
37
38
|
memoryStoreName: item.memoryStoreName,
|
|
38
39
|
});
|
|
39
|
-
if (resp.code !== "SUCCESS")
|
|
40
|
+
if (resp.code !== "SUCCESS") {
|
|
41
|
+
return normalizeMemoryStoreContract(item);
|
|
42
|
+
}
|
|
40
43
|
const data = (resp.data ?? {}) as {
|
|
41
44
|
storageMode?: string;
|
|
42
45
|
description?: string;
|
|
46
|
+
inputType?: string;
|
|
47
|
+
outputTypes?: string[];
|
|
43
48
|
};
|
|
44
|
-
return {
|
|
49
|
+
return normalizeMemoryStoreContract({
|
|
45
50
|
...item,
|
|
46
51
|
...(data.storageMode ? { storageMode: data.storageMode } : {}),
|
|
47
52
|
...(data.description ? { description: data.description } : {}),
|
|
48
|
-
|
|
53
|
+
...(data.inputType ? { inputType: data.inputType } : {}),
|
|
54
|
+
...(data.outputTypes ? { outputTypes: data.outputTypes } : {}),
|
|
55
|
+
});
|
|
49
56
|
} catch {
|
|
50
|
-
return item;
|
|
57
|
+
return normalizeMemoryStoreContract(item);
|
|
51
58
|
}
|
|
52
59
|
}),
|
|
53
60
|
);
|
|
@@ -19,6 +19,7 @@ import { assembleRetrievalConfiguration } from "@/components/retrieval/assemble-
|
|
|
19
19
|
import { newId } from "@/lib/random-id";
|
|
20
20
|
import {
|
|
21
21
|
FILEMEM_DEFAULT_RUN_ID,
|
|
22
|
+
isKnownStorageMode,
|
|
22
23
|
normalizeMemoryRunId,
|
|
23
24
|
type StorageMode,
|
|
24
25
|
} from "@/lib/memory-storage-mode";
|
|
@@ -162,11 +163,7 @@ function isExactMemoryBinding(memory: ChatMemoryBinding | undefined): boolean {
|
|
|
162
163
|
function hasExplicitKnownStorageMode(
|
|
163
164
|
memory: ChatMemoryBinding | undefined,
|
|
164
165
|
): boolean {
|
|
165
|
-
return (
|
|
166
|
-
memory?.storageMode === "ots" ||
|
|
167
|
-
memory?.storageMode === "file+ots" ||
|
|
168
|
-
memory?.storageMode === "filemem"
|
|
169
|
-
);
|
|
166
|
+
return isKnownStorageMode(memory?.storageMode);
|
|
170
167
|
}
|
|
171
168
|
|
|
172
169
|
export function isWikiEligibleMemoryBinding(
|
|
@@ -14,6 +14,7 @@ import { Label } from "@/components/ui/label";
|
|
|
14
14
|
import { Switch } from "@/components/ui/switch";
|
|
15
15
|
import { useWiki } from "@/hooks/use-wikis";
|
|
16
16
|
import { useI18n } from "@/i18n/i18n-context";
|
|
17
|
+
import { isKnownStorageMode } from "@/lib/memory-storage-mode";
|
|
17
18
|
import type { Wiki } from "@/types/wiki";
|
|
18
19
|
|
|
19
20
|
function isExactScope(
|
|
@@ -39,10 +40,7 @@ export function WikiBindSection() {
|
|
|
39
40
|
const { t } = useI18n();
|
|
40
41
|
const cfg = useChatConfig();
|
|
41
42
|
const binding = cfg.memory;
|
|
42
|
-
const knownStorageMode =
|
|
43
|
-
binding?.storageMode === "ots" ||
|
|
44
|
-
binding?.storageMode === "file+ots" ||
|
|
45
|
-
binding?.storageMode === "filemem";
|
|
43
|
+
const knownStorageMode = isKnownStorageMode(binding?.storageMode);
|
|
46
44
|
const exactScope = isExactScope(binding?.scope) ? binding.scope : undefined;
|
|
47
45
|
const eligibleScope = isWikiEligibleMemoryBinding(binding)
|
|
48
46
|
? exactScope
|