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.
Files changed (97) hide show
  1. package/README.md +1 -0
  2. package/ai-tasks.json +14 -0
  3. package/dist/build.json +1 -1
  4. package/dist/src/cli/commands.d.ts +7 -0
  5. package/dist/src/cli/commands.js +441 -31
  6. package/dist/src/cli/format.js +3 -2
  7. package/dist/src/cli/json-schemas.js +157 -47
  8. package/dist/src/cli/main.js +38 -7
  9. package/dist/src/core/accounts.d.ts +6 -1
  10. package/dist/src/core/accounts.js +16 -3
  11. package/dist/src/core/ask.d.ts +2 -1
  12. package/dist/src/core/ask.js +12 -4
  13. package/dist/src/core/claude-settings-file.d.ts +57 -0
  14. package/dist/src/core/claude-settings-file.js +104 -2
  15. package/dist/src/core/config.d.ts +34 -16
  16. package/dist/src/core/config.js +58 -5
  17. package/dist/src/core/create.js +4 -1
  18. package/dist/src/core/desktop-app.js +5 -1
  19. package/dist/src/core/handoff-overview.d.ts +4 -1
  20. package/dist/src/core/handoff-overview.js +3 -2
  21. package/dist/src/core/handoff-rules.d.ts +34 -0
  22. package/dist/src/core/handoff-rules.js +115 -0
  23. package/dist/src/core/handoff-select.js +45 -28
  24. package/dist/src/core/handoff-status.d.ts +37 -7
  25. package/dist/src/core/handoff-status.js +95 -19
  26. package/dist/src/core/handoff.d.ts +4 -1
  27. package/dist/src/core/handoff.js +8 -5
  28. package/dist/src/core/inbound.d.ts +11 -3
  29. package/dist/src/core/inbound.js +26 -74
  30. package/dist/src/core/launch.js +6 -4
  31. package/dist/src/core/quota-levels.d.ts +13 -2
  32. package/dist/src/core/quota-levels.js +21 -3
  33. package/dist/src/core/remote-control.d.ts +10 -12
  34. package/dist/src/core/remote-control.js +29 -86
  35. package/dist/src/core/themes.d.ts +107 -0
  36. package/dist/src/core/themes.js +463 -0
  37. package/dist/src/core/tuning-apply.js +12 -20
  38. package/dist/src/families/agy/index.d.ts +8 -0
  39. package/dist/src/families/agy/index.js +53 -0
  40. package/dist/src/families/agy/quota.d.ts +9 -0
  41. package/dist/src/families/agy/quota.js +110 -0
  42. package/dist/src/families/index.js +7 -0
  43. package/dist/src/families/logos.d.ts +10 -0
  44. package/dist/src/families/logos.js +12 -1
  45. package/dist/src/menubar/script.js +26 -3
  46. package/dist/src/menubar/snapshot.d.ts +33 -6
  47. package/dist/src/menubar/snapshot.js +138 -43
  48. package/dist/src/menubar/strings.d.ts +18 -2
  49. package/dist/src/menubar/strings.js +18 -2
  50. package/dist/src/panel/handler.d.ts +4 -1
  51. package/dist/src/panel/handler.js +206 -46
  52. package/dist/src/panel/i18n.d.ts +106 -7
  53. package/dist/src/panel/i18n.js +260 -62
  54. package/dist/src/panel/page-logic.d.ts +67 -20
  55. package/dist/src/panel/page-logic.js +74 -7
  56. package/dist/src/panel/page-script.js +522 -124
  57. package/dist/src/panel/page-styles.d.ts +2 -0
  58. package/dist/src/panel/page-styles.js +157 -34
  59. package/dist/src/panel/page.js +3 -3
  60. package/dist/src/panel/theme.d.ts +6 -1
  61. package/dist/src/panel/theme.js +4 -0
  62. package/dist/src/panel/themes.d.ts +14 -0
  63. package/dist/src/panel/themes.js +162 -0
  64. package/dist/src/plugins/check.js +27 -13
  65. package/dist/src/plugins/loader.d.ts +11 -0
  66. package/dist/src/plugins/loader.js +47 -1
  67. package/dist/src/runtime.d.ts +9 -2
  68. package/dist/src/runtime.js +12 -5
  69. package/dist/src/types.d.ts +35 -5
  70. package/package.json +2 -2
  71. package/schemas/config.json +45 -2
  72. package/schemas/families.json +13 -5
  73. package/schemas/handoff-disable.json +22 -0
  74. package/schemas/handoff-enable.json +22 -0
  75. package/schemas/handoff-rules.json +302 -0
  76. package/schemas/handoff-status.json +26 -0
  77. package/schemas/hide.json +157 -0
  78. package/schemas/list.json +15 -0
  79. package/schemas/menubar-snapshot.json +309 -2
  80. package/schemas/order.json +26 -1
  81. package/schemas/pin.json +17 -0
  82. package/schemas/theme-check.json +140 -0
  83. package/schemas/theme-export.json +86 -0
  84. package/schemas/theme-import.json +92 -0
  85. package/schemas/theme-preview.json +86 -0
  86. package/schemas/theme-remove.json +87 -0
  87. package/schemas/theme-use.json +88 -0
  88. package/schemas/theme.json +137 -0
  89. package/schemas/unhide.json +157 -0
  90. package/schemas/unpin.json +17 -0
  91. package/skills/sideby/SKILL.md +5 -2
  92. package/skills/sideby/references/accounts.md +1 -0
  93. package/skills/sideby/references/ai-tasks.md +1 -1
  94. package/skills/sideby/references/handoff.md +7 -3
  95. package/skills/sideby/references/panel.md +9 -0
  96. package/skills/sideby/references/quota.md +3 -1
  97. package/skills/sideby/references/themes.md +47 -0
