@askalf/dario 6.12.12 → 6.12.14
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.
|
@@ -64,6 +64,12 @@ export interface DetectedOAuthConfig {
|
|
|
64
64
|
*/
|
|
65
65
|
export declare function normalizeAuthorizeUrl(url: string): string;
|
|
66
66
|
export declare const FALLBACK_FOR_DRIFT_CHECK: Readonly<DetectedOAuthConfig>;
|
|
67
|
+
/**
|
|
68
|
+
* The first `claude` regular file on `pathValue`, symlinks resolved, or null. The fixed candidates
|
|
69
|
+
* cover the standard install prefixes; this covers any other prefix the user's shell resolves.
|
|
70
|
+
* Exported for tests.
|
|
71
|
+
*/
|
|
72
|
+
export declare function findClaudeOnPath(pathValue: string | undefined, names?: readonly string[]): string | null;
|
|
67
73
|
/**
|
|
68
74
|
* Scan binary bytes for the PROD OAuth config block.
|
|
69
75
|
*
|
package/dist/cc-oauth-detect.js
CHANGED
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
* or ~/.dario/oauth-config.override.json.
|
|
39
39
|
*/
|
|
40
40
|
import { readFile, writeFile, mkdir, stat, open as openFile } from 'node:fs/promises';
|
|
41
|
-
import { existsSync } from 'node:fs';
|
|
41
|
+
import { existsSync, realpathSync, statSync } from 'node:fs';
|
|
42
42
|
import { homedir, platform } from 'node:os';
|
|
43
|
-
import { join, dirname } from 'node:path';
|
|
43
|
+
import { join, dirname, delimiter } from 'node:path';
|
|
44
44
|
import { createHash } from 'node:crypto';
|
|
45
45
|
/**
|
|
46
46
|
* Normalize the authorize URL to match what CC uses at runtime.
|
|
@@ -131,11 +131,15 @@ function candidatePaths() {
|
|
|
131
131
|
}
|
|
132
132
|
return [
|
|
133
133
|
// v2.x bin/claude precompiled exe — checked before legacy cli.js/.mjs.
|
|
134
|
+
// The npm package names it bin/claude.exe on every platform.
|
|
134
135
|
'/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/claude',
|
|
136
|
+
'/usr/local/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe',
|
|
137
|
+
'/usr/lib/node_modules/@anthropic-ai/claude-code/bin/claude.exe',
|
|
135
138
|
'/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/bin/claude',
|
|
136
139
|
join(home, '.claude', 'local', 'node_modules', '@anthropic-ai', 'claude-code', 'bin', 'claude'),
|
|
137
140
|
join(home, '.local', 'bin', 'claude'),
|
|
138
141
|
'/usr/local/bin/claude',
|
|
142
|
+
'/usr/bin/claude',
|
|
139
143
|
'/opt/homebrew/bin/claude',
|
|
140
144
|
'/usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js',
|
|
141
145
|
'/usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.mjs',
|
|
@@ -144,6 +148,28 @@ function candidatePaths() {
|
|
|
144
148
|
join(home, '.claude', 'local', 'node_modules', '@anthropic-ai', 'claude-code', 'cli.mjs'),
|
|
145
149
|
];
|
|
146
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* The first `claude` regular file on `pathValue`, symlinks resolved, or null. The fixed candidates
|
|
153
|
+
* cover the standard install prefixes; this covers any other prefix the user's shell resolves.
|
|
154
|
+
* Exported for tests.
|
|
155
|
+
*/
|
|
156
|
+
export function findClaudeOnPath(pathValue, names = platform() === 'win32' ? ['claude.exe'] : ['claude']) {
|
|
157
|
+
for (const dir of (pathValue ?? '').split(delimiter)) {
|
|
158
|
+
if (!dir)
|
|
159
|
+
continue;
|
|
160
|
+
for (const name of names) {
|
|
161
|
+
try {
|
|
162
|
+
const real = realpathSync(join(dir, name));
|
|
163
|
+
if (statSync(real).isFile())
|
|
164
|
+
return real;
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
// not in this directory
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
147
173
|
function findCCBinary() {
|
|
148
174
|
const override = process.env['DARIO_CC_PATH'];
|
|
149
175
|
if (override && existsSync(override))
|
|
@@ -152,7 +178,7 @@ function findCCBinary() {
|
|
|
152
178
|
if (existsSync(p))
|
|
153
179
|
return p;
|
|
154
180
|
}
|
|
155
|
-
return
|
|
181
|
+
return findClaudeOnPath(process.env['PATH'] ?? process.env['Path']);
|
|
156
182
|
}
|
|
157
183
|
function isOverrideDisabled() {
|
|
158
184
|
return process.env['DARIO_OAUTH_DISABLE_OVERRIDE'] === '1';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_version": "2.1.284",
|
|
3
|
-
"_captured": "2026-09-
|
|
3
|
+
"_captured": "2026-09-29T19:36:19.800Z",
|
|
4
4
|
"_source": "bundled",
|
|
5
5
|
"_schemaVersion": 3,
|
|
6
6
|
"agent_identity": "You are a Claude agent, built on Anthropic's Claude Agent SDK.",
|
|
@@ -1314,7 +1314,7 @@
|
|
|
1314
1314
|
},
|
|
1315
1315
|
{
|
|
1316
1316
|
"name": "WebSearch",
|
|
1317
|
-
"description": "Search the web. Returns result blocks with titles and URLs. US-only.\n\n- The current month is
|
|
1317
|
+
"description": "Search the web. Returns result blocks with titles and URLs. US-only.\n\n- The current month is provided in the conversation below. Use this when searching for recent information.\n- `allowed_domains` / `blocked_domains` filter results.\n- After answering from results, end with a \"Sources:\" list of the URLs you used as markdown links.",
|
|
1318
1318
|
"input_schema": {
|
|
1319
1319
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1320
1320
|
"type": "object",
|
|
@@ -1469,7 +1469,7 @@
|
|
|
1469
1469
|
"accept-encoding",
|
|
1470
1470
|
"content-length"
|
|
1471
1471
|
],
|
|
1472
|
-
"anthropic_beta": "claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,mid-conversation-system-2026-04-07,mid-conversation-tool-changes-2026-07-01,advisor-tool-2026-03-01,effort-2025-11-24",
|
|
1472
|
+
"anthropic_beta": "claude-code-20250219,interleaved-thinking-2025-05-14,thinking-token-count-2026-05-13,context-management-2025-06-27,prompt-caching-scope-2026-01-05,mid-conversation-system-2026-04-07,mid-conversation-tool-changes-2026-07-01,inline-tools-2026-09-15,advisor-tool-2026-03-01,effort-2025-11-24",
|
|
1473
1473
|
"header_values": {
|
|
1474
1474
|
"accept": "application/json",
|
|
1475
1475
|
"user-agent": "claude-cli/2.1.284 (external, sdk-cli)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askalf/dario",
|
|
3
|
-
"version": "6.12.
|
|
3
|
+
"version": "6.12.14",
|
|
4
4
|
"description": "Use your Claude and ChatGPT subscriptions in Cursor, Cline, Aider, Claude Code and the Agent SDK — at subscription pricing, not per-token API bills. One local Anthropic + OpenAI-compatible endpoint: either plan answers either wire shape, with automatic failover when one hits its limit.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|