sideby 0.24.0 → 0.26.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 (45) hide show
  1. package/README.md +3 -1
  2. package/ai-tasks.json +17 -0
  3. package/dist/build.json +1 -1
  4. package/dist/src/cli/commands.d.ts +14 -0
  5. package/dist/src/cli/commands.js +120 -12
  6. package/dist/src/cli/json-schemas.js +47 -0
  7. package/dist/src/cli/main.js +41 -6
  8. package/dist/src/core/ask.d.ts +10 -6
  9. package/dist/src/core/ask.js +52 -9
  10. package/dist/src/core/config.d.ts +16 -0
  11. package/dist/src/core/config.js +16 -0
  12. package/dist/src/core/egress.d.ts +103 -0
  13. package/dist/src/core/egress.js +333 -0
  14. package/dist/src/core/handoff-run.d.ts +4 -2
  15. package/dist/src/core/handoff-run.js +18 -11
  16. package/dist/src/core/launch.d.ts +5 -1
  17. package/dist/src/core/launch.js +5 -0
  18. package/dist/src/core/network.d.ts +131 -0
  19. package/dist/src/core/network.js +317 -0
  20. package/dist/src/families/agy/index.js +4 -1
  21. package/dist/src/families/claude/index.js +4 -1
  22. package/dist/src/families/codex/index.js +8 -1
  23. package/dist/src/families/grok/index.js +4 -1
  24. package/dist/src/families/pi/index.js +4 -1
  25. package/dist/src/network/hook.d.ts +15 -0
  26. package/dist/src/network/hook.js +69 -0
  27. package/dist/src/panel/handler.d.ts +3 -0
  28. package/dist/src/panel/handler.js +33 -1
  29. package/dist/src/panel/i18n.d.ts +51 -0
  30. package/dist/src/panel/i18n.js +102 -0
  31. package/dist/src/panel/page-logic.d.ts +23 -1
  32. package/dist/src/panel/page-logic.js +33 -0
  33. package/dist/src/panel/page-script.js +130 -2
  34. package/dist/src/panel/page-styles.js +11 -3
  35. package/dist/src/runtime.d.ts +18 -1
  36. package/dist/src/runtime.js +78 -7
  37. package/dist/src/types.d.ts +7 -0
  38. package/package.json +2 -2
  39. package/schemas/config.json +20 -0
  40. package/schemas/network-set.json +129 -0
  41. package/schemas/network.json +199 -0
  42. package/schemas/try.json +4 -0
  43. package/skills/sideby/SKILL.md +3 -2
  44. package/skills/sideby/references/ai-tasks.md +2 -1
  45. package/skills/sideby/references/network.md +37 -0
@@ -3,11 +3,13 @@ import { type Config, type DisplayConfig, type HandoffSettings } from './core/co
3
3
  import { type CreateResult } from './core/create.ts';
4
4
  import { type DesktopDeps } from './core/desktop-app.ts';
5
5
  import { type DoctorReport } from './core/doctor.ts';
6
+ import type { TraceFetcher } from './core/egress.ts';
6
7
  import { UserError } from './core/errors.ts';
7
8
  import { type HandoffPlan } from './core/handoff.ts';
8
9
  import { type HandoffDecision } from './core/handoff-select.ts';
9
10
  import { type DoctorHistory } from './core/last-doctor.ts';
10
11
  import { type HostLaunch, type PreparedLaunch } from './core/launch.ts';
12
+ import { type NetworkOverview } from './core/network.ts';
11
13
  import { type Paths } from './core/paths.ts';
12
14
  import { type PickChoice } from './core/pick-commands.ts';
13
15
  import { type ProjectCategories } from './core/project-categories.ts';