@@ -58,7 +58,7 @@ export const MAX_LOGO_PATH = 20_000;
58
58
  export function logoProblem(logo) {
59
59
  if (typeof logo !== 'object' || logo === null || Array.isArray(logo))
60
60
  return 'logo must be an object';
61
- const { path, color, title, fillRule } = logo;
61
+ const { path, color, title, fillRule, gradients } = logo;
62
62
  if (typeof path !== 'string' || !path.trim())
63
63
  return 'logo.path must be a non-empty string';
64
64
  if (path.length > MAX_LOGO_PATH)
@@ -71,8 +71,26 @@ export function logoProblem(logo) {
71
71
  return 'logo.title must be a string of at most 80 characters';
72
72
  if (fillRule !== undefined && fillRule !== 'nonzero' && fillRule !== 'evenodd')
73
73
  return 'logo.fillRule must be "nonzero" or "evenodd"';
74
+ if (gradients !== undefined) {
75
+ if (!Array.isArray(gradients) || gradients.length > MAX_LOGO_GRADIENTS)
76
+ return `logo.gradients must be a list of at most ${MAX_LOGO_GRADIENTS} washes`;
77
+ for (const g of gradients) {
78
+ const { from, to, color: c } = (g ?? {});
79
+ if (!isLogoPoint(from) || !isLogoPoint(to))
80
+ return 'each of logo.gradients needs `from` and `to` points such as [12, 2], numbers from -24 to 48';
81
+ if (typeof c !== 'string' || !LOGO_COLOR_RE.test(c))
82
+ return 'each of logo.gradients needs a hex `color` such as #3186FF';
83
+ }
84
+ }
74
85
  return null;
75
86
  }
87
+ const MAX_LOGO_GRADIENTS = 4;
88
+ /** A point of a logo wash: two plain numbers near the 24x24 view box, so it reaches markup as nothing else. */
89
+ function isLogoPoint(p) {
90
+ return (Array.isArray(p) &&
91
+ p.length === 2 &&
92
+ p.every((n) => typeof n === 'number' && Number.isFinite(n) && n >= -24 && n <= 48));
93
+ }
76
94
  // The url reaches `open` and, on WSL, `cmd.exe /c start`, so it holds no character a shell gives meaning to.
77
95
  const WEBSITE_URL_RE = /^https:\/\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+(?:\/[A-Za-z0-9._~/-]*)?$/;
78
96
  const WEBSITE_ORIGIN_RE = /^https:\/\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/;
@@ -108,6 +126,15 @@ function cleanLogo(logo) {
108
126
  ...(logo.color ? { color: logo.color } : {}),
109
127
  ...(logo.title ? { title: logo.title } : {}),
110
128
  ...(logo.fillRule ? { fillRule: logo.fillRule } : {}),
129
+ ...(logo.gradients?.length
130
+ ? {
131
+ gradients: logo.gradients.map((g) => ({
132
+ from: [g.from[0], g.from[1]],
133
+ to: [g.to[0], g.to[1]],
134
+ color: g.color,
135
+ })),
136
+ }
137
+ : {}),
111
138
  };
112
139
  }
