comisai 1.0.16 → 1.0.18

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 (90) hide show
  1. package/node_modules/@comis/agent/package.json +1 -1
  2. package/node_modules/@comis/channels/package.json +1 -1
  3. package/node_modules/@comis/cli/dist/wizard/non-interactive.js +1 -0
  4. package/node_modules/@comis/cli/dist/wizard/steps/01-detect-existing.js +2 -0
  5. package/node_modules/@comis/cli/dist/wizard/steps/07-gateway.js +9 -0
  6. package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +2 -0
  7. package/node_modules/@comis/cli/dist/wizard/steps/12-finish.js +5 -2
  8. package/node_modules/@comis/cli/dist/wizard/types.d.ts +1 -0
  9. package/node_modules/@comis/cli/package.json +1 -1
  10. package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +17 -2
  11. package/node_modules/@comis/core/dist/config/schema-gateway.js +11 -0
  12. package/node_modules/@comis/core/dist/config/schema.d.ts +60 -57
  13. package/node_modules/@comis/core/package.json +1 -1
  14. package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +34 -6
  15. package/node_modules/@comis/daemon/package.json +1 -1
  16. package/node_modules/@comis/gateway/package.json +1 -1
  17. package/node_modules/@comis/infra/package.json +1 -1
  18. package/node_modules/@comis/memory/package.json +1 -1
  19. package/node_modules/@comis/scheduler/package.json +1 -1
  20. package/node_modules/@comis/shared/package.json +1 -1
  21. package/node_modules/@comis/skills/package.json +1 -1
  22. package/node_modules/@comis/web/dist/android-chrome-192x192.png +0 -0
  23. package/node_modules/@comis/web/dist/android-chrome-512x512.png +0 -0
  24. package/node_modules/@comis/web/dist/apple-touch-icon.png +0 -0
  25. package/node_modules/@comis/web/dist/assets/agent-detail-BG9MGWWj.js +615 -0
  26. package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +2173 -0
  27. package/node_modules/@comis/web/dist/assets/agent-list-LHCJ4rw2.js +504 -0
  28. package/node_modules/@comis/web/dist/assets/approvals-q9VH_IKr.js +54 -0
  29. package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +375 -0
  30. package/node_modules/@comis/web/dist/assets/channel-detail-CaInesJM.js +681 -0
  31. package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +323 -0
  32. package/node_modules/@comis/web/dist/assets/chat-console-CNmzl0JW.js +943 -0
  33. package/node_modules/@comis/web/dist/assets/config-editor-DX4ITw6y.js +1374 -0
  34. package/node_modules/@comis/web/dist/assets/context-dag-browser-BwiaF5tf.js +393 -0
  35. package/node_modules/@comis/web/dist/assets/context-engine-BZ5Am6hA.js +393 -0
  36. package/node_modules/@comis/web/dist/assets/delivery-view-OfBZof-m.js +392 -0
  37. package/node_modules/@comis/web/dist/assets/diagnostics-view-YFwCxgr2.js +231 -0
  38. package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +1 -0
  39. package/node_modules/@comis/web/dist/assets/extract-variables-BM5qyK-s.js +149 -0
  40. package/node_modules/@comis/web/dist/assets/ic-array-editor-B7m6x7-S.js +118 -0
  41. package/node_modules/@comis/web/dist/assets/ic-breadcrumb-CUMpp3BL.js +75 -0
  42. package/node_modules/@comis/web/dist/assets/ic-budget-segment-bar-BtJ6x5mN.js +64 -0
  43. package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +352 -0
  44. package/node_modules/@comis/web/dist/assets/ic-confirm-dialog-CCDbB04e.js +110 -0
  45. package/node_modules/@comis/web/dist/assets/ic-connection-dot-CnT1b8xr.js +54 -0
  46. package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +277 -0
  47. package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +67 -0
  48. package/node_modules/@comis/web/dist/assets/ic-detail-panel-BF83r-if.js +116 -0
  49. package/node_modules/@comis/web/dist/assets/ic-empty-state-60l2ePhd.js +52 -0
  50. package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +359 -0
  51. package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +33 -0
  52. package/node_modules/@comis/web/dist/assets/ic-layer-waterfall-COvEYMg5.js +69 -0
  53. package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +12 -0
  54. package/node_modules/@comis/web/dist/assets/ic-search-input-CSOxY9g7.js +92 -0
  55. package/node_modules/@comis/web/dist/assets/ic-select-Ce-Raudx.js +127 -0
  56. package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +95 -0
  57. package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +33 -0
  58. package/node_modules/@comis/web/dist/assets/ic-time-range-picker-CypCT68y.js +93 -0
  59. package/node_modules/@comis/web/dist/assets/ic-tool-call-7MaXSsCW.js +146 -0
  60. package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +2830 -0
  61. package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +1 -0
  62. package/node_modules/@comis/web/dist/assets/mcp-management-BNZPnpDn.js +582 -0
  63. package/node_modules/@comis/web/dist/assets/media-config-BBvTYxOX.js +314 -0
  64. package/node_modules/@comis/web/dist/assets/media-test-BkK3RCRK.js +496 -0
  65. package/node_modules/@comis/web/dist/assets/memory-inspector-1hDGCGat.js +1139 -0
  66. package/node_modules/@comis/web/dist/assets/message-center-CXefwsUu.js +785 -0
  67. package/node_modules/@comis/web/dist/assets/models-C1qcU_j3.js +894 -0
  68. package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +1 -0
  69. package/node_modules/@comis/web/dist/assets/observe-view-C0VBhX4C.js +814 -0
  70. package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +1496 -0
  71. package/node_modules/@comis/web/dist/assets/pipeline-history-DkfOQ6SW.js +317 -0
  72. package/node_modules/@comis/web/dist/assets/pipeline-history-detail-hyHgD0ai.js +287 -0
  73. package/node_modules/@comis/web/dist/assets/pipeline-list-BPW8hV-q.js +518 -0
  74. package/node_modules/@comis/web/dist/assets/pipeline-monitor-Bip16T7e.js +972 -0
  75. package/node_modules/@comis/web/dist/assets/scheduler-BGgwKd06.js +1182 -0
  76. package/node_modules/@comis/web/dist/assets/security-D15st4xx.js +1224 -0
  77. package/node_modules/@comis/web/dist/assets/session-detail-SGEYNJ0M.js +632 -0
  78. package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +1 -0
  79. package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +231 -0
  80. package/node_modules/@comis/web/dist/assets/setup-wizard-nT0tz9QP.js +853 -0
  81. package/node_modules/@comis/web/dist/assets/skills-D8yVfSUy.js +1051 -0
  82. package/node_modules/@comis/web/dist/assets/subagents-HHXMeHYo.js +193 -0
  83. package/node_modules/@comis/web/dist/assets/workspace-manager-BQlr10iH.js +785 -0
  84. package/node_modules/@comis/web/dist/comis-logo.png +0 -0
  85. package/node_modules/@comis/web/dist/favicon-16x16.png +0 -0
  86. package/node_modules/@comis/web/dist/favicon-32x32.png +0 -0
  87. package/node_modules/@comis/web/dist/favicon.ico +0 -0
  88. package/node_modules/@comis/web/dist/index.html +17 -0
  89. package/node_modules/@comis/web/package.json +29 -0
  90. package/package.json +15 -13
