daycare-cli 2026.2.22 → 2026.2.23

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 (163) hide show
  1. package/dist/engine/agents/agent.d.ts.map +1 -1
  2. package/dist/engine/agents/agent.js +13 -10
  3. package/dist/engine/agents/agent.js.map +1 -1
  4. package/dist/engine/agents/agentSystem.d.ts +6 -1
  5. package/dist/engine/agents/agentSystem.d.ts.map +1 -1
  6. package/dist/engine/agents/agentSystem.js +14 -0
  7. package/dist/engine/agents/agentSystem.js.map +1 -1
  8. package/dist/engine/agents/ops/agentHistoryLoadAll.d.ts +3 -2
  9. package/dist/engine/agents/ops/agentHistoryLoadAll.d.ts.map +1 -1
  10. package/dist/engine/agents/ops/agentHistoryLoadAll.js +4 -3
  11. package/dist/engine/agents/ops/agentHistoryLoadAll.js.map +1 -1
  12. package/dist/engine/agents/ops/agentLoopRun.d.ts +1 -0
  13. package/dist/engine/agents/ops/agentLoopRun.d.ts.map +1 -1
  14. package/dist/engine/agents/ops/agentLoopRun.js +9 -1
  15. package/dist/engine/agents/ops/agentLoopRun.js.map +1 -1
  16. package/dist/engine/agents/ops/agentLoopRun.spec.js +1 -0
  17. package/dist/engine/agents/ops/agentLoopRun.spec.js.map +1 -1
  18. package/dist/engine/agents/ops/agentModelOverrideApply.d.ts +10 -0
  19. package/dist/engine/agents/ops/agentModelOverrideApply.d.ts.map +1 -0
  20. package/dist/engine/agents/ops/agentModelOverrideApply.js +48 -0
  21. package/dist/engine/agents/ops/agentModelOverrideApply.js.map +1 -0
  22. package/dist/engine/agents/ops/agentModelOverrideApply.spec.d.ts +2 -0
  23. package/dist/engine/agents/ops/agentModelOverrideApply.spec.d.ts.map +1 -0
  24. package/dist/engine/agents/ops/agentModelOverrideApply.spec.js +43 -0
  25. package/dist/engine/agents/ops/agentModelOverrideApply.spec.js.map +1 -0
  26. package/dist/engine/agents/ops/agentTypes.d.ts +8 -0
  27. package/dist/engine/agents/ops/agentTypes.d.ts.map +1 -1
  28. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.d.ts +6 -0
  29. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.d.ts.map +1 -0
  30. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.js +21 -0
  31. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.js.map +1 -0
  32. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.spec.d.ts +2 -0
  33. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.spec.d.ts.map +1 -0
  34. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.spec.js +17 -0
  35. package/dist/engine/agents/ops/inferenceErrorAnthropicPromptOverflowTokensExtract.spec.js.map +1 -0
  36. package/dist/engine/agents/ops/messageContextReset.js +1 -1
  37. package/dist/engine/agents/ops/messageContextReset.js.map +1 -1
  38. package/dist/engine/agents/ops/messageContextReset.spec.js +1 -1
  39. package/dist/engine/agents/ops/messageContextReset.spec.js.map +1 -1
  40. package/dist/engine/engine.d.ts.map +1 -1
  41. package/dist/engine/engine.js +2 -0
  42. package/dist/engine/engine.js.map +1 -1
  43. package/dist/engine/ipc/server.d.ts.map +1 -1
  44. package/dist/engine/ipc/server.js +7 -2
  45. package/dist/engine/ipc/server.js.map +1 -1
  46. package/dist/engine/memory/infer/inferObservations.d.ts +3 -0
  47. package/dist/engine/memory/infer/inferObservations.d.ts.map +1 -1
  48. package/dist/engine/memory/infer/inferObservations.js +7 -3
  49. package/dist/engine/memory/infer/inferObservations.js.map +1 -1
  50. package/dist/engine/memory/infer/utils/formatHistoryMessages.d.ts +3 -1
  51. package/dist/engine/memory/infer/utils/formatHistoryMessages.d.ts.map +1 -1
  52. package/dist/engine/memory/infer/utils/formatHistoryMessages.js +7 -3
  53. package/dist/engine/memory/infer/utils/formatHistoryMessages.js.map +1 -1
  54. package/dist/engine/memory/infer/utils/formatHistoryMessages.spec.js +20 -0
  55. package/dist/engine/memory/infer/utils/formatHistoryMessages.spec.js.map +1 -1
  56. package/dist/engine/memory/memorySessionObserve.d.ts +1 -0
  57. package/dist/engine/memory/memorySessionObserve.d.ts.map +1 -1
  58. package/dist/engine/memory/memorySessionObserve.js +3 -2
  59. package/dist/engine/memory/memorySessionObserve.js.map +1 -1
  60. package/dist/engine/memory/memorySessionObserve.spec.js +54 -0
  61. package/dist/engine/memory/memorySessionObserve.spec.js.map +1 -1
  62. package/dist/engine/memory/memoryWorker.d.ts.map +1 -1
  63. package/dist/engine/memory/memoryWorker.js +8 -2
  64. package/dist/engine/memory/memoryWorker.js.map +1 -1
  65. package/dist/engine/memory/memoryWorker.spec.js +41 -0
  66. package/dist/engine/memory/memoryWorker.spec.js.map +1 -1
  67. package/dist/engine/modules/rlm/rlmResultTextBuild.d.ts.map +1 -1
  68. package/dist/engine/modules/rlm/rlmResultTextBuild.js +12 -3
  69. package/dist/engine/modules/rlm/rlmResultTextBuild.js.map +1 -1
  70. package/dist/engine/modules/rlm/rlmResultTextBuild.spec.d.ts +2 -0
  71. package/dist/engine/modules/rlm/rlmResultTextBuild.spec.d.ts.map +1 -0
  72. package/dist/engine/modules/rlm/rlmResultTextBuild.spec.js +32 -0
  73. package/dist/engine/modules/rlm/rlmResultTextBuild.spec.js.map +1 -0
  74. package/dist/engine/modules/rlm/rlmToolResultBuild.d.ts.map +1 -1
  75. package/dist/engine/modules/rlm/rlmToolResultBuild.js +5 -2
  76. package/dist/engine/modules/rlm/rlmToolResultBuild.js.map +1 -1
  77. package/dist/engine/modules/rlm/rlmToolResultBuild.spec.d.ts +2 -0
  78. package/dist/engine/modules/rlm/rlmToolResultBuild.spec.d.ts.map +1 -0
  79. package/dist/engine/modules/rlm/rlmToolResultBuild.spec.js +25 -0
  80. package/dist/engine/modules/rlm/rlmToolResultBuild.spec.js.map +1 -0
  81. package/dist/engine/modules/tools/agentModelSetToolBuild.d.ts +10 -0
  82. package/dist/engine/modules/tools/agentModelSetToolBuild.d.ts.map +1 -0
  83. package/dist/engine/modules/tools/agentModelSetToolBuild.js +94 -0
  84. package/dist/engine/modules/tools/agentModelSetToolBuild.js.map +1 -0
  85. package/dist/engine/modules/tools/agentModelSetToolBuild.spec.d.ts +2 -0
  86. package/dist/engine/modules/tools/agentModelSetToolBuild.spec.d.ts.map +1 -0
  87. package/dist/engine/modules/tools/agentModelSetToolBuild.spec.js +45 -0
  88. package/dist/engine/modules/tools/agentModelSetToolBuild.spec.js.map +1 -0
  89. package/dist/engine/modules/tools/toolResultTruncate.d.ts +1 -1
  90. package/dist/engine/modules/tools/toolResultTruncate.d.ts.map +1 -1
  91. package/dist/engine/modules/tools/toolResultTruncate.js +46 -22
  92. package/dist/engine/modules/tools/toolResultTruncate.js.map +1 -1
  93. package/dist/engine/modules/tools/toolResultTruncate.spec.js +28 -2
  94. package/dist/engine/modules/tools/toolResultTruncate.spec.js.map +1 -1
  95. package/dist/engine/processes/processes.spec.js +5 -3
  96. package/dist/engine/processes/processes.spec.js.map +1 -1
  97. package/dist/plugins/dashboard/site/404.html +1 -1
  98. package/dist/plugins/dashboard/site/_next/static/chunks/app/agent/{page-e7a20c5ef1f769e6.js → page-2d345f6346edc077.js} +1 -1
  99. package/dist/plugins/dashboard/site/_next/static/chunks/app/agents/{page-b997df519e071e45.js → page-326ff3cf564198c7.js} +1 -1
  100. package/dist/plugins/dashboard/site/_next/static/chunks/app/automations/{page-fed8c9eb1cef42df.js → page-6a39540c21d6b25b.js} +1 -1
  101. package/dist/plugins/dashboard/site/_next/static/chunks/app/connectors/{page-a8a3b434a1ed7bda.js → page-92a732501885071f.js} +1 -1
  102. package/dist/plugins/dashboard/site/_next/static/chunks/app/memory/{page-c2c16e7623a0377d.js → page-74c0b70421c567ab.js} +1 -1
  103. package/dist/plugins/dashboard/site/_next/static/chunks/app/{page-5ebf2aeece51aed8.js → page-c4cbe1c7aca2ecd7.js} +1 -1
  104. package/dist/plugins/dashboard/site/_next/static/chunks/app/processes/{page-e6bdb861ae8bd14b.js → page-bf7900fe583d361e.js} +1 -1
  105. package/dist/plugins/dashboard/site/_next/static/chunks/app/providers/{page-d3743fe243237b22.js → page-b2e79cb03244c267.js} +1 -1
  106. package/dist/plugins/dashboard/site/_next/static/chunks/app/signals/{page-b817ca434cd43c0f.js → page-2992aa1807b6fdab.js} +1 -1
  107. package/dist/plugins/dashboard/site/_next/static/chunks/app/tools/{page-ce22e00b61861083.js → page-4a2e5a16190af659.js} +1 -1
  108. package/dist/plugins/dashboard/site/agent.html +1 -1
  109. package/dist/plugins/dashboard/site/agent.txt +2 -2
  110. package/dist/plugins/dashboard/site/agents.html +1 -1
  111. package/dist/plugins/dashboard/site/agents.txt +2 -2
  112. package/dist/plugins/dashboard/site/automations.html +1 -1
  113. package/dist/plugins/dashboard/site/automations.txt +2 -2
  114. package/dist/plugins/dashboard/site/connectors.html +1 -1
  115. package/dist/plugins/dashboard/site/connectors.txt +2 -2
  116. package/dist/plugins/dashboard/site/index.html +2 -2
  117. package/dist/plugins/dashboard/site/index.txt +2 -2
  118. package/dist/plugins/dashboard/site/memory.html +1 -1
  119. package/dist/plugins/dashboard/site/memory.txt +2 -2
  120. package/dist/plugins/dashboard/site/processes.html +1 -1
  121. package/dist/plugins/dashboard/site/processes.txt +2 -2
  122. package/dist/plugins/dashboard/site/providers.html +1 -1
  123. package/dist/plugins/dashboard/site/providers.txt +2 -2
  124. package/dist/plugins/dashboard/site/signals.html +1 -1
  125. package/dist/plugins/dashboard/site/signals.txt +2 -2
  126. package/dist/plugins/dashboard/site/telemetry.html +1 -1
  127. package/dist/plugins/dashboard/site/telemetry.txt +1 -1
  128. package/dist/plugins/dashboard/site/tools.html +1 -1
  129. package/dist/plugins/dashboard/site/tools.txt +2 -2
  130. package/dist/plugins/shell/tool.d.ts +1 -0
  131. package/dist/plugins/shell/tool.d.ts.map +1 -1
  132. package/dist/plugins/shell/tool.js +16 -5
  133. package/dist/plugins/shell/tool.js.map +1 -1
  134. package/dist/plugins/shell/tool.spec.js +33 -6
  135. package/dist/plugins/shell/tool.spec.js.map +1 -1
  136. package/dist/prompts/memory/OBSERVE.md +4 -0
  137. package/dist/sandbox/runtime.spec.js +3 -1
  138. package/dist/sandbox/runtime.spec.js.map +1 -1
  139. package/dist/storage/historyRepository.d.ts +1 -1
  140. package/dist/storage/historyRepository.d.ts.map +1 -1
  141. package/dist/storage/historyRepository.js +5 -5
  142. package/dist/storage/historyRepository.js.map +1 -1
  143. package/dist/types.d.ts +1 -1
  144. package/dist/types.d.ts.map +1 -1
  145. package/dist/utils/stringTruncateHeadTail.d.ts +6 -0
  146. package/dist/utils/stringTruncateHeadTail.d.ts.map +1 -0
  147. package/dist/utils/stringTruncateHeadTail.js +18 -0
  148. package/dist/utils/stringTruncateHeadTail.js.map +1 -0
  149. package/dist/utils/stringTruncateHeadTail.spec.d.ts +2 -0
  150. package/dist/utils/stringTruncateHeadTail.spec.d.ts.map +1 -0
  151. package/dist/utils/stringTruncateHeadTail.spec.js +20 -0
  152. package/dist/utils/stringTruncateHeadTail.spec.js.map +1 -0
  153. package/dist/utils/stringTruncateTail.d.ts +6 -0
  154. package/dist/utils/stringTruncateTail.d.ts.map +1 -0
  155. package/dist/utils/stringTruncateTail.js +15 -0
  156. package/dist/utils/stringTruncateTail.js.map +1 -0
  157. package/dist/utils/stringTruncateTail.spec.d.ts +2 -0
  158. package/dist/utils/stringTruncateTail.spec.d.ts.map +1 -0
  159. package/dist/utils/stringTruncateTail.spec.js +19 -0
  160. package/dist/utils/stringTruncateTail.spec.js.map +1 -0
  161. package/package.json +1 -1
  162. /package/dist/plugins/dashboard/site/_next/static/{Xz8Kc-P2fnMqmm-AsS7Ui → 9-NVJBP-YwBbxw-w3gjmQ}/_buildManifest.js +0 -0
  163. /package/dist/plugins/dashboard/site/_next/static/{Xz8Kc-P2fnMqmm-AsS7Ui → 9-NVJBP-YwBbxw-w3gjmQ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[150],{97878:function(e,n,r){Promise.resolve().then(r.bind(r,99253))},99253:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return m}});var t=r(27573),a=r(7653),i=r(86742),s=r(5757);let l=(0,r(50326).Z)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var c=r(48157),o=r(82041),d=r(16273),u=r(26798),v=r(90497);function m(){var e,n;let[r,m]=(0,a.useState)(null),[x,g]=(0,a.useState)(!1),[h,p]=(0,a.useState)(null),[j,y]=(0,a.useState)(null),b=(0,a.useCallback)(async()=>{g(!0),p(null);try{let e=await (0,v.jg)();m(e),y(new Date)}catch(e){p(e instanceof Error?e.message:"Failed to load providers")}finally{g(!1)}},[]);(0,a.useEffect)(()=>{b()},[b]);let w=null!==(e=null==r?void 0:r.inferenceProviders)&&void 0!==e?e:[],N=null!==(n=null==r?void 0:r.imageProviders)&&void 0!==n?n:[],k=(0,a.useMemo)(()=>w.map(e=>{var n;return null!==(n=e.name)&&void 0!==n?n:e.id}),[w]);return(0,t.jsx)(c.r,{title:"Providers",subtitle:"LLM and image generation providers available to the engine.",toolbar:(0,t.jsxs)(d.z,{onClick:()=>void b(),disabled:x,className:"gap-2",children:[(0,t.jsx)(i.Z,{className:x?"h-4 w-4 animate-spin":"h-4 w-4"}),"Refresh"]}),status:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:j?"Last synced ".concat(j.toLocaleTimeString()):"Awaiting first sync"}),h?(0,t.jsx)("span",{className:"rounded-full border border-destructive/40 bg-destructive/10 px-2.5 py-1 text-destructive",children:h}):(0,t.jsxs)("span",{children:[w.length+N.length," providers available"]})]}),children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[(0,t.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,t.jsxs)(u.Zb,{className:"bg-gradient-to-br from-primary/10 via-card to-card/80",children:[(0,t.jsxs)(u.Ol,{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(u.SZ,{children:"Inference providers"}),(0,t.jsx)(u.ll,{className:"text-2xl",children:w.length})]}),(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,t.jsx)(s.Z,{className:"h-5 w-5"})})]}),(0,t.jsx)(u.aY,{className:"text-xs text-muted-foreground",children:k.slice(0,2).join(", ")||"No inference providers"})]}),(0,t.jsxs)(u.Zb,{className:"bg-gradient-to-br from-secondary/30 via-card to-card/80",children:[(0,t.jsxs)(u.Ol,{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(u.SZ,{children:"Image providers"}),(0,t.jsx)(u.ll,{className:"text-2xl",children:N.length})]}),(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-secondary text-secondary-foreground",children:(0,t.jsx)(l,{className:"h-5 w-5"})})]}),(0,t.jsx)(u.aY,{className:"text-xs text-muted-foreground",children:N.map(e=>{var n;return null!==(n=e.name)&&void 0!==n?n:e.id}).slice(0,2).join(", ")||"No image providers"})]})]}),(0,t.jsxs)(u.Zb,{className:"bg-background/70",children:[(0,t.jsxs)(u.Ol,{children:[(0,t.jsx)(u.ll,{children:"Provider mix"}),(0,t.jsx)(u.SZ,{children:"Active inference and image services."})]}),(0,t.jsx)(u.aY,{className:"flex flex-wrap gap-2",children:w.length||N.length?(0,t.jsxs)(t.Fragment,{children:[w.map(e=>{var n;return(0,t.jsx)(o.C,{variant:"secondary",className:"text-xs",children:null!==(n=e.name)&&void 0!==n?n:e.id},"inference-".concat(e.id))}),N.map(e=>{var n;return(0,t.jsx)(o.C,{variant:"outline",className:"text-xs",children:null!==(n=e.name)&&void 0!==n?n:e.id},"image-".concat(e.id))})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"No providers detected."})})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsx)(f,{title:"Inference",description:"LLM providers currently available.",items:w.map(e=>{var n,r;return{title:null!==(n=e.name)&&void 0!==n?n:e.id,meta:null!==(r=e.label)&&void 0!==r?r:e.id}})}),(0,t.jsx)(f,{title:"Image Generation",description:"Image models and services.",items:N.map(e=>{var n,r;return{title:null!==(n=e.name)&&void 0!==n?n:e.id,meta:null!==(r=e.label)&&void 0!==r?r:e.id}})})]})]})})}function f(e){let{title:n,description:r,items:a}=e;return(0,t.jsxs)(u.Zb,{className:"overflow-hidden",children:[(0,t.jsxs)(u.Ol,{children:[(0,t.jsx)(u.ll,{children:n}),(0,t.jsx)(u.SZ,{children:r})]}),(0,t.jsx)(u.aY,{className:"space-y-3",children:a.length?a.map(e=>(0,t.jsx)("div",{className:"rounded-lg border bg-background/60 px-4 py-3 transition duration-300 hover:-translate-y-0.5 hover:border-primary/40 hover:bg-background",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:e.title}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:e.meta})]}),(0,t.jsx)(o.C,{variant:"outline",children:"ready"})]})},e.title)):(0,t.jsx)("div",{className:"rounded-lg border border-dashed px-4 py-6 text-sm text-muted-foreground",children:"No providers detected."})})]})}},82041:function(e,n,r){"use strict";r.d(n,{C:function(){return l}});var t=r(27573);r(7653);var a=r(49289),i=r(19369);let s=(0,a.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:n,variant:r,...a}=e;return(0,t.jsx)("div",{className:(0,i.cn)(s({variant:r}),n),...a})}},90497:function(e,n,r){"use strict";async function t(e){let n=await fetch(e);if(!n.ok)throw Error("Request failed: ".concat(n.status));return await n.json()}async function a(){var e;return null!==(e=(await t("/api/v1/engine/status")).status)&&void 0!==e?e:{}}async function i(){var e;return null!==(e=(await t("/api/v1/engine/users")).users)&&void 0!==e?e:[]}async function s(){var e;return null!==(e=(await t("/api/v1/engine/cron/tasks")).tasks)&&void 0!==e?e:[]}async function l(){var e;return null!==(e=(await t("/api/v1/engine/heartbeat/tasks")).tasks)&&void 0!==e?e:[]}async function c(){var e;return null!==(e=(await t("/api/v1/engine/processes")).processes)&&void 0!==e?e:[]}async function o(e){let n=await fetch("/api/v1/engine/signals/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok||!r.ok){var t;throw Error(null!==(t=r.error)&&void 0!==t?t:"Request failed: ".concat(n.status))}return r.signal}async function d(){var e;return null!==(e=(await t("/api/v1/engine/signals/subscriptions")).subscriptions)&&void 0!==e?e:[]}async function u(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,r=new URLSearchParams({limit:String(n)});return null!==(e=(await t("/api/v1/engine/signals/events?".concat(r))).events)&&void 0!==e?e:[]}async function v(){var e;return null!==(e=(await t("/api/v1/engine/agents/background")).agents)&&void 0!==e?e:[]}async function m(){var e;return null!==(e=(await t("/api/v1/engine/agents")).agents)&&void 0!==e?e:[]}async function f(e){var n;let r=encodeURIComponent(e);return null!==(n=(await t("/api/v1/engine/agents/".concat(r,"/history"))).records)&&void 0!==n?n:[]}async function x(e){let n=encodeURIComponent(e),r=await t("/api/v1/engine/memory/".concat(n,"/graph"));if(!r.graph)throw Error("Memory graph payload missing");return r.graph}async function g(e,n){var r;let t=encodeURIComponent(e),a=encodeURIComponent(n),i=await fetch("/api/v1/engine/memory/".concat(t,"/node/").concat(a));if(404===i.status)return null;if(!i.ok)throw Error("Request failed: ".concat(i.status));return null!==(r=(await i.json()).node)&&void 0!==r?r:null}r.d(n,{Ip:function(){return u},Sj:function(){return m},Sk:function(){return d},ab:function(){return f},ce:function(){return g},fP:function(){return s},jg:function(){return a},oI:function(){return v},pS:function(){return x},sB:function(){return o},sZ:function(){return l},uh:function(){return i},x3:function(){return c}})}},function(e){e.O(0,[129,315,293,528,744],function(){return e(e.s=97878)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[150],{97878:function(e,n,r){Promise.resolve().then(r.bind(r,99253))},99253:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return m}});var t=r(27573),a=r(7653),i=r(86742),s=r(5757);let l=(0,r(50326).Z)("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);var c=r(48157),o=r(82041),d=r(16273),u=r(26798),v=r(90497);function m(){var e,n;let[r,m]=(0,a.useState)(null),[x,g]=(0,a.useState)(!1),[h,p]=(0,a.useState)(null),[j,y]=(0,a.useState)(null),b=(0,a.useCallback)(async()=>{g(!0),p(null);try{let e=await (0,v.jg)();m(e),y(new Date)}catch(e){p(e instanceof Error?e.message:"Failed to load providers")}finally{g(!1)}},[]);(0,a.useEffect)(()=>{b()},[b]);let w=null!==(e=null==r?void 0:r.inferenceProviders)&&void 0!==e?e:[],N=null!==(n=null==r?void 0:r.imageProviders)&&void 0!==n?n:[],k=(0,a.useMemo)(()=>w.map(e=>{var n;return null!==(n=e.name)&&void 0!==n?n:e.id}),[w]);return(0,t.jsx)(c.r,{title:"Providers",subtitle:"LLM and image generation providers available to the engine.",toolbar:(0,t.jsxs)(d.z,{onClick:()=>void b(),disabled:x,className:"gap-2",children:[(0,t.jsx)(i.Z,{className:x?"h-4 w-4 animate-spin":"h-4 w-4"}),"Refresh"]}),status:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:j?"Last synced ".concat(j.toLocaleTimeString()):"Awaiting first sync"}),h?(0,t.jsx)("span",{className:"rounded-full border border-destructive/40 bg-destructive/10 px-2.5 py-1 text-destructive",children:h}):(0,t.jsxs)("span",{children:[w.length+N.length," providers available"]})]}),children:(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[(0,t.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,t.jsxs)(u.Zb,{className:"bg-gradient-to-br from-primary/10 via-card to-card/80",children:[(0,t.jsxs)(u.Ol,{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(u.SZ,{children:"Inference providers"}),(0,t.jsx)(u.ll,{className:"text-2xl",children:w.length})]}),(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,t.jsx)(s.Z,{className:"h-5 w-5"})})]}),(0,t.jsx)(u.aY,{className:"text-xs text-muted-foreground",children:k.slice(0,2).join(", ")||"No inference providers"})]}),(0,t.jsxs)(u.Zb,{className:"bg-gradient-to-br from-secondary/30 via-card to-card/80",children:[(0,t.jsxs)(u.Ol,{className:"flex flex-row items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(u.SZ,{children:"Image providers"}),(0,t.jsx)(u.ll,{className:"text-2xl",children:N.length})]}),(0,t.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-secondary text-secondary-foreground",children:(0,t.jsx)(l,{className:"h-5 w-5"})})]}),(0,t.jsx)(u.aY,{className:"text-xs text-muted-foreground",children:N.map(e=>{var n;return null!==(n=e.name)&&void 0!==n?n:e.id}).slice(0,2).join(", ")||"No image providers"})]})]}),(0,t.jsxs)(u.Zb,{className:"bg-background/70",children:[(0,t.jsxs)(u.Ol,{children:[(0,t.jsx)(u.ll,{children:"Provider mix"}),(0,t.jsx)(u.SZ,{children:"Active inference and image services."})]}),(0,t.jsx)(u.aY,{className:"flex flex-wrap gap-2",children:w.length||N.length?(0,t.jsxs)(t.Fragment,{children:[w.map(e=>{var n;return(0,t.jsx)(o.C,{variant:"secondary",className:"text-xs",children:null!==(n=e.name)&&void 0!==n?n:e.id},"inference-".concat(e.id))}),N.map(e=>{var n;return(0,t.jsx)(o.C,{variant:"outline",className:"text-xs",children:null!==(n=e.name)&&void 0!==n?n:e.id},"image-".concat(e.id))})]}):(0,t.jsx)("div",{className:"text-sm text-muted-foreground",children:"No providers detected."})})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsx)(f,{title:"Inference",description:"LLM providers currently available.",items:w.map(e=>{var n,r;return{title:null!==(n=e.name)&&void 0!==n?n:e.id,meta:null!==(r=e.label)&&void 0!==r?r:e.id}})}),(0,t.jsx)(f,{title:"Image Generation",description:"Image models and services.",items:N.map(e=>{var n,r;return{title:null!==(n=e.name)&&void 0!==n?n:e.id,meta:null!==(r=e.label)&&void 0!==r?r:e.id}})})]})]})})}function f(e){let{title:n,description:r,items:a}=e;return(0,t.jsxs)(u.Zb,{className:"overflow-hidden",children:[(0,t.jsxs)(u.Ol,{children:[(0,t.jsx)(u.ll,{children:n}),(0,t.jsx)(u.SZ,{children:r})]}),(0,t.jsx)(u.aY,{className:"space-y-3",children:a.length?a.map(e=>(0,t.jsx)("div",{className:"rounded-lg border bg-background/60 px-4 py-3 transition duration-300 hover:-translate-y-0.5 hover:border-primary/40 hover:bg-background",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm font-medium text-foreground",children:e.title}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:e.meta})]}),(0,t.jsx)(o.C,{variant:"outline",children:"ready"})]})},e.title)):(0,t.jsx)("div",{className:"rounded-lg border border-dashed px-4 py-6 text-sm text-muted-foreground",children:"No providers detected."})})]})}},82041:function(e,n,r){"use strict";r.d(n,{C:function(){return l}});var t=r(27573);r(7653);var a=r(49289),i=r(19369);let s=(0,a.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:n,variant:r,...a}=e;return(0,t.jsx)("div",{className:(0,i.cn)(s({variant:r}),n),...a})}},90497:function(e,n,r){"use strict";async function t(e){let n=await fetch(e);if(!n.ok)throw Error("Request failed: ".concat(n.status));return await n.json()}async function a(){var e;return null!==(e=(await t("/api/v1/engine/status")).status)&&void 0!==e?e:{}}async function i(){var e;return null!==(e=(await t("/api/v1/engine/users")).users)&&void 0!==e?e:[]}async function s(){var e;return null!==(e=(await t("/api/v1/engine/cron/tasks")).tasks)&&void 0!==e?e:[]}async function l(){var e;return null!==(e=(await t("/api/v1/engine/heartbeat/tasks")).tasks)&&void 0!==e?e:[]}async function c(){var e;return null!==(e=(await t("/api/v1/engine/processes")).processes)&&void 0!==e?e:[]}async function o(e){let n=await fetch("/api/v1/engine/signals/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok||!r.ok){var t;throw Error(null!==(t=r.error)&&void 0!==t?t:"Request failed: ".concat(n.status))}return r.signal}async function d(){var e;return null!==(e=(await t("/api/v1/engine/signals/subscriptions")).subscriptions)&&void 0!==e?e:[]}async function u(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,r=new URLSearchParams({limit:String(n)});return null!==(e=(await t("/api/v1/engine/signals/events?".concat(r))).events)&&void 0!==e?e:[]}async function v(){var e;return null!==(e=(await t("/api/v1/engine/agents/background")).agents)&&void 0!==e?e:[]}async function m(){var e;return null!==(e=(await t("/api/v1/engine/agents")).agents)&&void 0!==e?e:[]}async function f(e){var n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=encodeURIComponent(e),i=new URLSearchParams({limit:String(r)});return null!==(n=(await t("/api/v1/engine/agents/".concat(a,"/history?").concat(i))).records)&&void 0!==n?n:[]}async function x(e){let n=encodeURIComponent(e),r=await t("/api/v1/engine/memory/".concat(n,"/graph"));if(!r.graph)throw Error("Memory graph payload missing");return r.graph}async function g(e,n){var r;let t=encodeURIComponent(e),a=encodeURIComponent(n),i=await fetch("/api/v1/engine/memory/".concat(t,"/node/").concat(a));if(404===i.status)return null;if(!i.ok)throw Error("Request failed: ".concat(i.status));return null!==(r=(await i.json()).node)&&void 0!==r?r:null}r.d(n,{Ip:function(){return u},Sj:function(){return m},Sk:function(){return d},ab:function(){return f},ce:function(){return g},fP:function(){return s},jg:function(){return a},oI:function(){return v},pS:function(){return x},sB:function(){return o},sZ:function(){return l},uh:function(){return i},x3:function(){return c}})}},function(e){e.O(0,[129,315,293,528,744],function(){return e(e.s=97878)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[302],{33096:function(e,t,a){Promise.resolve().then(a.bind(a,8122))},8122:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return B}});var s=a(27573),n=a(7653),r=a.t(n,2),l=a(86742),i=a(81929),c=a(94883),o=a(50027),d=a(50326);let u=(0,d.Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);var m=a(87164),x=a(74997);let p=(0,d.Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),f=(0,d.Z)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var h=a(38534);let g=(0,d.Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),y=(0,d.Z)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var v=a(46191),j=a(63964),b=a(5757),N=a(69452),w=a(3105),k=a(63568),S=a(48157),Z=a(82041),C=a(16273),R=a(26798),M=a(63769),A=a(13040);a(3458);var _=a(94492),E=Symbol.for("react.lazy"),O=r[" use ".trim().toString()];function z(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===E&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var I=Symbol("radix.slottable");function D(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===I}var P=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let a=function(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:a,...s}=e;if(z(a)&&"function"==typeof O&&(a=O(a._payload)),n.isValidElement(a)){var r;let e,l;let i=(r=a,(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref),c=function(e,t){let a={...t};for(let s in t){let n=e[s],r=t[s];/^on[A-Z]/.test(s)?n&&r?a[s]=(...e)=>{let t=r(...e);return n(...e),t}:n&&(a[s]=n):"style"===s?a[s]={...n,...r}:"className"===s&&(a[s]=[n,r].filter(Boolean).join(" "))}return{...e,...a}}(s,a.props);return a.type!==n.Fragment&&(c.ref=t?(0,_.F)(t,i):i),n.cloneElement(a,c)}return n.Children.count(a)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),a=n.forwardRef((e,a)=>{let{children:r,...l}=e;z(r)&&"function"==typeof O&&(r=O(r._payload));let i=n.Children.toArray(r),c=i.find(D);if(c){let e=c.props.children,r=i.map(t=>t!==c?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...l,ref:a,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,s.jsx)(t,{...l,ref:a,children:r})});return a.displayName=`${e}.Slot`,a}(`Primitive.${t}`),r=n.forwardRef((e,n)=>{let{asChild:r,...l}=e,i=r?a:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(i,{...l,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),q=n.forwardRef((e,t)=>(0,s.jsx)(P.label,{...e,ref:t,onMouseDown:t=>{var a;t.target.closest("button, input, select, textarea")||(null===(a=e.onMouseDown)||void 0===a||a.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));q.displayName="Label";var F=a(49289),L=a(19369);let $=(0,F.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(q,{ref:t,className:(0,L.cn)($(),a),...n})});J.displayName=q.displayName;var V=a(90497);function B(){let[e,t]=(0,n.useState)([]),[a,r]=(0,n.useState)([]),[d,m]=(0,n.useState)(!1),[x,p]=(0,n.useState)(null),[f,h]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)("all"),b=(0,n.useRef)(null),N=(0,n.useCallback)(async()=>{m(!0),p(null);try{let[e,a]=await Promise.all([(0,V.Ip)(500),(0,V.Sk)()]);t(e),r(a),h(new Date)}catch(e){p(e instanceof Error?e.message:"Failed to load signals")}finally{m(!1)}},[]);(0,n.useEffect)(()=>{N()},[N]),(0,n.useEffect)(()=>{let e=new EventSource("/api/v1/engine/events");return b.current=e,e.onmessage=e=>{try{let a=JSON.parse(e.data);"signal.generated"===a.type&&a.payload&&t(e=>[...e,a.payload])}catch(e){}},()=>{e.close()}},[]);let w=(0,n.useMemo)(()=>Array.from(new Set(e.map(e=>e.type))).sort(),[e]),k=(0,n.useMemo)(()=>Array.from(new Set(e.map(e=>e.source.type))).sort(),[e]),Z=(0,n.useMemo)(()=>{let t=e;if(g){let e=g.toLowerCase();t=t.filter(t=>t.type.toLowerCase().includes(e))}return"all"!==v&&(t=t.filter(e=>e.source.type===v)),t},[e,g,v]),_=(0,n.useMemo)(()=>[...Z].reverse(),[Z]),E=(0,n.useMemo)(()=>{let t=Date.now()-3e5;return e.filter(e=>e.createdAt>t).length},[e]),O=(0,n.useMemo)(()=>{let t=Date.now()-36e5;return e.filter(e=>e.createdAt>t).length},[e]);return(0,s.jsx)(S.r,{title:"Signals",subtitle:"Event stream from agents, system, webhooks, and processes.",toolbar:(0,s.jsxs)(C.z,{onClick:()=>void N(),disabled:d,className:"gap-2",children:[(0,s.jsx)(l.Z,{className:d?"h-4 w-4 animate-spin":"h-4 w-4"}),"Refresh"]}),status:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:f?"Last synced ".concat(f.toLocaleTimeString()):"Awaiting first sync"}),x?(0,s.jsx)("span",{className:"rounded-full border border-destructive/40 bg-destructive/10 px-2.5 py-1 text-destructive",children:x}):(0,s.jsxs)("span",{children:[e.length," events loaded"]})]}),children:(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,s.jsx)(W,{label:"Total events",value:e.length,detail:"Signals persisted",icon:(0,s.jsx)(i.Z,{className:"h-5 w-5"}),tone:"primary"}),(0,s.jsx)(W,{label:"Last 5 min",value:E,detail:"Recent activity",icon:(0,s.jsx)(c.Z,{className:"h-5 w-5"}),tone:"amber"}),(0,s.jsx)(W,{label:"Last hour",value:O,detail:"Hourly throughput",icon:(0,s.jsx)(o.Z,{className:"h-5 w-5"}),tone:"emerald"}),(0,s.jsx)(W,{label:"Signal types",value:w.length,detail:w.length?w.slice(0,3).join(", "):"No types yet",icon:(0,s.jsx)(u,{className:"h-5 w-5"}),tone:"violet"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[(0,s.jsx)(u,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)(M.I,{placeholder:"Filter by signal type...",value:g,onChange:e=>y(e.target.value),className:"pl-9 h-9"})]}),(0,s.jsxs)(A.Ph,{value:v,onValueChange:j,children:[(0,s.jsx)(A.i4,{className:"w-[160px] h-9",children:(0,s.jsx)(A.ki,{placeholder:"All sources"})}),(0,s.jsxs)(A.Bw,{children:[(0,s.jsx)(A.Ql,{value:"all",children:"All sources"}),k.map(e=>(0,s.jsx)(A.Ql,{value:e,children:e},e))]})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:Z.length===e.length?"".concat(e.length," events"):"".concat(Z.length," of ").concat(e.length," events")})]}),(0,s.jsx)(U,{}),(0,s.jsx)(Y,{subscriptions:a}),_.length?(0,s.jsx)("div",{className:"space-y-2",children:_.map(e=>(0,s.jsx)(Q,{event:e},e.id))}):(0,s.jsx)(R.Zb,{children:(0,s.jsxs)(R.aY,{className:"flex flex-col items-center justify-center gap-3 py-16 text-muted-foreground",children:[(0,s.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted/50",children:(0,s.jsx)(i.Z,{className:"h-8 w-8"})}),(0,s.jsx)("span",{className:"text-sm",children:0===e.length?"No signals recorded yet":"No signals match your filters"})]})})]})})}function Q(e){let{event:t}=e,[a,r]=(0,n.useState)(!1),l=void 0!==t.data&&null!==t.data;return(0,s.jsxs)(R.Zb,{className:"transition-shadow hover:shadow-md",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 cursor-pointer select-none",onClick:()=>l&&r(e=>!e),children:[(0,s.jsx)("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ".concat(K(t.source).bg),children:(0,s.jsx)(H,{source:t.source,className:"h-3.5 w-3.5 ".concat(K(t.source).text)})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"font-mono text-sm font-medium text-foreground",children:t.type}),(0,s.jsxs)(Z.C,{variant:"outline",className:"text-[10px] gap-1",children:[(0,s.jsx)(H,{source:t.source,className:"h-2.5 w-2.5"}),function(e){switch(e.type){case"system":return"system";case"agent":return"agent:".concat(e.id);case"webhook":return e.id?"webhook:".concat(e.id):"webhook";case"process":return e.id?"process:".concat(e.id):"process"}}(t.source)]}),l&&(0,s.jsx)(Z.C,{variant:"secondary",className:"text-[10px]",children:"payload"})]}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{children:X(t.createdAt)}),(0,s.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:t.id})]})]}),l&&(0,s.jsx)("button",{className:"mt-1 shrink-0 rounded p-1 text-muted-foreground hover:bg-muted",children:a?(0,s.jsx)(m.Z,{className:"h-4 w-4"}):(0,s.jsx)(x.Z,{className:"h-4 w-4"})})]}),a&&l&&(0,s.jsxs)("div",{className:"border-t px-4 py-3",children:[(0,s.jsx)("div",{className:"mb-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Data payload"}),(0,s.jsx)("pre",{className:"max-h-64 overflow-auto rounded-lg border bg-muted/50 p-3 text-xs font-mono text-foreground whitespace-pre-wrap break-words",children:function(e){try{return JSON.stringify(e,null,2)}catch(t){return String(e)}}(t.data)})]})]})}function U(){let[e,t]=(0,n.useState)(!1),[a,r]=(0,n.useState)(""),[l,i]=(0,n.useState)("system"),[c,o]=(0,n.useState)(""),[d,u]=(0,n.useState)(""),[m,x]=(0,n.useState)(null),[y,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(null),[N,w]=(0,n.useState)(!1),k=e=>{if(u(e),b(null),w(!1),!e.trim()){x(null);return}try{JSON.parse(e),x(null)}catch(e){x(e instanceof Error?e.message:"Invalid JSON")}},S=async()=>{let e,t;if(b(null),w(!1),!a.trim()){b("Signal type is required");return}if("system"===l)e={type:"system"};else if("agent"===l){if(!c.trim()){b("Agent ID is required");return}e={type:"agent",id:c.trim()}}else"webhook"===l?e={type:"webhook",id:c.trim()||void 0}:"process"===l&&(e={type:"process",id:c.trim()||void 0});if(d.trim())try{t=JSON.parse(d)}catch(e){b("Data must be valid JSON");return}v(!0);try{await (0,V.sB)({type:a.trim(),source:e,data:t}),w(!0),r(""),u(""),o(""),x(null)}catch(e){b(e instanceof Error?e.message:"Failed to send signal")}finally{v(!1)}};return e?(0,s.jsxs)(R.Zb,{children:[(0,s.jsx)(R.Ol,{className:"pb-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,s.jsx)(f,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(R.ll,{className:"text-base",children:"Send signal"}),(0,s.jsx)(R.SZ,{children:"Generate a new signal event."})]})]}),(0,s.jsx)(C.z,{variant:"ghost",size:"sm",onClick:()=>t(!1),className:"text-xs",children:"Cancel"})]})}),(0,s.jsxs)(R.aY,{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(J,{htmlFor:"signal-type",className:"text-xs",children:"Signal type *"}),(0,s.jsx)(M.I,{id:"signal-type",placeholder:"e.g. build.completed, deploy.started",value:a,onChange:e=>{r(e.target.value),b(null),w(!1)},className:"h-9 font-mono"})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(J,{className:"text-xs",children:"Source type"}),(0,s.jsxs)(A.Ph,{value:l,onValueChange:e=>{i(e),b(null)},children:[(0,s.jsx)(A.i4,{className:"h-9",children:(0,s.jsx)(A.ki,{})}),(0,s.jsxs)(A.Bw,{children:[(0,s.jsx)(A.Ql,{value:"system",children:"system"}),(0,s.jsx)(A.Ql,{value:"agent",children:"agent"}),(0,s.jsx)(A.Ql,{value:"webhook",children:"webhook"}),(0,s.jsx)(A.Ql,{value:"process",children:"process"})]})]})]}),"system"!==l&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)(J,{htmlFor:"source-id",className:"text-xs",children:["Source ID ","agent"===l?"*":"(optional)"]}),(0,s.jsx)(M.I,{id:"source-id",placeholder:"agent"===l?"agent-id":"optional-id",value:c,onChange:e=>{o(e.target.value),b(null)},className:"h-9 font-mono"})]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(J,{htmlFor:"signal-data",className:"text-xs",children:"Data payload (JSON, optional)"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("textarea",{id:"signal-data",placeholder:'{"key": "value"}',value:d,onChange:e=>k(e.target.value),rows:4,className:"w-full rounded-lg border bg-background px-3 py-2 font-mono text-xs leading-relaxed text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring resize-y ".concat(m?"border-destructive focus-visible:ring-destructive":"")}),d.trim()&&!m&&(0,s.jsx)("div",{className:"absolute right-2 top-2",children:(0,s.jsx)(h.Z,{className:"h-3.5 w-3.5 text-emerald-500"})})]}),m&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[(0,s.jsx)(g,{className:"h-3 w-3 shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:m})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)(C.z,{onClick:()=>void S(),disabled:y||!!m,className:"gap-2",children:[(0,s.jsx)(f,{className:"h-3.5 w-3.5 ".concat(y?"animate-pulse":"")}),y?"Sending...":"Send signal"]}),j&&(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[(0,s.jsx)(g,{className:"h-3 w-3 shrink-0"}),j]}),N&&(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-600 dark:text-emerald-400",children:[(0,s.jsx)(h.Z,{className:"h-3 w-3"}),"Signal sent"]})]})]})]}):(0,s.jsxs)(C.z,{variant:"outline",onClick:()=>t(!0),className:"gap-2 self-start",children:[(0,s.jsx)(p,{className:"h-3.5 w-3.5"}),"Send signal"]})}function Y(e){let{subscriptions:t}=e,[a,r]=(0,n.useState)(!0);return 0===t.length?null:(0,s.jsxs)(R.Zb,{children:[(0,s.jsx)(R.Ol,{className:"pb-3",children:(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer select-none",onClick:()=>r(e=>!e),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",children:(0,s.jsx)(y,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.ll,{className:"text-base",children:["Active subscriptions",(0,s.jsx)(Z.C,{variant:"secondary",className:"ml-2 text-[10px]",children:t.length})]}),(0,s.jsx)(R.SZ,{children:"Agents listening for signal patterns."})]})]}),(0,s.jsx)("button",{className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-muted",children:a?(0,s.jsx)(m.Z,{className:"h-4 w-4"}):(0,s.jsx)(x.Z,{className:"h-4 w-4"})})]})}),a&&(0,s.jsx)(R.aY,{className:"pt-0",children:(0,s.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,s.jsx)(T,{subscription:e},"".concat(e.agentId,"::").concat(e.pattern)))})})]})}function T(e){let{subscription:t}=e;return(0,s.jsx)("div",{className:"flex items-center gap-3 rounded-lg border px-3 py-2.5",children:(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"font-mono text-sm font-medium text-foreground",children:t.pattern}),t.silent?(0,s.jsxs)(Z.C,{variant:"outline",className:"text-[10px] gap-1 text-muted-foreground",children:[(0,s.jsx)(v.Z,{className:"h-2.5 w-2.5"}),"silent"]}):(0,s.jsxs)(Z.C,{variant:"outline",className:"text-[10px] gap-1 text-amber-600 dark:text-amber-400 border-amber-300 dark:border-amber-700",children:[(0,s.jsx)(j.Z,{className:"h-2.5 w-2.5"}),"notify"]})]}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(b.Z,{className:"h-3 w-3"}),t.agentId]}),(0,s.jsxs)("span",{children:["subscribed ",X(t.createdAt)]}),t.updatedAt!==t.createdAt&&(0,s.jsxs)("span",{children:["updated ",X(t.updatedAt)]})]})]})})}let G={primary:{bg:"bg-primary/10",text:"text-primary",gradient:"from-primary/10 via-card to-card"},amber:{bg:"bg-amber-500/10",text:"text-amber-600 dark:text-amber-400",gradient:"from-amber-500/10 via-card to-card"},emerald:{bg:"bg-emerald-500/10",text:"text-emerald-600 dark:text-emerald-400",gradient:"from-emerald-500/10 via-card to-card"},violet:{bg:"bg-violet-500/10",text:"text-violet-600 dark:text-violet-400",gradient:"from-violet-500/10 via-card to-card"}};function W(e){let{label:t,value:a,detail:n,icon:r,tone:l}=e,i=G[l];return(0,s.jsxs)(R.Zb,{className:"relative overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br ".concat(i.gradient)}),(0,s.jsxs)(R.Ol,{className:"relative flex flex-row items-center justify-between pb-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(R.SZ,{className:"text-xs",children:t}),(0,s.jsx)(R.ll,{className:"text-3xl font-semibold tabular-nums",children:a})]}),(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full ".concat(i.bg," ").concat(i.text),children:r})]}),(0,s.jsx)(R.aY,{className:"relative text-xs text-muted-foreground truncate",children:n})]})}function H(e){let{source:t,className:a}=e;switch(t.type){case"system":return(0,s.jsx)(N.Z,{className:a});case"agent":return(0,s.jsx)(b.Z,{className:a});case"webhook":return(0,s.jsx)(w.Z,{className:a});case"process":return(0,s.jsx)(k.Z,{className:a})}}function K(e){switch(e.type){case"system":return{bg:"bg-blue-500/10",text:"text-blue-600 dark:text-blue-400"};case"agent":return{bg:"bg-amber-500/10",text:"text-amber-600 dark:text-amber-400"};case"webhook":return{bg:"bg-emerald-500/10",text:"text-emerald-600 dark:text-emerald-400"};case"process":return{bg:"bg-violet-500/10",text:"text-violet-600 dark:text-violet-400"}}}function X(e){let t=Date.now()-e;if(t<0)return"just now";let a=Math.floor(t/1e3);if(a<60)return"".concat(a,"s ago");let s=Math.floor(a/60);if(s<60)return"".concat(s,"m ago");let n=Math.floor(s/60);if(n<24)return"".concat(n,"h ago");let r=Math.floor(n/24);return r<7?"".concat(r,"d ago"):new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},82041:function(e,t,a){"use strict";a.d(t,{C:function(){return i}});var s=a(27573);a(7653);var n=a(49289),r=a(19369);let l=(0,n.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:a,...n}=e;return(0,s.jsx)("div",{className:(0,r.cn)(l({variant:a}),t),...n})}},13040:function(e,t,a){"use strict";a.d(t,{Bw:function(){return f},Ph:function(){return d},Ql:function(){return h},i4:function(){return m},ki:function(){return u}});var s=a(27573),n=a(7653),r=a(21395),l=a(87164),i=a(67207),c=a(38534),o=a(19369);let d=r.fC;r.ZA;let u=r.B4,m=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,s.jsxs)(r.xz,{ref:t,className:(0,o.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...i,children:[n,(0,s.jsx)(r.JO,{asChild:!0,children:(0,s.jsx)(l.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=r.xz.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.u_,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=r.u_.displayName;let p=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.$G,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(l.Z,{className:"h-4 w-4"})})});p.displayName=r.$G.displayName;let f=n.forwardRef((e,t)=>{let{className:a,children:n,position:l="popper",...i}=e;return(0,s.jsx)(r.h_,{children:(0,s.jsxs)(r.VY,{ref:t,className:(0,o.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:l,...i,children:[(0,s.jsx)(x,{}),(0,s.jsx)(r.l_,{className:(0,o.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full"),children:n}),(0,s.jsx)(p,{})]})})});f.displayName=r.VY.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.__,{ref:t,className:(0,o.cn)("px-2 py-1.5 text-sm font-semibold",a),...n})}).displayName=r.__.displayName;let h=n.forwardRef((e,t)=>{let{className:a,children:n,...l}=e;return(0,s.jsxs)(r.ck,{ref:t,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l,children:[(0,s.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(r.wU,{children:(0,s.jsx)(c.Z,{className:"h-4 w-4"})})}),(0,s.jsx)(r.eT,{children:n})]})});h.displayName=r.ck.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.Z0,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",a),...n})}).displayName=r.Z0.displayName},90497:function(e,t,a){"use strict";async function s(e){let t=await fetch(e);if(!t.ok)throw Error("Request failed: ".concat(t.status));return await t.json()}async function n(){var e;return null!==(e=(await s("/api/v1/engine/status")).status)&&void 0!==e?e:{}}async function r(){var e;return null!==(e=(await s("/api/v1/engine/users")).users)&&void 0!==e?e:[]}async function l(){var e;return null!==(e=(await s("/api/v1/engine/cron/tasks")).tasks)&&void 0!==e?e:[]}async function i(){var e;return null!==(e=(await s("/api/v1/engine/heartbeat/tasks")).tasks)&&void 0!==e?e:[]}async function c(){var e;return null!==(e=(await s("/api/v1/engine/processes")).processes)&&void 0!==e?e:[]}async function o(e){let t=await fetch("/api/v1/engine/signals/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();if(!t.ok||!a.ok){var s;throw Error(null!==(s=a.error)&&void 0!==s?s:"Request failed: ".concat(t.status))}return a.signal}async function d(){var e;return null!==(e=(await s("/api/v1/engine/signals/subscriptions")).subscriptions)&&void 0!==e?e:[]}async function u(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,a=new URLSearchParams({limit:String(t)});return null!==(e=(await s("/api/v1/engine/signals/events?".concat(a))).events)&&void 0!==e?e:[]}async function m(){var e;return null!==(e=(await s("/api/v1/engine/agents/background")).agents)&&void 0!==e?e:[]}async function x(){var e;return null!==(e=(await s("/api/v1/engine/agents")).agents)&&void 0!==e?e:[]}async function p(e){var t;let a=encodeURIComponent(e);return null!==(t=(await s("/api/v1/engine/agents/".concat(a,"/history"))).records)&&void 0!==t?t:[]}async function f(e){let t=encodeURIComponent(e),a=await s("/api/v1/engine/memory/".concat(t,"/graph"));if(!a.graph)throw Error("Memory graph payload missing");return a.graph}async function h(e,t){var a;let s=encodeURIComponent(e),n=encodeURIComponent(t),r=await fetch("/api/v1/engine/memory/".concat(s,"/node/").concat(n));if(404===r.status)return null;if(!r.ok)throw Error("Request failed: ".concat(r.status));return null!==(a=(await r.json()).node)&&void 0!==a?a:null}a.d(t,{Ip:function(){return u},Sj:function(){return x},Sk:function(){return d},ab:function(){return p},ce:function(){return h},fP:function(){return l},jg:function(){return n},oI:function(){return m},pS:function(){return f},sB:function(){return o},sZ:function(){return i},uh:function(){return r},x3:function(){return c}})},46191:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]])},3105:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},69452:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},94883:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])}},function(e){e.O(0,[129,3,315,293,528,744],function(){return e(e.s=33096)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[302],{33096:function(e,t,a){Promise.resolve().then(a.bind(a,8122))},8122:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return B}});var s=a(27573),n=a(7653),r=a.t(n,2),l=a(86742),i=a(81929),c=a(94883),o=a(50027),d=a(50326);let u=(0,d.Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);var m=a(87164),x=a(74997);let p=(0,d.Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),f=(0,d.Z)("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var h=a(38534);let g=(0,d.Z)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),y=(0,d.Z)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var v=a(46191),j=a(63964),b=a(5757),N=a(69452),w=a(3105),k=a(63568),S=a(48157),Z=a(82041),C=a(16273),R=a(26798),M=a(63769),A=a(13040);a(3458);var _=a(94492),E=Symbol.for("react.lazy"),O=r[" use ".trim().toString()];function z(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===E&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var I=Symbol("radix.slottable");function D(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===I}var P=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let a=function(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:a,...s}=e;if(z(a)&&"function"==typeof O&&(a=O(a._payload)),n.isValidElement(a)){var r;let e,l;let i=(r=a,(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref),c=function(e,t){let a={...t};for(let s in t){let n=e[s],r=t[s];/^on[A-Z]/.test(s)?n&&r?a[s]=(...e)=>{let t=r(...e);return n(...e),t}:n&&(a[s]=n):"style"===s?a[s]={...n,...r}:"className"===s&&(a[s]=[n,r].filter(Boolean).join(" "))}return{...e,...a}}(s,a.props);return a.type!==n.Fragment&&(c.ref=t?(0,_.F)(t,i):i),n.cloneElement(a,c)}return n.Children.count(a)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),a=n.forwardRef((e,a)=>{let{children:r,...l}=e;z(r)&&"function"==typeof O&&(r=O(r._payload));let i=n.Children.toArray(r),c=i.find(D);if(c){let e=c.props.children,r=i.map(t=>t!==c?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...l,ref:a,children:n.isValidElement(e)?n.cloneElement(e,void 0,r):null})}return(0,s.jsx)(t,{...l,ref:a,children:r})});return a.displayName=`${e}.Slot`,a}(`Primitive.${t}`),r=n.forwardRef((e,n)=>{let{asChild:r,...l}=e,i=r?a:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(i,{...l,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),q=n.forwardRef((e,t)=>(0,s.jsx)(P.label,{...e,ref:t,onMouseDown:t=>{var a;t.target.closest("button, input, select, textarea")||(null===(a=e.onMouseDown)||void 0===a||a.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));q.displayName="Label";var L=a(49289),F=a(19369);let $=(0,L.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(q,{ref:t,className:(0,F.cn)($(),a),...n})});J.displayName=q.displayName;var V=a(90497);function B(){let[e,t]=(0,n.useState)([]),[a,r]=(0,n.useState)([]),[d,m]=(0,n.useState)(!1),[x,p]=(0,n.useState)(null),[f,h]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)("all"),b=(0,n.useRef)(null),N=(0,n.useCallback)(async()=>{m(!0),p(null);try{let[e,a]=await Promise.all([(0,V.Ip)(500),(0,V.Sk)()]);t(e),r(a),h(new Date)}catch(e){p(e instanceof Error?e.message:"Failed to load signals")}finally{m(!1)}},[]);(0,n.useEffect)(()=>{N()},[N]),(0,n.useEffect)(()=>{let e=new EventSource("/api/v1/engine/events");return b.current=e,e.onmessage=e=>{try{let a=JSON.parse(e.data);"signal.generated"===a.type&&a.payload&&t(e=>[...e,a.payload])}catch(e){}},()=>{e.close()}},[]);let w=(0,n.useMemo)(()=>Array.from(new Set(e.map(e=>e.type))).sort(),[e]),k=(0,n.useMemo)(()=>Array.from(new Set(e.map(e=>e.source.type))).sort(),[e]),Z=(0,n.useMemo)(()=>{let t=e;if(g){let e=g.toLowerCase();t=t.filter(t=>t.type.toLowerCase().includes(e))}return"all"!==v&&(t=t.filter(e=>e.source.type===v)),t},[e,g,v]),_=(0,n.useMemo)(()=>[...Z].reverse(),[Z]),E=(0,n.useMemo)(()=>{let t=Date.now()-3e5;return e.filter(e=>e.createdAt>t).length},[e]),O=(0,n.useMemo)(()=>{let t=Date.now()-36e5;return e.filter(e=>e.createdAt>t).length},[e]);return(0,s.jsx)(S.r,{title:"Signals",subtitle:"Event stream from agents, system, webhooks, and processes.",toolbar:(0,s.jsxs)(C.z,{onClick:()=>void N(),disabled:d,className:"gap-2",children:[(0,s.jsx)(l.Z,{className:d?"h-4 w-4 animate-spin":"h-4 w-4"}),"Refresh"]}),status:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:f?"Last synced ".concat(f.toLocaleTimeString()):"Awaiting first sync"}),x?(0,s.jsx)("span",{className:"rounded-full border border-destructive/40 bg-destructive/10 px-2.5 py-1 text-destructive",children:x}):(0,s.jsxs)("span",{children:[e.length," events loaded"]})]}),children:(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:[(0,s.jsx)(W,{label:"Total events",value:e.length,detail:"Signals persisted",icon:(0,s.jsx)(i.Z,{className:"h-5 w-5"}),tone:"primary"}),(0,s.jsx)(W,{label:"Last 5 min",value:E,detail:"Recent activity",icon:(0,s.jsx)(c.Z,{className:"h-5 w-5"}),tone:"amber"}),(0,s.jsx)(W,{label:"Last hour",value:O,detail:"Hourly throughput",icon:(0,s.jsx)(o.Z,{className:"h-5 w-5"}),tone:"emerald"}),(0,s.jsx)(W,{label:"Signal types",value:w.length,detail:w.length?w.slice(0,3).join(", "):"No types yet",icon:(0,s.jsx)(u,{className:"h-5 w-5"}),tone:"violet"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative flex-1 min-w-[200px] max-w-sm",children:[(0,s.jsx)(u,{className:"absolute left-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,s.jsx)(M.I,{placeholder:"Filter by signal type...",value:g,onChange:e=>y(e.target.value),className:"pl-9 h-9"})]}),(0,s.jsxs)(A.Ph,{value:v,onValueChange:j,children:[(0,s.jsx)(A.i4,{className:"w-[160px] h-9",children:(0,s.jsx)(A.ki,{placeholder:"All sources"})}),(0,s.jsxs)(A.Bw,{children:[(0,s.jsx)(A.Ql,{value:"all",children:"All sources"}),k.map(e=>(0,s.jsx)(A.Ql,{value:e,children:e},e))]})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:Z.length===e.length?"".concat(e.length," events"):"".concat(Z.length," of ").concat(e.length," events")})]}),(0,s.jsx)(U,{}),(0,s.jsx)(Y,{subscriptions:a}),_.length?(0,s.jsx)("div",{className:"space-y-2",children:_.map(e=>(0,s.jsx)(Q,{event:e},e.id))}):(0,s.jsx)(R.Zb,{children:(0,s.jsxs)(R.aY,{className:"flex flex-col items-center justify-center gap-3 py-16 text-muted-foreground",children:[(0,s.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted/50",children:(0,s.jsx)(i.Z,{className:"h-8 w-8"})}),(0,s.jsx)("span",{className:"text-sm",children:0===e.length?"No signals recorded yet":"No signals match your filters"})]})})]})})}function Q(e){let{event:t}=e,[a,r]=(0,n.useState)(!1),l=void 0!==t.data&&null!==t.data;return(0,s.jsxs)(R.Zb,{className:"transition-shadow hover:shadow-md",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 cursor-pointer select-none",onClick:()=>l&&r(e=>!e),children:[(0,s.jsx)("div",{className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ".concat(K(t.source).bg),children:(0,s.jsx)(H,{source:t.source,className:"h-3.5 w-3.5 ".concat(K(t.source).text)})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"font-mono text-sm font-medium text-foreground",children:t.type}),(0,s.jsxs)(Z.C,{variant:"outline",className:"text-[10px] gap-1",children:[(0,s.jsx)(H,{source:t.source,className:"h-2.5 w-2.5"}),function(e){switch(e.type){case"system":return"system";case"agent":return"agent:".concat(e.id);case"webhook":return e.id?"webhook:".concat(e.id):"webhook";case"process":return e.id?"process:".concat(e.id):"process"}}(t.source)]}),l&&(0,s.jsx)(Z.C,{variant:"secondary",className:"text-[10px]",children:"payload"})]}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{children:X(t.createdAt)}),(0,s.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:t.id})]})]}),l&&(0,s.jsx)("button",{className:"mt-1 shrink-0 rounded p-1 text-muted-foreground hover:bg-muted",children:a?(0,s.jsx)(m.Z,{className:"h-4 w-4"}):(0,s.jsx)(x.Z,{className:"h-4 w-4"})})]}),a&&l&&(0,s.jsxs)("div",{className:"border-t px-4 py-3",children:[(0,s.jsx)("div",{className:"mb-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Data payload"}),(0,s.jsx)("pre",{className:"max-h-64 overflow-auto rounded-lg border bg-muted/50 p-3 text-xs font-mono text-foreground whitespace-pre-wrap break-words",children:function(e){try{return JSON.stringify(e,null,2)}catch(t){return String(e)}}(t.data)})]})]})}function U(){let[e,t]=(0,n.useState)(!1),[a,r]=(0,n.useState)(""),[l,i]=(0,n.useState)("system"),[c,o]=(0,n.useState)(""),[d,u]=(0,n.useState)(""),[m,x]=(0,n.useState)(null),[y,v]=(0,n.useState)(!1),[j,b]=(0,n.useState)(null),[N,w]=(0,n.useState)(!1),k=e=>{if(u(e),b(null),w(!1),!e.trim()){x(null);return}try{JSON.parse(e),x(null)}catch(e){x(e instanceof Error?e.message:"Invalid JSON")}},S=async()=>{let e,t;if(b(null),w(!1),!a.trim()){b("Signal type is required");return}if("system"===l)e={type:"system"};else if("agent"===l){if(!c.trim()){b("Agent ID is required");return}e={type:"agent",id:c.trim()}}else"webhook"===l?e={type:"webhook",id:c.trim()||void 0}:"process"===l&&(e={type:"process",id:c.trim()||void 0});if(d.trim())try{t=JSON.parse(d)}catch(e){b("Data must be valid JSON");return}v(!0);try{await (0,V.sB)({type:a.trim(),source:e,data:t}),w(!0),r(""),u(""),o(""),x(null)}catch(e){b(e instanceof Error?e.message:"Failed to send signal")}finally{v(!1)}};return e?(0,s.jsxs)(R.Zb,{children:[(0,s.jsx)(R.Ol,{className:"pb-4",children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-primary/10 text-primary",children:(0,s.jsx)(f,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(R.ll,{className:"text-base",children:"Send signal"}),(0,s.jsx)(R.SZ,{children:"Generate a new signal event."})]})]}),(0,s.jsx)(C.z,{variant:"ghost",size:"sm",onClick:()=>t(!1),className:"text-xs",children:"Cancel"})]})}),(0,s.jsxs)(R.aY,{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(J,{htmlFor:"signal-type",className:"text-xs",children:"Signal type *"}),(0,s.jsx)(M.I,{id:"signal-type",placeholder:"e.g. build.completed, deploy.started",value:a,onChange:e=>{r(e.target.value),b(null),w(!1)},className:"h-9 font-mono"})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(J,{className:"text-xs",children:"Source type"}),(0,s.jsxs)(A.Ph,{value:l,onValueChange:e=>{i(e),b(null)},children:[(0,s.jsx)(A.i4,{className:"h-9",children:(0,s.jsx)(A.ki,{})}),(0,s.jsxs)(A.Bw,{children:[(0,s.jsx)(A.Ql,{value:"system",children:"system"}),(0,s.jsx)(A.Ql,{value:"agent",children:"agent"}),(0,s.jsx)(A.Ql,{value:"webhook",children:"webhook"}),(0,s.jsx)(A.Ql,{value:"process",children:"process"})]})]})]}),"system"!==l&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)(J,{htmlFor:"source-id",className:"text-xs",children:["Source ID ","agent"===l?"*":"(optional)"]}),(0,s.jsx)(M.I,{id:"source-id",placeholder:"agent"===l?"agent-id":"optional-id",value:c,onChange:e=>{o(e.target.value),b(null)},className:"h-9 font-mono"})]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(J,{htmlFor:"signal-data",className:"text-xs",children:"Data payload (JSON, optional)"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("textarea",{id:"signal-data",placeholder:'{"key": "value"}',value:d,onChange:e=>k(e.target.value),rows:4,className:"w-full rounded-lg border bg-background px-3 py-2 font-mono text-xs leading-relaxed text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring resize-y ".concat(m?"border-destructive focus-visible:ring-destructive":"")}),d.trim()&&!m&&(0,s.jsx)("div",{className:"absolute right-2 top-2",children:(0,s.jsx)(h.Z,{className:"h-3.5 w-3.5 text-emerald-500"})})]}),m&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[(0,s.jsx)(g,{className:"h-3 w-3 shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:m})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)(C.z,{onClick:()=>void S(),disabled:y||!!m,className:"gap-2",children:[(0,s.jsx)(f,{className:"h-3.5 w-3.5 ".concat(y?"animate-pulse":"")}),y?"Sending...":"Send signal"]}),j&&(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[(0,s.jsx)(g,{className:"h-3 w-3 shrink-0"}),j]}),N&&(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-emerald-600 dark:text-emerald-400",children:[(0,s.jsx)(h.Z,{className:"h-3 w-3"}),"Signal sent"]})]})]})]}):(0,s.jsxs)(C.z,{variant:"outline",onClick:()=>t(!0),className:"gap-2 self-start",children:[(0,s.jsx)(p,{className:"h-3.5 w-3.5"}),"Send signal"]})}function Y(e){let{subscriptions:t}=e,[a,r]=(0,n.useState)(!0);return 0===t.length?null:(0,s.jsxs)(R.Zb,{children:[(0,s.jsx)(R.Ol,{className:"pb-3",children:(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer select-none",onClick:()=>r(e=>!e),children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-indigo-500/10 text-indigo-600 dark:text-indigo-400",children:(0,s.jsx)(y,{className:"h-4 w-4"})}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(R.ll,{className:"text-base",children:["Active subscriptions",(0,s.jsx)(Z.C,{variant:"secondary",className:"ml-2 text-[10px]",children:t.length})]}),(0,s.jsx)(R.SZ,{children:"Agents listening for signal patterns."})]})]}),(0,s.jsx)("button",{className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-muted",children:a?(0,s.jsx)(m.Z,{className:"h-4 w-4"}):(0,s.jsx)(x.Z,{className:"h-4 w-4"})})]})}),a&&(0,s.jsx)(R.aY,{className:"pt-0",children:(0,s.jsx)("div",{className:"space-y-2",children:t.map(e=>(0,s.jsx)(T,{subscription:e},"".concat(e.agentId,"::").concat(e.pattern)))})})]})}function T(e){let{subscription:t}=e;return(0,s.jsx)("div",{className:"flex items-center gap-3 rounded-lg border px-3 py-2.5",children:(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"font-mono text-sm font-medium text-foreground",children:t.pattern}),t.silent?(0,s.jsxs)(Z.C,{variant:"outline",className:"text-[10px] gap-1 text-muted-foreground",children:[(0,s.jsx)(v.Z,{className:"h-2.5 w-2.5"}),"silent"]}):(0,s.jsxs)(Z.C,{variant:"outline",className:"text-[10px] gap-1 text-amber-600 dark:text-amber-400 border-amber-300 dark:border-amber-700",children:[(0,s.jsx)(j.Z,{className:"h-2.5 w-2.5"}),"notify"]})]}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-3 text-xs text-muted-foreground",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)(b.Z,{className:"h-3 w-3"}),t.agentId]}),(0,s.jsxs)("span",{children:["subscribed ",X(t.createdAt)]}),t.updatedAt!==t.createdAt&&(0,s.jsxs)("span",{children:["updated ",X(t.updatedAt)]})]})]})})}let G={primary:{bg:"bg-primary/10",text:"text-primary",gradient:"from-primary/10 via-card to-card"},amber:{bg:"bg-amber-500/10",text:"text-amber-600 dark:text-amber-400",gradient:"from-amber-500/10 via-card to-card"},emerald:{bg:"bg-emerald-500/10",text:"text-emerald-600 dark:text-emerald-400",gradient:"from-emerald-500/10 via-card to-card"},violet:{bg:"bg-violet-500/10",text:"text-violet-600 dark:text-violet-400",gradient:"from-violet-500/10 via-card to-card"}};function W(e){let{label:t,value:a,detail:n,icon:r,tone:l}=e,i=G[l];return(0,s.jsxs)(R.Zb,{className:"relative overflow-hidden",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br ".concat(i.gradient)}),(0,s.jsxs)(R.Ol,{className:"relative flex flex-row items-center justify-between pb-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(R.SZ,{className:"text-xs",children:t}),(0,s.jsx)(R.ll,{className:"text-3xl font-semibold tabular-nums",children:a})]}),(0,s.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full ".concat(i.bg," ").concat(i.text),children:r})]}),(0,s.jsx)(R.aY,{className:"relative text-xs text-muted-foreground truncate",children:n})]})}function H(e){let{source:t,className:a}=e;switch(t.type){case"system":return(0,s.jsx)(N.Z,{className:a});case"agent":return(0,s.jsx)(b.Z,{className:a});case"webhook":return(0,s.jsx)(w.Z,{className:a});case"process":return(0,s.jsx)(k.Z,{className:a})}}function K(e){switch(e.type){case"system":return{bg:"bg-blue-500/10",text:"text-blue-600 dark:text-blue-400"};case"agent":return{bg:"bg-amber-500/10",text:"text-amber-600 dark:text-amber-400"};case"webhook":return{bg:"bg-emerald-500/10",text:"text-emerald-600 dark:text-emerald-400"};case"process":return{bg:"bg-violet-500/10",text:"text-violet-600 dark:text-violet-400"}}}function X(e){let t=Date.now()-e;if(t<0)return"just now";let a=Math.floor(t/1e3);if(a<60)return"".concat(a,"s ago");let s=Math.floor(a/60);if(s<60)return"".concat(s,"m ago");let n=Math.floor(s/60);if(n<24)return"".concat(n,"h ago");let r=Math.floor(n/24);return r<7?"".concat(r,"d ago"):new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}},82041:function(e,t,a){"use strict";a.d(t,{C:function(){return i}});var s=a(27573);a(7653);var n=a(49289),r=a(19369);let l=(0,n.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:a,...n}=e;return(0,s.jsx)("div",{className:(0,r.cn)(l({variant:a}),t),...n})}},13040:function(e,t,a){"use strict";a.d(t,{Bw:function(){return f},Ph:function(){return d},Ql:function(){return h},i4:function(){return m},ki:function(){return u}});var s=a(27573),n=a(7653),r=a(21395),l=a(87164),i=a(67207),c=a(38534),o=a(19369);let d=r.fC;r.ZA;let u=r.B4,m=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,s.jsxs)(r.xz,{ref:t,className:(0,o.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...i,children:[n,(0,s.jsx)(r.JO,{asChild:!0,children:(0,s.jsx)(l.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=r.xz.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.u_,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=r.u_.displayName;let p=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.$G,{ref:t,className:(0,o.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(l.Z,{className:"h-4 w-4"})})});p.displayName=r.$G.displayName;let f=n.forwardRef((e,t)=>{let{className:a,children:n,position:l="popper",...i}=e;return(0,s.jsx)(r.h_,{children:(0,s.jsxs)(r.VY,{ref:t,className:(0,o.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:l,...i,children:[(0,s.jsx)(x,{}),(0,s.jsx)(r.l_,{className:(0,o.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full"),children:n}),(0,s.jsx)(p,{})]})})});f.displayName=r.VY.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.__,{ref:t,className:(0,o.cn)("px-2 py-1.5 text-sm font-semibold",a),...n})}).displayName=r.__.displayName;let h=n.forwardRef((e,t)=>{let{className:a,children:n,...l}=e;return(0,s.jsxs)(r.ck,{ref:t,className:(0,o.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-muted focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...l,children:[(0,s.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(r.wU,{children:(0,s.jsx)(c.Z,{className:"h-4 w-4"})})}),(0,s.jsx)(r.eT,{children:n})]})});h.displayName=r.ck.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.Z0,{ref:t,className:(0,o.cn)("-mx-1 my-1 h-px bg-muted",a),...n})}).displayName=r.Z0.displayName},90497:function(e,t,a){"use strict";async function s(e){let t=await fetch(e);if(!t.ok)throw Error("Request failed: ".concat(t.status));return await t.json()}async function n(){var e;return null!==(e=(await s("/api/v1/engine/status")).status)&&void 0!==e?e:{}}async function r(){var e;return null!==(e=(await s("/api/v1/engine/users")).users)&&void 0!==e?e:[]}async function l(){var e;return null!==(e=(await s("/api/v1/engine/cron/tasks")).tasks)&&void 0!==e?e:[]}async function i(){var e;return null!==(e=(await s("/api/v1/engine/heartbeat/tasks")).tasks)&&void 0!==e?e:[]}async function c(){var e;return null!==(e=(await s("/api/v1/engine/processes")).processes)&&void 0!==e?e:[]}async function o(e){let t=await fetch("/api/v1/engine/signals/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();if(!t.ok||!a.ok){var s;throw Error(null!==(s=a.error)&&void 0!==s?s:"Request failed: ".concat(t.status))}return a.signal}async function d(){var e;return null!==(e=(await s("/api/v1/engine/signals/subscriptions")).subscriptions)&&void 0!==e?e:[]}async function u(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,a=new URLSearchParams({limit:String(t)});return null!==(e=(await s("/api/v1/engine/signals/events?".concat(a))).events)&&void 0!==e?e:[]}async function m(){var e;return null!==(e=(await s("/api/v1/engine/agents/background")).agents)&&void 0!==e?e:[]}async function x(){var e;return null!==(e=(await s("/api/v1/engine/agents")).agents)&&void 0!==e?e:[]}async function p(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=encodeURIComponent(e),r=new URLSearchParams({limit:String(a)});return null!==(t=(await s("/api/v1/engine/agents/".concat(n,"/history?").concat(r))).records)&&void 0!==t?t:[]}async function f(e){let t=encodeURIComponent(e),a=await s("/api/v1/engine/memory/".concat(t,"/graph"));if(!a.graph)throw Error("Memory graph payload missing");return a.graph}async function h(e,t){var a;let s=encodeURIComponent(e),n=encodeURIComponent(t),r=await fetch("/api/v1/engine/memory/".concat(s,"/node/").concat(n));if(404===r.status)return null;if(!r.ok)throw Error("Request failed: ".concat(r.status));return null!==(a=(await r.json()).node)&&void 0!==a?a:null}a.d(t,{Ip:function(){return u},Sj:function(){return x},Sk:function(){return d},ab:function(){return p},ce:function(){return h},fP:function(){return l},jg:function(){return n},oI:function(){return m},pS:function(){return f},sB:function(){return o},sZ:function(){return i},uh:function(){return r},x3:function(){return c}})},46191:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]])},3105:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},69452:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},94883:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});let s=(0,a(50326).Z)("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]])}},function(e){e.O(0,[129,3,315,293,528,744],function(){return e(e.s=33096)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[843],{73831:function(e,n,t){Promise.resolve().then(t.bind(t,32344))},32344:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return x}});var a=t(27573),s=t(7653),r=t(86742),i=t(98695),l=t(48157),o=t(82041),c=t(16273),d=t(26798),u=t(90497);function x(){var e;let[n,t]=(0,s.useState)(null),[x,f]=(0,s.useState)(!1),[g,m]=(0,s.useState)(null),[p,h]=(0,s.useState)(null),v=(0,s.useCallback)(async()=>{f(!0),m(null);try{let e=await (0,u.jg)();t(e),h(new Date)}catch(e){m(e instanceof Error?e.message:"Failed to load tools")}finally{f(!1)}},[]);(0,s.useEffect)(()=>{v()},[v]);let j=null!==(e=null==n?void 0:n.tools)&&void 0!==e?e:[],y=(0,s.useMemo)(()=>{let e=new Map;return j.forEach(n=>{var t,a;let s=null!==(t=n.split(".")[0])&&void 0!==t?t:"core",r=null!==(a=e.get(s))&&void 0!==a?a:[];r.push(n),e.set(s,r)}),Array.from(e.entries()).map(e=>{let[n,t]=e;return{namespace:n,items:t.sort()}})},[j]),b=(0,s.useMemo)(()=>y.slice(0,5),[y]);return(0,a.jsx)(l.r,{title:"Tools",subtitle:"Runtime tool inventory registered with the engine.",toolbar:(0,a.jsxs)(c.z,{onClick:()=>void v(),disabled:x,className:"gap-2",children:[(0,a.jsx)(r.Z,{className:x?"h-4 w-4 animate-spin":"h-4 w-4"}),"Refresh"]}),status:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:p?"Last synced ".concat(p.toLocaleTimeString()):"Awaiting first sync"}),g?(0,a.jsx)("span",{className:"rounded-full border border-destructive/40 bg-destructive/10 px-2.5 py-1 text-destructive",children:g}):(0,a.jsxs)("span",{children:[j.length," tools available"]})]}),children:(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-3",children:[(0,a.jsxs)(d.Zb,{className:"bg-gradient-to-br from-primary/10 via-card to-card/80",children:[(0,a.jsxs)(d.Ol,{className:"flex flex-row items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.SZ,{children:"Total tools"}),(0,a.jsx)(d.ll,{className:"text-2xl",children:j.length})]}),(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,a.jsx)(i.Z,{className:"h-5 w-5"})})]}),(0,a.jsx)(d.aY,{className:"text-xs text-muted-foreground",children:"Utility modules ready for task execution."})]}),(0,a.jsxs)(d.Zb,{className:"bg-gradient-to-br from-accent/10 via-card to-card/80",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.SZ,{children:"Categories"}),(0,a.jsx)(d.ll,{className:"text-2xl",children:y.length||0})]}),(0,a.jsx)(d.aY,{className:"text-xs text-muted-foreground",children:"Grouped by namespace prefix."})]}),(0,a.jsxs)(d.Zb,{className:"bg-gradient-to-br from-secondary/30 via-card to-card/80",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.SZ,{children:"Coverage"}),(0,a.jsx)(d.ll,{className:"text-xl",children:j.length?"Loaded":"Empty"})]}),(0,a.jsx)(d.aY,{className:"text-xs text-muted-foreground",children:"Tooling availability snapshot."})]})]}),(0,a.jsxs)(d.Zb,{className:"bg-background/70",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.ll,{children:"Top namespaces"}),(0,a.jsx)(d.SZ,{children:"Most populated tool groups."})]}),(0,a.jsx)(d.aY,{className:"flex flex-wrap gap-2",children:b.length?b.map(e=>(0,a.jsxs)(o.C,{variant:"secondary",className:"gap-2 text-xs",children:[e.namespace,(0,a.jsx)("span",{className:"rounded-full bg-background px-2 py-0.5 text-[10px] text-muted-foreground",children:e.items.length})]},e.namespace)):(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"No namespaces available."})})]}),(0,a.jsxs)(d.Zb,{className:"overflow-hidden",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.ll,{children:"Tool registry"}),(0,a.jsx)(d.SZ,{children:"Available tool identifiers and namespaces."})]}),(0,a.jsx)(d.aY,{className:"grid gap-4 lg:grid-cols-2",children:y.length?y.map(e=>(0,a.jsxs)("div",{className:"rounded-lg border bg-background/60 px-4 py-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-foreground",children:e.namespace}),(0,a.jsxs)(o.C,{variant:"outline",className:"text-xs",children:[e.items.length," tools"]})]}),(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:e.items.map(e=>(0,a.jsx)(o.C,{variant:"secondary",className:"text-xs",children:e},e))})]},e.namespace)):(0,a.jsx)("div",{className:"rounded-lg border border-dashed px-4 py-6 text-sm text-muted-foreground",children:"No tools registered."})})]})]})})}},82041:function(e,n,t){"use strict";t.d(n,{C:function(){return l}});var a=t(27573);t(7653);var s=t(49289),r=t(19369);let i=(0,s.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:n,variant:t,...s}=e;return(0,a.jsx)("div",{className:(0,r.cn)(i({variant:t}),n),...s})}},90497:function(e,n,t){"use strict";async function a(e){let n=await fetch(e);if(!n.ok)throw Error("Request failed: ".concat(n.status));return await n.json()}async function s(){var e;return null!==(e=(await a("/api/v1/engine/status")).status)&&void 0!==e?e:{}}async function r(){var e;return null!==(e=(await a("/api/v1/engine/users")).users)&&void 0!==e?e:[]}async function i(){var e;return null!==(e=(await a("/api/v1/engine/cron/tasks")).tasks)&&void 0!==e?e:[]}async function l(){var e;return null!==(e=(await a("/api/v1/engine/heartbeat/tasks")).tasks)&&void 0!==e?e:[]}async function o(){var e;return null!==(e=(await a("/api/v1/engine/processes")).processes)&&void 0!==e?e:[]}async function c(e){let n=await fetch("/api/v1/engine/signals/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await n.json();if(!n.ok||!t.ok){var a;throw Error(null!==(a=t.error)&&void 0!==a?a:"Request failed: ".concat(n.status))}return t.signal}async function d(){var e;return null!==(e=(await a("/api/v1/engine/signals/subscriptions")).subscriptions)&&void 0!==e?e:[]}async function u(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,t=new URLSearchParams({limit:String(n)});return null!==(e=(await a("/api/v1/engine/signals/events?".concat(t))).events)&&void 0!==e?e:[]}async function x(){var e;return null!==(e=(await a("/api/v1/engine/agents/background")).agents)&&void 0!==e?e:[]}async function f(){var e;return null!==(e=(await a("/api/v1/engine/agents")).agents)&&void 0!==e?e:[]}async function g(e){var n;let t=encodeURIComponent(e);return null!==(n=(await a("/api/v1/engine/agents/".concat(t,"/history"))).records)&&void 0!==n?n:[]}async function m(e){let n=encodeURIComponent(e),t=await a("/api/v1/engine/memory/".concat(n,"/graph"));if(!t.graph)throw Error("Memory graph payload missing");return t.graph}async function p(e,n){var t;let a=encodeURIComponent(e),s=encodeURIComponent(n),r=await fetch("/api/v1/engine/memory/".concat(a,"/node/").concat(s));if(404===r.status)return null;if(!r.ok)throw Error("Request failed: ".concat(r.status));return null!==(t=(await r.json()).node)&&void 0!==t?t:null}t.d(n,{Ip:function(){return u},Sj:function(){return f},Sk:function(){return d},ab:function(){return g},ce:function(){return p},fP:function(){return i},jg:function(){return s},oI:function(){return x},pS:function(){return m},sB:function(){return c},sZ:function(){return l},uh:function(){return r},x3:function(){return o}})}},function(e){e.O(0,[129,315,293,528,744],function(){return e(e.s=73831)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[843],{73831:function(e,n,t){Promise.resolve().then(t.bind(t,32344))},32344:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return x}});var a=t(27573),r=t(7653),s=t(86742),i=t(98695),l=t(48157),o=t(82041),c=t(16273),d=t(26798),u=t(90497);function x(){var e;let[n,t]=(0,r.useState)(null),[x,f]=(0,r.useState)(!1),[g,m]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),v=(0,r.useCallback)(async()=>{f(!0),m(null);try{let e=await (0,u.jg)();t(e),h(new Date)}catch(e){m(e instanceof Error?e.message:"Failed to load tools")}finally{f(!1)}},[]);(0,r.useEffect)(()=>{v()},[v]);let j=null!==(e=null==n?void 0:n.tools)&&void 0!==e?e:[],y=(0,r.useMemo)(()=>{let e=new Map;return j.forEach(n=>{var t,a;let r=null!==(t=n.split(".")[0])&&void 0!==t?t:"core",s=null!==(a=e.get(r))&&void 0!==a?a:[];s.push(n),e.set(r,s)}),Array.from(e.entries()).map(e=>{let[n,t]=e;return{namespace:n,items:t.sort()}})},[j]),b=(0,r.useMemo)(()=>y.slice(0,5),[y]);return(0,a.jsx)(l.r,{title:"Tools",subtitle:"Runtime tool inventory registered with the engine.",toolbar:(0,a.jsxs)(c.z,{onClick:()=>void v(),disabled:x,className:"gap-2",children:[(0,a.jsx)(s.Z,{className:x?"h-4 w-4 animate-spin":"h-4 w-4"}),"Refresh"]}),status:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{children:p?"Last synced ".concat(p.toLocaleTimeString()):"Awaiting first sync"}),g?(0,a.jsx)("span",{className:"rounded-full border border-destructive/40 bg-destructive/10 px-2.5 py-1 text-destructive",children:g}):(0,a.jsxs)("span",{children:[j.length," tools available"]})]}),children:(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-6 px-4 py-6 lg:px-6",children:[(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-3",children:[(0,a.jsxs)(d.Zb,{className:"bg-gradient-to-br from-primary/10 via-card to-card/80",children:[(0,a.jsxs)(d.Ol,{className:"flex flex-row items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.SZ,{children:"Total tools"}),(0,a.jsx)(d.ll,{className:"text-2xl",children:j.length})]}),(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:(0,a.jsx)(i.Z,{className:"h-5 w-5"})})]}),(0,a.jsx)(d.aY,{className:"text-xs text-muted-foreground",children:"Utility modules ready for task execution."})]}),(0,a.jsxs)(d.Zb,{className:"bg-gradient-to-br from-accent/10 via-card to-card/80",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.SZ,{children:"Categories"}),(0,a.jsx)(d.ll,{className:"text-2xl",children:y.length||0})]}),(0,a.jsx)(d.aY,{className:"text-xs text-muted-foreground",children:"Grouped by namespace prefix."})]}),(0,a.jsxs)(d.Zb,{className:"bg-gradient-to-br from-secondary/30 via-card to-card/80",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.SZ,{children:"Coverage"}),(0,a.jsx)(d.ll,{className:"text-xl",children:j.length?"Loaded":"Empty"})]}),(0,a.jsx)(d.aY,{className:"text-xs text-muted-foreground",children:"Tooling availability snapshot."})]})]}),(0,a.jsxs)(d.Zb,{className:"bg-background/70",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.ll,{children:"Top namespaces"}),(0,a.jsx)(d.SZ,{children:"Most populated tool groups."})]}),(0,a.jsx)(d.aY,{className:"flex flex-wrap gap-2",children:b.length?b.map(e=>(0,a.jsxs)(o.C,{variant:"secondary",className:"gap-2 text-xs",children:[e.namespace,(0,a.jsx)("span",{className:"rounded-full bg-background px-2 py-0.5 text-[10px] text-muted-foreground",children:e.items.length})]},e.namespace)):(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:"No namespaces available."})})]}),(0,a.jsxs)(d.Zb,{className:"overflow-hidden",children:[(0,a.jsxs)(d.Ol,{children:[(0,a.jsx)(d.ll,{children:"Tool registry"}),(0,a.jsx)(d.SZ,{children:"Available tool identifiers and namespaces."})]}),(0,a.jsx)(d.aY,{className:"grid gap-4 lg:grid-cols-2",children:y.length?y.map(e=>(0,a.jsxs)("div",{className:"rounded-lg border bg-background/60 px-4 py-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"text-sm font-semibold text-foreground",children:e.namespace}),(0,a.jsxs)(o.C,{variant:"outline",className:"text-xs",children:[e.items.length," tools"]})]}),(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:e.items.map(e=>(0,a.jsx)(o.C,{variant:"secondary",className:"text-xs",children:e},e))})]},e.namespace)):(0,a.jsx)("div",{className:"rounded-lg border border-dashed px-4 py-6 text-sm text-muted-foreground",children:"No tools registered."})})]})]})})}},82041:function(e,n,t){"use strict";t.d(n,{C:function(){return l}});var a=t(27573);t(7653);var r=t(49289),s=t(19369);let i=(0,r.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function l(e){let{className:n,variant:t,...r}=e;return(0,a.jsx)("div",{className:(0,s.cn)(i({variant:t}),n),...r})}},90497:function(e,n,t){"use strict";async function a(e){let n=await fetch(e);if(!n.ok)throw Error("Request failed: ".concat(n.status));return await n.json()}async function r(){var e;return null!==(e=(await a("/api/v1/engine/status")).status)&&void 0!==e?e:{}}async function s(){var e;return null!==(e=(await a("/api/v1/engine/users")).users)&&void 0!==e?e:[]}async function i(){var e;return null!==(e=(await a("/api/v1/engine/cron/tasks")).tasks)&&void 0!==e?e:[]}async function l(){var e;return null!==(e=(await a("/api/v1/engine/heartbeat/tasks")).tasks)&&void 0!==e?e:[]}async function o(){var e;return null!==(e=(await a("/api/v1/engine/processes")).processes)&&void 0!==e?e:[]}async function c(e){let n=await fetch("/api/v1/engine/signals/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await n.json();if(!n.ok||!t.ok){var a;throw Error(null!==(a=t.error)&&void 0!==a?a:"Request failed: ".concat(n.status))}return t.signal}async function d(){var e;return null!==(e=(await a("/api/v1/engine/signals/subscriptions")).subscriptions)&&void 0!==e?e:[]}async function u(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:200,t=new URLSearchParams({limit:String(n)});return null!==(e=(await a("/api/v1/engine/signals/events?".concat(t))).events)&&void 0!==e?e:[]}async function x(){var e;return null!==(e=(await a("/api/v1/engine/agents/background")).agents)&&void 0!==e?e:[]}async function f(){var e;return null!==(e=(await a("/api/v1/engine/agents")).agents)&&void 0!==e?e:[]}async function g(e){var n;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=encodeURIComponent(e),s=new URLSearchParams({limit:String(t)});return null!==(n=(await a("/api/v1/engine/agents/".concat(r,"/history?").concat(s))).records)&&void 0!==n?n:[]}async function m(e){let n=encodeURIComponent(e),t=await a("/api/v1/engine/memory/".concat(n,"/graph"));if(!t.graph)throw Error("Memory graph payload missing");return t.graph}async function p(e,n){var t;let a=encodeURIComponent(e),r=encodeURIComponent(n),s=await fetch("/api/v1/engine/memory/".concat(a,"/node/").concat(r));if(404===s.status)return null;if(!s.ok)throw Error("Request failed: ".concat(s.status));return null!==(t=(await s.json()).node)&&void 0!==t?t:null}t.d(n,{Ip:function(){return u},Sj:function(){return f},Sk:function(){return d},ab:function(){return g},ce:function(){return p},fP:function(){return i},jg:function(){return r},oI:function(){return x},pS:function(){return m},sB:function(){return c},sZ:function(){return l},uh:function(){return s},x3:function(){return o}})}},function(e){e.O(0,[129,315,293,528,744],function(){return e(e.s=73831)}),_N_E=e.O()}]);
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/42d76d007d742231.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ba419df0f2bbc111.js"/><script src="/_next/static/chunks/1dd3208c-8dbf5d579a87cb85.js" async=""></script><script src="/_next/static/chunks/528-ada84a57eb753539.js" async=""></script><script src="/_next/static/chunks/main-app-e47c27dd717b70ea.js" async=""></script><script src="/_next/static/chunks/129-0781090dbd74ef24.js" async=""></script><script src="/_next/static/chunks/310-05c0df724e85e417.js" async=""></script><script src="/_next/static/chunks/315-e0c2965b599a90c8.js" async=""></script><script src="/_next/static/chunks/app/agent/page-e7a20c5ef1f769e6.js" async=""></script><title>Daycare Dashboard</title><meta name="description" content="Live status for plugins, agents, and cron tasks from the local engine socket."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="font-sans text-foreground antialiased"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--><script src="/_next/static/chunks/webpack-ba419df0f2bbc111.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/42d76d007d742231.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[11815,[],\"\"]\n4:\"$Sreact.suspense\"\n5:I[34272,[\"129\",\"static/chunks/129-0781090dbd74ef24.js\",\"310\",\"static/chunks/310-05c0df724e85e417.js\",\"315\",\"static/chunks/315-e0c2965b599a90c8.js\",\"60\",\"static/chunks/app/agent/page-e7a20c5ef1f769e6.js\"],\"default\"]\n6:I[55092,[],\"\"]\n7:I[82023,[],\"\"]\n9:I[91584,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"Xz8Kc-P2fnMqmm-AsS7Ui\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"agent\"],\"initialTree\":[\"\",{\"children\":[\"agent\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"agent\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$4\",null,{\"fallback\":null,\"children\":[\"$\",\"$L5\",null,{}]}],null],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"agent\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/42d76d007d742231.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"font-sans text-foreground antialiased\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",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.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Daycare Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Live status for plugins, agents, and cron tasks from the local engine socket.\"}]]\n3:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/42d76d007d742231.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ba419df0f2bbc111.js"/><script src="/_next/static/chunks/1dd3208c-8dbf5d579a87cb85.js" async=""></script><script src="/_next/static/chunks/528-ada84a57eb753539.js" async=""></script><script src="/_next/static/chunks/main-app-e47c27dd717b70ea.js" async=""></script><script src="/_next/static/chunks/129-0781090dbd74ef24.js" async=""></script><script src="/_next/static/chunks/310-05c0df724e85e417.js" async=""></script><script src="/_next/static/chunks/315-e0c2965b599a90c8.js" async=""></script><script src="/_next/static/chunks/app/agent/page-2d345f6346edc077.js" async=""></script><title>Daycare Dashboard</title><meta name="description" content="Live status for plugins, agents, and cron tasks from the local engine socket."/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="font-sans text-foreground antialiased"><!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$--><script src="/_next/static/chunks/webpack-ba419df0f2bbc111.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/42d76d007d742231.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[11815,[],\"\"]\n4:\"$Sreact.suspense\"\n5:I[34272,[\"129\",\"static/chunks/129-0781090dbd74ef24.js\",\"310\",\"static/chunks/310-05c0df724e85e417.js\",\"315\",\"static/chunks/315-e0c2965b599a90c8.js\",\"60\",\"static/chunks/app/agent/page-2d345f6346edc077.js\"],\"default\"]\n6:I[55092,[],\"\"]\n7:I[82023,[],\"\"]\n9:I[91584,[],\"\"]\na:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"9-NVJBP-YwBbxw-w3gjmQ\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"agent\"],\"initialTree\":[\"\",{\"children\":[\"agent\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"agent\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"$4\",null,{\"fallback\":null,\"children\":[\"$\",\"$L5\",null,{}]}],null],null],null]},[null,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"agent\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/42d76d007d742231.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[\"$\",\"body\",null,{\"className\":\"font-sans text-foreground antialiased\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",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.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L8\"],\"globalErrorComponent\":\"$9\",\"missingSlots\":\"$Wa\"}]\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Daycare Dashboard\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Live status for plugins, agents, and cron tasks from the local engine socket.\"}]]\n3:null\n"])</script></body></html>
@@ -1,7 +1,7 @@
1
1
  2:"$Sreact.suspense"
2
- 3:I[34272,["129","static/chunks/129-0781090dbd74ef24.js","310","static/chunks/310-05c0df724e85e417.js","315","static/chunks/315-e0c2965b599a90c8.js","60","static/chunks/app/agent/page-e7a20c5ef1f769e6.js"],"default"]
2
+ 3:I[34272,["129","static/chunks/129-0781090dbd74ef24.js","310","static/chunks/310-05c0df724e85e417.js","315","static/chunks/315-e0c2965b599a90c8.js","60","static/chunks/app/agent/page-2d345f6346edc077.js"],"default"]
3
3
  4:I[55092,[],""]
4
4
  5:I[82023,[],""]
5
- 0:["Xz8Kc-P2fnMqmm-AsS7Ui",[[["",{"children":["agent",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["agent",{"children":["__PAGE__",{},[["$L1",["$","$2",null,{"fallback":null,"children":["$","$L3",null,{}]}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","agent","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/42d76d007d742231.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"font-sans text-foreground antialiased","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]]
5
+ 0:["9-NVJBP-YwBbxw-w3gjmQ",[[["",{"children":["agent",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["agent",{"children":["__PAGE__",{},[["$L1",["$","$2",null,{"fallback":null,"children":["$","$L3",null,{}]}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","agent","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/42d76d007d742231.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"font-sans text-foreground antialiased","children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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."}]}]]}]}]],"notFoundStyles":[]}]}]}]],null],null],["$L6",null]]]]
6
6
  6:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Daycare Dashboard"}],["$","meta","3",{"name":"description","content":"Live status for plugins, agents, and cron tasks from the local engine socket."}]]
7
7
  1:null