comisai 1.0.44 → 1.0.45

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 (80) hide show
  1. package/node_modules/@comis/agent/dist/spawn/sandbox-posture.d.ts +23 -0
  2. package/node_modules/@comis/agent/dist/spawn/sandbox-posture.js +27 -0
  3. package/node_modules/@comis/agent/dist/spawn/sub-agent-runner.js +5 -2
  4. package/node_modules/@comis/agent/package.json +1 -1
  5. package/node_modules/@comis/channels/package.json +1 -1
  6. package/node_modules/@comis/cli/package.json +1 -1
  7. package/node_modules/@comis/core/dist/domain/index.d.ts +2 -0
  8. package/node_modules/@comis/core/dist/domain/index.js +5 -0
  9. package/node_modules/@comis/core/dist/domain/rpc-error-classification.d.ts +49 -0
  10. package/node_modules/@comis/core/dist/domain/rpc-error-classification.js +62 -0
  11. package/node_modules/@comis/core/dist/exports/domain.d.ts +1 -1
  12. package/node_modules/@comis/core/dist/exports/domain.js +2 -0
  13. package/node_modules/@comis/core/package.json +1 -1
  14. package/node_modules/@comis/daemon/dist/api/graph-handlers/graph-mutate.js +5 -1
  15. package/node_modules/@comis/daemon/dist/api/rpc-dispatch.d.ts +15 -16
  16. package/node_modules/@comis/daemon/dist/api/rpc-dispatch.js +19 -32
  17. package/node_modules/@comis/daemon/dist/wiring/setup-gateway/setup-gateway-rpc.js +2 -1
  18. package/node_modules/@comis/daemon/package.json +1 -1
  19. package/node_modules/@comis/gateway/dist/rpc/method-router.js +13 -1
  20. package/node_modules/@comis/gateway/package.json +1 -1
  21. package/node_modules/@comis/infra/package.json +1 -1
  22. package/node_modules/@comis/memory/package.json +1 -1
  23. package/node_modules/@comis/observability/dist/trajectory/event-bus-bridge.d.ts +1 -0
  24. package/node_modules/@comis/observability/dist/trajectory/event-bus-bridge.js +10 -0
  25. package/node_modules/@comis/observability/dist/trajectory/translate-orchestration-payload.d.ts +1 -1
  26. package/node_modules/@comis/observability/dist/trajectory/translate-orchestration-payload.js +6 -0
  27. package/node_modules/@comis/observability/dist/trajectory/translate-payload.js +1 -0
  28. package/node_modules/@comis/observability/dist/trajectory/types.d.ts +1 -1
  29. package/node_modules/@comis/observability/dist/trajectory/types.js +7 -0
  30. package/node_modules/@comis/observability/package.json +1 -1
  31. package/node_modules/@comis/observability-otel/package.json +1 -1
  32. package/node_modules/@comis/orchestrator/package.json +1 -1
  33. package/node_modules/@comis/scheduler/package.json +1 -1
  34. package/node_modules/@comis/shared/package.json +1 -1
  35. package/node_modules/@comis/skills/package.json +1 -1
  36. package/node_modules/@comis/web/dist/assets/{agent-detail-DTS1F-Ms.js → agent-detail-lQF_QdY3.js} +1 -1
  37. package/node_modules/@comis/web/dist/assets/{agent-editor-Ciyu1WDy.js → agent-editor-t3rxtj2c.js} +1 -1
  38. package/node_modules/@comis/web/dist/assets/{agent-list-A1K8cnDs.js → agent-list-B3PEW7Eu.js} +1 -1
  39. package/node_modules/@comis/web/dist/assets/{billing-view-DeTSrDbU.js → billing-view-C4UJZTvI.js} +1 -1
  40. package/node_modules/@comis/web/dist/assets/{cache-health-BCWNSCJc.js → cache-health-CTOg1ZYH.js} +1 -1
  41. package/node_modules/@comis/web/dist/assets/{channel-detail-Dc9p_ikD.js → channel-detail-BqazWug8.js} +1 -1
  42. package/node_modules/@comis/web/dist/assets/{channel-list-Ky4JkuxX.js → channel-list-DYB8MGjC.js} +1 -1
  43. package/node_modules/@comis/web/dist/assets/{chat-console-Dz_CizN8.js → chat-console-C_EZsEon.js} +1 -1
  44. package/node_modules/@comis/web/dist/assets/{config-editor-CMnaLKV1.js → config-editor-5rFdpiyn.js} +2 -2
  45. package/node_modules/@comis/web/dist/assets/{context-dag-browser-B4SfvEGD.js → context-dag-browser-8RP0Dm9d.js} +1 -1
  46. package/node_modules/@comis/web/dist/assets/{context-engine-D56GG59R.js → context-engine-0Sl4qfpl.js} +1 -1
  47. package/node_modules/@comis/web/dist/assets/{delivery-view-G4cBmG5M.js → delivery-view-QQ-LYwDU.js} +1 -1
  48. package/node_modules/@comis/web/dist/assets/{diagnostics-view-Bf57kGOT.js → diagnostics-view-DjMOkstH.js} +1 -1
  49. package/node_modules/@comis/web/dist/assets/{ic-chat-message-CkDdrYHc.js → ic-chat-message-s52yIvwR.js} +1 -1
  50. package/node_modules/@comis/web/dist/assets/{ic-connection-dot-mggqNsPH.js → ic-connection-dot-3QDCBFHW.js} +1 -1
  51. package/node_modules/@comis/web/dist/assets/{ic-empty-state-f_kVNpuc.js → ic-empty-state-DIodMykW.js} +1 -1
  52. package/node_modules/@comis/web/dist/assets/ic-graph-canvas-Dllu1VH-.js +359 -0
  53. package/node_modules/@comis/web/dist/assets/{ic-tool-call-D1ykqLeH.js → ic-tool-call-CFexsEC4.js} +1 -1
  54. package/node_modules/@comis/web/dist/assets/{incident-view-Cd2e4cao.js → incident-view-C9r6FvdE.js} +1 -1
  55. package/node_modules/@comis/web/dist/assets/{index-dqPriKJN.js → index-IIyLteKK.js} +16 -16
  56. package/node_modules/@comis/web/dist/assets/{mcp-management-8zV6Sh-J.js → mcp-management-CON6d_R1.js} +1 -1
  57. package/node_modules/@comis/web/dist/assets/{media-config-fz862yVg.js → media-config-DNAN4cgu.js} +1 -1
  58. package/node_modules/@comis/web/dist/assets/{media-test-tDL7lri1.js → media-test-BOrE2MrP.js} +1 -1
  59. package/node_modules/@comis/web/dist/assets/{memory-inspector-aSmZ-bVd.js → memory-inspector-CdE2cWRI.js} +1 -1
  60. package/node_modules/@comis/web/dist/assets/{message-center-DWfIgL7i.js → message-center-BggZE_We.js} +1 -1
  61. package/node_modules/@comis/web/dist/assets/{models-H5of-8R4.js → models-BpdoS8xA.js} +1 -1
  62. package/node_modules/@comis/web/dist/assets/{observe-view-ExySKnkt.js → observe-view-D1ajhutj.js} +1 -1
  63. package/node_modules/@comis/web/dist/assets/{pipeline-builder-p1GmDJy5.js → pipeline-builder-DwLB9aCL.js} +1 -1
  64. package/node_modules/@comis/web/dist/assets/{pipeline-history-DQEU-Ieu.js → pipeline-history-DVSVvho7.js} +1 -1
  65. package/node_modules/@comis/web/dist/assets/{pipeline-history-detail-Bu51TMIX.js → pipeline-history-detail-C3e5mGIt.js} +1 -1
  66. package/node_modules/@comis/web/dist/assets/{pipeline-list-DaYyj89m.js → pipeline-list-DYdQxTk4.js} +1 -1
  67. package/node_modules/@comis/web/dist/assets/{pipeline-monitor-DV_7bRn2.js → pipeline-monitor-Q48nN7ZK.js} +1 -1
  68. package/node_modules/@comis/web/dist/assets/{scheduler-D0YVlb55.js → scheduler-Drjol0QC.js} +1 -1
  69. package/node_modules/@comis/web/dist/assets/{security-78aeYyN2.js → security-DvcAVz_Q.js} +1 -1
  70. package/node_modules/@comis/web/dist/assets/{session-detail-D1yJ9diX.js → session-detail-Cv3O0UDP.js} +1 -1
  71. package/node_modules/@comis/web/dist/assets/{session-list-CxPzhPnX.js → session-list-BGVUpP_a.js} +1 -1
  72. package/node_modules/@comis/web/dist/assets/{setup-wizard-SjMlBTNp.js → setup-wizard-DZsr49mN.js} +2 -2
  73. package/node_modules/@comis/web/dist/assets/{skills-M6MQLY5D.js → skills-DP1dLFcB.js} +1 -1
  74. package/node_modules/@comis/web/dist/assets/{spend-governance-C0hIl9wq.js → spend-governance-D-IBKKqz.js} +1 -1
  75. package/node_modules/@comis/web/dist/assets/{subagents-CLCo4cfc.js → subagents-D0_m-5Pa.js} +1 -1
  76. package/node_modules/@comis/web/dist/assets/{workspace-manager-BzHAmYW2.js → workspace-manager-QmBrvxyy.js} +1 -1
  77. package/node_modules/@comis/web/dist/index.html +1 -1
  78. package/node_modules/@comis/web/package.json +1 -1
  79. package/package.json +16 -16
  80. package/node_modules/@comis/web/dist/assets/ic-graph-canvas-CBDFKlf5.js +0 -359
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import{a as u}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";var d=class extends n{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._servers=[],this._mcpConfig=[],this._storageMode=`encrypted`,this._expandedServer=null,this._serverDetail=null,this._showAddForm=!1,this._disconnectTarget=null,this._deleteTarget=null,this._detailLoading=!1,this._showInstructions=!1,this._testingServer=null,this._testResult=null,this._newServerName=``,this._newServerTransport=`stdio`,this._newServerCommand=``,this._newServerUrl=``,this._newServerHeaders=``,this._newServerEnv=``,this._rpcStatusUnsub=null}static{this.styles=[s,a,e`
1
+ import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import{a as u}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";var d=class extends n{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._servers=[],this._mcpConfig=[],this._storageMode=`encrypted`,this._expandedServer=null,this._serverDetail=null,this._showAddForm=!1,this._disconnectTarget=null,this._deleteTarget=null,this._detailLoading=!1,this._showInstructions=!1,this._testingServer=null,this._testResult=null,this._newServerName=``,this._newServerTransport=`stdio`,this._newServerCommand=``,this._newServerUrl=``,this._newServerHeaders=``,this._newServerEnv=``,this._rpcStatusUnsub=null}static{this.styles=[s,a,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import"./index-dqPriKJN.js";var u=class extends n{constructor(...e){super(...e),this._loadState=`loading`,this._providers=null,this._mediaConfig=null}static{this.styles=[s,a,e`
1
+ import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import"./index-IIyLteKK.js";var u=class extends n{constructor(...e){super(...e),this._loadState=`loading`,this._providers=null,this._mediaConfig=null}static{this.styles=[s,a,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import{a as u}from"./index-dqPriKJN.js";import"./ic-empty-state-f_kVNpuc.js";import"./ic-tabs-BsjznKoe.js";var d=[{id:`stt`,label:`STT`},{id:`tts`,label:`TTS`},{id:`vision`,label:`Vision`},{id:`document`,label:`Document`},{id:`video`,label:`Video`},{id:`link`,label:`Link`}],f=25*1024*1024,p=20*1024*1024,m=50*1024*1024;function h(e){let t=new Uint8Array(e),n=32768,r=[];for(let e=0;e<t.length;e+=n)r.push(String.fromCharCode(...t.subarray(e,e+n)));return btoa(r.join(``))}var g=class extends n{constructor(...e){super(...e),this._activeTab=`stt`,this._processing=!1,this._sttResult=null,this._ttsResult=null,this._audioUrl=null,this._ttsText=``,this._ttsVoice=``,this._visionResult=null,this._documentResult=null,this._videoResult=null,this._visionPrompt=``,this._videoPrompt=``,this._linkUrl=``,this._linkResult=null,this._loadState=`loaded`,this._providers=null,this._imagePreviewUrl=null}static{this.styles=[s,a,e`
1
+ import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import{a as u}from"./index-IIyLteKK.js";import"./ic-empty-state-DIodMykW.js";import"./ic-tabs-BsjznKoe.js";var d=[{id:`stt`,label:`STT`},{id:`tts`,label:`TTS`},{id:`vision`,label:`Vision`},{id:`document`,label:`Document`},{id:`video`,label:`Video`},{id:`link`,label:`Link`}],f=25*1024*1024,p=20*1024*1024,m=50*1024*1024;function h(e){let t=new Uint8Array(e),n=32768,r=[];for(let e=0;e<t.length;e+=n)r.push(String.fromCharCode(...t.subarray(e,e+n)));return btoa(r.join(``))}var g=class extends n{constructor(...e){super(...e),this._activeTab=`stt`,this._processing=!1,this._sttResult=null,this._ttsResult=null,this._audioUrl=null,this._ttsText=``,this._ttsVoice=``,this._visionResult=null,this._documentResult=null,this._videoResult=null,this._visionPrompt=``,this._videoPrompt=``,this._linkUrl=``,this._linkResult=null,this._loadState=`loaded`,this._providers=null,this._imagePreviewUrl=null}static{this.styles=[s,a,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-detail-panel-ZsLNS21P.js";var f=class extends n{constructor(...e){super(...e),this.entries=[],this.selectable=!1,this.hidePagination=!1}static{this.styles=[c,o,e`
1
+ import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-detail-panel-ZsLNS21P.js";var f=class extends n{constructor(...e){super(...e),this.entries=[],this.selectable=!1,this.hidePagination=!1}static{this.styles=[c,o,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,p as s,r as c,t as l,y as u}from"./decorate-C2wzL86z.js";import{a as d}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";var f=[`👍`,`👎`,`❤️`,`😂`,`😢`,`🤔`,`🔥`,`💯`,`👏`,`🚀`,`👀`,`👋`,`✅`,`❌`,`⭐`,`🎉`,`🙏`,`💪`,`🧠`,`💡`,`👑`,`💎`,`✨`,`🌈`],p={discord:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_slowmode`,label:`Set Slowmode`,needsInput:`seconds`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Threads`,actions:[{action:`threadCreate`,label:`Create Thread`,needsInput:`name`},{action:`threadList`,label:`List Threads`}]},{group:`Info`,actions:[{action:`guild_info`,label:`Guild Info`},{action:`channel_info`,label:`Channel Info`}]}],telegram:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`},{action:`restrict`,label:`Restrict User`,needsInput:`userId`},{action:`promote`,label:`Promote User`,needsInput:`userId`},{action:`demote`,label:`Demote User`,needsInput:`userId`}]},{group:`Chat`,actions:[{action:`set_title`,label:`Set Chat Title`,needsInput:`title`},{action:`set_description`,label:`Set Description`,needsInput:`description`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Info`,actions:[{action:`chat_info`,label:`Chat Info`},{action:`member_count`,label:`Member Count`},{action:`get_admins`,label:`Get Admins`}]}],slack:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_purpose`,label:`Set Purpose`,needsInput:`purpose`},{action:`archive`,label:`Archive Channel`},{action:`unarchive`,label:`Unarchive Channel`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Members`,actions:[{action:`invite`,label:`Invite User`,needsInput:`userId`},{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`members_list`,label:`List Members`}]},{group:`Info`,actions:[{action:`channel_info`,label:`Channel Info`},{action:`bookmark_add`,label:`Add Bookmark`,needsInput:`url`}]}],whatsapp:[{group:`Group`,actions:[{action:`group_info`,label:`Group Info`},{action:`group_update_subject`,label:`Update Subject`,needsInput:`subject`},{action:`group_update_description`,label:`Update Description`,needsInput:`description`},{action:`group_invite_code`,label:`Get Invite Code`}]},{group:`Members`,actions:[{action:`group_participants_add`,label:`Add Participant`,needsInput:`participant`},{action:`group_participants_remove`,label:`Remove Participant`,needsInput:`participant`},{action:`group_promote`,label:`Promote to Admin`,needsInput:`participant`},{action:`group_demote`,label:`Demote from Admin`,needsInput:`participant`}]},{group:`Settings`,actions:[{action:`group_settings`,label:`Group Settings`}]}]},m={discord:`discord.action`,telegram:`telegram.action`,slack:`slack.action`,whatsapp:`whatsapp.action`},h=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.channelType=``,this._loadState=`idle`,this._error=``,this._messages=[],this._effectiveChannel=``,this._capabilities=null,this._channelList=[],this._sendText=``,this._showSendConfirm=!1,this._actionPending=!1,this._botName=``,this._replyToId=``,this._replyText=``,this._showReplyConfirm=!1,this._editingId=``,this._editText=``,this._deleteTargetId=``,this._showDeleteConfirm=!1,this._reactTargetId=``,this._showEmojiPicker=!1,this._attachUrl=``,this._attachType=`file`,this._attachCaption=``,this._showAttachForm=!1,this._chatList=[],this._selectedChatId=``,this._platformActionPending=!1,this._selectedMessageId=``,this._actionResult=``,this._actionInputs={},this._hasLoaded=!1,this._previousChannelType=``,this._boundEmojiOutsideClick=null,this._autoSelectAttempted=!1}static{this.styles=[c,o,e`
1
+ import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,p as s,r as c,t as l,y as u}from"./decorate-C2wzL86z.js";import{a as d}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";var f=[`👍`,`👎`,`❤️`,`😂`,`😢`,`🤔`,`🔥`,`💯`,`👏`,`🚀`,`👀`,`👋`,`✅`,`❌`,`⭐`,`🎉`,`🙏`,`💪`,`🧠`,`💡`,`👑`,`💎`,`✨`,`🌈`],p={discord:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_slowmode`,label:`Set Slowmode`,needsInput:`seconds`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Threads`,actions:[{action:`threadCreate`,label:`Create Thread`,needsInput:`name`},{action:`threadList`,label:`List Threads`}]},{group:`Info`,actions:[{action:`guild_info`,label:`Guild Info`},{action:`channel_info`,label:`Channel Info`}]}],telegram:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Moderation`,actions:[{action:`ban`,label:`Ban User`,needsInput:`userId`},{action:`unban`,label:`Unban User`,needsInput:`userId`},{action:`restrict`,label:`Restrict User`,needsInput:`userId`},{action:`promote`,label:`Promote User`,needsInput:`userId`},{action:`demote`,label:`Demote User`,needsInput:`userId`}]},{group:`Chat`,actions:[{action:`set_title`,label:`Set Chat Title`,needsInput:`title`},{action:`set_description`,label:`Set Description`,needsInput:`description`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Info`,actions:[{action:`chat_info`,label:`Chat Info`},{action:`member_count`,label:`Member Count`},{action:`get_admins`,label:`Get Admins`}]}],slack:[{group:`Messages`,actions:[{action:`pin`,label:`Pin Message`,needsMessageId:!0},{action:`unpin`,label:`Unpin Message`,needsMessageId:!0}]},{group:`Channel`,actions:[{action:`set_topic`,label:`Set Topic`,needsInput:`topic`},{action:`set_purpose`,label:`Set Purpose`,needsInput:`purpose`},{action:`archive`,label:`Archive Channel`},{action:`unarchive`,label:`Unarchive Channel`},{action:`sendTyping`,label:`Send Typing Indicator`}]},{group:`Members`,actions:[{action:`invite`,label:`Invite User`,needsInput:`userId`},{action:`kick`,label:`Kick User`,needsInput:`userId`},{action:`members_list`,label:`List Members`}]},{group:`Info`,actions:[{action:`channel_info`,label:`Channel Info`},{action:`bookmark_add`,label:`Add Bookmark`,needsInput:`url`}]}],whatsapp:[{group:`Group`,actions:[{action:`group_info`,label:`Group Info`},{action:`group_update_subject`,label:`Update Subject`,needsInput:`subject`},{action:`group_update_description`,label:`Update Description`,needsInput:`description`},{action:`group_invite_code`,label:`Get Invite Code`}]},{group:`Members`,actions:[{action:`group_participants_add`,label:`Add Participant`,needsInput:`participant`},{action:`group_participants_remove`,label:`Remove Participant`,needsInput:`participant`},{action:`group_promote`,label:`Promote to Admin`,needsInput:`participant`},{action:`group_demote`,label:`Demote from Admin`,needsInput:`participant`}]},{group:`Settings`,actions:[{action:`group_settings`,label:`Group Settings`}]}]},m={discord:`discord.action`,telegram:`telegram.action`,slack:`slack.action`,whatsapp:`whatsapp.action`},h=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.channelType=``,this._loadState=`idle`,this._error=``,this._messages=[],this._effectiveChannel=``,this._capabilities=null,this._channelList=[],this._sendText=``,this._showSendConfirm=!1,this._actionPending=!1,this._botName=``,this._replyToId=``,this._replyText=``,this._showReplyConfirm=!1,this._editingId=``,this._editText=``,this._deleteTargetId=``,this._showDeleteConfirm=!1,this._reactTargetId=``,this._showEmojiPicker=!1,this._attachUrl=``,this._attachType=`file`,this._attachCaption=``,this._showAttachForm=!1,this._chatList=[],this._selectedChatId=``,this._platformActionPending=!1,this._selectedMessageId=``,this._actionResult=``,this._actionInputs={},this._hasLoaded=!1,this._previousChannelType=``,this._boundEmojiOutsideClick=null,this._autoSelectAttempted=!1}static{this.styles=[c,o,e`
2
2
  :host { display: block; }
3
3
  .message-center { display: flex; flex-direction: column; gap: var(--ic-space-md, 1rem); }
4
4
  /* Header */
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,o as s,p as c,r as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f,i as p}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-empty-state-f_kVNpuc.js";import"./ic-tabs-BsjznKoe.js";import"./ic-connection-dot-mggqNsPH.js";var m=class extends r{constructor(...e){super(...e),this.name=``,this.type=``,this.baseUrl=``,this.enabled=!1,this.testResult=null,this.testing=!1}static{this.styles=[l,o,e`
1
+ import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,o as s,p as c,r as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f,i as p}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-empty-state-DIodMykW.js";import"./ic-tabs-BsjznKoe.js";import"./ic-connection-dot-3QDCBFHW.js";var m=class extends r{constructor(...e){super(...e),this.name=``,this.type=``,this.baseUrl=``,this.enabled=!1,this.testResult=null,this.testing=!1}static{this.styles=[l,o,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,a as n,d as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,t as f,u as p,y as m}from"./decorate-C2wzL86z.js";import{n as h,t as g}from"./observability-types-BvcvLSWK.js";import{i as _,t as v}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";import"./ic-tabs-BsjznKoe.js";import"./ic-delivery-row-BlEML37J.js";var y=3e4,b=[{id:`overview`,label:`Overview`},{id:`billing`,label:`Billing`},{id:`delivery`,label:`Delivery`},{id:`channels`,label:`Channels`},{id:`diagnostics`,label:`Diagnostics`},{id:`cache`,label:`Cache`},{id:`spend`,label:`Spend`},{id:`incident`,label:`Incident`}],x={cache:`observe/cache`,spend:`observe/spend`,incident:`observe/incident`},S=class extends i{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.initialTab=`overview`,this._sse=null,this._reloadDebounce=null,this._loadState=`loading`,this._activeTab=`overview`,this._error=``,this._requestsToday=0,this._tokensToday=0,this._costToday=0,this._errorsToday=0,this._tokenUsage24h=[],this._billingByProvider=[],this._billingByAgent=[],this._billingTotal=null,this._diagnosticsEvents=[],this._deliveryTraces=[],this._deliveryStats=null,this._channelActivity=[],this._agentHealth=[],this._channelHealth=[],this._resetConfirming=!1,this._resetInput=``,this._deliveryChannelFilter=`all`,this._deliveryStatusFilter=`all`,this._deliveryTimeRange=`1h`,this._expandedTraceId=null,this._refreshInterval=null,this._rpcStatusUnsub=null}static{this.styles=[d,c,e`
1
+ import{S as e,_ as t,a as n,d as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,t as f,u as p,y as m}from"./decorate-C2wzL86z.js";import{n as h,t as g}from"./observability-types-BvcvLSWK.js";import{i as _,t as v}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";import"./ic-tabs-BsjznKoe.js";import"./ic-delivery-row-BlEML37J.js";var y=3e4,b=[{id:`overview`,label:`Overview`},{id:`billing`,label:`Billing`},{id:`delivery`,label:`Delivery`},{id:`channels`,label:`Channels`},{id:`diagnostics`,label:`Diagnostics`},{id:`cache`,label:`Cache`},{id:`spend`,label:`Spend`},{id:`incident`,label:`Incident`}],x={cache:`observe/cache`,spend:`observe/spend`,incident:`observe/incident`},S=class extends i{constructor(...e){super(...e),this.rpcClient=null,this.eventDispatcher=null,this.initialTab=`overview`,this._sse=null,this._reloadDebounce=null,this._loadState=`loading`,this._activeTab=`overview`,this._error=``,this._requestsToday=0,this._tokensToday=0,this._costToday=0,this._errorsToday=0,this._tokenUsage24h=[],this._billingByProvider=[],this._billingByAgent=[],this._billingTotal=null,this._diagnosticsEvents=[],this._deliveryTraces=[],this._deliveryStats=null,this._channelActivity=[],this._agentHealth=[],this._channelHealth=[],this._resetConfirming=!1,this._resetInput=``,this._deliveryChannelFilter=`all`,this._deliveryStatusFilter=`all`,this._deliveryTimeRange=`1h`,this._expandedTraceId=null,this._refreshInterval=null,this._rpcStatusUnsub=null}static{this.styles=[d,c,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,o as s,p as c,r as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./ic-graph-canvas-CBDFKlf5.js";import{n as y,t as b}from"./extract-variables-pqBMrtGG.js";var x=50,S={label:`Untitled Pipeline`,onFailure:`fail-fast`};function C(){let e=[],t=[],n={...S},r=new Set,i=null,a={..._},o=null,s=!1,c=[],l=[],u=new Set;function d(){for(let e of u)e()}function f(){return structuredClone({nodes:e,edges:t,settings:n})}function p(){c.push(f()),c.length>x&&c.shift(),l=[]}function m(r){e=structuredClone(r.nodes),t=structuredClone(r.edges),n=structuredClone(r.settings)}return{subscribe(e){return u.add(e),()=>{u.delete(e)}},getSnapshot(){return Object.freeze({nodes:[...e],edges:[...t],settings:{...n},selectedNodeIds:new Set(r),selectedEdgeId:i,viewport:{...a},validationResult:o,isDirty:s,canUndo:c.length>0,canRedo:l.length>0})},addNode(t){p(),e.push(t),s=!0,d()},updateNode(t,n){p(),e=e.map(e=>e.id===t?{...e,...n,id:e.id}:e),s=!0,d()},removeNode(n){p(),e=e.filter(e=>e.id!==n),t=t.filter(e=>e.source!==n&&e.target!==n),s=!0,d()},addEdge(e,n){p();let r={id:`${e}->${n}`,source:e,target:n};t.push(r),s=!0,d()},removeEdge(e){p(),t=t.filter(t=>t.id!==e),s=!0,d()},updateSettings(e){p(),n={...n,...e},s=!0,d()},moveNodes(t){p();for(let{nodeId:n,position:r}of t)e=e.map(e=>e.id===n?{...e,position:r}:e);s=!0,d()},selectNode(e,t=!1){i=null,t?(r=new Set(r),r.add(e)):r=new Set([e]),d()},selectAll(){r=new Set(e.map(e=>e.id)),d()},clearSelection(){r=new Set,i=null,d()},selectEdge(e){i=e,r=new Set,d()},clearEdgeSelection(){i=null,d()},setViewport(e){a={...e},d()},setValidation(e){o=e,d()},undo(){c.length!==0&&(l.push(f()),m(c.pop()),s=!0,d())},redo(){l.length!==0&&(c.push(f()),m(l.pop()),s=!0,d())},markClean(){s=!1,d()},reset(){e=[],t=[],n={...S},r=new Set,i=null,a={..._},o=null,s=!1,c=[],l=[],d()}}}function w(e,t,n){if(t===n)return!0;let r=new Map;for(let t of e){let e=r.get(t.source);e||(e=[],r.set(t.source,e)),e.push(t.target)}let i=r.get(t);i||(i=[],r.set(t,i)),i.push(n);let a=new Set,o=[n];for(;o.length>0;){let e=o.pop();if(e===t)return!0;if(a.has(e))continue;a.add(e);let n=r.get(e);if(n)for(let e of n)a.has(e)||o.push(e)}return!1}var T=class extends r{constructor(...e){super(...e),this.settings={label:`Untitled Pipeline`,onFailure:`fail-fast`},this.hasErrors=!1,this.isDirty=!1,this.validateResult=``,this._validating=!1}static{this.styles=[l,e`
1
+ import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,o as s,p as c,r as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./ic-graph-canvas-Dllu1VH-.js";import{n as y,t as b}from"./extract-variables-pqBMrtGG.js";var x=50,S={label:`Untitled Pipeline`,onFailure:`fail-fast`};function C(){let e=[],t=[],n={...S},r=new Set,i=null,a={..._},o=null,s=!1,c=[],l=[],u=new Set;function d(){for(let e of u)e()}function f(){return structuredClone({nodes:e,edges:t,settings:n})}function p(){c.push(f()),c.length>x&&c.shift(),l=[]}function m(r){e=structuredClone(r.nodes),t=structuredClone(r.edges),n=structuredClone(r.settings)}return{subscribe(e){return u.add(e),()=>{u.delete(e)}},getSnapshot(){return Object.freeze({nodes:[...e],edges:[...t],settings:{...n},selectedNodeIds:new Set(r),selectedEdgeId:i,viewport:{...a},validationResult:o,isDirty:s,canUndo:c.length>0,canRedo:l.length>0})},addNode(t){p(),e.push(t),s=!0,d()},updateNode(t,n){p(),e=e.map(e=>e.id===t?{...e,...n,id:e.id}:e),s=!0,d()},removeNode(n){p(),e=e.filter(e=>e.id!==n),t=t.filter(e=>e.source!==n&&e.target!==n),s=!0,d()},addEdge(e,n){p();let r={id:`${e}->${n}`,source:e,target:n};t.push(r),s=!0,d()},removeEdge(e){p(),t=t.filter(t=>t.id!==e),s=!0,d()},updateSettings(e){p(),n={...n,...e},s=!0,d()},moveNodes(t){p();for(let{nodeId:n,position:r}of t)e=e.map(e=>e.id===n?{...e,position:r}:e);s=!0,d()},selectNode(e,t=!1){i=null,t?(r=new Set(r),r.add(e)):r=new Set([e]),d()},selectAll(){r=new Set(e.map(e=>e.id)),d()},clearSelection(){r=new Set,i=null,d()},selectEdge(e){i=e,r=new Set,d()},clearEdgeSelection(){i=null,d()},setViewport(e){a={...e},d()},setValidation(e){o=e,d()},undo(){c.length!==0&&(l.push(f()),m(c.pop()),s=!0,d())},redo(){l.length!==0&&(c.push(f()),m(l.pop()),s=!0,d())},markClean(){s=!1,d()},reset(){e=[],t=[],n={...S},r=new Set,i=null,a={..._},o=null,s=!1,c=[],l=[],d()}}}function w(e,t,n){if(t===n)return!0;let r=new Map;for(let t of e){let e=r.get(t.source);e||(e=[],r.set(t.source,e)),e.push(t.target)}let i=r.get(t);i||(i=[],r.set(t,i)),i.push(n);let a=new Set,o=[n];for(;o.length>0;){let e=o.pop();if(e===t)return!0;if(a.has(e))continue;a.add(e);let n=r.get(e);if(n)for(let e of n)a.has(e)||o.push(e)}return!1}var T=class extends r{constructor(...e){super(...e),this.settings={label:`Untitled Pipeline`,onFailure:`fail-fast`},this.hasErrors=!1,this.isDirty=!1,this.validateResult=``,this._validating=!1}static{this.styles=[l,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-empty-state-f_kVNpuc.js";var p={completed:`#22c55e`,failed:`#ef4444`};function m(e){if(!e)return`Never`;let t=i()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<30?`${o}d ago`:l(e).toISOString().slice(0,10)}var h=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._runs=[],this._loading=!0,this._sortField=`date`,this._sortDir=`desc`,this._deleteTarget=null}static{this.styles=[c,o,e`
1
+ import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-empty-state-DIodMykW.js";var p={completed:`#22c55e`,failed:`#ef4444`};function m(e){if(!e)return`Never`;let t=i()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<30?`${o}d ago`:l(e).toISOString().slice(0,10)}var h=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._runs=[],this._loading=!0,this._sortField=`date`,this._sortDir=`desc`,this._deleteTarget=null}static{this.styles=[c,o,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import{n as p,t as m}from"./ic-chat-message-CkDdrYHc.js";var h={completed:`#22c55e`,failed:`#ef4444`};function g(e){if(!e)return`Never`;let t=i()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<30?`${o}d ago`:l(e).toISOString().slice(0,10)}function _(e){return e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}var v=class extends n{constructor(...e){super(...e),this.rpcClient=null,this.graphId=``,this._rpcStatusUnsub=null,this._detail=null,this._loading=!0,this._error=!1,this._showDeleteConfirm=!1}static{this.styles=[c,o,e`
1
+ import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import{n as p,t as m}from"./ic-chat-message-s52yIvwR.js";var h={completed:`#22c55e`,failed:`#ef4444`};function g(e){if(!e)return`Never`;let t=i()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<30?`${o}d ago`:l(e).toISOString().slice(0,10)}function _(e){return e.replace(/_/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}var v=class extends n{constructor(...e){super(...e),this.rpcClient=null,this.graphId=``,this._rpcStatusUnsub=null,this._detail=null,this._loading=!0,this._error=!1,this._showDeleteConfirm=!1}static{this.styles=[c,o,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-empty-state-f_kVNpuc.js";import{n as p,t as m}from"./extract-variables-pqBMrtGG.js";var h={draft:`#6b7280`,running:`#06b6d4`,completed:`#22c55e`,failed:`#ef4444`,cancelled:`#f97316`};function g(e){if(!e)return`Never`;let t=i()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<30?`${o}d ago`:l(e).toISOString().slice(0,10)}var _=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._pipelines=[],this._searchQuery=``,this._loading=!0,this._deleteTarget=null,this._sortKey=`savedAt`,this._sortAsc=!1,this._showVariablePrompt=!1,this._variableNames=[],this._pendingExecuteData=null}static{this.styles=[c,o,e`
1
+ import{S as e,_ as t,g as n,h as r,l as i,m as a,n as o,p as s,r as c,s as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-empty-state-DIodMykW.js";import{n as p,t as m}from"./extract-variables-pqBMrtGG.js";var h={draft:`#6b7280`,running:`#06b6d4`,completed:`#22c55e`,failed:`#ef4444`,cancelled:`#f97316`};function g(e){if(!e)return`Never`;let t=i()-e;if(t<0)return`just now`;let n=Math.floor(t/1e3);if(n<60)return`just now`;let r=Math.floor(n/60);if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<30?`${o}d ago`:l(e).toISOString().slice(0,10)}var _=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._rpcStatusUnsub=null,this._pipelines=[],this._searchQuery=``,this._loading=!0,this._deleteTarget=null,this._sortKey=`savedAt`,this._sortAsc=!1,this._showVariablePrompt=!1,this._variableNames=[],this._pendingExecuteData=null}static{this.styles=[c,o,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,a as n,d as r,g as i,h as a,l as o,m as s,n as c,p as l,r as u,s as d,t as f,u as p,x as m,y as h}from"./decorate-C2wzL86z.js";import{a as g}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import{n as _,t as v}from"./ic-graph-canvas-CBDFKlf5.js";var y=2e3,b=1e3;function x(){let e=``,t=`running`,r=!1,i=[],a=[],s=[],c={total:0,completed:0,failed:0,skipped:0,running:0,pending:0},l=0,u=null,d=!0,f=null,m=null,h=null,g=null,_=[],v=null,x=new Set;function S(){for(let e of x)e()}function C(e,t){return e.map(e=>{let n=t[e.id];return{id:e.id,task:e.task,agentId:e.agentId,modelId:e.modelId,status:n?.status??`pending`,runId:n?.runId,output:n?.output,error:n?.error,startedAt:n?.startedAt,completedAt:n?.completedAt,durationMs:n?.durationMs,retryAttempt:n?.retryAttempt,retriesRemaining:n?.retriesRemaining,dependsOn:e.dependsOn,position:{x:e.position.x,y:e.position.y}}})}function w(n){e=n.graphId,t=n.status,r=n.isTerminal,s=n.executionOrder,c=n.stats,i=C(_,n.nodes),d=!1,f=null,g===null&&n.status===`running`&&(g=o(),l=0,k()),r&&(D(),O()),S()}function T(e){f=e instanceof Error?e.message:String(e),d=!1,S()}async function E(e,t){try{w(await e.call(`graph.status`,{graphId:t}))}catch(e){T(e)}}function D(){m!==null&&(n(m),m=null)}function O(){h!==null&&(n(h),h=null)}function k(){O(),h=p(()=>{g!==null&&(l=o()-g,S())},b)}function A(){let e=0,t=0,n=0,r=0,a=0;for(let o of i)switch(o.status){case`completed`:e++;break;case`failed`:t++;break;case`skipped`:n++;break;case`running`:r++;break;default:a++;break}c={total:i.length,completed:e,failed:t,skipped:n,running:r,pending:a}}return{subscribe(e){return x.add(e),()=>{x.delete(e)}},getSnapshot(){return Object.freeze({graphId:e,graphStatus:t,isTerminal:r,nodes:[...i],edges:[...a],executionOrder:[...s],stats:{...c},elapsedMs:l,selectedNodeId:u,loading:d,error:f})},selectNode(e){u=e,S()},startPolling(t,n,i,o){D(),O(),v=t,e=n,_=i,a=o,g=null,r=!1,E(t,n),m=p(()=>{E(t,n)},y)},stopPolling(){D(),O()},destroy(){D(),O(),x.clear()},applyEvent(n,a){if(n===`graph:node_updated`){let t=a;if(t.graphId!==e)return;let n=i.findIndex(e=>e.id===t.nodeId);if(n>=0){let e=i[n];i[n]={...e,status:t.status,durationMs:t.durationMs??e.durationMs,error:t.error??e.error,startedAt:t.status===`running`&&e.startedAt==null?t.timestamp:e.startedAt,completedAt:t.status===`completed`||t.status===`failed`?t.timestamp:e.completedAt},A(),S()}}else if(n===`graph:completed`){let n=a;if(n.graphId!==e)return;t=n.status,r=!0,c={total:n.nodeCount,completed:n.nodesCompleted,failed:n.nodesFailed,skipped:n.nodesSkipped,running:0,pending:0},D(),O(),d=!1,f=null,S()}else if(n===`graph:started`){if(a.graphId!==e)return;g===null&&(g=o(),l=0,k()),S()}},suspendPolling(){D()},resumePolling(){r||v&&(E(v,e),D(),m=p(()=>{E(v,e)},y))}}}function S(e){if(e==null)return`--`;let t=e/1e3;return t>=60?`${Math.floor(t/60)}m ${Math.floor(t%60).toString().padStart(2,`0`)}s`:`${t.toFixed(1)}s`}var C=class extends i{constructor(...e){super(...e),this.graphStatus=`running`,this.isTerminal=!1,this.elapsedMs=0,this.stats={total:0,completed:0,failed:0,skipped:0,running:0,pending:0}}static{this.styles=[u,e`
1
+ import{S as e,_ as t,a as n,d as r,g as i,h as a,l as o,m as s,n as c,p as l,r as u,s as d,t as f,u as p,x as m,y as h}from"./decorate-C2wzL86z.js";import{a as g}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-confirm-dialog-JnoEg4kp.js";import{n as _,t as v}from"./ic-graph-canvas-Dllu1VH-.js";var y=2e3,b=1e3;function x(){let e=``,t=`running`,r=!1,i=[],a=[],s=[],c={total:0,completed:0,failed:0,skipped:0,running:0,pending:0},l=0,u=null,d=!0,f=null,m=null,h=null,g=null,_=[],v=null,x=new Set;function S(){for(let e of x)e()}function C(e,t){return e.map(e=>{let n=t[e.id];return{id:e.id,task:e.task,agentId:e.agentId,modelId:e.modelId,status:n?.status??`pending`,runId:n?.runId,output:n?.output,error:n?.error,startedAt:n?.startedAt,completedAt:n?.completedAt,durationMs:n?.durationMs,retryAttempt:n?.retryAttempt,retriesRemaining:n?.retriesRemaining,dependsOn:e.dependsOn,position:{x:e.position.x,y:e.position.y}}})}function w(n){e=n.graphId,t=n.status,r=n.isTerminal,s=n.executionOrder,c=n.stats,i=C(_,n.nodes),d=!1,f=null,g===null&&n.status===`running`&&(g=o(),l=0,k()),r&&(D(),O()),S()}function T(e){f=e instanceof Error?e.message:String(e),d=!1,S()}async function E(e,t){try{w(await e.call(`graph.status`,{graphId:t}))}catch(e){T(e)}}function D(){m!==null&&(n(m),m=null)}function O(){h!==null&&(n(h),h=null)}function k(){O(),h=p(()=>{g!==null&&(l=o()-g,S())},b)}function A(){let e=0,t=0,n=0,r=0,a=0;for(let o of i)switch(o.status){case`completed`:e++;break;case`failed`:t++;break;case`skipped`:n++;break;case`running`:r++;break;default:a++;break}c={total:i.length,completed:e,failed:t,skipped:n,running:r,pending:a}}return{subscribe(e){return x.add(e),()=>{x.delete(e)}},getSnapshot(){return Object.freeze({graphId:e,graphStatus:t,isTerminal:r,nodes:[...i],edges:[...a],executionOrder:[...s],stats:{...c},elapsedMs:l,selectedNodeId:u,loading:d,error:f})},selectNode(e){u=e,S()},startPolling(t,n,i,o){D(),O(),v=t,e=n,_=i,a=o,g=null,r=!1,E(t,n),m=p(()=>{E(t,n)},y)},stopPolling(){D(),O()},destroy(){D(),O(),x.clear()},applyEvent(n,a){if(n===`graph:node_updated`){let t=a;if(t.graphId!==e)return;let n=i.findIndex(e=>e.id===t.nodeId);if(n>=0){let e=i[n];i[n]={...e,status:t.status,durationMs:t.durationMs??e.durationMs,error:t.error??e.error,startedAt:t.status===`running`&&e.startedAt==null?t.timestamp:e.startedAt,completedAt:t.status===`completed`||t.status===`failed`?t.timestamp:e.completedAt},A(),S()}}else if(n===`graph:completed`){let n=a;if(n.graphId!==e)return;t=n.status,r=!0,c={total:n.nodeCount,completed:n.nodesCompleted,failed:n.nodesFailed,skipped:n.nodesSkipped,running:0,pending:0},D(),O(),d=!1,f=null,S()}else if(n===`graph:started`){if(a.graphId!==e)return;g===null&&(g=o(),l=0,k()),S()}},suspendPolling(){D()},resumePolling(){r||v&&(E(v,e),D(),m=p(()=>{E(v,e)},y))}}}function S(e){if(e==null)return`--`;let t=e/1e3;return t>=60?`${Math.floor(t/60)}m ${Math.floor(t%60).toString().padStart(2,`0`)}s`:`${t.toFixed(1)}s`}var C=class extends i{constructor(...e){super(...e),this.graphStatus=`running`,this.isTerminal=!1,this.elapsedMs=0,this.stats={total:0,completed:0,failed:0,skipped:0,running:0,pending:0}}static{this.styles=[u,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,c as n,d as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,y as m}from"./decorate-C2wzL86z.js";import{a as h,i as g}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";import"./ic-tabs-BsjznKoe.js";function _(e){let t=null,i={hostConnected(){},hostDisconnected(){t!==null&&(l(t),t=null)},computeNextRuns(e){let t=n();switch(e.scheduleKind){case`cron`:return y(e.cronExpr,e.timezone,5,t);case`every`:return b(e.everyMs,5,t);case`at`:return x(e.atDateTime,t)}},schedulePreview(e){t!==null&&l(t),t=r(()=>{t=null,e()},500)},cancelPreview(){t!==null&&(l(t),t=null)},isPreviewPending(){return t!==null}};return e.addController(i),i}function v(e,t,n){let r=new Set;for(let i of e.split(`,`)){let e=i.trim(),a=e.match(/^(\*|(\d+)-(\d+))\/(\d+)$/);if(a){let e=parseInt(a[4],10);if(e<=0)return null;let i=t,o=n;if(a[2]!==void 0&&a[3]!==void 0&&(i=parseInt(a[2],10),o=parseInt(a[3],10)),i<t||o>n||i>o)return null;for(let t=i;t<=o;t+=e)r.add(t);continue}if(e===`*`){for(let e=t;e<=n;e++)r.add(e);continue}let o=e.match(/^(\d+)-(\d+)$/);if(o){let e=parseInt(o[1],10),i=parseInt(o[2],10);if(e<t||i>n||e>i)return null;for(let t=e;t<=i;t++)r.add(t);continue}if(/^\d+$/.test(e)){let i=parseInt(e,10);if(i<t||i>n)return null;r.add(i);continue}return null}return r.size>0?Array.from(r).sort((e,t)=>e-t):null}function y(e,t,n,r){let i=e.trim().split(/\s+/);if(i.length!==5)return[];let a=v(i[0],0,59),o=v(i[1],0,23),s=v(i[2],1,31),c=v(i[3],1,12),l=v(i[4],0,6);if(!a||!o||!s||!c||!l)return[];let u=new Set(a),d=new Set(o),p=new Set(s),m=new Set(c),h=new Set(l),g=[],_=r.getTime()+366*24*60*60*1e3,y=null;if(t)try{y=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,weekday:`short`,month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{y=null}let b={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},x=f(r);for(x.setSeconds(0,0),x.setTime(x.getTime()+6e4);x.getTime()<=_&&g.length<n;){let e,t,n,r,i;if(y){let a=y.formatToParts(x),o=e=>a.find(t=>t.type===e)?.value??``;e=parseInt(o(`minute`),10),t=parseInt(o(`hour`),10)%24,n=parseInt(o(`day`),10),r=parseInt(o(`month`),10),i=b[o(`weekday`)]??0}else e=x.getMinutes(),t=x.getHours(),n=x.getDate(),r=x.getMonth()+1,i=x.getDay();u.has(e)&&d.has(t)&&p.has(n)&&m.has(r)&&h.has(i)&&g.push(f(x)),x.setTime(x.getTime()+6e4)}return g}function b(e,t,n){if(e<=0||!Number.isFinite(e))return[];let r=[],i=n.getTime();for(let n=0;n<t;n++)i+=e,r.push(f(i));return r}function x(e,t){let r=f(e);if(isNaN(r.getTime()))return[];let i=t??n();return r.getTime()>i.getTime()?[r]:[]}function S(e,t){try{return new Intl.DateTimeFormat(`en-US`,{weekday:`short`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,timeZone:t||void 0,timeZoneName:`short`,hour12:!1}).format(e)}catch{return e.toISOString()}}var C=[`UTC`,`America/New_York`,`America/Chicago`,`America/Denver`,`America/Los_Angeles`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`,`Asia/Shanghai`,`Australia/Sydney`],w=class extends i{constructor(...e){super(...e),this.job=null,this.mode=`create`,this.agents=[],this._id=``,this._name=``,this._scheduleKind=`cron`,this._cronExpr=``,this._timezone=`UTC`,this._everyMs=6e4,this._atDateTime=``,this._enabled=!0,this._agentId=``,this._message=``,this._maxConcurrent=1,this._sessionTarget=`main`,this._deliveryMode=`none`,this._deliveryChannelType=``,this._deliveryChannelId=``,this._nextRuns=[],this._controller=null}static{this.styles=[d,c,e`
1
+ import{S as e,_ as t,c as n,d as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,y as m}from"./decorate-C2wzL86z.js";import{a as h,i as g}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";import"./ic-tabs-BsjznKoe.js";function _(e){let t=null,i={hostConnected(){},hostDisconnected(){t!==null&&(l(t),t=null)},computeNextRuns(e){let t=n();switch(e.scheduleKind){case`cron`:return y(e.cronExpr,e.timezone,5,t);case`every`:return b(e.everyMs,5,t);case`at`:return x(e.atDateTime,t)}},schedulePreview(e){t!==null&&l(t),t=r(()=>{t=null,e()},500)},cancelPreview(){t!==null&&(l(t),t=null)},isPreviewPending(){return t!==null}};return e.addController(i),i}function v(e,t,n){let r=new Set;for(let i of e.split(`,`)){let e=i.trim(),a=e.match(/^(\*|(\d+)-(\d+))\/(\d+)$/);if(a){let e=parseInt(a[4],10);if(e<=0)return null;let i=t,o=n;if(a[2]!==void 0&&a[3]!==void 0&&(i=parseInt(a[2],10),o=parseInt(a[3],10)),i<t||o>n||i>o)return null;for(let t=i;t<=o;t+=e)r.add(t);continue}if(e===`*`){for(let e=t;e<=n;e++)r.add(e);continue}let o=e.match(/^(\d+)-(\d+)$/);if(o){let e=parseInt(o[1],10),i=parseInt(o[2],10);if(e<t||i>n||e>i)return null;for(let t=e;t<=i;t++)r.add(t);continue}if(/^\d+$/.test(e)){let i=parseInt(e,10);if(i<t||i>n)return null;r.add(i);continue}return null}return r.size>0?Array.from(r).sort((e,t)=>e-t):null}function y(e,t,n,r){let i=e.trim().split(/\s+/);if(i.length!==5)return[];let a=v(i[0],0,59),o=v(i[1],0,23),s=v(i[2],1,31),c=v(i[3],1,12),l=v(i[4],0,6);if(!a||!o||!s||!c||!l)return[];let u=new Set(a),d=new Set(o),p=new Set(s),m=new Set(c),h=new Set(l),g=[],_=r.getTime()+366*24*60*60*1e3,y=null;if(t)try{y=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,weekday:`short`,month:`numeric`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{y=null}let b={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6},x=f(r);for(x.setSeconds(0,0),x.setTime(x.getTime()+6e4);x.getTime()<=_&&g.length<n;){let e,t,n,r,i;if(y){let a=y.formatToParts(x),o=e=>a.find(t=>t.type===e)?.value??``;e=parseInt(o(`minute`),10),t=parseInt(o(`hour`),10)%24,n=parseInt(o(`day`),10),r=parseInt(o(`month`),10),i=b[o(`weekday`)]??0}else e=x.getMinutes(),t=x.getHours(),n=x.getDate(),r=x.getMonth()+1,i=x.getDay();u.has(e)&&d.has(t)&&p.has(n)&&m.has(r)&&h.has(i)&&g.push(f(x)),x.setTime(x.getTime()+6e4)}return g}function b(e,t,n){if(e<=0||!Number.isFinite(e))return[];let r=[],i=n.getTime();for(let n=0;n<t;n++)i+=e,r.push(f(i));return r}function x(e,t){let r=f(e);if(isNaN(r.getTime()))return[];let i=t??n();return r.getTime()>i.getTime()?[r]:[]}function S(e,t){try{return new Intl.DateTimeFormat(`en-US`,{weekday:`short`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,timeZone:t||void 0,timeZoneName:`short`,hour12:!1}).format(e)}catch{return e.toISOString()}}var C=[`UTC`,`America/New_York`,`America/Chicago`,`America/Denver`,`America/Los_Angeles`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`,`Asia/Shanghai`,`Australia/Sydney`],w=class extends i{constructor(...e){super(...e),this.job=null,this.mode=`create`,this.agents=[],this._id=``,this._name=``,this._scheduleKind=`cron`,this._cronExpr=``,this._timezone=`UTC`,this._everyMs=6e4,this._atDateTime=``,this._enabled=!0,this._agentId=``,this._message=``,this._maxConcurrent=1,this._sessionTarget=`main`,this._deliveryMode=`none`,this._deliveryChannelType=``,this._deliveryChannelId=``,this._nextRuns=[],this._controller=null}static{this.styles=[d,c,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,a as n,d as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,t as f,u as p,y as m}from"./decorate-C2wzL86z.js";import{a as h,i as g}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-array-editor-Ba7psX7q.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-empty-state-f_kVNpuc.js";import"./ic-tabs-BsjznKoe.js";import"./ic-connection-dot-mggqNsPH.js";import"./ic-select-DY2apnK_.js";var _=class extends i{constructor(...e){super(...e),this.label=``,this.value=``,this.placeholder=`env:SECRET_NAME or file:/path`,this.disabled=!1,this.storageMode=`encrypted`,this._visible=!1}static{this.styles=[d,c,e`
1
+ import{S as e,_ as t,a as n,d as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,r as d,t as f,u as p,y as m}from"./decorate-C2wzL86z.js";import{a as h,i as g}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-array-editor-Ba7psX7q.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-empty-state-DIodMykW.js";import"./ic-tabs-BsjznKoe.js";import"./ic-connection-dot-3QDCBFHW.js";import"./ic-select-DY2apnK_.js";var _=class extends i{constructor(...e){super(...e),this.label=``,this.value=``,this.placeholder=`env:SECRET_NAME or file:/path`,this.disabled=!1,this.storageMode=`encrypted`,this._visible=!1}static{this.styles=[d,c,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,s as c,t as l,y as u}from"./decorate-C2wzL86z.js";import{a as d}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";import{n as f,r as p,t as m}from"./session-key-parser-CzslOQQP.js";import{t as h}from"./ic-tool-call-D1ykqLeH.js";import"./ic-chat-message-CkDdrYHc.js";import"./ic-budget-segment-bar-Dw6vzCTO.js";import"./ic-layer-waterfall-3qBGZLwA.js";function g(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}function _(e){return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}).format(e)}var v=class extends n{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.sessionKey=``,this._session=null,this._messages=[],this._loading=!1,this._error=``,this._showConfirm=!1,this._confirmAction=``,this._activeTab=`conversation`,this._contextLoaded=!1,this._metricsLoaded=!1,this._pipelineSnapshots=[],this._dagCompactions=[],this._selectedSnapshot=null,this._sessionBilling=null}static{this.styles=[s,a,e`
1
+ import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,s as c,t as l,y as u}from"./decorate-C2wzL86z.js";import{a as d}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";import{n as f,r as p,t as m}from"./session-key-parser-CzslOQQP.js";import{t as h}from"./ic-tool-call-CFexsEC4.js";import"./ic-chat-message-s52yIvwR.js";import"./ic-budget-segment-bar-Dw6vzCTO.js";import"./ic-layer-waterfall-3qBGZLwA.js";function g(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}function _(e){return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`}).format(e)}var v=class extends n{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.sessionKey=``,this._session=null,this._messages=[],this._loading=!1,this._error=``,this._showConfirm=!1,this._confirmAction=``,this._activeTab=`conversation`,this._contextLoaded=!1,this._metricsLoaded=!1,this._pipelineSnapshots=[],this._dagCompactions=[],this._selectedSnapshot=null,this._sessionBilling=null}static{this.styles=[s,a,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,d as n,g as r,h as i,l as a,m as o,n as s,o as c,p as l,r as u,t as d,y as f}from"./decorate-C2wzL86z.js";import{a as p,i as m}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-empty-state-f_kVNpuc.js";import{n as h,r as g,t as _}from"./session-key-parser-CzslOQQP.js";function v(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}var y={active:`#22c55e`,idle:`#eab308`,expired:`#6b7280`},b=[{key:`sessionKey`,label:`Session`,sortable:!0,render:(e,t)=>{let n=String(e??``),r=g(n);return f`<span title=${n}>
1
+ import{S as e,_ as t,d as n,g as r,h as i,l as a,m as o,n as s,o as c,p as l,r as u,t as d,y as f}from"./decorate-C2wzL86z.js";import{a as p,i as m}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-empty-state-DIodMykW.js";import{n as h,r as g,t as _}from"./session-key-parser-CzslOQQP.js";function v(e){if(e>=1e3){let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}return String(e)}var y={active:`#22c55e`,idle:`#eab308`,expired:`#6b7280`},b=[{key:`sessionKey`,label:`Session`,sortable:!0,render:(e,t)=>{let n=String(e??``),r=g(n);return f`<span title=${n}>
2
2
  <strong style="font-size: var(--ic-text-sm);">${r?h(r):n.length>15?n.slice(0,12)+`...`:n}</strong>
3
3
  <span style="font-size: var(--ic-text-xs); color: var(--ic-text-dim); margin-left: 4px;">${r?.channelId??t.kind}</span>
4
4
  </span>`}},{key:`status`,label:`Status`,sortable:!1,render:(e,t)=>{let n=_(t.updatedAt);return f`<span style="display: inline-flex; align-items: center; gap: 6px;">
@@ -1,7 +1,7 @@
1
- import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import{a as u}from"./index-dqPriKJN.js";var d=[{label:`Basics`,icon:`settings`},{label:`Provider`,icon:`server`},{label:`Agent`,icon:`agent`},{label:`Channels`,icon:`channel`},{label:`Review`,icon:`check`}],f={anthropic:{displayName:`Anthropic`,description:`Claude models, recommended for agents`,signupUrl:`https://console.anthropic.com/settings/keys`,needsApiKey:!0,needsBaseUrl:!1},openai:{displayName:`OpenAI`,description:`GPT-4o, o1, o3 models`,signupUrl:`https://platform.openai.com/api-keys`,needsApiKey:!0,needsBaseUrl:!1},google:{displayName:`Google`,description:`Gemini models`,signupUrl:`https://aistudio.google.com/app/apikey`,needsApiKey:!0,needsBaseUrl:!1},groq:{displayName:`Groq`,description:`Fast inference`,signupUrl:`https://console.groq.com/keys`,needsApiKey:!0,needsBaseUrl:!1},mistral:{displayName:`Mistral`,description:`Mistral models`,signupUrl:`https://console.mistral.ai/api-keys/`,needsApiKey:!0,needsBaseUrl:!1},cerebras:{displayName:`Cerebras`,description:`Fast inference`,signupUrl:`https://cloud.cerebras.ai/`,needsApiKey:!0,needsBaseUrl:!1},xai:{displayName:`xAI`,description:`Grok models`,signupUrl:`https://console.x.ai/`,needsApiKey:!0,needsBaseUrl:!1},openrouter:{displayName:`OpenRouter`,description:`Multi-provider routing`,signupUrl:`https://openrouter.ai/keys`,needsApiKey:!0,needsBaseUrl:!1}},p=`__custom__`,m={displayName:`Custom`,description:`Any OpenAI-compatible API endpoint`,needsApiKey:!1,needsBaseUrl:!0};function h(e){return Object.hasOwn(f,e)?f[e]:{displayName:e.charAt(0).toUpperCase()+e.slice(1),description:``,needsApiKey:!0,needsBaseUrl:!1}}var g=[{key:`telegram`,label:`Telegram`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`allowedChatIds`,label:`Allowed Chat IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`discord`,label:`Discord`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`guildIds`,label:`Guild IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`slack`,label:`Slack`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`appToken`,label:`App Token`,type:`password`},{key:`signingSecret`,label:`Signing Secret`,type:`password`}]},{key:`whatsapp`,label:`WhatsApp`,fields:[{key:`phoneNumberId`,label:`Phone Number ID`,type:`text`},{key:`accessToken`,label:`Access Token`,type:`password`},{key:`verifyToken`,label:`Verify Token`,type:`text`}]},{key:`line`,label:`LINE`,fields:[{key:`channelAccessToken`,label:`Channel Access Token`,type:`password`},{key:`channelSecret`,label:`Channel Secret`,type:`password`}]},{key:`signal`,label:`Signal`,fields:[{key:`phone`,label:`Phone Number`,type:`text`},{key:`signalCliPath`,label:`Signal CLI Path`,type:`text`}]},{key:`irc`,label:`IRC`,fields:[{key:`server`,label:`Server`,type:`text`},{key:`port`,label:`Port`,type:`number`,defaultValue:`6667`},{key:`nick`,label:`Nickname`,type:`text`},{key:`channels`,label:`Channels`,type:`text`,placeholder:`Comma-separated, e.g. #general,#dev`}]},{key:`imessage`,label:`iMessage`,fields:[{key:`applescriptPath`,label:`AppleScript Path`,type:`text`,placeholder:`Requires macOS with Messages app`}]}],_=[`trace`,`debug`,`info`,`warn`,`error`];function v(e,t=0){let n=` `.repeat(t);if(e==null)return`${n}~\n`;if(typeof e==`string`)return e===``||/[:#[\]{},&*!?%~|>'"@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(Array.isArray(e))return e.length===0?`[]
1
+ import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,y as l}from"./decorate-C2wzL86z.js";import{a as u}from"./index-IIyLteKK.js";var d=[{label:`Basics`,icon:`settings`},{label:`Provider`,icon:`server`},{label:`Agent`,icon:`agent`},{label:`Channels`,icon:`channel`},{label:`Review`,icon:`check`}],f={anthropic:{displayName:`Anthropic`,description:`Claude models, recommended for agents`,signupUrl:`https://console.anthropic.com/settings/keys`,needsApiKey:!0,needsBaseUrl:!1},openai:{displayName:`OpenAI`,description:`GPT-4o, o1, o3 models`,signupUrl:`https://platform.openai.com/api-keys`,needsApiKey:!0,needsBaseUrl:!1},google:{displayName:`Google`,description:`Gemini models`,signupUrl:`https://aistudio.google.com/app/apikey`,needsApiKey:!0,needsBaseUrl:!1},groq:{displayName:`Groq`,description:`Fast inference`,signupUrl:`https://console.groq.com/keys`,needsApiKey:!0,needsBaseUrl:!1},mistral:{displayName:`Mistral`,description:`Mistral models`,signupUrl:`https://console.mistral.ai/api-keys/`,needsApiKey:!0,needsBaseUrl:!1},cerebras:{displayName:`Cerebras`,description:`Fast inference`,signupUrl:`https://cloud.cerebras.ai/`,needsApiKey:!0,needsBaseUrl:!1},xai:{displayName:`xAI`,description:`Grok models`,signupUrl:`https://console.x.ai/`,needsApiKey:!0,needsBaseUrl:!1},openrouter:{displayName:`OpenRouter`,description:`Multi-provider routing`,signupUrl:`https://openrouter.ai/keys`,needsApiKey:!0,needsBaseUrl:!1}},p=`__custom__`,m={displayName:`Custom`,description:`Any OpenAI-compatible API endpoint`,needsApiKey:!1,needsBaseUrl:!0};function h(e){return Object.hasOwn(f,e)?f[e]:{displayName:e.charAt(0).toUpperCase()+e.slice(1),description:``,needsApiKey:!0,needsBaseUrl:!1}}var g=[{key:`telegram`,label:`Telegram`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`allowedChatIds`,label:`Allowed Chat IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`discord`,label:`Discord`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`guildIds`,label:`Guild IDs`,type:`text`,placeholder:`Comma-separated IDs`}]},{key:`slack`,label:`Slack`,fields:[{key:`botToken`,label:`Bot Token`,type:`password`},{key:`appToken`,label:`App Token`,type:`password`},{key:`signingSecret`,label:`Signing Secret`,type:`password`}]},{key:`whatsapp`,label:`WhatsApp`,fields:[{key:`phoneNumberId`,label:`Phone Number ID`,type:`text`},{key:`accessToken`,label:`Access Token`,type:`password`},{key:`verifyToken`,label:`Verify Token`,type:`text`}]},{key:`line`,label:`LINE`,fields:[{key:`channelAccessToken`,label:`Channel Access Token`,type:`password`},{key:`channelSecret`,label:`Channel Secret`,type:`password`}]},{key:`signal`,label:`Signal`,fields:[{key:`phone`,label:`Phone Number`,type:`text`},{key:`signalCliPath`,label:`Signal CLI Path`,type:`text`}]},{key:`irc`,label:`IRC`,fields:[{key:`server`,label:`Server`,type:`text`},{key:`port`,label:`Port`,type:`number`,defaultValue:`6667`},{key:`nick`,label:`Nickname`,type:`text`},{key:`channels`,label:`Channels`,type:`text`,placeholder:`Comma-separated, e.g. #general,#dev`}]},{key:`imessage`,label:`iMessage`,fields:[{key:`applescriptPath`,label:`AppleScript Path`,type:`text`,placeholder:`Requires macOS with Messages app`}]}],_=[`trace`,`debug`,`info`,`warn`,`error`];function v(e,t=0){let n=` `.repeat(t);if(e==null)return`${n}~\n`;if(typeof e==`string`)return e===``||/[:#[\]{},&*!?%~|>'"@`]/.test(e)||/^\s|\s$/.test(e)?`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`:e;if(typeof e==`number`||typeof e==`boolean`)return String(e);if(Array.isArray(e))return e.length===0?`[]
2
2
  `:e.map(e=>{if(typeof e==`object`&&e){let r=v(e,t+1),i=r.split(`
3
3
  `).filter(Boolean);if(i.length>0){let e=` `.repeat(t+1);return`${n}- ${i[0].substring(e.length)}\n${i.slice(1).map(t=>`${n} ${t.substring(e.length)}\n`).join(``)}`}return`${n}- ${r.trim()}\n`}return`${n}- ${v(e,0)}\n`}).join(``);if(typeof e==`object`){let r=Object.entries(e).filter(([,e])=>e!=null&&e!==``);return r.length===0?`{}
4
- `:r.map(([e,r])=>typeof r==`object`&&!Array.isArray(r)||Array.isArray(r)?`${n}${e}:\n${v(r,t+1)}`:`${n}${e}: ${v(r,0)}\n`).join(``)}return String(e)}function y(){let e={};for(let t of g)e[t.key]={enabled:!1,credentials:{}};return{tenantId:`default`,dataDir:`~/.comis`,logLevel:`debug`,gatewayHost:`127.0.0.1`,gatewayPort:4766,providerName:``,providerType:``,apiKey:``,baseUrl:``,defaultModel:``,agentId:`default`,agentName:`Comis`,agentModel:``,agentProvider:``,maxSteps:50,budgetPerDay:1e8,budgetPerHour:1e7,channels:e}}function b(e,t){let n=Object.freeze({currentStep:0,wizardData:y(),testResult:{status:`idle`},expandedChannels:new Set,yamlPreview:``,applying:!1,applyStatus:``,applyDone:!1,validationErrors:{},catalogProviders:[],catalogProvidersLoading:!1,catalogProvidersError:void 0,modelOptions:[],modelOptionsLoading:!1,modelOptionsError:void 0});function r(t){n=Object.freeze({...n,...t}),e.requestUpdate()}function i(e){let t=n.wizardData,i={};switch(e){case 0:t.tenantId.trim()||(i.tenantId=`Tenant ID is required`);break;case 1:{t.providerName||(i.providerType=`Please select a provider`);let e=t.providerName===p,n=e?m:h(t.providerName);n.needsApiKey&&!t.apiKey.trim()&&(i.apiKey=`API key is required for this provider`),n.needsBaseUrl&&!t.baseUrl.trim()&&(i.baseUrl=`Base URL is required for this provider`),!e&&t.providerName&&!t.defaultModel.trim()&&(i.defaultModel=`Please select a model for this provider`);break}case 2:t.agentId.trim()||(i.agentId=`Agent ID is required`);break;case 3:break}return r({validationErrors:i}),Object.keys(i).length===0}function a(){let e=n.wizardData,t={};if(e.tenantId&&e.tenantId!=="default"&&(t.tenantId=e.tenantId),t.logLevel=e.logLevel,t.dataDir=e.dataDir,t.gateway={enabled:!0,host:e.gatewayHost,port:e.gatewayPort},e.providerName){let n={};e.apiKey&&(n.apiKeyName=`env:`+e.providerName.toUpperCase()+`_API_KEY`),e.baseUrl&&(n.baseUrl=e.baseUrl),t.providers={[e.providerName]:n},e.defaultModel&&(t.models={defaultProvider:e.providerName,defaultModel:e.defaultModel})}let i={name:e.agentName,model:e.agentModel||e.defaultModel,provider:e.agentProvider||e.providerName,maxSteps:e.maxSteps,budgets:{perExecution:2e6,perHour:e.budgetPerHour,perDay:e.budgetPerDay}};t.agents={[e.agentId]:i};let a={};for(let[t,n]of Object.entries(e.channels)){if(!n.enabled)continue;let e={enabled:!0};for(let[t,r]of Object.entries(n.credentials))r&&(t===`allowedChatIds`?e.allowFrom=r.split(`,`).map(e=>e.trim()).filter(Boolean):e[t]=r);a[t]=e}Object.keys(a).length>0&&(t.channels=a),r({yamlPreview:v(t)})}let o=null,s={hostConnected(){t.status===`connected`?s.loadCatalogProviders():o=t.onStatusChange(e=>{e===`connected`&&(s.loadCatalogProviders(),o?.(),o=null)})},hostDisconnected(){o?.(),o=null},getSnapshot(){return n},async loadCatalogProviders(){r({catalogProvidersLoading:!0,catalogProvidersError:void 0});try{r({catalogProviders:(await t.call(`models.list_providers`,{})).providers??[],catalogProvidersLoading:!1})}catch(e){r({catalogProvidersError:e instanceof Error?e.message:String(e),catalogProviders:[],catalogProvidersLoading:!1})}},async loadModelOptions(e){r({modelOptionsLoading:!0,modelOptionsError:void 0,modelOptions:[]});try{let n=((await t.call(`models.list`,{provider:e})).models??[]).map(e=>({id:(e.modelId??e.id??``).trim(),cost:(e.cost?.input??0)+(e.cost?.output??0)})).filter(e=>e.id.length>0);n.sort((e,t)=>e.cost-t.cost),r({modelOptions:n,modelOptionsLoading:!1})}catch(e){r({modelOptionsError:e instanceof Error?e.message:String(e),modelOptionsLoading:!1})}},async testConnection(){r({testResult:{status:`testing`}});try{await t.call(`models.test`,{provider:n.wizardData.providerType}),r({testResult:{status:`success`,message:`Connected`}})}catch(e){r({testResult:{status:`error`,message:e instanceof Error?e.message:`Connection failed`}})}},async applyConfig(){if(n.applying)return;r({applying:!0,applyDone:!1});let e=n.wizardData,i=[];e.providerName&&e.defaultModel&&i.push({label:`models`,section:`models`,value:{defaultProvider:e.providerName,defaultModel:e.defaultModel}});let a=[];a.push(`agents`),a.push(`gateway`),e.providerName&&a.push(`providers`),Object.values(e.channels).some(e=>e.enabled)&&a.push(`channels`);let o=0;for(let e of i){r({applyStatus:`Applying ${e.label}...`});try{await t.call(`config.apply`,{section:e.section,value:e.value}),o++}catch(t){let n=t instanceof Error?t.message:`Failed to apply configuration`;u.show(`${e.label}: ${n}`,`error`)}}r({applying:!1,applyStatus:``,applyDone:!0}),a.length>0?u.show(`Applied ${o} section(s). ${a.join(`, `)} require saving the config file and restarting the daemon. Use Copy or Download to get the full config.`,`info`):u.show(`Configuration applied! Restart the daemon to activate.`,`success`)},goNext(){i(n.currentStep)&&(n.currentStep===3&&a(),n.currentStep===1&&(n.wizardData.agentModel||r({wizardData:{...n.wizardData,agentModel:n.wizardData.defaultModel,agentProvider:n.wizardData.providerName}})),r({currentStep:Math.min(n.currentStep+1,d.length-1),validationErrors:{}}))},goBack(){r({currentStep:Math.max(n.currentStep-1,0),validationErrors:{}})},setCurrentStep(e){r({currentStep:Math.max(0,Math.min(e,d.length-1)),validationErrors:{}})},selectProvider(e){let t=e===p,i=t?m:h(e);r({wizardData:{...n.wizardData,providerName:e,providerType:t?`openai`:e,apiKey:``,baseUrl:i.defaultBaseUrl??``,defaultModel:``},testResult:{status:`idle`},validationErrors:{},modelOptions:[],modelOptionsError:void 0}),t||s.loadModelOptions(e)},toggleChannel(e){if(!Object.hasOwn(n.wizardData.channels,e))return;let t=n.wizardData.channels[e],i={...n.wizardData.channels,[e]:{...t,enabled:!t.enabled}},a=t.enabled?n.expandedChannels:new Set([...n.expandedChannels,e]);r({wizardData:{...n.wizardData,channels:i},expandedChannels:a})},toggleExpand(e){let t=new Set(n.expandedChannels);t.has(e)?t.delete(e):t.add(e),r({expandedChannels:t})},updateChannelCredential(e,t,i){if(!Object.hasOwn(n.wizardData.channels,e))return;let a=n.wizardData.channels[e],o={...a.credentials,[t]:i},s={...n.wizardData.channels,[e]:{...a,credentials:o}};r({wizardData:{...n.wizardData,channels:s}})},updateWizardData(e){r({wizardData:{...n.wizardData,...e}})}};return e.addController(s),s}var x=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._controller=null}static{this.styles=[s,a,e`
4
+ `:r.map(([e,r])=>{if(typeof r==`object`&&!Array.isArray(r)){let i=v(r,t+1);return`${n}${e}:\n${i}`}if(Array.isArray(r)){let i=v(r,t+1);return`${n}${e}:\n${i}`}return`${n}${e}: ${v(r,0)}\n`}).join(``)}return String(e)}function y(){let e={};for(let t of g)e[t.key]={enabled:!1,credentials:{}};return{tenantId:`default`,dataDir:`~/.comis`,logLevel:`debug`,gatewayHost:`127.0.0.1`,gatewayPort:4766,providerName:``,providerType:``,apiKey:``,baseUrl:``,defaultModel:``,agentId:`default`,agentName:`Comis`,agentModel:``,agentProvider:``,maxSteps:50,budgetPerDay:1e8,budgetPerHour:1e7,channels:e}}function b(e,t){let n=Object.freeze({currentStep:0,wizardData:y(),testResult:{status:`idle`},expandedChannels:new Set,yamlPreview:``,applying:!1,applyStatus:``,applyDone:!1,validationErrors:{},catalogProviders:[],catalogProvidersLoading:!1,catalogProvidersError:void 0,modelOptions:[],modelOptionsLoading:!1,modelOptionsError:void 0});function r(t){n=Object.freeze({...n,...t}),e.requestUpdate()}function i(e){let t=n.wizardData,i={};switch(e){case 0:t.tenantId.trim()||(i.tenantId=`Tenant ID is required`);break;case 1:{t.providerName||(i.providerType=`Please select a provider`);let e=t.providerName===p,n=e?m:h(t.providerName);n.needsApiKey&&!t.apiKey.trim()&&(i.apiKey=`API key is required for this provider`),n.needsBaseUrl&&!t.baseUrl.trim()&&(i.baseUrl=`Base URL is required for this provider`),!e&&t.providerName&&!t.defaultModel.trim()&&(i.defaultModel=`Please select a model for this provider`);break}case 2:t.agentId.trim()||(i.agentId=`Agent ID is required`);break;case 3:break}return r({validationErrors:i}),Object.keys(i).length===0}function a(){let e=n.wizardData,t={};if(e.tenantId&&e.tenantId!=="default"&&(t.tenantId=e.tenantId),t.logLevel=e.logLevel,t.dataDir=e.dataDir,t.gateway={enabled:!0,host:e.gatewayHost,port:e.gatewayPort},e.providerName){let n={};e.apiKey&&(n.apiKeyName=`env:`+e.providerName.toUpperCase()+`_API_KEY`),e.baseUrl&&(n.baseUrl=e.baseUrl),t.providers={[e.providerName]:n},e.defaultModel&&(t.models={defaultProvider:e.providerName,defaultModel:e.defaultModel})}let i={name:e.agentName,model:e.agentModel||e.defaultModel,provider:e.agentProvider||e.providerName,maxSteps:e.maxSteps,budgets:{perExecution:2e6,perHour:e.budgetPerHour,perDay:e.budgetPerDay}};t.agents={[e.agentId]:i};let a={};for(let[t,n]of Object.entries(e.channels)){if(!n.enabled)continue;let e={enabled:!0};for(let[t,r]of Object.entries(n.credentials))r&&(t===`allowedChatIds`?e.allowFrom=r.split(`,`).map(e=>e.trim()).filter(Boolean):e[t]=r);a[t]=e}Object.keys(a).length>0&&(t.channels=a),r({yamlPreview:v(t)})}let o=null,s={hostConnected(){t.status===`connected`?s.loadCatalogProviders():o=t.onStatusChange(e=>{e===`connected`&&(s.loadCatalogProviders(),o?.(),o=null)})},hostDisconnected(){o?.(),o=null},getSnapshot(){return n},async loadCatalogProviders(){r({catalogProvidersLoading:!0,catalogProvidersError:void 0});try{r({catalogProviders:(await t.call(`models.list_providers`,{})).providers??[],catalogProvidersLoading:!1})}catch(e){r({catalogProvidersError:e instanceof Error?e.message:String(e),catalogProviders:[],catalogProvidersLoading:!1})}},async loadModelOptions(e){r({modelOptionsLoading:!0,modelOptionsError:void 0,modelOptions:[]});try{let n=((await t.call(`models.list`,{provider:e})).models??[]).map(e=>({id:(e.modelId??e.id??``).trim(),cost:(e.cost?.input??0)+(e.cost?.output??0)})).filter(e=>e.id.length>0);n.sort((e,t)=>e.cost-t.cost),r({modelOptions:n,modelOptionsLoading:!1})}catch(e){r({modelOptionsError:e instanceof Error?e.message:String(e),modelOptionsLoading:!1})}},async testConnection(){r({testResult:{status:`testing`}});try{await t.call(`models.test`,{provider:n.wizardData.providerType}),r({testResult:{status:`success`,message:`Connected`}})}catch(e){r({testResult:{status:`error`,message:e instanceof Error?e.message:`Connection failed`}})}},async applyConfig(){if(n.applying)return;r({applying:!0,applyDone:!1});let e=n.wizardData,i=[];e.providerName&&e.defaultModel&&i.push({label:`models`,section:`models`,value:{defaultProvider:e.providerName,defaultModel:e.defaultModel}});let a=[];a.push(`agents`),a.push(`gateway`),e.providerName&&a.push(`providers`),Object.values(e.channels).some(e=>e.enabled)&&a.push(`channels`);let o=0;for(let e of i){r({applyStatus:`Applying ${e.label}...`});try{await t.call(`config.apply`,{section:e.section,value:e.value}),o++}catch(t){let n=t instanceof Error?t.message:`Failed to apply configuration`;u.show(`${e.label}: ${n}`,`error`)}}r({applying:!1,applyStatus:``,applyDone:!0}),a.length>0?u.show(`Applied ${o} section(s). ${a.join(`, `)} require saving the config file and restarting the daemon. Use Copy or Download to get the full config.`,`info`):u.show(`Configuration applied! Restart the daemon to activate.`,`success`)},goNext(){i(n.currentStep)&&(n.currentStep===3&&a(),n.currentStep===1&&(n.wizardData.agentModel||r({wizardData:{...n.wizardData,agentModel:n.wizardData.defaultModel,agentProvider:n.wizardData.providerName}})),r({currentStep:Math.min(n.currentStep+1,d.length-1),validationErrors:{}}))},goBack(){r({currentStep:Math.max(n.currentStep-1,0),validationErrors:{}})},setCurrentStep(e){r({currentStep:Math.max(0,Math.min(e,d.length-1)),validationErrors:{}})},selectProvider(e){let t=e===p,i=t?m:h(e);r({wizardData:{...n.wizardData,providerName:e,providerType:t?`openai`:e,apiKey:``,baseUrl:i.defaultBaseUrl??``,defaultModel:``},testResult:{status:`idle`},validationErrors:{},modelOptions:[],modelOptionsError:void 0}),t||s.loadModelOptions(e)},toggleChannel(e){if(!Object.hasOwn(n.wizardData.channels,e))return;let t=n.wizardData.channels[e],i={...n.wizardData.channels,[e]:{...t,enabled:!t.enabled}},a=t.enabled?n.expandedChannels:new Set([...n.expandedChannels,e]);r({wizardData:{...n.wizardData,channels:i},expandedChannels:a})},toggleExpand(e){let t=new Set(n.expandedChannels);t.has(e)?t.delete(e):t.add(e),r({expandedChannels:t})},updateChannelCredential(e,t,i){if(!Object.hasOwn(n.wizardData.channels,e))return;let a=n.wizardData.channels[e],o={...a.credentials,[t]:i},s={...n.wizardData.channels,[e]:{...a,credentials:o}};r({wizardData:{...n.wizardData,channels:s}})},updateWizardData(e){r({wizardData:{...n.wizardData,...e}})}};return e.addController(s),s}var x=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._controller=null}static{this.styles=[s,a,e`
5
5
  :host { display: block; }
6
6
  .wizard-header { margin-bottom: var(--ic-space-lg); }
7
7
  .wizard-title { font-size: 1.125rem; font-weight: 600; }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,d as n,g as r,h as i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,y as p}from"./decorate-C2wzL86z.js";import{a as m,i as h}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-empty-state-f_kVNpuc.js";import"./ic-tabs-BsjznKoe.js";var g={read:`Read file contents with line numbers and pagination`,write:`Write or overwrite files; auto-creates parent directories`,edit:`Surgical search-and-replace on files (exact text match)`,grep:`Regex search across files (ripgrep-based)`,find:`Find files by glob pattern (fd-based)`,ls:`List directory contents alphabetically`,exec:`Shell command execution with foreground/background modes`,process:`Background process management (list, kill, status, log)`,webSearch:`Multi-provider web search (Brave, DuckDuckGo, Perplexity, Grok, Tavily, Exa, Jina, SearXNG)`,webFetch:`Fetch and extract content from URLs (markdown, text, readability modes)`,browser:`Headless browser control (requires Playwright/Chromium)`},_={webSearch:[`freshness: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD`,`deepFetch: 0-5 - auto-fetch full page content for top N results`,`provider: override search provider per call`]},v=[{label:`File Operations`,tools:[`read`,`write`,`edit`,`find`,`ls`]},{label:`Execution`,tools:[`exec`,`process`]},{label:`Search`,tools:[`grep`]},{label:`Web`,tools:[`webSearch`,`webFetch`,`browser`]}],y={minimal:[`exec`],coding:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`],messaging:[`exec`,`webSearch`,`webFetch`],supervisor:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`,`webSearch`,`webFetch`],full:[...v.flatMap(e=>e.tools)]},b={memory_search:`Semantic hybrid search across memory and session transcripts`,memory_get:`Read specific memory file sections by path with line ranges`,memory_store:`Store facts, preferences, or context in long-term memory`,memory_manage:`Stats, browse, delete, flush, and export memory entries`,session_status:`View current session model, token usage, and duration`,sessions_list:`List active sessions filtered by kind and recency`,sessions_history:`View conversation history for a session with pagination`,sessions_send:`Send a message into another session (fire-and-forget, wait, or ping-pong)`,sessions_spawn:`Spawn a sub-agent session for background work (sync or async)`,sessions_manage:`Delete, reset, export, or compact session lifecycles`,agents_manage:`List, create, inspect, update, suspend/resume, and delete agents`,subagents:`List, kill, or steer running sub-agents`,message:`Send, reply, react, edit, delete, and fetch messages across all channels`,discord_action:`Pin/unpin, kick/ban, roles, threads, channels, bot presence`,telegram_action:`Pin/unpin, polls, stickers, chat info, ban/promote members`,slack_action:`Pin/unpin, topics, archive, create channels, invite/kick, bookmarks`,whatsapp_action:`Group info, participants, settings, invite codes, profile status`,image_analyze:`Analyze images using vision AI from files, URLs, or base64`,tts_synthesize:`Generate speech audio from text via configured TTS provider`,transcribe_audio:`Transcribe audio/voice attachments to text with language hints`,describe_video:`Generate text descriptions of video attachments`,extract_document:`Extract text from PDF, CSV, TXT, and other document formats`,cron:`Create, list, update, remove, and trigger scheduled jobs`,gateway:`Read/patch config, set secrets, restart, rollback, and status`,browser:`Headless browser: navigate, snapshot, screenshot, click, type, tabs`,obs_query:`Query diagnostics, billing, delivery traces, and channel activity`,models_manage:`List available models and test provider availability`,tokens_manage:`List, create, revoke, and rotate gateway auth tokens`,channels_manage:`List, enable, disable, and restart channel adapters`,skills_manage:`List, import from GitHub, and delete prompt skills`},x=[{label:`MEMORY`,tools:[`memory_search`,`memory_get`,`memory_store`,`memory_manage`]},{label:`SESSIONS`,tools:[`session_status`,`sessions_list`,`sessions_history`,`sessions_send`,`sessions_spawn`,`sessions_manage`]},{label:`AGENTS`,tools:[`agents_manage`,`subagents`]},{label:`MESSAGING`,tools:[`message`,`discord_action`,`telegram_action`,`slack_action`,`whatsapp_action`]},{label:`MEDIA`,tools:[`image_analyze`,`tts_synthesize`,`transcribe_audio`,`describe_video`,`extract_document`]},{label:`INFRASTRUCTURE`,tools:[`cron`,`gateway`,`browser`,`obs_query`]},{label:`FLEET MANAGEMENT`,tools:[`models_manage`,`tokens_manage`,`channels_manage`,`skills_manage`]}],S=[{id:`tools`,label:`Built-in Tools`},{id:`skills`,label:`Prompt Skills`}];function C(e){let t=e.match(/\/workspace-([^/]+)\/skills\//);return t?t[1]:/\/workspace\/skills\//.test(e)?`default`:``}function w(e,t,r){let i=Object.freeze({loadState:`loading`,error:``,activeTab:`tools`,skillsConfig:null,discoveredSkills:[],targetAgentId:``,agentIds:[],skillScope:`all`,defaultAgentId:`default`,searchQuery:``,importUrl:``,isImportingSkill:!1,isUploadingSkill:!1,deletingSkill:null,installAgent:``,installScope:`shared`,newAllowedSkill:``,newDeniedSkill:``,newPolicyAllow:``,newPolicyDeny:``,recentSkillEvents:[]});function o(t){i=Object.freeze({...i,...t}),e.requestUpdate()}let s=null,l=null,u=!1,d=null;function f(e=300){d!==null&&c(d),d=n(()=>{d=null,_.loadData()},e)}function p(){!r||s||(s=new h(e,r,{"skill:loaded":()=>{f()},"skill:registry_reset":()=>{f()},"agent:hot_added":()=>{f()},"agent:hot_removed":()=>{f()},"skill:executed":e=>{let t=e;o({recentSkillEvents:[{skillName:t.skillName??`unknown`,agentId:t.agentId??``,timestamp:t.timestamp??a(),outcome:`executed`},...i.recentSkillEvents].slice(0,50)})},"skill:rejected":e=>{let t=e;o({recentSkillEvents:[{skillName:t.skillName??`unknown`,agentId:t.agentId??``,timestamp:t.timestamp??a(),outcome:`rejected`,reason:t.reason},...i.recentSkillEvents].slice(0,50)})}}))}async function g(e,n){try{let r=e.indexOf(`.`),i=r>0?e.slice(0,r):e,a=r>0?e.slice(r+1):void 0;return await t.call(`config.patch`,{section:i,key:a,value:n}),m.show(`Configuration updated`,`success`),!0}catch(e){let t=e instanceof Error?e.message:`Failed to update configuration`;return m.show(t,`error`),!1}}let _={hostConnected(){p(),_.tryLoad()},hostDisconnected(){l?.(),l=null,d!==null&&(c(d),d=null)},getSnapshot(){return i},tryLoad(){l?.(),t.status===`connected`?_.loadData():l=t.onStatusChange(e=>{e===`connected`&&!u&&_.loadData()})},async loadData(){o({loadState:`loading`,error:``});try{let e=await t.call(`config.read`),n=e.config?.agents,r=n?Object.keys(n):[],a=i.targetAgentId,s=r[0];a&&s&&!r.includes(a)&&(a=s);let c=e.config?.routing?.defaultAgentId??`default`,l=a&&r.includes(a)?n[a].skills??null:null;u=!0,o({agentIds:r,targetAgentId:a,defaultAgentId:c,skillsConfig:l,loadState:`loaded`}),a?t.call(`skills.list`,{agentId:a}).then(e=>{o({discoveredSkills:e.skills??[]})}).catch(()=>{o({discoveredSkills:[]})}):Promise.allSettled(r.map(e=>t.call(`skills.list`,{agentId:e}))).then(e=>{let t=new Map;for(let n of e)if(n.status===`fulfilled`)for(let e of n.value.skills??[]){let n=e.source===`local`?e.name:`${e.name}:${e.location}`;t.has(n)||t.set(n,e)}o({discoveredSkills:[...t.values()]})})}catch(e){o({error:e instanceof Error?e.message:`Failed to load skills configuration`,loadState:`error`})}},async refreshSkills(){try{o({discoveredSkills:(await t.call(`skills.list`,{agentId:i.targetAgentId})).skills??[]})}catch{}},async onToolToggle(e,t){await g(`agents.${i.targetAgentId}.skills`,{builtinTools:{[e]:t}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,builtinTools:{...i.skillsConfig.builtinTools,[e]:t}}})},async onPromptFieldChange(e,t){await g(`agents.${i.targetAgentId}.skills`,{promptSkills:{[e]:t}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,promptSkills:{...i.skillsConfig.promptSkills,[e]:t}}})},async addToList(e,t){if(!t.trim()||!i.skillsConfig)return;let n=[...i.skillsConfig.promptSkills[e]];if(n.includes(t.trim()))return;let r=[...n,t.trim()];await g(`agents.${i.targetAgentId}.skills`,{promptSkills:{[e]:r}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,promptSkills:{...i.skillsConfig.promptSkills,[e]:r}}})},async removeFromList(e,t){if(!i.skillsConfig)return;let n=i.skillsConfig.promptSkills[e].filter(e=>e!==t);await g(`agents.${i.targetAgentId}.skills`,{promptSkills:{[e]:n}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,promptSkills:{...i.skillsConfig.promptSkills,[e]:n}}})},async onAgentChange(e){o({targetAgentId:e,skillScope:`all`}),await _.loadData()},async handleFolderSelected(e){let n=e.files;if(!n||n.length===0)return;let r=n[0].webkitRelativePath.split(`/`)[0];if(!r){m.show(`Could not determine folder name`,`error`);return}o({isUploadingSkill:!0});try{let e=[];for(let t of Array.from(n)){let n=t.webkitRelativePath.split(`/`).slice(1).join(`/`);if(!n)continue;let r=await t.text();e.push({path:n,content:r})}if(e.length===0){m.show(`No files found in folder`,`error`);return}await t.call(`skills.upload`,{name:r,files:e,agentId:i.installScope===`agent`?i.installAgent:i.defaultAgentId,scope:i.installScope===`shared`?`shared`:`local`}),m.show(`Skill "${r}" uploaded`,`success`),await _.refreshSkills()}catch(e){m.show(`Failed to upload skill: ${e instanceof Error?e.message:`Unknown error`}`,`error`)}finally{o({isUploadingSkill:!1}),e.value=``}},async handleImportSkill(){let e=i.importUrl.trim();if(!(!e||i.isImportingSkill)){o({isImportingSkill:!0});try{let n=await t.call(`skills.import`,{url:e,agentId:i.installScope===`agent`?i.installAgent:i.defaultAgentId,scope:i.installScope===`shared`?`shared`:`local`});m.show(`Skill "${n.name}" imported (${n.fileCount} files)`,`success`),o({importUrl:``}),await _.refreshSkills()}catch(e){m.show(`Failed to import skill: ${e instanceof Error?e.message:`Unknown error`}`,`error`)}finally{o({isImportingSkill:!1})}}},handleDeleteSkill(e){i.deletingSkill||o({deletingSkill:e})},async confirmDeleteSkill(){if(!i.deletingSkill)return;let e=i.deletingSkill;try{let n=C(i.discoveredSkills.find(t=>t.name===e)?.location??``);await t.call(`skills.delete`,{name:e,agentId:n||i.defaultAgentId,scope:n?`local`:`shared`}),m.show(`Skill "${e}" deleted`,`success`),o({deletingSkill:null}),await _.refreshSkills()}catch(e){m.show(`Failed to delete skill: ${e instanceof Error?e.message:`Unknown error`}`,`error`),o({deletingSkill:null})}},cancelDeleteSkill(){o({deletingSkill:null})},async onProfileChange(e){i.skillsConfig&&await g(`agents.${i.targetAgentId}.skills`,{toolPolicy:{...i.skillsConfig.toolPolicy,profile:e}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,toolPolicy:{...i.skillsConfig.toolPolicy,profile:e}}})},async addPolicyItem(e,t){if(!t.trim()||!i.skillsConfig)return;let n=[...i.skillsConfig.toolPolicy[e]];if(n.includes(t.trim()))return;let r=[...n,t.trim()];await g(`agents.${i.targetAgentId}.skills`,{toolPolicy:{...i.skillsConfig.toolPolicy,[e]:r}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,toolPolicy:{...i.skillsConfig.toolPolicy,[e]:r}}})},async removePolicyItem(e,t){if(!i.skillsConfig)return;let n=i.skillsConfig.toolPolicy[e].filter(e=>e!==t);await g(`agents.${i.targetAgentId}.skills`,{toolPolicy:{...i.skillsConfig.toolPolicy,[e]:n}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,toolPolicy:{...i.skillsConfig.toolPolicy,[e]:n}}})},getResolvedTools(){if(!i.skillsConfig)return{included:[],denied:[]};let e=i.skillsConfig.toolPolicy,t=y[e.profile]??[],n=new Set([...t,...e.allow]),r=new Set(e.deny);return{included:[...n].filter(e=>!r.has(e)),denied:[...n].filter(e=>r.has(e))}},setActiveTab(e){o({activeTab:e})},setSearchQuery(e){o({searchQuery:e})},setSkillScope(e){o({skillScope:e})},setImportUrl(e){o({importUrl:e})},setInstallAgent(e){o({installAgent:e})},setInstallScope(e){o({installScope:e})},setNewAllowedSkill(e){o({newAllowedSkill:e})},setNewDeniedSkill(e){o({newDeniedSkill:e})},setNewPolicyAllow(e){o({newPolicyAllow:e})},setNewPolicyDeny(e){o({newPolicyDeny:e})}};return e.addController(_),_}var T=class extends r{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.eventDispatcher=null,this._controller=null}static{this.styles=[u,s,e`
1
+ import{S as e,_ as t,d as n,g as r,h as i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,y as p}from"./decorate-C2wzL86z.js";import{a as m,i as h}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-search-input-zfYWKjl4.js";import"./ic-empty-state-DIodMykW.js";import"./ic-tabs-BsjznKoe.js";var g={read:`Read file contents with line numbers and pagination`,write:`Write or overwrite files; auto-creates parent directories`,edit:`Surgical search-and-replace on files (exact text match)`,grep:`Regex search across files (ripgrep-based)`,find:`Find files by glob pattern (fd-based)`,ls:`List directory contents alphabetically`,exec:`Shell command execution with foreground/background modes`,process:`Background process management (list, kill, status, log)`,webSearch:`Multi-provider web search (Brave, DuckDuckGo, Perplexity, Grok, Tavily, Exa, Jina, SearXNG)`,webFetch:`Fetch and extract content from URLs (markdown, text, readability modes)`,browser:`Headless browser control (requires Playwright/Chromium)`},_={webSearch:[`freshness: pd (past day), pw (past week), pm (past month), py (past year), or YYYY-MM-DDtoYYYY-MM-DD`,`deepFetch: 0-5 - auto-fetch full page content for top N results`,`provider: override search provider per call`]},v=[{label:`File Operations`,tools:[`read`,`write`,`edit`,`find`,`ls`]},{label:`Execution`,tools:[`exec`,`process`]},{label:`Search`,tools:[`grep`]},{label:`Web`,tools:[`webSearch`,`webFetch`,`browser`]}],y={minimal:[`exec`],coding:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`],messaging:[`exec`,`webSearch`,`webFetch`],supervisor:[`read`,`write`,`edit`,`grep`,`find`,`ls`,`exec`,`process`,`webSearch`,`webFetch`],full:[...v.flatMap(e=>e.tools)]},b={memory_search:`Semantic hybrid search across memory and session transcripts`,memory_get:`Read specific memory file sections by path with line ranges`,memory_store:`Store facts, preferences, or context in long-term memory`,memory_manage:`Stats, browse, delete, flush, and export memory entries`,session_status:`View current session model, token usage, and duration`,sessions_list:`List active sessions filtered by kind and recency`,sessions_history:`View conversation history for a session with pagination`,sessions_send:`Send a message into another session (fire-and-forget, wait, or ping-pong)`,sessions_spawn:`Spawn a sub-agent session for background work (sync or async)`,sessions_manage:`Delete, reset, export, or compact session lifecycles`,agents_manage:`List, create, inspect, update, suspend/resume, and delete agents`,subagents:`List, kill, or steer running sub-agents`,message:`Send, reply, react, edit, delete, and fetch messages across all channels`,discord_action:`Pin/unpin, kick/ban, roles, threads, channels, bot presence`,telegram_action:`Pin/unpin, polls, stickers, chat info, ban/promote members`,slack_action:`Pin/unpin, topics, archive, create channels, invite/kick, bookmarks`,whatsapp_action:`Group info, participants, settings, invite codes, profile status`,image_analyze:`Analyze images using vision AI from files, URLs, or base64`,tts_synthesize:`Generate speech audio from text via configured TTS provider`,transcribe_audio:`Transcribe audio/voice attachments to text with language hints`,describe_video:`Generate text descriptions of video attachments`,extract_document:`Extract text from PDF, CSV, TXT, and other document formats`,cron:`Create, list, update, remove, and trigger scheduled jobs`,gateway:`Read/patch config, set secrets, restart, rollback, and status`,browser:`Headless browser: navigate, snapshot, screenshot, click, type, tabs`,obs_query:`Query diagnostics, billing, delivery traces, and channel activity`,models_manage:`List available models and test provider availability`,tokens_manage:`List, create, revoke, and rotate gateway auth tokens`,channels_manage:`List, enable, disable, and restart channel adapters`,skills_manage:`List, import from GitHub, and delete prompt skills`},x=[{label:`MEMORY`,tools:[`memory_search`,`memory_get`,`memory_store`,`memory_manage`]},{label:`SESSIONS`,tools:[`session_status`,`sessions_list`,`sessions_history`,`sessions_send`,`sessions_spawn`,`sessions_manage`]},{label:`AGENTS`,tools:[`agents_manage`,`subagents`]},{label:`MESSAGING`,tools:[`message`,`discord_action`,`telegram_action`,`slack_action`,`whatsapp_action`]},{label:`MEDIA`,tools:[`image_analyze`,`tts_synthesize`,`transcribe_audio`,`describe_video`,`extract_document`]},{label:`INFRASTRUCTURE`,tools:[`cron`,`gateway`,`browser`,`obs_query`]},{label:`FLEET MANAGEMENT`,tools:[`models_manage`,`tokens_manage`,`channels_manage`,`skills_manage`]}],S=[{id:`tools`,label:`Built-in Tools`},{id:`skills`,label:`Prompt Skills`}];function C(e){let t=e.match(/\/workspace-([^/]+)\/skills\//);return t?t[1]:/\/workspace\/skills\//.test(e)?`default`:``}function w(e,t,r){let i=Object.freeze({loadState:`loading`,error:``,activeTab:`tools`,skillsConfig:null,discoveredSkills:[],targetAgentId:``,agentIds:[],skillScope:`all`,defaultAgentId:`default`,searchQuery:``,importUrl:``,isImportingSkill:!1,isUploadingSkill:!1,deletingSkill:null,installAgent:``,installScope:`shared`,newAllowedSkill:``,newDeniedSkill:``,newPolicyAllow:``,newPolicyDeny:``,recentSkillEvents:[]});function o(t){i=Object.freeze({...i,...t}),e.requestUpdate()}let s=null,l=null,u=!1,d=null;function f(e=300){d!==null&&c(d),d=n(()=>{d=null,_.loadData()},e)}function p(){!r||s||(s=new h(e,r,{"skill:loaded":()=>{f()},"skill:registry_reset":()=>{f()},"agent:hot_added":()=>{f()},"agent:hot_removed":()=>{f()},"skill:executed":e=>{let t=e;o({recentSkillEvents:[{skillName:t.skillName??`unknown`,agentId:t.agentId??``,timestamp:t.timestamp??a(),outcome:`executed`},...i.recentSkillEvents].slice(0,50)})},"skill:rejected":e=>{let t=e;o({recentSkillEvents:[{skillName:t.skillName??`unknown`,agentId:t.agentId??``,timestamp:t.timestamp??a(),outcome:`rejected`,reason:t.reason},...i.recentSkillEvents].slice(0,50)})}}))}async function g(e,n){try{let r=e.indexOf(`.`),i=r>0?e.slice(0,r):e,a=r>0?e.slice(r+1):void 0;return await t.call(`config.patch`,{section:i,key:a,value:n}),m.show(`Configuration updated`,`success`),!0}catch(e){let t=e instanceof Error?e.message:`Failed to update configuration`;return m.show(t,`error`),!1}}let _={hostConnected(){p(),_.tryLoad()},hostDisconnected(){l?.(),l=null,d!==null&&(c(d),d=null)},getSnapshot(){return i},tryLoad(){l?.(),t.status===`connected`?_.loadData():l=t.onStatusChange(e=>{e===`connected`&&!u&&_.loadData()})},async loadData(){o({loadState:`loading`,error:``});try{let e=await t.call(`config.read`),n=e.config?.agents,r=n?Object.keys(n):[],a=i.targetAgentId,s=r[0];a&&s&&!r.includes(a)&&(a=s);let c=e.config?.routing?.defaultAgentId??`default`,l=a&&r.includes(a)?n[a].skills??null:null;u=!0,o({agentIds:r,targetAgentId:a,defaultAgentId:c,skillsConfig:l,loadState:`loaded`}),a?t.call(`skills.list`,{agentId:a}).then(e=>{o({discoveredSkills:e.skills??[]})}).catch(()=>{o({discoveredSkills:[]})}):Promise.allSettled(r.map(e=>t.call(`skills.list`,{agentId:e}))).then(e=>{let t=new Map;for(let n of e)if(n.status===`fulfilled`)for(let e of n.value.skills??[]){let n=e.source===`local`?e.name:`${e.name}:${e.location}`;t.has(n)||t.set(n,e)}o({discoveredSkills:[...t.values()]})})}catch(e){o({error:e instanceof Error?e.message:`Failed to load skills configuration`,loadState:`error`})}},async refreshSkills(){try{o({discoveredSkills:(await t.call(`skills.list`,{agentId:i.targetAgentId})).skills??[]})}catch{}},async onToolToggle(e,t){await g(`agents.${i.targetAgentId}.skills`,{builtinTools:{[e]:t}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,builtinTools:{...i.skillsConfig.builtinTools,[e]:t}}})},async onPromptFieldChange(e,t){await g(`agents.${i.targetAgentId}.skills`,{promptSkills:{[e]:t}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,promptSkills:{...i.skillsConfig.promptSkills,[e]:t}}})},async addToList(e,t){if(!t.trim()||!i.skillsConfig)return;let n=[...i.skillsConfig.promptSkills[e]];if(n.includes(t.trim()))return;let r=[...n,t.trim()];await g(`agents.${i.targetAgentId}.skills`,{promptSkills:{[e]:r}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,promptSkills:{...i.skillsConfig.promptSkills,[e]:r}}})},async removeFromList(e,t){if(!i.skillsConfig)return;let n=i.skillsConfig.promptSkills[e].filter(e=>e!==t);await g(`agents.${i.targetAgentId}.skills`,{promptSkills:{[e]:n}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,promptSkills:{...i.skillsConfig.promptSkills,[e]:n}}})},async onAgentChange(e){o({targetAgentId:e,skillScope:`all`}),await _.loadData()},async handleFolderSelected(e){let n=e.files;if(!n||n.length===0)return;let r=n[0].webkitRelativePath.split(`/`)[0];if(!r){m.show(`Could not determine folder name`,`error`);return}o({isUploadingSkill:!0});try{let e=[];for(let t of Array.from(n)){let n=t.webkitRelativePath.split(`/`).slice(1).join(`/`);if(!n)continue;let r=await t.text();e.push({path:n,content:r})}if(e.length===0){m.show(`No files found in folder`,`error`);return}await t.call(`skills.upload`,{name:r,files:e,agentId:i.installScope===`agent`?i.installAgent:i.defaultAgentId,scope:i.installScope===`shared`?`shared`:`local`}),m.show(`Skill "${r}" uploaded`,`success`),await _.refreshSkills()}catch(e){m.show(`Failed to upload skill: ${e instanceof Error?e.message:`Unknown error`}`,`error`)}finally{o({isUploadingSkill:!1}),e.value=``}},async handleImportSkill(){let e=i.importUrl.trim();if(!(!e||i.isImportingSkill)){o({isImportingSkill:!0});try{let n=await t.call(`skills.import`,{url:e,agentId:i.installScope===`agent`?i.installAgent:i.defaultAgentId,scope:i.installScope===`shared`?`shared`:`local`});m.show(`Skill "${n.name}" imported (${n.fileCount} files)`,`success`),o({importUrl:``}),await _.refreshSkills()}catch(e){m.show(`Failed to import skill: ${e instanceof Error?e.message:`Unknown error`}`,`error`)}finally{o({isImportingSkill:!1})}}},handleDeleteSkill(e){i.deletingSkill||o({deletingSkill:e})},async confirmDeleteSkill(){if(!i.deletingSkill)return;let e=i.deletingSkill;try{let n=C(i.discoveredSkills.find(t=>t.name===e)?.location??``);await t.call(`skills.delete`,{name:e,agentId:n||i.defaultAgentId,scope:n?`local`:`shared`}),m.show(`Skill "${e}" deleted`,`success`),o({deletingSkill:null}),await _.refreshSkills()}catch(e){m.show(`Failed to delete skill: ${e instanceof Error?e.message:`Unknown error`}`,`error`),o({deletingSkill:null})}},cancelDeleteSkill(){o({deletingSkill:null})},async onProfileChange(e){i.skillsConfig&&await g(`agents.${i.targetAgentId}.skills`,{toolPolicy:{...i.skillsConfig.toolPolicy,profile:e}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,toolPolicy:{...i.skillsConfig.toolPolicy,profile:e}}})},async addPolicyItem(e,t){if(!t.trim()||!i.skillsConfig)return;let n=[...i.skillsConfig.toolPolicy[e]];if(n.includes(t.trim()))return;let r=[...n,t.trim()];await g(`agents.${i.targetAgentId}.skills`,{toolPolicy:{...i.skillsConfig.toolPolicy,[e]:r}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,toolPolicy:{...i.skillsConfig.toolPolicy,[e]:r}}})},async removePolicyItem(e,t){if(!i.skillsConfig)return;let n=i.skillsConfig.toolPolicy[e].filter(e=>e!==t);await g(`agents.${i.targetAgentId}.skills`,{toolPolicy:{...i.skillsConfig.toolPolicy,[e]:n}})&&i.skillsConfig&&o({skillsConfig:{...i.skillsConfig,toolPolicy:{...i.skillsConfig.toolPolicy,[e]:n}}})},getResolvedTools(){if(!i.skillsConfig)return{included:[],denied:[]};let e=i.skillsConfig.toolPolicy,t=y[e.profile]??[],n=new Set([...t,...e.allow]),r=new Set(e.deny);return{included:[...n].filter(e=>!r.has(e)),denied:[...n].filter(e=>r.has(e))}},setActiveTab(e){o({activeTab:e})},setSearchQuery(e){o({searchQuery:e})},setSkillScope(e){o({skillScope:e})},setImportUrl(e){o({importUrl:e})},setInstallAgent(e){o({installAgent:e})},setInstallScope(e){o({installScope:e})},setNewAllowedSkill(e){o({newAllowedSkill:e})},setNewDeniedSkill(e){o({newDeniedSkill:e})},setNewPolicyAllow(e){o({newPolicyAllow:e})},setNewPolicyDeny(e){o({newPolicyDeny:e})}};return e.addController(_),_}var T=class extends r{constructor(...e){super(...e),this.apiClient=null,this.rpcClient=null,this.eventDispatcher=null,this._controller=null}static{this.styles=[u,s,e`
2
2
  :host { display: block; }
3
3
  .view-header { margin-bottom: var(--ic-space-lg); }
4
4
  .view-title { font-size: 1.125rem; font-weight: 600; }
@@ -1,4 +1,4 @@
1
- import{S as e,a as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,u as l,y as u}from"./decorate-C2wzL86z.js";import"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-empty-state-f_kVNpuc.js";var d=3e4,f=.25,p=.1,m=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._loadState=`loading`,this._snapshot=null,this._refreshInterval=null,this._rpcStatusUnsub=null}static{this.styles=[s,a,e`
1
+ import{S as e,a as t,g as n,h as r,m as i,n as a,p as o,r as s,t as c,u as l,y as u}from"./decorate-C2wzL86z.js";import"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-data-table-c9pQCH_h.js";import"./ic-empty-state-DIodMykW.js";var d=3e4,f=.25,p=.1,m=class extends n{constructor(...e){super(...e),this.rpcClient=null,this._loadState=`loading`,this._snapshot=null,this._refreshInterval=null,this._rpcStatusUnsub=null}static{this.styles=[s,a,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,o as s,p as c,r as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f,i as p}from"./index-dqPriKJN.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";var m=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._runs=[],this._confirmKillRunId=null,this._sse=null,this._reloadDebounce=null,this._rpcStatusUnsub=null}static{this.styles=[l,o,e`
1
+ import{S as e,_ as t,d as n,g as r,h as i,m as a,n as o,o as s,p as c,r as l,t as u,y as d}from"./decorate-C2wzL86z.js";import{a as f,i as p}from"./index-IIyLteKK.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";var m=class extends r{constructor(...e){super(...e),this.rpcClient=null,this.apiClient=null,this.eventDispatcher=null,this._loadState=`loading`,this._runs=[],this._confirmKillRunId=null,this._sse=null,this._reloadDebounce=null,this._rpcStatusUnsub=null}static{this.styles=[l,o,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,s as c,t as l,y as u}from"./decorate-C2wzL86z.js";import{a as d}from"./index-dqPriKJN.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-f_kVNpuc.js";var f=[`projects`,`scripts`,`documents`,`media`,`data`,`output`];function p(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var m=class extends n{constructor(...e){super(...e),this.rpcClient=null,this.agentId=``,this._status=null,this._loadState=`loading`,this._error=``,this._activeTab=`files`,this._selectedFile=null,this._selectedSubdir=null,this._fileContent=``,this._editedContent=``,this._dirEntries=[],this._saving=!1,this._dirty=!1,this._confirmAction=null,this._actionPending=!1,this._gitStatus=null,this._gitLog=[],this._gitDiff=``,this._gitDiffFile=null,this._commitMessage=``,this._committing=!1,this._restoreTarget=null}static{this.styles=[s,a,e`
1
+ import{S as e,_ as t,g as n,h as r,m as i,n as a,p as o,r as s,s as c,t as l,y as u}from"./decorate-C2wzL86z.js";import{a as d}from"./index-IIyLteKK.js";import"./ic-breadcrumb-CamOsLdw.js";import"./ic-tag-C5SwX7RT.js";import"./ic-confirm-dialog-JnoEg4kp.js";import"./ic-relative-time-DCCDywYC.js";import"./ic-empty-state-DIodMykW.js";var f=[`projects`,`scripts`,`documents`,`media`,`data`,`output`];function p(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var m=class extends n{constructor(...e){super(...e),this.rpcClient=null,this.agentId=``,this._status=null,this._loadState=`loading`,this._error=``,this._activeTab=`files`,this._selectedFile=null,this._selectedSubdir=null,this._fileContent=``,this._editedContent=``,this._dirEntries=[],this._saving=!1,this._dirty=!1,this._confirmAction=null,this._actionPending=!1,this._gitStatus=null,this._gitLog=[],this._gitDiff=``,this._gitDiffFile=null,this._commitMessage=``,this._committing=!1,this._restoreTarget=null}static{this.styles=[s,a,e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -8,7 +8,7 @@
8
8
  <link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
9
9
  <link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png" />
10
10
  <link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
11
- <script type="module" crossorigin src="/app/assets/index-dqPriKJN.js"></script>
11
+ <script type="module" crossorigin src="/app/assets/index-IIyLteKK.js"></script>
12
12
  <link rel="modulepreload" crossorigin href="/app/assets/decorate-C2wzL86z.js">
13
13
  <link rel="stylesheet" crossorigin href="/app/assets/index-HkMDWTbD.css">
14
14
  </head>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comis/web",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "Web dashboard SPA for Comis agent management",
5
5
  "author": "Moshe Anconina",
6
6
  "license": "Apache-2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comisai",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "author": "Moshe Anconina",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Security-first AI agent platform — connects AI agents to Discord, Telegram, Slack, WhatsApp, and more",
@@ -130,21 +130,21 @@
130
130
  "file-uri-to-path"
131
131
  ],
132
132
  "dependencies": {
133
- "@comis/shared": "1.0.44",
134
- "@comis/core": "1.0.44",
135
- "@comis/infra": "1.0.44",
136
- "@comis/memory": "1.0.44",
137
- "@comis/gateway": "1.0.44",
138
- "@comis/skills": "1.0.44",
139
- "@comis/scheduler": "1.0.44",
140
- "@comis/agent": "1.0.44",
141
- "@comis/channels": "1.0.44",
142
- "@comis/cli": "1.0.44",
143
- "@comis/daemon": "1.0.44",
144
- "@comis/orchestrator": "1.0.44",
145
- "@comis/observability": "1.0.44",
146
- "@comis/observability-otel": "1.0.44",
147
- "@comis/web": "1.0.44",
133
+ "@comis/shared": "1.0.45",
134
+ "@comis/core": "1.0.45",
135
+ "@comis/infra": "1.0.45",
136
+ "@comis/memory": "1.0.45",
137
+ "@comis/gateway": "1.0.45",
138
+ "@comis/skills": "1.0.45",
139
+ "@comis/scheduler": "1.0.45",
140
+ "@comis/agent": "1.0.45",
141
+ "@comis/channels": "1.0.45",
142
+ "@comis/cli": "1.0.45",
143
+ "@comis/daemon": "1.0.45",
144
+ "@comis/orchestrator": "1.0.45",
145
+ "@comis/observability": "1.0.45",
146
+ "@comis/observability-otel": "1.0.45",
147
+ "@comis/web": "1.0.45",
148
148
  "@agentclientprotocol/sdk": "0.22.1",
149
149
  "@clack/core": "1.4.2",
150
150
  "@clack/prompts": "1.5.1",