pinokiod 8.3.7 → 8.3.10

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 (36) hide show
  1. package/kernel/agent_instructions.js +56 -0
  2. package/kernel/app_log_sessions.js +1 -1
  3. package/kernel/bin/node.js +2 -2
  4. package/kernel/environment.js +6 -98
  5. package/kernel/managed_skills.js +2 -1
  6. package/kernel/prototype.js +7 -0
  7. package/kernel/request_file.js +53 -0
  8. package/package.json +1 -1
  9. package/prototype/system/SKILL_PINOKIO.md +5 -2
  10. package/server/index.js +12 -1
  11. package/server/lib/brain.js +305 -0
  12. package/server/public/agent-bar-app.css +359 -0
  13. package/server/public/agent-bar-app.js +837 -0
  14. package/server/public/agent-bar-attach.css +142 -0
  15. package/server/public/agent-bar-attach.js +299 -0
  16. package/server/public/agent-bar-panel.css +788 -0
  17. package/server/public/agent-bar-panel.js +1915 -0
  18. package/server/public/agent-bar-shell.css +128 -0
  19. package/server/public/agent-bar-shell.js +251 -0
  20. package/server/public/agent-bar.css +972 -0
  21. package/server/public/agent-bar.js +1513 -0
  22. package/server/public/common.js +65 -0
  23. package/server/public/layout.js +13 -1
  24. package/server/public/logs.js +22 -0
  25. package/server/routes/apps.js +6 -0
  26. package/server/socket.js +6 -2
  27. package/server/views/app.ejs +13 -0
  28. package/server/views/partials/main_sidebar.ejs +7 -0
  29. package/system/plugin/opencode/pinokio.js +8 -2
  30. package/system/plugin/opencode-auto/pinokio.js +4 -1
  31. package/test/agent-instructions.test.js +69 -0
  32. package/test/app-log-sessions.test.js +29 -0
  33. package/test/brain.test.js +301 -0
  34. package/test/managed-skills.test.js +6 -1
  35. package/test/node-bin.test.js +4 -4
  36. package/test/request-file.test.js +93 -0
