sideby 0.21.0 → 0.22.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.
- package/README.md +1 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.js +115 -10
- package/dist/src/cli/format.js +3 -2
- package/dist/src/cli/json-schemas.js +81 -46
- package/dist/src/cli/main.js +6 -3
- package/dist/src/core/accounts.d.ts +6 -1
- package/dist/src/core/accounts.js +16 -3
- package/dist/src/core/ask.d.ts +2 -1
- package/dist/src/core/ask.js +6 -3
- package/dist/src/core/claude-settings-file.d.ts +57 -0
- package/dist/src/core/claude-settings-file.js +104 -2
- package/dist/src/core/config.d.ts +29 -15
- package/dist/src/core/config.js +40 -2
- package/dist/src/core/create.js +4 -1
- package/dist/src/core/desktop-app.js +5 -1
- package/dist/src/core/handoff-overview.d.ts +4 -1
- package/dist/src/core/handoff-overview.js +3 -2
- package/dist/src/core/handoff-rules.d.ts +34 -0
- package/dist/src/core/handoff-rules.js +115 -0
- package/dist/src/core/handoff-select.js +45 -28
- package/dist/src/core/handoff-status.d.ts +37 -7
- package/dist/src/core/handoff-status.js +95 -19
- package/dist/src/core/handoff.d.ts +4 -1
- package/dist/src/core/handoff.js +8 -5
- package/dist/src/core/inbound.d.ts +11 -3
- package/dist/src/core/inbound.js +26 -74
- package/dist/src/core/launch.js +6 -4
- package/dist/src/core/quota-levels.d.ts +6 -0
- package/dist/src/core/quota-levels.js +8 -0
- package/dist/src/core/remote-control.d.ts +10 -12
- package/dist/src/core/remote-control.js +29 -86
- package/dist/src/core/tuning-apply.js +12 -20
- package/dist/src/families/agy/index.d.ts +8 -0
- package/dist/src/families/agy/index.js +53 -0
- package/dist/src/families/agy/quota.d.ts +9 -0
- package/dist/src/families/agy/quota.js +110 -0
- package/dist/src/families/index.js +7 -0
- package/dist/src/families/logos.d.ts +10 -0
- package/dist/src/families/logos.js +12 -1
- package/dist/src/menubar/script.js +26 -3
- package/dist/src/menubar/snapshot.d.ts +23 -6
- package/dist/src/menubar/snapshot.js +126 -39
- package/dist/src/menubar/strings.d.ts +12 -2
- package/dist/src/menubar/strings.js +12 -2
- package/dist/src/panel/handler.d.ts +2 -1
- package/dist/src/panel/handler.js +81 -45
- package/dist/src/panel/i18n.d.ts +57 -7
- package/dist/src/panel/i18n.js +156 -56
- package/dist/src/panel/page-logic.d.ts +47 -19
- package/dist/src/panel/page-logic.js +33 -7
- package/dist/src/panel/page-script.js +263 -94
- package/dist/src/panel/page-styles.js +105 -8
- package/dist/src/panel/page.js +3 -3
- package/dist/src/plugins/check.js +27 -13
- package/dist/src/plugins/loader.d.ts +11 -0
- package/dist/src/plugins/loader.js +47 -1
- package/dist/src/runtime.d.ts +5 -2
- package/dist/src/runtime.js +12 -5
- package/dist/src/types.d.ts +35 -5
- package/package.json +2 -2
- package/schemas/config.json +16 -1
- package/schemas/families.json +8 -5
- package/schemas/handoff-disable.json +22 -0
- package/schemas/handoff-enable.json +22 -0
- package/schemas/handoff-rules.json +302 -0
- package/schemas/handoff-status.json +26 -0
- package/schemas/list.json +5 -0
- package/schemas/menubar-snapshot.json +309 -2
- package/skills/sideby/SKILL.md +3 -2
- package/skills/sideby/references/accounts.md +1 -0
- package/skills/sideby/references/handoff.md +7 -3
- package/skills/sideby/references/quota.md +2 -0
|
@@ -178,6 +178,49 @@
|
|
|
178
178
|
"color": {
|
|
179
179
|
"type": "string",
|
|
180
180
|
"description": "Brand colour; without one the mark follows the text colour."
|
|
181
|
+
},
|
|
182
|
+
"gradients": {
|
|
183
|
+
"type": "array",
|
|
184
|
+
"items": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"required": [
|
|
187
|
+
"from",
|
|
188
|
+
"to",
|
|
189
|
+
"color"
|
|
190
|
+
],
|
|
191
|
+
"properties": {
|
|
192
|
+
"from": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"additionalItems": false,
|
|
195
|
+
"items": [
|
|
196
|
+
{
|
|
197
|
+
"type": "number"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "number"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"minItems": 2
|
|
204
|
+
},
|
|
205
|
+
"to": {
|
|
206
|
+
"type": "array",
|
|
207
|
+
"additionalItems": false,
|
|
208
|
+
"items": [
|
|
209
|
+
{
|
|
210
|
+
"type": "number"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "number"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"minItems": 2
|
|
217
|
+
},
|
|
218
|
+
"color": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"description": "Colour washes over a multicoloured mark: each fades from `color` at `from` to clear at `to`."
|
|
181
224
|
}
|
|
182
225
|
}
|
|
183
226
|
},
|
|
@@ -228,6 +271,7 @@
|
|
|
228
271
|
"stale",
|
|
229
272
|
"tip",
|
|
230
273
|
"bars",
|
|
274
|
+
"groups",
|
|
231
275
|
"reset",
|
|
232
276
|
"note"
|
|
233
277
|
],
|
|
@@ -283,7 +327,7 @@
|
|
|
283
327
|
},
|
|
284
328
|
"tip": {
|
|
285
329
|
"type": "string",
|
|
286
|
-
"description": "Hover text: when each window
|
|
330
|
+
"description": "Hover text: when the numbers were read, each window's use and reset, and what a click does."
|
|
287
331
|
},
|
|
288
332
|
"bars": {
|
|
289
333
|
"anyOf": [
|
|
@@ -386,6 +430,137 @@
|
|
|
386
430
|
],
|
|
387
431
|
"description": "The shorter window, then the longer one; a single window fills the second. Null without quota."
|
|
388
432
|
},
|
|
433
|
+
"groups": {
|
|
434
|
+
"anyOf": [
|
|
435
|
+
{
|
|
436
|
+
"type": "array",
|
|
437
|
+
"items": {
|
|
438
|
+
"type": "object",
|
|
439
|
+
"required": [
|
|
440
|
+
"label",
|
|
441
|
+
"bars",
|
|
442
|
+
"reset",
|
|
443
|
+
"tip"
|
|
444
|
+
],
|
|
445
|
+
"properties": {
|
|
446
|
+
"label": {
|
|
447
|
+
"type": "string"
|
|
448
|
+
},
|
|
449
|
+
"bars": {
|
|
450
|
+
"anyOf": [
|
|
451
|
+
{
|
|
452
|
+
"type": "array",
|
|
453
|
+
"additionalItems": false,
|
|
454
|
+
"items": [
|
|
455
|
+
{
|
|
456
|
+
"anyOf": [
|
|
457
|
+
{
|
|
458
|
+
"type": "object",
|
|
459
|
+
"required": [
|
|
460
|
+
"label",
|
|
461
|
+
"percent",
|
|
462
|
+
"level"
|
|
463
|
+
],
|
|
464
|
+
"properties": {
|
|
465
|
+
"label": {
|
|
466
|
+
"type": "string"
|
|
467
|
+
},
|
|
468
|
+
"percent": {
|
|
469
|
+
"type": "number"
|
|
470
|
+
},
|
|
471
|
+
"level": {
|
|
472
|
+
"anyOf": [
|
|
473
|
+
{
|
|
474
|
+
"type": "string",
|
|
475
|
+
"const": "ok"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"type": "string",
|
|
479
|
+
"const": "warn"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"type": "string",
|
|
483
|
+
"const": "fail"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"type": "string",
|
|
487
|
+
"const": "none"
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"type": "null"
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"anyOf": [
|
|
500
|
+
{
|
|
501
|
+
"type": "object",
|
|
502
|
+
"required": [
|
|
503
|
+
"label",
|
|
504
|
+
"percent",
|
|
505
|
+
"level"
|
|
506
|
+
],
|
|
507
|
+
"properties": {
|
|
508
|
+
"label": {
|
|
509
|
+
"type": "string"
|
|
510
|
+
},
|
|
511
|
+
"percent": {
|
|
512
|
+
"type": "number"
|
|
513
|
+
},
|
|
514
|
+
"level": {
|
|
515
|
+
"anyOf": [
|
|
516
|
+
{
|
|
517
|
+
"type": "string",
|
|
518
|
+
"const": "ok"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"type": "string",
|
|
522
|
+
"const": "warn"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"type": "string",
|
|
526
|
+
"const": "fail"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"type": "string",
|
|
530
|
+
"const": "none"
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"type": "null"
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"minItems": 2
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"type": "null"
|
|
546
|
+
}
|
|
547
|
+
]
|
|
548
|
+
},
|
|
549
|
+
"reset": {
|
|
550
|
+
"type": "string"
|
|
551
|
+
},
|
|
552
|
+
"tip": {
|
|
553
|
+
"type": "string"
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"type": "null"
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
"description": "A Host whose every limit covers one model group: a line per group under the account, each with its own bars; the account's `bars` are then null."
|
|
563
|
+
},
|
|
389
564
|
"reset": {
|
|
390
565
|
"type": "string",
|
|
391
566
|
"description": "Until the fullest window resets, such as `4d 17h`; empty when nothing is used."
|
|
@@ -424,6 +599,7 @@
|
|
|
424
599
|
"stale",
|
|
425
600
|
"tip",
|
|
426
601
|
"bars",
|
|
602
|
+
"groups",
|
|
427
603
|
"reset",
|
|
428
604
|
"note"
|
|
429
605
|
],
|
|
@@ -479,7 +655,7 @@
|
|
|
479
655
|
},
|
|
480
656
|
"tip": {
|
|
481
657
|
"type": "string",
|
|
482
|
-
"description": "Hover text: when each window
|
|
658
|
+
"description": "Hover text: when the numbers were read, each window's use and reset, and what a click does."
|
|
483
659
|
},
|
|
484
660
|
"bars": {
|
|
485
661
|
"anyOf": [
|
|
@@ -582,6 +758,137 @@
|
|
|
582
758
|
],
|
|
583
759
|
"description": "The shorter window, then the longer one; a single window fills the second. Null without quota."
|
|
584
760
|
},
|
|
761
|
+
"groups": {
|
|
762
|
+
"anyOf": [
|
|
763
|
+
{
|
|
764
|
+
"type": "array",
|
|
765
|
+
"items": {
|
|
766
|
+
"type": "object",
|
|
767
|
+
"required": [
|
|
768
|
+
"label",
|
|
769
|
+
"bars",
|
|
770
|
+
"reset",
|
|
771
|
+
"tip"
|
|
772
|
+
],
|
|
773
|
+
"properties": {
|
|
774
|
+
"label": {
|
|
775
|
+
"type": "string"
|
|
776
|
+
},
|
|
777
|
+
"bars": {
|
|
778
|
+
"anyOf": [
|
|
779
|
+
{
|
|
780
|
+
"type": "array",
|
|
781
|
+
"additionalItems": false,
|
|
782
|
+
"items": [
|
|
783
|
+
{
|
|
784
|
+
"anyOf": [
|
|
785
|
+
{
|
|
786
|
+
"type": "object",
|
|
787
|
+
"required": [
|
|
788
|
+
"label",
|
|
789
|
+
"percent",
|
|
790
|
+
"level"
|
|
791
|
+
],
|
|
792
|
+
"properties": {
|
|
793
|
+
"label": {
|
|
794
|
+
"type": "string"
|
|
795
|
+
},
|
|
796
|
+
"percent": {
|
|
797
|
+
"type": "number"
|
|
798
|
+
},
|
|
799
|
+
"level": {
|
|
800
|
+
"anyOf": [
|
|
801
|
+
{
|
|
802
|
+
"type": "string",
|
|
803
|
+
"const": "ok"
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
"type": "string",
|
|
807
|
+
"const": "warn"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"type": "string",
|
|
811
|
+
"const": "fail"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"type": "string",
|
|
815
|
+
"const": "none"
|
|
816
|
+
}
|
|
817
|
+
]
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"type": "null"
|
|
823
|
+
}
|
|
824
|
+
]
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"anyOf": [
|
|
828
|
+
{
|
|
829
|
+
"type": "object",
|
|
830
|
+
"required": [
|
|
831
|
+
"label",
|
|
832
|
+
"percent",
|
|
833
|
+
"level"
|
|
834
|
+
],
|
|
835
|
+
"properties": {
|
|
836
|
+
"label": {
|
|
837
|
+
"type": "string"
|
|
838
|
+
},
|
|
839
|
+
"percent": {
|
|
840
|
+
"type": "number"
|
|
841
|
+
},
|
|
842
|
+
"level": {
|
|
843
|
+
"anyOf": [
|
|
844
|
+
{
|
|
845
|
+
"type": "string",
|
|
846
|
+
"const": "ok"
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"type": "string",
|
|
850
|
+
"const": "warn"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"type": "string",
|
|
854
|
+
"const": "fail"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"type": "string",
|
|
858
|
+
"const": "none"
|
|
859
|
+
}
|
|
860
|
+
]
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"type": "null"
|
|
866
|
+
}
|
|
867
|
+
]
|
|
868
|
+
}
|
|
869
|
+
],
|
|
870
|
+
"minItems": 2
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"type": "null"
|
|
874
|
+
}
|
|
875
|
+
]
|
|
876
|
+
},
|
|
877
|
+
"reset": {
|
|
878
|
+
"type": "string"
|
|
879
|
+
},
|
|
880
|
+
"tip": {
|
|
881
|
+
"type": "string"
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"type": "null"
|
|
888
|
+
}
|
|
889
|
+
],
|
|
890
|
+
"description": "A Host whose every limit covers one model group: a line per group under the account, each with its own bars; the account's `bars` are then null."
|
|
891
|
+
},
|
|
585
892
|
"reset": {
|
|
586
893
|
"type": "string",
|
|
587
894
|
"description": "Until the fullest window resets, such as `4d 17h`; empty when nothing is used."
|
package/skills/sideby/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sideby
|
|
3
3
|
description: Use when the user runs, or wants to run, several AI coding accounts (Claude Code, Codex, Grok Build, pi) side by side. Covers installing sideby and setting up a new account ("install sideby", "set up another Claude account", "add cc008", "配置一个 cc00x", "再加一个 Codex 账号"), explaining what accounts share and what stays separate ("what do my accounts share?", "这些账号共享了什么"), showing which account a session is ("show [cc001] in the status line", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, moving the current task to another account ("用 cc008 继续", "交回 cc008"), adding a short command (alias) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, and repairing drifted account directories (skills, hooks, rules or settings not shared, wrong symlinks, credential file permissions). Drives the `sideby` CLI with `--json`; the agent does every step except browser sign-in, filling in secrets and starting interactive sessions, which it hands to the user as one command (inside an Auto Handoff session, `sideby handoff ready --to` moves the task itself).
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.
|
|
5
|
+
version: "0.22.0"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -34,7 +34,7 @@ Do every step you can yourself. Only browser sign-in, secrets and interactive se
|
|
|
34
34
|
|
|
35
35
|
## What do you want to do
|
|
36
36
|
|
|
37
|
-
Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique. Families: `claude`, `codex`, `grok`, `pi
|
|
37
|
+
Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique. Families: `claude`, `codex`, `grok`, `pi`, `agy` (Antigravity CLI). `agy` is main account only (`mainOnly: true` in `sideby families --json`): agy keeps one Google sign-in per computer, so never offer `sideby new agy`; tell the user sideby supports only `agy:main` for now. Its quota comes from `agy -p /usage` per model group and never picks an account.
|
|
38
38
|
|
|
39
39
|
| The user wants to | Run | Then read |
|
|
40
40
|
|---|---|---|
|
|
@@ -57,6 +57,7 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
57
57
|
| Repair drift or permissions | `sideby doctor [ref] --json`, then `--fix` after they agree | `references/diagnose.md` |
|
|
58
58
|
| Keep working because an account hit its limit | `sideby next <family> --json` | `references/handoff.md` |
|
|
59
59
|
| Turn on Auto Handoff ("自动接力", "自动交接", "hand over when quota runs low"), see what it still needs, hand this session over now, or pick an account with room for a subtask | `sideby handoff status --json`, `sideby handoff enable --json` (exit 10 first), `sideby handoff ready`, `sideby next <family> --json` | `references/handoff.md` |
|
|
60
|
+
| Explain or change the handoff rules ("接力规则", "什么时候换号", "让 Codex 接 Claude", "别用 API 账号接力") | `sideby handoff rules --json`, `sideby config set handoff.<key> <value>` or `sideby handoff enable --other-ai/--api --json` (exit 10 first) | `references/handoff.md` |
|
|
60
61
|
| Sign an account in again or switch it to another login ("换个账号登录", "两个目录登录的是同一个号", "sign claude:work in with another account") | `sideby list --json` (`identity`, `sameLogin`), then give the user `sideby login <ref>` | `references/accounts.md` |
|
|
61
62
|
| Create an account with a given name, an API account, or a short command | `sideby new`, `sideby alias add` | `references/accounts.md` |
|
|
62
63
|
| One command that always starts the account with the most quota left ("加个 cc", "自动挑额度最多的账号启动", "start whichever has room") | `sideby alias add <short> --pick <family> --json` (exit 10 first), `sideby alias list --json` | `references/accounts.md` |
|
|
@@ -17,6 +17,7 @@ Then:
|
|
|
17
17
|
- **Subscription account**: tell the user to run `sideby login claude:work` in their own terminal (for pi, `sideby login pi:<name>` starts pi; then they type `/login`). Do not run it for them.
|
|
18
18
|
- **API account**: tell the user to run `sideby key <ref>` in their own terminal (or click **Enter key** in the Panel), which writes the key without showing it, or to open the `proxy.env` path printed by `new` in their editor. Never ask for the key or read the file yourself. It then shows `login: "not-needed"`.
|
|
19
19
|
- **pi**: a `proxy.env` in a pi account only loads provider keys; the account stays a subscription account and still needs `/login`.
|
|
20
|
+
- **agy** (Antigravity CLI): main account only. `sideby new agy …` (also `--api`) fails with `code: "family-main-only"` and writes nothing: agy keeps one Google sign-in per computer and cannot move its config. Do not work around it by changing `HOME`; tell the user to use `agy:main`.
|
|
20
21
|
- Afterwards: `sideby doctor <ref> --json` to confirm the new account is healthy, then the user starts it with `sideby run <ref>`.
|
|
21
22
|
|
|
22
23
|
## Switch an account to another login
|
|
@@ -12,7 +12,7 @@ Use this when the user says an account hit its 5-hour or weekly limit ("usage li
|
|
|
12
12
|
| `ready` | Subscription account with room; `pressure` is its fullest live window in percent | Yes, lowest `pressure` first |
|
|
13
13
|
| `unknown` | No quota data yet (no session since quota was turned on, or Claude quota is off) | Yes, after `ready` |
|
|
14
14
|
| `api` | API account, pay per use | Only with `--include-api` |
|
|
15
|
-
| `full` | A live window is
|
|
15
|
+
| `full` | A live window is more than 10 points below the Auto Handoff threshold (85% with the default 95%); `resetsAt` is when it is usable again | No |
|
|
16
16
|
| `logged-out` | Needs `sideby login <ref>` | No |
|
|
17
17
|
|
|
18
18
|
Each entry's `observedAt` says when its quota was recorded (`quotaFrom` when it was read from another account of the same login). An entry with `sameLoginAs` is signed in as the same login as the account you run in: it shares that quota and is never picked. If `hasQuota` is `false`, no account has quota data: the pick is only a guess, so say so and suggest turning quota on (see the routing table in SKILL.md) or letting the user choose.
|
|
@@ -48,13 +48,17 @@ With config `"handoff": { "auto": true }`, a session sideby started hands its ta
|
|
|
48
48
|
### Turning it on for the user
|
|
49
49
|
|
|
50
50
|
1. Run `sideby handoff status --json`. Read `auto`, `sideby` (is the `sideby` on PATH able to run the hook), each family's `starts`, `ready`, `problems` and `notes`, and `nextSteps`.
|
|
51
|
-
2. Tell the user what Auto Handoff does, that it is off by default, and the risk: hand-over between two subscriptions of one vendor (`--same-family`, cc001 → cc002) is the kind vendors may act on. Add `--same-family` only when the user asks for it. Ask which accounts each family should hand over to if they care about the order (`--order claude=codex001,cc002`; accounts or short commands, any family).
|
|
51
|
+
2. Tell the user what Auto Handoff does, that it is off by default, and the risk: hand-over between two subscriptions of one vendor (`--same-family`, cc001 → cc002) is the kind vendors may act on. Add `--same-family` only when the user asks for it. Other AI tools take over only with `--other-ai` (order with `--ai-order claude,codex`), and API accounts only with `--api`: they are billed per request and sideby does not cap spending, so say so and add `--api` only when the user asks. Ask which accounts each family should hand over to if they care about the order (`--order claude=codex001,cc002`; accounts or short commands, any family).
|
|
52
52
|
3. Run `sideby handoff enable [flags] --json`. Exit 10 means the config change was shown: show the user `diff`, ask, and only after a clear yes run the same command with `--yes`. It writes only the `handoff` key of the config and returns `nextSteps`.
|
|
53
53
|
4. Work through `nextSteps` in order. `sideby quota setup claude` and `sideby handoff setup grok` also exit 10 first: ask before adding `--yes`. `npm i -g sideby` installs or upgrades sideby on PATH; ask first. Codex needs the user to trust sideby's hooks once per account (`/hooks` in Codex); you cannot do that for them.
|
|
54
54
|
5. Run `sideby handoff status --json` again and report which families are `ready`.
|
|
55
55
|
|
|
56
56
|
To turn it off: `sideby handoff disable --json`, then `--yes` after the user agrees; the other settings stay. The panel's **Auto Handoff** page does all of this in one click (turn on, with one confirmation; turn off) and shows where each account's work goes next; for a user who is not in a terminal, point them there instead of walking through the commands.
|
|
57
57
|
|
|
58
|
+
### Explaining or changing the rules
|
|
59
|
+
|
|
60
|
+
When the user asks what the rules are, when it switches, who takes over, or whether API accounts or other AIs are used ("接力规则", "什么时候换号", "会不会用 API 账号"), run `sideby handoff rules --json` and relay each entry of `rules` in plain words (`text` is the English sentence; `params` has the numbers), then `takeover`: where each account's work would go now. Each rule's `settings` names the `handoff` keys that change it; change one with `sideby config set handoff.<key> <value>` (exit 10 shows it, `--yes` after the user agrees) or the matching `handoff enable` flag. When `apiUndecided` is true, the user had Auto Handoff on with API accounts before they became opt-in: ask once whether API accounts may take over, then set `handoff.api` to `true` or `false`. When a decision is `none`, its `reason` names the setting that would allow an account; offer it, do not turn it on unasked.
|
|
61
|
+
|
|
58
62
|
## Picking an account for a subtask
|
|
59
63
|
|
|
60
64
|
Before you delegate work to another account (for example a review in a headless run), run `sideby next <family> --json` and use its `pick`, so the subtask lands on the account with the most room. Prefer an account of the same family for speed; running two subscriptions of one vendor at once carries the same vendor risk as `sameFamily`, so say so. A headless run such as `sideby run <pick> -- -p "<task>"` is yours to start only when the user asked for the delegation.
|
|
@@ -66,7 +70,7 @@ Before you delegate work to another account (for example a review in a headless
|
|
|
66
70
|
|
|
67
71
|
## Settings and overview
|
|
68
72
|
|
|
69
|
-
`sideby handoff enable --threshold 95 --prepare-at 80 --wait-minutes 30 --countdown 10 --json` previews the settings. `--threshold` is the quota percentage to hand over, `--prepare-at` the percentage to prepare the Brief, `--wait-minutes` the longest reset wait, and `--countdown` the seconds before handing over. Read the validated `settings` and `diff`; on exit 10, show the change and confirm before repeating with `--yes`. Keep the user's chosen `--same-family` and `--order` options in the confirmed command.
|
|
73
|
+
`sideby handoff enable --threshold 95 --prepare-at 80 --wait-minutes 30 --countdown 10 --json` previews the settings. `--threshold` is the quota percentage to hand over, `--prepare-at` the percentage to prepare the Brief, `--wait-minutes` the longest reset wait, and `--countdown` the seconds before handing over. Read the validated `settings` and `diff`; on exit 10, show the change and confirm before repeating with `--yes`. Keep the user's chosen `--same-family`, `--other-ai`, `--ai-order`, `--api` and `--order` options in the confirmed command.
|
|
70
74
|
|
|
71
75
|
`sideby handoff status --json` also includes `overview`: `settings`, `takeover` (each account's `ref`, `family`, `starts`, `decision`) and `recent` (the last hand-overs' `from`, `to`, `at`, `trigger`, `briefSource`). A decision is `pick` with `ref`, `wait` with `until`, or `none` with `reason`; optional `skipped` and `earliestReset` explain exclusions and resets. An empty takeover list while Auto Handoff is off is expected. No Brief text is returned.
|
|
72
76
|
|
|
@@ -15,6 +15,8 @@ Two accounts of one tool signed in as the same login (Claude: same email and org
|
|
|
15
15
|
|
|
16
16
|
Grok quota needs no setup: sideby asks the `grok` CLI of each signed-in account (`grok agent --no-leader stdio`, the Host makes the request with its own login; sideby never reads `auth.json`) at most every 15 minutes, and also reads the quota Grok logs after each turn. `sideby quota grok --refresh` asks again now. `quota.status: "unavailable"` with `reason: "fetch-failed"` carries the cause and next step in `detail` (update Grok, `sideby login grok:<name>`); `"not-enabled"` means the user turned it off (config `quota.check.grok: false`, or the Panel's Settings) or it runs in CI. A reading with `fetchError` is the last good one; say it may be old.
|
|
17
17
|
|
|
18
|
+
Antigravity CLI (`agy`, main account only) quota also needs no setup: sideby runs `agy -p /usage --output-format json` (agy answers with its own Google sign-in and starts no model turn) at most every 15 minutes; `sideby quota agy --refresh` asks again now, and config `quota.check.agy: false` turns it off. Each window carries a model group `name` (5-hour and 7-day windows per group, some groups weekly only); tell the user which group each number belongs to. Named windows never count toward picking an account. A `detail` saying agy is not signed in means the user runs `sideby login agy:main` (it starts `agy`; they sign in with Google in the browser).
|
|
19
|
+
|
|
18
20
|
A window with a `name` (a plugin's Cursor "Other models") covers only some models: show it, but it does not make the account full.
|
|
19
21
|
|
|
20
22
|
Usage (7-day tokens) is read by sideby itself from Claude Code and Codex local records; no ccusage is needed. Grok and pi have no usage source; pi has no quota either.
|