@tablestore/tablestore-agent-cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/kb/create.d.ts.map +1 -1
- package/dist/commands/kb/create.js +21 -0
- package/dist/commands/kb/create.js.map +1 -1
- package/dist/commands/kb/retrieve.d.ts.map +1 -1
- package/dist/commands/kb/retrieve.js +3 -3
- package/dist/commands/kb/retrieve.js.map +1 -1
- package/dist/dashboard-runtime/dashboard/.next/BUILD_ID +1 -1
- package/dist/dashboard-runtime/dashboard/.next/app-path-routes-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/build-manifest.json +5 -5
- package/dist/dashboard-runtime/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/dashboard-runtime/dashboard/.next/routes-manifest.json +6 -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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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_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 +14 -14
- package/dist/dashboard-runtime/dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
- 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 -10
- 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.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/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.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]/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.nft.json +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]/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/route.js.nft.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route/app-paths-manifest.json +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route/build-manifest.json +9 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route/server-reference-manifest.json +4 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js +6 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.map +5 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route.js.nft.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/app/api/v1/oss/list/route_client-reference-manifest.js +3 -0
- 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 +14 -14
- 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 +14 -14
- 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 -10
- 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.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 +17 -17
- package/dist/dashboard-runtime/dashboard/.next/server/app/onboarding.segments/_full.segment.rsc +17 -17
- 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 -10
- 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_client-reference-manifest.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/app-paths-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/0p91_next_dist_esm_build_templates_app-route_0n~ec7s.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0cee_lo._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0lvi0g-._.js +2 -2
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/[root-of-the-server]__0q8vcw8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_v1_oss_list_route_actions_00xq2u..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/[root-of-the-server]__0aqzu8w._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0hozzu6._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0jb9ccl._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__13ylf4x._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_02bg849._.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/_0db498n._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0jghj2_._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0kd7szs._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0n4gd_6._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0ogxvev._.js +7 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0tr8-3u._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0xzh5yw._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12~3vfk._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_13_lb.o._.js +3 -0
- 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_0ejgygh._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0y49vhd._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_10dsqx~._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_app_(dashboard)_knowledge-base_create_page_tsx_0916~g-._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_0ls1exu._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_0ugdjlb._.js +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_components_ui_0-tuf-h._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_08h.f_8._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0jns_ph._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0pf30rh._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0~k~1nt._.js +3 -0
- package/dist/dashboard-runtime/dashboard/.next/server/functions-config-manifest.json +1 -0
- package/dist/dashboard-runtime/dashboard/.next/server/middleware-build-manifest.js +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/00tz~p479bdgl.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/02i9olo-312mq.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/062k9jbtd9.lv.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/06uuhz24tvdt..js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/07cp19da_kfld.js +5 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/086esp1n941jl.js +138 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08qlxn-3d_rtu.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/09uxq~55qug8c.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0__g1ogrdh412.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ab-ev0u1~ch5.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0bw682qzkh2ni.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0d29.l~3ip181.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ewpzgu_qf0wf.js +4 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0jc31diex030o.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k79upjc40aky.css +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0lp2g_27uyhuz.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0snnsfosp3~gq.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0tmwptel_4y0o.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u9wtl06_b72x.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uv55p7kzteex.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v9d5wl9nsva3.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0xko7~ja3xuc-.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/14.dp0-y_mhjo.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/15wxh8ltqt88_.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/183~u3-4a74db.js +1 -0
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/{turbopack-0ybyy.9-.w~ub.js → turbopack-0w.hw6u8qra5z.js} +1 -1
- package/dist/dashboard-runtime/dashboard/package.json +1 -0
- package/dist/dashboard-runtime/dashboard/src/app/(dashboard)/knowledge-base/[name]/settings/settings-client.tsx +1 -1
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/knowledge-bases/[name]/documents/route.ts +44 -3
- package/dist/dashboard-runtime/dashboard/src/app/api/v1/oss/list/route.ts +125 -0
- package/dist/dashboard-runtime/dashboard/src/app/globals.css +46 -31
- package/dist/dashboard-runtime/dashboard/src/components/chat/add-mount-row.tsx +21 -55
- package/dist/dashboard-runtime/dashboard/src/components/chat/chat-mount-config.tsx +35 -27
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-empty-state.tsx +87 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/mount-picker.tsx +87 -0
- package/dist/dashboard-runtime/dashboard/src/components/chat/unified-retrieval-section.tsx +3 -2
- package/dist/dashboard-runtime/dashboard/src/components/documents/doc-upload-dialog.tsx +155 -54
- package/dist/dashboard-runtime/dashboard/src/components/documents/oss-browser.tsx +264 -0
- package/dist/dashboard-runtime/dashboard/src/components/documents/oss-import-tab.tsx +143 -0
- package/dist/dashboard-runtime/dashboard/src/components/instance/connect-instance-form.tsx +60 -60
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-create-form.tsx +52 -35
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/kb-settings-form.tsx +152 -76
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/knowledge-base-retrieval-config.ts +110 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/retrieval-result-count-field.tsx +106 -0
- package/dist/dashboard-runtime/dashboard/src/components/knowledge-base/retrieval-result-count.ts +11 -0
- package/dist/dashboard-runtime/dashboard/src/components/layout/detail-sidebar.tsx +84 -4
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/assemble-retrieval-configuration.ts +22 -3
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-form.tsx +10 -3
- package/dist/dashboard-runtime/dashboard/src/components/retrieval/retrieval-params-fields.tsx +114 -56
- package/dist/dashboard-runtime/dashboard/src/hooks/use-detail-sidebar-collapsed.ts +86 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-oss-import.ts +148 -0
- package/dist/dashboard-runtime/dashboard/src/hooks/use-oss-list.ts +89 -0
- package/dist/dashboard-runtime/dashboard/src/lib/extension-filter.ts +62 -0
- package/dist/dashboard-runtime/dashboard/src/lib/glob-filter.ts +76 -0
- package/dist/dashboard-runtime/dashboard/src/lib/oss-selection.ts +58 -0
- package/dist/dashboard-runtime/dashboard/src/lib/server/oss-client.ts +65 -0
- package/dist/dashboard-runtime/dashboard/src/schemas/knowledge-base.ts +3 -3
- package/dist/dashboard-runtime/dashboard/src/schemas/llm-chat.ts +1 -1
- package/dist/dashboard-runtime/dashboard/src/schemas/retrieval.ts +4 -1
- package/dist/dashboard-runtime/dashboard/src/services/api-client.ts +11 -6
- package/dist/dashboard-runtime/dashboard/src/services/documents.ts +27 -8
- package/dist/dashboard-runtime/dashboard/src/services/oss.ts +36 -0
- package/dist/dashboard-runtime/dashboard/src/types/knowledge-base.ts +1 -1
- package/dist/dashboard-runtime/dashboard/vitest.config.mjs +6 -0
- 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/tsconfig.tsbuildinfo +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts +1 -1
- package/dist/dashboard-runtime/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-sdk/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts +1 -1
- package/dist/node_modules/@tablestore/tablestore-agent-shared/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/0lvo_@radix-ui_react-popper_dist_index_mjs_13rqw99._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0id.4_g._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0p7j-9i._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0.1szyw._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0251rsp._.js +0 -7
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_038vjn1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_06tznmj._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_09y~hs8._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0_ow0x1._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_0t373jc._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/_12guzbo._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/dashboard_src_0jns2ew._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0aw_rgu._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_0ld4qfm._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/server/chunks/ssr/node_modules__pnpm_125b4co._.js +0 -3
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0-ov0wxgu5b65.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/00-qnlax_4630.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/034uozc1ki09_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/03zdsc.dicedw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/05hmbxh7h5ct-.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/08tdws.ontiw1.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0azwigiwuhh08.css +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0b54rtt1-cxht.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cdo38.8y_jr2.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0cy.fvgx7dgqx.js +0 -4
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fa.nak91jfo-.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0fv6q06wgazh_.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0g9y74cipd10n.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0ga6neugwmh.1.js +0 -5
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0hkir82jccgck.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0k-x6_7dhqb~c.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0n42fh.zwyk35.js +0 -138
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0q6lk_p74rti7.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0u39cc6mmeqb3.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0uay29z9qqouw.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0v0e.nl_9fjba.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wd0_x8u.jzur.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0wf-nssu2qd_2.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0x7pw1zo7nxno.js +0 -1
- package/dist/dashboard-runtime/dashboard/.next/static/chunks/0zbi5n76awxz1.js +0 -1
- /package/dist/dashboard-runtime/dashboard/.next/static/{uYteIiFtKdPhUhmILps5X → doYIl-pd6Sqax3bfUgN3q}/_buildManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{uYteIiFtKdPhUhmILps5X → doYIl-pd6Sqax3bfUgN3q}/_clientMiddlewareManifest.js +0 -0
- /package/dist/dashboard-runtime/dashboard/.next/static/{uYteIiFtKdPhUhmILps5X → doYIl-pd6Sqax3bfUgN3q}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate user-friendly extension / prefix tokens into the glob patterns
|
|
3
|
+
* the KB server expects on `inclusionFilters` / `exclusionFilters`.
|
|
4
|
+
*
|
|
5
|
+
* The server only accepts one of two pattern shapes:
|
|
6
|
+
* - prefix: `value*` (wildcard at the END, anchors the start)
|
|
7
|
+
* - suffix: `*value` (wildcard at the START, anchors the end)
|
|
8
|
+
*
|
|
9
|
+
* The dashboard masks these details — users type plain text in the UI
|
|
10
|
+
* (e.g. ".md, .pdf" for suffix include; "archive/2026/, drafts/" for prefix
|
|
11
|
+
* include) and these helpers wrap them. Already-globbed input is detected
|
|
12
|
+
* and left alone, so a user who pastes "*.md" or "drafts/*" gets the same
|
|
13
|
+
* result as one who types ".md" or "drafts/".
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Lowercase, trim, and split a comma-separated input list. Empty tokens are
|
|
18
|
+
* dropped. Used by both prefix and suffix parsers below.
|
|
19
|
+
*/
|
|
20
|
+
function tokenize(raw: string): string[] {
|
|
21
|
+
return raw
|
|
22
|
+
.split(",")
|
|
23
|
+
.map((s) => s.trim())
|
|
24
|
+
.filter(Boolean);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Wrap each token as a suffix glob: ".md, .pdf" → ["*.md", "*.pdf"].
|
|
29
|
+
*
|
|
30
|
+
* Idempotent — a token that already starts with `*` is kept verbatim, so
|
|
31
|
+
* users who type the canonical glob form don't get a double-star.
|
|
32
|
+
*/
|
|
33
|
+
export function parseSuffixGlobs(raw: string): string[] {
|
|
34
|
+
return tokenize(raw).map((token) => (token.startsWith("*") ? token : `*${token}`));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Wrap each token as a prefix glob: "drafts/, archive/2026/" →
|
|
39
|
+
* ["drafts/*", "archive/2026/*"].
|
|
40
|
+
*
|
|
41
|
+
* Idempotent on tokens already ending in `*`.
|
|
42
|
+
*/
|
|
43
|
+
export function parsePrefixGlobs(raw: string): string[] {
|
|
44
|
+
return tokenize(raw).map((token) => (token.endsWith("*") ? token : `${token}*`));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Combine prefix and suffix inclusion / exclusion inputs into the flat
|
|
49
|
+
* `inclusionFilters` / `exclusionFilters` arrays the server consumes.
|
|
50
|
+
* Returns `undefined` for empty buckets so callers can spread without
|
|
51
|
+
* leaking empty arrays into the request body.
|
|
52
|
+
*/
|
|
53
|
+
export interface FolderGlobInputs {
|
|
54
|
+
prefixIncludeInput: string;
|
|
55
|
+
prefixExcludeInput: string;
|
|
56
|
+
suffixIncludeInput: string;
|
|
57
|
+
suffixExcludeInput: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function buildFolderGlobs(inputs: FolderGlobInputs): {
|
|
61
|
+
inclusionFilters?: string[];
|
|
62
|
+
exclusionFilters?: string[];
|
|
63
|
+
} {
|
|
64
|
+
const inclusionFilters = [
|
|
65
|
+
...parsePrefixGlobs(inputs.prefixIncludeInput),
|
|
66
|
+
...parseSuffixGlobs(inputs.suffixIncludeInput),
|
|
67
|
+
];
|
|
68
|
+
const exclusionFilters = [
|
|
69
|
+
...parsePrefixGlobs(inputs.prefixExcludeInput),
|
|
70
|
+
...parseSuffixGlobs(inputs.suffixExcludeInput),
|
|
71
|
+
];
|
|
72
|
+
return {
|
|
73
|
+
inclusionFilters: inclusionFilters.length > 0 ? inclusionFilters : undefined,
|
|
74
|
+
exclusionFilters: exclusionFilters.length > 0 ? exclusionFilters : undefined,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminated selection algebra used by the OSS browser. Splitting the
|
|
3
|
+
* shape into a tagged union (instead of two parallel sets) keeps the
|
|
4
|
+
* "checked file" vs. "checked folder" distinction visible at every call
|
|
5
|
+
* site without bug-prone implicit-conversion paths.
|
|
6
|
+
*/
|
|
7
|
+
export type OssSelectedItem =
|
|
8
|
+
| { type: "file"; ossKey: string; size: number }
|
|
9
|
+
| { type: "folder"; prefix: string };
|
|
10
|
+
|
|
11
|
+
export type OssSelection = OssSelectedItem[];
|
|
12
|
+
|
|
13
|
+
export function isFileSelected(sel: OssSelection, ossKey: string): boolean {
|
|
14
|
+
return sel.some((s) => s.type === "file" && s.ossKey === ossKey);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function isFolderSelected(sel: OssSelection, prefix: string): boolean {
|
|
18
|
+
return sel.some((s) => s.type === "folder" && s.prefix === prefix);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function toggleFile(
|
|
22
|
+
sel: OssSelection,
|
|
23
|
+
file: { ossKey: string; size: number },
|
|
24
|
+
): OssSelection {
|
|
25
|
+
if (isFileSelected(sel, file.ossKey)) {
|
|
26
|
+
return sel.filter((s) => !(s.type === "file" && s.ossKey === file.ossKey));
|
|
27
|
+
}
|
|
28
|
+
return [...sel, { type: "file", ossKey: file.ossKey, size: file.size }];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function toggleFolder(
|
|
32
|
+
sel: OssSelection,
|
|
33
|
+
folder: { prefix: string },
|
|
34
|
+
): OssSelection {
|
|
35
|
+
if (isFolderSelected(sel, folder.prefix)) {
|
|
36
|
+
return sel.filter((s) => !(s.type === "folder" && s.prefix === folder.prefix));
|
|
37
|
+
}
|
|
38
|
+
return [...sel, { type: "folder", prefix: folder.prefix }];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Split a selection into the two payloads consumers need at submission time:
|
|
43
|
+
* an explicit ossKey list (files), and the prefixes that need to go through
|
|
44
|
+
* `expandPrefixes()`. Order within each list is preserved so the UI can
|
|
45
|
+
* render a stable preview.
|
|
46
|
+
*/
|
|
47
|
+
export function partitionSelection(sel: OssSelection): {
|
|
48
|
+
fileKeys: string[];
|
|
49
|
+
folderPrefixes: string[];
|
|
50
|
+
} {
|
|
51
|
+
const fileKeys: string[] = [];
|
|
52
|
+
const folderPrefixes: string[] = [];
|
|
53
|
+
for (const item of sel) {
|
|
54
|
+
if (item.type === "file") fileKeys.push(item.ossKey);
|
|
55
|
+
else folderPrefixes.push(item.prefix);
|
|
56
|
+
}
|
|
57
|
+
return { fileKeys, folderPrefixes };
|
|
58
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import OSS from "ali-oss";
|
|
2
|
+
|
|
3
|
+
import type { AppConfig } from "@tablestore/tablestore-agent-shared";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Build an `ali-oss` client from a resolved AppConfig, or `null` if no OSS
|
|
7
|
+
* target has been configured for this instance. Callers should treat `null`
|
|
8
|
+
* as the `OSS_NOT_CONFIGURED` case — the upstream error envelope.
|
|
9
|
+
*
|
|
10
|
+
* Construction mirrors the upstream agent-storage SDK's OSSUploader (which is
|
|
11
|
+
* the path that successfully uploads files for the local-upload tab):
|
|
12
|
+
* v1 signing (no `authorizationV4`), raw region, explicit endpoint. We do
|
|
13
|
+
* NOT mirror `packages/sdk/src/managed-oss.ts` here — that file is the
|
|
14
|
+
* bucket-creation path, which talks to a different OSS surface that requires
|
|
15
|
+
* v4. Forcing v4 on object-operation calls produces "SignatureDoesNotMatch"
|
|
16
|
+
* because the canonical string is computed against a region that the
|
|
17
|
+
* legacy bucket signing flow doesn't agree with.
|
|
18
|
+
*/
|
|
19
|
+
export function getOssClient(config: AppConfig): OSS | null {
|
|
20
|
+
const endpoint = (config.oss_endpoint ?? "").trim();
|
|
21
|
+
const bucket = (config.oss_bucket_name ?? "").trim();
|
|
22
|
+
const region = (config.region ?? "").trim();
|
|
23
|
+
if (!endpoint || !bucket || !region) return null;
|
|
24
|
+
|
|
25
|
+
return new OSS({
|
|
26
|
+
accessKeyId: config.access_key_id ?? "",
|
|
27
|
+
accessKeySecret: config.access_key_secret ?? "",
|
|
28
|
+
bucket,
|
|
29
|
+
region,
|
|
30
|
+
endpoint,
|
|
31
|
+
secure: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Translate an error from ali-oss (or anywhere else in the OSS path) into
|
|
37
|
+
* the dashboard's canonical `{ code, httpStatus, message }` triple. The
|
|
38
|
+
* route handlers feed this directly into `forwardResponse`.
|
|
39
|
+
*/
|
|
40
|
+
export function mapOssError(error: unknown): {
|
|
41
|
+
code: string;
|
|
42
|
+
httpStatus: number;
|
|
43
|
+
message: string;
|
|
44
|
+
} {
|
|
45
|
+
// ali-oss attaches a string `code` on every operational error; lean on it.
|
|
46
|
+
const ossCode =
|
|
47
|
+
error && typeof error === "object" && "code" in error
|
|
48
|
+
? String((error as { code: unknown }).code ?? "")
|
|
49
|
+
: "";
|
|
50
|
+
const message =
|
|
51
|
+
error instanceof Error ? error.message : String(error ?? "Unknown OSS error");
|
|
52
|
+
|
|
53
|
+
switch (ossCode) {
|
|
54
|
+
case "AccessDenied":
|
|
55
|
+
case "InvalidAccessKeyId":
|
|
56
|
+
case "SignatureDoesNotMatch":
|
|
57
|
+
return { code: "OSS_FORBIDDEN", httpStatus: 403, message };
|
|
58
|
+
case "NoSuchBucket":
|
|
59
|
+
return { code: "OSS_BUCKET_NOT_FOUND", httpStatus: 404, message };
|
|
60
|
+
case "InvalidArgument":
|
|
61
|
+
return { code: "BAD_REQUEST", httpStatus: 400, message };
|
|
62
|
+
default:
|
|
63
|
+
return { code: "OSS_UPSTREAM_ERROR", httpStatus: 502, message };
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -29,7 +29,7 @@ const embeddingConfigSchema = z.object({
|
|
|
29
29
|
|
|
30
30
|
const rerankingConfigSchema = z.object({
|
|
31
31
|
type: z.enum(["RRF", "WEIGHT", "MODEL"]),
|
|
32
|
-
numberOfResults: z.number().int().
|
|
32
|
+
numberOfResults: z.number().int().min(0).max(200).optional(),
|
|
33
33
|
rrfConfiguration: z
|
|
34
34
|
.object({
|
|
35
35
|
denseVectorSearchWeight: z.number().min(0),
|
|
@@ -57,10 +57,10 @@ const retrievalConfigSchema = z.object({
|
|
|
57
57
|
.min(1)
|
|
58
58
|
.optional(),
|
|
59
59
|
denseVectorSearchConfiguration: z
|
|
60
|
-
.object({ numberOfResults: z.number().int().
|
|
60
|
+
.object({ numberOfResults: z.number().int().min(0).max(100) })
|
|
61
61
|
.optional(),
|
|
62
62
|
fullTextSearchConfiguration: z
|
|
63
|
-
.object({ numberOfResults: z.number().int().
|
|
63
|
+
.object({ numberOfResults: z.number().int().min(0).max(100) })
|
|
64
64
|
.optional(),
|
|
65
65
|
rerankingConfiguration: rerankingConfigSchema.optional(),
|
|
66
66
|
});
|
|
@@ -11,7 +11,7 @@ export const chatRagKbSchema = z.object({
|
|
|
11
11
|
knowledgeBaseName: z.string().min(1),
|
|
12
12
|
subspace: z.array(z.string()).optional(),
|
|
13
13
|
retrievalConfiguration: z.record(z.unknown()).optional(),
|
|
14
|
-
topK: z.number().int().min(
|
|
14
|
+
topK: z.number().int().min(0).max(100).optional(),
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
export const chatRagSchema = z.object({
|
|
@@ -7,7 +7,10 @@ export const retrievalSchema = z.object({
|
|
|
7
7
|
.min(1, "Query must be at least 1 character")
|
|
8
8
|
.max(128, "Query must be at most 128 characters"),
|
|
9
9
|
subspace: z.array(z.string()).optional(),
|
|
10
|
-
topK: z.number().int().min(
|
|
10
|
+
topK: z.number().int().min(0).max(100).default(20).optional(),
|
|
11
|
+
denseTopK: z.number().int().min(0).max(100).default(20).optional(),
|
|
12
|
+
fullTextTopK: z.number().int().min(0).max(100).default(20).optional(),
|
|
13
|
+
rerankTopK: z.number().int().min(0).max(200).default(20).optional(),
|
|
11
14
|
searchType: z
|
|
12
15
|
.array(z.enum(["DENSE_VECTOR", "FULL_TEXT"]))
|
|
13
16
|
.optional(),
|
|
@@ -133,14 +133,19 @@ export async function apiGet<T>(
|
|
|
133
133
|
|
|
134
134
|
export async function apiPost<T>(
|
|
135
135
|
path: string,
|
|
136
|
-
body?: unknown
|
|
136
|
+
body?: unknown,
|
|
137
|
+
timeoutMs?: number
|
|
137
138
|
): Promise<T> {
|
|
138
139
|
const response = await requestWithClientLogging(path, () =>
|
|
139
|
-
fetchWithTimeout(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
fetchWithTimeout(
|
|
141
|
+
buildUrl(path),
|
|
142
|
+
{
|
|
143
|
+
method: "POST",
|
|
144
|
+
headers: buildHeaders("application/json"),
|
|
145
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
146
|
+
},
|
|
147
|
+
timeoutMs,
|
|
148
|
+
)
|
|
144
149
|
);
|
|
145
150
|
return handleResponse<T>(response);
|
|
146
151
|
}
|
|
@@ -28,13 +28,23 @@ export async function getDocument(
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
export interface AddDocumentItem {
|
|
32
|
+
ossKey: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
/**
|
|
35
|
+
* Glob patterns the server uses to filter members of a folder ossKey
|
|
36
|
+
* during recursive ingestion. Ignored when `ossKey` points at a single
|
|
37
|
+
* file. Only one wildcard is allowed per pattern: `prefix*` (anchored at
|
|
38
|
+
* the start) or `*suffix` (anchored at the end).
|
|
39
|
+
*/
|
|
40
|
+
inclusionFilters?: string[];
|
|
41
|
+
exclusionFilters?: string[];
|
|
42
|
+
}
|
|
43
|
+
|
|
31
44
|
export interface AddDocumentsRequest {
|
|
32
45
|
knowledgeBaseName: string;
|
|
33
46
|
subspace?: string;
|
|
34
|
-
documents:
|
|
35
|
-
ossKey: string;
|
|
36
|
-
metadata?: Record<string, unknown>;
|
|
37
|
-
}>;
|
|
47
|
+
documents: AddDocumentItem[];
|
|
38
48
|
}
|
|
39
49
|
|
|
40
50
|
export interface DocumentOperationResult {
|
|
@@ -45,19 +55,28 @@ export interface DocumentOperationResult {
|
|
|
45
55
|
}
|
|
46
56
|
|
|
47
57
|
export async function addDocuments(
|
|
48
|
-
request: AddDocumentsRequest
|
|
58
|
+
request: AddDocumentsRequest,
|
|
59
|
+
options?: { timeoutMs?: number },
|
|
49
60
|
): Promise<{ documentDetails: DocumentOperationResult[] }> {
|
|
50
61
|
const { knowledgeBaseName, documents, ...rest } = request;
|
|
51
62
|
const url = `/api/v1/knowledge-bases/${encodeURIComponent(knowledgeBaseName)}/documents`;
|
|
52
63
|
|
|
53
64
|
if (documents.length <= BATCH_SIZE) {
|
|
54
|
-
return apiPost<{ documentDetails: DocumentOperationResult[] }>(
|
|
65
|
+
return apiPost<{ documentDetails: DocumentOperationResult[] }>(
|
|
66
|
+
url,
|
|
67
|
+
{ documents, ...rest },
|
|
68
|
+
options?.timeoutMs,
|
|
69
|
+
);
|
|
55
70
|
}
|
|
56
71
|
|
|
57
72
|
const allResults: DocumentOperationResult[] = [];
|
|
58
73
|
for (let i = 0; i < documents.length; i += BATCH_SIZE) {
|
|
59
74
|
const batch = documents.slice(i, i + BATCH_SIZE);
|
|
60
|
-
const resp = await apiPost<{ documentDetails: DocumentOperationResult[] }>(
|
|
75
|
+
const resp = await apiPost<{ documentDetails: DocumentOperationResult[] }>(
|
|
76
|
+
url,
|
|
77
|
+
{ documents: batch, ...rest },
|
|
78
|
+
options?.timeoutMs,
|
|
79
|
+
);
|
|
61
80
|
allResults.push(...resp.documentDetails);
|
|
62
81
|
}
|
|
63
82
|
return { documentDetails: allResults };
|
|
@@ -94,7 +113,7 @@ export async function uploadDocuments(
|
|
|
94
113
|
|
|
95
114
|
// Server-side limit for documents per request across all batch endpoints.
|
|
96
115
|
const BATCH_SIZE = 10;
|
|
97
|
-
const UPLOAD_TIMEOUT_MS = 5 * 60 * 1000; // 5 min per batch
|
|
116
|
+
export const UPLOAD_TIMEOUT_MS = 5 * 60 * 1000; // 5 min per batch
|
|
98
117
|
|
|
99
118
|
export interface BatchUploadProgress {
|
|
100
119
|
completedBatches: number;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { apiGet } from "./api-client";
|
|
2
|
+
|
|
3
|
+
export interface OssListFolder {
|
|
4
|
+
name: string; // basename ending with "/", e.g. "january/"
|
|
5
|
+
prefix: string; // full prefix, e.g. "docs/2026/january/"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface OssListFile {
|
|
9
|
+
name: string; // basename without prefix, e.g. "spec.pdf"
|
|
10
|
+
ossKey: string; // full key, e.g. "docs/2026/spec.pdf"
|
|
11
|
+
size: number;
|
|
12
|
+
lastModified: string; // ISO 8601
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OssListPage {
|
|
16
|
+
prefix: string;
|
|
17
|
+
folders: OssListFolder[];
|
|
18
|
+
files: OssListFile[];
|
|
19
|
+
nextContinuationToken: string | null;
|
|
20
|
+
totalEstimate: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function listOssObjects(params: {
|
|
24
|
+
prefix?: string;
|
|
25
|
+
continuationToken?: string;
|
|
26
|
+
maxResults?: number;
|
|
27
|
+
search?: string;
|
|
28
|
+
}): Promise<OssListPage> {
|
|
29
|
+
const q = new URLSearchParams();
|
|
30
|
+
if (params.prefix) q.set("prefix", params.prefix);
|
|
31
|
+
if (params.continuationToken) q.set("continuationToken", params.continuationToken);
|
|
32
|
+
if (params.maxResults) q.set("maxResults", String(params.maxResults));
|
|
33
|
+
if (params.search) q.set("search", params.search);
|
|
34
|
+
return apiGet<OssListPage>(`/api/v1/oss/list?${q.toString()}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
@@ -44,7 +44,7 @@ export type SearchType = "DENSE_VECTOR" | "FULL_TEXT";
|
|
|
44
44
|
|
|
45
45
|
export interface RerankingConfiguration {
|
|
46
46
|
type: RerankType;
|
|
47
|
-
numberOfResults
|
|
47
|
+
numberOfResults?: number;
|
|
48
48
|
rrfConfiguration?: RrfConfiguration;
|
|
49
49
|
weightConfiguration?: WeightConfiguration;
|
|
50
50
|
modelConfiguration?: ModelConfiguration;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
1
2
|
import { defineConfig } from "vitest/config";
|
|
2
3
|
|
|
3
4
|
export default defineConfig({
|
|
5
|
+
resolve: {
|
|
6
|
+
alias: {
|
|
7
|
+
"@": resolve(__dirname, "src"),
|
|
8
|
+
},
|
|
9
|
+
},
|
|
4
10
|
test: {
|
|
5
11
|
environment: "node",
|
|
6
12
|
include: ["src/**/__tests__/**/*.test.ts"],
|