@cortexkit/pi-anthropic-auth 1.23.0 → 2.0.0
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 +50 -58
- package/dist/commands.d.ts +23 -3
- package/dist/commands.js +58 -252
- package/dist/convert.d.ts +4 -0
- package/dist/convert.js +36 -19
- package/dist/custody.d.ts +2 -6
- package/dist/custody.js +5 -38
- package/dist/index.d.ts +2 -3
- package/dist/index.js +124 -68
- package/dist/native-commands.d.ts +2 -0
- package/dist/native-commands.js +347 -0
- package/dist/native.d.ts +71 -0
- package/dist/native.js +308 -0
- package/dist/paths.d.ts +2 -0
- package/dist/paths.js +6 -0
- package/dist/stream.d.ts +17 -3
- package/dist/stream.js +544 -427
- package/dist/transcript.d.ts +19 -0
- package/dist/transcript.js +122 -0
- package/dist/transport.d.ts +5 -0
- package/dist/transport.js +30 -0
- package/package.json +2 -2
package/dist/native.js
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { resolve } from 'node:path';
|
|
2
|
+
import { acquireNativeAccountRuntime, createNativeUsagePublisher, getAccountStatePath, getHostClaustrumEnrollmentPaths, isKillswitchEnabled, killswitchPassesPolicy, logger, nativeMigrationAuthorityPhase, nativeRuntimeOptionIdentity, quotaSnapshotHasStandardWindows, quotaSnapshotPassesModelScope, quotaSnapshotPassesPolicy, readNativeAccountsForRequest, readNativeMigrationJournal, resolveClaustrumConnectionPath, resolveNativePoolPaths, } from '@cortexkit/anthropic-auth-core';
|
|
3
|
+
import { getPiAccountStoragePath, getPiClaustrumConnectionOptions, getPiConfigDir, requirePiNativeHostAuth, } from './paths.js';
|
|
4
|
+
export function piAttemptAccessToken(attempt) {
|
|
5
|
+
return attempt.source === 'vault'
|
|
6
|
+
? attempt.receipt.accessToken
|
|
7
|
+
: attempt.admission.access;
|
|
8
|
+
}
|
|
9
|
+
function requestPolicy(routeId, modelId) {
|
|
10
|
+
return (account, current) => {
|
|
11
|
+
if (!account.enabled)
|
|
12
|
+
return { status: 'blocked', reason: 'account-disabled' };
|
|
13
|
+
if (account.source === 'local' && current.mode !== 'local')
|
|
14
|
+
return { status: 'blocked', reason: 'local-mode-unavailable' };
|
|
15
|
+
const storage = current.policyStorage;
|
|
16
|
+
const needsQuotaPolicy = quotaSnapshotHasStandardWindows(account.quota) &&
|
|
17
|
+
(account.source !== 'vault' ||
|
|
18
|
+
Boolean(storage.quota?.minimumRemaining) ||
|
|
19
|
+
isKillswitchEnabled(storage));
|
|
20
|
+
const blocked = (isKillswitchEnabled(storage) &&
|
|
21
|
+
!killswitchPassesPolicy(account.quota, storage, routeId === 'main' ? undefined : routeId, modelId)) ||
|
|
22
|
+
(routeId !== 'main' &&
|
|
23
|
+
((needsQuotaPolicy &&
|
|
24
|
+
!quotaSnapshotPassesPolicy(account.quota, storage)) ||
|
|
25
|
+
!quotaSnapshotPassesModelScope(account.quota, modelId)));
|
|
26
|
+
return blocked
|
|
27
|
+
? { status: 'blocked', reason: 'quota-ineligible' }
|
|
28
|
+
: { status: 'allowed' };
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const runtimes = new Map();
|
|
32
|
+
const RUNTIME_LIMIT = 16;
|
|
33
|
+
function runtimeCacheKey(storagePath) {
|
|
34
|
+
const enrollment = getHostClaustrumEnrollmentPaths('pi');
|
|
35
|
+
return JSON.stringify([
|
|
36
|
+
resolve(storagePath),
|
|
37
|
+
resolve(getAccountStatePath(storagePath)),
|
|
38
|
+
resolve(getPiConfigDir()),
|
|
39
|
+
enrollment.tokenPath,
|
|
40
|
+
enrollment.statePath,
|
|
41
|
+
getPiClaustrumConnectionOptions(storagePath).identity,
|
|
42
|
+
resolve(resolveClaustrumConnectionPath(process.env.PI_ANTHROPIC_AUTH_CLAUSTRUM_CONNECTION_FILE, {
|
|
43
|
+
...process.env,
|
|
44
|
+
OPENCODE_ANTHROPIC_AUTH_CLAUSTRUM_CONNECTION_FILE: undefined,
|
|
45
|
+
})),
|
|
46
|
+
]);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Core's refusal for an install that offline setup has never migrated, such
|
|
50
|
+
* as a 1.x install upgraded in place. Core does not export the error class,
|
|
51
|
+
* so it is matched by name and code; no other error matches.
|
|
52
|
+
*/
|
|
53
|
+
export function isNativeMigrationRequired(error) {
|
|
54
|
+
return (error instanceof Error &&
|
|
55
|
+
error.name === 'NativeAuthorityError' &&
|
|
56
|
+
Reflect.get(error, 'code') === 'migration-required');
|
|
57
|
+
}
|
|
58
|
+
/** Checks Pi host authentication and enrollment before delegating credential authorization and metadata writes to the shared account runtime. */
|
|
59
|
+
/** How often Pi asks the vault for account changes, matching OpenCode's default. Model requests no longer rediscover a healthy roster, so this poll is how Pi notices a re-login or a newly added account. */
|
|
60
|
+
export const PI_VAULT_POLL_INTERVAL_MS = 2000;
|
|
61
|
+
export class PiNativeRuntime {
|
|
62
|
+
paths;
|
|
63
|
+
initialization;
|
|
64
|
+
vaultWatch;
|
|
65
|
+
closed = false;
|
|
66
|
+
closing;
|
|
67
|
+
usagePublications = createNativeUsagePublisher('native-auth');
|
|
68
|
+
constructor(storagePath, options = {}) {
|
|
69
|
+
const env = { ...process.env };
|
|
70
|
+
const poll = options.vaultPoll ?? { intervalMs: PI_VAULT_POLL_INTERVAL_MS };
|
|
71
|
+
const identity = getPiClaustrumConnectionOptions(storagePath).identity;
|
|
72
|
+
this.paths = resolveNativePoolPaths(storagePath);
|
|
73
|
+
this.initialization = this.paths.then((paths) => {
|
|
74
|
+
const runtime = acquireNativeAccountRuntime({
|
|
75
|
+
paths,
|
|
76
|
+
host: 'pi',
|
|
77
|
+
vault: {
|
|
78
|
+
// Core checks Pi enrollment and reads a fresh scoped receipt on every send.
|
|
79
|
+
// Keep the injected connector's identity rather than wrapping it per instance.
|
|
80
|
+
connect: options.connect,
|
|
81
|
+
env,
|
|
82
|
+
identity,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
if (this.closed)
|
|
86
|
+
runtime.close();
|
|
87
|
+
// Refresh returns at once while this host uses local accounts, so the
|
|
88
|
+
// poll costs one enrollment read per tick outside vault custody.
|
|
89
|
+
else if (poll.intervalMs > 0) {
|
|
90
|
+
this.vaultWatch = runtime.vault.watch({
|
|
91
|
+
intervalMs: poll.intervalMs,
|
|
92
|
+
setInterval: poll.setInterval,
|
|
93
|
+
clearInterval: poll.clearInterval,
|
|
94
|
+
});
|
|
95
|
+
// A failed first discovery must not surface as an unhandled rejection;
|
|
96
|
+
// the next poll or a request's bounded refresh retries it.
|
|
97
|
+
void this.vaultWatch.ready.catch(() => { });
|
|
98
|
+
}
|
|
99
|
+
return runtime;
|
|
100
|
+
});
|
|
101
|
+
// Initialization is lazy from the host's perspective; a path failure is
|
|
102
|
+
// surfaced by service(), not as an unhandled background rejection.
|
|
103
|
+
void this.initialization.catch(() => { });
|
|
104
|
+
}
|
|
105
|
+
async service() {
|
|
106
|
+
if (this.closed)
|
|
107
|
+
throw new Error('Pi native authentication is closed');
|
|
108
|
+
await requirePiNativeHostAuth();
|
|
109
|
+
const runtime = await this.initialization;
|
|
110
|
+
if (this.closed)
|
|
111
|
+
throw new Error('Pi native authentication is closed');
|
|
112
|
+
return runtime;
|
|
113
|
+
}
|
|
114
|
+
async routingPath() {
|
|
115
|
+
return (await this.routingStorage()).path;
|
|
116
|
+
}
|
|
117
|
+
async routingStorage() {
|
|
118
|
+
const runtime = await this.service();
|
|
119
|
+
const snapshot = await runtime.read();
|
|
120
|
+
if (snapshot.mode === 'claustrum') {
|
|
121
|
+
if (!snapshot.routingPath)
|
|
122
|
+
throw new Error('Vault routing storage is unavailable');
|
|
123
|
+
return { path: snapshot.routingPath, vaultSeed: snapshot.routingSeed };
|
|
124
|
+
}
|
|
125
|
+
// Keep local session-to-account assignments at the exact file destination
|
|
126
|
+
// recorded by migration; guessing a new path would lose those assignments.
|
|
127
|
+
const journal = await readNativeMigrationJournal(await this.paths);
|
|
128
|
+
if (!journal ||
|
|
129
|
+
!nativeMigrationAuthorityPhase(journal) ||
|
|
130
|
+
!journal.routingPaths.destination)
|
|
131
|
+
throw new Error('Pi native routing requires committed offline migration');
|
|
132
|
+
return { path: journal.routingPaths.destination };
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Return the account runtime's migration-refusal error when local credentials
|
|
136
|
+
* have not been migrated by offline setup, or undefined when no such refusal
|
|
137
|
+
* occurs. Bypass the Pi login check in service() so older installations with
|
|
138
|
+
* a stored Pi login are recognized too. An enrolled vault may initialize its
|
|
139
|
+
* public settings on this read; local storage is never changed.
|
|
140
|
+
*/
|
|
141
|
+
async migrationRefusal() {
|
|
142
|
+
if (this.closed)
|
|
143
|
+
return undefined;
|
|
144
|
+
try {
|
|
145
|
+
await (await this.initialization).read();
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
return isNativeMigrationRequired(error) ? error : undefined;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/** Read the published inventory even when no account can serve, so /claude can show its sign-in remedy. */
|
|
153
|
+
async view(signal) {
|
|
154
|
+
const runtime = await this.service();
|
|
155
|
+
signal?.throwIfAborted();
|
|
156
|
+
return runtime.read();
|
|
157
|
+
}
|
|
158
|
+
/** Admit a model request without rediscovering a healthy roster. */
|
|
159
|
+
async requestView(signal) {
|
|
160
|
+
const runtime = await this.service();
|
|
161
|
+
return readNativeAccountsForRequest(runtime, signal);
|
|
162
|
+
}
|
|
163
|
+
async authorize(routeId, signal, modelId) {
|
|
164
|
+
const runtime = await this.service();
|
|
165
|
+
const snapshot = await runtime.read();
|
|
166
|
+
const account = snapshot.accounts.find((candidate) => candidate.id === routeId);
|
|
167
|
+
if (!account?.enabled || account.type !== 'oauth')
|
|
168
|
+
throw new Error('Pi native OAuth route is unavailable');
|
|
169
|
+
const policy = requestPolicy(routeId, modelId);
|
|
170
|
+
if (policy(account, snapshot).status === 'blocked')
|
|
171
|
+
throw new Error('Pi native quota policy refused the OAuth route');
|
|
172
|
+
if (snapshot.mode === 'claustrum') {
|
|
173
|
+
const receipt = await runtime.authorizeVault(routeId, signal);
|
|
174
|
+
if (!receipt.assertedAccountIdentity)
|
|
175
|
+
throw new Error('Pi native OAuth identity is unasserted');
|
|
176
|
+
const current = await runtime.read();
|
|
177
|
+
const admitted = current.accounts.find((candidate) => candidate.id === routeId);
|
|
178
|
+
// After the vault lookup, recheck quota limits for this request’s model.
|
|
179
|
+
// A policy refusal must not report the OAuth token as invalid.
|
|
180
|
+
if (!admitted ||
|
|
181
|
+
current.mode !== 'claustrum' ||
|
|
182
|
+
admitted.accountIdentity !== receipt.assertedAccountIdentity ||
|
|
183
|
+
requestPolicy(routeId, modelId)(admitted, current).status === 'blocked')
|
|
184
|
+
throw new Error('Pi native quota policy refused the OAuth route');
|
|
185
|
+
return {
|
|
186
|
+
source: 'vault',
|
|
187
|
+
accountIdentity: receipt.assertedAccountIdentity,
|
|
188
|
+
receipt,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
const admission = await runtime.authorizeLocal(routeId, { signal, policy });
|
|
192
|
+
if (admission.status !== 'usable' || !admission.binding.identity)
|
|
193
|
+
throw new Error('Pi native OAuth admission refused');
|
|
194
|
+
return {
|
|
195
|
+
source: 'local',
|
|
196
|
+
accountIdentity: admission.binding.identity,
|
|
197
|
+
admission,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
async retry(routeId, served, signal, modelId) {
|
|
201
|
+
const runtime = await this.service();
|
|
202
|
+
if (served.source === 'vault') {
|
|
203
|
+
const current = await runtime.read();
|
|
204
|
+
const account = current.accounts.find((candidate) => candidate.id === routeId);
|
|
205
|
+
if (!account ||
|
|
206
|
+
current.mode !== 'claustrum' ||
|
|
207
|
+
requestPolicy(routeId, modelId)(account, current).status === 'blocked')
|
|
208
|
+
return undefined;
|
|
209
|
+
const decision = await runtime.vault.prepareRetry(served.receipt, signal);
|
|
210
|
+
logger.debug('native-auth', 'Pi 401 retry decision', {
|
|
211
|
+
source: 'vault',
|
|
212
|
+
servedVersion: served.receipt.recordVersion,
|
|
213
|
+
currentVersion: decision.retry
|
|
214
|
+
? decision.receipt.recordVersion
|
|
215
|
+
: undefined,
|
|
216
|
+
retry: decision.retry,
|
|
217
|
+
reason: decision.retry ? 'rotated' : decision.reason,
|
|
218
|
+
});
|
|
219
|
+
if (!decision.retry || !decision.receipt.assertedAccountIdentity)
|
|
220
|
+
return undefined;
|
|
221
|
+
const after = await runtime.read();
|
|
222
|
+
const admitted = after.accounts.find((candidate) => candidate.id === routeId);
|
|
223
|
+
if (!admitted ||
|
|
224
|
+
after.mode !== 'claustrum' ||
|
|
225
|
+
admitted.accountIdentity !== decision.receipt.assertedAccountIdentity ||
|
|
226
|
+
requestPolicy(routeId, modelId)(admitted, after).status === 'blocked')
|
|
227
|
+
return undefined;
|
|
228
|
+
return {
|
|
229
|
+
source: 'vault',
|
|
230
|
+
accountIdentity: decision.receipt.assertedAccountIdentity,
|
|
231
|
+
receipt: decision.receipt,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
const admission = await runtime.authorizeLocal(routeId, {
|
|
235
|
+
intent: 'refresh',
|
|
236
|
+
rejectedAccessToken: served.admission.access,
|
|
237
|
+
signal,
|
|
238
|
+
policy: requestPolicy(routeId, modelId),
|
|
239
|
+
});
|
|
240
|
+
if (admission.status !== 'usable' ||
|
|
241
|
+
admission.binding.identity !== served.accountIdentity ||
|
|
242
|
+
admission.access === served.admission.access)
|
|
243
|
+
return undefined;
|
|
244
|
+
return {
|
|
245
|
+
source: 'local',
|
|
246
|
+
accountIdentity: served.accountIdentity,
|
|
247
|
+
admission,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
async report(served, status, source) {
|
|
251
|
+
if (served.source === 'vault' && status === 401)
|
|
252
|
+
await (await this.service()).vault.reportFailure(served.receipt, status, source);
|
|
253
|
+
}
|
|
254
|
+
async markUsed(served, servingRuntime) {
|
|
255
|
+
const runtime = servingRuntime ?? (await this.service());
|
|
256
|
+
const patch = { lastUsed: Date.now() };
|
|
257
|
+
if (served.source === 'vault')
|
|
258
|
+
await runtime.vault.publish(served.receipt, patch);
|
|
259
|
+
else
|
|
260
|
+
await runtime.publishLocal(served.admission.subject, patch);
|
|
261
|
+
}
|
|
262
|
+
close() {
|
|
263
|
+
this.closed = true;
|
|
264
|
+
this.vaultWatch?.close();
|
|
265
|
+
this.closing ??= (async () => {
|
|
266
|
+
await this.usagePublications.drain();
|
|
267
|
+
await this.initialization.then((runtime) => runtime.close(), () => { });
|
|
268
|
+
})();
|
|
269
|
+
return this.closing;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
export function getPiNativeRuntime(storagePath = getPiAccountStoragePath(), options = {}) {
|
|
273
|
+
const contextKey = runtimeCacheKey(storagePath);
|
|
274
|
+
const key = JSON.stringify([
|
|
275
|
+
contextKey,
|
|
276
|
+
nativeRuntimeOptionIdentity(options.connect),
|
|
277
|
+
]);
|
|
278
|
+
const existing = runtimes.get(key);
|
|
279
|
+
if (existing)
|
|
280
|
+
return existing.runtime;
|
|
281
|
+
if (!options.connect) {
|
|
282
|
+
// A supplied connector installs the context's test transport. Ordinary host
|
|
283
|
+
// lookups reuse it, but an explicitly different connector owns another key.
|
|
284
|
+
const configured = [...runtimes.values()].find((entry) => entry.contextKey === contextKey);
|
|
285
|
+
if (configured)
|
|
286
|
+
return configured.runtime;
|
|
287
|
+
}
|
|
288
|
+
const runtime = new PiNativeRuntime(storagePath, options);
|
|
289
|
+
while (runtimes.size >= RUNTIME_LIMIT) {
|
|
290
|
+
const oldest = runtimes.keys().next().value;
|
|
291
|
+
if (oldest === undefined)
|
|
292
|
+
break;
|
|
293
|
+
void runtimes.get(oldest)?.runtime.close();
|
|
294
|
+
runtimes.delete(oldest);
|
|
295
|
+
}
|
|
296
|
+
runtimes.set(key, { contextKey, storagePath: resolve(storagePath), runtime });
|
|
297
|
+
return runtime;
|
|
298
|
+
}
|
|
299
|
+
export function closePiNativeRuntime(storagePath = getPiAccountStoragePath()) {
|
|
300
|
+
const closing = [];
|
|
301
|
+
for (const [key, entry] of runtimes) {
|
|
302
|
+
if (entry.storagePath !== resolve(storagePath))
|
|
303
|
+
continue;
|
|
304
|
+
runtimes.delete(key);
|
|
305
|
+
closing.push(entry.runtime.close());
|
|
306
|
+
}
|
|
307
|
+
return Promise.all(closing).then(() => { });
|
|
308
|
+
}
|
package/dist/paths.d.ts
CHANGED
|
@@ -11,3 +11,5 @@ export declare function getPiClaustrumConnectionOptions(storagePath?: string): {
|
|
|
11
11
|
};
|
|
12
12
|
/** Read-only metadata inspection; never create or rewrite Pi's credential store. */
|
|
13
13
|
export declare function hasPiLocalAnthropicOAuth(): Promise<boolean>;
|
|
14
|
+
/** The user must approve removing the host’s Anthropic OAuth credential before the shared account store can serve requests. */
|
|
15
|
+
export declare function requirePiNativeHostAuth(): Promise<void>;
|
package/dist/paths.js
CHANGED
|
@@ -48,3 +48,9 @@ export async function hasPiLocalAnthropicOAuth() {
|
|
|
48
48
|
throw new Error('Cannot safely inspect Pi authentication metadata');
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
/** The user must approve removing the host’s Anthropic OAuth credential before the shared account store can serve requests. */
|
|
52
|
+
export async function requirePiNativeHostAuth() {
|
|
53
|
+
if (await hasPiLocalAnthropicOAuth()) {
|
|
54
|
+
throw new Error('Pi still has a host Anthropic OAuth credential. Run offline setup to migrate it and approve its removal before using the native pool.');
|
|
55
|
+
}
|
|
56
|
+
}
|
package/dist/stream.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { type ApiKeyAccount,
|
|
1
|
+
import { type ApiKeyAccount, CacheKeepManager, type MidConversationEffortTransition } from '@cortexkit/anthropic-auth-core';
|
|
2
2
|
import { type Api, type AssistantMessageEventStream, type Context, type Model, type SimpleStreamOptions } from '@earendil-works/pi-ai';
|
|
3
|
-
export declare function getPiScopedRuntime(storagePath?: string, overrides?: Partial<Pick<ClaustrumScopedRuntimeOptions, 'connect' | 'pollIntervalMs' | 'setTimeoutImpl' | 'clearTimeoutImpl'>>): ClaustrumScopedRuntime;
|
|
4
|
-
export declare function closePiScopedRuntime(storagePath?: string): void;
|
|
5
3
|
export declare function clearPiStickyRoutingSession(storagePath: string, sessionId: string): Promise<void>;
|
|
6
4
|
export declare function getPiTrackedCacheKeepSessions(): Promise<import("@cortexkit/anthropic-auth-core").CacheKeepTrackedSession[]>;
|
|
5
|
+
/** Call prewarmNow directly to exercise its provider request without clock or timer mocks. */
|
|
6
|
+
export declare function __prewarmPiCacheKeepForTest(input: Parameters<CacheKeepManager['prewarmNow']>[0]): Promise<import("@cortexkit/anthropic-auth-core").CacheKeepPrewarmResult>;
|
|
7
7
|
type AnthropicEvent = {
|
|
8
8
|
type?: string;
|
|
9
9
|
index?: number;
|
|
10
10
|
content_block?: Record<string, unknown>;
|
|
11
11
|
delta?: Record<string, unknown>;
|
|
12
|
+
error?: Record<string, unknown>;
|
|
12
13
|
message?: {
|
|
13
14
|
usage?: Record<string, number>;
|
|
14
15
|
};
|
|
@@ -18,5 +19,18 @@ export declare function buildExplicitBaseMessagesUrl(baseURL: string): URL;
|
|
|
18
19
|
export declare function configureApiRouteHeaders(account: ApiKeyAccount, fastMode: boolean): Headers;
|
|
19
20
|
export declare function parseSse(response: Response): AsyncGenerator<AnthropicEvent>;
|
|
20
21
|
export declare function primaryResponseAllowsApiFallback(preflight: Response | string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Classify a successful stream by its first event without a tee: the bytes
|
|
24
|
+
* read are replayed in front of the rest of the body, so cancelling the
|
|
25
|
+
* returned response cancels the provider body itself. `preflight` is
|
|
26
|
+
* `rate_limit_error` for a streamed rate limit (the provider body is then
|
|
27
|
+
* cancelled and only the bytes read are replayed), else the returned
|
|
28
|
+
* response. A stream whose first event does not arrive within the budget, or
|
|
29
|
+
* cannot be read, is returned unclassified.
|
|
30
|
+
*/
|
|
31
|
+
export declare function firstStreamingError(response: Response): Promise<{
|
|
32
|
+
response: Response;
|
|
33
|
+
preflight: Response | 'rate_limit_error';
|
|
34
|
+
}>;
|
|
21
35
|
export declare function streamCortexKitAnthropic(model: Model<Api>, context: Context, options?: SimpleStreamOptions, effortTransitions?: readonly MidConversationEffortTransition[]): AssistantMessageEventStream;
|
|
22
36
|
export {};
|