sideby 0.10.0 → 0.12.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 (53) hide show
  1. package/README.md +24 -18
  2. package/dist/build.json +1 -1
  3. package/dist/src/cli/commands.d.ts +11 -1
  4. package/dist/src/cli/commands.js +144 -7
  5. package/dist/src/cli/json-schemas.js +56 -1
  6. package/dist/src/cli/main.js +119 -48
  7. package/dist/src/core/app-profiles.d.ts +50 -0
  8. package/dist/src/core/app-profiles.js +206 -0
  9. package/dist/src/core/brand-mark.d.ts +83 -0
  10. package/dist/src/core/brand-mark.js +88 -0
  11. package/dist/src/core/config.d.ts +16 -0
  12. package/dist/src/core/config.js +17 -2
  13. package/dist/src/core/desktop-app.d.ts +18 -1
  14. package/dist/src/core/desktop-app.js +22 -12
  15. package/dist/src/core/handoff-chain.d.ts +16 -2
  16. package/dist/src/core/handoff-chain.js +19 -6
  17. package/dist/src/core/handoff-run.js +43 -18
  18. package/dist/src/core/handoff-select.d.ts +4 -0
  19. package/dist/src/core/handoff-select.js +3 -2
  20. package/dist/src/core/update.d.ts +209 -0
  21. package/dist/src/core/update.js +631 -0
  22. package/dist/src/desktop/icon.js +293 -62
  23. package/dist/src/families/claude/handoff.js +10 -0
  24. package/dist/src/families/desktop.d.ts +25 -0
  25. package/dist/src/families/desktop.js +8 -2
  26. package/dist/src/families/grok/bot.d.ts +8 -0
  27. package/dist/src/families/grok/bot.js +18 -0
  28. package/dist/src/handoff/hook.js +21 -4
  29. package/dist/src/handoff/messages.d.ts +4 -0
  30. package/dist/src/handoff/messages.js +12 -0
  31. package/dist/src/panel/background.d.ts +2 -0
  32. package/dist/src/panel/background.js +7 -0
  33. package/dist/src/panel/handler.d.ts +35 -0
  34. package/dist/src/panel/handler.js +132 -6
  35. package/dist/src/panel/i18n.d.ts +59 -0
  36. package/dist/src/panel/i18n.js +118 -0
  37. package/dist/src/panel/page-script.js +282 -6
  38. package/dist/src/panel/page-styles.js +21 -2
  39. package/dist/src/panel/page.d.ts +2 -0
  40. package/dist/src/panel/page.js +6 -3
  41. package/dist/src/runtime.d.ts +3 -1
  42. package/dist/src/runtime.js +7 -0
  43. package/dist/src/types.d.ts +5 -0
  44. package/dist/testing/index.js +2 -0
  45. package/package.json +2 -2
  46. package/schemas/config.json +15 -0
  47. package/schemas/desktop-remove.json +33 -0
  48. package/schemas/desktop.json +2 -1
  49. package/schemas/handoff-ready.json +4 -0
  50. package/schemas/list.json +47 -0
  51. package/schemas/update.json +115 -0
  52. package/skills/sideby/SKILL.md +7 -1
  53. package/skills/sideby/references/handoff.md +1 -1
@@ -226,6 +226,21 @@
226
226
  },
227
227
  "additionalProperties": false
228
228
  },
229
+ "update": {
230
+ "type": "object",
231
+ "properties": {
232
+ "check": {
233
+ "type": "boolean",
234
+ "description": "Ask the npm registry once a day whether a newer sideby exists, and say so after a command and in the Panel. On by default; `NO_UPDATE_NOTIFIER` or `SIDEBY_NO_UPDATE_NOTIFIER` also turn it off."
235
+ },
236
+ "auto": {
237
+ "type": "boolean",
238
+ "description": "Install a newer version by itself after a check, when no `sideby run` is running and the version is not a major one. Off by default."
239
+ }
240
+ },
241
+ "additionalProperties": false,
242
+ "description": "Update Check and Auto Update (ADR-0021)."
243
+ },
229
244
  "shellInitFile": {
230
245
  "type": "object",
231
246
  "properties": {
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/desktop-remove.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "ref",
8
+ "app",
9
+ "appData",
10
+ "removed"
11
+ ],
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "type": "number",
15
+ "const": 1
16
+ },
17
+ "ref": {
18
+ "type": "string"
19
+ },
20
+ "app": {
21
+ "type": "string"
22
+ },
23
+ "appData": {
24
+ "type": "string",
25
+ "description": "The folder that is (or would be) deleted."
26
+ },
27
+ "removed": {
28
+ "type": "boolean",
29
+ "description": "False when only the plan was shown; run again with --yes (exit 10)."
30
+ }
31
+ },
32
+ "title": "sideby desktop grok-bot:<name> --remove --json"
33
+ }
@@ -22,7 +22,8 @@
22
22
  "type": "string"
