sideby 0.19.1 → 0.20.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 (159) hide show
  1. package/README.md +7 -4
  2. package/ai-tasks.json +28 -0
  3. package/dist/build.json +1 -1
  4. package/dist/src/cli/commands.d.ts +22 -1
  5. package/dist/src/cli/commands.js +815 -21
  6. package/dist/src/cli/format.d.ts +4 -0
  7. package/dist/src/cli/format.js +42 -4
  8. package/dist/src/cli/json-schemas.js +334 -4
  9. package/dist/src/cli/main.js +159 -13
  10. package/dist/src/core/accounts.d.ts +6 -0
  11. package/dist/src/core/accounts.js +12 -0
  12. package/dist/src/core/autostart.d.ts +11 -0
  13. package/dist/src/core/autostart.js +32 -5
  14. package/dist/src/core/browser-profiles.d.ts +23 -2
  15. package/dist/src/core/browser-profiles.js +148 -37
  16. package/dist/src/core/claude-settings-file.d.ts +18 -0
  17. package/dist/src/core/claude-settings-file.js +52 -3
  18. package/dist/src/core/config.d.ts +5 -0
  19. package/dist/src/core/config.js +12 -1
  20. package/dist/src/core/edit-settings.d.ts +7 -0
  21. package/dist/src/core/edit-settings.js +10 -5
  22. package/dist/src/core/history-group.d.ts +28 -0
  23. package/dist/src/core/history-group.js +47 -0
  24. package/dist/src/core/history-index.d.ts +145 -0
  25. package/dist/src/core/history-index.js +447 -0
  26. package/dist/src/core/history-project.d.ts +13 -0
  27. package/dist/src/core/history-project.js +87 -0
  28. package/dist/src/core/history.d.ts +210 -0
  29. package/dist/src/core/history.js +952 -0
  30. package/dist/src/core/inbound.d.ts +62 -0
  31. package/dist/src/core/inbound.js +215 -0
  32. package/dist/src/core/launch.d.ts +9 -1
  33. package/dist/src/core/launch.js +58 -24
  34. package/dist/src/core/live-sessions-copy.d.ts +5 -0
  35. package/dist/src/core/live-sessions-copy.js +46 -0
  36. package/dist/src/core/live-sessions-procs.d.ts +89 -0
  37. package/dist/src/core/live-sessions-procs.js +296 -0
  38. package/dist/src/core/live-sessions-title.d.ts +28 -0
  39. package/dist/src/core/live-sessions-title.js +80 -0
  40. package/dist/src/core/live-sessions.d.ts +68 -0
  41. package/dist/src/core/live-sessions.js +163 -0
  42. package/dist/src/core/login-check.d.ts +15 -0
  43. package/dist/src/core/login-check.js +32 -0
  44. package/dist/src/core/messages.d.ts +83 -0
  45. package/dist/src/core/messages.js +433 -0
  46. package/dist/src/core/project-categories.d.ts +14 -0
  47. package/dist/src/core/project-categories.js +48 -0
  48. package/dist/src/core/quota-fetch.d.ts +3 -3
  49. package/dist/src/core/quota-fetch.js +5 -5
  50. package/dist/src/core/quota-levels.d.ts +5 -0
  51. package/dist/src/core/quota-levels.js +5 -0
  52. package/dist/src/core/remote-control.d.ts +2 -0
  53. package/dist/src/core/remote-control.js +34 -59
  54. package/dist/src/core/run-link.d.ts +76 -0
  55. package/dist/src/core/run-link.js +245 -0
  56. package/dist/src/core/same-login.d.ts +4 -3
  57. package/dist/src/core/same-login.js +10 -7
  58. package/dist/src/core/session-select.d.ts +31 -0
  59. package/dist/src/core/session-select.js +44 -0
  60. package/dist/src/families/browser.d.ts +7 -18
  61. package/dist/src/families/browser.js +19 -8
  62. package/dist/src/families/claude/deliver.d.ts +2 -0
  63. package/dist/src/families/claude/deliver.js +43 -0
  64. package/dist/src/families/claude/history.d.ts +2 -0
  65. package/dist/src/families/claude/history.js +192 -0
  66. package/dist/src/families/claude/live-sessions.d.ts +13 -0
  67. package/dist/src/families/claude/live-sessions.js +117 -0
  68. package/dist/src/families/claude/messaging.d.ts +69 -0
  69. package/dist/src/families/claude/messaging.js +165 -0
  70. package/dist/src/families/claude/mod.d.ts +26 -0
  71. package/dist/src/families/claude/mod.js +105 -0
  72. package/dist/src/families/claude/session-files.d.ts +21 -0
  73. package/dist/src/families/claude/session-files.js +54 -0
  74. package/dist/src/families/codex/deliver.d.ts +5 -0
  75. package/dist/src/families/codex/deliver.js +76 -0
  76. package/dist/src/families/codex/history.d.ts +7 -0
  77. package/dist/src/families/codex/history.js +174 -0
  78. package/dist/src/families/codex/index.js +2 -0
  79. package/dist/src/families/codex/live-sessions.d.ts +12 -0
  80. package/dist/src/families/codex/live-sessions.js +193 -0
  81. package/dist/src/families/codex/quota.d.ts +3 -0
  82. package/dist/src/families/codex/quota.js +123 -0
  83. package/dist/src/families/codex/rate-limits.js +2 -0
  84. package/dist/src/families/codex/rollout.js +1 -1
  85. package/dist/src/families/grok/browser.d.ts +3 -0
  86. package/dist/src/families/grok/browser.js +5 -0
  87. package/dist/src/families/grok/history.d.ts +2 -0
  88. package/dist/src/families/grok/history.js +157 -0
  89. package/dist/src/families/grok/live-sessions.d.ts +4 -0
  90. package/dist/src/families/grok/live-sessions.js +80 -0
  91. package/dist/src/families/grok/login-key.d.ts +14 -0
  92. package/dist/src/families/grok/login-key.js +37 -0
  93. package/dist/src/families/history.d.ts +20 -0
  94. package/dist/src/families/history.js +81 -0
  95. package/dist/src/families/live-sessions.d.ts +26 -0
  96. package/dist/src/families/live-sessions.js +9 -0
  97. package/dist/src/families/login-keys.js +5 -1
  98. package/dist/src/families/messaging.d.ts +27 -0
  99. package/dist/src/families/messaging.js +6 -0
  100. package/dist/src/families/pi/history.d.ts +2 -0
  101. package/dist/src/families/pi/history.js +124 -0
  102. package/dist/src/families/pi/live-sessions.d.ts +2 -0
  103. package/dist/src/families/pi/live-sessions.js +70 -0
  104. package/dist/src/families/shared/history-text.d.ts +65 -0
  105. package/dist/src/families/shared/history-text.js +261 -0
  106. package/dist/src/menubar/hotkey.d.ts +86 -0
  107. package/dist/src/menubar/hotkey.js +159 -0
  108. package/dist/src/menubar/script.d.ts +2 -0
  109. package/dist/src/menubar/script.js +118 -22
  110. package/dist/src/menubar/snapshot.d.ts +8 -4
  111. package/dist/src/menubar/snapshot.js +45 -13
  112. package/dist/src/menubar/strings.d.ts +24 -6
  113. package/dist/src/menubar/strings.js +24 -6
  114. package/dist/src/panel/handler.d.ts +69 -0
  115. package/dist/src/panel/handler.js +686 -15
  116. package/dist/src/panel/i18n.d.ts +304 -3
  117. package/dist/src/panel/i18n.js +620 -18
  118. package/dist/src/panel/orca.d.ts +48 -0
  119. package/dist/src/panel/orca.js +153 -0
  120. package/dist/src/panel/page-logic.d.ts +255 -13
  121. package/dist/src/panel/page-logic.js +483 -1
  122. package/dist/src/panel/page-script.js +2260 -204
  123. package/dist/src/panel/page-styles.js +404 -32
  124. package/dist/src/panel/page.js +1 -0
  125. package/dist/src/plugins/check.js +16 -4
  126. package/dist/src/plugins/loader.d.ts +8 -1
  127. package/dist/src/plugins/loader.js +72 -7
  128. package/dist/src/runtime.d.ts +5 -0
  129. package/dist/src/runtime.js +27 -5
  130. package/dist/src/types.d.ts +116 -1
  131. package/dist/testing/index.d.ts +5 -0
  132. package/dist/testing/index.js +5 -0
  133. package/mods/claude/.claude-plugin/plugin.json +7 -0
  134. package/mods/claude/hooks/hooks.json +1 -0
  135. package/mods/claude/hooks/register.js +261 -0
  136. package/package.json +5 -2
  137. package/schemas/autostart.json +74 -1
  138. package/schemas/browser-set.json +110 -0
  139. package/schemas/browser.json +22 -2
  140. package/schemas/config.json +26 -1
  141. package/schemas/history-index.json +209 -0
  142. package/schemas/history-projects.json +133 -0
  143. package/schemas/history-show.json +275 -0
  144. package/schemas/history.json +410 -0
  145. package/schemas/menubar-hotkey.json +139 -0
  146. package/schemas/menubar-snapshot.json +36 -2
  147. package/schemas/menubar.json +74 -1
  148. package/schemas/messages-inbound.json +258 -0
  149. package/schemas/messages.json +164 -0
  150. package/schemas/send.json +165 -0
  151. package/schemas/sessions-copy.json +113 -0
  152. package/schemas/sessions-open-run.json +97 -0
  153. package/schemas/sessions.json +237 -0
  154. package/skills/sideby/SKILL.md +10 -5
  155. package/skills/sideby/references/accounts.md +11 -0
  156. package/skills/sideby/references/ai-tasks.md +17 -1
  157. package/skills/sideby/references/panel.md +6 -4
  158. package/skills/sideby/references/quota.md +2 -2
  159. package/skills/sideby/references/sessions.md +79 -0
