@tokensize/agent-client 0.3.0-beta.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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/index.d.ts +392 -0
- package/dist/index.js +1131 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TokenSize
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# `@tokensize/agent-client`
|
|
2
|
+
|
|
3
|
+
The canonical local TokenSize client. It discovers installed coding harnesses, keeps normalized capability and allowance caches in `~/.tokensize`, requests a privacy-safe route from `api.tokensize.dev`, executes the selected local harness under the requested permission ceiling, and submits content-free feedback.
|
|
4
|
+
|
|
5
|
+
Credentials, prompts, repository contents, and model output remain local unless prompt sharing is explicitly enabled. The CLI, Codex MCP server, and OpenCode plugin use this package rather than implementing separate clients.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { HarnessId, AgentModel, Allowance, TaskRole, PermissionProfile, RoutingObjective, AgentRouteResponse, AgentRouteRequest, RunEvent } from '@tokensize/agent-router';
|
|
2
|
+
import { ChildProcess } from 'node:child_process';
|
|
3
|
+
|
|
4
|
+
interface HarnessDiscovery {
|
|
5
|
+
harness: HarnessId;
|
|
6
|
+
installed: boolean;
|
|
7
|
+
executable?: string;
|
|
8
|
+
version?: string;
|
|
9
|
+
authenticated: boolean;
|
|
10
|
+
models: AgentModel[];
|
|
11
|
+
warnings: string[];
|
|
12
|
+
probeTimedOut?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface DiscoveryCacheMetadata {
|
|
15
|
+
hit: boolean;
|
|
16
|
+
refreshed?: boolean;
|
|
17
|
+
persisted?: boolean;
|
|
18
|
+
reason?: string;
|
|
19
|
+
path?: string;
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
expiresAt?: string;
|
|
22
|
+
ageMs?: number;
|
|
23
|
+
warning?: string;
|
|
24
|
+
}
|
|
25
|
+
interface DiscoveryResult {
|
|
26
|
+
harnesses: HarnessDiscovery[];
|
|
27
|
+
cache: DiscoveryCacheMetadata;
|
|
28
|
+
}
|
|
29
|
+
interface DiscoveryOptions {
|
|
30
|
+
forceRefresh?: boolean;
|
|
31
|
+
reason?: string;
|
|
32
|
+
}
|
|
33
|
+
declare function opencodeModelIds(output: string): string[];
|
|
34
|
+
declare function isCredentialFreeOpenCodeModel(id: string): boolean;
|
|
35
|
+
declare const HARNESS_IDS: readonly HarnessId[];
|
|
36
|
+
/** Probe one harness without invoking it for task execution. */
|
|
37
|
+
declare function discoverHarness(harness: HarnessId): Promise<HarnessDiscovery>;
|
|
38
|
+
declare function discoverHarnesses(): Promise<HarnessDiscovery[]>;
|
|
39
|
+
declare function discoverHarnessesCached(options?: DiscoveryOptions): Promise<DiscoveryResult>;
|
|
40
|
+
declare function flattenModels(discovery: HarnessDiscovery[], maximum?: number): AgentModel[];
|
|
41
|
+
|
|
42
|
+
interface RunResult {
|
|
43
|
+
code: number | null;
|
|
44
|
+
stdout: string;
|
|
45
|
+
stderr: string;
|
|
46
|
+
timedOut: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** Signal only the process group created for a TokenSize child command. */
|
|
49
|
+
declare function terminateProcessTree(child: ChildProcess, signal: NodeJS.Signals): void;
|
|
50
|
+
declare function run(command: string, args: string[], options?: {
|
|
51
|
+
cwd?: string;
|
|
52
|
+
input?: string;
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
maxBytes?: number;
|
|
55
|
+
env?: NodeJS.ProcessEnv;
|
|
56
|
+
}): Promise<RunResult>;
|
|
57
|
+
|
|
58
|
+
declare function home(): string;
|
|
59
|
+
declare function saveApiKey(apiKey: string): Promise<void>;
|
|
60
|
+
declare function readApiKey(): Promise<string | null>;
|
|
61
|
+
declare function installationId(): Promise<string>;
|
|
62
|
+
interface LastRouteReceipt {
|
|
63
|
+
routeId: string;
|
|
64
|
+
runId?: string;
|
|
65
|
+
feedbackToken: string;
|
|
66
|
+
expiresAt: string;
|
|
67
|
+
targetId: string | null;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The local policy document: one owner-only file both hands edit — the human
|
|
71
|
+
* through `tokensize policy` or the web UI defaults, agents by reading it.
|
|
72
|
+
* Local values are ceilings; a hosted policy can only narrow them (see
|
|
73
|
+
* `mergePolicy` in @tokensize/agent-router). Environment variables still
|
|
74
|
+
* override for CI, but the file is the durable source.
|
|
75
|
+
*/
|
|
76
|
+
interface LocalPolicy {
|
|
77
|
+
rootHarness?: string;
|
|
78
|
+
rootQualityPrior?: number;
|
|
79
|
+
objective?: "quality" | "balanced" | "tokens" | "latency";
|
|
80
|
+
permissionCeiling?: "inspect" | "edit" | "test" | "network";
|
|
81
|
+
maxDelegationDepth?: number;
|
|
82
|
+
subscriptionHarnesses?: string[];
|
|
83
|
+
sharePromptDefault?: boolean;
|
|
84
|
+
}
|
|
85
|
+
declare function readLocalPolicy(): Promise<LocalPolicy>;
|
|
86
|
+
declare function saveLocalPolicy(patch: Partial<LocalPolicy>): Promise<LocalPolicy>;
|
|
87
|
+
declare function saveLastRoute(receipt: LastRouteReceipt): Promise<void>;
|
|
88
|
+
declare function readLastRoute(): Promise<LastRouteReceipt>;
|
|
89
|
+
|
|
90
|
+
interface HarnessAllowance {
|
|
91
|
+
default: Allowance;
|
|
92
|
+
byModelId?: Record<string, Allowance>;
|
|
93
|
+
}
|
|
94
|
+
interface AllowanceSnapshot {
|
|
95
|
+
harnesses: Partial<Record<HarnessId, HarnessAllowance>>;
|
|
96
|
+
cache: {
|
|
97
|
+
hit: boolean;
|
|
98
|
+
path: string;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
expiresAt: string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
declare function parseClaudeUsage(raw: string): HarnessAllowance;
|
|
104
|
+
declare function allowances(discovery: HarnessDiscovery[], forceRefresh?: boolean): Promise<AllowanceSnapshot>;
|
|
105
|
+
declare function applyAllowances(discovery: HarnessDiscovery[], snapshot: AllowanceSnapshot): HarnessDiscovery[];
|
|
106
|
+
declare function rootAllowance(harness: HarnessId, snapshot: AllowanceSnapshot): Allowance;
|
|
107
|
+
declare function allowanceScopesForHarness(item: HarnessDiscovery): ({
|
|
108
|
+
modelCount: number;
|
|
109
|
+
allowance: {
|
|
110
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
111
|
+
observedAt: string;
|
|
112
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
113
|
+
remainingFraction?: number | undefined;
|
|
114
|
+
resetsAt?: string | undefined;
|
|
115
|
+
} & {
|
|
116
|
+
remainingPercent?: number;
|
|
117
|
+
};
|
|
118
|
+
sampleModelIds: string[];
|
|
119
|
+
omittedModelCount: number;
|
|
120
|
+
} | {
|
|
121
|
+
modelCount: number;
|
|
122
|
+
allowance: {
|
|
123
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
124
|
+
observedAt: string;
|
|
125
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
126
|
+
remainingFraction?: number | undefined;
|
|
127
|
+
resetsAt?: string | undefined;
|
|
128
|
+
} & {
|
|
129
|
+
remainingPercent?: number;
|
|
130
|
+
};
|
|
131
|
+
modelIds: string[];
|
|
132
|
+
})[];
|
|
133
|
+
/** A labeled, display-safe view that distinguishes harness defaults from model-scoped limits. */
|
|
134
|
+
declare function allowanceReport(discovery: HarnessDiscovery[], snapshot: AllowanceSnapshot): {
|
|
135
|
+
harness: "codex" | "claude" | "copilot" | "cursor" | "opencode" | "custom";
|
|
136
|
+
harnessDefault: {
|
|
137
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
138
|
+
observedAt: string;
|
|
139
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
140
|
+
remainingFraction?: number | undefined;
|
|
141
|
+
resetsAt?: string | undefined;
|
|
142
|
+
} & {
|
|
143
|
+
remainingPercent?: number;
|
|
144
|
+
};
|
|
145
|
+
modelScopes: ({
|
|
146
|
+
modelCount: number;
|
|
147
|
+
allowance: {
|
|
148
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
149
|
+
observedAt: string;
|
|
150
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
151
|
+
remainingFraction?: number | undefined;
|
|
152
|
+
resetsAt?: string | undefined;
|
|
153
|
+
} & {
|
|
154
|
+
remainingPercent?: number;
|
|
155
|
+
};
|
|
156
|
+
sampleModelIds: string[];
|
|
157
|
+
omittedModelCount: number;
|
|
158
|
+
} | {
|
|
159
|
+
modelCount: number;
|
|
160
|
+
allowance: {
|
|
161
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
162
|
+
observedAt: string;
|
|
163
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
164
|
+
remainingFraction?: number | undefined;
|
|
165
|
+
resetsAt?: string | undefined;
|
|
166
|
+
} & {
|
|
167
|
+
remainingPercent?: number;
|
|
168
|
+
};
|
|
169
|
+
modelIds: string[];
|
|
170
|
+
})[];
|
|
171
|
+
}[];
|
|
172
|
+
|
|
173
|
+
declare function executionArgs(harness: HarnessId, model: string, permission: "inspect" | "edit" | "test" | "network", cwd: string): string[];
|
|
174
|
+
|
|
175
|
+
interface TokenSizeClientOptions {
|
|
176
|
+
apiUrl?: string;
|
|
177
|
+
clientSurface?: AgentRouteRequest["client"]["surface"];
|
|
178
|
+
clientVersion?: string;
|
|
179
|
+
rootHarness?: HarnessId;
|
|
180
|
+
rootActive?: boolean;
|
|
181
|
+
rootQualityPrior?: number;
|
|
182
|
+
maxDelegationDepth?: number;
|
|
183
|
+
fetchImpl?: typeof fetch;
|
|
184
|
+
openBrowser?: (url: string) => void;
|
|
185
|
+
}
|
|
186
|
+
interface RouteOptions {
|
|
187
|
+
task: string;
|
|
188
|
+
role?: TaskRole;
|
|
189
|
+
permission?: PermissionProfile;
|
|
190
|
+
objective?: RoutingObjective;
|
|
191
|
+
sharePrompt?: boolean;
|
|
192
|
+
refresh?: boolean;
|
|
193
|
+
timeoutMs?: number;
|
|
194
|
+
}
|
|
195
|
+
interface RoutePreview {
|
|
196
|
+
receiptId: string;
|
|
197
|
+
/** Present when the service created a Run document for this route. */
|
|
198
|
+
runId?: string;
|
|
199
|
+
route: Omit<AgentRouteResponse, "feedbackToken">;
|
|
200
|
+
cache: {
|
|
201
|
+
discovery: DiscoveryCacheMetadata;
|
|
202
|
+
allowance: Awaited<ReturnType<typeof allowances>>["cache"];
|
|
203
|
+
};
|
|
204
|
+
harnesses: Array<ReturnType<typeof summarizeHarness>>;
|
|
205
|
+
}
|
|
206
|
+
/** Shape of a Run document as served by GET /v1/runs/:id. */
|
|
207
|
+
interface RunDocumentView {
|
|
208
|
+
runId: string;
|
|
209
|
+
status: string;
|
|
210
|
+
events: Array<{
|
|
211
|
+
seq: number;
|
|
212
|
+
at: string;
|
|
213
|
+
actor: string;
|
|
214
|
+
type: string;
|
|
215
|
+
data: Record<string, unknown>;
|
|
216
|
+
}>;
|
|
217
|
+
decision: {
|
|
218
|
+
plan: {
|
|
219
|
+
targetId: string | null;
|
|
220
|
+
workflow: string;
|
|
221
|
+
};
|
|
222
|
+
reasonCodes: string[];
|
|
223
|
+
confidence: number;
|
|
224
|
+
};
|
|
225
|
+
approvals: Array<{
|
|
226
|
+
kind: string;
|
|
227
|
+
state: string;
|
|
228
|
+
surface?: string;
|
|
229
|
+
at: string;
|
|
230
|
+
}>;
|
|
231
|
+
createdAt: string;
|
|
232
|
+
expiresAt: string;
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
}
|
|
235
|
+
interface StatusResult {
|
|
236
|
+
service: {
|
|
237
|
+
url: string;
|
|
238
|
+
authenticated: boolean;
|
|
239
|
+
catalog?: unknown;
|
|
240
|
+
};
|
|
241
|
+
installationId: string;
|
|
242
|
+
cache: {
|
|
243
|
+
discovery: DiscoveryCacheMetadata;
|
|
244
|
+
allowance: Awaited<ReturnType<typeof allowances>>["cache"];
|
|
245
|
+
};
|
|
246
|
+
harnesses: Array<ReturnType<typeof summarizeHarness>>;
|
|
247
|
+
}
|
|
248
|
+
declare function summarizeHarness(item: HarnessDiscovery, verbose?: boolean): {
|
|
249
|
+
harness: "codex" | "claude" | "copilot" | "cursor" | "opencode" | "custom";
|
|
250
|
+
installed: boolean;
|
|
251
|
+
authenticated: boolean;
|
|
252
|
+
version: string | undefined;
|
|
253
|
+
modelCount: number;
|
|
254
|
+
allowanceScopes: ({
|
|
255
|
+
modelCount: number;
|
|
256
|
+
allowance: {
|
|
257
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
258
|
+
observedAt: string;
|
|
259
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
260
|
+
remainingFraction?: number | undefined;
|
|
261
|
+
resetsAt?: string | undefined;
|
|
262
|
+
} & {
|
|
263
|
+
remainingPercent?: number;
|
|
264
|
+
};
|
|
265
|
+
sampleModelIds: string[];
|
|
266
|
+
omittedModelCount: number;
|
|
267
|
+
} | {
|
|
268
|
+
modelCount: number;
|
|
269
|
+
allowance: {
|
|
270
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
271
|
+
observedAt: string;
|
|
272
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
273
|
+
remainingFraction?: number | undefined;
|
|
274
|
+
resetsAt?: string | undefined;
|
|
275
|
+
} & {
|
|
276
|
+
remainingPercent?: number;
|
|
277
|
+
};
|
|
278
|
+
modelIds: string[];
|
|
279
|
+
})[];
|
|
280
|
+
warnings: string[];
|
|
281
|
+
} | {
|
|
282
|
+
models: {
|
|
283
|
+
id: string;
|
|
284
|
+
harness: "codex" | "claude" | "copilot" | "cursor" | "opencode" | "custom";
|
|
285
|
+
nativeModelId: string;
|
|
286
|
+
displayName: string;
|
|
287
|
+
readiness: "installed" | "auth-ready" | "model-listed" | "invocation-compatible" | "live-confirmed";
|
|
288
|
+
authMode: "unknown" | "subscription" | "api-key" | "cloud-provider" | "local";
|
|
289
|
+
productUseApproved: boolean;
|
|
290
|
+
capabilities: {
|
|
291
|
+
tools: boolean;
|
|
292
|
+
vision: boolean;
|
|
293
|
+
structuredOutput: "none" | "json" | "jsonl" | "schema";
|
|
294
|
+
sessions: "none" | "resume" | "continue";
|
|
295
|
+
permissions: ("inspect" | "test" | "edit" | "network")[];
|
|
296
|
+
};
|
|
297
|
+
identityProof: "runtime-reported" | "unavailable" | "requested";
|
|
298
|
+
qualityPrior: number;
|
|
299
|
+
tokenEfficiencyPrior: number;
|
|
300
|
+
latencyPrior: number;
|
|
301
|
+
allowance: {
|
|
302
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
303
|
+
observedAt: string;
|
|
304
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
305
|
+
remainingFraction?: number | undefined;
|
|
306
|
+
resetsAt?: string | undefined;
|
|
307
|
+
} | undefined;
|
|
308
|
+
}[];
|
|
309
|
+
harness: "codex" | "claude" | "copilot" | "cursor" | "opencode" | "custom";
|
|
310
|
+
installed: boolean;
|
|
311
|
+
authenticated: boolean;
|
|
312
|
+
version: string | undefined;
|
|
313
|
+
modelCount: number;
|
|
314
|
+
allowanceScopes: ({
|
|
315
|
+
modelCount: number;
|
|
316
|
+
allowance: {
|
|
317
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
318
|
+
observedAt: string;
|
|
319
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
320
|
+
remainingFraction?: number | undefined;
|
|
321
|
+
resetsAt?: string | undefined;
|
|
322
|
+
} & {
|
|
323
|
+
remainingPercent?: number;
|
|
324
|
+
};
|
|
325
|
+
sampleModelIds: string[];
|
|
326
|
+
omittedModelCount: number;
|
|
327
|
+
} | {
|
|
328
|
+
modelCount: number;
|
|
329
|
+
allowance: {
|
|
330
|
+
status: "unknown" | "available" | "low" | "exhausted" | "unmetered";
|
|
331
|
+
observedAt: string;
|
|
332
|
+
source: "runtime-reported" | "unavailable" | "credential-free";
|
|
333
|
+
remainingFraction?: number | undefined;
|
|
334
|
+
resetsAt?: string | undefined;
|
|
335
|
+
} & {
|
|
336
|
+
remainingPercent?: number;
|
|
337
|
+
};
|
|
338
|
+
modelIds: string[];
|
|
339
|
+
})[];
|
|
340
|
+
warnings: string[];
|
|
341
|
+
};
|
|
342
|
+
declare class TokenSizeClient {
|
|
343
|
+
private readonly options;
|
|
344
|
+
constructor(options?: TokenSizeClientOptions);
|
|
345
|
+
/**
|
|
346
|
+
* Resolve routing defaults: explicit constructor options win, then
|
|
347
|
+
* environment variables (CI overrides), then the local policy document at
|
|
348
|
+
* ~/.tokensize/policy.json, then fail-closed defaults.
|
|
349
|
+
*/
|
|
350
|
+
private resolvedDefaults;
|
|
351
|
+
private key;
|
|
352
|
+
private api;
|
|
353
|
+
status(options?: {
|
|
354
|
+
refresh?: boolean;
|
|
355
|
+
verbose?: boolean;
|
|
356
|
+
}): Promise<StatusResult>;
|
|
357
|
+
connect(surface?: "codex-plugin" | "opencode-plugin"): Promise<void>;
|
|
358
|
+
private prepare;
|
|
359
|
+
route(options: RouteOptions): Promise<RoutePreview>;
|
|
360
|
+
/** List recent Run documents for this tenant. */
|
|
361
|
+
runs(options?: {
|
|
362
|
+
limit?: number;
|
|
363
|
+
}): Promise<unknown>;
|
|
364
|
+
/** Read one Run document — the authoritative story of a delegation. */
|
|
365
|
+
runDocument(runId: string): Promise<RunDocumentView>;
|
|
366
|
+
/** Append one event to a Run. Execution-class events need the receipt token. */
|
|
367
|
+
appendRunEvent(runId: string, event: Omit<RunEvent, "seq"> & {
|
|
368
|
+
seq?: number;
|
|
369
|
+
}, options?: {
|
|
370
|
+
receiptToken?: string;
|
|
371
|
+
}): Promise<unknown>;
|
|
372
|
+
/** The human hand at the terminal: grant a pending approval on a Run. */
|
|
373
|
+
approve(runId: string, kind?: "subscription-use" | "execute" | "share-prompt"): Promise<unknown>;
|
|
374
|
+
/** Cancel a Run from any surface that can authenticate. */
|
|
375
|
+
cancel(runId: string): Promise<unknown>;
|
|
376
|
+
execute(options: {
|
|
377
|
+
receiptId: string;
|
|
378
|
+
task: string;
|
|
379
|
+
cwd?: string;
|
|
380
|
+
}): Promise<unknown>;
|
|
381
|
+
private recordRunEvent;
|
|
382
|
+
feedback(options: {
|
|
383
|
+
receiptId: string;
|
|
384
|
+
rating: 1 | 2 | 3 | 4 | 5;
|
|
385
|
+
modelChoice: "right" | "acceptable" | "wrong";
|
|
386
|
+
wouldUseAgain: boolean;
|
|
387
|
+
task?: string;
|
|
388
|
+
}): Promise<unknown>;
|
|
389
|
+
}
|
|
390
|
+
declare function createTokenSizeClient(options?: TokenSizeClientOptions): TokenSizeClient;
|
|
391
|
+
|
|
392
|
+
export { type AllowanceSnapshot, type DiscoveryCacheMetadata, type DiscoveryOptions, type DiscoveryResult, HARNESS_IDS, type HarnessAllowance, type HarnessDiscovery, type LastRouteReceipt, type LocalPolicy, type RouteOptions, type RoutePreview, type RunDocumentView, type RunResult, type StatusResult, TokenSizeClient, type TokenSizeClientOptions, allowanceReport, allowanceScopesForHarness, allowances, applyAllowances, createTokenSizeClient, discoverHarness, discoverHarnesses, discoverHarnessesCached, executionArgs, flattenModels, home, installationId, isCredentialFreeOpenCodeModel, opencodeModelIds, parseClaudeUsage, readApiKey, readLastRoute, readLocalPolicy, rootAllowance, run, saveApiKey, saveLastRoute, saveLocalPolicy, terminateProcessTree };
|