@askalf/dario 3.2.5 → 3.2.7
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/cc-template-data.json +888 -888
- package/dist/oauth.js +6 -4
- package/package.json +64 -64
package/dist/oauth.js
CHANGED
|
@@ -8,11 +8,13 @@ import { randomBytes, createHash } from 'node:crypto';
|
|
|
8
8
|
import { readFile, writeFile, mkdir, rename } from 'node:fs/promises';
|
|
9
9
|
import { dirname, join } from 'node:path';
|
|
10
10
|
import { homedir } from 'node:os';
|
|
11
|
-
// Claude Code's public OAuth client (PKCE, no secret needed)
|
|
12
|
-
const OAUTH_CLIENT_ID = '
|
|
13
|
-
|
|
11
|
+
// Claude Code's public OAuth client (PKCE, no secret needed) — extracted from CC v2.1.104 binary
|
|
12
|
+
const OAUTH_CLIENT_ID = '22422756-60c9-4084-8eb7-27705fd5cf9a';
|
|
13
|
+
// Max Plan OAuth (for Claude Pro/Max subscriptions) — claude.com/cai/oauth/authorize
|
|
14
|
+
const OAUTH_AUTHORIZE_URL = 'https://claude.com/cai/oauth/authorize';
|
|
14
15
|
const OAUTH_TOKEN_URL = 'https://platform.claude.com/v1/oauth/token';
|
|
15
|
-
|
|
16
|
+
// Max plan scopes (excludes org:create_api_key which requires Console plan)
|
|
17
|
+
const OAUTH_SCOPES = 'user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload';
|
|
16
18
|
// Refresh 30 min before expiry
|
|
17
19
|
const REFRESH_BUFFER_MS = 30 * 60 * 1000;
|
|
18
20
|
// After a failed refresh, don't retry for 60s to avoid spam
|
package/package.json
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@askalf/dario",
|
|
3
|
-
"version": "3.2.
|
|
4
|
-
"description": "Use your Claude subscription as an API. No API key needed. Local proxy for Claude Max/Pro subscriptions.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"dario": "./dist/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"main": "./dist/index.js",
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"files": [
|
|
18
|
-
"dist",
|
|
19
|
-
"README.md",
|
|
20
|
-
"LICENSE"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"build": "tsc && cp src/cc-template-data.json dist/",
|
|
24
|
-
"audit": "npm audit --production --audit-level=high",
|
|
25
|
-
"prepublishOnly": "npm run build",
|
|
26
|
-
"start": "node dist/cli.js",
|
|
27
|
-
"dev": "tsx src/cli.ts",
|
|
28
|
-
"e2e": "node test/e2e.mjs",
|
|
29
|
-
"compat": "node test/compat.mjs"
|
|
30
|
-
},
|
|
31
|
-
"keywords": [
|
|
32
|
-
"claude",
|
|
33
|
-
"anthropic",
|
|
34
|
-
"oauth",
|
|
35
|
-
"proxy",
|
|
36
|
-
"api",
|
|
37
|
-
"bridge",
|
|
38
|
-
"subscription",
|
|
39
|
-
"claude-max",
|
|
40
|
-
"claude-pro",
|
|
41
|
-
"llm",
|
|
42
|
-
"ai",
|
|
43
|
-
"cli",
|
|
44
|
-
"developer-tools"
|
|
45
|
-
],
|
|
46
|
-
"author": "askalf (https://github.com/askalf)",
|
|
47
|
-
"license": "MIT",
|
|
48
|
-
"repository": {
|
|
49
|
-
"type": "git",
|
|
50
|
-
"url": "https://github.com/askalf/dario.git"
|
|
51
|
-
},
|
|
52
|
-
"homepage": "https://github.com/askalf/dario",
|
|
53
|
-
"bugs": {
|
|
54
|
-
"url": "https://github.com/askalf/dario/issues"
|
|
55
|
-
},
|
|
56
|
-
"engines": {
|
|
57
|
-
"node": ">=18.0.0"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@types/node": "^22.0.0",
|
|
61
|
-
"tsx": "^4.19.0",
|
|
62
|
-
"typescript": "^5.7.0"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@askalf/dario",
|
|
3
|
+
"version": "3.2.7",
|
|
4
|
+
"description": "Use your Claude subscription as an API. No API key needed. Local proxy for Claude Max/Pro subscriptions.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"dario": "./dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc && cp src/cc-template-data.json dist/",
|
|
24
|
+
"audit": "npm audit --production --audit-level=high",
|
|
25
|
+
"prepublishOnly": "npm run build",
|
|
26
|
+
"start": "node dist/cli.js",
|
|
27
|
+
"dev": "tsx src/cli.ts",
|
|
28
|
+
"e2e": "node test/e2e.mjs",
|
|
29
|
+
"compat": "node test/compat.mjs"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"claude",
|
|
33
|
+
"anthropic",
|
|
34
|
+
"oauth",
|
|
35
|
+
"proxy",
|
|
36
|
+
"api",
|
|
37
|
+
"bridge",
|
|
38
|
+
"subscription",
|
|
39
|
+
"claude-max",
|
|
40
|
+
"claude-pro",
|
|
41
|
+
"llm",
|
|
42
|
+
"ai",
|
|
43
|
+
"cli",
|
|
44
|
+
"developer-tools"
|
|
45
|
+
],
|
|
46
|
+
"author": "askalf (https://github.com/askalf)",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/askalf/dario.git"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://github.com/askalf/dario",
|
|
53
|
+
"bugs": {
|
|
54
|
+
"url": "https://github.com/askalf/dario/issues"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=18.0.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/node": "^22.0.0",
|
|
61
|
+
"tsx": "^4.19.0",
|
|
62
|
+
"typescript": "^5.7.0"
|
|
63
|
+
}
|
|
64
|
+
}
|