113
140
  function settingsFor(config, name, manifest) {
@@ -150,6 +177,9 @@ async function register(plugin, bus, result, source, settings) {
150
177
  throw new Error(`family ${def.id} is already provided by ${owner}`);
151
178
  if (stagedFamilies.some((f) => f.id === def.id))
152
179
  throw new Error(`family ${def.id} is registered twice`);
180
+ const shape = mainOnlyProblem(def);
181
+ if (shape)
182
+ throw new Error(`family ${def.id}: ${shape}`);
153
183
  // A bad logo or website costs only that field: the Family still loads.
154
184
  let clean = def;
155
185
  if (def.logo !== undefined) {
@@ -313,3 +343,19 @@ export async function loadPlugins(opts) {
313
343
  }
314
344
  return result;
315
345
  }
346
+ /**
347
+ * What is wrong with how a FamilyDef says where its Accounts live (ADR-0047): either `selectVar` and `layout.account`
348
+ * both set, or `mainOnly: true` with both left out. undefined when it is right.
349
+ */
350
+ export function mainOnlyProblem(def) {
351
+ const layout = (typeof def.layout === 'object' && def.layout !== null ? def.layout : {});
352
+ const hasSelect = def.selectVar !== undefined;
353
+ const hasAccount = layout.account !== undefined;
354
+ if (def.mainOnly === undefined)
355
+ return undefined;
356
+ if (def.mainOnly !== true)
357
+ return 'mainOnly must be true or left out';
358
+ if (hasSelect || hasAccount)
359
+ return 'a Main-only Family (mainOnly: true) must leave out selectVar and layout.account';
360
+ return undefined;
361
+ }
@@ -79,6 +79,10 @@ export interface FamilyInfo {
79
79
  tuning: boolean;
80
80
  /** The Host's settings file that `sideby edit` opens (spec §3.30), relative to the account directory. */
81
81
  settingsFile?: string;
82
+ /** Set only for a Main-only Family: sideby knows only its Main Account and creates no other (ADR-0047). */
83
+ mainOnly?: true;
84
+ /** Hidden from the lists (spec §3.25); set by `sideby list` only, absent when shown. */
85
+ hidden?: true;
82
86
  }
83
87
  /** One Shared Item as `sideby families` reports it (spec §3.16). */
84
88
  export interface SharedItemInfo {
@@ -98,9 +102,10 @@ export interface FamilyDetail extends FamilyInfo {
98
102
  /** Relative to HOME: `{ main: '.claude', account: '.claude-<name>' }`. */
99
103
  layout: {
100
104
  main: string;
101
- account: string;
105
+ account?: string;
102
106
  };
103
- selectVar: string;
107
+ /** Left out for a Main-only Family (ADR-0047). */
108
+ selectVar?: string;
104
109
  /** `args` is null when sign-in happens inside the Host. */
105
110
  login: {
106
111
  args: string[] | null;
@@ -125,6 +130,8 @@ export interface AccountStatus extends Account {
125
130
  sameLogin?: string[];
126
131
  /** Pinned to the top of its Family (spec §3.25); set by `sideby list` only, absent when not pinned. */
127
132
  pinned?: true;
133
+ /** Hidden from the lists (spec §3.25); set by `sideby list` only, absent when shown. */
134
+ hidden?: true;
128
135
  /** Plugin errors met while reading this Account (for example an unreadable settings file). */
129
136
  problems?: string[];
130
137
  /**
@@ -18,6 +18,7 @@ import { resolvePaths } from './core/paths.js';
18
18
  import { choosePick, suggestPickName } from './core/pick-commands.js';
19
19
  import { categoryReader } from './core/project-categories.js';
20
20
  import { fetchedQuota, quotaCheckOff, shownQuota } from './core/quota-fetch.js';
21
+ import { takeoverLimit } from './core/quota-levels.js';
21
22
  import { remoteControlGroups, turnRemoteControlOff, turnRemoteControlOn, undoRemoteControlOff, } from './core/remote-control.js';
22
23
  import { findResumeRoute } from './core/resume.js';
23
24
  import { SAME_LOGIN_FAMILIES, sameLoginGroups, sharedQuota } from './core/same-login.js';
@@ -283,6 +284,7 @@ export async function createRuntime(opts = {}) {
283
284
  plugin: loaded.familyOwner.get(f.id) ?? 'unknown',
284
285
  tuning: Boolean(f.readTuning),
285
286
  ...(hostSettingsFile(f) ? { settingsFile: hostSettingsFile(f) } : {}),
287
+ ...(f.mainOnly ? { mainOnly: true } : {}),
286
288
  };
287
289
  }));
288
290
  },
@@ -293,8 +295,8 @@ export async function createRuntime(opts = {}) {
293
295
  const fromConfig = new Set(config.extraSharedItems?.[f.id] ?? []);
294
296
  return {
295
297
  ...info.get(f.id),
296
- layout: { main: f.layout.main, account: f.layout.account },
297
- selectVar: f.selectVar,
298
+ layout: { main: f.layout.main, ...(f.layout.account ? { account: f.layout.account } : {}) },
299
+ ...(f.selectVar ? { selectVar: f.selectVar } : {}),
298
300
  login: { args: f.login.args ? [...f.login.args] : null, hint: f.login.hint },
299
301
  quota: Boolean(f.readQuota || f.fetchQuota),
300
302
  usage: Boolean(f.readUsage),
@@ -595,7 +597,10 @@ export async function createRuntime(opts = {}) {
595
597
  // Routing helps only a Family that can route and has somewhere else to route to (spec §3.15).
596
598
  const routes = config.resumeRouting
597
599
  ? [...families.values()]
598
- .filter((f) => f.resumedSession && f.sessionWrittenAt && list.some((a) => a.family === f.id && !a.isMain))
600
+ .filter((f) => f.selectVar &&
601
+ f.resumedSession &&
602
+ f.sessionWrittenAt &&
603
+ list.some((a) => a.family === f.id && !a.isMain))
599
604
  .map((f) => ({ family: f.id, bin: f.bin, selectVar: f.selectVar }))
600
605
  : [];
601
606
  return shellInitScript(list, { ...config.aliases, ...config.pickCommands }, routes);
@@ -645,7 +650,7 @@ export async function createRuntime(opts = {}) {
645
650
  throw new UserError(`${family.title} sessions cannot be routed; start an account yourself with \`sideby run <account> -- …\``);
646
651
  const host = { family, bin: family.bin, args: [...userArgs], env };
647
652
  // A select variable already set means an Account was chosen on purpose: run the Host as it is.
648
- if (env[family.selectVar])
653
+ if (family.selectVar && env[family.selectVar])
649
654
  return { launch: host };
650
655
  const route = await findResumeRoute(family, await accounts(), userArgs);
651
656
  const id = route.sessionId ? { sessionId: route.sessionId } : {};
@@ -836,7 +841,9 @@ export async function createRuntime(opts = {}) {
836
841
  // The current Account: the one sideby started this process from, when it belongs to this Family.
837
842
  const current = env.SIDEBY_ACCOUNT;
838
843
  const from = current && list.some((a) => a.ref === current) ? current : undefined;
839
- return planHandoff(f.id, candidates, readContext().now, { ...o, ...(from ? { from } : {}) });
844
+ // The Takeover Limit follows the user's Handoff Threshold, so `sideby next` and Auto Handoff agree on "full".
845
+ const fullAt = takeoverLimit(handoffSettings(config).threshold);
846
+ return planHandoff(f.id, candidates, readContext().now, { ...o, fullAt, ...(from ? { from } : {}) });
840
847
  },
841
848
  handoffSettings: () => handoffSettings(config),
842
849
  async handoffDecision(origin, used, opts = {}) {
@@ -17,8 +17,11 @@ export interface SharedItemDef {
17
17
  export interface FamilyLayout {
18
18
  /** Main Account directory relative to HOME, for example `.claude` or `.pi/agent`. */
19
19
  main: string;
20
- /** Other Accounts relative to HOME, with `<name>` in the first path segment: `.claude-<name>`, `.pi-<name>/agent`. */
21
- account: string;
20
+ /**
21
+ * Other Accounts relative to HOME, with `<name>` in the first path segment: `.claude-<name>`, `.pi-<name>/agent`.
22
+ * Left out only by a Main-only Family (`mainOnly: true`, ADR-0047).
23
+ */
24
+ account?: string;
22
25
  }
23
26
  export type LoginState = 'logged-in' | 'logged-out' | 'unknown';
24
27
  /**
@@ -33,6 +36,18 @@ export interface FamilyLogo {
33
36
  /** Name of the mark for tooltips; defaults to the Family title. */
34
37
  title?: string;
35
38
  fillRule?: 'nonzero' | 'evenodd';
39
+ /**
40
+ * Colour washes painted over the mark, in order, for a multicoloured mark (at most 4). Each fades in a straight line
41
+ * from `color` at `from` to transparent at `to`, in the 24x24 view box. `color` is then the base under them.
42
+ */
43
+ gradients?: FamilyLogoGradient[];
44
+ }
45
+ /** One colour wash of a FamilyLogo: `color` at `from`, fading to transparent at `to`. */
46
+ export interface FamilyLogoGradient {
47
+ from: [number, number];
48
+ to: [number, number];
49
+ /** Hex colour such as `#3186FF`. */
50
+ color: string;
36
51
  }
37
52
  /**
38
53
  * A Family's vendor website, for Browser Sign-ins (spec §3.24, ADR-0043): "Open in browser" opens `url` in a Chrome
@@ -139,8 +154,17 @@ export interface FamilyDef {
139
154
  installUrl: string;
140
155
  /** The Host's official one-line install command, shown before `installUrl`; sideby never runs it. */
141
156
  installCommand?: string;
142
- /** Environment variable that selects the Account directory. Not set for the Main Account. */
143
- selectVar: string;
157
+ /**
158
+ * Environment variable that selects the Account directory. Not set for the Main Account. Left out only by a
159
+ * Main-only Family (`mainOnly: true`).
160
+ */
161
+ selectVar?: string;
162
+ /**
163
+ * The Host offers no way to run a second Account apart from the first (no variable that moves its configuration
164
+ * directory, or a login kept in one fixed place): sideby knows only its Main Account and refuses to create others
165
+ * (ADR-0047). Set it with `selectVar` and `layout.account` both left out; any other combination is rejected.
166
+ */
167
+ mainOnly?: true;
144
168
  layout: FamilyLayout;
145
169
  /**
146
170
  * Entries that prove a directory is this Family's Account (besides a Secret File or an empty directory).
@@ -175,6 +199,12 @@ export interface FamilyDef {
175
199
  * it read the images from the paths the prompt lists. Public contract, additive only.
176
200
  */
177
201
  imageArg?: string;
202
+ /**
203
+ * The Host option that starts an interactive session with a first prompt, for a Host that refuses the prompt as a
204
+ * positional argument (Antigravity CLI: `--prompt-interactive`). An AI Task then passes `<promptArg>=<prompt>` in
205
+ * place of the positional prompt. Public contract, additive only.
206
+ */
207
+ promptArg?: string;
178
208
  /**
179
209
  * Makes a Launch safe for an AI Task (spec §3.28 "权限检查", ADR-0031): given every argument the Host would get
180
210
  * (Family defaults, the Account's config arguments, the task's own), returns them without any argument that
@@ -372,7 +402,7 @@ export interface QuotaFetchContext extends ReadContext {
372
402
  signal: AbortSignal;
373
403
  /**
374
404
  * The environment the Host gets at Launch, before the Secret File and Plugin hooks: sideby's own, Hijack Variables
375
- * cleared, the Family's `selectVar` set for every Account but the Main Account. Run the Host with this one.
405
+ * cleared, the Family's `selectVar` (if any) set for every Account but the Main Account. Run the Host with this one.
376
406
  */
377
407
  hostEnv: Env;
378
408
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Run work, personal and API-key accounts at the same time, without their configs drifting apart.",
5
5
  "license": "MIT",
6
6
  "author": "Adonis0123 (https://github.com/Adonis0123)",
@@ -84,5 +84,5 @@
84
84
  },
85
85
  "packageManager": "pnpm@10.15.0",
86
86
  "readmeFilename": "README.md",
87
- "readme": "<p align=\"center\">\n <img alt=\"sideby: work, personal and API-key accounts, one terminal each, one shared config\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/banner.jpg\" width=\"880\">\n</p>\n\n<p align=\"center\">\n <b>Run work, personal and API-key accounts at the same time, without their configs drifting apart.</b><br>\n Each account is its own directory and its own terminal. Skills, hooks and settings stay linked to your main account. Claude Code, Codex, Grok Build and pi.\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/sideby\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/sideby\"></a>\n <a href=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml/badge.svg\"></a>\n <img alt=\"Node 22.18+\" src=\"https://img.shields.io/badge/node-%E2%89%A522.18-339933\">\n <a href=\"LICENSE\"><img alt=\"MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n</p>\n\n<p align=\"center\">English | <a href=\"README.zh-CN.md\">中文</a></p>\n\n## Quick start\n\nRequires Node 22.18+ and at least one Host CLI (Claude Code, Codex, Grok Build or pi) installed. AI agents: follow the setup steps in [`llms.txt`](llms.txt) (\"Set up sideby for a user\") instead.\n\n```sh\nnpm i -g sideby\nsideby new claude work # create ~/.claude-work, sharing ~/.claude's skills and hooks\nsideby login claude:work # sign in once\nsideby run work # Claude Code on the work account\nsideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude\nsideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal\n```\n\n`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.\n\n## Set up with your AI agent\n\nPaste this into Claude Code, Codex or any coding agent:\n\n```text\nInstall the sideby CLI (npm package `sideby`) and its agent skill, then set up a second Claude Code account for me.\nFollow \"Set up sideby for a user\" in https://raw.githubusercontent.com/Adonis0123/sideby/main/llms.txt\n```\n\nThe agent checks Node and your Host CLIs, installs sideby and the skill, creates the account, tells you what it shares with your main one and makes its short command work. You sign in once in your browser; the agent gives you that one command. Once the skill is installed, short requests work too: \"add another Claude account, cc008\", \"what do my Codex accounts share?\", \"which account still has quota?\".\n\n## What it looks like\n\nThe 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.\n\nhttps://github.com/user-attachments/assets/d1d7e8dd-1df1-4881-ac88-e468c2dd4a1d\n\n<img alt=\"Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif\" width=\"1280\">\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\">\n <img alt=\"sideby panel: every account's 5h and 7d quota, 7-day token usage and health in one page\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\" width=\"1280\">\n</picture>\n\nOn macOS, the same quota sits in the menu bar (`sideby menubar on`): click or press `⌥X` to open it, and click an account to start it in the terminal.\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\">\n <img alt=\"sideby macOS menu bar dropdown: a status card, each tool with 5-hour and weekly quota bars, reset times, and the suggested account marked\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\" width=\"468\">\n</picture>\n\n## Why not just an alias?\n\n`CLAUDE_CONFIG_DIR` plus a shell alias already starts a second account. It does not keep skills and settings in one place, and it does not show quota for every account. [Does this break a provider's terms?](docs/guide/faq.md#terms)\n\n| | At the same time | Skills, hooks, settings | Quota and usage | Setup |\n|---|---|---|---|---|\n| `CLAUDE_CONFIG_DIR` and an alias | Yes. Each terminal exports the variable. | Each directory is its own copy. They drift unless you symlink by hand. | That session's status line | One alias per account |\n| [cc-switch](https://github.com/farion1231/cc-switch) | Enabling a provider writes the host's live config, so open sessions share that switch. | Plugin settings are copied across providers as a separate step. | The active provider, from its quota endpoint | Install the desktop app |\n| sideby | Yes. `sideby run` selects the directory for that process and leaves your shell alone. | Linked to the main account. `sideby doctor --fix` repairs copies. Sign-in and sessions stay separate. | Every account, from local files. Claude needs `quota setup`. | `npm i -g sideby`, then `sideby new` and sign in |\n\ncc-switch's docs describe that switch: it writes the live settings file ([README](https://github.com/farion1231/cc-switch#readme)). [#1105](https://github.com/farion1231/cc-switch/issues/1105) and [#2908](https://github.com/farion1231/cc-switch/issues/2908) ask for several sessions at once. [#1106](https://github.com/farion1231/cc-switch/issues/1106) is closed; the maintainer says Claude Code's \"open terminal\" can start one provider without changing the global config.\n\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\n| Find any past session of any account by what you remember, grouped by project, read it and continue it where it was | **Sessions › History** in the panel, or `sideby history \"fix login\" --project .` | [History](docs/guide/panel.md#history) |\n| See what every account is running right now and copy one session for another AI | **Sessions › Running** in the panel, or `sideby sessions` | [Sessions](docs/guide/panel.md#sessions) |\n| Send a running session a message, screenshots included | **Send to it** on a running session, or `sideby send claude:work \"run the tests\"` | [Send to a session](docs/guide/panel.md#send-to-a-session) |\n| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |\n| See quota at a glance in the macOS menu bar | **Settings › Startup** in the panel, or `sideby menubar on` | [Quota in the menu bar](docs/guide/usage.md#quota-in-the-menu-bar) |\n| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |\n| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |\n| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |\n| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |\n| Find the cheapest auto-compact size from your own sessions, and use it in one click | `sideby tune` (or the panel's Context tuning tab) | [Context tuning](docs/guide/usage.md#context-tuning) |\n| See each account's model and effort, and set them per account | `sideby model <account>` (or click the model in the panel) | [Model and effort](docs/guide/usage.md#model-and-effort) |\n| Choose whether Claude sessions connect to claude.ai by themselves (Remote Control), for every account at once | `sideby remote-control off` or `on` (or the panel's Settings) | [Remote Control](docs/guide/usage.md#remote-control) |\n| Pin the accounts you use most and put tools and accounts in your own order | `sideby pin claude:work`, `sideby order` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Move on when an account hits its limit | `sideby next claude` | [Handoff](docs/guide/usage.md#when-an-account-hits-its-limit) |\n| Let a running task move to the next account by itself when quota runs low (off by default; see the risk) | `sideby handoff enable` (or the panel) | [Auto Handoff](docs/guide/usage.md#auto-handoff) |\n| Short commands such as `ccw` | `sideby alias add ccw claude:work` | [Shell functions](docs/guide/configuration.md#shell-functions) |\n| Reopen a session from Orca and the like in the account that holds it | `\"resumeRouting\": true` in config | [Resuming from other tools](docs/guide/configuration.md#resuming-from-other-tools) |\n| Open Claude Desktop or the Codex app as one account, several side by side (macOS) | `sideby desktop claude:work` (or the panel) | [Desktop apps](docs/guide/usage.md#desktop-apps) |\n| Keep several Grok Bot windows open, each signed in to its own account (macOS) | `sideby desktop grok-bot:002` (or the panel) | [Grok Bot windows](docs/guide/usage.md#grok-bot-windows) |\n| Open the panel from the Dock or app menu | `sideby app install` | [Panel app](docs/guide/panel.md#panel-app) |\n| Show the panel inside your own local page | `createPanelHandler()` | [Embed the panel](docs/guide/panel.md#embed-the-panel) |\n| Add a Host, a pre-launch check, or your own project categories for History | a local plugin | [Plugins](docs/guide/plugins.md) |\n\n## Supported hosts\n\n| Host | Account directories | Sign-in | Quota | Usage (7 days) |\n|---|---|---|---|---|\n| Claude Code | `~/.claude`, `~/.claude-<name>` | `claude auth login` | ✓ after `quota setup claude` | ✓ |\n| Codex CLI | `~/.codex`, `~/.codex-<name>` | `codex login` | ✓ | ✓ |\n| Grok Build | `~/.grok`, `~/.grok-<name>` | `grok login` | weekly, asked from the `grok` CLI | no public source |\n| pi | `~/.pi/agent`, `~/.pi-<name>/agent` | `/login` inside pi | no public source | no public source |\n\nsideby starts the official binary on your `PATH` and never patches it. Tested versions and per-Host notes are in the [guide](docs/guide/usage.md#host-notes).\n\n## Platforms\n\nmacOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 22 and 24. **Windows is untested.** `sideby app` only installs a launcher on macOS and Linux. Linked items are symlinks, `sideby shell-init` prints bash and zsh functions, and the Claude quota wrapper runs `/bin/sh`.\n\n## Roadmap\n\n**Gemini CLI.** Gemini can point at another config directory with `GEMINI_CONFIG_DIR`. Older docs use `GEMINI_CLI_HOME`; current builds treat that name as deprecated, and exit on startup if it is set together with an exact directory override. A sideby family still needs a tested Gemini version, a login check that does not read tokens, and a list of which files to link or copy. That is more than a small patch, so it is not in this version.\n\n## Safe by design\n\n- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.\n- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).\n- `doctor --fix` never replaces a real file and never changes where a link points.\n- The panel answers only on `127.0.0.1` and refuses web pages from other sites, but it trusts every user of this computer. On a shared Mac, do not leave it running in the background ([details](docs/guide/panel.md#who-can-reach-the-panel)).\n\nDetails and the terms-of-service question are in the [FAQ](docs/guide/faq.md).\n\nUsage questions and ideas go in [Discussions](https://github.com/Adonis0123/sideby/discussions).\n\n## Docs\n\n- [Using sideby](docs/guide/usage.md): accounts, API accounts, Doctor, quota, Handoff, Host notes\n- [Commands](docs/guide/commands.md): every command, exit codes and `--json`\n- [Configuration](docs/guide/configuration.md): `config.json`, aliases, shell functions\n- [Panel](docs/guide/panel.md): the panel, sessions and their history, panel app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family, launch hook or project categories\n- [FAQ](docs/guide/faq.md): terms of service, data locations, alternatives, uninstall\n- [Changelog](https://github.com/Adonis0123/sideby/releases)\n\n## For AI agents\n\n- [`llms.txt`](llms.txt): setup steps, commands, JSON contract and plugin API in one index. `sideby families --json` states what each Host's accounts share.\n- [`skills/sideby/SKILL.md`](skills/sideby/SKILL.md): one Agent Skill for seeing, repairing and creating accounts and for moving on when one hits its limit. Install with `npx skills add Adonis0123/sideby -g`; `sideby doctor` warns when the installed copy is for another sideby version.\n- [`AGENTS.md`](AGENTS.md): rules for agents working on this repository.\n\n## License\n\n[MIT](LICENSE)\n"
87
+ "readme": "<p align=\"center\">\n <img alt=\"sideby: work, personal and API-key accounts, one terminal each, one shared config\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/banner.jpg\" width=\"880\">\n</p>\n\n<p align=\"center\">\n <b>Run work, personal and API-key accounts at the same time, without their configs drifting apart.</b><br>\n Each account is its own directory and its own terminal. Skills, hooks and settings stay linked to your main account. Claude Code, Codex, Grok Build and pi.\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/sideby\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/sideby\"></a>\n <a href=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml/badge.svg\"></a>\n <img alt=\"Node 22.18+\" src=\"https://img.shields.io/badge/node-%E2%89%A522.18-339933\">\n <a href=\"LICENSE\"><img alt=\"MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n</p>\n\n<p align=\"center\">English | <a href=\"README.zh-CN.md\">中文</a></p>\n\n## Quick start\n\nRequires Node 22.18+ and at least one Host CLI (Claude Code, Codex, Grok Build or pi) installed. AI agents: follow the setup steps in [`llms.txt`](llms.txt) (\"Set up sideby for a user\") instead.\n\n```sh\nnpm i -g sideby\nsideby new claude work # create ~/.claude-work, sharing ~/.claude's skills and hooks\nsideby login claude:work # sign in once\nsideby run work # Claude Code on the work account\nsideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude\nsideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal\n```\n\n`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.\n\n## Set up with your AI agent\n\nPaste this into Claude Code, Codex or any coding agent:\n\n```text\nInstall the sideby CLI (npm package `sideby`) and its agent skill, then set up a second Claude Code account for me.\nFollow \"Set up sideby for a user\" in https://raw.githubusercontent.com/Adonis0123/sideby/main/llms.txt\n```\n\nThe agent checks Node and your Host CLIs, installs sideby and the skill, creates the account, tells you what it shares with your main one and makes its short command work. You sign in once in your browser; the agent gives you that one command. Once the skill is installed, short requests work too: \"add another Claude account, cc008\", \"what do my Codex accounts share?\", \"which account still has quota?\".\n\n## What it looks like\n\nThe 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.\n\nhttps://github.com/user-attachments/assets/d1d7e8dd-1df1-4881-ac88-e468c2dd4a1d\n\n<img alt=\"Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif\" width=\"1280\">\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\">\n <img alt=\"sideby panel: every account's 5h and 7d quota, 7-day token usage and health in one page\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\" width=\"1280\">\n</picture>\n\nOn macOS, the same quota sits in the menu bar (`sideby menubar on`): click or press `⌥X` to open it, and click an account to start it in the terminal.\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\">\n <img alt=\"sideby macOS menu bar dropdown: a status card, each tool with 5-hour and weekly quota bars, reset times, and the suggested account marked\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\" width=\"468\">\n</picture>\n\n## Why not just an alias?\n\n`CLAUDE_CONFIG_DIR` plus a shell alias already starts a second account. It does not keep skills and settings in one place, and it does not show quota for every account. [Does this break a provider's terms?](docs/guide/faq.md#terms)\n\n| | At the same time | Skills, hooks, settings | Quota and usage | Setup |\n|---|---|---|---|---|\n| `CLAUDE_CONFIG_DIR` and an alias | Yes. Each terminal exports the variable. | Each directory is its own copy. They drift unless you symlink by hand. | That session's status line | One alias per account |\n| [cc-switch](https://github.com/farion1231/cc-switch) | Enabling a provider writes the host's live config, so open sessions share that switch. | Plugin settings are copied across providers as a separate step. | The active provider, from its quota endpoint | Install the desktop app |\n| sideby | Yes. `sideby run` selects the directory for that process and leaves your shell alone. | Linked to the main account. `sideby doctor --fix` repairs copies. Sign-in and sessions stay separate. | Every account, from local files. Claude needs `quota setup`. | `npm i -g sideby`, then `sideby new` and sign in |\n\ncc-switch's docs describe that switch: it writes the live settings file ([README](https://github.com/farion1231/cc-switch#readme)). [#1105](https://github.com/farion1231/cc-switch/issues/1105) and [#2908](https://github.com/farion1231/cc-switch/issues/2908) ask for several sessions at once. [#1106](https://github.com/farion1231/cc-switch/issues/1106) is closed; the maintainer says Claude Code's \"open terminal\" can start one provider without changing the global config.\n\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\n| Find any past session of any account by what you remember, grouped by project, read it and continue it where it was | **Sessions › History** in the panel, or `sideby history \"fix login\" --project .` | [History](docs/guide/panel.md#history) |\n| See what every account is running right now and copy one session for another AI | **Sessions › Running** in the panel, or `sideby sessions` | [Sessions](docs/guide/panel.md#sessions) |\n| Send a running session a message, screenshots included | **Send to it** on a running session, or `sideby send claude:work \"run the tests\"` | [Send to a session](docs/guide/panel.md#send-to-a-session) |\n| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |\n| See quota at a glance in the macOS menu bar | **Settings › Startup** in the panel, or `sideby menubar on` | [Quota in the menu bar](docs/guide/usage.md#quota-in-the-menu-bar) |\n| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |\n| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |\n| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |\n| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |\n| Find the cheapest auto-compact size from your own sessions, and use it in one click | `sideby tune` (or the panel's Context tuning tab) | [Context tuning](docs/guide/usage.md#context-tuning) |\n| See each account's model and effort, and set them per account | `sideby model <account>` (or click the model in the panel) | [Model and effort](docs/guide/usage.md#model-and-effort) |\n| Choose whether Claude sessions connect to claude.ai by themselves (Remote Control), for every account at once | `sideby remote-control off` or `on` (or the panel's Settings) | [Remote Control](docs/guide/usage.md#remote-control) |\n| Pin the accounts you use most and put tools and accounts in your own order | `sideby pin claude:work`, `sideby order` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Move on when an account hits its limit | `sideby next claude` | [Handoff](docs/guide/usage.md#when-an-account-hits-its-limit) |\n| Let a running task move to the next account by itself when quota runs low (off by default; see the risk) | `sideby handoff enable` (or the panel) | [Auto Handoff](docs/guide/usage.md#auto-handoff) |\n| Short commands such as `ccw` | `sideby alias add ccw claude:work` | [Shell functions](docs/guide/configuration.md#shell-functions) |\n| Reopen a session from Orca and the like in the account that holds it | `\"resumeRouting\": true` in config | [Resuming from other tools](docs/guide/configuration.md#resuming-from-other-tools) |\n| Open Claude Desktop or the Codex app as one account, several side by side (macOS) | `sideby desktop claude:work` (or the panel) | [Desktop apps](docs/guide/usage.md#desktop-apps) |\n| Keep several Grok Bot windows open, each signed in to its own account (macOS) | `sideby desktop grok-bot:002` (or the panel) | [Grok Bot windows](docs/guide/usage.md#grok-bot-windows) |\n| Open the panel from the Dock or app menu | `sideby app install` | [Panel app](docs/guide/panel.md#panel-app) |\n| Show the panel inside your own local page | `createPanelHandler()` | [Embed the panel](docs/guide/panel.md#embed-the-panel) |\n| Add a Host, a pre-launch check, or your own project categories for History | a local plugin | [Plugins](docs/guide/plugins.md) |\n\n## Supported hosts\n\n| Host | Account directories | Sign-in | Quota | Usage (7 days) |\n|---|---|---|---|---|\n| Claude Code | `~/.claude`, `~/.claude-<name>` | `claude auth login` | ✓ after `quota setup claude` | ✓ |\n| Codex CLI | `~/.codex`, `~/.codex-<name>` | `codex login` | ✓ | ✓ |\n| Grok Build | `~/.grok`, `~/.grok-<name>` | `grok login` | weekly, asked from the `grok` CLI | no public source |\n| pi | `~/.pi/agent`, `~/.pi-<name>/agent` | `/login` inside pi | no public source | no public source |\n| Antigravity CLI | `~/.gemini/antigravity-cli` (main account only) | sign in with Google inside `agy` | 5-hour and weekly per model group, asked from the `agy` CLI | no public source |\n\nsideby starts the official binary on your `PATH` and never patches it. Tested versions and per-Host notes are in the [guide](docs/guide/usage.md#host-notes).\n\n## Platforms\n\nmacOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 22 and 24. **Windows is untested.** `sideby app` only installs a launcher on macOS and Linux. Linked items are symlinks, `sideby shell-init` prints bash and zsh functions, and the Claude quota wrapper runs `/bin/sh`.\n\n## Roadmap\n\n**Gemini CLI.** Gemini can point at another config directory with `GEMINI_CONFIG_DIR`. Older docs use `GEMINI_CLI_HOME`; current builds treat that name as deprecated, and exit on startup if it is set together with an exact directory override. A sideby family still needs a tested Gemini version, a login check that does not read tokens, and a list of which files to link or copy. That is more than a small patch, so it is not in this version.\n\n## Safe by design\n\n- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.\n- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).\n- `doctor --fix` never replaces a real file and never changes where a link points.\n- The panel answers only on `127.0.0.1` and refuses web pages from other sites, but it trusts every user of this computer. On a shared Mac, do not leave it running in the background ([details](docs/guide/panel.md#who-can-reach-the-panel)).\n\nDetails and the terms-of-service question are in the [FAQ](docs/guide/faq.md).\n\nUsage questions and ideas go in [Discussions](https://github.com/Adonis0123/sideby/discussions).\n\n## Docs\n\n- [Using sideby](docs/guide/usage.md): accounts, API accounts, Doctor, quota, Handoff, Host notes\n- [Commands](docs/guide/commands.md): every command, exit codes and `--json`\n- [Configuration](docs/guide/configuration.md): `config.json`, aliases, shell functions\n- [Panel](docs/guide/panel.md): the panel, sessions and their history, panel app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family, launch hook or project categories\n- [FAQ](docs/guide/faq.md): terms of service, data locations, alternatives, uninstall\n- [Changelog](https://github.com/Adonis0123/sideby/releases)\n\n## For AI agents\n\n- [`llms.txt`](llms.txt): setup steps, commands, JSON contract and plugin API in one index. `sideby families --json` states what each Host's accounts share.\n- [`skills/sideby/SKILL.md`](skills/sideby/SKILL.md): one Agent Skill for seeing, repairing and creating accounts and for moving on when one hits its limit. Install with `npx skills add Adonis0123/sideby -g`; `sideby doctor` warns when the installed copy is for another sideby version.\n- [`AGENTS.md`](AGENTS.md): rules for agents working on this repository.\n\n## License\n\n[MIT](LICENSE)\n"
88
88
  }
@@ -26,6 +26,11 @@
26
26
  "zh"
27
27
  ],
28
28
  "description": "Panel language: the browser's (default), English, or Chinese."
29
+ },
30
+ "colorTheme": {
31
+ "type": "string",
32
+ "pattern": "^[a-z0-9][a-z0-9-]{0,39}$",
33
+ "description": "Panel Theme: a Built-in Theme (sky, the default, or leaf) or a Theme File in <config>/themes (spec §3.34)."
29
34
  }
