@verboo/code 0.7.6 → 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 +135 -32
- package/package.json +3 -1
- package/scripts/postinstall.mjs +51 -0
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(() => {
|
|
@@ -487686,6 +487761,26 @@ async function validateModel(model) {
|
|
|
487686
487761
|
if (!normalizedModel) {
|
|
487687
487762
|
return { valid: false, error: "Model name cannot be empty" };
|
|
487688
487763
|
}
|
|
487764
|
+
if (isVerbooMode()) {
|
|
487765
|
+
const verbooModels = getCachedVerbooModels();
|
|
487766
|
+
if (verbooModels && verbooModels.length > 0) {
|
|
487767
|
+
const found = verbooModels.some((m) => m.id === normalizedModel);
|
|
487768
|
+
if (found) {
|
|
487769
|
+
validModelCache.set(normalizedModel, true);
|
|
487770
|
+
return { valid: true };
|
|
487771
|
+
}
|
|
487772
|
+
const MAX_SHOWN = 5;
|
|
487773
|
+
const names = verbooModels.map((m) => m.id);
|
|
487774
|
+
const shown = names.slice(0, MAX_SHOWN).join(", ");
|
|
487775
|
+
const suffix = names.length > MAX_SHOWN ? ` e mais ${names.length - MAX_SHOWN}` : "";
|
|
487776
|
+
return {
|
|
487777
|
+
valid: false,
|
|
487778
|
+
error: `Modelo '${normalizedModel}' não disponível. Disponíveis: ${shown}${suffix}`
|
|
487779
|
+
};
|
|
487780
|
+
}
|
|
487781
|
+
validModelCache.set(normalizedModel, true);
|
|
487782
|
+
return { valid: true };
|
|
487783
|
+
}
|
|
487689
487784
|
if (getAPIProvider() === "openai" && isOllamaProvider()) {
|
|
487690
487785
|
const ollamaModels = getCachedOllamaModelOptions();
|
|
487691
487786
|
const found = ollamaModels.some((m) => m.value === normalizedModel);
|
|
@@ -487833,6 +487928,8 @@ var init_validateModel = __esm(() => {
|
|
|
487833
487928
|
init_ollamaModels();
|
|
487834
487929
|
init_nvidiaNimModels();
|
|
487835
487930
|
init_minimaxModels();
|
|
487931
|
+
init_oauth();
|
|
487932
|
+
init_verbooModels();
|
|
487836
487933
|
validModelCache = new Map;
|
|
487837
487934
|
});
|
|
487838
487935
|
|
|
@@ -509891,7 +509988,7 @@ function preconnectAnthropicApi() {
|
|
|
509891
509988
|
if (process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy || process.env.ANTHROPIC_UNIX_SOCKET || process.env.CLAUDE_CODE_CLIENT_CERT || process.env.CLAUDE_CODE_CLIENT_KEY) {
|
|
509892
509989
|
return;
|
|
509893
509990
|
}
|
|
509894
|
-
const baseUrl = process.env.ANTHROPIC_BASE_URL || getOauthConfig().BASE_API_URL;
|
|
509991
|
+
const baseUrl = isVerbooMode() ? getOauthConfig().BASE_API_URL : process.env.ANTHROPIC_BASE_URL || getOauthConfig().BASE_API_URL;
|
|
509895
509992
|
fetch(baseUrl, {
|
|
509896
509993
|
method: "HEAD",
|
|
509897
509994
|
signal: AbortSignal.timeout(1e4)
|
|
@@ -560829,7 +560926,7 @@ function WelcomeV2() {
|
|
|
560829
560926
|
dimColor: true,
|
|
560830
560927
|
children: [
|
|
560831
560928
|
"v",
|
|
560832
|
-
"0.7.
|
|
560929
|
+
"0.7.8",
|
|
560833
560930
|
" "
|
|
560834
560931
|
]
|
|
560835
560932
|
}, undefined, true, undefined, this)
|
|
@@ -561016,7 +561113,7 @@ function WelcomeV2() {
|
|
|
561016
561113
|
dimColor: true,
|
|
561017
561114
|
children: [
|
|
561018
561115
|
"v",
|
|
561019
|
-
"0.7.
|
|
561116
|
+
"0.7.8",
|
|
561020
561117
|
" "
|
|
561021
561118
|
]
|
|
561022
561119
|
}, undefined, true, undefined, this)
|
|
@@ -561232,7 +561329,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
561232
561329
|
dimColor: true,
|
|
561233
561330
|
children: [
|
|
561234
561331
|
"v",
|
|
561235
|
-
"0.7.
|
|
561332
|
+
"0.7.8",
|
|
561236
561333
|
" "
|
|
561237
561334
|
]
|
|
561238
561335
|
}, undefined, true, undefined, this);
|
|
@@ -561441,7 +561538,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
561441
561538
|
dimColor: true,
|
|
561442
561539
|
children: [
|
|
561443
561540
|
"v",
|
|
561444
|
-
"0.7.
|
|
561541
|
+
"0.7.8",
|
|
561445
561542
|
" "
|
|
561446
561543
|
]
|
|
561447
561544
|
}, undefined, true, undefined, this);
|
|
@@ -579469,7 +579566,7 @@ __export(exports_update, {
|
|
|
579469
579566
|
async function update() {
|
|
579470
579567
|
if (getAPIProvider() !== "firstParty") {
|
|
579471
579568
|
writeToStdout(source_default.yellow(`Auto-update is not available for third-party provider builds.
|
|
579472
|
-
`) + `Current version: ${"0.7.
|
|
579569
|
+
`) + `Current version: ${"0.7.8"}
|
|
579473
579570
|
|
|
579474
579571
|
` + `To update, reinstall from npm:
|
|
579475
579572
|
` + source_default.bold(` npm install -g ${"@verboo/code"}@latest`) + `
|
|
@@ -579480,7 +579577,7 @@ async function update() {
|
|
|
579480
579577
|
await gracefulShutdown(0);
|
|
579481
579578
|
}
|
|
579482
579579
|
logEvent("tengu_update_check", {});
|
|
579483
|
-
writeToStdout(`Current version: ${"0.7.
|
|
579580
|
+
writeToStdout(`Current version: ${"0.7.8"}
|
|
579484
579581
|
`);
|
|
579485
579582
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
579486
579583
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -579565,8 +579662,8 @@ async function update() {
|
|
|
579565
579662
|
writeToStdout(`Claude is managed by Homebrew.
|
|
579566
579663
|
`);
|
|
579567
579664
|
const latest = await getLatestVersion(channel);
|
|
579568
|
-
if (latest && !gte("0.7.
|
|
579569
|
-
writeToStdout(`Update available: ${"0.7.
|
|
579665
|
+
if (latest && !gte("0.7.8", latest)) {
|
|
579666
|
+
writeToStdout(`Update available: ${"0.7.8"} → ${latest}
|
|
579570
579667
|
`);
|
|
579571
579668
|
writeToStdout(`
|
|
579572
579669
|
`);
|
|
@@ -579582,8 +579679,8 @@ async function update() {
|
|
|
579582
579679
|
writeToStdout(`Claude is managed by winget.
|
|
579583
579680
|
`);
|
|
579584
579681
|
const latest = await getLatestVersion(channel);
|
|
579585
|
-
if (latest && !gte("0.7.
|
|
579586
|
-
writeToStdout(`Update available: ${"0.7.
|
|
579682
|
+
if (latest && !gte("0.7.8", latest)) {
|
|
579683
|
+
writeToStdout(`Update available: ${"0.7.8"} → ${latest}
|
|
579587
579684
|
`);
|
|
579588
579685
|
writeToStdout(`
|
|
579589
579686
|
`);
|
|
@@ -579599,8 +579696,8 @@ async function update() {
|
|
|
579599
579696
|
writeToStdout(`Claude is managed by apk.
|
|
579600
579697
|
`);
|
|
579601
579698
|
const latest = await getLatestVersion(channel);
|
|
579602
|
-
if (latest && !gte("0.7.
|
|
579603
|
-
writeToStdout(`Update available: ${"0.7.
|
|
579699
|
+
if (latest && !gte("0.7.8", latest)) {
|
|
579700
|
+
writeToStdout(`Update available: ${"0.7.8"} → ${latest}
|
|
579604
579701
|
`);
|
|
579605
579702
|
writeToStdout(`
|
|
579606
579703
|
`);
|
|
@@ -579665,11 +579762,11 @@ async function update() {
|
|
|
579665
579762
|
`);
|
|
579666
579763
|
await gracefulShutdown(1);
|
|
579667
579764
|
}
|
|
579668
|
-
if (result.latestVersion === "0.7.
|
|
579669
|
-
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"})`) + `
|
|
579670
579767
|
`);
|
|
579671
579768
|
} else {
|
|
579672
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
579769
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.8"} to version ${result.latestVersion}`) + `
|
|
579673
579770
|
`);
|
|
579674
579771
|
await regenerateCompletionCache();
|
|
579675
579772
|
}
|
|
@@ -579729,12 +579826,12 @@ async function update() {
|
|
|
579729
579826
|
`);
|
|
579730
579827
|
await gracefulShutdown(1);
|
|
579731
579828
|
}
|
|
579732
|
-
if (latestVersion === "0.7.
|
|
579733
|
-
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"})`) + `
|
|
579734
579831
|
`);
|
|
579735
579832
|
await gracefulShutdown(0);
|
|
579736
579833
|
}
|
|
579737
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.
|
|
579834
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${"0.7.8"})
|
|
579738
579835
|
`);
|
|
579739
579836
|
writeToStdout(`Installing update...
|
|
579740
579837
|
`);
|
|
@@ -579779,7 +579876,7 @@ async function update() {
|
|
|
579779
579876
|
logForDebugging2(`update: Installation status: ${status2}`);
|
|
579780
579877
|
switch (status2) {
|
|
579781
579878
|
case "success":
|
|
579782
|
-
writeToStdout(source_default.green(`Successfully updated from ${"0.7.
|
|
579879
|
+
writeToStdout(source_default.green(`Successfully updated from ${"0.7.8"} to version ${latestVersion}`) + `
|
|
579783
579880
|
`);
|
|
579784
579881
|
await regenerateCompletionCache();
|
|
579785
579882
|
break;
|
|
@@ -580384,7 +580481,7 @@ ${getTmuxInstallInstructions2()}
|
|
|
580384
580481
|
const files2 = parseFileSpecs(fileSpecs);
|
|
580385
580482
|
if (files2.length > 0) {
|
|
580386
580483
|
const config3 = {
|
|
580387
|
-
baseUrl: process.env.ANTHROPIC_BASE_URL || getOauthConfig().BASE_API_URL,
|
|
580484
|
+
baseUrl: isVerbooMode() ? getOauthConfig().BASE_API_URL : process.env.ANTHROPIC_BASE_URL || getOauthConfig().BASE_API_URL,
|
|
580388
580485
|
oauthToken: sessionToken,
|
|
580389
580486
|
sessionId: fileSessionId
|
|
580390
580487
|
};
|
|
@@ -581832,7 +581929,7 @@ Usage: verboo --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
581832
581929
|
pendingHookMessages
|
|
581833
581930
|
}, renderAndRun);
|
|
581834
581931
|
}
|
|
581835
|
-
}).version(`0.7.
|
|
581932
|
+
}).version(`0.7.8 (${cliDesc})`, "-v, --version", "Output the version number");
|
|
581836
581933
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
581837
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.");
|
|
581838
581935
|
if (canUserConfigureAdvisor()) {
|
|
@@ -581927,15 +582024,21 @@ Usage: verboo --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
581927
582024
|
if (false) {}
|
|
581928
582025
|
if (false) {}
|
|
581929
582026
|
const auth2 = program2.command("auth").description("Manage authentication").configureHelp(createSortedHelpConfig());
|
|
581930
|
-
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 ({
|
|
581931
582028
|
email: email3,
|
|
581932
582029
|
sso,
|
|
581933
582030
|
console: useConsole,
|
|
581934
|
-
claudeai
|
|
582031
|
+
claudeai,
|
|
582032
|
+
headless
|
|
581935
582033
|
}) => {
|
|
581936
582034
|
const {
|
|
581937
|
-
authLogin: authLogin2
|
|
582035
|
+
authLogin: authLogin2,
|
|
582036
|
+
authLoginHeadless: authLoginHeadless2
|
|
581938
582037
|
} = await Promise.resolve().then(() => (init_auth5(), exports_auth2));
|
|
582038
|
+
if (headless) {
|
|
582039
|
+
await authLoginHeadless2();
|
|
582040
|
+
return;
|
|
582041
|
+
}
|
|
581939
582042
|
await authLogin2({
|
|
581940
582043
|
email: email3,
|
|
581941
582044
|
sso,
|
|
@@ -582388,7 +582491,7 @@ if (false) {}
|
|
|
582388
582491
|
async function main2() {
|
|
582389
582492
|
const args = process.argv.slice(2);
|
|
582390
582493
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
582391
|
-
console.log(`${"0.7.
|
|
582494
|
+
console.log(`${"0.7.8"} (Verboo Code)`);
|
|
582392
582495
|
return;
|
|
582393
582496
|
}
|
|
582394
582497
|
if (args.includes("--provider")) {
|
|
@@ -582543,4 +582646,4 @@ async function main2() {
|
|
|
582543
582646
|
}
|
|
582544
582647
|
main2();
|
|
582545
582648
|
|
|
582546
|
-
//# debugId=
|
|
582649
|
+
//# debugId=58E0B8809DA3D6DE64756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verboo/code",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
4
4
|
"description": "Verboo Code — coding agent for the Verboo platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,10 +10,12 @@
|
|
|
10
10
|
"bin/verboo",
|
|
11
11
|
"bin/import-specifier.mjs",
|
|
12
12
|
"dist/cli.mjs",
|
|
13
|
+
"scripts/postinstall.mjs",
|
|
13
14
|
"README.md"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"build": "bun run scripts/build.ts",
|
|
18
|
+
"postinstall": "node scripts/postinstall.mjs || true",
|
|
17
19
|
"dev": "bun run build && node dist/cli.mjs",
|
|
18
20
|
"dev:profile": "bun run scripts/provider-launch.ts",
|
|
19
21
|
"dev:profile:fast": "bun run scripts/provider-launch.ts auto --fast --bare",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Postinstall: garante que o binário `verboo` fique disponível no fish shell.
|
|
4
|
+
*
|
|
5
|
+
* O npm instala globalmente no prefixo retornado por `npm prefix -g` (ex:
|
|
6
|
+
* /usr/local ou ~/.npm-global). Shells bash/zsh geralmente já têm esse bin no
|
|
7
|
+
* PATH via .bashrc/.zshrc, mas o fish não herda essas configs — é preciso
|
|
8
|
+
* chamar `fish_add_path` explicitamente.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { execFileSync, spawnSync } from 'node:child_process'
|
|
12
|
+
import { existsSync } from 'node:fs'
|
|
13
|
+
import { join } from 'node:path'
|
|
14
|
+
|
|
15
|
+
function isFishShell() {
|
|
16
|
+
const shell = process.env.SHELL ?? ''
|
|
17
|
+
const parent = process.env.FISH_VERSION // set by fish itself
|
|
18
|
+
return shell.endsWith('/fish') || parent !== undefined
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getNpmGlobalBin() {
|
|
22
|
+
try {
|
|
23
|
+
const prefix = execFileSync('npm', ['prefix', '-g'], { encoding: 'utf8' }).trim()
|
|
24
|
+
return join(prefix, 'bin')
|
|
25
|
+
} catch {
|
|
26
|
+
return null
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function fishAddPath(dir) {
|
|
31
|
+
const result = spawnSync('fish', ['-c', `fish_add_path ${dir}`], {
|
|
32
|
+
stdio: 'inherit',
|
|
33
|
+
timeout: 5000,
|
|
34
|
+
})
|
|
35
|
+
return result.status === 0
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (isFishShell()) {
|
|
39
|
+
const binDir = getNpmGlobalBin()
|
|
40
|
+
if (binDir && existsSync(binDir)) {
|
|
41
|
+
const ok = fishAddPath(binDir)
|
|
42
|
+
if (ok) {
|
|
43
|
+
process.stdout.write(`[verboo] fish_add_path ${binDir} — feito.\n`)
|
|
44
|
+
} else {
|
|
45
|
+
process.stdout.write(
|
|
46
|
+
`[verboo] Não foi possível adicionar ${binDir} ao fish automaticamente.\n` +
|
|
47
|
+
` Execute manualmente: fish_add_path ${binDir}\n`,
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|