@liberseek/boft-cli 0.1.2 → 0.4.4
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 +13 -237
- package/bin/boft.js +435 -0
- package/bin/codexhost.js +435 -0
- package/package.json +30 -32
- package/dist/api.d.ts +0 -93
- package/dist/api.d.ts.map +0 -1
- package/dist/api.js +0 -249
- package/dist/api.js.map +0 -1
- package/dist/cli.d.ts +0 -19
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -744
- package/dist/cli.js.map +0 -1
- package/dist/codex.d.ts +0 -70
- package/dist/codex.d.ts.map +0 -1
- package/dist/codex.js +0 -664
- package/dist/codex.js.map +0 -1
- package/dist/config.d.ts +0 -14
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -105
- package/dist/config.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/output.d.ts +0 -11
- package/dist/output.d.ts.map +0 -1
- package/dist/output.js +0 -87
- package/dist/output.js.map +0 -1
- package/dist/platforms.d.ts +0 -63
- package/dist/platforms.d.ts.map +0 -1
- package/dist/platforms.js +0 -568
- package/dist/platforms.js.map +0 -1
- package/dist/prompt.d.ts +0 -4
- package/dist/prompt.d.ts.map +0 -1
- package/dist/prompt.js +0 -49
- package/dist/prompt.js.map +0 -1
- package/dist/redact.d.ts +0 -3
- package/dist/redact.d.ts.map +0 -1
- package/dist/redact.js +0 -23
- package/dist/redact.js.map +0 -1
- package/dist/types.d.ts +0 -116
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/validate.d.ts +0 -6
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -47
- package/dist/validate.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -7
- package/dist/version.js.map +0 -1
- package/docs/HTTP_CONTRACT.md +0 -121
package/dist/cli.js
DELETED
|
@@ -1,744 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { Command, CommanderError } from 'commander';
|
|
3
|
-
import { ApiError, BoftApiClient, exchangeSetupGrant } from './api.js';
|
|
4
|
-
import { codexStatus, detectCodexInstallation, doctorCodex, removeCodex, rollbackCodex, setupCodex, } from './codex.js';
|
|
5
|
-
import { agentPlatformStatus, detectAgentPlatformInstallation, doctorAgentPlatform, removeAgentPlatform, rollbackAgentPlatform, setupAgentPlatform, } from './platforms.js';
|
|
6
|
-
import { configFilePath, deleteCredentials, readCredentials, resolveBaseUrl, resolveToken, writeCredentials, } from './config.js';
|
|
7
|
-
import { accountOutput, apiKeysOutput, consoleWriter, groupsOutput, jsonOutput, keyOutput, paymentOptionsOutput, paymentOutput, routePreviewOutput, } from './output.js';
|
|
8
|
-
import { promptForApiKey, promptForSetupCode, promptForToken } from './prompt.js';
|
|
9
|
-
import { redactText, tokenHint } from './redact.js';
|
|
10
|
-
import { parseTimeout, parseWaitSeconds, validateAmount, validateId, validateMethod } from './validate.js';
|
|
11
|
-
import { CLI_VERSION } from './version.js';
|
|
12
|
-
export function createProgram(dependencies = {}) {
|
|
13
|
-
const env = dependencies.env ?? process.env;
|
|
14
|
-
const writer = dependencies.writer ?? consoleWriter;
|
|
15
|
-
const program = new Command()
|
|
16
|
-
.name('boft')
|
|
17
|
-
.description('BOFT account, recharge, key, and Agent platform setup CLI')
|
|
18
|
-
.version(CLI_VERSION)
|
|
19
|
-
.option('--json', 'emit machine-readable JSON without terminal decoration')
|
|
20
|
-
.option('--base-url <url>', 'BOFT API base URL')
|
|
21
|
-
.option('--timeout <milliseconds>', 'request timeout in milliseconds', '15000')
|
|
22
|
-
.showSuggestionAfterError()
|
|
23
|
-
.showHelpAfterError()
|
|
24
|
-
.exitOverride();
|
|
25
|
-
const auth = program.command('auth').description('manage the BOFT Agent Token');
|
|
26
|
-
auth.command('login')
|
|
27
|
-
.description('validate and securely save an Agent Token')
|
|
28
|
-
.action(async () => {
|
|
29
|
-
const globals = globalOptions(program);
|
|
30
|
-
const existing = await readCredentials(env);
|
|
31
|
-
const token = (await (dependencies.promptToken ?? promptForToken)()).trim();
|
|
32
|
-
if (!token)
|
|
33
|
-
throw new Error('Agent Token cannot be empty');
|
|
34
|
-
const baseUrl = resolveBaseUrl(globals.baseUrl, existing, env);
|
|
35
|
-
await new BoftApiClient({ baseUrl, token, timeoutMs: parseTimeout(globals.timeout), fetchImpl: dependencies.fetchImpl }).account();
|
|
36
|
-
await writeCredentials({ token, base_url: baseUrl }, env);
|
|
37
|
-
if (globals.json)
|
|
38
|
-
jsonOutput(writer, { authenticated: true, source: 'credentials', base_url: baseUrl });
|
|
39
|
-
else
|
|
40
|
-
writer.out(`Authenticated (${tokenHint(token)}). Credentials saved to ${configFilePath(env)}.`);
|
|
41
|
-
});
|
|
42
|
-
auth.command('logout')
|
|
43
|
-
.description('remove the saved Agent Token')
|
|
44
|
-
.action(async () => {
|
|
45
|
-
const removed = await deleteCredentials(env);
|
|
46
|
-
const envActive = Boolean(env.BOFT_AGENT_TOKEN?.trim());
|
|
47
|
-
const data = { logged_out: removed, environment_token_active: envActive };
|
|
48
|
-
if (globalOptions(program).json)
|
|
49
|
-
jsonOutput(writer, data);
|
|
50
|
-
else {
|
|
51
|
-
writer.out(removed ? 'Saved credentials removed.' : 'No saved credentials found.');
|
|
52
|
-
if (envActive)
|
|
53
|
-
writer.out('BOFT_AGENT_TOKEN is still set and remains active for this process.');
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
auth.command('status')
|
|
57
|
-
.description('show authentication source and verify access')
|
|
58
|
-
.action(async () => {
|
|
59
|
-
const globals = globalOptions(program);
|
|
60
|
-
const context = await authenticatedContext(globals, dependencies, env);
|
|
61
|
-
const account = await context.client.account();
|
|
62
|
-
const data = { authenticated: true, source: context.source, token_hint: tokenHint(context.token), base_url: context.baseUrl, account };
|
|
63
|
-
if (globals.json)
|
|
64
|
-
jsonOutput(writer, data);
|
|
65
|
-
else {
|
|
66
|
-
writer.out(`Authenticated via ${context.source}: ${tokenHint(context.token)}`);
|
|
67
|
-
writer.out(`Base URL: ${context.baseUrl}`);
|
|
68
|
-
accountOutput(writer, account);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const setup = program.command('setup').description('configure an Agent platform to use BOFT');
|
|
72
|
-
setup.command('codex')
|
|
73
|
-
.description('configure Codex with the BOFT OpenAI-compatible provider')
|
|
74
|
-
.option('--code <code>', 'one-time client access code created by the BOFT website')
|
|
75
|
-
.option('--api-key-stdin', 'read a BOFT API Key from stdin instead of exchanging a client access code')
|
|
76
|
-
.option('--endpoint <url>', 'BOFT Responses API endpoint; required with --api-key-stdin')
|
|
77
|
-
.option('--websocket', 'enable Codex Responses WebSocket v2; used with --api-key-stdin')
|
|
78
|
-
.option('--dry-run', 'validate and preview local changes without writing files')
|
|
79
|
-
.action(async (options) => {
|
|
80
|
-
const globals = globalOptions(program);
|
|
81
|
-
if (options.code && options.apiKeyStdin)
|
|
82
|
-
throw new Error('Use either --code or --api-key-stdin, not both');
|
|
83
|
-
if (options.dryRun && !options.apiKeyStdin) {
|
|
84
|
-
throw new Error('--dry-run requires --api-key-stdin so a one-time client access code is not consumed');
|
|
85
|
-
}
|
|
86
|
-
const installation = await (dependencies.codexProbe ?? detectCodexInstallation)(env);
|
|
87
|
-
if (!installation.detected)
|
|
88
|
-
throw new Error('Codex CLI was not found in PATH. Install Codex before running setup.');
|
|
89
|
-
let setupInput;
|
|
90
|
-
if (options.apiKeyStdin) {
|
|
91
|
-
if (!options.endpoint)
|
|
92
|
-
throw new Error('--endpoint is required with --api-key-stdin');
|
|
93
|
-
const apiKey = await (dependencies.promptApiKey ?? promptForApiKey)();
|
|
94
|
-
setupInput = {
|
|
95
|
-
apiKey,
|
|
96
|
-
endpoint: options.endpoint,
|
|
97
|
-
websocket: options.websocket,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
const code = validateSetupCode(options.code ?? await (dependencies.promptSetupCode ?? promptForSetupCode)());
|
|
102
|
-
const credentials = await readCredentials(env);
|
|
103
|
-
const baseUrl = resolveBaseUrl(globals.baseUrl, credentials, env);
|
|
104
|
-
const grant = await exchangeSetupGrant({
|
|
105
|
-
baseUrl,
|
|
106
|
-
code,
|
|
107
|
-
target: 'codex',
|
|
108
|
-
timeoutMs: parseTimeout(globals.timeout),
|
|
109
|
-
fetchImpl: dependencies.fetchImpl,
|
|
110
|
-
});
|
|
111
|
-
setupInput = {
|
|
112
|
-
apiKey: grant.api_key,
|
|
113
|
-
endpoint: grant.base_url,
|
|
114
|
-
websocket: grant.variant === 'websocket',
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
const result = await setupCodex({
|
|
118
|
-
...setupInput,
|
|
119
|
-
dryRun: options.dryRun,
|
|
120
|
-
env,
|
|
121
|
-
});
|
|
122
|
-
if (globals.json)
|
|
123
|
-
jsonOutput(writer, result);
|
|
124
|
-
else {
|
|
125
|
-
writer.out(options.dryRun ? 'Codex configuration is valid. No files were changed.' : 'Codex is configured to use BOFT.');
|
|
126
|
-
writer.out(`Provider: ${result.provider}`);
|
|
127
|
-
writer.out(`Model: ${result.model}`);
|
|
128
|
-
writer.out(`Endpoint: ${result.endpoint}`);
|
|
129
|
-
writer.out(`Config: ${result.config_path}`);
|
|
130
|
-
if (installation.version)
|
|
131
|
-
writer.out(`Codex: ${installation.version}`);
|
|
132
|
-
if (result.backup_path)
|
|
133
|
-
writer.out(`Backup: ${result.backup_path}`);
|
|
134
|
-
if (result.restart_required)
|
|
135
|
-
writer.out('Restart Codex to load the new provider configuration.');
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
for (const target of ['claude', 'gemini', 'opencode']) {
|
|
139
|
-
const command = setup.command(target)
|
|
140
|
-
.description(`configure ${target === 'claude' ? 'Claude Code' : target === 'gemini' ? 'Gemini CLI' : 'OpenCode'} with BOFT`)
|
|
141
|
-
.option('--code <code>', 'one-time client access code created by the BOFT website')
|
|
142
|
-
.option('--api-key-stdin', 'read a BOFT API Key from stdin instead of exchanging a client access code')
|
|
143
|
-
.option('--endpoint <url>', 'provider endpoint; required with --api-key-stdin')
|
|
144
|
-
.option('--provider <id>', 'OpenCode provider ID (required for OpenCode stdin setup)')
|
|
145
|
-
.option('--dry-run', 'validate and preview local changes without writing files');
|
|
146
|
-
command.action(async (options) => {
|
|
147
|
-
const globals = globalOptions(program);
|
|
148
|
-
if (options.code && options.apiKeyStdin)
|
|
149
|
-
throw new Error('Use either --code or --api-key-stdin, not both');
|
|
150
|
-
if (options.dryRun && !options.apiKeyStdin) {
|
|
151
|
-
throw new Error('--dry-run requires --api-key-stdin so a one-time client access code is not consumed');
|
|
152
|
-
}
|
|
153
|
-
const installation = await (dependencies.platformProbe ?? detectAgentPlatformInstallation)(target, env);
|
|
154
|
-
if (!installation.detected) {
|
|
155
|
-
const name = target === 'claude' ? 'Claude Code' : target === 'gemini' ? 'Gemini CLI' : 'OpenCode';
|
|
156
|
-
throw new Error(`${name} CLI was not found in PATH. Install it before running setup.`);
|
|
157
|
-
}
|
|
158
|
-
let apiKey;
|
|
159
|
-
let endpoint;
|
|
160
|
-
let provider = target === 'opencode' ? options.provider : undefined;
|
|
161
|
-
if (options.apiKeyStdin) {
|
|
162
|
-
if (!options.endpoint)
|
|
163
|
-
throw new Error('--endpoint is required with --api-key-stdin');
|
|
164
|
-
if (target === 'opencode' && !provider)
|
|
165
|
-
throw new Error('--provider is required for OpenCode stdin setup');
|
|
166
|
-
apiKey = await (dependencies.promptApiKey ?? promptForApiKey)();
|
|
167
|
-
endpoint = options.endpoint;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
const code = validateSetupCode(options.code ?? await (dependencies.promptSetupCode ?? promptForSetupCode)());
|
|
171
|
-
const credentials = await readCredentials(env);
|
|
172
|
-
const baseUrl = resolveBaseUrl(globals.baseUrl, credentials, env);
|
|
173
|
-
const grant = await exchangeSetupGrant({
|
|
174
|
-
baseUrl,
|
|
175
|
-
code,
|
|
176
|
-
target,
|
|
177
|
-
timeoutMs: parseTimeout(globals.timeout),
|
|
178
|
-
fetchImpl: dependencies.fetchImpl,
|
|
179
|
-
});
|
|
180
|
-
apiKey = grant.api_key;
|
|
181
|
-
endpoint = grant.base_url;
|
|
182
|
-
provider = target === 'opencode' ? grant.variant : undefined;
|
|
183
|
-
}
|
|
184
|
-
const result = await setupAgentPlatform({ target, apiKey, endpoint, provider, dryRun: options.dryRun, env });
|
|
185
|
-
if (globals.json)
|
|
186
|
-
jsonOutput(writer, result);
|
|
187
|
-
else {
|
|
188
|
-
writer.out(options.dryRun ? `${target} configuration is valid. No files were changed.` : `${target} is configured to use BOFT.`);
|
|
189
|
-
if (result.provider)
|
|
190
|
-
writer.out(`Provider: ${result.provider}`);
|
|
191
|
-
if (result.model)
|
|
192
|
-
writer.out(`Model: ${result.model}`);
|
|
193
|
-
writer.out(`Endpoint: ${result.endpoint}`);
|
|
194
|
-
writer.out(`Config: ${result.config_path}`);
|
|
195
|
-
if (installation.version)
|
|
196
|
-
writer.out(`${target}: ${installation.version}`);
|
|
197
|
-
if (result.backup_path)
|
|
198
|
-
writer.out(`Backup: ${result.backup_path}`);
|
|
199
|
-
if (result.restart_required)
|
|
200
|
-
writer.out(`Restart ${target} to load the new configuration.`);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
const status = program.command('status').description('show Agent platform configuration status');
|
|
205
|
-
status.command('codex')
|
|
206
|
-
.description('show BOFT Codex configuration status without revealing credentials')
|
|
207
|
-
.action(async () => {
|
|
208
|
-
const result = await codexStatus(env);
|
|
209
|
-
if (globalOptions(program).json)
|
|
210
|
-
jsonOutput(writer, result);
|
|
211
|
-
else {
|
|
212
|
-
writer.out(`Configured: ${result.configured ? 'yes' : 'no'}`);
|
|
213
|
-
writer.out(`Active: ${result.active ? 'yes' : 'no'}`);
|
|
214
|
-
if (result.model)
|
|
215
|
-
writer.out(`Model: ${result.model}`);
|
|
216
|
-
if (result.endpoint)
|
|
217
|
-
writer.out(`Endpoint: ${result.endpoint}`);
|
|
218
|
-
writer.out(`Credentials: ${result.credentials_present ? 'available' : 'missing'}`);
|
|
219
|
-
writer.out(`Config: ${result.config_path}`);
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
for (const target of ['claude', 'gemini', 'opencode']) {
|
|
223
|
-
status.command(target)
|
|
224
|
-
.description(`show BOFT ${target} configuration status without revealing credentials`)
|
|
225
|
-
.action(async () => {
|
|
226
|
-
const result = await agentPlatformStatus(target, env);
|
|
227
|
-
if (globalOptions(program).json)
|
|
228
|
-
jsonOutput(writer, result);
|
|
229
|
-
else {
|
|
230
|
-
writer.out(`Configured: ${result.configured ? 'yes' : 'no'}`);
|
|
231
|
-
writer.out(`Active: ${result.active ? 'yes' : 'no'}`);
|
|
232
|
-
if (result.provider)
|
|
233
|
-
writer.out(`Provider: ${result.provider}`);
|
|
234
|
-
if (result.model)
|
|
235
|
-
writer.out(`Model: ${result.model}`);
|
|
236
|
-
if (result.endpoint)
|
|
237
|
-
writer.out(`Endpoint: ${result.endpoint}`);
|
|
238
|
-
writer.out(`Credentials: ${result.credentials_present ? 'available' : 'missing'}`);
|
|
239
|
-
writer.out(`Config: ${result.config_path}`);
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
const doctor = program.command('doctor').description('diagnose an Agent platform configuration');
|
|
244
|
-
doctor.command('codex')
|
|
245
|
-
.description('check the BOFT Codex provider, credentials, and file permissions')
|
|
246
|
-
.action(async () => {
|
|
247
|
-
const installation = await (dependencies.codexProbe ?? detectCodexInstallation)(env);
|
|
248
|
-
const result = await doctorCodex(env, installation);
|
|
249
|
-
if (globalOptions(program).json)
|
|
250
|
-
jsonOutput(writer, result);
|
|
251
|
-
else if (result.healthy)
|
|
252
|
-
writer.out('BOFT Codex configuration is healthy.');
|
|
253
|
-
else
|
|
254
|
-
for (const issue of result.issues)
|
|
255
|
-
writer.error(`Issue: ${issue}`);
|
|
256
|
-
});
|
|
257
|
-
for (const target of ['claude', 'gemini', 'opencode']) {
|
|
258
|
-
doctor.command(target)
|
|
259
|
-
.description(`check the BOFT ${target} provider, credentials, and file permissions`)
|
|
260
|
-
.action(async () => {
|
|
261
|
-
const installation = await (dependencies.platformProbe ?? detectAgentPlatformInstallation)(target, env);
|
|
262
|
-
const result = await doctorAgentPlatform(target, env, installation);
|
|
263
|
-
if (globalOptions(program).json)
|
|
264
|
-
jsonOutput(writer, result);
|
|
265
|
-
else if (result.healthy)
|
|
266
|
-
writer.out(`BOFT ${target} configuration is healthy.`);
|
|
267
|
-
else
|
|
268
|
-
for (const issue of result.issues)
|
|
269
|
-
writer.error(`Issue: ${issue}`);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
const rollback = program.command('rollback').description('restore the previous Agent platform configuration');
|
|
273
|
-
rollback.command('codex')
|
|
274
|
-
.description('restore the Codex settings saved before the latest BOFT setup')
|
|
275
|
-
.action(async () => {
|
|
276
|
-
const result = await rollbackCodex(env);
|
|
277
|
-
if (globalOptions(program).json)
|
|
278
|
-
jsonOutput(writer, result);
|
|
279
|
-
else
|
|
280
|
-
writer.out(result.restored ? `Codex configuration restored: ${result.config_path}` : 'No BOFT Codex setup is available to roll back.');
|
|
281
|
-
});
|
|
282
|
-
for (const target of ['claude', 'gemini', 'opencode']) {
|
|
283
|
-
rollback.command(target)
|
|
284
|
-
.description(`restore the previous BOFT ${target} configuration`)
|
|
285
|
-
.action(async () => {
|
|
286
|
-
const result = await rollbackAgentPlatform(target, env);
|
|
287
|
-
if (globalOptions(program).json)
|
|
288
|
-
jsonOutput(writer, result);
|
|
289
|
-
else
|
|
290
|
-
writer.out(result.restored ? `${target} configuration restored: ${result.config_path}` : `No BOFT ${target} setup is available to roll back.`);
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
const remove = program.command('remove').description('remove BOFT from an Agent platform');
|
|
294
|
-
remove.command('codex')
|
|
295
|
-
.description('remove all BOFT Codex setup layers and restore the original settings')
|
|
296
|
-
.action(async () => {
|
|
297
|
-
const result = await removeCodex(env);
|
|
298
|
-
if (globalOptions(program).json)
|
|
299
|
-
jsonOutput(writer, result);
|
|
300
|
-
else
|
|
301
|
-
writer.out(result.removed ? 'BOFT Codex configuration removed.' : 'BOFT is not configured for Codex.');
|
|
302
|
-
});
|
|
303
|
-
for (const target of ['claude', 'gemini', 'opencode']) {
|
|
304
|
-
remove.command(target)
|
|
305
|
-
.description(`remove all BOFT ${target} setup layers and restore the original settings`)
|
|
306
|
-
.action(async () => {
|
|
307
|
-
const result = await removeAgentPlatform(target, env);
|
|
308
|
-
if (globalOptions(program).json)
|
|
309
|
-
jsonOutput(writer, result);
|
|
310
|
-
else
|
|
311
|
-
writer.out(result.removed ? `BOFT ${target} configuration removed.` : `BOFT is not configured for ${target}.`);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
program.command('balance')
|
|
315
|
-
.description('show the current account balance')
|
|
316
|
-
.action(async () => {
|
|
317
|
-
const globals = globalOptions(program);
|
|
318
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
319
|
-
const account = await client.account();
|
|
320
|
-
if (globals.json)
|
|
321
|
-
jsonOutput(writer, account);
|
|
322
|
-
else
|
|
323
|
-
accountOutput(writer, account);
|
|
324
|
-
});
|
|
325
|
-
const payment = program.command('payment').description('inspect payment capabilities');
|
|
326
|
-
payment.command('methods')
|
|
327
|
-
.description('list available recharge payment methods')
|
|
328
|
-
.action(async () => {
|
|
329
|
-
const globals = globalOptions(program);
|
|
330
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
331
|
-
const options = await client.paymentOptions();
|
|
332
|
-
if (globals.json)
|
|
333
|
-
jsonOutput(writer, options);
|
|
334
|
-
else
|
|
335
|
-
paymentOptionsOutput(writer, options);
|
|
336
|
-
});
|
|
337
|
-
const recharge = program.command('recharge').description('create and manage self-service recharge payments');
|
|
338
|
-
recharge.command('create')
|
|
339
|
-
.requiredOption('--amount <decimal>', 'recharge amount')
|
|
340
|
-
.requiredOption('--method <id>', 'payment method ID from `payment methods`')
|
|
341
|
-
.option('--idempotency-key <key>', 'retry-safe key (generated when omitted)')
|
|
342
|
-
.description('create a recharge payment')
|
|
343
|
-
.action(async (options) => {
|
|
344
|
-
const globals = globalOptions(program);
|
|
345
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
346
|
-
const idempotencyKey = options.idempotencyKey
|
|
347
|
-
? validateId(options.idempotencyKey, 'Idempotency key')
|
|
348
|
-
: randomUUID();
|
|
349
|
-
let order;
|
|
350
|
-
try {
|
|
351
|
-
order = await client.createPayment({
|
|
352
|
-
amount: validateAmount(options.amount),
|
|
353
|
-
payment_method: validateMethod(options.method),
|
|
354
|
-
idempotency_key: idempotencyKey,
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
catch (error) {
|
|
358
|
-
throw withPaymentRetryKey(error, idempotencyKey);
|
|
359
|
-
}
|
|
360
|
-
if (globals.json)
|
|
361
|
-
jsonOutput(writer, { ...order, idempotency_key: idempotencyKey });
|
|
362
|
-
else {
|
|
363
|
-
paymentOutput(writer, order, true);
|
|
364
|
-
writer.out(`Retry key: ${idempotencyKey}`);
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
recharge.command('status <id>')
|
|
368
|
-
.description('get a recharge payment status')
|
|
369
|
-
.option('--wait [seconds]', 'long-poll for a status change (default and maximum 25)')
|
|
370
|
-
.action(async (id, options) => {
|
|
371
|
-
const globals = globalOptions(program);
|
|
372
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
373
|
-
const order = await client.paymentStatus(validateId(id), parseWaitSeconds(options.wait));
|
|
374
|
-
if (globals.json)
|
|
375
|
-
jsonOutput(writer, order);
|
|
376
|
-
else
|
|
377
|
-
paymentOutput(writer, order, false);
|
|
378
|
-
});
|
|
379
|
-
recharge.command('cancel <id>')
|
|
380
|
-
.description('cancel a pending recharge payment')
|
|
381
|
-
.action(async (id) => {
|
|
382
|
-
const globals = globalOptions(program);
|
|
383
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
384
|
-
const order = await client.cancelPayment(validateId(id));
|
|
385
|
-
if (globals.json)
|
|
386
|
-
jsonOutput(writer, order);
|
|
387
|
-
else
|
|
388
|
-
paymentOutput(writer, order, false);
|
|
389
|
-
});
|
|
390
|
-
const group = program.command('group').description('inspect BOFT API Key groups');
|
|
391
|
-
group.command('available')
|
|
392
|
-
.description('list available API Key groups and user rate multipliers')
|
|
393
|
-
.option('--scope <scope>', 'key scope: user, agent, or president')
|
|
394
|
-
.action(async (options) => {
|
|
395
|
-
const globals = globalOptions(program);
|
|
396
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
397
|
-
const result = await client.availableGroups(validateScope(options.scope));
|
|
398
|
-
if (globals.json)
|
|
399
|
-
jsonOutput(writer, result);
|
|
400
|
-
else
|
|
401
|
-
groupsOutput(writer, result);
|
|
402
|
-
});
|
|
403
|
-
const key = program.command('key').description('create and manage regular BOFT API Keys');
|
|
404
|
-
key.command('list')
|
|
405
|
-
.description('list regular API Keys')
|
|
406
|
-
.option('--page <number>', 'page number', '1')
|
|
407
|
-
.option('--page-size <number>', 'page size', '20')
|
|
408
|
-
.option('--scope <scope>', 'key scope: user, agent, or president')
|
|
409
|
-
.action(async (options) => {
|
|
410
|
-
const globals = globalOptions(program);
|
|
411
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
412
|
-
const result = await client.listApiKeys({
|
|
413
|
-
page: parsePositiveInteger(options.page, 'Page', 1000),
|
|
414
|
-
pageSize: parsePositiveInteger(options.pageSize, 'Page size', 100),
|
|
415
|
-
scope: validateScope(options.scope),
|
|
416
|
-
});
|
|
417
|
-
if (globals.json)
|
|
418
|
-
jsonOutput(writer, result);
|
|
419
|
-
else
|
|
420
|
-
apiKeysOutput(writer, result);
|
|
421
|
-
});
|
|
422
|
-
key.command('create')
|
|
423
|
-
.requiredOption('--name <name>', 'API Key name')
|
|
424
|
-
.requiredOption('--group-id <id>', 'available group ID')
|
|
425
|
-
.option('--scope <scope>', 'key scope: user, agent, or president')
|
|
426
|
-
.option('--quota <amount>', 'quota limit, 0 means unlimited')
|
|
427
|
-
.option('--expires-at <iso>', 'exact expiration time in ISO 8601')
|
|
428
|
-
.option('--idempotency-key <key>', 'retry-safe key (generated when omitted)')
|
|
429
|
-
.description('create a regular API Key')
|
|
430
|
-
.action(async (options) => {
|
|
431
|
-
const globals = globalOptions(program);
|
|
432
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
433
|
-
const idempotencyKey = options.idempotencyKey
|
|
434
|
-
? validateId(options.idempotencyKey, 'Idempotency key')
|
|
435
|
-
: randomUUID();
|
|
436
|
-
let created;
|
|
437
|
-
try {
|
|
438
|
-
created = await client.createApiKey({
|
|
439
|
-
name: validateName(options.name),
|
|
440
|
-
group_id: parsePositiveInteger(options.groupId, 'Group ID'),
|
|
441
|
-
scope: validateScope(options.scope),
|
|
442
|
-
quota: parseOptionalQuota(options.quota),
|
|
443
|
-
expires_at: validateOptionalIsoDate(options.expiresAt),
|
|
444
|
-
idempotency_key: idempotencyKey,
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
catch (error) {
|
|
448
|
-
throw withRetryKey(error, idempotencyKey, '--idempotency-key');
|
|
449
|
-
}
|
|
450
|
-
if (globals.json)
|
|
451
|
-
jsonOutput(writer, { ...created, idempotency_key: idempotencyKey });
|
|
452
|
-
else {
|
|
453
|
-
keyOutput(writer, created);
|
|
454
|
-
writer.out('Treat any printed key secret as sensitive.');
|
|
455
|
-
writer.out(`Retry key: ${idempotencyKey}`);
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
key.command('set-group <id>')
|
|
459
|
-
.requiredOption('--group-id <id>', 'new group ID')
|
|
460
|
-
.description('move a regular API Key to another group')
|
|
461
|
-
.action(async (id, options) => {
|
|
462
|
-
const globals = globalOptions(program);
|
|
463
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
464
|
-
const updated = await client.updateApiKeyGroup(parsePositiveInteger(id, 'API Key ID'), parsePositiveInteger(options.groupId, 'Group ID'));
|
|
465
|
-
if (globals.json)
|
|
466
|
-
jsonOutput(writer, updated);
|
|
467
|
-
else
|
|
468
|
-
keyOutput(writer, updated);
|
|
469
|
-
});
|
|
470
|
-
const autoKey = program.command('auto-key').description('create and manage BOFT AUTO Keys');
|
|
471
|
-
autoKey.command('list')
|
|
472
|
-
.description('list AUTO Keys')
|
|
473
|
-
.option('--page <number>', 'page number', '1')
|
|
474
|
-
.option('--page-size <number>', 'page size', '20')
|
|
475
|
-
.option('--scope <scope>', 'key scope: user, agent, or president')
|
|
476
|
-
.action(async (options) => {
|
|
477
|
-
const globals = globalOptions(program);
|
|
478
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
479
|
-
const result = await client.listAutoKeys({
|
|
480
|
-
page: parsePositiveInteger(options.page, 'Page', 1000),
|
|
481
|
-
pageSize: parsePositiveInteger(options.pageSize, 'Page size', 100),
|
|
482
|
-
scope: validateScope(options.scope),
|
|
483
|
-
});
|
|
484
|
-
if (globals.json)
|
|
485
|
-
jsonOutput(writer, result);
|
|
486
|
-
else
|
|
487
|
-
apiKeysOutput(writer, result);
|
|
488
|
-
});
|
|
489
|
-
autoKey.command('create')
|
|
490
|
-
.requiredOption('--name <name>', 'AUTO Key name')
|
|
491
|
-
.option('--model <id...>', 'allowed model ID; repeat or pass multiple values')
|
|
492
|
-
.option('--scope <scope>', 'key scope: user, agent, or president')
|
|
493
|
-
.option('--strategy <mode>', 'routing mode: balanced, efficiency, or cost')
|
|
494
|
-
.option('--include-byok', 'include BYOK groups')
|
|
495
|
-
.option('--fallback-enabled <boolean>', 'enable fallback: true or false')
|
|
496
|
-
.option('--provider-groups <json>', 'JSON provider group constraints')
|
|
497
|
-
.option('--quota <amount>', 'quota limit, 0 means unlimited')
|
|
498
|
-
.option('--expires-at <iso>', 'exact expiration time in ISO 8601')
|
|
499
|
-
.option('--idempotency-key <key>', 'retry-safe key (generated when omitted)')
|
|
500
|
-
.description('create an AUTO Key')
|
|
501
|
-
.action(async (options) => {
|
|
502
|
-
const globals = globalOptions(program);
|
|
503
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
504
|
-
const idempotencyKey = options.idempotencyKey
|
|
505
|
-
? validateId(options.idempotencyKey, 'Idempotency key')
|
|
506
|
-
: randomUUID();
|
|
507
|
-
let created;
|
|
508
|
-
try {
|
|
509
|
-
created = await client.createAutoKey({
|
|
510
|
-
name: validateName(options.name),
|
|
511
|
-
models: validateModels(options.model),
|
|
512
|
-
scope: validateScope(options.scope),
|
|
513
|
-
strategy: validateStrategy(options.strategy),
|
|
514
|
-
include_byok: options.includeByok,
|
|
515
|
-
fallback_enabled: parseOptionalBoolean(options.fallbackEnabled, 'fallback-enabled'),
|
|
516
|
-
provider_group_constraints: parseProviderGroupConstraints(options.providerGroups),
|
|
517
|
-
quota: parseOptionalQuota(options.quota),
|
|
518
|
-
expires_at: validateOptionalIsoDate(options.expiresAt),
|
|
519
|
-
idempotency_key: idempotencyKey,
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
catch (error) {
|
|
523
|
-
throw withRetryKey(error, idempotencyKey, '--idempotency-key');
|
|
524
|
-
}
|
|
525
|
-
if (globals.json)
|
|
526
|
-
jsonOutput(writer, { ...created, idempotency_key: idempotencyKey });
|
|
527
|
-
else {
|
|
528
|
-
keyOutput(writer, created);
|
|
529
|
-
writer.out('Treat any printed key secret as sensitive.');
|
|
530
|
-
writer.out(`Retry key: ${idempotencyKey}`);
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
autoKey.command('set-routing <id>')
|
|
534
|
-
.option('--expected-config-version <number>', 'expected AUTO profile config version')
|
|
535
|
-
.option('--strategy <mode>', 'routing mode: balanced, efficiency, or cost')
|
|
536
|
-
.option('--disable-provider <provider...>', 'provider to disable; repeat or pass multiple values')
|
|
537
|
-
.option('--model <id...>', 'allowed model ID; repeat or pass multiple values')
|
|
538
|
-
.option('--include-byok', 'include BYOK groups')
|
|
539
|
-
.option('--fallback-enabled <boolean>', 'enable fallback: true or false')
|
|
540
|
-
.option('--provider-groups <json>', 'JSON provider group constraints')
|
|
541
|
-
.description('update an AUTO Key routing configuration')
|
|
542
|
-
.action(async (id, options) => {
|
|
543
|
-
const globals = globalOptions(program);
|
|
544
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
545
|
-
const updated = await client.updateAutoKeyRouting(parsePositiveInteger(id, 'AUTO Key ID'), {
|
|
546
|
-
expected_config_version: options.expectedConfigVersion === undefined
|
|
547
|
-
? undefined
|
|
548
|
-
: parsePositiveInteger(options.expectedConfigVersion, 'Expected config version', 1_000_000),
|
|
549
|
-
strategy: validateStrategy(options.strategy),
|
|
550
|
-
disabled_providers: validateProviders(options.disableProvider),
|
|
551
|
-
provider_group_constraints: parseProviderGroupConstraints(options.providerGroups),
|
|
552
|
-
models: options.model === undefined ? undefined : validateModels(options.model),
|
|
553
|
-
include_byok: options.includeByok,
|
|
554
|
-
fallback_enabled: parseOptionalBoolean(options.fallbackEnabled, 'fallback-enabled'),
|
|
555
|
-
});
|
|
556
|
-
if (globals.json)
|
|
557
|
-
jsonOutput(writer, updated);
|
|
558
|
-
else
|
|
559
|
-
keyOutput(writer, updated);
|
|
560
|
-
});
|
|
561
|
-
autoKey.command('preview <id>')
|
|
562
|
-
.description('preview AUTO Key routing candidates')
|
|
563
|
-
.action(async (id) => {
|
|
564
|
-
const globals = globalOptions(program);
|
|
565
|
-
const { client } = await authenticatedContext(globals, dependencies, env);
|
|
566
|
-
const preview = await client.autoKeyRoutePreview(parsePositiveInteger(id, 'AUTO Key ID'));
|
|
567
|
-
if (globals.json)
|
|
568
|
-
jsonOutput(writer, preview);
|
|
569
|
-
else
|
|
570
|
-
routePreviewOutput(writer, preview);
|
|
571
|
-
});
|
|
572
|
-
return program;
|
|
573
|
-
}
|
|
574
|
-
export async function run(argv = process.argv, dependencies = {}) {
|
|
575
|
-
const writer = dependencies.writer ?? consoleWriter;
|
|
576
|
-
const program = createProgram(dependencies);
|
|
577
|
-
try {
|
|
578
|
-
await program.parseAsync(argv);
|
|
579
|
-
return 0;
|
|
580
|
-
}
|
|
581
|
-
catch (error) {
|
|
582
|
-
if (error instanceof CommanderError) {
|
|
583
|
-
if (error.code === 'commander.helpDisplayed' || error.code === 'commander.version')
|
|
584
|
-
return 0;
|
|
585
|
-
return error.exitCode || 1;
|
|
586
|
-
}
|
|
587
|
-
const globals = program.opts();
|
|
588
|
-
const credentials = await readCredentials(dependencies.env ?? process.env).catch(() => undefined);
|
|
589
|
-
const secrets = [dependencies.env?.BOFT_AGENT_TOKEN, process.env.BOFT_AGENT_TOKEN, credentials?.token]
|
|
590
|
-
.filter((value) => Boolean(value));
|
|
591
|
-
const message = redactText(error instanceof Error ? error.message : String(error), secrets);
|
|
592
|
-
const details = error instanceof ApiError
|
|
593
|
-
? { error: { message, status: error.status, code: error.code, reason: error.reason } }
|
|
594
|
-
: { error: { message } };
|
|
595
|
-
if (globals.json)
|
|
596
|
-
writer.error(JSON.stringify(details));
|
|
597
|
-
else
|
|
598
|
-
writer.error(`Error: ${message}`);
|
|
599
|
-
return 1;
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
function globalOptions(program) {
|
|
603
|
-
return program.opts();
|
|
604
|
-
}
|
|
605
|
-
async function authenticatedContext(globals, dependencies, env) {
|
|
606
|
-
const credentials = await readCredentials(env);
|
|
607
|
-
const { token, source } = resolveToken(credentials, env);
|
|
608
|
-
const baseUrl = resolveBaseUrl(globals.baseUrl, credentials, env);
|
|
609
|
-
return {
|
|
610
|
-
token,
|
|
611
|
-
source,
|
|
612
|
-
baseUrl,
|
|
613
|
-
client: new BoftApiClient({ baseUrl, token, timeoutMs: parseTimeout(globals.timeout), fetchImpl: dependencies.fetchImpl }),
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
export function credentialsForTest(token, baseUrl) {
|
|
617
|
-
return { token, base_url: baseUrl };
|
|
618
|
-
}
|
|
619
|
-
function withPaymentRetryKey(error, idempotencyKey) {
|
|
620
|
-
return withRetryKey(error, idempotencyKey, '--idempotency-key', 'payment request');
|
|
621
|
-
}
|
|
622
|
-
function withRetryKey(error, idempotencyKey, optionName, subject = 'request') {
|
|
623
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
624
|
-
const retryMessage = `${message}. Retry this ${subject} with ${optionName} ${idempotencyKey}`;
|
|
625
|
-
if (error instanceof ApiError) {
|
|
626
|
-
return new ApiError(retryMessage, {
|
|
627
|
-
status: error.status,
|
|
628
|
-
code: error.code,
|
|
629
|
-
reason: error.reason,
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
return new Error(retryMessage);
|
|
633
|
-
}
|
|
634
|
-
function validateName(value) {
|
|
635
|
-
const normalized = value.trim();
|
|
636
|
-
if (!normalized || normalized.length > 80)
|
|
637
|
-
throw new Error('Name must contain 1-80 characters');
|
|
638
|
-
return normalized;
|
|
639
|
-
}
|
|
640
|
-
function validateSetupCode(value) {
|
|
641
|
-
const normalized = value.trim();
|
|
642
|
-
if (!/^[A-Za-z0-9][A-Za-z0-9_-]{5,127}$/.test(normalized)) {
|
|
643
|
-
throw new Error('Client access code must contain 6-128 letters, numbers, underscores, or hyphens');
|
|
644
|
-
}
|
|
645
|
-
return normalized;
|
|
646
|
-
}
|
|
647
|
-
function parsePositiveInteger(value, label, max = Number.MAX_SAFE_INTEGER) {
|
|
648
|
-
if (!/^\d+$/.test(value))
|
|
649
|
-
throw new Error(`${label} must be a positive integer`);
|
|
650
|
-
const parsed = Number(value);
|
|
651
|
-
if (!Number.isSafeInteger(parsed) || parsed <= 0 || parsed > max) {
|
|
652
|
-
throw new Error(`${label} must be a positive integer${max < Number.MAX_SAFE_INTEGER ? ` up to ${max}` : ''}`);
|
|
653
|
-
}
|
|
654
|
-
return parsed;
|
|
655
|
-
}
|
|
656
|
-
function validateScope(value) {
|
|
657
|
-
if (value === undefined)
|
|
658
|
-
return undefined;
|
|
659
|
-
if (value === 'user' || value === 'agent' || value === 'president')
|
|
660
|
-
return value;
|
|
661
|
-
throw new Error('Scope must be user, agent, or president');
|
|
662
|
-
}
|
|
663
|
-
function validateStrategy(value) {
|
|
664
|
-
if (value === undefined)
|
|
665
|
-
return undefined;
|
|
666
|
-
if (value === 'balanced' || value === 'efficiency' || value === 'cost')
|
|
667
|
-
return value;
|
|
668
|
-
throw new Error('Strategy must be balanced, efficiency, or cost');
|
|
669
|
-
}
|
|
670
|
-
function parseOptionalQuota(value) {
|
|
671
|
-
if (value === undefined)
|
|
672
|
-
return undefined;
|
|
673
|
-
const amount = Number(value);
|
|
674
|
-
if (!Number.isFinite(amount) || amount < 0 || amount > 1_000_000) {
|
|
675
|
-
throw new Error('Quota must be a number between 0 and 1000000');
|
|
676
|
-
}
|
|
677
|
-
return amount;
|
|
678
|
-
}
|
|
679
|
-
function validateOptionalIsoDate(value) {
|
|
680
|
-
if (value === undefined)
|
|
681
|
-
return undefined;
|
|
682
|
-
const normalized = value.trim();
|
|
683
|
-
if (!normalized || Number.isNaN(Date.parse(normalized)))
|
|
684
|
-
throw new Error('Expiration must be a valid ISO 8601 timestamp');
|
|
685
|
-
return normalized;
|
|
686
|
-
}
|
|
687
|
-
function parseOptionalBoolean(value, label) {
|
|
688
|
-
if (value === undefined)
|
|
689
|
-
return undefined;
|
|
690
|
-
if (value === 'true')
|
|
691
|
-
return true;
|
|
692
|
-
if (value === 'false')
|
|
693
|
-
return false;
|
|
694
|
-
throw new Error(`${label} must be true or false`);
|
|
695
|
-
}
|
|
696
|
-
function validateModels(values) {
|
|
697
|
-
const models = [...new Set((values ?? []).map((value) => value.trim()).filter(Boolean))];
|
|
698
|
-
if (models.some((model) => model.length > 160))
|
|
699
|
-
throw new Error('Model IDs must be 1-160 characters');
|
|
700
|
-
if (models.length > 200)
|
|
701
|
-
throw new Error('At most 200 models can be selected');
|
|
702
|
-
return models;
|
|
703
|
-
}
|
|
704
|
-
function validateProviders(values) {
|
|
705
|
-
if (values === undefined)
|
|
706
|
-
return undefined;
|
|
707
|
-
const providers = [...new Set(values.map((value) => value.trim()).filter(Boolean))];
|
|
708
|
-
if (providers.some((provider) => !/^[A-Za-z0-9._:-]{1,64}$/.test(provider))) {
|
|
709
|
-
throw new Error('Provider IDs may contain only letters, numbers, dot, underscore, colon, and hyphen');
|
|
710
|
-
}
|
|
711
|
-
return providers;
|
|
712
|
-
}
|
|
713
|
-
function parseProviderGroupConstraints(value) {
|
|
714
|
-
if (value === undefined)
|
|
715
|
-
return undefined;
|
|
716
|
-
let parsed;
|
|
717
|
-
try {
|
|
718
|
-
parsed = JSON.parse(value);
|
|
719
|
-
}
|
|
720
|
-
catch {
|
|
721
|
-
throw new Error('Provider group constraints must be valid JSON');
|
|
722
|
-
}
|
|
723
|
-
if (!Array.isArray(parsed))
|
|
724
|
-
throw new Error('Provider group constraints must be a JSON array');
|
|
725
|
-
if (parsed.length > 50)
|
|
726
|
-
throw new Error('At most 50 provider group constraints are allowed');
|
|
727
|
-
return parsed.map((item) => {
|
|
728
|
-
if (item === null || typeof item !== 'object')
|
|
729
|
-
throw new Error('Each provider group constraint must be an object');
|
|
730
|
-
const record = item;
|
|
731
|
-
const provider = typeof record.provider === 'string' ? record.provider.trim() : '';
|
|
732
|
-
const mode = record.mode;
|
|
733
|
-
const groupIds = record.group_ids;
|
|
734
|
-
if (!/^[A-Za-z0-9._:-]{1,64}$/.test(provider))
|
|
735
|
-
throw new Error('Invalid provider in provider group constraints');
|
|
736
|
-
if (mode !== 'all' && mode !== 'specific')
|
|
737
|
-
throw new Error('Provider group mode must be all or specific');
|
|
738
|
-
if (!Array.isArray(groupIds) || groupIds.some((id) => !Number.isSafeInteger(id) || id <= 0)) {
|
|
739
|
-
throw new Error('Provider group_ids must be positive integers');
|
|
740
|
-
}
|
|
741
|
-
return { provider, mode, group_ids: [...new Set(groupIds)] };
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
//# sourceMappingURL=cli.js.map
|