@alook/app 0.0.124 → 0.0.126
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/bundled/email-worker/index.js +105 -7
- package/bundled/web/.open-next/.build/durable-objects/queue.js +5 -5
- package/bundled/web/.open-next/assets/BUILD_ID +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{1-jzxwxd2yppa.js → 0e5m6elbfa-zc.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0w1e74-zrlr_t.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0ym6b1b5nwlot.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0zgj-5k527bub.js +3 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{3ktbvokn95fil.js → 17coqn37fn5yf.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{2bsr3n9nxv0sc.js → 19j0bml2m-9uo.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/1j1bygouvxt8w.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/1xsm-ck02gbj9.js +59 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/1z9bza2a4pnu7.js +63 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{1-srtubo20rjx.js → 27vz1_55bn5h_.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{2wa56n0-zxr-6.js → 29xo03yr3ra6c.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/2ehyie2v34cpd.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{1-bjnx7wr9nop.js → 2kbuh-u0kdgqc.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{2fgjbyei3irh0.js → 2z5ztdz1g7p07.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/32v7gw3qbi0rn.js +3 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/37v24j51y7kp2.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{40cggm_5dua8j.js → 3f96j114fbbez.js} +3 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/{09xenumhc9uzs.js → 3l4-pv_2z86tp.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/3tyj3zocw9s7f.css +1 -0
- package/bundled/web/.open-next/cache/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/_global-error.cache +1 -1
- package/bundled/web/.open-next/cache/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/_not-found.cache +1 -1
- package/bundled/web/.open-next/cache/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/device.cache +1 -1
- package/bundled/web/.open-next/cache/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/privacy.cache +1 -1
- package/bundled/web/.open-next/cache/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/sitemap.xml.cache +1 -1
- package/bundled/web/.open-next/cloudflare/cache-assets-manifest.sql +1 -1
- package/bundled/web/.open-next/cloudflare/init.js +1 -1
- package/bundled/web/.open-next/dynamodb-provider/dynamodb-cache.json +1 -1
- package/bundled/web/.open-next/middleware/handler.mjs +7 -7
- package/bundled/web/.open-next/server-functions/default/src/web/.next/BUILD_ID +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/app-path-routes-manifest.json +4 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/build-manifest.json +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/prerender-manifest.json +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/routes-manifest.json +22 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/invite/[token]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/studio/new/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/activity/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/[convId]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/chat/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/email/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/files/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/meetings/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/[id]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/new/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/agents/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/calendar/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/flags/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/help/email-setup/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/home/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/issues/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/runtimes/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/settings/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/{threads → traces}/[traceId]/page.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/traces/[traceId]/page_client-reference-manifest.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/{threads → traces}/page.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/traces/page_client-reference-manifest.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/unread/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/workspaces/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(auth)/sign-in/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/threads/route.js +14 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/threads/route_client-reference-manifest.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/threads/route.js +16 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/threads/route_client-reference-manifest.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/notify/route.js +3 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/device/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/[id]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app-paths-manifest.json +4 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/0_kl__next-internal_server_app_api_conversations_[id]_threads_route_actions_1snnipi.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__00tttex._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__068ljm8._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__07exuq1._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0d82yjz._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0envyr7._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0k5yb3f._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0p9_qnh._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__16_glrs._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__16u73k9._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1c0s55o._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1ertv1z._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1g69747._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1r94gz3._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1v9hp6s._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1yza8tr._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +20 -14
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0i7-4r6._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0n8pg0d._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0qy7lt2._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0v95a0y._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_133a7k4._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_139j3zh._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1a2lyoh._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1nfaney._.js +6 -6
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/src_1j5rtq8._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/src_web__next-internal_server_app_api_agents_[id]_threads_route_actions_0z9gwx3.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{0_0k_next_dist_esm_build_templates_app-page_1szp50t.js → 0_0k_next_dist_esm_build_templates_app-page_0om6w08.js} +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{0_0k_next_dist_esm_build_templates_app-page_03qcyrd.js → 0_0k_next_dist_esm_build_templates_app-page_1-1h6nu.js} +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/0_kl__next-internal_server_app_(app)_w_[slug]_traces_[traceId]_page_actions_0azi91v.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{[root-of-the-server]__0ufxdae._.js → [root-of-the-server]__0d9wg-2._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{[root-of-the-server]__0rumtkk._.js → [root-of-the-server]__1e5_yd1._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__1olzajq._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +20 -14
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_04ht2b1._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_1dw6wfx._.js → _0934_gu._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_1dqb0sa._.js → _0_vr0b8._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0aittsu._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0p54okk._.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0ps6zah._.js +65 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1xq5127._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web__next-internal_server_app_(app)_w_[slug]_traces_page_actions_0ouyxwm.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_0pwl5s4._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_agents_[id]_layout_tsx_0ysqmgw._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_home_page_tsx_0-vs82-._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{src_web_src_app_(app)_w_[slug]_threads_[traceId]_page_tsx_00jstix._.js → src_web_src_app_(app)_w_[slug]_traces_[traceId]_page_tsx_1ar14oc._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_traces_page_tsx_1964ml4._.js +3 -0
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_lib_api_ts_1ffelwp._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-build-manifest.js +3 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-manifest.json +5 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/next-font-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/next-font-manifest.json +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.json +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs +60 -58
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +511 -288
- package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +5 -5
- package/bundled/web/migrations/0039_add_thread_columns.sql +6 -0
- package/bundled/ws-do/index.js +103 -6
- package/dist/cli/index.js +15 -0
- package/dist/cli/session-runner.js +15 -0
- package/dist/index.js +8 -0
- package/package.json +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0hy07ql5hqe_e.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0yeu-j3z9iguu.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/17ewotvd7-nyl.js +0 -121
- package/bundled/web/.open-next/assets/_next/static/chunks/1ftpvvqesj-9s.js +0 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/1ievf6mopw-38.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/1lr1gmh4hbe2o.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/23tr-x-2n25uu.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/2v94k7fybopcq.css +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/3pk89-bwz664l.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/[traceId]/page_client-reference-manifest.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/threads/page_client-reference-manifest.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_03_h7-u._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/0_kl__next-internal_server_app_(app)_w_[slug]_threads_[traceId]_page_actions_0zp36iw.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__1efy1ql._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0pnr14d._.js +0 -65
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web__next-internal_server_app_(app)_w_[slug]_threads_page_actions_0xnqg_4.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_1sy648u._.js +0 -3
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_threads_page_tsx_0hy955b._.js +0 -3
- /package/bundled/web/.open-next/assets/_next/static/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/_buildManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/_clientMiddlewareManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/_ssgManifest.js +0 -0
- /package/bundled/web/.open-next/cache/{LNMccyS5SZzzNBkt0dM4K → DxaidmHIn9LNWpfCVjlN9}/robots.txt.cache +0 -0
- /package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/{threads → traces}/[traceId]/page/react-loadable-manifest.json +0 -0
- /package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/{threads → traces}/page/react-loadable-manifest.json +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,275351,e=>{"use strict";let t,a,n,i,r=(e,t)=>t.some(t=>e instanceof t),s=new WeakMap,o=new WeakMap,l=new WeakMap,c={get(e,t,a){if(e instanceof IDBTransaction){if("done"===t)return s.get(e);if("store"===t)return a.objectStoreNames[1]?void 0:a.objectStore(a.objectStoreNames[0])}return d(e[t])},set:(e,t,a)=>(e[t]=a,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function d(e){if(e instanceof IDBRequest){let t;return t=new Promise((t,a)=>{let n=()=>{e.removeEventListener("success",i),e.removeEventListener("error",r)},i=()=>{t(d(e.result)),n()},r=()=>{a(e.error),n()};e.addEventListener("success",i),e.addEventListener("error",r)}),l.set(t,e),t}if(o.has(e))return o.get(e);let t=function(e){if("function"==typeof e)return(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(u(this),t),d(this.request)}:function(...t){return d(e.apply(u(this),t))};return(e instanceof IDBTransaction&&function(e){if(s.has(e))return;let t=new Promise((t,a)=>{let n=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",r),e.removeEventListener("abort",r)},i=()=>{t(),n()},r=()=>{a(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",i),e.addEventListener("error",r),e.addEventListener("abort",r)});s.set(e,t)}(e),r(e,n||(n=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(e,c):e}(e);return t!==e&&(o.set(e,t),l.set(t,e)),t}let u=e=>l.get(e),m=["get","getKey","getAll","getAllKeys","count"],p=["put","add","delete","clear"],h=new Map;function g(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(h.get(t))return h.get(t);let a=t.replace(/FromIndex$/,""),n=t!==a,i=p.includes(a);if(!(a in(n?IDBIndex:IDBObjectStore).prototype)||!(i||m.includes(a)))return;let r=async function(e,...t){let r=this.transaction(e,i?"readwrite":"readonly"),s=r.store;return n&&(s=s.index(t.shift())),(await Promise.all([s[a](...t),i&&r.done]))[0]};return h.set(t,r),r}c={...t=c,get:(e,a,n)=>g(e,a)||t.get(e,a,n),has:(e,a)=>!!g(e,a)||t.has(e,a)};let f=["continue","continuePrimaryKey","advance"],y={},w=new WeakMap,b=new WeakMap,v={get(e,t){if(!f.includes(t))return e[t];let a=y[t];return a||(a=y[t]=function(...e){w.set(this,b.get(this)[t](...e))}),a}};async function*$(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;let a=new Proxy(t,v);for(b.set(a,t),l.set(a,u(t));t;)yield a,t=await (w.get(a)||t.continue()),w.delete(a)}function k(e,t){return t===Symbol.asyncIterator&&r(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&r(e,[IDBIndex,IDBObjectStore])}c={...a=c,get:(e,t,n)=>k(e,t)?$:a.get(e,t,n),has:(e,t)=>k(e,t)||a.has(e,t)};let x=null,S=null;function E(e){return"u"<typeof indexedDB?null:x&&S===e?x:(S=e,x=function(e,{blocked:t,upgrade:a,blocking:n,terminated:i}={}){let r=indexedDB.open(e,4),s=d(r);return a&&r.addEventListener("upgradeneeded",e=>{a(d(r.result),e.oldVersion,e.newVersion,d(r.transaction),e)}),t&&r.addEventListener("blocked",e=>t(e.oldVersion,e.newVersion,e)),s.then(e=>{i&&e.addEventListener("close",()=>i()),n&&e.addEventListener("versionchange",e=>n(e.oldVersion,e.newVersion,e))}).catch(()=>{}),s}(`alook-chat-cache-${e}`,{upgrade(e,t){if(t<1){let t=e.createObjectStore("messages",{keyPath:["conversation_id","id"]});t.createIndex("by-conversation","conversation_id",{unique:!1}),t.createIndex("by-created",["conversation_id","created_at"],{unique:!1}),e.createObjectStore("cache_meta",{keyPath:"conversation_id"})}t<3&&e.createObjectStore("last_open",{keyPath:"key"}).createIndex("by-conversation","conversation_id",{unique:!1}),t<4&&e.createObjectStore("conv_extras",{keyPath:"conversation_id"})}}))}function _(e){return e?E(e):x}async function T(e,t){let a=_(t);if(!a)return null;try{let t=await a,n=await t.getAllFromIndex("messages","by-conversation",e);if(0===n.length)return null;let i=n.filter(e=>!e.id.startsWith("temp-"));i.sort((e,t)=>{let a=e.created_at.localeCompare(t.created_at);return 0!==a?a:e.id.localeCompare(t.id)});let r=await t.get("cache_meta",e);return r&&await t.put("cache_meta",{...r,lastAccessedAt:Date.now()}),i}catch{return null}}async function I(e,t,a,n,i){let r=_(i);if(!r)return null;try{let i=await r,s=await i.get("cache_meta",e);if(!s)return null;let o=IDBKeyRange.bound([e,""],[e,t],!1,!1),l=(await i.getAllFromIndex("messages","by-created",o)).filter(e=>!e.id.startsWith("temp-")&&(e.created_at!==t||!(e.id>=a)));l.sort((e,t)=>{let a=t.created_at.localeCompare(e.created_at);return 0!==a?a:t.id.localeCompare(e.id)});let c=l.slice(0,n);if(c.length<n&&s.hasMore)return null;return await i.put("cache_meta",{...s,lastAccessedAt:Date.now()}),{messages:c.reverse(),hasMore:l.length>n||s.hasMore}}catch{return null}}async function C(e,t,a,n,i){let r=_(n);if(r)try{let n=await r,s=t.filter(e=>!e.id.startsWith("temp-"));if(0===s.length)return;let o=n.transaction(["messages","cache_meta"],"readwrite"),l=o.objectStore("messages"),c=o.objectStore("cache_meta");for(let e of s)await l.put(e);let d=await l.index("by-conversation").getAllKeys(e),u=Date.now(),m=s.reduce((e,t)=>e.created_at>t.created_at?e:t),p=await c.get(e),h=a??p?.hasMore??!0,g=p?.newestMessageId&&p.newestMessageId!==m.id?await (async()=>{let t=await l.get([e,p.newestMessageId]);return t&&t.created_at>m.created_at?t.id:m.id})():m.id,f={conversation_id:e,lastFetchedAt:u,lastAccessedAt:u,messageCount:d.length,newestMessageId:g,hasMore:h,serverMessageCount:i??p?.serverMessageCount??0};await c.put(f),await o.done,L().catch(()=>{})}catch{}}async function A(e,t,a){let n=_(a);if(n&&!t.id.startsWith("temp-"))try{let a=await n,i=await a.get("cache_meta",e);if(!i)return;let r=await a.get("messages",[e,t.id]);await a.put("messages",t),await a.put("cache_meta",{...i,lastAccessedAt:Date.now(),messageCount:r?i.messageCount:i.messageCount+1,newestMessageId:t.id})}catch{}}async function O(e,t){let a=_(t);if(!a)return null;try{let t=await a;return await t.get("cache_meta",e)??null}catch{return null}}function M(e,t){return`${e}::${null==t?"":t}`}async function N(e,t,a){let n=_(a);if(!n)return null;try{let a=await n;return await a.get("last_open",M(e,t))??null}catch{return null}}async function P(e,t,a,n){let i=_(n);if(i)try{let n=await i;await n.put("last_open",{key:M(e,t),conversation_id:a.conversation_id,newestMessageId:a.newestMessageId,serverMessageCount:a.serverMessageCount,updatedAt:Date.now()})}catch{}}async function j(e,t){let a=_(t);if(!a)return null;try{let t=await a;return await t.get("conv_extras",e)??null}catch{return null}}async function D(e,t,a){let n=_(a);if(n)try{let a=await n;await a.put("conv_extras",{conversation_id:e,...t,updatedAt:Date.now()})}catch{}}async function L(e=50){let t=_();if(t)try{let a=await t,n=await a.getAll("cache_meta");if(n.length<=e)return;n.sort((e,t)=>e.lastAccessedAt-t.lastAccessedAt);let i=n.slice(0,n.length-e),r=a.transaction(["messages","cache_meta","last_open","conv_extras"],"readwrite"),s=r.objectStore("messages"),o=r.objectStore("cache_meta"),l=r.objectStore("last_open"),c=r.objectStore("conv_extras");for(let e of i){for(let t of(await s.index("by-conversation").getAllKeys(e.conversation_id)))await s.delete(t);for(let t of(await o.delete(e.conversation_id),await l.index("by-conversation").getAllKeys(e.conversation_id)))await l.delete(t);await c.delete(e.conversation_id)}await r.done}catch{}}async function B(){if("u">typeof indexedDB)try{x&&((await x).close(),x=null),S&&(await J(`alook-chat-cache-${S}`),S=null)}catch{}}async function J(e){return new Promise((t,a)=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>t(),n.onerror=()=>a(n.error),n.onblocked=()=>t()})}e.s(["appendCachedMessage",0,A,"clearAllCache",0,B,"getCacheMeta",0,O,"getCachedMessages",0,T,"getCachedMessagesBefore",0,I,"getConvExtras",0,j,"getLastOpenConversation",0,N,"mergeCachedMessages",0,C,"openCacheDB",0,E,"setConvExtras",0,D,"setLastOpenConversation",0,P],275351)},345262,e=>{"use strict";let t=(0,e.i(419412).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,t],345262)},500324,e=>{"use strict";var t=e.i(653772),a=e.i(511043);let n=(0,a.createContext)(null);e.s(["WorkspaceProvider",0,function({workspaceId:e,slug:i,children:r}){return(0,a.useEffect)(()=>{try{localStorage.setItem("lastWorkspace",i)}catch{}},[i]),(0,t.jsx)(n.Provider,{value:{workspaceId:e,slug:i},children:r})},"useWorkspace",0,function(){let e=(0,a.useContext)(n);if(!e)throw Error("useWorkspace must be used within WorkspaceProvider");return e}])},126942,(e,t,a)=>{t.exports=e.r(871628)},222862,636557,e=>{"use strict";var t=e.i(811374);class a extends Error{status;details;constructor(e,t,a){super(e),this.name="ApiError",this.status=t,this.details=a}get isNetworkError(){return 0===this.status}get isRateLimit(){return 429===this.status}get isUnauthorized(){return 401===this.status}}function n(e,t){return"validation error"===e&&t?.length?function(e){let[t,...a]=e.split(":"),n=a.join(":").trim();if(!n)return e;let i=t.trim(),r=i.trim().replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),s=n.replace(/^required$/i,"is required"),o=s.toLowerCase().replace(/[_-]+/g," "),l=i.toLowerCase().replace(/[_-]+/g," ");return l&&o.startsWith(`${l} `)&&(s=s.slice(i.length).trimStart()),r?`${r} ${s}`:s}(t[0]):e}async function i(e,t){let i;try{i=await fetch(""+e,{...t,credentials:"include",headers:{"Content-Type":"application/json",...t?.headers}})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===i.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!i.ok){let e,t;try{let a=await i.json();e=a.error,t=a.details}catch{}if(429===i.status)throw new a("Please wait a moment before trying again",429);if(i.status>=500)throw new a(n(e,t)||"Something went wrong — please try again",i.status,t);throw new a(n(e,t)||"Something went wrong",i.status,t)}if(204!==i.status)return i.json()}function r(e,t){let a=new URLSearchParams({workspace_id:e,...t});return`?${a.toString()}`}e.s(["ApiError",0,a],636557),parseInt(t.default.env.NEXT_PUBLIC_MOCK_NETWORK_DELAY_MS||"300",10);let s=async(e,t,n,s,o)=>{let l;if(!s||0===s.length)return i(`/api/conversations/${e}/messages${r(n)}`,{method:"POST",body:JSON.stringify({content:t,...o?{metadata:o}:{}})});let c=new FormData;for(let e of(c.append("content",t),o&&c.append("metadata",JSON.stringify(o)),s))c.append("file",e);try{l=await fetch(`/api/conversations/${e}/messages${r(n)}`,{method:"POST",credentials:"include",body:c})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===l.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!l.ok){let e,t;try{let a=await l.json();e=a.error,t=a.details}catch{}if(429===l.status)throw new a("Please wait a moment before trying again",429);if(l.status>=500)throw new a(e||"Something went wrong — please try again",l.status,t);throw new a(e||"Something went wrong",l.status,t)}return l.json()},o=async(e,t)=>{let a=new URLSearchParams({workspace_id:t}),n=await fetch(`/api/email/${e}/body?${a}`,{credentials:"include"});if(!n.ok)return{content:"(body not available)",isHtml:!1};let i=n.headers.get("Content-Type")??"";return{content:await n.text(),isHtml:i.includes("text/html")}},l=async(e,t)=>{let n=new FormData;n.append("file",e);let i=await fetch(`/api/email/upload${r(t)}`,{method:"POST",credentials:"include",body:n});if(!i.ok)throw new a(await i.text().catch(()=>"Upload failed"),i.status);return i.json()},c=async(e,t)=>{let n;if(!t.files||0===t.files.length)return i(`/api/issues${r(e)}`,{method:"POST",body:JSON.stringify({agent_id:t.agent_id,title:t.title,description:t.description})});let s=new FormData;for(let e of(t.agent_id&&s.append("agent_id",t.agent_id),s.append("title",t.title),s.append("description",t.description??""),t.files))s.append("file",e);try{n=await fetch(`/api/issues${r(e)}`,{method:"POST",credentials:"include",body:s})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===n.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!n.ok){let e,t;try{let a=await n.json();e=a.error,t=a.details}catch{}if(429===n.status)throw new a("Please wait a moment before trying again",429);if(n.status>=500)throw new a(e||"Something went wrong — please try again",n.status,t);throw new a(e||"Something went wrong",n.status,t)}return n.json()},d=async(e,t)=>{let a=new URLSearchParams({workspace_id:t}),n=await fetch(`/api/artifacts/${e}/content?${a}`,{credentials:"include"});return n.ok?n.text():"(content not available)"};e.s(["acceptInvite",0,e=>i(`/api/invite/${e}`,{method:"POST"}),"addWhitelistEmail",0,(e,t,a)=>i(`/api/agents/${e}/whitelist${r(a)}`,{method:"POST",body:JSON.stringify({email:t})}),"approveMeeting",0,(e,t,a)=>i(`/api/agents/${e}/meetings/${t}/approve${r(a)}`,{method:"POST"}),"cancelActiveTask",0,(e,t)=>i(`/api/conversations/${e}/active-task${r(t)}`,{method:"DELETE"}),"chatInit",0,(e,t,a)=>i(`/api/agents/${e}/chat-init${r(t)}`,{method:"POST",body:JSON.stringify({...a?{channel:a}:{}})}),"checkFreshness",0,(e,t)=>{let a={};return e.conversationId&&(a.conversation_id=e.conversationId),e.agentId&&(a.agent_id=e.agentId),e.channel&&(a.channel=e.channel),i(`/api/conversations/check-fresh${r(t,a)}`)},"conversationInit",0,(e,t,a)=>{let n={};return a?.newestMessageId&&(n.newest_message_id=a.newestMessageId),a?.messageCount&&(n.message_count=String(a.messageCount)),i(`/api/conversations/${e}/init${r(t,n)}`)},"createAgent",0,(e,t)=>i(`/api/agents${r(t)}`,{method:"POST",body:JSON.stringify(e)}),"createAgentLink",0,(e,t)=>i(`/api/agent-links${r(t)}`,{method:"POST",body:JSON.stringify(e)}),"createCalendarEvent",0,(e,t)=>i(`/api/calendar${r(t)}`,{method:"POST",body:JSON.stringify(e)}),"createChannelApi",0,(e,t)=>i(`/api/channels${r(e)}`,{method:"POST",body:JSON.stringify({name:t})}),"createConversation",0,(e,t,a)=>i(`/api/conversations${r(t)}`,{method:"POST",body:JSON.stringify({agent_id:e,...a?{channel:a}:{}})}),"createEmailAccount",0,(e,t,a)=>i(`/api/agents/${e}/email-accounts${r(a)}`,{method:"POST",body:JSON.stringify(t)}),"createInvite",0,e=>i(`/api/workspaces/${e}/invites${r(e)}`,{method:"POST"}),"createIssue",0,c,"createMachineToken",0,(e,t)=>i(`/api/machine-tokens${t?r(t):""}`,{method:"POST",body:JSON.stringify({name:e||"default"})}),"createMeeting",0,(e,t,a)=>i(`/api/agents/${e}/meetings${r(t)}`,{method:"POST",body:JSON.stringify(a)}),"createThread",0,(e,t,a,n)=>i(`/api/conversations/${e}/threads${r(n)}`,{method:"POST",body:JSON.stringify({parent_message_id:t,content:a})}),"deleteAgent",0,(e,t)=>i(`/api/agents/${e}${r(t)}`,{method:"DELETE"}),"deleteAgentLink",0,(e,t)=>i(`/api/agent-links/${e}${r(t)}`,{method:"DELETE"}),"deleteCalendarEvent",0,(e,t,a)=>i(`/api/calendar/${e}${r(t)}`,{method:"DELETE",...a&&a.scope?{headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}:{}}),"deleteChannelApi",0,(e,t)=>i(`/api/channels/${e}${r(t)}`,{method:"DELETE"}),"deleteEmail",0,(e,t)=>i(`/api/email/${e}${r(t)}`,{method:"DELETE"}),"deleteEmailAccount",0,(e,t,a)=>i(`/api/agents/${e}/email-accounts/${t}${r(a)}`,{method:"DELETE"}),"deleteIssue",0,(e,t)=>i(`/api/issues/${t}${r(e)}`,{method:"DELETE"}),"deleteMachine",0,(e,t)=>i(`/api/runtimes/machine${r(t,{daemon_id:e})}`,{method:"DELETE"}),"deleteMeeting",0,(e,t,a)=>i(`/api/agents/${e}/meetings/${t}${r(a)}`,{method:"DELETE"}),"deleteWorkspace",0,(e,t)=>i(`/api/workspaces/${e}${r(e)}`,{method:"DELETE",body:JSON.stringify({confirm_name:t})}),"fetchLatestCliVersion",0,()=>i("/api/cli/latest-version"),"fetchModelOptions",0,()=>i("/api/config/model-options"),"flagMessage",0,(e,t)=>i(`/api/flags${r(e)}`,{method:"POST",body:JSON.stringify({messageId:t})}),"getActiveTask",0,(e,t)=>i(`/api/conversations/${e}/active-task${r(t)}`),"getAgentSkills",0,(e,t)=>i(`/api/agents/${e}/skills${r(t)}`),"getArtifactContent",0,d,"getCalendarEvent",0,(e,t)=>i(`/api/calendar/${e}${r(t)}`),"getEmail",0,(e,t)=>i(`/api/email/${e}${r(t)}`),"getEmailBody",0,o,"getEmailThread",0,(e,t)=>i(`/api/email/${e}/thread${r(t)}`),"getFlaggedCount",0,e=>i(`/api/flags/count${r(e)}`),"getInboxCount",0,(e,t)=>{let a={};return t?.types?.length&&(a.types=t.types.join(",")),i(`/api/inbox/count${r(e,a)}`)},"getInviteInfo",0,e=>i(`/api/invite/${e}`),"getIssue",0,(e,t)=>i(`/api/issues/${t}${r(e)}`),"getMachineTokenStatus",0,()=>i("/api/machine-tokens/status"),"getMemberMe",0,e=>i(`/api/members/me${r(e)}`),"getMinCliVersion",0,()=>i("/api/config/min-version"),"getTask",0,(e,t)=>i(`/api/tasks/${e}${r(t)}`),"getTaskMessages",0,(e,t,a)=>i(`/api/tasks/${e}/messages${r(t,a?{since:String(a)}:void 0)}`),"getThreadSummaries",0,(e,t)=>i(`/api/conversations/${e}/threads${r(t)}`),"getTrace",0,(e,t)=>i(`/api/traces/${e}${r(t)}`),"getWorkspaceOverview",0,e=>i(`/api/workspaces/${e}/overview${r(e)}`),"grantAgentAccess",0,(e,t,a)=>i(`/api/agents/${t}/access${r(e)}`,{method:"POST",body:JSON.stringify({user_id:a})}),"listAgentAccess",0,(e,t)=>i(`/api/agents/${t}/access${r(e)}`),"listAgentActiveTaskCounts",0,e=>i(`/api/agents/active-task-counts${r(e)}`),"listAgentActivity",0,(e,t,a)=>{let n={};return a?.limit&&(n.limit=String(a.limit)),a?.before&&(n.before=a.before),a?.beforeId&&(n.before_id=a.beforeId),a?.status&&(n.status=a.status),a?.type&&(n.type=a.type),i(`/api/agents/${e}/activity${r(t,n)}`)},"listAgentLinks",0,e=>i(`/api/agent-links${r(e)}`),"listAgentPins",0,e=>i(`/api/agents/pins${r(e)}`),"listAgents",0,e=>i(`/api/agents${r(e)}`),"listArtifacts",0,(e,t)=>i(`/api/artifacts${r(t,{conversation_id:e})}`),"listCalendarEvents",0,(e,t)=>{let a={};return t?.agentId&&(a.agentId=t.agentId),t?.from&&(a.from=t.from),t?.to&&(a.to=t.to),i(`/api/calendar${r(e,a)}`)},"listChannels",0,e=>i(`/api/channels${r(e)}`),"listEmailAccounts",0,(e,t)=>i(`/api/agents/${e}/email-accounts${r(t)}`),"listEmails",0,(e,t,a,n)=>i(`/api/email${r(t,{agentId:e,...a?{folder:a}:{},...n?{address:n}:{}})}`),"listFlaggedItems",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),i(`/api/flags${r(e,a)}`)},"listFlaggedMessageIds",0,(e,t)=>i(`/api/flags${r(e,{conversation_id:t,ids_only:"true"})}`),"listInboxItems",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),t?.types?.length&&(a.types=t.types.join(",")),i(`/api/inbox${r(e,a)}`)},"listInvites",0,e=>i(`/api/workspaces/${e}/invites${r(e)}`),"listIssues",0,(e,t)=>{let a={};return t?.agentId&&(a.agentId=t.agentId),t?.status&&(a.status=t.status),t?.terminal!==void 0&&(a.terminal=String(t.terminal)),i(`/api/issues${r(e,a)}`)},"listMeetings",0,(e,t)=>i(`/api/agents/${e}/meetings${r(t)}`),"listMembers",0,e=>i(`/api/workspaces/${e}/members${r(e)}`),"listMessages",0,(e,t,a)=>{let n={};return a?.limit&&(n.limit=String(a.limit)),a?.before&&(n.before=a.before),a?.beforeId&&(n.before_id=a.beforeId),i(`/api/conversations/${e}/messages${r(t,n)}`)},"listMessagesAroundTask",0,(e,t,a)=>i(`/api/conversations/${e}/messages${r(t,{around_task:a})}`),"listPreviousConversations",0,(e,t,a)=>{let n={exclude:a.exclude,before:a.before};return a.channel&&(n.channel=a.channel),a.limit&&(n.limit=String(a.limit)),i(`/api/agents/${e}/conversations${r(t,n)}`)},"listRuntimes",0,e=>i(`/api/runtimes${r(e)}`),"listTraces",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),t?.status&&(a.status=t.status),t?.multiAgent&&(a.multiAgent="true"),t?.agentId&&(a.agentId=t.agentId),t?.channel&&(a.channel=t.channel),i(`/api/traces${r(e,a)}`)},"listWhitelist",0,(e,t)=>i(`/api/agents/${e}/whitelist${r(t)}`),"listWorkspaceActiveTasks",0,e=>i(`/api/agents/active-tasks${r(e)}`),"listWorkspaces",0,()=>i("/api/workspaces"),"markAllInboxRead",0,e=>i(`/api/inbox/read-all${r(e)}`,{method:"POST"}),"markInboxRead",0,(e,t)=>i(`/api/inbox/read${r(t)}`,{method:"POST",body:JSON.stringify({conversationId:e})}),"pinAgent",0,(e,t)=>i(`/api/agents/${t}/pin${r(e)}`,{method:"POST"}),"removeMember",0,(e,t)=>i(`/api/workspaces/${e}/members/${t}${r(e)}`,{method:"DELETE"}),"removeWhitelistEmail",0,(e,t,a)=>i(`/api/agents/${e}/whitelist/${t}${r(a)}`,{method:"DELETE"}),"renameChannelApi",0,(e,t,a)=>i(`/api/channels/${e}${r(t)}`,{method:"PATCH",body:JSON.stringify({name:a})}),"reorderAgentPins",0,(e,t)=>i(`/api/agents/pins/reorder${r(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"reorderChannelsApi",0,(e,t)=>i(`/api/channels/reorder${r(e)}`,{method:"PUT",body:JSON.stringify({ordered_channel_ids:t})}),"reorderUnpinnedAgents",0,(e,t)=>i(`/api/agents/sidebar/reorder${r(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"requestWorkspaceBrowse",0,(e,t,a,n)=>i(`/api/agents/${e}/workspace/browse${r(t)}`,{method:"POST",body:JSON.stringify({request_type:a,path:n})}),"retryTask",0,(e,t)=>i(`/api/tasks/${e}/retry${r(t)}`,{method:"POST"}),"revokeAgentAccess",0,(e,t,a,n=!1)=>i(`/api/agents/${t}/access/${a}${r(e)}${n?"&remove_whitelist=true":""}`,{method:"DELETE"}),"revokeInvite",0,(e,t)=>i(`/api/workspaces/${e}/invites/${t}${r(e)}`,{method:"DELETE"}),"sendEmail",0,(e,t,a,n,s,o,l,c)=>i(`/api/email/send${r(s)}`,{method:"POST",body:JSON.stringify({agentId:e,to:t,subject:a,htmlBody:n,attachments:o,...l,customAccountId:c})}),"sendMessage",0,s,"stopMeeting",0,(e,t,a)=>i(`/api/agents/${e}/meetings/${t}/stop${r(a)}`,{method:"POST"}),"syncEmailAccount",0,(e,t,a)=>i(`/api/agents/${e}/email-accounts/${t}/sync${r(a)}`,{method:"POST"}),"triggerRuntimeRescan",0,(e,t)=>i(`/api/runtimes/${e}/rescan${r(t)}`,{method:"POST"}),"triggerRuntimeUpdate",0,(e,t)=>i(`/api/runtimes/${e}/update${r(t)}`,{method:"POST"}),"unflagMessage",0,(e,t)=>i(`/api/flags/${t}${r(e)}`,{method:"DELETE"}),"unpinAgent",0,(e,t)=>i(`/api/agents/${t}/pin${r(e)}`,{method:"DELETE"}),"updateAgent",0,(e,t,a)=>i(`/api/agents/${e}${r(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateAgentLink",0,(e,t,a)=>i(`/api/agent-links/${e}${r(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateCalendarEvent",0,(e,t,a)=>i(`/api/calendar/${e}${r(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateEmailStatus",0,(e,t,a)=>i(`/api/email/${e}${r(t)}`,{method:"PATCH",body:JSON.stringify({status:a})}),"updateIssue",0,(e,t,a)=>i(`/api/issues/${t}${r(e)}`,{method:"PATCH",body:JSON.stringify(a)}),"updateMemberMe",0,(e,t)=>i(`/api/members/me${r(e)}`,{method:"PATCH",body:JSON.stringify({global_instruction:t})}),"updateWorkspace",0,(e,t)=>i(`/api/workspaces/${e}${r(e)}`,{method:"PATCH",body:JSON.stringify(t)}),"uploadEmailAttachment",0,l],222862)},728886,e=>{"use strict";var t=e.i(653772),a=e.i(613349);e.s(["Skeleton",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,a.cn)("animate-pulse rounded-md bg-muted",e),...n})}])},896210,e=>{"use strict";let t=(0,e.i(419412).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["Mail",0,t],896210)},330746,e=>{"use strict";let t=(0,e.i(419412).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],330746)},966662,940931,e=>{"use strict";let t=(0,e.i(419412).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);e.s(["Paperclip",0,t],966662);var a=e.i(653772),n=e.i(511043),i=e.i(111114);let r=`
|
|
2
|
+
html, body {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
}
|
|
5
|
+
`,s=`
|
|
6
|
+
html, body {
|
|
7
|
+
--sb-thumb: rgba(0,0,0,0.15);
|
|
8
|
+
--sb-hover: rgba(0,0,0,0.3);
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
background: transparent;
|
|
12
|
+
color: #1a1a1a;
|
|
13
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
14
|
+
font-size: 15px;
|
|
15
|
+
line-height: 1.6;
|
|
16
|
+
word-wrap: break-word;
|
|
17
|
+
overflow-wrap: break-word;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
a { color: inherit; }
|
|
21
|
+
img { max-width: 100%; height: auto; }
|
|
22
|
+
`,o=`
|
|
23
|
+
html, body {
|
|
24
|
+
--sb-thumb: rgba(255,255,255,0.1);
|
|
25
|
+
--sb-hover: rgba(255,255,255,0.25);
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
background: transparent;
|
|
29
|
+
color: #e8e5e0;
|
|
30
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
31
|
+
font-size: 15px;
|
|
32
|
+
line-height: 1.6;
|
|
33
|
+
word-wrap: break-word;
|
|
34
|
+
overflow-wrap: break-word;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
color-scheme: dark;
|
|
37
|
+
}
|
|
38
|
+
a { color: inherit; }
|
|
39
|
+
img { max-width: 100%; height: auto; }
|
|
40
|
+
/* Force dark-friendly defaults on common email patterns */
|
|
41
|
+
body, div, td, th, p, span, li {
|
|
42
|
+
color: #e8e5e0 !important;
|
|
43
|
+
}
|
|
44
|
+
table, tr, td, th, div, section, article, header, footer, main {
|
|
45
|
+
background-color: transparent !important;
|
|
46
|
+
border-color: rgba(255, 255, 255, 0.1) !important;
|
|
47
|
+
}
|
|
48
|
+
/* Preserve image backgrounds (logos, etc) */
|
|
49
|
+
img { background-color: transparent !important; }
|
|
50
|
+
h1, h2, h3, h4, h5, h6 {
|
|
51
|
+
color: #f0ede8 !important;
|
|
52
|
+
}
|
|
53
|
+
a { color: #93b5ff !important; }
|
|
54
|
+
`;e.s(["EmailBodyFrame",0,function({html:e,className:t}){let l=(0,n.useRef)(null),{resolvedTheme:c}=(0,i.useTheme)(),[d,u]=(0,n.useState)(200),m="dark"===c;return(0,n.useEffect)(()=>{let t=l.current;if(!t)return;let a=null;t.srcdoc=`<!DOCTYPE html>
|
|
55
|
+
<html>
|
|
56
|
+
<head>
|
|
57
|
+
<meta charset="utf-8">
|
|
58
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
59
|
+
<meta name="color-scheme" content="${m?"dark":"light"}">
|
|
60
|
+
<style>${r}${m?o:s}</style>
|
|
61
|
+
</head>
|
|
62
|
+
<body>${e}</body>
|
|
63
|
+
</html>`;let n=()=>{let e=t.contentDocument;if(!e)return;let n=()=>{let t=e.documentElement.scrollHeight;t>0&&u(t)};n(),(a=new ResizeObserver(n)).observe(e.documentElement)};return t.addEventListener("load",n),()=>{t.removeEventListener("load",n),a?.disconnect()}},[e,m]),(0,a.jsx)("iframe",{ref:l,sandbox:"allow-same-origin",className:t,style:{width:"100%",height:`${d}px`,border:"none",display:"block"},title:"Email content"})}],940931)},758956,e=>{"use strict";let t=(0,e.i(419412).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,t],758956)},51724,e=>{"use strict";let t=(0,e.i(419412).default)("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);e.s(["CircleDot",0,t],51724)},131890,e=>{"use strict";let t=(0,e.i(419412).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,t],131890)},465368,e=>{"use strict";var t=e.i(653772);e.s(["EmailCard",0,function({subject:e,address:a,direction:n,onClick:i}){return(0,t.jsxs)("button",{type:"button",onClick:i,disabled:!i,className:"card-grain w-104 max-w-full overflow-hidden rounded-(--radius) border border-(--border) bg-(--paper) text-left flex flex-col cursor-pointer transition-[transform,box-shadow] duration-300 ease-out hover:-translate-y-0.5 [box-shadow:var(--e1)] hover:[box-shadow:var(--e2)]",children:[(0,t.jsx)("span",{className:"h-2.5 relative block",children:(0,t.jsx)("svg",{viewBox:"0 0 100 10",preserveAspectRatio:"none",className:"absolute inset-0 w-full h-full",children:(0,t.jsx)("path",{d:"M8,-1 L50,9 L92,-1",stroke:"var(--te)",strokeWidth:"2.5",opacity:"0.4",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"})})}),(0,t.jsxs)("span",{className:"p-3 flex flex-col",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1 mb-1",children:[(0,t.jsxs)("span",{className:"text-[0.72rem] text-(--muted-foreground) flex-1 min-w-0 whitespace-nowrap overflow-hidden text-ellipsis",children:["inbound"===n?"from ":"to ",a]}),(0,t.jsx)("span",{className:"shrink-0 text-[0.5rem] font-bold uppercase tracking-wider text-(--te) px-1 py-0.5 rounded-[3px] border-[1.5px] border-(--te) opacity-45 -rotate-3",children:"inbound"===n?"Inbound":"Sent"})]}),(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold tracking-[-0.01em] leading-[1.35] line-clamp-2",children:e})]})]})}])},754902,855351,157349,e=>{"use strict";var t=e.i(653772),a=e.i(613349);let n={single:"rounded-[1.05rem]",first:"rounded-[1.05rem] rounded-br-[0.35rem]",middle:"rounded-[1.05rem] rounded-tr-[0.35rem] rounded-br-[0.35rem]",last:"rounded-[1.05rem] rounded-tr-[0.35rem]"},i={single:"rounded-[1.05rem]",first:"rounded-[1.05rem] rounded-bl-[0.35rem]",middle:"rounded-[1.05rem] rounded-tl-[0.35rem] rounded-bl-[0.35rem]",last:"rounded-[1.05rem] rounded-tl-[0.35rem]"};function r(){return(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5","aria-hidden":!0,children:[(0,t.jsx)("span",{className:"size-1 rounded-full bg-muted-foreground/60 motion-safe:animate-[typing-dot_1.2s_ease-in-out_infinite]"}),(0,t.jsx)("span",{className:"size-1 rounded-full bg-muted-foreground/60 motion-safe:animate-[typing-dot_1.2s_ease-in-out_0.2s_infinite]"}),(0,t.jsx)("span",{className:"size-1 rounded-full bg-muted-foreground/60 motion-safe:animate-[typing-dot_1.2s_ease-in-out_0.4s_infinite]"})]})}e.s(["MessageBubble",0,function({variant:e,position:r,children:s,className:o,...l}){let c="user"===e?n[r]:i[r];return(0,t.jsx)("div",{className:(0,a.cn)("px-3 py-1.5 text-base",c,"user"===e?"bg-primary text-primary-foreground":"bg-muted text-foreground",o),...l,children:s})}],754902),e.s(["AVATAR_SIZE",0,30,"MessageCluster",0,function({avatar:e,name:n,children:i,position:r,className:s}){let o="first"===r||"solo"===r;return(0,t.jsxs)("div",{className:(0,a.cn)("flex justify-start items-start gap-2 min-w-0",s),children:[(0,t.jsx)("div",{className:(0,a.cn)("w-[30px]","shrink-0"),"aria-hidden":!o,children:o&&e}),(0,t.jsxs)("div",{className:"min-w-0 max-w-[86%] flex flex-col items-start gap-0.5",children:[o&&(0,t.jsx)("span",{className:"text-[0.85rem] font-semibold text-foreground leading-[1.15] pt-0.5 mb-1",children:n}),i]})]})}],855351),e.s(["PresenceLine",0,function({agentFirstName:e,taskStatus:n}){let i="running"===n?"typing":"queued"===n||"dispatched"===n?"reading":"idle";return(0,t.jsx)("div",{className:"h-5 px-1 mb-2 flex items-center","aria-live":"polite",children:(0,t.jsx)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 text-sm text-muted-foreground","idle"!==i&&"motion-safe:animate-[fade-up_200ms_ease-out_both]"),children:"idle"!==i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:"reading"===i?`${e} is reading`:`${e} is typing`}),(0,t.jsx)(r,{})]})},i)})}],157349)},899746,e=>{"use strict";let t="browser-notification-enabled",a="browser-notification-events",n=["completed","failed"],i={completed:"Task Completed",failed:"Task Failed"};function r(){return"Notification"in window}function s(){return"true"===localStorage.getItem(t)}function o(){try{let e=localStorage.getItem(a);if(e)return JSON.parse(e)}catch{}return[...n]}async function l(){return!!r()&&("granted"===Notification.permission||"denied"!==Notification.permission&&"granted"===await Notification.requestPermission())}e.s(["NOTIFICATION_EVENTS",0,n,"NOTIFICATION_EVENT_LABELS",0,i,"getNotificationEnabled",0,s,"getNotificationEvents",0,o,"isNotificationSupported",0,r,"requestNotificationPermission",0,l,"sendTaskNotification",0,function(e,t,a){if(!r()||"granted"!==Notification.permission||!s()||!o().includes(e))return;let n=i[e]??`Task ${e}`;new Notification(t?`${t} — ${n}`:n,{body:a??"",icon:"/alook.svg"})},"setNotificationEnabled",0,function(e){localStorage.setItem(t,String(e))},"setNotificationEvents",0,function(e){localStorage.setItem(a,JSON.stringify(e))}])},875494,685835,e=>{"use strict";var t=e.i(653772),a=e.i(511043),n=e.i(222862),i=e.i(355578),r=e.i(500324),s=e.i(899746);let o="inbox-filter-types",l=["user_dm_message","calendar_event","email_notification"],c=["user_dm_message"],d=["user_dm_message"];function u(){try{let e=localStorage.getItem(o);if(!e)return c;let t=JSON.parse(e).filter(e=>l.includes(e));if(0===t.length)return c;for(let e of d)t.includes(e)||t.unshift(e);return t}catch{return c}}e.s(["INBOX_FILTER_LABELS",0,{user_dm_message:"DM",calendar_event:"Calendar",email_notification:"Email"},"INBOX_FILTER_TYPES",0,l,"MANDATORY_INBOX_TYPES",0,d,"getInboxFilterTypes",0,u,"setInboxFilterTypes",0,function(e){let t=[...e];for(let e of d)t.includes(e)||t.unshift(e);localStorage.setItem(o,JSON.stringify(t))}],685835);let m=(0,a.createContext)(null),p={count:0,notificationToken:0,refresh:()=>{},decrement:()=>{}};e.s(["InboxCountProvider",0,function({children:e}){let{workspaceId:o}=(0,r.useWorkspace)(),{subscribeWs:l,agents:c}=(0,i.useAgentContext)(),[d,p]=(0,a.useState)(0),[h,g]=(0,a.useState)(0),f=(0,a.useRef)(null),y=(0,a.useRef)(null),w=(0,a.useRef)(c);(0,a.useEffect)(()=>{w.current=c});let b=(0,a.useCallback)(()=>{let e=u();(0,n.getInboxCount)(o,{types:e}).then(e=>{let t=f.current;if(f.current=e.count,p(e.count),null!==t&&e.count>t){g(e=>e+1);let e=y.current?w.current.find(e=>e.id===y.current):void 0;(0,s.sendTaskNotification)("completed",e?.name)}y.current=null}).catch(()=>{})},[o]),v=(0,a.useCallback)(()=>{p(e=>Math.max(0,e-1))},[]);return(0,a.useEffect)(()=>{b()},[b]),(0,a.useEffect)(()=>l(e=>{"task.updated"===e.type&&("completed"===e.status||"failed"===e.status)&&(y.current=e.agentId,b())}),[l,b]),(0,a.useEffect)(()=>{let e=setInterval(b,6e4);return()=>clearInterval(e)},[b]),(0,t.jsx)(m.Provider,{value:{count:d,notificationToken:h,refresh:b,decrement:v},children:e})},"useInboxCount",0,function(){return(0,a.useContext)(m)??p}],875494)},41793,e=>{"use strict";let t=(0,e.i(419412).default)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);e.s(["CalendarDays",0,t],41793)},896315,219658,e=>{"use strict";var t=e.i(419412);let a=(0,t.default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);e.s(["RotateCw",0,a],896315);var n=e.i(653772),i=e.i(511043),r=e.i(186339),s=e.i(329686);let o=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);var l=e.i(613349);e.s(["ScrollToBottomButton",0,function({scrollRef:e,threshold:t=100}){let[a,c]=(0,i.useState)(!1),d=(0,i.useCallback)(()=>{let a=e.current;if(!a)return;let n=a.scrollHeight-a.scrollTop-a.clientHeight<t;c(a.scrollHeight>a.clientHeight&&!n)},[e,t]);return(0,i.useEffect)(()=>{let t=e.current;if(!t)return;t.addEventListener("scroll",d,{passive:!0}),d();let a=new ResizeObserver(d);return a.observe(t),()=>{t.removeEventListener("scroll",d),a.disconnect()}},[e,d]),(0,n.jsx)("div",{className:(0,l.cn)("absolute bottom-1 left-1/2 -translate-x-1/2 z-10 transition-all duration-200 ease-out",a?"opacity-100 translate-y-0":"opacity-0 translate-y-2 pointer-events-none"),children:(0,n.jsxs)(s.Tooltip,{children:[(0,n.jsx)(s.TooltipTrigger,{render:(0,n.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:()=>{let t=e.current;t&&t.scrollTo({top:t.scrollHeight,behavior:"smooth"})},className:"rounded-full bg-background/80 backdrop-blur-sm border shadow-sm hover:bg-background"}),children:(0,n.jsx)(o,{})}),(0,n.jsx)(s.TooltipContent,{side:"top",children:"Scroll to bottom"})]})})}],219658)},353155,e=>{"use strict";var t=e.i(452691);e.s(["Check",()=>t.default])},947308,e=>{"use strict";let t=(0,e.i(419412).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],947308)},813141,e=>{"use strict";let t=(0,e.i(419412).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],813141)},393153,e=>{"use strict";var t=e.i(653772),a=e.i(779646),n=e.i(186339);e.s(["ConfirmDialog",0,function({open:e,onOpenChange:i,title:r,description:s,confirmLabel:o="Remove",loadingLabel:l,confirmVariant:c="destructive",loading:d=!1,onConfirm:u}){return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:i,children:(0,t.jsxs)(a.DialogContent,{showCloseButton:!1,children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:r}),(0,t.jsx)(a.DialogDescription,{children:s})]}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",size:"sm",onClick:()=>i(!1),disabled:d,children:"Cancel"}),(0,t.jsx)(n.Button,{variant:c,size:"sm",onClick:u,disabled:d,children:d?l??`${o}...`:o})]})]})})}])},82970,e=>{"use strict";let t=(0,e.i(419412).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],82970)},294518,e=>{"use strict";let t=(0,e.i(419412).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,t],294518)},267007,e=>{"use strict";let t=(0,e.i(419412).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);e.s(["Square",0,t],267007)}]);
|
package/bundled/web/.open-next/assets/_next/static/chunks/{1-srtubo20rjx.js → 27vz1_55bn5h_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,879486,384265,e=>{"use strict";e.i(811374);var t=e.i(511043),a=e.i(92615),i=e.i(298604),n=e.i(990966),s=e.i(372252),r=e.i(154680);let o=t.createContext(void 0);function d(e=!1){let a=t.useContext(o);if(void 0===a&&!e)throw Error((0,r.default)(16));return a}function l(e){return(0,a.isHTMLElement)(e)&&"BUTTON"===e.tagName}e.s(["CompositeRootContext",0,o,"useCompositeRootContext",0,d],384265),e.s(["useButton",0,function(e={}){let{disabled:a=!1,focusableWhenDisabled:r,tabIndex:o=0,native:c=!0,composite:u}=e,p=t.useRef(null),g=d(!0),m=u??void 0!==g,{props:h}=function(e){let{focusableWhenDisabled:a,disabled:i,composite:n=!1,tabIndex:s=0,isNativeButton:r}=e,o=n&&!1!==a,d=n&&!1===a;return{props:t.useMemo(()=>{let e={onKeyDown(e){i&&a&&"Tab"!==e.key&&e.preventDefault()}};return n||(e.tabIndex=s,!r&&i&&(e.tabIndex=a?s:-1)),(r&&(a||o)||!r&&i)&&(e["aria-disabled"]=i),r&&(!a||d)&&(e.disabled=i),e},[n,i,a,o,d,r,s])}}({focusableWhenDisabled:r,disabled:a,composite:m,tabIndex:o,isNativeButton:c}),f=t.useCallback(()=>{let e=p.current;l(e)&&m&&a&&void 0===h.disabled&&e.disabled&&(e.disabled=!1)},[a,h.disabled,m]);return(0,n.useIsoLayoutEffect)(f,[f]),{getButtonProps:t.useCallback((e={})=>{let{onClick:t,onMouseDown:i,onKeyUp:n,onKeyDown:r,onPointerDown:o,...d}=e;return(0,s.mergeProps)({onClick(e){a?e.preventDefault():t?.(e)},onMouseDown(e){a||i?.(e)},onKeyDown(e){var i;if(a||((0,s.makeEventPreventable)(e),r?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,o=e.currentTarget,d=l(o),u=!c&&(i=o,!!(i?.tagName==="A"&&i?.href)),p=n&&(c?d:!u),g="Enter"===e.key,h=" "===e.key,f=o.getAttribute("role"),$=f?.startsWith("menuitem")||"option"===f||"gridcell"===f;if(n&&m&&h){if(e.defaultPrevented&&$)return;e.preventDefault(),u||c&&d?(o.click(),e.preventBaseUIHandler()):p&&(t?.(e),e.preventBaseUIHandler());return}p&&(!c&&(h||g)&&e.preventDefault(),!c&&g&&t?.(e))},onKeyUp(e){a||(((0,s.makeEventPreventable)(e),n?.(e),e.target===e.currentTarget&&c&&m&&l(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||c||m||" "!==e.key||t?.(e)))},onPointerDown(e){a?e.preventDefault():o?.(e)}},c?{type:"button"}:{role:"button"},h,d)},[a,h,m,c]),buttonRef:(0,i.useStableCallback)(e=>{p.current=e,f()})}}],879486)},294237,e=>{"use strict";var t=e.i(7284);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=t.clsx;e.s(["cva",0,(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return i(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:r,defaultVariants:o}=t,d=Object.keys(r).map(e=>{let t=null==n?void 0:n[e],i=null==o?void 0:o[e];if(null===t)return null;let s=a(t)||a(i);return r[e][s]}),l=n&&Object.entries(n).reduce((e,t)=>{let[a,i]=t;return void 0===i||(e[a]=i),e},{});return i(e,d,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:a,className:i,...n}=t;return Object.entries(n).every(e=>{let[t,a]=e;return Array.isArray(a)?a.includes({...o,...l}[t]):({...o,...l})[t]===a})?[...e,a,i]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}])},186339,e=>{"use strict";var t=e.i(653772);e.i(811374);var a=e.i(511043),i=e.i(879486),n=e.i(695681);let s=a.forwardRef(function(e,t){let{render:a,className:s,disabled:r=!1,focusableWhenDisabled:o=!1,nativeButton:d=!0,style:l,...c}=e,{getButtonProps:u,buttonRef:p}=(0,i.useButton)({disabled:r,focusableWhenDisabled:o,native:d});return(0,n.useRenderElement)("button",e,{state:{disabled:r},ref:[t,p],props:[c,u]})});var r=e.i(294237),o=e.i(613349);let d=(0,r.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:a="default",size:i="default",...n}){return(0,t.jsx)(s,{"data-slot":"button",className:(0,o.cn)(d({variant:a,size:i,className:e})),...n})},"buttonVariants",0,d],186339)},126942,(e,t,a)=>{t.exports=e.r(871628)},222862,636557,e=>{"use strict";var t=e.i(811374);class a extends Error{status;details;constructor(e,t,a){super(e),this.name="ApiError",this.status=t,this.details=a}get isNetworkError(){return 0===this.status}get isRateLimit(){return 429===this.status}get isUnauthorized(){return 401===this.status}}function i(e,t){return"validation error"===e&&t?.length?function(e){let[t,...a]=e.split(":"),i=a.join(":").trim();if(!i)return e;let n=t.trim(),s=n.trim().replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),r=i.replace(/^required$/i,"is required"),o=r.toLowerCase().replace(/[_-]+/g," "),d=n.toLowerCase().replace(/[_-]+/g," ");return d&&o.startsWith(`${d} `)&&(r=r.slice(n.length).trimStart()),s?`${s} ${r}`:r}(t[0]):e}async function n(e,t){let n;try{n=await fetch(""+e,{...t,credentials:"include",headers:{"Content-Type":"application/json",...t?.headers}})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===n.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!n.ok){let e,t;try{let a=await n.json();e=a.error,t=a.details}catch{}if(429===n.status)throw new a("Please wait a moment before trying again",429);if(n.status>=500)throw new a(i(e,t)||"Something went wrong — please try again",n.status,t);throw new a(i(e,t)||"Something went wrong",n.status,t)}if(204!==n.status)return n.json()}function s(e,t){let a=new URLSearchParams({workspace_id:e,...t});return`?${a.toString()}`}e.s(["ApiError",0,a],636557),parseInt(t.default.env.NEXT_PUBLIC_MOCK_NETWORK_DELAY_MS||"300",10);let r=async(e,t,i,r,o)=>{let d;if(!r||0===r.length)return n(`/api/conversations/${e}/messages${s(i)}`,{method:"POST",body:JSON.stringify({content:t,...o?{metadata:o}:{}})});let l=new FormData;for(let e of(l.append("content",t),o&&l.append("metadata",JSON.stringify(o)),r))l.append("file",e);try{d=await fetch(`/api/conversations/${e}/messages${s(i)}`,{method:"POST",credentials:"include",body:l})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===d.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!d.ok){let e,t;try{let a=await d.json();e=a.error,t=a.details}catch{}if(429===d.status)throw new a("Please wait a moment before trying again",429);if(d.status>=500)throw new a(e||"Something went wrong — please try again",d.status,t);throw new a(e||"Something went wrong",d.status,t)}return d.json()},o=async(e,t)=>{let a=new URLSearchParams({workspace_id:t}),i=await fetch(`/api/email/${e}/body?${a}`,{credentials:"include"});if(!i.ok)return{content:"(body not available)",isHtml:!1};let n=i.headers.get("Content-Type")??"";return{content:await i.text(),isHtml:n.includes("text/html")}},d=async(e,t)=>{let i=new FormData;i.append("file",e);let n=await fetch(`/api/email/upload${s(t)}`,{method:"POST",credentials:"include",body:i});if(!n.ok)throw new a(await n.text().catch(()=>"Upload failed"),n.status);return n.json()},l=async(e,t)=>{let i;if(!t.files||0===t.files.length)return n(`/api/issues${s(e)}`,{method:"POST",body:JSON.stringify({agent_id:t.agent_id,title:t.title,description:t.description})});let r=new FormData;for(let e of(t.agent_id&&r.append("agent_id",t.agent_id),r.append("title",t.title),r.append("description",t.description??""),t.files))r.append("file",e);try{i=await fetch(`/api/issues${s(e)}`,{method:"POST",credentials:"include",body:r})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===i.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!i.ok){let e,t;try{let a=await i.json();e=a.error,t=a.details}catch{}if(429===i.status)throw new a("Please wait a moment before trying again",429);if(i.status>=500)throw new a(e||"Something went wrong — please try again",i.status,t);throw new a(e||"Something went wrong",i.status,t)}return i.json()},c=async(e,t)=>{let a=new URLSearchParams({workspace_id:t}),i=await fetch(`/api/artifacts/${e}/content?${a}`,{credentials:"include"});return i.ok?i.text():"(content not available)"};e.s(["acceptInvite",0,e=>n(`/api/invite/${e}`,{method:"POST"}),"addWhitelistEmail",0,(e,t,a)=>n(`/api/agents/${e}/whitelist${s(a)}`,{method:"POST",body:JSON.stringify({email:t})}),"approveMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings/${t}/approve${s(a)}`,{method:"POST"}),"cancelActiveTask",0,(e,t)=>n(`/api/conversations/${e}/active-task${s(t)}`,{method:"DELETE"}),"chatInit",0,(e,t,a)=>n(`/api/agents/${e}/chat-init${s(t)}`,{method:"POST",body:JSON.stringify({...a?{channel:a}:{}})}),"checkFreshness",0,(e,t)=>{let a={};return e.conversationId&&(a.conversation_id=e.conversationId),e.agentId&&(a.agent_id=e.agentId),e.channel&&(a.channel=e.channel),n(`/api/conversations/check-fresh${s(t,a)}`)},"conversationInit",0,(e,t,a)=>{let i={};return a?.newestMessageId&&(i.newest_message_id=a.newestMessageId),a?.messageCount&&(i.message_count=String(a.messageCount)),n(`/api/conversations/${e}/init${s(t,i)}`)},"createAgent",0,(e,t)=>n(`/api/agents${s(t)}`,{method:"POST",body:JSON.stringify(e)}),"createAgentLink",0,(e,t)=>n(`/api/agent-links${s(t)}`,{method:"POST",body:JSON.stringify(e)}),"createCalendarEvent",0,(e,t)=>n(`/api/calendar${s(t)}`,{method:"POST",body:JSON.stringify(e)}),"createChannelApi",0,(e,t)=>n(`/api/channels${s(e)}`,{method:"POST",body:JSON.stringify({name:t})}),"createConversation",0,(e,t,a)=>n(`/api/conversations${s(t)}`,{method:"POST",body:JSON.stringify({agent_id:e,...a?{channel:a}:{}})}),"createEmailAccount",0,(e,t,a)=>n(`/api/agents/${e}/email-accounts${s(a)}`,{method:"POST",body:JSON.stringify(t)}),"createInvite",0,e=>n(`/api/workspaces/${e}/invites${s(e)}`,{method:"POST"}),"createIssue",0,l,"createMachineToken",0,(e,t)=>n(`/api/machine-tokens${t?s(t):""}`,{method:"POST",body:JSON.stringify({name:e||"default"})}),"createMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings${s(t)}`,{method:"POST",body:JSON.stringify(a)}),"deleteAgent",0,(e,t)=>n(`/api/agents/${e}${s(t)}`,{method:"DELETE"}),"deleteAgentLink",0,(e,t)=>n(`/api/agent-links/${e}${s(t)}`,{method:"DELETE"}),"deleteCalendarEvent",0,(e,t,a)=>n(`/api/calendar/${e}${s(t)}`,{method:"DELETE",...a&&a.scope?{headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}:{}}),"deleteChannelApi",0,(e,t)=>n(`/api/channels/${e}${s(t)}`,{method:"DELETE"}),"deleteEmail",0,(e,t)=>n(`/api/email/${e}${s(t)}`,{method:"DELETE"}),"deleteEmailAccount",0,(e,t,a)=>n(`/api/agents/${e}/email-accounts/${t}${s(a)}`,{method:"DELETE"}),"deleteIssue",0,(e,t)=>n(`/api/issues/${t}${s(e)}`,{method:"DELETE"}),"deleteMachine",0,(e,t)=>n(`/api/runtimes/machine${s(t,{daemon_id:e})}`,{method:"DELETE"}),"deleteMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings/${t}${s(a)}`,{method:"DELETE"}),"deleteWorkspace",0,(e,t)=>n(`/api/workspaces/${e}${s(e)}`,{method:"DELETE",body:JSON.stringify({confirm_name:t})}),"fetchLatestCliVersion",0,()=>n("/api/cli/latest-version"),"fetchModelOptions",0,()=>n("/api/config/model-options"),"flagMessage",0,(e,t)=>n(`/api/flags${s(e)}`,{method:"POST",body:JSON.stringify({messageId:t})}),"getActiveTask",0,(e,t)=>n(`/api/conversations/${e}/active-task${s(t)}`),"getAgentSkills",0,(e,t)=>n(`/api/agents/${e}/skills${s(t)}`),"getArtifactContent",0,c,"getCalendarEvent",0,(e,t)=>n(`/api/calendar/${e}${s(t)}`),"getEmail",0,(e,t)=>n(`/api/email/${e}${s(t)}`),"getEmailBody",0,o,"getEmailThread",0,(e,t)=>n(`/api/email/${e}/thread${s(t)}`),"getFlaggedCount",0,e=>n(`/api/flags/count${s(e)}`),"getInboxCount",0,(e,t)=>{let a={};return t?.types?.length&&(a.types=t.types.join(",")),n(`/api/inbox/count${s(e,a)}`)},"getInviteInfo",0,e=>n(`/api/invite/${e}`),"getIssue",0,(e,t)=>n(`/api/issues/${t}${s(e)}`),"getMachineTokenStatus",0,()=>n("/api/machine-tokens/status"),"getMemberMe",0,e=>n(`/api/members/me${s(e)}`),"getMinCliVersion",0,()=>n("/api/config/min-version"),"getTask",0,(e,t)=>n(`/api/tasks/${e}${s(t)}`),"getTaskMessages",0,(e,t,a)=>n(`/api/tasks/${e}/messages${s(t,a?{since:String(a)}:void 0)}`),"getTrace",0,(e,t)=>n(`/api/traces/${e}${s(t)}`),"getWorkspaceOverview",0,e=>n(`/api/workspaces/${e}/overview${s(e)}`),"grantAgentAccess",0,(e,t,a)=>n(`/api/agents/${t}/access${s(e)}`,{method:"POST",body:JSON.stringify({user_id:a})}),"listAgentAccess",0,(e,t)=>n(`/api/agents/${t}/access${s(e)}`),"listAgentActiveTaskCounts",0,e=>n(`/api/agents/active-task-counts${s(e)}`),"listAgentActivity",0,(e,t,a)=>{let i={};return a?.limit&&(i.limit=String(a.limit)),a?.before&&(i.before=a.before),a?.beforeId&&(i.before_id=a.beforeId),a?.status&&(i.status=a.status),a?.type&&(i.type=a.type),n(`/api/agents/${e}/activity${s(t,i)}`)},"listAgentLinks",0,e=>n(`/api/agent-links${s(e)}`),"listAgentPins",0,e=>n(`/api/agents/pins${s(e)}`),"listAgents",0,e=>n(`/api/agents${s(e)}`),"listArtifacts",0,(e,t)=>n(`/api/artifacts${s(t,{conversation_id:e})}`),"listCalendarEvents",0,(e,t)=>{let a={};return t?.agentId&&(a.agentId=t.agentId),t?.from&&(a.from=t.from),t?.to&&(a.to=t.to),n(`/api/calendar${s(e,a)}`)},"listChannels",0,e=>n(`/api/channels${s(e)}`),"listEmailAccounts",0,(e,t)=>n(`/api/agents/${e}/email-accounts${s(t)}`),"listEmails",0,(e,t,a,i)=>n(`/api/email${s(t,{agentId:e,...a?{folder:a}:{},...i?{address:i}:{}})}`),"listFlaggedItems",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),n(`/api/flags${s(e,a)}`)},"listFlaggedMessageIds",0,(e,t)=>n(`/api/flags${s(e,{conversation_id:t,ids_only:"true"})}`),"listInboxItems",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),t?.types?.length&&(a.types=t.types.join(",")),n(`/api/inbox${s(e,a)}`)},"listInvites",0,e=>n(`/api/workspaces/${e}/invites${s(e)}`),"listIssues",0,(e,t)=>{let a={};return t?.agentId&&(a.agentId=t.agentId),t?.status&&(a.status=t.status),t?.terminal!==void 0&&(a.terminal=String(t.terminal)),n(`/api/issues${s(e,a)}`)},"listMeetings",0,(e,t)=>n(`/api/agents/${e}/meetings${s(t)}`),"listMembers",0,e=>n(`/api/workspaces/${e}/members${s(e)}`),"listMessages",0,(e,t,a)=>{let i={};return a?.limit&&(i.limit=String(a.limit)),a?.before&&(i.before=a.before),a?.beforeId&&(i.before_id=a.beforeId),n(`/api/conversations/${e}/messages${s(t,i)}`)},"listMessagesAroundTask",0,(e,t,a)=>n(`/api/conversations/${e}/messages${s(t,{around_task:a})}`),"listPreviousConversations",0,(e,t,a)=>{let i={exclude:a.exclude,before:a.before};return a.channel&&(i.channel=a.channel),a.limit&&(i.limit=String(a.limit)),n(`/api/agents/${e}/conversations${s(t,i)}`)},"listRuntimes",0,e=>n(`/api/runtimes${s(e)}`),"listTraces",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),t?.status&&(a.status=t.status),t?.multiAgent&&(a.multiAgent="true"),t?.agentId&&(a.agentId=t.agentId),t?.channel&&(a.channel=t.channel),n(`/api/traces${s(e,a)}`)},"listWhitelist",0,(e,t)=>n(`/api/agents/${e}/whitelist${s(t)}`),"listWorkspaceActiveTasks",0,e=>n(`/api/agents/active-tasks${s(e)}`),"listWorkspaces",0,()=>n("/api/workspaces"),"markAllInboxRead",0,e=>n(`/api/inbox/read-all${s(e)}`,{method:"POST"}),"markInboxRead",0,(e,t)=>n(`/api/inbox/read${s(t)}`,{method:"POST",body:JSON.stringify({conversationId:e})}),"pinAgent",0,(e,t)=>n(`/api/agents/${t}/pin${s(e)}`,{method:"POST"}),"removeMember",0,(e,t)=>n(`/api/workspaces/${e}/members/${t}${s(e)}`,{method:"DELETE"}),"removeWhitelistEmail",0,(e,t,a)=>n(`/api/agents/${e}/whitelist/${t}${s(a)}`,{method:"DELETE"}),"renameChannelApi",0,(e,t,a)=>n(`/api/channels/${e}${s(t)}`,{method:"PATCH",body:JSON.stringify({name:a})}),"reorderAgentPins",0,(e,t)=>n(`/api/agents/pins/reorder${s(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"reorderChannelsApi",0,(e,t)=>n(`/api/channels/reorder${s(e)}`,{method:"PUT",body:JSON.stringify({ordered_channel_ids:t})}),"reorderUnpinnedAgents",0,(e,t)=>n(`/api/agents/sidebar/reorder${s(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"requestWorkspaceBrowse",0,(e,t,a,i)=>n(`/api/agents/${e}/workspace/browse${s(t)}`,{method:"POST",body:JSON.stringify({request_type:a,path:i})}),"retryTask",0,(e,t)=>n(`/api/tasks/${e}/retry${s(t)}`,{method:"POST"}),"revokeAgentAccess",0,(e,t,a,i=!1)=>n(`/api/agents/${t}/access/${a}${s(e)}${i?"&remove_whitelist=true":""}`,{method:"DELETE"}),"revokeInvite",0,(e,t)=>n(`/api/workspaces/${e}/invites/${t}${s(e)}`,{method:"DELETE"}),"sendEmail",0,(e,t,a,i,r,o,d,l)=>n(`/api/email/send${s(r)}`,{method:"POST",body:JSON.stringify({agentId:e,to:t,subject:a,htmlBody:i,attachments:o,...d,customAccountId:l})}),"sendMessage",0,r,"stopMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings/${t}/stop${s(a)}`,{method:"POST"}),"syncEmailAccount",0,(e,t,a)=>n(`/api/agents/${e}/email-accounts/${t}/sync${s(a)}`,{method:"POST"}),"triggerRuntimeRescan",0,(e,t)=>n(`/api/runtimes/${e}/rescan${s(t)}`,{method:"POST"}),"triggerRuntimeUpdate",0,(e,t)=>n(`/api/runtimes/${e}/update${s(t)}`,{method:"POST"}),"unflagMessage",0,(e,t)=>n(`/api/flags/${t}${s(e)}`,{method:"DELETE"}),"unpinAgent",0,(e,t)=>n(`/api/agents/${t}/pin${s(e)}`,{method:"DELETE"}),"updateAgent",0,(e,t,a)=>n(`/api/agents/${e}${s(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateAgentLink",0,(e,t,a)=>n(`/api/agent-links/${e}${s(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateCalendarEvent",0,(e,t,a)=>n(`/api/calendar/${e}${s(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateEmailStatus",0,(e,t,a)=>n(`/api/email/${e}${s(t)}`,{method:"PATCH",body:JSON.stringify({status:a})}),"updateIssue",0,(e,t,a)=>n(`/api/issues/${t}${s(e)}`,{method:"PATCH",body:JSON.stringify(a)}),"updateMemberMe",0,(e,t)=>n(`/api/members/me${s(e)}`,{method:"PATCH",body:JSON.stringify({global_instruction:t})}),"updateWorkspace",0,(e,t)=>n(`/api/workspaces/${e}${s(e)}`,{method:"PATCH",body:JSON.stringify(t)}),"uploadEmailAttachment",0,d],222862)},728886,e=>{"use strict";var t=e.i(653772),a=e.i(613349);e.s(["Skeleton",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,a.cn)("animate-pulse rounded-md bg-muted",e),...i})}])},29437,e=>{"use strict";var t=e.i(653772),a=e.i(511043),i=e.i(126942),n=e.i(516266),s=e.i(222862),r=e.i(205189),o=e.i(186339),d=e.i(728886);e.s(["default",0,function(){let{token:e}=(0,i.useParams)(),l=(0,i.useRouter)(),[c,u]=(0,a.useState)("loading"),[p,g]=(0,a.useState)(null),[m,h]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(0,s.getInviteInfo)(e).then(e=>{g(e),u("ready")}).catch(e=>{h(e instanceof Error?e.message:"Invalid or expired invite link"),u("error")})},[e]);let f=async()=>{if(e){u("accepting");try{let t=await (0,s.acceptInvite)(e);(0,r.trackInviteAccepted)({workspace_id:t.workspace_id??""}),u("done"),n.toast.success(`Joined ${p?.workspace_name??"workspace"}`),l.replace(`/w/${t.workspace_slug}/home`)}catch(e){h(e instanceof Error?e.message:"Failed to join workspace"),u("error")}}};return(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center p-6",children:(0,t.jsxs)("div",{className:"w-full max-w-sm space-y-6 text-center",children:["loading"===c&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Skeleton,{className:"h-6 w-48 mx-auto"}),(0,t.jsx)(d.Skeleton,{className:"h-4 w-64 mx-auto"}),(0,t.jsx)(d.Skeleton,{className:"h-9 w-32 mx-auto"})]}),"ready"===c&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"You've been invited"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[p.invited_by," invited you to join"]})]}),(0,t.jsxs)("div",{className:"rounded-md border border-border/50 px-4 py-3 text-left space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:p.workspace_name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Workspace"})]}),(0,t.jsx)(o.Button,{className:"w-full",onClick:f,children:"Join Workspace"})]}),"accepting"===c&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Skeleton,{className:"h-6 w-48 mx-auto"}),(0,t.jsx)(d.Skeleton,{className:"h-4 w-64 mx-auto"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Joining workspace…"})]}),"error"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Invite unavailable"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m})]}),(0,t.jsx)(o.Button,{variant:"outline",onClick:()=>l.replace("/workspaces"),children:"Go to workspaces"})]})]})})}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,879486,384265,e=>{"use strict";e.i(811374);var t=e.i(511043),a=e.i(92615),i=e.i(298604),n=e.i(990966),s=e.i(372252),r=e.i(154680);let o=t.createContext(void 0);function d(e=!1){let a=t.useContext(o);if(void 0===a&&!e)throw Error((0,r.default)(16));return a}function l(e){return(0,a.isHTMLElement)(e)&&"BUTTON"===e.tagName}e.s(["CompositeRootContext",0,o,"useCompositeRootContext",0,d],384265),e.s(["useButton",0,function(e={}){let{disabled:a=!1,focusableWhenDisabled:r,tabIndex:o=0,native:c=!0,composite:u}=e,p=t.useRef(null),g=d(!0),m=u??void 0!==g,{props:h}=function(e){let{focusableWhenDisabled:a,disabled:i,composite:n=!1,tabIndex:s=0,isNativeButton:r}=e,o=n&&!1!==a,d=n&&!1===a;return{props:t.useMemo(()=>{let e={onKeyDown(e){i&&a&&"Tab"!==e.key&&e.preventDefault()}};return n||(e.tabIndex=s,!r&&i&&(e.tabIndex=a?s:-1)),(r&&(a||o)||!r&&i)&&(e["aria-disabled"]=i),r&&(!a||d)&&(e.disabled=i),e},[n,i,a,o,d,r,s])}}({focusableWhenDisabled:r,disabled:a,composite:m,tabIndex:o,isNativeButton:c}),f=t.useCallback(()=>{let e=p.current;l(e)&&m&&a&&void 0===h.disabled&&e.disabled&&(e.disabled=!1)},[a,h.disabled,m]);return(0,n.useIsoLayoutEffect)(f,[f]),{getButtonProps:t.useCallback((e={})=>{let{onClick:t,onMouseDown:i,onKeyUp:n,onKeyDown:r,onPointerDown:o,...d}=e;return(0,s.mergeProps)({onClick(e){a?e.preventDefault():t?.(e)},onMouseDown(e){a||i?.(e)},onKeyDown(e){var i;if(a||((0,s.makeEventPreventable)(e),r?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,o=e.currentTarget,d=l(o),u=!c&&(i=o,!!(i?.tagName==="A"&&i?.href)),p=n&&(c?d:!u),g="Enter"===e.key,h=" "===e.key,f=o.getAttribute("role"),$=f?.startsWith("menuitem")||"option"===f||"gridcell"===f;if(n&&m&&h){if(e.defaultPrevented&&$)return;e.preventDefault(),u||c&&d?(o.click(),e.preventBaseUIHandler()):p&&(t?.(e),e.preventBaseUIHandler());return}p&&(!c&&(h||g)&&e.preventDefault(),!c&&g&&t?.(e))},onKeyUp(e){a||(((0,s.makeEventPreventable)(e),n?.(e),e.target===e.currentTarget&&c&&m&&l(e.currentTarget)&&" "===e.key)?e.preventDefault():!e.baseUIHandlerPrevented&&(e.target!==e.currentTarget||c||m||" "!==e.key||t?.(e)))},onPointerDown(e){a?e.preventDefault():o?.(e)}},c?{type:"button"}:{role:"button"},h,d)},[a,h,m,c]),buttonRef:(0,i.useStableCallback)(e=>{p.current=e,f()})}}],879486)},294237,e=>{"use strict";var t=e.i(7284);let a=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,i=t.clsx;e.s(["cva",0,(e,t)=>n=>{var s;if((null==t?void 0:t.variants)==null)return i(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:r,defaultVariants:o}=t,d=Object.keys(r).map(e=>{let t=null==n?void 0:n[e],i=null==o?void 0:o[e];if(null===t)return null;let s=a(t)||a(i);return r[e][s]}),l=n&&Object.entries(n).reduce((e,t)=>{let[a,i]=t;return void 0===i||(e[a]=i),e},{});return i(e,d,null==t||null==(s=t.compoundVariants)?void 0:s.reduce((e,t)=>{let{class:a,className:i,...n}=t;return Object.entries(n).every(e=>{let[t,a]=e;return Array.isArray(a)?a.includes({...o,...l}[t]):({...o,...l})[t]===a})?[...e,a,i]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}])},186339,e=>{"use strict";var t=e.i(653772);e.i(811374);var a=e.i(511043),i=e.i(879486),n=e.i(695681);let s=a.forwardRef(function(e,t){let{render:a,className:s,disabled:r=!1,focusableWhenDisabled:o=!1,nativeButton:d=!0,style:l,...c}=e,{getButtonProps:u,buttonRef:p}=(0,i.useButton)({disabled:r,focusableWhenDisabled:o,native:d});return(0,n.useRenderElement)("button",e,{state:{disabled:r},ref:[t,p],props:[c,u]})});var r=e.i(294237),o=e.i(613349);let d=(0,r.cva)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});e.s(["Button",0,function({className:e,variant:a="default",size:i="default",...n}){return(0,t.jsx)(s,{"data-slot":"button",className:(0,o.cn)(d({variant:a,size:i,className:e})),...n})},"buttonVariants",0,d],186339)},126942,(e,t,a)=>{t.exports=e.r(871628)},222862,636557,e=>{"use strict";var t=e.i(811374);class a extends Error{status;details;constructor(e,t,a){super(e),this.name="ApiError",this.status=t,this.details=a}get isNetworkError(){return 0===this.status}get isRateLimit(){return 429===this.status}get isUnauthorized(){return 401===this.status}}function i(e,t){return"validation error"===e&&t?.length?function(e){let[t,...a]=e.split(":"),i=a.join(":").trim();if(!i)return e;let n=t.trim(),s=n.trim().replace(/[_-]+/g," ").replace(/\b\w/g,e=>e.toUpperCase()),r=i.replace(/^required$/i,"is required"),o=r.toLowerCase().replace(/[_-]+/g," "),d=n.toLowerCase().replace(/[_-]+/g," ");return d&&o.startsWith(`${d} `)&&(r=r.slice(n.length).trimStart()),s?`${s} ${r}`:r}(t[0]):e}async function n(e,t){let n;try{n=await fetch(""+e,{...t,credentials:"include",headers:{"Content-Type":"application/json",...t?.headers}})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===n.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!n.ok){let e,t;try{let a=await n.json();e=a.error,t=a.details}catch{}if(429===n.status)throw new a("Please wait a moment before trying again",429);if(n.status>=500)throw new a(i(e,t)||"Something went wrong — please try again",n.status,t);throw new a(i(e,t)||"Something went wrong",n.status,t)}if(204!==n.status)return n.json()}function s(e,t){let a=new URLSearchParams({workspace_id:e,...t});return`?${a.toString()}`}e.s(["ApiError",0,a],636557),parseInt(t.default.env.NEXT_PUBLIC_MOCK_NETWORK_DELAY_MS||"300",10);let r=async(e,t,i,r,o)=>{let d;if(!r||0===r.length)return n(`/api/conversations/${e}/messages${s(i)}`,{method:"POST",body:JSON.stringify({content:t,...o?{metadata:o}:{}})});let l=new FormData;for(let e of(l.append("content",t),o&&l.append("metadata",JSON.stringify(o)),r))l.append("file",e);try{d=await fetch(`/api/conversations/${e}/messages${s(i)}`,{method:"POST",credentials:"include",body:l})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===d.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!d.ok){let e,t;try{let a=await d.json();e=a.error,t=a.details}catch{}if(429===d.status)throw new a("Please wait a moment before trying again",429);if(d.status>=500)throw new a(e||"Something went wrong — please try again",d.status,t);throw new a(e||"Something went wrong",d.status,t)}return d.json()},o=async(e,t)=>{let a=new URLSearchParams({workspace_id:t}),i=await fetch(`/api/email/${e}/body?${a}`,{credentials:"include"});if(!i.ok)return{content:"(body not available)",isHtml:!1};let n=i.headers.get("Content-Type")??"";return{content:await i.text(),isHtml:n.includes("text/html")}},d=async(e,t)=>{let i=new FormData;i.append("file",e);let n=await fetch(`/api/email/upload${s(t)}`,{method:"POST",credentials:"include",body:i});if(!n.ok)throw new a(await n.text().catch(()=>"Upload failed"),n.status);return n.json()},l=async(e,t)=>{let i;if(!t.files||0===t.files.length)return n(`/api/issues${s(e)}`,{method:"POST",body:JSON.stringify({agent_id:t.agent_id,title:t.title,description:t.description})});let r=new FormData;for(let e of(t.agent_id&&r.append("agent_id",t.agent_id),r.append("title",t.title),r.append("description",t.description??""),t.files))r.append("file",e);try{i=await fetch(`/api/issues${s(e)}`,{method:"POST",credentials:"include",body:r})}catch(e){if(e instanceof TypeError)throw new a("Unable to connect — check your network",0);throw e}if(401===i.status)throw window.location.href="/sign-in",new a("Unauthorized",401);if(!i.ok){let e,t;try{let a=await i.json();e=a.error,t=a.details}catch{}if(429===i.status)throw new a("Please wait a moment before trying again",429);if(i.status>=500)throw new a(e||"Something went wrong — please try again",i.status,t);throw new a(e||"Something went wrong",i.status,t)}return i.json()},c=async(e,t)=>{let a=new URLSearchParams({workspace_id:t}),i=await fetch(`/api/artifacts/${e}/content?${a}`,{credentials:"include"});return i.ok?i.text():"(content not available)"};e.s(["acceptInvite",0,e=>n(`/api/invite/${e}`,{method:"POST"}),"addWhitelistEmail",0,(e,t,a)=>n(`/api/agents/${e}/whitelist${s(a)}`,{method:"POST",body:JSON.stringify({email:t})}),"approveMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings/${t}/approve${s(a)}`,{method:"POST"}),"cancelActiveTask",0,(e,t)=>n(`/api/conversations/${e}/active-task${s(t)}`,{method:"DELETE"}),"chatInit",0,(e,t,a)=>n(`/api/agents/${e}/chat-init${s(t)}`,{method:"POST",body:JSON.stringify({...a?{channel:a}:{}})}),"checkFreshness",0,(e,t)=>{let a={};return e.conversationId&&(a.conversation_id=e.conversationId),e.agentId&&(a.agent_id=e.agentId),e.channel&&(a.channel=e.channel),n(`/api/conversations/check-fresh${s(t,a)}`)},"conversationInit",0,(e,t,a)=>{let i={};return a?.newestMessageId&&(i.newest_message_id=a.newestMessageId),a?.messageCount&&(i.message_count=String(a.messageCount)),n(`/api/conversations/${e}/init${s(t,i)}`)},"createAgent",0,(e,t)=>n(`/api/agents${s(t)}`,{method:"POST",body:JSON.stringify(e)}),"createAgentLink",0,(e,t)=>n(`/api/agent-links${s(t)}`,{method:"POST",body:JSON.stringify(e)}),"createCalendarEvent",0,(e,t)=>n(`/api/calendar${s(t)}`,{method:"POST",body:JSON.stringify(e)}),"createChannelApi",0,(e,t)=>n(`/api/channels${s(e)}`,{method:"POST",body:JSON.stringify({name:t})}),"createConversation",0,(e,t,a)=>n(`/api/conversations${s(t)}`,{method:"POST",body:JSON.stringify({agent_id:e,...a?{channel:a}:{}})}),"createEmailAccount",0,(e,t,a)=>n(`/api/agents/${e}/email-accounts${s(a)}`,{method:"POST",body:JSON.stringify(t)}),"createInvite",0,e=>n(`/api/workspaces/${e}/invites${s(e)}`,{method:"POST"}),"createIssue",0,l,"createMachineToken",0,(e,t)=>n(`/api/machine-tokens${t?s(t):""}`,{method:"POST",body:JSON.stringify({name:e||"default"})}),"createMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings${s(t)}`,{method:"POST",body:JSON.stringify(a)}),"createThread",0,(e,t,a,i)=>n(`/api/conversations/${e}/threads${s(i)}`,{method:"POST",body:JSON.stringify({parent_message_id:t,content:a})}),"deleteAgent",0,(e,t)=>n(`/api/agents/${e}${s(t)}`,{method:"DELETE"}),"deleteAgentLink",0,(e,t)=>n(`/api/agent-links/${e}${s(t)}`,{method:"DELETE"}),"deleteCalendarEvent",0,(e,t,a)=>n(`/api/calendar/${e}${s(t)}`,{method:"DELETE",...a&&a.scope?{headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}:{}}),"deleteChannelApi",0,(e,t)=>n(`/api/channels/${e}${s(t)}`,{method:"DELETE"}),"deleteEmail",0,(e,t)=>n(`/api/email/${e}${s(t)}`,{method:"DELETE"}),"deleteEmailAccount",0,(e,t,a)=>n(`/api/agents/${e}/email-accounts/${t}${s(a)}`,{method:"DELETE"}),"deleteIssue",0,(e,t)=>n(`/api/issues/${t}${s(e)}`,{method:"DELETE"}),"deleteMachine",0,(e,t)=>n(`/api/runtimes/machine${s(t,{daemon_id:e})}`,{method:"DELETE"}),"deleteMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings/${t}${s(a)}`,{method:"DELETE"}),"deleteWorkspace",0,(e,t)=>n(`/api/workspaces/${e}${s(e)}`,{method:"DELETE",body:JSON.stringify({confirm_name:t})}),"fetchLatestCliVersion",0,()=>n("/api/cli/latest-version"),"fetchModelOptions",0,()=>n("/api/config/model-options"),"flagMessage",0,(e,t)=>n(`/api/flags${s(e)}`,{method:"POST",body:JSON.stringify({messageId:t})}),"getActiveTask",0,(e,t)=>n(`/api/conversations/${e}/active-task${s(t)}`),"getAgentSkills",0,(e,t)=>n(`/api/agents/${e}/skills${s(t)}`),"getArtifactContent",0,c,"getCalendarEvent",0,(e,t)=>n(`/api/calendar/${e}${s(t)}`),"getEmail",0,(e,t)=>n(`/api/email/${e}${s(t)}`),"getEmailBody",0,o,"getEmailThread",0,(e,t)=>n(`/api/email/${e}/thread${s(t)}`),"getFlaggedCount",0,e=>n(`/api/flags/count${s(e)}`),"getInboxCount",0,(e,t)=>{let a={};return t?.types?.length&&(a.types=t.types.join(",")),n(`/api/inbox/count${s(e,a)}`)},"getInviteInfo",0,e=>n(`/api/invite/${e}`),"getIssue",0,(e,t)=>n(`/api/issues/${t}${s(e)}`),"getMachineTokenStatus",0,()=>n("/api/machine-tokens/status"),"getMemberMe",0,e=>n(`/api/members/me${s(e)}`),"getMinCliVersion",0,()=>n("/api/config/min-version"),"getTask",0,(e,t)=>n(`/api/tasks/${e}${s(t)}`),"getTaskMessages",0,(e,t,a)=>n(`/api/tasks/${e}/messages${s(t,a?{since:String(a)}:void 0)}`),"getThreadSummaries",0,(e,t)=>n(`/api/conversations/${e}/threads${s(t)}`),"getTrace",0,(e,t)=>n(`/api/traces/${e}${s(t)}`),"getWorkspaceOverview",0,e=>n(`/api/workspaces/${e}/overview${s(e)}`),"grantAgentAccess",0,(e,t,a)=>n(`/api/agents/${t}/access${s(e)}`,{method:"POST",body:JSON.stringify({user_id:a})}),"listAgentAccess",0,(e,t)=>n(`/api/agents/${t}/access${s(e)}`),"listAgentActiveTaskCounts",0,e=>n(`/api/agents/active-task-counts${s(e)}`),"listAgentActivity",0,(e,t,a)=>{let i={};return a?.limit&&(i.limit=String(a.limit)),a?.before&&(i.before=a.before),a?.beforeId&&(i.before_id=a.beforeId),a?.status&&(i.status=a.status),a?.type&&(i.type=a.type),n(`/api/agents/${e}/activity${s(t,i)}`)},"listAgentLinks",0,e=>n(`/api/agent-links${s(e)}`),"listAgentPins",0,e=>n(`/api/agents/pins${s(e)}`),"listAgents",0,e=>n(`/api/agents${s(e)}`),"listArtifacts",0,(e,t)=>n(`/api/artifacts${s(t,{conversation_id:e})}`),"listCalendarEvents",0,(e,t)=>{let a={};return t?.agentId&&(a.agentId=t.agentId),t?.from&&(a.from=t.from),t?.to&&(a.to=t.to),n(`/api/calendar${s(e,a)}`)},"listChannels",0,e=>n(`/api/channels${s(e)}`),"listEmailAccounts",0,(e,t)=>n(`/api/agents/${e}/email-accounts${s(t)}`),"listEmails",0,(e,t,a,i)=>n(`/api/email${s(t,{agentId:e,...a?{folder:a}:{},...i?{address:i}:{}})}`),"listFlaggedItems",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),n(`/api/flags${s(e,a)}`)},"listFlaggedMessageIds",0,(e,t)=>n(`/api/flags${s(e,{conversation_id:t,ids_only:"true"})}`),"listInboxItems",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),t?.types?.length&&(a.types=t.types.join(",")),n(`/api/inbox${s(e,a)}`)},"listInvites",0,e=>n(`/api/workspaces/${e}/invites${s(e)}`),"listIssues",0,(e,t)=>{let a={};return t?.agentId&&(a.agentId=t.agentId),t?.status&&(a.status=t.status),t?.terminal!==void 0&&(a.terminal=String(t.terminal)),n(`/api/issues${s(e,a)}`)},"listMeetings",0,(e,t)=>n(`/api/agents/${e}/meetings${s(t)}`),"listMembers",0,e=>n(`/api/workspaces/${e}/members${s(e)}`),"listMessages",0,(e,t,a)=>{let i={};return a?.limit&&(i.limit=String(a.limit)),a?.before&&(i.before=a.before),a?.beforeId&&(i.before_id=a.beforeId),n(`/api/conversations/${e}/messages${s(t,i)}`)},"listMessagesAroundTask",0,(e,t,a)=>n(`/api/conversations/${e}/messages${s(t,{around_task:a})}`),"listPreviousConversations",0,(e,t,a)=>{let i={exclude:a.exclude,before:a.before};return a.channel&&(i.channel=a.channel),a.limit&&(i.limit=String(a.limit)),n(`/api/agents/${e}/conversations${s(t,i)}`)},"listRuntimes",0,e=>n(`/api/runtimes${s(e)}`),"listTraces",0,(e,t)=>{let a={};return t?.limit&&(a.limit=String(t.limit)),t?.before&&(a.before=t.before),t?.status&&(a.status=t.status),t?.multiAgent&&(a.multiAgent="true"),t?.agentId&&(a.agentId=t.agentId),t?.channel&&(a.channel=t.channel),n(`/api/traces${s(e,a)}`)},"listWhitelist",0,(e,t)=>n(`/api/agents/${e}/whitelist${s(t)}`),"listWorkspaceActiveTasks",0,e=>n(`/api/agents/active-tasks${s(e)}`),"listWorkspaces",0,()=>n("/api/workspaces"),"markAllInboxRead",0,e=>n(`/api/inbox/read-all${s(e)}`,{method:"POST"}),"markInboxRead",0,(e,t)=>n(`/api/inbox/read${s(t)}`,{method:"POST",body:JSON.stringify({conversationId:e})}),"pinAgent",0,(e,t)=>n(`/api/agents/${t}/pin${s(e)}`,{method:"POST"}),"removeMember",0,(e,t)=>n(`/api/workspaces/${e}/members/${t}${s(e)}`,{method:"DELETE"}),"removeWhitelistEmail",0,(e,t,a)=>n(`/api/agents/${e}/whitelist/${t}${s(a)}`,{method:"DELETE"}),"renameChannelApi",0,(e,t,a)=>n(`/api/channels/${e}${s(t)}`,{method:"PATCH",body:JSON.stringify({name:a})}),"reorderAgentPins",0,(e,t)=>n(`/api/agents/pins/reorder${s(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"reorderChannelsApi",0,(e,t)=>n(`/api/channels/reorder${s(e)}`,{method:"PUT",body:JSON.stringify({ordered_channel_ids:t})}),"reorderUnpinnedAgents",0,(e,t)=>n(`/api/agents/sidebar/reorder${s(e)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:t})}),"requestWorkspaceBrowse",0,(e,t,a,i)=>n(`/api/agents/${e}/workspace/browse${s(t)}`,{method:"POST",body:JSON.stringify({request_type:a,path:i})}),"retryTask",0,(e,t)=>n(`/api/tasks/${e}/retry${s(t)}`,{method:"POST"}),"revokeAgentAccess",0,(e,t,a,i=!1)=>n(`/api/agents/${t}/access/${a}${s(e)}${i?"&remove_whitelist=true":""}`,{method:"DELETE"}),"revokeInvite",0,(e,t)=>n(`/api/workspaces/${e}/invites/${t}${s(e)}`,{method:"DELETE"}),"sendEmail",0,(e,t,a,i,r,o,d,l)=>n(`/api/email/send${s(r)}`,{method:"POST",body:JSON.stringify({agentId:e,to:t,subject:a,htmlBody:i,attachments:o,...d,customAccountId:l})}),"sendMessage",0,r,"stopMeeting",0,(e,t,a)=>n(`/api/agents/${e}/meetings/${t}/stop${s(a)}`,{method:"POST"}),"syncEmailAccount",0,(e,t,a)=>n(`/api/agents/${e}/email-accounts/${t}/sync${s(a)}`,{method:"POST"}),"triggerRuntimeRescan",0,(e,t)=>n(`/api/runtimes/${e}/rescan${s(t)}`,{method:"POST"}),"triggerRuntimeUpdate",0,(e,t)=>n(`/api/runtimes/${e}/update${s(t)}`,{method:"POST"}),"unflagMessage",0,(e,t)=>n(`/api/flags/${t}${s(e)}`,{method:"DELETE"}),"unpinAgent",0,(e,t)=>n(`/api/agents/${t}/pin${s(e)}`,{method:"DELETE"}),"updateAgent",0,(e,t,a)=>n(`/api/agents/${e}${s(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateAgentLink",0,(e,t,a)=>n(`/api/agent-links/${e}${s(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateCalendarEvent",0,(e,t,a)=>n(`/api/calendar/${e}${s(a)}`,{method:"PATCH",body:JSON.stringify(t)}),"updateEmailStatus",0,(e,t,a)=>n(`/api/email/${e}${s(t)}`,{method:"PATCH",body:JSON.stringify({status:a})}),"updateIssue",0,(e,t,a)=>n(`/api/issues/${t}${s(e)}`,{method:"PATCH",body:JSON.stringify(a)}),"updateMemberMe",0,(e,t)=>n(`/api/members/me${s(e)}`,{method:"PATCH",body:JSON.stringify({global_instruction:t})}),"updateWorkspace",0,(e,t)=>n(`/api/workspaces/${e}${s(e)}`,{method:"PATCH",body:JSON.stringify(t)}),"uploadEmailAttachment",0,d],222862)},728886,e=>{"use strict";var t=e.i(653772),a=e.i(613349);e.s(["Skeleton",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,a.cn)("animate-pulse rounded-md bg-muted",e),...i})}])},29437,e=>{"use strict";var t=e.i(653772),a=e.i(511043),i=e.i(126942),n=e.i(516266),s=e.i(222862),r=e.i(205189),o=e.i(186339),d=e.i(728886);e.s(["default",0,function(){let{token:e}=(0,i.useParams)(),l=(0,i.useRouter)(),[c,u]=(0,a.useState)("loading"),[p,g]=(0,a.useState)(null),[m,h]=(0,a.useState)("");(0,a.useEffect)(()=>{e&&(0,s.getInviteInfo)(e).then(e=>{g(e),u("ready")}).catch(e=>{h(e instanceof Error?e.message:"Invalid or expired invite link"),u("error")})},[e]);let f=async()=>{if(e){u("accepting");try{let t=await (0,s.acceptInvite)(e);(0,r.trackInviteAccepted)({workspace_id:t.workspace_id??""}),u("done"),n.toast.success(`Joined ${p?.workspace_name??"workspace"}`),l.replace(`/w/${t.workspace_slug}/home`)}catch(e){h(e instanceof Error?e.message:"Failed to join workspace"),u("error")}}};return(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center p-6",children:(0,t.jsxs)("div",{className:"w-full max-w-sm space-y-6 text-center",children:["loading"===c&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Skeleton,{className:"h-6 w-48 mx-auto"}),(0,t.jsx)(d.Skeleton,{className:"h-4 w-64 mx-auto"}),(0,t.jsx)(d.Skeleton,{className:"h-9 w-32 mx-auto"})]}),"ready"===c&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"You've been invited"}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[p.invited_by," invited you to join"]})]}),(0,t.jsxs)("div",{className:"rounded-md border border-border/50 px-4 py-3 text-left space-y-0.5",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:p.workspace_name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Workspace"})]}),(0,t.jsx)(o.Button,{className:"w-full",onClick:f,children:"Join Workspace"})]}),"accepting"===c&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(d.Skeleton,{className:"h-6 w-48 mx-auto"}),(0,t.jsx)(d.Skeleton,{className:"h-4 w-64 mx-auto"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Joining workspace…"})]}),"error"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Invite unavailable"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:m})]}),(0,t.jsx)(o.Button,{variant:"outline",onClick:()=>l.replace("/workspaces"),children:"Go to workspaces"})]})]})})}])}]);
|