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,149 @@
1
+ import{s as p,f as v,i as f,n as d,r as b,a as h,A as m,b as u,t as g}from"./index-CEcM1R_C.js";var x=Object.defineProperty,y=Object.getOwnPropertyDescriptor,o=(t,e,i,a)=>{for(var r=a>1?void 0:a?y(e,i):e,n=t.length-1,l;n>=0;n--)(l=t[n])&&(r=(a?l(e,i,r):l(r))||r);return a&&r&&x(e,i,r),r};let s=class extends h{constructor(){super(...arguments),this.open=!1,this.variables=[],this.pipelineLabel="",this._values={},this._onKeyDown=t=>{if(t.key==="Escape"){t.preventDefault(),this._fireCancel();return}if(t.key==="Tab"){const e=this.shadowRoot?.querySelectorAll("input:not([disabled]), button:not([disabled])");if(!e||e.length===0)return;const i=e[0],a=e[e.length-1],r=this.shadowRoot?.activeElement;t.shiftKey&&r===i?(t.preventDefault(),a.focus()):!t.shiftKey&&r===a&&(t.preventDefault(),i.focus())}}}updated(t){if(t.has("open")&&this.open){this._values={};for(const e of this.variables)this._values[e]="";this.updateComplete.then(()=>{this.shadowRoot?.querySelector(".field-input")?.focus()})}}_onBackdropClick(t){t.target.classList.contains("backdrop")&&this._fireCancel()}_onInput(t,e){const i=e.target.value;this._values={...this._values,[t]:i}}_fireConfirm(){const t={};for(const[e,i]of Object.entries(this._values))t[e]=i.trim();this.dispatchEvent(new CustomEvent("confirm",{detail:{values:t}}))}_fireCancel(){this.dispatchEvent(new CustomEvent("cancel"))}get _allFilled(){return this.variables.every(t=>(this._values[t]??"").trim().length>0)}render(){if(!this.open)return m;const t=this.pipelineLabel?`Run: ${this.pipelineLabel}`:"Run Pipeline";return u`
2
+ <div
3
+ class="backdrop"
4
+ @click=${this._onBackdropClick}
5
+ @keydown=${this._onKeyDown}
6
+ >
7
+ <div
8
+ class="dialog"
9
+ role="dialog"
10
+ aria-modal="true"
11
+ aria-labelledby="variable-prompt-title"
12
+ >
13
+ <h2 class="title" id="variable-prompt-title">${t}</h2>
14
+ ${this.variables.map(e=>u`
15
+ <div class="field">
16
+ <label class="field-label">${e}</label>
17
+ <input
18
+ class="field-input"
19
+ type="text"
20
+ placeholder="Enter value..."
21
+ .value=${this._values[e]??""}
22
+ @input=${i=>this._onInput(e,i)}
23
+ />
24
+ </div>
25
+ `)}
26
+ <div class="buttons">
27
+ <button class="cancel-btn" @click=${this._fireCancel}>Cancel</button>
28
+ <button
29
+ class="run-btn"
30
+ ?disabled=${!this._allFilled}
31
+ @click=${this._fireConfirm}
32
+ >
33
+ Run
34
+ </button>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ `}};s.styles=[p,v,f`
39
+ :host {
40
+ display: contents;
41
+ }
42
+
43
+ .backdrop {
44
+ position: fixed;
45
+ inset: 0;
46
+ background: rgba(0, 0, 0, 0.6);
47
+ z-index: 9999;
48
+ display: flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ }
52
+
53
+ .dialog {
54
+ max-width: 28rem;
55
+ width: calc(100% - var(--ic-space-lg) * 2);
56
+ max-height: calc(100vh - var(--ic-space-lg) * 2);
57
+ overflow-y: auto;
58
+ background: var(--ic-surface);
59
+ border: 1px solid var(--ic-border);
60
+ border-radius: var(--ic-radius-lg);
61
+ padding: var(--ic-space-lg);
62
+ box-shadow: var(--ic-shadow-lg);
63
+ }
64
+
65
+ .title {
66
+ font-size: var(--ic-text-lg);
67
+ font-weight: 600;
68
+ color: var(--ic-text);
69
+ margin: 0 0 var(--ic-space-md) 0;
70
+ }
71
+
72
+ .field {
73
+ margin-bottom: var(--ic-space-md);
74
+ }
75
+
76
+ .field-label {
77
+ display: block;
78
+ font-size: var(--ic-text-sm);
79
+ font-weight: 500;
80
+ color: var(--ic-text-muted);
81
+ margin-bottom: 4px;
82
+ }
83
+
84
+ .field-input {
85
+ width: 100%;
86
+ padding: 8px 12px;
87
+ background: var(--ic-surface-2);
88
+ border: 1px solid var(--ic-border);
89
+ border-radius: var(--ic-radius-md);
90
+ color: var(--ic-text);
91
+ font-size: var(--ic-text-sm);
92
+ font-family: inherit;
93
+ }
94
+
95
+ .field-input:focus {
96
+ border-color: var(--ic-accent);
97
+ outline: none;
98
+ }
99
+
100
+ .field-input::placeholder {
101
+ color: var(--ic-text-dim);
102
+ }
103
+
104
+ .buttons {
105
+ display: flex;
106
+ justify-content: flex-end;
107
+ gap: var(--ic-space-sm);
108
+ margin-top: var(--ic-space-lg);
109
+ }
110
+
111
+ button {
112
+ padding: var(--ic-space-sm) var(--ic-space-md);
113
+ border-radius: var(--ic-radius-md);
114
+ font-size: var(--ic-text-sm);
115
+ font-family: inherit;
116
+ cursor: pointer;
117
+ transition: background var(--ic-transition), border-color var(--ic-transition);
118
+ }
119
+
120
+ .cancel-btn {
121
+ background: transparent;
122
+ border: 1px solid var(--ic-border);
123
+ color: var(--ic-text-muted);
124
+ }
125
+
126
+ .cancel-btn:hover {
127
+ border-color: var(--ic-text-dim);
128
+ color: var(--ic-text);
129
+ }
130
+
131
+ .run-btn {
132
+ background: var(--ic-accent);
133
+ border: 1px solid var(--ic-accent);
134
+ color: #fff;
135
+ }
136
+
137
+ .run-btn:hover {
138
+ background: var(--ic-accent-hover);
139
+ }
140
+
141
+ .run-btn:disabled {
142
+ opacity: 0.5;
143
+ cursor: not-allowed;
144
+ }
145
+
146
+ .run-btn:disabled:hover {
147
+ background: var(--ic-accent);
148
+ }
149
+ `];o([d({type:Boolean,reflect:!0})],s.prototype,"open",2);o([d({type:Array})],s.prototype,"variables",2);o([d()],s.prototype,"pipelineLabel",2);o([b()],s.prototype,"_values",2);s=o([g("ic-variable-prompt")],s);const c=/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g;function w(t){const e=new Set;for(const i of t){let a;for(c.lastIndex=0;(a=c.exec(i))!==null;)e.add(a[1])}return[...e].sort()}function k(t,e){return t.replace(c,(i,a)=>a in e?e[a]:i)}export{w as e,k as s};
@@ -0,0 +1,118 @@
1
+ import{s as m,f as u,i as v,n as l,r as b,a as h,A as p,b as d,t as f}from"./index-CEcM1R_C.js";var x=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(e,t,o,a)=>{for(var r=a>1?void 0:a?y(t,o):t,c=e.length-1,n;c>=0;c--)(n=e[c])&&(r=(a?n(t,o,r):n(r))||r);return a&&r&&x(t,o,r),r};let i=class extends h{constructor(){super(...arguments),this.label="",this.items=[],this.placeholder="Add item...",this._inputValue=""}_addItem(){const e=this._inputValue.trim();if(!e)return;const t=[...this.items,e];this._inputValue="",this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}_removeItem(e){const t=this.items.filter((o,a)=>a!==e);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}_onKeyDown(e){e.key==="Enter"&&(e.preventDefault(),this._addItem())}render(){return d`
2
+ ${this.label?d`<div class="editor-label">${this.label}</div>`:p}
3
+ ${this.items.length>0?d`
4
+ <div class="item-list">
5
+ ${this.items.map((e,t)=>d`
6
+ <div class="item-row">
7
+ <span class="item-text">${e}</span>
8
+ <button
9
+ class="remove-btn"
10
+ aria-label="Remove ${e}"
11
+ @click=${()=>this._removeItem(t)}
12
+ >\u2715</button>
13
+ </div>
14
+ `)}
15
+ </div>
16
+ `:p}
17
+ <div class="add-row">
18
+ <input
19
+ class="add-input"
20
+ type="text"
21
+ placeholder=${this.placeholder}
22
+ .value=${this._inputValue}
23
+ @input=${e=>{this._inputValue=e.target.value}}
24
+ @keydown=${this._onKeyDown}
25
+ />
26
+ <button class="add-btn" @click=${()=>this._addItem()}>Add</button>
27
+ </div>
28
+ `}};i.styles=[m,u,v`
29
+ :host {
30
+ display: block;
31
+ }
32
+
33
+ .editor-label {
34
+ font-size: var(--ic-text-sm);
35
+ font-weight: 600;
36
+ color: var(--ic-text-muted);
37
+ margin-bottom: var(--ic-space-sm);
38
+ }
39
+
40
+ .item-list {
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: var(--ic-space-xs);
44
+ margin-bottom: var(--ic-space-sm);
45
+ }
46
+
47
+ .item-row {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: var(--ic-space-sm);
51
+ background: var(--ic-surface);
52
+ border: 1px solid var(--ic-border);
53
+ border-radius: var(--ic-radius-md);
54
+ padding: var(--ic-space-xs) var(--ic-space-sm);
55
+ }
56
+
57
+ .item-text {
58
+ flex: 1;
59
+ font-size: var(--ic-text-sm);
60
+ color: var(--ic-text);
61
+ word-break: break-all;
62
+ }
63
+
64
+ .remove-btn {
65
+ background: none;
66
+ border: none;
67
+ color: var(--ic-text-dim);
68
+ cursor: pointer;
69
+ padding: 2px 4px;
70
+ font-size: var(--ic-text-xs);
71
+ line-height: 1;
72
+ border-radius: var(--ic-radius-sm);
73
+ }
74
+
75
+ .remove-btn:hover {
76
+ color: var(--ic-error);
77
+ }
78
+
79
+ .add-row {
80
+ display: flex;
81
+ gap: var(--ic-space-xs);
82
+ }
83
+
84
+ .add-input {
85
+ flex: 1;
86
+ padding: 0.375rem 0.5rem;
87
+ background: var(--ic-surface-2);
88
+ border: 1px solid var(--ic-border);
89
+ border-radius: var(--ic-radius-md);
90
+ color: var(--ic-text);
91
+ font-family: inherit;
92
+ font-size: var(--ic-text-sm);
93
+ }
94
+
95
+ .add-input:focus {
96
+ outline: none;
97
+ border-color: var(--ic-accent);
98
+ }
99
+
100
+ .add-input::placeholder {
101
+ color: var(--ic-text-dim);
102
+ }
103
+
104
+ .add-btn {
105
+ padding: 0.375rem 0.75rem;
106
+ background: var(--ic-accent);
107
+ color: white;
108
+ border: none;
109
+ border-radius: var(--ic-radius-md);
110
+ font-size: var(--ic-text-sm);
111
+ cursor: pointer;
112
+ white-space: nowrap;
113
+ }
114
+
115
+ .add-btn:hover {
116
+ opacity: 0.9;
117
+ }
118
+ `];s([l()],i.prototype,"label",2);s([l({type:Array})],i.prototype,"items",2);s([l()],i.prototype,"placeholder",2);s([b()],i.prototype,"_inputValue",2);i=s([f("ic-array-editor")],i);
@@ -0,0 +1,75 @@
1
+ import{s as p,i as v,n as d,a as h,b as i,t as u}from"./index-CEcM1R_C.js";var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,c=(r,e,a,s)=>{for(var t=s>1?void 0:s?b(e,a):e,o=r.length-1,l;o>=0;o--)(l=r[o])&&(t=(s?l(e,a,t):l(t))||t);return s&&t&&f(e,a,t),t};let n=class extends h{constructor(){super(...arguments),this.items=[]}_onNavigate(r){this.dispatchEvent(new CustomEvent("navigate",{detail:r}))}render(){const r=this.items;return i`
2
+ <nav aria-label="Breadcrumb">
3
+ <ol>
4
+ ${r.map((e,a)=>{const s=a===r.length-1;return i`
5
+ <li>
6
+ ${a>0?i`<span class="separator" aria-hidden="true">/</span>`:""}
7
+ ${s?i`<span class="current" aria-current="page">${e.label}</span>`:e.route?i`<button
8
+ class="link"
9
+ @click=${()=>this._onNavigate(e.route)}
10
+ >${e.label}</button>`:i`<span class="label">${e.label}</span>`}
11
+ </li>
12
+ `})}
13
+ </ol>
14
+ </nav>
15
+ `}};n.styles=[p,v`
16
+ :host {
17
+ display: block;
18
+ font-size: var(--ic-text-sm);
19
+ }
20
+
21
+ ol {
22
+ list-style: none;
23
+ margin: 0;
24
+ padding: 0;
25
+ display: flex;
26
+ align-items: center;
27
+ gap: var(--ic-space-xs);
28
+ overflow: hidden;
29
+ }
30
+
31
+ li {
32
+ display: flex;
33
+ align-items: center;
34
+ gap: var(--ic-space-xs);
35
+ min-width: 0;
36
+ }
37
+
38
+ .separator {
39
+ color: var(--ic-text-dim);
40
+ flex-shrink: 0;
41
+ }
42
+
43
+ .link {
44
+ color: var(--ic-text-muted);
45
+ cursor: pointer;
46
+ background: none;
47
+ border: none;
48
+ font-family: inherit;
49
+ font-size: inherit;
50
+ padding: 0;
51
+ white-space: nowrap;
52
+ overflow: hidden;
53
+ text-overflow: ellipsis;
54
+ transition: color var(--ic-transition);
55
+ }
56
+
57
+ .link:hover {
58
+ color: var(--ic-accent);
59
+ }
60
+
61
+ .current {
62
+ color: var(--ic-text);
63
+ font-weight: 500;
64
+ white-space: nowrap;
65
+ overflow: hidden;
66
+ text-overflow: ellipsis;
67
+ }
68
+
69
+ .label {
70
+ color: var(--ic-text-muted);
71
+ white-space: nowrap;
72
+ overflow: hidden;
73
+ text-overflow: ellipsis;
74
+ }
75
+ `];c([d({type:Array})],n.prototype,"items",2);n=c([u("ic-breadcrumb")],n);
@@ -0,0 +1,64 @@
1
+ import{s as c,i as m,n as p,a as g,b as n,t as h}from"./index-CEcM1R_C.js";var u=Object.defineProperty,v=Object.getOwnPropertyDescriptor,d=(t,e,i,r)=>{for(var s=r>1?void 0:r?v(e,i):e,l=t.length-1,o;l>=0;l--)(o=t[l])&&(s=(r?o(e,i,s):o(s))||s);return r&&s&&u(e,i,s),s};let a=class extends g{constructor(){super(...arguments),this.segments=[],this.total=0}_getTotal(){return this.total>0?this.total:this.segments.reduce((t,e)=>t+e.tokens,0)}render(){const t=this._getTotal();return t===0||this.segments.length===0?n`<div class="empty">No budget data</div>`:n`
2
+ <div class="bar" role="img" aria-label="Token budget breakdown">
3
+ ${this.segments.map(e=>{const i=e.tokens/t*100;return n`
4
+ <div
5
+ class="segment"
6
+ style="width: ${i}%; background: ${e.color};"
7
+ title="${e.label}: ${e.tokens.toLocaleString()} tokens (${i.toFixed(1)}%)"
8
+ ></div>
9
+ `})}
10
+ </div>
11
+ <div class="legend">
12
+ ${this.segments.map(e=>n`
13
+ <span class="legend-item">
14
+ <span class="legend-dot" style="background: ${e.color};"></span>
15
+ ${e.label}
16
+ </span>
17
+ `)}
18
+ </div>
19
+ `}};a.styles=[c,m`
20
+ :host {
21
+ display: block;
22
+ }
23
+
24
+ .bar {
25
+ display: flex;
26
+ height: 20px;
27
+ border-radius: var(--ic-radius-sm, 4px);
28
+ overflow: hidden;
29
+ }
30
+
31
+ .segment {
32
+ min-width: 2px;
33
+ height: 100%;
34
+ transition: width var(--ic-transition, 150ms ease);
35
+ }
36
+
37
+ .legend {
38
+ display: flex;
39
+ flex-wrap: wrap;
40
+ gap: var(--ic-space-sm);
41
+ margin-top: var(--ic-space-sm);
42
+ }
43
+
44
+ .legend-item {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ gap: 4px;
48
+ font-size: var(--ic-text-xs);
49
+ color: var(--ic-text-dim);
50
+ }
51
+
52
+ .legend-dot {
53
+ width: 8px;
54
+ height: 8px;
55
+ border-radius: 50%;
56
+ flex-shrink: 0;
57
+ }
58
+
59
+ .empty {
60
+ font-size: var(--ic-text-sm);
61
+ color: var(--ic-text-dim);
62
+ font-style: italic;
63
+ }
64
+ `];d([p({attribute:!1})],a.prototype,"segments",2);d([p({type:Number})],a.prototype,"total",2);a=d([h("ic-budget-segment-bar")],a);