sideby 0.3.0 → 0.4.1

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 (115) hide show
  1. package/README.md +27 -10
  2. package/dist/build.json +1 -1
  3. package/dist/src/cli/commands.d.ts +8 -1
  4. package/dist/src/cli/commands.js +332 -9
  5. package/dist/src/cli/format.d.ts +3 -1
  6. package/dist/src/cli/format.js +25 -0
  7. package/dist/src/cli/json-schemas.js +114 -0
  8. package/dist/src/cli/main.d.ts +5 -0
  9. package/dist/src/cli/main.js +40 -8
  10. package/dist/src/core/config.d.ts +40 -0
  11. package/dist/src/core/config.js +83 -11
  12. package/dist/src/core/file-memo.d.ts +23 -0
  13. package/dist/src/core/file-memo.js +37 -0
  14. package/dist/src/core/handoff-brief.d.ts +17 -0
  15. package/dist/src/core/handoff-brief.js +75 -0
  16. package/dist/src/core/handoff-chain.d.ts +74 -0
  17. package/dist/src/core/handoff-chain.js +74 -0
  18. package/dist/src/core/handoff-doctor.d.ts +13 -0
  19. package/dist/src/core/handoff-doctor.js +35 -0
  20. package/dist/src/core/handoff-run.d.ts +31 -0
  21. package/dist/src/core/handoff-run.js +346 -0
  22. package/dist/src/core/handoff-select.d.ts +42 -0
  23. package/dist/src/core/handoff-select.js +88 -0
  24. package/dist/src/core/handoff-status.d.ts +66 -0
  25. package/dist/src/core/handoff-status.js +198 -0
  26. package/dist/src/core/launch.d.ts +15 -0
  27. package/dist/src/core/launch.js +25 -2
  28. package/dist/src/core/memo-store.d.ts +20 -0
  29. package/dist/src/core/memo-store.js +92 -0
  30. package/dist/src/core/resume.d.ts +7 -2
  31. package/dist/src/core/resume.js +22 -9
  32. package/dist/src/core/tuning-apply.d.ts +63 -0
  33. package/dist/src/core/tuning-apply.js +264 -0
  34. package/dist/src/core/tuning.d.ts +113 -0
  35. package/dist/src/core/tuning.js +192 -0
  36. package/dist/src/families/claude/brief.d.ts +5 -0
  37. package/dist/src/families/claude/brief.js +63 -0
  38. package/dist/src/families/claude/handoff-hook.d.ts +2 -0
  39. package/dist/src/families/claude/handoff-hook.js +31 -0
  40. package/dist/src/families/claude/handoff.d.ts +5 -0
  41. package/dist/src/families/claude/handoff.js +115 -0
  42. package/dist/src/families/claude/index.js +8 -1
  43. package/dist/src/families/claude/tuning.d.ts +22 -0
  44. package/dist/src/families/claude/tuning.js +203 -0
  45. package/dist/src/families/claude/usage.d.ts +1 -0
  46. package/dist/src/families/claude/usage.js +2 -2
  47. package/dist/src/families/codex/brief.d.ts +5 -0
  48. package/dist/src/families/codex/brief.js +49 -0
  49. package/dist/src/families/codex/handoff-hook.d.ts +2 -0
  50. package/dist/src/families/codex/handoff-hook.js +16 -0
  51. package/dist/src/families/codex/handoff.d.ts +5 -0
  52. package/dist/src/families/codex/handoff.js +121 -0
  53. package/dist/src/families/codex/index.js +4 -0
  54. package/dist/src/families/codex/rate-limits.d.ts +16 -0
  55. package/dist/src/families/codex/rate-limits.js +92 -0
  56. package/dist/src/families/codex/rollout.d.ts +1 -2
  57. package/dist/src/families/codex/rollout.js +4 -48
  58. package/dist/src/families/codex/tuning.d.ts +16 -0
  59. package/dist/src/families/codex/tuning.js +145 -0
  60. package/dist/src/families/grok/brief.d.ts +5 -0
  61. package/dist/src/families/grok/brief.js +74 -0
  62. package/dist/src/families/grok/handoff-hook.d.ts +4 -0
  63. package/dist/src/families/grok/handoff-hook.js +26 -0
  64. package/dist/src/families/grok/handoff.d.ts +47 -0
  65. package/dist/src/families/grok/handoff.js +219 -0
  66. package/dist/src/families/grok/index.js +2 -0
  67. package/dist/src/families/pi/handoff.d.ts +2 -0
  68. package/dist/src/families/pi/handoff.js +13 -0
  69. package/dist/src/families/pi/index.js +2 -0
  70. package/dist/src/families/shared/brief.d.ts +24 -0
  71. package/dist/src/families/shared/brief.js +42 -0
  72. package/dist/src/families/shared/handoff-args.d.ts +18 -0
  73. package/dist/src/families/shared/handoff-args.js +57 -0
  74. package/dist/src/families/shared/sessions.d.ts +4 -0
  75. package/dist/src/families/shared/sessions.js +19 -0
  76. package/dist/src/families/shared/toml.d.ts +5 -0
  77. package/dist/src/families/shared/toml.js +30 -0
  78. package/dist/src/handoff/hook.d.ts +16 -0
  79. package/dist/src/handoff/hook.js +166 -0
  80. package/dist/src/handoff/messages.d.ts +7 -0
  81. package/dist/src/handoff/messages.js +27 -0
  82. package/dist/src/handoff/reader.d.ts +11 -0
  83. package/dist/src/handoff/reader.js +9 -0
  84. package/dist/src/panel/handler.d.ts +6 -0
  85. package/dist/src/panel/handler.js +110 -0
  86. package/dist/src/panel/i18n.d.ts +98 -0
  87. package/dist/src/panel/i18n.js +196 -0
  88. package/dist/src/panel/page-logic.d.ts +49 -0
  89. package/dist/src/panel/page-logic.js +67 -0
  90. package/dist/src/panel/page-script.js +461 -4
  91. package/dist/src/panel/page-styles.js +28 -2
  92. package/dist/src/panel/page.js +4 -1
  93. package/dist/src/quota/claude-statusline.js +4 -7
  94. package/dist/src/runtime.d.ts +40 -3
  95. package/dist/src/runtime.js +212 -41
  96. package/dist/src/types.d.ts +93 -0
  97. package/dist/testing/index.d.ts +5 -0
  98. package/dist/testing/index.js +1 -0
  99. package/package.json +16 -4
  100. package/schemas/config.json +73 -0
  101. package/schemas/families.json +5 -1
  102. package/schemas/handoff-disable.json +106 -0
  103. package/schemas/handoff-enable.json +106 -0
  104. package/schemas/handoff-ready.json +23 -0
  105. package/schemas/handoff-setup.json +60 -0
  106. package/schemas/handoff-status.json +137 -0
  107. package/schemas/handoff-teardown.json +30 -0
  108. package/schemas/list.json +5 -1
  109. package/schemas/tune-change.json +126 -0
  110. package/schemas/tune.json +243 -0
  111. package/skills/sideby/SKILL.md +5 -3
  112. package/skills/sideby/references/badge.md +1 -1
  113. package/skills/sideby/references/diagnose.md +4 -0
  114. package/skills/sideby/references/handoff.md +24 -2
  115. package/README.zh-CN.md +0 -112
