funolio-agent 0.17.8 → 1.0.3
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/approval.d.ts +7 -6
- package/dist/approval.d.ts.map +1 -1
- package/dist/approval.js +40 -10
- package/dist/approval.js.map +1 -1
- package/dist/auth/anthropic-subscription.d.ts +9 -29
- package/dist/auth/anthropic-subscription.d.ts.map +1 -1
- package/dist/auth/anthropic-subscription.js +12 -133
- package/dist/auth/anthropic-subscription.js.map +1 -1
- package/dist/auth/auto-detect.d.ts +28 -6
- package/dist/auth/auto-detect.d.ts.map +1 -1
- package/dist/auth/auto-detect.js +52 -205
- package/dist/auth/auto-detect.js.map +1 -1
- package/dist/auth/credential-reader.d.ts +24 -4
- package/dist/auth/credential-reader.d.ts.map +1 -1
- package/dist/auth/credential-reader.js +31 -256
- package/dist/auth/credential-reader.js.map +1 -1
- package/dist/auth/credential-status.d.ts +7 -27
- package/dist/auth/credential-status.d.ts.map +1 -1
- package/dist/auth/credential-status.js +7 -95
- package/dist/auth/credential-status.js.map +1 -1
- package/dist/auth/index.d.ts +9 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +10 -10
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/subscription-runtime.d.ts +19 -23
- package/dist/auth/subscription-runtime.d.ts.map +1 -1
- package/dist/auth/subscription-runtime.js +24 -292
- package/dist/auth/subscription-runtime.js.map +1 -1
- package/dist/auth/token-refresh.d.ts +19 -28
- package/dist/auth/token-refresh.d.ts.map +1 -1
- package/dist/auth/token-refresh.js +26 -464
- package/dist/auth/token-refresh.js.map +1 -1
- package/dist/backfill.js +2 -2
- package/dist/backfill.js.map +1 -1
- package/dist/bot-manager.d.ts +5 -6
- package/dist/bot-manager.d.ts.map +1 -1
- package/dist/bot-manager.js +20 -62
- package/dist/bot-manager.js.map +1 -1
- package/dist/clerk-model.d.ts +0 -1
- package/dist/clerk-model.d.ts.map +1 -1
- package/dist/clerk-model.js +24 -50
- package/dist/clerk-model.js.map +1 -1
- package/dist/commands/configure-provider.js +2 -2
- package/dist/commands/configure-provider.js.map +1 -1
- package/dist/commands/configure.d.ts.map +1 -1
- package/dist/commands/configure.js +10 -14
- package/dist/commands/configure.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +51 -229
- package/dist/commands/start.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/context-compressor.d.ts +6 -1
- package/dist/context-compressor.d.ts.map +1 -1
- package/dist/context-compressor.js +87 -18
- package/dist/context-compressor.js.map +1 -1
- package/dist/context-window.d.ts +2 -8
- package/dist/context-window.d.ts.map +1 -1
- package/dist/context-window.js +4 -4
- package/dist/context-window.js.map +1 -1
- package/dist/eval/orchestrator-front-door-replay.js +43 -2
- package/dist/eval/orchestrator-front-door-replay.js.map +1 -1
- package/dist/eval/orchestrator-todo-dispatch-replay.d.ts +2 -0
- package/dist/eval/orchestrator-todo-dispatch-replay.d.ts.map +1 -0
- package/dist/eval/orchestrator-todo-dispatch-replay.js +253 -0
- package/dist/eval/orchestrator-todo-dispatch-replay.js.map +1 -0
- package/dist/eval/orchestrator-todo-planning-replay.d.ts +2 -0
- package/dist/eval/orchestrator-todo-planning-replay.d.ts.map +1 -0
- package/dist/eval/orchestrator-todo-planning-replay.js +247 -0
- package/dist/eval/orchestrator-todo-planning-replay.js.map +1 -0
- package/dist/eval/policy-detection-replay.d.ts +2 -0
- package/dist/eval/policy-detection-replay.d.ts.map +1 -0
- package/dist/eval/policy-detection-replay.js +122 -0
- package/dist/eval/policy-detection-replay.js.map +1 -0
- package/dist/eval/todo-worker-runtime-replay.d.ts +2 -0
- package/dist/eval/todo-worker-runtime-replay.d.ts.map +1 -0
- package/dist/eval/todo-worker-runtime-replay.js +520 -0
- package/dist/eval/todo-worker-runtime-replay.js.map +1 -0
- package/dist/integration-tokens.d.ts +6 -0
- package/dist/integration-tokens.d.ts.map +1 -1
- package/dist/integration-tokens.js +43 -0
- package/dist/integration-tokens.js.map +1 -1
- package/dist/local-data.d.ts +134 -1
- package/dist/local-data.d.ts.map +1 -1
- package/dist/local-data.js +711 -18
- package/dist/local-data.js.map +1 -1
- package/dist/local-db.d.ts.map +1 -1
- package/dist/local-db.js +216 -12
- package/dist/local-db.js.map +1 -1
- package/dist/local-funnel.d.ts.map +1 -1
- package/dist/local-funnel.js +7 -0
- package/dist/local-funnel.js.map +1 -1
- package/dist/local-server.d.ts.map +1 -1
- package/dist/local-server.js +119 -96
- package/dist/local-server.js.map +1 -1
- package/dist/mcp/bridge-server.d.ts.map +1 -1
- package/dist/mcp/bridge-server.js +8 -2
- package/dist/mcp/bridge-server.js.map +1 -1
- package/dist/mcp/manager.d.ts +5 -0
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +131 -2
- package/dist/mcp/manager.js.map +1 -1
- package/dist/mcp/sync-cli-config.d.ts +5 -0
- package/dist/mcp/sync-cli-config.d.ts.map +1 -1
- package/dist/mcp/sync-cli-config.js +10 -2
- package/dist/mcp/sync-cli-config.js.map +1 -1
- package/dist/message-loop.d.ts +1 -10
- package/dist/message-loop.d.ts.map +1 -1
- package/dist/message-loop.js +179 -250
- package/dist/message-loop.js.map +1 -1
- package/dist/mqtt-client.d.ts +44 -0
- package/dist/mqtt-client.d.ts.map +1 -1
- package/dist/mqtt-client.js +2 -2
- package/dist/mqtt-client.js.map +1 -1
- package/dist/orchestration/front-door-policy.d.ts +26 -9
- package/dist/orchestration/front-door-policy.d.ts.map +1 -1
- package/dist/orchestration/front-door-policy.js +242 -69
- package/dist/orchestration/front-door-policy.js.map +1 -1
- package/dist/orchestration/orchestrator-blocked-prompt.d.ts +18 -0
- package/dist/orchestration/orchestrator-blocked-prompt.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-blocked-prompt.js +46 -0
- package/dist/orchestration/orchestrator-blocked-prompt.js.map +1 -0
- package/dist/orchestration/orchestrator-final-response-prompt.d.ts +10 -0
- package/dist/orchestration/orchestrator-final-response-prompt.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-final-response-prompt.js +39 -0
- package/dist/orchestration/orchestrator-final-response-prompt.js.map +1 -0
- package/dist/orchestration/orchestrator-operating-prompt.d.ts +11 -0
- package/dist/orchestration/orchestrator-operating-prompt.d.ts.map +1 -1
- package/dist/orchestration/orchestrator-operating-prompt.js +106 -36
- package/dist/orchestration/orchestrator-operating-prompt.js.map +1 -1
- package/dist/orchestration/policy-prompt.d.ts +6 -0
- package/dist/orchestration/policy-prompt.d.ts.map +1 -0
- package/dist/orchestration/policy-prompt.js +40 -0
- package/dist/orchestration/policy-prompt.js.map +1 -0
- package/dist/orchestration/worker-operating-prompt.d.ts +16 -0
- package/dist/orchestration/worker-operating-prompt.d.ts.map +1 -0
- package/dist/orchestration/worker-operating-prompt.js +75 -0
- package/dist/orchestration/worker-operating-prompt.js.map +1 -0
- package/dist/orchestrator.d.ts +19 -0
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +614 -54
- package/dist/orchestrator.js.map +1 -1
- package/dist/policy-detection.d.ts +40 -0
- package/dist/policy-detection.d.ts.map +1 -0
- package/dist/policy-detection.js +298 -0
- package/dist/policy-detection.js.map +1 -0
- package/dist/providers/anthropic.d.ts +0 -5
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +34 -51
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/claude-cli.d.ts.map +1 -1
- package/dist/providers/claude-cli.js +11 -2
- package/dist/providers/claude-cli.js.map +1 -1
- package/dist/providers/codex-cli.d.ts.map +1 -1
- package/dist/providers/codex-cli.js +121 -2
- package/dist/providers/codex-cli.js.map +1 -1
- package/dist/providers/index.d.ts +6 -2
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/summarization-pipeline.d.ts +1 -4
- package/dist/summarization-pipeline.d.ts.map +1 -1
- package/dist/summarization-pipeline.js +43 -56
- package/dist/summarization-pipeline.js.map +1 -1
- package/dist/tools/analyze-image.js +2 -2
- package/dist/tools/analyze-image.js.map +1 -1
- package/dist/tools/edit-file.d.ts.map +1 -1
- package/dist/tools/edit-file.js +16 -1
- package/dist/tools/edit-file.js.map +1 -1
- package/dist/tools/git-tools.d.ts.map +1 -1
- package/dist/tools/git-tools.js +32 -1
- package/dist/tools/git-tools.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-directory.d.ts.map +1 -1
- package/dist/tools/list-directory.js +23 -0
- package/dist/tools/list-directory.js.map +1 -1
- package/dist/tools/notify-user.d.ts.map +1 -1
- package/dist/tools/notify-user.js +15 -1
- package/dist/tools/notify-user.js.map +1 -1
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +3 -1
- package/dist/tools/read-file.js.map +1 -1
- package/dist/tools/request-mcp-install.js +5 -5
- package/dist/tools/request-mcp-install.js.map +1 -1
- package/dist/tools/run-command.d.ts.map +1 -1
- package/dist/tools/run-command.js +16 -4
- package/dist/tools/run-command.js.map +1 -1
- package/dist/tools/sandbox.d.ts.map +1 -1
- package/dist/tools/sandbox.js +6 -0
- package/dist/tools/sandbox.js.map +1 -1
- package/dist/tools/schedule-task.d.ts.map +1 -1
- package/dist/tools/schedule-task.js +37 -0
- package/dist/tools/schedule-task.js.map +1 -1
- package/dist/tools/search-codebase.d.ts.map +1 -1
- package/dist/tools/search-codebase.js +251 -32
- package/dist/tools/search-codebase.js.map +1 -1
- package/dist/tools/todo-tasks.d.ts +2 -0
- package/dist/tools/todo-tasks.d.ts.map +1 -1
- package/dist/tools/todo-tasks.js +203 -6
- package/dist/tools/todo-tasks.js.map +1 -1
- package/dist/tools/web-fetch.d.ts.map +1 -1
- package/dist/tools/web-fetch.js +21 -2
- package/dist/tools/web-fetch.js.map +1 -1
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +38 -34
- package/dist/tools/web-search.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/wizard-state.d.ts.map +1 -1
- package/dist/wizard-state.js +30 -8
- package/dist/wizard-state.js.map +1 -1
- package/dist/wizard-support.d.ts +2 -2
- package/dist/wizard-support.d.ts.map +1 -1
- package/dist/wizard-support.js +80 -93
- package/dist/wizard-support.js.map +1 -1
- package/dist/workflow-engine.d.ts +3 -0
- package/dist/workflow-engine.d.ts.map +1 -1
- package/dist/workflow-engine.js +111 -82
- package/dist/workflow-engine.js.map +1 -1
- package/package.json +6 -1
|
@@ -1,271 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
2
|
+
/**
|
|
3
|
+
* REMOVED: OAuth credential reading from disk has been removed.
|
|
4
|
+
*
|
|
5
|
+
* Connection to LLM providers is now exclusively via:
|
|
6
|
+
* 1. CLI providers (claude-cli, codex-cli) — spawns the CLI binary
|
|
7
|
+
* 2. API key (BYOK) — standard x-api-key authentication
|
|
8
|
+
*
|
|
9
|
+
* The credential-reader previously read OAuth tokens from:
|
|
10
|
+
* - ~/.claude/.credentials.json (Anthropic)
|
|
11
|
+
* - ~/.codex/auth.json (OpenAI)
|
|
12
|
+
* - ~/.config/gcloud/application_default_credentials.json (Google)
|
|
13
|
+
*
|
|
14
|
+
* These files are now only used by the CLI providers themselves (claude, codex)
|
|
15
|
+
* and are not read by the Funolio agent.
|
|
16
|
+
*/
|
|
35
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
18
|
+
exports.detectCredentials = detectCredentials;
|
|
37
19
|
exports.readClaudeCredentials = readClaudeCredentials;
|
|
38
20
|
exports.readCodexCredentials = readCodexCredentials;
|
|
39
21
|
exports.readGeminiCredentials = readGeminiCredentials;
|
|
40
|
-
exports.
|
|
22
|
+
exports.clearCache = clearCache;
|
|
41
23
|
exports.isExpired = isExpired;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const child_process_1 = require("child_process");
|
|
46
|
-
const crypto = __importStar(require("crypto"));
|
|
47
|
-
// ── Cache ───────────────────────────────────────────────────────────────────
|
|
48
|
-
const CACHE_TTL_MS = 60_000; // 1 minute
|
|
49
|
-
const cache = new Map();
|
|
50
|
-
function getCached(key) {
|
|
51
|
-
const entry = cache.get(key);
|
|
52
|
-
if (entry && Date.now() - entry.timestamp < CACHE_TTL_MS) {
|
|
53
|
-
return entry.credential;
|
|
54
|
-
}
|
|
55
|
-
return undefined; // cache miss
|
|
56
|
-
}
|
|
57
|
-
function setCache(key, credential) {
|
|
58
|
-
cache.set(key, { credential, timestamp: Date.now() });
|
|
59
|
-
}
|
|
60
|
-
/** Clear the credential cache (useful for testing or forced refresh). */
|
|
61
|
-
function clearCache() {
|
|
62
|
-
cache.clear();
|
|
63
|
-
}
|
|
64
|
-
// ── Helpers ─────────────────────────────────────────────────────────────────
|
|
65
|
-
function readJsonFile(filePath) {
|
|
66
|
-
try {
|
|
67
|
-
const content = fs.readFileSync(filePath, 'utf-8');
|
|
68
|
-
return JSON.parse(content);
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function fileMtime(filePath) {
|
|
75
|
-
try {
|
|
76
|
-
return fs.statSync(filePath).mtimeMs;
|
|
77
|
-
}
|
|
78
|
-
catch {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
function readMacKeychain(service, account) {
|
|
83
|
-
if (process.platform !== 'darwin')
|
|
84
|
-
return null;
|
|
85
|
-
try {
|
|
86
|
-
const result = (0, child_process_1.execSync)(`security find-generic-password -s ${JSON.stringify(service)} -a ${JSON.stringify(account)} -w`, { encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'] }).trim();
|
|
87
|
-
return result || null;
|
|
88
|
-
}
|
|
89
|
-
catch {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
function logDetected(provider, expiresAt) {
|
|
94
|
-
const expiry = new Date(expiresAt).toISOString();
|
|
95
|
-
console.log(`[credential-reader] Detected ${provider} credentials (expires: ${expiry})`);
|
|
24
|
+
/** @deprecated Always returns empty results. */
|
|
25
|
+
function detectCredentials() {
|
|
26
|
+
return { credentials: [], errors: [] };
|
|
96
27
|
}
|
|
97
|
-
|
|
28
|
+
/** @deprecated Always returns null. */
|
|
98
29
|
function readClaudeCredentials() {
|
|
99
|
-
|
|
100
|
-
if (cached !== undefined)
|
|
101
|
-
return cached;
|
|
102
|
-
let result = null;
|
|
103
|
-
try {
|
|
104
|
-
const credPath = path.join(os.homedir(), '.claude', '.credentials.json');
|
|
105
|
-
let data = readJsonFile(credPath);
|
|
106
|
-
// macOS Keychain fallback
|
|
107
|
-
if (!data) {
|
|
108
|
-
const keychainJson = readMacKeychain('Claude Code-credentials', 'Claude Code');
|
|
109
|
-
if (keychainJson) {
|
|
110
|
-
try {
|
|
111
|
-
data = JSON.parse(keychainJson);
|
|
112
|
-
}
|
|
113
|
-
catch { /* ignore */ }
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
if (data) {
|
|
117
|
-
const oauth = data.claudeAiOauth;
|
|
118
|
-
if (oauth?.accessToken && oauth?.refreshToken) {
|
|
119
|
-
result = {
|
|
120
|
-
provider: 'anthropic',
|
|
121
|
-
accessToken: String(oauth.accessToken),
|
|
122
|
-
refreshToken: String(oauth.refreshToken),
|
|
123
|
-
expiresAt: typeof oauth.expiresAt === 'number'
|
|
124
|
-
? oauth.expiresAt
|
|
125
|
-
: typeof oauth.expiresAt === 'string'
|
|
126
|
-
? new Date(oauth.expiresAt).getTime()
|
|
127
|
-
: Date.now() + 3600_000,
|
|
128
|
-
};
|
|
129
|
-
logDetected('anthropic', result.expiresAt);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
// graceful failure
|
|
135
|
-
}
|
|
136
|
-
setCache('anthropic', result);
|
|
137
|
-
return result;
|
|
30
|
+
return null;
|
|
138
31
|
}
|
|
32
|
+
/** @deprecated Always returns null. */
|
|
139
33
|
function readCodexCredentials() {
|
|
140
|
-
|
|
141
|
-
if (cached !== undefined)
|
|
142
|
-
return cached;
|
|
143
|
-
let result = null;
|
|
144
|
-
try {
|
|
145
|
-
const codexHome = process.env.CODEX_HOME || path.join(os.homedir(), '.codex');
|
|
146
|
-
const authPath = path.join(codexHome, 'auth.json');
|
|
147
|
-
let data = readJsonFile(authPath);
|
|
148
|
-
// macOS Keychain fallback
|
|
149
|
-
if (!data) {
|
|
150
|
-
const account = crypto.createHash('sha256').update(codexHome).digest('hex').slice(0, 16);
|
|
151
|
-
const keychainJson = readMacKeychain('Codex Auth', account);
|
|
152
|
-
if (keychainJson) {
|
|
153
|
-
try {
|
|
154
|
-
data = JSON.parse(keychainJson);
|
|
155
|
-
}
|
|
156
|
-
catch { /* ignore */ }
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
if (data) {
|
|
160
|
-
const tokens = data.tokens;
|
|
161
|
-
if (tokens?.access_token && tokens?.refresh_token) {
|
|
162
|
-
const expiresAtRaw = tokens.expires_at ?? tokens.expiresAt;
|
|
163
|
-
const expiresAt = typeof expiresAtRaw === 'number'
|
|
164
|
-
? expiresAtRaw
|
|
165
|
-
: typeof expiresAtRaw === 'string'
|
|
166
|
-
? new Date(expiresAtRaw).getTime()
|
|
167
|
-
: Date.now() + 30 * 24 * 3600_000;
|
|
168
|
-
result = {
|
|
169
|
-
provider: 'openai',
|
|
170
|
-
accessToken: String(tokens.access_token),
|
|
171
|
-
refreshToken: String(tokens.refresh_token),
|
|
172
|
-
expiresAt,
|
|
173
|
-
...(tokens.account_id ? { accountId: String(tokens.account_id) } : {}),
|
|
174
|
-
...(tokens.id_token ? { idToken: String(tokens.id_token) } : {}),
|
|
175
|
-
};
|
|
176
|
-
logDetected('openai', result.expiresAt);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
catch {
|
|
181
|
-
// graceful failure
|
|
182
|
-
}
|
|
183
|
-
setCache('openai', result);
|
|
184
|
-
return result;
|
|
34
|
+
return null;
|
|
185
35
|
}
|
|
36
|
+
/** @deprecated Always returns null. */
|
|
186
37
|
function readGeminiCredentials() {
|
|
187
|
-
|
|
188
|
-
if (cached !== undefined)
|
|
189
|
-
return cached;
|
|
190
|
-
let result = null;
|
|
191
|
-
try {
|
|
192
|
-
const adcPath = path.join(os.homedir(), '.config', 'gcloud', 'application_default_credentials.json');
|
|
193
|
-
const data = readJsonFile(adcPath);
|
|
194
|
-
if (data) {
|
|
195
|
-
// ADC files typically have client_id, client_secret, refresh_token, type
|
|
196
|
-
// access_token may not be present (needs refresh); we store refresh_token
|
|
197
|
-
const refreshToken = data.refresh_token;
|
|
198
|
-
// Some ADC files don't have access_token — it's obtained via refresh
|
|
199
|
-
const accessToken = data.access_token || '';
|
|
200
|
-
if (refreshToken) {
|
|
201
|
-
// Try to get project ID from gcloud config
|
|
202
|
-
let projectId;
|
|
203
|
-
try {
|
|
204
|
-
const configPath = path.join(os.homedir(), '.config', 'gcloud', 'properties');
|
|
205
|
-
const props = fs.readFileSync(configPath, 'utf-8');
|
|
206
|
-
const match = props.match(/project\s*=\s*(.+)/);
|
|
207
|
-
if (match)
|
|
208
|
-
projectId = match[1].trim();
|
|
209
|
-
}
|
|
210
|
-
catch { /* ignore */ }
|
|
211
|
-
if (!projectId) {
|
|
212
|
-
try {
|
|
213
|
-
projectId = (0, child_process_1.execSync)('gcloud config get-value project 2>/dev/null', {
|
|
214
|
-
encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
215
|
-
}).trim() || undefined;
|
|
216
|
-
}
|
|
217
|
-
catch { /* ignore */ }
|
|
218
|
-
}
|
|
219
|
-
// ADC files don't have expiry — token needs refresh, set short expiry
|
|
220
|
-
const mtime = fileMtime(adcPath);
|
|
221
|
-
const expiresAt = mtime ? mtime + 3600_000 : Date.now() + 3600_000;
|
|
222
|
-
result = {
|
|
223
|
-
provider: 'google-gemini',
|
|
224
|
-
accessToken: accessToken,
|
|
225
|
-
refreshToken,
|
|
226
|
-
expiresAt,
|
|
227
|
-
...(projectId ? { projectId } : {}),
|
|
228
|
-
};
|
|
229
|
-
logDetected('google-gemini', result.expiresAt);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
catch {
|
|
234
|
-
// graceful failure
|
|
235
|
-
}
|
|
236
|
-
setCache('google-gemini', result);
|
|
237
|
-
return result;
|
|
238
|
-
}
|
|
239
|
-
// ── Main Detection ──────────────────────────────────────────────────────────
|
|
240
|
-
function detectCredentials() {
|
|
241
|
-
const credentials = [];
|
|
242
|
-
const errors = [];
|
|
243
|
-
const readers = [
|
|
244
|
-
{ provider: 'anthropic', fn: readClaudeCredentials },
|
|
245
|
-
{ provider: 'openai', fn: readCodexCredentials },
|
|
246
|
-
{ provider: 'google-gemini', fn: readGeminiCredentials },
|
|
247
|
-
];
|
|
248
|
-
for (const { provider, fn } of readers) {
|
|
249
|
-
try {
|
|
250
|
-
const cred = fn();
|
|
251
|
-
if (cred)
|
|
252
|
-
credentials.push(cred);
|
|
253
|
-
}
|
|
254
|
-
catch (err) {
|
|
255
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
256
|
-
errors.push({ provider, error: message });
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
console.log(`[credential-reader] Detection complete: ${credentials.length} provider(s) found` +
|
|
260
|
-
(errors.length ? `, ${errors.length} error(s)` : ''));
|
|
261
|
-
return { credentials, errors };
|
|
38
|
+
return null;
|
|
262
39
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return false;
|
|
269
|
-
return Date.now() >= cred.expiresAt - EXPIRY_BUFFER_MS;
|
|
40
|
+
/** Clear the credential cache (no-op). */
|
|
41
|
+
function clearCache() { }
|
|
42
|
+
/** @deprecated Always returns true (expired). */
|
|
43
|
+
function isExpired(_cred) {
|
|
44
|
+
return true;
|
|
270
45
|
}
|
|
271
46
|
//# sourceMappingURL=credential-reader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-reader.js","sourceRoot":"","sources":["../../src/auth/credential-reader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credential-reader.js","sourceRoot":"","sources":["../../src/auth/credential-reader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAkBH,8CAEC;AAGD,sDAEC;AAGD,oDAEC;AAGD,sDAEC;AAGD,gCAAqC;AAGrC,8BAEC;AA1BD,gDAAgD;AAChD,SAAgB,iBAAiB;IAC/B,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AACzC,CAAC;AAED,uCAAuC;AACvC,SAAgB,qBAAqB;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uCAAuC;AACvC,SAAgB,oBAAoB;IAClC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,uCAAuC;AACvC,SAAgB,qBAAqB;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,0CAA0C;AAC1C,SAAgB,UAAU,KAAU,CAAC;AAErC,iDAAiD;AACjD,SAAgB,SAAS,CAAC,KAAsB;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,35 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* REMOVED: Credential status probing has been removed.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* invalid — exchange probe failed, fail closed
|
|
4
|
+
* Connection to LLM providers is now exclusively via:
|
|
5
|
+
* 1. CLI providers (claude-cli, codex-cli) — spawns the CLI binary
|
|
6
|
+
* 2. API key (BYOK) — standard x-api-key authentication
|
|
8
7
|
*/
|
|
9
8
|
export type CapabilityStatus = 'healthy' | 'unknown' | 'invalid';
|
|
10
|
-
export type CredentialSource = 'web-oauth' | 'server-local' | 'apikey';
|
|
11
|
-
/** Typed error codes from the spec */
|
|
12
|
-
export type CapabilityErrorCode = 'SCOPE_MISSING_ORG_CREATE_API_KEY' | 'EXCHANGE_TOKEN_INVALID' | 'EXCHANGE_PERMISSION_DENIED' | 'EXCHANGE_NETWORK_ERROR' | 'OAUTH_REFRESH_INVALID_GRANT' | 'CREDENTIAL_SOURCE_UNAVAILABLE' | 'BEARER_UNSUPPORTED';
|
|
13
9
|
export interface BotCredentialInfo {
|
|
14
|
-
credentialSource?: CredentialSource;
|
|
15
10
|
capabilityStatus?: CapabilityStatus;
|
|
16
|
-
capabilityErrorCode?:
|
|
17
|
-
capabilityErrorDetail?: string | null;
|
|
18
|
-
capabilityCheckedAt?: number | null;
|
|
11
|
+
capabilityErrorCode?: string | null;
|
|
19
12
|
}
|
|
20
|
-
|
|
21
|
-
export declare function shouldReprobe(
|
|
22
|
-
/**
|
|
23
|
-
* Run probe against the server for a given credential.
|
|
24
|
-
* Returns updated capability info.
|
|
25
|
-
*/
|
|
26
|
-
export declare function runProbe(serverBaseUrl: string, authToken: string, keyId?: string): Promise<BotCredentialInfo>;
|
|
27
|
-
/**
|
|
28
|
-
* Map an HTTP status code from an Anthropic API auth error to a typed error code.
|
|
29
|
-
*/
|
|
30
|
-
export declare function authErrorToCode(statusCode: number): CapabilityErrorCode;
|
|
31
|
-
/**
|
|
32
|
-
* Get human-readable remediation message for an error code.
|
|
33
|
-
*/
|
|
34
|
-
export declare function getRemediation(code: CapabilityErrorCode): string;
|
|
13
|
+
/** @deprecated Always returns false. */
|
|
14
|
+
export declare function shouldReprobe(_info: BotCredentialInfo): boolean;
|
|
35
15
|
//# sourceMappingURL=credential-status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-status.d.ts","sourceRoot":"","sources":["../../src/auth/credential-status.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"credential-status.d.ts","sourceRoot":"","sources":["../../src/auth/credential-status.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,wCAAwC;AACxC,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAE/D"}
|
|
@@ -1,103 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* REMOVED: Credential status probing has been removed.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* invalid — exchange probe failed, fail closed
|
|
5
|
+
* Connection to LLM providers is now exclusively via:
|
|
6
|
+
* 1. CLI providers (claude-cli, codex-cli) — spawns the CLI binary
|
|
7
|
+
* 2. API key (BYOK) — standard x-api-key authentication
|
|
9
8
|
*/
|
|
10
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.isProbeStale = isProbeStale;
|
|
12
10
|
exports.shouldReprobe = shouldReprobe;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/** Probe staleness threshold — 1 hour */
|
|
17
|
-
const PROBE_STALE_MS = 60 * 60 * 1000;
|
|
18
|
-
function isProbeStale(checkedAt) {
|
|
19
|
-
if (!checkedAt)
|
|
20
|
-
return true;
|
|
21
|
-
return Date.now() - checkedAt > PROBE_STALE_MS;
|
|
22
|
-
}
|
|
23
|
-
function shouldReprobe(info) {
|
|
24
|
-
if (!info.capabilityStatus || info.capabilityStatus !== 'healthy')
|
|
25
|
-
return true;
|
|
26
|
-
return isProbeStale(info.capabilityCheckedAt);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Run probe against the server for a given credential.
|
|
30
|
-
* Returns updated capability info.
|
|
31
|
-
*/
|
|
32
|
-
async function runProbe(serverBaseUrl, authToken, keyId) {
|
|
33
|
-
try {
|
|
34
|
-
const res = await fetch(`${serverBaseUrl}/api/v1/auth/anthropic/probe`, {
|
|
35
|
-
method: 'POST',
|
|
36
|
-
headers: {
|
|
37
|
-
Authorization: `Bearer ${authToken}`,
|
|
38
|
-
'Content-Type': 'application/json',
|
|
39
|
-
},
|
|
40
|
-
body: JSON.stringify({ keyId }),
|
|
41
|
-
});
|
|
42
|
-
if (!res.ok) {
|
|
43
|
-
const body = await res.text().catch(() => '');
|
|
44
|
-
console.warn(`[credential-status] Probe request failed (${res.status}): ${body}`);
|
|
45
|
-
return {
|
|
46
|
-
capabilityStatus: 'unknown',
|
|
47
|
-
capabilityErrorCode: 'EXCHANGE_NETWORK_ERROR',
|
|
48
|
-
capabilityErrorDetail: `Probe HTTP ${res.status}`,
|
|
49
|
-
capabilityCheckedAt: Date.now(),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
const data = await res.json();
|
|
53
|
-
return {
|
|
54
|
-
capabilityStatus: data.capabilityStatus || 'unknown',
|
|
55
|
-
capabilityErrorCode: data.capabilityErrorCode || null,
|
|
56
|
-
capabilityErrorDetail: data.capabilityErrorDetail || null,
|
|
57
|
-
capabilityCheckedAt: data.capabilityCheckedAt || Date.now(),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
catch (err) {
|
|
61
|
-
console.warn(`[credential-status] Probe network error: ${err?.message}`);
|
|
62
|
-
return {
|
|
63
|
-
capabilityStatus: 'unknown',
|
|
64
|
-
capabilityErrorCode: 'EXCHANGE_NETWORK_ERROR',
|
|
65
|
-
capabilityErrorDetail: err?.message || 'Network error',
|
|
66
|
-
capabilityCheckedAt: Date.now(),
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Map an HTTP status code from an Anthropic API auth error to a typed error code.
|
|
72
|
-
*/
|
|
73
|
-
function authErrorToCode(statusCode) {
|
|
74
|
-
switch (statusCode) {
|
|
75
|
-
case 401: return 'EXCHANGE_TOKEN_INVALID';
|
|
76
|
-
case 403: return 'EXCHANGE_PERMISSION_DENIED';
|
|
77
|
-
default: return 'EXCHANGE_NETWORK_ERROR';
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Get human-readable remediation message for an error code.
|
|
82
|
-
*/
|
|
83
|
-
function getRemediation(code) {
|
|
84
|
-
switch (code) {
|
|
85
|
-
case 'SCOPE_MISSING_ORG_CREATE_API_KEY':
|
|
86
|
-
return 'Re-authorize your Anthropic connection in Settings to grant the required scope.';
|
|
87
|
-
case 'EXCHANGE_TOKEN_INVALID':
|
|
88
|
-
return 'Your Anthropic token was rejected. Re-authorize or check your account.';
|
|
89
|
-
case 'EXCHANGE_PERMISSION_DENIED':
|
|
90
|
-
return 'Your Anthropic token lacks required permissions. Re-authorize with correct permissions.';
|
|
91
|
-
case 'EXCHANGE_NETWORK_ERROR':
|
|
92
|
-
return 'Network error during credential verification. Retry or check connectivity.';
|
|
93
|
-
case 'OAUTH_REFRESH_INVALID_GRANT':
|
|
94
|
-
return 'Your refresh token was rejected. Re-authorize from scratch.';
|
|
95
|
-
case 'CREDENTIAL_SOURCE_UNAVAILABLE':
|
|
96
|
-
return 'Selected credential source is missing or unreachable. Check server agent or re-connect.';
|
|
97
|
-
case 'BEARER_UNSUPPORTED':
|
|
98
|
-
return 'Direct bearer auth rejected by Anthropic. Use the exchange path instead.';
|
|
99
|
-
default:
|
|
100
|
-
return 'Unknown credential error. Check Settings.';
|
|
101
|
-
}
|
|
11
|
+
/** @deprecated Always returns false. */
|
|
12
|
+
function shouldReprobe(_info) {
|
|
13
|
+
return false;
|
|
102
14
|
}
|
|
103
15
|
//# sourceMappingURL=credential-status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-status.js","sourceRoot":"","sources":["../../src/auth/credential-status.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"credential-status.js","sourceRoot":"","sources":["../../src/auth/credential-status.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAUH,sCAEC;AAHD,wCAAwC;AACxC,SAAgB,aAAa,CAAC,KAAwB;IACpD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Auth Module — Funolio Agent
|
|
3
|
+
*
|
|
4
|
+
* Supported auth methods:
|
|
5
|
+
* 1. CLI providers (claude-cli, codex-cli) — handle their own auth
|
|
6
|
+
* 2. API key (BYOK) — explicit key or environment variable
|
|
7
|
+
*
|
|
8
|
+
* Subscription API / OAuth credential resolution has been removed.
|
|
9
|
+
*/
|
|
3
10
|
export { ResolvedAuth, resolveAuth, ensureFreshToken, } from './auto-detect';
|
|
4
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|
package/dist/auth/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Auth Module — Funolio Agent
|
|
4
|
+
*
|
|
5
|
+
* Supported auth methods:
|
|
6
|
+
* 1. CLI providers (claude-cli, codex-cli) — handle their own auth
|
|
7
|
+
* 2. API key (BYOK) — explicit key or environment variable
|
|
8
|
+
*
|
|
9
|
+
* Subscription API / OAuth credential resolution has been removed.
|
|
10
|
+
*/
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureFreshToken = exports.resolveAuth =
|
|
4
|
-
var credential_reader_1 = require("./credential-reader");
|
|
5
|
-
Object.defineProperty(exports, "detectCredentials", { enumerable: true, get: function () { return credential_reader_1.detectCredentials; } });
|
|
6
|
-
Object.defineProperty(exports, "readClaudeCredentials", { enumerable: true, get: function () { return credential_reader_1.readClaudeCredentials; } });
|
|
7
|
-
Object.defineProperty(exports, "readCodexCredentials", { enumerable: true, get: function () { return credential_reader_1.readCodexCredentials; } });
|
|
8
|
-
Object.defineProperty(exports, "readGeminiCredentials", { enumerable: true, get: function () { return credential_reader_1.readGeminiCredentials; } });
|
|
9
|
-
Object.defineProperty(exports, "isExpired", { enumerable: true, get: function () { return credential_reader_1.isExpired; } });
|
|
10
|
-
Object.defineProperty(exports, "clearCache", { enumerable: true, get: function () { return credential_reader_1.clearCache; } });
|
|
11
|
-
var token_refresh_1 = require("./token-refresh");
|
|
12
|
-
Object.defineProperty(exports, "refreshToken", { enumerable: true, get: function () { return token_refresh_1.refreshToken; } });
|
|
12
|
+
exports.ensureFreshToken = exports.resolveAuth = void 0;
|
|
13
13
|
var auto_detect_1 = require("./auto-detect");
|
|
14
14
|
Object.defineProperty(exports, "resolveAuth", { enumerable: true, get: function () { return auto_detect_1.resolveAuth; } });
|
|
15
15
|
Object.defineProperty(exports, "ensureFreshToken", { enumerable: true, get: function () { return auto_detect_1.ensureFreshToken; } });
|
package/dist/auth/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,6CAIuB;AAFrB,0GAAA,WAAW,OAAA;AACX,+GAAA,gBAAgB,OAAA"}
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* REMOVED: Subscription API runtime has been removed.
|
|
3
|
+
*
|
|
4
|
+
* Connection to LLM providers is now exclusively via:
|
|
5
|
+
* 1. CLI providers (claude-cli, codex-cli) — spawns the CLI binary
|
|
6
|
+
* 2. API key (BYOK) — standard x-api-key authentication
|
|
7
|
+
*/
|
|
3
8
|
export type SubscriptionRuntimeProvider = 'anthropic' | 'openai';
|
|
4
|
-
export type SubscriptionSource = 'db:anthropic:openclaw' | 'db:anthropic' | 'db:claude-cli' | 'claude-credentials' | 'db:openai' | 'db:codex-cli' | 'codex-credentials' | 'request:anthropic:openclaw' | 'request:anthropic' | 'request:openai';
|
|
5
9
|
export interface ResolvedSubscriptionRuntime {
|
|
6
10
|
providerName: SubscriptionRuntimeProvider;
|
|
7
11
|
apiKey: string;
|
|
8
12
|
model: string;
|
|
9
|
-
source:
|
|
10
|
-
authMode?: AnthropicAuthMode;
|
|
13
|
+
source: string;
|
|
11
14
|
baseUrl?: string;
|
|
12
15
|
apiQuery?: string;
|
|
13
16
|
apiStyle?: 'openai-chat-completions' | 'codex-chatgpt-responses';
|
|
17
|
+
authMode?: 'oauth-bearer' | 'api-key';
|
|
14
18
|
extraHeaders?: Record<string, string>;
|
|
15
19
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* Anthropic/OpenClaw request shape should stay on native structured messages by default.
|
|
27
|
-
* Source selection tells us where credentials came from, not how to flatten prompts.
|
|
28
|
-
*/
|
|
29
|
-
export declare function resolveClaudeSubscriptionRequestShape(_source?: SubscriptionSource | string | null): 'default' | 'claude-cli-flat';
|
|
30
|
-
export declare function resolveSubscriptionApiModel(profileModel?: string | null, configuredDefaultModel?: string | null): string | null;
|
|
31
|
-
export declare function resolveClaudeSubscriptionRuntime(options?: ResolveRuntimeOptions): Promise<ResolvedSubscriptionRuntime | null>;
|
|
32
|
-
export declare function resolveCodexSubscriptionRuntime(options?: ResolveRuntimeOptions): Promise<ResolvedSubscriptionRuntime | null>;
|
|
33
|
-
export {};
|
|
20
|
+
/** @deprecated Always returns null. */
|
|
21
|
+
export declare function resolveClaudeSubscriptionRuntime(_options?: any): Promise<null>;
|
|
22
|
+
/** @deprecated Always returns null. */
|
|
23
|
+
export declare function resolveCodexSubscriptionRuntime(_options?: any): Promise<null>;
|
|
24
|
+
/** @deprecated Subscription API removed. Returns a display label. */
|
|
25
|
+
export declare function claudeSubscriptionRuntimeLabel(_source?: string | null): string;
|
|
26
|
+
/** @deprecated Subscription API removed. Always returns undefined. */
|
|
27
|
+
export declare function resolveClaudeSubscriptionRequestShape(_source?: string | null): undefined;
|
|
28
|
+
/** @deprecated Subscription API removed. Returns the preferred model or fallback. */
|
|
29
|
+
export declare function resolveSubscriptionApiModel(preferred?: string | null, fallback?: string | null): string | undefined;
|
|
34
30
|
//# sourceMappingURL=subscription-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-runtime.d.ts","sourceRoot":"","sources":["../../src/auth/subscription-runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscription-runtime.d.ts","sourceRoot":"","sources":["../../src/auth/subscription-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,2BAA2B,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEjE,MAAM,WAAW,2BAA2B;IAC1C,YAAY,EAAE,2BAA2B,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,yBAAyB,GAAG,yBAAyB,CAAC;IACjE,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC;AAED,uCAAuC;AACvC,wBAAsB,gCAAgC,CAAC,QAAQ,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF;AAED,uCAAuC;AACvC,wBAAsB,+BAA+B,CAAC,QAAQ,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;AAED,qEAAqE;AACrE,wBAAgB,8BAA8B,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAE9E;AAED,sEAAsE;AACtE,wBAAgB,qCAAqC,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAExF;AAED,qFAAqF;AACrF,wBAAgB,2BAA2B,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAGnH"}
|