sideby 0.21.0 → 0.23.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/ai-tasks.json +14 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +7 -0
- package/dist/src/cli/commands.js +441 -31
- package/dist/src/cli/format.js +3 -2
- package/dist/src/cli/json-schemas.js +157 -47
- package/dist/src/cli/main.js +38 -7
- 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 +12 -4
- 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 +34 -16
- package/dist/src/core/config.js +58 -5
- 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 +13 -2
- package/dist/src/core/quota-levels.js +21 -3
- package/dist/src/core/remote-control.d.ts +10 -12
- package/dist/src/core/remote-control.js +29 -86
- package/dist/src/core/themes.d.ts +107 -0
- package/dist/src/core/themes.js +463 -0
- 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 +33 -6
- package/dist/src/menubar/snapshot.js +138 -43
- package/dist/src/menubar/strings.d.ts +18 -2
- package/dist/src/menubar/strings.js +18 -2
- package/dist/src/panel/handler.d.ts +4 -1
- package/dist/src/panel/handler.js +206 -46
- package/dist/src/panel/i18n.d.ts +106 -7
- package/dist/src/panel/i18n.js +260 -62
- package/dist/src/panel/page-logic.d.ts +67 -20
- package/dist/src/panel/page-logic.js +74 -7
- package/dist/src/panel/page-script.js +522 -124
- package/dist/src/panel/page-styles.d.ts +2 -0
- package/dist/src/panel/page-styles.js +157 -34
- package/dist/src/panel/page.js +3 -3
- package/dist/src/panel/theme.d.ts +6 -1
- package/dist/src/panel/theme.js +4 -0
- package/dist/src/panel/themes.d.ts +14 -0
- package/dist/src/panel/themes.js +162 -0
- 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 +9 -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 +45 -2
- package/schemas/families.json +13 -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/hide.json +157 -0
- package/schemas/list.json +15 -0
- package/schemas/menubar-snapshot.json +309 -2
- package/schemas/order.json +26 -1
- package/schemas/pin.json +17 -0
- package/schemas/theme-check.json +140 -0
- package/schemas/theme-export.json +86 -0
- package/schemas/theme-import.json +92 -0
- package/schemas/theme-preview.json +86 -0
- package/schemas/theme-remove.json +87 -0
- package/schemas/theme-use.json +88 -0
- package/schemas/theme.json +137 -0
- package/schemas/unhide.json +157 -0
- package/schemas/unpin.json +17 -0
- package/skills/sideby/SKILL.md +5 -2
- package/skills/sideby/references/accounts.md +1 -0
- package/skills/sideby/references/ai-tasks.md +1 -1
- package/skills/sideby/references/handoff.md +7 -3
- package/skills/sideby/references/panel.md +9 -0
- package/skills/sideby/references/quota.md +3 -1
- package/skills/sideby/references/themes.md +47 -0
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.23.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
|
|---|---|---|
|
|
@@ -47,16 +47,19 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
47
47
|
| Know what accounts share and what stays separate | `sideby families <family> --json` | `references/sharing.md` |
|
|
48
48
|
| See accounts, health, quota and usage | `sideby list --json`, `sideby doctor --json`, `sideby quota --json` | `references/diagnose.md` |
|
|
49
49
|
| Pin accounts or arrange their Display Order | `sideby order --json`, `sideby pin <ref> --json`, `sideby unpin <ref> --json` | `references/panel.md` |
|
|
50
|
+
| Hide or show a tool or an account in the lists ("too many shown", "hide pi") | `sideby hide <family\|ref> --json`, `sideby unhide <family\|ref> --json`, `sideby list --all` | `references/panel.md` |
|
|
50
51
|
| Turn quota checks on or off, or fix outdated Codex/Grok quota | `sideby quota check <family> on|off --json`, `sideby quota [family] --refresh --json` | `references/quota.md` |
|
|
51
52
|
| Set the model, effort or Remote Control | `sideby model <ref> --json`, `sideby remote-control --json` | `references/panel.md` |
|
|
52
53
|
| Start sideby at login ("开机启动", "start the panel when I log in") | `sideby autostart --json`, `sideby autostart on --json` (exit 10 first) | `references/panel.md` |
|
|
53
54
|
| Show quota in the macOS menu bar ("状态栏显示额度", "menu bar"), its icon is missing ("状态栏没有图标"), or change its shortcut ("换个快捷键", "帮我挑个顺手的快捷键") | `sideby menubar --json`, `sideby menubar on --json` (exit 10 first), `sideby menubar snapshot --json`, `sideby menubar hotkey [<keys>] --json` | `references/panel.md` |
|
|
54
55
|
| Change the Panel's theme or language, or any other setting ("改成深色", "change any setting") | `sideby config get --json`, `sideby config set <key> <value> --json` (exit 10 first) | `references/panel.md` |
|
|
56
|
+
| Change the Panel's colors or Theme ("换个主题", "面板颜色太丑", "make the Panel green", "按我公司的品牌色配一套"), check one, or go back | `sideby theme --json`, `sideby theme use <name>` / `use --undo`, `sideby theme check <file> --json`, `sideby theme preview <file>`, `sideby theme import <file>` (exit 10 when the name exists) | `references/themes.md` |
|
|
55
57
|
| Turn Auto Update on or off | `sideby update --auto on|off --json` | `references/update.md` |
|
|
56
58
|
| Switch between a local build of sideby and the release ("切换到正式版", "切回 dev 版本") | `sideby local --json`, `sideby local on|off --json` (exits 10 first) | `references/update.md` |
|
|
57
59
|
| Repair drift or permissions | `sideby doctor [ref] --json`, then `--fix` after they agree | `references/diagnose.md` |
|
|
58
60
|
| Keep working because an account hit its limit | `sideby next <family> --json` | `references/handoff.md` |
|
|
59
61
|
| 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` |
|
|
62
|
+
| 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
63
|
| 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
64
|
| Create an account with a given name, an API account, or a short command | `sideby new`, `sideby alias add` | `references/accounts.md` |
|
|
62
65
|
| 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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AI Tasks
|
|
2
2
|
|
|
3
|
-
An AI Task is a session of the user's own Host that sideby started for them, with a Task Prompt as its first message. The user starts it from the Panel ("Let AI do it", a Finding, a quota cell, the new-account dialog, "Other tool…", "Let AI write a plugin", "Not sure how? Let AI set it up" in the Preferred terminal dialog, "Let AI tune it" on the Auto Handoff page) or with `sideby ask` in a terminal (`--task free|fix|quota|account|host|plugin|terminal|handoff|menubar|hotkey`; "Let AI check it" in the Panel's Menu bar icon dialog starts `menubar`, and "Not sure which? Let AI pick one" under its shortcut starts `hotkey`). The prompt says what to do and gives facts sideby already knows (account refs, Family, Finding codes, the quota reason, the Panel language, the sideby version). How to do it is on this page.
|
|
3
|
+
An AI Task is a session of the user's own Host that sideby started for them, with a Task Prompt as its first message. The user starts it from the Panel ("Let AI do it", a Finding, a quota cell, the new-account dialog, "Other tool…", "Let AI write a plugin", "Not sure how? Let AI set it up" in the Preferred terminal dialog, "Let AI tune it" on the Auto Handoff page) or with `sideby ask` in a terminal (`--task free|fix|quota|account|host|plugin|terminal|handoff|theme|menubar|hotkey`; "Let AI pick my colors" in the Panel's Theme dialog starts `theme`, see `references/themes.md`; "Let AI check it" in the Panel's Menu bar icon dialog starts `menubar`, and "Not sure which? Let AI pick one" under its shortcut starts `hotkey`). The prompt says what to do and gives facts sideby already knows (account refs, Family, Finding codes, the quota reason, the Panel language, the sideby version). How to do it is on this page.
|
|
4
4
|
|
|
5
5
|
You are inside such a session when the first message came from sideby and names a task. Work in the directory the session started in (sideby's own `ai/` folder) unless the user names another one.
|
|
6
6
|
|
|
@@ -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
|
|
|
@@ -13,6 +13,15 @@ Use these commands for the same persistent settings as the Panel. Prefer account
|
|
|
13
13
|
- Same Login row name: the Panel shows two directories of one login as one row, named after the one that comes first in the order. To show `001` instead of `main`, run `sideby order claude 001` (the rest follows). `order --reset` brings back the main directory's name.
|
|
14
14
|
- Desktop app windows (Grok Bot, id `grok-bot`) are a group in the same order: `sideby order --families claude grok-bot codex` places the group, `sideby order grok-bot 001 main` orders its windows. They cannot be pinned.
|
|
15
15
|
|
|
16
|
+
## Hidden Families and Accounts
|
|
17
|
+
|
|
18
|
+
When the user says the Panel or the menu bar shows too many tools or accounts ("hide pi", "别显示 Antigravity", "把旧账号藏起来"):
|
|
19
|
+
|
|
20
|
+
- `sideby hide pi --json` hides a whole Family; `sideby hide claude:old --json` (an account or short command) hides one account with the other directories of its Same Login. `sideby unhide <same> --json` shows it again. Both return `target`, `kind` (`family` or `account`), `hidden`, `changed`, `message`, `display`, save immediately, and repeating one is a no-op. An account of a hidden Family cannot be shown alone: `unhide` says to unhide the Family.
|
|
21
|
+
- Hidden is display only: the account still starts with `sideby run`, still shows in Session History, and can still be picked by `sideby next` or Auto Handoff. To stop it taking over, change the Handoff Rules instead. Turning a plugin off (`plugins.<plugin>.enabled: false`) is different: it stops sideby loading the Family at all, so only suggest it when the user asks for that.
|
|
22
|
+
- The Panel's account list, the menu bar and the text of `sideby list` leave hidden ones out; `sideby list --all` shows them marked `(hidden)`. `sideby list --json` keeps every account and marks hidden ones `hidden: true` (Families too), so read that field before telling the user an account is missing. `sideby order --json` marks `hidden` per Family and account, and `order --reset` keeps what is hidden.
|
|
23
|
+
- In the Panel: the row's … menu has "Hide this account" and "Hide all of <tool>"; the arrange mode has an eye per group and row; the line "N hidden · Show" under the list brings them back for this page.
|
|
24
|
+
|
|
16
25
|
These affect display only, never Handoff Order. Saving removes names that no longer exist. The existing Same Login rules apply (Claude groups by email and organization; Codex also by ChatGPT workspace; Grok also by x.ai user and team).
|
|
17
26
|
|
|
18
27
|
## Model and effort
|
|
@@ -9,12 +9,14 @@ Claude quota needs a one-time change to `~/.claude/settings.json`: the status li
|
|
|
9
9
|
|
|
10
10
|
Accounts with their own (not linked) `settings.json` show quota `not-enabled` until that file's status line is wrapped the same way; tell the user instead of editing it.
|
|
11
11
|
|
|
12
|
-
After setup, each account shows quota once it has had one session with a reply. Codex quota needs no setup: sideby asks the official `codex app-server` every 15 minutes, without a conversation. `sideby quota codex --refresh --json` asks now; `sideby quota check codex off --json` disables querying, as does CI. Local session records are a fallback only until the first successful query; they cannot overwrite fetched quota afterward. On failure, relay `fetchError` and `observedAt`, never call old numbers current. The menu's checked time is separate from each row's `observedAt` and `stale`; readings older than one hour or with a query failure show as older readings. Tested with Codex CLI 0.163.0.
|
|
12
|
+
After setup, each account shows quota once it has had one session with a reply. Codex quota needs no setup: sideby asks the official `codex app-server` every 15 minutes, without a conversation. `sideby quota codex --refresh --json` asks now; `sideby quota check codex off --json` disables querying, as does CI. Local session records are a fallback only until the first successful query; they cannot overwrite fetched quota afterward. On failure, relay `fetchError` and `observedAt`, never call old numbers current. The menu's checked time is separate from each row's `observedAt` and `stale`; readings older than one hour or with a query failure show as older readings, except a reading over an hour old whose login has had no local session since (it stays current; use on the web or other computers is not seen). Claude Code quota cannot be refreshed on demand: tell the user it updates when a session runs in that account. Tested with Codex CLI 0.163.0.
|
|
13
13
|
|
|
14
14
|
Two accounts of one tool signed in as the same login (Claude: same email and organization; Codex and Grok also compare the workspace or team; `sameLogin` in `sideby list --json`) share one quota: both show the freshest reading, and `quota.from` names the account it was read from. Explain that to the user rather than calling the numbers wrong; usage stays per account, and sideby never merges or deletes either directory.
|
|
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.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Themes: the Panel's colors
|
|
2
|
+
|
|
3
|
+
A Theme is a named set of Panel colors, one version for light and one for dark (spec §3.34, ADR-0050). sideby has two Built-in Themes: `sky` (default: light blue) and `leaf` (light green with green quota bars, from Radix Colors). The user can pick one, give their own accent color, or keep a Theme File of their own. Light, dark or system is a separate setting (`panel.theme`).
|
|
4
|
+
|
|
5
|
+
## See and switch
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
sideby theme --json # every Theme: id, name, source (builtin|file), active, problems
|
|
9
|
+
sideby theme use leaf --json # switch; the Panel shows it on its next refresh
|
|
10
|
+
sideby theme use --undo --json # back to the Theme before the last switch
|
|
11
|
+
sideby theme use default --json # no Theme chosen: Sky, or inside a Portal the Portal's colors
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`use` changes only config `panel.colorTheme`, nothing else; it needs no `--yes`, because undo is one command. Tell the user they can also click **Settings › Theme** in the Panel.
|
|
15
|
+
|
|
16
|
+
## A Theme File
|
|
17
|
+
|
|
18
|
+
A Theme File is JSON in `~/.config/sideby/themes/<name>.json` (the folder `sideby theme --json` prints as `folder`). It holds colors only, never code:
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{ "schemaVersion": 1, "name": "Calm green", "base": "leaf", "accent": "#4f9d69",
|
|
22
|
+
"light": { "bg": "#fafaf7" }, "dark": {} }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- `base`: the Built-in Theme to start from (default `sky`).
|
|
26
|
+
- `accent`: one `#rrggbb` color; sideby makes the main button, links, selection, focus and the normal quota bar from it. Neutrals and warning colors stay the base's. Usually `base` plus `accent` is enough.
|
|
27
|
+
- `light` / `dark`: single tokens to change, by the names `sideby theme export sky` prints. Unknown keys are ignored with a warning.
|
|
28
|
+
- The file name is the Theme's name: lowercase letters, digits and hyphens.
|
|
29
|
+
|
|
30
|
+
## Making one for the user ("Let AI pick my colors")
|
|
31
|
+
|
|
32
|
+
1. Run `sideby theme --json` to see the Themes and the one in use. Ask what feel they want; a screenshot, a website or a brand color is a good start. Take colors from what they give; do not guess a brand's colors from memory.
|
|
33
|
+
2. Write the file in the current folder, not in the themes folder yet. Start from `base` and `accent`; add `light` / `dark` tokens only for what still looks wrong.
|
|
34
|
+
3. Run `sideby theme check <file> --json`. Every pair needs `ok: true` (text 4.5:1, the main button and focus outline 3:1). For a failing pair, use its `suggest` value for that token, or pick another; run it again until all pass. The Panel would adjust failing colors by itself, but a Theme should not rely on that.
|
|
35
|
+
4. Run `sideby theme preview <file>`: it shows the Theme once in the running Panel without switching. If the Panel is not running, give the user `sideby ui --background` first. Ask what they think; change and preview again as often as needed.
|
|
36
|
+
5. Only when they like it: `sideby theme import <file> --json` (exit 10 when that name exists; add `--yes` only after they agree to replace it), then `sideby theme use <name> --json`. Remind them `sideby theme use --undo` goes back.
|
|
37
|
+
|
|
38
|
+
Keep warnings and errors readable: do not set `warn`, `fail`, `warnBar` or `failBar` to the accent's hue, and do not make the normal quota bar (`okBar`) red or amber.
|
|
39
|
+
|
|
40
|
+
## Other commands
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
sideby theme export sky --out my-theme.json # a full copy to edit (refuses to overwrite a file)
|
|
44
|
+
sideby theme remove <name> --yes --json # delete a Theme File; the Panel goes back to sky if it was in use
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
A Portal that embeds the Panel can set colors itself (`PanelTheme`). They show until the user picks a Theme; a picked Theme wins over them. When the user wants the Portal's colors back there, run `sideby theme use default`.
|