agents-relay 2.0.266 → 2.0.268

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.
@@ -1,223 +1,3 @@
1
- export const dashboardStyles = ` <style>
2
- :root { color-scheme: light dark; --bg:#f3f5f8; --surface:#fff; --surface2:#f8fafc; --border:#d8dee7; --text:#17202b; --muted:#687587; --accent:#285f86; --accent2:#e8f1f8; --ok:#19703a; --warn:#8b5b08; --bad:#a33c3c; --shadow:0 1px 2px rgba(15,23,42,.06); }
3
- * { box-sizing:border-box; }
4
- [hidden] { display:none !important; }
5
- body { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font:14px/1.45 ui-sans-serif,system-ui,sans-serif; }
6
- header { position:sticky; top:0; z-index:3; background:var(--surface); border-bottom:1px solid var(--border); padding:.8rem 1rem; }
7
- .brand { display:flex; align-items:baseline; gap:.65rem; min-width:0; }
8
- .version { margin-left:auto; color:var(--muted); font-size:.72rem; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; white-space:nowrap; }
9
- .runtime-summary { display:flex; gap:.4rem; align-items:center; flex-wrap:wrap; margin-top:.55rem; }
10
- .runtime-stat { padding:.18rem .45rem; border:1px solid var(--border); border-radius:999px; background:var(--surface2); color:var(--muted); font-size:.72rem; white-space:nowrap; }
11
- .runtime-stat strong { color:var(--text); }
12
- h1 { margin:0; font-size:1.08rem; letter-spacing:-.02em; }
13
- .tagline,.subtle { color:var(--muted); font-size:.78rem; }
14
- .warning-banner { margin:.65rem 0 0; padding:.5rem .65rem; border:1px solid #e6bf62; border-radius:.4rem; background:#fff4d6; color:#6f4b00; font-size:.78rem; font-weight:700; }
15
- .tagline { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
16
- nav[role="tablist"] { display:flex; gap:.3rem; margin-top:.65rem; }
17
- nav button { border:0; border-radius:.35rem; background:transparent; color:var(--muted); padding:.38rem .68rem; font:inherit; font-weight:700; cursor:pointer; }
18
- nav button[aria-selected="true"] { background:var(--accent); color:#fff; }
19
- button:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
20
- main { max-width:1500px; margin:auto; padding:1rem; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1rem; align-items:start; }
21
- .panel { min-width:0; background:var(--surface); border:1px solid var(--border); border-radius:.55rem; box-shadow:var(--shadow); }
22
- .panel-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.65rem .75rem; border-bottom:1px solid var(--border); }
23
- .panel-head h2,.panel-head h3 { margin:0; color:var(--muted); font-size:.75rem; letter-spacing:.07em; text-transform:uppercase; min-width:0; }\n #workspace-heading { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n #selected-job-title { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
24
- .panel-actions { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; min-width:0; }
25
- #jobs-view .panel-head { display:flex; align-items:center; justify-content:space-between; gap:.65rem; }
26
- #jobs-view .panel-actions { display:flex; align-items:center; justify-content:flex-end; gap:.4rem; flex-wrap:wrap; min-width:0; }
27
- .job-filters,.jobs-actions { display:flex; align-items:center; gap:.35rem; min-width:0; }
28
- .job-filters { flex:1 1 auto; }
29
- .jobs-actions { flex:none; }
30
- .job-filter,.refresh-button { min-height:2rem; border:1px solid var(--border); border-radius:.45rem; background:var(--surface); color:var(--text); padding:.3rem .5rem; font:inherit; font-size:.72rem; font-weight:650; }
31
- .job-filter { width:8rem; max-width:8rem; flex:none; }
32
- #status-filter { width:9.5rem; max-width:9.5rem; font-size:.66rem; }
33
- #repo-filter { width:8rem; max-width:8rem; }
34
- .refresh-button { color:var(--muted); font-weight:700; cursor:pointer; transition:border-color .15s ease,background .15s ease; }
35
- .refresh-button:hover { background:#ffffff10; color:var(--text); }
36
- .job-filter:focus-visible,.refresh-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
37
- .jobs-feedback { flex:none; min-width:0; max-width:12rem; font-size:.67rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
38
- .jobs-feedback:empty { display:none; }
39
- .jobs-feedback:not(:empty) { flex-basis:100%; max-width:none; text-align:right; white-space:normal; }
40
- .job-search { flex:1 1 11rem; width:12rem; min-width:8rem; max-width:18rem; border:1px solid var(--border); border-radius:.45rem; background:var(--surface); color:var(--text); padding:.3rem .5rem; font:inherit; font-size:.72rem; }
41
- .job-search:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
42
- .quick-filter { border:1px solid var(--border); border-radius:.35rem; background:var(--surface); color:var(--muted); padding:.27rem .42rem; font:inherit; font-size:.7rem; font-weight:750; cursor:pointer; }
43
- .quick-filter[aria-pressed="true"] { border-color:var(--accent); background:var(--accent2); color:var(--accent); }
44
- .refresh-button { border:1px solid var(--border); border-radius:.35rem; background:var(--surface); color:var(--muted); padding:.28rem .55rem; font:inherit; font-size:.72rem; font-weight:700; cursor:pointer; }
45
- .refresh-button:disabled { cursor:default; opacity:.55; }
46
- .icon-button { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:2.5rem; height:2.5rem; padding:0; border:0; border-radius:50%; color:var(--muted); background:transparent; cursor:pointer; }
47
- .icon-button svg { display:block; width:1.3rem; height:1.3rem; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
48
- .icon-button:hover { color:var(--accent); background:var(--accent2); }
49
- .icon-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
50
- .icon-button:disabled { cursor:default; opacity:.4; }
51
- .job-status-button[data-state="ACTIVE"],.job-status-button[data-state="COMPLETED"] { color:var(--ok); background:#e5f3e9; }
52
- .job-status-button[data-state="DRAFT"] { color:#3f51b5; background:#eef2ff; }
53
- .job-status-button[data-state="CANCELLED"],.job-status-button[data-state="IDLE"] { color:var(--muted); background:#edf0f4; }
54
- .job-status-button .status-center { fill:currentColor; stroke:none; }
55
- .job-state-select[data-state="ACTIVE"],.job-state-select[data-state="COMPLETED"] { color:var(--ok); background:#e5f3e9; border-color:transparent; }
56
- .job-state-select[data-state="DRAFT"] { color:#3f51b5; background:#eef2ff; border-color:transparent; }
57
- .job-state-select[data-state="CANCELLED"] { color:var(--muted); background:#edf0f4; border-color:transparent; }
58
- .mobile-only { display:none; }
59
- .panel-body { padding:.75rem; overflow:auto; max-height:calc(100vh - 11.5rem); }
60
- #jobs-workspace > .panel:first-child .panel-body { overflow:visible; max-height:none; }
61
- .jobs-panel { grid-row:1/span 2; }
62
- .workspace { display:grid; gap:1rem; }
63
- .job-list,.tree,.event-list { list-style:none; margin:0; padding:0; }
64
- .job-list { display:grid; gap:.35rem; }
65
- .job-row { display:grid; gap:.2rem; padding:.35rem .45rem; border:1px solid transparent; border-radius:.4rem; cursor:pointer; }
66
- .job-row[aria-current="true"] { border-color:var(--accent); background:var(--accent2); }
67
- .job-row.complete-unmerged { border-color:#d69a1b; background:#fff8df; }
68
- .job-row.complete-unmerged[aria-current="true"] { border-color:#b77900; background:#fff0bd; }
69
- .job-content { min-width:0; display:grid; gap:.2rem; }
70
- .job-button { min-width:0; display:block; padding:.12rem 0; border:0; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
71
- .job-title { font-weight:750; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
72
- .job-last-line { display:flex; align-items:center; justify-content:space-between; gap:.5rem; min-width:0; }
73
- .job-last-line .subtle:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
74
- .job-last-line .subtle:last-child { flex:none; white-space:nowrap; }
75
- .job-primary { display:flex; align-items:center; justify-content:space-between; gap:.45rem; min-width:0; }
76
- .job-status-line { display:flex; align-items:center; gap:.3rem; min-width:0; white-space:nowrap; }
77
- .job-status-line .badge { flex:0 0 auto; }
78
- .badge { display:inline-flex; align-items:center; border-radius:999px; padding:.06rem .42rem; min-height:1.35rem; font-size:.68rem; font-weight:800; }
79
- .badge.ACTIVE,.badge.RUNNING,.badge.SUCCEEDED,.badge.COMPLETED,.badge.MERGED { background:#e5f3e9; color:var(--ok); }
80
- .badge.BLOCKED,.badge.DRAFT,.badge.QUEUED,.badge.WAITING,.badge.AWAITING_DECISION,.badge.OPEN { background:#fff1d2; color:var(--warn); }
81
- .badge.FAILED { background:#ffe8e8; color:var(--bad); }
82
- .badge.IDLE,.badge.CANCELLED { background:#edf0f4; color:var(--muted); }
83
- .badge.DRAFT { background:#eef2ff; color:#3f51b5; }
84
- .badge.shortcut-mode { background:var(--accent2); color:var(--accent); border:1px solid var(--accent); }
85
- .badge.MERGE_PENDING { background:#ffe3a3; color:#7a4a00; }
86
- .details-dialog { width:min(850px,calc(100vw - 2rem)); max-height:85vh; overflow:auto; border:1px solid var(--border); border-radius:.6rem; background:var(--surface); color:var(--text); box-shadow:0 18px 55px #0004; padding:1rem; } .details-dialog::backdrop { background:#17202b99; } .details-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; position:sticky; top:-1rem; background:var(--surface); padding:.5rem 0; } .details-dialog pre { white-space:pre-wrap; overflow-wrap:anywhere; background:var(--surface2); padding:.7rem; border-radius:.4rem; } .details-dialog h3 { font-size:.8rem; margin:1rem 0 .3rem; }
87
- .job-summary,.detail-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
88
- .detail-group { min-width:0; padding:.5rem; background:var(--surface2); border:1px solid var(--border); border-radius:.4rem; }
89
- .detail-label { margin:0; color:var(--muted); font-size:.66rem; text-transform:uppercase; letter-spacing:.04em; }
90
- .detail-value { margin:.12rem 0 0; font-weight:650; overflow-wrap:anywhere; }
91
- .section-title { margin:.8rem 0 .35rem; color:var(--muted); font-size:.72rem; letter-spacing:.05em; text-transform:uppercase; }
92
- ul.tree { display:grid; gap:.25rem; min-width:0; max-width:100%; }
93
- ul.tree li { min-width:0; max-width:100%; }
94
- ul.tree ul { width:calc(100% - .6rem); min-width:0; max-width:calc(100% - .6rem); list-style:none; margin:.2rem 0 .1rem .6rem; padding-left:.6rem; border-left:1px solid var(--border); }
95
- .task-line { display:flex; align-items:center; gap:.2rem; min-width:0; }
96
- .task-fold { flex:0 0 auto; width:1.35rem; padding:.32rem 0; border:0; background:transparent; color:var(--muted); font:inherit; cursor:pointer; }
97
- .task-row { width:100%; max-width:100%; overflow:hidden; flex:1 1 0; display:flex; align-items:center; gap:.4rem; min-width:0; padding:.32rem .38rem; border:0; border-radius:.35rem; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; }
98
- .task-row[aria-current="true"] { background:var(--accent2); }
99
- .task-row .badge { flex:0 0 auto; }
100
- .task-id { min-width:0; max-width:100%; flex:1 1 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font: .77rem ui-monospace,SFMono-Regular,Menlo,monospace; }
101
- .task-actions { display:flex; justify-content:flex-end; gap:.25rem; margin-bottom:.5rem; }
102
- .task-link { color:var(--accent); font-weight:700; }
103
- .agent-graph { display:grid; gap:.45rem; margin-top:.55rem; padding:.55rem; border:1px solid var(--border); border-radius:.4rem; background:var(--surface2); overflow:auto; }
104
- .agent-wave { display:flex; align-items:center; gap:.4rem; min-width:max-content; }
105
- .agent-node { padding:.32rem .48rem; border:1px solid var(--border); border-radius:.35rem; background:var(--surface); font:.73rem ui-monospace,SFMono-Regular,Menlo,monospace; }
106
- .agent-arrow { color:var(--muted); font-weight:800; }
107
- .agent-graph-source { margin:.1rem 0 0; padding:.45rem; border-radius:.35rem; background:var(--surface); color:var(--muted); font:.7rem/1.45 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre; overflow:auto; }
108
- .event-list { display:grid; gap:.45rem; }
109
- .event-item { padding:.34rem .42rem .42rem; border-left:3px solid transparent; border-bottom:1px solid var(--border); border-radius:.28rem; }
110
- .event-item.event-error { border-left-color:var(--bad); background:#fff4f4; }
111
- .event-item.event-error .event-kind,.event-item.event-error .event-message { color:var(--bad); }
112
- .event-item.event-warn { border-left-color:var(--warn); background:#fff9eb; }
113
- .event-item.event-warn .event-kind { color:var(--warn); }
114
- .event-meta { display:flex; flex-wrap:wrap; gap:.4rem; color:var(--muted); font-size:.68rem; }
115
- .event-kind { color:var(--accent); font-weight:800; }
116
- .event-message { margin:.12rem 0 0; overflow-wrap:anywhere; }
117
- #usage-view,#graphs-view,#rules-view,#shortcuts-view,#worker-rules-view { grid-column:1 / -1; }
118
- .graphs-browser { display:grid; grid-template-columns:minmax(190px,260px) minmax(0,1fr); gap:.75rem; min-height:60vh; }
119
- .graph-list { display:grid; align-content:start; gap:.35rem; }
120
- .graph-button { width:100%; display:grid; gap:.08rem; padding:.48rem .55rem; border:1px solid var(--border); border-radius:.4rem; background:var(--surface2); color:var(--text); text-align:left; font:inherit; cursor:pointer; }
121
- .graph-button[aria-current="true"] { border-color:var(--accent); background:var(--accent2); }
122
- .graph-button strong { font-size:.78rem; }
123
- .graph-button span { color:var(--muted); font:.66rem ui-monospace,SFMono-Regular,Menlo,monospace; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
124
- .graph-preview { min-width:0; display:grid; align-content:start; gap:.55rem; }
125
- .graph-preview-head { display:flex; justify-content:space-between; gap:.7rem; align-items:baseline; flex-wrap:wrap; }
126
- .graph-preview-head h3 { margin:0; font-size:.95rem; }
127
- .graph-canvas { min-height:24rem; display:grid; place-items:center; overflow:auto; padding:1rem; border:1px solid var(--border); border-radius:.45rem; background:var(--surface2); }
128
- .graph-canvas svg { max-width:none; height:auto; }
129
- .graph-canvas svg rect.background { display:none; }
130
- .graph-canvas svg .edgeLabel rect, .graph-canvas svg .edgeLabel .labelBkg, .graph-canvas svg .edgeLabel .background { fill:transparent !important; opacity:0 !important; }
131
- .graph-navigation { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-bottom:.7rem; }
132
- .graph-canvas .node.drillable { cursor:pointer; }
133
- .graph-canvas .node.drillable text, .graph-canvas .node.drillable tspan { fill:#2367b1; }
134
- .jel-chart .node.jel-inspectable { cursor:pointer; }
135
- .jel-chart .node.jel-inspectable:focus-visible { outline:2px solid #2563eb; outline-offset:3px; }
136
- .jel-source { overflow:auto; white-space:pre; font:12px/1.5 ui-monospace,monospace; }
137
- .graph-dialog { box-sizing:border-box; width:98vw; height:96vh; height:96dvh; max-width:none; max-height:none; padding:.55rem; border:1px solid var(--border); border-radius:.5rem; background:var(--surface); color:var(--text); }
138
- .graph-dialog[open] { display:flex; flex-direction:column; gap:.25rem; }
139
- .graph-dialog::backdrop { background:#17202b99; }
140
- .graph-dialog-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.7rem; padding:.3rem .5rem; }
141
- .graph-dialog-viewport { flex:1; min-height:0; min-width:0; overflow:auto; cursor:grab; background:var(--surface2); border:1px solid var(--border); border-radius:.4rem; }
142
- .graph-dialog-viewport:active { cursor:grabbing; }
143
- .graph-dialog-viewport .graph-canvas { display:grid; width:max-content; min-width:100%; min-height:100%; overflow:visible; }
144
- .graph-canvas .node text { pointer-events:none; }
145
- .graph-source { margin:0; max-height:22rem; overflow:auto; padding:.7rem; border:1px solid var(--border); border-radius:.4rem; background:var(--surface2); color:var(--muted); font:.72rem/1.5 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre; }
146
- .graph-source-details summary { cursor:pointer; color:var(--muted); font-size:.74rem; font-weight:700; }
147
- .rules-editor { display:grid; gap:.65rem; }
148
- .rules-help { margin:0; color:var(--muted); font-size:.8rem; }
149
- .rules-textarea { width:100%; min-height:55vh; resize:vertical; border:1px solid var(--border); border-radius:.45rem; background:var(--surface2); color:var(--text); padding:.8rem; font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace; }
150
- .rules-footer { display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap; }
151
- .rules-save { border:1px solid var(--accent); border-radius:.35rem; background:var(--accent); color:#fff; padding:.38rem .8rem; font:inherit; font-weight:750; cursor:pointer; }
152
- .rules-save:disabled { opacity:.55; cursor:default; }
153
- .usage-providers { display:grid; gap:.55rem; }
154
- .usage-provider { display:grid; grid-template-columns:minmax(130px,180px) minmax(0,1fr); gap:1rem; align-items:center; padding:.7rem .8rem; border:1px solid var(--border); border-radius:.45rem; background:var(--surface2); }
155
- .usage-provider h3 { margin:0; font-size:.86rem; }
156
- .usage-bars { display:grid; gap:1rem; }
157
- .usage-row { display:grid; gap:.35rem; }
158
- .usage-label { display:flex; justify-content:space-between; gap:1rem; font-weight:700; }
159
- .usage-track { height:.72rem; overflow:hidden; border:1px solid var(--border); border-radius:999px; background:var(--surface2); }
160
- .usage-fill { height:100%; width:0; border-radius:inherit; background:var(--accent); transition:width .2s ease; }
161
- .usage-details { border-top:1px solid var(--border); padding-top:.45rem; }
162
- .usage-details summary { cursor:pointer; color:var(--muted); font-size:.72rem; font-weight:700; }
163
- .usage-details-body { display:grid; gap:.3rem; margin-top:.4rem; overflow-wrap:anywhere; }
164
- .empty,.error-state { padding:.85rem; border:1px dashed var(--border); border-radius:.4rem; color:var(--muted); }
165
- .error-state,.error-text { color:var(--bad); }
166
- .skeleton { height:3.2rem; border-radius:.4rem; background:linear-gradient(90deg,#edf0f4,#fafbfc,#edf0f4); animation:pulse 1.2s infinite; }
167
- @keyframes pulse { 50% { opacity:.55; } }
168
- @media (max-width:1050px) { main { grid-template-columns:1fr; } .jobs-panel { grid-row:auto; } .panel-body { max-height:24rem; } #jobs-workspace > .panel:first-child .panel-body { max-height:none; } }
169
- @media (max-width:650px) {
170
- header { padding:.65rem .7rem; }
171
- nav[role="tablist"] { overflow-x:auto; padding-bottom:.1rem; }
172
- nav button { flex:0 0 auto; white-space:nowrap; }
173
- main { padding:.5rem; gap:.65rem; }
174
- body[data-mobile-jobs-view="list"] #jobs-workspace { display:none; }
175
- body[data-mobile-jobs-view="detail"] #jobs-view { display:none; }
176
- .mobile-only { display:inline-flex; }
177
- #jobs-view .panel-head { display:grid; align-items:start; }
178
- #jobs-view .panel-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; width:100%; gap:.25rem; }
179
- .runtime-summary { display:none; }
180
- #jobs-view .job-filters { display:grid; grid-template-columns:minmax(0,1fr) 5.8rem 4.6rem; align-items:center; gap:.25rem; min-width:0; }
181
- #jobs-view .job-search { width:100%; min-width:0; max-width:none; min-height:2.25rem; }
182
- #jobs-view .job-filter { width:100%; max-width:none; min-width:0; text-transform:none; font-size:.69rem; min-height:2.25rem; padding:.2rem .15rem; }
183
- #jobs-view .jobs-actions { justify-content:flex-end; }
184
- #jobs-view .jobs-feedback { grid-column:1 / -1; text-align:left; }
185
- #jobs-view #jobs-refresh { width:2.25rem; height:2.25rem; }
186
- #jobs-workspace > .panel:first-child > .panel-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.3rem; align-items:center; }
187
- #jobs-workspace > .panel:first-child > .panel-head .panel-actions { flex-wrap:nowrap; gap:.05rem; }
188
- #jobs-view .panel-body { max-height:none; }
189
- #jobs-workspace { gap:.65rem; }
190
- #jobs-workspace .panel-body { max-height:none; }
191
- #usage-view .panel-head { padding:.6rem .7rem .35rem; }
192
- #usage-view .panel-head .subtle { display:none; }
193
- .graphs-browser { grid-template-columns:1fr; min-height:0; }
194
- .graph-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
195
- .graph-canvas { min-height:18rem; }
196
- #usage-view .panel-body { padding:.45rem .5rem .65rem; max-height:none; }
197
- #usage-view .usage-providers { gap:.45rem; }
198
- #usage-view .usage-provider {
199
- grid-template-columns:1fr;
200
- gap:.55rem;
201
- padding:.65rem .7rem;
202
- border-radius:.55rem;
203
- background:var(--surface);
204
- }
205
- #usage-view .usage-provider h3 { font-size:.78rem; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
206
- #usage-view .usage-bars { gap:.7rem; }
207
- #usage-view .usage-row { gap:.25rem; }
208
- #usage-view .usage-label { align-items:baseline; gap:.5rem; font-size:.78rem; }
209
- #usage-view .usage-label span:last-child { font-size:1.05rem; font-weight:800; color:var(--text); }
210
- #usage-view .usage-track { height:.48rem; border:0; background:var(--border); }
211
- #usage-view .usage-row .subtle { font-size:.68rem; line-height:1.25; }
212
- #usage-view .usage-provider > .detail-value { font-size:1.2rem; font-weight:800; }
213
- #usage-view .usage-details { padding-top:.35rem; }
214
- #usage-view .usage-details-body { font-size:.68rem; }
215
- .details-dialog { width:min(850px,calc(100vw - 2rem)); max-height:85vh; overflow:auto; border:1px solid var(--border); border-radius:.6rem; background:var(--surface); color:var(--text); box-shadow:0 18px 55px #0004; padding:1rem; } .details-dialog::backdrop { background:#17202b99; } .details-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:1rem; position:sticky; top:-1rem; background:var(--surface); padding:.5rem 0; } .details-dialog pre { white-space:pre-wrap; overflow-wrap:anywhere; background:var(--surface2); padding:.7rem; border-radius:.4rem; } .details-dialog h3 { font-size:.8rem; margin:1rem 0 .3rem; }
216
- .job-summary,.detail-groups { grid-template-columns:1fr; }
217
- .panel-head { padding:.55rem .6rem; }
218
- .panel-body { padding:.6rem; }
219
- .tagline { display:none; }
220
- }
221
- @media (prefers-reduced-motion:reduce) { .skeleton { animation:none; } .usage-fill { transition:none; } }
222
- .router-rules-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start;min-width:0}.router-rules-pane{min-width:0;max-width:100%;overflow:hidden}.rules-editor .rules-textarea{min-height:420px}.audit-log{display:flex;flex-direction:column;gap:8px;max-height:500px;overflow:auto;min-width:0}.audit-entry{border:1px solid var(--border);border-radius:10px;padding:10px;background:var(--surface)}.audit-entry-head{display:flex;justify-content:space-between;gap:8px;align-items:center}.audit-entry pre{white-space:pre-wrap;word-break:break-word;margin:8px 0 0;font-size:11px}.router-test-panel{margin-top:16px;border-top:1px solid var(--border);padding-top:12px}.router-test-results{margin-top:8px;display:flex;flex-direction:column;gap:6px;max-height:480px;overflow:auto;min-width:0}.router-test-results pre{white-space:pre;overflow:auto;max-width:100%;font-size:11px;line-height:1.45;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:12px}.router-test-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}@media(max-width:900px){.router-rules-workspace{grid-template-columns:1fr}.router-rules-pane{max-height:none}.router-test-results{max-height:420px}}@media(max-width:650px){#rules-view .panel-head .subtle{display:none}#rules-view .panel-body{max-height:none;overflow:visible;padding:.6rem}#rules-view .router-rules-workspace{gap:.9rem}#rules-view .rules-help{font-size:.74rem;line-height:1.4}#rules-view .rules-textarea{min-height:52vh;padding:.65rem;font-size:12px}#rules-view .rules-footer{align-items:stretch}#rules-view .rules-footer>.subtle{width:100%}#rules-view .rules-footer>div{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:.5rem}#rules-view .rules-save{min-height:44px;width:100%;padding:.55rem .7rem}#rules-view .router-rules-pane>.panel-head{padding:.55rem 0}#rules-view .audit-log{max-height:none}#rules-view .audit-entry-head{align-items:flex-start}#rules-view .audit-entry-head .subtle{display:block;flex:0 0 auto}#rules-view .router-test-panel{min-width:0;max-width:100%;overflow:hidden}#rules-view .router-test-results{max-height:none;width:100%;max-width:100%;overflow-x:hidden}#rules-view .router-test-results>*{min-width:0;max-width:100%}#rules-view .router-test-results pre{width:100%;box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-size:11px;padding:.65rem}#rules-view .router-test-row{grid-template-columns:1fr}}
223
- </style>`;
1
+ import { readFileSync } from 'node:fs';
2
+ /** Legacy Node/Rust byte-for-byte stylesheet parity fixture; source is a standalone PWA asset. */
3
+ export const dashboardStyles = ' <style>' + readFileSync(new URL('../dashboard/dashboard.css', import.meta.url), 'utf8') + '</style>';
package/dist/dashboard.js CHANGED
@@ -2,6 +2,7 @@ import { inspectWorkflowSymbol } from './dashboard-workflow-inspection.js';
2
2
  import { createServer } from 'node:http';
