sideby 0.38.0 → 0.39.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.
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +6 -0
- package/dist/src/cli/commands.js +88 -0
- package/dist/src/cli/json-schemas.js +35 -0
- package/dist/src/cli/main.js +32 -1
- package/dist/src/core/cli-commands.js +14 -2
- package/dist/src/core/config.d.ts +13 -0
- package/dist/src/core/config.js +18 -0
- package/dist/src/core/launch.d.ts +5 -0
- package/dist/src/core/launch.js +11 -1
- package/dist/src/core/network.d.ts +11 -1
- package/dist/src/core/network.js +21 -1
- package/dist/src/core/progress-state.d.ts +80 -0
- package/dist/src/core/progress-state.js +216 -0
- package/dist/src/core/progress.d.ts +36 -0
- package/dist/src/core/progress.js +77 -0
- package/dist/src/core/prompt-origin.d.ts +40 -0
- package/dist/src/core/prompt-origin.js +98 -0
- package/dist/src/core/search-catalog.js +25 -0
- package/dist/src/core/unattended-attended.d.ts +109 -0
- package/dist/src/core/unattended-attended.js +337 -0
- package/dist/src/core/unattended.d.ts +10 -2
- package/dist/src/core/unattended.js +11 -2
- package/dist/src/handoff/hook.js +19 -4
- package/dist/src/menubar/script.js +9 -3
- package/dist/src/network/hook.d.ts +9 -0
- package/dist/src/network/hook.js +186 -4
- package/dist/src/panel/handler.d.ts +3 -0
- package/dist/src/panel/handler.js +15 -0
- package/dist/src/panel/i18n.d.ts +18 -0
- package/dist/src/panel/i18n.js +36 -0
- package/dist/src/panel/page-script.js +67 -2
- package/dist/src/panel/page-styles.js +14 -0
- package/dist/src/progress/hook.d.ts +50 -0
- package/dist/src/progress/hook.js +251 -0
- package/dist/src/runtime.d.ts +9 -0
- package/dist/src/runtime.js +45 -2
- package/dist/src/unattended/hook.d.ts +5 -0
- package/dist/src/unattended/hook.js +103 -9
- package/package.json +1 -1
- package/schemas/config.json +13 -0
- package/schemas/progress.json +137 -0
- package/schemas/unattended.json +38 -0
- package/skills/sideby/SKILL.md +3 -1
- package/skills/sideby/references/network.md +1 -1
- package/skills/sideby/references/progress.md +25 -0
- package/skills/sideby/references/unattended.md +9 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "sideby/progress.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"action",
|
|
8
|
+
"on"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"schemaVersion": {
|
|
12
|
+
"type": "number",
|
|
13
|
+
"const": 1
|
|
14
|
+
},
|
|
15
|
+
"action": {
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{
|
|
18
|
+
"type": "string",
|
|
19
|
+
"const": "status"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "string",
|
|
23
|
+
"const": "on"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "string",
|
|
27
|
+
"const": "off"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"on": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Progress Reminders are on: a Claude session sideby starts that waits on background work tells the user every `every` minutes what it waits for (spec §3.42)."
|
|
34
|
+
},
|
|
35
|
+
"every": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"description": "Minutes between reminders, config `progress.every`; absent while off."
|
|
38
|
+
},
|
|
39
|
+
"defaultEvery": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"description": "What `on` picks without --every (status only)."
|
|
42
|
+
},
|
|
43
|
+
"choices": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "integer"
|
|
47
|
+
},
|
|
48
|
+
"description": "The intervals the Panel offers (status only)."
|
|
49
|
+
},
|
|
50
|
+
"families": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
"description": "Families whose sessions get reminders (status only); Codex has no hook that can wake a session."
|
|
56
|
+
},
|
|
57
|
+
"changed": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"description": "on and off: whether the config changed."
|
|
60
|
+
},
|
|
61
|
+
"before": {
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"description": "on and off: the interval before, when it was on."
|
|
64
|
+
},
|
|
65
|
+
"undo": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"description": "on and off: the command that puts back what was there."
|
|
68
|
+
},
|
|
69
|
+
"message": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "on and off: one line for the user."
|
|
72
|
+
},
|
|
73
|
+
"_notice": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"update": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"required": [
|
|
79
|
+
"current",
|
|
80
|
+
"latest",
|
|
81
|
+
"command",
|
|
82
|
+
"message"
|
|
83
|
+
],
|
|
84
|
+
"properties": {
|
|
85
|
+
"current": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"latest": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
},
|
|
91
|
+
"command": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
|
|
94
|
+
},
|
|
95
|
+
"message": {
|
|
96
|
+
"type": "string"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"skill": {
|
|
101
|
+
"type": "object",
|
|
102
|
+
"required": [
|
|
103
|
+
"installed",
|
|
104
|
+
"current",
|
|
105
|
+
"command",
|
|
106
|
+
"message"
|
|
107
|
+
],
|
|
108
|
+
"properties": {
|
|
109
|
+
"installed": {
|
|
110
|
+
"anyOf": [
|
|
111
|
+
{
|
|
112
|
+
"type": "string"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "null"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"description": "The skill's version; null when it has none."
|
|
119
|
+
},
|
|
120
|
+
"current": {
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"command": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
|
|
126
|
+
},
|
|
127
|
+
"message": {
|
|
128
|
+
"type": "string"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"description": "Not the answer to the task: mention it briefly afterwards and offer to update."
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"title": "sideby progress [on|off] --json"
|
|
137
|
+
}
|
package/schemas/unattended.json
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"configured",
|
|
10
10
|
"schedule",
|
|
11
11
|
"pending",
|
|
12
|
+
"attended",
|
|
12
13
|
"coverage"
|
|
13
14
|
],
|
|
14
15
|
"properties": {
|
|
@@ -156,6 +157,43 @@
|
|
|
156
157
|
"type": "integer",
|
|
157
158
|
"description": "Open Pending Decisions (`sideby unattended pending`)."
|
|
158
159
|
},
|
|
160
|
+
"attended": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"required": [
|
|
165
|
+
"sessionId",
|
|
166
|
+
"family",
|
|
167
|
+
"since",
|
|
168
|
+
"until"
|
|
169
|
+
],
|
|
170
|
+
"properties": {
|
|
171
|
+
"sessionId": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"family": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"account": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"cwd": {
|
|
181
|
+
"type": "string"
|
|
182
|
+
},
|
|
183
|
+
"since": {
|
|
184
|
+
"type": "string",
|
|
185
|
+
"format": "date-time",
|
|
186
|
+
"description": "When someone first typed into it after it last stopped counting."
|
|
187
|
+
},
|
|
188
|
+
"until": {
|
|
189
|
+
"type": "string",
|
|
190
|
+
"format": "date-time",
|
|
191
|
+
"description": "30 minutes after the last prompt someone typed into it."
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"description": "Attended Sessions (ADR-0075): Claude sessions sideby started that someone typed into within the last 30 minutes. They ask as usual while the mode stays on for every other session. Latest `until` first. Read-only: only a prompt typed into the session sets it."
|
|
196
|
+
},
|
|
159
197
|
"coverage": {
|
|
160
198
|
"type": "object",
|
|
161
199
|
"patternProperties": {
|
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", "加上账号标识"), finding a past session of any account ("找一下我上周改登录页的那个会话"), telling another running session something, in any account ("告诉 cc002 ……", "给跑构建的那个会话发消息"; Claude Code's own SendMessage reaches only sessions of the same 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.
|
|
5
|
+
version: "0.39.0"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -84,6 +84,8 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
84
84
|
| A Claude API account's gateway rejects requests after an Advisor change, or why sideby adds `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` to API accounts ("API 账号网关报错了", "为什么 API 账号多了这个变量") | `sideby advisor --json` (`apiBetasOff`, each group's `apiAccounts`), `sideby config get claude.apiBetasOff --json`; `sideby advisor undo` or `sideby config set claude.apiBetasOff false` after they agree | `references/panel.md` |
|
|
85
85
|
| Stop Claude and Codex when the network is wrong ("网络不对时别让 Claude 用", "代理断了就拦住", "only allow US and Japan", "开网络检查"), see where requests leave from now, or a session says it was blocked | `sideby network --json`, `sideby network check --json`, `sideby network allow <CC>... --json` and `sideby network on --json` (each exits 10 first; rerun with `--yes` after they agree) | `references/network.md` |
|
|
86
86
|
| Leave sessions running with nobody there ("挂机", "无人值守", "今晚自己跑完", "设个时间段别问我", "keep going while I sleep"), set a nightly Schedule, or see what was left for the user | `sideby unattended on [--until 08:00] --json` (run it yourself when they say they are leaving), `sideby unattended schedule preset weeknights --json`, `sideby unattended --json`, `sideby unattended pending --json`; inside a session refused a question: `sideby unattended defer "<one sentence>"` | `references/unattended.md` |
|
|
87
|
+
| The user is back early and wants questions in one session ("我回来了,会话怎么还不问我", "为什么这个会话又开始问我", "I'm back, why doesn't it ask me"), or asks which sessions ask as usual | Tell them to type in that session: it asks as usual for 30 minutes after each message. `sideby unattended --json` lists them (`attended`); there is no command to set it. `sideby unattended off --json` turns it off everywhere | `references/unattended.md` |
|
|
88
|
+
| A session waits on background work and says nothing for a long time ("后台任务跑着时没动静", "等子任务时隔一阵告诉我进度", "tell me what it is waiting for every 10 minutes", "进度提醒"), or stop those updates ("别再报进度了", "turn off progress updates") | `sideby progress --json`, then `sideby progress on [--every <minutes>] --json` or `sideby progress off --json` (writes only sideby's config, no preview; relay that each update uses quota and that only Claude sessions started afterwards get it) | `references/progress.md` |
|
|
87
89
|
| See Claude quota, refresh it, or turn on live quota for Auto Handoff | `sideby quota claude --refresh --json` (no setup); `sideby quota setup claude` (exits 10) for Auto Handoff | `references/quota.md` |
|
|
88
90
|
| 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` |
|
|
89
91
|
| See everything at once | `sideby ui` (local panel on `127.0.0.1:17420`; `--no-open` prints the address) | — |
|
|
@@ -34,4 +34,4 @@ The Panel's **Let AI help** (in the Network check dialog and on the wrong-networ
|
|
|
34
34
|
|
|
35
35
|
## When something was blocked
|
|
36
36
|
|
|
37
|
-
A blocked Launch exits 1 with `code` `network-blocked` (wrong country) or `network-unknown` (could not tell). Inside a session the prompt or tool call is stopped with the same reason. Help the user check their proxy (is it running, which node), then run `sideby network check --json` to confirm. To go on once anyway, the user runs `sideby run <account> --ignore-network` (or `sideby next <family> --ignore-network`); never add it yourself without their say-so. When the user wants the check gone, show `sideby network off --json` (exit 10, a preview), then run it with `--yes` once they agree; sessions already running follow config at once, so no restart is needed.
|
|
37
|
+
A blocked Launch exits 1 with `code` `network-blocked` (wrong country) or `network-unknown` (could not tell). Inside a session the prompt or tool call is stopped with the same reason. In a Claude session, a message Claude Code made itself (a background task's result) that was stopped is kept and handed to the session once the network is right again, between `<sideby-held-message>` tags; a typed message is not, the user sends it again. Help the user check their proxy (is it running, which node), then run `sideby network check --json` to confirm. To go on once anyway, the user runs `sideby run <account> --ignore-network` (or `sideby next <family> --ignore-network`); never add it yourself without their say-so. When the user wants the check gone, show `sideby network off --json` (exit 10, a preview), then run it with `--yes` once they agree; sessions already running follow config at once, so no restart is needed.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Progress updates: a waiting session says what it waits for
|
|
2
|
+
|
|
3
|
+
Progress Reminders (spec §3.42, ADR-0076): while a Claude session sideby started waits on background work (subagents, background commands), the session is idle and the model cannot say anything, so the user sees silence. With progress updates on, sideby wakes such a session every few minutes, and the model tells the user in one or two sentences what it waits for, how long it has waited and whether there is new output, then ends its turn.
|
|
4
|
+
|
|
5
|
+
## Turn it on or off
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
sideby progress --json # { on, every?, defaultEvery, choices, families }
|
|
9
|
+
sideby progress on --json # every 10 minutes (or keeps the interval it had)
|
|
10
|
+
sideby progress on --every 15 --json # 1 to 240 minutes
|
|
11
|
+
sideby progress off --json
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
It writes only sideby's config (`progress.every`), so there is no preview and no `--yes`; each change returns `undo`. Before turning it on for the user, tell them, in one line each:
|
|
15
|
+
- Each update is one model turn, which reads the whole conversation: it uses quota. That is why it is off by default.
|
|
16
|
+
- Claude sessions sideby starts from now on get it; a session already running needs a restart. Turning it off, or a new interval, reaches running sessions too.
|
|
17
|
+
- There are no updates while the session is unattended (Unattended Mode, unless the user typed there in the last 30 minutes), while a turn is running, or once the background work is done.
|
|
18
|
+
- Codex is not covered: no Codex hook can wake a waiting session. Grok, pi and sessions started without sideby are not covered either.
|
|
19
|
+
- In the Panel it is **Settings › Progress updates**.
|
|
20
|
+
|
|
21
|
+
## Inside a session that gets one
|
|
22
|
+
|
|
23
|
+
The reminder arrives as a message that starts `sideby progress reminder:` and names the background tasks, when the wait began and for how long. Answer it as it asks: one or two sentences for the user (what you wait for, how long, any new output if it is quick to look), then end your turn. Do not start new work or stop the tasks because of it. If the user asks how to stop these, the command is `sideby progress off`.
|
|
24
|
+
|
|
25
|
+
With Auto Handoff on, a reminder's turn does not change when or how the session hands over.
|
|
@@ -49,10 +49,18 @@ Then go on with the rest. Do not retry the question, and do not work around the
|
|
|
49
49
|
|
|
50
50
|
When a note from sideby says your last turn failed for a passing reason, the session was woken to go on: check what is already done (files, commits, background work), do not redo it, and continue where the turn stopped.
|
|
51
51
|
|
|
52
|
+
## When the user is back early: they just type
|
|
53
|
+
|
|
54
|
+
A Claude session the user types into asks as usual again for 30 minutes after each message they send (an **Attended Session**, ADR-0075): its questions, permission prompts and forms reach the user, and nothing of it is refused or kept. Every other session stays unattended, and the global state does not change. The first time it applies, the session shows the user one line saying so. So when the user says they are back but only wants to work in one session ("我回来了,这个会话怎么还不问我", "why is this session asking me again"), tell them to just type in it; no command is needed.
|
|
55
|
+
|
|
56
|
+
- See which sessions it covers now: `sideby unattended --json`, field `attended` (each `sessionId`, `account`, `cwd`, `since`, `until`).
|
|
57
|
+
- Only a prompt the user typed counts: not a background task's notification, not a Message from `sideby send` or another session, not the prompt sideby put on the command line, and not your own tool calls. There is no command to set it, and you must not try to make your own session count: if the user wants questions everywhere, run `sideby unattended off --json`.
|
|
58
|
+
- Typing into a terminal by automation (tmux `send-keys`) looks like a person to Claude Code and counts for that one session. Sessions started before this sideby version, and Codex sessions, do not have it.
|
|
59
|
+
|
|
52
60
|
## When the user is back
|
|
53
61
|
|
|
54
62
|
```sh
|
|
55
|
-
sideby unattended --json # on or off and why, until when, the next Slot, open decisions, coverage
|
|
63
|
+
sideby unattended --json # on or off and why, until when, the next Slot, open decisions, coverage, attended sessions
|
|
56
64
|
sideby unattended pending --json # each question, refused permission or skipped action, with account, session and folder
|
|
57
65
|
sideby unattended pending done <id> --json # or --all, once the user has dealt with them
|
|
58
66
|
```
|