@@ -256,7 +258,12 @@ export interface Runtime {
256
258
  */
257
259
  prepareLaunch(ref: string, userArgs: readonly string[], command: 'run' | 'login', opts?: {
258
260
  aiTask?: boolean;
261
+ ignoreNetwork?: boolean;
259
262
  }): Promise<PreparedLaunch>;
263
+ /** Network Guard's state (spec §3.35): the cached result per address, or with `check` one request per address. */
264
+ networkStatus(opts?: {
265
+ check?: boolean;
266
+ }): Promise<NetworkOverview>;
260
267
  /**
261
268
  * The Host and arguments `prepareLaunch` starts from, without reading the Secret File or running `launch.before`
262
269
  * hooks: what a preview may show before the user agrees to start anything.
@@ -271,7 +278,9 @@ export interface Runtime {
271
278
  * Starts the non-main Account that holds the session the Host arguments resume, or else the Host unchanged
272
279
  * (spec §3.15). Throws UnknownFamilyError, or a UserError when the Family cannot route sessions.
273
280
  */
274
- resumeLaunch(familyId: string, userArgs: readonly string[]): Promise<ResumeLaunch>;
281
+ resumeLaunch(familyId: string, userArgs: readonly string[], opts?: {
282
+ ignoreNetwork?: boolean;
283
+ }): Promise<ResumeLaunch>;
275
284
  /**
276
285
  * The Account's Quota. For an Account of a Same Login (spec §3.21) it is the group's freshest reading, with `from`
277
286
  * naming the Account it was read from when that is another one.
@@ -367,4 +376,12 @@ export declare function createRuntime(opts?: {
367
376
  * the plugin or Portal contract; it may change without notice.
368
377
  */
369
378
  desktop?: Partial<DesktopDeps>;
379
+ /**
380
+ * Internal, for tests: replaces Network Guard's request and the machine's network print (spec §3.35), so a
381
+ * test never asks the network. Not part of the plugin or Portal contract.
382
+ */
383
+ network?: {
384
+ fetcher?: TraceFetcher;
385
+ print?: string;
386
+ };
370
387
  }): Promise<Runtime>;
@@ -12,8 +12,9 @@ import { selectNext } from './core/handoff-select.js';
12
12
  import { identityOf } from './core/identity.js';
13
13
  import { inboundFindings } from './core/inbound.js';
14
14
  import { mergeDoctorHistory, readDoctorHistory, writeDoctorHistory, } from './core/last-doctor.js';
15
- import { accountEnv, brokenOnPath, launchCommand, prepareLaunch, which, } from './core/launch.js';
15
+ import { accountEnv, beforeDashes, brokenOnPath, launchCommand, prepareLaunch, which, } from './core/launch.js';
16
16
  import { memoStore } from './core/memo-store.js';
17
+ import { codexNetworkTrustLine, guardLaunch, guardOn, ipChangedLine, networkHookArgs, networkOverview, networkSettingsLine, } from './core/network.js';
17
18
  import { resolvePaths } from './core/paths.js';
18
19
  import { choosePick, suggestPickName } from './core/pick-commands.js';
19
20
  import { categoryReader } from './core/project-categories.js';
@@ -30,6 +31,7 @@ import { packageVersion } from './core/version.js';
30
31
  import { withClaudeMod } from './families/claude/mod.js';
31
32
  import { BUILTIN_PLUGINS } from './families/index.js';
32
33
  import { LOGIN_KEY_READERS } from './families/login-keys.js';
34
+ import { hasOption } from './families/shared/handoff-args.js';
33
35
  import { HookBus } from './plugins/bus.js';
34
36
  import { loadPlugins } from './plugins/loader.js';