@@ -0,0 +1,504 @@
1
+ import{a as v,S as f,b as a,I as p,A as u,s as _,f as w,i as z,n as g,r as l,t as y}from"./index-CEcM1R_C.js";import"./ic-data-table-CKUNTxHw.js";import"./ic-tag-CPPUnDLF.js";import"./ic-search-input-CSOxY9g7.js";import"./ic-confirm-dialog-CCDbB04e.js";import"./ic-empty-state-60l2ePhd.js";import"./ic-icon-xeGTVhVG.js";var x=Object.defineProperty,$=Object.getOwnPropertyDescriptor,n=(e,t,o,i)=>{for(var r=i>1?void 0:i?$(t,o):t,d=e.length-1,c;d>=0;d--)(c=e[d])&&(r=(i?c(t,o,r):c(r))||r);return i&&r&&x(t,o,r),r};const C={active:"success",idle:"info",suspended:"warning",error:"error"},k={active:"Active",idle:"Idle",suspended:"Suspended",error:"Error"},S=[{value:"active",label:"Active",color:"var(--ic-success)"},{value:"idle",label:"Idle",color:"var(--ic-info)"},{value:"suspended",label:"Suspended",color:"var(--ic-warning)"},{value:"error",label:"Error",color:"var(--ic-error)"}],A=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),T={minimal:"Read and write only. Safest option for restricted environments.",coding:"Common tools including web, memory, and file operations.",messaging:"Optimized for chat and messaging workflows.",supervisor:"Extended tools for agent orchestration and oversight.",full:"All available tools. Best for autonomous agents with broad capabilities."};let s=class extends v{constructor(){super(...arguments),this.apiClient=null,this.rpcClient=null,this.eventDispatcher=null,this._sse=null,this._reloadDebounce=null,this._agents=[],this._loadState="loading",this._error="",this._deleteTarget=null,this._actionPending="",this._searchQuery="",this._statusFilters=new Set,this._wizardOpen=!1,this._wizardStep=1,this._wizardError="",this._wizardCreating=!1,this._wizardAgentId="",this._wizardAgentName="",this._wizardProvider="anthropic",this._wizardModel="",this._wizardToolProfile="full",this._catalogProviders=[]}connectedCallback(){super.connectedCallback(),this._initSse(),this.rpcClient&&this._loadModelCatalog()}updated(e){e.has("apiClient")&&this.apiClient&&this._loadAgents(),e.has("rpcClient")&&this.rpcClient&&this._catalogProviders.length===0&&this._loadModelCatalog(),e.has("eventDispatcher")&&this.eventDispatcher&&!this._sse&&this._initSse()}disconnectedCallback(){super.disconnectedCallback(),this._reloadDebounce!==null&&(clearTimeout(this._reloadDebounce),this._reloadDebounce=null)}_initSse(){!this.eventDispatcher||this._sse||(this._sse=new f(this,this.eventDispatcher,{"observability:token_usage":()=>{this._scheduleReload()},"agent:hot_added":()=>{this._scheduleReload()},"agent:hot_removed":()=>{this._scheduleReload()}}))}_scheduleReload(e=300){this._reloadDebounce!==null&&clearTimeout(this._reloadDebounce),this._reloadDebounce=setTimeout(()=>{this._reloadDebounce=null,this._loadAgents()},e)}async _loadModelCatalog(){if(this.rpcClient)try{const e=await this.rpcClient.call("models.list");e.providers&&(this._catalogProviders=e.providers)}catch{}}_budgetColor(e){return e>=90?"var(--ic-error)":e>=70?"var(--ic-warning)":"var(--ic-success)"}_getColumns(){return[{key:"status",label:"Status",sortable:!0,width:"100px",render:(e,t)=>{const o=C[t.status]??"default",i=k[t.status]??t.status;return a`<ic-tag variant=${o}>${i}</ic-tag>`}},{key:"name",label:"Name",sortable:!0,render:(e,t)=>a`<span>${t.name??t.id}</span>`},{key:"model",label:"Model",sortable:!0,render:(e,t)=>a`<span style="font-family: ui-monospace, monospace; font-size: 0.8125rem; white-space: nowrap;">${t.model}</span>`},{key:"messagesToday",label:"Messages",sortable:!0,render:e=>a`<span style="font-family: ui-monospace, monospace; text-align: right; width: 100%; display: block;">${new Intl.NumberFormat("en-US").format(e)}</span>`},{key:"costToday",label:"Cost",sortable:!0,render:e=>{const t=e;return a`<span style="font-family: ui-monospace, monospace; text-align: right; width: 100%; display: block;">${t>0?A.format(t):"--"}</span>`}},{key:"budgetUtilization",label:"Budget",sortable:!0,render:e=>{const t=Math.min(100,Math.max(0,e));return t===0?a`<span style="font-family: ui-monospace, monospace; text-align: right; width: 100%; display: block;">--</span>`:a`
2
+ <div style="display: flex; align-items: center; gap: 6px; width: 100%;">
3
+ <div style="flex: 1; height: 4px; background: var(--ic-surface-2, #1f2937); border-radius: 2px; overflow: hidden;">
4
+ <div style="height: 100%; border-radius: 2px; width: ${t}%; background: ${this._budgetColor(t)};"></div>
5
+ </div>
6
+ <span style="font-size: 0.75rem; font-family: ui-monospace, monospace; color: var(--ic-text-muted); min-width: 2.5rem; text-align: right;">${t}%</span>
7
+ </div>
8
+ `}},{key:"_actions",label:"Actions",sortable:!1,render:(e,t)=>{const o=t.suspended||t.status==="suspended",i=o?"play":"pause",r=o?"Resume agent":"Suspend agent",d="display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 0.25rem; color: #9ca3af; cursor: pointer;";return a`
9
+ <div style="display: flex; gap: 4px; justify-content: flex-end;">
10
+ <button style=${d} aria-label="Configure ${t.id}" @click=${c=>{c.stopPropagation(),this._navigate(`agents/${t.id}/edit`)}}>
11
+ <ic-icon name="settings" size="16px" color="#9ca3af"></ic-icon>
12
+ </button>
13
+ <button style=${d} aria-label=${r} @click=${c=>{c.stopPropagation(),this._handleSuspendResume(t,c)}}>
14
+ <ic-icon name=${i} size="16px" color="#9ca3af"></ic-icon>
15
+ </button>
16
+ <button style=${d} aria-label="Delete ${t.id}" @click=${c=>{c.stopPropagation(),this._handleDeleteClick(t,c)}}>
17
+ <ic-icon name="trash" size="16px" color="#f87171"></ic-icon>
18
+ </button>
19
+ </div>
20
+ `}}]}async _loadAgents(){if(this.apiClient){this._loadState="loading",this._error="";try{const e=await this.apiClient.getAgents();this._agents=e.map(t=>({...t,costToday:0,budgetUtilization:0,suspended:t.status==="suspended",messagesToday:t.messagesToday??0})),this._loadState="loaded",this._enrichAgents(e).then(t=>{this._agents=t}).catch(()=>{})}catch(e){this._error=e instanceof Error?e.message:"Failed to load agents",this._loadState="error"}}}async _enrichAgents(e){if(!this.rpcClient||e.length===0)return e.map(r=>({...r,costToday:0,budgetUtilization:0,suspended:r.status==="suspended",messagesToday:r.messagesToday??0}));const t=e.slice(0,50),o=await Promise.allSettled(t.map(r=>this.rpcClient.call("obs.billing.byAgent",{agentId:r.id}))),i=new Map;for(let r=0;r<t.length;r++){const d=o[r];d.status==="fulfilled"&&d.value&&i.set(t[r].id,d.value)}return e.map(r=>{const d=i.get(r.id);let c=0;const h=d?.budgetUsed;h?.perDay?.used!==void 0&&h.perDay.limit&&(c=Math.round(h.perDay.used/h.perDay.limit*100));const m=Number(d?.costToday??d?.totalCost??0),b=Number(d?.messagesToday??r.messagesToday??0);return{...r,costToday:m,budgetUtilization:c,suspended:r.status==="suspended",messagesToday:b}})}_getFilteredAgents(){let e=this._agents;if(this._searchQuery){const t=this._searchQuery.toLowerCase();e=e.filter(o=>o.id.toLowerCase().includes(t)||(o.name??"").toLowerCase().includes(t))}return this._statusFilters.size>0&&(e=e.filter(t=>this._statusFilters.has(t.status))),e}_navigate(e){this.dispatchEvent(new CustomEvent("navigate",{detail:e,bubbles:!0,composed:!0}))}_handleSearch(e){this._searchQuery=e.detail}_handleFilterChange(e){this._statusFilters=e.detail.selected}async _handleSuspendResume(e,t){if(t.stopPropagation(),!this.rpcClient||this._actionPending)return;this._actionPending=e.id;const o=e.suspended||e.status==="suspended",i=o?"agents.resume":"agents.suspend",r=o?"resumed":"suspended";try{await this.rpcClient.call(i,{agentId:e.id}),p.show(`Agent ${e.id} ${r}`,"success"),await this._loadAgents()}catch(d){p.show(`Failed to ${o?"resume":"suspend"} agent: ${d instanceof Error?d.message:"Unknown error"}`,"error")}finally{this._actionPending=""}}_handleDeleteClick(e,t){t.stopPropagation(),this._deleteTarget=e}async _confirmDelete(){if(!this.rpcClient||!this._deleteTarget)return;const e=this._deleteTarget.id;this._deleteTarget=null;try{await this.rpcClient.call("agents.delete",{agentId:e}),p.show(`Agent ${e} deleted`,"success"),await this._loadAgents()}catch(t){p.show(`Failed to delete agent: ${t instanceof Error?t.message:"Unknown error"}`,"error")}}_cancelDelete(){this._deleteTarget=null}_openWizard(){this._wizardOpen=!0,this._wizardStep=1,this._wizardError="",this._wizardCreating=!1,this._wizardAgentId="",this._wizardAgentName="",this._wizardProvider="anthropic",this._wizardModel="",this._wizardToolProfile="full",this._catalogProviders.length===0&&this._loadModelCatalog(),this.updateComplete.then(()=>{this.shadowRoot?.querySelector(".wizard-dialog")?.showModal()})}_closeWizard(){this.shadowRoot?.querySelector(".wizard-dialog")?.close(),this._wizardOpen=!1}_wizardNext(){if(this._wizardStep===1){if(!this._wizardAgentId.match(/^[a-zA-Z0-9-]{3,50}$/)){this._wizardError="Agent ID must be 3-50 characters (letters, numbers, hyphens).";return}this._wizardError="",this._wizardStep=2}else if(this._wizardStep===2){if(!this._wizardModel.trim()){this._wizardError="Please select a model.";return}this._wizardError="",this._wizardStep=3}}_wizardBack(){this._wizardError="",this._wizardStep===2?this._wizardStep=1:this._wizardStep===3&&(this._wizardStep=2)}async _wizardCreate(){if(!(!this.rpcClient||this._wizardCreating)){this._wizardCreating=!0,this._wizardError="";try{await this.rpcClient.call("agents.create",{agentId:this._wizardAgentId,config:{name:this._wizardAgentName||void 0,provider:this._wizardProvider,model:this._wizardModel,skills:{toolPolicy:{profile:this._wizardToolProfile}}}}),p.show(`Agent ${this._wizardAgentId} created`,"success"),this._closeWizard(),this._navigate(`agents/${this._wizardAgentId}/edit`),await this._loadAgents()}catch(e){this._wizardError=e instanceof Error?e.message:"Failed to create agent"}finally{this._wizardCreating=!1}}}render(){return a`
21
+ <div class="page-header" role="region" aria-label="Agents">
22
+ <h1 class="page-title">Agents</h1>
23
+ <button class="create-btn" @click=${this._openWizard}>
24
+ <ic-icon name="plus" size="16px"></ic-icon>
25
+ Create Agent
26
+ </button>
27
+ </div>
28
+ ${this._renderContent()}
29
+ ${this._deleteTarget?a`
30
+ <ic-confirm-dialog
31
+ open
32
+ variant="danger"
33
+ title="Delete Agent"
34
+ message=${`Are you sure you want to delete agent ${this._deleteTarget.id}? This cannot be undone.`}
35
+ confirmLabel="Delete"
36
+ @confirm=${this._confirmDelete}
37
+ @cancel=${this._cancelDelete}
38
+ ></ic-confirm-dialog>
39
+ `:u}
40
+ ${this._wizardOpen?this._renderWizard():u}
41
+ `}_renderContent(){switch(this._loadState){case"loading":return a`<ic-skeleton-view variant="list"></ic-skeleton-view>`;case"error":return a`
42
+ <div class="error-container">
43
+ <div class="error-message">${this._error}</div>
44
+ <button class="retry-btn" @click=${()=>this._loadAgents()}>Retry</button>
45
+ </div>
46
+ `;case"loaded":return this._agents.length===0?a`
47
+ <ic-empty-state
48
+ icon="users"
49
+ message="No agents configured"
50
+ description="Create your first agent to start processing messages."
51
+ >
52
+ <button class="create-btn" @click=${this._openWizard}>
53
+ <ic-icon name="plus" size="16px"></ic-icon>
54
+ Create Agent
55
+ </button>
56
+ </ic-empty-state>
57
+ `:this._renderTable()}}_renderTable(){const e=this._getFilteredAgents(),t=this._getColumns();return a`
58
+ <div class="toolbar">
59
+ <ic-search-input
60
+ placeholder="Search agents..."
61
+ @search=${this._handleSearch}
62
+ ></ic-search-input>
63
+ <ic-filter-chips
64
+ .options=${S}
65
+ .selected=${this._statusFilters}
66
+ @filter-change=${this._handleFilterChange}
67
+ ></ic-filter-chips>
68
+ </div>
69
+ <ic-data-table
70
+ .columns=${t}
71
+ .rows=${e}
72
+ emptyMessage="No agents match your filters"
73
+ @row-click=${o=>{this._navigate(`agents/${o.detail.id}`)}}
74
+ ></ic-data-table>
75
+ `}_renderWizard(){return a`
76
+ <dialog class="wizard-dialog" @close=${this._closeWizard}>
77
+ <div class="wizard-content">
78
+ <div class="wizard-header">
79
+ <h2 class="wizard-title">Create Agent</h2>
80
+ <button class="wizard-close" @click=${this._closeWizard}>\u2715</button>
81
+ </div>
82
+
83
+ <div class="wizard-steps">
84
+ ${[1,2,3].map(e=>a`
85
+ <span
86
+ class="step-dot ${e===this._wizardStep?"step-dot--active":""} ${e<this._wizardStep?"step-dot--done":""}"
87
+ ></span>
88
+ `)}
89
+ <span class="step-label">Step ${this._wizardStep} of 3</span>
90
+ </div>
91
+
92
+ ${this._wizardError?a`<div class="wizard-error">${this._wizardError}</div>`:u}
93
+
94
+ ${this._renderWizardStep()}
95
+
96
+ <div class="wizard-footer">
97
+ ${this._wizardStep>1?a`<button class="wizard-btn wizard-btn--secondary" @click=${this._wizardBack}>Back</button>`:a`<button class="wizard-btn wizard-btn--secondary" @click=${this._closeWizard}>Cancel</button>`}
98
+ ${this._wizardStep<3?a`<button class="wizard-btn wizard-btn--primary" @click=${this._wizardNext}>Next</button>`:a`<button
99
+ class="wizard-btn wizard-btn--primary"
100
+ ?disabled=${this._wizardCreating}
101
+ @click=${this._wizardCreate}
102
+ >${this._wizardCreating?"Creating...":"Create Agent"}</button>`}
103
+ </div>
104
+ </div>
105
+ </dialog>
106
+ `}_renderWizardStep(){switch(this._wizardStep){case 1:return a`
107
+ <div class="wizard-field">
108
+ <label for="wizard-id">Agent ID</label>
109
+ <input
110
+ id="wizard-id"
111
+ type="text"
112
+ .value=${this._wizardAgentId}
113
+ @input=${e=>{this._wizardAgentId=e.target.value}}
114
+ placeholder="my-agent"
115
+ required
116
+ />
117
+ <div class="hint">3-50 characters. Letters, numbers, and hyphens only.</div>
118
+ </div>
119
+ <div class="wizard-field">
120
+ <label for="wizard-name">Display Name</label>
121
+ <input
122
+ id="wizard-name"
123
+ type="text"
124
+ .value=${this._wizardAgentName}
125
+ @input=${e=>{this._wizardAgentName=e.target.value}}
126
+ placeholder="My Agent (optional)"
127
+ />
128
+ </div>
129
+ `;case 2:{const e=this._catalogProviders.length>0?this._catalogProviders.map(i=>({value:i.name,label:i.name.charAt(0).toUpperCase()+i.name.slice(1)})):[{value:"anthropic",label:"Anthropic"}],o=(this._catalogProviders.find(i=>i.name===this._wizardProvider)?.models??[]).map(i=>({id:i.modelId,label:i.displayName||i.modelId}));return a`
130
+ <div class="wizard-field">
131
+ <label for="wizard-provider">Provider</label>
132
+ <select
133
+ id="wizard-provider"
134
+ .value=${this._wizardProvider}
135
+ @change=${i=>{this._wizardProvider=i.target.value,this._wizardModel=""}}
136
+ >
137
+ ${e.map(i=>a`<option value=${i.value} ?selected=${i.value===this._wizardProvider}>${i.label}</option>`)}
138
+ </select>
139
+ </div>
140
+ <div class="wizard-field">
141
+ <label for="wizard-model">Model</label>
142
+ <select
143
+ id="wizard-model"
144
+ .value=${this._wizardModel}
145
+ @change=${i=>{this._wizardModel=i.target.value}}
146
+ required
147
+ >
148
+ <option value="" disabled ?selected=${!this._wizardModel}>Select a model...</option>
149
+ ${o.map(i=>a`<option value=${i.id} ?selected=${this._wizardModel===i.id}>${i.label}</option>`)}
150
+ </select>
151
+ <div class="hint">Model to use for this agent.</div>
152
+ </div>
153
+ `}case 3:return a`
154
+ <div class="wizard-field">
155
+ <label for="wizard-tools">Tool Policy Profile</label>
156
+ <select
157
+ id="wizard-tools"
158
+ .value=${this._wizardToolProfile}
159
+ @change=${e=>{this._wizardToolProfile=e.target.value}}
160
+ >
161
+ <option value="minimal">Minimal</option>
162
+ <option value="coding">Coding</option>
163
+ <option value="messaging">Messaging</option>
164
+ <option value="supervisor">Supervisor</option>
165
+ <option value="full">Full</option>
166
+ </select>
167
+ <div class="profile-desc">${T[this._wizardToolProfile]??""}</div>
168
+ </div>
169
+ `}}};s.styles=[_,w,z`
170
+ :host {
171
+ display: block;
172
+ }
173
+
174
+ .page-header {
175
+ display: flex;
176
+ justify-content: space-between;
177
+ align-items: center;
178
+ margin-bottom: var(--ic-space-lg, 1.5rem);
179
+ }
180
+
181
+ .page-title {
182
+ font-size: var(--ic-text-2xl, 1.5rem);
183
+ font-weight: 700;
184
+ margin: 0;
185
+ }
186
+
187
+ .create-btn {
188
+ display: inline-flex;
189
+ align-items: center;
190
+ gap: var(--ic-space-xs, 0.25rem);
191
+ padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
192
+ background: var(--ic-accent, #3b82f6);
193
+ color: #fff;
194
+ border: none;
195
+ border-radius: var(--ic-radius-md, 0.5rem);
196
+ font-size: var(--ic-text-sm, 0.875rem);
197
+ font-weight: 500;
198
+ font-family: inherit;
199
+ cursor: pointer;
200
+ transition: background var(--ic-transition, 150ms ease);
201
+ }
202
+
203
+ .create-btn:hover {
204
+ background: var(--ic-accent-hover, #2563eb);
205
+ }
206
+
207
+ .toolbar {
208
+ display: flex;
209
+ align-items: center;
210
+ gap: var(--ic-space-md, 0.75rem);
211
+ margin-bottom: var(--ic-space-md, 0.75rem);
212
+ flex-wrap: wrap;
213
+ }
214
+
215
+ .toolbar ic-search-input {
216
+ flex: 1;
217
+ min-width: 200px;
218
+ max-width: 320px;
219
+ }
220
+
221
+ .toolbar ic-filter-chips {
222
+ flex-shrink: 0;
223
+ }
224
+
225
+ /* Action buttons inside data table cells */
226
+ .row-actions {
227
+ display: flex;
228
+ gap: 4px;
229
+ justify-content: flex-end;
230
+ }
231
+
232
+ .action-btn {
233
+ display: inline-flex;
234
+ align-items: center;
235
+ justify-content: center;
236
+ width: 32px;
237
+ height: 32px;
238
+ padding: 0;
239
+ background: transparent;
240
+ border: 1px solid transparent;
241
+ border-radius: var(--ic-radius-sm, 0.25rem);
242
+ color: var(--ic-text-dim, #6b7280);
243
+ cursor: pointer;
244
+ transition: background var(--ic-transition, 150ms ease),
245
+ color var(--ic-transition, 150ms ease),
246
+ border-color var(--ic-transition, 150ms ease);
247
+ }
248
+
249
+ .action-btn:hover {
250
+ background: var(--ic-surface-2, #1f2937);
251
+ color: var(--ic-text, #f3f4f6);
252
+ border-color: var(--ic-border, #374151);
253
+ }
254
+
255
+ .action-btn--danger:hover {
256
+ color: var(--ic-error, #f87171);
257
+ border-color: var(--ic-error, #f87171);
258
+ }
259
+
260
+ .budget-inline {
261
+ display: flex;
262
+ align-items: center;
263
+ gap: 6px;
264
+ width: 100%;
265
+ }
266
+
267
+ .budget-track {
268
+ flex: 1;
269
+ height: 4px;
270
+ background: var(--ic-surface-2, #1f2937);
271
+ border-radius: 2px;
272
+ overflow: hidden;
273
+ }
274
+
275
+ .budget-fill {
276
+ height: 100%;
277
+ border-radius: 2px;
278
+ }
279
+
280
+ .budget-pct {
281
+ font-size: 0.75rem;
282
+ font-family: ui-monospace, monospace;
283
+ color: var(--ic-text-muted);
284
+ min-width: 2.5rem;
285
+ text-align: right;
286
+ }
287
+
288
+ .cost-cell {
289
+ font-family: ui-monospace, monospace;
290
+ text-align: right;
291
+ width: 100%;
292
+ display: block;
293
+ }
294
+
295
+ .numeric-cell {
296
+ font-family: ui-monospace, monospace;
297
+ text-align: right;
298
+ width: 100%;
299
+ display: block;
300
+ }
301
+
302
+ .model-cell {
303
+ font-family: ui-monospace, monospace;
304
+ font-size: 0.8125rem;
305
+ }
306
+
307
+ /* Error state */
308
+ .error-container {
309
+ text-align: center;
310
+ padding: var(--ic-space-2xl, 3rem);
311
+ color: var(--ic-text-muted, #9ca3af);
312
+ }
313
+
314
+ .error-message {
315
+ margin-bottom: var(--ic-space-md, 0.75rem);
316
+ color: var(--ic-error, #f87171);
317
+ }
318
+
319
+ .retry-btn {
320
+ padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
321
+ background: transparent;
322
+ border: 1px solid var(--ic-border, #374151);
323
+ border-radius: var(--ic-radius-md, 0.5rem);
324
+ color: var(--ic-text, #f3f4f6);
325
+ font-size: var(--ic-text-sm, 0.875rem);
326
+ font-family: inherit;
327
+ cursor: pointer;
328
+ }
329
+
330
+ .retry-btn:hover {
331
+ border-color: var(--ic-accent, #3b82f6);
332
+ color: var(--ic-accent, #3b82f6);
333
+ }
334
+
335
+ /* ---- Wizard Modal ---- */
336
+ .wizard-dialog {
337
+ background: var(--ic-surface);
338
+ border: 1px solid var(--ic-border);
339
+ border-radius: var(--ic-radius-lg, 0.75rem);
340
+ max-width: 32rem;
341
+ width: calc(100% - 2rem);
342
+ padding: 0;
343
+ color: var(--ic-text);
344
+ box-shadow: var(--ic-shadow-lg);
345
+ }
346
+
347
+ .wizard-dialog::backdrop {
348
+ background: rgba(0, 0, 0, 0.6);
349
+ }
350
+
351
+ .wizard-content {
352
+ padding: var(--ic-space-lg, 1.5rem);
353
+ }
354
+
355
+ .wizard-header {
356
+ display: flex;
357
+ align-items: center;
358
+ justify-content: space-between;
359
+ margin-bottom: var(--ic-space-lg, 1.5rem);
360
+ }
361
+
362
+ .wizard-title {
363
+ font-size: var(--ic-text-lg, 1.125rem);
364
+ font-weight: 600;
365
+ margin: 0;
366
+ }
367
+
368
+ .wizard-close {
369
+ background: none;
370
+ border: none;
371
+ color: var(--ic-text-dim);
372
+ cursor: pointer;
373
+ font-size: 1.25rem;
374
+ padding: 4px;
375
+ line-height: 1;
376
+ }
377
+
378
+ .wizard-close:hover {
379
+ color: var(--ic-text);
380
+ }
381
+
382
+ .wizard-steps {
383
+ display: flex;
384
+ align-items: center;
385
+ justify-content: center;
386
+ gap: 0.5rem;
387
+ margin-bottom: var(--ic-space-lg, 1.5rem);
388
+ }
389
+
390
+ .step-dot {
391
+ width: 8px;
392
+ height: 8px;
393
+ border-radius: 50%;
394
+ background: var(--ic-border);
395
+ transition: background 0.15s;
396
+ }
397
+
398
+ .step-dot--active {
399
+ background: var(--ic-accent);
400
+ }
401
+
402
+ .step-dot--done {
403
+ background: var(--ic-success);
404
+ }
405
+
406
+ .step-label {
407
+ font-size: var(--ic-text-xs, 0.75rem);
408
+ color: var(--ic-text-dim);
409
+ }
410
+
411
+ .wizard-field {
412
+ margin-bottom: var(--ic-space-md, 0.75rem);
413
+ }
414
+
415
+ .wizard-field label {
416
+ display: block;
417
+ font-size: var(--ic-text-sm, 0.875rem);
418
+ font-weight: 500;
419
+ color: var(--ic-text-muted);
420
+ margin-bottom: 0.375rem;
421
+ }
422
+
423
+ .wizard-field input,
424
+ .wizard-field select {
425
+ width: 100%;
426
+ background: var(--ic-surface-2);
427
+ border: 1px solid var(--ic-border);
428
+ border-radius: var(--ic-radius-md, 0.5rem);
429
+ color: var(--ic-text);
430
+ font-family: inherit;
431
+ font-size: var(--ic-text-sm, 0.875rem);
432
+ padding: var(--ic-space-sm, 0.5rem);
433
+ }
434
+
435
+ .wizard-field input:focus,
436
+ .wizard-field select:focus {
437
+ outline: none;
438
+ border-color: var(--ic-accent);
439
+ }
440
+
441
+ .wizard-field .hint {
442
+ font-size: var(--ic-text-xs, 0.75rem);
443
+ color: var(--ic-text-dim);
444
+ margin-top: 0.25rem;
445
+ }
446
+
447
+ .wizard-field .profile-desc {
448
+ font-size: var(--ic-text-xs, 0.75rem);
449
+ color: var(--ic-text-dim);
450
+ margin-top: 0.375rem;
451
+ padding: 0.5rem;
452
+ background: var(--ic-bg);
453
+ border-radius: var(--ic-radius-sm, 0.25rem);
454
+ }
455
+
456
+ .wizard-error {
457
+ font-size: var(--ic-text-sm, 0.875rem);
458
+ color: var(--ic-error);
459
+ margin-bottom: var(--ic-space-md, 0.75rem);
460
+ }
461
+
462
+ .wizard-footer {
463
+ display: flex;
464
+ justify-content: flex-end;
465
+ gap: var(--ic-space-sm, 0.5rem);
466
+ padding-top: var(--ic-space-md, 0.75rem);
467
+ border-top: 1px solid var(--ic-border);
468
+ }
469
+
470
+ .wizard-btn {
471
+ padding: var(--ic-space-sm, 0.5rem) var(--ic-space-md, 0.75rem);
472
+ border-radius: var(--ic-radius-md, 0.5rem);
473
+ font-size: var(--ic-text-sm, 0.875rem);
474
+ font-family: inherit;
475
+ cursor: pointer;
476
+ transition: background 0.15s, border-color 0.15s;
477
+ }
478
+
479
+ .wizard-btn--secondary {
480
+ background: transparent;
481
+ border: 1px solid var(--ic-border);
482
+ color: var(--ic-text-muted);
483
+ }
484
+
485
+ .wizard-btn--secondary:hover {
486
+ border-color: var(--ic-text-dim);
487
+ color: var(--ic-text);
488
+ }
489
+
490
+ .wizard-btn--primary {
491
+ background: var(--ic-accent);
492
+ border: 1px solid var(--ic-accent);
493
+ color: #fff;
494
+ }
495
+
496
+ .wizard-btn--primary:hover {
497
+ background: var(--ic-accent-hover);
498
+ }
499
+
500
+ .wizard-btn:disabled {
501
+ opacity: 0.5;
502
+ cursor: not-allowed;
503
+ }
504
+ `];n([g({attribute:!1})],s.prototype,"apiClient",2);n([g({attribute:!1})],s.prototype,"rpcClient",2);n([g({attribute:!1})],s.prototype,"eventDispatcher",2);n([l()],s.prototype,"_agents",2);n([l()],s.prototype,"_loadState",2);n([l()],s.prototype,"_error",2);n([l()],s.prototype,"_deleteTarget",2);n([l()],s.prototype,"_actionPending",2);n([l()],s.prototype,"_searchQuery",2);n([l()],s.prototype,"_statusFilters",2);n([l()],s.prototype,"_wizardOpen",2);n([l()],s.prototype,"_wizardStep",2);n([l()],s.prototype,"_wizardError",2);n([l()],s.prototype,"_wizardCreating",2);n([l()],s.prototype,"_wizardAgentId",2);n([l()],s.prototype,"_wizardAgentName",2);n([l()],s.prototype,"_wizardProvider",2);n([l()],s.prototype,"_wizardModel",2);n([l()],s.prototype,"_wizardToolProfile",2);n([l()],s.prototype,"_catalogProviders",2);s=n([y("ic-agent-list")],s);export{s as IcAgentList};
@@ -0,0 +1,54 @@
1
+ import{a as n,b as d,s as l,i as v,t as p}from"./index-CEcM1R_C.js";var m=Object.getOwnPropertyDescriptor,u=(i,a,s,c)=>{for(var e=c>1?void 0:c?m(a,s):a,t=i.length-1,o;t>=0;t--)(o=i[t])&&(e=o(e)||e);return e};let r=class extends n{_navigateToSecurity(){window.location.hash="#security"}render(){return d`
2
+ <div class="redirect-container">
3
+ <div class="redirect-title">Approvals Moved</div>
4
+ <div class="redirect-desc">
5
+ Approvals have been merged into the Security view. Use the
6
+ "Pending Approvals" and "Approval Rules" tabs to manage approvals.
7
+ </div>
8
+ <button class="redirect-btn" @click=${()=>this._navigateToSecurity()}>
9
+ Go to Security
10
+ </button>
11
+ </div>
12
+ `}};r.styles=[l,v`
13
+ :host {
14
+ display: block;
15
+ }
16
+
17
+ .redirect-container {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ padding: 4rem 2rem;
23
+ gap: var(--ic-space-md);
24
+ text-align: center;
25
+ }
26
+
27
+ .redirect-title {
28
+ font-size: 1.125rem;
29
+ font-weight: 600;
30
+ color: var(--ic-text);
31
+ }
32
+
33
+ .redirect-desc {
34
+ font-size: var(--ic-text-sm);
35
+ color: var(--ic-text-muted);
36
+ max-width: 28rem;
37
+ }
38
+
39
+ .redirect-btn {
40
+ padding: 0.5rem 1.25rem;
41
+ background: var(--ic-accent);
42
+ color: white;
43
+ border: none;
44
+ border-radius: var(--ic-radius-md);
45
+ font-size: var(--ic-text-sm);
46
+ font-weight: 500;
47
+ cursor: pointer;
48
+ font-family: inherit;
49
+ }
50
+
51
+ .redirect-btn:hover {
52
+ opacity: 0.9;
53
+ }
54
+ `];r=u([p("ic-approvals-view")],r);export{r as IcApprovalsView};