@@ -0,0 +1,788 @@
1
+ /* Agent bar sessions (see agent-bar-panel.js), on pages with the main sidebar and
2
+ on app pages. This first part is a session's window as it is when docked to the
3
+ side: on the right under the top bar, with the page making room for it. The
4
+ dock further down (tabs, floating windows, the header's buttons) builds on it. */
5
+ html {
6
+ --agent-bar-panel-w: clamp(380px, 42vw, 640px);
7
+ --agent-bar-panel-top: 46px;
8
+ }
9
+ .agent-bar-panel {
10
+ --abp-text: #111827;
11
+ --abp-muted: rgba(55, 65, 81, 0.78);
12
+ --abp-border: rgba(15, 23, 42, 0.12);
13
+ --abp-surface: #ffffff;
14
+ --abp-chip: rgba(15, 23, 42, 0.06);
15
+ --abp-chip-hover: rgba(15, 23, 42, 0.1);
16
+ position: fixed;
17
+ top: var(--agent-bar-panel-top);
18
+ right: 0;
19
+ bottom: 0;
20
+ /* Above the page's content (41 at most) and under every dialog, overlay and
21
+ popover Pinokio has (120 and up), on every kind of page. Among themselves,
22
+ in the order they were last in front. */
23
+ z-index: calc(50 + var(--agent-dock-order, 0));
24
+ width: var(--agent-bar-panel-w);
25
+ display: flex;
26
+ flex-direction: column;
27
+ box-sizing: border-box;
28
+ border-left: 1px solid var(--abp-border);
29
+ background: var(--abp-surface);
30
+ color: var(--abp-text);
31
+ font: 400 13px system-ui, -apple-system, "Segoe UI", sans-serif;
32
+ letter-spacing: 0;
33
+ transform: translateX(100%);
34
+ visibility: hidden;
35
+ transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1), visibility 0s linear 200ms;
36
+ }
37
+ body.dark .agent-bar-panel {
38
+ --abp-text: rgba(250, 250, 250, 0.96);
39
+ --abp-muted: rgba(161, 161, 170, 0.92);
40
+ --abp-border: rgba(255, 255, 255, 0.1);
41
+ --abp-surface: #1b1c1d;
42
+ --abp-chip: rgba(255, 255, 255, 0.08);
43
+ --abp-chip-hover: rgba(255, 255, 255, 0.14);
44
+ }
45
+ .agent-bar-panel[data-open="true"] {
46
+ transform: translateX(0);
47
+ visibility: visible;
48
+ transition: transform 200ms cubic-bezier(0.25, 1, 0.5, 1), visibility 0s;
49
+ }
50
+ /* the page makes room */
51
+ body.main-sidebar-page > main {
52
+ transition: margin-right 200ms cubic-bezier(0.25, 1, 0.5, 1);
53
+ }
54
+ html.agent-bar-panel-open body.main-sidebar-page > main {
55
+ margin-right: var(--agent-bar-panel-w);
56
+ }
57
+ /* no slide: the panel was already open on the page before, or is being swapped */
58
+ html.agent-bar-panel-still .agent-bar-panel,
59
+ .agent-bar-panel--still,
60
+ html.agent-bar-panel-still body.main-sidebar-page > main {
61
+ transition: none;
62
+ }
63
+
64
+ .agent-bar-panel [hidden] {
65
+ display: none !important;
66
+ }
67
+ .agent-bar-panel__header {
68
+ flex: none;
69
+ display: flex;
70
+ align-items: center;
71
+ gap: 8px;
72
+ height: 46px;
73
+ padding: 0 8px 0 12px;
74
+ border-bottom: 1px solid var(--abp-border);
75
+ }
76
+ .agent-bar-panel__icon {
77
+ flex: none;
78
+ width: 22px;
79
+ height: 22px;
80
+ display: inline-flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ color: var(--abp-muted);
84
+ }
85
+ .agent-bar-panel__icon img {
86
+ width: 22px;
87
+ height: 22px;
88
+ object-fit: contain;
89
+ border-radius: 5px;
90
+ }
91
+ .agent-bar-panel__text {
92
+ flex: 1 1 auto;
93
+ min-width: 0;
94
+ text-align: left;
95
+ }
96
+ .agent-bar-panel__title {
97
+ font-size: 13px;
98
+ font-weight: 600;
99
+ line-height: 16px;
100
+ white-space: nowrap;
101
+ overflow: hidden;
102
+ text-overflow: ellipsis;
103
+ }
104
+ .agent-bar-panel__sub {
105
+ font-size: 11px;
106
+ line-height: 14px;
107
+ color: var(--abp-muted);
108
+ white-space: nowrap;
109
+ overflow: hidden;
110
+ text-overflow: ellipsis;
111
+ }
112
+ .agent-bar-panel button {
113
+ font: inherit;
114
+ letter-spacing: 0;
115
+ color: var(--abp-text);
116
+ cursor: pointer;
117
+ }
118
+ .agent-bar-panel__open {
119
+ flex: none;
120
+ height: 28px;
121
+ padding: 0 12px;
122
+ border: 1px solid var(--abp-border);
123
+ border-radius: 8px;
124
+ background: var(--abp-chip);
125
+ font-size: 12px;
126
+ font-weight: 600;
127
+ }
128
+ .agent-bar-panel__open:hover {
129
+ background: var(--abp-chip-hover);
130
+ }
131
+ .agent-bar-panel__btn {
132
+ flex: none;
133
+ width: 28px;
134
+ height: 28px;
135
+ display: inline-flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+ padding: 0;
139
+ border: 0;
140
+ border-radius: 8px;
141
+ background: transparent;
142
+ font-size: 12px;
143
+ }
144
+ .agent-bar-panel .agent-bar-panel__btn {
145
+ color: var(--abp-muted);
146
+ }
147
+ .agent-bar-panel__btn:hover {
148
+ background: var(--abp-chip);
149
+ }
150
+ .agent-bar-panel .agent-bar-panel__btn:hover {
151
+ color: var(--abp-text);
152
+ }
153
+ /* the session's own page */
154
+ .agent-bar-panel__frame {
155
+ flex: 1 1 auto;
156
+ min-height: 0;
157
+ width: 100%;
158
+ border: 0;
159
+ background: var(--abp-surface);
160
+ }
161
+
162
+ /* the count in the bar: "3 running" */
163
+ .agent-bar__running-word {
164
+ margin-left: -2px;
165
+ }
166
+ /* the running list in the bar */
167
+ .agent-bar .agent-bar__menu--running {
168
+ right: 0;
169
+ width: 320px;
170
+ }
171
+
172
+ /* Create app: the new row in My Apps is pointed out once */
173
+ @keyframes agent-bar-new-app {
174
+ 0% { background: rgba(200, 163, 98, 0.32); }
175
+ 100% { background: transparent; }
176
+ }
177
+ .home-app-line.agent-bar-new-app {
178
+ animation: agent-bar-new-app 1800ms ease-out 1;
179
+ }
180
+
181
+ /* phones: the panel takes the screen under the top bar, below the sidebar */
182
+ @media only screen and (max-width: 768px) {
183
+ html {
184
+ --agent-bar-panel-w: 100vw;
185
+ }
186
+ html.agent-bar-panel-open body.main-sidebar-page > main {
187
+ margin-right: 0;
188
+ }
189
+ .agent-bar-panel {
190
+ border-left: 0;
191
+ }
192
+ /* the narrow bar keeps its room for typing: the count is just the number */
193
+ .agent-bar__running-word {
194
+ display: none;
195
+ }
196
+ .agent-bar .agent-bar__running {
197
+ padding: 0 6px;
198
+ gap: 5px;
199
+ }
200
+ }
201
+
202
+ /* ==== The dock (see agent-bar-panel.js) ====
203
+ The sessions you open are tabs along the bottom. The panel element above is the
204
+ window that shows one of them: floating over the page by default, or docked to
205
+ the side (html.agent-bar-panel-open), where the rules above apply and the page
206
+ makes room. */
207
+
208
+ /* ---- the tabs along the bottom ---- */
209
+ .agent-dock {
210
+ --abp-text: #111827;
211
+ --abp-muted: rgba(55, 65, 81, 0.78);
212
+ --abp-border: rgba(15, 23, 42, 0.14);
213
+ --abp-surface: #ffffff;
214
+ --abp-recessed: #d9dde3;
215
+ --abp-chip: rgba(15, 23, 42, 0.06);
216
+ --abp-chip-hover: rgba(15, 23, 42, 0.1);
217
+ position: fixed;
218
+ right: 16px;
219
+ bottom: 0;
220
+ /* just above the windows (at most four are open) */
221
+ z-index: 60;
222
+ display: flex;
223
+ /* the first tab is at the right and each new one appears to its left, the same
224
+ way round as the windows above them */
225
+ flex-direction: row-reverse;
226
+ align-items: flex-end;
227
+ justify-content: flex-start;
228
+ gap: 6px;
229
+ max-width: calc(100vw - 32px);
230
+ font: 500 12px system-ui, -apple-system, "Segoe UI", sans-serif;
231
+ letter-spacing: 0;
232
+ }
233
+ body.dark .agent-dock {
234
+ --abp-text: rgba(250, 250, 250, 0.96);
235
+ --abp-muted: rgba(161, 161, 170, 0.92);
236
+ --abp-border: rgba(255, 255, 255, 0.14);
237
+ --abp-surface: #262728;
238
+ --abp-recessed: #121213;
239
+ --abp-chip: rgba(255, 255, 255, 0.08);
240
+ --abp-chip-hover: rgba(255, 255, 255, 0.14);
241
+ }
242
+ .agent-dock[hidden] {
243
+ display: none;
244
+ }
245
+ .agent-dock__tab {
246
+ flex: 0 1 200px;
247
+ min-width: 0;
248
+ display: flex;
249
+ align-items: center;
250
+ height: 34px;
251
+ box-sizing: border-box;
252
+ padding: 0 4px 0 0;
253
+ border: 1px solid var(--abp-border);
254
+ border-bottom: 0;
255
+ border-radius: 10px 10px 0 0;
256
+ background: var(--abp-recessed);
257
+ color: var(--abp-text);
258
+ }
259
+ /* The tab whose window is in front is the one raised tab: the window's own
260
+ surface, a soft shadow and full-strength text. Every other tab sits back,
261
+ flat and clearly darker. Same height and border for all. */
262
+ .agent-dock__tab[data-active="true"] {
263
+ background: var(--abp-surface);
264
+ box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.16);
265
+ }
266
+ .agent-dock__tab button {
267
+ font: inherit;
268
+ letter-spacing: 0;
269
+ color: var(--abp-text);
270
+ cursor: pointer;
271
+ border: 0;
272
+ background: transparent;
273
+ }
274
+ .agent-dock__tab-main {
275
+ flex: 1 1 auto;
276
+ min-width: 0;
277
+ height: 100%;
278
+ display: flex;
279
+ align-items: center;
280
+ gap: 7px;
281
+ padding: 0 4px 0 10px;
282
+ text-align: left;
283
+ }
284
+ .agent-dock__tab-icon {
285
+ flex: none;
286
+ width: 16px;
287
+ height: 16px;
288
+ display: inline-flex;
289
+ align-items: center;
290
+ justify-content: center;
291
+ font-size: 12px;
292
+ color: var(--abp-muted);
293
+ }
294
+ .agent-dock__tab-icon img {
295
+ width: 16px;
296
+ height: 16px;
297
+ object-fit: contain;
298
+ border-radius: 4px;
299
+ }
300
+ .agent-dock__dot {
301
+ flex: none;
302
+ width: 7px;
303
+ height: 7px;
304
+ border-radius: 50%;
305
+ background: #3f9b1f;
306
+ }
307
+ .agent-dock__tab[data-ended="true"] .agent-dock__dot {
308
+ background: var(--abp-muted);
309
+ }
310
+ .agent-dock__tab-title {
311
+ min-width: 0;
312
+ overflow: hidden;
313
+ text-overflow: ellipsis;
314
+ white-space: nowrap;
315
+ color: var(--abp-muted);
316
+ }
317
+ .agent-dock__tab[data-active="true"] .agent-dock__tab-title {
318
+ color: var(--abp-text);
319
+ font-weight: 600;
320
+ }
321
+ .agent-dock__tab-x {
322
+ flex: none;
323
+ width: 22px;
324
+ height: 22px;
325
+ display: inline-flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+ padding: 0;
329
+ border-radius: 6px;
330
+ font-size: 10px;
331
+ }
332
+ .agent-dock__tab .agent-dock__tab-x {
333
+ color: var(--abp-muted);
334
+ }
335
+ .agent-dock__tab .agent-dock__tab-x:hover {
336
+ background: var(--abp-chip-hover);
337
+ color: var(--abp-text);
338
+ }
339
+
340
+ /* docked to the side: the tabs move left of the panel, clear of the terminal */
341
+ html.agent-bar-panel-open .agent-dock {
342
+ right: calc(var(--agent-bar-panel-w) + 16px);
343
+ max-width: calc(100vw - var(--agent-bar-panel-w) - 32px);
344
+ }
345
+
346
+ /* ---- the window above the tabs (wide screens, not docked to the side) ---- */
347
+ @media only screen and (min-width: 769px) {
348
+ .agent-bar-panel:not([data-docked="true"]) {
349
+ top: auto;
350
+ /* bottom right above the tabs, until it has been moved */
351
+ right: var(--agent-dock-float-r, 16px);
352
+ bottom: var(--agent-dock-float-b, 46px);
353
+ /* its own size once it has been dragged, never more than the screen has room for */
354
+ width: min(var(--agent-dock-float-w, 560px), calc(100vw - 32px));
355
+ height: min(var(--agent-dock-float-h, 72vh), calc(100vh - var(--agent-bar-panel-top) - 62px));
356
+ border: 1px solid var(--abp-border);
357
+ border-radius: 12px;
358
+ /* not clipped: the grips reach a little past its edges (see further down), so
359
+ the session's page gets the rounded bottom corners itself */
360
+ overflow: visible;
361
+ box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.1);
362
+ opacity: 0;
363
+ transform: translateY(14px);
364
+ transition: transform 160ms cubic-bezier(0.25, 1, 0.5, 1), opacity 160ms ease, visibility 0s linear 160ms;
365
+ }
366
+ .agent-bar-panel[data-open="true"]:not([data-docked="true"]) {
367
+ opacity: 1;
368
+ transform: none;
369
+ transition: transform 160ms cubic-bezier(0.25, 1, 0.5, 1), opacity 160ms ease, visibility 0s;
370
+ }
371
+ .agent-bar-panel:not([data-docked="true"]) .agent-bar-panel__header {
372
+ height: 40px;
373
+ /* the header is the handle the window is moved by; its buttons stay buttons */
374
+ cursor: grab;
375
+ -webkit-user-select: none;
376
+ user-select: none;
377
+ }
378
+ .agent-bar-panel:not([data-docked="true"]) .agent-bar-panel__header button {
379
+ cursor: pointer;
380
+ }
381
+ .agent-bar-panel:not([data-docked="true"]) .agent-bar-panel__frame {
382
+ border-radius: 0 0 11px 11px;
383
+ }
384
+ html.agent-bar-panel-still .agent-bar-panel:not([data-docked="true"]),
385
+ .agent-bar-panel--still:not([data-docked="true"]) {
386
+ transition: none;
387
+ }
388
+ }
389
+
390
+ /* phones: the window is the full-screen panel, as today; the tabs stay under it */
391
+ @media only screen and (max-width: 768px) {
392
+ .agent-dock {
393
+ right: 8px;
394
+ max-width: calc(100vw - 16px);
395
+ }
396
+ .agent-dock__tab {
397
+ flex-basis: 150px;
398
+ }
399
+ }
400
+
401
+ /* ---- the unified header: [Open ...] [Stop] [more] | [minimise] [close] ---- */
402
+ .agent-dock__stop {
403
+ flex: none;
404
+ height: 28px;
405
+ display: inline-flex;
406
+ align-items: center;
407
+ gap: 6px;
408
+ padding: 0 10px;
409
+ border: 1px solid var(--abp-border);
410
+ border-radius: 8px;
411
+ background: transparent;
412
+ font-size: 12px;
413
+ font-weight: 600;
414
+ white-space: nowrap;
415
+ }
416
+ .agent-dock__stop i {
417
+ font-size: 9px;
418
+ }
419
+ .agent-dock__stop:hover {
420
+ background: var(--abp-chip);
421
+ }
422
+ .agent-bar-panel .agent-dock__stop[data-armed="true"],
423
+ .agent-bar .agent-dock__liststop[data-armed="true"] {
424
+ border-color: #b42318;
425
+ background: #b42318;
426
+ color: #ffffff;
427
+ }
428
+ .agent-dock__sep {
429
+ flex: none;
430
+ width: 1px;
431
+ height: 18px;
432
+ margin: 0 2px;
433
+ background: var(--abp-border);
434
+ }
435
+ .agent-bar-panel__btn.is-open {
436
+ background: var(--abp-chip);
437
+ }
438
+ .agent-dock__more {
439
+ position: absolute;
440
+ top: 48px;
441
+ right: 72px;
442
+ z-index: 5;
443
+ min-width: 200px;
444
+ box-sizing: border-box;
445
+ padding: 6px;
446
+ border: 1px solid var(--abp-border);
447
+ border-radius: 10px;
448
+ background: var(--abp-surface);
449
+ box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
450
+ }
451
+ .agent-dock__more-row {
452
+ display: flex;
453
+ align-items: center;
454
+ gap: 9px;
455
+ width: 100%;
456
+ height: 32px;
457
+ padding: 0 9px;
458
+ border: 0;
459
+ border-radius: 7px;
460
+ background: transparent;
461
+ font-size: 13px;
462
+ text-align: left;
463
+ }
464
+ .agent-dock__more-row i {
465
+ width: 14px;
466
+ text-align: center;
467
+ font-size: 12px;
468
+ color: var(--abp-muted);
469
+ }
470
+ .agent-dock__more-row:hover {
471
+ background: var(--abp-chip);
472
+ }
473
+ @media only screen and (min-width: 769px) {
474
+ .agent-bar-panel:not([data-docked="true"]) .agent-dock__more {
475
+ top: 42px;
476
+ }
477
+ }
478
+
479
+ /* ---- Stop on a row of the bar's running list ---- */
480
+ .agent-dock__listrow {
481
+ position: relative;
482
+ }
483
+ .agent-bar .agent-dock__liststop {
484
+ position: absolute;
485
+ top: 50%;
486
+ right: 6px;
487
+ transform: translateY(-50%);
488
+ display: none;
489
+ align-items: center;
490
+ gap: 5px;
491
+ height: 24px;
492
+ padding: 0 8px;
493
+ border: 1px solid var(--agent-bar-border);
494
+ border-radius: 7px;
495
+ background: var(--agent-bar-surface);
496
+ font-size: 11px;
497
+ font-weight: 600;
498
+ white-space: nowrap;
499
+ }
500
+ .agent-bar .agent-dock__liststop i {
501
+ font-size: 8px;
502
+ }
503
+ .agent-dock__listrow:hover .agent-dock__liststop,
504
+ .agent-bar .agent-dock__liststop:focus-visible,
505
+ .agent-bar .agent-dock__liststop[data-armed="true"] {
506
+ display: inline-flex;
507
+ }
508
+
509
+ /* ---- a short message (something could not be done) ---- */
510
+ .agent-dock__toast {
511
+ position: fixed;
512
+ left: 50%;
513
+ bottom: 52px;
514
+ transform: translateX(-50%);
515
+ z-index: 10000020;
516
+ display: flex;
517
+ align-items: center;
518
+ gap: 10px;
519
+ max-width: min(620px, calc(100vw - 32px));
520
+ box-sizing: border-box;
521
+ padding: 9px 12px;
522
+ border-radius: 10px;
523
+ background: #111827;
524
+ color: #ffffff;
525
+ font: 500 12px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
526
+ box-shadow: 0 12px 28px rgba(15, 23, 42, 0.3);
527
+ }
528
+ .agent-dock__toast[hidden] {
529
+ display: none;
530
+ }
531
+
532
+ /* ---- app pages: docked to the side, the app makes room like the page does elsewhere ---- */
533
+ body.app-page > .appcanvas {
534
+ transition: margin-right 200ms cubic-bezier(0.25, 1, 0.5, 1);
535
+ }
536
+ html.agent-bar-panel-open body.app-page > .appcanvas {
537
+ margin-right: var(--agent-bar-panel-w);
538
+ }
539
+ html.agent-bar-panel-still body.app-page > .appcanvas {
540
+ transition: none;
541
+ }
542
+ /* phones: a docked window takes the whole screen, the app keeps its width under it */
543
+ @media only screen and (max-width: 768px) {
544
+ html.agent-bar-panel-open body.app-page > .appcanvas {
545
+ margin-right: 0;
546
+ }
547
+ }
548
+
549
+ /* the "Open ..." row of the more menu is for narrow windows only (see the end) */
550
+ .agent-dock__more-row[data-row="where"] {
551
+ display: none;
552
+ }
553
+ /* a phone has no side to dock to */
554
+ @media only screen and (max-width: 768px) {
555
+ .agent-dock__wide {
556
+ display: none;
557
+ }
558
+ }
559
+
560
+ /* ---- docked to the side: the panel's edge can be dragged ---- */
561
+ .agent-dock__resizer {
562
+ display: none;
563
+ position: absolute;
564
+ top: 0;
565
+ bottom: 0;
566
+ left: -4px;
567
+ z-index: 6;
568
+ width: 9px;
569
+ cursor: col-resize;
570
+ touch-action: none;
571
+ outline: none;
572
+ }
573
+ .agent-dock__resizer::before {
574
+ content: "";
575
+ position: absolute;
576
+ top: 0;
577
+ bottom: 0;
578
+ left: 3px;
579
+ width: 2px;
580
+ background: transparent;
581
+ transition: background 120ms ease;
582
+ }
583
+ .agent-dock__resizer:hover::before,
584
+ .agent-dock__resizer:focus-visible::before,
585
+ html.agent-dock-resizing .agent-dock__resizer::before {
586
+ background: var(--abp-muted);
587
+ }
588
+ @media only screen and (min-width: 769px) {
589
+ .agent-bar-panel[data-docked="true"] .agent-dock__resizer {
590
+ display: block;
591
+ }
592
+ }
593
+ html.agent-dock-resizing,
594
+ html.agent-dock-resizing * {
595
+ cursor: col-resize !important;
596
+ user-select: none !important;
597
+ }
598
+ html.agent-dock-resizing iframe {
599
+ pointer-events: none;
600
+ }
601
+
602
+ /* ---- floating: moved by its header, resized at any edge or corner ---- */
603
+ html[data-dock-resize="move"],
604
+ html[data-dock-resize="move"] * {
605
+ cursor: grabbing !important;
606
+ }
607
+ .agent-dock__grip {
608
+ display: none;
609
+ position: absolute;
610
+ z-index: 7;
611
+ touch-action: none;
612
+ }
613
+ @media only screen and (min-width: 769px) {
614
+ .agent-bar-panel:not([data-docked="true"]) .agent-dock__grip {
615
+ display: block;
616
+ }
617
+ }
618
+ /* grips: four edges and four corners. Each reaches a few pixels past the window,
619
+ so the edge itself and the rounded corners can be caught. */
620
+ .agent-dock__grip[data-edge="left"] {
621
+ top: 12px;
622
+ bottom: 12px;
623
+ left: -3px;
624
+ width: 8px;
625
+ cursor: ew-resize;
626
+ }
627
+ .agent-dock__grip[data-edge="right"] {
628
+ top: 12px;
629
+ bottom: 12px;
630
+ right: -3px;
631
+ width: 7px;
632
+ cursor: ew-resize;
633
+ }
634
+ .agent-dock__grip[data-edge="top"] {
635
+ top: -3px;
636
+ left: 12px;
637
+ right: 12px;
638
+ height: 7px;
639
+ cursor: ns-resize;
640
+ }
641
+ .agent-dock__grip[data-edge="bottom"] {
642
+ bottom: -3px;
643
+ left: 12px;
644
+ right: 12px;
645
+ height: 7px;
646
+ cursor: ns-resize;
647
+ }
648
+ .agent-dock__grip[data-edge="tl"],
649
+ .agent-dock__grip[data-edge="tr"],
650
+ .agent-dock__grip[data-edge="bl"],
651
+ .agent-dock__grip[data-edge="br"] {
652
+ width: 16px;
653
+ height: 16px;
654
+ }
655
+ .agent-dock__grip[data-edge="tl"] { top: -4px; left: -4px; cursor: nwse-resize; }
656
+ .agent-dock__grip[data-edge="tr"] { top: -4px; right: -4px; cursor: nesw-resize; }
657
+ .agent-dock__grip[data-edge="bl"] { bottom: -4px; left: -4px; cursor: nesw-resize; }
658
+ .agent-dock__grip[data-edge="br"] { bottom: -4px; right: -4px; cursor: nwse-resize; }
659
+ html[data-dock-resize="left"], html[data-dock-resize="left"] *,
660
+ html[data-dock-resize="right"], html[data-dock-resize="right"] * {
661
+ cursor: ew-resize !important;
662
+ }
663
+ html[data-dock-resize="top"], html[data-dock-resize="top"] *,
664
+ html[data-dock-resize="bottom"], html[data-dock-resize="bottom"] * {
665
+ cursor: ns-resize !important;
666
+ }
667
+ html[data-dock-resize="tl"], html[data-dock-resize="tl"] *,
668
+ html[data-dock-resize="br"], html[data-dock-resize="br"] * {
669
+ cursor: nwse-resize !important;
670
+ }
671
+ html[data-dock-resize="tr"], html[data-dock-resize="tr"] *,
672
+ html[data-dock-resize="bl"], html[data-dock-resize="bl"] * {
673
+ cursor: nesw-resize !important;
674
+ }
675
+
676
+ /* the icon is part of the handle: the browser does not pick it up as an image */
677
+ .agent-bar-panel__header img {
678
+ -webkit-user-drag: none;
679
+ }
680
+
681
+ /* ---- a narrow window (and every phone) keeps room for the title ----
682
+ agent-bar-panel.js marks the window: narrow under 600px, where "Open ..." moves
683
+ into the more menu; tight under 440px, where Stop is its icon until it asks to
684
+ be confirmed. */
685
+ .agent-bar-panel[data-narrow="true"] .agent-bar-panel__open {
686
+ display: none;
687
+ }
688
+ .agent-bar-panel[data-narrow="true"] .agent-dock__more-row[data-row="where"]:not([data-none="true"]) {
689
+ display: flex;
690
+ }
691
+ .agent-bar-panel[data-tight="true"] .agent-dock__stop {
692
+ padding: 0 9px;
693
+ }
694
+ .agent-bar-panel[data-tight="true"] .agent-dock__stop:not([data-armed="true"]) span {
695
+ display: none;
696
+ }
697
+ /* ---- several windows ----
698
+ a window that is not in front is a shade quieter, so the front one reads as the active one */
699
+ .agent-bar-panel[data-open="true"]:not([data-front="true"]):not([data-docked="true"]) .agent-bar-panel__header {
700
+ opacity: 0.72;
701
+ }
702
+ /* ---- the running list ----
703
+ A heading names where its sessions run. It is a name (often a long one), so it
704
+ is written as one, at the text's full strength, and not as a small capital
705
+ label. A line separates one place from the next. */
706
+ .agent-bar__menu--running .agent-bar__menu-title {
707
+ position: relative;
708
+ padding: 8px 8px 4px;
709
+ font-size: 13px;
710
+ font-weight: 600;
711
+ letter-spacing: 0;
712
+ text-transform: none;
713
+ color: var(--agent-bar-text);
714
+ white-space: nowrap;
715
+ overflow: hidden;
716
+ text-overflow: ellipsis;
717
+ }
718
+ .agent-bar__menu--running .agent-bar__menu-title:not(:first-child) {
719
+ margin-top: 6px;
720
+ padding-top: 13px;
721
+ }
722
+ .agent-bar__menu--running .agent-bar__menu-title:not(:first-child)::before {
723
+ content: "";
724
+ position: absolute;
725
+ top: 0;
726
+ left: 8px;
727
+ right: 8px;
728
+ border-top: 1px solid var(--agent-bar-border);
729
+ }
730
+ /* an app's heading starts with the app's icon, in a frame of one size whatever
731
+ the icon's own shape, so the headings line up */
732
+ .agent-bar__menu--running .agent-bar__menu-title--app {
733
+ display: flex;
734
+ align-items: center;
735
+ gap: 8px;
736
+ }
737
+ .agent-bar__menu-title-icon {
738
+ flex: none;
739
+ box-sizing: border-box;
740
+ width: 20px;
741
+ height: 20px;
742
+ border-radius: 5px;
743
+ background: var(--agent-bar-chip);
744
+ object-fit: contain;
745
+ }
746
+ .agent-bar__menu-title-text {
747
+ min-width: 0;
748
+ overflow: hidden;
749
+ text-overflow: ellipsis;
750
+ white-space: nowrap;
751
+ }
752
+ /* A row is set in from its heading, so that its icon starts where the heading's
753
+ text does (the heading's 20px icon and 8px gap): the heading reads as the
754
+ place, and the rows under it as what runs there. */
755
+ .agent-bar__menu--running .agent-dock__listrow {
756
+ margin-left: 28px;
757
+ }
758
+ /* a row: two lines beside the agent's icon */
759
+ .agent-bar__menu--running .agent-bar__row {
760
+ height: auto;
761
+ min-height: 44px;
762
+ padding: 5px 8px;
763
+ }
764
+ .agent-dock__listtext {
765
+ flex: 1 1 auto;
766
+ min-width: 0;
767
+ display: flex;
768
+ flex-direction: column;
769
+ gap: 1px;
770
+ }
771
+ .agent-dock__listline,
772
+ .agent-dock__listsub {
773
+ white-space: nowrap;
774
+ overflow: hidden;
775
+ text-overflow: ellipsis;
776
+ }
777
+ .agent-dock__listline {
778
+ color: var(--agent-bar-text);
779
+ }
780
+ .agent-dock__listsub {
781
+ font-size: 12px;
782
+ color: var(--agent-bar-muted);
783
+ }
784
+ /* The home rows' "N terminals online" buttons (index.ejs) are not shown: the
785
+ running list has the same sessions, on every page. Hidden here, not removed. */
786
+ .home-app-line .menu-btns > .btn.terminals-link {
787
+ display: none !important;
788
+ }