sideby 0.14.0 → 0.16.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 (66) hide show
  1. package/README.md +1 -0
  2. package/dist/build.json +1 -1
  3. package/dist/src/cli/commands.d.ts +7 -0
  4. package/dist/src/cli/commands.js +259 -9
  5. package/dist/src/cli/json-schemas.js +109 -2
  6. package/dist/src/cli/main.js +30 -6
  7. package/dist/src/core/config.d.ts +1 -0
  8. package/dist/src/core/config.js +8 -2
  9. package/dist/src/core/local-build.d.ts +63 -0
  10. package/dist/src/core/local-build.js +189 -0
  11. package/dist/src/core/skill-check.d.ts +14 -0
  12. package/dist/src/core/skill-check.js +29 -3
  13. package/dist/src/core/update.d.ts +73 -1
  14. package/dist/src/core/update.js +155 -23
  15. package/dist/src/panel/handler.d.ts +12 -1
  16. package/dist/src/panel/handler.js +84 -5
  17. package/dist/src/panel/i18n.d.ts +125 -5
  18. package/dist/src/panel/i18n.js +280 -40
  19. package/dist/src/panel/page-logic.d.ts +41 -0
  20. package/dist/src/panel/page-logic.js +46 -0
  21. package/dist/src/panel/page-script.js +616 -162
  22. package/dist/src/panel/page-styles.js +74 -23
  23. package/dist/src/panel/page.js +3 -0
  24. package/dist/src/runtime.d.ts +2 -0
  25. package/package.json +3 -2
  26. package/schemas/alias.json +1 -1
  27. package/schemas/app-install.json +1 -1
  28. package/schemas/app-uninstall.json +1 -1
  29. package/schemas/browser-open.json +1 -1
  30. package/schemas/browser-switch.json +1 -1
  31. package/schemas/browser.json +1 -1
  32. package/schemas/config.json +15 -1
  33. package/schemas/desktop-remove.json +1 -1
  34. package/schemas/desktop.json +1 -1
  35. package/schemas/doctor.json +1 -1
  36. package/schemas/error.json +1 -1
  37. package/schemas/families.json +1 -1
  38. package/schemas/handoff-disable.json +1 -1
  39. package/schemas/handoff-enable.json +1 -1
  40. package/schemas/handoff-ready.json +1 -1
  41. package/schemas/handoff-setup.json +1 -1
  42. package/schemas/handoff-status.json +282 -1
  43. package/schemas/handoff-teardown.json +1 -1
  44. package/schemas/list.json +6 -1
  45. package/schemas/local.json +165 -0
  46. package/schemas/model.json +1 -1
  47. package/schemas/new.json +1 -1
  48. package/schemas/next.json +1 -1
  49. package/schemas/order.json +148 -0
  50. package/schemas/pin.json +126 -0
  51. package/schemas/plugins.json +1 -1
  52. package/schemas/quota-check.json +88 -0
  53. package/schemas/quota-setup.json +1 -1
  54. package/schemas/quota-teardown.json +1 -1
  55. package/schemas/quota.json +1 -1
  56. package/schemas/remote-control.json +1 -1
  57. package/schemas/tune-change.json +1 -1
  58. package/schemas/tune.json +1 -1
  59. package/schemas/unpin.json +126 -0
  60. package/schemas/update-auto.json +84 -0
  61. package/schemas/update.json +79 -1
  62. package/skills/sideby/SKILL.md +8 -3
  63. package/skills/sideby/references/handoff.md +8 -0
  64. package/skills/sideby/references/panel.md +28 -0
  65. package/skills/sideby/references/quota.md +6 -0
  66. package/skills/sideby/references/update.md +15 -2
@@ -0,0 +1,28 @@
1
+ # Panel settings from the CLI
2
+
3
+ Use these commands for the same persistent settings as the Panel. Prefer account refs from `sideby list --json`; commands taking an account also accept its short command. Every JSON response has `schemaVersion: 1`.
4
+
5
+ ## Pinned Accounts and Display Order
6
+
7
+ - `sideby order --json` returns `display` (saved `families`, `accounts`, `pinned`) and `families` in their effective order. Each family has `accounts` with `name`, `ref`, `pinned`; a family with no accounts has an empty array.
8
+ - `sideby pin claude:work --json` and `sideby unpin claude:work --json` return `ref`, `pinned`, `changed`, `message`, `display`. They save immediately. Repeating a pin or unpin is a no-op. A Same Login is pinned/unpinned together and counts once; at most three per Family. If full, ask which one to unpin first. A new pin goes last among pins.
9
+ - `sideby order claude work main --json` sets that Family's account order using names, not refs or short commands. Unlisted accounts follow in the default order; pins still lead. Unknown or repeated names fail without saving.
10
+ - `sideby order --families codex claude --json` sets the Family order; unlisted Families follow.
11
+ - `sideby order --reset --json` forgets Family and account order, keeping pins. Save the old `display` from `order --json` before rearranging if the user may want to undo; restore Family/account lists with `order`, and pins with `unpin` then `pin` in their old order.
12
+
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
+ - 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
+
16
+ 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 accounts remain separate).
17
+
18
+ ## Model and effort
19
+
20
+ `sideby model claude:work --json` shows `account`, `family`, `settable`, optional `reason`, available `models` and `efforts`, and `sideby`, `host`, `last` choices. Effective `model` and `effort` have `{ value, from }`.
21
+
22
+ To change them, run `sideby model claude:work opus --effort high --json`; `default` removes a sideby override. Read `change.diff`, `change.args` and `change.applied`. Exit 10 is a preview waiting for `--yes`: show it to the user and confirm before applying the same command with `--yes`. Only sideby's account arguments change, never the Host config. If `settable` is false, relay `reason`.
23
+
24
+ ## Remote Control
25
+
26
+ `sideby remote-control --json` returns `action` and `groups`: each has `file`, `accounts`, `state`, `undo` and optional `reason`. `state` is `on`, `default`, `off`, `missing` or `blocked`.
27
+
28
+ Use `sideby remote-control off --json`, `on --json` or `undo --json`. Exit 10 shows the affected groups and waits for `--yes`; confirm before applying. A result has `applied`, optional `results` (`file`, `accounts`, `ok`, `message`) and optional `message`. Only turn it on when asked. Changes affect new sessions; running sessions remain connected until restarted. Undo restores the earlier value only while the key still holds what sideby wrote.
@@ -18,3 +18,9 @@ Grok quota needs no setup: sideby asks the `grok` CLI of each signed-in account
18
18
  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