30
35
  },
31
36
  "additionalProperties": false,
@@ -248,12 +253,27 @@
248
253
  "properties": {
249
254
  "auto": {
250
255
  "type": "boolean",
251
- "description": "Hand a running session to the next account when its Quota runs low: only to other families and API accounts unless `sameFamily` is on. Off by default."
256
+ "description": "Hand a running session to the next account when its Quota runs low: within the family only with `sameFamily`, to other families only with `otherFamilies`, to API accounts only with `api`. Off by default."
252
257
  },
253
258
  "sameFamily": {
254
259
  "type": "boolean",
255
260
  "description": "Also hand off to an account of the same family (cc001 → cc002). The kind vendors are most likely to act on. Off by default."
256
261
  },
262
+ "otherFamilies": {
263
+ "type": "boolean",
264
+ "description": "When no account of the family can take over, let accounts of other families take over, family by family in `familyOrder`. Off by default."
265
+ },
266
+ "familyOrder": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "string"
270
+ },
271
+ "description": "Families to try with `otherFamilies`, first to last (for example [\"codex\", \"grok\"]); families left out come after, in the usual order."
272
+ },
273
+ "api": {
274
+ "type": "boolean",
275
+ "description": "Let API accounts take over as the last resort, when no subscription account can. They are billed per use and sideby does not cap spending. Off by default (ADR-0046)."
276
+ },
257
277
  "prepareAt": {
258
278
  "type": "integer",
259
279
  "minimum": 1,
@@ -408,10 +428,33 @@
408
428
  }
