sideby 0.32.1 → 0.33.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 (47) hide show
  1. package/assets/brand/sai-painted-1024.png +0 -0
  2. package/assets/brand/sai-painted-128.png +0 -0
  3. package/assets/brand/sai-painted-256.png +0 -0
  4. package/assets/brand/sai-painted-64.png +0 -0
  5. package/dist/build.json +1 -1
  6. package/dist/src/cli/commands.js +57 -14
  7. package/dist/src/cli/format.js +3 -1
  8. package/dist/src/cli/json-schemas.js +30 -5
  9. package/dist/src/cli/main.js +9 -4
  10. package/dist/src/core/brand-mark.d.ts +18 -115
  11. package/dist/src/core/brand-mark.js +43 -174
  12. package/dist/src/core/messages.d.ts +17 -5
  13. package/dist/src/core/messages.js +38 -15
  14. package/dist/src/core/quota-fetch.js +9 -2
  15. package/dist/src/desktop/icon.d.ts +13 -1
  16. package/dist/src/desktop/icon.js +153 -285
  17. package/dist/src/families/claude/deliver.js +9 -1
  18. package/dist/src/families/claude/messaging.d.ts +7 -1
  19. package/dist/src/families/claude/messaging.js +10 -2
  20. package/dist/src/families/codex/deliver.d.ts +10 -1
  21. package/dist/src/families/codex/deliver.js +24 -2
  22. package/dist/src/families/messaging.d.ts +6 -1
  23. package/dist/src/menubar/script.d.ts +5 -0
  24. package/dist/src/menubar/script.js +111 -25
  25. package/dist/src/menubar/snapshot.d.ts +29 -8
  26. package/dist/src/menubar/snapshot.js +132 -31
  27. package/dist/src/menubar/strings.d.ts +22 -6
  28. package/dist/src/menubar/strings.js +22 -6
  29. package/dist/src/panel/handler.d.ts +2 -2
  30. package/dist/src/panel/handler.js +8 -2
  31. package/dist/src/panel/i18n.d.ts +5 -0
  32. package/dist/src/panel/i18n.js +14 -4
  33. package/dist/src/panel/page-logic.d.ts +25 -4
  34. package/dist/src/panel/page-logic.js +122 -10
  35. package/dist/src/panel/page-script.js +39 -8
  36. package/dist/src/panel/page-styles.js +5 -5
  37. package/dist/src/panel/page.js +2 -2
  38. package/dist/src/panel/theme.d.ts +4 -1
  39. package/dist/src/runtime.d.ts +3 -1
  40. package/dist/src/runtime.js +1 -1
  41. package/package.json +2 -1
  42. package/schemas/menubar-snapshot.json +102 -2
  43. package/schemas/messages.json +6 -2
  44. package/schemas/send.json +6 -2
  45. package/skills/sideby/SKILL.md +1 -1
  46. package/skills/sideby/references/panel.md +1 -1
  47. package/skills/sideby/references/sessions.md +6 -3
@@ -63,9 +63,13 @@
63
63
  {
64
64
  "type": "string",
65
65
  "const": "paste-needed"
66
+ },
67
+ {
68
+ "type": "string",
69
+ "const": "unknown"
66
70
  }
67
71
  ],
68
- "description": "stored: kept as a file only; delivered: the host's own channel took it; read: it shows in the target's record; paste-needed: the user pastes pasteText into the target."
72
+ "description": "stored: kept as a file only; delivered: the host's own channel took it; read: it shows in the target's record; paste-needed: the user pastes pasteText into the target; unknown: the channel was given it but never confirmed it (ADR-0065), so it may still arrive: check the target before sending or pasting again. unknown becomes read when the id shows in the target's record and never changes by itself otherwise."
69
73
  },
70
74
  "file": {
71
75
  "type": "string",
@@ -84,7 +88,7 @@
84
88
  },