35
37
  export class UnknownFamilyError extends UserError {
@@ -81,6 +83,40 @@ export async function createRuntime(opts = {}) {
81
83
  const categories = loaded.categories && categoryReader(loaded.categories.def, loaded.categories.owner);
82
84
  const ignore = new Set(config.ignore ?? []);
83
85
  const now = opts.now ?? (() => new Date());
86
+ /**
87
+ * Network Guard on a prepared Launch (spec §3.35): refuses it (a UserError) when the Egress is wrong or cannot be
88
+ * told, and for a session (`hooks`) adds the variables and hook arguments that keep checking inside it.
89
+ */
90
+ const guardPrepared = async (p, hooks) => {
91
+ const g = await guardLaunch({
92
+ account: p.account,
93
+ env: p.env,
94
+ config,
95
+ stateDir: paths.stateDir,
96
+ ...(p.env.SIDEBY_LABEL ? { label: p.env.SIDEBY_LABEL } : {}),
97
+ ...(opts.network?.fetcher ? { fetcher: opts.network.fetcher } : {}),
98
+ ...(opts.network?.print ? { print: opts.network.print } : {}),
99
+ now,
100
+ });
101
+ if (!g)
102
+ return;
103
+ const lines = [ipChangedLine(g.verdict, p.env)];
104
+ if (hooks) {
105
+ const own = p.family.id === 'claude' && hasOption(p.args, ['--settings']);
106
+ if (own)
107
+ lines.push(networkSettingsLine(p.env));
108
+ else {
109
+ Object.assign(p.env, g.env);
110
+ p.networkArgs = await networkHookArgs(p.family.id, paths.stateDir);
111
+ p.args = beforeDashes(p.args, p.networkArgs);
112
+ if (p.family.id === 'codex')
113
+ lines.push(await codexNetworkTrustLine(paths.stateDir, p.account.ref, p.env));
114
+ }
115
+ }
116
+ const notice = [p.notice, ...lines].filter(Boolean).join('\n');
117
+ if (notice)
118
+ p.notice = notice;
119
+ };
84
120
  const familyOf = (id) => {
85
121
  const f = families.get(id);
86
122
  if (!f)
@@ -638,33 +674,68 @@ export async function createRuntime(opts = {}) {
638
674
  env: p.env,
639
675
  stateDir: paths.stateDir,
640
676
  });
677
+ // Network Guard (spec §3.35): last, on the environment the Host gets, so the check takes the Host's route.
678
+ if (!opts.ignoreNetwork)
679
+ await guardPrepared(p, command === 'run');
641
680
  return p;
642
681
  },
682
+ async networkStatus(o = {}) {
683
+ return networkOverview({
684
+ accounts: await accounts(),
685
+ config,
686
+ stateDir: paths.stateDir,
687
+ env,
688
+ envFor: async (a) => accountEnv(familyOf(a.family), a, env),
689
+ ...(o.check ? { check: true } : {}),
690
+ ...(opts.network?.fetcher ? { fetcher: opts.network.fetcher } : {}),
691
+ ...(opts.network?.print ? { print: opts.network.print } : {}),
692
+ now,
693
+ });
694
+ },
643
695
  async launchCommand(ref, userArgs, command) {
644
696
  const inputs = launchInputs(ref, await accounts(), userArgs, command);
645
697
  return { account: inputs.account, family: inputs.family, ...launchCommand(inputs) };
646
698
  },
647
- async resumeLaunch(familyId, userArgs) {
699
+ async resumeLaunch(familyId, userArgs, ro = {}) {
648
700
  const family = familyOf(familyId);
649
701
  if (!family.resumedSession || !family.sessionWrittenAt)
650
702
  throw new UserError(`${family.title} sessions cannot be routed; start an account yourself with \`sideby run <account> -- …\``);
651
703
  const host = { family, bin: family.bin, args: [...userArgs], env };
704
+ // The Host run unchanged still talks to its vendor: Network Guard checks it as the Main Account (spec §3.35).
705
+ const guarded = async (h) => {
706
+ if (ro.ignoreNetwork || !guardOn(config, h.env))
707
+ return h;
708
+ const main = (await accounts()).find((a) => a.family === family.id && a.isMain);
709
+ if (!main)
710
+ return h;
711
+ const p = { ...h, account: main, args: [...h.args], env: { ...h.env } };
712
+ await guardPrepared(p, true);
713
+ return {
714
+ family: p.family,
715
+ bin: p.bin,
716
+ args: p.args,
717
+ env: p.env,
718
+ ...(h.title ? { title: h.title } : {}),
719
+ ...(h.account ? { account: h.account } : {}),
720
+ ...(p.notice ? { notice: p.notice } : {}),
721
+ };
722
+ };
652
723
  // A select variable already set means an Account was chosen on purpose: run the Host as it is.
653
724
  if (family.selectVar && env[family.selectVar])
654
- return { launch: host };
725
+ return { launch: await guarded(host) };
655
726
  const route = await findResumeRoute(family, await accounts(), userArgs);
656
727
  const id = route.sessionId ? { sessionId: route.sessionId } : {};
657
728
  if (route.neverSaved && route.account && family.withoutResume) {
658
729
  const args = family.withoutResume(userArgs);
659
730
  const launch = route.account.isMain
660
- ? { ...host, args }
661
- : await rt.prepareLaunch(route.account.ref, args, 'run');
731
+ ? await guarded({ ...host, args })
732
+ : await rt.prepareLaunch(route.account.ref, args, 'run', ro);
662
733
  return { launch, ...id, account: route.account, newSession: true };
663
734
  }
664
735
  if (!route.account || route.account.isMain || route.neverSaved)
665
- return { launch: host, ...id };
736
+ return { launch: await guarded(host), ...id };
666
737
  return {
667
- launch: await rt.prepareLaunch(route.account.ref, userArgs, 'run'),
738
+ launch: await rt.prepareLaunch(route.account.ref, userArgs, 'run', ro),
668
739
  ...id,
669
740
  account: route.account,
670
741
  };
@@ -189,9 +189,16 @@ export interface FamilyDef {
189
189
  * Arguments for one short non-interactive check of an Account (`sideby try`, spec §3.28).
190
190
  * sideby runs `bin` with these arguments and no others. Public contract, additive only:
191
191
  * leaving it out means this tool cannot be tried.
192
+ * `model` lets `sideby try --model` choose the model: `flags` are the Host options that choose one (every
193
+ * earlier occurrence is taken out of the account's and short command's arguments) and `args(model)` replaces
194
+ * `args`. Leaving it out means `--model` is refused for this tool.
192
195
  */
193
196
  probe?: {
194
197
  args: string[];
198
+ model?: {
199
+ flags: string[];
200
+ args(model: string): string[];
201
+ };
195
202
  };
196
203
  /**
197
204
  * The Host option that attaches an image to the first prompt, such as Codex's `--image` (spec §3.28 "附件").
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.24.0",
3
+ "version": "0.26.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| 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"
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| Stop Claude and Codex when your requests would leave from a country you did not allow, for example when the proxy stopped | **Settings › Network check** in the panel, or `sideby network on` | [Network check](docs/guide/usage.md#network-check) |\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, put tools and accounts in your own order, and hide the ones you never use | `sideby pin claude:work`, `sideby order`, `sideby hide grok` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Give the panel other colors: five built-in Themes, your own color, or one your AI writes | **Settings › Theme** in the panel, or `sideby theme use leaf` | [Themes](docs/guide/panel.md#themes) |\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
  }
@@ -368,6 +368,26 @@
368
368
  "additionalProperties": false,
369
369
  "description": "Session History (spec §3.33, ADR-0042)."
370
370
  },
371
+ "network": {
372
+ "type": "object",
373
+ "properties": {
374
+ "guard": {
375
+ "type": "boolean",
376
+ "description": "Network Guard: before a Launch and before each prompt and tool call in a session sideby starts, check the country Claude Code's and Codex's requests leave from, and stop when it is not in `allow` or cannot be told. Asks the vendor's own `/cdn-cgi/trace` through the Host's proxy settings, with no credential. Off by default."
377
+ },
378
+ "allow": {
379
+ "type": "array",
380
+ "items": {
381
+ "type": "string",
382
+ "pattern": "^[A-Z]{2}$"
383
+ },
384
+ "uniqueItems": true,
385
+ "description": "Countries (ISO 3166-1 alpha-2, such as `US` or `JP`) a Host may send requests from. Network Guard cannot be turned on while it is empty."
386
+ }
387
+ },
388
+ "additionalProperties": false,
389
+ "description": "Network Guard (spec §3.35, ADR-0053)."
390
+ },
371
391
  "browser": {
372
392
  "type": "object",
373
393
  "properties": {
@@ -0,0 +1,129 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/network-set.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "changed",
8
+ "applied",
9
+ "file",
10
+ "before",
11
+ "after"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "number",
16
+ "const": 1
17
+ },
18
+ "changed": {
19
+ "type": "boolean"
20
+ },
21
+ "applied": {
22
+ "type": "boolean",
23
+ "description": "False when only the change was shown; run again with --yes (exit 10)."
24
+ },
25
+ "file": {
26
+ "type": "string",
27
+ "description": "The config file changed."
28
+ },
29
+ "before": {
30
+ "type": "object",
31
+ "required": [
32
+ "guard",
33
+ "allow"
34
+ ],
35
+ "properties": {
36
+ "guard": {
37
+ "type": "boolean"
38
+ },
39
+ "allow": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "after": {
48
+ "type": "object",
49
+ "required": [
50
+ "guard",
51
+ "allow"
52
+ ],
53
+ "properties": {
54
+ "guard": {
55
+ "type": "boolean"
56
+ },
57
+ "allow": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "_notice": {
66
+ "type": "object",
67
+ "properties": {
68
+ "update": {
69
+ "type": "object",
70
+ "required": [
71
+ "current",
72
+ "latest",
73
+ "command",
74
+ "message"
75
+ ],
76
+ "properties": {
77
+ "current": {
78
+ "type": "string"
79
+ },
80
+ "latest": {
81
+ "type": "string"
82
+ },
83
+ "command": {
84
+ "type": "string",
85
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
86
+ },
87
+ "message": {
88
+ "type": "string"
89
+ }
90
+ }
91
+ },
92
+ "skill": {
93
+ "type": "object",
94
+ "required": [
95
+ "installed",
96
+ "current",
97
+ "command",
98
+ "message"
99
+ ],
100
+ "properties": {
101
+ "installed": {
102
+ "anyOf": [
103
+ {
104
+ "type": "string"
105
+ },
106
+ {
107
+ "type": "null"
108
+ }
109
+ ],
110
+ "description": "The skill's version; null when it has none."
111
+ },
112
+ "current": {
113
+ "type": "string"
114
+ },
115
+ "command": {
116
+ "type": "string",
117
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
118
+ },
119
+ "message": {
120
+ "type": "string"
121
+ }
122
+ }
123
+ }
124
+ },
125
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
126
+ }
127
+ },
128
+ "title": "sideby network on|off|allow --json"
129
+ }
@@ -0,0 +1,199 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/network.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "guard",
8
+ "allow",
9
+ "active",
10
+ "ci",
11
+ "targets",
12
+ "accounts"
13
+ ],
14
+ "properties": {
15
+ "schemaVersion": {
16
+ "type": "number",
17
+ "const": 1
18
+ },
19
+ "guard": {
20
+ "type": "boolean",
21
+ "description": "Config `network.guard`: Network Guard is switched on."
22
+ },
23
+ "allow": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "string"
27
+ },
28
+ "description": "Allowed countries (ISO 3166-1 alpha-2), config `network.allow`."
29
+ },
30
+ "active": {
31
+ "type": "boolean",
32
+ "description": "It checks Launches now: switched on, a country allowed, and not in CI."
33
+ },
34
+ "ci": {
35
+ "type": "boolean",
36
+ "description": "Running in CI, where it makes no request and checks nothing."
37
+ },
38
+ "targets": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "required": [
43
+ "url",
44
+ "accounts",
45
+ "status",
46
+ "ipChanged"
47
+ ],
48
+ "properties": {
49
+ "url": {
50
+ "type": "string",
51
+ "description": "The `/cdn-cgi/trace` address asked."
52
+ },
53
+ "accounts": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string"
57
+ },
58
+ "description": "Refs of the accounts checked at this address."
59
+ },
60
+ "status": {
61
+ "anyOf": [
62
+ {
63
+ "type": "string",
64
+ "const": "ok"
65
+ },
66
+ {
67
+ "type": "string",
68
+ "const": "blocked"
69
+ },
70
+ {
71
+ "type": "string",
72
+ "const": "unknown"
73
+ },
74
+ {
75
+ "type": "string",
76
+ "const": "not-checked"
77
+ }
78
+ ],
79
+ "description": "ok: the country is allowed; blocked: it is not; unknown: the last check could not tell (it blocks); not-checked: no result yet."
80
+ },
81
+ "loc": {
82
+ "type": "string",
83
+ "description": "The country the vendor sees, from the newest result."
84
+ },
85
+ "checkedAt": {
86
+ "type": "string",
87
+ "description": "When the newest result was asked (ISO)."
88
+ },
89
+ "error": {
90
+ "type": "string",
91
+ "description": "Why the newest check could not tell."
92
+ },
93
+ "ipChanged": {
94
+ "type": "boolean",
95
+ "description": "The exit address changed in the last day (a notice only)."
96
+ }
97
+ }
98
+ }
99
+ },
100
+ "accounts": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "required": [
105
+ "ref"
106
+ ],
107
+ "properties": {
108
+ "ref": {
109
+ "type": "string"
110
+ },
111
+ "url": {
112
+ "type": "string",
113
+ "description": "The address this account is checked at."
114
+ },
115
+ "skip": {
116
+ "anyOf": [
117
+ {
118
+ "type": "string",
119
+ "const": "not-covered"
120
+ },
121
+ {
122
+ "type": "string",
123
+ "const": "third-party"
124
+ },
125
+ {
126
+ "type": "string",
127
+ "const": "at-launch"
128
+ }
129
+ ],
130
+ "description": "third-party: an API account on another endpoint, not checked; at-launch: an API account, whose address is known only when it starts."
131
+ }
132
+ }
133
+ }
134
+ },
135
+ "_notice": {
136
+ "type": "object",
137
+ "properties": {
138
+ "update": {
139
+ "type": "object",
140
+ "required": [
141
+ "current",
142
+ "latest",
143
+ "command",
144
+ "message"
145
+ ],
146
+ "properties": {
147
+ "current": {
148
+ "type": "string"
149
+ },
150
+ "latest": {
151
+ "type": "string"
152
+ },
153
+ "command": {
154
+ "type": "string",
155
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
156
+ },
157
+ "message": {
158
+ "type": "string"
159
+ }
160
+ }
161
+ },
162
+ "skill": {
163
+ "type": "object",
164
+ "required": [
165
+ "installed",
166
+ "current",
167
+ "command",
168
+ "message"
169
+ ],
170
+ "properties": {
171
+ "installed": {
172
+ "anyOf": [
173
+ {
174
+ "type": "string"
175
+ },
176
+ {
177
+ "type": "null"
178
+ }
179
+ ],
180
+ "description": "The skill's version; null when it has none."
181
+ },
182
+ "current": {
183
+ "type": "string"
184
+ },
185
+ "command": {
186
+ "type": "string",
187
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
188
+ },
189
+ "message": {
190
+ "type": "string"
191
+ }
192
+ }
193
+ }
194
+ },
195
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
196
+ }
197
+ },
198
+ "title": "sideby network [check] --json"
199
+ }
package/schemas/try.json CHANGED
@@ -15,6 +15,10 @@
15
15
  "account": {
16
16
  "type": "string"
17
17
  },
18
+ "model": {
19
+ "type": "string",
20
+ "description": "The model `--model` chose, when given."
21
+ },
18
22
  "confirmed": {
19
23
  "type": "boolean"
20
24
  },