sideby 0.24.0 → 0.26.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/README.md +3 -1
- package/ai-tasks.json +17 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +14 -0
- package/dist/src/cli/commands.js +120 -12
- package/dist/src/cli/json-schemas.js +47 -0
- package/dist/src/cli/main.js +41 -6
- package/dist/src/core/ask.d.ts +10 -6
- package/dist/src/core/ask.js +52 -9
- package/dist/src/core/config.d.ts +16 -0
- package/dist/src/core/config.js +16 -0
- package/dist/src/core/egress.d.ts +103 -0
- package/dist/src/core/egress.js +333 -0
- package/dist/src/core/handoff-run.d.ts +4 -2
- package/dist/src/core/handoff-run.js +18 -11
- package/dist/src/core/launch.d.ts +5 -1
- package/dist/src/core/launch.js +5 -0
- package/dist/src/core/network.d.ts +131 -0
- package/dist/src/core/network.js +317 -0
- package/dist/src/families/agy/index.js +4 -1
- package/dist/src/families/claude/index.js +4 -1
- package/dist/src/families/codex/index.js +8 -1
- package/dist/src/families/grok/index.js +4 -1
- package/dist/src/families/pi/index.js +4 -1
- package/dist/src/network/hook.d.ts +15 -0
- package/dist/src/network/hook.js +69 -0
- package/dist/src/panel/handler.d.ts +3 -0
- package/dist/src/panel/handler.js +33 -1
- package/dist/src/panel/i18n.d.ts +51 -0
- package/dist/src/panel/i18n.js +102 -0
- package/dist/src/panel/page-logic.d.ts +23 -1
- package/dist/src/panel/page-logic.js +33 -0
- package/dist/src/panel/page-script.js +130 -2
- package/dist/src/panel/page-styles.js +11 -3
- package/dist/src/runtime.d.ts +18 -1
- package/dist/src/runtime.js +78 -7
- package/dist/src/types.d.ts +7 -0
- package/package.json +2 -2
- package/schemas/config.json +20 -0
- package/schemas/network-set.json +129 -0
- package/schemas/network.json +199 -0
- package/schemas/try.json +4 -0
- package/skills/sideby/SKILL.md +3 -2
- package/skills/sideby/references/ai-tasks.md +2 -1
- package/skills/sideby/references/network.md +37 -0
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 ("找一下我上周改登录页的那个会话"), 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.26.0"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -66,12 +66,13 @@ Account refs are `<family>:<name>`; a bare `<name>` works only when it is unique
|
|
|
66
66
|
| Short commands say "command not found" in a new terminal ("cc 用不了", "短命令不生效") | `sideby shell-init setup --json` (exit 10 first) | `references/setup.md` |
|
|
67
67
|
| Do something in sideby as an AI Task (the first message came from sideby or the Panel's "Let AI do it") | follow the task it names | `references/ai-tasks.md` |
|
|
68
68
|
| A Portal starts AI Tasks through sideby, or one of its tasks failed (`spec-version`, `bad-cwd`, "which account would it use?") | `sideby ask --choices --json`, `sideby ask --spec - --print --json` (read only) | `references/ai-tasks.md` |
|
|
69
|
-
| Add an API account from a vendor's address or docs link, enter its key, check it works | `sideby new <family> --next --api --json`, then the user runs `sideby key <ref>`; `sideby try <ref> --json` (exit 10 first) | `references/ai-tasks.md` |
|
|
69
|
+
| Add an API account from a vendor's address or docs link, enter its key, check it works (also with a given model: "用 glm-5.3 试一下 pi") | `sideby new <family> --next --api --json`, then the user runs `sideby key <ref>`; `sideby try <ref|short command> [--model <m>] --json` (exit 10 first) | `references/ai-tasks.md` |
|
|
70
70
|
| Support a tool sideby does not list yet, or write a plugin | `sideby plugins new <id> --json`, `sideby plugins check <id> --json` | `references/ai-tasks.md` |
|
|
71
71
|
| Choose the terminal the Panel opens for AI Tasks and sign-in | `sideby terminal --json`, `sideby terminal --set <id> --json` | — |
|
|
72
72
|
| Tune the auto-compact threshold ("which compaction setting costs the fewest tokens"), use the suggestion or undo it | `sideby tune --json`, `sideby tune apply` (exit 10 first), `sideby tune undo` | `references/diagnose.md` |
|
|
73
73
|
| See or set the model and effort an account starts with ("用哪个模型", "set effort to high for cc002") | `sideby model <acct> --json`; `sideby model <acct> <model\|default> --effort <level\|default>` (exit 10 first, then `--yes` after the user agrees) | — |
|
|
74
74
|
| Stop Claude sessions from connecting to claude.ai / the Claude app by themselves ("关闭 remote control", "别让别人远程看到对话") for every account | `sideby remote-control --json`, then `sideby remote-control off` (exits 10 with the change; rerun with `--yes` after they agree); `sideby remote-control undo` puts it back; `sideby remote-control on` turns it back on the same way (only when they ask for it) | — |
|
|
75
|
+
| 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` |
|
|
75
76
|
| See Claude quota (it shows `not-enabled`) | `sideby quota setup claude` (exits 10) | `references/quota.md` |
|
|
76
77
|
| 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` |
|
|
77
78
|
| See everything at once | `sideby ui` (local panel on `127.0.0.1:17420`; `--no-open` prints the address) | — |
|
|
@@ -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|theme|menubar|hotkey`; "Let AI pick my colors" in the Panel's Theme dialog starts `theme`, see `references/themes.md`; "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.
|
|
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|theme|menubar|hotkey|network`; "Let AI help" in the Panel's Network check dialog and on its wrong-network banner starts `network`, see `references/network.md`; "Let AI pick my colors" in the Panel's Theme dialog starts `theme`, see `references/themes.md`; "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
|
|
|
@@ -61,6 +61,7 @@ sideby ships no list of vendors, addresses or model names. Take every fact from
|
|
|
61
61
|
3. Set every variable except the key: show the user the lines you will add to `proxy.env` and add them after they agree. Do not read the file's other lines, and never write a key into it.
|
|
62
62
|
4. Tell the user to run `sideby key <ref>` in their own terminal (or click **Enter key** in the Panel). Add `--var <NAME>` when the key belongs in a variable other than the Family's default. Wait until they say it is done.
|
|
63
63
|
5. Offer `sideby try <ref> --json`: it exits 10 and says which command it runs and that it costs a few tokens. After they agree, run it with `--yes`. Exit 0 means the Host answered. On 1, read the Host's message it shows and check the mistakes below.
|
|
64
|
+
- To check one model, add `--model <model>` (for pi `provider/id`, optionally `:<thinking>`). It replaces the model the account's settings choose, this once, and writes nothing. To check a short command the user made (such as one with its own model), pass the short command instead of the ref: its arguments apply as in `sideby run`. Do not run the Host by hand to test a model.
|
|
64
65
|
|
|
65
66
|
Common mistakes:
|
|
66
67
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Network check: stop Claude and Codex on the wrong network
|
|
2
|
+
|
|
3
|
+
Network Guard (spec §3.35, ADR-0053) checks the country a Host's requests leave from (its Egress): before sideby starts a Claude or Codex account, and before each prompt and tool call in a session sideby started. When the country is not one the user allows, or cannot be told within 3 seconds, it stops and says what to do. It guards against a proxy that stopped or a node in the wrong country. It does not make use from a region the vendor does not support allowed; say so if the user seems to expect that, and never help hide where they are (time zone, fingerprints).
|
|
4
|
+
|
|
5
|
+
## See where requests leave from
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
sideby network --json # the setting and the newest result per address, from the cache (no request)
|
|
9
|
+
sideby network check --json # ask every address now
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Each `targets[]` row is one address sideby asks (`api.anthropic.com` for Claude, `chatgpt.com` for Codex subscription accounts, `api.openai.com` for Codex API accounts) with `status` (`ok`, `blocked`, `unknown`, `not-checked`), `loc` (the country) and the `accounts` checked there. `accounts[].skip` says why an account is not checked: `third-party` (an API account on another endpoint) or `at-launch` (an API account, whose address is known only when it starts).
|
|
13
|
+
|
|
14
|
+
## Turn it on
|
|
15
|
+
|
|
16
|
+
Ask the user which countries their requests may leave from. Never choose for them, and never add the current country because it is current: on a wrong network that would allow the wrong country. Then:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
sideby network allow US JP --json # exit 10 with the change; rerun with --yes after they agree
|
|
20
|
+
sideby network on --json # exit 10; rerun with --yes after they agree
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`on` is refused while no country is allowed (`network-allow-empty`). `sideby network off --yes --json` turns it off. Codes are two letters (ISO 3166-1 alpha-2): US, JP, SG, GB, DE.
|
|
24
|
+
|
|
25
|
+
Tell the user, once:
|
|
26
|
+
- Only sessions sideby starts are checked (`sideby run`, short commands, `sideby next`, Auto Handoff, AI Tasks). Running `claude` or `codex` directly is not.
|
|
27
|
+
- Codex runs the hook only after they trust it once: in that account type `/hooks` and trust `network-hook`. Until then Codex is checked only before starting.
|
|
28
|
+
- A Claude session started with its own `--settings` is checked only before starting.
|
|
29
|
+
- sideby asks the vendor's own `/cdn-cgi/trace` through the account's proxy settings, with no credential, and keeps only the country and a hash of the address. The Panel has the same switch under **Settings › Network check**.
|
|
30
|
+
|
|
31
|
+
## As an AI Task
|
|
32
|
+
|
|
33
|
+
The Panel's **Let AI help** (in the Network check dialog and on the wrong-network banner) starts the `network` AI Task (`sideby ask --task network`). Its prompt carries the switch, the allowed countries and the newest result per address (countries only, never an address). Follow it: run `sideby network check --json`, ask which countries, preview, then `--yes` after they agree.
|
|
34
|
+
|
|
35
|
+
## When something was blocked
|
|
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.
|