23
23
  },
24
24
  "family": {
25
- "type": "string"
25
+ "type": "string",
26
+ "description": "The family, or `grok-bot` for a Grok Bot window."
26
27
  },
27
28
  "app": {
28
29
  "type": "string",
@@ -20,6 +20,10 @@
20
20
  },
21
21
  "brief": {
22
22
  "type": "string"
23
+ },
24
+ "now": {
25
+ "type": "boolean",
26
+ "const": true
23
27
  }
24
28
  },
25
29
  "title": "sideby handoff ready --json"
package/schemas/list.json CHANGED
@@ -185,6 +185,53 @@
185
185
  ]
186
186
  }
187
187
  },
188
+ "appProfiles": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "object",
192
+ "required": [
193
+ "ref",
194
+ "app",
195
+ "name",
196
+ "isMain",
197
+ "installed",
198
+ "running"
199
+ ],
200
+ "properties": {
201
+ "ref": {
202
+ "type": "string",
203
+ "description": "`grok-bot:<name>`; `grok-bot:main` is the app's own default data."
204
+ },
205
+ "app": {
206
+ "type": "string",
207
+ "description": "The app, for example `Grok Bot`."
208
+ },
209
+ "name": {
210
+ "type": "string"
211
+ },
212
+ "isMain": {
213
+ "type": "boolean"
214
+ },
215
+ "appData": {
216
+ "type": "string",
217
+ "description": "This window's data folder; absent for the main one, which uses the app's default."
218
+ },
219
+ "installed": {
220
+ "type": "boolean"
221
+ },
222
+ "running": {
223
+ "type": "boolean",
224
+ "description": "This window's own instance runs now."
225
+ },
226
+ "signedIn": {
227
+ "type": "boolean",
228
+ "description": "What the app last wrote about its sign-in (it keeps the last value after the app quits); absent when unknown. Which account is signed in is not known."
229
+ }
230
+ },
231
+ "description": "A window of a desktop app that signs in apart from every account (Grok Bot, ADR-0019). Open or create one with `sideby desktop grok-bot:<name>`."
232
+ },
233
+ "description": "Grok Bot windows (macOS, when Grok Bot is installed or has windows), the main one first. Not accounts."
234
+ },
188
235
  "pluginErrors": {
189
236
  "type": "array",
190
237
  "items": {
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/update.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "current",
8
+ "latest",
9
+ "available",
10
+ "method",
11
+ "command",
12
+ "canRun",
13
+ "releaseNotes",
14
+ "updated"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": {
18
+ "type": "number",
19
+ "const": 1
20
+ },
21
+ "current": {
22
+ "type": "string",
23
+ "description": "The running sideby version."
24
+ },
25
+ "latest": {
26
+ "type": "string",
27
+ "description": "The `latest` version on the npm registry."
28
+ },
29
+ "available": {
30
+ "type": "boolean",
31
+ "description": "`latest` is newer than `current`."
32
+ },
33
+ "method": {
34
+ "type": "object",
35
+ "required": [
36
+ "kind",
37
+ "canUpdate"
38
+ ],
39
+ "properties": {
40
+ "kind": {
41
+ "anyOf": [
42
+ {
43
+ "type": "string",
44
+ "const": "npm"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "pnpm"
49
+ },
50
+ {
51
+ "type": "string",
52
+ "const": "bun"
53
+ },
54
+ {
55
+ "type": "string",
56
+ "const": "volta"
57
+ },
58
+ {
59
+ "type": "string",
60
+ "const": "npx"
61
+ },
62
+ {
63
+ "type": "string",
64
+ "const": "project"
65
+ },
66
+ {
67
+ "type": "string",
68
+ "const": "source"
69
+ }
70
+ ],
71
+ "description": "How this copy was installed."
72
+ },
73
+ "canUpdate": {
74
+ "type": "boolean",
75
+ "description": "sideby can run the Update itself."
76
+ },
77
+ "reason": {
78
+ "type": "string",
79
+ "description": "Why it cannot."
80
+ }
81
+ }
82
+ },
83
+ "command": {
84
+ "type": "string",
85
+ "description": "What an Update runs, or what to run by hand when `canRun` is false."
86
+ },
87
+ "canRun": {
88
+ "type": "boolean"
89
+ },
90
+ "releaseNotes": {
91
+ "type": "string",
92
+ "description": "The release notes of `latest`."
93
+ },
94
+ "updated": {
95
+ "type": "boolean",
96
+ "description": "False when only the plan was shown (exit 10 with --yes still to add) or nothing to do."
97
+ },
98
+ "message": {
99
+ "type": "string"
100
+ },
101
+ "restartedPanel": {
102
+ "type": "boolean",
103
+ "description": "A background Panel was running and starts again with the new version."
104
+ },
105
+ "skill": {
106
+ "type": "string",
107
+ "description": "The command that updates the sideby skill; sideby never runs it."
108
+ },
109
+ "output": {
110
+ "type": "string",
111
+ "description": "What the failed install command printed."
112
+ }
113
+ },
114
+ "title": "sideby update --json"
115
+ }
@@ -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.10.0"
5
+ version: "0.12.0"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help
@@ -61,8 +61,14 @@ When a terminal manager such as Orca reopens a pane with a bare `claude --resume
61
61
 
62
62
  To open Claude Desktop or the Codex app as one account (macOS, subscription accounts), run `sideby desktop <ref> --json` yourself: it opens a new window for that account, or brings its open window to the front, and never closes anything. Relay its `notices`: the first Claude Desktop sign-in should happen while other Claude Desktop windows are closed, and a sign-in screen that suggests the main account ("Welcome back" in the Codex app) must not be used for another account.
63
63
 
64
+ 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
+
64
66
  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.
65
67
 
68
+ ## Updating sideby
69
+
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.
71
+
66
72
  ## Keeping this skill current
67
73
 
68
74
  If `sideby doctor --json` reports `skill.outdated`, this skill was written for another sideby version. Tell the user to update it with `npx skills add Adonis0123/sideby -g`.
@@ -41,7 +41,7 @@ With config `"handoff": { "auto": true }`, a session sideby started hands its ta
41
41
 
42
42
  - When sideby tells you the quota is at 80%, write the handoff brief at the path it names and keep it current (do not tell the user that another account will take over; sideby decides that and says so itself): the goal, what is done, the remaining steps, key decisions and why, the files that matter. Reference specs, ADRs, commits and diffs by path; list the skills the next agent should use; never include keys, passwords or personal data.
43
43
  - When it says the quota is at 95%, finish the current step, update the brief, and end your turn. sideby starts the next account from it.
44
- - When the user asks to hand over now, update the brief, run `sideby handoff ready` (add `--brief <file>` when the user's own handoff tool wrote one), and end your turn. Tell the user the account it prints, not what `sideby next` says: the chain never goes back to an account it already used. When the user names an account ("go back to cc008"), run `sideby handoff ready --to <account>`; it works for an account this chain already used.
44
+ - When the user asks to hand over now, update the brief, run `sideby handoff ready` (add `--brief <file>` when the user's own handoff tool wrote one), and end your turn. Tell the user the account it prints, not what `sideby next` says: the chain never goes back to an account it already used. When the user names an account ("go back to cc008"), run `sideby handoff ready --to <account>`; it works for an account this chain already used. When the quota is about to run out and sideby says the session will wait for the reset, the user can move on at once by typing `! sideby handoff ready` in the session (the model cannot answer at the limit); tell them so if they ask why nothing moved.
45
45
 
46
46
  ### Turning it on for the user
47
47