sideby 0.16.1 → 0.18.0

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 (128) hide show
  1. package/README.md +7 -3
  2. package/ai-tasks.json +90 -0
  3. package/dist/build.json +1 -1
  4. package/dist/src/cli/commands.d.ts +25 -1
  5. package/dist/src/cli/commands.js +802 -15
  6. package/dist/src/cli/json-schemas.js +252 -1
  7. package/dist/src/cli/main.js +143 -4
  8. package/dist/src/core/after-install.d.ts +54 -0
  9. package/dist/src/core/after-install.js +78 -0
  10. package/dist/src/core/ask.d.ts +222 -0
  11. package/dist/src/core/ask.js +465 -0
  12. package/dist/src/core/attachments.d.ts +50 -0
  13. package/dist/src/core/attachments.js +442 -0
  14. package/dist/src/core/autostart.d.ts +118 -0
  15. package/dist/src/core/autostart.js +302 -0
  16. package/dist/src/core/brand-mark.d.ts +49 -11
  17. package/dist/src/core/brand-mark.js +116 -38
  18. package/dist/src/core/config.d.ts +102 -0
  19. package/dist/src/core/config.js +289 -11
  20. package/dist/src/core/desktop-app.d.ts +1 -1
  21. package/dist/src/core/desktop-app.js +2 -2
  22. package/dist/src/core/edit-settings.d.ts +24 -0
  23. package/dist/src/core/edit-settings.js +97 -0
  24. package/dist/src/core/handoff-brief.d.ts +4 -2
  25. package/dist/src/core/handoff-brief.js +6 -1
  26. package/dist/src/core/handoff-chain.d.ts +24 -0
  27. package/dist/src/core/handoff-chain.js +2 -0
  28. package/dist/src/core/handoff-run.d.ts +4 -3
  29. package/dist/src/core/handoff-run.js +14 -9
  30. package/dist/src/core/launch.d.ts +17 -4
  31. package/dist/src/core/launch.js +32 -24
  32. package/dist/src/core/local-build.d.ts +17 -5
  33. package/dist/src/core/local-build.js +61 -23
  34. package/dist/src/core/lock.d.ts +30 -0
  35. package/dist/src/core/lock.js +143 -0
  36. package/dist/src/core/probe.d.ts +78 -0
  37. package/dist/src/core/probe.js +127 -0
  38. package/dist/src/core/quota-levels.d.ts +6 -1
  39. package/dist/src/core/quota-levels.js +16 -5
  40. package/dist/src/core/same-login.d.ts +9 -4
  41. package/dist/src/core/same-login.js +9 -4
  42. package/dist/src/core/secret-file.d.ts +26 -0
  43. package/dist/src/core/secret-file.js +126 -7
  44. package/dist/src/core/task-spec.d.ts +95 -0
  45. package/dist/src/core/task-spec.js +209 -0
  46. package/dist/src/core/terminal.d.ts +93 -0
  47. package/dist/src/core/terminal.js +376 -0
  48. package/dist/src/core/update.d.ts +34 -12
  49. package/dist/src/core/update.js +96 -84
  50. package/dist/src/desktop/icon.js +12 -15
  51. package/dist/src/families/claude/ai-task.d.ts +8 -0
  52. package/dist/src/families/claude/ai-task.js +38 -0
  53. package/dist/src/families/claude/handoff-hook.js +4 -4
  54. package/dist/src/families/claude/index.js +6 -0
  55. package/dist/src/families/claude/quota-cache.d.ts +24 -7
  56. package/dist/src/families/claude/quota-cache.js +72 -21
  57. package/dist/src/families/codex/handoff-hook.js +4 -4
  58. package/dist/src/families/codex/index.js +16 -0
  59. package/dist/src/families/codex/login-key.d.ts +8 -0
  60. package/dist/src/families/codex/login-key.js +33 -0
  61. package/dist/src/families/grok/handoff-hook.js +4 -4
  62. package/dist/src/families/grok/index.js +4 -0
  63. package/dist/src/families/login-keys.d.ts +6 -0
  64. package/dist/src/families/login-keys.js +6 -0
  65. package/dist/src/families/pi/index.js +5 -0
  66. package/dist/src/handoff/hook.js +51 -30
  67. package/dist/src/handoff/levels.d.ts +24 -0
  68. package/dist/src/handoff/levels.js +70 -0
  69. package/dist/src/handoff/messages.d.ts +6 -3
  70. package/dist/src/handoff/messages.js +20 -7
  71. package/dist/src/handoff/reader.d.ts +6 -3
  72. package/dist/src/menubar/agent.d.ts +3 -0
  73. package/dist/src/menubar/agent.js +21 -0
  74. package/dist/src/menubar/script.d.ts +8 -0
  75. package/dist/src/menubar/script.js +457 -0
  76. package/dist/src/menubar/snapshot.d.ts +115 -0
  77. package/dist/src/menubar/snapshot.js +255 -0
  78. package/dist/src/menubar/strings.d.ts +87 -0
  79. package/dist/src/menubar/strings.js +88 -0
  80. package/dist/src/panel/background.js +15 -21
  81. package/dist/src/panel/handler.d.ts +41 -2
  82. package/dist/src/panel/handler.js +394 -10
  83. package/dist/src/panel/i18n.d.ts +205 -2
  84. package/dist/src/panel/i18n.js +441 -35
  85. package/dist/src/panel/page-logic.d.ts +301 -0
  86. package/dist/src/panel/page-logic.js +532 -0
  87. package/dist/src/panel/page-script.js +1135 -185
  88. package/dist/src/panel/page-styles.js +111 -32
  89. package/dist/src/panel/page.d.ts +12 -0
  90. package/dist/src/panel/page.js +7 -0
  91. package/dist/src/panel/server.d.ts +16 -2
  92. package/dist/src/panel/server.js +41 -13
  93. package/dist/src/plugins/check.d.ts +47 -0
  94. package/dist/src/plugins/check.js +544 -0
  95. package/dist/src/plugins/scaffold.d.ts +21 -0
  96. package/dist/src/plugins/scaffold.js +123 -0
  97. package/dist/src/quota/statusline-tap.js +1 -1
  98. package/dist/src/runtime.d.ts +19 -1
  99. package/dist/src/runtime.js +53 -14
  100. package/dist/src/types.d.ts +33 -0
  101. package/package.json +4 -3
  102. package/schemas/ask-choices.json +168 -0
  103. package/schemas/ask-print.json +87 -0
  104. package/schemas/ask.json +180 -0
  105. package/schemas/autostart.json +165 -0
  106. package/schemas/config-get.json +132 -0
  107. package/schemas/config-set.json +107 -0
  108. package/schemas/config.json +90 -7
  109. package/schemas/edit.json +119 -0
  110. package/schemas/error.json +4 -0
  111. package/schemas/families.json +4 -0
  112. package/schemas/key.json +93 -0
  113. package/schemas/list.json +4 -0
  114. package/schemas/local.json +1 -1
  115. package/schemas/menubar-snapshot.json +646 -0
  116. package/schemas/menubar-start.json +112 -0
  117. package/schemas/menubar.json +165 -0
  118. package/schemas/plugins-check.json +113 -0
  119. package/schemas/plugins-new.json +87 -0
  120. package/schemas/terminal.json +152 -0
  121. package/schemas/try.json +109 -0
  122. package/schemas/update.json +4 -0
  123. package/skills/sideby/SKILL.md +16 -6
  124. package/skills/sideby/references/accounts.md +1 -1
  125. package/skills/sideby/references/ai-tasks.md +126 -0
  126. package/skills/sideby/references/handoff.md +3 -1
  127. package/skills/sideby/references/panel.md +20 -0
  128. package/skills/sideby/references/update.md +1 -1
