comisai 1.0.15 → 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.
- package/node_modules/@comis/agent/dist/bootstrap/types.d.ts +1 -1
- package/node_modules/@comis/agent/dist/bridge/pi-event-bridge.js +12 -11
- package/node_modules/@comis/agent/dist/context-engine/constants.d.ts +11 -0
- package/node_modules/@comis/agent/dist/context-engine/constants.js +11 -0
- package/node_modules/@comis/agent/dist/context-engine/index.d.ts +1 -1
- package/node_modules/@comis/agent/dist/context-engine/index.js +1 -1
- package/node_modules/@comis/agent/dist/context-engine/llm-compaction.js +32 -18
- package/node_modules/@comis/agent/dist/executor/cache-break-diff-writer.d.ts +2 -0
- package/node_modules/@comis/agent/dist/executor/cache-break-diff-writer.js +36 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.d.ts +12 -0
- package/node_modules/@comis/agent/dist/executor/executor-post-execution.js +117 -27
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.d.ts +1 -0
- package/node_modules/@comis/agent/dist/executor/executor-prompt-runner.js +16 -4
- package/node_modules/@comis/agent/dist/executor/executor-stream-setup.js +17 -1
- package/node_modules/@comis/agent/dist/executor/executor-tool-assembly.js +27 -1
- package/node_modules/@comis/agent/dist/executor/session-snapshot-cleanup.js +3 -1
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/index.d.ts +2 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/index.js +2 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.d.ts +9 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/request-body-injector.js +65 -3
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/stub-filter-injector.d.ts +28 -0
- package/node_modules/@comis/agent/dist/executor/stream-wrappers/stub-filter-injector.js +63 -0
- package/node_modules/@comis/agent/dist/executor/tool-deferral.d.ts +18 -1
- package/node_modules/@comis/agent/dist/executor/tool-deferral.js +275 -133
- package/node_modules/@comis/agent/dist/executor/ttl-guard.d.ts +6 -0
- package/node_modules/@comis/agent/dist/executor/ttl-guard.js +8 -0
- package/node_modules/@comis/agent/package.json +1 -1
- package/node_modules/@comis/channels/dist/shared/typing-controller.d.ts +7 -0
- package/node_modules/@comis/channels/dist/shared/typing-controller.js +33 -0
- package/node_modules/@comis/channels/package.json +1 -1
- package/node_modules/@comis/cli/dist/commands/daemon.js +116 -28
- package/node_modules/@comis/cli/dist/wizard/non-interactive.js +1 -0
- package/node_modules/@comis/cli/dist/wizard/steps/01-detect-existing.js +4 -0
- package/node_modules/@comis/cli/dist/wizard/steps/07-gateway.js +9 -0
- package/node_modules/@comis/cli/dist/wizard/steps/10-write-config.js +2 -0
- package/node_modules/@comis/cli/dist/wizard/steps/12-finish.js +5 -2
- package/node_modules/@comis/cli/dist/wizard/types.d.ts +1 -0
- package/node_modules/@comis/cli/package.json +1 -1
- package/node_modules/@comis/core/dist/config/schema-agent.d.ts +10 -0
- package/node_modules/@comis/core/dist/config/schema-agent.js +8 -0
- package/node_modules/@comis/core/dist/config/schema-gateway.d.ts +17 -2
- package/node_modules/@comis/core/dist/config/schema-gateway.js +11 -0
- package/node_modules/@comis/core/dist/config/schema-skills.d.ts +16 -2
- package/node_modules/@comis/core/dist/config/schema-skills.js +9 -2
- package/node_modules/@comis/core/dist/config/schema.d.ts +66 -60
- package/node_modules/@comis/core/package.json +1 -1
- package/node_modules/@comis/daemon/dist/wiring/setup-gateway.js +34 -6
- package/node_modules/@comis/daemon/package.json +1 -1
- package/node_modules/@comis/gateway/package.json +1 -1
- package/node_modules/@comis/infra/package.json +1 -1
- package/node_modules/@comis/memory/package.json +1 -1
- package/node_modules/@comis/scheduler/package.json +1 -1
- package/node_modules/@comis/shared/package.json +1 -1
- package/node_modules/@comis/skills/dist/builtin/platform/gateway-tool.d.ts +1 -1
- package/node_modules/@comis/skills/package.json +1 -1
- package/node_modules/@comis/web/dist/android-chrome-192x192.png +0 -0
- package/node_modules/@comis/web/dist/android-chrome-512x512.png +0 -0
- package/node_modules/@comis/web/dist/apple-touch-icon.png +0 -0
- package/node_modules/@comis/web/dist/assets/agent-detail-BG9MGWWj.js +615 -0
- package/node_modules/@comis/web/dist/assets/agent-editor-C26Q_xCs.js +2173 -0
- package/node_modules/@comis/web/dist/assets/agent-list-LHCJ4rw2.js +504 -0
- package/node_modules/@comis/web/dist/assets/approvals-q9VH_IKr.js +54 -0
- package/node_modules/@comis/web/dist/assets/billing-view-CtYvBqTE.js +375 -0
- package/node_modules/@comis/web/dist/assets/channel-detail-CaInesJM.js +681 -0
- package/node_modules/@comis/web/dist/assets/channel-list-B8dj3O9a.js +323 -0
- package/node_modules/@comis/web/dist/assets/chat-console-CNmzl0JW.js +943 -0
- package/node_modules/@comis/web/dist/assets/config-editor-DX4ITw6y.js +1374 -0
- package/node_modules/@comis/web/dist/assets/context-dag-browser-BwiaF5tf.js +393 -0
- package/node_modules/@comis/web/dist/assets/context-engine-BZ5Am6hA.js +393 -0
- package/node_modules/@comis/web/dist/assets/delivery-view-OfBZof-m.js +392 -0
- package/node_modules/@comis/web/dist/assets/diagnostics-view-YFwCxgr2.js +231 -0
- package/node_modules/@comis/web/dist/assets/directive-DoeGSK_T.js +1 -0
- package/node_modules/@comis/web/dist/assets/extract-variables-BM5qyK-s.js +149 -0
- package/node_modules/@comis/web/dist/assets/ic-array-editor-B7m6x7-S.js +118 -0
- package/node_modules/@comis/web/dist/assets/ic-breadcrumb-CUMpp3BL.js +75 -0
- package/node_modules/@comis/web/dist/assets/ic-budget-segment-bar-BtJ6x5mN.js +64 -0
- package/node_modules/@comis/web/dist/assets/ic-chat-message-CFyDJd0z.js +352 -0
- package/node_modules/@comis/web/dist/assets/ic-confirm-dialog-CCDbB04e.js +110 -0
- package/node_modules/@comis/web/dist/assets/ic-connection-dot-CnT1b8xr.js +54 -0
- package/node_modules/@comis/web/dist/assets/ic-data-table-CKUNTxHw.js +277 -0
- package/node_modules/@comis/web/dist/assets/ic-delivery-row-GP5Fkygs.js +67 -0
- package/node_modules/@comis/web/dist/assets/ic-detail-panel-BF83r-if.js +116 -0
- package/node_modules/@comis/web/dist/assets/ic-empty-state-60l2ePhd.js +52 -0
- package/node_modules/@comis/web/dist/assets/ic-graph-canvas-C8FuSMe1.js +359 -0
- package/node_modules/@comis/web/dist/assets/ic-icon-xeGTVhVG.js +33 -0
- package/node_modules/@comis/web/dist/assets/ic-layer-waterfall-COvEYMg5.js +69 -0
- package/node_modules/@comis/web/dist/assets/ic-relative-time-3FqpjeAI.js +12 -0
- package/node_modules/@comis/web/dist/assets/ic-search-input-CSOxY9g7.js +92 -0
- package/node_modules/@comis/web/dist/assets/ic-select-Ce-Raudx.js +127 -0
- package/node_modules/@comis/web/dist/assets/ic-tabs-B7QtM_v8.js +95 -0
- package/node_modules/@comis/web/dist/assets/ic-tag-CPPUnDLF.js +33 -0
- package/node_modules/@comis/web/dist/assets/ic-time-range-picker-CypCT68y.js +93 -0
- package/node_modules/@comis/web/dist/assets/ic-tool-call-7MaXSsCW.js +146 -0
- package/node_modules/@comis/web/dist/assets/index-CEcM1R_C.js +2830 -0
- package/node_modules/@comis/web/dist/assets/index-CIJFuItj.css +1 -0
- package/node_modules/@comis/web/dist/assets/mcp-management-BNZPnpDn.js +582 -0
- package/node_modules/@comis/web/dist/assets/media-config-BBvTYxOX.js +314 -0
- package/node_modules/@comis/web/dist/assets/media-test-BkK3RCRK.js +496 -0
- package/node_modules/@comis/web/dist/assets/memory-inspector-1hDGCGat.js +1139 -0
- package/node_modules/@comis/web/dist/assets/message-center-CXefwsUu.js +785 -0
- package/node_modules/@comis/web/dist/assets/models-C1qcU_j3.js +894 -0
- package/node_modules/@comis/web/dist/assets/observability-types-D7jUtSde.js +1 -0
- package/node_modules/@comis/web/dist/assets/observe-view-C0VBhX4C.js +814 -0
- package/node_modules/@comis/web/dist/assets/pipeline-builder-DcUUIrm0.js +1496 -0
- package/node_modules/@comis/web/dist/assets/pipeline-history-DkfOQ6SW.js +317 -0
- package/node_modules/@comis/web/dist/assets/pipeline-history-detail-hyHgD0ai.js +287 -0
- package/node_modules/@comis/web/dist/assets/pipeline-list-BPW8hV-q.js +518 -0
- package/node_modules/@comis/web/dist/assets/pipeline-monitor-Bip16T7e.js +972 -0
- package/node_modules/@comis/web/dist/assets/scheduler-BGgwKd06.js +1182 -0
- package/node_modules/@comis/web/dist/assets/security-D15st4xx.js +1224 -0
- package/node_modules/@comis/web/dist/assets/session-detail-SGEYNJ0M.js +632 -0
- package/node_modules/@comis/web/dist/assets/session-key-parser-DPORMVyU.js +1 -0
- package/node_modules/@comis/web/dist/assets/session-list-6ybUTxbY.js +231 -0
- package/node_modules/@comis/web/dist/assets/setup-wizard-nT0tz9QP.js +853 -0
- package/node_modules/@comis/web/dist/assets/skills-D8yVfSUy.js +1051 -0
- package/node_modules/@comis/web/dist/assets/subagents-HHXMeHYo.js +193 -0
- package/node_modules/@comis/web/dist/assets/workspace-manager-BQlr10iH.js +785 -0
- package/node_modules/@comis/web/dist/comis-logo.png +0 -0
- package/node_modules/@comis/web/dist/favicon-16x16.png +0 -0
- package/node_modules/@comis/web/dist/favicon-32x32.png +0 -0
- package/node_modules/@comis/web/dist/favicon.ico +0 -0
- package/node_modules/@comis/web/dist/index.html +17 -0
- package/node_modules/@comis/web/package.json +29 -0
- package/package.json +15 -13
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import{s as m,i as h,n as v,a as f,b as r,A as g,t as _,S as b,f as x,r as d}from"./index-CEcM1R_C.js";import"./ic-budget-segment-bar-BtJ6x5mN.js";import"./ic-layer-waterfall-COvEYMg5.js";import"./ic-relative-time-3FqpjeAI.js";import"./ic-empty-state-60l2ePhd.js";import"./ic-icon-xeGTVhVG.js";var y=Object.defineProperty,w=Object.getOwnPropertyDescriptor,u=(e,t,i,s)=>{for(var a=s>1?void 0:s?w(t,i):t,n=e.length-1,c;n>=0;n--)(c=e[n])&&(a=(s?c(t,i,a):c(a))||a);return s&&a&&y(t,i,a),a};const $={file_read:"var(--ic-accent)",exec:"var(--ic-success)",web:"var(--ic-info, #3b82f6)",image:"var(--ic-warning)",error:"var(--ic-error)"},C="var(--ic-text-dim)";let p=class extends f{constructor(){super(...arguments),this.categories={},this.showLegend=!0}_getColor(e){return $[e]??C}_getEntries(){return Object.entries(this.categories).filter(([,e])=>e>0).map(([e,t])=>({name:e,count:t,color:this._getColor(e)}))}render(){const e=this._getEntries(),t=e.reduce((i,s)=>i+s.count,0);return t===0||e.length===0?r`<div class="empty">No evictions</div>`:r`
|
|
2
|
+
<div class="total-label">${t} eviction${t===1?"":"s"}</div>
|
|
3
|
+
<div class="bar" role="img" aria-label="Eviction breakdown">
|
|
4
|
+
${e.map(i=>{const s=i.count/t*100;return r`
|
|
5
|
+
<div
|
|
6
|
+
class="segment"
|
|
7
|
+
style="width: ${s}%; background: ${i.color};"
|
|
8
|
+
title="${i.name}: ${i.count} evictions (${s.toFixed(1)}%)"
|
|
9
|
+
></div>
|
|
10
|
+
`})}
|
|
11
|
+
</div>
|
|
12
|
+
${this.showLegend?r`
|
|
13
|
+
<div class="legend">
|
|
14
|
+
${e.map(i=>r`
|
|
15
|
+
<span class="legend-item">
|
|
16
|
+
<span
|
|
17
|
+
class="legend-dot"
|
|
18
|
+
style="background: ${i.color};"
|
|
19
|
+
></span>
|
|
20
|
+
${i.name}
|
|
21
|
+
</span>
|
|
22
|
+
`)}
|
|
23
|
+
</div>
|
|
24
|
+
`:g}
|
|
25
|
+
`}};p.styles=[m,h`
|
|
26
|
+
:host {
|
|
27
|
+
display: block;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.total-label {
|
|
31
|
+
font-size: var(--ic-text-xs);
|
|
32
|
+
color: var(--ic-text-dim);
|
|
33
|
+
margin-bottom: var(--ic-space-xs);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.bar {
|
|
37
|
+
display: flex;
|
|
38
|
+
height: 20px;
|
|
39
|
+
border-radius: var(--ic-radius-sm, 4px);
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.segment {
|
|
44
|
+
min-width: 2px;
|
|
45
|
+
height: 100%;
|
|
46
|
+
transition: width var(--ic-transition, 150ms ease);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.legend {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
gap: var(--ic-space-sm);
|
|
53
|
+
margin-top: var(--ic-space-sm);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.legend-item {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 4px;
|
|
60
|
+
font-size: var(--ic-text-xs);
|
|
61
|
+
color: var(--ic-text-dim);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.legend-dot {
|
|
65
|
+
width: 8px;
|
|
66
|
+
height: 8px;
|
|
67
|
+
border-radius: 50%;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.empty {
|
|
72
|
+
font-size: var(--ic-text-sm);
|
|
73
|
+
color: var(--ic-text-dim);
|
|
74
|
+
font-style: italic;
|
|
75
|
+
}
|
|
76
|
+
`];u([v({attribute:!1})],p.prototype,"categories",2);u([v({type:Boolean,attribute:"show-legend"})],p.prototype,"showLegend",2);p=u([_("ic-eviction-chart")],p);var k=Object.defineProperty,D=Object.getOwnPropertyDescriptor,l=(e,t,i,s)=>{for(var a=s>1?void 0:s?D(t,i):t,n=e.length-1,c;n>=0;n--)(c=e[n])&&(a=(s?c(t,i,a):c(a))||a);return s&&a&&k(t,i,a),a};const P=3e4;let o=class extends f{constructor(){super(...arguments),this.rpcClient=null,this.eventDispatcher=null,this._sse=null,this._reloadDebounce=null,this._loadState="loading",this._pipelines=[],this._dagCompactions=[],this._selectedPipeline=null,this._agentFilter="",this._agents=[],this._refreshInterval=null,this._rpcStatusUnsub=null}connectedCallback(){super.connectedCallback(),this._initSse()}_initSse(){!this.eventDispatcher||this._sse||(this._sse=new b(this,this.eventDispatcher,{"observability:token_usage":()=>{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("rpcClient")&&this.rpcClient&&this._tryLoad(),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()},P))}async _loadData(){if(!this.rpcClient||this.rpcClient.status!=="connected"){this._loadState="loaded";return}const e=this.rpcClient,t={};this._agentFilter&&(t.agentId=this._agentFilter);try{const i=await e.call("obs.context.pipeline",t);this._pipelines=Array.isArray(i)?i:[]}catch{this._pipelines=[]}!this._selectedPipeline&&this._pipelines.length>0&&(this._selectedPipeline=this._pipelines[0]),this._loadState="loaded",Promise.allSettled([e.call("obs.context.dag",t),e.call("agents.list")]).then(([i,s])=>{if(this._dagCompactions=i.status==="fulfilled"&&Array.isArray(i.value)?i.value:[],s.status==="fulfilled"){const a=s.value,n=Array.isArray(a)?a:Array.isArray(a.agents)?a.agents:[];this._agents=n.map(c=>typeof c=="string"?{id:c,name:c,provider:"",model:"",status:"active"}:c)}})}_onAgentFilter(e){this._agentFilter=e.target.value,this._selectedPipeline=null,this._loadData()}_onPipelineSelect(e){this._selectedPipeline=e}_formatTime(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}_formatNumber(e){return new Intl.NumberFormat("en-US").format(e)}_renderPipelineMetrics(){const e=this._pipelines.length>0?this._pipelines[0]:null;if(!e)return r`
|
|
77
|
+
<div class="section">
|
|
78
|
+
<div class="section-title">Pipeline Metrics</div>
|
|
79
|
+
<ic-empty-state
|
|
80
|
+
icon="activity"
|
|
81
|
+
message="No pipeline data available. Pipeline metrics appear after the context engine processes messages."
|
|
82
|
+
></ic-empty-state>
|
|
83
|
+
</div>
|
|
84
|
+
`;const i=[{label:"System",tokens:Math.max(0,e.tokensLoaded-e.tokensEvicted-e.tokensMasked-e.tokensCompacted),color:"var(--ic-accent)"},{label:"Evicted",tokens:e.tokensEvicted,color:"var(--ic-error)"},{label:"Masked",tokens:e.tokensMasked,color:"var(--ic-warning)"},{label:"Compacted",tokens:e.tokensCompacted,color:"var(--ic-info, #3b82f6)"}].filter(n=>n.tokens>0),s=this._pipelines.filter(n=>n.cacheHitTokens>0).length,a=this._pipelines.length>0?Math.round(s/this._pipelines.length*100):0;return r`
|
|
85
|
+
<div class="section">
|
|
86
|
+
<div class="section-title">Pipeline Metrics</div>
|
|
87
|
+
<div class="card">
|
|
88
|
+
<div class="metrics-grid">
|
|
89
|
+
<div class="budget-bar-container">
|
|
90
|
+
<ic-budget-segment-bar .segments=${i}></ic-budget-segment-bar>
|
|
91
|
+
</div>
|
|
92
|
+
<ic-metric-gauge
|
|
93
|
+
.value=${a}
|
|
94
|
+
label="Cache Hit Rate"
|
|
95
|
+
size="sm"
|
|
96
|
+
></ic-metric-gauge>
|
|
97
|
+
<ic-eviction-chart
|
|
98
|
+
.categories=${e.evictionCategories}
|
|
99
|
+
></ic-eviction-chart>
|
|
100
|
+
</div>
|
|
101
|
+
<div class="stat-badges">
|
|
102
|
+
<div class="stat-badge">
|
|
103
|
+
Masked <span class="stat-value">${this._formatNumber(e.tokensMasked)}</span> tokens
|
|
104
|
+
</div>
|
|
105
|
+
<div class="stat-badge">
|
|
106
|
+
Duration <span class="stat-value">${e.durationMs}</span>ms
|
|
107
|
+
</div>
|
|
108
|
+
<div class="stat-badge">
|
|
109
|
+
Thinking removed <span class="stat-value">${e.thinkingBlocksRemoved}</span>
|
|
110
|
+
</div>
|
|
111
|
+
<div class="stat-badge">
|
|
112
|
+
Budget <span class="stat-value">${Math.round(e.budgetUtilization*100)}%</span>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
`}_renderLayerWaterfall(){const e=this._pipelines.slice(0,10);return r`
|
|
118
|
+
<div class="section">
|
|
119
|
+
<div class="section-title">Layer Waterfall</div>
|
|
120
|
+
${e.length===0?r`<ic-empty-state icon="layers" message="No pipeline executions to display"></ic-empty-state>`:r`
|
|
121
|
+
<div class="execution-list">
|
|
122
|
+
${e.map(t=>r`
|
|
123
|
+
<button
|
|
124
|
+
class="execution-row ${this._selectedPipeline===t?"selected":""}"
|
|
125
|
+
@click=${()=>this._onPipelineSelect(t)}
|
|
126
|
+
>
|
|
127
|
+
<span class="exec-time">${this._formatTime(t.timestamp)}</span>
|
|
128
|
+
<span class="exec-agent">${t.agentId}</span>
|
|
129
|
+
<span class="exec-duration">${t.durationMs}ms</span>
|
|
130
|
+
<span class="exec-layers">${t.layerCount} layers</span>
|
|
131
|
+
</button>
|
|
132
|
+
`)}
|
|
133
|
+
</div>
|
|
134
|
+
${this._selectedPipeline&&this._selectedPipeline.layers.length>0?r`
|
|
135
|
+
<div class="card">
|
|
136
|
+
<ic-layer-waterfall
|
|
137
|
+
.layers=${this._selectedPipeline.layers}
|
|
138
|
+
.totalDurationMs=${this._selectedPipeline.durationMs}
|
|
139
|
+
></ic-layer-waterfall>
|
|
140
|
+
</div>
|
|
141
|
+
`:g}
|
|
142
|
+
`}
|
|
143
|
+
</div>
|
|
144
|
+
`}_renderDagPanel(){if(this._dagCompactions.length===0)return g;const e=this._dagCompactions.length,t=Math.round(this._dagCompactions.reduce((a,n)=>a+n.totalSummariesCreated,0)/e),i=Math.max(...this._dagCompactions.map(a=>a.maxDepthReached)),s=this._dagCompactions[0].durationMs;return r`
|
|
145
|
+
<div class="section">
|
|
146
|
+
<div class="section-title">DAG Compaction</div>
|
|
147
|
+
<div class="card">
|
|
148
|
+
<div class="dag-grid">
|
|
149
|
+
<div class="dag-stat">
|
|
150
|
+
<div class="dag-value">${e}</div>
|
|
151
|
+
<div class="dag-label">Total Compactions</div>
|
|
152
|
+
</div>
|
|
153
|
+
<div class="dag-stat">
|
|
154
|
+
<div class="dag-value">${t}</div>
|
|
155
|
+
<div class="dag-label">Avg Summaries</div>
|
|
156
|
+
</div>
|
|
157
|
+
<div class="dag-stat">
|
|
158
|
+
<div class="dag-value">${i}</div>
|
|
159
|
+
<div class="dag-label">Max Depth</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div class="dag-stat">
|
|
162
|
+
<div class="dag-value">${s}ms</div>
|
|
163
|
+
<div class="dag-label">Latest Duration</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
`}render(){return this._loadState==="loading"&&!this.rpcClient?r`<ic-skeleton-view variant="table"></ic-skeleton-view>`:this._loadState==="error"?r`
|
|
169
|
+
<div class="error-container">
|
|
170
|
+
<span class="error-message">Failed to load context engine data</span>
|
|
171
|
+
<button class="retry-btn" @click=${()=>this._tryLoad()}>Retry</button>
|
|
172
|
+
</div>
|
|
173
|
+
`:r`
|
|
174
|
+
<div class="context-engine-view">
|
|
175
|
+
<div class="filter-row">
|
|
176
|
+
${this._renderAgentFilter()}
|
|
177
|
+
</div>
|
|
178
|
+
${this._renderPipelineMetrics()}
|
|
179
|
+
${this._renderLayerWaterfall()}
|
|
180
|
+
${this._renderDagPanel()}
|
|
181
|
+
</div>
|
|
182
|
+
`}_renderAgentFilter(){return r`
|
|
183
|
+
<select class="filter-select" @change=${this._onAgentFilter}>
|
|
184
|
+
<option value="">All Agents</option>
|
|
185
|
+
${this._agents.map(e=>r`<option value=${e.id}>${e.id}</option>`)}
|
|
186
|
+
</select>
|
|
187
|
+
`}};o.styles=[m,x,h`
|
|
188
|
+
:host {
|
|
189
|
+
display: block;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.context-engine-view {
|
|
193
|
+
padding: 0;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.section {
|
|
197
|
+
margin-bottom: var(--ic-space-xl);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.section-title {
|
|
201
|
+
font-size: var(--ic-text-base);
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
color: var(--ic-text);
|
|
204
|
+
margin-bottom: var(--ic-space-md);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.card {
|
|
208
|
+
background: var(--ic-surface);
|
|
209
|
+
border: 1px solid var(--ic-border);
|
|
210
|
+
border-radius: var(--ic-radius-lg);
|
|
211
|
+
padding: var(--ic-space-lg);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.metrics-grid {
|
|
215
|
+
display: grid;
|
|
216
|
+
grid-template-columns: 1fr 1fr;
|
|
217
|
+
gap: var(--ic-space-md);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@media (max-width: 767px) {
|
|
221
|
+
.metrics-grid {
|
|
222
|
+
grid-template-columns: 1fr;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.budget-bar-container {
|
|
227
|
+
grid-column: 1 / -1;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.stat-badges {
|
|
231
|
+
display: flex;
|
|
232
|
+
gap: var(--ic-space-md);
|
|
233
|
+
flex-wrap: wrap;
|
|
234
|
+
margin-top: var(--ic-space-md);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.stat-badge {
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
gap: var(--ic-space-xs);
|
|
241
|
+
background: var(--ic-surface-2, #1f2937);
|
|
242
|
+
border: 1px solid var(--ic-border);
|
|
243
|
+
border-radius: var(--ic-radius-md);
|
|
244
|
+
padding: var(--ic-space-xs) var(--ic-space-sm);
|
|
245
|
+
font-size: var(--ic-text-sm);
|
|
246
|
+
color: var(--ic-text-dim);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.stat-badge .stat-value {
|
|
250
|
+
font-weight: 600;
|
|
251
|
+
color: var(--ic-text);
|
|
252
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.filter-row {
|
|
256
|
+
display: flex;
|
|
257
|
+
gap: var(--ic-space-sm);
|
|
258
|
+
flex-wrap: wrap;
|
|
259
|
+
margin-bottom: var(--ic-space-md);
|
|
260
|
+
align-items: center;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.filter-select {
|
|
264
|
+
background: var(--ic-surface);
|
|
265
|
+
border: 1px solid var(--ic-border);
|
|
266
|
+
border-radius: var(--ic-radius-md);
|
|
267
|
+
color: var(--ic-text);
|
|
268
|
+
padding: 0.375rem 0.625rem;
|
|
269
|
+
font-size: var(--ic-text-sm);
|
|
270
|
+
cursor: pointer;
|
|
271
|
+
font-family: inherit;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.filter-select:focus-visible {
|
|
275
|
+
outline: 2px solid var(--ic-accent);
|
|
276
|
+
outline-offset: 2px;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* Pipeline execution list */
|
|
280
|
+
.execution-list {
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-direction: column;
|
|
283
|
+
gap: var(--ic-space-xs);
|
|
284
|
+
margin-bottom: var(--ic-space-md);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.execution-row {
|
|
288
|
+
display: flex;
|
|
289
|
+
align-items: center;
|
|
290
|
+
gap: var(--ic-space-md);
|
|
291
|
+
padding: var(--ic-space-sm) var(--ic-space-md);
|
|
292
|
+
background: var(--ic-surface);
|
|
293
|
+
border: 1px solid var(--ic-border);
|
|
294
|
+
border-radius: var(--ic-radius-md);
|
|
295
|
+
cursor: pointer;
|
|
296
|
+
font-size: var(--ic-text-sm);
|
|
297
|
+
transition: background var(--ic-transition);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.execution-row:hover {
|
|
301
|
+
background: var(--ic-surface-2, #1f2937);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.execution-row.selected {
|
|
305
|
+
border-color: var(--ic-accent);
|
|
306
|
+
background: rgba(59, 130, 246, 0.1);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.execution-row .exec-time {
|
|
310
|
+
color: var(--ic-text-dim);
|
|
311
|
+
min-width: 6rem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.execution-row .exec-agent {
|
|
315
|
+
color: var(--ic-text);
|
|
316
|
+
font-weight: 500;
|
|
317
|
+
flex: 1;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.execution-row .exec-duration {
|
|
321
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
322
|
+
color: var(--ic-text-dim);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.execution-row .exec-layers {
|
|
326
|
+
color: var(--ic-text-dim);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* DAG panel */
|
|
330
|
+
.dag-grid {
|
|
331
|
+
display: grid;
|
|
332
|
+
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
|
333
|
+
gap: var(--ic-space-md);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.dag-stat {
|
|
337
|
+
text-align: center;
|
|
338
|
+
padding: var(--ic-space-md);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.dag-stat .dag-value {
|
|
342
|
+
font-size: 1.5rem;
|
|
343
|
+
font-weight: 700;
|
|
344
|
+
color: var(--ic-text);
|
|
345
|
+
font-family: var(--ic-font-mono, ui-monospace, monospace);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.dag-stat .dag-label {
|
|
349
|
+
font-size: var(--ic-text-xs);
|
|
350
|
+
color: var(--ic-text-dim);
|
|
351
|
+
text-transform: uppercase;
|
|
352
|
+
letter-spacing: 0.05em;
|
|
353
|
+
margin-top: var(--ic-space-xs);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/* Loading & error states */
|
|
357
|
+
.state-container {
|
|
358
|
+
display: flex;
|
|
359
|
+
align-items: center;
|
|
360
|
+
justify-content: center;
|
|
361
|
+
padding: 3rem;
|
|
362
|
+
color: var(--ic-text-dim);
|
|
363
|
+
font-size: 0.875rem;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.error-container {
|
|
367
|
+
display: flex;
|
|
368
|
+
flex-direction: column;
|
|
369
|
+
align-items: center;
|
|
370
|
+
gap: 0.75rem;
|
|
371
|
+
padding: 3rem;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.error-message {
|
|
375
|
+
color: var(--ic-error);
|
|
376
|
+
font-size: 0.875rem;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.retry-btn {
|
|
380
|
+
padding: 0.5rem 1rem;
|
|
381
|
+
background: var(--ic-surface);
|
|
382
|
+
border: 1px solid var(--ic-border);
|
|
383
|
+
border-radius: 0.375rem;
|
|
384
|
+
color: var(--ic-text);
|
|
385
|
+
font-size: 0.8125rem;
|
|
386
|
+
cursor: pointer;
|
|
387
|
+
font-family: inherit;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.retry-btn:hover {
|
|
391
|
+
background: var(--ic-surface-alt, #374151);
|
|
392
|
+
}
|
|
393
|
+
`];l([v({attribute:!1})],o.prototype,"rpcClient",2);l([v({attribute:!1})],o.prototype,"eventDispatcher",2);l([d()],o.prototype,"_loadState",2);l([d()],o.prototype,"_pipelines",2);l([d()],o.prototype,"_dagCompactions",2);l([d()],o.prototype,"_selectedPipeline",2);l([d()],o.prototype,"_agentFilter",2);l([d()],o.prototype,"_agents",2);o=l([_("ic-context-engine-view")],o);export{o as IcContextEngineView};
|