ai-cc-router 0.1.0 → 0.1.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/README.md
CHANGED
|
@@ -94,7 +94,7 @@ Run cc-router on a machine everyone on the team can reach — a home server, a V
|
|
|
94
94
|
#### On the server
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
npm install -g cc-router
|
|
97
|
+
npm install -g ai-cc-router
|
|
98
98
|
cc-router setup # configure the 3 shared accounts
|
|
99
99
|
cc-router service install # auto-start on boot
|
|
100
100
|
```
|
|
@@ -172,7 +172,7 @@ Each developer then points to:
|
|
|
172
172
|
|
|
173
173
|
```bash
|
|
174
174
|
# 1. Install
|
|
175
|
-
npm install -g cc-router
|
|
175
|
+
npm install -g ai-cc-router
|
|
176
176
|
|
|
177
177
|
# 2. Wizard: extract tokens + configure Claude Code automatically
|
|
178
178
|
cc-router setup
|
|
@@ -16,7 +16,12 @@ export async function extractFromKeychain() {
|
|
|
16
16
|
"-s", "Claude Code-credentials",
|
|
17
17
|
"-w",
|
|
18
18
|
]);
|
|
19
|
-
|
|
19
|
+
const raw = JSON.parse(stdout.trim());
|
|
20
|
+
// Keychain JSON can be either:
|
|
21
|
+
// { claudeAiOauth: { accessToken, refreshToken, ... }, mcpOAuth: {...} }
|
|
22
|
+
// { accessToken, refreshToken, ... } (direct, older versions)
|
|
23
|
+
const oauth = raw.claudeAiOauth ?? raw;
|
|
24
|
+
return parseCredentialJson(oauth);
|
|
20
25
|
}
|
|
21
26
|
catch {
|
|
22
27
|
return null;
|
|
@@ -4,6 +4,8 @@ export async function validateToken(accessToken) {
|
|
|
4
4
|
headers: {
|
|
5
5
|
"Authorization": `Bearer ${accessToken}`,
|
|
6
6
|
"anthropic-version": "2023-06-01",
|
|
7
|
+
// Required for api.anthropic.com to accept OAuth tokens (sk-ant-oat01-*)
|
|
8
|
+
"anthropic-beta": "oauth-2025-04-20",
|
|
7
9
|
},
|
|
8
10
|
});
|
|
9
11
|
if (res.ok)
|