sideby 0.35.6 → 0.35.7

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 (55) hide show
  1. package/dist/build.json +1 -1
  2. package/dist/src/cli/commands.d.ts +9 -1
  3. package/dist/src/cli/commands.js +59 -16
  4. package/dist/src/cli/json-schemas.js +20 -0
  5. package/dist/src/cli/main.js +11 -5
  6. package/dist/src/core/cli-commands.js +1 -1
  7. package/dist/src/core/config.d.ts +7 -0
  8. package/dist/src/core/config.js +9 -0
  9. package/dist/src/core/doctor.d.ts +5 -1
  10. package/dist/src/core/doctor.js +16 -0
  11. package/dist/src/core/edit-settings.d.ts +27 -1
  12. package/dist/src/core/edit-settings.js +78 -4
  13. package/dist/src/core/handoff-select.d.ts +3 -1
  14. package/dist/src/core/handoff-select.js +11 -1
  15. package/dist/src/core/handoff.d.ts +13 -1
  16. package/dist/src/core/handoff.js +16 -5
  17. package/dist/src/core/login-mark.d.ts +3 -0
  18. package/dist/src/core/login-mark.js +22 -0
  19. package/dist/src/core/pick-commands.d.ts +4 -2
  20. package/dist/src/core/pick-commands.js +7 -2
  21. package/dist/src/core/quota-fetch.d.ts +7 -1
  22. package/dist/src/core/quota-fetch.js +38 -1
  23. package/dist/src/core/quota-store.d.ts +5 -0
  24. package/dist/src/core/quota-store.js +3 -0
  25. package/dist/src/core/search-catalog.js +9 -0
  26. package/dist/src/families/claude/index.js +3 -0
  27. package/dist/src/families/claude/login-events.d.ts +24 -0
  28. package/dist/src/families/claude/login-events.js +163 -0
  29. package/dist/src/families/claude/quota-fetch.js +14 -0
  30. package/dist/src/menubar/snapshot.d.ts +2 -0
  31. package/dist/src/menubar/snapshot.js +6 -2
  32. package/dist/src/menubar/strings.d.ts +4 -0
  33. package/dist/src/menubar/strings.js +4 -0
  34. package/dist/src/panel/handler.d.ts +14 -1
  35. package/dist/src/panel/handler.js +48 -14
  36. package/dist/src/panel/i18n.d.ts +23 -0
  37. package/dist/src/panel/i18n.js +46 -0
  38. package/dist/src/panel/page-logic.d.ts +44 -2
  39. package/dist/src/panel/page-logic.js +43 -3
  40. package/dist/src/panel/page-script.js +124 -7
  41. package/dist/src/panel/page-styles.js +8 -0
  42. package/dist/src/panel/page.d.ts +7 -0
  43. package/dist/src/panel/page.js +1 -0
  44. package/dist/src/runtime.d.ts +16 -1
  45. package/dist/src/runtime.js +51 -2
  46. package/dist/src/types.d.ts +37 -0
  47. package/package.json +3 -3
  48. package/schemas/config.json +11 -0
  49. package/schemas/edit.json +4 -0
  50. package/schemas/list.json +24 -0
  51. package/schemas/next.json +18 -0
  52. package/skills/sideby/SKILL.md +4 -2
  53. package/skills/sideby/references/accounts.md +9 -0
  54. package/skills/sideby/references/diagnose.md +6 -1
  55. package/skills/sideby/references/panel.md +1 -1
