botmancers 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +5 -5
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +2 -2
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/agents/[id]/activity/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/activity/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/agents/[id]/config/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/config/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/agents/[id]/conversations/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/conversations/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/agents/[id]/sessions/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/sessions/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/agents/[id]/slack/page.js.nft.json +1 -1
- package/app/.next/server/app/agents/[id]/slack/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/bots/[id]/activity/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/overview/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
- package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
- package/app/.next/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-capacity/route.js.nft.json +1 -1
- package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
- package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
- package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
- package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
- package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/exchanges.html +1 -1
- package/app/.next/server/app/exchanges.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +3 -3
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/settings.html +1 -1
- package/app/.next/server/app/settings.rsc +3 -3
- package/app/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
- package/app/.next/server/app/threads/[id]/route.js.nft.json +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0aincj4._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0anfwiu._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__0fku-bw._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__1280ke1._.js +1 -1
- package/app/.next/server/chunks/[root-of-the-server]__13wghn3._.js +4 -4
- package/app/.next/server/chunks/[root-of-the-server]__1jxwu9_._.js +2 -2
- package/app/.next/server/chunks/_0061c2q._.js +1 -1
- package/app/.next/server/chunks/_1-5mthb._.js +1 -1
- package/app/.next/server/chunks/_1a0er16._.js +3 -3
- package/app/.next/server/chunks/_1uxmsh3._.js +3 -3
- package/app/.next/server/chunks/lib_service-api_ts_18eok4w._.js +3 -3
- package/app/.next/server/chunks/ssr/_00qrupp._.js +3 -0
- package/app/.next/server/chunks/ssr/_01ngpwj._.js +1 -1
- package/app/.next/server/chunks/ssr/_0d7gv3q._.js +3 -0
- package/app/.next/server/chunks/ssr/_0iywd5g._.js +1 -1
- package/app/.next/server/chunks/ssr/_0mxifu3._.js +1 -1
- package/app/.next/server/chunks/ssr/_0u7urta._.js +1 -1
- package/app/.next/server/chunks/ssr/app_agents_[id]_0sr4fdg._.js +1 -1
- package/app/.next/server/chunks/ssr/app_agents_[id]_activity_AgentActivityPage_tsx_042-590._.js +1 -1
- package/app/.next/server/chunks/ssr/app_agents_[id]_config_page_tsx_1f_gu1l._.js +1 -1
- package/app/.next/server/chunks/ssr/app_agents_[id]_sessions_page_tsx_0tfup-2._.js +3 -3
- package/app/.next/server/chunks/ssr/app_agents_[id]_slack_AgentSlackPage_tsx_20njhs1._.js +1 -1
- package/app/.next/server/chunks/ssr/app_page_tsx_0pxmutw._.js +1 -1
- package/app/.next/server/chunks/ssr/lib_0pfn9gs._.js +1 -1
- package/app/.next/server/chunks/ssr/lib_agent-registration-ui_ts_1z582mm._.js +1 -1
- package/app/.next/server/chunks/ssr/lib_exchange-view_ts_1a4q9ju._.js +1 -1
- package/app/.next/server/chunks/ssr/lib_share-view_ts_08psw5o._.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +3 -3
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{2dtkykrnob8wk.js → 00pca1oa16xc5.js} +1 -1
- package/app/.next/static/chunks/{3x56k5qa012au.js → 0apccyvpyjlo7.js} +1 -1
- package/app/.next/static/chunks/{04nfr73lkk7pz.js → 0l9r-x310007w.js} +1 -1
- package/app/.next/static/chunks/{0eqgs3167zj2j.js → 0xo3nwo_nscvf.js} +1 -1
- package/app/.next/static/chunks/{326jto9l-m8vj.js → 0z_bq7h1mwcf3.js} +4 -4
- package/app/.next/static/chunks/18btj4qlun8o7.js +1 -0
- package/app/.next/static/chunks/{2cc4uzbhs_v23.js → 1k8e6j67zksws.js} +1 -1
- package/app/.next/static/chunks/{0h567k13e53r-.js → 1y9hc8qm0hqds.js} +1 -1
- package/app/.next/static/chunks/{2ebpfmg4vni8e.js → 2wbcr5n_vcynr.js} +1 -1
- package/app/.next/static/chunks/3_lwv2zgy_-bw.css +3 -0
- package/app/.next/static/chunks/3a_ffnuma49te.js +1 -0
- package/app/.next/static/chunks/{3whw2-l4a2sli.js → 3fm68xa8a4-es.js} +1 -1
- package/app/.next/static/chunks/{0cjh4u-f7mlwd.js → 3gw1ytgjq4pxu.js} +1 -1
- package/app/.next/static/chunks/3wlqn3gd_jv_r.js +1 -0
- package/app/.next/static/chunks/3xjoca0z2onuc.js +1 -0
- package/app/BUILD_INFO.json +2 -2
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/schemas/botmancers.mcp.v2.tools.json +46 -46
- package/app/.next/server/chunks/ssr/_0g3y1u9._.js +0 -3
- package/app/.next/server/chunks/ssr/app_agents_[id]_conversations_page_tsx_15zl_c8._.js +0 -3
- package/app/.next/static/chunks/10i-rrea371m2.js +0 -1
- package/app/.next/static/chunks/17qi6hcgg0nlz.css +0 -3
- package/app/.next/static/chunks/1ypwptc0fsn4w.js +0 -1
- package/app/.next/static/chunks/2myfan3i8z-jy.js +0 -1
- package/app/.next/static/chunks/34v8aumua0x5n.js +0 -1
- /package/app/.next/static/{92gsyY5d-nMkxJ7iQxKkY → eBmHBBldHWytVvYPu0zHc}/_buildManifest.js +0 -0
- /package/app/.next/static/{92gsyY5d-nMkxJ7iQxKkY → eBmHBBldHWytVvYPu0zHc}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{92gsyY5d-nMkxJ7iQxKkY → eBmHBBldHWytVvYPu0zHc}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/3_lwv2zgy_-bw.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3s6nzrbk-8mnv.js"/><script src="/_next/static/chunks/2mmpezlrfmbu5.js" async=""></script><script src="/_next/static/chunks/3g4px251sg85e.js" async=""></script><script src="/_next/static/chunks/3un1mb5bx4x8k.js" async=""></script><script src="/_next/static/chunks/turbopack-2yajevry3z_n6.js" async=""></script><script src="/_next/static/chunks/3fntmmi971322.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Botmancers</title><meta name="description" content="Cloud-hosted AI teammate app"/><link rel="icon" href="/brand/botmancers-logo-filled-64.png" sizes="64x64" type="image/png"/><link rel="icon" href="/brand/botmancers-logo-filled-256.png" sizes="256x256" type="image/png"/><link rel="apple-touch-icon" href="/brand/botmancers-logo-filled-256.png" sizes="256x256" type="image/png"/><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body class="min-h-full flex flex-col"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/3s6nzrbk-8mnv.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\",1]\n:HL[\"/_next/static/chunks/3_lwv2zgy_-bw.css\",\"style\"]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4608]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/3_lwv2zgy_-bw.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/3fntmmi971322.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable h-full antialiased\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-full flex flex-col\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/3_lwv2zgy_-bw.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"eBmHBBldHWytVvYPu0zHc\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[27201,[\"/_next/static/chunks/3fntmmi971322.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Botmancers\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Cloud-hosted AI teammate app\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/brand/botmancers-logo-filled-64.png\",\"sizes\":\"64x64\",\"type\":\"image/png\"}],[\"$\",\"link\",\"3\",{\"rel\":\"icon\",\"href\":\"/brand/botmancers-logo-filled-256.png\",\"sizes\":\"256x256\",\"type\":\"image/png\"}],[\"$\",\"link\",\"4\",{\"rel\":\"apple-touch-icon\",\"href\":\"/brand/botmancers-logo-filled-256.png\",\"sizes\":\"256x256\",\"type\":\"image/png\"}],[\"$\",\"$Ld\",\"5\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3s6nzrbk-8mnv.js"/><script src="/_next/static/chunks/2mmpezlrfmbu5.js" async=""></script><script src="/_next/static/chunks/3g4px251sg85e.js" async=""></script><script src="/_next/static/chunks/3un1mb5bx4x8k.js" async=""></script><script src="/_next/static/chunks/turbopack-2yajevry3z_n6.js" async=""></script><script src="/_next/static/chunks/3fntmmi971322.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/3s6nzrbk-8mnv.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\",1]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/3s6nzrbk-8mnv.js"/><script src="/_next/static/chunks/2mmpezlrfmbu5.js" async=""></script><script src="/_next/static/chunks/3g4px251sg85e.js" async=""></script><script src="/_next/static/chunks/3un1mb5bx4x8k.js" async=""></script><script src="/_next/static/chunks/turbopack-2yajevry3z_n6.js" async=""></script><script src="/_next/static/chunks/3fntmmi971322.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/3s6nzrbk-8mnv.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/3fntmmi971322.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/3fntmmi971322.js\"],\"default\",1]\n7:X\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{},\"$undefined\",\"$undefined\",4624]},\"$undefined\",\"$undefined\",4624],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"eBmHBBldHWytVvYPu0zHc\"}\n"])</script><script>self.__next_f.push([1,"7:C\n9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"tbqMvxx1fZwEKFYVftWEYFMosl+bnbGcD5gzJhLcx2g=\"\n}"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97393,e=>{"use strict";var s=e.i(43476),t=e.i(71645),n=e.i(22016),a=e.i(18566),i=e.i(15983),r=e.i(24204);function o({agentId:e,agentName:n}){let a=(0,t.useId)(),i=(0,t.useId)(),l=(0,t.useId)(),[c,d]=(0,t.useState)(null),[u,m]=(0,t.useState)(""),[h,p]=(0,t.useState)(0),[f,g]=(0,t.useState)("idle"),[x,b]=(0,t.useState)(""),[v,k]=(0,t.useState)(""),[y,j]=(0,t.useState)(""),[N,w]=(0,t.useState)(""),[_,S]=(0,t.useState)("");(0,t.useEffect)(()=>{let s=!1;return fetch(`/api/bots/${encodeURIComponent(e)}/share-policy`,{cache:"no-store"}).then(async e=>{let t=await e.json().catch(()=>null);s||(e.ok&&t?.policy?(m(""),d(t.policy)):m("Could not load the share policy."))}).catch(()=>{s||m("Could not load the share policy.")}),()=>{s=!0}},[e,h]);let $=()=>{b(""),g("idle"),p(e=>e+1)},C=async(s,t)=>{if(!c)return!1;g("saving"),b(""),k("");try{let n=await fetch(`/api/bots/${encodeURIComponent(e)}/share-policy`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({revision:c.revision,...s})}),a=await n.json().catch(()=>null);if(!n.ok||!a?.policy)return g("error"),b("string"==typeof a?.error?.message?a.error.message:"The share policy could not be saved."),!1;return d(a.policy),g("idle"),k(t("number"==typeof a.revoked_contexts?a.revoked_contexts:0)),!0}catch{return g("error"),b("The share policy could not be saved."),!1}},A=async e=>{if(e.preventDefault(),!c)return;let s=(0,r.audienceInputError)(y,N,c.audiences);if(S(s??""),s)return;let t={kind:"slack",team_id:y.trim(),channel_id:N.trim()};await C({audiences:[...c.audiences,t]},()=>`Added ${(0,r.audienceLabel)(t)}.`)&&(j(""),w(""))},T="saving"===f,R=!!c&&"invalid"!==c.state;return(0,s.jsxs)("section",{className:"cfg-card share-policy",id:"session-sharing","aria-labelledby":"cfg-sharing-title",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{id:"cfg-sharing-title",className:"cfg-title",children:"Session sharing"}),T?(0,s.jsx)("span",{className:"text-sm cfg-faint",role:"status",children:"Saving…"}):null]}),(0,s.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:["A share lets people in one Slack channel ask one of ",n,"’s sessions questions, read-only, until it expires or you revoke it. Create and revoke shares from Sessions."]}),u?(0,s.jsxs)("p",{className:"text-sm cfg-error",role:"alert",children:[u," ",(0,s.jsx)("button",{type:"button",onClick:$,className:"underline hover:no-underline",children:"Retry"})]}):null,c||u?null:(0,s.jsx)("p",{className:"text-sm cfg-faint",role:"status",children:"Loading…"}),c?.state==="invalid"?(0,s.jsxs)("p",{className:"text-sm cfg-error mb-3",role:"alert",children:["The share policy file is invalid, so nothing can be shared: ",c.reason," Fix or remove config/session-shares.json, then"," ",(0,s.jsx)("button",{type:"button",onClick:$,className:"underline hover:no-underline",children:"reload"}),"."]}):null,c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"share-policy-toggle",children:[(0,s.jsx)("input",{id:a,type:"checkbox",role:"switch",checked:c.agent.share_from_turn,"aria-checked":c.agent.share_from_turn,disabled:!R||T||!c.agent.share_current.supported&&!c.agent.share_from_turn,"data-share-policy":"share_from_turn",onChange:e=>{let s=e.target.checked;C({share_from_turn:s},e=>s?"Share from a turn is on.":`Share from a turn is off.${e?` Revoked ${e} live turn context${1===e?"":"s"}.`:""}`)}}),(0,s.jsxs)("label",{htmlFor:a,className:"text-sm",children:[(0,s.jsx)("span",{className:"font-medium",children:"Share from a turn"})," (",(0,s.jsx)("code",{className:"cfg-code",children:"share_from_turn"}),")"]})]}),(0,s.jsx)("p",{className:"text-sm cfg-faint share-policy-hint",children:(0,r.shareFromTurnNote)(c)}),c.agent.live_contexts>0?(0,s.jsxs)("p",{className:"text-sm cfg-faint share-policy-hint",children:[c.agent.live_contexts," live turn context",1===c.agent.live_contexts?"":"s"," now."]}):null,(0,s.jsx)("h3",{className:"cfg-title share-policy-sub",children:"Slack channel allowlist"}),(0,s.jsx)("p",{className:"text-sm cfg-faint",children:"Every Agent’s shares use this list. A share can only go to a channel on it."}),0===c.audiences.length?(0,s.jsx)("p",{className:"text-sm cfg-muted share-policy-empty",children:"No channel yet: nothing can be shared to Slack."}):(0,s.jsx)("ul",{className:"share-policy-list","aria-label":"Allowed Slack channels",children:c.audiences.map(e=>(0,s.jsxs)("li",{className:"share-policy-entry",children:[(0,s.jsx)("span",{className:"cfg-code",children:e.channel_id}),(0,s.jsxs)("span",{className:"cfg-faint",children:["workspace ",e.team_id]}),(0,s.jsx)("button",{type:"button",className:"cfg-link text-sm share-policy-remove",disabled:!R||T,"aria-label":`Remove ${(0,r.audienceLabel)(e)}`,onClick:()=>{c&&C({audiences:c.audiences.filter(s=>s.team_id!==e.team_id||s.channel_id!==e.channel_id)},()=>`Removed ${(0,r.audienceLabel)(e)}. Its Slack threads stop being answered.`)},children:"Remove"})]},`${e.team_id}:${e.channel_id}`))}),(0,s.jsxs)("form",{className:"share-policy-add",onSubmit:e=>{A(e)},"aria-label":"Add a Slack channel",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:i,className:"text-sm",children:"Workspace ID"}),(0,s.jsx)("input",{id:i,className:"cfg-input",value:y,placeholder:"T0123ABCD",autoComplete:"off",spellCheck:!1,disabled:!R||T,"aria-invalid":!!_,onChange:e=>{j(e.target.value),S("")}})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:l,className:"text-sm",children:"Channel ID"}),(0,s.jsx)("input",{id:l,className:"cfg-input",value:N,placeholder:"C0123ABCD",autoComplete:"off",spellCheck:!1,disabled:!R||T,"aria-invalid":!!_,onChange:e=>{w(e.target.value),S("")}})]}),(0,s.jsx)("button",{type:"submit",className:"cfg-btn-primary text-sm",disabled:!R||T||!y.trim()||!N.trim(),children:"Add channel"})]}),_?(0,s.jsx)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:_}):null,"error"===f?(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:["Couldn't save: ",x," ",(0,s.jsx)("button",{type:"button",onClick:$,className:"underline hover:no-underline",children:"Reload"})]}):null,(0,s.jsx)("p",{className:"mt-2 text-sm cfg-ok",role:"status",children:v})]}):null]})}var l=e.i(10718),c=e.i(74904),d=e.i(33851),u=e.i(44079),m=e.i(52900),h=e.i(87303);function p({attribute:e,label:n,options:a,current:i,onPick:r,className:o}){let l=(0,t.useId)(),c=`avatar-${e}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{id:l,className:"avatar-group-label",children:n}),(0,s.jsx)("div",{className:o?`avatar-opt-grid ${o}`:"avatar-opt-grid",role:"radiogroup","aria-labelledby":l,children:a.map(t=>(0,s.jsxs)("label",{title:t.label,className:"avatar-opt",children:[(0,s.jsx)("input",{type:"radio",name:c,value:t.id,checked:i[e]===t.id,onChange:()=>r({[e]:t.id}),className:"avatar-opt-input"}),(0,s.jsx)("span",{className:"avatar-opt-art","aria-hidden":"true",children:(0,s.jsx)(h.default,{config:{...i,[e]:t.id},size:44})}),(0,s.jsx)("span",{children:t.label})]},t.id))})]})}var f=e.i(68541);function g({phase:e,onImport:t}){let n=(0,f.marketImportView)(e);return(0,s.jsxs)("div",{className:"mt-3","data-field":"marketplace-import",children:[(0,s.jsx)("button",{type:"button",onClick:t,disabled:n.busy,"aria-busy":n.busy,"aria-describedby":"cfg-market-import-status",className:"cfg-btn-ghost text-sm w-full sm:w-auto",children:"Import from Grok Marketplace"}),(0,s.jsx)("p",{id:"cfg-market-import-status",role:"status","aria-live":"polite",className:"error"===n.tone?"mt-2 text-sm cfg-error":"mt-2 text-xs cfg-faint",children:n.message})]})}var x=e.i(37947);let b="Fix the highlighted fields.",v=[{key:"avatar_accessory",label:"Avatar accessory"},{key:"avatar_color",label:"Avatar color"},{key:"avatar_eyes",label:"Avatar eyes"},{key:"avatar_hands",label:"Avatar hands"},{key:"description",label:"Description (rules)"},{key:"import_operation_id",label:"Import operation ID"},{key:"import_schema_version",label:"Import schema version"},{key:"memories",label:"Remembered facts"},{key:"name",label:"Name"},{key:"skill_content",label:"Skill content"},{key:"skill_path",label:"Skill path"},{key:"skill_present",label:"Skill present"},{key:"source_provider",label:"Source provider"},{key:"template_id",label:"Template ID"},{key:"template_url",label:"Template URL"},{key:"title",label:"Title"}];function k(e){return String(e).padStart(2,"0")}function y(e){let s=new Date(e);return`${s.getFullYear()}-${k(s.getMonth()+1)}-${k(s.getDate())} ${k(s.getHours())}:${k(s.getMinutes())}`}function j(e){let s=new Date(e);return`${k(s.getHours())}:${k(s.getMinutes())}:${k(s.getSeconds())}`}async function N(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}e.s(["default",0,function(){var e;let r=String((0,a.useParams)().id??""),k=(0,a.useRouter)(),[w,_]=(0,t.useState)(!1),[S,$]=(0,t.useState)(null),[C,A]=(0,t.useState)(!0),[T,R]=(0,t.useState)(!1),[I,E]=(0,t.useState)(!1),[D,L]=(0,t.useState)(0),[O,q]=(0,t.useState)(null),[F,U]=(0,t.useState)("clean"),[P,W]=(0,t.useState)(""),[H,M]=(0,t.useState)(0),[B,K]=(0,t.useState)(!1),[V,Y]=(0,t.useState)(""),[G,J]=(0,t.useState)("clean"),[Q,z]=(0,t.useState)(""),[Z,X]=(0,t.useState)(0),[ee,es]=(0,t.useState)({}),[et,en]=(0,t.useState)(""),[ea,ei]=(0,t.useState)(!1),[er,eo]=(0,t.useState)(null),[el,ec]=(0,t.useState)(!1),ed=(0,m.useRuntimeConnections)(),[eu,em]=(0,t.useState)(void 0),[eh,ep]=(0,t.useState)("clean"),[ef,eg]=(0,t.useState)(""),[ex,eb]=(0,t.useState)(0),[ev,ek]=(0,t.useState)(null),[ey,ej]=(0,t.useState)("clean"),[eN,ew]=(0,t.useState)(""),[e_,eS]=(0,t.useState)(0),{phase:e$,startImport:eC}=function(e){let[s,n]=(0,t.useState)("idle");return(0,t.useEffect)(()=>{let s=window.location.search;if(null===(0,f.importedBotId)(s))return;let t=new URL(window.location.href);t.searchParams.delete(f.IMPORT_RETURN_QUERY),window.history.replaceState(null,"",t.pathname+t.search);let a=!1;return(0,f.resolveImportReturn)(s,e,async e=>(await fetch(`/api/bots/${encodeURIComponent(e)}/config`,{cache:"no-store"})).ok).then(e=>{a||("open"===e.kind?window.location.replace(e.path):"missing"===e.kind&&n("missing"))}),()=>{a=!0}},[e]),{phase:s,startImport:async function(){n("checking");try{let e=await fetch(f.HANDOFF_STATUS_PATH,{cache:"no-store"}),s=await e.json().catch(()=>null);if(!e.ok)return void n("failed");if(s?.configured!==!0)return void n("unavailable");n("redirecting"),window.location.href=(0,f.handoffStartPath)(window.location.origin,window.location.pathname),setTimeout(()=>n(e=>"redirecting"===e?"idle":e),4e3)}catch{n("failed")}}}}(r);function eA(){A(!0),R(!1),L(e=>e+1)}(0,t.useEffect)(()=>{if(!r)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(r)}/sessions?status=all`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(s=>{e||em((s?.sessions??[]).map(e=>({ref:e.ref,title:e.title,status:e.status})))}).catch(()=>{e||em([])}),()=>{e=!0}},[r,D]),(0,t.useEffect)(()=>{if(!r)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(r)}/config`).then(async s=>{if(e)return;if(404===s.status){E(!0),$(null);return}if(!s.ok)throw Error("request failed");let t=await s.json();e||($(t),q(t.bot.description??""),E(!1),R(!1))}).catch(()=>{e||R(!0)}).finally(()=>{e||A(!1)}),()=>{e=!0}},[r,D]);let eT=S?.bot.description??"",eR=null!==O&&O!==eT,eI=S?.skill.content??"",eE=B&&V!==eI,eD=S?(0,d.registrationFormFromBot)(S.bot):null,eL=ea&&null!==er&&JSON.stringify(er)!==JSON.stringify(eD),eO=S?.bot.avatar_config??(0,x.resolveAvatar)(S?.bot??{}),eq=ev??eO,eF=null!==ev&&JSON.stringify(ev)!==JSON.stringify(eO),eU=eR||eE||eL||eF;function eP(e,s){N(s).then(s=>{s&&(en(e),setTimeout(()=>en(s=>s===e?"":s),2e3))})}async function eW(){if(S&&null!==O){U("saving"),W("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:S.bot.id,description:O})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(r)}/config`);if(!s.ok)throw Error("request failed");$(await s.json()),U("confirmed"),M(Date.now()),setTimeout(()=>{U(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){U("error"),W(e instanceof Error?e.message:"request failed")}}}function eH(){S&&(eo((0,d.registrationFormFromBot)(S.bot)),ei(!0),ec(!1),ep("clean"),eg(""),ed.retry())}function eM(e){eo(s=>s?{...s,...e}:s),eg(""),ep(e=>"error"===e?"clean":e)}function eB(){ei(!1),eo(null),ep("clean"),eg("")}function eK(e){ek({...ev??eO,...e}),ej("clean"),ew("")}async function eV(){if(S&&ev){ej("saving"),ew("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:S.bot.id,avatar:ev})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(r)}/config`);if(!s.ok)throw Error("request failed");$(await s.json()),ek(null),ej("confirmed"),eS(Date.now()),setTimeout(()=>{ej(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){ej("error"),ew(e instanceof Error?e.message:"request failed")}}}async function eY(){if(S&&er){if((0,d.hasRegistrationErrors)((0,d.registrationFormView)(er,ed.state))){ec(!0),ep("error"),eg(b);return}ep("saving"),eg("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,d.registrationPatchBody)(S.bot.id,er))});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(r)}/config`);if(!s.ok)throw Error("request failed");$(await s.json()),ei(!1),eo(null),ep("confirmed"),eb(Date.now()),setTimeout(()=>{ep(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){ep("error"),eg(e instanceof Error?e.message:"request failed")}}}function eG(){Y(S?.skill.content??""),K(!0),J("clean"),z("")}async function eJ(){if(S&&(V.trim()||window.confirm("Delete this skill file?"))){J("saving"),z("");try{let e=await fetch(`/api/bots/${encodeURIComponent(r)}/skill`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:V})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await e.json();$(e=>e?{...e,skill:s.skill,currentHash:s.currentHash}:e),K(!1),J("confirmed"),X(Date.now()),setTimeout(()=>{J(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){J("error"),z(e instanceof Error?e.message:"request failed")}}}if((0,t.useEffect)(()=>{if(!eU)return;let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[eU]),I)return(0,s.jsx)("div",{className:"cfg-page cfg-page-framed",children:(0,s.jsxs)("div",{className:"agent-state",children:[(0,s.jsx)("h2",{children:"Agent not found"}),(0,s.jsx)("p",{children:"This Agent does not exist or was removed."}),(0,s.jsx)(n.default,{href:"/",children:"Choose an Agent"})]})});if(C&&!S)return(0,s.jsx)("div",{className:"cfg-page cfg-page-framed",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto space-y-6",children:[(0,s.jsx)("div",{className:"h-12 rounded-lg animate-pulse cfg-skel"}),(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,s.jsx)("div",{className:"space-y-6",children:[0,1,2].map(e=>(0,s.jsx)("div",{className:"h-48 rounded-lg animate-pulse cfg-skel"},e))}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)("div",{className:"h-64 rounded-lg animate-pulse cfg-skel"}),(0,s.jsx)("div",{className:"h-80 rounded-lg animate-pulse cfg-skel"})]})]})]})});if(T&&!S)return(0,s.jsx)("div",{className:"cfg-page cfg-page-framed",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsxs)("header",{className:"mb-6 flex flex-wrap items-center gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"agent-eyebrow",children:"Config"}),(0,s.jsx)("h2",{className:"text-xl font-bold truncate",children:"Couldn't load agent details"})]}),(0,s.jsxs)("div",{className:"ml-auto text-right",children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash: ",(0,s.jsx)("code",{className:"cfg-code",children:"—"})]}),(0,s.jsx)("p",{className:"text-sm mt-1",children:(0,s.jsx)("span",{className:"cfg-faint",children:"○ Not loaded"})})]})]}),(0,s.jsx)("div",{className:"grid gap-6 lg:grid-cols-2 items-start",children:[["Skills","Rules","Agent","Template source"],["Launch snapshots","Avatar"]].map(e=>(0,s.jsx)("div",{className:"min-w-0 space-y-6",children:e.map(e=>(0,s.jsxs)("div",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-2",children:e}),(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Couldn't load this section."," ",(0,s.jsx)("button",{onClick:eA,className:"cfg-link",children:"Retry"})]})]},e))},e[0]))})]})});if(!S)return null;let{bot:eQ,skill:ez,currentHash:eZ,snapshots:eX}=S,e0=!!(eQ.source_provider||eQ.template_id||eQ.template_url||eQ.import_schema_version||eQ.import_operation_id),e1="saving"===F?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eR||"error"===F?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===F?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(H)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e2="saving"===G?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eE||"error"===G?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===G?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(Z)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e3="saving"===eh?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eL||"error"===eh?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===eh?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(ex)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e4="saving"===ey?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eF||"error"===ey?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===ey?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(e_)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"});return(0,s.jsxs)("div",{className:"cfg-page cfg-page-framed",children:[(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsxs)("header",{className:"mb-6 flex flex-wrap items-center gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"agent-eyebrow",children:"Config"}),(0,s.jsx)("h2",{className:"text-xl font-bold truncate",children:"Standing setup"})]}),(0,s.jsxs)("div",{className:"ml-auto text-right",children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash:"," ",(0,s.jsx)("code",{className:"cfg-code",title:eZ,children:eZ.slice(0,8)})," ",(0,s.jsx)("button",{onClick:()=>eP("header",eZ),className:"cfg-link text-sm",children:"header"===et?"Copied":"Copy"})]}),(0,s.jsx)("p",{className:"text-sm mt-1",children:eU?(0,s.jsxs)("span",{className:"cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):(0,s.jsx)("span",{className:"cfg-faint",children:"● Saved"})})]})]}),(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2 items-start","data-cfg-layout":"columns",children:[(0,s.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"primary",children:[(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Skills"}),e2]}),"unsupported"===ez.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Unsupported name"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"Skill files need an agent name matching /^[A-Za-z0-9_-]+$/ — this name cannot map to a skill path."})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:[ez.path," · ","present"===ez.status?"Present":"Not present"]}),B?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("textarea",{value:V,onChange:e=>Y(e.target.value),rows:8,className:"cfg-input text-sm"}),"error"===G&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",Q,"."," ",(0,s.jsx)("button",{onClick:eJ,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eJ,disabled:!eE||"saving"===G,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===G?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){K(!1),J("clean"),z("")},disabled:!eE||"saving"===G,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}):"present"===ez.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("pre",{className:"text-sm cfg-pre max-h-64 overflow-y-auto",children:ez.content}),(0,s.jsx)("button",{onClick:eG,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"No skill file yet. Create SKILL.md to give this agent standing instructions."}),(0,s.jsx)("button",{onClick:eG,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Create"})]}),(0,s.jsx)("p",{className:"mt-3 text-xs cfg-faint",children:"Appended verbatim as a system message at launch."})]})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Rules"}),e1]}),(0,s.jsx)("textarea",{value:O??"",onChange:e=>q(e.target.value),rows:8,className:"cfg-input cfg-input-sans text-sm"}),(0,s.jsx)("p",{className:"mt-2 text-xs cfg-faint",children:"Sent verbatim as the standing-rules system message on every turn. This beats the user's request for detail or length."}),"error"===F&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",P,"."," ",(0,s.jsx)("button",{onClick:eW,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eW,disabled:!eR||"saving"===F,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===F?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){q(eT),U("clean"),W("")},disabled:!eR||"saving"===F,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Agent"}),e3]}),(()=>{if(!ea||!er){let e=(0,d.registrationReadView)(eQ,eu);return(0,s.jsxs)("div",{"data-field":"runtime-read",children:[(0,s.jsx)("dl",{className:"text-sm",children:e.rows.map(e=>(0,s.jsxs)("div",{"data-row":e.key,className:"flex flex-col sm:flex-row sm:justify-between gap-x-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:e.label}),(0,s.jsx)("dd",{className:"sm:text-right break-words cfg-muted",children:e.value})]},e.key))}),e.notices.map(e=>(0,s.jsx)("p",{className:"text-sm cfg-dirty mt-2",children:e},e)),(0,s.jsx)("button",{onClick:eH,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]})}let e=(0,d.registrationFormView)(er,ed.state);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.RegistrationFields,{idPrefix:"cfg",variant:"config",form:er,onChange:eM,view:e,showErrors:el,connections:ed.state,onRetryConnections:ed.retry,onAddConnection:ed.add,workspacePlaceholder:(0,c.defaultWorkdirFor)(eQ.id),workspaceHint:(0,c.configWorkspaceHint)(eQ.id),sessions:eu,includeHomeSession:!0}),"error"===eh&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:[ef===b?ef:`Couldn't save: ${ef}.`," ",ef===b?null:(0,s.jsx)("button",{onClick:eY,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eY,disabled:!eL||"saving"===eh||e.submitDisabled,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===eh?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:eB,disabled:"saving"===eh,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:eL?"Discard":"Cancel"})]})]})})()]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-3",children:"Template source"}),!e0&&(0,s.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Created manually in Botmancers — no template source."}),(0,s.jsxs)("dl",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Source provider"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.source_provider??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Template ID"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.template_id??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Template URL"}),(0,s.jsx)("dd",{className:"text-right break-all",children:eQ.template_url?(e=eQ.template_url).startsWith("http://")||e.startsWith("https://")?(0,s.jsx)("a",{href:eQ.template_url,className:"cfg-link",children:eQ.template_url}):eQ.template_url:"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Import schema version"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.import_schema_version??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Import operation ID"}),(0,s.jsx)("dd",{className:"text-right break-all",children:eQ.import_operation_id??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-y cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Imported at"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.import_timestamp?y(eQ.import_timestamp):"—"})]})]}),(0,s.jsx)(g,{phase:e$,onImport:()=>{eC()}})]})]}),(0,s.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"secondary",children:[(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-3",children:"Launch snapshots"}),0===eX.length?(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"No launches recorded yet."}):(0,s.jsx)("ul",{className:"space-y-3",children:eX.map(e=>{let t=e.hash===eZ,n=!!ee[e.id];return(0,s.jsxs)("li",{className:"cfg-row",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"text-sm",children:[y(e.created_at)," · ",e.id.slice(0,4),e.transport?` \xb7 ${e.transport}`:null]}),(0,s.jsx)("button",{onClick:()=>es(s=>({...s,[e.id]:!s[e.id]})),"aria-label":n?"Collapse snapshot detail":"Expand snapshot detail",className:"cfg-chevron px-1",children:n?"▾":"▸"})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm",children:[(0,s.jsx)("code",{className:"cfg-code",children:e.hash.slice(0,12)})," ",(0,s.jsx)("button",{onClick:()=>eP(e.id,e.hash),className:"cfg-link text-sm",children:et===e.id?"Copied":"Copy"})]}),(0,s.jsx)("p",{className:"mt-1 text-sm",children:t?(0,s.jsx)("span",{className:"cfg-ok",children:"● Matches current config"}):(0,s.jsx)("span",{className:"cfg-faint",children:"○ Config changed since"})}),n&&(0,s.jsxs)("div",{className:"mt-3 pt-3 border-t cfg-line text-sm",children:[(0,s.jsxs)("p",{className:"cfg-muted break-all",children:[(0,s.jsx)("span",{className:"font-medium",children:"Launch ID:"})," ",e.id]}),(0,s.jsxs)("p",{className:"mt-1 cfg-muted break-all",children:[(0,s.jsx)("span",{className:"font-medium",children:"Hash:"})," ",(0,s.jsx)("code",{className:"cfg-code",children:e.hash})]}),(0,s.jsx)("dl",{className:"mt-2",children:v.map(t=>{let n=e.snapshot[t.key];return(0,s.jsxs)("div",{className:"py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:t.label}),(0,s.jsx)("dd",{className:"whitespace-pre-wrap break-words",children:null==n?(0,s.jsx)("span",{className:"cfg-faint",children:"null"}):Array.isArray(n)?0===n.length?(0,s.jsx)("span",{className:"cfg-faint",children:"(none)"}):(0,s.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:n.map(e=>`- ${e}`).join("\n")}):"boolean"==typeof n?String(n):""===n?(0,s.jsx)("span",{className:"cfg-faint",children:"(empty)"}):(0,s.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:n})})]},t.key)})})]})]},e.id)})})]}),(0,s.jsx)(o,{agentId:eQ.id,agentName:eQ.name}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Avatar"}),e4]}),(0,s.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,s.jsx)(h.default,{config:eq,size:96,title:"Avatar live preview"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"Outline style: the color is the line color, nothing is filled. Pick an option to preview, then Save."})]}),(0,s.jsx)(p,{attribute:"color",label:"Color",options:x.AVATAR_COLORS,current:eq,onPick:eK,className:"mb-3"}),(0,s.jsx)(p,{attribute:"eyes",label:"Eyes",options:x.AVATAR_EYES,current:eq,onPick:eK,className:"mb-3"}),(0,s.jsx)(p,{attribute:"hands",label:"Hands",options:x.AVATAR_HANDS,current:eq,onPick:eK,className:"mb-3"}),(0,s.jsx)(p,{attribute:"accessory",label:"Accessory",options:x.AVATAR_ACCESSORIES,current:eq,onPick:eK}),"error"===ey&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",eN,"."," ",(0,s.jsx)("button",{onClick:eV,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eV,disabled:!eF||"saving"===ey,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===ey?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){ek(null),ej("clean"),ew("")},disabled:!eF||"saving"===ey,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,s.jsxs)("section",{className:"cfg-card cfg-danger","aria-labelledby":"cfg-danger-title",children:[(0,s.jsx)("h2",{id:"cfg-danger-title",className:"cfg-title mb-3",children:"Danger zone"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:l.DELETE_REMOVES_COPY}),(0,s.jsx)("p",{className:"text-sm cfg-faint mt-2",children:l.DELETE_KEEPS_COPY}),(0,s.jsx)("button",{type:"button",onClick:()=>_(!0),className:"mt-3 delete-btn text-sm w-full sm:w-auto",children:"Delete agent"})]})]})]})]}),w?(0,s.jsx)(i.default,{ids:[eQ.id],onCancel:()=>_(!1),onDeleted:e=>k.push(`/?deleted=${Math.max(e.length,1)}`)}):null]})}],97393)},33851,44079,52900,68541,e=>{"use strict";var s=e.i(3136);let t="This computer",n={read_only:"Read only",workspace_write:"Workspace write"},a={workspaces:"Selected workspaces",sessions:"Selected imported sessions",all_provider_sessions:"All sessions this runtime can see"};function i(e){return e.startsWith("/")||"~"===e||e.startsWith("~/")}function r(e){return e.length>1?e.replace(/\/+$/,""):e}s.AGENTS.join("|");let o="/api/runtime-connections",l={connection:"Runtime connection",scope:"Session scope",defaultWorkspace:"Default workspace (optional)",policy:"Policy",homeSession:"Home session (optional)"},c={connection:"The runtime installation or account this Agent uses. Several Agents can share one.",workspaces:"One absolute path per line. An empty scope never means unrestricted.",sessions:"Only this Agent’s own Botmancers sessions can be selected.",noSessions:"This Agent has no sessions yet. Choose workspaces or all sessions for now.",allSessions:"Every session this runtime can see. Choose this only on purpose.",defaultWorkspace:"Where new sessions start. Convenience only — not a permission.",resumeEdits:"Needs Workspace write.",homeSession:"A stable session to return to. Must be one of this Agent’s sessions.",addConnection:"Stores a name and host only. Credentials stay with the runtime."},d="Loading runtime connections…",u="Couldn't load runtime connections — retry.";function m(){return{status:"loading",connections:[],error:""}}function h(e){return`${e.label} \xb7 ${s.AGENT_LABELS[e.provider]??e.provider}`}function p(e){if("object"!=typeof e||null===e)return null;let s=e.connections;if(!Array.isArray(s))return null;let t=[];for(let e of s){if("object"!=typeof e||null===e||"string"!=typeof e.id||"string"!=typeof e.provider||"string"!=typeof e.label)return null;t.push({id:e.id,provider:e.provider,label:e.label,host:"string"==typeof e.host?e.host:"",agent_count:"number"==typeof e.agent_count?e.agent_count:void 0})}return t}function f(e){let s=[];for(let t of e.split("\n")){let e=t.trim();e&&!s.includes(e)&&s.push(e)}return s}function g(e){return"workspaces"===e.scopeKind?{kind:"workspaces",workspaces:f(e.workspaces)}:"sessions"===e.scopeKind?{kind:"sessions",sessions:e.sessions}:{kind:e.scopeKind}}function x(e){return{mode:e.policyMode,allow_new_sessions:e.allowNewSessions,allow_resume_with_edits:e.allowResumeWithEdits}}e.s(["CONNECTIONS_ENDPOINT",0,o,"CONNECTIONS_ERROR_COPY",0,u,"CONNECTIONS_LOADING_COPY",0,d,"DEFAULT_REGISTRATION_FORM",0,{connectionId:"",scopeKind:"",workspaces:"",sessions:[],defaultWorkspace:"",policyMode:"read_only",allowNewSessions:!0,allowResumeWithEdits:!1,homeSessionId:""},"HINTS",0,c,"LABELS",0,l,"connectionOptionLabel",0,h,"hasRegistrationErrors",0,function(e){return Object.keys(e.errors).length>0},"initialConnectionListState",0,m,"parseConnectionList",0,p,"registrationCreateBody",0,function(e,s){let t={name:String(e??"").trim(),runtime_connection_id:s.connectionId,session_scope:g(s),policy:x(s)},n=s.defaultWorkspace.trim();return n&&(t.default_workspace=n),t},"registrationFormFromBot",0,function(e){let s=e.session_scope??null;return{connectionId:e.runtime_connection_id??"",scopeKind:s?.kind??"",workspaces:s?.kind==="workspaces"?s.workspaces.join("\n"):"",sessions:s?.kind==="sessions"?[...s.sessions]:[],defaultWorkspace:e.default_workspace??"",policyMode:e.policy?.mode??"read_only",allowNewSessions:!e.policy||e.policy.allow_new_sessions,allowResumeWithEdits:!!e.policy&&e.policy.allow_resume_with_edits,homeSessionId:e.home_session_id??""}},"registrationFormView",0,function(e,s){let t={};e.connectionId||(t.connection="Pick a runtime connection.");let n=f(e.workspaces);e.scopeKind?"workspaces"===e.scopeKind?0===n.length?t.workspaces="Add at least one workspace.":n.every(i)||(t.workspaces="Workspaces must be absolute paths (or start with ~/)."):"sessions"===e.scopeKind&&0===e.sessions.length&&(t.sessions="Select at least one session."):t.scope="Choose a session scope.";let a=e.defaultWorkspace.trim();a&&(i(a)?"workspaces"!==e.scopeKind||t.workspaces||n.some(e=>{let s,t;return s=r(e),s===(t=r(a))||t.startsWith("/"===s?"/":`${s}/`)})||(t.defaultWorkspace="The default workspace must be inside one of the selected workspaces."):t.defaultWorkspace="The default workspace must be an absolute path (or start with ~/)."),e.allowResumeWithEdits&&"workspace_write"!==e.policyMode&&(t.policy="Resume with edits needs the Workspace write policy.");let o="",l=!1;return"ready"!==s.status&&(l=!0,o="error"===s.status?u:""),{errors:t,submitDisabled:l,blocker:o}},"registrationPatchBody",0,function(e,s){return{id:e,runtime_connection_id:s.connectionId,session_scope:g(s),default_workspace:s.defaultWorkspace.trim(),policy:x(s),home_session_id:s.homeSessionId}},"registrationReadView",0,function(e,t){var i;let r,o=[{key:"connection",label:l.connection,value:(r=e.runtime_connection)?`${r.label} (${(0,s.agentLabel)(r.provider)} \xb7 ${r.host})`:"Not set"},{key:"scope",label:l.scope,value:function(e,s){if(!e)return"Not set — this Agent cannot launch until a scope is chosen.";if("all_provider_sessions"===e.kind)return a.all_provider_sessions;if("workspaces"===e.kind)return`${a.workspaces}: ${e.workspaces.join(", ")}`;let t=e.sessions.map(e=>s?.find(s=>s.ref===e)?.title??e);return`${a.sessions}: ${t.join(", ")}`}(e.session_scope,t)},{key:"defaultWorkspace",label:"Default workspace",value:e.default_workspace||"None"},{key:"policy",label:l.policy,value:(i=e.policy)?[n[i.mode],i.allow_new_sessions?"new sessions allowed":"no new sessions",i.allow_resume_with_edits?"resume with edits allowed":"no resume with edits"].join(" · "):"Not set"}],c=[];return o.push({key:"homeSession",label:"Home session",value:e.home_session_id?t?.find(s=>s.ref===e.home_session_id)?.title??e.home_session_id:"None"}),"connection"===e.launch_blocker?c.push("Choose a runtime connection before this Agent can run."):"session_scope"===e.launch_blocker?c.push("Choose a session scope before this Agent can run."):"agent"===e.launch_blocker&&c.push("This Agent has an unsupported Agent type."),{rows:o,notices:c}}],33851);var b=e.i(43476),v=e.i(71645),k=e.i(74904);let y={modal:{fieldset:"agent-fieldset reg-fieldset",legend:"field-legend",label:"",picks:"runtime-picks",pick:"runtime-pick",stack:"reg-stack",control:"reg-control",input:"",hint:"runtime-hint",error:"form-error reg-error",button:"runtime-retry",note:"runtime-note"},config:{fieldset:"agent-fieldset reg-fieldset",legend:"block text-sm cfg-muted mt-3 mb-1 p-0",label:"block text-sm cfg-muted mt-3 mb-1",picks:"flex flex-wrap gap-x-4 gap-y-1 text-sm cfg-muted",pick:"text-sm cfg-muted",stack:"flex flex-col gap-1 text-sm cfg-muted",control:"cfg-input text-sm",input:"cfg-input text-sm",hint:"mt-1 text-xs cfg-faint",error:"mt-1 text-sm cfg-error",button:"cfg-link text-sm",note:"text-sm cfg-muted mt-1"}};function j({id:e,message:s,variant:t}){return s?(0,b.jsx)("p",{id:e,className:y[t].error,role:"alert",children:s}):null}function N({idPrefix:e,variant:s,onAdd:n}){let a=y[s],[i,r]=(0,v.useState)(!1),[o,l]=(0,v.useState)(k.AGENT_OPTIONS[0].value),[d,u]=(0,v.useState)(""),[m,h]=(0,v.useState)(""),[p,f]=(0,v.useState)(""),[g,x]=(0,v.useState)(!1),j=async()=>{if(g)return;x(!0),f("");let e=await n({provider:o,label:d,host:m.trim()||t});(x(!1),"string"==typeof e)?f(e):(r(!1),u(""),h(""))};return i?(0,b.jsxs)("div",{id:`${e}-add-connection`,className:"reg-add-connection",role:"group","aria-label":"Add connection",children:[(0,b.jsx)("label",{className:a.label,htmlFor:`${e}-add-provider`,children:"Provider"}),(0,b.jsx)("select",{id:`${e}-add-provider`,className:a.control,value:o,onChange:e=>l(e.target.value),children:k.AGENT_OPTIONS.map(e=>(0,b.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,b.jsx)("label",{className:a.label,htmlFor:`${e}-add-label`,children:"Connection name"}),(0,b.jsx)("input",{id:`${e}-add-label`,type:"text",className:a.input||void 0,value:d,placeholder:"Codex on my laptop",onChange:e=>u(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),j())}}),(0,b.jsx)("label",{className:a.label,htmlFor:`${e}-add-host`,children:"Host"}),(0,b.jsx)("input",{id:`${e}-add-host`,type:"text",className:a.input||void 0,value:m,placeholder:t,"aria-describedby":`${e}-add-hint`,onChange:e=>h(e.target.value)}),(0,b.jsx)("p",{id:`${e}-add-hint`,className:a.hint,children:c.addConnection}),p?(0,b.jsx)("p",{className:a.error,role:"alert",children:p}):null,(0,b.jsxs)("div",{className:"reg-actions",children:[(0,b.jsx)("button",{type:"button",className:a.button,onClick:()=>void j(),disabled:g,children:g?"Adding…":"Add"}),(0,b.jsx)("button",{type:"button",className:a.button,"aria-expanded":"true",onClick:()=>r(!1),children:"Cancel"})]})]}):(0,b.jsx)("button",{type:"button",className:a.button,"aria-expanded":"false","aria-controls":`${e}-add-connection`,onClick:()=>r(!0),children:"Add connection…"})}e.s(["RegistrationFields",0,function({idPrefix:e,variant:s,form:t,onChange:i,view:r,showErrors:o,connections:m,onRetryConnections:p,onAddConnection:f,workspacePlaceholder:g,workspaceHint:x,sessions:v,includeHomeSession:k}){let w=y[s],_=e=>o?r.errors[e]:void 0,S=s=>`${e}-${s}-error`,$=(e,...s)=>[...s,_(e)?S(e):""].filter(Boolean).join(" ")||void 0,C=!!(v&&v.length>0);return(0,b.jsxs)("div",{className:"registration-fields","data-registration":s,children:[(0,b.jsxs)("fieldset",{className:w.fieldset,"data-field":"connection","aria-describedby":$("connection",`${e}-connection-hint`),children:[(0,b.jsx)("legend",{className:w.legend,id:`${e}-connection-legend`,children:l.connection}),"loading"===m.status?(0,b.jsx)("p",{className:w.note,role:"status",children:d}):"error"===m.status?(0,b.jsxs)("p",{className:w.note,role:"status",children:[u," ",(0,b.jsx)("button",{type:"button",className:w.button,onClick:p,children:"Retry"})]}):(0,b.jsxs)("select",{id:`${e}-connection`,className:w.control,"aria-labelledby":`${e}-connection-legend`,"aria-required":"true","aria-invalid":!!_("connection")||void 0,value:t.connectionId,onChange:e=>i({connectionId:e.target.value}),children:[(0,b.jsx)("option",{value:"",disabled:!0,children:"Select a connection…"}),m.connections.map(e=>(0,b.jsx)("option",{value:e.id,children:h(e)},e.id))]}),(0,b.jsx)("p",{id:`${e}-connection-hint`,className:w.hint,children:c.connection}),(0,b.jsx)(j,{id:S("connection"),message:_("connection"),variant:s}),"ready"===m.status?(0,b.jsx)(N,{idPrefix:e,variant:s,onAdd:async e=>{let s=await f(e);return"string"!=typeof s&&i({connectionId:s.id}),s}}):null]}),(0,b.jsxs)("fieldset",{className:w.fieldset,"data-field":"scope",children:[(0,b.jsx)("legend",{className:w.legend,id:`${e}-scope-legend`,children:l.scope}),(0,b.jsx)("div",{className:w.stack,role:"radiogroup","aria-labelledby":`${e}-scope-legend`,"aria-required":"true","aria-describedby":$("scope"),children:["workspaces","sessions","all_provider_sessions"].map(s=>(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"radio",name:`${e}-scope`,value:s,checked:t.scopeKind===s,disabled:"sessions"===s&&!C,onChange:()=>i({scopeKind:s})})," "+a[s]]},s))}),C?null:(0,b.jsx)("p",{className:w.hint,children:c.noSessions}),(0,b.jsx)(j,{id:S("scope"),message:_("scope"),variant:s}),"workspaces"===t.scopeKind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("label",{className:w.label,htmlFor:`${e}-workspaces`,children:"Workspaces"}),(0,b.jsx)("textarea",{id:`${e}-workspaces`,className:w.input||void 0,rows:2,value:t.workspaces,placeholder:"/Users/you/work/project","aria-required":"true","aria-invalid":!!_("workspaces")||void 0,"aria-describedby":$("workspaces",`${e}-workspaces-hint`),onChange:e=>i({workspaces:e.target.value})}),(0,b.jsx)("p",{id:`${e}-workspaces-hint`,className:w.hint,children:c.workspaces}),(0,b.jsx)(j,{id:S("workspaces"),message:_("workspaces"),variant:s})]}):null,"sessions"===t.scopeKind&&v?(0,b.jsxs)("div",{className:w.stack,role:"group","aria-label":"Sessions in scope","aria-describedby":$("sessions",`${e}-sessions-hint`),children:[v.map(e=>(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"checkbox",checked:t.sessions.includes(e.ref),onChange:s=>i({sessions:s.target.checked?[...t.sessions,e.ref]:t.sessions.filter(s=>s!==e.ref)})}),` ${e.title} (${e.status})`]},e.ref)),(0,b.jsx)("p",{id:`${e}-sessions-hint`,className:w.hint,children:c.sessions}),(0,b.jsx)(j,{id:S("sessions"),message:_("sessions"),variant:s})]}):null,"all_provider_sessions"===t.scopeKind?(0,b.jsx)("p",{className:w.hint,children:c.allSessions}):null]}),(0,b.jsxs)("div",{"data-field":"default-workspace",children:[(0,b.jsx)("label",{className:w.label,htmlFor:`${e}-default-workspace`,children:l.defaultWorkspace}),(0,b.jsx)("input",{id:`${e}-default-workspace`,type:"text",className:w.input||void 0,value:t.defaultWorkspace,placeholder:g,"aria-invalid":!!_("defaultWorkspace")||void 0,"aria-describedby":$("defaultWorkspace",`${e}-default-workspace-hint`,`${e}-default-workspace-note`),onChange:e=>i({defaultWorkspace:e.target.value})}),(0,b.jsx)("p",{id:`${e}-default-workspace-hint`,className:w.hint,children:x}),(0,b.jsx)("p",{id:`${e}-default-workspace-note`,className:w.hint,children:c.defaultWorkspace}),(0,b.jsx)(j,{id:S("defaultWorkspace"),message:_("defaultWorkspace"),variant:s})]}),(0,b.jsxs)("fieldset",{className:w.fieldset,"data-field":"policy",children:[(0,b.jsx)("legend",{className:w.legend,id:`${e}-policy-legend`,children:l.policy}),(0,b.jsx)("div",{className:w.picks,role:"radiogroup","aria-labelledby":`${e}-policy-legend`,children:["read_only","workspace_write"].map(s=>(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"radio",name:`${e}-policy`,value:s,checked:t.policyMode===s,onChange:()=>i("read_only"===s?{policyMode:s,allowResumeWithEdits:!1}:{policyMode:s})})," "+n[s]]},s))}),(0,b.jsxs)("div",{className:w.stack,children:[(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"checkbox",checked:t.allowNewSessions,onChange:e=>i({allowNewSessions:e.target.checked})})," Allow new sessions"]}),(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"checkbox",checked:t.allowResumeWithEdits,disabled:"workspace_write"!==t.policyMode,"aria-describedby":`${e}-resume-hint`,onChange:e=>i({allowResumeWithEdits:e.target.checked})})," Allow resume with edits"]}),(0,b.jsx)("p",{id:`${e}-resume-hint`,className:w.hint,children:c.resumeEdits})]}),(0,b.jsx)(j,{id:S("policy"),message:_("policy"),variant:s})]}),k?(0,b.jsxs)("div",{"data-field":"home-session",children:[(0,b.jsx)("label",{className:w.label,htmlFor:`${e}-home-session`,children:l.homeSession}),(0,b.jsxs)("select",{id:`${e}-home-session`,className:w.control,value:t.homeSessionId,"aria-describedby":`${e}-home-session-hint`,onChange:e=>i({homeSessionId:e.target.value}),children:[(0,b.jsx)("option",{value:"",children:"None"}),(v??[]).map(e=>(0,b.jsx)("option",{value:e.ref,children:`${e.title} (${e.status})`},e.ref))]}),(0,b.jsx)("p",{id:`${e}-home-session-hint`,className:w.hint,children:c.homeSession})]}):null]})}],44079),e.s(["useRuntimeConnections",0,function(){let[e,s]=(0,v.useState)(()=>m()),[t,n]=(0,v.useState)(0);return(0,v.useEffect)(()=>{let e=!1;return fetch(o,{cache:"no-store"}).then(async t=>{let n=t.ok?p(await t.json().catch(()=>null)):null;e||s(n?{status:"ready",connections:n,error:""}:{status:"error",connections:[],error:`HTTP ${t.status}`})}).catch(t=>{e||s({status:"error",connections:[],error:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},[t]),{state:e,retry:(0,v.useCallback)(()=>{s(m()),n(e=>e+1)},[]),add:(0,v.useCallback)(async e=>{let t=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok)return"string"==typeof n?.error?n.error:"Failed to add the connection";let a=p({connections:[n]})?.[0];return a?(s(e=>({status:"ready",connections:[...e.connections,a],error:""})),a):"Failed to add the connection"},[])}}],52900);let w="imported",_=/^[A-Za-z0-9_-]{1,128}$/;function S(e){let s=new URLSearchParams(e).get(w);if(null===s)return null;let t=s.trim();return _.test(t)?t:""}function $(e){return`/agents/${encodeURIComponent(e)}/config`}async function C(e,s,t){let n=S(e);if(null===n)return{kind:"none"};if(!n)return{kind:"missing"};if(n===s)return{kind:"stay"};try{return await t(n)?{kind:"open",path:$(n)}:{kind:"missing"}}catch{return{kind:"missing"}}}e.s(["HANDOFF_STATUS_PATH",0,"/api/marketplace-handoff/status","IMPORT_RETURN_QUERY",0,w,"handoffStartPath",0,function(e,s){return`/api/marketplace-handoff?return=${encodeURIComponent(e+s)}`},"importedBotId",0,S,"importedConfigPath",0,$,"marketImportView",0,function(e){switch(e){case"checking":return{busy:!0,tone:"muted",message:"Checking Grok Marketplace…"};case"redirecting":return{busy:!0,tone:"muted",message:"Opening Grok Marketplace…"};case"unavailable":return{busy:!1,tone:"error",message:"Grok Marketplace isn't configured. Set CLONE_MARKET_URL on the Botmancers server."};case"failed":return{busy:!1,tone:"error",message:"Couldn't reach Botmancers to start the import. Try again."};case"missing":return{busy:!1,tone:"error",message:"Imported agent not found. The import may not have completed."};default:return{busy:!1,tone:"muted",message:"Imports a new agent and opens its Config. This agent is not changed."}}},"resolveImportReturn",0,C],68541)},50814,63352,e=>{"use strict";function s(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function t(e){return e?e.split("/").filter(e=>e.length>0).pop()??null:null}function n(e,s){let t=function(e){if(!e)return null;let s=e.toLowerCase();return"muse code"===s?"muse":(["codex","claude","cursor","hermes","muse"].includes(s),s)}(s);switch(e){case"provider_unavailable":return t?{reason:`${t} is not installed or did not start`,fix:`Install ${t} and Retry.`}:{reason:"the runtime is not installed or did not start",fix:"Install the runtime and Retry."};case"auth_required":return{reason:"not signed in",fix:"Sign in and Retry."};case"permission_denied":return{reason:"permission denied",fix:"Check permissions and Retry."};case"incompatible_version":return{reason:"incompatible version",fix:"Update the runtime and Retry."};case"usage_limit":return{reason:"usage limit reached",fix:"Wait or upgrade and Retry."};case"scope_missing":return{reason:"no session scope is set",fix:"Choose a scope in Config."};case"provider_failed":return{reason:"the listing failed",fix:"Retry."};default:return{reason:e,fix:"Retry."}}}let a="Not reported";function i(e){return e.toFixed(1).replace(/\.0$/,"")}function r(e){return e.toLocaleString("en-US")}function o(e){return 0===e?"$0.00":e>=.01?`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:e<1e-4?"<$0.0001":`$${e.toFixed(4)}`}let l={input_tokens:"Input tokens",output_tokens:"Output tokens",cost_usd:"Cost"};function c(e,s,t){return"cost_usd"===e?o(s):t?r(s):s<1e3?String(s):s<999950?`${i(s/1e3)}k`:s<99995e4?`${i(s/1e6)}M`:`${i(s/1e9)}B`}function d(e){return`${e} ${1===e?"run":"runs"}`}function u(e,s,t=!1){let n=l[e];if(!s||"unavailable"===s.quality||null===s.sum)return{name:n,text:a,quality:"unavailable",coverage:s&&s.total>0?`0 of ${d(s.total)} reported`:"No runs recorded",label:`${n}: not reported`};let i=c(e,s.sum,t),r=c(e,s.sum,!0);return"partial"===s.quality?{name:n,text:i,quality:"partial",coverage:`Partial: ${s.known} of ${d(s.total)} reported`,label:`${n}: at least ${r}, partial, reported by ${s.known} of ${d(s.total)}`}:{name:n,text:i,quality:"complete",coverage:`All ${d(s.total)} reported`,label:`${n}: ${r}, reported by all ${d(s.total)}`}}e.s(["SESSION_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"ended",label:"Ended"}],"attemptLabel",0,function(e){let s="source"===e.role?"Started the session":"Resumed the session";return`${s} \xb7 ${e.outcome??"running"}`},"emptySessionsCopy",0,function(e,s,t,a){if("active"===e)return`${s} has no active sessions.`;if("ended"===e)return`${s} has no ended sessions.`;if(t?.last_error_code){let{reason:e,fix:s}=n(t.last_error_code,a),i=a?`${a} sessions`:"sessions";return`Could not read ${i}: ${e}. ${s}`}if(t&&null===t.synced_at)return`${s} has not synced sessions yet. Refresh to load past sessions.`;let i=t?.out_of_scope_count??0;return i>0?`${i} ${1===i?"session exists":"sessions exist"} outside ${s}'s scope. Widen the scope to see them.`:`${s} has no sessions yet. One appears after a coding run keeps its runtime context.`},"formatSessionDate",0,s,"formatSyncRelativeTime",0,function(e,s=Date.now()){if(null===e)return"never";let t=Math.max(0,s-e);if(t<6e4)return"just now";let n=Math.floor(t/6e4);if(n<60)return`${n} minute${1===n?"":"s"} ago`;let a=Math.floor(n/60);if(a<24)return`${a} hour${1===a?"":"s"} ago`;let i=Math.floor(a/24);return`${i} day${1===i?"":"s"} ago`},"noMatchingSessionsCopy",0,function(e,s){let n=e.trim();if(n)return`No sessions match “${n}”.`;let a=t(s);return a?`No sessions in ${a}.`:"No sessions match the current filters."},"registrationSessionSyncCopy",0,function(e,s){if("failed"===e.outcome){let{reason:t,fix:a}=n(e.error_code??"provider_failed",s);return`Could not read ${s} sessions: ${t}. ${a}`}if("unsupported"===e.outcome)return`Past sessions are not available for ${s}.`;let t=1===e.imported?"session":"sessions",a=`Loaded ${e.imported} ${t}`;return e.rejected_out_of_scope>0&&(a+=`, ${e.rejected_out_of_scope} outside the scope`),e.complete||(a+=", more remain"),`${a}.`},"runtimeLabel",0,function(e){return e.agent.transport?`${e.agent.adapter} \xb7 ${e.agent.transport}`:e.agent.adapter},"sessionOriginChips",0,function(e){let s=[],t=e.origin.work_request?.requester;return t?.kind==="person"?s.push("Human origin"):t?.kind==="bot"?s.push(t.name?`${t.name} Agent`:"Agent origin"):t?.kind==="service"&&s.push("Service origin"),e.origin.conversation&&s.push(e.origin.conversation.label),[...new Set(s)]},"sessionStateTags",0,function(e){let s=[];return(e.home&&s.push("Home"),e.state?.availability==="missing")?[...s,"Missing"]:(e.state?.lifecycle==="archived"&&s.push("Archived"),e.state?.busy&&s.push("Busy"),(e.resumable||e.state?.resumable===!0)&&s.push("Resumable"),s)},"sessionUsageLine",0,function(e){let s=u("input_tokens",e?.input_tokens),t=u("output_tokens",e?.output_tokens),n=u("cost_usd",e?.cost_usd),i=[s,t,n];if(i.every(e=>"unavailable"===e.quality))return{text:a,label:"Usage: not reported",quality:"unavailable",partial:!1};let r=["unavailable"===s.quality?"input not reported":`${s.text} in`,"unavailable"===t.quality?"output not reported":`${t.text} out`,"unavailable"===n.quality?"cost not reported":n.text].join(" · "),o=i.some(e=>"partial"===e.quality),l=o||i.some(e=>"unavailable"===e.quality)?"partial":"complete";return{text:r,label:`Reported usage: ${i.map(e=>e.label).join("; ")}`,quality:l,partial:o}},"statusLabel",0,function(e){return"active"===e.status?"Active":"Ended"},"usageMetricView",0,u,"usageSampleLabel",0,function(e,s){let t="turn"===e.kind?"start"===e.turn_kind?"provider turn, started":"provider turn":"resume"===e.turn_kind?"resumed":"started";return`Run ${s+1} \xb7 ${t}`},"usageSampleValues",0,function(e){return{input:null===e.input_tokens?a:r(e.input_tokens),output:null===e.output_tokens?a:r(e.output_tokens),cost:null===e.cost_usd?a:o(e.cost_usd)}},"workRequestLabel",0,function(e){var s;let t=e.origin.work_request;return t?`${(s=t.execution_kind)?s[0].toUpperCase()+s.slice(1):s} \xb7 ${t.state}`:null},"workspaceFolderName",0,t,"workspaceOptions",0,function(e){let s=[...new Set(e.filter(e=>"string"==typeof e&&e.length>0))],n=s.map(e=>t(e)??e);return s.map((e,s)=>({value:e,label:n.filter(e=>e===n[s]).length>1?e:n[s]})).sort((e,s)=>e.label<s.label?-1:+(e.label>s.label))}],63352);let m={ask:"Ask from this context",resume:"Resume work here",handoff:"Hand off to…"},h=["queued","extracting","delivering","completed","failed","cancelled"],p=["completed","failed","cancelled"];function f(e,s){switch(s){case"queued":return"Queued";case"extracting":return"ask"===e?"Asking the session":"Extracting handoff";case"delivering":return"Delivering handoff";case"completed":return"ask"===e?"Answered":"Handed off";case"failed":return"Failed";case"cancelled":return"Cancelled"}}function g(e,s=140){let t=String(e??"").split("\n").map(e=>e.trim()).filter(e=>e.length>0).join(" ");return t.length>s?`${t.slice(0,s-1).trimEnd()}…`:t}function x(e,s){return s.updated_at-e.updated_at||s.created_at-e.created_at||(e.id<s.id?-1:+(e.id>s.id))}e.s(["DEFAULT_LEDGER_FILTER",0,{mode:"all",state:"all",agentId:""},"INSTRUCTION_LIMIT",0,4e3,"MODE_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"ask",label:"Ask"},{value:"continue",label:"Continue"}],"STATE_FILTER_OPTIONS",0,[{value:"all",label:"Any status"},{value:"active",label:"In progress"},{value:"queued",label:"Queued"},{value:"extracting",label:"Asking / extracting"},{value:"delivering",label:"Delivering"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}],"detailsHref",0,function(e){return`/exchanges?id=${encodeURIComponent(e)}`},"eventLabel",0,function(e,s){let t=e.data??{},n=s.source.agent_name,a=s.destination?.agent_name??"the destination Agent",i="string"==typeof t.hop?t.hop:null;switch(e.type){case"created":return"ask"===s.mode?`You asked ${n}'s session a question`:`You handed ${n}'s session to ${a}`;case"hop_queued":if("deliver"===i)return`Handoff queued for ${a}'s new session`;return"extract"===i?`Handoff extraction queued in ${n}'s session`:`Question queued for ${n}'s session`;case"hop_started":if("deliver"===i)return`${a} started a new session`;return"extract"===i?`${n}'s session started extracting the handoff`:`${n}'s session started answering`;case"state_changed":{let e="string"==typeof t.to&&h.includes(t.to)?t.to:null;return e?`Now ${f(s.mode,e).toLowerCase()}`:"State changed"}case"answer_returned":return`Answer returned to ${s.origin?.label??"the origin thread"}${t.truncated?" (shortened)":""}`;case"packet_extracted":return"Handoff packet extracted";case"packet_rejected":return`Handoff packet refused${"string"==typeof t.reason?`: ${t.reason}`:""}`;case"destination_replied":return`${a} replied in ${s.destination?.conversation?.label??"its thread"}`;case"destination_session_rejected":return`${a}'s session was not new; the handoff stopped`;case"cancel_requested":return"You asked to cancel";case"hop_result_discarded":return"A late result was discarded";default:return e.type.replace(/_/g," ")}},"excerpt",0,g,"exchangeRequestBody",0,function(e,s,t){let n={mode:e.mode,idempotency_key:t,origin_conversation_id:e.originConversationId,source:{agent_id:s.agentId,session_ref:s.sessionRef},instruction:e.instruction.trim()};return"continue"===e.mode&&(n.destination={agent_id:e.destinationAgentId}),n},"failureAdvice",0,function(e){if("failed"!==e.state)return null;switch(e.failure?.code){case"packet_invalid":case"packet_missing":return"The source session did not return a usable handoff. Start a new Continue with a clearer objective.";case"destination_session_invalid":return"The destination did not start a fresh session. Check its runtime, then start a new Continue.";case"destination_turn_failed":return"Check the destination Agent’s runtime, then start a new Continue from the source session.";case"source_turn_failed":return"Check the source Agent’s runtime, then start a new exchange from its Sessions.";default:return"Start a new exchange from the session to try again."}},"formatExchangeTime",0,function(e){return s(e)},"instructionHeading",0,function(e){return"ask"===e?"Question":"Objective"},"ledgerAgents",0,function(e){let s=new Map;for(let t of e)s.set(t.source.agent_id,t.source.agent_name),t.destination&&s.set(t.destination.agent_id,t.destination.agent_name);return[...s.entries()].map(([e,s])=>({id:e,name:s})).sort((e,s)=>e.name.localeCompare(s.name)||e.id.localeCompare(s.id))},"ledgerRows",0,function(e,s){return e.filter(e=>("all"===s.mode||e.mode===s.mode)&&("active"!==s.state||!e.terminal)&&("all"===s.state||"active"===s.state||e.state===s.state)&&(!s.agentId||e.source.agent_id===s.agentId||e.destination?.agent_id===s.agentId)).sort(x)},"ledgerView",0,function(e,s,t){return null===e?s?"error":"loading":0===e.length?"empty":0===t.length?"filtered-out":"rows"},"linkRoleLabel",0,function(e){let s={origin:"Started here",source:"Source session",destination:"Destination"};return e.map(e=>s[e]).join(" · ")},"liveStateLabel",0,function(e){var s;return e.cancel_requested&&(s=e.state,!p.includes(s))?"Cancelling…":f(e.mode,e.state)},"modeLabel",0,function(e){return"ask"===e?"Ask":"Continue"},"outcomeLine",0,function(e){if("completed"===e.state){if("ask"===e.mode){let s=e.origin?.label??"the origin thread";return e.outcome.answer?`Answer in ${s}: ${g(e.outcome.answer,200)}`:`Answered in ${s}.`}let s=e.destination?.agent_name??"The destination Agent";return e.outcome.reply?`${s} picked it up in a new session: ${g(e.outcome.reply,200)}`:`${s} picked it up in a new session.`}return"failed"===e.state?e.failure?.message||"The exchange failed.":"cancelled"===e.state?"Cancelled before it finished. Nothing more will run.":null},"participantsLabel",0,function(e){return"ask"===e.mode?`You → ${e.source.agent_name}`:`${e.source.agent_name} → ${e.destination?.agent_name??"another Agent"}`},"pinRequestBody",0,function(e,s,t,n,a){return{action:e,content:s.trim(),conversation_id:t,idempotency_key:a,..."resume"===e?{approve_write:n}:{}}},"sessionDialogMode",0,function(e){return"handoff"===e?"continue":e},"sessionDialogTitle",0,function(e){return m["continue"===e?"handoff":e]},"sessionDialogUsesPin",0,function(e,s){return"resume"===e||"ask"===e&&"provider"===s},"sessionLabel",0,function(e){return`${e.source.agent_name}'s session “${e.source.session_title}”`},"sessionRowActions",0,function(e){let s;if(e.actions)s=e.actions;else{let t="ended"===e.status?{available:!1,reason:"Ask from this context and Hand off to… are unavailable: this session has ended. Its history stays here."}:e.resumable?{available:!0}:{available:!1,reason:`Ask from this context and Hand off to… are unavailable: Botmancers can’t resume this session under ${e.agent.name}’s current runtime.`},n=t.available?{available:!0}:{available:!1,code:"ended"===e.status?"session_ended":"session_not_resumable",reason:t.reason,recovery:"choose_session"};s={ask:n,resume:{available:!1,code:"action_unavailable",reason:`${m.resume} is unavailable: this runtime can’t resume a session with edits.`,recovery:"choose_action"},handoff:n}}return["ask","resume","handoff"].map(e=>({action:e,label:m[e],availability:s[e]}))},"stateTone",0,function(e){return"completed"===e?"done":"failed"===e||"cancelled"===e?"stopped":"active"},"submitErrorMessage",0,function(e,s){switch(e){case"session_ended":return"This session has ended and can’t be resumed.";case"session_not_resumable":return"Botmancers can’t resume this session under the Agent’s current runtime.";case"source_session_busy":return"This session already has an exchange in progress. Wait for it or cancel it from its card.";case"agent_unavailable":return s||"That Agent can’t launch yet. Choose its runtime connection and session scope in Config.";case"idempotency_conflict":return"This request changed while it was being sent. Send again.";case"session_missing":return"The runtime no longer has this session. Its history stays here; choose another session.";case"approval_required":return"Resume work here needs your approval of edits. Tick the approval, then send again.";case"authority_not_allowed":return s||"This Agent’s policy doesn’t allow edits in a resumed session. Change it in Config.";case"action_unavailable":return s||"This runtime can’t do that in this session. Choose another action.";case"provider_failed":return"The runtime failed this turn. Nothing moved to another session; try again later.";default:return s||"The exchange could not be started. Your draft is kept; try again."}},"threadHref",0,function(e,s){let t=new URLSearchParams;if(e.thread_agent_id){s&&t.set("exchange",s);let n=t.toString();return`/agents/${encodeURIComponent(e.thread_agent_id)}/conversations/${encodeURIComponent(e.id)}${n?`?${n}`:""}`}if("group"!==e.kind)return null;s&&t.set("exchange",s);let n=t.toString();return`/threads/${encodeURIComponent(e.id)}${n?`?${n}`:""}`},"validateDraft",0,function(e){let s={},t=e.instruction.trim(),n="ask"===e.mode?"a question":"an objective";return t?e.instruction.length>4e3&&(s.instruction="Keep it under 4000 characters."):s.instruction=`Enter ${n}.`,e.originConversationId||(s.origin="Choose the thread that follows this exchange."),"continue"!==e.mode||e.destinationAgentId||(s.destination="Choose the Agent who continues the work."),s},"validateResumeDraft",0,function(e,s){let t={};return e.trim()?e.length>4e3&&(t.instruction="Keep it under 4000 characters."):t.instruction="Enter what to work on.",s||(t.approval="Approve edits in this session to resume work here."),t}],50814)},24204,e=>{"use strict";var s=e.i(63352),t=e.i(50814);function n(e){return"active"===e.state}let a=/^T[A-Z0-9]{2,20}$/,i=/^[CG][A-Z0-9]{2,20}$/;e.s(["SHARE_DURATIONS",0,[{label:"5 minutes",seconds:300},{label:"1 hour",seconds:3600},{label:"8 hours",seconds:28800},{label:"24 hours",seconds:86400}],"SHARE_STATUS_LABELS",0,{active:"Active",exhausted:"Questions used",answering:"Answering",recovering:"Recovering",expired:"Expired",revoked:"Revoked"},"audienceInputError",0,function(e,s,t){let n=e.trim(),r=s.trim();return a.test(n)?i.test(r)?t.some(e=>e.team_id===n&&e.channel_id===r)?"That channel is already on the allowlist.":null:"Channel ID must look like C0123ABCD (a public or private channel ID; no wildcards).":"Workspace ID must look like T0123ABCD (a Slack team ID; no wildcards)."},"audienceLabel",0,function(e){return`Slack channel ${e.channel_id} \xb7 workspace ${e.team_id}`},"createdByLabel",0,function(e){return"owner"===e.created_by?"Shared by you":"current_session"===e.created_by?"Shared from a turn of this session":"Shared by a service"},"expiryLabel",0,function(e,t=Date.now()){return"revoked"===e.state?`Revoked ${(0,s.formatSessionDate)(e.revoked_at??e.expires_at)}`:"expired"===e.state||e.expires_at<=t?`Expired ${(0,s.formatSessionDate)(e.expires_at)}`:`Expires ${(0,s.formatSessionDate)(e.expires_at)} (in ${function(e){let s=Math.max(1,Math.round(e/6e4));if(s<60)return`${s} min`;let t=Math.floor(s/60),n=s%60;return n?`${t} h ${n} min`:`${t} h`}(e.expires_at-t)})`},"sessionShares",0,function(e,s){let t=e.filter(e=>e.session_ref===s);return[...t.filter(n).sort((e,s)=>s.created_at-e.created_at),...t.filter(e=>!n(e)).sort((e,s)=>(s.revoked_at??s.expires_at)-(e.revoked_at??e.expires_at))]},"shareCreateAvailability",0,function(e,s){let n=`/agents/${encodeURIComponent(e.agent.id)}/config#session-sharing`;if(!s)return{available:!1,reason:"Share to Slack is unavailable: the share policy could not be loaded.",configHref:null};let a=(0,t.sessionRowActions)(e).find(e=>"ask"===e.action);return a&&!a.availability.available?{available:!1,reason:a.availability.reason.replace(/^Ask from this context is unavailable:/,"Share to Slack is unavailable:"),configHref:null}:"invalid"===s.state?{available:!1,reason:"Share to Slack is unavailable: the share policy file is invalid. Fix it in Config.",configHref:n}:0===s.audiences.length?{available:!1,reason:"Share to Slack needs a Slack channel on the share allowlist. Add one in Config.",configHref:n}:{available:!0}},"shareCreateBody",0,function(e,s,t,n){return{audience:{team_id:e.team_id,channel_id:e.channel_id},ttl_seconds:s,max_turns:t,idempotency_key:n}},"shareFromTurnNote",0,function(e){return e.agent.share_current.supported?e.agent.share_from_turn?"On: a turn Botmancers launches for this Agent can share its own session to an allowlisted channel. Turning it off revokes every live turn context at once.":"Off: no turn of this Agent can share its own session. Sessions can still be shared from the Agent Sessions page.":e.agent.share_current.reason??"This runtime cannot share its own session from a turn."},"shareIsLive",0,n,"shareStatusNote",0,function(e){switch(e.status){case"active":return"Slack replies in its thread ask this session (read-only).";case"answering":return"A Slack question is being answered now. The next one waits until it finishes.";case"recovering":return"A question was interrupted by a Botmancers restart. The next Slack question clears it.";case"exhausted":return`All ${e.max_turns} questions are used. Slack questions get the limit notice; create a new share to keep going.`;case"expired":return"Expired: Slack questions get the expired notice. Its history stays here.";case"revoked":return"Revoked: Slack questions get the revoked notice. Its history stays here."}},"threadLabel",0,function(e){return e.thread.posted?`Slack thread posted ${(0,s.formatSessionDate)(e.thread.posted_at??0)}`:"active"===e.state?"Waiting for the Slack relay to post the thread":"No Slack thread was posted"},"turnsLabel",0,function(e){return`${e.turns_used} of ${e.max_turns} question${1===e.max_turns?"":"s"} used`}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97393,e=>{"use strict";var s=e.i(43476),t=e.i(71645),n=e.i(22016),a=e.i(18566),i=e.i(15983),r=e.i(24204);function o({agentId:e,agentName:n}){let a=(0,t.useId)(),i=(0,t.useId)(),l=(0,t.useId)(),[c,d]=(0,t.useState)(null),[u,m]=(0,t.useState)(""),[h,p]=(0,t.useState)(0),[f,g]=(0,t.useState)("idle"),[x,b]=(0,t.useState)(""),[v,k]=(0,t.useState)(""),[y,j]=(0,t.useState)(""),[N,w]=(0,t.useState)(""),[_,S]=(0,t.useState)("");(0,t.useEffect)(()=>{let s=!1;return fetch(`/api/bots/${encodeURIComponent(e)}/share-policy`,{cache:"no-store"}).then(async e=>{let t=await e.json().catch(()=>null);s||(e.ok&&t?.policy?(m(""),d(t.policy)):m("Could not load the share policy."))}).catch(()=>{s||m("Could not load the share policy.")}),()=>{s=!0}},[e,h]);let $=()=>{b(""),g("idle"),p(e=>e+1)},C=async(s,t)=>{if(!c)return!1;g("saving"),b(""),k("");try{let n=await fetch(`/api/bots/${encodeURIComponent(e)}/share-policy`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({revision:c.revision,...s})}),a=await n.json().catch(()=>null);if(!n.ok||!a?.policy)return g("error"),b("string"==typeof a?.error?.message?a.error.message:"The share policy could not be saved."),!1;return d(a.policy),g("idle"),k(t("number"==typeof a.revoked_contexts?a.revoked_contexts:0)),!0}catch{return g("error"),b("The share policy could not be saved."),!1}},A=async e=>{if(e.preventDefault(),!c)return;let s=(0,r.audienceInputError)(y,N,c.audiences);if(S(s??""),s)return;let t={kind:"slack",team_id:y.trim(),channel_id:N.trim()};await C({audiences:[...c.audiences,t]},()=>`Added ${(0,r.audienceLabel)(t)}.`)&&(j(""),w(""))},R="saving"===f,T=!!c&&"invalid"!==c.state;return(0,s.jsxs)("section",{className:"cfg-card share-policy",id:"session-sharing","aria-labelledby":"cfg-sharing-title",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{id:"cfg-sharing-title",className:"cfg-title",children:"Session sharing"}),R?(0,s.jsx)("span",{className:"text-sm cfg-faint",role:"status",children:"Saving…"}):null]}),(0,s.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:["A share lets people in one Slack channel ask one of ",n,"’s sessions questions, read-only, until it expires or you revoke it. Create and revoke shares from Sessions."]}),u?(0,s.jsxs)("p",{className:"text-sm cfg-error",role:"alert",children:[u," ",(0,s.jsx)("button",{type:"button",onClick:$,className:"underline hover:no-underline",children:"Retry"})]}):null,c||u?null:(0,s.jsx)("p",{className:"text-sm cfg-faint",role:"status",children:"Loading…"}),c?.state==="invalid"?(0,s.jsxs)("p",{className:"text-sm cfg-error mb-3",role:"alert",children:["The share policy file is invalid, so nothing can be shared: ",c.reason," Fix or remove config/session-shares.json, then"," ",(0,s.jsx)("button",{type:"button",onClick:$,className:"underline hover:no-underline",children:"reload"}),"."]}):null,c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"share-policy-toggle",children:[(0,s.jsx)("input",{id:a,type:"checkbox",role:"switch",checked:c.agent.share_from_turn,"aria-checked":c.agent.share_from_turn,disabled:!T||R||!c.agent.share_current.supported&&!c.agent.share_from_turn,"data-share-policy":"share_from_turn",onChange:e=>{let s=e.target.checked;C({share_from_turn:s},e=>s?"Share from a turn is on.":`Share from a turn is off.${e?` Revoked ${e} live turn context${1===e?"":"s"}.`:""}`)}}),(0,s.jsxs)("label",{htmlFor:a,className:"text-sm",children:[(0,s.jsx)("span",{className:"font-medium",children:"Share from a turn"})," (",(0,s.jsx)("code",{className:"cfg-code",children:"share_from_turn"}),")"]})]}),(0,s.jsx)("p",{className:"text-sm cfg-faint share-policy-hint",children:(0,r.shareFromTurnNote)(c)}),c.agent.live_contexts>0?(0,s.jsxs)("p",{className:"text-sm cfg-faint share-policy-hint",children:[c.agent.live_contexts," live turn context",1===c.agent.live_contexts?"":"s"," now."]}):null,(0,s.jsx)("h3",{className:"cfg-title share-policy-sub",children:"Slack channel allowlist"}),(0,s.jsx)("p",{className:"text-sm cfg-faint",children:"Every agent’s shares use this list. A share can only go to a channel on it."}),0===c.audiences.length?(0,s.jsx)("p",{className:"text-sm cfg-muted share-policy-empty",children:"No channel yet: nothing can be shared to Slack."}):(0,s.jsx)("ul",{className:"share-policy-list","aria-label":"Allowed Slack channels",children:c.audiences.map(e=>(0,s.jsxs)("li",{className:"share-policy-entry",children:[(0,s.jsx)("span",{className:"cfg-code",children:e.channel_id}),(0,s.jsxs)("span",{className:"cfg-faint",children:["workspace ",e.team_id]}),(0,s.jsx)("button",{type:"button",className:"cfg-link text-sm share-policy-remove",disabled:!T||R,"aria-label":`Remove ${(0,r.audienceLabel)(e)}`,onClick:()=>{c&&C({audiences:c.audiences.filter(s=>s.team_id!==e.team_id||s.channel_id!==e.channel_id)},()=>`Removed ${(0,r.audienceLabel)(e)}. Its Slack threads stop being answered.`)},children:"Remove"})]},`${e.team_id}:${e.channel_id}`))}),(0,s.jsxs)("form",{className:"share-policy-add",onSubmit:e=>{A(e)},"aria-label":"Add a Slack channel",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:i,className:"text-sm",children:"Workspace ID"}),(0,s.jsx)("input",{id:i,className:"cfg-input",value:y,placeholder:"T0123ABCD",autoComplete:"off",spellCheck:!1,disabled:!T||R,"aria-invalid":!!_,onChange:e=>{j(e.target.value),S("")}})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:l,className:"text-sm",children:"Channel ID"}),(0,s.jsx)("input",{id:l,className:"cfg-input",value:N,placeholder:"C0123ABCD",autoComplete:"off",spellCheck:!1,disabled:!T||R,"aria-invalid":!!_,onChange:e=>{w(e.target.value),S("")}})]}),(0,s.jsx)("button",{type:"submit",className:"cfg-btn-primary text-sm",disabled:!T||R||!y.trim()||!N.trim(),children:"Add channel"})]}),_?(0,s.jsx)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:_}):null,"error"===f?(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:["Couldn't save: ",x," ",(0,s.jsx)("button",{type:"button",onClick:$,className:"underline hover:no-underline",children:"Reload"})]}):null,(0,s.jsx)("p",{className:"mt-2 text-sm cfg-ok",role:"status",children:v})]}):null]})}var l=e.i(10718),c=e.i(74904),d=e.i(33851),u=e.i(44079),m=e.i(52900),h=e.i(87303);function p({attribute:e,label:n,options:a,current:i,onPick:r,className:o}){let l=(0,t.useId)(),c=`avatar-${e}`;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{id:l,className:"avatar-group-label",children:n}),(0,s.jsx)("div",{className:o?`avatar-opt-grid ${o}`:"avatar-opt-grid",role:"radiogroup","aria-labelledby":l,children:a.map(t=>(0,s.jsxs)("label",{title:t.label,className:"avatar-opt",children:[(0,s.jsx)("input",{type:"radio",name:c,value:t.id,checked:i[e]===t.id,onChange:()=>r({[e]:t.id}),className:"avatar-opt-input"}),(0,s.jsx)("span",{className:"avatar-opt-art","aria-hidden":"true",children:(0,s.jsx)(h.default,{config:{...i,[e]:t.id},size:44})}),(0,s.jsx)("span",{children:t.label})]},t.id))})]})}var f=e.i(68541);function g({phase:e,onImport:t}){let n=(0,f.marketImportView)(e);return(0,s.jsxs)("div",{className:"mt-3","data-field":"marketplace-import",children:[(0,s.jsx)("button",{type:"button",onClick:t,disabled:n.busy,"aria-busy":n.busy,"aria-describedby":"cfg-market-import-status",className:"cfg-btn-ghost text-sm w-full sm:w-auto",children:"Import from Grok Marketplace"}),(0,s.jsx)("p",{id:"cfg-market-import-status",role:"status","aria-live":"polite",className:"error"===n.tone?"mt-2 text-sm cfg-error":"mt-2 text-xs cfg-faint",children:n.message})]})}var x=e.i(37947);let b="Fix the highlighted fields.",v=[{key:"avatar_accessory",label:"Avatar accessory"},{key:"avatar_color",label:"Avatar color"},{key:"avatar_eyes",label:"Avatar eyes"},{key:"avatar_hands",label:"Avatar hands"},{key:"description",label:"Description (rules)"},{key:"import_operation_id",label:"Import operation ID"},{key:"import_schema_version",label:"Import schema version"},{key:"memories",label:"Remembered facts"},{key:"name",label:"Name"},{key:"skill_content",label:"Skill content"},{key:"skill_path",label:"Skill path"},{key:"skill_present",label:"Skill present"},{key:"source_provider",label:"Source provider"},{key:"template_id",label:"Template ID"},{key:"template_url",label:"Template URL"},{key:"title",label:"Title"}];function k(e){return String(e).padStart(2,"0")}function y(e){let s=new Date(e);return`${s.getFullYear()}-${k(s.getMonth()+1)}-${k(s.getDate())} ${k(s.getHours())}:${k(s.getMinutes())}`}function j(e){let s=new Date(e);return`${k(s.getHours())}:${k(s.getMinutes())}:${k(s.getSeconds())}`}async function N(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}e.s(["default",0,function(){var e;let r=String((0,a.useParams)().id??""),k=(0,a.useRouter)(),[w,_]=(0,t.useState)(!1),[S,$]=(0,t.useState)(null),[C,A]=(0,t.useState)(!0),[R,T]=(0,t.useState)(!1),[I,E]=(0,t.useState)(!1),[D,L]=(0,t.useState)(0),[O,q]=(0,t.useState)(null),[F,U]=(0,t.useState)("clean"),[P,W]=(0,t.useState)(""),[H,M]=(0,t.useState)(0),[B,K]=(0,t.useState)(!1),[V,Y]=(0,t.useState)(""),[G,J]=(0,t.useState)("clean"),[Q,z]=(0,t.useState)(""),[Z,X]=(0,t.useState)(0),[ee,es]=(0,t.useState)({}),[et,en]=(0,t.useState)(""),[ea,ei]=(0,t.useState)(!1),[er,eo]=(0,t.useState)(null),[el,ec]=(0,t.useState)(!1),ed=(0,m.useRuntimeConnections)(),[eu,em]=(0,t.useState)(void 0),[eh,ep]=(0,t.useState)("clean"),[ef,eg]=(0,t.useState)(""),[ex,eb]=(0,t.useState)(0),[ev,ek]=(0,t.useState)(null),[ey,ej]=(0,t.useState)("clean"),[eN,ew]=(0,t.useState)(""),[e_,eS]=(0,t.useState)(0),{phase:e$,startImport:eC}=function(e){let[s,n]=(0,t.useState)("idle");return(0,t.useEffect)(()=>{let s=window.location.search;if(null===(0,f.importedBotId)(s))return;let t=new URL(window.location.href);t.searchParams.delete(f.IMPORT_RETURN_QUERY),window.history.replaceState(null,"",t.pathname+t.search);let a=!1;return(0,f.resolveImportReturn)(s,e,async e=>(await fetch(`/api/bots/${encodeURIComponent(e)}/config`,{cache:"no-store"})).ok).then(e=>{a||("open"===e.kind?window.location.replace(e.path):"missing"===e.kind&&n("missing"))}),()=>{a=!0}},[e]),{phase:s,startImport:async function(){n("checking");try{let e=await fetch(f.HANDOFF_STATUS_PATH,{cache:"no-store"}),s=await e.json().catch(()=>null);if(!e.ok)return void n("failed");if(s?.configured!==!0)return void n("unavailable");n("redirecting"),window.location.href=(0,f.handoffStartPath)(window.location.origin,window.location.pathname),setTimeout(()=>n(e=>"redirecting"===e?"idle":e),4e3)}catch{n("failed")}}}}(r);function eA(){A(!0),T(!1),L(e=>e+1)}(0,t.useEffect)(()=>{if(!r)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(r)}/sessions?status=all`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(s=>{e||em((s?.sessions??[]).map(e=>({ref:e.ref,title:e.title,status:e.status})))}).catch(()=>{e||em([])}),()=>{e=!0}},[r,D]),(0,t.useEffect)(()=>{if(!r)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(r)}/config`).then(async s=>{if(e)return;if(404===s.status){E(!0),$(null);return}if(!s.ok)throw Error("request failed");let t=await s.json();e||($(t),q(t.bot.description??""),E(!1),T(!1))}).catch(()=>{e||T(!0)}).finally(()=>{e||A(!1)}),()=>{e=!0}},[r,D]);let eR=S?.bot.description??"",eT=null!==O&&O!==eR,eI=S?.skill.content??"",eE=B&&V!==eI,eD=S?(0,d.registrationFormFromBot)(S.bot):null,eL=ea&&null!==er&&JSON.stringify(er)!==JSON.stringify(eD),eO=S?.bot.avatar_config??(0,x.resolveAvatar)(S?.bot??{}),eq=ev??eO,eF=null!==ev&&JSON.stringify(ev)!==JSON.stringify(eO),eU=eT||eE||eL||eF;function eP(e,s){N(s).then(s=>{s&&(en(e),setTimeout(()=>en(s=>s===e?"":s),2e3))})}async function eW(){if(S&&null!==O){U("saving"),W("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:S.bot.id,description:O})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(r)}/config`);if(!s.ok)throw Error("request failed");$(await s.json()),U("confirmed"),M(Date.now()),setTimeout(()=>{U(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){U("error"),W(e instanceof Error?e.message:"request failed")}}}function eH(){S&&(eo((0,d.registrationFormFromBot)(S.bot)),ei(!0),ec(!1),ep("clean"),eg(""),ed.retry())}function eM(e){eo(s=>s?{...s,...e}:s),eg(""),ep(e=>"error"===e?"clean":e)}function eB(){ei(!1),eo(null),ep("clean"),eg("")}function eK(e){ek({...ev??eO,...e}),ej("clean"),ew("")}async function eV(){if(S&&ev){ej("saving"),ew("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:S.bot.id,avatar:ev})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(r)}/config`);if(!s.ok)throw Error("request failed");$(await s.json()),ek(null),ej("confirmed"),eS(Date.now()),setTimeout(()=>{ej(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){ej("error"),ew(e instanceof Error?e.message:"request failed")}}}async function eY(){if(S&&er){if((0,d.hasRegistrationErrors)((0,d.registrationFormView)(er,ed.state))){ec(!0),ep("error"),eg(b);return}ep("saving"),eg("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,d.registrationPatchBody)(S.bot.id,er))});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await fetch(`/api/bots/${encodeURIComponent(r)}/config`);if(!s.ok)throw Error("request failed");$(await s.json()),ei(!1),eo(null),ep("confirmed"),eb(Date.now()),setTimeout(()=>{ep(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){ep("error"),eg(e instanceof Error?e.message:"request failed")}}}function eG(){Y(S?.skill.content??""),K(!0),J("clean"),z("")}async function eJ(){if(S&&(V.trim()||window.confirm("Delete this skill file?"))){J("saving"),z("");try{let e=await fetch(`/api/bots/${encodeURIComponent(r)}/skill`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:V})});if(!e.ok){let s="request failed";try{let t=await e.json();t.error&&(s=t.error)}catch{}throw Error(s)}let s=await e.json();$(e=>e?{...e,skill:s.skill,currentHash:s.currentHash}:e),K(!1),J("confirmed"),X(Date.now()),setTimeout(()=>{J(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){J("error"),z(e instanceof Error?e.message:"request failed")}}}if((0,t.useEffect)(()=>{if(!eU)return;let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[eU]),I)return(0,s.jsx)("div",{className:"cfg-page cfg-page-framed",children:(0,s.jsxs)("div",{className:"agent-state",children:[(0,s.jsx)("h2",{children:"Agent not found"}),(0,s.jsx)("p",{children:"This agent does not exist or was removed."}),(0,s.jsx)(n.default,{href:"/",children:"Choose an agent"})]})});if(C&&!S)return(0,s.jsx)("div",{className:"cfg-page cfg-page-framed",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto space-y-6",children:[(0,s.jsx)("div",{className:"h-12 rounded-lg animate-pulse cfg-skel"}),(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,s.jsx)("div",{className:"space-y-6",children:[0,1,2].map(e=>(0,s.jsx)("div",{className:"h-48 rounded-lg animate-pulse cfg-skel"},e))}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)("div",{className:"h-64 rounded-lg animate-pulse cfg-skel"}),(0,s.jsx)("div",{className:"h-80 rounded-lg animate-pulse cfg-skel"})]})]})]})});if(R&&!S)return(0,s.jsx)("div",{className:"cfg-page cfg-page-framed",children:(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsxs)("header",{className:"mb-6 flex flex-wrap items-center gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"agent-eyebrow",children:"Config"}),(0,s.jsx)("h2",{className:"text-xl font-bold truncate",children:"Couldn't load agent details"})]}),(0,s.jsxs)("div",{className:"ml-auto text-right",children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash: ",(0,s.jsx)("code",{className:"cfg-code",children:"—"})]}),(0,s.jsx)("p",{className:"text-sm mt-1",children:(0,s.jsx)("span",{className:"cfg-faint",children:"○ Not loaded"})})]})]}),(0,s.jsx)("div",{className:"grid gap-6 lg:grid-cols-2 items-start",children:[["Skills","Rules","Agent","Template source"],["Launch snapshots","Avatar"]].map(e=>(0,s.jsx)("div",{className:"min-w-0 space-y-6",children:e.map(e=>(0,s.jsxs)("div",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-2",children:e}),(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Couldn't load this section."," ",(0,s.jsx)("button",{onClick:eA,className:"cfg-link",children:"Retry"})]})]},e))},e[0]))})]})});if(!S)return null;let{bot:eQ,skill:ez,currentHash:eZ,snapshots:eX}=S,e0=!!(eQ.source_provider||eQ.template_id||eQ.template_url||eQ.import_schema_version||eQ.import_operation_id),e1="saving"===F?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eT||"error"===F?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===F?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(H)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e2="saving"===G?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eE||"error"===G?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===G?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(Z)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e3="saving"===eh?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eL||"error"===eh?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===eh?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(ex)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e4="saving"===ey?(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eF||"error"===ey?(0,s.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===ey?(0,s.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",j(e_)]}):(0,s.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"});return(0,s.jsxs)("div",{className:"cfg-page cfg-page-framed",children:[(0,s.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,s.jsxs)("header",{className:"mb-6 flex flex-wrap items-center gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"agent-eyebrow",children:"Config"}),(0,s.jsx)("h2",{className:"text-xl font-bold truncate",children:"Standing setup"})]}),(0,s.jsxs)("div",{className:"ml-auto text-right",children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash:"," ",(0,s.jsx)("code",{className:"cfg-code",title:eZ,children:eZ.slice(0,8)})," ",(0,s.jsx)("button",{onClick:()=>eP("header",eZ),className:"cfg-link text-sm",children:"header"===et?"Copied":"Copy"})]}),(0,s.jsx)("p",{className:"text-sm mt-1",children:eU?(0,s.jsxs)("span",{className:"cfg-dirty",children:[(0,s.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):(0,s.jsx)("span",{className:"cfg-faint",children:"● Saved"})})]})]}),(0,s.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2 items-start","data-cfg-layout":"columns",children:[(0,s.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"primary",children:[(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Skills"}),e2]}),"unsupported"===ez.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Unsupported name"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"Skill files need an agent name matching /^[A-Za-z0-9_-]+$/ — this name cannot map to a skill path."})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:[ez.path," · ","present"===ez.status?"Present":"Not present"]}),B?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("textarea",{value:V,onChange:e=>Y(e.target.value),rows:8,className:"cfg-input text-sm"}),"error"===G&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",Q,"."," ",(0,s.jsx)("button",{onClick:eJ,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eJ,disabled:!eE||"saving"===G,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===G?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){K(!1),J("clean"),z("")},disabled:!eE||"saving"===G,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}):"present"===ez.status?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("pre",{className:"text-sm cfg-pre max-h-64 overflow-y-auto",children:ez.content}),(0,s.jsx)("button",{onClick:eG,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"No skill file yet. Create SKILL.md to give this agent standing instructions."}),(0,s.jsx)("button",{onClick:eG,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Create"})]}),(0,s.jsx)("p",{className:"mt-3 text-xs cfg-faint",children:"Appended verbatim as a system message at launch."})]})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Rules"}),e1]}),(0,s.jsx)("textarea",{value:O??"",onChange:e=>q(e.target.value),rows:8,className:"cfg-input cfg-input-sans text-sm"}),(0,s.jsx)("p",{className:"mt-2 text-xs cfg-faint",children:"Sent verbatim as the standing-rules system message on every turn. This beats the user's request for detail or length."}),"error"===F&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",P,"."," ",(0,s.jsx)("button",{onClick:eW,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eW,disabled:!eT||"saving"===F,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===F?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){q(eR),U("clean"),W("")},disabled:!eT||"saving"===F,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Agent"}),e3]}),(()=>{if(!ea||!er){let e=(0,d.registrationReadView)(eQ,eu);return(0,s.jsxs)("div",{"data-field":"runtime-read",children:[(0,s.jsx)("dl",{className:"text-sm",children:e.rows.map(e=>(0,s.jsxs)("div",{"data-row":e.key,className:"flex flex-col sm:flex-row sm:justify-between gap-x-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:e.label}),(0,s.jsx)("dd",{className:"sm:text-right break-words cfg-muted",children:e.value})]},e.key))}),e.notices.map(e=>(0,s.jsx)("p",{className:"text-sm cfg-dirty mt-2",children:e},e)),(0,s.jsx)("button",{onClick:eH,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]})}let e=(0,d.registrationFormView)(er,ed.state);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.RegistrationFields,{idPrefix:"cfg",variant:"config",form:er,onChange:eM,view:e,showErrors:el,connections:ed.state,onRetryConnections:ed.retry,onAddConnection:ed.add,workspacePlaceholder:(0,c.defaultWorkdirFor)(eQ.id),workspaceHint:(0,c.configWorkspaceHint)(eQ.id),sessions:eu,includeHomeSession:!0}),"error"===eh&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:[ef===b?ef:`Couldn't save: ${ef}.`," ",ef===b?null:(0,s.jsx)("button",{onClick:eY,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eY,disabled:!eL||"saving"===eh||e.submitDisabled,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===eh?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:eB,disabled:"saving"===eh,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:eL?"Discard":"Cancel"})]})]})})()]}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-3",children:"Template source"}),!e0&&(0,s.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Created manually in Botmancers — no template source."}),(0,s.jsxs)("dl",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Source provider"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.source_provider??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Template ID"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.template_id??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Template URL"}),(0,s.jsx)("dd",{className:"text-right break-all",children:eQ.template_url?(e=eQ.template_url).startsWith("http://")||e.startsWith("https://")?(0,s.jsx)("a",{href:eQ.template_url,className:"cfg-link",children:eQ.template_url}):eQ.template_url:"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Import schema version"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.import_schema_version??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Import operation ID"}),(0,s.jsx)("dd",{className:"text-right break-all",children:eQ.import_operation_id??"—"})]}),(0,s.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-y cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:"Imported at"}),(0,s.jsx)("dd",{className:"text-right",children:eQ.import_timestamp?y(eQ.import_timestamp):"—"})]})]}),(0,s.jsx)(g,{phase:e$,onImport:()=>{eC()}})]})]}),(0,s.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"secondary",children:[(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsx)("h2",{className:"cfg-title mb-3",children:"Launch snapshots"}),0===eX.length?(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"No launches recorded yet."}):(0,s.jsx)("ul",{className:"space-y-3",children:eX.map(e=>{let t=e.hash===eZ,n=!!ee[e.id];return(0,s.jsxs)("li",{className:"cfg-row",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("p",{className:"text-sm",children:[y(e.created_at)," · ",e.id.slice(0,4),e.transport?` \xb7 ${e.transport}`:null]}),(0,s.jsx)("button",{onClick:()=>es(s=>({...s,[e.id]:!s[e.id]})),"aria-label":n?"Collapse snapshot detail":"Expand snapshot detail",className:"cfg-chevron px-1",children:n?"▾":"▸"})]}),(0,s.jsxs)("p",{className:"mt-1 text-sm",children:[(0,s.jsx)("code",{className:"cfg-code",children:e.hash.slice(0,12)})," ",(0,s.jsx)("button",{onClick:()=>eP(e.id,e.hash),className:"cfg-link text-sm",children:et===e.id?"Copied":"Copy"})]}),(0,s.jsx)("p",{className:"mt-1 text-sm",children:t?(0,s.jsx)("span",{className:"cfg-ok",children:"● Matches current config"}):(0,s.jsx)("span",{className:"cfg-faint",children:"○ Config changed since"})}),n&&(0,s.jsxs)("div",{className:"mt-3 pt-3 border-t cfg-line text-sm",children:[(0,s.jsxs)("p",{className:"cfg-muted break-all",children:[(0,s.jsx)("span",{className:"font-medium",children:"Launch ID:"})," ",e.id]}),(0,s.jsxs)("p",{className:"mt-1 cfg-muted break-all",children:[(0,s.jsx)("span",{className:"font-medium",children:"Hash:"})," ",(0,s.jsx)("code",{className:"cfg-code",children:e.hash})]}),(0,s.jsx)("dl",{className:"mt-2",children:v.map(t=>{let n=e.snapshot[t.key];return(0,s.jsxs)("div",{className:"py-1 border-t cfg-line",children:[(0,s.jsx)("dt",{className:"cfg-faint",children:t.label}),(0,s.jsx)("dd",{className:"whitespace-pre-wrap break-words",children:null==n?(0,s.jsx)("span",{className:"cfg-faint",children:"null"}):Array.isArray(n)?0===n.length?(0,s.jsx)("span",{className:"cfg-faint",children:"(none)"}):(0,s.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:n.map(e=>`- ${e}`).join("\n")}):"boolean"==typeof n?String(n):""===n?(0,s.jsx)("span",{className:"cfg-faint",children:"(empty)"}):(0,s.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:n})})]},t.key)})})]})]},e.id)})})]}),(0,s.jsx)(o,{agentId:eQ.id,agentName:eQ.name}),(0,s.jsxs)("section",{className:"cfg-card",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("h2",{className:"cfg-title",children:"Avatar"}),e4]}),(0,s.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,s.jsx)(h.default,{config:eq,size:96,title:"Avatar live preview"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:"Outline style: the color is the line color, nothing is filled. Pick an option to preview, then Save."})]}),(0,s.jsx)(p,{attribute:"color",label:"Color",options:x.AVATAR_COLORS,current:eq,onPick:eK,className:"mb-3"}),(0,s.jsx)(p,{attribute:"eyes",label:"Eyes",options:x.AVATAR_EYES,current:eq,onPick:eK,className:"mb-3"}),(0,s.jsx)(p,{attribute:"hands",label:"Hands",options:x.AVATAR_HANDS,current:eq,onPick:eK,className:"mb-3"}),(0,s.jsx)(p,{attribute:"accessory",label:"Accessory",options:x.AVATAR_ACCESSORIES,current:eq,onPick:eK}),"error"===ey&&(0,s.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",eN,"."," ",(0,s.jsx)("button",{onClick:eV,className:"underline hover:no-underline",children:"Retry"})]}),(0,s.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,s.jsx)("button",{onClick:eV,disabled:!eF||"saving"===ey,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===ey?"Saving…":"Save"}),(0,s.jsx)("button",{onClick:function(){ek(null),ej("clean"),ew("")},disabled:!eF||"saving"===ey,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,s.jsxs)("section",{className:"cfg-card cfg-danger","aria-labelledby":"cfg-danger-title",children:[(0,s.jsx)("h2",{id:"cfg-danger-title",className:"cfg-title mb-3",children:"Danger zone"}),(0,s.jsx)("p",{className:"text-sm cfg-muted",children:l.DELETE_REMOVES_COPY}),(0,s.jsx)("p",{className:"text-sm cfg-faint mt-2",children:l.DELETE_KEEPS_COPY}),(0,s.jsx)("button",{type:"button",onClick:()=>_(!0),className:"mt-3 delete-btn text-sm w-full sm:w-auto",children:"Delete agent"})]})]})]})]}),w?(0,s.jsx)(i.default,{ids:[eQ.id],onCancel:()=>_(!1),onDeleted:e=>k.push(`/?deleted=${Math.max(e.length,1)}`)}):null]})}],97393)},33851,44079,52900,68541,e=>{"use strict";var s=e.i(3136);let t="This computer",n={read_only:"Read only",workspace_write:"Workspace write"},a={workspaces:"Selected workspaces",sessions:"Selected imported sessions",all_provider_sessions:"All sessions this runtime can see"};function i(e){return e.startsWith("/")||"~"===e||e.startsWith("~/")}function r(e){return e.length>1?e.replace(/\/+$/,""):e}s.AGENTS.join("|");let o="/api/runtime-connections",l={connection:"Runtime connection",scope:"Session scope",defaultWorkspace:"Default workspace (optional)",policy:"Policy",homeSession:"Home session (optional)"},c={connection:"The runtime installation or account this agent uses. Several agents can share one.",workspaces:"One absolute path per line. An empty scope never means unrestricted.",sessions:"Only this agent’s own Botmancers sessions can be selected.",noSessions:"This Agent has no sessions yet. Choose workspaces or all sessions for now.",allSessions:"Every session this runtime can see. Choose this only on purpose.",defaultWorkspace:"Where new sessions start. Convenience only — not a permission.",resumeEdits:"Needs Workspace write.",homeSession:"A stable session to return to. Must be one of this agent’s sessions.",addConnection:"Stores a name and host only. Credentials stay with the runtime."},d="Loading runtime connections…",u="Couldn't load runtime connections — retry.";function m(){return{status:"loading",connections:[],error:""}}function h(e){return`${e.label} \xb7 ${s.AGENT_LABELS[e.provider]??e.provider}`}function p(e){if("object"!=typeof e||null===e)return null;let s=e.connections;if(!Array.isArray(s))return null;let t=[];for(let e of s){if("object"!=typeof e||null===e||"string"!=typeof e.id||"string"!=typeof e.provider||"string"!=typeof e.label)return null;t.push({id:e.id,provider:e.provider,label:e.label,host:"string"==typeof e.host?e.host:"",agent_count:"number"==typeof e.agent_count?e.agent_count:void 0})}return t}function f(e){let s=[];for(let t of e.split("\n")){let e=t.trim();e&&!s.includes(e)&&s.push(e)}return s}function g(e){return"workspaces"===e.scopeKind?{kind:"workspaces",workspaces:f(e.workspaces)}:"sessions"===e.scopeKind?{kind:"sessions",sessions:e.sessions}:{kind:e.scopeKind}}function x(e){return{mode:e.policyMode,allow_new_sessions:e.allowNewSessions,allow_resume_with_edits:e.allowResumeWithEdits}}e.s(["CONNECTIONS_ENDPOINT",0,o,"CONNECTIONS_ERROR_COPY",0,u,"CONNECTIONS_LOADING_COPY",0,d,"DEFAULT_REGISTRATION_FORM",0,{connectionId:"",scopeKind:"",workspaces:"",sessions:[],defaultWorkspace:"",policyMode:"read_only",allowNewSessions:!0,allowResumeWithEdits:!1,homeSessionId:""},"HINTS",0,c,"LABELS",0,l,"connectionOptionLabel",0,h,"hasRegistrationErrors",0,function(e){return Object.keys(e.errors).length>0},"initialConnectionListState",0,m,"parseConnectionList",0,p,"registrationCreateBody",0,function(e,s){let t={name:String(e??"").trim(),runtime_connection_id:s.connectionId,session_scope:g(s),policy:x(s)},n=s.defaultWorkspace.trim();return n&&(t.default_workspace=n),t},"registrationFormFromBot",0,function(e){let s=e.session_scope??null;return{connectionId:e.runtime_connection_id??"",scopeKind:s?.kind??"",workspaces:s?.kind==="workspaces"?s.workspaces.join("\n"):"",sessions:s?.kind==="sessions"?[...s.sessions]:[],defaultWorkspace:e.default_workspace??"",policyMode:e.policy?.mode??"read_only",allowNewSessions:!e.policy||e.policy.allow_new_sessions,allowResumeWithEdits:!!e.policy&&e.policy.allow_resume_with_edits,homeSessionId:e.home_session_id??""}},"registrationFormView",0,function(e,s){let t={};e.connectionId||(t.connection="Pick a runtime connection.");let n=f(e.workspaces);e.scopeKind?"workspaces"===e.scopeKind?0===n.length?t.workspaces="Add at least one workspace.":n.every(i)||(t.workspaces="Workspaces must be absolute paths (or start with ~/)."):"sessions"===e.scopeKind&&0===e.sessions.length&&(t.sessions="Select at least one session."):t.scope="Choose a session scope.";let a=e.defaultWorkspace.trim();a&&(i(a)?"workspaces"!==e.scopeKind||t.workspaces||n.some(e=>{let s,t;return s=r(e),s===(t=r(a))||t.startsWith("/"===s?"/":`${s}/`)})||(t.defaultWorkspace="The default workspace must be inside one of the selected workspaces."):t.defaultWorkspace="The default workspace must be an absolute path (or start with ~/)."),e.allowResumeWithEdits&&"workspace_write"!==e.policyMode&&(t.policy="Resume with edits needs the Workspace write policy.");let o="",l=!1;return"ready"!==s.status&&(l=!0,o="error"===s.status?u:""),{errors:t,submitDisabled:l,blocker:o}},"registrationPatchBody",0,function(e,s){return{id:e,runtime_connection_id:s.connectionId,session_scope:g(s),default_workspace:s.defaultWorkspace.trim(),policy:x(s),home_session_id:s.homeSessionId}},"registrationReadView",0,function(e,t){var i;let r,o=[{key:"connection",label:l.connection,value:(r=e.runtime_connection)?`${r.label} (${(0,s.agentLabel)(r.provider)} \xb7 ${r.host})`:"Not set"},{key:"scope",label:l.scope,value:function(e,s){if(!e)return"Not set — this agent cannot launch until a scope is chosen.";if("all_provider_sessions"===e.kind)return a.all_provider_sessions;if("workspaces"===e.kind)return`${a.workspaces}: ${e.workspaces.join(", ")}`;let t=e.sessions.map(e=>s?.find(s=>s.ref===e)?.title??e);return`${a.sessions}: ${t.join(", ")}`}(e.session_scope,t)},{key:"defaultWorkspace",label:"Default workspace",value:e.default_workspace||"None"},{key:"policy",label:l.policy,value:(i=e.policy)?[n[i.mode],i.allow_new_sessions?"new sessions allowed":"no new sessions",i.allow_resume_with_edits?"resume with edits allowed":"no resume with edits"].join(" · "):"Not set"}],c=[];return o.push({key:"homeSession",label:"Home session",value:e.home_session_id?t?.find(s=>s.ref===e.home_session_id)?.title??e.home_session_id:"None"}),"connection"===e.launch_blocker?c.push("Choose a runtime connection before this agent can run."):"session_scope"===e.launch_blocker?c.push("Choose a session scope before this agent can run."):"agent"===e.launch_blocker&&c.push("This Agent has an unsupported Agent type."),{rows:o,notices:c}}],33851);var b=e.i(43476),v=e.i(71645),k=e.i(74904);let y={modal:{fieldset:"agent-fieldset reg-fieldset",legend:"field-legend",label:"",picks:"runtime-picks",pick:"runtime-pick",stack:"reg-stack",control:"reg-control",input:"",hint:"runtime-hint",error:"form-error reg-error",button:"runtime-retry",note:"runtime-note"},config:{fieldset:"agent-fieldset reg-fieldset",legend:"block text-sm cfg-muted mt-3 mb-1 p-0",label:"block text-sm cfg-muted mt-3 mb-1",picks:"flex flex-wrap gap-x-4 gap-y-1 text-sm cfg-muted",pick:"text-sm cfg-muted",stack:"flex flex-col gap-1 text-sm cfg-muted",control:"cfg-input text-sm",input:"cfg-input text-sm",hint:"mt-1 text-xs cfg-faint",error:"mt-1 text-sm cfg-error",button:"cfg-link text-sm",note:"text-sm cfg-muted mt-1"}};function j({id:e,message:s,variant:t}){return s?(0,b.jsx)("p",{id:e,className:y[t].error,role:"alert",children:s}):null}function N({idPrefix:e,variant:s,onAdd:n}){let a=y[s],[i,r]=(0,v.useState)(!1),[o,l]=(0,v.useState)(k.AGENT_OPTIONS[0].value),[d,u]=(0,v.useState)(""),[m,h]=(0,v.useState)(""),[p,f]=(0,v.useState)(""),[g,x]=(0,v.useState)(!1),j=async()=>{if(g)return;x(!0),f("");let e=await n({provider:o,label:d,host:m.trim()||t});(x(!1),"string"==typeof e)?f(e):(r(!1),u(""),h(""))};return i?(0,b.jsxs)("div",{id:`${e}-add-connection`,className:"reg-add-connection",role:"group","aria-label":"Add connection",children:[(0,b.jsx)("label",{className:a.label,htmlFor:`${e}-add-provider`,children:"Provider"}),(0,b.jsx)("select",{id:`${e}-add-provider`,className:a.control,value:o,onChange:e=>l(e.target.value),children:k.AGENT_OPTIONS.map(e=>(0,b.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,b.jsx)("label",{className:a.label,htmlFor:`${e}-add-label`,children:"Connection name"}),(0,b.jsx)("input",{id:`${e}-add-label`,type:"text",className:a.input||void 0,value:d,placeholder:"Codex on my laptop",onChange:e=>u(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),j())}}),(0,b.jsx)("label",{className:a.label,htmlFor:`${e}-add-host`,children:"Host"}),(0,b.jsx)("input",{id:`${e}-add-host`,type:"text",className:a.input||void 0,value:m,placeholder:t,"aria-describedby":`${e}-add-hint`,onChange:e=>h(e.target.value)}),(0,b.jsx)("p",{id:`${e}-add-hint`,className:a.hint,children:c.addConnection}),p?(0,b.jsx)("p",{className:a.error,role:"alert",children:p}):null,(0,b.jsxs)("div",{className:"reg-actions",children:[(0,b.jsx)("button",{type:"button",className:a.button,onClick:()=>void j(),disabled:g,children:g?"Adding…":"Add"}),(0,b.jsx)("button",{type:"button",className:a.button,"aria-expanded":"true",onClick:()=>r(!1),children:"Cancel"})]})]}):(0,b.jsx)("button",{type:"button",className:a.button,"aria-expanded":"false","aria-controls":`${e}-add-connection`,onClick:()=>r(!0),children:"Add connection…"})}e.s(["RegistrationFields",0,function({idPrefix:e,variant:s,form:t,onChange:i,view:r,showErrors:o,connections:m,onRetryConnections:p,onAddConnection:f,workspacePlaceholder:g,workspaceHint:x,sessions:v,includeHomeSession:k}){let w=y[s],_=e=>o?r.errors[e]:void 0,S=s=>`${e}-${s}-error`,$=(e,...s)=>[...s,_(e)?S(e):""].filter(Boolean).join(" ")||void 0,C=!!(v&&v.length>0);return(0,b.jsxs)("div",{className:"registration-fields","data-registration":s,children:[(0,b.jsxs)("fieldset",{className:w.fieldset,"data-field":"connection","aria-describedby":$("connection",`${e}-connection-hint`),children:[(0,b.jsx)("legend",{className:w.legend,id:`${e}-connection-legend`,children:l.connection}),"loading"===m.status?(0,b.jsx)("p",{className:w.note,role:"status",children:d}):"error"===m.status?(0,b.jsxs)("p",{className:w.note,role:"status",children:[u," ",(0,b.jsx)("button",{type:"button",className:w.button,onClick:p,children:"Retry"})]}):(0,b.jsxs)("select",{id:`${e}-connection`,className:w.control,"aria-labelledby":`${e}-connection-legend`,"aria-required":"true","aria-invalid":!!_("connection")||void 0,value:t.connectionId,onChange:e=>i({connectionId:e.target.value}),children:[(0,b.jsx)("option",{value:"",disabled:!0,children:"Select a connection…"}),m.connections.map(e=>(0,b.jsx)("option",{value:e.id,children:h(e)},e.id))]}),(0,b.jsx)("p",{id:`${e}-connection-hint`,className:w.hint,children:c.connection}),(0,b.jsx)(j,{id:S("connection"),message:_("connection"),variant:s}),"ready"===m.status?(0,b.jsx)(N,{idPrefix:e,variant:s,onAdd:async e=>{let s=await f(e);return"string"!=typeof s&&i({connectionId:s.id}),s}}):null]}),(0,b.jsxs)("fieldset",{className:w.fieldset,"data-field":"scope",children:[(0,b.jsx)("legend",{className:w.legend,id:`${e}-scope-legend`,children:l.scope}),(0,b.jsx)("div",{className:w.stack,role:"radiogroup","aria-labelledby":`${e}-scope-legend`,"aria-required":"true","aria-describedby":$("scope"),children:["workspaces","sessions","all_provider_sessions"].map(s=>(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"radio",name:`${e}-scope`,value:s,checked:t.scopeKind===s,disabled:"sessions"===s&&!C,onChange:()=>i({scopeKind:s})})," "+a[s]]},s))}),C?null:(0,b.jsx)("p",{className:w.hint,children:c.noSessions}),(0,b.jsx)(j,{id:S("scope"),message:_("scope"),variant:s}),"workspaces"===t.scopeKind?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("label",{className:w.label,htmlFor:`${e}-workspaces`,children:"Workspaces"}),(0,b.jsx)("textarea",{id:`${e}-workspaces`,className:w.input||void 0,rows:2,value:t.workspaces,placeholder:"/Users/you/work/project","aria-required":"true","aria-invalid":!!_("workspaces")||void 0,"aria-describedby":$("workspaces",`${e}-workspaces-hint`),onChange:e=>i({workspaces:e.target.value})}),(0,b.jsx)("p",{id:`${e}-workspaces-hint`,className:w.hint,children:c.workspaces}),(0,b.jsx)(j,{id:S("workspaces"),message:_("workspaces"),variant:s})]}):null,"sessions"===t.scopeKind&&v?(0,b.jsxs)("div",{className:w.stack,role:"group","aria-label":"Sessions in scope","aria-describedby":$("sessions",`${e}-sessions-hint`),children:[v.map(e=>(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"checkbox",checked:t.sessions.includes(e.ref),onChange:s=>i({sessions:s.target.checked?[...t.sessions,e.ref]:t.sessions.filter(s=>s!==e.ref)})}),` ${e.title} (${e.status})`]},e.ref)),(0,b.jsx)("p",{id:`${e}-sessions-hint`,className:w.hint,children:c.sessions}),(0,b.jsx)(j,{id:S("sessions"),message:_("sessions"),variant:s})]}):null,"all_provider_sessions"===t.scopeKind?(0,b.jsx)("p",{className:w.hint,children:c.allSessions}):null]}),(0,b.jsxs)("div",{"data-field":"default-workspace",children:[(0,b.jsx)("label",{className:w.label,htmlFor:`${e}-default-workspace`,children:l.defaultWorkspace}),(0,b.jsx)("input",{id:`${e}-default-workspace`,type:"text",className:w.input||void 0,value:t.defaultWorkspace,placeholder:g,"aria-invalid":!!_("defaultWorkspace")||void 0,"aria-describedby":$("defaultWorkspace",`${e}-default-workspace-hint`,`${e}-default-workspace-note`),onChange:e=>i({defaultWorkspace:e.target.value})}),(0,b.jsx)("p",{id:`${e}-default-workspace-hint`,className:w.hint,children:x}),(0,b.jsx)("p",{id:`${e}-default-workspace-note`,className:w.hint,children:c.defaultWorkspace}),(0,b.jsx)(j,{id:S("defaultWorkspace"),message:_("defaultWorkspace"),variant:s})]}),(0,b.jsxs)("fieldset",{className:w.fieldset,"data-field":"policy",children:[(0,b.jsx)("legend",{className:w.legend,id:`${e}-policy-legend`,children:l.policy}),(0,b.jsx)("div",{className:w.picks,role:"radiogroup","aria-labelledby":`${e}-policy-legend`,children:["read_only","workspace_write"].map(s=>(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"radio",name:`${e}-policy`,value:s,checked:t.policyMode===s,onChange:()=>i("read_only"===s?{policyMode:s,allowResumeWithEdits:!1}:{policyMode:s})})," "+n[s]]},s))}),(0,b.jsxs)("div",{className:w.stack,children:[(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"checkbox",checked:t.allowNewSessions,onChange:e=>i({allowNewSessions:e.target.checked})})," Allow new sessions"]}),(0,b.jsxs)("label",{className:w.pick,children:[(0,b.jsx)("input",{type:"checkbox",checked:t.allowResumeWithEdits,disabled:"workspace_write"!==t.policyMode,"aria-describedby":`${e}-resume-hint`,onChange:e=>i({allowResumeWithEdits:e.target.checked})})," Allow resume with edits"]}),(0,b.jsx)("p",{id:`${e}-resume-hint`,className:w.hint,children:c.resumeEdits})]}),(0,b.jsx)(j,{id:S("policy"),message:_("policy"),variant:s})]}),k?(0,b.jsxs)("div",{"data-field":"home-session",children:[(0,b.jsx)("label",{className:w.label,htmlFor:`${e}-home-session`,children:l.homeSession}),(0,b.jsxs)("select",{id:`${e}-home-session`,className:w.control,value:t.homeSessionId,"aria-describedby":`${e}-home-session-hint`,onChange:e=>i({homeSessionId:e.target.value}),children:[(0,b.jsx)("option",{value:"",children:"None"}),(v??[]).map(e=>(0,b.jsx)("option",{value:e.ref,children:`${e.title} (${e.status})`},e.ref))]}),(0,b.jsx)("p",{id:`${e}-home-session-hint`,className:w.hint,children:c.homeSession})]}):null]})}],44079),e.s(["useRuntimeConnections",0,function(){let[e,s]=(0,v.useState)(()=>m()),[t,n]=(0,v.useState)(0);return(0,v.useEffect)(()=>{let e=!1;return fetch(o,{cache:"no-store"}).then(async t=>{let n=t.ok?p(await t.json().catch(()=>null)):null;e||s(n?{status:"ready",connections:n,error:""}:{status:"error",connections:[],error:`HTTP ${t.status}`})}).catch(t=>{e||s({status:"error",connections:[],error:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},[t]),{state:e,retry:(0,v.useCallback)(()=>{s(m()),n(e=>e+1)},[]),add:(0,v.useCallback)(async e=>{let t=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>null);if(!t.ok)return"string"==typeof n?.error?n.error:"Failed to add the connection";let a=p({connections:[n]})?.[0];return a?(s(e=>({status:"ready",connections:[...e.connections,a],error:""})),a):"Failed to add the connection"},[])}}],52900);let w="imported",_=/^[A-Za-z0-9_-]{1,128}$/;function S(e){let s=new URLSearchParams(e).get(w);if(null===s)return null;let t=s.trim();return _.test(t)?t:""}function $(e){return`/agents/${encodeURIComponent(e)}/config`}async function C(e,s,t){let n=S(e);if(null===n)return{kind:"none"};if(!n)return{kind:"missing"};if(n===s)return{kind:"stay"};try{return await t(n)?{kind:"open",path:$(n)}:{kind:"missing"}}catch{return{kind:"missing"}}}e.s(["HANDOFF_STATUS_PATH",0,"/api/marketplace-handoff/status","IMPORT_RETURN_QUERY",0,w,"handoffStartPath",0,function(e,s){return`/api/marketplace-handoff?return=${encodeURIComponent(e+s)}`},"importedBotId",0,S,"importedConfigPath",0,$,"marketImportView",0,function(e){switch(e){case"checking":return{busy:!0,tone:"muted",message:"Checking Grok Marketplace…"};case"redirecting":return{busy:!0,tone:"muted",message:"Opening Grok Marketplace…"};case"unavailable":return{busy:!1,tone:"error",message:"Grok Marketplace isn't configured. Set CLONE_MARKET_URL on the Botmancers server."};case"failed":return{busy:!1,tone:"error",message:"Couldn't reach Botmancers to start the import. Try again."};case"missing":return{busy:!1,tone:"error",message:"Imported agent not found. The import may not have completed."};default:return{busy:!1,tone:"muted",message:"Imports a new agent and opens its Config. This agent is not changed."}}},"resolveImportReturn",0,C],68541)},50814,63352,e=>{"use strict";function s(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}function t(e){return e?e.split("/").filter(e=>e.length>0).pop()??null:null}function n(e,s){let t=function(e){if(!e)return null;let s=e.toLowerCase();return"muse code"===s?"muse":(["codex","claude","cursor","hermes","muse"].includes(s),s)}(s);switch(e){case"provider_unavailable":return t?{reason:`${t} is not installed or did not start`,fix:`Install ${t} and Retry.`}:{reason:"the runtime is not installed or did not start",fix:"Install the runtime and Retry."};case"auth_required":return{reason:"not signed in",fix:"Sign in and Retry."};case"permission_denied":return{reason:"permission denied",fix:"Check permissions and Retry."};case"incompatible_version":return{reason:"incompatible version",fix:"Update the runtime and Retry."};case"usage_limit":return{reason:"usage limit reached",fix:"Wait or upgrade and Retry."};case"scope_missing":return{reason:"no session scope is set",fix:"Choose a scope in Config."};case"provider_failed":return{reason:"the listing failed",fix:"Retry."};default:return{reason:e,fix:"Retry."}}}let a="Not reported";function i(e){return e.toFixed(1).replace(/\.0$/,"")}function r(e){return e.toLocaleString("en-US")}function o(e){return 0===e?"$0.00":e>=.01?`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:e<1e-4?"<$0.0001":`$${e.toFixed(4)}`}let l={input_tokens:"Input tokens",output_tokens:"Output tokens",cost_usd:"Cost"};function c(e,s,t){return"cost_usd"===e?o(s):t?r(s):s<1e3?String(s):s<999950?`${i(s/1e3)}k`:s<99995e4?`${i(s/1e6)}M`:`${i(s/1e9)}B`}function d(e){return`${e} ${1===e?"run":"runs"}`}function u(e,s,t=!1){let n=l[e];if(!s||"unavailable"===s.quality||null===s.sum)return{name:n,text:a,quality:"unavailable",coverage:s&&s.total>0?`0 of ${d(s.total)} reported`:"No runs recorded",label:`${n}: not reported`};let i=c(e,s.sum,t),r=c(e,s.sum,!0);return"partial"===s.quality?{name:n,text:i,quality:"partial",coverage:`Partial: ${s.known} of ${d(s.total)} reported`,label:`${n}: at least ${r}, partial, reported by ${s.known} of ${d(s.total)}`}:{name:n,text:i,quality:"complete",coverage:`All ${d(s.total)} reported`,label:`${n}: ${r}, reported by all ${d(s.total)}`}}e.s(["SESSION_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"ended",label:"Ended"}],"attemptLabel",0,function(e){let s="source"===e.role?"Started the session":"Resumed the session";return`${s} \xb7 ${e.outcome??"running"}`},"emptySessionsCopy",0,function(e,s,t,a){if("active"===e)return`${s} has no active sessions.`;if("ended"===e)return`${s} has no ended sessions.`;if(t?.last_error_code){let{reason:e,fix:s}=n(t.last_error_code,a),i=a?`${a} sessions`:"sessions";return`Could not read ${i}: ${e}. ${s}`}if(t&&null===t.synced_at)return`${s} has not synced sessions yet. Refresh to load past sessions.`;let i=t?.out_of_scope_count??0;return i>0?`${i} ${1===i?"session exists":"sessions exist"} outside ${s}'s scope. Widen the scope to see them.`:`${s} has no sessions yet. One appears after a coding run keeps its runtime context.`},"formatSessionDate",0,s,"formatSyncRelativeTime",0,function(e,s=Date.now()){if(null===e)return"never";let t=Math.max(0,s-e);if(t<6e4)return"just now";let n=Math.floor(t/6e4);if(n<60)return`${n} minute${1===n?"":"s"} ago`;let a=Math.floor(n/60);if(a<24)return`${a} hour${1===a?"":"s"} ago`;let i=Math.floor(a/24);return`${i} day${1===i?"":"s"} ago`},"noMatchingSessionsCopy",0,function(e,s){let n=e.trim();if(n)return`No sessions match “${n}”.`;let a=t(s);return a?`No sessions in ${a}.`:"No sessions match the current filters."},"registrationSessionSyncCopy",0,function(e,s){if("failed"===e.outcome){let{reason:t,fix:a}=n(e.error_code??"provider_failed",s);return`Could not read ${s} sessions: ${t}. ${a}`}if("unsupported"===e.outcome)return`Past sessions are not available for ${s}.`;let t=1===e.imported?"session":"sessions",a=`Loaded ${e.imported} ${t}`;return e.rejected_out_of_scope>0&&(a+=`, ${e.rejected_out_of_scope} outside the scope`),e.complete||(a+=", more remain"),`${a}.`},"runtimeLabel",0,function(e){return e.agent.transport?`${e.agent.adapter} \xb7 ${e.agent.transport}`:e.agent.adapter},"sessionConversationHref",0,function(e){return e.thread_agent_id?`/agents/${encodeURIComponent(e.thread_agent_id)}/conversations`:"group"===e.kind?`/threads/${encodeURIComponent(e.id)}`:null},"sessionOriginChips",0,function(e){let s=[],t=e.origin.work_request?.requester;return t?.kind==="person"?s.push("Human origin"):t?.kind==="bot"?s.push(t.name?`${t.name} Agent`:"Agent origin"):t?.kind==="service"&&s.push("Service origin"),e.origin.conversation&&s.push(e.origin.conversation.label),[...new Set(s)]},"sessionStateTags",0,function(e){let s=[];return(e.home&&s.push("Home"),e.state?.availability==="missing")?[...s,"Missing"]:(e.state?.lifecycle==="archived"&&s.push("Archived"),e.state?.busy&&s.push("Busy"),(e.resumable||e.state?.resumable===!0)&&s.push("Resumable"),s)},"sessionUsageLine",0,function(e){let s=u("input_tokens",e?.input_tokens),t=u("output_tokens",e?.output_tokens),n=u("cost_usd",e?.cost_usd),i=[s,t,n];if(i.every(e=>"unavailable"===e.quality))return{text:a,label:"Usage: not reported",quality:"unavailable",partial:!1};let r=["unavailable"===s.quality?"input not reported":`${s.text} in`,"unavailable"===t.quality?"output not reported":`${t.text} out`,"unavailable"===n.quality?"cost not reported":n.text].join(" · "),o=i.some(e=>"partial"===e.quality),l=o||i.some(e=>"unavailable"===e.quality)?"partial":"complete";return{text:r,label:`Reported usage: ${i.map(e=>e.label).join("; ")}`,quality:l,partial:o}},"statusLabel",0,function(e){return"active"===e.status?"Active":"Ended"},"usageMetricView",0,u,"usageSampleLabel",0,function(e,s){let t="turn"===e.kind?"start"===e.turn_kind?"provider turn, started":"provider turn":"resume"===e.turn_kind?"resumed":"started";return`Run ${s+1} \xb7 ${t}`},"usageSampleValues",0,function(e){return{input:null===e.input_tokens?a:r(e.input_tokens),output:null===e.output_tokens?a:r(e.output_tokens),cost:null===e.cost_usd?a:o(e.cost_usd)}},"workRequestLabel",0,function(e){var s;let t=e.origin.work_request;return t?`${(s=t.execution_kind)?s[0].toUpperCase()+s.slice(1):s} \xb7 ${t.state}`:null},"workspaceFolderName",0,t,"workspaceOptions",0,function(e){let s=[...new Set(e.filter(e=>"string"==typeof e&&e.length>0))],n=s.map(e=>t(e)??e);return s.map((e,s)=>({value:e,label:n.filter(e=>e===n[s]).length>1?e:n[s]})).sort((e,s)=>e.label<s.label?-1:+(e.label>s.label))}],63352);let m={ask:"Ask from this context",resume:"Resume work here",handoff:"Hand off to…"},h=["queued","extracting","delivering","completed","failed","cancelled"],p=["completed","failed","cancelled"];function f(e,s){switch(s){case"queued":return"Queued";case"extracting":return"ask"===e?"Asking the session":"Extracting handoff";case"delivering":return"Delivering handoff";case"completed":return"ask"===e?"Answered":"Handed off";case"failed":return"Failed";case"cancelled":return"Cancelled"}}function g(e,s=140){let t=String(e??"").split("\n").map(e=>e.trim()).filter(e=>e.length>0).join(" ");return t.length>s?`${t.slice(0,s-1).trimEnd()}…`:t}function x(e,s){return s.updated_at-e.updated_at||s.created_at-e.created_at||(e.id<s.id?-1:+(e.id>s.id))}e.s(["DEFAULT_LEDGER_FILTER",0,{mode:"all",state:"all",agentId:""},"INSTRUCTION_LIMIT",0,4e3,"MODE_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"ask",label:"Ask"},{value:"continue",label:"Continue"}],"STATE_FILTER_OPTIONS",0,[{value:"all",label:"Any status"},{value:"active",label:"In progress"},{value:"queued",label:"Queued"},{value:"extracting",label:"Asking / extracting"},{value:"delivering",label:"Delivering"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}],"detailsHref",0,function(e){return`/exchanges?id=${encodeURIComponent(e)}`},"eventLabel",0,function(e,s){let t=e.data??{},n=s.source.agent_name,a=s.destination?.agent_name??"the destination Agent",i="string"==typeof t.hop?t.hop:null;switch(e.type){case"created":return"ask"===s.mode?`You asked ${n}'s session a question`:`You handed ${n}'s session to ${a}`;case"hop_queued":if("deliver"===i)return`Handoff queued for ${a}'s new session`;return"extract"===i?`Handoff extraction queued in ${n}'s session`:`Question queued for ${n}'s session`;case"hop_started":if("deliver"===i)return`${a} started a new session`;return"extract"===i?`${n}'s session started extracting the handoff`:`${n}'s session started answering`;case"state_changed":{let e="string"==typeof t.to&&h.includes(t.to)?t.to:null;return e?`Now ${f(s.mode,e).toLowerCase()}`:"State changed"}case"answer_returned":return`Answer returned to ${s.origin?.label??"the origin thread"}${t.truncated?" (shortened)":""}`;case"packet_extracted":return"Handoff packet extracted";case"packet_rejected":return`Handoff packet refused${"string"==typeof t.reason?`: ${t.reason}`:""}`;case"destination_replied":return`${a} replied in ${s.destination?.conversation?.label??"its thread"}`;case"destination_session_rejected":return`${a}'s session was not new; the handoff stopped`;case"cancel_requested":return"You asked to cancel";case"hop_result_discarded":return"A late result was discarded";default:return e.type.replace(/_/g," ")}},"excerpt",0,g,"exchangeRequestBody",0,function(e,s,t){let n={mode:e.mode,idempotency_key:t,origin_conversation_id:e.originConversationId,source:{agent_id:s.agentId,session_ref:s.sessionRef},instruction:e.instruction.trim()};return"continue"===e.mode&&(n.destination={agent_id:e.destinationAgentId}),n},"failureAdvice",0,function(e){if("failed"!==e.state)return null;switch(e.failure?.code){case"packet_invalid":case"packet_missing":return"The source session did not return a usable handoff. Start a new Continue with a clearer objective.";case"destination_session_invalid":return"The destination did not start a fresh session. Check its runtime, then start a new Continue.";case"destination_turn_failed":return"Check the destination Agent’s runtime, then start a new Continue from the source session.";case"source_turn_failed":return"Check the source Agent’s runtime, then start a new exchange from its Sessions.";default:return"Start a new exchange from the session to try again."}},"formatExchangeTime",0,function(e){return s(e)},"instructionHeading",0,function(e){return"ask"===e?"Question":"Objective"},"ledgerAgents",0,function(e){let s=new Map;for(let t of e)s.set(t.source.agent_id,t.source.agent_name),t.destination&&s.set(t.destination.agent_id,t.destination.agent_name);return[...s.entries()].map(([e,s])=>({id:e,name:s})).sort((e,s)=>e.name.localeCompare(s.name)||e.id.localeCompare(s.id))},"ledgerRows",0,function(e,s){return e.filter(e=>("all"===s.mode||e.mode===s.mode)&&("active"!==s.state||!e.terminal)&&("all"===s.state||"active"===s.state||e.state===s.state)&&(!s.agentId||e.source.agent_id===s.agentId||e.destination?.agent_id===s.agentId)).sort(x)},"ledgerView",0,function(e,s,t){return null===e?s?"error":"loading":0===e.length?"empty":0===t.length?"filtered-out":"rows"},"linkRoleLabel",0,function(e){let s={origin:"Started here",source:"Source session",destination:"Destination"};return e.map(e=>s[e]).join(" · ")},"liveStateLabel",0,function(e){var s;return e.cancel_requested&&(s=e.state,!p.includes(s))?"Cancelling…":f(e.mode,e.state)},"modeLabel",0,function(e){return"ask"===e?"Ask":"Continue"},"outcomeLine",0,function(e){if("completed"===e.state){if("ask"===e.mode){let s=e.origin?.label??"the origin thread";return e.outcome.answer?`Answer in ${s}: ${g(e.outcome.answer,200)}`:`Answered in ${s}.`}let s=e.destination?.agent_name??"The destination Agent";return e.outcome.reply?`${s} picked it up in a new session: ${g(e.outcome.reply,200)}`:`${s} picked it up in a new session.`}return"failed"===e.state?e.failure?.message||"The exchange failed.":"cancelled"===e.state?"Cancelled before it finished. Nothing more will run.":null},"participantsLabel",0,function(e){return"ask"===e.mode?`You → ${e.source.agent_name}`:`${e.source.agent_name} → ${e.destination?.agent_name??"another Agent"}`},"pinRequestBody",0,function(e,s,t,n,a){return{action:e,content:s.trim(),conversation_id:t,idempotency_key:a,..."resume"===e?{approve_write:n}:{}}},"sessionDialogMode",0,function(e){return"handoff"===e?"continue":e},"sessionDialogTitle",0,function(e){return m["continue"===e?"handoff":e]},"sessionDialogUsesPin",0,function(e,s){return"resume"===e||"ask"===e&&"provider"===s},"sessionLabel",0,function(e){return`${e.source.agent_name}'s session “${e.source.session_title}”`},"sessionRowActions",0,function(e){let s;if(e.actions)s=e.actions;else{let t="ended"===e.status?{available:!1,reason:"Ask from this context and Hand off to… are unavailable: this session has ended. Its history stays here."}:e.resumable?{available:!0}:{available:!1,reason:`Ask from this context and Hand off to… are unavailable: Botmancers can’t resume this session under ${e.agent.name}’s current runtime.`},n=t.available?{available:!0}:{available:!1,code:"ended"===e.status?"session_ended":"session_not_resumable",reason:t.reason,recovery:"choose_session"};s={ask:n,resume:{available:!1,code:"action_unavailable",reason:`${m.resume} is unavailable: this runtime can’t resume a session with edits.`,recovery:"choose_action"},handoff:n}}return["ask","resume","handoff"].map(e=>({action:e,label:m[e],availability:s[e]}))},"stateTone",0,function(e){return"completed"===e?"done":"failed"===e||"cancelled"===e?"stopped":"active"},"submitErrorMessage",0,function(e,s){switch(e){case"session_ended":return"This session has ended and can’t be resumed.";case"session_not_resumable":return"Botmancers can’t resume this session under the agent’s current runtime.";case"source_session_busy":return"This session already has an exchange in progress. Wait for it or cancel it from its card.";case"agent_unavailable":return s||"That Agent can’t launch yet. Choose its runtime connection and session scope in Config.";case"idempotency_conflict":return"This request changed while it was being sent. Send again.";case"session_missing":return"The runtime no longer has this session. Its history stays here; choose another session.";case"approval_required":return"Resume work here needs your approval of edits. Tick the approval, then send again.";case"authority_not_allowed":return s||"This agent’s policy doesn’t allow edits in a resumed session. Change it in Config.";case"action_unavailable":return s||"This runtime can’t do that in this session. Choose another action.";case"provider_failed":return"The runtime failed this turn. Nothing moved to another session; try again later.";default:return s||"The exchange could not be started. Your draft is kept; try again."}},"threadHref",0,function(e,s){let t=new URLSearchParams;if(e.thread_agent_id){s&&t.set("exchange",s);let n=t.toString();return`/agents/${encodeURIComponent(e.thread_agent_id)}/conversations/${encodeURIComponent(e.id)}${n?`?${n}`:""}`}if("group"!==e.kind)return null;s&&t.set("exchange",s);let n=t.toString();return`/threads/${encodeURIComponent(e.id)}${n?`?${n}`:""}`},"validateDraft",0,function(e){let s={},t=e.instruction.trim(),n="ask"===e.mode?"a question":"an objective";return t?e.instruction.length>4e3&&(s.instruction="Keep it under 4000 characters."):s.instruction=`Enter ${n}.`,e.originConversationId||(s.origin="Choose the thread that follows this exchange."),"continue"!==e.mode||e.destinationAgentId||(s.destination="Choose the agent who continues the work."),s},"validateResumeDraft",0,function(e,s){let t={};return e.trim()?e.length>4e3&&(t.instruction="Keep it under 4000 characters."):t.instruction="Enter what to work on.",s||(t.approval="Approve edits in this session to resume work here."),t}],50814)},24204,e=>{"use strict";var s=e.i(63352),t=e.i(50814);function n(e){return"active"===e.state}let a=/^T[A-Z0-9]{2,20}$/,i=/^[CG][A-Z0-9]{2,20}$/;e.s(["SHARE_DURATIONS",0,[{label:"5 minutes",seconds:300},{label:"1 hour",seconds:3600},{label:"8 hours",seconds:28800},{label:"24 hours",seconds:86400}],"SHARE_STATUS_LABELS",0,{active:"Active",exhausted:"Questions used",answering:"Answering",recovering:"Recovering",expired:"Expired",revoked:"Revoked"},"audienceInputError",0,function(e,s,t){let n=e.trim(),r=s.trim();return a.test(n)?i.test(r)?t.some(e=>e.team_id===n&&e.channel_id===r)?"That channel is already on the allowlist.":null:"Channel ID must look like C0123ABCD (a public or private channel ID; no wildcards).":"Workspace ID must look like T0123ABCD (a Slack team ID; no wildcards)."},"audienceLabel",0,function(e){return`Slack channel ${e.channel_id} \xb7 workspace ${e.team_id}`},"createdByLabel",0,function(e){return"owner"===e.created_by?"Shared by you":"current_session"===e.created_by?"Shared from a turn of this session":"Shared by a service"},"expiryLabel",0,function(e,t=Date.now()){return"revoked"===e.state?`Revoked ${(0,s.formatSessionDate)(e.revoked_at??e.expires_at)}`:"expired"===e.state||e.expires_at<=t?`Expired ${(0,s.formatSessionDate)(e.expires_at)}`:`Expires ${(0,s.formatSessionDate)(e.expires_at)} (in ${function(e){let s=Math.max(1,Math.round(e/6e4));if(s<60)return`${s} min`;let t=Math.floor(s/60),n=s%60;return n?`${t} h ${n} min`:`${t} h`}(e.expires_at-t)})`},"sessionShares",0,function(e,s){let t=e.filter(e=>e.session_ref===s);return[...t.filter(n).sort((e,s)=>s.created_at-e.created_at),...t.filter(e=>!n(e)).sort((e,s)=>(s.revoked_at??s.expires_at)-(e.revoked_at??e.expires_at))]},"shareCreateAvailability",0,function(e,s){let n=`/agents/${encodeURIComponent(e.agent.id)}/config#session-sharing`;if(!s)return{available:!1,reason:"Share to Slack is unavailable: the share policy could not be loaded.",configHref:null};let a=(0,t.sessionRowActions)(e).find(e=>"ask"===e.action);return a&&!a.availability.available?{available:!1,reason:a.availability.reason.replace(/^Ask from this context is unavailable:/,"Share to Slack is unavailable:"),configHref:null}:"invalid"===s.state?{available:!1,reason:"Share to Slack is unavailable: the share policy file is invalid. Fix it in Config.",configHref:n}:0===s.audiences.length?{available:!1,reason:"Share to Slack needs a Slack channel on the share allowlist. Add one in Config.",configHref:n}:{available:!0}},"shareCreateBody",0,function(e,s,t,n){return{audience:{team_id:e.team_id,channel_id:e.channel_id},ttl_seconds:s,max_turns:t,idempotency_key:n}},"shareFromTurnNote",0,function(e){return e.agent.share_current.supported?e.agent.share_from_turn?"On: a turn Botmancers launches for this agent can share its own session to an allowlisted channel. Turning it off revokes every live turn context at once.":"Off: no turn of this agent can share its own session. Sessions can still be shared from the Sessions page.":e.agent.share_current.reason??"This runtime cannot share its own session from a turn."},"shareIsLive",0,n,"shareStatusNote",0,function(e){switch(e.status){case"active":return"Slack replies in its thread ask this session (read-only).";case"answering":return"A Slack question is being answered now. The next one waits until it finishes.";case"recovering":return"A question was interrupted by a Botmancers restart. The next Slack question clears it.";case"exhausted":return`All ${e.max_turns} questions are used. Slack questions get the limit notice; create a new share to keep going.`;case"expired":return"Expired: Slack questions get the expired notice. Its history stays here.";case"revoked":return"Revoked: Slack questions get the revoked notice. Its history stays here."}},"threadLabel",0,function(e){return e.thread.posted?`Slack thread posted ${(0,s.formatSessionDate)(e.thread.posted_at??0)}`:"active"===e.state?"Waiting for the Slack relay to post the thread":"No Slack thread was posted"},"turnsLabel",0,function(e){return`${e.turns_used} of ${e.max_turns} question${1===e.max_turns?"":"s"} used`}])}]);
|