85
89
  "note": {
86
90
  "type": "string",
87
- "description": "Why a paste is needed, or that the target must approve it (bypass mode)."
91
+ "description": "Why a paste is needed, that the target must approve it (bypass mode), or why the delivery could not be confirmed."
88
92
  },
89
93
  "needsApproval": {
90
94
  "type": "boolean",
package/schemas/send.json CHANGED
@@ -62,9 +62,13 @@
62
62
  {
63
63
  "type": "string",
64
64
  "const": "paste-needed"
65
+ },
66
+ {
67
+ "type": "string",
68
+ "const": "unknown"
65
69
  }
66
70
  ],
67
- "description": "stored: kept as a file only; delivered: the host's own channel took it; read: it shows in the target's record; paste-needed: the user pastes pasteText into the target."
71
+ "description": "stored: kept as a file only; delivered: the host's own channel took it; read: it shows in the target's record; paste-needed: the user pastes pasteText into the target; unknown: the channel was given it but never confirmed it (ADR-0065), so it may still arrive: check the target before sending or pasting again. unknown becomes read when the id shows in the target's record and never changes by itself otherwise."
68
72
  },
69
73
  "file": {
70
74
  "type": "string",
@@ -83,7 +87,7 @@
83
87
  },
84
88
  "note": {
85
89
  "type": "string",
86
- "description": "Why a paste is needed, or that the target must approve it (bypass mode)."
90
+ "description": "Why a paste is needed, that the target must approve it (bypass mode), or why the delivery could not be confirmed."
87
91
  },