@@ -41,6 +41,15 @@ Two directories signed in as the same login share one quota (`sameLogin` in `sid
41
41
 
42
42
  A running session of that account keeps its old login until it is restarted.
43
43
 
44
+ ## Sign in again after an expired login
45
+
46
+ An account with `loginProblem.kind: "expired"` in `sideby list --json` (an Expired Login) still has its login file, but its Host said the login expired. sideby never picks it for `sideby next`, Auto Handoff or a pick command until it works again.
47
+
48
+ 1. Name the account and when it expired (`loginProblem.since`).
49
+ 2. Give the user one line to run in their own terminal: `sideby login <ref>` (Claude Code: `! sideby login <ref>`), or tell them to click **Sign in again** on that account in the Panel (it opens the same command in their terminal).
50
+ 3. When the sign-in ends well and quota checks are on, sideby asks that account's quota once; a good answer clears the state and sideby prints `<ref> is signed in again`. Otherwise it clears after the account's next successful session or quota check, and the Panel shows "Sign-in finished, waiting for confirmation" meanwhile.
51
+ 4. Check `sideby list --json` afterwards: `loginProblem` is gone.
52
+
44
53
  ## Short commands (aliases)
45
54
 
46
55
  For an account that already exists: `sideby alias add <short> <ref> --json`.
@@ -5,7 +5,7 @@
5
5
  Start read-only:
6
6
 
7
7
  ```sh
8
- sideby list --json # accounts: ref, family, kind (subscription|api), dir, login, identity.email, model, hostInstalled, problems
8
+ sideby list --json # accounts: ref, family, kind (subscription|api), dir, login, loginProblem, identity.email, model, hostInstalled, problems
9
9
  sideby doctor --json # findings: level ok|warn|fail, account, item, code, message, hint, fixable
10
10
  sideby quota --json # per account: quota windows (5h, 7d, usedPercent, resetsAt, observedAt) and 7-day tokens
11
11
  sideby plugins --json # loaded plugins (setting names only, never values) and load errors
@@ -26,6 +26,7 @@ Shared Items the Main Account does not have are skipped: no Finding, not counted
26
26
  | `warn` `skill.outdated` (in `general`) | The installed sideby skill is for another sideby version | Offer `sideby update` (it updates the skill; see `update.md`) |
27
27
  | name looks like a backup (`bak`, `backup`, `old`, `tmp`) | A stray directory was picked up as an account | Suggest adding its ref to `ignore` in `${XDG_CONFIG_HOME:-~/.config}/sideby/config.json` |
28
28
  | `login: "not-needed"` (`key` in `sideby list`) | API account; it authenticates with `proxy.env` | Nothing to do |
29
+ | `loginProblem: { kind: "expired" }` in `list --json`, `warn` `login.expired` in `doctor` (`expired` in `sideby list`) | An Expired Login: the account is still signed in on disk, but its Host said the login expired (Claude Code: "Login reached its time limit") and nothing has worked since. `sideby next`, Auto Handoff and pick commands skip it | Give the user `sideby login <ref>` (see `accounts.md`, "Sign in again after an expired login"); `doctor --fix` cannot fix it |
29
30
  | `problems` on an account in `list --json` | A plugin failed while reading it (for example a settings file that is not valid JSON) | Show the message; the account itself still works |
30
31
  | quota `unavailable` / `not-enabled` | Quota checks for that tool are off (config `quota.check.<family>: false`) or it runs in CI | Offer `sideby quota check <family> on` |
31
32
  | quota `unavailable` / `no-session` | No session since the source was enabled | Ask the user to start one session with that account |
@@ -35,6 +36,10 @@ Shared Items the Main Account does not have are skipped: no Finding, not counted
35
36
  | quota `unavailable` / `unrecognized` | Host changed its file format | Report it; suggest filing an issue with the Host version |
36
37
  | host not installed | Accounts exist but the CLI is missing | Point to the Host's install docs; do not install it unasked |
37
38
 
39
+ ### Whose sign-in expired
40
+
41
+ For "which login expired" or a session that says "Login reached its time limit · Please run /login": run `sideby list --json` and name every account with `loginProblem.kind: "expired"`, with `loginProblem.since` (when its Host reported it). Only Claude Code subscription accounts are checked for now; API accounts never are. Only the Host's own words "Login reached its time limit" count, in a session or in a quota check's answer; a `/login` hint, "Not logged in" or "Invalid API key" alone is not an expired login (a quota check that says "Not logged in" shows as `fetch-failed` with `sideby login <ref>` in `detail`). `loginProblem.signedInAt` means the user already signed in again and sideby waits for the next session or quota check to confirm it. Then follow `accounts.md` to sign it in again.
42
+
38
43
  Quota is only as fresh as each account's last session; `observedAt` says when it was recorded. A window whose `resetsAt` has passed has reset.
39
44
 
40
45
  ## Repair
@@ -60,7 +60,7 @@ Use `sideby remote-control off --json`, `on --json` or `undo --json`. Exit 10 sh
60
60
 
61
61
  Every setting in sideby's config has a command. `sideby config get --json` returns `file` and `keys`: each has `key` (a dot path; `<…>` marks a part you fill in, such as `accounts.<family>:<name>.args`), `meaning`, `takes`, and the current `value` or, for a key with `<…>`, the `entries` set now. `sideby config get panel.theme --json` returns `key`, `set`, optional `value`, `meaning`, `takes`.
62
62
 
63
- Prefer the dedicated command where one exists (`model`, `order`, `pin`, `quota check`, `handoff enable`, `terminal`, `update --auto`); `config` covers the rest, such as the Panel's theme and language: `sideby config set panel.theme dark --json` (`system`, `light`, `dark`) or `sideby config set panel.language zh --json` (`auto`, `en`, `zh`). A value is JSON when it parses (`90`, `true`, `["cc002","codex001"]`), else text. Exit 10 returns `action`, `key`, `before`, `after`, `changed`, `applied: false`: show the change, and run the same command with `--yes` after the user agrees. `sideby config unset <key>` goes back to the default the same way. The Panel picks a change up on its next refresh.
63
+ Prefer the dedicated command where one exists (`model`, `order`, `pin`, `quota check`, `handoff enable`, `terminal`, `update --auto`); `config` covers the rest, such as the Panel's theme and language: `sideby config set panel.theme dark --json` (`system`, `light`, `dark`) or `sideby config set panel.language zh --json` (`auto`, `en`, `zh`). The editor that "Open settings.json" and `sideby edit` use is `editor`: `sideby config set editor cursor --json` (`system`, the default program, `cursor`, `vscode`, `windsurf`, `zed`); offer it when the user says their editor opened a window but not the file. A value is JSON when it parses (`90`, `true`, `["cc002","codex001"]`), else text. Exit 10 returns `action`, `key`, `before`, `after`, `changed`, `applied: false`: show the change, and run the same command with `--yes` after the user agrees. `sideby config unset <key>` goes back to the default the same way. The Panel picks a change up on its next refresh.
64
64
 
65
65
  A value the key does not take fails with code `bad-value` and changes nothing; an unknown key `bad-key`. A plugin's own settings are never read or changed through `config` (code `plugin-config`, they may hold secrets); only `plugins.<plugin>.enabled`. `accounts.<ref>.args` takes only model and effort arguments; other Host arguments belong in a short command (`sideby alias add <short> <ref> -- <args>`).
66
66