botmancers 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +5 -5
  3. package/app/.next/BUILD_ID +1 -1
  4. package/app/.next/app-path-routes-manifest.json +1 -0
  5. package/app/.next/build-manifest.json +3 -3
  6. package/app/.next/prerender-manifest.json +3 -3
  7. package/app/.next/required-server-files.json +2 -2
  8. package/app/.next/routes-manifest.json +6 -0
  9. package/app/.next/server/app/_global-error.html +1 -1
  10. package/app/.next/server/app/_global-error.rsc +1 -1
  11. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/_not-found.html +1 -1
  17. package/app/.next/server/app/_not-found.rsc +2 -2
  18. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  19. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  20. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/app/.next/server/app/agents/[id]/activity/page.js.nft.json +1 -1
  22. package/app/.next/server/app/agents/[id]/activity/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/agents/[id]/config/page.js.nft.json +1 -1
  24. package/app/.next/server/app/agents/[id]/config/page_client-reference-manifest.js +1 -1
  25. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page.js.nft.json +1 -1
  26. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page_client-reference-manifest.js +1 -1
  27. package/app/.next/server/app/agents/[id]/conversations/page.js.nft.json +1 -1
  28. package/app/.next/server/app/agents/[id]/conversations/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  30. package/app/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/agents/[id]/sessions/page.js.nft.json +1 -1
  32. package/app/.next/server/app/agents/[id]/sessions/page_client-reference-manifest.js +1 -1
  33. package/app/.next/server/app/agents/[id]/slack/page.js.nft.json +1 -1
  34. package/app/.next/server/app/agents/[id]/slack/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/api/bots/[id]/activity/route.js.nft.json +1 -1
  36. package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
  37. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route.js.nft.json +1 -1
  38. package/app/.next/server/app/api/bots/[id]/conversations/route.js.nft.json +1 -1
  39. package/app/.next/server/app/api/bots/[id]/overview/route.js.nft.json +1 -1
  40. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
  41. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
  42. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -1
  43. package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
  44. package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js.nft.json +1 -1
  45. package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -1
  46. package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
  47. package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
  48. package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
  49. package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
  50. package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
  51. package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
  52. package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
  53. package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
  54. package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
  55. package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
  56. package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
  57. package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
  58. package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
  59. package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
  60. package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
  61. package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
  62. package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
  63. package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
  64. package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
  65. package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
  66. package/app/.next/server/app/api/health/route.js.nft.json +1 -1
  67. package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
  68. package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
  69. package/app/.next/server/app/api/runtime-capacity/route/app-paths-manifest.json +3 -0
  70. package/app/.next/server/app/api/runtime-capacity/route/build-manifest.json +12 -0
  71. package/app/.next/server/app/api/runtime-capacity/route/server-reference-manifest.json +4 -0
  72. package/app/.next/server/app/api/runtime-capacity/route.js +10 -0
  73. package/app/.next/server/app/api/runtime-capacity/route.js.nft.json +1 -0
  74. package/app/.next/server/app/api/runtime-capacity/route_client-reference-manifest.js +3 -0
  75. package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
  76. package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
  77. package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -1
  78. package/app/.next/server/app/api/shares/route.js.nft.json +1 -1
  79. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
  80. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
  81. package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
  82. package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
  83. package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
  84. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
  85. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
  86. package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
  87. package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
  88. package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
  89. package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
  90. package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
  91. package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
  92. package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
  93. package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
  94. package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
  95. package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
  96. package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
  97. package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
  98. package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
  99. package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -1
  100. package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -1
  101. package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -1
  102. package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -1
  103. package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -1
  104. package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
  105. package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
  107. package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
  108. package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
  109. package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
  110. package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
  111. package/app/.next/server/app/exchanges.html +1 -1
  112. package/app/.next/server/app/exchanges.rsc +2 -2
  113. package/app/.next/server/app/exchanges.segments/_full.segment.rsc +2 -2
  114. package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
  115. package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +2 -2
  116. package/app/.next/server/app/index.html +1 -1
  117. package/app/.next/server/app/index.rsc +2 -2
  118. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  119. package/app/.next/server/app/index.segments/_full.segment.rsc +2 -2
  120. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  121. package/app/.next/server/app/page.js.nft.json +1 -1
  122. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  123. package/app/.next/server/app/settings/page.js.nft.json +1 -1
  124. package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  125. package/app/.next/server/app/settings.html +1 -1
  126. package/app/.next/server/app/settings.rsc +2 -2
  127. package/app/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  128. package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  129. package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  130. package/app/.next/server/app/threads/[id]/route.js.nft.json +1 -1
  131. package/app/.next/server/app-paths-manifest.json +1 -0
  132. package/app/.next/server/chunks/[externals]__06_ygwr._.js +3 -0
  133. package/app/.next/server/chunks/{[externals]__1eaoma8._.js → [externals]__0z3qnkl._.js} +2 -2
  134. package/app/.next/server/chunks/{[root-of-the-server]__00ntari._.js → [root-of-the-server]__1nf6z4s._.js} +10 -10
  135. package/app/.next/server/chunks/[root-of-the-server]__1qbadul._.js +5 -0
  136. package/app/.next/server/chunks/_0061c2q._.js +1 -1
  137. package/app/.next/server/chunks/_next-internal_server_app_api_runtime-capacity_route_actions_1dzvg7f.js +3 -0
  138. package/app/.next/server/chunks/ssr/_0mxifu3._.js +1 -1
  139. package/app/.next/server/chunks/ssr/app_agents_[id]_0sr4fdg._.js +1 -1
  140. package/app/.next/server/middleware-build-manifest.js +3 -3
  141. package/app/.next/server/middleware.js +2 -2
  142. package/app/.next/server/pages/404.html +1 -1
  143. package/app/.next/server/pages/500.html +1 -1
  144. package/app/.next/server/server-reference-manifest.js +1 -1
  145. package/app/.next/server/server-reference-manifest.json +1 -1
  146. package/app/.next/static/chunks/0h567k13e53r-.js +1 -0
  147. package/app/.next/static/chunks/{1ob-de9xo9m2e.css → 17qi6hcgg0nlz.css} +1 -1
  148. package/app/.next/static/chunks/2myfan3i8z-jy.js +1 -0
  149. package/app/BUILD_INFO.json +2 -2
  150. package/app/package.json +1 -1
  151. package/app/public/brand/harness/claude.svg +3 -0
  152. package/app/public/brand/harness/codex.png +0 -0
  153. package/app/public/brand/harness/cursor.svg +3 -0
  154. package/app/public/brand/harness/muse.svg +33 -0
  155. package/app/server.js +1 -1
  156. package/package.json +1 -1
  157. package/app/.next/static/chunks/1zryovio86f1z.js +0 -1
  158. package/app/.next/static/chunks/3m-2-98qud-hf.js +0 -1
  159. /package/app/.next/static/{0BJMiZPkEfFOd56nhl62e → 92gsyY5d-nMkxJ7iQxKkY}/_buildManifest.js +0 -0
  160. /package/app/.next/static/{0BJMiZPkEfFOd56nhl62e → 92gsyY5d-nMkxJ7iQxKkY}/_clientMiddlewareManifest.js +0 -0
  161. /package/app/.next/static/{0BJMiZPkEfFOd56nhl62e → 92gsyY5d-nMkxJ7iQxKkY}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botmancers",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "Botmancers: the UI, core engine, and authenticated MCP bridge (contracts botmancers.mcp.v1 and botmancers.mcp.v2) as one CLI-managed product. `botmancers start` runs it all; bare `botmancers` runs the bridge only.",
