sideby 0.30.0 → 0.30.2
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 +1 -1
- package/dist/src/cli/commands.js +9 -2
- package/dist/src/cli/main.js +18 -0
- package/dist/src/runtime.d.ts +10 -2
- package/dist/src/runtime.js +6 -0
- package/package.json +1 -1
- package/skills/sideby/SKILL.md +1 -1
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261029T113804-48bf3a"}
|
|
@@ -64,7 +64,7 @@ export declare function cmdRun(a: ParsedArgs, io: Io, command: 'run' | 'login'):
|
|
|
64
64
|
* `sideby resume <family>`: what the Host-named shell function calls (spec §3.15). Starts the Account that holds the
|
|
65
65
|
* session the arguments resume by id, a new session where a never-saved one started (ADR-0009), or the Host unchanged.
|
|
66
66
|
*/
|
|
67
|
-
export declare function cmdResume(a: ParsedArgs, io: Io): Promise<number>;
|
|
67
|
+
export declare function cmdResume(a: ParsedArgs, io: Io, runtime?: Runtime): Promise<number>;
|
|
68
68
|
/** `sideby next <family>`: recommend the Account with the most room, then start it (spec §3.13). */
|
|
69
69
|
export declare function cmdNext(a: ParsedArgs, io: Io): Promise<number>;
|
|
70
70
|
export declare function cmdDoctor(a: ParsedArgs, io: Io): Promise<number>;
|
package/dist/src/cli/commands.js
CHANGED
|
@@ -591,13 +591,20 @@ async function runPick(rt, name, args, io, opts = {}) {
|
|
|
591
591
|
* `sideby resume <family>`: what the Host-named shell function calls (spec §3.15). Starts the Account that holds the
|
|
592
592
|
* session the arguments resume by id, a new session where a never-saved one started (ADR-0009), or the Host unchanged.
|
|
593
593
|
*/
|
|
594
|
-
export async function cmdResume(a, io) {
|
|
594
|
+
export async function cmdResume(a, io, runtime) {
|
|
595
595
|
const [family, ...extra] = a.positionals;
|
|
596
596
|
if (!family)
|
|
597
597
|
throw new UsageError('usage: sideby resume <family> [-- host args]');
|
|
598
|
-
const rt = await createRuntime();
|
|
598
|
+
const rt = runtime ?? (await createRuntime());
|
|
599
599
|
const { args, flags } = takeLaunchFlags([...extra, ...a.rest]);
|
|
600
600
|
const route = await rt.resumeLaunch(family, args, flags);
|
|
601
|
+
// The Main Account under `handoff.auto` starts exactly as `sideby run` would (ADR-0058).
|
|
602
|
+
if (route.run && route.account) {
|
|
603
|
+
io.err(c.dim(route.newSession
|
|
604
|
+
? `sideby: session ${route.sessionId} was never saved; starting a new session in ${route.account.ref} with Auto Handoff`
|
|
605
|
+
: `sideby: session ${route.sessionId} is in ${route.account.ref}; starting it there with Auto Handoff`));
|
|
606
|
+
return runAccount(rt, route.account.ref, route.run.args, io, flags);
|
|
607
|
+
}
|
|
601
608
|
if (route.launch.notice)
|
|
602
609
|
io.err(c.cyan(route.launch.notice));
|
|
603
610
|
if (route.newSession)
|
package/dist/src/cli/main.js
CHANGED
|
@@ -946,7 +946,25 @@ function isEntry() {
|
|
|
946
946
|
return false;
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
|
+
// Node warns once on stderr when anything loads `node:sqlite`, which it still marks experimental. Session History uses
|
|
950
|
+
// it, and a plugin may read a Host's SQLite file at load time, so the warning would follow every command.
|
|
951
|
+
// The CLI drops that one warning; every other warning still reaches stderr.
|
|
952
|
+
function hideSqliteWarning() {
|
|
953
|
+
const emit = process.emitWarning;
|
|
954
|
+
process.emitWarning = ((warning, ...rest) => {
|
|
955
|
+
const text = typeof warning === 'string' ? warning : warning.message;
|
|
956
|
+
const opt = rest[0];
|
|
957
|
+
const type = typeof opt === 'string'
|
|
958
|
+
? opt
|
|
959
|
+
: (opt?.type ??
|
|
960
|
+
(typeof warning === 'string' ? undefined : warning.name));
|
|
961
|
+
if (type === 'ExperimentalWarning' && /^SQLite is an experimental feature/.test(text))
|
|
962
|
+
return;
|
|
963
|
+
emit.call(process, warning, ...rest);
|
|
964
|
+
});
|
|
965
|
+
}
|
|
949
966
|
if (isEntry()) {
|
|
967
|
+
hideSqliteWarning();
|
|
950
968
|
main(process.argv.slice(2)).then((code) => {
|
|
951
969
|
process.exitCode = code;
|
|
952
970
|
}, (err) => {
|
package/dist/src/runtime.d.ts
CHANGED
|
@@ -28,12 +28,20 @@ export interface ResumeLaunch {
|
|
|
28
28
|
/** The session the Host arguments resume by id, when they name one. */
|
|
29
29
|
sessionId?: string;
|
|
30
30
|
/**
|
|
31
|
-
* Set when the session lives in a non-main Account and `launch` starts that Account as `run` would,
|
|
32
|
-
* `newSession` the Account (main included) that started a session the Host never
|
|
31
|
+
* Set when the session lives in a non-main Account and `launch` starts that Account as `run` would, with `run` the
|
|
32
|
+
* Main Account that holds it, or with `newSession` the Account (main included) that started a session the Host never
|
|
33
|
+
* saved.
|
|
33
34
|
*/
|
|
34
35
|
account?: Account;
|
|
35
36
|
/** Set when the session was never saved: `launch` starts a new session in `account` without the resume (ADR-0009). */
|
|
36
37
|
newSession?: true;
|
|
38
|
+
/**
|
|
39
|
+
* Set when `account` is the Main Account and config `handoff.auto` is on (ADR-0058): the caller starts it exactly as
|
|
40
|
+
* `sideby run <account> -- <args>` would, so Auto Handoff applies, instead of `launch` (the Host unchanged).
|
|
41
|
+
*/
|
|
42
|
+
run?: {
|
|
43
|
+
args: string[];
|
|
44
|
+
};
|
|
37
45
|
}
|
|
38
46
|
/** What happened to the alias asked for with a new Account. */
|
|
39
47
|
export interface AliasResult {
|
package/dist/src/runtime.js
CHANGED
|
@@ -792,13 +792,19 @@ export async function createRuntime(opts = {}) {
|
|
|
792
792
|
return { launch: await guarded(host) };
|
|
793
793
|
const route = await findResumeRoute(family, await accounts(), userArgs);
|
|
794
794
|
const id = route.sessionId ? { sessionId: route.sessionId } : {};
|
|
795
|
+
// In the Main Account with Auto Handoff on, start it as `sideby run` would (ADR-0058).
|
|
796
|
+
const asRun = route.account?.isMain && handoffSettings(config).auto;
|
|
795
797
|
if (route.neverSaved && route.account && family.withoutResume) {
|
|
796
798
|
const args = family.withoutResume(userArgs);
|
|
799
|
+
if (asRun)
|
|
800
|
+
return { launch: { ...host, args }, ...id, account: route.account, newSession: true, run: { args } };
|
|
797
801
|
const launch = route.account.isMain
|
|
798
802
|
? await guarded({ ...host, args })
|
|
799
803
|
: await rt.prepareLaunch(route.account.ref, args, 'run', ro);
|
|
800
804
|
return { launch, ...id, account: route.account, newSession: true };
|
|
801
805
|
}
|
|
806
|
+
if (asRun && !route.neverSaved)
|
|
807
|
+
return { launch: host, ...id, account: route.account, run: { args: [...userArgs] } };
|
|
802
808
|
if (!route.account || route.account.isMain || route.neverSaved)
|
|
803
809
|
return { launch: await guarded(host), ...id };
|
|
804
810
|
return {
|
package/package.json
CHANGED
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.30.
|
|
5
|
+
version: "0.30.2"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|