3
3
  import { subscribeLocalCommits } from './local-commit-events.js';
4
4
  import { handleTroubleshooterQa } from './troubleshooter-qa-api.js';
5
+ import { readFile } from 'node:fs/promises';
5
6
  import { readUsageSnapshot } from './usage.js';
6
7
  import { deriveJobRuntimeStatus } from './runtime-status.js';
7
8
  import { DeliveryDeduper, parseGitHubWebhook, verifyGitHubWebhook } from './github-webhook.js';
@@ -9,12 +10,23 @@ import { loadExecutionRouterRules, saveExecutionRouterRules } from './routing-po
9
10
  import { summarizeRuntime } from './runtime-summary.js';
10
11
  import { dashboardWorkflowGraphs, effectiveGitHubUsage, eventHistory, listDashboardJobInventory, searchDashboardJobs } from './dashboard-data.js';
11
12
  export { dashboardWorkflowGraphs, githubPrUrl, searchDashboardJobs } from './dashboard-data.js';
13
+ /** Exact public asset allowlist; no path interpolation from request URLs. */
14
+ const dashboardStaticAssets = {
15
+ '/dashboard.css': ['dashboard.css', 'text/css; charset=utf-8'],
16
+ '/dashboard.js': ['dashboard.js', 'text/javascript; charset=utf-8'],
17
+ '/pwa.js': ['pwa.js', 'text/javascript; charset=utf-8'],
18
+ '/service-worker.js': ['service-worker.js', 'text/javascript; charset=utf-8'],
19
+ '/manifest.webmanifest': ['manifest.webmanifest', 'application/manifest+json; charset=utf-8'],
20
+ '/icons/icon-180.png': ['icons/icon-180.png', 'image/png'],
21
+ '/icons/icon-192.png': ['icons/icon-192.png', 'image/png'],
22
+ '/icons/icon-512.png': ['icons/icon-512.png', 'image/png'],
23
+ };
12
24
  const SSE_HEARTBEAT_MS = 15000;
