sideby 0.16.1 → 0.18.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 +7 -3
- package/ai-tasks.json +90 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +25 -1
- package/dist/src/cli/commands.js +802 -15
- package/dist/src/cli/json-schemas.js +252 -1
- package/dist/src/cli/main.js +143 -4
- package/dist/src/core/after-install.d.ts +54 -0
- package/dist/src/core/after-install.js +78 -0
- package/dist/src/core/ask.d.ts +222 -0
- package/dist/src/core/ask.js +465 -0
- package/dist/src/core/attachments.d.ts +50 -0
- package/dist/src/core/attachments.js +442 -0
- package/dist/src/core/autostart.d.ts +118 -0
- package/dist/src/core/autostart.js +302 -0
- package/dist/src/core/brand-mark.d.ts +49 -11
- package/dist/src/core/brand-mark.js +116 -38
- package/dist/src/core/config.d.ts +102 -0
- package/dist/src/core/config.js +289 -11
- package/dist/src/core/desktop-app.d.ts +1 -1
- package/dist/src/core/desktop-app.js +2 -2
- package/dist/src/core/edit-settings.d.ts +24 -0
- package/dist/src/core/edit-settings.js +97 -0
- package/dist/src/core/handoff-brief.d.ts +4 -2
- package/dist/src/core/handoff-brief.js +6 -1
- package/dist/src/core/handoff-chain.d.ts +24 -0
- package/dist/src/core/handoff-chain.js +2 -0
- package/dist/src/core/handoff-run.d.ts +4 -3
- package/dist/src/core/handoff-run.js +14 -9
- package/dist/src/core/launch.d.ts +17 -4
- package/dist/src/core/launch.js +32 -24
- package/dist/src/core/local-build.d.ts +17 -5
- package/dist/src/core/local-build.js +61 -23
- package/dist/src/core/lock.d.ts +30 -0
- package/dist/src/core/lock.js +143 -0
- package/dist/src/core/probe.d.ts +78 -0
- package/dist/src/core/probe.js +127 -0
- package/dist/src/core/quota-levels.d.ts +6 -1
- package/dist/src/core/quota-levels.js +16 -5
- package/dist/src/core/same-login.d.ts +9 -4
- package/dist/src/core/same-login.js +9 -4
- package/dist/src/core/secret-file.d.ts +26 -0
- package/dist/src/core/secret-file.js +126 -7
- package/dist/src/core/task-spec.d.ts +95 -0
- package/dist/src/core/task-spec.js +209 -0
- package/dist/src/core/terminal.d.ts +93 -0
- package/dist/src/core/terminal.js +376 -0
- package/dist/src/core/update.d.ts +34 -12
- package/dist/src/core/update.js +96 -84
- package/dist/src/desktop/icon.js +12 -15
- package/dist/src/families/claude/ai-task.d.ts +8 -0
- package/dist/src/families/claude/ai-task.js +38 -0
- package/dist/src/families/claude/handoff-hook.js +4 -4
- package/dist/src/families/claude/index.js +6 -0
- package/dist/src/families/claude/quota-cache.d.ts +24 -7
- package/dist/src/families/claude/quota-cache.js +72 -21
- package/dist/src/families/codex/handoff-hook.js +4 -4
- package/dist/src/families/codex/index.js +16 -0
- package/dist/src/families/codex/login-key.d.ts +8 -0
- package/dist/src/families/codex/login-key.js +33 -0
- package/dist/src/families/grok/handoff-hook.js +4 -4
- package/dist/src/families/grok/index.js +4 -0
- package/dist/src/families/login-keys.d.ts +6 -0
- package/dist/src/families/login-keys.js +6 -0
- package/dist/src/families/pi/index.js +5 -0
- package/dist/src/handoff/hook.js +51 -30
- package/dist/src/handoff/levels.d.ts +24 -0
- package/dist/src/handoff/levels.js +70 -0
- package/dist/src/handoff/messages.d.ts +6 -3
- package/dist/src/handoff/messages.js +20 -7
- package/dist/src/handoff/reader.d.ts +6 -3
- package/dist/src/menubar/agent.d.ts +3 -0
- package/dist/src/menubar/agent.js +21 -0
- package/dist/src/menubar/script.d.ts +8 -0
- package/dist/src/menubar/script.js +457 -0
- package/dist/src/menubar/snapshot.d.ts +115 -0
- package/dist/src/menubar/snapshot.js +255 -0
- package/dist/src/menubar/strings.d.ts +87 -0
- package/dist/src/menubar/strings.js +88 -0
- package/dist/src/panel/background.js +15 -21
- package/dist/src/panel/handler.d.ts +41 -2
- package/dist/src/panel/handler.js +394 -10
- package/dist/src/panel/i18n.d.ts +205 -2
- package/dist/src/panel/i18n.js +441 -35
- package/dist/src/panel/page-logic.d.ts +301 -0
- package/dist/src/panel/page-logic.js +532 -0
- package/dist/src/panel/page-script.js +1135 -185
- package/dist/src/panel/page-styles.js +111 -32
- package/dist/src/panel/page.d.ts +12 -0
- package/dist/src/panel/page.js +7 -0
- package/dist/src/panel/server.d.ts +16 -2
- package/dist/src/panel/server.js +41 -13
- package/dist/src/plugins/check.d.ts +47 -0
- package/dist/src/plugins/check.js +544 -0
- package/dist/src/plugins/scaffold.d.ts +21 -0
- package/dist/src/plugins/scaffold.js +123 -0
- package/dist/src/quota/statusline-tap.js +1 -1
- package/dist/src/runtime.d.ts +19 -1
- package/dist/src/runtime.js +53 -14
- package/dist/src/types.d.ts +33 -0
- package/package.json +4 -3
- package/schemas/ask-choices.json +168 -0
- package/schemas/ask-print.json +87 -0
- package/schemas/ask.json +180 -0
- package/schemas/autostart.json +165 -0
- package/schemas/config-get.json +132 -0
- package/schemas/config-set.json +107 -0
- package/schemas/config.json +90 -7
- package/schemas/edit.json +119 -0
- package/schemas/error.json +4 -0
- package/schemas/families.json +4 -0
- package/schemas/key.json +93 -0
- package/schemas/list.json +4 -0
- package/schemas/local.json +1 -1
- package/schemas/menubar-snapshot.json +646 -0
- package/schemas/menubar-start.json +112 -0
- package/schemas/menubar.json +165 -0
- package/schemas/plugins-check.json +113 -0
- package/schemas/plugins-new.json +87 -0
- package/schemas/terminal.json +152 -0
- package/schemas/try.json +109 -0
- package/schemas/update.json +4 -0
- package/skills/sideby/SKILL.md +16 -6
- package/skills/sideby/references/accounts.md +1 -1
- package/skills/sideby/references/ai-tasks.md +126 -0
- package/skills/sideby/references/handoff.md +3 -1
- package/skills/sideby/references/panel.md +20 -0
- package/skills/sideby/references/update.md +1 -1
package/README.md
CHANGED
|
@@ -26,10 +26,10 @@ sideby new claude work # create ~/.claude-work, sharing ~/.claude's sk
|
|
|
26
26
|
sideby login claude:work # sign in once
|
|
27
27
|
sideby run work # Claude Code on the work account
|
|
28
28
|
sideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude
|
|
29
|
-
sideby ui
|
|
29
|
+
sideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
`sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.
|
|
32
|
+
`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.
|
|
33
33
|
|
|
34
34
|
## Set up with your AI agent
|
|
35
35
|
|
|
@@ -46,7 +46,7 @@ The agent checks Node and your Host CLIs, installs sideby and the skill, creates
|
|
|
46
46
|
|
|
47
47
|
The 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.
|
|
48
48
|
|
|
49
|
-
https://github.com/user-attachments/assets/
|
|
49
|
+
https://github.com/user-attachments/assets/d1d7e8dd-1df1-4881-ac88-e468c2dd4a1d
|
|
50
50
|
|
|
51
51
|
<img alt="Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account" src="https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif" width="1280">
|
|
52
52
|
|
|
@@ -72,6 +72,9 @@ cc-switch's docs describe that switch: it writes the live settings file ([README
|
|
|
72
72
|
|
|
73
73
|
| You want to | Run | Guide |
|
|
74
74
|
|---|---|---|
|
|
75
|
+
| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |
|
|
76
|
+
| See quota at a glance in the macOS menu bar | **Settings › Startup** in the panel, or `sideby menubar on` | [Quota in the menu bar](docs/guide/usage.md#quota-in-the-menu-bar) |
|
|
77
|
+
| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |
|
|
75
78
|
| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |
|
|
76
79
|
| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |
|
|
77
80
|
| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |
|
|
@@ -113,6 +116,7 @@ macOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 2
|
|
|
113
116
|
- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.
|
|
114
117
|
- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).
|
|
115
118
|
- `doctor --fix` never replaces a real file and never changes where a link points.
|
|
119
|
+
- The panel answers only on `127.0.0.1` and refuses web pages from other sites, but it trusts every user of this computer. On a shared Mac, do not leave it running in the background ([details](docs/guide/panel.md#who-can-reach-the-panel)).
|
|
116
120
|
|
|
117
121
|
Details and the terms-of-service question are in the [FAQ](docs/guide/faq.md).
|
|
118
122
|
|
package/ai-tasks.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"tools": {
|
|
4
|
+
"accounts": {
|
|
5
|
+
"skill": "sideby",
|
|
6
|
+
"skillInstall": "npx skills add Adonis0123/sideby -g",
|
|
7
|
+
"cwd": "engine",
|
|
8
|
+
"contribute": { "repo": "https://github.com/Adonis0123/sideby", "guide": "CONTRIBUTING.md" },
|
|
9
|
+
"presets": [
|
|
10
|
+
{
|
|
11
|
+
"id": "fix",
|
|
12
|
+
"native": true,
|
|
13
|
+
"title": { "en": "Let AI fix it", "zh": "让 AI 修复" },
|
|
14
|
+
"placeholder": { "en": "Anything to add? You can leave this empty", "zh": "想补充什么?可以不填" },
|
|
15
|
+
"examples": [
|
|
16
|
+
{ "en": "Fix these problems for me", "zh": "帮我修好这些问题" },
|
|
17
|
+
{ "en": "Explain them first, then fix them", "zh": "先解释一下再修" }
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"id": "quota",
|
|
22
|
+
"native": true,
|
|
23
|
+
"title": { "en": "Ask AI why", "zh": "问 AI 为什么" },
|
|
24
|
+
"placeholder": { "en": "Anything to add? You can leave this empty", "zh": "想补充什么?可以不填" },
|
|
25
|
+
"examples": [
|
|
26
|
+
{ "en": "Why can't I see my quota?", "zh": "为什么看不到额度" },
|
|
27
|
+
{ "en": "Turn on the quota display for me", "zh": "帮我开启额度显示" }
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "account",
|
|
32
|
+
"native": true,
|
|
33
|
+
"title": { "en": "Let AI set up an account", "zh": "让 AI 帮我配账号" },
|
|
34
|
+
"placeholder": {
|
|
35
|
+
"en": "For example: I have a DeepSeek API key",
|
|
36
|
+
"zh": "比如:我有一个 DeepSeek 的 API key"
|
|
37
|
+
},
|
|
38
|
+
"examples": [
|
|
39
|
+
{ "en": "Add a Claude subscription account", "zh": "加一个 Claude 订阅账号" },
|
|
40
|
+
{ "en": "I have an API address or a docs link", "zh": "我有一个 API 地址或文档链接" }
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "host",
|
|
45
|
+
"native": true,
|
|
46
|
+
"title": { "en": "Let AI support a new tool", "zh": "让 AI 支持一个新工具" },
|
|
47
|
+
"placeholder": { "en": "Which tool do you want to use?", "zh": "你想用哪个工具?" },
|
|
48
|
+
"examples": [
|
|
49
|
+
{ "en": "I want to use Gemini CLI", "zh": "我想用 Gemini CLI" },
|
|
50
|
+
{ "en": "I want to use OpenCode", "zh": "我想用 OpenCode" }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "plugin",
|
|
55
|
+
"native": true,
|
|
56
|
+
"title": { "en": "Let AI write a plugin", "zh": "让 AI 写插件" },
|
|
57
|
+
"placeholder": { "en": "What should the plugin do?", "zh": "你想让插件做什么?" },
|
|
58
|
+
"examples": [
|
|
59
|
+
{ "en": "Switch my proxy before each launch", "zh": "启动前自动切换代理" },
|
|
60
|
+
{ "en": "Copy my settings into each new account", "zh": "新建账号时复制我的配置" }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "terminal",
|
|
65
|
+
"native": true,
|
|
66
|
+
"title": { "en": "Let AI set up your terminal", "zh": "让 AI 帮我配终端" },
|
|
67
|
+
"placeholder": { "en": "Which terminal do you use?", "zh": "你用的是什么终端?" },
|
|
68
|
+
"examples": [
|
|
69
|
+
{ "en": "I use Warp", "zh": "我用 Warp" },
|
|
70
|
+
{ "en": "sideby doesn't recognize my terminal", "zh": "我用的终端没被认出来" }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "handoff",
|
|
75
|
+
"native": true,
|
|
76
|
+
"title": { "en": "Let AI tune it", "zh": "让 AI 帮我调" },
|
|
77
|
+
"placeholder": {
|
|
78
|
+
"en": "Anything to add? For example: use work first",
|
|
79
|
+
"zh": "想补充什么?比如:先用 work"
|
|
80
|
+
},
|
|
81
|
+
"examples": [
|
|
82
|
+
{ "en": "Recommend a threshold for my accounts", "zh": "按我的账号推荐阈值" },
|
|
83
|
+
{ "en": "Use my team account last", "zh": "团队账号放到最后" },
|
|
84
|
+
{ "en": "Explain how a handoff works first", "zh": "先讲讲接力是怎么工作的" }
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261019T082103-0c6910"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DoctorReport } from '../core/doctor.ts';
|
|
2
2
|
import { type HandoffIo } from '../core/handoff-run.ts';
|
|
3
|
+
import { type Runtime } from '../runtime.ts';
|
|
3
4
|
import type { Account, Finding } from '../types.ts';
|
|
4
5
|
import { type ParsedArgs } from './args.ts';
|
|
5
6
|
export interface Io {
|
|
@@ -66,7 +67,8 @@ export declare function cmdShellInit(a: ParsedArgs, io: Io): Promise<number>;
|
|
|
66
67
|
export declare function cmdUi(a: ParsedArgs, io: Io): Promise<number>;
|
|
67
68
|
/**
|
|
68
69
|
* `sideby update [--yes] [--json]` (spec §3.23): asks the registry now, shows what an Update runs, and runs it with
|
|
69
|
-
* `--yes` (exit 10 before). An install sideby cannot update gets the command to run and exit 1.
|
|
70
|
+
* `--yes` (exit 10 before). An install sideby cannot update gets the command to run and exit 1. `--skill` updates the
|
|
71
|
+
* skill alone (cmdUpdateSkill).
|
|
70
72
|
*/
|
|
71
73
|
export declare function cmdUpdate(a: ParsedArgs, io: Io): Promise<number>;
|
|
72
74
|
/** The internal `sideby update-check` the CLI starts detached: one Update Check, then Auto Update if it is on. */
|
|
@@ -82,8 +84,30 @@ export declare function cmdApp(a: ParsedArgs, io: Io): Promise<number>;
|
|
|
82
84
|
* a Grok Bot window, new or open, and with `--remove` its removal (ADR-0019).
|
|
83
85
|
*/
|
|
84
86
|
export declare function cmdDesktop(a: ParsedArgs, io: Io): Promise<number>;
|
|
87
|
+
/** `sideby edit <account> [--path]`: the Account's Host settings file in the user's editor (spec §3.30, ADR-0033). */
|
|
88
|
+
export declare function cmdEdit(a: ParsedArgs, io: Io): Promise<number>;
|
|
85
89
|
/** `sideby browser [--enable|--disable] [--yes]` and `sideby browser open <account> [--profile <p>]` (spec §3.24). */
|
|
86
90
|
export declare function cmdBrowser(a: ParsedArgs, io: Io): Promise<number>;
|
|
87
91
|
export declare function cmdAlias(a: ParsedArgs, io: Io): Promise<number>;
|
|
88
92
|
/** `sideby families [family]`: each Family's layout, sign-in and Shared Items, from its FamilyDef (spec §3.16). */
|
|
89
93
|
export declare function cmdFamilies(a: ParsedArgs, io: Io): Promise<number>;
|
|
94
|
+
/** `sideby ask` arguments: `--attach` may repeat, so main.ts collects every value here. */
|
|
95
|
+
export type AskArgs = ParsedArgs & {
|
|
96
|
+
attach?: string[];
|
|
97
|
+
};
|
|
98
|
+
/** AI Task CLI; the terminal receives only an opaque task id. */
|
|
99
|
+
export declare function cmdAsk(a: AskArgs, io: Io, runtime?: Runtime): Promise<number>;
|
|
100
|
+
export declare function cmdTerminal(a: ParsedArgs, io: Io): Promise<number>;
|
|
101
|
+
/** Reads a key only from an interactive terminal, restoring its original mode on every exit. */
|
|
102
|
+
export declare function readKeyLine(input?: NodeJS.ReadStream): Promise<string>;
|
|
103
|
+
export declare function cmdKey(a: ParsedArgs, io: Io, runtime?: Runtime): Promise<number>;
|
|
104
|
+
export declare function cmdTry(a: ParsedArgs, io: Io): Promise<number>;
|
|
105
|
+
/** `sideby autostart [on|off] [--yes]` (spec §3.29, ADR-0029): start the Panel in the background at login. */
|
|
106
|
+
export declare function cmdAutostart(a: ParsedArgs, io: Io): Promise<number>;
|
|
107
|
+
/**
|
|
108
|
+
* `sideby menubar [on|off] [--yes]`, `menubar snapshot` and `menubar start <account>` (spec §3.31, ADR-0034): quota in
|
|
109
|
+
* the macOS menu bar.
|
|
110
|
+
*/
|
|
111
|
+
export declare function cmdMenubar(a: ParsedArgs, io: Io): Promise<number>;
|
|
112
|
+
/** `sideby config get|set|unset` (spec §3.29): every setting has a command. */
|
|
113
|
+
export declare function cmdConfig(a: ParsedArgs, io: Io): Promise<number>;
|