sideby 0.35.5 → 0.35.6
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261105T090834-bba957"}
|
|
@@ -11,8 +11,13 @@ export interface SessionHookPart {
|
|
|
11
11
|
/**
|
|
12
12
|
* The command a Host runs for a hook entry: this Node and this sideby by absolute path, never `sideby` by name. A
|
|
13
13
|
* missing or older `sideby` on PATH would fail the hook, and a failing hook lets the Host go on.
|
|
14
|
+
*
|
|
15
|
+
* The path is the one this process was started by (`argv1`, such as the global `bin/sideby` link) when it leads to
|
|
16
|
+
* this sideby's entry, and the entry's real path otherwise. Node resolves links in `import.meta.url`, so the real path
|
|
17
|
+
* names one installed copy: a session started from a Local Build (`pnpm local`) would keep running that copy after
|
|
18
|
+
* `pnpm local --off` or an update. The started-by path follows whatever sideby is installed there now.
|
|
14
19
|
*/
|
|
15
|
-
export declare function sidebyHookCommand(entry: string, family: string, event: string): string;
|
|
20
|
+
export declare function sidebyHookCommand(entry: string, family: string, event: string, argv1?: string | undefined): string;
|
|
16
21
|
/** Every part's Claude hooks in one object, each event's groups in part order. */
|
|
17
22
|
export declare function mergeClaudeHooks(...parts: readonly ClaudeHooks[]): ClaudeHooks;
|
|
18
23
|
/**
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// with each other and with Auto Handoff's (§3.17). Claude Code takes one `--settings`, so every part goes into one file
|
|
3
3
|
// sideby writes in its state folder; Codex takes `-c hooks.<event>=[…]`, where a second value for the same event would
|
|
4
4
|
// replace the first, so the entries of one event go into one value. Nothing is written into a Host directory.
|
|
5
|
+
import { realpathSync } from 'node:fs';
|
|
5
6
|
import { mkdir, readFile } from 'node:fs/promises';
|
|
6
7
|
import { basename, dirname, extname, join } from 'node:path';
|
|
7
8
|
import { fileURLToPath } from 'node:url';
|
|
@@ -9,9 +10,22 @@ import { ownedFolder, writeFileAtomic } from './fs-safe.js';
|
|
|
9
10
|
/**
|
|
10
11
|
* The command a Host runs for a hook entry: this Node and this sideby by absolute path, never `sideby` by name. A
|
|
11
12
|
* missing or older `sideby` on PATH would fail the hook, and a failing hook lets the Host go on.
|
|
13
|
+
*
|
|
14
|
+
* The path is the one this process was started by (`argv1`, such as the global `bin/sideby` link) when it leads to
|
|
15
|
+
* this sideby's entry, and the entry's real path otherwise. Node resolves links in `import.meta.url`, so the real path
|
|
16
|
+
* names one installed copy: a session started from a Local Build (`pnpm local`) would keep running that copy after
|
|
17
|
+
* `pnpm local --off` or an update. The started-by path follows whatever sideby is installed there now.
|
|
12
18
|
*/
|
|
13
|
-
export function sidebyHookCommand(entry, family, event) {
|
|
14
|
-
const
|
|
19
|
+
export function sidebyHookCommand(entry, family, event, argv1 = process.argv[1]) {
|
|
20
|
+
const real = fileURLToPath(new URL(`../cli/main${extname(fileURLToPath(import.meta.url))}`, import.meta.url));
|
|
21
|
+
let main = real;
|
|
22
|
+
try {
|
|
23
|
+
if (argv1 && realpathSync(argv1) === realpathSync(real))
|
|
24
|
+
main = argv1;
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// a started-by path that does not resolve: the real path
|
|
28
|
+
}
|
|
15
29
|
const q = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
|
|
16
30
|
const safe = (s) => !/["\\\n]/.test(s);
|
|
17
31
|
const bin = safe(process.execPath) && safe(main) ? `${q(process.execPath)} ${q(main)}` : 'sideby';
|
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.35.
|
|
5
|
+
version: "0.35.6"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|