88
92
  "needsApproval": {
89
93
  "type": "boolean",
@@ -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.32.1"
5
+ version: "0.33.0"
6
6
  requires:
7
7
  bins: [sideby, node]
8
8
  cliHelp: sideby --help
@@ -74,6 +74,6 @@ To turn it on ("start sideby at login", "开机启动"), run `sideby autostart o
74
74
 
75
75
  `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.
76
76
 
77
- 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 tightest of those reaches its warning level, the title shows that tool and percent, such as `Codex 61%`: a 5-hour window turns orange at 60% and red at 85%, a weekly one orange at 85% and red at 95% (ADR-0062). Each row's `reset` names the window that runs out first and when it resets (`7d · in 4d 17h`). 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`).
77
+ 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 tightest of those reaches its warning level, the title shows that tool and percent, such as `Codex 61%`: a 5-hour window turns orange at 60% and red at 85%, a weekly one orange at 85% and red at 95% (ADR-0062). Each row's `reset` names the window that runs out first and when it resets (`resetLabel` and `resetTime`, such as `7d · in 4h 20m`, `7d · tomorrow 4:59 PM` or `7d · Wed 4:59 PM`: a countdown under a day, then tomorrow, a weekday, a date; the Panel and `sideby quota` use the same words). A bar with `passed: true` is a window past its reset with no newer reading (shown grey with `–`); when every window has passed, `reset` says the reset is due and Refresh checks now. During a manual refresh, rows still waiting for their answer have `refreshing: true` and rows whose answer failed `refreshFailed: true`. 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`).
78
78
 
79
79
  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.
@@ -34,14 +34,17 @@ When the user asks you to tell another session something ("告诉 cc002 测试
34
34
 
35
35
  sideby keeps the Message first as a file (`message.file`, mode 600, screenshots copied next to it), then:
36
36
 
37
- - `status: "delivered"`: a Claude Code session got it at once through Claude Code's own messages between sessions. Its first line names the sender (the session you run in, found by sideby) or "the user via sideby", then the text, then one `Screenshot: <path>` line per screenshot. Tell the user it was delivered.
37
+ - `status: "delivered"`: a Claude Code session got it at once through Claude Code's own messages between sessions. Its first line names the sender (the session you run in, found by sideby) or "the user via sideby", then the text, then one `Screenshot: <path>` line per screenshot, and, when sideby identified the sending session exactly, a last line `Reply: sideby send <sender session id> "<text>"` (also at the end of the Message file). Tell the user it was delivered.
38
38
  - `status: "delivered"` for Codex means Codex queued it (`codex queue`, Codex 0.163 or later): the session reads it when its current turn ends, or within about 10 s when idle. `status: "paste-needed"`: Grok Build and pi have no channel sideby can deliver to yet (or the Claude session could not be reached; `note` says why in plain words). `pasteText` is one line telling the other AI to read the Message file; `copied: true` means it is on the clipboard. Tell the user to paste it into the tab of `message.to`.
39
+ - `status: "unknown"` (the user sees **Not confirmed** / 未确认送达): sideby handed it over but could not tell whether it arrived (`codex queue` started and did not finish within 20 s, or the Claude socket took the line but never confirmed it); `note` says why, and that the session has ended when it has. It may still show up, so `copied` is false and you must not paste or send it again right away: tell the user it is not confirmed and to look at that session first. `pasteText` is there for when it never shows up; say that pasting it too may deliver it twice. It turns to `read` once its id shows in the target's record, and never turns into anything else by itself.
39
40
  - `needsApproval: true` (with a `note` saying the session "waits for your approval"): that Claude session holds Messages (`crossSessionInbound` is `hold`, or not set while it runs in bypass permission mode), so it waits for the user to approve the message in its terminal and drops it after about 5 minutes. Tell the user. If the target is a headless worker you or an orchestrator started (`claude -p`), the narrow fix is to start it with `--settings '{"crossSessionInbound":"accept"}'`, which applies to that one session only; for an interactive session the user cannot restart with a flag, offer `sideby messages inbound accept` (below), which changes the account's settings for every session.
40
41
  - Delivery works on macOS, Linux and WSL 2: sideby accepts the socket under `$XDG_RUNTIME_DIR/cc-socks/` (Linux, WSL) and under the system temp folder's `cc-socks/` or per-user `cc-socks-<uid>/` (macOS). Native Windows has a named pipe sideby does not write to; those sessions get `paste-needed`.
41
42
 
42
- `sideby messages --json` lists what was sent, newest first; `status: "read"` means the Message id shows in the target's record (it took it in). `needsApproval: true` stays until it is read; a held Message still unread after 6 minutes turns to `paste-needed`, because Claude Code dropped it. `--to <account|session>` narrows it.
43
+ `sideby messages --json` lists what was sent, newest first; `status: "read"` means the Message id shows in the target's record (it took it in). `needsApproval: true` stays until it is read; a held Message still unread after 6 minutes turns to `paste-needed`, because Claude Code dropped it. An `unknown` one stays `unknown` until its id shows (then `read`); the text table calls it `Not confirmed`. `--to <account|session>` narrows it.
43
44
 
44
- When you are the receiving AI and see "sideby message <id> from …" or "Read the message sideby kept for you at <file>", read that file and the screenshots it lists, then act on it as a request from the user.
45
+ When you are the receiving AI and see "sideby message <id> from …" or "Read the message sideby kept for you at <file>", read that file and the screenshots it lists, then act on it as a request from the user. To answer, run the `Reply:` line it ends with, putting your answer in place of `<text>` as one shell argument: wrap it in single quotes, and write each `'` inside it as `'\''` (for example `sideby send 61230c3d-… 'Done; it'\''s pushed'`). A Message without that line came from the user or from a sender sideby could only guess: answer the user instead.
46
+
47
+ To hear when another Claude Code session has finished before you tell it the next thing, sideby has nothing of its own: use Claude Code's own `SendMessage` with `notify_when_idle: true` (Claude Code's cross-session messaging, https://code.claude.com/docs/en/cross-session-messaging), which works from your main conversation for your Claude Code sessions on this machine (Claude Code 2.1.236 or later in both).
45
48
 
46
49
  ### Let Claude sessions show messages at once
47
50