@@ -0,0 +1,646 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/menubar-snapshot.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "title",
8
+ "level",
9
+ "tooltip",
10
+ "updatedAt",
11
+ "lang",
12
+ "card",
13
+ "hotkey",
14
+ "headline",
15
+ "sections",
16
+ "labels"
17
+ ],
18
+ "properties": {
19
+ "schemaVersion": {
20
+ "type": "number",
21
+ "const": 1
22
+ },
23
+ "title": {
24
+ "type": "string",
25
+ "description": "The words next to the icon, such as `Codex 62%`, once the tightest tool reaches 60%; empty otherwise."
26
+ },
27
+ "level": {
28
+ "anyOf": [
29
+ {
30
+ "type": "string",
31
+ "const": "ok"
32
+ },
33
+ {
34
+ "type": "string",
35
+ "const": "warn"
36
+ },
37
+ {
38
+ "type": "string",
39
+ "const": "fail"
40
+ },
41
+ {
42
+ "type": "string",
43
+ "const": "none"
44
+ }
45
+ ]
46
+ },
47
+ "tooltip": {
48
+ "type": "string"
49
+ },
50
+ "updatedAt": {
51
+ "type": "string",
52
+ "description": "When this snapshot was made (ISO)."
53
+ },
54
+ "lang": {
55
+ "anyOf": [
56
+ {
57
+ "type": "string",
58
+ "const": "en"
59
+ },
60
+ {
61
+ "type": "string",
62
+ "const": "zh"
63
+ }
64
+ ]
65
+ },
66
+ "card": {
67
+ "anyOf": [
68
+ {
69
+ "type": "object",
70
+ "required": [
71
+ "status",
72
+ "detail",
73
+ "level"
74
+ ],
75
+ "properties": {
76
+ "status": {
77
+ "type": "string"
78
+ },
79
+ "detail": {
80
+ "type": "string"
81
+ },
82
+ "level": {
83
+ "anyOf": [
84
+ {
85
+ "type": "string",
86
+ "const": "ok"
87
+ },
88
+ {
89
+ "type": "string",
90
+ "const": "warn"
91
+ },
92
+ {
93
+ "type": "string",
94
+ "const": "fail"
95
+ },
96
+ {
97
+ "type": "string",
98
+ "const": "none"
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ },
104
+ {
105
+ "type": "null"
106
+ }
107
+ ],
108
+ "description": "The card at the top of the menu: a bold status and a line naming the account; null without quota data."
109
+ },
110
+ "hotkey": {
111
+ "anyOf": [
112
+ {
113
+ "type": "object",
114
+ "required": [
115
+ "keyCode",
116
+ "modifiers",
117
+ "label"
118
+ ],
119
+ "properties": {
120
+ "keyCode": {
121
+ "type": "number"
122
+ },
123
+ "modifiers": {
124
+ "type": "number"
125
+ },
126
+ "label": {
127
+ "type": "string"
128
+ }
129
+ }
130
+ },
131
+ {
132
+ "type": "null"
133
+ }
134
+ ],
135
+ "description": "The shortcut that opens the menu (config `menubar.hotkey`): a macOS key code and Carbon modifiers."
136
+ },
137
+ "headline": {
138
+ "type": "string",
139
+ "description": "The grey first line of the menu: which account the title belongs to; empty without quota data."
140
+ },
141
+ "sections": {
142
+ "type": "array",
143
+ "items": {
144
+ "type": "object",
145
+ "required": [
146
+ "family",
147
+ "title",
148
+ "logo",
149
+ "columns",
150
+ "rows",
151
+ "more"
152
+ ],
153
+ "properties": {
154
+ "family": {
155
+ "type": "string"
156
+ },
157
+ "title": {
158
+ "type": "string"
159
+ },
160
+ "logo": {
161
+ "anyOf": [
162
+ {
163
+ "type": "object",
164
+ "required": [
165
+ "path"
166
+ ],
167
+ "properties": {
168
+ "path": {
169
+ "type": "string"
170
+ },
171
+ "fillRule": {
172
+ "type": "string",
173
+ "enum": [
174
+ "nonzero",
175
+ "evenodd"
176
+ ]
177
+ },
178
+ "color": {
179
+ "type": "string",
180
+ "description": "Brand colour; without one the mark follows the text colour."
181
+ }
182
+ }
183
+ },
184
+ {
185
+ "type": "null"
186
+ }
187
+ ]
188
+ },
189
+ "columns": {
190
+ "type": "array",
191
+ "additionalItems": false,
192
+ "items": [
193
+ {
194
+ "anyOf": [
195
+ {
196
+ "type": "string"
197
+ },
198
+ {
199
+ "type": "null"
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "anyOf": [
205
+ {
206
+ "type": "string"
207
+ },
208
+ {
209
+ "type": "null"
210
+ }
211
+ ]
212
+ }
213
+ ],
214
+ "minItems": 2,
215
+ "description": "The window names over the two bar columns, such as `5h` and `7d`."
216
+ },
217
+ "rows": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "object",
221
+ "required": [
222
+ "ref",
223
+ "label",
224
+ "detail",
225
+ "level",
226
+ "recommended",
227
+ "tip",
228
+ "bars",
229
+ "reset",
230
+ "note"
231
+ ],
232
+ "properties": {
233
+ "ref": {
234
+ "type": "string"
235
+ },
236
+ "label": {
237
+ "type": "string"
238
+ },
239
+ "detail": {
240
+ "type": "string",
241
+ "description": "The whole row as one line of text."
242
+ },
243
+ "level": {
244
+ "anyOf": [
245
+ {
246
+ "type": "string",
247
+ "const": "ok"
248
+ },
249
+ {
250
+ "type": "string",
251
+ "const": "warn"
252
+ },
253
+ {
254
+ "type": "string",
255
+ "const": "fail"
256
+ },
257
+ {
258
+ "type": "string",
259
+ "const": "none"
260
+ }
261
+ ]
262
+ },
263
+ "recommended": {
264
+ "type": "boolean",
265
+ "description": "The account `sideby next` would pick in this Family."
266
+ },
267
+ "tip": {
268
+ "type": "string",
269
+ "description": "Hover text: when each window resets, and what a click does."
270
+ },
271
+ "bars": {
272
+ "anyOf": [
273
+ {
274
+ "type": "array",
275
+ "additionalItems": false,
276
+ "items": [
277
+ {
278
+ "anyOf": [
279
+ {
280
+ "type": "object",
281
+ "required": [
282
+ "label",
283
+ "percent",
284
+ "level"
285
+ ],
286
+ "properties": {
287
+ "label": {
288
+ "type": "string"
289
+ },
290
+ "percent": {
291
+ "type": "number"
292
+ },
293
+ "level": {
294
+ "anyOf": [
295
+ {
296
+ "type": "string",
297
+ "const": "ok"
298
+ },
299
+ {
300
+ "type": "string",
301
+ "const": "warn"
302
+ },
303
+ {
304
+ "type": "string",
305
+ "const": "fail"
306
+ },
307
+ {
308
+ "type": "string",
309
+ "const": "none"
310
+ }
311
+ ]
312
+ }
313
+ }
314
+ },
315
+ {
316
+ "type": "null"
317
+ }
318
+ ]
319
+ },
320
+ {
321
+ "anyOf": [
322
+ {
323
+ "type": "object",
324
+ "required": [
325
+ "label",
326
+ "percent",
327
+ "level"
328
+ ],
329
+ "properties": {
330
+ "label": {
331
+ "type": "string"
332
+ },
333
+ "percent": {
334
+ "type": "number"
335
+ },
336
+ "level": {
337
+ "anyOf": [
338
+ {
339
+ "type": "string",
340
+ "const": "ok"
341
+ },
342
+ {
343
+ "type": "string",
344
+ "const": "warn"
345
+ },
346
+ {
347
+ "type": "string",
348
+ "const": "fail"
349
+ },
350
+ {
351
+ "type": "string",
352
+ "const": "none"
353
+ }
354
+ ]
355
+ }
356
+ }
357
+ },
358
+ {
359
+ "type": "null"
360
+ }
361
+ ]
362
+ }
363
+ ],
364
+ "minItems": 2
365
+ },
366
+ {
367
+ "type": "null"
368
+ }
369
+ ],
370
+ "description": "The shorter window, then the longer one; a single window fills the second. Null without quota."
371
+ },
372
+ "reset": {
373
+ "type": "string",
374
+ "description": "Until the fullest window resets, such as `4d 17h`; empty when nothing is used."
375
+ },
376
+ "note": {
377
+ "type": "string",
378
+ "description": "Text drawn instead of bars, such as `API key`; empty when bars are drawn."
379
+ }
380
+ }
381
+ },
382
+ "description": "The recommended account first, then Display Order."
383
+ },
384
+ "more": {
385
+ "anyOf": [
386
+ {
387
+ "type": "object",
388
+ "required": [
389
+ "title",
390
+ "rows"
391
+ ],
392
+ "properties": {
393
+ "title": {
394
+ "type": "string"
395
+ },
396
+ "rows": {
397
+ "type": "array",
398
+ "items": {
399
+ "type": "object",
400
+ "required": [
401
+ "ref",
402
+ "label",
403
+ "detail",
404
+ "level",
405
+ "recommended",
406
+ "tip",
407
+ "bars",
408
+ "reset",
409
+ "note"
410
+ ],
411
+ "properties": {
412
+ "ref": {
413
+ "type": "string"
414
+ },
415
+ "label": {
416
+ "type": "string"
417
+ },
418
+ "detail": {
419
+ "type": "string",
420
+ "description": "The whole row as one line of text."
421
+ },
422
+ "level": {
423
+ "anyOf": [
424
+ {
425
+ "type": "string",
426
+ "const": "ok"
427
+ },
428
+ {
429
+ "type": "string",
430
+ "const": "warn"
431
+ },
432
+ {
433
+ "type": "string",
434
+ "const": "fail"
435
+ },
436
+ {
437
+ "type": "string",
438
+ "const": "none"
439
+ }
440
+ ]
441
+ },
442
+ "recommended": {
443
+ "type": "boolean",
444
+ "description": "The account `sideby next` would pick in this Family."
445
+ },
446
+ "tip": {
447
+ "type": "string",
448
+ "description": "Hover text: when each window resets, and what a click does."
449
+ },
450
+ "bars": {
451
+ "anyOf": [
452
+ {
453
+ "type": "array",
454
+ "additionalItems": false,
455
+ "items": [
456
+ {
457
+ "anyOf": [
458
+ {
459
+ "type": "object",
460
+ "required": [
461
+ "label",
462
+ "percent",
463
+ "level"
464
+ ],
465
+ "properties": {
466
+ "label": {
467
+ "type": "string"
468
+ },
469
+ "percent": {
470
+ "type": "number"
471
+ },
472
+ "level": {
473
+ "anyOf": [
474
+ {
475
+ "type": "string",
476
+ "const": "ok"
477
+ },
478
+ {
479
+ "type": "string",
480
+ "const": "warn"
481
+ },
482
+ {
483
+ "type": "string",
484
+ "const": "fail"
485
+ },
486
+ {
487
+ "type": "string",
488
+ "const": "none"
489
+ }
490
+ ]
491
+ }
492
+ }
493
+ },
494
+ {
495
+ "type": "null"
496
+ }
497
+ ]
498
+ },
499
+ {
500
+ "anyOf": [
501
+ {
502
+ "type": "object",
503
+ "required": [
504
+ "label",
505
+ "percent",
506
+ "level"
507
+ ],
508
+ "properties": {
509
+ "label": {
510
+ "type": "string"
511
+ },
512
+ "percent": {
513
+ "type": "number"
514
+ },
515
+ "level": {
516
+ "anyOf": [
517
+ {
518
+ "type": "string",
519
+ "const": "ok"
520
+ },
521
+ {
522
+ "type": "string",
523
+ "const": "warn"
524
+ },
525
+ {
526
+ "type": "string",
527
+ "const": "fail"
528
+ },
529
+ {
530
+ "type": "string",
531
+ "const": "none"
532
+ }
533
+ ]
534
+ }
535
+ }
536
+ },
537
+ {
538
+ "type": "null"
539
+ }
540
+ ]
541
+ }
542
+ ],
543
+ "minItems": 2
544
+ },
545
+ {
546
+ "type": "null"
547
+ }
548
+ ],
549
+ "description": "The shorter window, then the longer one; a single window fills the second. Null without quota."
550
+ },
551
+ "reset": {
552
+ "type": "string",
553
+ "description": "Until the fullest window resets, such as `4d 17h`; empty when nothing is used."
554
+ },
555
+ "note": {
556
+ "type": "string",
557
+ "description": "Text drawn instead of bars, such as `API key`; empty when bars are drawn."
558
+ }
559
+ }
560
+ }
561
+ }
562
+ }
563
+ },
564
+ {
565
+ "type": "null"
566
+ }
567
+ ],
568
+ "description": "API key and signed-out accounts behind one submenu; null when there are none."
569
+ }
570
+ }
571
+ },
572
+ "description": "One per Family with accounts, in Display Order."
573
+ },
574
+ "labels": {
575
+ "type": "object",
576
+ "patternProperties": {
577
+ "^.*$": {
578
+ "type": "string"
579
+ }
580
+ },
581
+ "description": "Footer words; `{n}` in `updatedMinutes` is minutes."
582
+ },
583
+ "_notice": {
584
+ "type": "object",
585
+ "properties": {
586
+ "update": {
587
+ "type": "object",
588
+ "required": [
589
+ "current",
590
+ "latest",
591
+ "command",
592
+ "message"
593
+ ],
594
+ "properties": {
595
+ "current": {
596
+ "type": "string"
597
+ },
598
+ "latest": {
599
+ "type": "string"
600
+ },
601
+ "command": {
602
+ "type": "string",
603
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
604
+ },
605
+ "message": {
606
+ "type": "string"
607
+ }
608
+ }
609
+ },
610
+ "skill": {
611
+ "type": "object",
612
+ "required": [
613
+ "installed",
614
+ "current",
615
+ "command",
616
+ "message"
617
+ ],
618
+ "properties": {
619
+ "installed": {
620
+ "anyOf": [
621
+ {
622
+ "type": "string"
623
+ },
624
+ {
625
+ "type": "null"
626
+ }
627
+ ],
628
+ "description": "The skill's version; null when it has none."
629
+ },
630
+ "current": {
631
+ "type": "string"
632
+ },
633
+ "command": {
634
+ "type": "string",
635
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
636
+ },
637
+ "message": {
638
+ "type": "string"
639
+ }
640
+ }
641
+ }
642
+ },
643
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
644
+ }
645
+ }
646
+ }