package/package.json CHANGED
@@ -1,17 +1,25 @@
1
1
  {
2
2
  "name": "sideby",
3
- "version": "0.3.0",
4
- "description": "Run every AI coding account side by side: Claude Code, Codex, Grok and pi, with one shared config and a quota panel.",
3
+ "version": "0.4.1",
4
+ "description": "Run work, personal and API-key accounts at the same time, without their configs drifting apart.",
5
5
  "license": "MIT",
6
+ "author": "Adonis0123 (https://github.com/Adonis0123)",
6
7
  "type": "module",
7
8
  "keywords": [
8
9
  "claude-code",
9
10
  "codex",
11
+ "codex-cli",
10
12
  "grok",
13
+ "grokbuild",
11
14
  "pi",
12
15
  "multi-account",
16
+ "account-manager",
17
+ "rate-limits",
18
+ "usage-monitor",
13
19
  "ai-coding",
20
+ "developer-tools",
14
21
  "cli",
22
+ "anthropic",
15
23
  "quota"
16
24
  ],
17
25
  "repository": {
@@ -54,7 +62,9 @@
54
62
  "schemas": "node src/cli/schemas.ts",
55
63
  "leak-check": "sh scripts/leak-check.sh",
56
64
  "check": "pnpm typecheck && pnpm lint && pnpm test && pnpm leak-check",
57
- "version": "node scripts/sync-skill-version.ts && git add skills/sideby/SKILL.md"
65
+ "version": "node scripts/sync-skill-version.ts && git add skills/sideby/SKILL.md",
66
+ "prepublishOnly": "node scripts/pin-english-npm-readme.ts",
67
+ "postpublish": "node scripts/pin-english-npm-readme.ts --restore"
58
68
  },
59
69
  "dependencies": {
60
70
  "typebox": "^1.3.34"
@@ -64,5 +74,7 @@
64
74
  "@types/node": "^22.18.0",
65
75
  "typescript": "^7.0.2"
66
76
  },
67
- "packageManager": "pnpm@10.15.0"
77
+ "packageManager": "pnpm@10.15.0",
78
+ "readmeFilename": "README.md",
79
+ "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## 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## 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 ui # every account's quota at http://127.0.0.1:17420\n```\n\n`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\n<img alt=\"Two terminals: the personal account and the work account running at the same time, then the local quota panel\" 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\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\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| 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 the panel from the Dock or app menu | `sideby app install` | [Desktop app](docs/guide/panel.md#desktop-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 or a pre-launch check | 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` | no public source | 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 leaves your machine: sideby calls no remote service.\n- `doctor --fix` never replaces a real file and never changes where a link points.\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, desktop app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family or launch hook\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"
68
80
  }