19
 
20
20
  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.
21
+
22
+ ## Quota checks and refresh
23
+
24
+ `sideby quota check <family> on|off --json` saves the fetching switch immediately, returning `family`, `on`, `changed`. For example, `sideby quota check grok off --json`. Only Families with a quota fetcher support it; the error tells you to choose one through `sideby families`. Turning it off keeps local readings available. CI still blocks fetching when the switch is on.
25
+
26
+ `sideby quota [account|family] --refresh --json` refreshes every selected Family that fetches quota, including plugin Families; without a target it refreshes all. It does not override a disabled check or CI. Read the returned accounts' `quota` and `usage`, including `fetchError` and observation time; do not call stale data a successful refresh.
@@ -3,7 +3,7 @@
3
3
  Every `--json` output can carry `_notice` (it comes from sideby's daily Update Check and the installed skill, and reads no network itself):
4
4
 
5
5
  - `_notice.update`: `{ current, latest, command: "sideby update", message }`, a newer sideby is out.
6
- - `_notice.skill`: `{ installed, current, command, message }`, the sideby skill agents read here is for another version (`installed: null` when it has no version), so it may describe commands this CLI does not have.
6
+ - `_notice.skill`: `{ installed, current, command: "sideby update", message }`, the sideby skill agents read here is for another version (`installed: null` when it has no version), so it may describe commands this CLI does not have.
7
7
 
8
8
  What to do:
9
9
 
@@ -12,5 +12,18 @@ What to do:
12
12
  3. When they agree:
13
13
  - Run `sideby update --json`. It shows the version, the install method and the command it would run, and exits `10`. Show that to the user; after their yes, run `sideby update --yes --json`.
14
14
  - If it exits `1` with `canRun: false` (npx, Volta, a project dependency, a source checkout, a Local Build), sideby cannot update itself: give the user the `command` it printed as one line to run.
15
- - The same command updates the installed sideby skill (`skillUpdate` in the plan, `skillUpdated` in the result), so do not run a skill command yourself. With sideby already current and only the skill old (`_notice.skill`), `sideby update` updates the skill alone, after the same preview. When `skillUpdate.canRun` is false (the skill lives in a git repository), tell the user `reason` and give them `command`. Tell them that sessions already running keep the old version until they start again.
15
+ - The same command updates the installed sideby skill (`skillUpdate` in the plan, `skillUpdated` in the result), so do not run a skill command yourself. With sideby already current and only the skill old (`_notice.skill`), `sideby update` updates the skill alone, after the same preview. When `skillUpdate.canRun` is false (the skill lives in a git repository the skills tool did not install it into), tell the user `reason` and give them `command`. Tell them that sessions already running keep the old version until they start again.
16
16
  4. The user can turn notices off with `SIDEBY_NO_UPDATE_NOTIFIER=1` (or config `update.check: false`); set it for one command when a script needs JSON without `_notice`. A Local Build (`pnpm local`) never has one.
17
+
18
+ ## Auto Update
19
+
20
+ When the user asks to change Auto Update, run `sideby update --auto on|off --json`. It saves immediately and returns `auto` and `changed` (exit 0, including no-op). It keeps the Update Check setting and does not check or install in this invocation. It needs no `--yes`; ordinary `sideby update --json` still previews an installation with exit 10. Never enable Auto Update unless the user asks.
21
+
22
+ ## Local Build and the release
23
+
24
+ For people who work on sideby itself. A Local Build (`pnpm local` in a sideby checkout) runs the checkout's code behind the global `sideby`. When the user asks to go back to the release, or to the local build again ("切换到正式版", "切回 dev 版本"):
25
+
26
+ 1. Run `sideby local --json`. `running` is what runs now (`local` or `npm`), `local` the kept Local Build (`version`, `commit`, `dirty`, `builtAt`), `kept` the npm version set aside.
27
+ 2. Run `sideby local off --json` (back to npm) or `sideby local on --json` (the kept Local Build). It exits `10` with the change; after their yes, add `--yes`. `on` does not rebuild: `pnpm local` in the checkout makes a new build. `blocked` (exit 1) says why it cannot and what to do.
28
+ 3. A background panel restarts by itself and open panels reload; a `sideby ui` in a terminal needs a restart.
29
+