@alook/app 0.0.139 → 0.0.141
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 +50 -33
- 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/0eayyb8dzeuqj.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/0hujq4gn1km2d.css +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{3a4lcn1k6my37.js → 0u1g621cl6cpa.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{0gadq1gaq7l2d.js → 0v8_t40u7sj2s.js} +3 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/{0pqa0bk3fnq2q.js → 15gpqusfs36cs.js} +2 -2
- package/bundled/web/.open-next/assets/_next/static/chunks/{0rmmmmqzr5q8u.js → 1vdalq9vvychb.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/1wk6udc50axdg.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{1l3nq6kc3fbh-.js → 2aicu2qufs82c.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/2c9n34tpjgbko.js +1 -0
- package/bundled/web/.open-next/assets/_next/static/chunks/{2h7oy-ljwoem9.js → 2jgr6hdohnj5b.js} +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/{2qc57pol1-1f3.js → 348z6y6iea4gl.js} +3 -3
- package/bundled/web/.open-next/assets/_next/static/chunks/447gx8byleobi.js +1 -0
- package/bundled/web/.open-next/cache/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/_global-error.cache +1 -1
- package/bundled/web/.open-next/cache/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/_not-found.cache +1 -1
- package/bundled/web/.open-next/cache/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/device.cache +1 -1
- package/bundled/web/.open-next/cache/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/privacy.cache +1 -1
- package/bundled/web/.open-next/cache/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/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 +5 -5
- 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/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/required-server-files.json +1 -1
- 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]/traces/[traceId]/page_client-reference-manifest.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(app)/w/[slug]/traces/page_client-reference-manifest.js +1 -1
- 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/daemon/tasks/[taskId]/complete/route.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/fail/route.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/start/route.js +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/supersede/route.js +2 -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/chunks/[root-of-the-server]__0aacn1t._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0aj228b._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0dvn7u2._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0pn6awg._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__12fz1lr._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{[root-of-the-server]__11-5cy7._.js → [root-of-the-server]__134-7z_._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__155l597._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1diut0w._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1e9t6i6._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{[root-of-the-server]__1lcw_r4._.js → [root-of-the-server]__1jq8zws._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{[root-of-the-server]__0dnslqa._.js → [root-of-the-server]__1w9__7q._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1xpwaca._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{[root-of-the-server]__0j4ezcj._.js → [root-of-the-server]__20s9whj._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +16 -16
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0d2x7fl._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0guhu0i._.js +1 -1
- 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/_0v95a0y._.js +11 -10
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_139j3zh._.js +11 -10
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_13jq647._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1a2lyoh._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1aztsqf._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1i4egv6._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1kt_xdj._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1nfaney._.js +11 -10
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__13aweo1._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{[root-of-the-server]__1e237f4._.js → [root-of-the-server]__1x1ppqv._.js} +2 -2
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +16 -16
- 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/{_19hsbaa._.js → _09dj89g._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_09v4-yk._.js +6 -5
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0qgcnj5._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0g_x3qh._.js → _16456wu._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_10-8eci._.js → _1twnk18._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0os8mdu._.js → node_modules__pnpm_00joh18._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_03t1_eh._.js → node_modules__pnpm_06u5s5x._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0pd1a42._.js → node_modules__pnpm_0_eee0q._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0b_f_5l._.js → node_modules__pnpm_0_muan4._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0-sy0jc._.js → node_modules__pnpm_0t9vloz._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1tajvfi._.js → node_modules__pnpm_121t594._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0lmr_qu._.js → node_modules__pnpm_12zyy1_._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0z21f3h._.js → node_modules__pnpm_1m55ws1._.js} +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_0pwl5s4._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_1kzi5ju._.js +1 -1
- package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(app)_w_[slug]_runtimes_page_tsx_11-1juy._.js +1 -1
- 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/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 +180 -176
- package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +264 -264
- package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +4 -4
- package/bundled/web/migrations/0043_machine_owner_id.sql +26 -0
- package/bundled/web/wrangler.toml +1 -1
- package/bundled/ws-do/index.js +50 -33
- package/dist/cli/index.js +13 -11
- package/dist/cli/session-runner.js +2 -1
- package/dist/index.js +39 -12
- package/package.json +1 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/0pydx20mmtmb-.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/11jejnuxkw5-s.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/29j2dlmefldk5.js +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/2usqt49xbpqd2.css +0 -1
- package/bundled/web/.open-next/assets/_next/static/chunks/3pmxar-ugtky1.js +0 -1
- /package/bundled/web/.open-next/assets/_next/static/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/_buildManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/_clientMiddlewareManifest.js +0 -0
- /package/bundled/web/.open-next/assets/_next/static/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/_ssgManifest.js +0 -0
- /package/bundled/web/.open-next/cache/{0z9UpPLBZKa_jgTjfoBR5 → n67RZ-dHYbiPuCBj-CPEs}/robots.txt.cache +0 -0
|
@@ -59,6 +59,6 @@ module.exports=[762276,a=>{"use strict";var b=a.i(854445);a.i(735132);var c=a.i(
|
|
|
59
59
|
- Every interaction builds trust. Be empathetic, accurate, and efficient — resolve on first response when possible.
|
|
60
60
|
- Lead with acknowledgment, then solution or clear next steps. Use simple language.
|
|
61
61
|
- If you can't resolve immediately, set realistic expectations: what you'll do, by when.
|
|
62
|
-
- Track open issues proactively. Escalate complex or sensitive cases with full context.`;a.s(["SCENARIO_PRESETS",0,[{id:"software-dev",label:"Software Development",description:"Build and ship code with a coordinated dev team",icon:"🖥",members:[{role:"leader",description:"Coordinates work, summarizes results, and replies to you",instructions:d},{role:"engineer",description:"Writes code, runs tests, and verifies implementations",instructions:i,relationship:"Delegate coding tasks with: clear requirement description, acceptance criteria (3-5 specific testable items), relevant file paths, existing patterns to follow, and context from research findings if applicable.\n\nReport back with: implementation status, files changed, acceptance criteria checklist (pass/fail each), test results, and self-review concerns. After implementation, send work to the reviewer if one exists."},{role:"researcher",description:"Reads code, explores APIs, and gathers technical context",instructions:f,relationship:"Delegate technical research with: what to investigate, what decision it informs, scope boundary, and relevant file paths or code pointers.\n\nReport back with: technical summary, evidence (file paths, doc URLs, code snippets), recommendation, and confidence level (High/Medium/Low). Flag anything unverified."}]},{id:"content-research",label:"Content & Research",description:"Research topics, write content, and manage publishing",icon:"📝",members:[{role:"leader",description:"Coordinates work, shapes content direction, and delivers output",instructions:d},{role:"researcher",description:"Finds sources, verifies facts, and organizes references",instructions:g,relationship:"Delegate content research with: topic or claim to investigate, target content format (article, report, social), depth needed, and specific sources to check if any.\n\nReport back with: key facts for the writer, organized source list (URL, date, reliability), verification gaps, framing suggestion, and per-claim confidence."},{role:"assistant",description:"Handles formatting, publishing workflows, and follow-ups",instructions:j,relationship:"Delegate content operations with: what content to format or publish, target platform, deadline, and style requirements.\n\nReport back with: what was done (formatted, published, submitted), next step (awaiting review, scheduled date), and blockers if any."}]},{id:"personal-assistant",label:"Personal Assistant",description:"One AI that handles your everyday tasks and communications",icon:"🤖",members:[{role:"leader",description:"Handles all tasks directly — emails, research, scheduling, and more",instructions:e}]},{id:"sales-outreach",label:"Sales & Outreach",description:"Prospect, follow up, and close deals as a team",icon:"📈",members:[{role:"leader",description:"Coordinates outreach strategy and manages deal flow",instructions:d},{role:"researcher",description:"Researches prospects, companies, and market intelligence",instructions:h,relationship:"Delegate prospect research with: target criteria, market or industry focus, what intelligence is needed, and how it will be used (outreach, pitch, proposal).\n\nReport back with: prioritized prospect list (name, role, company, relevance, suggested angle), market signals, and confidence per finding."},{role:"assistant",description:"Handles outreach emails, follow-ups, and pipeline tracking",instructions:k,relationship:"Delegate outreach with: who to contact, messaging angle, follow-up cadence, and desired outcome.\n\nReport back with: emails sent or scheduled, responses received, pipeline updates, and deals needing escalation."}]},{id:"customer-support",label:"Customer Support",description:"Handle tickets, draft replies, and track resolutions",icon:"🎧",members:[{role:"leader",description:"Coordinates support queue and handles escalations",instructions:d},{role:"assistant",description:"Drafts customer responses and tracks open issues",instructions:l,relationship:"Delegate support tasks with: customer issue summary, urgency level, prior interaction context, and resolution approach.\n\nReport back with: response drafted or sent, resolution status, follow-up schedule, and recurring patterns to flag."}]},{id:"custom",label:"Custom",description:"Build your own team from scratch",icon:"✨",members:[{role:"leader",description:"Coordinates work and replies to you",instructions:d}]}],"shuffleMembers",0,function(a){let d=new Set,e=[];for(let f=0;f<a;f++){let a,f=0;do a=(0,b.uniqueNamesGenerator)({dictionaries:[b.names],length:1,style:"capital"}),f++;while(d.has(a)&&f<100)d.add(a),e.push({name:a,avatarUrl:(0,c.serializeAvatarConfig)((0,c.randomConfig)())})}return e}])},212484,a=>{"use strict";var b=a.i(616612),c=a.i(75118),d=a.i(762276);a.s(["ScenarioPicker",0,function({selected:a,onSelect:e,onBrowseTemplates:f}){return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"What will your company focus on?"}),f&&(0,b.jsxs)("button",{type:"button",onClick:f,className:"text-[11px] text-muted-foreground hover:text-foreground transition-colors underline underline-offset-2",children:["Browse templates ",(0,b.jsx)("span",{"aria-hidden":"true",children:"›"})]})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:d.SCENARIO_PRESETS.map(d=>(0,b.jsxs)("button",{onClick:()=>e(d.id),className:(0,c.cn)("flex flex-col items-start gap-1 rounded-lg border p-4 text-left transition-all hover:border-foreground/30",a===d.id?"border-foreground/50 bg-muted/50":"border-border"),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,b.jsx)("span",{className:"text-lg",children:d.icon}),(0,b.jsxs)("span",{className:"text-[10px] text-muted-foreground/70",children:[d.members.length," agent",d.members.length>1?"s":""]})]}),(0,b.jsx)("span",{className:"text-sm font-medium",children:d.label}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-tight",children:d.description})]},d.id))})]})}])},263233,a=>{"use strict";var b=a.i(616612),c=a.i(75118),d=a.i(732254),e=a.i(439882),f=a.i(674899);a.i(735132);var g=a.i(325848),h=a.i(354498),i=a.i(74414);a.i(974936);var j=a.i(911509);let k={leader:"Lead",researcher:"Researcher",engineer:"Engineer",assistant:"Assistant"};a.s(["TeamPreview",0,function({members:a,runtimes:l,onShuffle:m,onAssignRuntime:n}){let o=l.length>1&&n;return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Your company"}),(0,b.jsxs)(d.Button,{variant:"ghost",size:"sm",onClick:m,className:"h-7 text-xs gap-1.5",children:[(0,b.jsx)(f.RefreshCw,{className:"size-3"}),"Shuffle"]})]}),(0,b.jsx)("div",{className:(0,c.cn)("grid gap-3 grid-cols-1",2===a.length&&"sm:grid-cols-2",3===a.length&&"sm:grid-cols-2 md:grid-cols-3",a.length>=4&&"sm:grid-cols-2 md:grid-cols-4"),children:a.map((a,c)=>{let d,f=a.avatarUrl?(0,g.parseAvatarUrl)(a.avatarUrl):null;return(0,b.jsxs)(e.Card,{size:"sm",className:"flex flex-col px-3 py-4 gap-2 h-full",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[f?(0,b.jsx)(g.AvatarRenderer,{config:f,size:36,className:"rounded-xl shrink-0"}):(0,b.jsx)("div",{className:"size-9 rounded-xl bg-muted flex items-center justify-center text-sm font-semibold shrink-0",children:a.name.charAt(0)}),(0,b.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground bg-muted/60 px-1.5 py-0.5 rounded",children:k[a.role]})]})]}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground/70 font-mono truncate",children:(0,j.toAlookAddress)(a.emailHandle||a.name.toLowerCase())}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground leading-snug flex-1",children:a.description}),o&&(d=l.find(b=>b.id===a.runtimeId),(0,b.jsx)("div",{className:"mt-1",children:(0,b.jsxs)(h.Select,{value:a.runtimeId,onValueChange:a=>{a&&n(c,a)},children:[(0,b.jsx)(h.SelectTrigger,{className:"h-7 text-[11px]",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5 truncate",children:[d&&(0,b.jsx)(i.ProviderLogo,{provider:d.provider||"",className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:d?.provider||d?.runtime_mode||"Select"})]})}),(0,b.jsx)(h.SelectContent,{children:l.map(a=>(0,b.jsx)(h.SelectItem,{value:a.id,children:a.provider||a.runtime_mode},a.id))})]})}))]},c)})})]})}])},927981,a=>a.a(async(b,c)=>{try{var d=a.i(616612),e=a.i(734803),f=a.i(630991),g=a.i(732254),h=a.i(84096),i=a.i(402656),j=a.i(69379),k=a.i(598169),l=a.i(689560),m=a.i(780956),n=a.i(454607),o=a.i(562706),p=a.i(946621),q=a.i(892691),r=a.i(212484),s=a.i(263233),t=a.i(762276);a.i(974936);var u=a.i(372822),v=a.i(588339),w=a.i(881503),x=a.i(561101),y=b([n]);[n]=y.then?(await y)():y,a.s(["StudioOnboardingClient",0,function({workspaceId:a,workspaceSlug:b,initialTemplate:c}){let y=(0,f.useRouter)(),[z,A]=(0,e.useState)([]),[B,C]=(0,e.useState)(!0),[D,E]=(0,e.useState)(c?c.baseScenario:null),[F,G]=(0,e.useState)([]),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(!1),R=(0,u.isTauri)()&&(0,u.isDesktop)(),S=z.filter(a=>"online"===a.status),T=S.length>0;(0,e.useEffect)(()=>{(0,v.listRuntimes)(a).then(a=>{A(a),a.some(a=>"online"===a.status)&&(O(!0),Q(!0))}).catch(()=>{}).finally(()=>C(!1))},[a]);let U=(0,e.useCallback)(b=>{"runtime.registered"===b.type&&b.workspaceId===a?(O(!0),Q(!0),(0,v.listRuntimes)(a).then(A).catch(()=>{})):"runtime.status"===b.type&&b.workspaceId===a&&(O(!0),"online"===b.status?Q(!0):Q(!1))},[a]);(0,w.useUserWs)(U);let V=(0,e.useCallback)(async()=>{M(!0);try{let b=await (0,v.createMachineToken)("cli",a);if(K(b.token),R){let c=await (0,u.tauriInvoke)("register_cli",{token:b.token});c.success?(O(!0),Q(!0),(0,v.listRuntimes)(a).then(A).catch(()=>{})):m.toast.error(c.message||"Auto-registration failed")}}catch{m.toast.error("Failed to generate token")}finally{M(!1)}},[a,R]);(0,e.useEffect)(()=>{let a=S[0]?.id;a&&G(b=>0!==b.length&&b.some(a=>!a.runtimeId)?b.map(b=>b.runtimeId?b:{...b,runtimeId:a}):b)},[S]);let W=(0,e.useCallback)(async a=>{try{let b=await fetch("/api/studios/check-handles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:a})});if(!b.ok)return null;return await b.json()}catch{return null}},[]);(0,e.useEffect)(()=>{if(!c||B||F.length>0)return;let a=(0,t.shuffleMembers)(c.members.length),b=S[0]?.id||"",d=c.members.map((c,d)=>({name:a[d].name,role:c.role,description:c.description,instructions:c.instructions,avatarUrl:a[d].avatarUrl,runtimeId:b,relationship:c.relationship}));G(d),W(d.map(a=>a.name)).then(a=>{a&&G(b=>b.map(b=>{let c=a.find(a=>a.name===b.name);return c?{...b,emailHandle:c.handle}:b}))})},[c,B]);let X=async a=>{E(a);let b=t.SCENARIO_PRESETS.find(b=>b.id===a),c=(0,t.shuffleMembers)(b.members.length),d=S[0]?.id||"",e=b.members.map((a,b)=>({name:c[b].name,role:a.role,description:a.description,instructions:a.instructions,avatarUrl:c[b].avatarUrl,runtimeId:d,relationship:a.relationship}));G(e);let f=await W(e.map(a=>a.name));f&&G(a=>a.map(a=>{let b=f.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},Y=async()=>{let a=(0,t.shuffleMembers)(F.length),b=F.map((b,c)=>({...b,name:a[c].name,avatarUrl:a[c].avatarUrl,emailHandle:void 0}));G(b);let c=await W(b.map(a=>a.name));c&&G(a=>a.map(a=>{let b=c.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},Z=async()=>{I(!0);try{let b=await fetch("/api/studios",{method:"POST",headers:{"Content-Type":"application/json","X-Workspace-ID":a},body:JSON.stringify({name:void 0,scenario:D,members:F.map(a=>({name:a.name,role:a.role,runtime_id:a.runtimeId,description:a.description,instructions:a.instructions,avatar_url:a.avatarUrl||null,email_handle:a.emailHandle||void 0,relationship:a.relationship||void 0}))})});if(!b.ok){let a=await b.json();throw Error(a.error||"Failed to create company")}let c=await b.json();await fetch(`/api/workspaces/${a}/onboarded`,{method:"POST"}).catch(()=>{}),(0,p.trackWorkspaceCreated)("onboarding"),(0,p.trackOnboardingCompleted)({template_used:D??void 0,agent_count:F.length});for(let a=0;a<F.length;a++)(0,p.trackAgentCreated)({is_first_agent:0===a,has_email:!!F[a].emailHandle});m.toast.success("Company created!"),y.push(`/w/${c.workspace.slug}/agents/${c.leader_agent_id}`)}catch(a){m.toast.error(a instanceof Error?a.message:"Failed to create company"),I(!1)}},$=D&&F.length>0&&F.every(a=>a.runtimeId)&&(T||N&&P||R);return D?(0,d.jsx)(q.PublicLayout,{leftSlot:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>y.push("/workspaces"),children:[(0,d.jsx)(l.LayoutGrid,{className:"size-3 mr-1.5"}),"Workspaces"]}),(0,d.jsx)("span",{className:"text-muted-foreground/40",children:"/"}),(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>E(null),children:[(0,d.jsx)(k.ArrowLeft,{className:"size-3 mr-1.5"}),"Back"]})]}),rightSlot:(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:async()=>{await (0,o.clearAllCache)(),(0,n.signOut)({fetchOptions:{onSuccess:()=>y.push("/sign-in")}})},children:[(0,d.jsx)(j.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),children:(0,d.jsxs)("div",{className:"mx-auto w-full max-w-3xl space-y-10 px-6 py-14",children:[(0,d.jsx)("div",{className:"text-center",children:(0,d.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",style:{fontFamily:"var(--font-news)"},children:"Build your company"})}),B?(0,d.jsx)("div",{className:"flex justify-center py-8",children:(0,d.jsx)(h.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.TeamPreview,{members:F,runtimes:S,onShuffle:Y,onAssignRuntime:(a,b)=>{G(c=>c.map((c,d)=>d===a?{...c,runtimeId:b}:c))}}),!R&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Connect a computer"}),T||N&&P?(0,d.jsxs)("p",{className:"text-xs text-emerald-600 flex items-center gap-1",children:[(0,d.jsx)(i.CheckCircle2,{className:"size-3"})," Computer connected"]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your company needs a connected computer to run tasks."}),(0,d.jsx)("div",{className:"rounded-xl bg-muted/40 p-5",children:(0,d.jsx)(x.ConnectMachineSteps,{generatedToken:J,generatingToken:L,onGenerateToken:V,registered:N,daemonOnline:P})})]})]}),(0,d.jsx)(g.Button,{onClick:Z,disabled:!$||H,className:"w-full",size:"lg",children:H?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Loader2,{className:"size-4 animate-spin mr-2"}),"Launching..."]}):"Launch company"})]})]})}):(0,d.jsx)(q.PublicLayout,{leftSlot:(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>y.push("/workspaces"),children:[(0,d.jsx)(l.LayoutGrid,{className:"size-3 mr-1.5"}),"Workspaces"]}),rightSlot:(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:async()=>{await (0,o.clearAllCache)(),(0,n.signOut)({fetchOptions:{onSuccess:()=>y.push("/sign-in")}})},children:[(0,d.jsx)(j.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),mainClassName:"flex items-center justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-3xl space-y-8 px-6 py-6",children:[(0,d.jsxs)("div",{className:"text-center space-y-2",children:[(0,d.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",style:{fontFamily:"var(--font-news)"},children:"What will your company do?"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:"Pick a focus area. You can always add more agents later."})]}),(0,d.jsx)(r.ScenarioPicker,{selected:D,onSelect:X,onBrowseTemplates:()=>y.push(`/templates?workspace_id=${a}`)}),(0,d.jsx)("div",{className:"flex justify-center pt-2",children:(0,d.jsx)("button",{type:"button",onClick:async()=>{await fetch(`/api/workspaces/${a}/onboarded`,{method:"POST"}).catch(()=>{}),y.push(`/w/${b}/home`)},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Skip for now"})})]})})}]),c()}catch(a){c(a)}},!1)];
|
|
62
|
+
- Track open issues proactively. Escalate complex or sensitive cases with full context.`;a.s(["SCENARIO_PRESETS",0,[{id:"software-dev",label:"Software Development",description:"Build and ship code with a coordinated dev team",icon:"🖥",members:[{role:"leader",description:"Coordinates work, summarizes results, and replies to you",instructions:d},{role:"engineer",description:"Writes code, runs tests, and verifies implementations",instructions:i,relationship:"Delegate coding tasks with: clear requirement description, acceptance criteria (3-5 specific testable items), relevant file paths, existing patterns to follow, and context from research findings if applicable.\n\nReport back with: implementation status, files changed, acceptance criteria checklist (pass/fail each), test results, and self-review concerns. After implementation, send work to the reviewer if one exists."},{role:"researcher",description:"Reads code, explores APIs, and gathers technical context",instructions:f,relationship:"Delegate technical research with: what to investigate, what decision it informs, scope boundary, and relevant file paths or code pointers.\n\nReport back with: technical summary, evidence (file paths, doc URLs, code snippets), recommendation, and confidence level (High/Medium/Low). Flag anything unverified."}]},{id:"content-research",label:"Content & Research",description:"Research topics, write content, and manage publishing",icon:"📝",members:[{role:"leader",description:"Coordinates work, shapes content direction, and delivers output",instructions:d},{role:"researcher",description:"Finds sources, verifies facts, and organizes references",instructions:g,relationship:"Delegate content research with: topic or claim to investigate, target content format (article, report, social), depth needed, and specific sources to check if any.\n\nReport back with: key facts for the writer, organized source list (URL, date, reliability), verification gaps, framing suggestion, and per-claim confidence."},{role:"assistant",description:"Handles formatting, publishing workflows, and follow-ups",instructions:j,relationship:"Delegate content operations with: what content to format or publish, target platform, deadline, and style requirements.\n\nReport back with: what was done (formatted, published, submitted), next step (awaiting review, scheduled date), and blockers if any."}]},{id:"personal-assistant",label:"Personal Assistant",description:"One AI that handles your everyday tasks and communications",icon:"🤖",members:[{role:"leader",description:"Handles all tasks directly — emails, research, scheduling, and more",instructions:e}]},{id:"sales-outreach",label:"Sales & Outreach",description:"Prospect, follow up, and close deals as a team",icon:"📈",members:[{role:"leader",description:"Coordinates outreach strategy and manages deal flow",instructions:d},{role:"researcher",description:"Researches prospects, companies, and market intelligence",instructions:h,relationship:"Delegate prospect research with: target criteria, market or industry focus, what intelligence is needed, and how it will be used (outreach, pitch, proposal).\n\nReport back with: prioritized prospect list (name, role, company, relevance, suggested angle), market signals, and confidence per finding."},{role:"assistant",description:"Handles outreach emails, follow-ups, and pipeline tracking",instructions:k,relationship:"Delegate outreach with: who to contact, messaging angle, follow-up cadence, and desired outcome.\n\nReport back with: emails sent or scheduled, responses received, pipeline updates, and deals needing escalation."}]},{id:"customer-support",label:"Customer Support",description:"Handle tickets, draft replies, and track resolutions",icon:"🎧",members:[{role:"leader",description:"Coordinates support queue and handles escalations",instructions:d},{role:"assistant",description:"Drafts customer responses and tracks open issues",instructions:l,relationship:"Delegate support tasks with: customer issue summary, urgency level, prior interaction context, and resolution approach.\n\nReport back with: response drafted or sent, resolution status, follow-up schedule, and recurring patterns to flag."}]},{id:"custom",label:"Custom",description:"Build your own team from scratch",icon:"✨",members:[{role:"leader",description:"Coordinates work and replies to you",instructions:d}]}],"shuffleMembers",0,function(a){let d=new Set,e=[];for(let f=0;f<a;f++){let a,f=0;do a=(0,b.uniqueNamesGenerator)({dictionaries:[b.names],length:1,style:"capital"}),f++;while(d.has(a)&&f<100)d.add(a),e.push({name:a,avatarUrl:(0,c.serializeAvatarConfig)((0,c.randomConfig)())})}return e}])},212484,a=>{"use strict";var b=a.i(616612),c=a.i(75118),d=a.i(762276);a.s(["ScenarioPicker",0,function({selected:a,onSelect:e,onBrowseTemplates:f}){return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"What will your company focus on?"}),f&&(0,b.jsxs)("button",{type:"button",onClick:f,className:"text-[11px] text-muted-foreground hover:text-foreground transition-colors underline underline-offset-2",children:["Browse templates ",(0,b.jsx)("span",{"aria-hidden":"true",children:"›"})]})]}),(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:d.SCENARIO_PRESETS.map(d=>(0,b.jsxs)("button",{onClick:()=>e(d.id),className:(0,c.cn)("flex flex-col items-start gap-1 rounded-lg border p-4 text-left transition-all hover:border-foreground/30",a===d.id?"border-foreground/50 bg-muted/50":"border-border"),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,b.jsx)("span",{className:"text-lg",children:d.icon}),(0,b.jsxs)("span",{className:"text-[10px] text-muted-foreground/70",children:[d.members.length," agent",d.members.length>1?"s":""]})]}),(0,b.jsx)("span",{className:"text-sm font-medium",children:d.label}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground leading-tight",children:d.description})]},d.id))})]})}])},263233,a=>{"use strict";var b=a.i(616612),c=a.i(75118),d=a.i(732254),e=a.i(439882),f=a.i(674899);a.i(735132);var g=a.i(325848),h=a.i(354498),i=a.i(74414);a.i(974936);var j=a.i(911509);let k={leader:"Lead",researcher:"Researcher",engineer:"Engineer",assistant:"Assistant"};a.s(["TeamPreview",0,function({members:a,runtimes:l,onShuffle:m,onAssignRuntime:n}){let o=l.length>1&&n;return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Your company"}),(0,b.jsxs)(d.Button,{variant:"ghost",size:"sm",onClick:m,className:"h-7 text-xs gap-1.5",children:[(0,b.jsx)(f.RefreshCw,{className:"size-3"}),"Shuffle"]})]}),(0,b.jsx)("div",{className:(0,c.cn)("grid gap-3 grid-cols-1",2===a.length&&"sm:grid-cols-2",3===a.length&&"sm:grid-cols-2 md:grid-cols-3",a.length>=4&&"sm:grid-cols-2 md:grid-cols-4"),children:a.map((a,c)=>{let d,f=a.avatarUrl?(0,g.parseAvatarUrl)(a.avatarUrl):null;return(0,b.jsxs)(e.Card,{size:"sm",className:"flex flex-col px-3 py-4 gap-2 h-full",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2.5",children:[f?(0,b.jsx)(g.AvatarRenderer,{config:f,size:36,className:"rounded-xl shrink-0"}):(0,b.jsx)("div",{className:"size-9 rounded-xl bg-muted flex items-center justify-center text-sm font-semibold shrink-0",children:a.name.charAt(0)}),(0,b.jsxs)("div",{className:"flex flex-col items-start gap-0.5",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground bg-muted/60 px-1.5 py-0.5 rounded",children:k[a.role]})]})]}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground/70 font-mono truncate",children:(0,j.toAlookAddress)(a.emailHandle||a.name.toLowerCase())}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground leading-snug flex-1",children:a.description}),o&&(d=l.find(b=>b.id===a.runtimeId),(0,b.jsx)("div",{className:"mt-1",children:(0,b.jsxs)(h.Select,{value:a.runtimeId,onValueChange:a=>{a&&n(c,a)},children:[(0,b.jsx)(h.SelectTrigger,{className:"h-7 text-[11px]",children:(0,b.jsxs)("div",{className:"flex items-center gap-1.5 truncate",children:[d&&(0,b.jsx)(i.ProviderLogo,{provider:d.provider||"",className:"size-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:d?.provider||d?.runtime_mode||"Select"})]})}),(0,b.jsx)(h.SelectContent,{children:l.map(a=>(0,b.jsx)(h.SelectItem,{value:a.id,children:a.provider||a.runtime_mode},a.id))})]})}))]},c)})})]})}])},927981,a=>a.a(async(b,c)=>{try{var d=a.i(616612),e=a.i(734803),f=a.i(630991),g=a.i(732254),h=a.i(84096),i=a.i(402656),j=a.i(69379),k=a.i(598169),l=a.i(689560),m=a.i(780956),n=a.i(454607),o=a.i(562706),p=a.i(946621),q=a.i(892691),r=a.i(212484),s=a.i(263233),t=a.i(762276);a.i(974936);var u=a.i(372822),v=a.i(588339),w=a.i(881503),x=a.i(561101),y=b([n]);[n]=y.then?(await y)():y,a.s(["StudioOnboardingClient",0,function({workspaceId:a,workspaceSlug:b,initialTemplate:c}){let y=(0,f.useRouter)(),[z,A]=(0,e.useState)([]),[B,C]=(0,e.useState)(!0),[D,E]=(0,e.useState)(c?c.baseScenario:null),[F,G]=(0,e.useState)([]),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(!1),R=(0,u.isTauri)()&&(0,u.isDesktop)(),S=z.filter(a=>"online"===a.status),T=S.length>0;(0,e.useEffect)(()=>{(0,v.listRuntimes)(a).then(a=>{A(a),a.some(a=>"online"===a.status)&&(O(!0),Q(!0))}).catch(()=>{}).finally(()=>C(!1))},[a]);let U=(0,e.useCallback)(b=>{"runtime.registered"===b.type&&b.workspaceId===a?(O(!0),Q(!0),(0,v.listRuntimes)(a).then(A).catch(()=>{})):"runtime.status"===b.type&&b.workspaceId===a&&(O(!0),"online"===b.status?Q(!0):Q(!1))},[a]);(0,w.useUserWs)(U);let V=(0,e.useCallback)(async()=>{M(!0);try{let b=await (0,v.createMachineToken)("cli",a);if(K(b.token),R){let c=await (0,u.tauriInvoke)("register_cli",{token:b.token});if(c.success){O(!0),Q(!0);let b=await (0,v.listRuntimes)(a).catch(()=>[]);A(b)}else m.toast.error(c.message||"Auto-registration failed")}}catch{m.toast.error("Failed to generate token")}finally{M(!1)}},[a,R]);(0,e.useEffect)(()=>{!R||B||T||N||V()},[R,B]),(0,e.useEffect)(()=>{let a=S[0]?.id;a&&G(b=>0!==b.length&&b.some(a=>!a.runtimeId)?b.map(b=>b.runtimeId?b:{...b,runtimeId:a}):b)},[S]);let W=(0,e.useCallback)(async a=>{try{let b=await fetch("/api/studios/check-handles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:a})});if(!b.ok)return null;return await b.json()}catch{return null}},[]);(0,e.useEffect)(()=>{if(!c||B||F.length>0)return;let a=(0,t.shuffleMembers)(c.members.length),b=S[0]?.id||"",d=c.members.map((c,d)=>({name:a[d].name,role:c.role,description:c.description,instructions:c.instructions,avatarUrl:a[d].avatarUrl,runtimeId:b,relationship:c.relationship}));G(d),W(d.map(a=>a.name)).then(a=>{a&&G(b=>b.map(b=>{let c=a.find(a=>a.name===b.name);return c?{...b,emailHandle:c.handle}:b}))})},[c,B]);let X=async a=>{E(a);let b=t.SCENARIO_PRESETS.find(b=>b.id===a),c=(0,t.shuffleMembers)(b.members.length),d=S[0]?.id||"",e=b.members.map((a,b)=>({name:c[b].name,role:a.role,description:a.description,instructions:a.instructions,avatarUrl:c[b].avatarUrl,runtimeId:d,relationship:a.relationship}));G(e);let f=await W(e.map(a=>a.name));f&&G(a=>a.map(a=>{let b=f.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},Y=async()=>{let a=(0,t.shuffleMembers)(F.length),b=F.map((b,c)=>({...b,name:a[c].name,avatarUrl:a[c].avatarUrl,emailHandle:void 0}));G(b);let c=await W(b.map(a=>a.name));c&&G(a=>a.map(a=>{let b=c.find(b=>b.name===a.name);return b?{...a,emailHandle:b.handle}:a}))},Z=async()=>{I(!0);try{let b=await fetch("/api/studios",{method:"POST",headers:{"Content-Type":"application/json","X-Workspace-ID":a},body:JSON.stringify({name:void 0,scenario:D,members:F.map(a=>({name:a.name,role:a.role,runtime_id:a.runtimeId,description:a.description,instructions:a.instructions,avatar_url:a.avatarUrl||null,email_handle:a.emailHandle||void 0,relationship:a.relationship||void 0}))})});if(!b.ok){let a=await b.json();throw Error(a.error||"Failed to create company")}let c=await b.json();await fetch(`/api/workspaces/${a}/onboarded`,{method:"POST"}).catch(()=>{}),(0,p.trackWorkspaceCreated)("onboarding"),(0,p.trackOnboardingCompleted)({template_used:D??void 0,agent_count:F.length});for(let a=0;a<F.length;a++)(0,p.trackAgentCreated)({is_first_agent:0===a,has_email:!!F[a].emailHandle});m.toast.success("Company created!"),y.push(`/w/${c.workspace.slug}/agents/${c.leader_agent_id}`)}catch(a){m.toast.error(a instanceof Error?a.message:"Failed to create company"),I(!1)}},$=D&&F.length>0&&F.every(a=>a.runtimeId)&&(T||N&&P||R);return D?(0,d.jsx)(q.PublicLayout,{leftSlot:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>y.push("/workspaces"),children:[(0,d.jsx)(l.LayoutGrid,{className:"size-3 mr-1.5"}),"Workspaces"]}),(0,d.jsx)("span",{className:"text-muted-foreground/40",children:"/"}),(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>E(null),children:[(0,d.jsx)(k.ArrowLeft,{className:"size-3 mr-1.5"}),"Back"]})]}),rightSlot:(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:async()=>{await (0,o.clearAllCache)(),(0,n.signOut)({fetchOptions:{onSuccess:()=>y.push("/sign-in")}})},children:[(0,d.jsx)(j.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),children:(0,d.jsxs)("div",{className:"mx-auto w-full max-w-3xl space-y-10 px-6 py-14",children:[(0,d.jsx)("div",{className:"text-center",children:(0,d.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",style:{fontFamily:"var(--font-news)"},children:"Build your company"})}),B?(0,d.jsx)("div",{className:"flex justify-center py-8",children:(0,d.jsx)(h.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.TeamPreview,{members:F,runtimes:S,onShuffle:Y,onAssignRuntime:(a,b)=>{G(c=>c.map((c,d)=>d===a?{...c,runtimeId:b}:c))}}),!R&&(0,d.jsxs)("div",{className:"space-y-3",children:[(0,d.jsx)("h2",{className:"text-base font-semibold tracking-tight",children:"Connect a computer"}),T||N&&P?(0,d.jsxs)("p",{className:"text-xs text-emerald-600 flex items-center gap-1",children:[(0,d.jsx)(i.CheckCircle2,{className:"size-3"})," Computer connected"]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your company needs a connected computer to run tasks."}),(0,d.jsx)("div",{className:"rounded-xl bg-muted/40 p-5",children:(0,d.jsx)(x.ConnectMachineSteps,{generatedToken:J,generatingToken:L,onGenerateToken:V,registered:N,daemonOnline:P})})]})]}),(0,d.jsx)(g.Button,{onClick:Z,disabled:!$||H,className:"w-full",size:"lg",children:H?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(h.Loader2,{className:"size-4 animate-spin mr-2"}),"Launching..."]}):"Launch company"})]})]})}):(0,d.jsx)(q.PublicLayout,{leftSlot:(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>y.push("/workspaces"),children:[(0,d.jsx)(l.LayoutGrid,{className:"size-3 mr-1.5"}),"Workspaces"]}),rightSlot:(0,d.jsxs)(g.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:async()=>{await (0,o.clearAllCache)(),(0,n.signOut)({fetchOptions:{onSuccess:()=>y.push("/sign-in")}})},children:[(0,d.jsx)(j.LogOut,{className:"size-3 mr-1.5"}),"Sign out"]}),mainClassName:"flex items-center justify-center",children:(0,d.jsxs)("div",{className:"w-full max-w-3xl space-y-8 px-6 py-6",children:[(0,d.jsxs)("div",{className:"text-center space-y-2",children:[(0,d.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",style:{fontFamily:"var(--font-news)"},children:"What will your company do?"}),(0,d.jsx)("p",{className:"text-sm text-muted-foreground",children:"Pick a focus area. You can always add more agents later."})]}),(0,d.jsx)(r.ScenarioPicker,{selected:D,onSelect:X,onBrowseTemplates:()=>y.push(`/templates?workspace_id=${a}`)}),(0,d.jsx)("div",{className:"flex justify-center pt-2",children:(0,d.jsx)("button",{type:"button",onClick:async()=>{await fetch(`/api/workspaces/${a}/onboarded`,{method:"POST"}).catch(()=>{}),y.push(`/w/${b}/home`)},className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Skip for now"})})]})})}]),c()}catch(a){c(a)}},!1)];
|
|
63
63
|
|
|
64
64
|
//# sourceMappingURL=src_web_src_1kzi5ju._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[283291,a=>{"use strict";var b=a.i(616612),c=a.i(734803),d=a.i(630991),e=a.i(752792),f=a.i(732254),g=a.i(464830),h=a.i(439882),i=a.i(7455),j=a.i(22902),k=a.i(525132),l=a.i(780956),m=a.i(25668),n=a.i(515837),o=a.i(396439);a.i(974936);var p=a.i(997445),q=a.i(372822),r=a.i(75118),s=a.i(74414),t=a.i(588339),u=a.i(84096),v=a.i(674899),w=a.i(561101),x=a.i(946621);a.s(["default",0,function(){let{agents:a,runtimes:y,loading:z,handleGenerateToken:A,handleDeleteMachine:B,subscribeWs:C,workspaceId:D}=(0,e.useAgentContext)(),E=(0,d.useSearchParams)(),F=(0,d.useRouter)(),G=(0,d.usePathname)(),H=(0,r.getAppMode)(),I=(0,q.isTauri)()&&(0,q.isDesktop)(),J="mobile"===H||I,[K,L]=(0,c.useState)(()=>E.has("connect")),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)(!1),[Q,R]=(0,c.useState)(null),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(null),[W,X]=(0,c.useState)(new Set),[Y,Z]=(0,c.useState)(new Set),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(""),[ac,ad]=(0,c.useState)(""),[ae,af]=(0,c.useState)("Remove"),[ag,ah]=(0,c.useState)(void 0),[ai,aj]=(0,c.useState)("destructive"),[ak,al]=(0,c.useState)(!1),am=(0,c.useRef)(null);(0,c.useEffect)(()=>{(0,t.fetchLatestCliVersion)().then(a=>V(a.version)).catch(()=>{})},[]),(0,c.useEffect)(()=>{E.has("connect")&&F.replace(G,{scroll:!1})},[E,F,G]);let an=(0,c.useRef)(K);(0,c.useEffect)(()=>{an.current=K},[K]);let ao=(0,c.useRef)(a);(0,c.useEffect)(()=>{ao.current=a},[a]);let ap=(0,c.useRef)(Q);(0,c.useEffect)(()=>{ap.current=Q},[Q]),(0,c.useEffect)(()=>C(a=>{if(an.current&&("runtime.registered"===a.type&&a.workspaceId===D&&R(a.daemonId),"runtime.status"===a.type&&a.workspaceId===D&&"online"===a.status&&ap.current&&a.daemonId===ap.current)&&((0,x.trackRuntimeConnected)({runtime_type:"desktop"}),L(!1),N(""),R(null),T(!1),l.toast.success("Machine connected"),0===ao.current.length)){let a=G.split("/")[2];F.push(`/w/${a}/agents/new`)}}),[C,D,G,F]);let aq=(a,b,c,d)=>{ab(a),ad(b),af(d?.label??"Remove"),ah(d?.loadingLabel),aj(d?.variant??"destructive"),am.current=c,_(!0)},ar=async()=>{if(am.current){al(!0);try{await am.current()}finally{al(!1),_(!1),am.current=null}}},as=(0,c.useCallback)(async()=>{P(!0);try{let a=await A();a&&N(a)}finally{P(!1)}},[A]),at=async(a,b)=>{X(a=>new Set(a).add(b));try{await (0,t.triggerRuntimeUpdate)(a,D),l.toast.success("Update triggered")}catch{l.toast.error("Failed to trigger update"),X(a=>{let c=new Set(a);return c.delete(b),c})}},au=async(a,b)=>{Z(a=>new Set(a).add(b));try{await (0,t.triggerRuntimeRescan)(a,D),l.toast.success("Rescan triggered — daemon will restart to detect runtimes")}catch{l.toast.error("Failed to trigger rescan"),Z(a=>{let c=new Set(a);return c.delete(b),c})}},av=(0,c.useMemo)(()=>{if(0===W.size)return W;let a=new Set;for(let b of y){let c=b.daemon_id||b.id;W.has(c)&&b.pending_update_version&&a.add(c)}return a},[y,W]),aw=(0,c.useMemo)(()=>{if(0===Y.size)return Y;let a=new Set;for(let b of y){let c=b.daemon_id||b.id;Y.has(c)&&b.pending_rescan&&a.add(c)}return a},[y,Y]),ax=new Map;for(let a of y){let b=a.daemon_id||a.id;if(!ax.has(b)){let c=a.metadata;ax.set(b,{deviceInfo:"string"==typeof a.device_info?a.device_info:"",status:a.status,lastSeenAt:a.last_seen_at,pendingUpdateVersion:a.pending_update_version??null,pendingRescan:!!a.pending_rescan,cliVersion:c?.cli_version??null,runtimes:[]})}ax.get(b).runtimes.push(a)}return z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(m.Skeleton,{className:"h-4 w-16"}),(0,b.jsx)(m.Skeleton,{className:"h-3 w-52"})]}),(0,b.jsx)(m.Skeleton,{className:"h-8 w-29 rounded-md"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((a,c)=>(0,b.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.Skeleton,{className:"size-4 rounded"}),(0,b.jsx)(m.Skeleton,{className:"h-4 w-28"})]}),(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(m.Skeleton,{className:"h-3 w-20"}),(0,b.jsx)(m.Skeleton,{className:"h-3 w-28"})]}),(0,b.jsx)(m.Skeleton,{className:"h-5 w-14 rounded-full"})]})})]},c))})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("h1",{className:"text-sm font-medium",children:"Runtimes"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your machines and their agent runtimes."})]}),!J&&(0,b.jsxs)(f.Button,{size:"sm",variant:"outline",onClick:()=>{N(""),R(null),L(!0)},disabled:O,children:[(0,b.jsx)(o.Plus,{className:"size-3.5"}),"New machine"]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:0===y.length?(0,b.jsx)("div",{className:"flex flex-1 items-center justify-center min-h-[60vh]",children:(0,b.jsxs)("div",{className:"text-center animate-[fade-up_400ms_ease-out_both]",children:[(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:J?"No machines connected. Use the desktop app or CLI to connect a machine.":"Connect a machine to start running agents locally."}),!J&&(0,b.jsx)(f.Button,{size:"sm",className:"mt-4 glow-border",onClick:()=>{N(""),L(!0)},children:"Connect Machine"})]})}):(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from(ax.entries()).map(([a,c])=>{let d,e,i,j=c.deviceInfo||a;return(0,b.jsxs)(h.Card,{size:"sm",children:[(0,b.jsx)(h.CardHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(n.Monitor,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)(h.CardTitle,{className:"truncate",children:j}),c.cliVersion&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:["v",c.cliVersion]}),(0,b.jsx)(g.Badge,{variant:"online"===c.status?"default":"outline",className:"shrink-0",children:c.status})]})}),(0,b.jsx)(h.CardContent,{children:(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:c.lastSeenAt?new Date(c.lastSeenAt).toLocaleString():"Never seen"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(d=!!c.pendingUpdateVersion||av.has(a),e=U&&(!c.cliVersion||!(0,p.semverGte)(c.cliVersion,U)),d?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(u.Loader2,{className:"size-3 animate-spin mr-1"}),"Updating..."]}):e?(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>aq("Update daemon",`This will update the daemon on "${j}" to the latest CLI version. The daemon will restart during the update.`,async()=>{await at(c.runtimes[0].id,a)},{label:"Update",loadingLabel:"Updating...",variant:"default"}),children:"Update"}):null),(i=c.pendingRescan||aw.has(a),"online"!==c.status?null:i?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(v.RefreshCw,{className:"size-3 animate-spin mr-1"}),"Rescanning..."]}):(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>aq("Rescan runtimes",`This will restart the daemon on "${j}" to re-detect available runtimes (Claude Code, Codex, OpenCode).`,async()=>{await au(c.runtimes[0].id,a)},{label:"Rescan",loadingLabel:"Triggering...",variant:"default"}),children:[(0,b.jsx)(v.RefreshCw,{className:"size-3 mr-1"}),"Rescan"]})),(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground h-6 px-2 hover:text-destructive",onClick:()=>{aq("Remove machine",`This will remove "${j}" and all its runtimes. Agents using these runtimes will be unlinked.`,async()=>{await B(a)})},children:"Remove"})]})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:c.runtimes.map(a=>(0,b.jsxs)(g.Badge,{variant:"secondary",className:"gap-1.5",children:[(0,b.jsx)(s.ProviderLogo,{provider:a.provider,className:"h-3.5 w-3.5"}),a.provider,a.metadata?.version?(0,b.jsx)("span",{className:"text-muted-foreground font-normal",children:String(a.metadata.version)}):null]},a.id))}),"online"!==c.status&&(0,b.jsxs)("div",{className:"pt-1.5 border-t border-border/50",children:[(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground mb-1.5",children:"Bring this machine online:"}),"desktop"===H&&(0,q.isTauri)()?(0,b.jsx)(f.Button,{size:"sm",variant:"outline",className:"w-full h-7 text-[11px]",onClick:async()=>{try{await (0,q.tauriInvoke)("daemon_start"),l.toast.success("Daemon started")}catch{l.toast.error("Failed to start daemon")}},children:"Start Daemon"}):(0,b.jsxs)(k.Tooltip,{children:[(0,b.jsxs)(k.TooltipTrigger,{render:(0,b.jsx)("div",{className:"relative overflow-hidden rounded-md bg-muted px-2.5 py-1.5 font-mono text-[11px] text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:()=>{navigator.clipboard.writeText(`${(0,r.cliCmd)()} daemon start`),l.toast.success("Copied to clipboard")}}),children:[(0,b.jsx)("span",{className:"absolute inset-0 -translate-x-full animate-[shimmer_2.5s_infinite] bg-linear-to-r from-transparent via-(--shimmer-peak) to-transparent"}),(0,b.jsxs)("span",{className:"relative",children:[(0,r.cliCmd)()," daemon start"]})]}),(0,b.jsx)(k.TooltipContent,{children:"Click to copy"})]})]})]})})]},a)})})}),(0,b.jsx)(i.Sheet,{open:K,onOpenChange:a=>{L(a),a||N("")},children:(0,b.jsxs)(i.SheetContent,{className:"data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:rounded-xl data-[side=right]:sm:border",children:[(0,b.jsxs)(i.SheetHeader,{children:[(0,b.jsx)(i.SheetTitle,{children:"Connect a machine"}),(0,b.jsx)(i.SheetDescription,{children:"Your machine runs AI agents locally using Claude Code, Codex, or OpenCode."})]}),(0,b.jsx)(i.SheetBody,{children:(0,b.jsx)(w.ConnectMachineSteps,{generatedToken:M,generatingToken:O,onGenerateToken:as,registered:!!Q,daemonOnline:S})})]})}),(0,b.jsx)(j.ConfirmDialog,{open:$,onOpenChange:_,title:aa,description:ac,confirmLabel:ae,loadingLabel:ag,confirmVariant:ai,loading:ak,onConfirm:ar})]})}])}];
|
|
1
|
+
module.exports=[283291,a=>{"use strict";var b=a.i(616612),c=a.i(734803),d=a.i(630991),e=a.i(752792),f=a.i(732254),g=a.i(464830),h=a.i(439882),i=a.i(7455),j=a.i(22902),k=a.i(525132),l=a.i(780956),m=a.i(25668),n=a.i(515837),o=a.i(396439);a.i(974936);var p=a.i(997445),q=a.i(372822),r=a.i(75118),s=a.i(74414),t=a.i(588339),u=a.i(84096),v=a.i(674899),w=a.i(561101),x=a.i(946621);a.s(["default",0,function(){let{agents:a,runtimes:y,loading:z,handleGenerateToken:A,handleDeleteMachine:B,subscribeWs:C,workspaceId:D}=(0,e.useAgentContext)(),E=(0,d.useSearchParams)(),F=(0,d.useRouter)(),G=(0,d.usePathname)(),H=(0,r.getAppMode)(),I=(0,q.isTauri)()&&(0,q.isDesktop)(),J="mobile"===H||I,[K,L]=(0,c.useState)(()=>E.has("connect")),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)(!1),[Q,R]=(0,c.useState)(null),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(null),[W,X]=(0,c.useState)(new Set),[Y,Z]=(0,c.useState)(new Set),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(""),[ac,ad]=(0,c.useState)(""),[ae,af]=(0,c.useState)("Remove"),[ag,ah]=(0,c.useState)(void 0),[ai,aj]=(0,c.useState)("destructive"),[ak,al]=(0,c.useState)(!1),am=(0,c.useRef)(null);(0,c.useEffect)(()=>{(0,t.fetchLatestCliVersion)().then(a=>V(a.version)).catch(()=>{})},[]),(0,c.useEffect)(()=>{E.has("connect")&&F.replace(G,{scroll:!1})},[E,F,G]);let an=(0,c.useRef)(K);(0,c.useEffect)(()=>{an.current=K},[K]);let ao=(0,c.useRef)(a);(0,c.useEffect)(()=>{ao.current=a},[a]);let ap=(0,c.useRef)(Q);(0,c.useEffect)(()=>{ap.current=Q},[Q]),(0,c.useEffect)(()=>C(a=>{if(an.current&&("runtime.registered"===a.type&&a.workspaceId===D&&R(a.daemonId),"runtime.status"===a.type&&a.workspaceId===D&&"online"===a.status&&ap.current&&a.daemonId===ap.current)&&((0,x.trackRuntimeConnected)({runtime_type:"desktop"}),L(!1),N(""),R(null),T(!1),l.toast.success("Machine connected"),0===ao.current.length)){let a=G.split("/")[2];F.push(`/w/${a}/agents/new`)}}),[C,D,G,F]);let aq=(a,b,c,d)=>{ab(a),ad(b),af(d?.label??"Remove"),ah(d?.loadingLabel),aj(d?.variant??"destructive"),am.current=c,_(!0)},ar=async()=>{if(am.current){al(!0);try{await am.current()}finally{al(!1),_(!1),am.current=null}}},as=(0,c.useCallback)(async()=>{P(!0);try{let a=await A();a&&N(a)}finally{P(!1)}},[A]),at=async(a,b)=>{X(a=>new Set(a).add(b));try{await (0,t.triggerRuntimeUpdate)(a,D),l.toast.success("Update triggered")}catch{l.toast.error("Failed to trigger update"),X(a=>{let c=new Set(a);return c.delete(b),c})}},au=async(a,b)=>{Z(a=>new Set(a).add(b));try{await (0,t.triggerRuntimeRescan)(a,D),l.toast.success("Rescan triggered — daemon will restart to detect runtimes")}catch{l.toast.error("Failed to trigger rescan"),Z(a=>{let c=new Set(a);return c.delete(b),c})}},av=(0,c.useMemo)(()=>{if(0===W.size)return W;let a=new Set;for(let b of W){let c=y.find(a=>(a.daemon_id||a.id)===b);(!c||c.pending_update_version)&&a.add(b)}return a},[y,W]),aw=(0,c.useMemo)(()=>{if(0===Y.size)return Y;let a=new Set;for(let b of y){let c=b.daemon_id||b.id;Y.has(c)&&b.pending_rescan&&a.add(c)}return a},[y,Y]),ax=new Map;for(let a of y){let b=a.daemon_id||a.id;if(!ax.has(b)){let c=a.metadata;ax.set(b,{deviceInfo:"string"==typeof a.device_info?a.device_info:"",status:a.status,lastSeenAt:a.last_seen_at,pendingUpdateVersion:a.pending_update_version??null,pendingRescan:!!a.pending_rescan,cliVersion:c?.cli_version??null,runtimes:[]})}ax.get(b).runtimes.push(a)}return z?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(m.Skeleton,{className:"h-4 w-16"}),(0,b.jsx)(m.Skeleton,{className:"h-3 w-52"})]}),(0,b.jsx)(m.Skeleton,{className:"h-8 w-29 rounded-md"})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:3}).map((a,c)=>(0,b.jsxs)("div",{className:"rounded-xl border border-border/50 bg-card p-4 space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(m.Skeleton,{className:"size-4 rounded"}),(0,b.jsx)(m.Skeleton,{className:"h-4 w-28"})]}),(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(m.Skeleton,{className:"h-3 w-20"}),(0,b.jsx)(m.Skeleton,{className:"h-3 w-28"})]}),(0,b.jsx)(m.Skeleton,{className:"h-5 w-14 rounded-full"})]})})]},c))})})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-border/50 px-3 md:px-5 py-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)("h1",{className:"text-sm font-medium",children:"Runtimes"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Your machines and their agent runtimes."})]}),!J&&(0,b.jsxs)(f.Button,{size:"sm",variant:"outline",onClick:()=>{N(""),R(null),L(!0)},disabled:O,children:[(0,b.jsx)(o.Plus,{className:"size-3.5"}),"New machine"]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:0===y.length?(0,b.jsx)("div",{className:"flex flex-1 items-center justify-center min-h-[60vh]",children:(0,b.jsxs)("div",{className:"text-center animate-[fade-up_400ms_ease-out_both]",children:[(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:J?"No machines connected. Use the desktop app or CLI to connect a machine.":"Connect a machine to start running agents locally."}),!J&&(0,b.jsx)(f.Button,{size:"sm",className:"mt-4 glow-border",onClick:()=>{N(""),L(!0)},children:"Connect Machine"})]})}):(0,b.jsx)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Array.from(ax.entries()).map(([a,c])=>{let d,e,i,j=c.deviceInfo||a;return(0,b.jsxs)(h.Card,{size:"sm",children:[(0,b.jsx)(h.CardHeader,{children:(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(n.Monitor,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)(h.CardTitle,{className:"truncate",children:j}),c.cliVersion&&(0,b.jsxs)("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:["v",c.cliVersion]}),(0,b.jsx)(g.Badge,{variant:"online"===c.status?"default":"outline",className:"shrink-0",children:c.status})]})}),(0,b.jsx)(h.CardContent,{children:(0,b.jsxs)("div",{className:"space-y-2.5",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:c.lastSeenAt?new Date(c.lastSeenAt).toLocaleString():"Never seen"}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(d=!!c.pendingUpdateVersion||av.has(a),e="online"===c.status&&U&&(!c.cliVersion||!(0,p.semverGte)(c.cliVersion,U)),d?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(u.Loader2,{className:"size-3 animate-spin mr-1"}),"Updating..."]}):e?(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>aq("Update daemon",`This will update the daemon on "${j}" to the latest CLI version. The daemon will restart during the update.`,async()=>{await at(c.runtimes[0].id,a)},{label:"Update",loadingLabel:"Updating...",variant:"default"}),children:"Update"}):null),(i=c.pendingRescan||aw.has(a),"online"!==c.status?null:i?(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",disabled:!0,className:"text-xs h-6 px-2",children:[(0,b.jsx)(v.RefreshCw,{className:"size-3 animate-spin mr-1"}),"Rescanning..."]}):(0,b.jsxs)(f.Button,{variant:"ghost",size:"sm",className:"text-xs h-6 px-2",onClick:()=>aq("Rescan runtimes",`This will restart the daemon on "${j}" to re-detect available runtimes (Claude Code, Codex, OpenCode).`,async()=>{await au(c.runtimes[0].id,a)},{label:"Rescan",loadingLabel:"Triggering...",variant:"default"}),children:[(0,b.jsx)(v.RefreshCw,{className:"size-3 mr-1"}),"Rescan"]})),(0,b.jsx)(f.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground h-6 px-2 hover:text-destructive",onClick:()=>{aq("Remove machine",`This will remove "${j}" and all its runtimes. Agents using these runtimes will be unlinked.`,async()=>{await B(a)})},children:"Remove"})]})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:c.runtimes.map(a=>(0,b.jsxs)(g.Badge,{variant:"secondary",className:"gap-1.5",children:[(0,b.jsx)(s.ProviderLogo,{provider:a.provider,className:"h-3.5 w-3.5"}),a.provider,a.metadata?.version?(0,b.jsx)("span",{className:"text-muted-foreground font-normal",children:String(a.metadata.version)}):null]},a.id))}),"online"!==c.status&&(0,b.jsxs)("div",{className:"pt-1.5 border-t border-border/50",children:[(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground mb-1.5",children:"Bring this machine online:"}),"desktop"===H&&(0,q.isTauri)()?(0,b.jsx)(f.Button,{size:"sm",variant:"outline",className:"w-full h-7 text-[11px]",onClick:async()=>{try{await (0,q.tauriInvoke)("daemon_start"),l.toast.success("Daemon started")}catch{l.toast.error("Failed to start daemon")}},children:"Start Daemon"}):(0,b.jsxs)(k.Tooltip,{children:[(0,b.jsxs)(k.TooltipTrigger,{render:(0,b.jsx)("div",{className:"relative overflow-hidden rounded-md bg-muted px-2.5 py-1.5 font-mono text-[11px] text-muted-foreground cursor-pointer hover:bg-muted/80 transition-colors",onClick:()=>{navigator.clipboard.writeText(`${(0,r.cliCmd)()} daemon start`),l.toast.success("Copied to clipboard")}}),children:[(0,b.jsx)("span",{className:"absolute inset-0 -translate-x-full animate-[shimmer_2.5s_infinite] bg-linear-to-r from-transparent via-(--shimmer-peak) to-transparent"}),(0,b.jsxs)("span",{className:"relative",children:[(0,r.cliCmd)()," daemon start"]})]}),(0,b.jsx)(k.TooltipContent,{children:"Click to copy"})]})]})]})})]},a)})})}),(0,b.jsx)(i.Sheet,{open:K,onOpenChange:a=>{L(a),a||N("")},children:(0,b.jsxs)(i.SheetContent,{className:"data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:rounded-xl data-[side=right]:sm:border",children:[(0,b.jsxs)(i.SheetHeader,{children:[(0,b.jsx)(i.SheetTitle,{children:"Connect a machine"}),(0,b.jsx)(i.SheetDescription,{children:"Your machine runs AI agents locally using Claude Code, Codex, or OpenCode."})]}),(0,b.jsx)(i.SheetBody,{children:(0,b.jsx)(w.ConnectMachineSteps,{generatedToken:M,generatingToken:O,onGenerateToken:as,registered:!!Q,daemonOnline:S})})]})}),(0,b.jsx)(j.ConfirmDialog,{open:$,onOpenChange:_,title:aa,description:ac,confirmLabel:ae,loadingLabel:ag,confirmVariant:ai,loading:ak,onConfirm:ar})]})}])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_web_src_app_%28app%29_w_%5Bslug%5D_runtimes_page_tsx_11-1juy._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[588339,446827,a=>{"use strict";class b extends Error{status;details;constructor(a,b,c){super(a),this.name="ApiError",this.status=b,this.details=c}get isNetworkError(){return 0===this.status}get isRateLimit(){return 429===this.status}get isUnauthorized(){return 401===this.status}}function c(a,b){return"validation error"===a&&b?.length?function(a){let[b,...c]=a.split(":"),d=c.join(":").trim();if(!d)return a;let e=b.trim(),f=e.trim().replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()),g=d.replace(/^required$/i,"is required"),h=g.toLowerCase().replace(/[_-]+/g," "),i=e.toLowerCase().replace(/[_-]+/g," ");return i&&h.startsWith(`${i} `)&&(g=g.slice(e.length).trimStart()),f?`${f} ${g}`:g}(b[0]):a}async function d(a,d){let e;try{e=await fetch(""+a,{...d,credentials:"include",headers:{"Content-Type":"application/json",...d?.headers}})}catch(a){if(a instanceof TypeError)throw new b("Unable to connect — check your network",0);throw a}if(401===e.status)throw new b("Unauthorized",401);if(!e.ok){let a,d;try{let b=await e.json();a=b.error,d=b.details}catch{}if(429===e.status)throw new b("Please wait a moment before trying again",429);if(e.status>=500)throw new b(c(a,d)||"Something went wrong — please try again",e.status,d);throw new b(c(a,d)||"Something went wrong",e.status,d)}if(204!==e.status)return e.json()}function e(a,b){let c=new URLSearchParams({workspace_id:a,...b});return`?${c.toString()}`}a.s(["ApiError",0,b],446827),parseInt(process.env.NEXT_PUBLIC_MOCK_NETWORK_DELAY_MS||"300",10);let f=async(a,c,f,g,h)=>{let i;if(!g||0===g.length)return d(`/api/conversations/${a}/messages${e(f)}`,{method:"POST",body:JSON.stringify({content:c,...h?{metadata:h}:{}})});let j=new FormData;for(let a of(j.append("content",c),h&&j.append("metadata",JSON.stringify(h)),g))j.append("file",a);try{i=await fetch(`/api/conversations/${a}/messages${e(f)}`,{method:"POST",credentials:"include",body:j})}catch(a){if(a instanceof TypeError)throw new b("Unable to connect — check your network",0);throw a}if(401===i.status)throw new b("Unauthorized",401);if(!i.ok){let a,c;try{let b=await i.json();a=b.error,c=b.details}catch{}if(429===i.status)throw new b("Please wait a moment before trying again",429);if(i.status>=500)throw new b(a||"Something went wrong — please try again",i.status,c);throw new b(a||"Something went wrong",i.status,c)}return i.json()},g=async(a,b)=>{let c=new URLSearchParams({workspace_id:b}),d=await fetch(`/api/email/${a}/body?${c}`,{credentials:"include"});if(!d.ok)return{content:"(body not available)",isHtml:!1};let e=d.headers.get("Content-Type")??"";return{content:await d.text(),isHtml:e.includes("text/html")}},h=async(a,c)=>{let d=new FormData;d.append("file",a);let f=await fetch(`/api/email/upload${e(c)}`,{method:"POST",credentials:"include",body:d});if(!f.ok)throw new b(await f.text().catch(()=>"Upload failed"),f.status);return f.json()},i=async(a,c)=>{let f;if(!c.files||0===c.files.length)return d(`/api/issues${e(a)}`,{method:"POST",body:JSON.stringify({agent_id:c.agent_id,title:c.title,description:c.description})});let g=new FormData;for(let a of(c.agent_id&&g.append("agent_id",c.agent_id),g.append("title",c.title),g.append("description",c.description??""),c.files))g.append("file",a);try{f=await fetch(`/api/issues${e(a)}`,{method:"POST",credentials:"include",body:g})}catch(a){if(a instanceof TypeError)throw new b("Unable to connect — check your network",0);throw a}if(401===f.status)throw new b("Unauthorized",401);if(!f.ok){let a,c;try{let b=await f.json();a=b.error,c=b.details}catch{}if(429===f.status)throw new b("Please wait a moment before trying again",429);if(f.status>=500)throw new b(a||"Something went wrong — please try again",f.status,c);throw new b(a||"Something went wrong",f.status,c)}return f.json()},j=async(a,b)=>{let c=new URLSearchParams({workspace_id:b}),d=await fetch(`/api/artifacts/${a}/content?${c}`,{credentials:"include"});return d.ok?d.text():"(content not available)"};a.s(["acceptInvite",0,a=>d(`/api/invite/${a}`,{method:"POST"}),"addWhitelistEmail",0,(a,b,c)=>d(`/api/agents/${a}/whitelist${e(c)}`,{method:"POST",body:JSON.stringify({email:b})}),"approveMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings/${b}/approve${e(c)}`,{method:"POST"}),"cancelActiveTask",0,(a,b)=>d(`/api/conversations/${a}/active-task${e(b)}`,{method:"DELETE"}),"chatInit",0,(a,b,c)=>d(`/api/agents/${a}/chat-init${e(b)}`,{method:"POST",body:JSON.stringify({...c?{channel:c}:{}})}),"checkFreshness",0,(a,b)=>{let c={};return a.conversationId&&(c.conversation_id=a.conversationId),a.agentId&&(c.agent_id=a.agentId),a.channel&&(c.channel=a.channel),d(`/api/conversations/check-fresh${e(b,c)}`)},"conversationInit",0,(a,b,c)=>{let f={};return c?.newestMessageId&&(f.newest_message_id=c.newestMessageId),c?.messageCount&&(f.message_count=String(c.messageCount)),d(`/api/conversations/${a}/init${e(b,f)}`)},"createAgent",0,(a,b)=>d(`/api/agents${e(b)}`,{method:"POST",body:JSON.stringify(a)}),"createAgentLink",0,(a,b)=>d(`/api/agent-links${e(b)}`,{method:"POST",body:JSON.stringify(a)}),"createCalendarEvent",0,(a,b)=>d(`/api/calendar${e(b)}`,{method:"POST",body:JSON.stringify(a)}),"createChannelApi",0,(a,b)=>d(`/api/channels${e(a)}`,{method:"POST",body:JSON.stringify({name:b})}),"createConversation",0,(a,b,c)=>d(`/api/conversations${e(b)}`,{method:"POST",body:JSON.stringify({agent_id:a,...c?{channel:c}:{}})}),"createEmailAccount",0,(a,b,c)=>d(`/api/agents/${a}/email-accounts${e(c)}`,{method:"POST",body:JSON.stringify(b)}),"createInvite",0,a=>d(`/api/workspaces/${a}/invites${e(a)}`,{method:"POST"}),"createIssue",0,i,"createMachineToken",0,(a,b)=>d(`/api/machine-tokens${b?e(b):""}`,{method:"POST",body:JSON.stringify({name:a||"default"})}),"createMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings${e(b)}`,{method:"POST",body:JSON.stringify(c)}),"createThread",0,(a,b,c,f)=>d(`/api/conversations/${a}/threads${e(f)}`,{method:"POST",body:JSON.stringify({parent_message_id:b,content:c})}),"deleteAgent",0,(a,b)=>d(`/api/agents/${a}${e(b)}`,{method:"DELETE"}),"deleteAgentLink",0,(a,b)=>d(`/api/agent-links/${a}${e(b)}`,{method:"DELETE"}),"deleteCalendarEvent",0,(a,b,c)=>d(`/api/calendar/${a}${e(b)}`,{method:"DELETE",...c&&c.scope?{headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}:{}}),"deleteChannelApi",0,(a,b)=>d(`/api/channels/${a}${e(b)}`,{method:"DELETE"}),"deleteEmail",0,(a,b)=>d(`/api/email/${a}${e(b)}`,{method:"DELETE"}),"deleteEmailAccount",0,(a,b,c)=>d(`/api/agents/${a}/email-accounts/${b}${e(c)}`,{method:"DELETE"}),"deleteIssue",0,(a,b)=>d(`/api/issues/${b}${e(a)}`,{method:"DELETE"}),"deleteMachine",0,(a,b)=>d(`/api/runtimes/machine${e(b,{daemon_id:a})}`,{method:"DELETE"}),"deleteMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings/${b}${e(c)}`,{method:"DELETE"}),"deleteWorkspace",0,(a,b)=>d(`/api/workspaces/${a}${e(a)}`,{method:"DELETE",body:JSON.stringify({confirm_name:b})}),"fetchLatestCliVersion",0,()=>d("/api/cli/latest-version"),"fetchModelOptions",0,()=>d("/api/config/model-options"),"flagMessage",0,(a,b)=>d(`/api/flags${e(a)}`,{method:"POST",body:JSON.stringify({messageId:b})}),"getActiveTask",0,(a,b)=>d(`/api/conversations/${a}/active-task${e(b)}`),"getAgentSkills",0,(a,b)=>d(`/api/agents/${a}/skills${e(b)}`),"getArtifactContent",0,j,"getCalendarEvent",0,(a,b)=>d(`/api/calendar/${a}${e(b)}`),"getEmail",0,(a,b)=>d(`/api/email/${a}${e(b)}`),"getEmailBody",0,g,"getEmailThread",0,(a,b)=>d(`/api/email/${a}/thread${e(b)}`),"getFlaggedCount",0,a=>d(`/api/flags/count${e(a)}`),"getInboxCount",0,(a,b)=>{let c={};return b?.types?.length&&(c.types=b.types.join(",")),d(`/api/inbox/count${e(a,c)}`)},"getInviteInfo",0,a=>d(`/api/invite/${a}`),"getIssue",0,(a,b)=>d(`/api/issues/${b}${e(a)}`),"getMemberMe",0,a=>d(`/api/members/me${e(a)}`),"getMinCliVersion",0,()=>d("/api/config/min-version"),"getTask",0,(a,b)=>d(`/api/tasks/${a}${e(b)}`),"getTaskMessages",0,(a,b,c)=>d(`/api/tasks/${a}/messages${e(b,c?{since:String(c)}:void 0)}`),"getThreadSummaries",0,(a,b)=>d(`/api/conversations/${a}/threads${e(b)}`),"getTrace",0,(a,b)=>d(`/api/traces/${a}${e(b)}`),"getWorkspaceOverview",0,a=>d(`/api/workspaces/${a}/overview${e(a)}`),"grantAgentAccess",0,(a,b,c)=>d(`/api/agents/${b}/access${e(a)}`,{method:"POST",body:JSON.stringify({user_id:c})}),"listAgentAccess",0,(a,b)=>d(`/api/agents/${b}/access${e(a)}`),"listAgentActiveTaskCounts",0,a=>d(`/api/agents/active-task-counts${e(a)}`),"listAgentActivity",0,(a,b,c)=>{let f={};return c?.limit&&(f.limit=String(c.limit)),c?.before&&(f.before=c.before),c?.beforeId&&(f.before_id=c.beforeId),c?.status&&(f.status=c.status),c?.type&&(f.type=c.type),d(`/api/agents/${a}/activity${e(b,f)}`)},"listAgentLinks",0,a=>d(`/api/agent-links${e(a)}`),"listAgentPins",0,a=>d(`/api/agents/pins${e(a)}`),"listAgents",0,a=>d(`/api/agents${e(a)}`),"listArtifacts",0,(a,b)=>d(`/api/artifacts${e(b,{conversation_id:a})}`),"listCalendarEvents",0,(a,b)=>{let c={};return b?.agentId&&(c.agentId=b.agentId),b?.from&&(c.from=b.from),b?.to&&(c.to=b.to),d(`/api/calendar${e(a,c)}`)},"listChannels",0,a=>d(`/api/channels${e(a)}`),"listEmailAccounts",0,(a,b)=>d(`/api/agents/${a}/email-accounts${e(b)}`),"listEmails",0,(a,b,c,f)=>d(`/api/email${e(b,{agentId:a,...c?{folder:c}:{},...f?{address:f}:{}})}`),"listFlaggedItems",0,(a,b)=>{let c={};return b?.limit&&(c.limit=String(b.limit)),b?.before&&(c.before=b.before),d(`/api/flags${e(a,c)}`)},"listFlaggedMessageIds",0,(a,b)=>d(`/api/flags${e(a,{conversation_id:b,ids_only:"true"})}`),"listInboxItems",0,(a,b)=>{let c={};return b?.limit&&(c.limit=String(b.limit)),b?.before&&(c.before=b.before),b?.types?.length&&(c.types=b.types.join(",")),d(`/api/inbox${e(a,c)}`)},"listInvites",0,a=>d(`/api/workspaces/${a}/invites${e(a)}`),"listIssues",0,(a,b)=>{let c={};return b?.agentId&&(c.agentId=b.agentId),b?.status&&(c.status=b.status),b?.terminal!==void 0&&(c.terminal=String(b.terminal)),d(`/api/issues${e(a,c)}`)},"listMeetings",0,(a,b)=>d(`/api/agents/${a}/meetings${e(b)}`),"listMembers",0,a=>d(`/api/workspaces/${a}/members${e(a)}`),"listMessages",0,(a,b,c)=>{let f={};return c?.limit&&(f.limit=String(c.limit)),c?.before&&(f.before=c.before),c?.beforeId&&(f.before_id=c.beforeId),d(`/api/conversations/${a}/messages${e(b,f)}`)},"listMessagesAroundTask",0,(a,b,c)=>d(`/api/conversations/${a}/messages${e(b,{around_task:c})}`),"listPreviousConversations",0,(a,b,c)=>{let f={exclude:c.exclude,before:c.before};return c.channel&&(f.channel=c.channel),c.limit&&(f.limit=String(c.limit)),d(`/api/agents/${a}/conversations${e(b,f)}`)},"listRuntimes",0,a=>d(`/api/runtimes${e(a)}`),"listTraces",0,(a,b)=>{let c={};return b?.limit&&(c.limit=String(b.limit)),b?.before&&(c.before=b.before),b?.status&&(c.status=b.status),b?.multiAgent&&(c.multiAgent="true"),b?.agentId&&(c.agentId=b.agentId),b?.channel&&(c.channel=b.channel),d(`/api/traces${e(a,c)}`)},"listWhitelist",0,(a,b)=>d(`/api/agents/${a}/whitelist${e(b)}`),"listWorkspaceActiveTasks",0,a=>d(`/api/agents/active-tasks${e(a)}`),"listWorkspaces",0,()=>d("/api/workspaces"),"markAllInboxRead",0,a=>d(`/api/inbox/read-all${e(a)}`,{method:"POST"}),"markInboxRead",0,(a,b)=>d(`/api/inbox/read${e(b)}`,{method:"POST",body:JSON.stringify({conversationId:a})}),"pinAgent",0,(a,b)=>d(`/api/agents/${b}/pin${e(a)}`,{method:"POST"}),"removeMember",0,(a,b)=>d(`/api/workspaces/${a}/members/${b}${e(a)}`,{method:"DELETE"}),"removeWhitelistEmail",0,(a,b,c)=>d(`/api/agents/${a}/whitelist/${b}${e(c)}`,{method:"DELETE"}),"renameChannelApi",0,(a,b,c)=>d(`/api/channels/${a}${e(b)}`,{method:"PATCH",body:JSON.stringify({name:c})}),"reorderAgentPins",0,(a,b)=>d(`/api/agents/pins/reorder${e(a)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:b})}),"reorderChannelsApi",0,(a,b)=>d(`/api/channels/reorder${e(a)}`,{method:"PUT",body:JSON.stringify({ordered_channel_ids:b})}),"reorderUnpinnedAgents",0,(a,b)=>d(`/api/agents/sidebar/reorder${e(a)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:b})}),"requestWorkspaceBrowse",0,(a,b,c,f)=>d(`/api/agents/${a}/workspace/browse${e(b)}`,{method:"POST",body:JSON.stringify({request_type:c,path:f})}),"retryTask",0,(a,b)=>d(`/api/tasks/${a}/retry${e(b)}`,{method:"POST"}),"revokeAgentAccess",0,(a,b,c,f=!1)=>d(`/api/agents/${b}/access/${c}${e(a)}${f?"&remove_whitelist=true":""}`,{method:"DELETE"}),"revokeInvite",0,(a,b)=>d(`/api/workspaces/${a}/invites/${b}${e(a)}`,{method:"DELETE"}),"sendEmail",0,(a,b,c,f,g,h,i,j)=>d(`/api/email/send${e(g)}`,{method:"POST",body:JSON.stringify({agentId:a,to:b,subject:c,htmlBody:f,attachments:h,...i,customAccountId:j})}),"sendMessage",0,f,"stopMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings/${b}/stop${e(c)}`,{method:"POST"}),"syncEmailAccount",0,(a,b,c)=>d(`/api/agents/${a}/email-accounts/${b}/sync${e(c)}`,{method:"POST"}),"triggerRuntimeRescan",0,(a,b)=>d(`/api/runtimes/${a}/rescan${e(b)}`,{method:"POST"}),"triggerRuntimeUpdate",0,(a,b)=>d(`/api/runtimes/${a}/update${e(b)}`,{method:"POST"}),"trustEmail",0,(a,b)=>d(`/api/email/${a}/trust${e(b)}`,{method:"POST"}),"unflagMessage",0,(a,b)=>d(`/api/flags/${b}${e(a)}`,{method:"DELETE"}),"unpinAgent",0,(a,b)=>d(`/api/agents/${b}/pin${e(a)}`,{method:"DELETE"}),"updateAgent",0,(a,b,c)=>d(`/api/agents/${a}${e(c)}`,{method:"PATCH",body:JSON.stringify(b)}),"updateAgentLink",0,(a,b,c)=>d(`/api/agent-links/${a}${e(c)}`,{method:"PATCH",body:JSON.stringify(b)}),"updateCalendarEvent",0,(a,b,c)=>d(`/api/calendar/${a}${e(c)}`,{method:"PATCH",body:JSON.stringify(b)}),"updateEmailStatus",0,(a,b,c)=>d(`/api/email/${a}${e(b)}`,{method:"PATCH",body:JSON.stringify({status:c})}),"updateIssue",0,(a,b,c)=>d(`/api/issues/${b}${e(a)}`,{method:"PATCH",body:JSON.stringify(c)}),"updateMemberMe",0,(a,b)=>d(`/api/members/me${e(a)}`,{method:"PATCH",body:JSON.stringify({global_instruction:b})}),"updateWorkspace",0,(a,b)=>d(`/api/workspaces/${a}${e(a)}`,{method:"PATCH",body:JSON.stringify(b)}),"uploadEmailAttachment",0,h],588339)}];
|
|
1
|
+
module.exports=[588339,446827,a=>{"use strict";class b extends Error{status;details;constructor(a,b,c){super(a),this.name="ApiError",this.status=b,this.details=c}get isNetworkError(){return 0===this.status}get isRateLimit(){return 429===this.status}get isUnauthorized(){return 401===this.status}}function c(a,b){return"validation error"===a&&b?.length?function(a){let[b,...c]=a.split(":"),d=c.join(":").trim();if(!d)return a;let e=b.trim(),f=e.trim().replace(/[_-]+/g," ").replace(/\b\w/g,a=>a.toUpperCase()),g=d.replace(/^required$/i,"is required"),h=g.toLowerCase().replace(/[_-]+/g," "),i=e.toLowerCase().replace(/[_-]+/g," ");return i&&h.startsWith(`${i} `)&&(g=g.slice(e.length).trimStart()),f?`${f} ${g}`:g}(b[0]):a}async function d(a,d){let e;try{e=await fetch(""+a,{...d,credentials:"include",headers:{"Content-Type":"application/json",...d?.headers}})}catch(a){if(a instanceof TypeError)throw new b("Unable to connect — check your network",0);throw a}if(401===e.status)throw new b("Unauthorized",401);if(!e.ok){let a,d;try{let b=await e.json();a=b.error,d=b.details}catch{}if(429===e.status)throw new b("Please wait a moment before trying again",429);if(e.status>=500)throw new b(c(a,d)||"Something went wrong — please try again",e.status,d);throw new b(c(a,d)||"Something went wrong",e.status,d)}if(204!==e.status)return e.json()}function e(a,b){let c=new URLSearchParams({workspace_id:a,...b});return`?${c.toString()}`}a.s(["ApiError",0,b],446827),parseInt(process.env.NEXT_PUBLIC_MOCK_NETWORK_DELAY_MS||"300",10);let f=async(a,c,f,g,h)=>{let i;if(!g||0===g.length)return d(`/api/conversations/${a}/messages${e(f)}`,{method:"POST",body:JSON.stringify({content:c,...h?{metadata:h}:{}})});let j=new FormData;for(let a of(j.append("content",c),h&&j.append("metadata",JSON.stringify(h)),g))j.append("file",a.file);for(let a=0;a<g.length;a++){let b=g[a].thumbnailBlob;b&&j.append(`thumbnail:${a}`,b,"thumbnail.jpg")}try{i=await fetch(`/api/conversations/${a}/messages${e(f)}`,{method:"POST",credentials:"include",body:j})}catch(a){if(a instanceof TypeError)throw new b("Unable to connect — check your network",0);throw a}if(401===i.status)throw new b("Unauthorized",401);if(!i.ok){let a,c;try{let b=await i.json();a=b.error,c=b.details}catch{}if(429===i.status)throw new b("Please wait a moment before trying again",429);if(i.status>=500)throw new b(a||"Something went wrong — please try again",i.status,c);throw new b(a||"Something went wrong",i.status,c)}return i.json()},g=async(a,b)=>{let c=new URLSearchParams({workspace_id:b}),d=await fetch(`/api/email/${a}/body?${c}`,{credentials:"include"});if(!d.ok)return{content:"(body not available)",isHtml:!1};let e=d.headers.get("Content-Type")??"";return{content:await d.text(),isHtml:e.includes("text/html")}},h=async(a,c)=>{let d=new FormData;d.append("file",a);let f=await fetch(`/api/email/upload${e(c)}`,{method:"POST",credentials:"include",body:d});if(!f.ok)throw new b(await f.text().catch(()=>"Upload failed"),f.status);return f.json()},i=async(a,c)=>{let f;if(!c.files||0===c.files.length)return d(`/api/issues${e(a)}`,{method:"POST",body:JSON.stringify({agent_id:c.agent_id,title:c.title,description:c.description})});let g=new FormData;for(let a of(c.agent_id&&g.append("agent_id",c.agent_id),g.append("title",c.title),g.append("description",c.description??""),c.files))g.append("file",a);try{f=await fetch(`/api/issues${e(a)}`,{method:"POST",credentials:"include",body:g})}catch(a){if(a instanceof TypeError)throw new b("Unable to connect — check your network",0);throw a}if(401===f.status)throw new b("Unauthorized",401);if(!f.ok){let a,c;try{let b=await f.json();a=b.error,c=b.details}catch{}if(429===f.status)throw new b("Please wait a moment before trying again",429);if(f.status>=500)throw new b(a||"Something went wrong — please try again",f.status,c);throw new b(a||"Something went wrong",f.status,c)}return f.json()},j=async(a,b)=>{let c=new URLSearchParams({workspace_id:b}),d=await fetch(`/api/artifacts/${a}/content?${c}`,{credentials:"include"});return d.ok?d.text():"(content not available)"};a.s(["acceptInvite",0,a=>d(`/api/invite/${a}`,{method:"POST"}),"addWhitelistEmail",0,(a,b,c)=>d(`/api/agents/${a}/whitelist${e(c)}`,{method:"POST",body:JSON.stringify({email:b})}),"approveMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings/${b}/approve${e(c)}`,{method:"POST"}),"cancelActiveTask",0,(a,b)=>d(`/api/conversations/${a}/active-task${e(b)}`,{method:"DELETE"}),"chatInit",0,(a,b,c)=>d(`/api/agents/${a}/chat-init${e(b)}`,{method:"POST",body:JSON.stringify({...c?{channel:c}:{}})}),"checkFreshness",0,(a,b)=>{let c={};return a.conversationId&&(c.conversation_id=a.conversationId),a.agentId&&(c.agent_id=a.agentId),a.channel&&(c.channel=a.channel),d(`/api/conversations/check-fresh${e(b,c)}`)},"conversationInit",0,(a,b,c)=>{let f={};return c?.newestMessageId&&(f.newest_message_id=c.newestMessageId),c?.messageCount&&(f.message_count=String(c.messageCount)),d(`/api/conversations/${a}/init${e(b,f)}`)},"createAgent",0,(a,b)=>d(`/api/agents${e(b)}`,{method:"POST",body:JSON.stringify(a)}),"createAgentLink",0,(a,b)=>d(`/api/agent-links${e(b)}`,{method:"POST",body:JSON.stringify(a)}),"createCalendarEvent",0,(a,b)=>d(`/api/calendar${e(b)}`,{method:"POST",body:JSON.stringify(a)}),"createChannelApi",0,(a,b)=>d(`/api/channels${e(a)}`,{method:"POST",body:JSON.stringify({name:b})}),"createConversation",0,(a,b,c)=>d(`/api/conversations${e(b)}`,{method:"POST",body:JSON.stringify({agent_id:a,...c?{channel:c}:{}})}),"createEmailAccount",0,(a,b,c)=>d(`/api/agents/${a}/email-accounts${e(c)}`,{method:"POST",body:JSON.stringify(b)}),"createInvite",0,a=>d(`/api/workspaces/${a}/invites${e(a)}`,{method:"POST"}),"createIssue",0,i,"createMachineToken",0,(a,b)=>d(`/api/machine-tokens${b?e(b):""}`,{method:"POST",body:JSON.stringify({name:a||"default"})}),"createMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings${e(b)}`,{method:"POST",body:JSON.stringify(c)}),"createThread",0,(a,b,c,f)=>d(`/api/conversations/${a}/threads${e(f)}`,{method:"POST",body:JSON.stringify({parent_message_id:b,content:c})}),"deleteAgent",0,(a,b)=>d(`/api/agents/${a}${e(b)}`,{method:"DELETE"}),"deleteAgentLink",0,(a,b)=>d(`/api/agent-links/${a}${e(b)}`,{method:"DELETE"}),"deleteCalendarEvent",0,(a,b,c)=>d(`/api/calendar/${a}${e(b)}`,{method:"DELETE",...c&&c.scope?{headers:{"Content-Type":"application/json"},body:JSON.stringify(c)}:{}}),"deleteChannelApi",0,(a,b)=>d(`/api/channels/${a}${e(b)}`,{method:"DELETE"}),"deleteEmail",0,(a,b)=>d(`/api/email/${a}${e(b)}`,{method:"DELETE"}),"deleteEmailAccount",0,(a,b,c)=>d(`/api/agents/${a}/email-accounts/${b}${e(c)}`,{method:"DELETE"}),"deleteIssue",0,(a,b)=>d(`/api/issues/${b}${e(a)}`,{method:"DELETE"}),"deleteMachine",0,(a,b)=>d(`/api/runtimes/machine${e(b,{daemon_id:a})}`,{method:"DELETE"}),"deleteMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings/${b}${e(c)}`,{method:"DELETE"}),"deleteWorkspace",0,(a,b)=>d(`/api/workspaces/${a}${e(a)}`,{method:"DELETE",body:JSON.stringify({confirm_name:b})}),"fetchLatestCliVersion",0,()=>d("/api/cli/latest-version"),"fetchModelOptions",0,()=>d("/api/config/model-options"),"flagMessage",0,(a,b)=>d(`/api/flags${e(a)}`,{method:"POST",body:JSON.stringify({messageId:b})}),"getActiveTask",0,(a,b)=>d(`/api/conversations/${a}/active-task${e(b)}`),"getAgentSkills",0,(a,b)=>d(`/api/agents/${a}/skills${e(b)}`),"getArtifactContent",0,j,"getCalendarEvent",0,(a,b)=>d(`/api/calendar/${a}${e(b)}`),"getEmail",0,(a,b)=>d(`/api/email/${a}${e(b)}`),"getEmailBody",0,g,"getEmailThread",0,(a,b)=>d(`/api/email/${a}/thread${e(b)}`),"getFlaggedCount",0,a=>d(`/api/flags/count${e(a)}`),"getInboxCount",0,(a,b)=>{let c={};return b?.types?.length&&(c.types=b.types.join(",")),d(`/api/inbox/count${e(a,c)}`)},"getInviteInfo",0,a=>d(`/api/invite/${a}`),"getIssue",0,(a,b)=>d(`/api/issues/${b}${e(a)}`),"getMemberMe",0,a=>d(`/api/members/me${e(a)}`),"getMinCliVersion",0,()=>d("/api/config/min-version"),"getTask",0,(a,b)=>d(`/api/tasks/${a}${e(b)}`),"getTaskMessages",0,(a,b,c)=>d(`/api/tasks/${a}/messages${e(b,c?{since:String(c)}:void 0)}`),"getThreadSummaries",0,(a,b)=>d(`/api/conversations/${a}/threads${e(b)}`),"getTrace",0,(a,b)=>d(`/api/traces/${a}${e(b)}`),"getWorkspaceOverview",0,a=>d(`/api/workspaces/${a}/overview${e(a)}`),"grantAgentAccess",0,(a,b,c)=>d(`/api/agents/${b}/access${e(a)}`,{method:"POST",body:JSON.stringify({user_id:c})}),"listAgentAccess",0,(a,b)=>d(`/api/agents/${b}/access${e(a)}`),"listAgentActiveTaskCounts",0,a=>d(`/api/agents/active-task-counts${e(a)}`),"listAgentActivity",0,(a,b,c)=>{let f={};return c?.limit&&(f.limit=String(c.limit)),c?.before&&(f.before=c.before),c?.beforeId&&(f.before_id=c.beforeId),c?.status&&(f.status=c.status),c?.type&&(f.type=c.type),d(`/api/agents/${a}/activity${e(b,f)}`)},"listAgentLinks",0,a=>d(`/api/agent-links${e(a)}`),"listAgentPins",0,a=>d(`/api/agents/pins${e(a)}`),"listAgents",0,a=>d(`/api/agents${e(a)}`),"listArtifacts",0,(a,b)=>d(`/api/artifacts${e(b,{conversation_id:a})}`),"listCalendarEvents",0,(a,b)=>{let c={};return b?.agentId&&(c.agentId=b.agentId),b?.from&&(c.from=b.from),b?.to&&(c.to=b.to),d(`/api/calendar${e(a,c)}`)},"listChannels",0,a=>d(`/api/channels${e(a)}`),"listEmailAccounts",0,(a,b)=>d(`/api/agents/${a}/email-accounts${e(b)}`),"listEmails",0,(a,b,c,f)=>d(`/api/email${e(b,{agentId:a,...c?{folder:c}:{},...f?{address:f}:{}})}`),"listFlaggedItems",0,(a,b)=>{let c={};return b?.limit&&(c.limit=String(b.limit)),b?.before&&(c.before=b.before),d(`/api/flags${e(a,c)}`)},"listFlaggedMessageIds",0,(a,b)=>d(`/api/flags${e(a,{conversation_id:b,ids_only:"true"})}`),"listInboxItems",0,(a,b)=>{let c={};return b?.limit&&(c.limit=String(b.limit)),b?.before&&(c.before=b.before),b?.types?.length&&(c.types=b.types.join(",")),d(`/api/inbox${e(a,c)}`)},"listInvites",0,a=>d(`/api/workspaces/${a}/invites${e(a)}`),"listIssues",0,(a,b)=>{let c={};return b?.agentId&&(c.agentId=b.agentId),b?.status&&(c.status=b.status),b?.terminal!==void 0&&(c.terminal=String(b.terminal)),d(`/api/issues${e(a,c)}`)},"listMeetings",0,(a,b)=>d(`/api/agents/${a}/meetings${e(b)}`),"listMembers",0,a=>d(`/api/workspaces/${a}/members${e(a)}`),"listMessages",0,(a,b,c)=>{let f={};return c?.limit&&(f.limit=String(c.limit)),c?.before&&(f.before=c.before),c?.beforeId&&(f.before_id=c.beforeId),d(`/api/conversations/${a}/messages${e(b,f)}`)},"listMessagesAroundTask",0,(a,b,c)=>d(`/api/conversations/${a}/messages${e(b,{around_task:c})}`),"listPreviousConversations",0,(a,b,c)=>{let f={exclude:c.exclude,before:c.before};return c.channel&&(f.channel=c.channel),c.limit&&(f.limit=String(c.limit)),d(`/api/agents/${a}/conversations${e(b,f)}`)},"listRuntimes",0,a=>d(`/api/runtimes${e(a)}`),"listTraces",0,(a,b)=>{let c={};return b?.limit&&(c.limit=String(b.limit)),b?.before&&(c.before=b.before),b?.status&&(c.status=b.status),b?.multiAgent&&(c.multiAgent="true"),b?.agentId&&(c.agentId=b.agentId),b?.channel&&(c.channel=b.channel),d(`/api/traces${e(a,c)}`)},"listWhitelist",0,(a,b)=>d(`/api/agents/${a}/whitelist${e(b)}`),"listWorkspaceActiveTasks",0,a=>d(`/api/agents/active-tasks${e(a)}`),"listWorkspaces",0,()=>d("/api/workspaces"),"markAllInboxRead",0,a=>d(`/api/inbox/read-all${e(a)}`,{method:"POST"}),"markInboxRead",0,(a,b)=>d(`/api/inbox/read${e(b)}`,{method:"POST",body:JSON.stringify({conversationId:a})}),"pinAgent",0,(a,b)=>d(`/api/agents/${b}/pin${e(a)}`,{method:"POST"}),"removeMember",0,(a,b)=>d(`/api/workspaces/${a}/members/${b}${e(a)}`,{method:"DELETE"}),"removeWhitelistEmail",0,(a,b,c)=>d(`/api/agents/${a}/whitelist/${b}${e(c)}`,{method:"DELETE"}),"renameChannelApi",0,(a,b,c)=>d(`/api/channels/${a}${e(b)}`,{method:"PATCH",body:JSON.stringify({name:c})}),"reorderAgentPins",0,(a,b)=>d(`/api/agents/pins/reorder${e(a)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:b})}),"reorderChannelsApi",0,(a,b)=>d(`/api/channels/reorder${e(a)}`,{method:"PUT",body:JSON.stringify({ordered_channel_ids:b})}),"reorderUnpinnedAgents",0,(a,b)=>d(`/api/agents/sidebar/reorder${e(a)}`,{method:"PUT",body:JSON.stringify({ordered_agent_ids:b})}),"requestWorkspaceBrowse",0,(a,b,c,f)=>d(`/api/agents/${a}/workspace/browse${e(b)}`,{method:"POST",body:JSON.stringify({request_type:c,path:f})}),"retryTask",0,(a,b)=>d(`/api/tasks/${a}/retry${e(b)}`,{method:"POST"}),"revokeAgentAccess",0,(a,b,c,f=!1)=>d(`/api/agents/${b}/access/${c}${e(a)}${f?"&remove_whitelist=true":""}`,{method:"DELETE"}),"revokeInvite",0,(a,b)=>d(`/api/workspaces/${a}/invites/${b}${e(a)}`,{method:"DELETE"}),"sendEmail",0,(a,b,c,f,g,h,i,j)=>d(`/api/email/send${e(g)}`,{method:"POST",body:JSON.stringify({agentId:a,to:b,subject:c,htmlBody:f,attachments:h,...i,customAccountId:j})}),"sendMessage",0,f,"stopMeeting",0,(a,b,c)=>d(`/api/agents/${a}/meetings/${b}/stop${e(c)}`,{method:"POST"}),"syncEmailAccount",0,(a,b,c)=>d(`/api/agents/${a}/email-accounts/${b}/sync${e(c)}`,{method:"POST"}),"triggerRuntimeRescan",0,(a,b)=>d(`/api/runtimes/${a}/rescan${e(b)}`,{method:"POST"}),"triggerRuntimeUpdate",0,(a,b)=>d(`/api/runtimes/${a}/update${e(b)}`,{method:"POST"}),"trustEmail",0,(a,b)=>d(`/api/email/${a}/trust${e(b)}`,{method:"POST"}),"unflagMessage",0,(a,b)=>d(`/api/flags/${b}${e(a)}`,{method:"DELETE"}),"unpinAgent",0,(a,b)=>d(`/api/agents/${b}/pin${e(a)}`,{method:"DELETE"}),"updateAgent",0,(a,b,c)=>d(`/api/agents/${a}${e(c)}`,{method:"PATCH",body:JSON.stringify(b)}),"updateAgentLink",0,(a,b,c)=>d(`/api/agent-links/${a}${e(c)}`,{method:"PATCH",body:JSON.stringify(b)}),"updateCalendarEvent",0,(a,b,c)=>d(`/api/calendar/${a}${e(c)}`,{method:"PATCH",body:JSON.stringify(b)}),"updateEmailStatus",0,(a,b,c)=>d(`/api/email/${a}${e(b)}`,{method:"PATCH",body:JSON.stringify({status:c})}),"updateIssue",0,(a,b,c)=>d(`/api/issues/${b}${e(a)}`,{method:"PATCH",body:JSON.stringify(c)}),"updateMemberMe",0,(a,b)=>d(`/api/members/me${e(a)}`,{method:"PATCH",body:JSON.stringify({global_instruction:b})}),"updateWorkspace",0,(a,b)=>d(`/api/workspaces/${a}${e(a)}`,{method:"PATCH",body:JSON.stringify(b)}),"uploadEmailAttachment",0,h],588339)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_web_src_lib_api_ts_1ffelwp._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/n67RZ-dHYbiPuCBj-CPEs/_buildManifest.js",
|
|
11
|
+
"static/n67RZ-dHYbiPuCBj-CPEs/_ssgManifest.js",
|
|
12
|
+
"static/n67RZ-dHYbiPuCBj-CPEs/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/3drpmcjhmx9ln.js",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"wasm": [],
|
|
26
26
|
"assets": [],
|
|
27
27
|
"env": {
|
|
28
|
-
"__NEXT_BUILD_ID": "
|
|
29
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
30
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
31
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
32
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
28
|
+
"__NEXT_BUILD_ID": "n67RZ-dHYbiPuCBj-CPEs",
|
|
29
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "lf/jyFy89zy+ExPJx4WXO3EKRmV3vqinORxOE/TNdNA=",
|
|
30
|
+
"__NEXT_PREVIEW_MODE_ID": "698776fdfc5178560c98717ac2a350e7",
|
|
31
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "bae4ab32d69a96315fc8b9a343fea057cebf4ded84c4036cb2417327f4a53f6c",
|
|
32
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "a71d64795352870dcbb28c2872b573c4d45b7736476ec919a9b0d6b8c2886eed"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"lf/jyFy89zy+ExPJx4WXO3EKRmV3vqinORxOE/TNdNA=\"\n}"
|