comisai 1.0.16 → 1.0.17

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 +4 -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,814 @@
1
+ import{a as x,S as $,b as i,g as C,A as v,s as S,f as k,i as R,n as T,r as o,t as A}from"./index-CEcM1R_C.js";import{d as D,a as y}from"./observability-types-D7jUtSde.js";import"./ic-tabs-B7QtM_v8.js";import"./ic-tag-CPPUnDLF.js";import"./ic-relative-time-3FqpjeAI.js";import"./ic-empty-state-60l2ePhd.js";import"./ic-delivery-row-GP5Fkygs.js";import"./ic-icon-xeGTVhVG.js";var I=Object.defineProperty,F=Object.getOwnPropertyDescriptor,l=(e,t,r,n)=>{for(var d=n>1?void 0:n?F(t,r):t,u=e.length-1,p;u>=0;u--)(p=e[u])&&(d=(n?p(t,r,d):p(d))||d);return n&&d&&I(t,r,d),d};const N=3e4,E=[{id:"overview",label:"Overview"},{id:"billing",label:"Billing"},{id:"delivery",label:"Delivery"},{id:"channels",label:"Channels"},{id:"diagnostics",label:"Diagnostics"}];let s=class extends x{constructor(){super(...arguments),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}connectedCallback(){super.connectedCallback(),this._activeTab=this.initialTab,this._initSse()}_initSse(){!this.eventDispatcher||this._sse||(this._sse=new $(this,this.eventDispatcher,{"observability:metrics":()=>{this._scheduleReload(500)},"observability:token_usage":()=>{this._scheduleReload()},"observability:reset":()=>{this._scheduleReload()}}))}_scheduleReload(e=300){this._reloadDebounce!==null&&clearTimeout(this._reloadDebounce),this._reloadDebounce=setTimeout(()=>{this._reloadDebounce=null,this._loadData()},e)}disconnectedCallback(){super.disconnectedCallback(),this._reloadDebounce!==null&&(clearTimeout(this._reloadDebounce),this._reloadDebounce=null),this._refreshInterval!==null&&(clearInterval(this._refreshInterval),this._refreshInterval=null),this._rpcStatusUnsub?.(),this._rpcStatusUnsub=null}willUpdate(e){e.has("initialTab")&&(this._activeTab=this.initialTab),e.has("rpcClient")&&(this.rpcClient?this._tryLoad():this._loadState="loaded"),e.has("eventDispatcher")&&this.eventDispatcher&&!this._sse&&this._initSse()}_tryLoad(){if(!this.rpcClient){this._loadState="loaded";return}this._rpcStatusUnsub?.(),this.rpcClient.status==="connected"?this._startLoading():this._rpcStatusUnsub=this.rpcClient.onStatusChange(e=>{e==="connected"&&this._startLoading()})}_startLoading(){this._loadData(),this._refreshInterval===null&&(this._refreshInterval=setInterval(()=>{this._loadData()},N))}async _loadData(){if(!this.rpcClient||this.rpcClient.status!=="connected"){this._loadState="loaded";return}const e=this.rpcClient,[t,r,n,d,u,p,w,b,_]=await Promise.allSettled([e.call("obs.delivery.stats"),e.call("obs.billing.total"),e.call("obs.billing.usage24h"),e.call("obs.billing.byProvider"),e.call("obs.diagnostics"),e.call("obs.delivery.recent"),e.call("obs.channels.all"),e.call("agents.list"),e.call("channels.list")]);let h=!1,m="";if(t.status==="fulfilled"){const a=t.value,c=Number(a.total??a.totalDelivered??0),g=Number(a.failures??a.failed??0);let f=0;a.successRate!==void 0?f=Number(a.successRate):c>0&&(f=Number(a.successes??0)/c*100),this._deliveryStats={successRate:f,avgLatencyMs:Number(a.avgLatencyMs??0),totalDelivered:c,failed:g},this._requestsToday=c,this._errorsToday=g,h=!0}else m=t.reason instanceof Error?t.reason.message:"Failed to load delivery stats";if(r.status==="fulfilled"){const a=r.value,c={totalTokens:Number(a.totalTokens??0),totalCost:Number(a.totalCost??0)};this._billingTotal=c,this._tokensToday=c.totalTokens,this._costToday=c.totalCost,h=!0}else m||(m=r.reason instanceof Error?r.reason.message:"Failed to load billing total");if(n.status==="fulfilled"&&(this._tokenUsage24h=Array.isArray(n.value)?n.value:[],h=!0),d.status==="fulfilled"){const a=d.value;if(Array.isArray(a))this._billingByProvider=a;else{const c=a;this._billingByProvider=Array.isArray(c.providers)?c.providers:[]}h=!0}if(u.status==="fulfilled"){const a=u.value;if(Array.isArray(a))this._diagnosticsEvents=a;else{const c=a;this._diagnosticsEvents=Array.isArray(c.events)?c.events:[]}h=!0}if(p.status==="fulfilled"){const a=p.value;if(Array.isArray(a))this._deliveryTraces=a;else{const c=a;this._deliveryTraces=Array.isArray(c.deliveries)?c.deliveries:[]}h=!0}if(w.status==="fulfilled"){const a=w.value;if(Array.isArray(a))this._channelActivity=a;else{const c=a;this._channelActivity=Array.isArray(c.channels)?c.channels:[]}h=!0}if(b.status==="fulfilled"){const a=Array.isArray(b.value.agents)?b.value.agents:[];if(a.length>0){const c=await Promise.allSettled(a.map(g=>e.call("agents.get",{agentId:g})));this._agentHealth=c.filter(g=>g.status==="fulfilled").map(g=>g.value)}else this._agentHealth=[];h=!0}_.status==="fulfilled"&&(this._channelHealth=Array.isArray(_.value.channels)?_.value.channels:[],h=!0),h?(this._loadState="loaded",this._error=""):(this._loadState="error",this._error=m||"Failed to load observability data")}_onTabChange(e){this._activeTab=e.detail}_formatNumber(e){return new Intl.NumberFormat("en-US").format(e)}_formatTokens(e){if(e>=1e6){const t=e/1e6;return t%1===0?`${t}M`:`${t.toFixed(1)}M`}if(e>=1e3){const t=e/1e3;return t%1===0?`${t}K`:`${t.toFixed(1)}K`}return String(e)}_formatCost(e){return`$${(e??0).toFixed(2)}`}_getErrorRate(){return!this._deliveryStats||this._deliveryStats.totalDelivered===0?0:this._deliveryStats.failed/this._deliveryStats.totalDelivered*100}_getErrorRateColor(){const e=this._getErrorRate();return e>5?"var(--ic-error)":e>1?"var(--ic-warning)":"var(--ic-success)"}_getLatencyColor(){const e=this._deliveryStats?.avgLatencyMs??0;return e>5e3?"var(--ic-error)":e>2e3?"var(--ic-warning)":""}_getAgentModel(e){return typeof e.model=="string"?e.model:"unknown"}_onResetClick(){this._resetConfirming=!0,this._resetInput=""}_onResetCancel(){this._resetConfirming=!1,this._resetInput=""}_onResetInput(e){this._resetInput=e.target.value}async _onResetConfirm(){if(!(this._resetInput!=="RESET"||!this.rpcClient)){try{await this.rpcClient.call("obs.reset")}catch{}this._resetConfirming=!1,this._resetInput="",await this._loadData()}}_renderOverview(){const e=this.rpcClient&&this.rpcClient.status==="connected",t=this._getErrorRate(),r=e?this._deliveryStats&&this._deliveryStats.totalDelivered>0?`${t.toFixed(1)}%`:"0%":"---",n=e?this._deliveryStats?`${this._deliveryStats.avgLatencyMs}ms`:"0ms":"---",d=e?String(this._agentHealth.filter(u=>!u.suspended).length):"---";return i`
2
+ <!-- 6 Stat Cards -->
3
+ <div class="stats-grid">
4
+ <ic-stat-card
5
+ label="Requests/min"
6
+ .value=${e?this._formatNumber(this._requestsToday):"---"}
7
+ ></ic-stat-card>
8
+ <ic-stat-card
9
+ label="Error Rate"
10
+ .value=${r}
11
+ ></ic-stat-card>
12
+ <ic-stat-card
13
+ label="Avg Latency"
14
+ .value=${n}
15
+ ></ic-stat-card>
16
+ <ic-stat-card
17
+ label="Active Agents"
18
+ .value=${d}
19
+ ></ic-stat-card>
20
+ <ic-stat-card
21
+ label="Tokens (24h)"
22
+ .value=${e?this._formatTokens(this._tokensToday):"---"}
23
+ ></ic-stat-card>
24
+ <ic-stat-card
25
+ label="Cost Today"
26
+ .value=${e?this._formatCost(this._costToday):"---"}
27
+ ></ic-stat-card>
28
+ </div>
29
+
30
+ <!-- Time-series Charts -->
31
+ <div class="section">
32
+ <div class="charts-section">
33
+ <div>
34
+ <div class="chart-title">Token Usage (24h)</div>
35
+ <div class="chart-container">
36
+ ${this._tokenUsage24h.length>0?i`
37
+ <div class="bar-chart" aria-label="Token usage bar chart">
38
+ ${this._renderTokenBars()}
39
+ </div>
40
+ <div class="chart-labels">
41
+ <span>00</span>
42
+ <span>06</span>
43
+ <span>12</span>
44
+ <span>18</span>
45
+ <span>24</span>
46
+ </div>
47
+ `:i`<div style="color: var(--ic-text-dim); text-align: center; padding: var(--ic-space-lg);">No usage data</div>`}
48
+ </div>
49
+ </div>
50
+ <div class="sparkline-side">
51
+ <div>
52
+ <div class="chart-title">Cost Trend (7d)</div>
53
+ <div class="chart-container">
54
+ <ic-sparkline
55
+ .data=${this._costToday>0?[this._costToday]:[]}
56
+ .width=${200}
57
+ .height=${60}
58
+ color="var(--ic-accent)"
59
+ ></ic-sparkline>
60
+ </div>
61
+ </div>
62
+ <div>
63
+ <div class="chart-title">Error Rate (24h)</div>
64
+ <div class="chart-container">
65
+ <ic-sparkline
66
+ .data=${this._errorsToday>0?[this._errorsToday]:[]}
67
+ .width=${200}
68
+ .height=${60}
69
+ color="var(--ic-error)"
70
+ ></ic-sparkline>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+
77
+ <!-- Health Grids -->
78
+ <div class="section">
79
+ <div class="health-grids">
80
+ <div>
81
+ <div class="section-title">Agent Health</div>
82
+ ${this._renderAgentHealthGrid()}
83
+ </div>
84
+ <div>
85
+ <div class="section-title">Channel Health</div>
86
+ ${this._renderChannelHealthGrid()}
87
+ </div>
88
+ </div>
89
+ </div>
90
+
91
+ <!-- Reset Section -->
92
+ ${this._renderResetSection()}
93
+ `}_renderTokenBars(){const e=Math.max(...this._tokenUsage24h.map(t=>t.tokens),1);return this._tokenUsage24h.map(t=>i`<div class="bar" style="height: ${t.tokens/e*100}%" title="${t.hour}:00 - ${this._formatTokens(t.tokens)} tokens"></div>`)}_renderAgentHealthGrid(){return this._agentHealth.length===0?i`<div class="health-empty">No agents configured</div>`:i`
94
+ <div class="grid-table health-grid-table" role="table" aria-label="Agent health">
95
+ <div class="grid-header" role="row">
96
+ <div class="cell" role="columnheader">Agent</div>
97
+ <div class="cell" role="columnheader">Model</div>
98
+ <div class="cell" role="columnheader">Status</div>
99
+ </div>
100
+ ${this._agentHealth.map(e=>i`
101
+ <div class="grid-row" role="row">
102
+ <div class="cell cell-mono" role="cell">${e.agentId}</div>
103
+ <div class="cell" role="cell">${this._getAgentModel(e.config)}</div>
104
+ <div class="cell" role="cell">
105
+ ${e.suspended?i`<ic-tag variant="default">suspended</ic-tag>`:i`<ic-tag variant="success">active</ic-tag>`}
106
+ </div>
107
+ </div>
108
+ `)}
109
+ </div>
110
+ `}_renderChannelHealthGrid(){return this._channelHealth.length===0?i`<div class="health-empty">No channels configured</div>`:i`
111
+ <div class="grid-table health-grid-table" role="table" aria-label="Channel health">
112
+ <div class="grid-header" role="row">
113
+ <div class="cell" role="columnheader">Channel</div>
114
+ <div class="cell" role="columnheader">Type</div>
115
+ <div class="cell" role="columnheader">Status</div>
116
+ </div>
117
+ ${this._channelHealth.map(e=>{const t=C(e.status),r={green:"success",yellow:"warning",red:"error",gray:"default"};return i`
118
+ <div class="grid-row" role="row">
119
+ <div class="cell" role="cell">${e.channelId??e.channelType}</div>
120
+ <div class="cell" role="cell">${e.channelType}</div>
121
+ <div class="cell" role="cell">
122
+ <ic-tag variant=${r[t.severity]}>
123
+ ${t.label}
124
+ </ic-tag>
125
+ </div>
126
+ </div>
127
+ `})}
128
+ </div>
129
+ `}_renderResetSection(){return i`
130
+ <div class="reset-section">
131
+ <div class="section-title">Reset Observability Data</div>
132
+ ${this._resetConfirming?i`
133
+ <div class="reset-warning">
134
+ This will permanently clear all observability data. Type RESET to confirm.
135
+ </div>
136
+ <input
137
+ class="reset-input"
138
+ type="text"
139
+ .value=${this._resetInput}
140
+ @input=${this._onResetInput}
141
+ placeholder="Type RESET"
142
+ />
143
+ <div class="reset-actions">
144
+ <button class="reset-cancel-btn" @click=${this._onResetCancel}>Cancel</button>
145
+ <button
146
+ class="reset-confirm-btn"
147
+ ?disabled=${this._resetInput!=="RESET"}
148
+ @click=${this._onResetConfirm}
149
+ >Confirm Reset</button>
150
+ </div>
151
+ `:i`
152
+ <button class="reset-btn" @click=${this._onResetClick}>
153
+ Reset Observability Data
154
+ </button>
155
+ `}
156
+ </div>
157
+ `}_renderBilling(){return this._billingByProvider.length===0&&this._billingByAgent.length===0?i`<ic-empty-state icon="dollar-sign" message="No billing data available"></ic-empty-state>`:i`
158
+ ${this._billingByProvider.length>0?i`
159
+ <div class="section">
160
+ <div class="section-title">By Provider</div>
161
+ <div class="grid-table-scroll">
162
+ <div class="grid-table provider-table" role="table">
163
+ <div class="grid-header" role="row">
164
+ <div class="cell" role="columnheader">Provider</div>
165
+ <div class="cell cell-right" role="columnheader">Total Tokens</div>
166
+ <div class="cell cell-right" role="columnheader">Calls</div>
167
+ <div class="cell cell-right" role="columnheader">Cost</div>
168
+ </div>
169
+ ${this._billingByProvider.map(e=>i`
170
+ <div class="grid-row" role="row">
171
+ <div class="cell" role="cell">${e.provider}</div>
172
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(e.totalTokens)}</div>
173
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(e.callCount)}</div>
174
+ <div class="cell cell-mono cell-right" role="cell">${this._formatCost(e.totalCost)}</div>
175
+ </div>
176
+ `)}
177
+ ${this._renderProviderTotal()}
178
+ </div>
179
+ </div>
180
+ </div>
181
+ `:v}
182
+
183
+ ${this._billingByAgent.length>0?i`
184
+ <div class="section">
185
+ <div class="section-title">By Agent</div>
186
+ <div class="grid-table-scroll">
187
+ <div class="grid-table agent-table" role="table">
188
+ <div class="grid-header" role="row">
189
+ <div class="cell" role="columnheader">Agent</div>
190
+ <div class="cell cell-right" role="columnheader">Tokens</div>
191
+ <div class="cell cell-right" role="columnheader">% Total</div>
192
+ <div class="cell cell-right" role="columnheader">Cost</div>
193
+ </div>
194
+ ${this._billingByAgent.map(e=>i`
195
+ <div class="grid-row" role="row">
196
+ <div class="cell" role="cell">${e.agentId}</div>
197
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(e.totalTokens)}</div>
198
+ <div class="cell cell-mono cell-right" role="cell">${e.percentOfTotal.toFixed(1)}%</div>
199
+ <div class="cell cell-mono cell-right" role="cell">${this._formatCost(e.cost)}</div>
200
+ </div>
201
+ `)}
202
+ </div>
203
+ </div>
204
+ </div>
205
+ `:v}
206
+ `}_renderProviderTotal(){const e=this._billingByProvider.reduce((t,r)=>({totalTokens:t.totalTokens+r.totalTokens,callCount:t.callCount+r.callCount,totalCost:t.totalCost+r.totalCost}),{totalTokens:0,callCount:0,totalCost:0});return i`
207
+ <div class="grid-row total-row" role="row">
208
+ <div class="cell" role="cell">Total</div>
209
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(e.totalTokens)}</div>
210
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(e.callCount)}</div>
211
+ <div class="cell cell-mono cell-right" role="cell">${this._formatCost(e.totalCost)}</div>
212
+ </div>
213
+ `}_renderDiagnostics(){if(this._diagnosticsEvents.length===0)return i`<ic-empty-state icon="activity" message="No diagnostic events"></ic-empty-state>`;const e=[...this._diagnosticsEvents].sort((t,r)=>r.timestamp-t.timestamp);return i`
214
+ <div class="grid-table-scroll">
215
+ <div class="grid-table diagnostics-table" role="table">
216
+ <div class="grid-header" role="row">
217
+ <div class="cell" role="columnheader">Time</div>
218
+ <div class="cell" role="columnheader">Category</div>
219
+ <div class="cell" role="columnheader">Message</div>
220
+ <div class="cell" role="columnheader">Level</div>
221
+ </div>
222
+ ${e.map(t=>i`
223
+ <div class="grid-row" role="row">
224
+ <div class="cell" role="cell">
225
+ <ic-relative-time .timestamp=${t.timestamp}></ic-relative-time>
226
+ </div>
227
+ <div class="cell" role="cell">
228
+ <ic-tag>${t.category}</ic-tag>
229
+ </div>
230
+ <div class="cell" role="cell">${D(t)}</div>
231
+ <div class="cell" role="cell">
232
+ <ic-tag variant=${y(t)==="error"?"error":y(t)==="warn"?"warning":"default"}>
233
+ ${y(t)}
234
+ </ic-tag>
235
+ </div>
236
+ </div>
237
+ `)}
238
+ </div>
239
+ </div>
240
+ `}_getTimeRangeMs(){return{"1h":36e5,"6h":216e5,"24h":864e5,"7d":6048e5}[this._deliveryTimeRange]??36e5}_getFilteredTraces(){const e=Date.now(),t=this._getTimeRangeMs();return this._deliveryTraces.filter(r=>!(this._deliveryChannelFilter!=="all"&&r.channelType!==this._deliveryChannelFilter||this._deliveryStatusFilter!=="all"&&r.status!==this._deliveryStatusFilter||r.timestamp<e-t)).sort((r,n)=>n.timestamp-r.timestamp)}_onDeliveryChannelFilter(e){this._deliveryChannelFilter=e.target.value}_onDeliveryStatusFilter(e){this._deliveryStatusFilter=e.target.value}_onDeliveryTimeRange(e){this._deliveryTimeRange=e.target.value}_onTraceClick(e){const t=e.detail;this._expandedTraceId=this._expandedTraceId===t?null:t}_renderDeliveryStats(){if(!this._deliveryStats)return v;const e=this._deliveryStats,t=e.totalDelivered>0,r=t?e.successRate>=99?"rate-green":e.successRate>=95?"rate-yellow":"rate-red":"";return i`
241
+ <div class="stats-summary">
242
+ <span>Success <span class="stat-value ${r}">${t?`${e.successRate.toFixed(1)}%`:"N/A"}</span></span>
243
+ <span>Avg <span class="stat-value">${t?`${e.avgLatencyMs}ms`:"N/A"}</span></span>
244
+ <span>Total <span class="stat-value">${this._formatNumber(e.totalDelivered)}</span></span>
245
+ </div>
246
+ `}_renderTraceDetail(e){return!e.steps||e.steps.length===0?i`
247
+ <div class="trace-detail">
248
+ <div class="trace-detail-title">Delivery Steps</div>
249
+ <div style="color: var(--ic-text-dim); font-size: var(--ic-text-sm); margin-top: var(--ic-space-sm);">
250
+ No step details available
251
+ </div>
252
+ </div>
253
+ `:i`
254
+ <div class="trace-detail">
255
+ <div class="trace-detail-title">Delivery Steps</div>
256
+ <div class="step-list">
257
+ ${e.steps.map(t=>i`
258
+ <div class="step-item">
259
+ <span class="step-dot ${t.status}"></span>
260
+ <span>${t.name} &mdash; ${t.durationMs}ms</span>
261
+ </div>
262
+ ${t.error?i`<div class="step-error">${t.error}</div>`:v}
263
+ `)}
264
+ </div>
265
+ </div>
266
+ `}_renderChannelFilterSelect(){const e=[...new Set(this._deliveryTraces.map(t=>t.channelType))];return i`
267
+ <select class="filter-select" @change=${this._onDeliveryChannelFilter}>
268
+ <option value="all">All Channels</option>
269
+ ${e.map(t=>i`<option value=${t}>${t}</option>`)}
270
+ </select>
271
+ `}_renderStatusFilterSelect(){return i`
272
+ <select class="filter-select" @change=${this._onDeliveryStatusFilter}>
273
+ <option value="all">All Statuses</option>
274
+ <option value="success">Success</option>
275
+ <option value="failed">Failed</option>
276
+ <option value="timeout">Timeout</option>
277
+ </select>
278
+ `}_renderTimeRangeSelect(){return i`
279
+ <select class="filter-select" @change=${this._onDeliveryTimeRange}>
280
+ <option value="1h">1 hour</option>
281
+ <option value="6h">6 hours</option>
282
+ <option value="24h">24 hours</option>
283
+ <option value="7d">7 days</option>
284
+ </select>
285
+ `}_renderDeliveryRow(e){return i`
286
+ <ic-delivery-row
287
+ .trace=${e}
288
+ @trace-click=${this._onTraceClick}
289
+ ></ic-delivery-row>
290
+ ${this._expandedTraceId===e.traceId?this._renderTraceDetail(e):v}
291
+ `}_renderDeliveryTab(){const e=this._getFilteredTraces();return i`
292
+ ${this._renderDeliveryStats()}
293
+
294
+ <div class="filter-row">
295
+ ${this._renderChannelFilterSelect()}
296
+ ${this._renderStatusFilterSelect()}
297
+ ${this._renderTimeRangeSelect()}
298
+ </div>
299
+
300
+ ${e.length===0?i`<ic-empty-state icon="truck" message="No delivery traces match the current filters"></ic-empty-state>`:i`
301
+ <div class="grid-table-scroll">
302
+ <div class="grid-table delivery-table" role="table" aria-label="Delivery traces">
303
+ <div class="grid-header" role="row">
304
+ <div class="cell" role="columnheader">Time</div>
305
+ <div class="cell" role="columnheader">Channel</div>
306
+ <div class="cell" role="columnheader">Message</div>
307
+ <div class="cell" role="columnheader">Status</div>
308
+ <div class="cell" role="columnheader">Latency</div>
309
+ <div class="cell" role="columnheader">Steps</div>
310
+ </div>
311
+ ${e.map(t=>this._renderDeliveryRow(t))}
312
+ </div>
313
+ </div>
314
+ `}
315
+ `}_renderChannelsTab(){if(this._channelActivity.length===0)return i`<ic-empty-state icon="radio" title="No Channel Data" description="Channel activity will appear once channels are connected and processing messages."></ic-empty-state>`;const e=[...this._channelActivity].sort((r,n)=>r.isStale&&!n.isStale?-1:!r.isStale&&n.isStale?1:n.lastActiveAt-r.lastActiveAt),t=e.filter(r=>r.isStale).length;return i`
316
+ ${t>0?i`<div class="stale-alert">${t} stale channel(s) detected</div>`:v}
317
+
318
+ <div class="grid-table-scroll">
319
+ <div class="grid-table channel-table" role="table" aria-label="Channel activity">
320
+ <div class="grid-header" role="row">
321
+ <div class="cell" role="columnheader">Channel</div>
322
+ <div class="cell" role="columnheader">ID</div>
323
+ <div class="cell cell-right" role="columnheader">Sent</div>
324
+ <div class="cell cell-right" role="columnheader">Received</div>
325
+ <div class="cell" role="columnheader">Last Active</div>
326
+ <div class="cell" role="columnheader">Status</div>
327
+ </div>
328
+ ${e.map(r=>i`
329
+ <div class="grid-row ${r.isStale?"stale":""}" role="row">
330
+ <div class="cell" role="cell"><ic-tag variant=${r.channelType}>${r.channelType}</ic-tag></div>
331
+ <div class="cell cell-mono" role="cell">${r.channelId}</div>
332
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(r.messagesSent)}</div>
333
+ <div class="cell cell-mono cell-right" role="cell">${this._formatNumber(r.messagesReceived)}</div>
334
+ <div class="cell" role="cell"><ic-relative-time .timestamp=${r.lastActiveAt}></ic-relative-time></div>
335
+ <div class="cell" role="cell">
336
+ ${r.isStale?i`<ic-tag variant="warning">Stale</ic-tag>`:i`<ic-tag variant="success">Active</ic-tag>`}
337
+ </div>
338
+ </div>
339
+ `)}
340
+ </div>
341
+ </div>
342
+ `}_renderTabContent(){switch(this._activeTab){case"overview":return this._renderOverview();case"billing":return this._renderBilling();case"delivery":return this._renderDeliveryTab();case"channels":return this._renderChannelsTab();case"diagnostics":return this._renderDiagnostics();default:return this._renderOverview()}}render(){return this._loadState==="loading"&&this.rpcClient?i`<ic-skeleton-view variant="table"></ic-skeleton-view>`:this._loadState==="error"?i`
343
+ <div class="error-container">
344
+ <span class="error-message">${this._error}</span>
345
+ <button class="retry-btn" @click=${()=>this._tryLoad()}>Retry</button>
346
+ </div>
347
+ `:i`
348
+ <div class="observe-view">
349
+ <ic-tabs
350
+ .tabs=${E}
351
+ .activeTab=${this._activeTab}
352
+ @tab-change=${this._onTabChange}
353
+ >
354
+ <div slot="overview">${this._activeTab==="overview"?this._renderOverview():v}</div>
355
+ <div slot="billing">${this._activeTab==="billing"?this._renderBilling():v}</div>
356
+ <div slot="delivery">${this._activeTab==="delivery"?this._renderDeliveryTab():v}</div>
357
+ <div slot="channels">${this._activeTab==="channels"?this._renderChannelsTab():v}</div>
358
+ <div slot="diagnostics">${this._activeTab==="diagnostics"?this._renderDiagnostics():v}</div>
359
+ </ic-tabs>
360
+ </div>
361
+ `}};s.styles=[S,k,R`
362
+ :host {
363
+ display: block;
364
+ }
365
+
366
+ .observe-view {
367
+ padding: 0;
368
+ }
369
+
370
+ /* Stats row */
371
+ .stats-row {
372
+ display: flex;
373
+ gap: var(--ic-space-md);
374
+ flex-wrap: wrap;
375
+ margin-bottom: var(--ic-space-lg);
376
+ }
377
+
378
+ .stats-row ic-stat-card {
379
+ min-width: 10rem;
380
+ }
381
+
382
+ /* Section styles */
383
+ .section {
384
+ margin-bottom: var(--ic-space-xl);
385
+ }
386
+
387
+ .section-title {
388
+ font-size: var(--ic-text-base);
389
+ font-weight: 600;
390
+ color: var(--ic-text);
391
+ margin-bottom: var(--ic-space-md);
392
+ }
393
+
394
+ /* Chart container */
395
+ .chart-container {
396
+ background: var(--ic-surface);
397
+ border: 1px solid var(--ic-border);
398
+ border-radius: var(--ic-radius-lg);
399
+ padding: var(--ic-space-lg);
400
+ }
401
+
402
+ .chart-labels {
403
+ display: flex;
404
+ justify-content: space-between;
405
+ color: var(--ic-text-dim);
406
+ font-size: var(--ic-text-xs);
407
+ margin-top: var(--ic-space-xs);
408
+ }
409
+
410
+ /* Grid table styles */
411
+ .grid-table {
412
+ display: grid;
413
+ border: 1px solid var(--ic-border);
414
+ border-radius: var(--ic-radius-md);
415
+ overflow: hidden;
416
+ }
417
+
418
+ .grid-table-scroll {
419
+ overflow-x: auto;
420
+ }
421
+
422
+ .provider-table {
423
+ grid-template-columns: 1fr repeat(3, auto);
424
+ }
425
+
426
+ .agent-table {
427
+ grid-template-columns: 1fr repeat(3, auto);
428
+ }
429
+
430
+ .diagnostics-table {
431
+ grid-template-columns: auto auto 1fr auto;
432
+ }
433
+
434
+ .grid-header {
435
+ display: contents;
436
+ }
437
+
438
+ .grid-header .cell {
439
+ background: var(--ic-surface-2, #1f2937);
440
+ font-weight: 600;
441
+ color: var(--ic-text-dim);
442
+ font-size: var(--ic-text-xs);
443
+ text-transform: uppercase;
444
+ letter-spacing: 0.05em;
445
+ }
446
+
447
+ .grid-row {
448
+ display: contents;
449
+ }
450
+
451
+ .grid-row:hover .cell {
452
+ background: var(--ic-surface-2, #1f2937);
453
+ }
454
+
455
+ .cell {
456
+ padding: var(--ic-space-sm);
457
+ font-size: var(--ic-text-sm);
458
+ border-bottom: 1px solid var(--ic-border);
459
+ display: flex;
460
+ align-items: center;
461
+ }
462
+
463
+ .cell-mono {
464
+ font-family: var(--ic-font-mono, ui-monospace, monospace);
465
+ }
466
+
467
+ .cell-right {
468
+ justify-content: flex-end;
469
+ }
470
+
471
+ .total-row .cell {
472
+ font-weight: 600;
473
+ background: var(--ic-surface);
474
+ }
475
+
476
+ /* Loading & error states */
477
+ .state-container {
478
+ display: flex;
479
+ align-items: center;
480
+ justify-content: center;
481
+ padding: 3rem;
482
+ color: var(--ic-text-dim);
483
+ font-size: 0.875rem;
484
+ }
485
+
486
+ .error-container {
487
+ display: flex;
488
+ flex-direction: column;
489
+ align-items: center;
490
+ gap: 0.75rem;
491
+ padding: 3rem;
492
+ }
493
+
494
+ .error-message {
495
+ color: var(--ic-error);
496
+ font-size: 0.875rem;
497
+ }
498
+
499
+ .retry-btn {
500
+ padding: 0.5rem 1rem;
501
+ background: var(--ic-surface);
502
+ border: 1px solid var(--ic-border);
503
+ border-radius: 0.375rem;
504
+ color: var(--ic-text);
505
+ font-size: 0.8125rem;
506
+ cursor: pointer;
507
+ font-family: inherit;
508
+ }
509
+
510
+ .retry-btn:hover {
511
+ background: var(--ic-surface-alt, #374151);
512
+ }
513
+
514
+ .tab-content {
515
+ padding-top: var(--ic-space-md);
516
+ }
517
+
518
+ /* Delivery tab styles */
519
+ .delivery-table {
520
+ grid-template-columns: auto auto 1fr auto auto auto;
521
+ }
522
+
523
+ .filter-row {
524
+ display: flex;
525
+ gap: var(--ic-space-sm);
526
+ flex-wrap: wrap;
527
+ margin-bottom: var(--ic-space-md);
528
+ align-items: center;
529
+ }
530
+
531
+ .filter-select {
532
+ background: var(--ic-surface);
533
+ border: 1px solid var(--ic-border);
534
+ border-radius: var(--ic-radius-md);
535
+ color: var(--ic-text);
536
+ padding: 0.375rem 0.625rem;
537
+ font-size: var(--ic-text-sm);
538
+ cursor: pointer;
539
+ font-family: inherit;
540
+ }
541
+
542
+ .filter-select:focus-visible {
543
+ outline: 2px solid var(--ic-accent);
544
+ outline-offset: 2px;
545
+ }
546
+
547
+ .stats-summary {
548
+ display: flex;
549
+ gap: var(--ic-space-lg);
550
+ font-size: var(--ic-text-sm);
551
+ color: var(--ic-text-dim);
552
+ margin-bottom: var(--ic-space-md);
553
+ padding: var(--ic-space-sm) 0;
554
+ }
555
+
556
+ .stats-summary .stat-value {
557
+ font-weight: 600;
558
+ color: var(--ic-text);
559
+ }
560
+
561
+ .stats-summary .rate-green {
562
+ color: var(--ic-success);
563
+ }
564
+
565
+ .stats-summary .rate-yellow {
566
+ color: var(--ic-warning);
567
+ }
568
+
569
+ .stats-summary .rate-red {
570
+ color: var(--ic-error);
571
+ }
572
+
573
+ .trace-detail {
574
+ grid-column: 1 / -1;
575
+ background: var(--ic-surface-2, #1f2937);
576
+ border: 1px solid var(--ic-border);
577
+ border-radius: var(--ic-radius-md);
578
+ padding: var(--ic-space-md);
579
+ margin: var(--ic-space-xs) 0;
580
+ }
581
+
582
+ .trace-detail-title {
583
+ font-size: var(--ic-text-sm);
584
+ font-weight: 600;
585
+ color: var(--ic-text);
586
+ }
587
+
588
+ .step-list {
589
+ display: flex;
590
+ flex-direction: column;
591
+ gap: var(--ic-space-xs);
592
+ margin-top: var(--ic-space-sm);
593
+ }
594
+
595
+ .step-item {
596
+ display: flex;
597
+ align-items: center;
598
+ gap: var(--ic-space-sm);
599
+ font-size: var(--ic-text-sm);
600
+ }
601
+
602
+ .step-dot {
603
+ width: 8px;
604
+ height: 8px;
605
+ border-radius: 50%;
606
+ flex-shrink: 0;
607
+ }
608
+
609
+ .step-dot.ok {
610
+ background: var(--ic-success);
611
+ }
612
+
613
+ .step-dot.error {
614
+ background: var(--ic-error);
615
+ }
616
+
617
+ .step-error {
618
+ color: var(--ic-error);
619
+ font-size: var(--ic-text-xs);
620
+ margin-left: calc(8px + var(--ic-space-sm));
621
+ }
622
+
623
+ /* Channel tab styles */
624
+ .channel-table {
625
+ grid-template-columns: auto 1fr auto auto auto auto;
626
+ }
627
+
628
+ .stale-alert {
629
+ background: rgba(251, 191, 36, 0.1);
630
+ border: 1px solid var(--ic-warning);
631
+ border-radius: var(--ic-radius-md);
632
+ padding: var(--ic-space-sm) var(--ic-space-md);
633
+ color: var(--ic-warning);
634
+ font-size: var(--ic-text-sm);
635
+ margin-bottom: var(--ic-space-md);
636
+ display: flex;
637
+ align-items: center;
638
+ gap: var(--ic-space-sm);
639
+ }
640
+
641
+ .stale .cell {
642
+ background: rgba(251, 191, 36, 0.05);
643
+ }
644
+
645
+ /* Overview: 6-card grid */
646
+ .stats-grid {
647
+ display: grid;
648
+ grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
649
+ gap: var(--ic-space-md);
650
+ margin-bottom: var(--ic-space-lg);
651
+ }
652
+
653
+ /* Overview: charts section */
654
+ .charts-section {
655
+ display: grid;
656
+ grid-template-columns: 2fr 1fr;
657
+ gap: var(--ic-space-lg);
658
+ margin-bottom: var(--ic-space-xl);
659
+ }
660
+
661
+ @media (max-width: 768px) {
662
+ .charts-section {
663
+ grid-template-columns: 1fr;
664
+ }
665
+ }
666
+
667
+ .chart-title {
668
+ font-size: var(--ic-text-sm);
669
+ font-weight: 600;
670
+ color: var(--ic-text);
671
+ margin-bottom: var(--ic-space-sm);
672
+ }
673
+
674
+ /* Bar chart for token usage */
675
+ .bar-chart {
676
+ display: flex;
677
+ align-items: flex-end;
678
+ gap: 2px;
679
+ height: 120px;
680
+ padding: var(--ic-space-sm) 0;
681
+ }
682
+
683
+ .bar-chart .bar {
684
+ flex: 1;
685
+ background: var(--ic-accent);
686
+ border-radius: 2px 2px 0 0;
687
+ min-width: 4px;
688
+ transition: opacity 0.15s;
689
+ }
690
+
691
+ .bar-chart .bar:hover {
692
+ opacity: 0.8;
693
+ }
694
+
695
+ /* Overview: health grids section */
696
+ .health-grids {
697
+ display: grid;
698
+ grid-template-columns: 1fr 1fr;
699
+ gap: var(--ic-space-lg);
700
+ margin-bottom: var(--ic-space-xl);
701
+ }
702
+
703
+ @media (max-width: 768px) {
704
+ .health-grids {
705
+ grid-template-columns: 1fr;
706
+ }
707
+ }
708
+
709
+ .health-grid-table {
710
+ grid-template-columns: 1fr 1fr auto;
711
+ }
712
+
713
+ .health-empty {
714
+ color: var(--ic-text-dim);
715
+ font-size: var(--ic-text-sm);
716
+ font-style: italic;
717
+ padding: var(--ic-space-lg);
718
+ text-align: center;
719
+ }
720
+
721
+ /* Overview: reset section */
722
+ .reset-section {
723
+ border: 1px solid var(--ic-error);
724
+ border-radius: var(--ic-radius-lg);
725
+ padding: var(--ic-space-lg);
726
+ margin-top: var(--ic-space-xl);
727
+ }
728
+
729
+ .reset-section .section-title {
730
+ color: var(--ic-error);
731
+ }
732
+
733
+ .reset-btn {
734
+ padding: 0.5rem 1rem;
735
+ background: color-mix(in srgb, var(--ic-error) 15%, transparent);
736
+ border: 1px solid var(--ic-error);
737
+ border-radius: var(--ic-radius-md);
738
+ color: var(--ic-error);
739
+ font-size: var(--ic-text-sm);
740
+ cursor: pointer;
741
+ font-family: inherit;
742
+ font-weight: 500;
743
+ }
744
+
745
+ .reset-btn:hover {
746
+ background: color-mix(in srgb, var(--ic-error) 25%, transparent);
747
+ }
748
+
749
+ .reset-warning {
750
+ color: var(--ic-text-dim);
751
+ font-size: var(--ic-text-sm);
752
+ margin-bottom: var(--ic-space-md);
753
+ }
754
+
755
+ .reset-input {
756
+ background: var(--ic-surface);
757
+ border: 1px solid var(--ic-border);
758
+ border-radius: var(--ic-radius-md);
759
+ color: var(--ic-text);
760
+ padding: 0.375rem 0.625rem;
761
+ font-size: var(--ic-text-sm);
762
+ font-family: inherit;
763
+ margin-bottom: var(--ic-space-md);
764
+ width: 12rem;
765
+ }
766
+
767
+ .reset-input:focus-visible {
768
+ outline: 2px solid var(--ic-error);
769
+ outline-offset: 2px;
770
+ }
771
+
772
+ .reset-actions {
773
+ display: flex;
774
+ gap: var(--ic-space-sm);
775
+ }
776
+
777
+ .reset-cancel-btn {
778
+ padding: 0.5rem 1rem;
779
+ background: var(--ic-surface);
780
+ border: 1px solid var(--ic-border);
781
+ border-radius: var(--ic-radius-md);
782
+ color: var(--ic-text);
783
+ font-size: var(--ic-text-sm);
784
+ cursor: pointer;
785
+ font-family: inherit;
786
+ }
787
+
788
+ .reset-confirm-btn {
789
+ padding: 0.5rem 1rem;
790
+ border: none;
791
+ border-radius: var(--ic-radius-md);
792
+ font-size: var(--ic-text-sm);
793
+ cursor: pointer;
794
+ font-family: inherit;
795
+ font-weight: 500;
796
+ }
797
+
798
+ .reset-confirm-btn[disabled] {
799
+ background: var(--ic-surface);
800
+ color: var(--ic-text-dim);
801
+ cursor: not-allowed;
802
+ }
803
+
804
+ .reset-confirm-btn:not([disabled]) {
805
+ background: var(--ic-error);
806
+ color: #fff;
807
+ }
808
+
809
+ .sparkline-side {
810
+ display: flex;
811
+ flex-direction: column;
812
+ gap: var(--ic-space-lg);
813
+ }
814
+ `];l([T({attribute:!1})],s.prototype,"rpcClient",2);l([T({attribute:!1})],s.prototype,"eventDispatcher",2);l([T()],s.prototype,"initialTab",2);l([o()],s.prototype,"_loadState",2);l([o()],s.prototype,"_activeTab",2);l([o()],s.prototype,"_error",2);l([o()],s.prototype,"_requestsToday",2);l([o()],s.prototype,"_tokensToday",2);l([o()],s.prototype,"_costToday",2);l([o()],s.prototype,"_errorsToday",2);l([o()],s.prototype,"_tokenUsage24h",2);l([o()],s.prototype,"_billingByProvider",2);l([o()],s.prototype,"_billingByAgent",2);l([o()],s.prototype,"_billingTotal",2);l([o()],s.prototype,"_diagnosticsEvents",2);l([o()],s.prototype,"_deliveryTraces",2);l([o()],s.prototype,"_deliveryStats",2);l([o()],s.prototype,"_channelActivity",2);l([o()],s.prototype,"_agentHealth",2);l([o()],s.prototype,"_channelHealth",2);l([o()],s.prototype,"_resetConfirming",2);l([o()],s.prototype,"_resetInput",2);l([o()],s.prototype,"_deliveryChannelFilter",2);l([o()],s.prototype,"_deliveryStatusFilter",2);l([o()],s.prototype,"_deliveryTimeRange",2);l([o()],s.prototype,"_expandedTraceId",2);s=l([A("ic-observe-view")],s);export{s as IcObserveView};