@axhub/acp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +21 -0
- package/.next/build-manifest.json +22 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +13 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +90 -0
- package/.next/required-server-files.js +336 -0
- package/.next/required-server-files.json +336 -0
- package/.next/routes-manifest.json +171 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +18 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +15 -0
- package/.next/server/app/_global-error.rsc +15 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +18 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +13 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +17 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/api/acp/capabilities/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/acp/capabilities/route/build-manifest.json +9 -0
- package/.next/server/app/api/acp/capabilities/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/acp/capabilities/route.js +9 -0
- package/.next/server/app/api/acp/capabilities/route.js.nft.json +1 -0
- package/.next/server/app/api/acp/capabilities/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/acp/commands/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/acp/commands/route/build-manifest.json +9 -0
- package/.next/server/app/api/acp/commands/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/acp/commands/route.js +6 -0
- package/.next/server/app/api/acp/commands/route.js.nft.json +1 -0
- package/.next/server/app/api/acp/commands/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/acp/runtime/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/acp/runtime/route/build-manifest.json +9 -0
- package/.next/server/app/api/acp/runtime/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/acp/runtime/route.js +6 -0
- package/.next/server/app/api/acp/runtime/route.js.nft.json +1 -0
- package/.next/server/app/api/acp/runtime/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chat/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chat/route/build-manifest.json +9 -0
- package/.next/server/app/api/chat/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chat/route.js +9 -0
- package/.next/server/app/api/chat/route.js.nft.json +1 -0
- package/.next/server/app/api/chat/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/conversations/[threadId]/messages/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/conversations/[threadId]/messages/route/build-manifest.json +9 -0
- package/.next/server/app/api/conversations/[threadId]/messages/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/conversations/[threadId]/messages/route.js +8 -0
- package/.next/server/app/api/conversations/[threadId]/messages/route.js.nft.json +1 -0
- package/.next/server/app/api/conversations/[threadId]/messages/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/conversations/[threadId]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/conversations/[threadId]/route/build-manifest.json +9 -0
- package/.next/server/app/api/conversations/[threadId]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/conversations/[threadId]/route.js +8 -0
- package/.next/server/app/api/conversations/[threadId]/route.js.nft.json +1 -0
- package/.next/server/app/api/conversations/[threadId]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/conversations/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/conversations/route/build-manifest.json +9 -0
- package/.next/server/app/api/conversations/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/conversations/route.js +8 -0
- package/.next/server/app/api/conversations/route.js.nft.json +1 -0
- package/.next/server/app/api/conversations/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/local-files/image/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/local-files/image/route/build-manifest.json +9 -0
- package/.next/server/app/api/local-files/image/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/local-files/image/route.js +6 -0
- package/.next/server/app/api/local-files/image/route.js.nft.json +1 -0
- package/.next/server/app/api/local-files/image/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/local-files/open/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/local-files/open/route/build-manifest.json +9 -0
- package/.next/server/app/api/local-files/open/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/local-files/open/route.js +6 -0
- package/.next/server/app/api/local-files/open/route.js.nft.json +1 -0
- package/.next/server/app/api/local-files/open/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/output-artifacts/workspace/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/output-artifacts/workspace/route/build-manifest.json +9 -0
- package/.next/server/app/api/output-artifacts/workspace/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/output-artifacts/workspace/route.js +6 -0
- package/.next/server/app/api/output-artifacts/workspace/route.js.nft.json +1 -0
- package/.next/server/app/api/output-artifacts/workspace/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tools/image-generation/files/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tools/image-generation/files/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/tools/image-generation/files/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tools/image-generation/files/[id]/route.js +7 -0
- package/.next/server/app/api/tools/image-generation/files/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/tools/image-generation/files/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tools/image-generation/records/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tools/image-generation/records/route/build-manifest.json +9 -0
- package/.next/server/app/api/tools/image-generation/records/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tools/image-generation/records/route.js +7 -0
- package/.next/server/app/api/tools/image-generation/records/route.js.nft.json +1 -0
- package/.next/server/app/api/tools/image-generation/records/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tools/user-choice/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tools/user-choice/route/build-manifest.json +9 -0
- package/.next/server/app/api/tools/user-choice/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tools/user-choice/route.js +6 -0
- package/.next/server/app/api/tools/user-choice/route.js.nft.json +1 -0
- package/.next/server/app/api/tools/user-choice/route_client-reference-manifest.js +3 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +9 -0
- package/.next/server/app/favicon.ico/route.js +7 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +18 -0
- package/.next/server/app/page/next-font-manifest.json +6 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +14 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app/session/[provider]/[sessionId]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/session/[provider]/[sessionId]/page/build-manifest.json +18 -0
- package/.next/server/app/session/[provider]/[sessionId]/page/next-font-manifest.json +6 -0
- package/.next/server/app/session/[provider]/[sessionId]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/session/[provider]/[sessionId]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/session/[provider]/[sessionId]/page.js +16 -0
- package/.next/server/app/session/[provider]/[sessionId]/page.js.nft.json +1 -0
- package/.next/server/app/session/[provider]/[sessionId]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/thread/[threadId]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/thread/[threadId]/page/build-manifest.json +18 -0
- package/.next/server/app/thread/[threadId]/page/next-font-manifest.json +6 -0
- package/.next/server/app/thread/[threadId]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/thread/[threadId]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/thread/[threadId]/page.js +15 -0
- package/.next/server/app/thread/[threadId]/page.js.nft.json +1 -0
- package/.next/server/app/thread/[threadId]/page_client-reference-manifest.js +3 -0
- package/.next/server/app-paths-manifest.json +21 -0
- package/.next/server/chunks/0zjb_server_app_api_conversations_[threadId]_messages_route_actions_0poed25.js +3 -0
- package/.next/server/chunks/0zjb_server_app_api_tools_image-generation_files_[id]_route_actions_0-tbvpw.js +3 -0
- package/.next/server/chunks/0zjb_server_app_api_tools_image-generation_records_route_actions_0vu38s2.js +3 -0
- package/.next/server/chunks/[externals]_next_dist_0.m~pv6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04xq..~._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__07sxz4_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0dwg3fr._.js +178 -0
- package/.next/server/chunks/[root-of-the-server]__0eanzwb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gqx~5k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0iokgmz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0j-lxr4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ly6hop._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0nil~wi._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tmhg7j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0txmfnw._.js +4 -0
- package/.next/server/chunks/[root-of-the-server]__0wo0b8z._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0~mtsby._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10-n4io._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10g507v._.js +3 -0
- package/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/_next-internal_server_app_api_acp_capabilities_route_actions_08lck.p.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_acp_commands_route_actions_0as.2z6.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_acp_runtime_route_actions_0o1ybkn.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_chat_route_actions_0tmcf6..js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_conversations_[threadId]_route_actions_12yq8z_.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_conversations_route_actions_131xv69.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_local-files_image_route_actions_0f~10mn.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_local-files_open_route_actions_026mg-2.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_output-artifacts_workspace_route_actions_1239-n7.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tools_user-choice_route_actions_09xqbn_.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_095lj93.js +3 -0
- package/.next/server/chunks/instrumentation_ts_0zq9-xz._.js +3 -0
- package/.next/server/chunks/lib_conversations_store_ts_0gzcj38._.js +7 -0
- package/.next/server/chunks/node_modules_@vercel_oidc_dist_token_0zdeuds.js +3 -0
- package/.next/server/chunks/node_modules_next_00hve1e._.js +13 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__02qo-zr._.js +19 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0488vn3._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__08e5v4-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__08iwq-u._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0a1m1mq._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0i9qg2.._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0icm-_h._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0piffp7._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0xn-a8p._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0~c929r._.js +33 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/ssr/_0-oaqqe._.js +6 -0
- package/.next/server/chunks/ssr/_006q235._.js +3 -0
- package/.next/server/chunks/ssr/_03.pm1z._.js +108 -0
- package/.next/server/chunks/ssr/_0txwi90._.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0k77kol.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0eq97pa.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_09-gtaw.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_session_[provider]_[sessionId]_page_actions_0_67qh_.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_thread_[threadId]_page_actions_11mcypo.js +3 -0
- package/.next/server/chunks/ssr/lib_conversations_store_ts_0-pd6d3._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_09w7yel._.js +33 -0
- package/.next/server/chunks/ssr/node_modules_0tev5qq._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_@vercel_oidc_dist_token_0yj7kvj.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_09jzzl8._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0h9llsw._.js +6 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_0t-hj0x._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0inhx6q._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0ghu-f7.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0lgvd_..js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0cjv-23.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_00297nb.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_002l7yi.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02suzhc.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_04x9gct.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0nsg22r.js +4 -0
- package/.next/server/chunks/tools_image-generation_service_mjs_0k_th7-._.js +3 -0
- package/.next/server/edge/chunks/_0e82_ds._.js +3 -0
- package/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_00ue99t.js +3 -0
- package/.next/server/functions-config-manifest.json +11 -0
- package/.next/server/instrumentation/middleware-manifest.json +12 -0
- package/.next/server/instrumentation.js +4 -0
- package/.next/server/instrumentation.js.nft.json +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +22 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +6 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +5 -0
- package/.next/static/chunks/01xlw8hd842-c.js +1 -0
- package/.next/static/chunks/03edqrb4zdj~g.js +31 -0
- package/.next/static/chunks/03qq5fxc~pg00.js +1 -0
- package/.next/static/chunks/03~yq9q893hmn.js +1 -0
- package/.next/static/chunks/0l-_vd.~~z2bw.js +2 -0
- package/.next/static/chunks/0qid5lwcbx9s0.js +1 -0
- package/.next/static/chunks/0t.k8~x~sghva.js +4 -0
- package/.next/static/chunks/0tmpufzgpw2-w.js +1 -0
- package/.next/static/chunks/0v_ue~msygctw.js +1 -0
- package/.next/static/chunks/0y2l0xgouorae.css +1 -0
- package/.next/static/chunks/0zftsky7gte_9.js +102 -0
- package/.next/static/chunks/13nvdsh0e09d0.js +1 -0
- package/.next/static/chunks/1610ha42i.fl~.css +1 -0
- package/.next/static/chunks/turbopack-0mxz-ap91rcoe.js +1 -0
- package/.next/static/mbk_N5Gs4ZJg3lciRL6ya/_buildManifest.js +11 -0
- package/.next/static/mbk_N5Gs4ZJg3lciRL6ya/_clientMiddlewareManifest.js +1 -0
- package/.next/static/mbk_N5Gs4ZJg3lciRL6ya/_ssgManifest.js +1 -0
- package/.next/static/media/favicon.0x3dzn~oxb6tn.ico +0 -0
- package/README.md +113 -0
- package/THIRD_PARTY_NOTICES.md +34 -0
- package/bin/acp.mjs +224 -0
- package/dist/app/globals.css +146 -0
- package/dist/components/assistant-ui/acp-command-menu.d.ts +2 -0
- package/dist/components/assistant-ui/acp-command-menu.mjs +176 -0
- package/dist/components/assistant-ui/acp-elicitation-option-list.d.ts +3 -0
- package/dist/components/assistant-ui/acp-elicitation-option-list.mjs +157 -0
- package/dist/components/assistant-ui/acp-selectors.d.ts +2 -0
- package/dist/components/assistant-ui/acp-selectors.mjs +301 -0
- package/dist/components/assistant-ui/acp-tool-content.d.ts +4 -0
- package/dist/components/assistant-ui/acp-tool-content.mjs +127 -0
- package/dist/components/assistant-ui/addons/host.d.ts +4 -0
- package/dist/components/assistant-ui/addons/host.mjs +85 -0
- package/dist/components/assistant-ui/addons/image-generation-records-section.d.ts +14 -0
- package/dist/components/assistant-ui/addons/image-generation-records-section.mjs +116 -0
- package/dist/components/assistant-ui/addons/output-artifacts-section.d.ts +9 -0
- package/dist/components/assistant-ui/addons/output-artifacts-section.mjs +24 -0
- package/dist/components/assistant-ui/addons/output-artifacts.d.ts +14 -0
- package/dist/components/assistant-ui/addons/output-artifacts.mjs +87 -0
- package/dist/components/assistant-ui/addons/plan-addon.d.ts +2 -0
- package/dist/components/assistant-ui/addons/plan-addon.mjs +39 -0
- package/dist/components/assistant-ui/addons/plan-data.d.ts +5 -0
- package/dist/components/assistant-ui/addons/plan-data.mjs +97 -0
- package/dist/components/assistant-ui/addons/registry.d.ts +2 -0
- package/dist/components/assistant-ui/addons/registry.mjs +8 -0
- package/dist/components/assistant-ui/addons/types.d.ts +13 -0
- package/dist/components/assistant-ui/addons/types.mjs +1 -0
- package/dist/components/assistant-ui/attachment.d.ts +7 -0
- package/dist/components/assistant-ui/attachment.mjs +88 -0
- package/dist/components/assistant-ui/file.d.ts +37 -0
- package/dist/components/assistant-ui/file.mjs +107 -0
- package/dist/components/assistant-ui/image-generation-settings-dialog.d.ts +4 -0
- package/dist/components/assistant-ui/image-generation-settings-dialog.mjs +28 -0
- package/dist/components/assistant-ui/image.d.ts +51 -0
- package/dist/components/assistant-ui/image.mjs +215 -0
- package/dist/components/assistant-ui/markdown-text.d.ts +2 -0
- package/dist/components/assistant-ui/markdown-text.mjs +208 -0
- package/dist/components/assistant-ui/thread/composer.d.ts +27 -0
- package/dist/components/assistant-ui/thread/composer.mjs +15 -0
- package/dist/components/assistant-ui/thread/context-chips.d.ts +2 -0
- package/dist/components/assistant-ui/thread/context-chips.mjs +123 -0
- package/dist/components/assistant-ui/thread/empty-state.d.ts +9 -0
- package/dist/components/assistant-ui/thread/empty-state.mjs +24 -0
- package/dist/components/assistant-ui/thread/index.d.ts +11 -0
- package/dist/components/assistant-ui/thread/index.mjs +43 -0
- package/dist/components/assistant-ui/thread/message-list.d.ts +3 -0
- package/dist/components/assistant-ui/thread/message-list.mjs +16 -0
- package/dist/components/assistant-ui/thread/messages.d.ts +9 -0
- package/dist/components/assistant-ui/thread/messages.mjs +71 -0
- package/dist/components/assistant-ui/thread/scroll-to-bottom.d.ts +2 -0
- package/dist/components/assistant-ui/thread/scroll-to-bottom.mjs +8 -0
- package/dist/components/assistant-ui/thread-list.d.ts +2 -0
- package/dist/components/assistant-ui/thread-list.mjs +31 -0
- package/dist/components/assistant-ui/thread.d.ts +1 -0
- package/dist/components/assistant-ui/thread.mjs +2 -0
- package/dist/components/assistant-ui/threadlist-sidebar.d.ts +6 -0
- package/dist/components/assistant-ui/threadlist-sidebar.mjs +32 -0
- package/dist/components/assistant-ui/tool-fallback.d.ts +31 -0
- package/dist/components/assistant-ui/tool-fallback.mjs +114 -0
- package/dist/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/dist/components/assistant-ui/tooltip-icon-button.mjs +23 -0
- package/dist/components/icons/github.d.ts +3 -0
- package/dist/components/icons/github.mjs +4 -0
- package/dist/components/theme-toggle.d.ts +1 -0
- package/dist/components/theme-toggle.mjs +26 -0
- package/dist/components/tool-ui/option-list.d.ts +34 -0
- package/dist/components/tool-ui/option-list.mjs +163 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.mjs +40 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.mjs +47 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.mjs +27 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.mjs +58 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.mjs +18 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.mjs +20 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.mjs +26 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/select.mjs +59 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.mjs +20 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.mjs +61 -0
- package/dist/components/ui/sidebar.d.ts +69 -0
- package/dist/components/ui/sidebar.mjs +245 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.mjs +18 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.mjs +20 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.mjs +32 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.mjs +32 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.mjs +15 -0
- package/dist/lib/acp2aisdk/capabilities.d.ts +6 -0
- package/dist/lib/acp2aisdk/capabilities.mjs +210 -0
- package/dist/lib/acp2aisdk/capability-cache.d.ts +17 -0
- package/dist/lib/acp2aisdk/capability-cache.mjs +259 -0
- package/dist/lib/acp2aisdk/client-context.d.ts +38 -0
- package/dist/lib/acp2aisdk/client-context.mjs +247 -0
- package/dist/lib/acp2aisdk/commands.d.ts +11 -0
- package/dist/lib/acp2aisdk/commands.mjs +121 -0
- package/dist/lib/acp2aisdk/config-options.d.ts +3 -0
- package/dist/lib/acp2aisdk/config-options.mjs +86 -0
- package/dist/lib/acp2aisdk/context.d.ts +88 -0
- package/dist/lib/acp2aisdk/context.mjs +33 -0
- package/dist/lib/acp2aisdk/default-capabilities.d.ts +275 -0
- package/dist/lib/acp2aisdk/default-capabilities.mjs +421 -0
- package/dist/lib/acp2aisdk/elicitation.d.ts +37 -0
- package/dist/lib/acp2aisdk/elicitation.mjs +193 -0
- package/dist/lib/acp2aisdk/hitl.d.ts +25 -0
- package/dist/lib/acp2aisdk/hitl.mjs +134 -0
- package/dist/lib/acp2aisdk/index.d.ts +12 -0
- package/dist/lib/acp2aisdk/index.mjs +182 -0
- package/dist/lib/acp2aisdk/mcp-servers.d.ts +17 -0
- package/dist/lib/acp2aisdk/mcp-servers.mjs +153 -0
- package/dist/lib/acp2aisdk/model-selection.d.ts +16 -0
- package/dist/lib/acp2aisdk/model-selection.mjs +65 -0
- package/dist/lib/acp2aisdk/prompt-history.d.ts +9 -0
- package/dist/lib/acp2aisdk/prompt-history.mjs +168 -0
- package/dist/lib/acp2aisdk/provider-compat.d.ts +85 -0
- package/dist/lib/acp2aisdk/provider-compat.mjs +501 -0
- package/dist/lib/acp2aisdk/provider-registry.d.ts +15 -0
- package/dist/lib/acp2aisdk/provider-registry.mjs +196 -0
- package/dist/lib/acp2aisdk/response.d.ts +3 -0
- package/dist/lib/acp2aisdk/response.mjs +33 -0
- package/dist/lib/acp2aisdk/runtime-options.d.ts +2 -0
- package/dist/lib/acp2aisdk/runtime-options.mjs +10 -0
- package/dist/lib/acp2aisdk/session-runtime.d.ts +5 -0
- package/dist/lib/acp2aisdk/session-runtime.mjs +186 -0
- package/dist/lib/acp2aisdk/session-store.d.ts +31 -0
- package/dist/lib/acp2aisdk/session-store.mjs +169 -0
- package/dist/lib/acp2aisdk/skill-command-cache.d.ts +20 -0
- package/dist/lib/acp2aisdk/skill-command-cache.mjs +122 -0
- package/dist/lib/acp2aisdk/stream-metadata.d.ts +10 -0
- package/dist/lib/acp2aisdk/stream-metadata.mjs +251 -0
- package/dist/lib/acp2aisdk/types.d.ts +129 -0
- package/dist/lib/acp2aisdk/types.mjs +0 -0
- package/dist/lib/acp2aisdk/vendor/acp-ai-provider/index.d.ts +10 -0
- package/dist/lib/acp2aisdk/vendor/acp-ai-provider/index.mjs +10 -0
- package/dist/lib/acp2aisdk/vendor/acp-ai-provider/package/index.mjs +1945 -0
- package/dist/lib/api/client.d.ts +93 -0
- package/dist/lib/api/client.mjs +199 -0
- package/dist/lib/api/cors.d.ts +2 -0
- package/dist/lib/api/cors.mjs +47 -0
- package/dist/lib/conversations/client-adapter.d.ts +21 -0
- package/dist/lib/conversations/client-adapter.mjs +329 -0
- package/dist/lib/conversations/message-repository.d.ts +8 -0
- package/dist/lib/conversations/message-repository.mjs +87 -0
- package/dist/lib/conversations/store.d.ts +17 -0
- package/dist/lib/conversations/store.mjs +678 -0
- package/dist/lib/conversations/types.d.ts +92 -0
- package/dist/lib/conversations/types.mjs +0 -0
- package/dist/lib/local-image-files.d.ts +5 -0
- package/dist/lib/local-image-files.mjs +76 -0
- package/dist/lib/local-image-paths.d.ts +7 -0
- package/dist/lib/local-image-paths.mjs +106 -0
- package/dist/lib/output-artifacts/workspace.d.ts +8 -0
- package/dist/lib/output-artifacts/workspace.mjs +174 -0
- package/dist/lib/provider-history/codex.d.ts +4 -0
- package/dist/lib/provider-history/codex.mjs +272 -0
- package/dist/lib/provider-history/index.d.ts +7 -0
- package/dist/lib/provider-history/index.mjs +88 -0
- package/dist/lib/provider-history/types.d.ts +31 -0
- package/dist/lib/provider-history/types.mjs +0 -0
- package/dist/lib/server-runtime.d.ts +22 -0
- package/dist/lib/server-runtime.mjs +78 -0
- package/dist/lib/url-routing.d.ts +18 -0
- package/dist/lib/url-routing.mjs +59 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.mjs +5 -0
- package/dist/lib/workspace-metadata.d.ts +2 -0
- package/dist/lib/workspace-metadata.mjs +20 -0
- package/dist/public-api/react.d.ts +14 -0
- package/dist/public-api/react.mjs +16 -0
- package/dist/public-api/runtime.d.ts +8 -0
- package/dist/public-api/runtime.mjs +7 -0
- package/dist/public-api/server.d.ts +5 -0
- package/dist/public-api/server.mjs +4 -0
- package/dist/public-api/styles.css +1 -0
- package/dist/public-api/ui.d.ts +13 -0
- package/dist/public-api/ui.mjs +13 -0
- package/dist/tools/client-registry.d.ts +9 -0
- package/dist/tools/client-registry.mjs +70 -0
- package/dist/tools/image-generation/client.d.ts +18 -0
- package/dist/tools/image-generation/client.mjs +31 -0
- package/dist/tools/image-generation/config.d.ts +9 -0
- package/dist/tools/image-generation/config.example.json +14 -0
- package/dist/tools/image-generation/config.mjs +11 -0
- package/dist/tools/image-generation/mcp-server.mjs +87 -0
- package/dist/tools/image-generation/registry.d.ts +13 -0
- package/dist/tools/image-generation/registry.mjs +30 -0
- package/dist/tools/image-generation/server.d.ts +6 -0
- package/dist/tools/image-generation/server.mjs +58 -0
- package/dist/tools/image-generation/service.mjs +978 -0
- package/dist/tools/image-generation/shared.d.ts +103 -0
- package/dist/tools/image-generation/shared.mjs +80 -0
- package/dist/tools/image-generation/storage.d.ts +22 -0
- package/dist/tools/image-generation/storage.mjs +8 -0
- package/dist/tools/image-generation/ui-detail.d.ts +26 -0
- package/dist/tools/image-generation/ui-detail.mjs +109 -0
- package/dist/tools/image-generation/ui.d.ts +8 -0
- package/dist/tools/image-generation/ui.mjs +121 -0
- package/dist/tools/registry.d.ts +32 -0
- package/dist/tools/registry.mjs +142 -0
- package/dist/tools/ui-registry.d.ts +3 -0
- package/dist/tools/ui-registry.mjs +20 -0
- package/dist/tools/user-choice/client.d.ts +10 -0
- package/dist/tools/user-choice/client.mjs +18 -0
- package/dist/tools/user-choice/registry.d.ts +12 -0
- package/dist/tools/user-choice/registry.mjs +21 -0
- package/dist/tools/user-choice/server.d.ts +6 -0
- package/dist/tools/user-choice/server.mjs +42 -0
- package/dist/tools/user-choice/shared.d.ts +79 -0
- package/dist/tools/user-choice/shared.mjs +56 -0
- package/dist/tools/user-choice/store.d.ts +19 -0
- package/dist/tools/user-choice/store.mjs +95 -0
- package/dist/tools/user-choice/ui.d.ts +3 -0
- package/dist/tools/user-choice/ui.mjs +396 -0
- package/package.json +118 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { AcpBuiltinToolSettings, AcpPermissionMode, AcpProviderKey } from "../acp2aisdk";
|
|
2
|
+
export type ConversationStatus = "active" | "archived" | "deleted";
|
|
3
|
+
export type ConversationSourceKind = "codex-jsonl";
|
|
4
|
+
export type ConversationBuiltinToolSettings = AcpBuiltinToolSettings;
|
|
5
|
+
export type ConversationRecord = {
|
|
6
|
+
threadId: string;
|
|
7
|
+
title: string | null;
|
|
8
|
+
titleOverride?: string | null;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
archivedAt: string | null;
|
|
12
|
+
deletedAt: string | null;
|
|
13
|
+
workspacePath: string;
|
|
14
|
+
provider: AcpProviderKey;
|
|
15
|
+
model: string | null;
|
|
16
|
+
modeId: string | null;
|
|
17
|
+
thoughtLevel: string | null;
|
|
18
|
+
permissionMode: AcpPermissionMode;
|
|
19
|
+
status: ConversationStatus;
|
|
20
|
+
builtinToolSettings?: ConversationBuiltinToolSettings | null;
|
|
21
|
+
providerSessionId?: string | null;
|
|
22
|
+
sourcePath?: string | null;
|
|
23
|
+
sourceKind?: ConversationSourceKind | null;
|
|
24
|
+
lastSeenMtime?: number | null;
|
|
25
|
+
lastActiveAt?: string | null;
|
|
26
|
+
};
|
|
27
|
+
export type ConversationSessionRecord = {
|
|
28
|
+
threadId: string;
|
|
29
|
+
acpSessionId: string | null;
|
|
30
|
+
provider: AcpProviderKey;
|
|
31
|
+
workspacePath: string;
|
|
32
|
+
model: string | null;
|
|
33
|
+
modeId: string | null;
|
|
34
|
+
thoughtLevel: string | null;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
lastActivityAt: string;
|
|
37
|
+
closedAt: string | null;
|
|
38
|
+
};
|
|
39
|
+
export type StoredMessageEntry<TContent = Record<string, unknown>> = {
|
|
40
|
+
id: string;
|
|
41
|
+
parent_id: string | null;
|
|
42
|
+
format: string;
|
|
43
|
+
content: TContent;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
};
|
|
47
|
+
export type ConversationMessageRepository<TContent = Record<string, unknown>> = {
|
|
48
|
+
headId?: string | null;
|
|
49
|
+
messages: StoredMessageEntry<TContent>[];
|
|
50
|
+
diagnostic?: {
|
|
51
|
+
source: "provider-history" | "runtime-store";
|
|
52
|
+
error?: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export type ConversationStoreData = {
|
|
56
|
+
version: 1;
|
|
57
|
+
conversations: ConversationRecord[];
|
|
58
|
+
sessions: ConversationSessionRecord[];
|
|
59
|
+
messages?: Record<string, ConversationMessageRepository>;
|
|
60
|
+
};
|
|
61
|
+
export type ConversationMessageUpsertRequest<TContent = Record<string, unknown>> = {
|
|
62
|
+
parentId: string | null;
|
|
63
|
+
message: {
|
|
64
|
+
id: string;
|
|
65
|
+
content: TContent;
|
|
66
|
+
};
|
|
67
|
+
format: string;
|
|
68
|
+
};
|
|
69
|
+
export type ConversationListResponse = {
|
|
70
|
+
threads: ConversationRecord[];
|
|
71
|
+
nextCursor?: string;
|
|
72
|
+
total?: number;
|
|
73
|
+
};
|
|
74
|
+
export type ConversationListOptions = {
|
|
75
|
+
limit?: number;
|
|
76
|
+
after?: string | null;
|
|
77
|
+
refreshProvider?: boolean;
|
|
78
|
+
};
|
|
79
|
+
export type ConversationSessionResolution = {
|
|
80
|
+
thread: ConversationRecord;
|
|
81
|
+
source: "runtime-session" | "conversation" | "provider-history" | "thread";
|
|
82
|
+
};
|
|
83
|
+
export type ConversationUpsertRequest = Partial<Pick<ConversationRecord, "title" | "workspacePath" | "provider" | "model" | "modeId" | "thoughtLevel" | "permissionMode" | "builtinToolSettings" | "providerSessionId" | "sourcePath" | "sourceKind" | "lastSeenMtime" | "lastActiveAt">> & {
|
|
84
|
+
threadId: string;
|
|
85
|
+
};
|
|
86
|
+
export type ConversationInitializeResponse = {
|
|
87
|
+
thread: ConversationRecord;
|
|
88
|
+
};
|
|
89
|
+
export type ConversationRenameRequest = {
|
|
90
|
+
title: string;
|
|
91
|
+
};
|
|
92
|
+
export type ConversationMessagesResponse<TContent = Record<string, unknown>> = ConversationMessageRepository<TContent>;
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const LOCAL_IMAGE_FILE_EXTENSIONS: Set<string>;
|
|
2
|
+
export declare function normalizeLocalFilePath(value: string): string | null;
|
|
3
|
+
export declare function isLocalImageFilePath(value: string): boolean;
|
|
4
|
+
export declare function isLocalFilePath(value: string): boolean;
|
|
5
|
+
export declare function getImageMimeType(filePath: string): string;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
const LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1"]);
|
|
4
|
+
const UNIX_LOCAL_PATH_RE = /^\/(?:Users|home|tmp|var|private|Volumes|mnt|media|opt)\//i;
|
|
5
|
+
export const LOCAL_IMAGE_FILE_EXTENSIONS = new Set([
|
|
6
|
+
".gif",
|
|
7
|
+
".jpg",
|
|
8
|
+
".jpeg",
|
|
9
|
+
".png",
|
|
10
|
+
".svg",
|
|
11
|
+
".webp",
|
|
12
|
+
]);
|
|
13
|
+
const LOCAL_FILE_EXTENSION_RE = /^\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}$/;
|
|
14
|
+
export function normalizeLocalFilePath(value) {
|
|
15
|
+
const raw = value.trim();
|
|
16
|
+
if (!raw)
|
|
17
|
+
return null;
|
|
18
|
+
if (raw.startsWith("file://")) {
|
|
19
|
+
try {
|
|
20
|
+
return fileURLToPath(raw);
|
|
21
|
+
}
|
|
22
|
+
catch (_a) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (/^https?:\/\//i.test(raw)) {
|
|
27
|
+
try {
|
|
28
|
+
const url = new URL(raw);
|
|
29
|
+
if (!LOCAL_HOSTS.has(url.hostname))
|
|
30
|
+
return null;
|
|
31
|
+
const pathname = decodeURIComponent(url.pathname);
|
|
32
|
+
return normalizeLocalFilePath(pathname);
|
|
33
|
+
}
|
|
34
|
+
catch (_b) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const withoutQuery = raw.split(/[?#]/, 1)[0];
|
|
39
|
+
const windowsPath = withoutQuery.replace(/^\/([A-Za-z]:[\\/])/, "$1");
|
|
40
|
+
if (path.win32.isAbsolute(windowsPath)) {
|
|
41
|
+
return windowsPath;
|
|
42
|
+
}
|
|
43
|
+
if (UNIX_LOCAL_PATH_RE.test(withoutQuery) &&
|
|
44
|
+
path.posix.isAbsolute(withoutQuery)) {
|
|
45
|
+
return withoutQuery;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
export function isLocalImageFilePath(value) {
|
|
50
|
+
const filePath = normalizeLocalFilePath(value);
|
|
51
|
+
if (!filePath)
|
|
52
|
+
return false;
|
|
53
|
+
const extension = path.extname(filePath).toLowerCase();
|
|
54
|
+
return LOCAL_IMAGE_FILE_EXTENSIONS.has(extension);
|
|
55
|
+
}
|
|
56
|
+
export function isLocalFilePath(value) {
|
|
57
|
+
const filePath = normalizeLocalFilePath(value);
|
|
58
|
+
if (!filePath)
|
|
59
|
+
return false;
|
|
60
|
+
return LOCAL_FILE_EXTENSION_RE.test(path.extname(filePath));
|
|
61
|
+
}
|
|
62
|
+
export function getImageMimeType(filePath) {
|
|
63
|
+
switch (path.extname(filePath).toLowerCase()) {
|
|
64
|
+
case ".gif":
|
|
65
|
+
return "image/gif";
|
|
66
|
+
case ".jpg":
|
|
67
|
+
case ".jpeg":
|
|
68
|
+
return "image/jpeg";
|
|
69
|
+
case ".svg":
|
|
70
|
+
return "image/svg+xml";
|
|
71
|
+
case ".webp":
|
|
72
|
+
return "image/webp";
|
|
73
|
+
default:
|
|
74
|
+
return "image/png";
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isLocalFilePath(value: string): boolean;
|
|
2
|
+
export declare function isLocalImagePath(value: string): boolean;
|
|
3
|
+
export declare function isRenderableImageUrl(value: string): boolean;
|
|
4
|
+
export declare function getLocalImagePreviewUrl(value: string): string;
|
|
5
|
+
export declare function getLocalFileName(value: string): string;
|
|
6
|
+
export declare function getLocalImageFileName(value: string): string;
|
|
7
|
+
export declare function markdownEscapeLinkDestination(value: string): string;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const IMAGE_EXTENSION_RE = /\.(?:png|jpe?g|webp|gif|svg)(?:[?#].*)?$/i;
|
|
2
|
+
const FILE_EXTENSION_RE = /\.[A-Za-z0-9][A-Za-z0-9_-]{0,15}(?:[?#].*)?$/;
|
|
3
|
+
const LOCAL_HOSTS = new Set(["localhost", "127.0.0.1", "::1"]);
|
|
4
|
+
const UNIX_LOCAL_PATH_RE = /^\/(?:Users|home|tmp|var|private|Volumes|mnt|media|opt)\//i;
|
|
5
|
+
const WINDOWS_LOCAL_PATH_RE = /^(?:[A-Za-z]:[\\/]|\/[A-Za-z]:[\\/])/;
|
|
6
|
+
const UNC_LOCAL_PATH_RE = /^\\\\[^\\/]+[\\/][^\\/]+[\\/]/;
|
|
7
|
+
function trimPathValue(value) {
|
|
8
|
+
const trimmed = value.trim();
|
|
9
|
+
if (trimmed.startsWith("<") && trimmed.endsWith(">")) {
|
|
10
|
+
return trimmed.slice(1, -1).trim();
|
|
11
|
+
}
|
|
12
|
+
return trimmed;
|
|
13
|
+
}
|
|
14
|
+
function hasImageExtension(value) {
|
|
15
|
+
return IMAGE_EXTENSION_RE.test(value.split(/\s+/, 1)[0]);
|
|
16
|
+
}
|
|
17
|
+
function hasFileExtension(value) {
|
|
18
|
+
return FILE_EXTENSION_RE.test(value.split(/\s+/, 1)[0]);
|
|
19
|
+
}
|
|
20
|
+
function isLocalHostUrl(value) {
|
|
21
|
+
try {
|
|
22
|
+
const url = new URL(value);
|
|
23
|
+
return LOCAL_HOSTS.has(url.hostname);
|
|
24
|
+
}
|
|
25
|
+
catch (_a) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function isLocalAbsolutePath(value) {
|
|
30
|
+
return (UNIX_LOCAL_PATH_RE.test(value) ||
|
|
31
|
+
WINDOWS_LOCAL_PATH_RE.test(value) ||
|
|
32
|
+
UNC_LOCAL_PATH_RE.test(value));
|
|
33
|
+
}
|
|
34
|
+
export function isLocalFilePath(value) {
|
|
35
|
+
const raw = trimPathValue(value);
|
|
36
|
+
if (!hasFileExtension(raw))
|
|
37
|
+
return false;
|
|
38
|
+
if (raw.startsWith("file://"))
|
|
39
|
+
return true;
|
|
40
|
+
if (/^https?:\/\//i.test(raw)) {
|
|
41
|
+
try {
|
|
42
|
+
const url = new URL(raw);
|
|
43
|
+
if (!LOCAL_HOSTS.has(url.hostname))
|
|
44
|
+
return false;
|
|
45
|
+
return isLocalAbsolutePath(decodeURIComponent(url.pathname));
|
|
46
|
+
}
|
|
47
|
+
catch (_a) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return isLocalAbsolutePath(raw);
|
|
52
|
+
}
|
|
53
|
+
export function isLocalImagePath(value) {
|
|
54
|
+
const raw = trimPathValue(value);
|
|
55
|
+
if (!hasImageExtension(raw))
|
|
56
|
+
return false;
|
|
57
|
+
if (raw.startsWith("file://"))
|
|
58
|
+
return true;
|
|
59
|
+
if (/^https?:\/\//i.test(raw)) {
|
|
60
|
+
try {
|
|
61
|
+
const url = new URL(raw);
|
|
62
|
+
if (!LOCAL_HOSTS.has(url.hostname))
|
|
63
|
+
return false;
|
|
64
|
+
return isLocalAbsolutePath(decodeURIComponent(url.pathname));
|
|
65
|
+
}
|
|
66
|
+
catch (_a) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return isLocalAbsolutePath(raw);
|
|
71
|
+
}
|
|
72
|
+
export function isRenderableImageUrl(value) {
|
|
73
|
+
const raw = trimPathValue(value);
|
|
74
|
+
if (isLocalImagePath(raw))
|
|
75
|
+
return false;
|
|
76
|
+
if (/^data:image\//i.test(raw))
|
|
77
|
+
return true;
|
|
78
|
+
if (/^https?:\/\//i.test(raw))
|
|
79
|
+
return hasImageExtension(raw);
|
|
80
|
+
if (raw.startsWith("/") && !raw.startsWith("//"))
|
|
81
|
+
return hasImageExtension(raw);
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
export function getLocalImagePreviewUrl(value) {
|
|
85
|
+
return `/api/local-files/image?path=${encodeURIComponent(trimPathValue(value))}`;
|
|
86
|
+
}
|
|
87
|
+
export function getLocalFileName(value) {
|
|
88
|
+
const raw = trimPathValue(value);
|
|
89
|
+
let pathValue = raw;
|
|
90
|
+
if (raw.startsWith("file://") || isLocalHostUrl(raw)) {
|
|
91
|
+
try {
|
|
92
|
+
pathValue = decodeURIComponent(new URL(raw).pathname);
|
|
93
|
+
}
|
|
94
|
+
catch (_a) {
|
|
95
|
+
pathValue = raw;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const withoutQuery = pathValue.split(/[?#]/, 1)[0].replace(/\\/g, "/");
|
|
99
|
+
return withoutQuery.split("/").filter(Boolean).at(-1) || "本地文件";
|
|
100
|
+
}
|
|
101
|
+
export function getLocalImageFileName(value) {
|
|
102
|
+
return getLocalFileName(value) || "本地图片";
|
|
103
|
+
}
|
|
104
|
+
export function markdownEscapeLinkDestination(value) {
|
|
105
|
+
return trimPathValue(value).replaceAll(">", "%3E");
|
|
106
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AcpOutputArtifact } from "../../components/assistant-ui/addons/output-artifacts";
|
|
2
|
+
type ScanWorkspaceOutputArtifactsOptions = {
|
|
3
|
+
workspacePath: string | null | undefined;
|
|
4
|
+
threadId: string;
|
|
5
|
+
sinceMs: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function scanWorkspaceOutputArtifacts(options: ScanWorkspaceOutputArtifactsOptions): Promise<AcpOutputArtifact[]>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
const MAX_SCAN_FILES = 8000;
|
|
4
|
+
const MAX_TEXT_BYTES = 1024 * 1024;
|
|
5
|
+
const EXCLUDED_DIRS = new Set([
|
|
6
|
+
".git",
|
|
7
|
+
".next",
|
|
8
|
+
".turbo",
|
|
9
|
+
"automation-reports",
|
|
10
|
+
"build",
|
|
11
|
+
"coverage",
|
|
12
|
+
"dist",
|
|
13
|
+
"node_modules",
|
|
14
|
+
"tmp-midscene",
|
|
15
|
+
"tmp-regression",
|
|
16
|
+
]);
|
|
17
|
+
const TEXT_EXTENSIONS = new Set([
|
|
18
|
+
".css",
|
|
19
|
+
".drawio",
|
|
20
|
+
".excalidraw",
|
|
21
|
+
".html",
|
|
22
|
+
".js",
|
|
23
|
+
".jsx",
|
|
24
|
+
".json",
|
|
25
|
+
".md",
|
|
26
|
+
".mdx",
|
|
27
|
+
".svg",
|
|
28
|
+
".ts",
|
|
29
|
+
".tsx",
|
|
30
|
+
".txt",
|
|
31
|
+
".xml",
|
|
32
|
+
]);
|
|
33
|
+
const IMAGE_EXTENSIONS = new Set([
|
|
34
|
+
".gif",
|
|
35
|
+
".jpeg",
|
|
36
|
+
".jpg",
|
|
37
|
+
".png",
|
|
38
|
+
".svg",
|
|
39
|
+
".webp",
|
|
40
|
+
]);
|
|
41
|
+
const DOCUMENT_EXTENSIONS = new Set([
|
|
42
|
+
".doc",
|
|
43
|
+
".docx",
|
|
44
|
+
".md",
|
|
45
|
+
".mdx",
|
|
46
|
+
".pdf",
|
|
47
|
+
".txt",
|
|
48
|
+
]);
|
|
49
|
+
function normalizeThreadId(value) {
|
|
50
|
+
return value.trim() || "default";
|
|
51
|
+
}
|
|
52
|
+
function normalizeRelativePath(value) {
|
|
53
|
+
return value.replace(/\\/g, "/").replace(/^\/+/u, "");
|
|
54
|
+
}
|
|
55
|
+
function isWithinWorkspace(root, filePath) {
|
|
56
|
+
const relativePath = path.relative(root, filePath);
|
|
57
|
+
return Boolean(relativePath && !relativePath.startsWith("..") && !path.isAbsolute(relativePath));
|
|
58
|
+
}
|
|
59
|
+
function isExcludedRelativePath(relativePath) {
|
|
60
|
+
const parts = normalizeRelativePath(relativePath).split("/");
|
|
61
|
+
if (parts[0] === ".axhub" && parts[1] === "sessions")
|
|
62
|
+
return true;
|
|
63
|
+
return parts.some((part) => EXCLUDED_DIRS.has(part));
|
|
64
|
+
}
|
|
65
|
+
function extensionOf(relativePath) {
|
|
66
|
+
return path.extname(relativePath.split(/[?#]/u)[0] || "").toLowerCase();
|
|
67
|
+
}
|
|
68
|
+
function hasDrawioSignal(relativePath) {
|
|
69
|
+
return /(^|[./_-])drawio([./_-]|$)/iu.test(relativePath);
|
|
70
|
+
}
|
|
71
|
+
function isPrototypeArtifact(relativePath) {
|
|
72
|
+
return /^src\/prototypes\/[^/]+\/(?!canvas\.excalidraw$).+/iu.test(relativePath);
|
|
73
|
+
}
|
|
74
|
+
function isCanvasArtifact(relativePath) {
|
|
75
|
+
return /(^|\/)src\/prototypes\/[^/]+\/canvas\.excalidraw$/iu.test(relativePath);
|
|
76
|
+
}
|
|
77
|
+
function isResourceArtifact(relativePath) {
|
|
78
|
+
return /^src\/resources\//iu.test(relativePath);
|
|
79
|
+
}
|
|
80
|
+
function isOutputArtifactPath(relativePath) {
|
|
81
|
+
const normalized = normalizeRelativePath(relativePath);
|
|
82
|
+
if (isCanvasArtifact(normalized) || isPrototypeArtifact(normalized)) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
const extension = extensionOf(normalized);
|
|
86
|
+
if (isResourceArtifact(normalized)) {
|
|
87
|
+
return (IMAGE_EXTENSIONS.has(extension) ||
|
|
88
|
+
DOCUMENT_EXTENSIONS.has(extension) ||
|
|
89
|
+
hasDrawioSignal(normalized));
|
|
90
|
+
}
|
|
91
|
+
return (DOCUMENT_EXTENSIONS.has(extension) ||
|
|
92
|
+
IMAGE_EXTENSIONS.has(extension) ||
|
|
93
|
+
hasDrawioSignal(normalized));
|
|
94
|
+
}
|
|
95
|
+
function artifactPriority(relativePath) {
|
|
96
|
+
const extension = extensionOf(relativePath);
|
|
97
|
+
if (isPrototypeArtifact(relativePath))
|
|
98
|
+
return 0;
|
|
99
|
+
if (IMAGE_EXTENSIONS.has(extension) && !hasDrawioSignal(relativePath)) {
|
|
100
|
+
return 1;
|
|
101
|
+
}
|
|
102
|
+
if (hasDrawioSignal(relativePath))
|
|
103
|
+
return 2;
|
|
104
|
+
if (DOCUMENT_EXTENSIONS.has(extension))
|
|
105
|
+
return 3;
|
|
106
|
+
if (isCanvasArtifact(relativePath))
|
|
107
|
+
return 4;
|
|
108
|
+
return 5;
|
|
109
|
+
}
|
|
110
|
+
function statusFromStat(stat, sinceMs) {
|
|
111
|
+
return stat.birthtimeMs >= sinceMs - 1 ? "新增" : "修改";
|
|
112
|
+
}
|
|
113
|
+
async function readTextIfSafe(filePath, size) {
|
|
114
|
+
if (size > MAX_TEXT_BYTES || !TEXT_EXTENSIONS.has(extensionOf(filePath))) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
return fs.readFile(filePath, "utf8").catch(() => undefined);
|
|
118
|
+
}
|
|
119
|
+
async function collectCandidateFiles(root) {
|
|
120
|
+
const files = [];
|
|
121
|
+
const visit = async (directory) => {
|
|
122
|
+
if (files.length >= MAX_SCAN_FILES)
|
|
123
|
+
return;
|
|
124
|
+
const entries = await fs.readdir(directory, { withFileTypes: true }).catch(() => []);
|
|
125
|
+
for (const entry of entries) {
|
|
126
|
+
if (files.length >= MAX_SCAN_FILES)
|
|
127
|
+
return;
|
|
128
|
+
const filePath = path.join(directory, entry.name);
|
|
129
|
+
const relativePath = normalizeRelativePath(path.relative(root, filePath));
|
|
130
|
+
if (isExcludedRelativePath(relativePath))
|
|
131
|
+
continue;
|
|
132
|
+
if (entry.isDirectory()) {
|
|
133
|
+
await visit(filePath);
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
if (!entry.isFile() || !isOutputArtifactPath(relativePath))
|
|
137
|
+
continue;
|
|
138
|
+
files.push(filePath);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
await visit(root);
|
|
142
|
+
return files;
|
|
143
|
+
}
|
|
144
|
+
export async function scanWorkspaceOutputArtifacts(options) {
|
|
145
|
+
var _a;
|
|
146
|
+
const workspacePath = String((_a = options.workspacePath) !== null && _a !== void 0 ? _a : "").trim();
|
|
147
|
+
if (!workspacePath)
|
|
148
|
+
return [];
|
|
149
|
+
const root = path.resolve(/* turbopackIgnore: true */ workspacePath);
|
|
150
|
+
const rootStat = await fs.stat(root).catch(() => null);
|
|
151
|
+
if (!(rootStat === null || rootStat === void 0 ? void 0 : rootStat.isDirectory()))
|
|
152
|
+
return [];
|
|
153
|
+
const normalizedThreadId = normalizeThreadId(options.threadId);
|
|
154
|
+
const sinceMs = Number.isFinite(options.sinceMs) ? options.sinceMs : 0;
|
|
155
|
+
const toolCallId = `workspace-scan:${normalizedThreadId}`;
|
|
156
|
+
const files = await collectCandidateFiles(root);
|
|
157
|
+
const artifacts = [];
|
|
158
|
+
for (const filePath of files) {
|
|
159
|
+
if (!isWithinWorkspace(root, filePath))
|
|
160
|
+
continue;
|
|
161
|
+
const stat = await fs.stat(filePath).catch(() => null);
|
|
162
|
+
if (!(stat === null || stat === void 0 ? void 0 : stat.isFile()) || stat.mtimeMs < sinceMs)
|
|
163
|
+
continue;
|
|
164
|
+
const relativePath = normalizeRelativePath(path.relative(root, filePath));
|
|
165
|
+
const newText = await readTextIfSafe(filePath, stat.size);
|
|
166
|
+
artifacts.push(Object.assign({ id: `workspace:${normalizedThreadId}:${relativePath}`, kind: "diff", title: relativePath, detail: statusFromStat(stat, sinceMs), status: statusFromStat(stat, sinceMs), path: relativePath, toolCallId, updatedAt: Math.max(1, Math.round(stat.mtimeMs)) }, (newText !== undefined ? { newText } : {})));
|
|
167
|
+
}
|
|
168
|
+
return artifacts.sort((left, right) => {
|
|
169
|
+
const leftPath = left.path || "";
|
|
170
|
+
const rightPath = right.path || "";
|
|
171
|
+
const priorityDelta = artifactPriority(leftPath) - artifactPriority(rightPath);
|
|
172
|
+
return priorityDelta || leftPath.localeCompare(rightPath);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProviderSessionMeta, ProviderTranscript } from "./types";
|
|
2
|
+
export declare function scanCodexSessions(workspacePath?: string | null): Promise<ProviderSessionMeta[]>;
|
|
3
|
+
export declare function findCodexSessionById(sessionId: string, workspacePath?: string | null): Promise<ProviderSessionMeta | null>;
|
|
4
|
+
export declare function loadCodexTranscript(sourcePath: string): Promise<ProviderTranscript>;
|