@@ -153,6 +153,79 @@
153
153
  "type": "boolean",
154
154
  "description": "Make `sideby shell-init` also define Host-named functions (`claude`, `codex`, `grok`) that resume a session by id in the Account that holds it. Off by default."
155
155
  },
156
+ "handoff": {
157
+ "type": "object",
158
+ "properties": {
159
+ "auto": {
160
+ "type": "boolean",
161
+ "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."
162
+ },
163
+ "sameFamily": {
164
+ "type": "boolean",
165
+ "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."
166
+ },
167
+ "prepareAt": {
168
+ "type": "integer",
169
+ "minimum": 1,
170
+ "maximum": 100,
171
+ "description": "Quota Pressure at which the session starts keeping a Handoff Brief (default 80)."
172
+ },
173
+ "threshold": {
174
+ "type": "integer",
175
+ "minimum": 1,
176
+ "maximum": 100,
177
+ "description": "Quota Pressure at which the Handoff begins (default 95)."
178
+ },
179
+ "waitIfResetWithinMinutes": {
180
+ "type": "integer",
181
+ "minimum": 0,
182
+ "description": "Stay and wait when the full window resets within this many minutes (default 30; 0 never waits)."
183
+ },
184
+ "countdownSeconds": {
185
+ "type": "integer",
186
+ "minimum": 0,
187
+ "description": "Countdown before the next account starts; Enter cancels (default 10; 0 skips it)."
188
+ },
189
+ "crossOrganization": {
190
+ "type": "array",
191
+ "items": {
192
+ "type": "string"
193
+ },
194
+ "description": "Accounts (ref or short command) that may take over from an account of another organization."
195
+ },
196
+ "families": {
197
+ "type": "object",
198
+ "patternProperties": {
199
+ "^.*$": {
200
+ "type": "object",
201
+ "properties": {
202
+ "policy": {
203
+ "anyOf": [
204
+ {
205
+ "type": "string",
206
+ "const": "pressure"
207
+ },
208
+ {
209
+ "type": "string",
210
+ "const": "order"
211
+ }
212
+ ]
213
+ },
214
+ "order": {
215
+ "type": "array",
216
+ "items": {
217
+ "type": "string"
218
+ }
219
+ }
220
+ },
221
+ "additionalProperties": false
222
+ }
223
+ },
224
+ "description": "Handoff Order per family the session starts in: `pressure` (default) or an `order` list."
225
+ }
226
+ },
227
+ "additionalProperties": false
228
+ },
156
229
  "shellInitFile": {
157
230
  "type": "object",
158
231
  "properties": {
@@ -23,7 +23,8 @@
23
23
  "bin",
24
24
  "installUrl",
25
25
  "installed",
26
- "plugin"
26
+ "plugin",
27
+ "tuning"
27
28
  ],
28
29
  "properties": {
29
30
  "id": {
@@ -43,6 +44,9 @@
43
44
  },
44
45
  "plugin": {
45
46
  "type": "string"
47
+ },
48
+ "tuning": {
49
+ "type": "boolean"
46
50
  }
47
51
  }
48
52
  },
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/handoff-disable.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "applied",
8
+ "file",
9
+ "diff",
10
+ "settings",
11
+ "nextSteps"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "number",
16
+ "const": 1
17
+ },
18
+ "applied": {
19
+ "type": "boolean"
20
+ },
21
+ "file": {
22
+ "type": "string"
23
+ },
24
+ "diff": {
25
+ "type": "string"
26
+ },
27
+ "settings": {
28
+ "type": "object",
29
+ "required": [
30
+ "auto",
31
+ "sameFamily",
32
+ "prepareAt",
33
+ "threshold",
34
+ "waitIfResetWithinMinutes",
35
+ "countdownSeconds",
36
+ "crossOrganization",
37
+ "families"
38
+ ],
39
+ "properties": {
40
+ "auto": {
41
+ "type": "boolean"
42
+ },
43
+ "sameFamily": {
44
+ "type": "boolean"
45
+ },
46
+ "prepareAt": {
47
+ "type": "number"
48
+ },
49
+ "threshold": {
50
+ "type": "number"
51
+ },
52
+ "waitIfResetWithinMinutes": {
53
+ "type": "number"
54
+ },
55
+ "countdownSeconds": {
56
+ "type": "number"
57
+ },
58
+ "crossOrganization": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "families": {
65
+ "type": "object",
66
+ "patternProperties": {
67
+ "^.*$": {
68
+ "type": "object",
69
+ "required": [
70
+ "policy",
71
+ "order"
72
+ ],
73
+ "properties": {
74
+ "policy": {
75
+ "anyOf": [
76
+ {
77
+ "type": "string",
78
+ "const": "pressure"
79
+ },
80
+ {
81
+ "type": "string",
82
+ "const": "order"
83
+ }
84
+ ]
85
+ },
86
+ "order": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "nextSteps": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "string"
102
+ }
103
+ }
104
+ },
105
+ "title": "sideby handoff disable --json"
106
+ }
@@ -0,0 +1,106 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/handoff-enable.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "applied",
8
+ "file",
9
+ "diff",
10
+ "settings",
11
+ "nextSteps"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "number",
16
+ "const": 1
17
+ },
18
+ "applied": {
19
+ "type": "boolean"
20
+ },
21
+ "file": {
22
+ "type": "string"
23
+ },
24
+ "diff": {
25
+ "type": "string"
26
+ },
27
+ "settings": {
28
+ "type": "object",
29
+ "required": [
30
+ "auto",
31
+ "sameFamily",
32
+ "prepareAt",
33
+ "threshold",
34
+ "waitIfResetWithinMinutes",
35
+ "countdownSeconds",
36
+ "crossOrganization",
37
+ "families"
38
+ ],
39
+ "properties": {
40
+ "auto": {
41
+ "type": "boolean"
42
+ },
43
+ "sameFamily": {
44
+ "type": "boolean"
45
+ },
46
+ "prepareAt": {
47
+ "type": "number"
48
+ },
49
+ "threshold": {
50
+ "type": "number"
51
+ },
52
+ "waitIfResetWithinMinutes": {
53
+ "type": "number"
54
+ },
55
+ "countdownSeconds": {
56
+ "type": "number"
57
+ },
58
+ "crossOrganization": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "families": {
65
+ "type": "object",
66
+ "patternProperties": {
67
+ "^.*$": {
68
+ "type": "object",
69
+ "required": [
70
+ "policy",
71
+ "order"
72
+ ],
73
+ "properties": {
74
+ "policy": {
75
+ "anyOf": [
76
+ {
77
+ "type": "string",
78
+ "const": "pressure"
79
+ },
80
+ {
81
+ "type": "string",
82
+ "const": "order"
83
+ }
84
+ ]
85
+ },
86
+ "order": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ },
98
+ "nextSteps": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "string"
102
+ }
103
+ }
104
+ },
105
+ "title": "sideby handoff enable --json"
106
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/handoff-ready.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "requested"
8
+ ],
9
+ "properties": {
10
+ "schemaVersion": {
11
+ "type": "number",
12
+ "const": 1
13
+ },
14
+ "requested": {
15
+ "type": "boolean",
16
+ "const": true
17
+ },
18
+ "brief": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "title": "sideby handoff ready --json"
23
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/handoff-setup.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "family",
8
+ "applied",
9
+ "plan"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "type": "number",
14
+ "const": 1
15
+ },
16
+ "family": {
17
+ "type": "string"
18
+ },
19
+ "applied": {
20
+ "type": "boolean"
21
+ },
22
+ "plan": {
23
+ "type": "object",
24
+ "required": [
25
+ "status",
26
+ "file",
27
+ "diff",
28
+ "message"
29
+ ],
30
+ "properties": {
31
+ "status": {
32
+ "anyOf": [
33
+ {
34
+ "type": "string",
35
+ "const": "enabled"
36
+ },
37
+ {
38
+ "type": "string",
39
+ "const": "ready"
40
+ },
41
+ {
42
+ "type": "string",
43
+ "const": "blocked"
44
+ }
45
+ ]
46
+ },
47
+ "file": {
48
+ "type": "string"
49
+ },
50
+ "diff": {
51
+ "type": "string"
52
+ },
53
+ "message": {
54
+ "type": "string"
55
+ }
56
+ }
57
+ }
58
+ },
59
+ "title": "sideby handoff setup --json"
60
+ }
@@ -0,0 +1,137 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/handoff-status.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "auto",
8
+ "sameFamily",
9
+ "prepareAt",
10
+ "threshold",
11
+ "sideby",
12
+ "families",
13
+ "nextSteps"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "type": "number",
18
+ "const": 1
19
+ },
20
+ "auto": {
21
+ "type": "boolean"
22
+ },
23
+ "sameFamily": {
24
+ "type": "boolean"
25
+ },
26
+ "prepareAt": {
27
+ "type": "number"
28
+ },
29
+ "threshold": {
30
+ "type": "number"
31
+ },
32
+ "sideby": {
33
+ "type": "object",
34
+ "required": [
35
+ "ok"
36
+ ],
37
+ "properties": {
38
+ "ok": {
39
+ "type": "boolean"
40
+ },
41
+ "problem": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "families": {
47
+ "type": "array",
48
+ "items": {
49
+ "type": "object",
50
+ "required": [
51
+ "family",
52
+ "starts",
53
+ "ready",
54
+ "problems",
55
+ "notes",
56
+ "order"
57
+ ],
58
+ "properties": {
59
+ "family": {
60
+ "type": "string"
61
+ },
62
+ "starts": {
63
+ "type": "array",
64
+ "items": {
65
+ "anyOf": [
66
+ {
67
+ "type": "string",
68
+ "const": "quota"
69
+ },
70
+ {
71
+ "type": "string",
72
+ "const": "limit"
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ "ready": {
78
+ "type": "boolean"
79
+ },
80
+ "problems": {
81
+ "type": "array",
82
+ "items": {
83
+ "type": "string"
84
+ }
85
+ },
86
+ "notes": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string"
90
+ }
91
+ },
92
+ "order": {
93
+ "type": "object",
94
+ "required": [
95
+ "policy",
96
+ "order",
97
+ "unknown"
98
+ ],
99
+ "properties": {
100
+ "policy": {
101
+ "anyOf": [
102
+ {
103
+ "type": "string",
104
+ "const": "pressure"
105
+ },
106
+ {
107
+ "type": "string",
108
+ "const": "order"
109
+ }
110
+ ]
111
+ },
112
+ "order": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "string"
116
+ }
117
+ },
118
+ "unknown": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "string"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "nextSteps": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string"
133
+ }
134
+ }
135
+ },
136
+ "title": "sideby handoff status --json"
137
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/handoff-teardown.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "family",
8
+ "ok",
9
+ "message"
10
+ ],
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "type": "number",
14
+ "const": 1
15
+ },
16
+ "family": {
17
+ "type": "string"
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "message": {
23
+ "type": "string"
24
+ },
25
+ "diff": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "title": "sideby handoff teardown --json"
30
+ }
package/schemas/list.json CHANGED
@@ -23,7 +23,8 @@
23
23
  "bin",
24
24
  "installUrl",
25
25
  "installed",
26
- "plugin"
26
+ "plugin",
27
+ "tuning"
27
28
  ],
28
29
  "properties": {
29
30
  "id": {
@@ -43,6 +44,9 @@
43
44
  },
44
45
  "plugin": {
45
46
  "type": "string"
47
+ },
48
+ "tuning": {
49
+ "type": "boolean"
46
50
  }
47
51
  }
48
52
  }