@tablestore/tablestore-agent-cli 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +173 -4
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +2 -0
- package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +5 -5
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/required-server-files.json +2 -0
- package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +12 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/chat/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/documents/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/qa/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/retrieval/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/[name]/settings/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/create/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/knowledge-base/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/[id]/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/new/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/llm-providers/page.js +2 -2
- 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]/messages/page/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/messages/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/requests/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/search/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/settings/page.js +2 -2
- 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]/units/page/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/[store]/units/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/create/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/memory/page.js +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/(dashboard)/projects/page.js +2 -2
- 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/page/build-manifest.json +2 -2
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found/page.js +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 +20 -19
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +20 -19
- 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 +10 -9
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- 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/auth/status/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/status/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/auth/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/token/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/[name]/use/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/instances/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/documents/upload/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/retrieve/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/[name]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/knowledge-bases/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/chat/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/models/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/[id]/test/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/llm/providers/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/logs/client/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/messages/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/requests/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/search/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/[memoryId]/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/[store]/units/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/memory/stores/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/runtime/context/route_client-reference-manifest.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.html +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/index.rsc +19 -18
- 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 +19 -18
- 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 +10 -9
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding/page.js +1 -1
- 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 +23 -22
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +23 -22
- 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 +10 -9
- 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/build-manifest.json +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/app/page.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +2 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +6 -6
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.gylau._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.hvkwy._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0.qtdn4._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__02p1x3t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04dd04u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04ujbw-._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__04zbudf._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05eryp~._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__06fva9g._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0byveuc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cee_lo._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cyd2qb._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ecs-9r._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0ejcow5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fglxiw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0i1_p1s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/{[root-of-the-server]__0f990w9._.js → [root-of-the-server]__0lvi0g-._.js} +14 -12
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0no9qm0._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q9fgt6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0rx9hon._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0w_ig2a._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0zmo~nd._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11s_zx6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__11wq90l._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__126srko._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12e1t6o._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12ylr4n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13g_f9w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__13~-fxp._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_logs_client_route_actions_0tnhyc7.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_runtime_context_route_actions_0d9d6g_.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0b1r_app_(dashboard)_knowledge-base_[name]_documents_documents-client_tsx_0g2uxmt._.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e95_src_app_(dashboard)_knowledge-base_[name]_settings_settings-client_tsx_13312zk._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0p91_next_dist_shared_lib_deployment-id_0uu7yq4.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[externals]__0tqph4u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0_r24-c._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0aqzu8w._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0jb9ccl._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10rkv6z._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__11yei-s._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0hm68~i._.js → _0303qx7._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_03cxnik._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_04f2u4t._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06l.12l._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09eom0_._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09yzbcp._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0dqi8bq._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0e9y.xc._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0f9u8i2._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0i8py_a._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jlt.cx._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0n5uozy._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0o32d.y._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0o665bf._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0suxzcc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tej2s.._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tyxwr3._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0u9md36._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/{_0c7wecm._.js → _0v4jb2q._.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0zn.ayc._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13l7w34._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_065m1.j._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0suis9l._.js +3 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_[name]_layout-client_tsx_05momc5._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_create_page_tsx_0916~g-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_memory_[store]_settings_page_tsx_0y26.xu._.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_app_error_tsx_01x7ppm._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_providers_runtime-context-provider_tsx_0wmj66z._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00arje5._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +28 -1
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +5 -5
- 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/{0osozgwmk692r.js → 0-etecbti5x22.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-xqk6wfme5fu.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/031-scv-8sah9.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/034uozc1ki09_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05ow1qzcjz3pz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/087x52iesmpfe.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08an3157he_ad.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0aak.679si-3m.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ai8f~-9ig.gz.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0c5tcbhzpwen7.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0dheju1t18upn.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{07q4gw5gnh3.d.js → 0fagnytrt.3oe.js} +2 -2
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ffr1_o~ss8r8.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{123yjh849.vzp.js → 0gjljpk5qgdmz.js} +1 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0h38qfpz-dmiu.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0l1fmyhvp-k49.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pcp6pjjz7o49.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0pdq-gljpy7gd.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0q6-s11w9.sgo.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rnm58mg0whfk.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rxp5ykl1_lyb.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0th7u6qvdy3x2.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v_~favugkv_a.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x3ysmon_~xsv.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x7sjde5wit~i.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0yzz97.2e6if6.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~alekqkiwwaq.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~e2n9bhosscr.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~i4llb9-utpp.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~kfzxrhgbkaz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0~n-y9cstar6b.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14z_j1qzycpe1.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/154aheeo3m6bg.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17k4h5zgalxqj.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{turbopack-0jhqjurvu9x3y.js → turbopack-0ybyy.9-.w~ub.js} +1 -1
- package/dist/dashboard-runtime/dashboard/components.json +20 -0
- package/dist/dashboard-runtime/dashboard/instrumentation-node.ts +14 -0
- package/dist/dashboard-runtime/dashboard/instrumentation.ts +18 -0
- package/dist/dashboard-runtime/dashboard/next.config.ts +56 -0
- package/dist/dashboard-runtime/dashboard/postcss.config.mjs +8 -0
- package/dist/dashboard-runtime/dashboard/server.js +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/error.tsx +44 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/loading.tsx +29 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/chat/page.tsx +372 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/error.tsx +69 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/documents/documents-client.tsx +22 -11
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/qa/page.tsx +28 -2
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/layout.tsx +75 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/loading.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/layout.tsx +62 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/_helpers.ts +109 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/messages/page.tsx +309 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/page.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/_helpers.ts +234 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/requests/page.tsx +323 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/search/page.tsx +49 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/settings/page.tsx +71 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/[store]/units/page.tsx +277 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/create/page.tsx +30 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/error.tsx +44 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/loading.tsx +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/memory/page.tsx +27 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/error.tsx +43 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/loading.tsx +25 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/projects/page.tsx +174 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/auth/status/route.ts +53 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/auth/token/route.ts +113 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/route.ts +196 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/token/route.ts +80 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/[name]/use/route.ts +91 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/instances/route.ts +274 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/chunks/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/[docId]/chunks/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/[docId]/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/upload/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/retrieve/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/route.ts +3 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/chat/route.ts +455 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/models/route.ts +46 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/route.ts +83 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/[id]/test/route.ts +40 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/llm/providers/route.ts +70 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/logs/client/route.ts +70 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/_scope.ts +84 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/messages/route.ts +64 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/requests/route.ts +65 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/route.ts +78 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/search/route.ts +49 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/units/[memoryId]/route.ts +126 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/[store]/units/route.ts +85 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/memory/stores/route.ts +60 -0
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/runtime/context/route.ts +26 -0
- package/dist/dashboard-runtime/dashboard/src/app/error.tsx +84 -0
- package/dist/dashboard-runtime/dashboard/src/app/globals.css +262 -0
- package/dist/dashboard-runtime/dashboard/src/app/layout.tsx +38 -0
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/error.tsx +54 -0
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/layout.tsx +18 -0
- package/dist/dashboard-runtime/dashboard/src/app/onboarding/page.tsx +62 -0
- package/dist/dashboard-runtime/dashboard/src/app/page.tsx +10 -0
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-chunks-dialog.tsx +13 -4
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-upload-dialog.tsx +436 -94
- package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +10 -2
- package/dist/dashboard-runtime/dashboard/src/components/instance/edit-instance-dialog.tsx +6 -2
- package/dist/dashboard-runtime/dashboard/src/components/instance/project-card.tsx +195 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-card.tsx +8 -5
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-header.tsx +18 -10
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-list.tsx +6 -1
- package/dist/dashboard-runtime/dashboard/src/components/layout/sidebar.tsx +90 -0
- package/dist/dashboard-runtime/dashboard/src/components/logging/client-error-reporter.tsx +59 -0
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-header.tsx +8 -12
- package/dist/dashboard-runtime/dashboard/src/components/memory/memory-store-list.tsx +6 -1
- package/dist/dashboard-runtime/dashboard/src/components/qa/markdown.tsx +77 -0
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-chat-panel.tsx +45 -4
- package/dist/dashboard-runtime/dashboard/src/components/qa/qa-message.tsx +636 -36
- package/dist/dashboard-runtime/dashboard/src/components/shared/confirm-dialog.tsx +8 -1
- package/dist/dashboard-runtime/dashboard/src/components/shared/error-state.tsx +54 -0
- package/dist/dashboard-runtime/dashboard/src/components/shared/refresh-button.tsx +102 -86
- package/dist/dashboard-runtime/dashboard/src/components/ui/badge.tsx +36 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/button.tsx +57 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/card.tsx +97 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/checkbox.tsx +28 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/collapsible.tsx +11 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/command.tsx +153 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/dialog.tsx +127 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/form.tsx +178 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/input.tsx +22 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/label.tsx +24 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/popover.tsx +34 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/select.tsx +162 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/separator.tsx +31 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/sheet.tsx +129 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/skeleton.tsx +49 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/slider.tsx +28 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/sonner.tsx +29 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/switch.tsx +66 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/table.tsx +120 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/tabs.tsx +69 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/textarea.tsx +22 -0
- package/dist/dashboard-runtime/dashboard/src/components/ui/tooltip.tsx +30 -0
- package/dist/dashboard-runtime/dashboard/src/config/navigation.ts +39 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-active-instance.ts +20 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-add-memory.ts +3 -4
- package/dist/dashboard-runtime/dashboard/src/hooks/use-chat-history.ts +212 -99
- package/dist/dashboard-runtime/dashboard/src/hooks/use-create-kb.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-create-llm-provider.ts +2 -3
- package/dist/dashboard-runtime/dashboard/src/hooks/use-create-memory-store.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-documents.ts +10 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-kb.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-llm-provider.ts +2 -3
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-memory-store.ts +2 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-delete-memory-unit.ts +3 -3
- package/dist/dashboard-runtime/dashboard/src/hooks/use-documents.ts +7 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-instances.ts +38 -19
- package/dist/dashboard-runtime/dashboard/src/hooks/use-knowledge-base.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-knowledge-bases.ts +5 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-provider-models.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-provider.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-llm-providers.ts +5 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-messages.ts +12 -6
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-requests.ts +12 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-store.ts +5 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-stores.ts +5 -1
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-unit.ts +16 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-memory-units.ts +11 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-qa-chat.ts +263 -58
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-kb.ts +3 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-llm-provider.ts +2 -4
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-memory-store.ts +3 -5
- package/dist/dashboard-runtime/dashboard/src/hooks/use-update-memory-unit.ts +3 -2
- package/dist/dashboard-runtime/dashboard/src/hooks/use-upload-documents.ts +26 -7
- package/dist/dashboard-runtime/dashboard/src/lib/chat-message-ops.ts +76 -0
- package/dist/dashboard-runtime/dashboard/src/lib/constants.ts +22 -0
- package/dist/dashboard-runtime/dashboard/src/lib/dev-flags.ts +24 -0
- package/dist/dashboard-runtime/dashboard/src/lib/fonts.ts +9 -0
- package/dist/dashboard-runtime/dashboard/src/lib/memory.ts +69 -0
- package/dist/dashboard-runtime/dashboard/src/lib/normalize-oss-endpoint.ts +28 -0
- package/dist/dashboard-runtime/dashboard/src/lib/query-keys.ts +147 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/api-helpers.ts +193 -9
- package/dist/dashboard-runtime/dashboard/src/lib/server/chat-project-context.ts +17 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/runtime-context.ts +108 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/sdk-client.ts +250 -22
- package/dist/dashboard-runtime/dashboard/src/lib/utils.ts +15 -0
- package/dist/dashboard-runtime/dashboard/src/providers/query-provider.tsx +4 -1
- package/dist/dashboard-runtime/dashboard/src/providers/runtime-context-provider.tsx +237 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/common.ts +8 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/document.ts +28 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/instance.ts +107 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +1 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +28 -0
- package/dist/dashboard-runtime/dashboard/src/services/api-client.ts +138 -33
- package/dist/dashboard-runtime/dashboard/src/services/auth.ts +18 -0
- package/dist/dashboard-runtime/dashboard/src/services/chunks.ts +49 -0
- package/dist/dashboard-runtime/dashboard/src/services/documents.ts +208 -0
- package/dist/dashboard-runtime/dashboard/src/services/instances.ts +71 -0
- package/dist/dashboard-runtime/dashboard/src/services/memory.ts +158 -0
- package/dist/dashboard-runtime/dashboard/src/services/retrieval.ts +16 -0
- package/dist/dashboard-runtime/dashboard/src/services/runtime-context.ts +8 -0
- package/dist/dashboard-runtime/dashboard/src/types/api.ts +18 -0
- package/dist/dashboard-runtime/dashboard/src/types/instance.ts +68 -0
- package/dist/dashboard-runtime/dashboard/src/types/llm-chat.ts +21 -0
- package/dist/dashboard-runtime/dashboard/src/types/memory.ts +106 -0
- package/dist/dashboard-runtime/dashboard/src/types/retrieval.ts +43 -0
- package/dist/dashboard-runtime/dashboard/src/types/runtime-context.ts +12 -0
- package/dist/dashboard-runtime/dashboard/tailwind.config.ts +92 -0
- package/dist/dashboard-runtime/dashboard/tsconfig.json +43 -0
- package/dist/dashboard-runtime/dashboard/vitest.config.mjs +12 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -0
- 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 +64 -20
- 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 +1 -0
- 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 +62 -18
- 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/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +19 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js +4 -2
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.js +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/index.js.map +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts +78 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js +398 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js.map +1 -0
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/kb-client.d.ts +1 -0
- 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 +64 -20
- 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 +1 -0
- 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 +62 -18
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/memory-client.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js +19 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/config.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js +4 -2
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/constants.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.js +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/index.js.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts +78 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.d.ts.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js +398 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/logging.js.map +1 -0
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__03742bf._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__037l_3-._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__05pd96o._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__07jfil8._.js +0 -38
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__089jtfp._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__08w-nm2._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0_o02fk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0b50n21._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0bfezi5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0btp1y7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0fqdh7c._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0g9--xh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0gqr7to._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0h71~~8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0l1bgu.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0lcurm3._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0n3pam7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0nkghp7._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0r4amj5._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0td5dey._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0tsud8x._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0wl_vik._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0x7~7nk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0xvok7r._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0~tse9o._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12lk-nv._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__12sqoa8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0e.4_sonner_dist_index_mjs_0u2em8w._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/12df_@tanstack_react-query_build_modern_0em_ajy._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[externals]__0wijiwt._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0i0y9.r._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0nwf4e.._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0r_6wpx._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0y8rrcu._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0-dlo4s._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_00f15bk._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02e0c00._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0476v7r._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ct0n55._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0doczxg._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0fg6iap._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0mzxmfh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0naqa6h._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ti~om_._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0~s~e-0._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_11fig8y._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_00o55he._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0qzg4vh._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-mr2-dyb-szq.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0003a8l0skc88.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00m4164p4ip7m.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02b1c4t1dy1ri.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/055_bo6_3nt-s.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/06v~rjrrn4ugo.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07l4dodn5t6l4.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07v08gtfpo2yk.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07xvdo2w9s4~p.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09qsmnfvk8dm3.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0a5ass8u78k90.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0gkonvtvjhg-p.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hpoawl1bb10g.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0i5aqiffpm9jr.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jeb9kxtd_jq..js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0j~63ld9lbb25.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0l6znnjqw.4yw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0m2p301.a174k.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o-c2g8y5pw-c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0o0i2ke2jbdvq.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0rywhgbu_16tm.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0r~6kt_pkm4di.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0s3mvx9_dr13c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u2lo2lzizxy_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v.hno.6q74nn.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/100.ax5hitxko.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14-39g6hwhcgn.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14ti2gx~1fiub.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14vqmdm7sosj2.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17h~onnkksf44.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/17nx_vdk_qemm.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/1864_5-9a61tw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/186jubvt5xyuj.js +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/static/{wWmSSYUu4w4mIF1R_7UoM → nPPow7lCVx1fYDGH2XCxQ}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{wWmSSYUu4w4mIF1R_7UoM → nPPow7lCVx1fYDGH2XCxQ}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{wWmSSYUu4w4mIF1R_7UoM → nPPow7lCVx1fYDGH2XCxQ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tiny dev-only feature toggle reader. Backed by localStorage so a developer
|
|
3
|
+
* can flip a flag from the browser devtools console without rebuilding:
|
|
4
|
+
*
|
|
5
|
+
* localStorage.setItem("tsagent.dev.logChatRequest", "1")
|
|
6
|
+
*
|
|
7
|
+
* Production builds keep behaviour off by default — these flags are debug
|
|
8
|
+
* aids, not user-facing settings. Returns false during SSR so server code
|
|
9
|
+
* paths never accidentally enable verbose logging.
|
|
10
|
+
*/
|
|
11
|
+
export type DevFlagName = "logChatRequest";
|
|
12
|
+
|
|
13
|
+
const KEY_PREFIX = "tsagent.dev.";
|
|
14
|
+
|
|
15
|
+
export function devFlag(name: DevFlagName): boolean {
|
|
16
|
+
if (typeof window === "undefined") return false;
|
|
17
|
+
try {
|
|
18
|
+
return window.localStorage.getItem(KEY_PREFIX + name) === "1";
|
|
19
|
+
} catch {
|
|
20
|
+
// Safari private mode and similar can throw on localStorage access; treat
|
|
21
|
+
// as flag off rather than crashing the caller.
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The dashboard must build in offline / intranet environments, including the
|
|
3
|
+
* CLI's standalone packaging flow. `next/font/google` hard-fails the build
|
|
4
|
+
* when fonts.googleapis.com is unreachable, so we expose no-op descriptors
|
|
5
|
+
* here and rely on CSS fallback stacks declared in `globals.css`.
|
|
6
|
+
*/
|
|
7
|
+
export const plusJakarta = { variable: "" } as const;
|
|
8
|
+
export const inter = { variable: "" } as const;
|
|
9
|
+
export const jetbrainsMono = { variable: "" } as const;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { MemoryScope } from "@/types/memory";
|
|
2
|
+
|
|
3
|
+
export function buildMemoryScope(searchParams: URLSearchParams): MemoryScope {
|
|
4
|
+
return {
|
|
5
|
+
appId: searchParams.get("appId") ?? "",
|
|
6
|
+
tenantId: searchParams.get("tenantId") || undefined,
|
|
7
|
+
agentId: searchParams.get("agentId") || undefined,
|
|
8
|
+
runId: searchParams.get("runId") || undefined,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function hasWildcardScope(scope: MemoryScope): boolean {
|
|
13
|
+
return Object.values(scope).some((value) => value === "*");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** All four scope fields are present and none is `*`. */
|
|
17
|
+
export function hasPreciseScope(scope: MemoryScope): boolean {
|
|
18
|
+
return (
|
|
19
|
+
!!scope.appId && scope.appId !== "*" &&
|
|
20
|
+
!!scope.tenantId && scope.tenantId !== "*" &&
|
|
21
|
+
!!scope.agentId && scope.agentId !== "*" &&
|
|
22
|
+
!!scope.runId && scope.runId !== "*"
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** appId and tenantId are present and not `*` (minimum for search). */
|
|
27
|
+
export function hasSearchableScope(scope: MemoryScope): boolean {
|
|
28
|
+
return (
|
|
29
|
+
!!scope.appId && scope.appId !== "*" &&
|
|
30
|
+
!!scope.tenantId && scope.tenantId !== "*"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function scopeToSearchParams(scope: MemoryScope): URLSearchParams {
|
|
35
|
+
const params = new URLSearchParams();
|
|
36
|
+
params.set("appId", scope.appId);
|
|
37
|
+
if (scope.tenantId) params.set("tenantId", scope.tenantId);
|
|
38
|
+
if (scope.agentId) params.set("agentId", scope.agentId);
|
|
39
|
+
if (scope.runId) params.set("runId", scope.runId);
|
|
40
|
+
return params;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function formatScope(scope?: MemoryScope): string {
|
|
44
|
+
if (!scope) return "-";
|
|
45
|
+
return [
|
|
46
|
+
scope.appId,
|
|
47
|
+
scope.tenantId,
|
|
48
|
+
scope.agentId,
|
|
49
|
+
scope.runId,
|
|
50
|
+
].filter(Boolean).join(" / ");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function parseJsonObject(value: string): Record<string, string> | undefined {
|
|
54
|
+
if (!value.trim()) return undefined;
|
|
55
|
+
const parsed = JSON.parse(value) as unknown;
|
|
56
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
57
|
+
throw new Error("JSON must be an object");
|
|
58
|
+
}
|
|
59
|
+
return parsed as Record<string, string>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function parseJsonArray<T>(value: string): T[] | undefined {
|
|
63
|
+
if (!value.trim()) return undefined;
|
|
64
|
+
const parsed = JSON.parse(value) as unknown;
|
|
65
|
+
if (!Array.isArray(parsed)) {
|
|
66
|
+
throw new Error("JSON must be an array");
|
|
67
|
+
}
|
|
68
|
+
return parsed as T[];
|
|
69
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip a bucket-name prefix from an OSS endpoint URL.
|
|
3
|
+
*
|
|
4
|
+
* Users sometimes paste the bucket-specific URL
|
|
5
|
+
* (e.g. `https://my-bucket.oss-cn-hangzhou.aliyuncs.com`) instead of the
|
|
6
|
+
* bare regional endpoint. The upstream SDK prepends the bucket name itself
|
|
7
|
+
* when constructing request URLs, so leaving the prefix in place produces a
|
|
8
|
+
* doubled hostname like `https://my-bucket.my-bucket.oss-cn-hangzhou.…`.
|
|
9
|
+
*
|
|
10
|
+
* Returns the cleaned endpoint, or the original string when no stripping
|
|
11
|
+
* is needed (including malformed URLs — those are left for schema
|
|
12
|
+
* validation to reject).
|
|
13
|
+
*/
|
|
14
|
+
export function stripBucketPrefix(
|
|
15
|
+
ossEndpoint: string,
|
|
16
|
+
ossBucketName: string,
|
|
17
|
+
): string {
|
|
18
|
+
try {
|
|
19
|
+
const url = new URL(ossEndpoint);
|
|
20
|
+
if (url.hostname.startsWith(`${ossBucketName}.`)) {
|
|
21
|
+
url.hostname = url.hostname.slice(ossBucketName.length + 1);
|
|
22
|
+
return url.toString().replace(/\/$/, "");
|
|
23
|
+
}
|
|
24
|
+
} catch {
|
|
25
|
+
// invalid URL — return as-is
|
|
26
|
+
}
|
|
27
|
+
return ossEndpoint;
|
|
28
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { QueryClient, QueryKey } from "@tanstack/react-query";
|
|
2
|
+
|
|
3
|
+
export const RUNTIME_CONTEXT_QUERY_KEY = ["runtime-context"] as const;
|
|
4
|
+
export const PENDING_DATA_SCOPE_KEY = "pending";
|
|
5
|
+
|
|
6
|
+
export const queryKeys = {
|
|
7
|
+
runtimeContext: RUNTIME_CONTEXT_QUERY_KEY,
|
|
8
|
+
instances: (scope: string) => ["instances", scope] as const,
|
|
9
|
+
instance: (scope: string, name: string | null | undefined) =>
|
|
10
|
+
["instance", scope, name] as const,
|
|
11
|
+
knowledgeBases: (scope: string) => ["knowledge-bases", scope] as const,
|
|
12
|
+
knowledgeBase: (scope: string, name: string | null | undefined) =>
|
|
13
|
+
["knowledge-bases", scope, name] as const,
|
|
14
|
+
documents: (
|
|
15
|
+
scope: string,
|
|
16
|
+
knowledgeBaseName: string,
|
|
17
|
+
nextToken?: string,
|
|
18
|
+
maxResults?: number,
|
|
19
|
+
subspace?: string,
|
|
20
|
+
) =>
|
|
21
|
+
[
|
|
22
|
+
"knowledge-bases",
|
|
23
|
+
scope,
|
|
24
|
+
knowledgeBaseName,
|
|
25
|
+
"documents",
|
|
26
|
+
nextToken,
|
|
27
|
+
maxResults,
|
|
28
|
+
subspace,
|
|
29
|
+
] as const,
|
|
30
|
+
chunks: (
|
|
31
|
+
scope: string,
|
|
32
|
+
knowledgeBaseName: string,
|
|
33
|
+
docId: string | null,
|
|
34
|
+
subspace?: string,
|
|
35
|
+
) => ["chunks", scope, knowledgeBaseName, docId, subspace] as const,
|
|
36
|
+
memoryStores: (scope: string) => ["memory", scope, "stores"] as const,
|
|
37
|
+
memoryStore: (scope: string, memoryStoreName: string | undefined) =>
|
|
38
|
+
["memory", scope, "stores", memoryStoreName] as const,
|
|
39
|
+
memoryUnits: (
|
|
40
|
+
scopeKey: string,
|
|
41
|
+
memoryStoreName: string,
|
|
42
|
+
scope: unknown,
|
|
43
|
+
nextToken?: string,
|
|
44
|
+
limit?: number,
|
|
45
|
+
) =>
|
|
46
|
+
["memory", scopeKey, "stores", memoryStoreName, "units", scope, nextToken, limit] as const,
|
|
47
|
+
memoryUnit: (
|
|
48
|
+
scopeKey: string,
|
|
49
|
+
memoryStoreName: string,
|
|
50
|
+
memoryId: string | undefined,
|
|
51
|
+
scope: unknown,
|
|
52
|
+
) =>
|
|
53
|
+
["memory", scopeKey, "stores", memoryStoreName, "units", "detail", memoryId, scope] as const,
|
|
54
|
+
memoryRequests: (
|
|
55
|
+
scopeKey: string,
|
|
56
|
+
memoryStoreName: string,
|
|
57
|
+
scope: unknown,
|
|
58
|
+
nextToken?: string,
|
|
59
|
+
limit?: number,
|
|
60
|
+
operation?: string,
|
|
61
|
+
) =>
|
|
62
|
+
[
|
|
63
|
+
"memory",
|
|
64
|
+
scopeKey,
|
|
65
|
+
"stores",
|
|
66
|
+
memoryStoreName,
|
|
67
|
+
"requests",
|
|
68
|
+
scope,
|
|
69
|
+
nextToken,
|
|
70
|
+
limit,
|
|
71
|
+
operation,
|
|
72
|
+
] as const,
|
|
73
|
+
memoryMessages: (
|
|
74
|
+
scopeKey: string,
|
|
75
|
+
memoryStoreName: string,
|
|
76
|
+
scope: unknown,
|
|
77
|
+
nextToken?: string,
|
|
78
|
+
limit?: number,
|
|
79
|
+
filters?: { minTimestamp?: string; maxTimestamp?: string },
|
|
80
|
+
) =>
|
|
81
|
+
[
|
|
82
|
+
"memory",
|
|
83
|
+
scopeKey,
|
|
84
|
+
"stores",
|
|
85
|
+
memoryStoreName,
|
|
86
|
+
"messages",
|
|
87
|
+
scope,
|
|
88
|
+
nextToken,
|
|
89
|
+
limit,
|
|
90
|
+
filters?.minTimestamp,
|
|
91
|
+
filters?.maxTimestamp,
|
|
92
|
+
] as const,
|
|
93
|
+
llmProviders: (scope: string) => ["llm-providers", scope] as const,
|
|
94
|
+
llmProvider: (scope: string, id: string | undefined) =>
|
|
95
|
+
["llm-providers", scope, id] as const,
|
|
96
|
+
llmProviderModels: (scope: string, id: string | undefined) =>
|
|
97
|
+
["llm-provider-models", scope, id] as const,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const INSTANCE_SCOPED_QUERY_ROOTS = new Set([
|
|
101
|
+
"instances",
|
|
102
|
+
"instance",
|
|
103
|
+
"knowledge-bases",
|
|
104
|
+
"chunks",
|
|
105
|
+
"memory",
|
|
106
|
+
"llm-providers",
|
|
107
|
+
"llm-provider-models",
|
|
108
|
+
"auth-status",
|
|
109
|
+
]);
|
|
110
|
+
|
|
111
|
+
export function isInstanceScopedQueryKey(queryKey: QueryKey): boolean {
|
|
112
|
+
const root = queryKey[0];
|
|
113
|
+
return typeof root === "string" && INSTANCE_SCOPED_QUERY_ROOTS.has(root);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function belongsToDataScope(queryKey: QueryKey, dataScopeKey: string): boolean {
|
|
117
|
+
return queryKey[1] === dataScopeKey;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function resetInstanceScopedQueries(
|
|
121
|
+
queryClient: QueryClient,
|
|
122
|
+
dataScopeKey?: string,
|
|
123
|
+
): void {
|
|
124
|
+
queryClient.removeQueries({
|
|
125
|
+
predicate: (query) =>
|
|
126
|
+
isInstanceScopedQueryKey(query.queryKey) &&
|
|
127
|
+
(!dataScopeKey || belongsToDataScope(query.queryKey, dataScopeKey)),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function invalidateInstanceScopedQueries(queryClient: QueryClient): void {
|
|
132
|
+
queryClient.invalidateQueries({
|
|
133
|
+
predicate: (query) => isInstanceScopedQueryKey(query.queryKey),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function invalidateKnowledgeBaseQueries(queryClient: QueryClient): void {
|
|
138
|
+
queryClient.invalidateQueries({ queryKey: ["knowledge-bases"] });
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function invalidateMemoryQueries(queryClient: QueryClient): void {
|
|
142
|
+
queryClient.invalidateQueries({ queryKey: ["memory"] });
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function invalidateLLMProviderQueries(queryClient: QueryClient): void {
|
|
146
|
+
queryClient.invalidateQueries({ queryKey: ["llm-providers"] });
|
|
147
|
+
}
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import { type NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
CLIError,
|
|
6
|
+
EXIT_CODE_MAP,
|
|
7
|
+
classifyErrorSource,
|
|
8
|
+
createLogger,
|
|
9
|
+
enterLogContext,
|
|
10
|
+
generateTraceId,
|
|
11
|
+
runWithLogContext,
|
|
12
|
+
} from "@tablestore/tablestore-agent-shared";
|
|
4
13
|
import type { StandardResponse } from "@tablestore/tablestore-agent-sdk";
|
|
5
14
|
|
|
6
15
|
import { resolveClients, type ResolvedClients } from "./sdk-client";
|
|
7
16
|
|
|
17
|
+
interface ApiLogContext {
|
|
18
|
+
traceId: string;
|
|
19
|
+
dashboardSessionId?: string;
|
|
20
|
+
method?: string;
|
|
21
|
+
path?: string;
|
|
22
|
+
startTime: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const apiContext = new AsyncLocalStorage<ApiLogContext>();
|
|
26
|
+
const apiLogger = createLogger("dashboard.api");
|
|
27
|
+
const QUIET_SUCCESS_PATHS = new Set(["/api/v1/runtime/context"]);
|
|
28
|
+
|
|
8
29
|
// ---------------------------------------------------------------------------
|
|
9
30
|
// HTTP status mapping
|
|
10
31
|
// ---------------------------------------------------------------------------
|
|
@@ -34,6 +55,14 @@ function httpStatusFor(code: string, fallback = 500): number {
|
|
|
34
55
|
return CODE_TO_HTTP_STATUS[code] ?? fallback;
|
|
35
56
|
}
|
|
36
57
|
|
|
58
|
+
function attachNoStoreHeader(response: NextResponse): void {
|
|
59
|
+
response.headers.set("Cache-Control", "no-store, max-age=0");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function shouldLogApiSuccess(path: string | undefined): boolean {
|
|
63
|
+
return !path || !QUIET_SUCCESS_PATHS.has(path);
|
|
64
|
+
}
|
|
65
|
+
|
|
37
66
|
// ---------------------------------------------------------------------------
|
|
38
67
|
// Response builders
|
|
39
68
|
// ---------------------------------------------------------------------------
|
|
@@ -45,10 +74,14 @@ function httpStatusFor(code: string, fallback = 500): number {
|
|
|
45
74
|
* emits on stdout, so the Dashboard frontend uses the same response parser.
|
|
46
75
|
*/
|
|
47
76
|
export function successResponse<T>(data: T, status = 200): NextResponse {
|
|
48
|
-
|
|
77
|
+
logApiResponse("api.response", "succeed", "SUCCESS", status);
|
|
78
|
+
const response = NextResponse.json(
|
|
49
79
|
{ code: "SUCCESS", message: "succeed", data },
|
|
50
80
|
{ status },
|
|
51
81
|
);
|
|
82
|
+
attachNoStoreHeader(response);
|
|
83
|
+
attachTraceHeader(response);
|
|
84
|
+
return response;
|
|
52
85
|
}
|
|
53
86
|
|
|
54
87
|
/**
|
|
@@ -58,11 +91,26 @@ export function errorResponse(
|
|
|
58
91
|
code: string,
|
|
59
92
|
message: string,
|
|
60
93
|
status?: number,
|
|
94
|
+
options: { log?: boolean; errorSource?: "local" | "network" | "service" | "browser" } = {},
|
|
61
95
|
): NextResponse {
|
|
62
|
-
|
|
96
|
+
const responseStatus = status ?? httpStatusFor(code);
|
|
97
|
+
if (options.log !== false) {
|
|
98
|
+
logApiResponse(
|
|
99
|
+
"api.error_response",
|
|
100
|
+
message,
|
|
101
|
+
code,
|
|
102
|
+
responseStatus,
|
|
103
|
+
undefined,
|
|
104
|
+
options.errorSource ?? "local",
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
const response = NextResponse.json(
|
|
63
108
|
{ code, message, data: null },
|
|
64
|
-
{ status:
|
|
109
|
+
{ status: responseStatus },
|
|
65
110
|
);
|
|
111
|
+
attachNoStoreHeader(response);
|
|
112
|
+
attachTraceHeader(response);
|
|
113
|
+
return response;
|
|
66
114
|
}
|
|
67
115
|
|
|
68
116
|
/**
|
|
@@ -99,7 +147,18 @@ export function forwardResponse(
|
|
|
99
147
|
if (resp.requestId) body.requestId = resp.requestId;
|
|
100
148
|
|
|
101
149
|
const status = resp.code === "SUCCESS" ? 200 : httpStatusFor(resp.code);
|
|
102
|
-
|
|
150
|
+
logApiResponse(
|
|
151
|
+
resp.code === "SUCCESS" ? "api.response" : "api.service_error",
|
|
152
|
+
resp.message,
|
|
153
|
+
resp.code,
|
|
154
|
+
status,
|
|
155
|
+
resp.requestId,
|
|
156
|
+
resp.code === "SUCCESS" ? undefined : "service",
|
|
157
|
+
);
|
|
158
|
+
const response = NextResponse.json(body, { status });
|
|
159
|
+
attachNoStoreHeader(response);
|
|
160
|
+
attachTraceHeader(response);
|
|
161
|
+
return response;
|
|
103
162
|
}
|
|
104
163
|
|
|
105
164
|
// ---------------------------------------------------------------------------
|
|
@@ -119,7 +178,10 @@ export function forwardResponse(
|
|
|
119
178
|
*/
|
|
120
179
|
export function handleApiError(error: unknown): NextResponse {
|
|
121
180
|
if (error instanceof CLIError) {
|
|
122
|
-
|
|
181
|
+
logApiException(error, error.code, httpStatusFor(error.code));
|
|
182
|
+
return errorResponse(error.code, error.message, httpStatusFor(error.code), {
|
|
183
|
+
log: false,
|
|
184
|
+
});
|
|
123
185
|
}
|
|
124
186
|
|
|
125
187
|
if (error instanceof Error) {
|
|
@@ -133,7 +195,8 @@ export function handleApiError(error: unknown): NextResponse {
|
|
|
133
195
|
lowerMessage.includes("token decode") ||
|
|
134
196
|
lowerMessage.includes("unsupported token version")
|
|
135
197
|
) {
|
|
136
|
-
|
|
198
|
+
logApiException(error, "UNAUTHORIZED", 401);
|
|
199
|
+
return errorResponse("UNAUTHORIZED", message, 401, { log: false });
|
|
137
200
|
}
|
|
138
201
|
|
|
139
202
|
if (
|
|
@@ -143,16 +206,20 @@ export function handleApiError(error: unknown): NextResponse {
|
|
|
143
206
|
lowerMessage.includes("enotfound") ||
|
|
144
207
|
lowerMessage.includes("network")
|
|
145
208
|
) {
|
|
146
|
-
|
|
209
|
+
logApiException(error, "NETWORK_ERROR", 503);
|
|
210
|
+
return errorResponse("NETWORK_ERROR", message, 503, { log: false });
|
|
147
211
|
}
|
|
148
212
|
|
|
149
|
-
|
|
213
|
+
logApiException(error, "INTERNAL_SERVER_ERROR", 500);
|
|
214
|
+
return errorResponse("INTERNAL_SERVER_ERROR", message, 500, { log: false });
|
|
150
215
|
}
|
|
151
216
|
|
|
217
|
+
logApiException(error, "INTERNAL_SERVER_ERROR", 500);
|
|
152
218
|
return errorResponse(
|
|
153
219
|
"INTERNAL_SERVER_ERROR",
|
|
154
220
|
typeof error === "string" ? error : JSON.stringify(error),
|
|
155
221
|
500,
|
|
222
|
+
{ log: false },
|
|
156
223
|
);
|
|
157
224
|
}
|
|
158
225
|
|
|
@@ -176,6 +243,7 @@ export function handleApiError(error: unknown): NextResponse {
|
|
|
176
243
|
export function requireClients(
|
|
177
244
|
request: NextRequest,
|
|
178
245
|
): ResolvedClients | NextResponse {
|
|
246
|
+
ensureApiLogContext(request);
|
|
179
247
|
try {
|
|
180
248
|
return resolveClients(request);
|
|
181
249
|
} catch (err) {
|
|
@@ -183,5 +251,121 @@ export function requireClients(
|
|
|
183
251
|
}
|
|
184
252
|
}
|
|
185
253
|
|
|
254
|
+
export function ensureApiLogContext(request: NextRequest): ApiLogContext {
|
|
255
|
+
const current = apiContext.getStore();
|
|
256
|
+
if (current) return current;
|
|
257
|
+
|
|
258
|
+
const traceId =
|
|
259
|
+
request.headers.get("x-trace-id") ||
|
|
260
|
+
request.headers.get("x-request-id") ||
|
|
261
|
+
generateTraceId();
|
|
262
|
+
const path = request.nextUrl?.pathname ?? safePathname(request.url);
|
|
263
|
+
const context: ApiLogContext = {
|
|
264
|
+
traceId,
|
|
265
|
+
dashboardSessionId: process.env.TABLESTORE_DASHBOARD_SESSION_ID,
|
|
266
|
+
method: request.method,
|
|
267
|
+
path,
|
|
268
|
+
startTime: Date.now(),
|
|
269
|
+
};
|
|
270
|
+
apiContext.enterWith(context);
|
|
271
|
+
enterLogContext(context);
|
|
272
|
+
if (shouldLogApiSuccess(path)) {
|
|
273
|
+
apiLogger.info({
|
|
274
|
+
event: "api.request",
|
|
275
|
+
message: `${request.method} ${path}`,
|
|
276
|
+
dashboardSessionId: context.dashboardSessionId,
|
|
277
|
+
traceId,
|
|
278
|
+
details: {
|
|
279
|
+
method: request.method,
|
|
280
|
+
path,
|
|
281
|
+
userAgent: request.headers.get("user-agent") ?? undefined,
|
|
282
|
+
},
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
return context;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function getApiLogContext(): ApiLogContext | undefined {
|
|
289
|
+
return apiContext.getStore();
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export async function withApiLogging<T>(
|
|
293
|
+
request: NextRequest,
|
|
294
|
+
handler: () => Promise<T> | T,
|
|
295
|
+
): Promise<T> {
|
|
296
|
+
const context = ensureApiLogContext(request);
|
|
297
|
+
return apiContext.run(context, async () =>
|
|
298
|
+
runWithLogContext(context, async () => handler()),
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
186
302
|
// Re-export so routes can `import { CODE_TO_HTTP_STATUS } from` if ever needed.
|
|
187
303
|
export { CODE_TO_HTTP_STATUS, EXIT_CODE_MAP };
|
|
304
|
+
|
|
305
|
+
function logApiResponse(
|
|
306
|
+
event: string,
|
|
307
|
+
message: string,
|
|
308
|
+
code: string,
|
|
309
|
+
status: number,
|
|
310
|
+
requestId?: string,
|
|
311
|
+
errorSource?: "local" | "network" | "service" | "browser",
|
|
312
|
+
): void {
|
|
313
|
+
const context = apiContext.getStore();
|
|
314
|
+
if (status < 400 && !shouldLogApiSuccess(context?.path)) return;
|
|
315
|
+
const durationMs = context ? Date.now() - context.startTime : undefined;
|
|
316
|
+
const level = status >= 500 ? "error" : status >= 400 ? "warn" : "info";
|
|
317
|
+
apiLogger.log({
|
|
318
|
+
level,
|
|
319
|
+
event,
|
|
320
|
+
message,
|
|
321
|
+
dashboardSessionId: context?.dashboardSessionId,
|
|
322
|
+
traceId: context?.traceId,
|
|
323
|
+
requestId,
|
|
324
|
+
durationMs,
|
|
325
|
+
errorSource,
|
|
326
|
+
details: {
|
|
327
|
+
method: context?.method,
|
|
328
|
+
path: context?.path,
|
|
329
|
+
status,
|
|
330
|
+
code,
|
|
331
|
+
errorSource,
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function logApiException(error: unknown, code: string, status: number): void {
|
|
337
|
+
const context = apiContext.getStore();
|
|
338
|
+
const durationMs = context ? Date.now() - context.startTime : undefined;
|
|
339
|
+
const source = classifyErrorSource(error);
|
|
340
|
+
apiLogger.error({
|
|
341
|
+
event: "api.exception",
|
|
342
|
+
message: error instanceof Error ? error.message : String(error),
|
|
343
|
+
dashboardSessionId: context?.dashboardSessionId,
|
|
344
|
+
traceId: context?.traceId,
|
|
345
|
+
durationMs,
|
|
346
|
+
error,
|
|
347
|
+
errorSource: source,
|
|
348
|
+
details: {
|
|
349
|
+
method: context?.method,
|
|
350
|
+
path: context?.path,
|
|
351
|
+
status,
|
|
352
|
+
code,
|
|
353
|
+
errorSource: source,
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
function attachTraceHeader(response: NextResponse): void {
|
|
359
|
+
const context = apiContext.getStore();
|
|
360
|
+
if (context?.traceId) {
|
|
361
|
+
response.headers.set("x-trace-id", context.traceId);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function safePathname(url: string): string {
|
|
366
|
+
try {
|
|
367
|
+
return new URL(url).pathname;
|
|
368
|
+
} catch {
|
|
369
|
+
return "";
|
|
370
|
+
}
|
|
371
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type NextRequest } from "next/server";
|
|
2
|
+
|
|
3
|
+
import { getActiveInstanceContext } from "./sdk-client";
|
|
4
|
+
|
|
5
|
+
export function validateChatProjectContext(
|
|
6
|
+
request: NextRequest,
|
|
7
|
+
requestedActiveInstance: string | null | undefined,
|
|
8
|
+
): { ok: true } | { ok: false; message: string } {
|
|
9
|
+
if (requestedActiveInstance === undefined) return { ok: true };
|
|
10
|
+
const current = getActiveInstanceContext(request).instanceName ?? null;
|
|
11
|
+
if (current === requestedActiveInstance) return { ok: true };
|
|
12
|
+
return {
|
|
13
|
+
ok: false,
|
|
14
|
+
message:
|
|
15
|
+
"Project context changed. Refresh the dashboard and start the chat again.",
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type NextRequest } from "next/server";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
getConfigRevision,
|
|
6
|
+
listInstances,
|
|
7
|
+
} from "@tablestore/tablestore-agent-shared";
|
|
8
|
+
|
|
9
|
+
import { inspectCredentials } from "./sdk-client";
|
|
10
|
+
import type { RuntimeContext } from "@/types/runtime-context";
|
|
11
|
+
|
|
12
|
+
function hasAnyNamedInstance(): boolean {
|
|
13
|
+
try {
|
|
14
|
+
return listInstances().some((r) => !r.is_default_fallback);
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function fallbackScopeHash(input: {
|
|
21
|
+
instanceName?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
configRevision: string;
|
|
24
|
+
}): string {
|
|
25
|
+
return createHash("sha256")
|
|
26
|
+
.update([
|
|
27
|
+
input.instanceName ?? "",
|
|
28
|
+
input.region ?? "",
|
|
29
|
+
input.configRevision,
|
|
30
|
+
].join("|"))
|
|
31
|
+
.digest("hex")
|
|
32
|
+
.slice(0, 12);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function buildDataScopeKey(input: {
|
|
36
|
+
configured: boolean;
|
|
37
|
+
credentialSource: RuntimeContext["credentialSource"];
|
|
38
|
+
activeInstance: string | null;
|
|
39
|
+
instanceName?: string;
|
|
40
|
+
region?: string;
|
|
41
|
+
configRevision: string;
|
|
42
|
+
credentialFingerprint?: string;
|
|
43
|
+
}): string {
|
|
44
|
+
if (!input.configured) return `unconfigured:${input.configRevision}`;
|
|
45
|
+
if (input.credentialSource === "cookie" && !input.activeInstance) {
|
|
46
|
+
// getRuntimeContext always supplies credentialFingerprint for raw-token
|
|
47
|
+
// cookies. The fallback only protects direct callers/tests from collapsing
|
|
48
|
+
// unrelated raw-token scopes back into one cache namespace.
|
|
49
|
+
return [
|
|
50
|
+
"cookie",
|
|
51
|
+
"raw",
|
|
52
|
+
input.credentialFingerprint ?? fallbackScopeHash(input),
|
|
53
|
+
].join(":");
|
|
54
|
+
}
|
|
55
|
+
if (input.credentialSource === "env") {
|
|
56
|
+
return [
|
|
57
|
+
"env",
|
|
58
|
+
input.instanceName ?? "",
|
|
59
|
+
input.region ?? "",
|
|
60
|
+
].join(":");
|
|
61
|
+
}
|
|
62
|
+
if (input.activeInstance) {
|
|
63
|
+
return [
|
|
64
|
+
"project",
|
|
65
|
+
encodeURIComponent(input.activeInstance),
|
|
66
|
+
input.configRevision,
|
|
67
|
+
].join(":");
|
|
68
|
+
}
|
|
69
|
+
return `${input.credentialSource ?? "unknown"}:${input.configRevision}`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function getRuntimeContext(request: NextRequest): RuntimeContext {
|
|
73
|
+
const configRevision = getConfigRevision();
|
|
74
|
+
const creds = inspectCredentials(request);
|
|
75
|
+
const hasAnyInstance = hasAnyNamedInstance();
|
|
76
|
+
|
|
77
|
+
if (!creds) {
|
|
78
|
+
const base = {
|
|
79
|
+
configured: false,
|
|
80
|
+
credentialSource: null,
|
|
81
|
+
activeInstance: null,
|
|
82
|
+
configRevision,
|
|
83
|
+
hasAnyInstance,
|
|
84
|
+
} satisfies Omit<RuntimeContext, "dataScopeKey">;
|
|
85
|
+
return {
|
|
86
|
+
...base,
|
|
87
|
+
dataScopeKey: buildDataScopeKey(base),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const base = {
|
|
92
|
+
configured: true,
|
|
93
|
+
credentialSource: creds.source,
|
|
94
|
+
activeInstance: creds.activeInstance,
|
|
95
|
+
instanceName: creds.instanceName,
|
|
96
|
+
region: creds.region,
|
|
97
|
+
configRevision,
|
|
98
|
+
hasAnyInstance,
|
|
99
|
+
} satisfies Omit<RuntimeContext, "dataScopeKey">;
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
...base,
|
|
103
|
+
dataScopeKey: buildDataScopeKey({
|
|
104
|
+
...base,
|
|
105
|
+
credentialFingerprint: creds.credentialFingerprint,
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
108
|
+
}
|