@@ -0,0 +1,113 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/sessions-copy.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "copied",
8
+ "as",
9
+ "text",
10
+ "sessionId",
11
+ "label"
12
+ ],
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "number",
16
+ "const": 1
17
+ },
18
+ "copied": {
19
+ "type": "boolean",
20
+ "description": "Whether the text went onto the clipboard; false when no clipboard program is installed."
21
+ },
22
+ "as": {
23
+ "anyOf": [
24
+ {
25
+ "type": "string",
26
+ "const": "reference"
27
+ },
28
+ {
29
+ "type": "string",
30
+ "const": "id"
31
+ },
32
+ {
33
+ "type": "string",
34
+ "const": "resume"
35
+ }
36
+ ]
37
+ },
38
+ "text": {
39
+ "type": "string",
40
+ "description": "The text copied, also when it could not be."
41
+ },
42
+ "sessionId": {
43
+ "type": "string"
44
+ },
45
+ "label": {
46
+ "type": "string",
47
+ "description": "The Session Label of the session copied."
48
+ },
49
+ "_notice": {
50
+ "type": "object",
51
+ "properties": {
52
+ "update": {
53
+ "type": "object",
54
+ "required": [
55
+ "current",
56
+ "latest",
57
+ "command",
58
+ "message"
59
+ ],
60
+ "properties": {
61
+ "current": {
62
+ "type": "string"
63
+ },
64
+ "latest": {
65
+ "type": "string"
66
+ },
67
+ "command": {
68
+ "type": "string",
69
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
70
+ },
71
+ "message": {
72
+ "type": "string"
73
+ }
74
+ }
75
+ },
76
+ "skill": {
77
+ "type": "object",
78
+ "required": [
79
+ "installed",
80
+ "current",
81
+ "command",
82
+ "message"
83
+ ],
84
+ "properties": {
85
+ "installed": {
86
+ "anyOf": [
87
+ {
88
+ "type": "string"
89
+ },
90
+ {
91
+ "type": "null"
92
+ }
93
+ ],
94
+ "description": "The skill's version; null when it has none."
95
+ },
96
+ "current": {
97
+ "type": "string"
98
+ },
99
+ "command": {
100
+ "type": "string",
101
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
102
+ },
103
+ "message": {
104
+ "type": "string"
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
110
+ }
111
+ },
112
+ "title": "sideby sessions copy --json"
113
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/sessions-open-run.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "opened",
8
+ "board",
9
+ "sessionId",
10
+ "label"
11
+ ],
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "type": "number",
15
+ "const": 1
16
+ },
17
+ "opened": {
18
+ "type": "boolean",
19
+ "const": true,
20
+ "description": "The Run Board was handed to the default program; a failure is an error instead."
21
+ },
22
+ "board": {
23
+ "type": "string",
24
+ "description": "The Run Board file opened, with the home folder as ~."
25
+ },
26
+ "sessionId": {
27
+ "type": "string"
28
+ },
29
+ "label": {
30
+ "type": "string",
31
+ "description": "The Session Label of the session whose run report was opened."
32
+ },
33
+ "_notice": {
34
+ "type": "object",
35
+ "properties": {
36
+ "update": {
37
+ "type": "object",
38
+ "required": [
39
+ "current",
40
+ "latest",
41
+ "command",
42
+ "message"
43
+ ],
44
+ "properties": {
45
+ "current": {
46
+ "type": "string"
47
+ },
48
+ "latest": {
49
+ "type": "string"
50
+ },
51
+ "command": {
52
+ "type": "string",
53
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
54
+ },
55
+ "message": {
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "skill": {
61
+ "type": "object",
62
+ "required": [
63
+ "installed",
64
+ "current",
65
+ "command",
66
+ "message"
67
+ ],
68
+ "properties": {
69
+ "installed": {
70
+ "anyOf": [
71
+ {
72
+ "type": "string"
73
+ },
74
+ {
75
+ "type": "null"
76
+ }
77
+ ],
78
+ "description": "The skill's version; null when it has none."
79
+ },
80
+ "current": {
81
+ "type": "string"
82
+ },
83
+ "command": {
84
+ "type": "string",
85
+ "description": "`sideby update`, which updates the skill with sideby: 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
+ },
93
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
94
+ }
95
+ },
96
+ "title": "sideby sessions open-run --json"
97
+ }
@@ -0,0 +1,237 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "sideby/sessions.json",
4
+ "type": "object",
5
+ "required": [
6
+ "schemaVersion",
7
+ "sessions",
8
+ "problems"
9
+ ],
10
+ "properties": {
11
+ "schemaVersion": {
12
+ "type": "number",
13
+ "const": 1
14
+ },
15
+ "sessions": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "required": [
20
+ "account",
21
+ "accountLabel",
22
+ "family",
23
+ "sessionId",
24
+ "title",
25
+ "label",
26
+ "status",
27
+ "guessed",
28
+ "reference",
29
+ "resumeCommand"
30
+ ],
31
+ "properties": {
32
+ "account": {
33
+ "type": "string",
34
+ "description": "The Account ref, for example `claude:002`."
35
+ },
36
+ "accountLabel": {
37
+ "type": "string",
38
+ "description": "The account's short name: its short command when it has one (`cc002`), else its ref."
39
+ },
40
+ "family": {
41
+ "type": "string"
42
+ },
43
+ "sessionId": {
44
+ "type": "string",
45
+ "description": "The host's own session id."
46
+ },
47
+ "title": {
48
+ "type": "string",
49
+ "description": "The host's own title for the session, or its working directory name when the host gives none; may be empty."
50
+ },
51
+ "label": {
52
+ "type": "string",
53
+ "description": "The Session Label: `<accountLabel> · <title> · <first 8 of sessionId>`."
54
+ },
55
+ "status": {
56
+ "anyOf": [
57
+ {
58
+ "type": "string",
59
+ "const": "needs-you"
60
+ },
61
+ {
62
+ "type": "string",
63
+ "const": "busy"
64
+ },
65
+ {
66
+ "type": "string",
67
+ "const": "idle"
68
+ },
69
+ {
70
+ "type": "string",
71
+ "const": "unknown"
72
+ }
73
+ ],
74
+ "description": "`needs-you`: it waits for the user (a permission or a question); `unknown` where the host does not say."
75
+ },
76
+ "cwd": {
77
+ "type": "string"
78
+ },
79
+ "pid": {
80
+ "type": "integer",
81
+ "description": "The host process running it."
82
+ },
83
+ "startedAt": {
84
+ "type": "string"
85
+ },
86
+ "updatedAt": {
87
+ "type": "string",
88
+ "description": "Its most recent activity."
89
+ },
90
+ "guessed": {
91
+ "type": "boolean",
92
+ "description": "True when sideby could not tie a running program to the session and took the account's newest one (Codex, pi)."
93
+ },
94
+ "transcript": {
95
+ "type": "string",
96
+ "description": "Path of the session's record."
97
+ },
98
+ "reference": {
99
+ "type": "string",
100
+ "description": "The Session Reference in English: one sentence that points another AI at the session and its record."
101
+ },
102
+ "resumeCommand": {
103
+ "type": "string",
104
+ "description": "The command that resumes it in the account that holds it."
105
+ },
106
+ "run": {
107
+ "type": "object",
108
+ "required": [
109
+ "title",
110
+ "board",
111
+ "url"
112
+ ],
113
+ "properties": {
114
+ "title": {
115
+ "type": "string",
116
+ "description": "The Run's title."
117
+ },
118
+ "laneTitle": {
119
+ "type": "string",
120
+ "description": "The part of the Run this session does."
121
+ },
122
+ "role": {
123
+ "type": "string",
124
+ "description": "Its role in the Run, for example coordinator, write or review."
125
+ },
126
+ "board": {
127
+ "type": "string",
128
+ "description": "The Run Board, a static HTML file in the orchestrator's state folder."
129
+ },
130
+ "url": {
131
+ "type": "string",
132
+ "description": "`file://<board>`, with `#lane-<id>` for the part this session does."
133
+ },
134
+ "others": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "object",
138
+ "required": [
139
+ "title",
140
+ "board"
141
+ ],
142
+ "properties": {
143
+ "title": {
144
+ "type": "string"
145
+ },
146
+ "laneTitle": {
147
+ "type": "string"
148
+ },
149
+ "role": {
150
+ "type": "string"
151
+ },
152
+ "board": {
153
+ "type": "string"
154
+ }
155
+ }
156
+ },
157
+ "description": "Other Runs the session also works for, after this one (by role)."
158
+ }
159
+ },
160
+ "description": "The Run of a local orchestrator this session works for, from the orchestrator's Session Index (spec §3.32 step 2b); only when the index lists the session and its board file checks out. With several, the first by role (coordinator, write, review, research, other)."
161
+ }
162
+ }
163
+ },
164
+ "description": "Running sessions, those that need the user first, then by most recent activity."
165
+ },
166
+ "problems": {
167
+ "type": "array",
168
+ "items": {
169
+ "type": "string"
170
+ },
171
+ "description": "An account or family that could not be read, and what to do; never aborts the listing."
172
+ },
173
+ "_notice": {
174
+ "type": "object",
175
+ "properties": {
176
+ "update": {
177
+ "type": "object",
178
+ "required": [
179
+ "current",
180
+ "latest",
181
+ "command",
182
+ "message"
183
+ ],
184
+ "properties": {
185
+ "current": {
186
+ "type": "string"
187
+ },
188
+ "latest": {
189
+ "type": "string"
190
+ },
191
+ "command": {
192
+ "type": "string",
193
+ "description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
194
+ },
195
+ "message": {
196
+ "type": "string"
197
+ }
198
+ }
199
+ },
200
+ "skill": {
201
+ "type": "object",
202
+ "required": [
203
+ "installed",
204
+ "current",
205
+ "command",
206
+ "message"
207
+ ],
208
+ "properties": {
209
+ "installed": {
210
+ "anyOf": [
211
+ {
212
+ "type": "string"
213
+ },
214
+ {
215
+ "type": "null"
216
+ }
217
+ ],
218
+ "description": "The skill's version; null when it has none."
219
+ },
220
+ "current": {
221
+ "type": "string"
222
+ },
223
+ "command": {
224
+ "type": "string",
225
+ "description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
226
+ },
227
+ "message": {
228
+ "type": "string"
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "description": "Not the answer to the task: mention it briefly afterwards and offer to update."
234
+ }
235
+ },
236
+ "title": "sideby sessions --json"
237
+ }
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: sideby
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) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, 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).
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", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), 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) or a pick command that starts whichever account has the most quota ("加个 cc"), adding an API account from a vendor's docs ("加一个 DeepSeek API 账号"), supporting a new tool, 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.19.1"
5
+ version: "0.20.0"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help
@@ -40,19 +40,24 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
40
40
  |---|---|---|
41
41
  | Install sideby, or set up a new account ("add cc008") | `sideby --version`, `sideby list --json`, `sideby new <family> --next --json` | `references/setup.md` |
42
42
  | Show which account a session is (`[cc001]` in the status line or tab title) | `sideby list --json` for the labels | `references/badge.md` |
43
+ | Find which session an account is running now ("cc002 现在在干嘛", "which session is cc002 running", "哪个会话在等我"), or copy one for another AI ("复制 cc002 的会话 id", "copy cc002's session for another AI", "把这个会话交给另一个 AI"); which Run (dispatched task) a session works for ("cc002 在哪个任务里", "which run is cc002 working on", "打开它的任务看板") | `sideby sessions [<account>\|<family>] --json`, `sideby sessions copy <account\|id> [--as reference\|id\|resume] --json`, `sideby sessions open-run <account\|id> --json` | `references/sessions.md` |
44
+ | Find a session from before, in any account ("find a session I had before", "找一下我上周改登录页的那个会话", "sideby 项目最近的会话", "按日期分组看看"), read it, or continue it where it was | `sideby history [<words>...] [--project <name>] [--since today\|7d\|30d] [--group project\|day\|category] --json`, `sideby history show <id> --json`, `sideby history projects --json`; `--tools` also searches tool output | `references/sessions.md` |
45
+ | Tell another running session something, or send it a screenshot ("告诉 cc002 ……", "把这张截图发给 cc003", "send this to the codex session", "tell cc002 the tests pass"); see what was sent and whether it was read ("cc002 看到我的消息了吗"); let Claude sessions show such messages at once instead of waiting for approval ("消息老要我批准", "让 cc002 直接收消息") | `sideby send <account\|session> "<text>" [--image <path>]... --json`, `sideby messages [--to <account\|session>] --json`, `sideby messages inbound --json`, then `sideby messages inbound accept` (exits 10 with the change; rerun with `--yes` after they agree) | `references/sessions.md` |
46
+ | See every session from inside Claude Code ("在这里看所有会话", "show my sessions in Claude Code"), or turn off the label line and `/sessions` pane sideby adds to Claude Code ("关掉 sideby 的横带", "turn off the sideby mod") | tell the user to type `/sessions`; `sideby config set claudeMod false --json` (or `true`) | `references/sessions.md` |
43
47
  | Know what accounts share and what stays separate | `sideby families <family> --json` | `references/sharing.md` |
44
48
  | See accounts, health, quota and usage | `sideby list --json`, `sideby doctor --json`, `sideby quota --json` | `references/diagnose.md` |
45
49
  | Pin accounts or arrange their Display Order | `sideby order --json`, `sideby pin <ref> --json`, `sideby unpin <ref> --json` | `references/panel.md` |
46
- | Turn quota checks on or off, or refresh fetched quota | `sideby quota check <family> on|off --json`, `sideby quota [family] --refresh --json` | `references/quota.md` |
50
+ | Turn quota checks on or off, or fix outdated Codex/Grok quota | `sideby quota check <family> on|off --json`, `sideby quota [family] --refresh --json` | `references/quota.md` |
47
51
  | Set the model, effort or Remote Control | `sideby model <ref> --json`, `sideby remote-control --json` | `references/panel.md` |
48
52
  | Start sideby at login ("开机启动", "start the panel when I log in") | `sideby autostart --json`, `sideby autostart on --json` (exit 10 first) | `references/panel.md` |
49
- | Show quota in the macOS menu bar ("状态栏显示额度", "menu bar") | `sideby menubar --json`, `sideby menubar on --json` (exit 10 first), `sideby menubar snapshot --json` | `references/panel.md` |
53
+ | Show quota in the macOS menu bar ("状态栏显示额度", "menu bar"), its icon is missing ("状态栏没有图标"), or change its shortcut ("换个快捷键", "帮我挑个顺手的快捷键") | `sideby menubar --json`, `sideby menubar on --json` (exit 10 first), `sideby menubar snapshot --json`, `sideby menubar hotkey [<keys>] --json` | `references/panel.md` |
50
54
  | Change the Panel's theme or language, or any other setting ("改成深色", "change any setting") | `sideby config get --json`, `sideby config set <key> <value> --json` (exit 10 first) | `references/panel.md` |
51
55
  | Turn Auto Update on or off | `sideby update --auto on|off --json` | `references/update.md` |
52
56
  | Switch between a local build of sideby and the release ("切换到正式版", "切回 dev 版本") | `sideby local --json`, `sideby local on|off --json` (exits 10 first) | `references/update.md` |
53
57
  | Repair drift or permissions | `sideby doctor [ref] --json`, then `--fix` after they agree | `references/diagnose.md` |
54
58
  | Keep working because an account hit its limit | `sideby next <family> --json` | `references/handoff.md` |
55
59
  | Turn on Auto Handoff ("自动接力", "自动交接", "hand over when quota runs low"), see what it still needs, hand this session over now, or pick an account with room for a subtask | `sideby handoff status --json`, `sideby handoff enable --json` (exit 10 first), `sideby handoff ready`, `sideby next <family> --json` | `references/handoff.md` |
60
+ | Sign an account in again or switch it to another login ("换个账号登录", "两个目录登录的是同一个号", "sign claude:work in with another account") | `sideby list --json` (`identity`, `sameLogin`), then give the user `sideby login <ref>` | `references/accounts.md` |
56
61
  | Create an account with a given name, an API account, or a short command | `sideby new`, `sideby alias add` | `references/accounts.md` |
57
62
  | One command that always starts the account with the most quota left ("加个 cc", "自动挑额度最多的账号启动", "start whichever has room") | `sideby alias add <short> --pick <family> --json` (exit 10 first), `sideby alias list --json` | `references/accounts.md` |
58
63
  | Short commands say "command not found" in a new terminal ("cc 用不了", "短命令不生效") | `sideby shell-init setup --json` (exit 10 first) | `references/setup.md` |
@@ -83,7 +88,7 @@ Grok Bot is not a grok account's app: it signs in with a Cursor account, apart f
83
88
 
84
89
  To let the user look at or change one account's own Host settings (`settings.json` for claude and pi, `config.toml` for codex and grok), run `sideby edit <ref> --json`: it opens the file in their default editor and reads none of it. Relay `sharedWith`: a linked file is the main account's, so a change applies to those accounts too. Use `--path` when you only need where the file is. Never print the file's content back: Claude's `settings.json` may hold API keys under `env`.
85
90
 
86
- 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. To stop reading Browser Sign-ins, use `sideby browser --disable --json`, show its preview, then add `--yes` after approval. A match may be left over from before a sign-out; say so. Grok accounts need `--profile <name>`.
91
+ 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. To stop reading Browser Sign-ins, use `sideby browser --disable --json`, show its preview, then add `--yes` after approval. A match may be left over from before a sign-out; say so. When the user says the browser user is wrong ("codex:main 应该是 Profile 7"), run `sideby browser set <ref> <folder|name> --json` (it writes only sideby's config, no confirmation needed); `sideby browser set <ref> --auto --json` lets sideby find it again. When nothing is found, use `set` or `--profile <name>`. A plugin tool has a website only when its plugin sets `website` in its FamilyDef (`docs/guide/plugins.md`); add it there, with `match` when the website keeps an id the tool's login file also has.
87
92
 
88
93
  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.
89
94
 
@@ -19,6 +19,17 @@ Then:
19
19
  - **pi**: a `proxy.env` in a pi account only loads provider keys; the account stays a subscription account and still needs `/login`.
20
20
  - Afterwards: `sideby doctor <ref> --json` to confirm the new account is healthy, then the user starts it with `sideby run <ref>`.
21
21
 
22
+ ## Switch an account to another login
23
+
24
+ Two directories signed in as the same login share one quota (`sameLogin` in `sideby list --json`). To give one its own login:
25
+
26
+ 1. Say which directory is signed in as which email (`identity.email`), and which one they want to change.
27
+ 2. Give the user one line to run in their own terminal: `sideby login <ref>` (Claude Code: `! sideby login <ref>`), or tell them to click **Use another account** on that directory in the Panel. It cannot be done inside the tool: Codex has no `/login`, and its `/logout` is blocked while a task runs.
28
+ 3. Tell them the browser usually signs in as the login it already has: sign out of it there first, or open the sign-in link in a private window. sideby signs nothing out first, so giving up keeps the old login.
29
+ 4. sideby prints the result at the end. Afterwards check `sideby list --json`: the account's `sameLogin` is gone and its `identity.email` is the new one. If it is still the same login, repeat step 3.
30
+
31
+ A running session of that account keeps its old login until it is restarted.
32
+
22
33
  ## Short commands (aliases)
23
34
 
24
35
  For an account that already exists: `sideby alias add <short> <ref> --json`.
@@ -1,6 +1,6 @@
1
1
  # AI Tasks
2
2
 
3
- An AI Task is a session of the user's own Host that sideby started for them, with a Task Prompt as its first message. The user starts it from the Panel ("Let AI do it", a Finding, a quota cell, the new-account dialog, "Other tool…", "Let AI write a plugin", "Not sure how? Let AI set it up" in the Preferred terminal dialog, "Let AI tune it" on the Auto Handoff page) or with `sideby ask` in a terminal (`--task free|fix|quota|account|host|plugin|terminal|handoff`). The prompt says what to do and gives facts sideby already knows (account refs, Family, Finding codes, the quota reason, the Panel language, the sideby version). How to do it is on this page.
3
+ An AI Task is a session of the user's own Host that sideby started for them, with a Task Prompt as its first message. The user starts it from the Panel ("Let AI do it", a Finding, a quota cell, the new-account dialog, "Other tool…", "Let AI write a plugin", "Not sure how? Let AI set it up" in the Preferred terminal dialog, "Let AI tune it" on the Auto Handoff page) or with `sideby ask` in a terminal (`--task free|fix|quota|account|host|plugin|terminal|handoff|menubar|hotkey`; "Let AI check it" in the Panel's Menu bar icon dialog starts `menubar`, and "Not sure which? Let AI pick one" under its shortcut starts `hotkey`). The prompt says what to do and gives facts sideby already knows (account refs, Family, Finding codes, the quota reason, the Panel language, the sideby version). How to do it is on this page.
4
4
 
5
5
  You are inside such a session when the first message came from sideby and names a task. Work in the directory the session started in (sideby's own `ai/` folder) unless the user names another one.
6
6
 
@@ -124,3 +124,19 @@ Once the task works, ask the user whether they would like to share the improveme
124
124
  2. Fork `Adonis0123/sideby`, commit and open a pull request as its `CONTRIBUTING.md` says: one tool per pull request, the Host version and date it was tried with, tried on their own machine, `pnpm check` passing.
125
125
 
126
126
  Never fork, commit or open a pull request without that yes.
127
+
128
+ ## menubar: the menu bar icon does not show
129
+
130
+ 1. Run `sideby menubar --json`.
131
+ 2. `state: "off"`: it was turned off, often with "Hide from Menu Bar…" in its own menu. Show `sideby menubar on --json` (exit 10) and run `sideby menubar on --yes` after the user agrees.
132
+ 3. `state: "on"` with `loaded: false`: macOS is not running it (it can happen after an update). `sideby menubar on --yes` only starts it again; the file stays as it is.
133
+ 4. `loaded: true`: it runs but is hidden. Check, in turn: a full menu bar or the notch (hold ⌘ and drag icons to make room); a menu bar organizer such as Ice, Bartender or Hidden Bar (look in `/Applications`) that tucked it away, where the user moves it out in that app's settings (it shows as osascript); on macOS 26 and later, osascript not allowed under System Settings › Menu Bar. The shortcut in `hotkey.label` opens the menu from anywhere, which shows it runs.
134
+ 5. Never end or restart a process that is not sideby's.
135
+
136
+ ## hotkey: pick a shortcut for the menu bar menu
137
+
138
+ 1. Run `sideby menubar hotkey --json` for the current one.
139
+ 2. Find what is taken: the system shortcuts with `enabled = 1` in `defaults read com.apple.symbolichotkeys AppleSymbolicHotKeys` (key code 49 is Space), and the apps in `/Applications` that usually hold a global shortcut (Raycast and Alfred take ⌥Space, ChatGPT ⌥Space, Claude its own), judged by their defaults. Do not open those apps' config files: they may hold keys. Ask when unsure.
140
+ 3. Ask which hand the user presses shortcuts with and which ones they use often. Recommend 2 or 3 free combinations, easiest first (two keys, such as ⌥X or ⌥Z; each needs ⌥, ⌘ or ⌃), and say what each takes away (⌥X no longer types ≈).
141
+ 4. Set the chosen one with `sideby menubar hotkey <keys>`. A running menu bar item takes it within seconds, with no restart. Ask the user to press it: if the menu does not open, another app took it first, so try the next.
142
+ 5. Never change the shortcuts of macOS or another app.
@@ -13,7 +13,7 @@ Use these commands for the same persistent settings as the Panel. Prefer account
13
13
  - Same Login row name: the Panel shows two directories of one login as one row, named after the one that comes first in the order. To show `001` instead of `main`, run `sideby order claude 001` (the rest follows). `order --reset` brings back the main directory's name.
14
14
  - Desktop app windows (Grok Bot, id `grok-bot`) are a group in the same order: `sideby order --families claude grok-bot codex` places the group, `sideby order grok-bot 001 main` orders its windows. They cannot be pinned.
15
15
 
16
- These affect display only, never Handoff Order. Saving removes names that no longer exist. The existing Same Login rules apply (Claude groups by email and organization; Codex accounts remain separate).
16
+ These affect display only, never Handoff Order. Saving removes names that no longer exist. The existing Same Login rules apply (Claude groups by email and organization; Codex also by ChatGPT workspace; Grok also by x.ai user and team).
17
17
 
18
18
  ## Model and effort
19
19
 
@@ -25,7 +25,7 @@ To change them, run `sideby model claude:work opus --effort high --json`; `defau
25
25
 
26
26
  `sideby remote-control --json` returns `action` and `groups`: each has `file`, `accounts`, `state`, `undo` and optional `reason`. `state` is `on`, `default`, `off`, `missing` or `blocked`.
27
27
 
28
- Use `sideby remote-control off --json`, `on --json` or `undo --json`. Exit 10 shows the affected groups and waits for `--yes`; confirm before applying. A result has `applied`, optional `results` (`file`, `accounts`, `ok`, `message`) and optional `message`. Only turn it on when asked. Changes affect new sessions; running sessions remain connected until restarted. Undo restores the earlier value only while the key still holds what sideby wrote.
28
+ Use `sideby remote-control off --json`, `on --json` or `undo --json`. Exit 10 shows the affected groups and waits for `--yes`; confirm before applying. Exit 1 with `applied: false` and a message such as "already off, nothing changed" means no file needed it: tell the user, do not retry. A result has `applied`, optional `results` (`file`, `accounts`, `ok`, `message`) and optional `message`. Only turn it on when asked. Changes affect new sessions; running sessions remain connected until restarted. Undo restores the earlier value only while the key still holds what sideby wrote.
29
29
 
30
30
  ## Theme, language and any other setting
31
31
 
@@ -43,6 +43,8 @@ To turn it on ("start sideby at login", "开机启动"), run `sideby autostart o
43
43
 
44
44
  ## Quota in the menu bar
45
45
 
46
- `sideby menubar --json` returns the same fields as `autostart` (`supported`, `state`, `path`, `current`, `missing?`) for the Menu Bar Item, the sideby icon in the macOS menu bar. To turn it on ("show my quota in the menu bar", "状态栏显示额度"), run `sideby menubar on --json`: exit 10 shows the file (`~/Library/LaunchAgents/dev.sideby.menubar.plist`, which runs the system's `osascript` with the whole menu script and this sideby). Tell the user it adds a login item that shows quota in the menu bar from now on, and run `sideby menubar on --yes --json` after they agree; `sideby menubar off --yes` removes it. The same refusals as `autostart` apply (`unsupported`, `foreign`, `npx-cache`, `temp-dir`, `unsafe-path`), and `sideby update` keeps it pointing at the new version.
46
+ `sideby menubar --json` returns the same fields as `autostart` (`supported`, `state`, `path`, `current`, `missing?`), plus `loaded` and `hotkey`, for the Menu Bar Item, the sideby icon in the macOS menu bar. To turn it on ("show my quota in the menu bar", "状态栏显示额度"), run `sideby menubar on --json`: exit 10 shows the file (`~/Library/LaunchAgents/dev.sideby.menubar.plist`, which runs the system's `osascript` with the whole menu script and this sideby). Tell the user it adds a login item that shows quota in the menu bar from now on, and run `sideby menubar on --yes --json` after they agree; `sideby menubar off --yes` removes it. The same refusals as `autostart` apply (`unsupported`, `foreign`, `npx-cache`, `temp-dir`, `unsafe-path`), and `sideby update` keeps it pointing at the new version.
47
47
 
48
- The icon stands alone while every tool has quota left. In each tool sideby takes how much the account `sideby next` would pick has used; when the highest of those reaches 60% (orange; red from 85%), the title shows that tool and percent, such as `Codex 61%`. The menu's first line (`headline`) names that account either way. `sideby menubar snapshot --json` prints what the menu shows (`title`, `level`, `headline`, `sections[].rows[]` with `bars`, `reset`, `note` and `recommended`, and `sections[].more` for API key and signed-out accounts); use it to answer "what does my menu bar say". Clicking an account runs `sideby menubar start <account>`, which opens it in the Preferred Terminal. ⌥⌘S opens and closes the menu from anywhere; `sideby config set menubar.hotkey <mods+key>` changes it (`ctrl`, `opt`, `shift`, `cmd` and one letter or digit, such as `cmd+shift+0`) and `off` turns it off; it needs no macOS permission. When the user cannot see the icon, the menu bar is full or the item sits under the notch: they can hold ⌘ and drag icons to make room; macOS keeps the place.
48
+ The icon stands alone while every tool has quota left. In each tool sideby takes how much the account `sideby next` would pick has used; when the highest of those reaches 60% (orange; red from 85%), the title shows that tool and percent, such as `Codex 61%`. The menu's first line (`headline`) names that account either way. `sideby menubar snapshot --json` prints what the menu shows (`title`, `level`, `headline`, `sections[].rows[]` with `bars`, `reset`, `note` and `recommended`, and `sections[].more` for API key and signed-out accounts); use it to answer "what does my menu bar say". Clicking an account runs `sideby menubar start <account>`, which opens it in the Preferred Terminal. ⌥X opens and closes the menu from anywhere; it needs no macOS permission. To change it ("换个快捷键", "change the menu bar shortcut"), run `sideby menubar hotkey <keys> --json`: `cmd` or `ctrl`, any of `opt` and `shift`, and one letter or digit, such as `ctrl+opt+s`; `off` turns it off, `default` goes back to ⌥X, and a running menu bar item takes it within seconds without a restart (`nudged`). A refusal says why in `code`: `hotkey.reserved` (macOS and most apps use it, such as ⌘Q), `hotkey.needs-modifier` (no opt, cmd or ctrl), `hotkey.invalid`. `sideby menubar hotkey --json` shows it: `registered: false` means macOS did not accept the key, so suggest another. macOS does not tell when another app uses the same keys (both may be accepted), so when the user says the shortcut does nothing, suggest another one too. The Panel has the same as a list (⌥X, ⌥Z, ⌥⌘S, ⌃⌥S, Off, Custom…) in **Menu bar icon ›** under the menu bar switch, with "Can't see the icon?" and "Let AI check it" (`sideby ask --task menubar`).
49
+
50
+ When the user cannot see the icon ("状态栏没有图标", "the menu bar icon is gone"), read `sideby menubar --json` first. `state: "off"`: it was turned off, often with the menu's "Hide from Menu Bar…"; offer `sideby menubar on --yes`. `state: "on"` with `loaded: false`: on but not running (macOS let it go, for example after an update); `sideby menubar on --yes --json` starts it again without changing the file. `loaded: true`: it runs but is hidden. `icon.visible: false` says so for certain: the menu bar is full and macOS put it behind « (click « to see it, or set it to always show in System Settings › Menu Bar). Otherwise check System Settings › Menu Bar (osascript turned off) and menu bar organizers such as Ice or Bartender.
@@ -9,9 +9,9 @@ Claude quota needs a one-time change to `~/.claude/settings.json`: the status li
9
9
 
10
10
  Accounts with their own (not linked) `settings.json` show quota `not-enabled` until that file's status line is wrapped the same way; tell the user instead of editing it.
11
11
 
12
- After setup, each account shows quota once it has had one session with a reply. Codex quota needs no setup: sideby reads it from Codex's own session files.
12
+ After setup, each account shows quota once it has had one session with a reply. Codex quota needs no setup: sideby asks the official `codex app-server` every 15 minutes, without a conversation. `sideby quota codex --refresh --json` asks now; `sideby quota check codex off --json` disables querying, as does CI. Local session records are a fallback only until the first successful query; they cannot overwrite fetched quota afterward. On failure, relay `fetchError` and `observedAt`, never call old numbers current. The menu's checked time is separate from each row's `observedAt` and `stale`; readings older than one hour or with a query failure show as older readings. Tested with Codex CLI 0.163.0.
13
13
 
14
- Two Claude accounts signed in as the same login (same email and organization; `sameLogin` in `sideby list --json`) share one quota: both show the freshest reading, and `quota.from` names the account it was read from. Explain that to the user rather than calling the numbers wrong; usage stays per account, and sideby never merges or deletes either directory.
14
+ Two accounts of one tool signed in as the same login (Claude: same email and organization; Codex and Grok also compare the workspace or team; `sameLogin` in `sideby list --json`) share one quota: both show the freshest reading, and `quota.from` names the account it was read from. Explain that to the user rather than calling the numbers wrong; usage stays per account, and sideby never merges or deletes either directory.
15
15
 
16
16
  Grok quota needs no setup: sideby asks the `grok` CLI of each signed-in account (`grok agent --no-leader stdio`, the Host makes the request with its own login; sideby never reads `auth.json`) at most every 15 minutes, and also reads the quota Grok logs after each turn. `sideby quota grok --refresh` asks again now. `quota.status: "unavailable"` with `reason: "fetch-failed"` carries the cause and next step in `detail` (update Grok, `sideby login grok:<name>`); `"not-enabled"` means the user turned it off (config `quota.check.grok: false`, or the Panel's Settings) or it runs in CI. A reading with `fetchError` is the last good one; say it may be old.
17
17