sideby 0.41.0 → 0.41.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.js +1 -0
- package/dist/src/cli/json-schemas.js +7 -2
- package/dist/src/cli/main.js +2 -2
- package/dist/src/core/network.d.ts +9 -7
- package/dist/src/core/network.js +10 -13
- package/dist/src/families/claude/index.js +1 -0
- package/dist/src/panel/i18n.js +2 -2
- package/dist/src/panel/page-script.js +1 -1
- package/package.json +1 -1
- package/schemas/network.json +5 -1
- package/skills/sideby/SKILL.md +1 -1
- package/skills/sideby/references/network.md +1 -1
package/dist/build.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"20261119T151949-9d2d80"}
|
package/dist/src/cli/commands.js
CHANGED
|
@@ -4675,6 +4675,7 @@ export async function cmdNetwork(a, io) {
|
|
|
4675
4675
|
const why = {
|
|
4676
4676
|
'third-party': 'third-party endpoint, not checked',
|
|
4677
4677
|
'at-launch': 'API account, checked when it starts',
|
|
4678
|
+
api: 'API account, not checked',
|
|
4678
4679
|
'not-covered': 'not covered',
|
|
4679
4680
|
};
|
|
4680
4681
|
for (const x of skipped)
|
|
@@ -1425,8 +1425,13 @@ export const OUTPUT_SCHEMAS = {
|
|
|
1425
1425
|
accounts: Type.Array(Type.Object({
|
|
1426
1426
|
ref: Str,
|
|
1427
1427
|
url: Type.Optional(Type.String({ description: 'The address this account is checked at.' })),
|
|
1428
|
-
skip: Type.Optional(Type.Union([
|
|
1429
|
-
|
|
1428
|
+
skip: Type.Optional(Type.Union([
|
|
1429
|
+
Type.Literal('not-covered'),
|
|
1430
|
+
Type.Literal('third-party'),
|
|
1431
|
+
Type.Literal('at-launch'),
|
|
1432
|
+
Type.Literal('api'),
|
|
1433
|
+
], {
|
|
1434
|
+
description: 'api: an API account, never checked; third-party: an endpoint set to a third party, not checked; at-launch: no longer given.',
|
|
1430
1435
|
})),
|
|
1431
1436
|
})),
|
|
1432
1437
|
}, { title: 'sideby network [check] --json' }),
|
package/dist/src/cli/main.js
CHANGED
|
@@ -324,10 +324,10 @@ it started, check the country the requests leave from. When it is not one you al
|
|
|
324
324
|
seconds (the proxy is off, the network is down), stop and say what to do. It guards against a proxy that stopped
|
|
325
325
|
or a node in the wrong country; it does not make use from an unsupported region allowed.
|
|
326
326
|
|
|
327
|
-
sideby asks the vendor's own https://api.anthropic.com
|
|
327
|
+
sideby asks the vendor's own https://api.anthropic.com or chatgpt.com /cdn-cgi/trace, through the
|
|
328
328
|
account's proxy settings, with no credential, account or identity, and keeps only the country and a hash of the
|
|
329
329
|
address. Results are reused for 60 seconds. Off by default; off in CI. Sessions started without sideby (running
|
|
330
|
-
claude or codex directly) are not checked. API accounts
|
|
330
|
+
claude or codex directly) are not checked. API accounts are never checked.
|
|
331
331
|
|
|
332
332
|
network shows the setting and the newest result per address (no request)
|
|
333
333
|
network check asks every address now
|
|
@@ -7,18 +7,17 @@ export declare const GUARDED_FAMILIES: readonly ['claude', 'codex'];
|
|
|
7
7
|
export declare const TRACE: {
|
|
8
8
|
readonly anthropic: 'https://api.anthropic.com/cdn-cgi/trace';
|
|
9
9
|
readonly chatgpt: 'https://chatgpt.com/cdn-cgi/trace';
|
|
10
|
-
readonly openai: 'https://api.openai.com/cdn-cgi/trace';
|
|
11
10
|
};
|
|
12
11
|
/** Where an Account's Egress is checked, or why it is not. */
|
|
13
12
|
export type NetworkTarget = {
|
|
14
13
|
url: string;
|
|
15
14
|
} | {
|
|
16
|
-
skip: 'not-covered' | 'third-party';
|
|
15
|
+
skip: 'not-covered' | 'third-party' | 'api';
|
|
17
16
|
};
|
|
18
17
|
/**
|
|
19
|
-
* The trace address that takes the same route as
|
|
20
|
-
*
|
|
21
|
-
* `env` is the Launch environment
|
|
18
|
+
* The trace address that takes the same route as a Subscription Account's model requests: the vendor's own API
|
|
19
|
+
* domain; none for an endpoint set to a third party. API Accounts are never checked (ADR-0079).
|
|
20
|
+
* `env` is the Launch environment.
|
|
22
21
|
*/
|
|
23
22
|
export declare function networkTarget(account: Pick<Account, 'family' | 'kind'>, env: Env): NetworkTarget;
|
|
24
23
|
export declare const networkDir: (stateDir: string) => string;
|
|
@@ -83,11 +82,14 @@ export declare function codexNetworkTrustLine(stateDir: string, ref: string, env
|
|
|
83
82
|
export declare function withClaudeNetworkHooks(hookArgs: readonly string[], stateDir: string): Promise<string[]>;
|
|
84
83
|
/** `args` without one run of arguments sideby added (Auto Handoff merges its session hooks into its own file). */
|
|
85
84
|
export declare function withoutArgs(args: readonly string[], drop: readonly string[]): string[];
|
|
86
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Where one Account is checked, or why not: an API Account (`api`), or an endpoint set to a third party.
|
|
87
|
+
* `at-launch` is no longer given (API Accounts were once checked at Launch); it stays in the type for readers.
|
|
88
|
+
*/
|
|
87
89
|
export interface NetworkAccountRow {
|
|
88
90
|
ref: string;
|
|
89
91
|
url?: string;
|
|
90
|
-
skip?: 'not-covered' | 'third-party' | 'at-launch';
|
|
92
|
+
skip?: 'not-covered' | 'third-party' | 'at-launch' | 'api';
|
|
91
93
|
}
|
|
92
94
|
export interface NetworkTargetStatus {
|
|
93
95
|
url: string;
|
package/dist/src/core/network.js
CHANGED
|
@@ -12,7 +12,6 @@ export const GUARDED_FAMILIES = ['claude', 'codex'];
|
|
|
12
12
|
export const TRACE = {
|
|
13
13
|
anthropic: 'https://api.anthropic.com/cdn-cgi/trace',
|
|
14
14
|
chatgpt: 'https://chatgpt.com/cdn-cgi/trace',
|
|
15
|
-
openai: 'https://api.openai.com/cdn-cgi/trace',
|
|
16
15
|
};
|
|
17
16
|
function officialHost(value, host) {
|
|
18
17
|
if (!value)
|
|
@@ -25,23 +24,21 @@ function officialHost(value, host) {
|
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
/**
|
|
28
|
-
* The trace address that takes the same route as
|
|
29
|
-
*
|
|
30
|
-
* `env` is the Launch environment
|
|
27
|
+
* The trace address that takes the same route as a Subscription Account's model requests: the vendor's own API
|
|
28
|
+
* domain; none for an endpoint set to a third party. API Accounts are never checked (ADR-0079).
|
|
29
|
+
* `env` is the Launch environment.
|
|
31
30
|
*/
|
|
32
31
|
export function networkTarget(account, env) {
|
|
32
|
+
if (!GUARDED_FAMILIES.includes(account.family))
|
|
33
|
+
return { skip: 'not-covered' };
|
|
34
|
+
if (account.kind === 'api')
|
|
35
|
+
return { skip: 'api' };
|
|
33
36
|
if (account.family === 'claude') {
|
|
34
37
|
return officialHost(env.ANTHROPIC_BASE_URL, 'api.anthropic.com')
|
|
35
38
|
? { url: TRACE.anthropic }
|
|
36
39
|
: { skip: 'third-party' };
|
|
37
40
|
}
|
|
38
|
-
|
|
39
|
-
if (account.kind === 'subscription')
|
|
40
|
-
return { url: TRACE.chatgpt };
|
|
41
|
-
const base = env.OPENAI_BASE_URL || env.CODEX_API_BASE_URL;
|
|
42
|
-
return officialHost(base, 'api.openai.com') ? { url: TRACE.openai } : { skip: 'third-party' };
|
|
43
|
-
}
|
|
44
|
-
return { skip: 'not-covered' };
|
|
41
|
+
return { url: TRACE.chatgpt };
|
|
45
42
|
}
|
|
46
43
|
export const networkDir = (stateDir) => join(stateDir, 'network');
|
|
47
44
|
/** Network Guard is on: the switch, a non-empty list, and not in CI (where it makes no request). */
|
|
@@ -207,9 +204,9 @@ export async function networkOverview(opts) {
|
|
|
207
204
|
for (const a of opts.accounts) {
|
|
208
205
|
if (!GUARDED_FAMILIES.includes(a.family))
|
|
209
206
|
continue;
|
|
210
|
-
//
|
|
207
|
+
// API Accounts are never checked (ADR-0079), and their Secret File is not read for this.
|
|
211
208
|
if (a.kind === 'api') {
|
|
212
|
-
accounts.push({ ref: a.ref, skip: '
|
|
209
|
+
accounts.push({ ref: a.ref, skip: 'api' });
|
|
213
210
|
continue;
|
|
214
211
|
}
|
|
215
212
|
let env;
|
package/dist/src/panel/i18n.js
CHANGED
|
@@ -1457,7 +1457,7 @@ const en = {
|
|
|
1457
1457
|
'net.checked': 'checked {when}',
|
|
1458
1458
|
'net.ipChanged': 'The exit address changed in the last day (same check; nothing is blocked for that).',
|
|
1459
1459
|
'net.noTargets': 'No Claude or Codex account is checked here.',
|
|
1460
|
-
'net.skipped': '{refs}: API accounts are
|
|
1460
|
+
'net.skipped': '{refs}: API accounts are not checked.',
|
|
1461
1461
|
'net.notCovered': 'Only sessions sideby starts are checked; running claude or codex directly is not. sideby asks the vendor’s own /cdn-cgi/trace with your proxy settings and no credential, and keeps only the country.',
|
|
1462
1462
|
'net.savedOn': 'Network check is on.',
|
|
1463
1463
|
'net.savedAllow': 'Allowed: {list}.',
|
|
@@ -3255,7 +3255,7 @@ const zh = {
|
|
|
3255
3255
|
'net.checked': '{when}查过',
|
|
3256
3256
|
'net.ipChanged': '出口 IP 最近一天变过(不会因此拦截)。',
|
|
3257
3257
|
'net.noTargets': '这里没有要检查的 Claude 或 Codex 账号。',
|
|
3258
|
-
'net.skipped': '{refs}:API
|
|
3258
|
+
'net.skipped': '{refs}:API 账号不检查。',
|
|
3259
3259
|
'net.notCovered': '只检查 sideby 启动的会话,直接运行 claude 或 codex 不检查。sideby 带着你的代理设置访问服务商自己的 /cdn-cgi/trace,不带任何凭证,只保留国家或地区。',
|
|
3260
3260
|
'net.savedOn': '网络检查已打开。',
|
|
3261
3261
|
'net.savedAllow': '允许的地区:{list}。',
|
|
@@ -8055,7 +8055,7 @@ const MAIN = String.raw `
|
|
|
8055
8055
|
h('div', { class: 'muted small' }, [x.checkedAt ? t('net.checked', { when: ago(x.checkedAt) }) : null, x.error || null, x.accounts.join(', ')].filter(Boolean).join(' · ')),
|
|
8056
8056
|
x.ipChanged ? h('div', { class: 'muted small' }, t('net.ipChanged')) : null)
|
|
8057
8057
|
})
|
|
8058
|
-
const skipped = n.accounts.filter((a) => a.skip === 'third-party' || a.skip === 'at-launch')
|
|
8058
|
+
const skipped = n.accounts.filter((a) => a.skip === 'third-party' || a.skip === 'at-launch' || a.skip === 'api')
|
|
8059
8059
|
const body = [
|
|
8060
8060
|
h('p', { class: 'small' }, t('net.explain')),
|
|
8061
8061
|
h('div', { class: 'row-actions' },
|
package/package.json
CHANGED
package/schemas/network.json
CHANGED
|
@@ -125,9 +125,13 @@
|
|
|
125
125
|
{
|
|
126
126
|
"type": "string",
|
|
127
127
|
"const": "at-launch"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"type": "string",
|
|
131
|
+
"const": "api"
|
|
128
132
|
}
|
|
129
133
|
],
|
|
130
|
-
"description": "
|
|
134
|
+
"description": "api: an API account, never checked; third-party: an endpoint set to a third party, not checked; at-launch: no longer given."
|
|
131
135
|
}
|
|
132
136
|
}
|
|
133
137
|
}
|
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.41.
|
|
5
|
+
version: "0.41.2"
|
|
6
6
|
requires:
|
|
7
7
|
bins: [sideby, node]
|
|
8
8
|
cliHelp: sideby --help
|
|
@@ -9,7 +9,7 @@ sideby network --json # the setting and the newest result per address, f
|
|
|
9
9
|
sideby network check --json # ask every address now
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Each `targets[]` row is one address sideby asks (`api.anthropic.com` for Claude, `chatgpt.com` for Codex
|
|
12
|
+
Each `targets[]` row is one address sideby asks (`api.anthropic.com` for Claude, `chatgpt.com` for Codex) with `status` (`ok`, `blocked`, `unknown`, `not-checked`), `loc` (the country) and the `accounts` checked there. `accounts[].skip` says why an account is not checked: `api` (API accounts are never checked) or `third-party` (an endpoint set to a third party).
|
|
13
13
|
|
|
14
14
|
## Turn it on
|
|
15
15
|
|