13
25
  function isTaskId(candidate) {
14
26
  return candidate.length > 0;
15
27
  }
16
28
  export { dashboardHtml, dashboardVersion, dashboardSourceRevision } from './dashboard-html.js';
17
- import { dashboardHtml, dashboardVersion } from './dashboard-html.js';
29
+ import { dashboardIndexHtml, dashboardConfigScript, dashboardVersion } from './dashboard-html.js';
18
30
  export function serveDashboard(store, port = 8787, bus, refreshMs = 300000, jobId, usageRegistry, overviewProvider, webhook, statusProvider, githubUsageProvider, exactJobProvider, actions, routerTestProvider, decisionAuditProvider) {
19
31
  const legacyActions = typeof exactJobProvider === 'object' && exactJobProvider !== null ? exactJobProvider : undefined;
20
32
  const legacyExactJobProvider = !exactJobProvider && githubUsageProvider ? githubUsageProvider : undefined;
@@ -122,9 +134,27 @@ export function serveDashboard(store, port = 8787, bus, refreshMs = 300000, jobI
122
134
  return JSON.stringify({ ...account, githubEffective, githubStatus });
123
135
  };
124
136
  const server = createServer(async (req, res) => {
125
- if (req.url === '/') {
126
- res.writeHead(200, { 'content-type': 'text/html; charset=utf-8' });
127
- res.end(dashboardHtml);
137
+ if (req.method === 'GET' && req.url === '/') {
138
+ res.writeHead(200, { 'content-type': 'text/html; charset=utf-8', 'cache-control': 'no-store', 'x-content-type-options': 'nosniff' });
139
+ res.end(dashboardIndexHtml);
140
+ return;
141
+ }
142
+ if (req.method === 'GET' && req.url === '/dashboard-config.js') {
143
+ res.writeHead(200, { 'content-type': 'text/javascript; charset=utf-8', 'cache-control': 'no-store', 'x-content-type-options': 'nosniff' });
144
+ res.end(dashboardConfigScript());
145
+ return;
146
+ }
147
+ const asset = req.method === 'GET' ? dashboardStaticAssets[req.url ?? ''] : undefined;
148
+ if (asset) {
149
+ try {
150
+ const content = await readFile(new URL('../dashboard/' + asset[0], import.meta.url));
151
+ res.writeHead(200, { 'content-type': asset[1], 'cache-control': 'no-cache', 'x-content-type-options': 'nosniff' });
152
+ res.end(content);
153
+ }
154
+ catch {
155
+ res.writeHead(404);
156
+ res.end('Not found');
157
+ }
128
158
  return;
129
159
  }
130
160
  if (req.url === '/api/version') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.266",
3
+ "version": "2.0.268",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,6 +48,7 @@
48
48
  },
49
49
  "files": [
50
50
  "dist",
51
+ "dashboard",
51
52
  "bin",
52
53
  "agents",
53
54
  "skills",