5
5
  "keywords": [
6
6
  "botmancers",
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,70925,e=>{"use strict";var t=e.i(43476),a=e.i(71645),n=e.i(22016),s=e.i(18566),l=e.i(87303),i=e.i(89873),r=e.i(3136),o=e.i(10718);let c=(0,a.createContext)(null),d=[{label:"Overview",segment:""},{label:"Sessions",segment:"sessions"},{label:"Conversations",segment:"conversations"},{label:"Slack",segment:"slack"},{label:"Activity",segment:"activity"},{label:"Config",segment:"config"}];e.s(["default",0,function({children:e}){let u=String((0,s.useParams)().id??""),h=(0,s.usePathname)(),g=(0,s.useRouter)(),m=(0,s.useSearchParams)(),[v,w]=(0,a.useState)([]),[b,f]=(0,a.useState)(null),[j,p]=(0,a.useState)(!0),[x,N]=(0,a.useState)(!1),[A,S]=(0,a.useState)(!1),[y,C]=(0,a.useState)(()=>{let e=Number(m.get("deleted"))||0;return e>0?(0,o.deletedStatusLine)(e):""}),[k,I]=(0,a.useState)({serverNow:0,fetchedAt:0}),[P,D]=(0,a.useState)(()=>Date.now()),R=(0,a.useCallback)(async e=>{try{let[t,a]=await Promise.all([fetch("/api/bots",{cache:"no-store"}),fetch(`/api/bots/${encodeURIComponent(u)}/overview`,{cache:"no-store"})]),n=t.ok?await t.json():[];if(e())return;w(Array.isArray(n)?n:[]);let s=Date.parse(t.headers.get("date")||"");if(I({serverNow:Number.isNaN(s)?Date.now():s,fetchedAt:Date.now()}),404===a.status){S(!0),f(null),N(!1);return}if(!a.ok)throw Error("overview request failed");let l=await a.json();if(e())return;f(l),S(!1),N(!1)}catch{e()||N(!0)}finally{e()||p(!1)}},[u]);(0,a.useEffect)(()=>{let e=!1,t=()=>e,a=window.setTimeout(()=>{R(t)},0),n=window.setInterval(()=>{R(t)},2e3),s=window.setInterval(()=>D(Date.now()),1e3);return()=>{e=!0,window.clearTimeout(a),window.clearInterval(n),window.clearInterval(s)}},[R]);let T=b?.agent,$=b?.runtime;return(0,t.jsx)(c.Provider,{value:{id:u,agents:v,overview:b,loading:j,error:x,notFound:A},children:(0,t.jsxs)("div",{className:"field agent-field",children:[(0,t.jsx)(i.default,{agents:v,activeAgentId:u,beatClock:k,now:P,status:y,onAgentsChange:w,onNew:()=>g.push("/?new=1"),onManage:()=>g.push("/?manage=1"),onDeleted:e=>{C((0,o.deletedStatusLine)(e.length)),e.some(e=>e.id===u)&&g.replace(`/?deleted=${e.length}`)}}),(0,t.jsxs)("section",{className:"pane agent-pane",children:[(0,t.jsxs)("header",{className:"agent-shell-header",children:[(0,t.jsxs)("div",{className:"agent-shell-identity",children:[T?(0,t.jsx)(l.default,{bot:T,size:48,title:`${T.name} avatar`}):null,(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"agent-shell-kicker",children:"Agent"}),(0,t.jsx)("h1",{children:T?.name??(j?"Loading…":"Unknown Agent")}),T?(0,t.jsx)("p",{children:T.role}):null]})]}),$?(0,t.jsxs)("div",{className:"agent-shell-runtime","aria-label":"Runtime and availability",children:[(0,t.jsx)("span",{className:$.available?"availability is-available":"availability is-blocked",children:$.available?"Available":"Needs setup"}),(0,t.jsxs)("span",{children:[(0,r.agentLabel)($.agent)," · ",$.connection||"No connection"]})]}):null]}),(0,t.jsx)("nav",{className:"agent-tabs","aria-label":"Agent",children:d.map(e=>{let a=`/agents/${encodeURIComponent(u)}${e.segment?`/${e.segment}`:""}`,s=h===a;return(0,t.jsx)(n.default,{href:a,"aria-current":s?"page":void 0,children:e.label},e.label)})}),(0,t.jsx)("main",{className:"agent-content",children:e})]})]})})},"useAgentOverview",0,function(){let e=(0,a.useContext)(c);if(!e)throw Error("useAgentOverview must be used inside AgentShell");return e}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,66464,e=>{"use strict";var t=e.i(43476),s=e.i(22016),a=e.i(71645),n=e.i(70925);let i=[{value:"all",label:"All"},{value:"sessions",label:"Sessions"},{value:"conversations",label:"Conversations & exchanges"},{value:"slack",label:"Slack"},{value:"errors",label:"Errors"}],r={filter:"all",requestKey:"",activity:{state:"loading"},nextCursor:null,loadingMore:!1};function l(e,t){return"select_filter"===t.type?{...e,filter:t.filter,requestKey:"",activity:{state:"loading"},nextCursor:null,loadingMore:!1}:"request_started"===t.type?{...e,requestKey:t.key,activity:{state:"loading"},nextCursor:null,loadingMore:!1}:"request_succeeded"===t.type?t.key===e.requestKey?{...e,activity:{state:"ready",items:t.items},nextCursor:t.nextCursor}:e:"request_failed"===t.type?t.key===e.requestKey?{...e,activity:{state:"error"},nextCursor:null}:e:"load_started"===t.type?t.key===e.requestKey?{...e,loadingMore:!0}:e:"load_succeeded"===t.type&&t.key===e.requestKey&&"ready"===e.activity.state?{...e,activity:{state:"ready",items:[...e.activity.items,...t.items]},nextCursor:t.nextCursor,loadingMore:!1}:"load_failed"===t.type&&t.key===e.requestKey?{...e,activity:{state:"error"},nextCursor:null,loadingMore:!1}:e}function c(e,t,s=null){let a=new URLSearchParams({filter:t,limit:String(20)});return s&&a.set("cursor",s),`/api/bots/${encodeURIComponent(e)}/activity?${a.toString()}`}function o({items:e,compact:a=!1}){return(0,t.jsx)("ol",{className:a?"agent-activity-list is-compact":"agent-activity-list","aria-label":"Agent activity, newest first",children:e.map(e=>(0,t.jsxs)("li",{className:`agent-activity-item is-${e.severity}`,"data-activity-kind":e.kind,children:[(0,t.jsx)("span",{className:"agent-activity-marker","aria-hidden":"true"}),(0,t.jsxs)("div",{className:"agent-activity-card",children:[(0,t.jsxs)("div",{className:"agent-activity-summary",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"agent-activity-category",children:"conversations"===e.category?"Conversations & exchanges":e.category}),(0,t.jsx)("strong",{children:e.summary}),(0,t.jsx)("time",{dateTime:new Date(e.occurred_at).toISOString(),children:new Date(e.occurred_at).toLocaleString()})]}),e.attention?(0,t.jsx)("span",{className:"agent-activity-attention",children:"Needs attention"}):null]}),(0,t.jsx)("div",{className:"agent-activity-actions",children:(0,t.jsx)(s.default,{href:e.target.href,children:e.target.label})}),!a&&Object.keys(e.details).length?(0,t.jsxs)("details",{className:"agent-activity-details",children:[(0,t.jsx)("summary",{children:"Raw details"}),(0,t.jsx)("dl",{children:Object.entries(e.details).map(([e,s])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:e.replaceAll("_"," ")}),(0,t.jsx)("dd",{children:(0,t.jsx)("code",{children:String(s)})})]},e))}),(0,t.jsx)("p",{children:"Safe structured fields only. Provider transcripts and identifiers are excluded."})]}):null]})]},e.id))})}function d({activity:e,filter:s,nextCursor:a,loadingMore:n,onLoadMore:r}){return(0,t.jsxs)(t.Fragment,{children:["loading"===e.state?(0,t.jsx)("p",{className:"agent-activity-state",role:"status",children:"Loading activity…"}):null,"error"===e.state?(0,t.jsxs)("div",{className:"agent-activity-state is-error",role:"alert",children:[(0,t.jsx)("strong",{children:"Activity unavailable"}),(0,t.jsx)("p",{children:"No partial or stale timeline is shown. Refresh to try again."})]}):null,"ready"!==e.state||e.items.length?null:(0,t.jsx)("p",{className:"agent-activity-state",children:"all"===s?"No operational activity has been recorded for this Agent yet.":`No ${i.find(e=>e.value===s)?.label.toLowerCase()} activity matches this filter.`}),"ready"===e.state&&e.items.length?(0,t.jsx)(o,{items:e.items}):null,"ready"===e.state&&a?(0,t.jsx)("button",{type:"button",className:"agent-activity-more",onClick:r,disabled:n,children:n?"Loading…":"Load older activity"}):null]})}e.s(["ActivityList",0,o,"ActivityResults",0,d,"activityPageReducer",0,l,"agentActivityUrl",0,c,"default",0,function(){let{id:e,overview:o,loading:h,error:u,notFound:g}=(0,n.useAgentOverview)(),[x,m]=(0,a.useReducer)(l,r),{filter:v,activity:y,nextCursor:j,loadingMore:p}=x,f=(0,a.useRef)(0),N=(0,a.useCallback)((t=null)=>c(e,v,t),[v,e]);(0,a.useEffect)(()=>{let t=!1,s=++f.current,a=`${e}:${v}:${s}`;return m({type:"request_started",key:a}),fetch(N(),{cache:"no-store"}).then(async e=>{let n=await e.json().catch(()=>null);if(!e.ok||!Array.isArray(n?.activity))throw Error("activity");t||s!==f.current||m({type:"request_succeeded",key:a,items:n.activity,nextCursor:"string"==typeof n.next_cursor?n.next_cursor:null})}).catch(()=>{t||s!==f.current||m({type:"request_failed",key:a})}),()=>{t=!0}},[v,e,N]);let w=async()=>{if(!j||"ready"!==y.state||p)return;let e=x.requestKey;m({type:"load_started",key:e});try{let t=await fetch(N(j),{cache:"no-store"}),s=await t.json().catch(()=>null);if(!t.ok||!Array.isArray(s?.activity))throw Error("activity");m({type:"load_succeeded",key:e,items:s.activity,nextCursor:"string"==typeof s.next_cursor?s.next_cursor:null})}catch{m({type:"load_failed",key:e})}};return h?(0,t.jsx)("div",{className:"agent-state",role:"status",children:"Loading Agent activity…"}):g?(0,t.jsxs)("div",{className:"agent-state",children:[(0,t.jsx)("h2",{children:"Agent not found"}),(0,t.jsx)(s.default,{href:"/",children:"Choose an Agent"})]}):u||!o?(0,t.jsxs)("div",{className:"agent-state",role:"alert",children:[(0,t.jsx)("h2",{children:"Activity unavailable"}),(0,t.jsx)("p",{children:"Botmancers could not load this Agent."})]}):(0,t.jsxs)("div",{className:"agent-activity","data-agent-activity-page":!0,children:[(0,t.jsxs)("header",{className:"agent-activity-intro",children:[(0,t.jsx)("p",{className:"agent-eyebrow",children:"Activity"}),(0,t.jsxs)("h2",{children:["What changed for ",o.agent.name]}),(0,t.jsx)("p",{children:"Operational history from Botmancers records. Open the owning page for actions and complete detail."})]}),(0,t.jsx)("div",{className:"agent-activity-filters",role:"group","aria-label":"Filter Agent activity",children:i.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":v===e.value,onClick:()=>m({type:"select_filter",filter:e.value}),children:e.label},e.value))}),(0,t.jsx)(d,{activity:y,filter:v,nextCursor:j,loadingMore:p,onLoadMore:()=>{w()}})]})},"initialActivityPageState",0,r],66464)},65143,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(22016),n=e.i(70925),i=e.i(3136),r=e.i(66464);let l="botmancers setup --client cursor";function c(){let[e,a]=(0,s.useState)(!1);return(0,t.jsx)("button",{type:"button",className:"agent-primary-action",onClick:async()=>{try{await navigator.clipboard.writeText(l),a(!0),window.setTimeout(()=>a(!1),1600)}catch{a(!1)}},children:e?"Copied":"Copy setup command"})}function o({rows:e,empty:s}){return e.length?(0,t.jsx)("ul",{className:"agent-work-list",children:e.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:e.title}),(0,t.jsxs)("small",{children:["active"===e.status?"Active now":"Recent"," · ",new Date(e.last_activity_at).toLocaleString()]})]})},e.ref))}):(0,t.jsx)("p",{className:"agent-empty",children:s})}e.s(["default",0,function(){let{id:e,overview:s,loading:d,error:h,notFound:u}=(0,n.useAgentOverview)();if(d)return(0,t.jsx)("div",{className:"agent-state",role:"status",children:"Loading Agent overview…"});if(u)return(0,t.jsxs)("div",{className:"agent-state",children:[(0,t.jsx)("h2",{children:"Agent not found"}),(0,t.jsx)("p",{children:"This Agent does not exist or was removed."}),(0,t.jsx)(a.default,{href:"/",children:"Choose an Agent"})]});if(h||!s)return(0,t.jsxs)("div",{className:"agent-state",role:"alert",children:[(0,t.jsx)("h2",{children:"Overview unavailable"}),(0,t.jsx)("p",{children:"Botmancers could not load this Agent. Refresh to try again."})]});let g=`/agents/${encodeURIComponent(e)}/config`,x=s.conversation?`/agents/${encodeURIComponent(e)}/conversations/${encodeURIComponent(s.conversation.id)}`:`/agents/${encodeURIComponent(e)}/conversations`,m=s.messaging.home_session_ref?"Home session configured":s.messaging.new_sessions_allowed&&s.messaging.default_workspace_set?"Can start a configured session":s.current_work.length>0?"Uses an eligible existing session":"No ready session is known";return(0,t.jsxs)("div",{className:"agent-overview","data-agent-overview":!0,children:[(0,t.jsxs)("div",{className:"agent-overview-grid",children:[(0,t.jsxs)("section",{className:"agent-panel agent-instructions",children:[(0,t.jsxs)("div",{className:"agent-panel-head",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"agent-eyebrow",children:"Standing instructions"}),(0,t.jsx)("h2",{children:"How this Agent works"})]}),(0,t.jsx)(a.default,{href:g,children:"Config"})]}),(0,t.jsxs)("dl",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:"Rules"}),(0,t.jsx)("dd",{children:s.instructions.rules})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:"Skill"}),(0,t.jsx)("dd",{children:s.instructions.skill})]})]})]}),(0,t.jsxs)("section",{className:"agent-panel",children:[(0,t.jsxs)("div",{className:"agent-panel-head",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"agent-eyebrow",children:"Runtime"}),(0,t.jsx)("h2",{children:s.runtime.available?"Ready to work":"Setup required"})]}),(0,t.jsx)(a.default,{href:g,children:"Config"})]}),(0,t.jsx)("p",{children:s.runtime.available?`${(0,i.agentLabel)(s.runtime.agent)} is connected through ${s.runtime.connection||"the configured runtime"}.`:"This Agent cannot launch with its current registration. Open Config to resolve the connection or session scope."}),(0,t.jsxs)("dl",{className:"agent-runtime-facts",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:"Heartbeat"}),(0,t.jsx)("dd",{children:s.runtime.last_seen?new Date(s.runtime.last_seen).toLocaleString():"Not reported"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{children:"Messaging"}),(0,t.jsx)("dd",{children:m})]})]}),(0,t.jsx)("p",{className:"agent-muted",children:"Messages use the Agent’s configured home session or launch policy. Callers do not choose its runtime, model, or provider session."})]})]}),(0,t.jsxs)("section",{className:"agent-use","aria-labelledby":"open-this-agent",children:[(0,t.jsx)("p",{className:"agent-eyebrow",children:"Open this Agent"}),(0,t.jsx)("h2",{id:"open-this-agent",children:"Make it reachable"}),(0,t.jsxs)("div",{className:"agent-use-grid",children:[(0,t.jsxs)("article",{children:[(0,t.jsx)("span",{className:"agent-use-number",children:"01"}),(0,t.jsx)("h3",{children:"Use from a coding agent"}),(0,t.jsxs)("p",{children:["Let another coding agent discover ",s.agent.name," and ask its sessions — so work learned here can travel between agents."]}),(0,t.jsx)("p",{className:"agent-muted",children:"One command connects the client to the bridge and installs the collaboration skill:"}),(0,t.jsx)("pre",{className:"agent-setup-command",children:(0,t.jsx)("code",{children:l})}),(0,t.jsx)(c,{}),(0,t.jsxs)("p",{className:"agent-muted",children:["Swap ",(0,t.jsx)("code",{children:"cursor"})," for ",(0,t.jsx)("code",{children:"codex"})," or ",(0,t.jsx)("code",{children:"claude"}),"."]})]}),(0,t.jsxs)("article",{children:[(0,t.jsx)("span",{className:"agent-use-number",children:"02"}),(0,t.jsx)("h3",{children:"Share a session to Slack"}),(0,t.jsx)("p",{children:"Open one of this Agent’s sessions to people in Slack — a time-limited, read-only share so others can ask what the session already knows."}),(0,t.jsx)(a.default,{href:`/agents/${encodeURIComponent(e)}/slack`,children:"Share through Slack"})]}),(0,t.jsxs)("article",{children:[(0,t.jsx)("span",{className:"agent-use-number",children:"03"}),(0,t.jsx)("h3",{children:"Message in Botmancers"}),(0,t.jsxs)("p",{children:["Talk directly with ",s.agent.name," in a focused conversation when you are the one asking."]}),(0,t.jsx)(a.default,{href:x,children:"Open conversation"})]})]})]}),(0,t.jsxs)("div",{className:"agent-overview-grid agent-work-grid",children:[(0,t.jsxs)("section",{className:"agent-panel",children:[(0,t.jsxs)("div",{className:"agent-panel-head",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"agent-eyebrow",children:"Current work"}),(0,t.jsx)("h2",{children:"Active sessions"})]}),(0,t.jsx)(a.default,{href:`/agents/${encodeURIComponent(e)}/sessions`,children:"All sessions"})]}),(0,t.jsx)(o,{rows:s.current_work,empty:"No active work right now."})]}),(0,t.jsxs)("section",{className:"agent-panel",children:[(0,t.jsxs)("div",{className:"agent-panel-head",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"agent-eyebrow",children:"Recent activity"}),(0,t.jsx)("h2",{children:"Latest work"})]}),(0,t.jsx)(a.default,{href:`/agents/${encodeURIComponent(e)}/activity`,children:"View activity"})]}),s.recent_activity.length?(0,t.jsx)(r.ActivityList,{items:s.recent_activity,compact:!0}):(0,t.jsx)("p",{className:"agent-empty",children:"No operational activity yet."})]})]})]})}])}]);