sideby 0.12.1 → 0.13.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.
- package/README.md +1 -1
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +5 -2
- package/dist/src/cli/commands.js +165 -20
- package/dist/src/cli/json-schemas.js +100 -2
- package/dist/src/cli/main.js +72 -4
- package/dist/src/core/brand-mark.d.ts +5 -7
- package/dist/src/core/brand-mark.js +18 -5
- package/dist/src/core/browser-profiles.d.ts +71 -0
- package/dist/src/core/browser-profiles.js +361 -0
- package/dist/src/core/config.d.ts +15 -0
- package/dist/src/core/config.js +13 -1
- package/dist/src/core/create.js +2 -1
- package/dist/src/core/desktop-app.d.ts +3 -1
- package/dist/src/core/desktop-app.js +29 -8
- package/dist/src/core/launch.d.ts +7 -0
- package/dist/src/core/launch.js +22 -2
- package/dist/src/core/leveldb-keys.d.ts +14 -0
- package/dist/src/core/leveldb-keys.js +291 -0
- package/dist/src/core/remote-control.d.ts +17 -6
- package/dist/src/core/remote-control.js +40 -17
- package/dist/src/core/skill-check.d.ts +13 -0
- package/dist/src/core/skill-check.js +29 -1
- package/dist/src/core/update.d.ts +55 -3
- package/dist/src/core/update.js +124 -4
- package/dist/src/core/version.d.ts +11 -0
- package/dist/src/core/version.js +26 -0
- package/dist/src/desktop/app.d.ts +2 -0
- package/dist/src/desktop/app.js +39 -3
- package/dist/src/families/browser.d.ts +20 -0
- package/dist/src/families/browser.js +23 -0
- package/dist/src/families/claude/browser.d.ts +3 -0
- package/dist/src/families/claude/browser.js +14 -0
- package/dist/src/families/claude/desktop.js +1 -0
- package/dist/src/families/codex/browser.d.ts +7 -0
- package/dist/src/families/codex/browser.js +26 -0
- package/dist/src/families/desktop.d.ts +5 -1
- package/dist/src/families/pi/index.js +2 -0
- package/dist/src/panel/handler.d.ts +9 -1
- package/dist/src/panel/handler.js +54 -6
- package/dist/src/panel/i18n.d.ts +74 -4
- package/dist/src/panel/i18n.js +160 -20
- package/dist/src/panel/page-logic.d.ts +23 -0
- package/dist/src/panel/page-logic.js +44 -0
- package/dist/src/panel/page-script.js +587 -183
- package/dist/src/panel/page-styles.js +61 -18
- package/dist/src/panel/page.d.ts +5 -0
- package/dist/src/panel/page.js +10 -9
- package/dist/src/runtime.d.ts +6 -1
- package/dist/src/runtime.js +22 -11
- package/dist/src/types.d.ts +2 -0
- package/package.json +5 -3
- package/schemas/alias.json +62 -0
- package/schemas/app-install.json +62 -0
- package/schemas/app-uninstall.json +62 -0
- package/schemas/browser-open.json +109 -0
- package/schemas/browser-switch.json +104 -0
- package/schemas/browser.json +161 -0
- package/schemas/config.json +11 -0
- package/schemas/desktop-remove.json +62 -0
- package/schemas/desktop.json +62 -0
- package/schemas/doctor.json +62 -0
- package/schemas/error.json +62 -0
- package/schemas/families.json +68 -0
- package/schemas/handoff-disable.json +62 -0
- package/schemas/handoff-enable.json +62 -0
- package/schemas/handoff-ready.json +62 -0
- package/schemas/handoff-setup.json +62 -0
- package/schemas/handoff-status.json +62 -0
- package/schemas/handoff-teardown.json +62 -0
- package/schemas/list.json +68 -0
- package/schemas/model.json +62 -0
- package/schemas/new.json +62 -0
- package/schemas/next.json +62 -0
- package/schemas/plugins.json +62 -0
- package/schemas/quota-setup.json +62 -0
- package/schemas/quota-teardown.json +62 -0
- package/schemas/quota.json +62 -0
- package/schemas/remote-control.json +66 -0
- package/schemas/tune-change.json +62 -0
- package/schemas/tune.json +62 -0
- package/schemas/update.json +111 -1
- package/skills/sideby/SKILL.md +8 -4
- package/skills/sideby/references/diagnose.md +1 -1
- package/skills/sideby/references/setup.md +1 -1
- package/skills/sideby/references/update.md +16 -0
package/schemas/update.json
CHANGED
|
@@ -102,13 +102,123 @@
|
|
|
102
102
|
"type": "boolean",
|
|
103
103
|
"description": "A background Panel was running and starts again with the new version."
|
|
104
104
|
},
|
|
105
|
+
"refreshedApp": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"description": "The desktop app (`sideby app install`) was installed and was written again by the new version."
|
|
108
|
+
},
|
|
105
109
|
"skill": {
|
|
106
110
|
"type": "string",
|
|
107
|
-
"description": "The command that
|
|
111
|
+
"description": "The command that installs the sideby skill by hand."
|
|
112
|
+
},
|
|
113
|
+
"skillUpdate": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"required": [
|
|
116
|
+
"installed",
|
|
117
|
+
"outdated",
|
|
118
|
+
"command",
|
|
119
|
+
"canRun"
|
|
120
|
+
],
|
|
121
|
+
"properties": {
|
|
122
|
+
"installed": {
|
|
123
|
+
"type": "array",
|
|
124
|
+
"items": {
|
|
125
|
+
"anyOf": [
|
|
126
|
+
{
|
|
127
|
+
"type": "string"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "null"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"description": "Versions of the installed sideby skills; null for one without a version."
|
|
135
|
+
},
|
|
136
|
+
"outdated": {
|
|
137
|
+
"type": "boolean",
|
|
138
|
+
"description": "Some installed skill is for another version than sideby will run."
|
|
139
|
+
},
|
|
140
|
+
"command": {
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"canRun": {
|
|
144
|
+
"type": "boolean",
|
|
145
|
+
"description": "False when sideby leaves the skill alone (see reason): give the user command."
|
|
146
|
+
},
|
|
147
|
+
"reason": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"description": "The installed sideby skill, which the Update brings along; absent when none is installed."
|
|
152
|
+
},
|
|
153
|
+
"skillUpdated": {
|
|
154
|
+
"type": "boolean",
|
|
155
|
+
"description": "The skill was updated too (true) or that failed (false); absent when not tried."
|
|
108
156
|
},
|
|
109
157
|
"output": {
|
|
110
158
|
"type": "string",
|
|
111
159
|
"description": "What the failed install command printed."
|
|
160
|
+
},
|
|
161
|
+
"_notice": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"update": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"required": [
|
|
167
|
+
"current",
|
|
168
|
+
"latest",
|
|
169
|
+
"command",
|
|
170
|
+
"message"
|
|
171
|
+
],
|
|
172
|
+
"properties": {
|
|
173
|
+
"current": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"latest": {
|
|
177
|
+
"type": "string"
|
|
178
|
+
},
|
|
179
|
+
"command": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
|
|
182
|
+
},
|
|
183
|
+
"message": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"skill": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"required": [
|
|
191
|
+
"installed",
|
|
192
|
+
"current",
|
|
193
|
+
"command",
|
|
194
|
+
"message"
|
|
195
|
+
],
|
|
196
|
+
"properties": {
|
|
197
|
+
"installed": {
|
|
198
|
+
"anyOf": [
|
|
199
|
+
{
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"type": "null"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"description": "The skill's version; null when it has none."
|
|
207
|
+
},
|
|
208
|
+
"current": {
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"command": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "Updates the installed sideby skill (run it after the user agrees)."
|
|
214
|
+
},
|
|
215
|
+
"message": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"description": "Not the answer to the task: mention it briefly afterwards and offer to update."
|
|
112
222
|
}
|
|
113
223
|
},
|
|
114
224
|
"title": "sideby update --json"
|
package/skills/sideby/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: sideby
|
|
3
3
|
description: Use when the user runs, or wants to run, several AI coding accounts (Claude Code, Codex, Grok Build, pi) side by side. Covers installing sideby and setting up a new account ("install sideby", "set up another Claude account", "add cc008", "配置一个 cc00x", "再加一个 Codex 账号"), explaining what accounts share and what stays separate ("what do my accounts share?", "这些账号共享了什么"), showing which account a session is ("show [cc001] in the status line", "加上账号标识"), seeing accounts, quota and usage, moving on when one hits its 5-hour or weekly limit, moving the current task to another account ("用 cc008 继续", "交回 cc008"), adding a short command (alias), and repairing drifted account directories (skills, hooks, rules or settings not shared, wrong symlinks, credential file permissions). Drives the `sideby` CLI with `--json`; the agent does every step except browser sign-in, filling in secrets and starting interactive sessions, which it hands to the user as one command (inside an Auto Handoff session, `sideby handoff ready --to` moves the task itself).
|
|
4
4
|
metadata:
|
|
5
|
-
version: "0.
|
|
5
|
+
version: "0.13.1"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -29,6 +29,7 @@ Do every step you can yourself. Only browser sign-in, secrets and interactive se
|
|
|
29
29
|
- Every `--json` output has `schemaVersion: 1`. On an error it is `{ "schemaVersion": 1, "error": "<what to do next>", "code": "<reason>" }`; `code` is `usage` for a malformed command line.
|
|
30
30
|
- Exit codes: `0` done, `1` failed or found a `fail` problem, `2` malformed command line, `10` **needs the user's confirmation**. `run`, `next` and `login` return the Host's own exit code once it starts.
|
|
31
31
|
- On `10`: show the user the change the command printed, ask, and only after a clear yes run the same command again with `--yes` added. Never add `--yes` on your own.
|
|
32
|
+
- `_notice` on any `--json` output: a newer sideby (`_notice.update`) or an installed sideby skill for another version (`_notice.skill`). It is not the answer to the task: finish the task first, then mention it in one line and offer to update, following `references/update.md`.
|
|
32
33
|
|
|
33
34
|
## What do you want to do
|
|
34
35
|
|
|
@@ -46,8 +47,9 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
46
47
|
| Create an account with a given name, an API account, or a short command | `sideby new`, `sideby alias add` | `references/accounts.md` |
|
|
47
48
|
| Tune the auto-compact threshold ("which compaction setting costs the fewest tokens"), use the suggestion or undo it | `sideby tune --json`, `sideby tune apply` (exit 10 first), `sideby tune undo` | `references/diagnose.md` |
|
|
48
49
|
| See or set the model and effort an account starts with ("用哪个模型", "set effort to high for cc002") | `sideby model <acct> --json`; `sideby model <acct> <model\|default> --effort <level\|default>` (exit 10 first, then `--yes` after the user agrees) | — |
|
|
49
|
-
| Stop Claude sessions from connecting to claude.ai / the Claude app by themselves ("关闭 remote control", "别让别人远程看到对话") for every account | `sideby remote-control --json`, then `sideby remote-control off` (exits 10 with the change; rerun with `--yes` after they agree); `sideby remote-control undo` puts it back | — |
|
|
50
|
+
| Stop Claude sessions from connecting to claude.ai / the Claude app by themselves ("关闭 remote control", "别让别人远程看到对话") for every account | `sideby remote-control --json`, then `sideby remote-control off` (exits 10 with the change; rerun with `--yes` after they agree); `sideby remote-control undo` puts it back; `sideby remote-control on` turns it back on the same way (only when they ask for it) | — |
|
|
50
51
|
| See Claude quota (it shows `not-enabled`) | `sideby quota setup claude` (exits 10) | `references/quota.md` |
|
|
52
|
+
| Update sideby or its skill ("is there a new version", "更新 sideby"), or an output has `_notice` | `sideby update --json` (exits 10 first) | `references/update.md` |
|
|
51
53
|
| See everything at once | `sideby ui` (local panel on `127.0.0.1:17420`; `--no-open` prints the address) | — |
|
|
52
54
|
| Start an account | give them `sideby run <ref> [-- host args]` | — |
|
|
53
55
|
|
|
@@ -63,12 +65,14 @@ To open Claude Desktop or the Codex app as one account (macOS, subscription acco
|
|
|
63
65
|
|
|
64
66
|
Grok Bot is not a grok account's app: it signs in with a Cursor account, apart from Grok Build. For several Grok Bot windows at once, run `sideby desktop grok-bot:<name> --json` (a new name makes a new, signed-out window; `grok-bot` is its default one) and relay the notice: sign in inside the new window with the account meant for it, with the other Grok Bot windows closed. `sideby list --json` lists them under `appProfiles`. Removing one (`--remove --yes`) signs it out and deletes its data: do it only when the user asks, after they quit that window.
|
|
65
67
|
|
|
68
|
+
To find which Chrome browser user the user signed in to an account's website with, or to open claude.ai, chatgpt.com or grok.com there, run `sideby browser --json` and `sideby browser open <ref> --json`. Finding is off until the user agrees: run `sideby browser --enable` to show them what it reads (all on this computer), and add `--yes` only after they say yes. A match may be left over from before a sign-out; say so. Grok accounts need `--profile <name>`.
|
|
69
|
+
|
|
66
70
|
For someone who would rather double-click than use a terminal, `sideby app install` adds a panel app (macOS `~/Applications/sideby.app`, Linux app menu) that runs `sideby ui --background`; `sideby ui --stop` stops it and `sideby app uninstall` removes the app. Ask before `app install`: it writes outside sideby's own directories.
|
|
67
71
|
|
|
68
72
|
## Updating sideby
|
|
69
73
|
|
|
70
|
-
To update sideby, run `sideby update --json` yourself: it shows `current`, `latest`, the `command` and whether sideby can run it (`canRun`; exit 10). Ask the user, then run `sideby update --yes --json`. When `canRun` is false (npx, a project dependency, a source checkout, a global folder they cannot write), hand them the `command` as one line instead. Updating restarts a background panel by itself; a `sideby ui` in a terminal and running sessions keep the old version until restarted. sideby checks the registry once a day on its own and turns that off with `NO_UPDATE_NOTIFIER=1` or config `"update": { "check": false }`; `"update": { "auto": true }` (off by default) installs new non-major versions by itself. Never turn Auto Update on without the user asking.
|
|
74
|
+
To update sideby, run `sideby update --json` yourself: it shows `current`, `latest`, the `command` and whether sideby can run it (`canRun`; exit 10). Ask the user, then run `sideby update --yes --json`. When `canRun` is false (npx, a project dependency, a source checkout, a global folder they cannot write), hand them the `command` as one line instead. Updating restarts a background panel by itself and reinstalls an installed panel app (`refreshedApp`), so do not run `app install` again after an update; a `sideby ui` in a terminal and running sessions keep the old version until restarted. sideby checks the registry once a day on its own and turns that off with `NO_UPDATE_NOTIFIER=1` or config `"update": { "check": false }`; `"update": { "auto": true }` (off by default) installs new non-major versions by itself. Never turn Auto Update on without the user asking.
|
|
71
75
|
|
|
72
76
|
## Keeping this skill current
|
|
73
77
|
|
|
74
|
-
If `sideby doctor --json` reports `skill.outdated`, this skill was written for another sideby version.
|
|
78
|
+
If `sideby doctor --json` reports `skill.outdated`, this skill was written for another sideby version. Offer `sideby update --json` (exit 10, then `--yes` after they agree): it updates the skill, together with sideby when a newer one is out (`references/update.md`).
|
|
@@ -23,7 +23,7 @@ Shared Items the Main Account does not have are skipped: no Finding, not counted
|
|
|
23
23
|
| `fail` `link.dangling` | The link points at nothing | Show the hint (`ls -l <path>`); the user decides how to repair it |
|
|
24
24
|
| `fail` `symlink-forbidden` without `fixable` | The Host needs a real file here, but the link points somewhere other than the Main Account | Show the hint; sideby will not replace a link it did not create |
|
|
25
25
|
| credential item, mode not 600 | `proxy.env`, `auth.json`, `.claude.json` readable by others | `--fix` resets the mode to 600 |
|
|
26
|
-
| `warn` `skill.outdated` (in `general`) | The installed sideby skill is for another sideby version |
|
|
26
|
+
| `warn` `skill.outdated` (in `general`) | The installed sideby skill is for another sideby version | Offer `sideby update` (it updates the skill; see `update.md`) |
|
|
27
27
|
| name looks like a backup (`bak`, `backup`, `old`, `tmp`) | A stray directory was picked up as an account | Suggest adding its ref to `ignore` in `${XDG_CONFIG_HOME:-~/.config}/sideby/config.json` |
|
|
28
28
|
| `login: "not-needed"` (`key` in `sideby list`) | API account; it authenticates with `proxy.env` | Nothing to do |
|
|
29
29
|
| `problems` on an account in `list --json` | A plugin failed while reading it (for example a settings file that is not valid JSON) | Show the message; the account itself still works |
|
|
@@ -4,7 +4,7 @@ For "install sideby", "set up another Claude account", "add cc008", "配置一
|
|
|
4
4
|
|
|
5
5
|
1. **Node and sideby.** `node --version` must be 22.18 or newer; otherwise tell the user to upgrade Node and stop. `sideby --version`; when it is missing, run `npm i -g sideby` (Claude quota and shell functions need the global install, not `npx`).
|
|
6
6
|
2. **This skill.** If it was not installed with `npx skills add Adonis0123/sideby -g`, install it that way so it stays current; `sideby doctor` warns when it is for another version.
|
|
7
|
-
3. **Hosts and accounts.** `sideby list --json`. `families[].installed: false` means that Host CLI
|
|
7
|
+
3. **Hosts and accounts.** `sideby list --json`. `families[].installed: false` means that Host CLI cannot run: give the user its `installCommand` (an official one-line installer, when present) or its `installUrl`, and stop; never install a Host unasked. With `brokenBin` set, the Host is on PATH but broken (often an interrupted upgrade): say so, and reinstalling fixes it. No `<family>:main` in `accounts` means the Host has never run: ask the user to start it once (for example `claude`), because `new` builds on the Main Account.
|
|
8
8
|
4. **What it will share.** `sideby families <family> --json`, then tell the user in a sentence or two (see `sharing.md`): skills, hooks, rules and settings come from the Main Account; sign-in, sessions and history are the new account's own.
|
|
9
9
|
5. **Create.**
|
|
10
10
|
- The user gave no name, or said "cc00x" / "the next one": `sideby new <family> --next --json`. It picks the next number (`008` after `001`…`007`) and, when existing short commands show a pattern (`cc007` for `claude:007`), adds the next one (`cc008`). Read `suggestion`: `aliasProblem` means that short command was taken and left out; tell the user.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Updates and `_notice`
|
|
2
|
+
|
|
3
|
+
Every `--json` output can carry `_notice` (it comes from sideby's daily Update Check and the installed skill, and reads no network itself):
|
|
4
|
+
|
|
5
|
+
- `_notice.update`: `{ current, latest, command: "sideby update", message }`, a newer sideby is out.
|
|
6
|
+
- `_notice.skill`: `{ installed, current, command, message }`, the sideby skill agents read here is for another version (`installed: null` when it has no version), so it may describe commands this CLI does not have.
|
|
7
|
+
|
|
8
|
+
What to do:
|
|
9
|
+
|
|
10
|
+
1. Finish what the user asked first. Do not answer with the notice, and do not stop a task to update.
|
|
11
|
+
2. If the notice is still relevant at the end, say it in one line in the user's language, for example "sideby 0.14.0 is out (you have 0.13.0); want me to update it?", and offer to do it. Say it once per conversation, not after every command.
|
|
12
|
+
3. When they agree:
|
|
13
|
+
- Run `sideby update --json`. It shows the version, the install method and the command it would run, and exits `10`. Show that to the user; after their yes, run `sideby update --yes --json`.
|
|
14
|
+
- If it exits `1` with `canRun: false` (npx, Volta, a project dependency, a source checkout, a Local Build), sideby cannot update itself: give the user the `command` it printed as one line to run.
|
|
15
|
+
- The same command updates the installed sideby skill (`skillUpdate` in the plan, `skillUpdated` in the result), so do not run a skill command yourself. With sideby already current and only the skill old (`_notice.skill`), `sideby update` updates the skill alone, after the same preview. When `skillUpdate.canRun` is false (the skill lives in a git repository), tell the user `reason` and give them `command`. Tell them that sessions already running keep the old version until they start again.
|
|
16
|
+
4. The user can turn notices off with `SIDEBY_NO_UPDATE_NOTIFIER=1` (or config `update.check: false`); set it for one command when a script needs JSON without `_notice`. A Local Build (`pnpm local`) never has one.
|