409
429
  },
410
430
  "description": "Per family, the names of the accounts pinned to the top of their group, in the order they are shown; they lead the group in every sort. Resetting the order keeps them."
431
+ },
432
+ "hiddenFamilies": {
433
+ "type": "array",
434
+ "items": {
435
+ "type": "string",
436
+ "minLength": 1
437
+ },
438
+ "uniqueItems": true,
439
+ "description": "Family ids hidden from the Panel, the menu bar and `sideby list` (spec §3.25). Display only: they can still be started and picked by a Handoff."
440
+ },
441
+ "hidden": {
442
+ "type": "object",
443
+ "patternProperties": {
444
+ "^.*$": {
445
+ "type": "array",
446
+ "items": {
447
+ "type": "string",
448
+ "minLength": 1
449
+ },
450
+ "uniqueItems": true
451
+ }
452
+ },
453
+ "description": "Per family, the names of the accounts hidden from the Panel, the menu bar and `sideby list`. Display only: they can still be started and picked by a Handoff."
411
454
  }
412
455
  },
413
456
  "additionalProperties": false,
414
- "description": "Display Order (spec §3.25): the order you gave families and accounts in the Panel, and the accounts you pinned. Display only: it never changes which account a Handoff picks."
457
+ "description": "Display Order (spec §3.25): the order you gave families and accounts in the Panel, the accounts you pinned, and what you hid. Display only: it never changes which account a Handoff picks."
415
458
  },
