@verboo/code 0.7.7 → 0.7.8
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/cli.mjs +111 -30
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -109959,6 +109959,7 @@ __export(exports_client, {
|
|
|
109959
109959
|
getOrganizationUUID: () => getOrganizationUUID,
|
|
109960
109960
|
fetchProfileInfo: () => fetchProfileInfo,
|
|
109961
109961
|
fetchAndStoreUserRoles: () => fetchAndStoreUserRoles,
|
|
109962
|
+
exchangeCodeForTokensWithUri: () => exchangeCodeForTokensWithUri,
|
|
109962
109963
|
exchangeCodeForTokens: () => exchangeCodeForTokens,
|
|
109963
109964
|
createAndStoreApiKey: () => createAndStoreApiKey,
|
|
109964
109965
|
buildAuthUrl: () => buildAuthUrl
|
|
@@ -110021,6 +110022,17 @@ async function exchangeCodeForTokens(authorizationCode, state, codeVerifier, por
|
|
|
110021
110022
|
logEvent("tengu_oauth_token_exchange_success", {});
|
|
110022
110023
|
return response;
|
|
110023
110024
|
}
|
|
110025
|
+
async function exchangeCodeForTokensWithUri(authorizationCode, codeVerifier, redirectUri) {
|
|
110026
|
+
const response = await postOAuthForm({
|
|
110027
|
+
grant_type: "authorization_code",
|
|
110028
|
+
code: authorizationCode,
|
|
110029
|
+
redirect_uri: redirectUri,
|
|
110030
|
+
client_id: getOauthConfig().CLIENT_ID,
|
|
110031
|
+
code_verifier: codeVerifier
|
|
110032
|
+
});
|
|
110033
|
+
logEvent("tengu_oauth_token_exchange_success", {});
|
|
110034
|
+
return response;
|
|
110035
|
+
}
|
|
110024
110036
|
function normalizeOAuthTokenResponse(data) {
|
|
110025
110037
|
return {
|
|
110026
110038
|
...data,
|
|
@@ -115487,7 +115499,7 @@ function printStartupScreen(modelOverride) {
|
|
|
115487
115499
|
const home = process.env.HOME || process.env.USERPROFILE || "";
|
|
115488
115500
|
const cwd2 = process.cwd();
|
|
115489
115501
|
const displayCwd = home && cwd2.startsWith(home) ? `~${cwd2.slice(home.length)}` : cwd2;
|
|
115490
|
-
const version2 = "0.7.
|
|
115502
|
+
const version2 = "0.7.8";
|
|
115491
115503
|
const bold2 = `${ESC}1m`;
|
|
115492
115504
|
const PURPLE = rgb(...ACCENT);
|
|
115493
115505
|
const SOFT = rgb(...CREAM);
|
|
@@ -193578,7 +193590,7 @@ async function* openaiStreamToAnthropic(response, model, signal) {
|
|
|
193578
193590
|
}
|
|
193579
193591
|
yield {
|
|
193580
193592
|
type: "content_block_delta",
|
|
193581
|
-
index: contentBlockIndex,
|
|
193593
|
+
index: hasClosedThinking ? contentBlockIndex - 1 : contentBlockIndex,
|
|
193582
193594
|
delta: { type: "thinking_delta", thinking: delta.reasoning_content }
|
|
193583
193595
|
};
|
|
193584
193596
|
}
|
|
@@ -272206,8 +272218,10 @@ __export(exports_auth2, {
|
|
|
272206
272218
|
installOAuthTokens: () => installOAuthTokens,
|
|
272207
272219
|
authStatus: () => authStatus,
|
|
272208
272220
|
authLogout: () => authLogout,
|
|
272221
|
+
authLoginHeadless: () => authLoginHeadless,
|
|
272209
272222
|
authLogin: () => authLogin
|
|
272210
272223
|
});
|
|
272224
|
+
import * as readline from "node:readline";
|
|
272211
272225
|
async function installOAuthTokens(tokens) {
|
|
272212
272226
|
await performLogout({ clearOnboarding: false });
|
|
272213
272227
|
const profile = tokens.profile ?? await getOauthProfileFromOauthToken(tokens.accessToken);
|
|
@@ -272458,6 +272472,66 @@ async function authLogout() {
|
|
|
272458
272472
|
`);
|
|
272459
272473
|
process.exit(0);
|
|
272460
272474
|
}
|
|
272475
|
+
async function authLoginHeadless() {
|
|
272476
|
+
const config2 = getOauthConfig();
|
|
272477
|
+
const codeVerifier = generateCodeVerifier();
|
|
272478
|
+
const codeChallenge = await generateCodeChallenge(codeVerifier);
|
|
272479
|
+
const state = generateState();
|
|
272480
|
+
const params = new URLSearchParams({
|
|
272481
|
+
client_id: config2.CLIENT_ID,
|
|
272482
|
+
redirect_uri: HEADLESS_REDIRECT_URI,
|
|
272483
|
+
response_type: "code",
|
|
272484
|
+
code_challenge: codeChallenge,
|
|
272485
|
+
code_challenge_method: "S256",
|
|
272486
|
+
state,
|
|
272487
|
+
scope: getActiveScopes().join(" ")
|
|
272488
|
+
});
|
|
272489
|
+
const url3 = `${config2.CONSOLE_AUTHORIZE_URL}?${params}`;
|
|
272490
|
+
process.stdout.write(`
|
|
272491
|
+
Abra este link em qualquer navegador:
|
|
272492
|
+
|
|
272493
|
+
`);
|
|
272494
|
+
process.stdout.write(` ${url3}
|
|
272495
|
+
|
|
272496
|
+
`);
|
|
272497
|
+
process.stdout.write("Após autorizar, cole o código exibido e pressione Enter: ");
|
|
272498
|
+
const code = (await readOneLine()).trim();
|
|
272499
|
+
if (!code) {
|
|
272500
|
+
process.stderr.write(`
|
|
272501
|
+
Código não informado. Cancelado.
|
|
272502
|
+
`);
|
|
272503
|
+
process.exit(1);
|
|
272504
|
+
}
|
|
272505
|
+
try {
|
|
272506
|
+
const tokenResponse = await exchangeCodeForTokensWithUri(code, codeVerifier, HEADLESS_REDIRECT_URI);
|
|
272507
|
+
const tokens = {
|
|
272508
|
+
accessToken: tokenResponse.access_token,
|
|
272509
|
+
refreshToken: tokenResponse.refresh_token ?? null,
|
|
272510
|
+
expiresAt: Date.now() + (tokenResponse.expires_in ?? 900) * 1000,
|
|
272511
|
+
scopes: tokenResponse.scope?.split(" ").filter(Boolean) ?? [],
|
|
272512
|
+
subscriptionType: null,
|
|
272513
|
+
rateLimitTier: null
|
|
272514
|
+
};
|
|
272515
|
+
await installOAuthTokens(tokens);
|
|
272516
|
+
process.stdout.write(`Login realizado com sucesso.
|
|
272517
|
+
`);
|
|
272518
|
+
process.exit(0);
|
|
272519
|
+
} catch (err2) {
|
|
272520
|
+
process.stderr.write(`Erro ao trocar o código: ${errorMessage(err2)}
|
|
272521
|
+
`);
|
|
272522
|
+
process.exit(1);
|
|
272523
|
+
}
|
|
272524
|
+
}
|
|
272525
|
+
function readOneLine() {
|
|
272526
|
+
return new Promise((resolve23) => {
|
|
272527
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
272528
|
+
rl.once("line", (line) => {
|
|
272529
|
+
rl.close();
|
|
272530
|
+
resolve23(line);
|
|
272531
|
+
});
|
|
272532
|
+
});
|
|
272533
|
+
}
|
|
272534
|
+
var HEADLESS_REDIRECT_URI = "https://code.verboo.ai/pt/cli-auth/manual";
|
|
272461
272535
|
var init_auth5 = __esm(() => {
|
|
272462
272536
|
init_logout();
|
|
272463
272537
|
init_errorUtils();
|
|
@@ -272477,6 +272551,7 @@ var init_auth5 = __esm(() => {
|
|
|
272477
272551
|
init_slowOperations();
|
|
272478
272552
|
init_status();
|
|
272479
272553
|
init_oauth();
|
|
272554
|
+
init_crypto2();
|
|
272480
272555
|
});
|
|
272481
272556
|
|
|
272482
272557
|
// src/services/oauth/verbooStartupAuth.ts
|
|
@@ -376716,7 +376791,7 @@ function getAnthropicEnvMetadata() {
|
|
|
376716
376791
|
function getBuildAgeMinutes() {
|
|
376717
376792
|
if (false)
|
|
376718
376793
|
;
|
|
376719
|
-
const buildTime = new Date("2026-04-
|
|
376794
|
+
const buildTime = new Date("2026-04-29T18:34:52.579Z").getTime();
|
|
376720
376795
|
if (isNaN(buildTime))
|
|
376721
376796
|
return;
|
|
376722
376797
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -417243,7 +417318,7 @@ function buildPrimarySection() {
|
|
|
417243
417318
|
}, undefined, false, undefined, this);
|
|
417244
417319
|
return [{
|
|
417245
417320
|
label: "Version",
|
|
417246
|
-
value: "0.7.
|
|
417321
|
+
value: "0.7.8"
|
|
417247
417322
|
}, {
|
|
417248
417323
|
label: "Session name",
|
|
417249
417324
|
value: nameValue
|
|
@@ -485193,7 +485268,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
485193
485268
|
var call60 = async () => {
|
|
485194
485269
|
return {
|
|
485195
485270
|
type: "text",
|
|
485196
|
-
value: `${"99.0.0"} (built ${"2026-04-
|
|
485271
|
+
value: `${"99.0.0"} (built ${"2026-04-29T18:34:52.579Z"})`
|
|
485197
485272
|
};
|
|
485198
485273
|
}, version2, version_default;
|
|
485199
485274
|
var init_version = __esm(() => {
|
|
@@ -560851,7 +560926,7 @@ function WelcomeV2() {
|
|
|
560851
560926
|
dimColor: true,
|
|
560852
560927
|
children: [
|
|
560853
560928
|
"v",
|
|
560854
|
-
"0.7.
|
|
560929
|
+
"0.7.8",
|
|
560855
560930
|
" "
|
|
560856
560931
|
]
|
|
560857
560932
|
}, undefined, true, undefined, this)
|
|
@@ -561038,7 +561113,7 @@ function WelcomeV2() {
|
|
|
561038
561113
|
dimColor: true,
|
|
561039
561114
|
children: [
|
|
561040
561115
|
"v",
|
|
561041
|
-
"0.7.
|
|
561116
|
+
"0.7.8",
|
|
561042
561117
|
" "
|
|
561043
561118
|
]
|
|
561044
561119
|
}, undefined, true, undefined, this)
|
|
@@ -561254,7 +561329,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
561254
561329
|
dimColor: true,
|
|
561255
561330
|
children: [
|
|
561256
561331
|
"v",
|
|
561257
|
-
"0.7.
|
|
561332
|
+
"0.7.8",
|
|
561258
561333
|
" "
|
|
561259
561334
|
]
|
|
561260
561335
|
}, undefined, true, undefined, this);
|
|
@@ -561463,7 +561538,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
561463
561538
|
dimColor: true,
|
|
561464
561539
|
children: [
|
|
561465
561540
|
"v",
|
|
561466
|
-
"0.7.
|
|
561541
|
+
"0.7.8",
|
|
561467
561542
|
" "
|
|
561468
561543
|
]
|
|
561469
561544
|
}, undefined, true, undefined, this);
|
|
@@ -579491,7 +579566,7 @@ __export(exports_update, {
|
|
|
579491
579566
|
async function update() {
|
|
579492
579567
|
if (getAPIProvider() !== "firstParty") {
|
|
579493
579568
|
writeToStdout(source_default.yellow(`Auto-update is not available for third-party provider builds.
|
|
579494
|
-
`) + `Current version: ${"0.7.
|
|
579569
|
+
`) + `Current version: ${"0.7.8"}
|
|
579495
579570
|
|
|
579496
579571
|
` + `To update, reinstall from npm:
|
|
579497
579572
|
` + source_default.bold(` npm install -g ${"@verboo/code"}@latest`) + `
|
|
@@ -579502,7 +579577,7 @@ async function update() {
|
|
|
579502
579577
|
await gracefulShutdown(0);
|
|
579503
579578
|
}
|
|
579504
579579
|
logEvent("tengu_update_check", {});
|
|
579505
|
-
writeToStdout(`Current version: ${"0.7.
|
|
579580
|
+
writeToStdout(`Current version: ${"0.7.8"}
|
|
579506
579581
|
`);
|
|
579507
579582
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
579508
579583
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -579587,8 +579662,8 @@ async function update() {
|
|
|
579587
579662
|
writeToStdout(`Claude is managed by Homebrew.
|
|
579588
579663
|
`);
|
|
579589
579664
|
const latest = await getLatestVersion(channel);
|
|
579590
|
-
if (latest && !gte("0.7.
|
|
579591
|
-
writeToStdout(`Update available: ${"0.7.
|
|
579665
|
+
if (latest && !gte("0.7.8", latest)) {
|
|
579666
|
+
writeToStdout(`Update available: ${"0.7.8"} → ${latest}
|
|
579592
579667
|
`);
|
|
579593
579668
|
writeToStdout(`
|
|
579594
579669
|
`);
|
|
@@ -579604,8 +579679,8 @@ async function update() {
|
|
|
579604
579679
|
writeToStdout(`Claude is managed by winget.
|
|
579605
579680
|
`);
|
|
579606
579681
|
const latest = await getLatestVersion(channel);
|
|
579607
|
-
if (latest && !gte("0.7.
|
|
579608
|
-
writeToStdout(`Update available: ${"0.7.
|
|
579682
|
+
if (latest && !gte("0.7.8", latest)) {
|
|
579683
|
+
writeToStdout(`Update available: ${"0.7.8"} → ${latest}
|
|
579609
579684
|
`);
|
|
579610
579685
|
writeToStdout(`
|
|
579611
579686
|
`);
|
|
@@ -579621,8 +579696,8 @@ async function update() {
|
|
|
579621
579696
|
writeToStdout(`Claude is managed by apk.
|
|
579622
579697
|
`);
|
|
579623
579698
|
const latest = await getLatestVersion(channel);
|
|
579624
|
-
if (latest && !gte("0.7.
|
|
579625
|
-
writeToStdout(`Update available: ${"0.7.
|
|
579699
|
+
if (latest && !gte("0.7.8", latest)) {
|
|
579700
|
+
writeToStdout(`Update available: ${"0.7.8"} → ${latest}
|
|
579626
579701
|
`);
|
|
579627
579702
|
writeToStdout(`
|
|
579628
579703
|
`);
|
|
@@ -579687,11 +579762,11 @@ async function update() {
|
|
|
579687
579762
|
`);
|
|
579688
579763
|
await gracefulShutdown(1);
|
|
579689
579764
|
}
|
|
579690
|
-
if (result.latestVersion === "0.7.
|
|
579691
|
-
writeToStdout(source_default.green(`Verboo Code is up to date (${"0.7.
|
|
579765
|
+
if (result.latestVersion === "0.7.8") {
|
|
579766
|
+
writeToStdout(source_default.green(`Verboo Code is up to date (${"0.7.8"})`) + `
|
|
579692
579767
|
`);
|
|
579693
579768
|
} else {
|
|
579694
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
579769
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.8"} to version ${result.latestVersion}`) + `
|
|
579695
579770
|
`);
|
|
579696
579771
|
await regenerateCompletionCache();
|
|
579697
579772
|
}
|
|
@@ -579751,12 +579826,12 @@ async function update() {
|
|
|
579751
579826
|
`);
|
|
579752
579827
|
await gracefulShutdown(1);
|
|
579753
579828
|
}
|
|
579754
|
-
if (latestVersion === "0.7.
|
|
579755
|
-
writeToStdout(source_default.green(`Verboo Code is up to date (${"0.7.
|
|
579829
|
+
if (latestVersion === "0.7.8") {
|
|
579830
|
+
writeToStdout(source_default.green(`Verboo Code is up to date (${"0.7.8"})`) + `
|
|
579756
579831
|
`);
|
|
579757
579832
|
await gracefulShutdown(0);
|
|
579758
579833
|
}
|
|
579759
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.
|
|
579834
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.8"})
|
|
579760
579835
|
`);
|
|
579761
579836
|
writeToStdout(`Installing update...
|
|
579762
579837
|
`);
|
|
@@ -579801,7 +579876,7 @@ async function update() {
|
|
|
579801
579876
|
logForDebugging2(`update: Installation status: ${status2}`);
|
|
579802
579877
|
switch (status2) {
|
|
579803
579878
|
case "success":
|
|
579804
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
579879
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.8"} to version ${latestVersion}`) + `
|
|
579805
579880
|
`);
|
|
579806
579881
|
await regenerateCompletionCache();
|
|
579807
579882
|
break;
|
|
@@ -581854,7 +581929,7 @@ Usage: verboo --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
581854
581929
|
pendingHookMessages
|
|
581855
581930
|
}, renderAndRun);
|
|
581856
581931
|
}
|
|
581857
|
-
}).version(`0.7.
|
|
581932
|
+
}).version(`0.7.8 (${cliDesc})`, "-v, --version", "Output the version number");
|
|
581858
581933
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
581859
581934
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
581860
581935
|
if (canUserConfigureAdvisor()) {
|
|
@@ -581949,15 +582024,21 @@ Usage: verboo --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
581949
582024
|
if (false) {}
|
|
581950
582025
|
if (false) {}
|
|
581951
582026
|
const auth2 = program2.command("auth").description("Manage authentication").configureHelp(createSortedHelpConfig());
|
|
581952
|
-
auth2.command("login").description("Sign in to your Verboo account").option("--email <email>", "Pre-populate email address on the login page").option("--sso", "Force SSO login flow").option("--console", "Use Verboo Console (API usage billing) instead of subscription").option("--claudeai", "Use Verboo subscription (default)").action(async ({
|
|
582027
|
+
auth2.command("login").description("Sign in to your Verboo account").option("--email <email>", "Pre-populate email address on the login page").option("--sso", "Force SSO login flow").option("--console", "Use Verboo Console (API usage billing) instead of subscription").option("--claudeai", "Use Verboo subscription (default)").option("--headless", "Login sem navegador: exibe URL para abrir em outro dispositivo e solicita código (ideal para servidores/CI)").action(async ({
|
|
581953
582028
|
email: email3,
|
|
581954
582029
|
sso,
|
|
581955
582030
|
console: useConsole,
|
|
581956
|
-
claudeai
|
|
582031
|
+
claudeai,
|
|
582032
|
+
headless
|
|
581957
582033
|
}) => {
|
|
581958
582034
|
const {
|
|
581959
|
-
authLogin: authLogin2
|
|
582035
|
+
authLogin: authLogin2,
|
|
582036
|
+
authLoginHeadless: authLoginHeadless2
|
|
581960
582037
|
} = await Promise.resolve().then(() => (init_auth5(), exports_auth2));
|
|
582038
|
+
if (headless) {
|
|
582039
|
+
await authLoginHeadless2();
|
|
582040
|
+
return;
|
|
582041
|
+
}
|
|
581961
582042
|
await authLogin2({
|
|
581962
582043
|
email: email3,
|
|
581963
582044
|
sso,
|
|
@@ -582410,7 +582491,7 @@ if (false) {}
|
|
|
582410
582491
|
async function main2() {
|
|
582411
582492
|
const args = process.argv.slice(2);
|
|
582412
582493
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
582413
|
-
console.log(`${"0.7.
|
|
582494
|
+
console.log(`${"0.7.8"} (Verboo Code)`);
|
|
582414
582495
|
return;
|
|
582415
582496
|
}
|
|
582416
582497
|
if (args.includes("--provider")) {
|
|
@@ -582565,4 +582646,4 @@ async function main2() {
|
|
|
582565
582646
|
}
|
|
582566
582647
|
main2();
|
|
582567
582648
|
|
|
582568
|
-
//# debugId=
|
|
582649
|
+
//# debugId=58E0B8809DA3D6DE64756E2164756E21
|