416
459
  "quota": {
417
460
  "type": "object",
@@ -57,6 +57,16 @@
57
57
  "settingsFile": {
58
58
  "type": "string",
59
59
  "description": "The Host's settings file `sideby edit` opens, relative to the account directory."
60
+ },
61
+ "mainOnly": {
62
+ "type": "boolean",
63
+ "const": true,
64
+ "description": "The Host keeps one sign-in per computer, so sideby knows only its Main Account and refuses to create others (ADR-0047)."
65
+ },
66
+ "hidden": {
67
+ "type": "boolean",
68
+ "const": true,
69
+ "description": "Hidden from the Panel, the menu bar and the text of `sideby list` (spec §3.25). Display only; set by `sideby list`, absent when shown."
60
70
  }
61
71
  }
62
72
  },
@@ -64,7 +74,6 @@
64
74
  "type": "object",
65
75
  "required": [
66
76
  "layout",
67
- "selectVar",
68
77
  "login",
69
78
  "quota",
70
79
  "usage",
@@ -75,8 +84,7 @@
75
84
  "layout": {
76
85
  "type": "object",
77
86
  "required": [
78
- "main",
79
- "account"
87
+ "main"
80
88
  ],
81
89
  "properties": {
82
90
  "main": {
@@ -86,11 +94,11 @@
86
94
  "type": "string"
87
95
  }
88
96
  },
89
- "description": "Relative to HOME, for example `.claude` and `.claude-<name>`."
97
+ "description": "Relative to HOME, for example `.claude` and `.claude-<name>`. A Main-only Family has no `account`."
90
98
  },
91
99
  "selectVar": {
92
100
  "type": "string",
93
- "description": "Environment variable that selects a non-main Account directory."
101
+ "description": "Environment variable that selects a non-main Account directory. Left out for a Main-only Family."
94
102
  },
95
103
  "login": {
96
104
  "type": "object",
@@ -29,8 +29,12 @@
29
29
  "required": [
30
30
  "auto",
31
31
  "sameFamily",
32
+ "otherFamilies",
33
+ "familyOrder",
34
+ "api",
32
35
  "prepareAt",
33
36
  "threshold",
37
+ "adaptive",
34
38
  "waitIfResetWithinMinutes",
35
39
  "countdownSeconds",
36
40
  "crossOrganization",
@@ -43,12 +47,30 @@
43
47
  "sameFamily": {
44
48
  "type": "boolean"
45
49
  },
50
+ "otherFamilies": {
51
+ "type": "boolean",
52
+ "description": "Other AIs may take over when this one has no account that can (ADR-0046)."
53
+ },
54
+ "familyOrder": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ },
59
+ "description": "The order other AIs are tried in."
60
+ },
61
+ "api": {
62
+ "type": "boolean",
63
+ "description": "API accounts may take over, last; billed per use (ADR-0046)."
64
+ },
46
65
  "prepareAt": {
47
66
  "type": "number"
48
67
  },
49
68
  "threshold": {
50
69
  "type": "number"
51
70
  },
71
+ "adaptive": {
72
+ "type": "boolean"
73
+ },
52
74
  "waitIfResetWithinMinutes": {
53
75
  "type": "number"
54
76
  },
@@ -29,8 +29,12 @@
29
29
  "required": [
30
30
  "auto",
31
31
  "sameFamily",
32
+ "otherFamilies",
33
+ "familyOrder",
34
+ "api",
32
35
  "prepareAt",
33
36
  "threshold",
37
+ "adaptive",
34
38
  "waitIfResetWithinMinutes",
35
39
  "countdownSeconds",
36
40
  "crossOrganization",
@@ -43,12 +47,30 @@
43
47
  "sameFamily": {
44
48
  "type": "boolean"
45
49
  },
50
+ "otherFamilies": {
51
+ "type": "boolean",
52
+ "description": "Other AIs may take over when this one has no account that can (ADR-0046)."
53
+ },
54
+ "familyOrder": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ },
59
+ "description": "The order other AIs are tried in."
60
+ },
61
+ "api": {
62
+ "type": "boolean",
63
+ "description": "API accounts may take over, last; billed per use (ADR-0046)."
64
+ },
46
65
  "prepareAt": {
47
66
  "type": "number"
48
67
  },
49
68
  "threshold": {
50
69
  "type": "number"
51
70
  },
71
+ "adaptive": {
72
+ "type": "boolean"
73
+ },
52
74
  "waitIfResetWithinMinutes": {
53
75
  "type": "number"
54
76
  },