@verboo/code 0.12.0 → 0.13.1

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +433 -113
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -135919,6 +135919,7 @@ __export(exports_client, {
135919
135919
  storeOAuthAccountInfo: () => storeOAuthAccountInfo,
135920
135920
  shouldUseClaudeAIAuth: () => shouldUseClaudeAIAuth,
135921
135921
  shouldRefreshOAuthAccountInfo: () => shouldRefreshOAuthAccountInfo,
135922
+ revokeVerbooRefreshToken: () => revokeVerbooRefreshToken,
135922
135923
  refreshOAuthToken: () => refreshOAuthToken,
135923
135924
  populateOAuthAccountInfoIfNeeded: () => populateOAuthAccountInfoIfNeeded,
135924
135925
  parseScopes: () => parseScopes,
@@ -136092,6 +136093,24 @@ async function refreshOAuthToken(refreshToken, { scopes: requestedScopes } = {})
136092
136093
  throw error41;
136093
136094
  }
136094
136095
  }
136096
+ async function revokeVerbooRefreshToken(refreshToken) {
136097
+ const form = new URLSearchParams({
136098
+ token: refreshToken,
136099
+ token_type_hint: "refresh_token",
136100
+ client_id: getOauthConfig().CLIENT_ID
136101
+ });
136102
+ try {
136103
+ await axios_default.post(`${getOauthConfig().BASE_API_URL}/oauth/revoke`, form, {
136104
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
136105
+ timeout: 5000
136106
+ });
136107
+ logEvent("verboo_oauth_refresh_token_revocation_success", {});
136108
+ return true;
136109
+ } catch {
136110
+ logEvent("verboo_oauth_refresh_token_revocation_unconfirmed", {});
136111
+ return false;
136112
+ }
136113
+ }
136095
136114
  async function fetchAndStoreUserRoles(accessToken) {
136096
136115
  if (isVerbooMode()) {
136097
136116
  return;
@@ -169728,7 +169747,7 @@ function getClaudeCodeUserAgent() {
169728
169747
  return `claude-code/${"99.0.0"}`;
169729
169748
  }
169730
169749
  function getVerbooCodeUserAgent() {
169731
- const version2 = typeof MACRO !== "undefined" ? "0.12.0" : "unknown";
169750
+ const version2 = typeof MACRO !== "undefined" ? "0.13.1" : "unknown";
169732
169751
  return `verboo-code/${version2}`;
169733
169752
  }
169734
169753
 
@@ -173021,7 +173040,9 @@ function convertTools(tools, options2 = {}) {
173021
173040
  const isGemini = isGeminiMode();
173022
173041
  const strict = !isGemini && !isEnvTruthy(process.env.VERBOO_DISABLE_STRICT_TOOLS ?? process.env.OPENCLAUDE_DISABLE_STRICT_TOOLS) && !options2.skipStrict;
173023
173042
  return tools.filter((t) => t.name !== "ToolSearchTool").map((t) => {
173024
- const schema = { ...t.input_schema ?? { type: "object", properties: {} } };
173043
+ const schema = {
173044
+ ...t.input_schema ?? { type: "object", properties: {} }
173045
+ };
173025
173046
  if (t.name === "Agent" && schema.properties) {
173026
173047
  const props = schema.properties;
173027
173048
  if (!Array.isArray(schema.required))
@@ -173231,7 +173252,10 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173231
173252
  yield {
173232
173253
  type: "content_block_delta",
173233
173254
  index: hasClosedThinking ? contentBlockIndex - 1 : contentBlockIndex,
173234
- delta: { type: "thinking_delta", thinking: delta.reasoning_content }
173255
+ delta: {
173256
+ type: "thinking_delta",
173257
+ thinking: delta.reasoning_content
173258
+ }
173235
173259
  };
173236
173260
  }
173237
173261
  if (delta.content != null && delta.content !== "") {
@@ -173262,7 +173286,10 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173262
173286
  for (const tc of delta.tool_calls) {
173263
173287
  if (tc.id && tc.function?.name) {
173264
173288
  if (hasEmittedThinkingStart && !hasClosedThinking) {
173265
- yield { type: "content_block_stop", index: contentBlockIndex };
173289
+ yield {
173290
+ type: "content_block_stop",
173291
+ index: contentBlockIndex
173292
+ };
173266
173293
  contentBlockIndex++;
173267
173294
  hasClosedThinking = true;
173268
173295
  }
@@ -173315,7 +173342,10 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173315
173342
  const contSig = tc.thought_signature;
173316
173343
  const contEC = tc.extra_content ? { ...tc.extra_content } : contSig ? { google: { thought_signature: contSig } } : undefined;
173317
173344
  if (contEC) {
173318
- active.extra_content = { ...active.extra_content ?? {}, ...contEC };
173345
+ active.extra_content = {
173346
+ ...active.extra_content ?? {},
173347
+ ...contEC
173348
+ };
173319
173349
  }
173320
173350
  if (active.normalizeAtStop) {
173321
173351
  continue;
@@ -173335,7 +173365,10 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173335
173365
  const lateSig = tc.thought_signature;
173336
173366
  const lateEC = tc.extra_content ? { ...tc.extra_content } : lateSig ? { google: { thought_signature: lateSig } } : undefined;
173337
173367
  if (lateEC) {
173338
- active.extra_content = { ...active.extra_content ?? {}, ...lateEC };
173368
+ active.extra_content = {
173369
+ ...active.extra_content ?? {},
173370
+ ...lateEC
173371
+ };
173339
173372
  }
173340
173373
  }
173341
173374
  }
@@ -173362,7 +173395,9 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173362
173395
  name: tc.name,
173363
173396
  input: {},
173364
173397
  extra_content: tc.extra_content,
173365
- ...tc.extra_content.google?.thought_signature ? { signature: tc.extra_content.google.thought_signature } : {}
173398
+ ...tc.extra_content.google?.thought_signature ? {
173399
+ signature: tc.extra_content.google.thought_signature
173400
+ } : {}
173366
173401
  }
173367
173402
  };
173368
173403
  }
@@ -173429,9 +173464,12 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173429
173464
  yield {
173430
173465
  type: "content_block_delta",
173431
173466
  index: contentBlockIndex,
173432
- delta: { type: "text_delta", text: `
173467
+ delta: {
173468
+ type: "text_delta",
173469
+ text: `
173433
173470
 
173434
- [Content blocked by provider safety filter]` }
173471
+ [Content blocked by provider safety filter]`
173472
+ }
173435
173473
  };
173436
173474
  } else if (choice.finish_reason === "length") {
173437
173475
  if (!hasEmittedContentStart) {
@@ -173445,9 +173483,12 @@ async function* openaiStreamToAnthropic(response, model2, signal) {
173445
173483
  yield {
173446
173484
  type: "content_block_delta",
173447
173485
  index: contentBlockIndex,
173448
- delta: { type: "text_delta", text: `
173486
+ delta: {
173487
+ type: "text_delta",
173488
+ text: `
173449
173489
 
173450
- [Response truncated — reached length limit or upstream stalled. Ask the model to continue.]` }
173490
+ [Response truncated — reached length limit or upstream stalled. Ask the model to continue.]`
173491
+ }
173451
173492
  };
173452
173493
  }
173453
173494
  lastStopReason = stopReason;
@@ -173756,11 +173797,33 @@ class OpenAIShimMessages {
173756
173797
  baseUrl: request.baseUrl,
173757
173798
  processEnv: process.env
173758
173799
  });
173759
- const apiKey = this.providerOverride?.apiKey ?? routeCredential ?? process.env.OPENAI_API_KEY ?? "";
173800
+ const getApiKey = () => this.providerOverride?.getApiKey?.() ?? this.providerOverride?.apiKey ?? routeCredential ?? process.env.OPENAI_API_KEY ?? "";
173760
173801
  const configuredAuthHeaderValue = process.env.OPENAI_AUTH_HEADER_VALUE?.trim();
173761
173802
  const customAuthHeader = process.env.OPENAI_AUTH_HEADER?.trim();
173762
173803
  const hasCustomAuthHeader = Boolean(customAuthHeader && /^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/.test(customAuthHeader));
173763
- const authValue = hasCustomAuthHeader ? configuredAuthHeaderValue || apiKey : apiKey;
173804
+ const applyAuthHeader = () => {
173805
+ const apiKey = getApiKey();
173806
+ const authValue = hasCustomAuthHeader ? configuredAuthHeaderValue || apiKey : apiKey;
173807
+ delete headers.Authorization;
173808
+ if (hasCustomAuthHeader && customAuthHeader) {
173809
+ delete headers[customAuthHeader];
173810
+ }
173811
+ if (authValue) {
173812
+ if (hasCustomAuthHeader && customAuthHeader) {
173813
+ const defaultCustomAuthScheme = customAuthHeader.toLowerCase() === "authorization" ? "bearer" : "raw";
173814
+ const customAuthScheme = process.env.OPENAI_AUTH_SCHEME === "raw" || process.env.OPENAI_AUTH_SCHEME === "bearer" ? process.env.OPENAI_AUTH_SCHEME : defaultCustomAuthScheme;
173815
+ headers[customAuthHeader] = customAuthScheme === "bearer" ? `Bearer ${authValue}` : authValue;
173816
+ } else if (isAzure) {
173817
+ headers["api-key"] = authValue;
173818
+ } else if (isBankr) {
173819
+ headers["X-API-Key"] = authValue;
173820
+ } else if (shimConfig.defaultAuthHeader?.name) {
173821
+ headers[shimConfig.defaultAuthHeader.name] = shimConfig.defaultAuthHeader.scheme === "bearer" ? `Bearer ${authValue}` : authValue;
173822
+ } else {
173823
+ headers.Authorization = `Bearer ${authValue}`;
173824
+ }
173825
+ }
173826
+ };
173764
173827
  let isAzure = false;
173765
173828
  try {
173766
173829
  const { hostname: hostname2 } = new URL(request.baseUrl);
@@ -173770,21 +173833,8 @@ class OpenAIShimMessages {
173770
173833
  try {
173771
173834
  isBankr = runtimeShimContext.routeId === "bankr" || request.baseUrl.toLowerCase().includes("bankr");
173772
173835
  } catch {}
173773
- if (authValue) {
173774
- if (hasCustomAuthHeader && customAuthHeader) {
173775
- const defaultCustomAuthScheme = customAuthHeader.toLowerCase() === "authorization" ? "bearer" : "raw";
173776
- const customAuthScheme = process.env.OPENAI_AUTH_SCHEME === "raw" || process.env.OPENAI_AUTH_SCHEME === "bearer" ? process.env.OPENAI_AUTH_SCHEME : defaultCustomAuthScheme;
173777
- headers[customAuthHeader] = customAuthScheme === "bearer" ? `Bearer ${authValue}` : authValue;
173778
- } else if (isAzure) {
173779
- headers["api-key"] = authValue;
173780
- } else if (isBankr) {
173781
- headers["X-API-Key"] = authValue;
173782
- } else if (shimConfig.defaultAuthHeader?.name) {
173783
- headers[shimConfig.defaultAuthHeader.name] = shimConfig.defaultAuthHeader.scheme === "bearer" ? `Bearer ${authValue}` : authValue;
173784
- } else {
173785
- headers.Authorization = `Bearer ${authValue}`;
173786
- }
173787
- } else if (isGemini) {
173836
+ applyAuthHeader();
173837
+ if (!getApiKey() && isGemini) {
173788
173838
  const geminiCredential = await resolveGeminiCredential(process.env);
173789
173839
  if (geminiCredential.kind !== "none") {
173790
173840
  headers.Authorization = `Bearer ${geminiCredential.credential}`;
@@ -173847,7 +173897,7 @@ class OpenAIShimMessages {
173847
173897
  signal: options2?.signal
173848
173898
  });
173849
173899
  const maxSelfHealAttempts = isLocal ? localRetryBaseUrls.length + 1 : 0;
173850
- const maxAttempts = (isGithub ? GITHUB_429_MAX_RETRIES : 1) + maxSelfHealAttempts;
173900
+ const maxAttempts = (isGithub ? GITHUB_429_MAX_RETRIES : 1) + maxSelfHealAttempts + (isVerbooRouterUrl(request.baseUrl) && this.providerOverride?.refreshApiKey ? 1 : 0);
173851
173901
  const throwClassifiedTransportError = (error41, requestUrl2, preclassifiedFailure) => {
173852
173902
  if (options2?.signal?.aborted) {
173853
173903
  throw error41;
@@ -173866,12 +173916,16 @@ class OpenAIShimMessages {
173866
173916
  body: errorBody,
173867
173917
  url: requestUrl2
173868
173918
  });
173869
- const failureWithUrl = { ...failure, requestUrl: failure.requestUrl ?? requestUrl2 };
173919
+ const failureWithUrl = {
173920
+ ...failure,
173921
+ requestUrl: failure.requestUrl ?? requestUrl2
173922
+ };
173870
173923
  const redactedUrl = redactUrlForDiagnostics(requestUrl2);
173871
173924
  logForDebugging(`[OpenAIShim] request failed category=${failure.category} retryable=${failure.retryable} status=${status} method=POST url=${redactedUrl} model=${request.resolvedModel}`, { level: "warn" });
173872
173925
  throw APIError.generate(status, parsedBody, buildOpenAICompatibilityErrorMessage(`OpenAI API error ${status}: ${errorBody}${rateHint}`, failureWithUrl), responseHeaders);
173873
173926
  };
173874
173927
  let response;
173928
+ let didRetryVerbooAuth = false;
173875
173929
  const provider = request.baseUrl.includes("nvidia") ? "nvidia-nim" : request.baseUrl.includes("minimax") ? "minimax" : request.baseUrl.includes("xiaomimimo") || request.baseUrl.includes("mimo-v2") ? "xiaomi-mimo" : request.baseUrl.includes("localhost:11434") || request.baseUrl.includes("localhost:11435") ? "ollama" : request.baseUrl.includes("anthropic") ? "anthropic" : "openai";
173876
173930
  const { correlationId, startTime: startTime2 } = logApiCallStart(provider, request.resolvedModel);
173877
173931
  for (let attempt = 0;attempt < maxAttempts; attempt++) {
@@ -173905,6 +173959,16 @@ class OpenAIShimMessages {
173905
173959
  logApiCallEnd(correlationId, startTime2, request.resolvedModel, "success", tokensIn, tokensOut, Boolean(params.stream));
173906
173960
  return response;
173907
173961
  }
173962
+ if (!didRetryVerbooAuth && response.status === 401 && isVerbooRouterUrl(request.baseUrl) && this.providerOverride?.refreshApiKey) {
173963
+ didRetryVerbooAuth = true;
173964
+ const failedApiKey = getApiKey();
173965
+ await response.text().catch(() => {});
173966
+ const refreshedApiKey = await this.providerOverride.refreshApiKey(failedApiKey);
173967
+ if (refreshedApiKey) {
173968
+ applyAuthHeader();
173969
+ continue;
173970
+ }
173971
+ }
173908
173972
  if (isGithub && response.status === 429 && attempt < maxAttempts - 1) {
173909
173973
  await response.text().catch(() => {});
173910
173974
  const delaySec = Math.min(GITHUB_429_BASE_DELAY_SEC * 2 ** attempt, GITHUB_429_MAX_DELAY_SEC);
@@ -187923,7 +187987,7 @@ async function getAnthropicClient({
187923
187987
  defaultHeaders["x-anthropic-additional-protection"] = "true";
187924
187988
  }
187925
187989
  const shouldUseFirstPartyAuth = shouldUseFirstPartyAnthropicAuth(providerOverride);
187926
- if (shouldUseFirstPartyAuth) {
187990
+ if (shouldUseFirstPartyAuth || isVerbooMode()) {
187927
187991
  logForDebugging("[API:auth] OAuth token check starting");
187928
187992
  await checkAndRefreshOAuthTokenIfNeeded();
187929
187993
  logForDebugging("[API:auth] OAuth token check complete");
@@ -187966,7 +188030,12 @@ async function getAnthropicClient({
187966
188030
  providerOverride: {
187967
188031
  model: safeVerbooModel,
187968
188032
  baseURL: VERBOO_ROUTER_URL,
187969
- apiKey: accessToken ?? ""
188033
+ apiKey: accessToken ?? "",
188034
+ getApiKey: () => getClaudeAIOAuthTokens()?.accessToken ?? "",
188035
+ refreshApiKey: async (failedAccessToken) => {
188036
+ const recovered = await handleOAuth401Error(failedAccessToken);
188037
+ return recovered ? getClaudeAIOAuthTokens()?.accessToken ?? null : null;
188038
+ }
187970
188039
  }
187971
188040
  });
187972
188041
  }
@@ -281176,6 +281245,22 @@ var init_user = __esm(() => {
281176
281245
  });
281177
281246
  });
281178
281247
 
281248
+ // src/commands/logout/logoutState.ts
281249
+ function removeStoredVerbooOauth(secureStorage) {
281250
+ const storageData = secureStorage.read() ?? {};
281251
+ const refreshToken = storageData.verbooOauth?.refreshToken ?? null;
281252
+ if (!storageData.verbooOauth) {
281253
+ return refreshToken;
281254
+ }
281255
+ delete storageData.verbooOauth;
281256
+ const isEmpty = Object.keys(storageData).length === 0;
281257
+ const success2 = isEmpty ? secureStorage.delete() : secureStorage.update(storageData).success;
281258
+ if (!success2) {
281259
+ throw new Error("Failed to clear local Verboo credentials");
281260
+ }
281261
+ return refreshToken;
281262
+ }
281263
+
281179
281264
  // src/commands/logout/logout.tsx
281180
281265
  var exports_logout = {};
281181
281266
  __export(exports_logout, {
@@ -281183,16 +281268,27 @@ __export(exports_logout, {
281183
281268
  clearAuthRelatedCaches: () => clearAuthRelatedCaches,
281184
281269
  call: () => call
281185
281270
  });
281271
+ function isExternallyInjectedTokenSource(source) {
281272
+ return [
281273
+ "CLAUDE_CODE_OAUTH_TOKEN",
281274
+ "CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR",
281275
+ "CCR_OAUTH_TOKEN_FILE",
281276
+ "ANTHROPIC_AUTH_TOKEN"
281277
+ ].includes(source);
281278
+ }
281186
281279
  async function performLogout({
281187
281280
  clearOnboarding = false
281188
281281
  }) {
281189
- await removeApiKey();
281282
+ const authTokenSource = getAuthTokenSource().source;
281283
+ const refreshToken = removeStoredVerbooOauth(getSecureStorage());
281284
+ const remoteRevocation = refreshToken ? await revokeVerbooRefreshToken(refreshToken) ? "revoked" : "unconfirmed" : "not_applicable";
281285
+ if (!isVerbooMode()) {
281286
+ await removeApiKey();
281287
+ }
281190
281288
  if (isVerbooMode()) {
281191
281289
  resetVerbooSessionValidation();
281192
281290
  clearVerbooModelsCache();
281193
281291
  }
281194
- const secureStorage = getSecureStorage();
281195
- secureStorage.delete();
281196
281292
  await clearAuthRelatedCaches();
281197
281293
  saveGlobalConfig((current) => {
281198
281294
  const updated = {
@@ -281212,6 +281308,11 @@ async function performLogout({
281212
281308
  updated.oauthAccount = undefined;
281213
281309
  return updated;
281214
281310
  });
281311
+ return {
281312
+ localCleared: true,
281313
+ remoteRevocation,
281314
+ ...isExternallyInjectedTokenSource(authTokenSource) ? { externalTokenSource: authTokenSource } : {}
281315
+ };
281215
281316
  }
281216
281317
  async function clearAuthRelatedCaches() {
281217
281318
  getClaudeAIOAuthTokens.cache?.clear?.();
@@ -281226,11 +281327,15 @@ async function clearAuthRelatedCaches() {
281226
281327
  await clearPolicyLimitsCache();
281227
281328
  }
281228
281329
  async function call() {
281229
- await performLogout({
281330
+ const result = await performLogout({
281230
281331
  clearOnboarding: true
281231
281332
  });
281232
- const message = isVerbooMode() ? /* @__PURE__ */ jsx_runtime61.jsx(ThemedText, {
281233
- children: "Saiu da conta Verboo com sucesso."
281333
+ const message = isVerbooMode() ? /* @__PURE__ */ jsx_runtime61.jsxs(ThemedText, {
281334
+ children: [
281335
+ "Saiu da conta Verboo localmente.",
281336
+ result.remoteRevocation === "unconfirmed" ? " Não foi possível confirmar a revogação da sessão no servidor." : "",
281337
+ result.externalTokenSource ? ` ${result.externalTokenSource} ainda fornece uma credencial neste ambiente.` : ""
281338
+ ]
281234
281339
  }) : /* @__PURE__ */ jsx_runtime61.jsx(ThemedText, {
281235
281340
  children: "Successfully logged out from your Anthropic account."
281236
281341
  });
@@ -281250,6 +281355,7 @@ var init_logout = __esm(() => {
281250
281355
  init_oauth();
281251
281356
  init_verbooModels();
281252
281357
  init_verbooStartupAuth();
281358
+ init_client2();
281253
281359
  init_auth();
281254
281360
  init_betas2();
281255
281361
  init_config7();
@@ -298599,15 +298705,24 @@ async function authStatus(opts) {
298599
298705
  process.exit(loggedIn ? 0 : 1);
298600
298706
  }
298601
298707
  async function authLogout() {
298708
+ let result;
298602
298709
  try {
298603
- await performLogout({ clearOnboarding: false });
298710
+ result = await performLogout({ clearOnboarding: false });
298604
298711
  } catch {
298605
298712
  process.stderr.write(`Failed to log out.
298606
298713
  `);
298607
298714
  process.exit(1);
298608
298715
  }
298609
- process.stdout.write(`Successfully logged out from your Verboo account.
298716
+ process.stdout.write(`Successfully logged out from your Verboo account locally.
298610
298717
  `);
298718
+ if (result.remoteRevocation === "unconfirmed") {
298719
+ process.stderr.write(`Could not confirm server-side session revocation. Your local credentials were removed.
298720
+ `);
298721
+ }
298722
+ if (result.externalTokenSource) {
298723
+ process.stderr.write(`A credential from ${result.externalTokenSource} is still active in this shell. Remove it before starting Verboo again.
298724
+ `);
298725
+ }
298611
298726
  process.exit(0);
298612
298727
  }
298613
298728
  async function authLoginHeadless() {
@@ -298662,7 +298777,10 @@ Código não informado. Cancelado.
298662
298777
  }
298663
298778
  function readOneLine() {
298664
298779
  return new Promise((resolve21) => {
298665
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
298780
+ const rl = readline.createInterface({
298781
+ input: process.stdin,
298782
+ output: process.stdout
298783
+ });
298666
298784
  rl.once("line", (line) => {
298667
298785
  rl.close();
298668
298786
  resolve21(line);
@@ -393739,7 +393857,7 @@ function getAnthropicEnvMetadata() {
393739
393857
  function getBuildAgeMinutes() {
393740
393858
  if (false)
393741
393859
  ;
393742
- const buildTime = new Date("2026-07-11T18:19:10.579Z").getTime();
393860
+ const buildTime = new Date("2026-07-14T19:32:10.376Z").getTime();
393743
393861
  if (isNaN(buildTime))
393744
393862
  return;
393745
393863
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -402428,12 +402546,31 @@ var init_marketplaceHelpers = __esm(() => {
402428
402546
  });
402429
402547
 
402430
402548
  // src/utils/plugins/officialMarketplace.ts
402431
- var OFFICIAL_MARKETPLACE_SOURCE, OFFICIAL_MARKETPLACE_NAME = "claude-plugins-official";
402549
+ function nativeMarketplacePriority(name) {
402550
+ const normalizedName = name.toLowerCase();
402551
+ const index = NATIVE_MARKETPLACES.findIndex((marketplace) => marketplace.name === normalizedName);
402552
+ return index === -1 ? Number.MAX_SAFE_INTEGER : index;
402553
+ }
402554
+ var VERBOO_MARKETPLACE_NAME = "verboo-plugins", VERBOO_MARKETPLACE_URL = "https://code.verboo.ai/api/plugins/marketplace.json", VERBOO_MARKETPLACE_SOURCE, CLAUDE_MARKETPLACE_NAME = "claude-plugins-official", CLAUDE_MARKETPLACE_SOURCE, NATIVE_MARKETPLACES;
402432
402555
  var init_officialMarketplace = __esm(() => {
402433
- OFFICIAL_MARKETPLACE_SOURCE = {
402556
+ VERBOO_MARKETPLACE_SOURCE = {
402557
+ source: "url",
402558
+ url: VERBOO_MARKETPLACE_URL
402559
+ };
402560
+ CLAUDE_MARKETPLACE_SOURCE = {
402434
402561
  source: "github",
402435
402562
  repo: "anthropics/claude-plugins-official"
402436
402563
  };
402564
+ NATIVE_MARKETPLACES = [
402565
+ {
402566
+ name: VERBOO_MARKETPLACE_NAME,
402567
+ source: VERBOO_MARKETPLACE_SOURCE
402568
+ },
402569
+ {
402570
+ name: CLAUDE_MARKETPLACE_NAME,
402571
+ source: CLAUDE_MARKETPLACE_SOURCE
402572
+ }
402573
+ ];
402437
402574
  });
402438
402575
 
402439
402576
  // src/utils/plugins/officialMarketplaceGcs.ts
@@ -402575,12 +402712,13 @@ function getDeclaredMarketplaces() {
402575
402712
  ...getInitialSettings().enabledPlugins ?? {}
402576
402713
  };
402577
402714
  for (const [pluginId, value] of Object.entries(enabledPlugins)) {
402578
- if (value && parsePluginIdentifier(pluginId).marketplace === OFFICIAL_MARKETPLACE_NAME) {
402579
- implicit[OFFICIAL_MARKETPLACE_NAME] = {
402580
- source: OFFICIAL_MARKETPLACE_SOURCE,
402715
+ const marketplaceName = parsePluginIdentifier(pluginId).marketplace;
402716
+ const nativeMarketplace = NATIVE_MARKETPLACES.find((marketplace) => marketplace.name === marketplaceName);
402717
+ if (value && nativeMarketplace) {
402718
+ implicit[nativeMarketplace.name] = {
402719
+ source: nativeMarketplace.source,
402581
402720
  sourceIsFallback: true
402582
402721
  };
402583
- break;
402584
402722
  }
402585
402723
  }
402586
402724
  return {
@@ -403553,7 +403691,7 @@ async function refreshAllMarketplaces() {
403553
403691
  if (entry.source.source === "settings") {
403554
403692
  continue;
403555
403693
  }
403556
- if (name === OFFICIAL_MARKETPLACE_NAME) {
403694
+ if (name === CLAUDE_MARKETPLACE_NAME) {
403557
403695
  const sha = await fetchOfficialMarketplaceFromGcs(entry.installLocation, getMarketplacesCacheDir());
403558
403696
  if (sha !== null) {
403559
403697
  config2[name].lastUpdated = new Date().toISOString();
@@ -403601,7 +403739,7 @@ async function refreshMarketplace(name, onProgress, options2) {
403601
403739
  throw new Error(`Marketplace '${name}' has a corrupted installLocation ` + `(${installLocation}) — expected a path inside ${cacheDir}. ` + `This can happen after cross-platform path writes or manual edits ` + `to known_marketplaces.json. ` + `Run: claude plugin marketplace remove "${name}" and re-add it.`);
403602
403740
  }
403603
403741
  }
403604
- if (name === OFFICIAL_MARKETPLACE_NAME) {
403742
+ if (name === CLAUDE_MARKETPLACE_NAME) {
403605
403743
  const sha = await fetchOfficialMarketplaceFromGcs(installLocation, getMarketplacesCacheDir());
403606
403744
  if (sha !== null) {
403607
403745
  config2[name] = { ...entry, lastUpdated: new Date().toISOString() };
@@ -421974,7 +422112,7 @@ function buildPrimarySection() {
421974
422112
  });
421975
422113
  return [{
421976
422114
  label: "Version",
421977
- value: "0.12.0"
422115
+ value: "0.13.1"
421978
422116
  }, {
421979
422117
  label: "Session name",
421980
422118
  value: nameValue
@@ -434903,7 +435041,7 @@ function getReleaseTagUrl(version2 = publicBuildVersion) {
434903
435041
  return `${VERBOO_RELEASES_URL}/tag/v${normalizePublicVersion(version2)}`;
434904
435042
  }
434905
435043
  function getPublicBuildVersion() {
434906
- return "0.12.0";
435044
+ return "0.13.1";
434907
435045
  }
434908
435046
  var import_semver10, VERBOO_RELEASES_URL = "https://github.com/verbeux-ai/code/releases", fallbackBuildVersion, publicBuildVersion;
434909
435047
  var init_version = __esm(() => {
@@ -438257,6 +438395,10 @@ function normalizeExtension(ext) {
438257
438395
  return trimmed.startsWith(".") ? trimmed : `.${trimmed}`;
438258
438396
  }
438259
438397
  function sortCandidates(a2, b) {
438398
+ const priorityA = nativeMarketplacePriority(a2.marketplaceName);
438399
+ const priorityB = nativeMarketplacePriority(b.marketplaceName);
438400
+ if (priorityA !== priorityB)
438401
+ return priorityA - priorityB;
438260
438402
  if (a2.isOfficial && !b.isOfficial)
438261
438403
  return -1;
438262
438404
  if (!a2.isOfficial && b.isOfficial)
@@ -438357,6 +438499,7 @@ var init_lspRecommendation = __esm(() => {
438357
438499
  init_installedPluginsManager();
438358
438500
  init_marketplaceManager();
438359
438501
  init_schemas5();
438502
+ init_officialMarketplace();
438360
438503
  });
438361
438504
 
438362
438505
  // src/utils/plugins/officialMarketplaceStartupCheck.ts
@@ -438387,12 +438530,129 @@ function shouldRetryInstallation(config3) {
438387
438530
  }
438388
438531
  return failReason === "unknown" || failReason === "git_unavailable" || failReason === "gcs_unavailable" || failReason === undefined;
438389
438532
  }
438533
+ function shouldRetryNativeMarketplaceInstallation(state2) {
438534
+ if (!state2?.attempted)
438535
+ return true;
438536
+ if ((state2.retryCount ?? 0) >= RETRY_CONFIG.MAX_ATTEMPTS)
438537
+ return false;
438538
+ if (state2.failReason === "policy_blocked")
438539
+ return false;
438540
+ if (state2.nextRetryTime && Date.now() < state2.nextRetryTime)
438541
+ return false;
438542
+ return true;
438543
+ }
438544
+ function saveNativeMarketplaceAutoInstallState(name, update) {
438545
+ saveGlobalConfig((current) => ({
438546
+ ...current,
438547
+ nativeMarketplaceAutoInstall: {
438548
+ ...current.nativeMarketplaceAutoInstall,
438549
+ [name]: {
438550
+ ...current.nativeMarketplaceAutoInstall?.[name],
438551
+ ...update
438552
+ }
438553
+ }
438554
+ }));
438555
+ }
438556
+ async function checkAndInstallVerbooMarketplace() {
438557
+ const config3 = getGlobalConfig();
438558
+ const state2 = config3.nativeMarketplaceAutoInstall?.[VERBOO_MARKETPLACE_NAME];
438559
+ try {
438560
+ const knownMarketplaces = await loadKnownMarketplacesConfig();
438561
+ if (knownMarketplaces[VERBOO_MARKETPLACE_NAME]) {
438562
+ saveNativeMarketplaceAutoInstallState(VERBOO_MARKETPLACE_NAME, {
438563
+ attempted: true,
438564
+ installed: true,
438565
+ failReason: undefined,
438566
+ retryCount: undefined,
438567
+ lastAttemptTime: undefined,
438568
+ nextRetryTime: undefined
438569
+ });
438570
+ return { installed: false, skipped: true, reason: "already_installed" };
438571
+ }
438572
+ if (!shouldRetryNativeMarketplaceInstallation(state2)) {
438573
+ return {
438574
+ installed: false,
438575
+ skipped: true,
438576
+ reason: state2?.failReason ?? "already_attempted"
438577
+ };
438578
+ }
438579
+ if (isOfficialMarketplaceAutoInstallDisabled()) {
438580
+ saveNativeMarketplaceAutoInstallState(VERBOO_MARKETPLACE_NAME, {
438581
+ attempted: true,
438582
+ installed: false,
438583
+ failReason: "policy_blocked"
438584
+ });
438585
+ return { installed: false, skipped: true, reason: "policy_blocked" };
438586
+ }
438587
+ if (!isSourceAllowedByPolicy(VERBOO_MARKETPLACE_SOURCE)) {
438588
+ saveNativeMarketplaceAutoInstallState(VERBOO_MARKETPLACE_NAME, {
438589
+ attempted: true,
438590
+ installed: false,
438591
+ failReason: "policy_blocked"
438592
+ });
438593
+ return { installed: false, skipped: true, reason: "policy_blocked" };
438594
+ }
438595
+ logForDebugging("Attempting to auto-install Verboo marketplace");
438596
+ await addMarketplaceSource(VERBOO_MARKETPLACE_SOURCE);
438597
+ saveNativeMarketplaceAutoInstallState(VERBOO_MARKETPLACE_NAME, {
438598
+ attempted: true,
438599
+ installed: true,
438600
+ failReason: undefined,
438601
+ retryCount: undefined,
438602
+ lastAttemptTime: undefined,
438603
+ nextRetryTime: undefined
438604
+ });
438605
+ logEvent("tengu_official_marketplace_auto_install", {
438606
+ installed: true,
438607
+ skipped: false,
438608
+ verboo_marketplace: true
438609
+ });
438610
+ return { installed: true, skipped: false };
438611
+ } catch (error42) {
438612
+ const retryCount = (state2?.retryCount ?? 0) + 1;
438613
+ const now2 = Date.now();
438614
+ let configSaveFailed = false;
438615
+ try {
438616
+ saveNativeMarketplaceAutoInstallState(VERBOO_MARKETPLACE_NAME, {
438617
+ attempted: true,
438618
+ installed: false,
438619
+ failReason: "unknown",
438620
+ retryCount,
438621
+ lastAttemptTime: now2,
438622
+ nextRetryTime: now2 + calculateNextRetryDelay(retryCount)
438623
+ });
438624
+ } catch (saveError) {
438625
+ configSaveFailed = true;
438626
+ logError2(toError(saveError));
438627
+ }
438628
+ logForDebugging(`Failed to auto-install Verboo marketplace: ${error42 instanceof Error ? error42.message : String(error42)}`, { level: "error" });
438629
+ logError2(toError(error42));
438630
+ logEvent("tengu_official_marketplace_auto_install", {
438631
+ installed: false,
438632
+ skipped: true,
438633
+ failed: true,
438634
+ verboo_marketplace: true,
438635
+ retry_count: retryCount
438636
+ });
438637
+ return {
438638
+ installed: false,
438639
+ skipped: true,
438640
+ reason: "unknown",
438641
+ configSaveFailed
438642
+ };
438643
+ }
438644
+ }
438645
+ async function checkAndInstallNativeMarketplaces() {
438646
+ const verboo = await checkAndInstallVerbooMarketplace();
438647
+ const claude = await checkAndInstallOfficialMarketplace();
438648
+ return { verboo, claude };
438649
+ }
438390
438650
  async function checkAndInstallOfficialMarketplace() {
438391
438651
  const config3 = getGlobalConfig();
438392
438652
  try {
438393
438653
  const knownMarketplaces = await loadKnownMarketplacesConfig();
438394
- if (knownMarketplaces[OFFICIAL_MARKETPLACE_NAME]) {
438395
- logForDebugging(`Official marketplace '${OFFICIAL_MARKETPLACE_NAME}' already installed, skipping`);
438654
+ if (knownMarketplaces[CLAUDE_MARKETPLACE_NAME]) {
438655
+ logForDebugging(`Official marketplace '${CLAUDE_MARKETPLACE_NAME}' already installed, skipping`);
438396
438656
  saveGlobalConfig((current) => ({
438397
438657
  ...current,
438398
438658
  officialMarketplaceAutoInstallAttempted: true,
@@ -438424,7 +438684,7 @@ async function checkAndInstallOfficialMarketplace() {
438424
438684
  });
438425
438685
  return { installed: false, skipped: true, reason: "policy_blocked" };
438426
438686
  }
438427
- if (!isSourceAllowedByPolicy(OFFICIAL_MARKETPLACE_SOURCE)) {
438687
+ if (!isSourceAllowedByPolicy(CLAUDE_MARKETPLACE_SOURCE)) {
438428
438688
  logForDebugging("Official marketplace blocked by enterprise policy, skipping");
438429
438689
  saveGlobalConfig((current) => ({
438430
438690
  ...current,
@@ -438440,12 +438700,12 @@ async function checkAndInstallOfficialMarketplace() {
438440
438700
  return { installed: false, skipped: true, reason: "policy_blocked" };
438441
438701
  }
438442
438702
  const cacheDir = getMarketplacesCacheDir();
438443
- const installLocation = join116(cacheDir, OFFICIAL_MARKETPLACE_NAME);
438703
+ const installLocation = join116(cacheDir, CLAUDE_MARKETPLACE_NAME);
438444
438704
  const gcsSha = await fetchOfficialMarketplaceFromGcs(installLocation, cacheDir);
438445
438705
  if (gcsSha !== null) {
438446
438706
  const known = await loadKnownMarketplacesConfig();
438447
- known[OFFICIAL_MARKETPLACE_NAME] = {
438448
- source: OFFICIAL_MARKETPLACE_SOURCE,
438707
+ known[CLAUDE_MARKETPLACE_NAME] = {
438708
+ source: CLAUDE_MARKETPLACE_SOURCE,
438449
438709
  installLocation,
438450
438710
  lastUpdated: new Date().toISOString()
438451
438711
  };
@@ -438526,7 +438786,7 @@ async function checkAndInstallOfficialMarketplace() {
438526
438786
  };
438527
438787
  }
438528
438788
  logForDebugging("Attempting to auto-install official marketplace");
438529
- await addMarketplaceSource(OFFICIAL_MARKETPLACE_SOURCE);
438789
+ await addMarketplaceSource(CLAUDE_MARKETPLACE_SOURCE);
438530
438790
  logForDebugging("Successfully auto-installed official marketplace");
438531
438791
  const previousRetryCount = config3.officialMarketplaceAutoInstallRetryCount || 0;
438532
438792
  saveGlobalConfig((current) => ({
@@ -448657,11 +448917,15 @@ function BrowseMarketplace({
448657
448917
  }
448658
448918
  }
448659
448919
  marketplaceInfos.sort((a2, b) => {
448920
+ const priorityA = nativeMarketplacePriority(a2.name);
448921
+ const priorityB = nativeMarketplacePriority(b.name);
448922
+ if (priorityA !== priorityB)
448923
+ return priorityA - priorityB;
448660
448924
  if (a2.name === "claude-plugin-directory")
448661
448925
  return -1;
448662
448926
  if (b.name === "claude-plugin-directory")
448663
448927
  return 1;
448664
- return 0;
448928
+ return a2.name.localeCompare(b.name);
448665
448929
  });
448666
448930
  setMarketplaces(marketplaceInfos);
448667
448931
  const successCount = count2(marketplaces_0, (m) => m.data !== null);
@@ -449410,7 +449674,7 @@ function BrowseMarketplace({
449410
449674
  dimColor: true,
449411
449675
  children: " (installed)"
449412
449676
  }),
449413
- installCounts && selectedMarketplace === OFFICIAL_MARKETPLACE_NAME && /* @__PURE__ */ jsx_runtime244.jsxs(ThemedText, {
449677
+ installCounts && selectedMarketplace === CLAUDE_MARKETPLACE_NAME && /* @__PURE__ */ jsx_runtime244.jsxs(ThemedText, {
449414
449678
  dimColor: true,
449415
449679
  children: [
449416
449680
  " · ",
@@ -449585,6 +449849,10 @@ function DiscoverPlugins({
449585
449849
  setInstallCounts(counts);
449586
449850
  if (counts) {
449587
449851
  uninstalledPlugins.sort((a_0, b_0) => {
449852
+ const priorityA = nativeMarketplacePriority(a_0.marketplaceName);
449853
+ const priorityB = nativeMarketplacePriority(b_0.marketplaceName);
449854
+ if (priorityA !== priorityB)
449855
+ return priorityA - priorityB;
449588
449856
  const countA = counts.get(a_0.pluginId) ?? 0;
449589
449857
  const countB = counts.get(b_0.pluginId) ?? 0;
449590
449858
  if (countA !== countB)
@@ -449592,11 +449860,23 @@ function DiscoverPlugins({
449592
449860
  return a_0.entry.name.localeCompare(b_0.entry.name);
449593
449861
  });
449594
449862
  } else {
449595
- uninstalledPlugins.sort((a_1, b_1) => a_1.entry.name.localeCompare(b_1.entry.name));
449863
+ uninstalledPlugins.sort((a_1, b_1) => {
449864
+ const priorityA = nativeMarketplacePriority(a_1.marketplaceName);
449865
+ const priorityB = nativeMarketplacePriority(b_1.marketplaceName);
449866
+ if (priorityA !== priorityB)
449867
+ return priorityA - priorityB;
449868
+ return a_1.entry.name.localeCompare(b_1.entry.name);
449869
+ });
449596
449870
  }
449597
449871
  } catch (error_0) {
449598
449872
  logForDebugging(`Failed to fetch install counts: ${errorMessage(error_0)}`);
449599
- uninstalledPlugins.sort((a2, b) => a2.entry.name.localeCompare(b.entry.name));
449873
+ uninstalledPlugins.sort((a2, b) => {
449874
+ const priorityA = nativeMarketplacePriority(a2.marketplaceName);
449875
+ const priorityB = nativeMarketplacePriority(b.marketplaceName);
449876
+ if (priorityA !== priorityB)
449877
+ return priorityA - priorityB;
449878
+ return a2.entry.name.localeCompare(b.entry.name);
449879
+ });
449600
449880
  }
449601
449881
  setAvailablePlugins(uninstalledPlugins);
449602
449882
  const configuredCount = Object.keys(config3).length;
@@ -450130,7 +450410,7 @@ function DiscoverPlugins({
450130
450410
  dimColor: true,
450131
450411
  children: " [Community Managed]"
450132
450412
  }),
450133
- installCounts && plugin_5.marketplaceName === OFFICIAL_MARKETPLACE_NAME && /* @__PURE__ */ jsx_runtime245.jsxs(ThemedText, {
450413
+ installCounts && plugin_5.marketplaceName === CLAUDE_MARKETPLACE_NAME && /* @__PURE__ */ jsx_runtime245.jsxs(ThemedText, {
450134
450414
  dimColor: true,
450135
450415
  children: [
450136
450416
  " · ",
@@ -450610,6 +450890,10 @@ function ManageMarketplaces({
450610
450890
  });
450611
450891
  }
450612
450892
  states.sort((a2, b) => {
450893
+ const priorityA = nativeMarketplacePriority(a2.name);
450894
+ const priorityB = nativeMarketplacePriority(b.name);
450895
+ if (priorityA !== priorityB)
450896
+ return priorityA - priorityB;
450613
450897
  if (a2.name === "claude-plugin-directory")
450614
450898
  return -1;
450615
450899
  if (b.name === "claude-plugin-directory")
@@ -450754,6 +451038,10 @@ function ManageMarketplaces({
450754
451038
  });
450755
451039
  }
450756
451040
  newStates.sort((a2, b) => {
451041
+ const priorityA = nativeMarketplacePriority(a2.name);
451042
+ const priorityB = nativeMarketplacePriority(b.name);
451043
+ if (priorityA !== priorityB)
451044
+ return priorityA - priorityB;
450757
451045
  if (a2.name === "claude-plugin-directory")
450758
451046
  return -1;
450759
451047
  if (b.name === "claude-plugin-directory")
@@ -451321,13 +451609,13 @@ function ManageMarketplaces({
451321
451609
  strikethrough: state2.pendingRemove,
451322
451610
  dimColor: state2.pendingRemove,
451323
451611
  children: [
451324
- state2.name === "claude-plugins-official" && /* @__PURE__ */ jsx_runtime246.jsx(ThemedText, {
451325
- color: "claude",
451612
+ state2.name === VERBOO_MARKETPLACE_NAME && /* @__PURE__ */ jsx_runtime246.jsx(ThemedText, {
451613
+ color: "suggestion",
451326
451614
  children: "✻ "
451327
451615
  }),
451328
451616
  state2.name,
451329
- state2.name === "claude-plugins-official" && /* @__PURE__ */ jsx_runtime246.jsx(ThemedText, {
451330
- color: "claude",
451617
+ state2.name === VERBOO_MARKETPLACE_NAME && /* @__PURE__ */ jsx_runtime246.jsx(ThemedText, {
451618
+ color: "suggestion",
451331
451619
  children: " ✻"
451332
451620
  })
451333
451621
  ]
@@ -451567,6 +451855,7 @@ var init_ManageMarketplaces = __esm(() => {
451567
451855
  init_cacheUtils();
451568
451856
  init_marketplaceHelpers();
451569
451857
  init_marketplaceManager();
451858
+ init_officialMarketplace();
451570
451859
  init_pluginAutoupdate();
451571
451860
  init_pluginLoader();
451572
451861
  init_schemas5();
@@ -453214,6 +453503,10 @@ function ManagePlugins({
453214
453503
  });
453215
453504
  }
453216
453505
  marketplaceInfos.sort((a2, b) => {
453506
+ const priorityA = nativeMarketplacePriority(a2.name);
453507
+ const priorityB = nativeMarketplacePriority(b.name);
453508
+ if (priorityA !== priorityB)
453509
+ return priorityA - priorityB;
453217
453510
  if (a2.name === "claude-plugin-directory")
453218
453511
  return -1;
453219
453512
  if (b.name === "claude-plugin-directory")
@@ -454790,6 +455083,7 @@ var init_ManagePlugins = __esm(() => {
454790
455083
  init_cacheUtils();
454791
455084
  init_installedPluginsManager();
454792
455085
  init_marketplaceManager();
455086
+ init_officialMarketplace();
454793
455087
  init_mcpbHandler();
454794
455088
  init_pluginDirectories();
454795
455089
  init_pluginFlagging();
@@ -472078,7 +472372,7 @@ __export(exports_thinkback, {
472078
472372
  import { readFile as readFile42 } from "fs/promises";
472079
472373
  import { join as join123 } from "path";
472080
472374
  function getMarketplaceName() {
472081
- return OFFICIAL_MARKETPLACE_NAME;
472375
+ return CLAUDE_MARKETPLACE_NAME;
472082
472376
  }
472083
472377
  function getMarketplaceRepo() {
472084
472378
  return OFFICIAL_MARKETPLACE_REPO;
@@ -472662,7 +472956,7 @@ __export(exports_thinkback_play, {
472662
472956
  });
472663
472957
  import { join as join124 } from "path";
472664
472958
  function getPluginId2() {
472665
- const marketplaceName = process.env.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
472959
+ const marketplaceName = process.env.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : CLAUDE_MARKETPLACE_NAME;
472666
472960
  return `thinkback@${marketplaceName}`;
472667
472961
  }
472668
472962
  async function call48() {
@@ -486006,7 +486300,7 @@ var init_bridge_kick = __esm(() => {
486006
486300
  var call63 = async () => {
486007
486301
  return {
486008
486302
  type: "text",
486009
- value: `${"99.0.0"} (built ${"2026-07-11T18:19:10.579Z"})`
486303
+ value: `${"99.0.0"} (built ${"2026-07-14T19:32:10.376Z"})`
486010
486304
  };
486011
486305
  }, version2, version_default;
486012
486306
  var init_version2 = __esm(() => {
@@ -494878,6 +495172,7 @@ var exports_voiceStreamSTT = {};
494878
495172
  __export(exports_voiceStreamSTT, {
494879
495173
  isVoiceStreamAvailable: () => isVoiceStreamAvailable,
494880
495174
  connectVoiceStream: () => connectVoiceStream,
495175
+ VOICE_SESSION_LIMIT_MS: () => VOICE_SESSION_LIMIT_MS,
494881
495176
  FINALIZE_TIMEOUTS_MS: () => FINALIZE_TIMEOUTS_MS
494882
495177
  });
494883
495178
  function isVoiceStreamAvailable() {
@@ -495111,7 +495406,7 @@ async function connectVoiceStream(callbacks, options2) {
495111
495406
  });
495112
495407
  return connection;
495113
495408
  }
495114
- var KEEPALIVE_MSG = '{"type":"keepalive"}', END_STREAM_MSG = '{"type":"end"}', KEEPALIVE_INTERVAL_MS = 8000, PCM16_BYTES_PER_SECOND, MIN_AUDIO_FRAME_BYTES, MAX_AUDIO_FRAME_BYTES, FINALIZE_TIMEOUTS_MS;
495409
+ var KEEPALIVE_MSG = '{"type":"keepalive"}', END_STREAM_MSG = '{"type":"end"}', KEEPALIVE_INTERVAL_MS = 8000, VOICE_SESSION_LIMIT_MS = 180000, PCM16_BYTES_PER_SECOND, MIN_AUDIO_FRAME_BYTES, MAX_AUDIO_FRAME_BYTES, FINALIZE_TIMEOUTS_MS;
495115
495410
  var init_voiceStreamSTT = __esm(() => {
495116
495411
  init_wrapper();
495117
495412
  init_oauth();
@@ -515825,6 +516120,12 @@ function validateOfficialNameSource(name, source) {
515825
516120
  if (!ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(normalizedName)) {
515826
516121
  return null;
515827
516122
  }
516123
+ if (normalizedName === VERBOO_MARKETPLACE_NAME) {
516124
+ if (source.source === "url" && source.url === VERBOO_MARKETPLACE_URL) {
516125
+ return null;
516126
+ }
516127
+ return `The name '${name}' is reserved for the Verboo marketplace and can only use '${VERBOO_MARKETPLACE_URL}'.`;
516128
+ }
515828
516129
  if (source.source === "github") {
515829
516130
  const repo = source.repo || "";
515830
516131
  if (!repo.toLowerCase().startsWith(`${OFFICIAL_GITHUB_ORG}/`)) {
@@ -515854,6 +516155,7 @@ var init_schemas5 = __esm(() => {
515854
516155
  init_v4();
515855
516156
  init_hooks5();
515856
516157
  init_types2();
516158
+ init_officialMarketplace();
515857
516159
  ALLOWED_OFFICIAL_MARKETPLACE_NAMES = new Set([
515858
516160
  "claude-code-marketplace",
515859
516161
  "claude-code-plugins",
@@ -515862,7 +516164,8 @@ var init_schemas5 = __esm(() => {
515862
516164
  "anthropic-plugins",
515863
516165
  "agent-skills",
515864
516166
  "life-sciences",
515865
- "knowledge-work-plugins"
516167
+ "knowledge-work-plugins",
516168
+ VERBOO_MARKETPLACE_NAME
515866
516169
  ]);
515867
516170
  NO_AUTO_UPDATE_OFFICIAL_MARKETPLACES = new Set(["knowledge-work-plugins"]);
515868
516171
  BLOCKED_OFFICIAL_NAME_PATTERN = /(?:official[^a-z0-9]*(anthropic|claude)|(?:anthropic|claude)[^a-z0-9]*official|^(?:anthropic|claude)[^a-z0-9]*(marketplace|plugins|official))/i;
@@ -516094,7 +516397,7 @@ var init_schemas5 = __esm(() => {
516094
516397
  exports_external.object({
516095
516398
  source: exports_external.literal("settings"),
516096
516399
  name: MarketplaceNameSchema().refine((name) => !ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(name.toLowerCase()), {
516097
- message: "Reserved official marketplace names cannot be used with settings sources. " + "validateOfficialNameSource only accepts github/git sources from anthropics/* " + "for these names; a settings source would be rejected after " + "loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."
516400
+ message: "Reserved official marketplace names cannot be used with settings sources. " + "validateOfficialNameSource only accepts the respective native source " + "for these names; a settings source would be rejected after " + "loadAndCacheMarketplace has already written to disk with cleanupNeeded=false."
516098
516401
  }).describe("Marketplace name. Must match the extraKnownMarketplaces key (enforced); " + "the synthetic manifest is written under this name. Same validation " + "as PluginMarketplaceSchema plus reserved-name rejection — " + "validateOfficialNameSource runs after the disk write, too late to clean up."),
516099
516402
  plugins: exports_external.array(SettingsMarketplacePluginSchema()).describe("Plugin entries declared inline in settings.json"),
516100
516403
  owner: PluginAuthorSchema().optional()
@@ -519070,7 +519373,7 @@ function printStartupScreen(modelOverride) {
519070
519373
  const home = process.env.HOME || process.env.USERPROFILE || "";
519071
519374
  const cwd2 = process.cwd();
519072
519375
  const displayCwd = home && cwd2.startsWith(home) ? `~${cwd2.slice(home.length)}` : cwd2;
519073
- const version3 = "0.12.0";
519376
+ const version3 = "0.13.1";
519074
519377
  const bold2 = `${ESC4}1m`;
519075
519378
  const PURPLE = rgb3(...ACCENT);
519076
519379
  const SOFT = rgb3(...CREAM);
@@ -537362,7 +537665,7 @@ var init_routerRateLimitHook = __esm(() => {
537362
537665
  function getSemverPart(version3) {
537363
537666
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
537364
537667
  }
537365
- function useUpdateNotification(updatedVersion, initialVersion = "0.12.0") {
537668
+ function useUpdateNotification(updatedVersion, initialVersion = "0.13.1") {
537366
537669
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react225.useState(() => getSemverPart(initialVersion));
537367
537670
  const [pendingNotification2, setPendingNotification] = import_react225.useState(null);
537368
537671
  if (updatedVersion) {
@@ -537402,7 +537705,7 @@ function AutoUpdater({
537402
537705
  return;
537403
537706
  }
537404
537707
  if (false) {}
537405
- const currentVersion = "0.12.0";
537708
+ const currentVersion = "0.13.1";
537406
537709
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
537407
537710
  let latestVersion = await getLatestVersion(channel2);
537408
537711
  const isDisabled = isAutoUpdaterDisabled();
@@ -537755,17 +538058,17 @@ function PackageManagerAutoUpdater(t0) {
537755
538058
  const maxVersion = await getMaxVersion();
537756
538059
  if (maxVersion && latest && gt(latest, maxVersion)) {
537757
538060
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
537758
- if (gte("0.12.0", maxVersion)) {
537759
- logForDebugging(`PackageManagerAutoUpdater: current version ${"0.12.0"} is already at or above maxVersion ${maxVersion}, skipping update`);
538061
+ if (gte("0.13.1", maxVersion)) {
538062
+ logForDebugging(`PackageManagerAutoUpdater: current version ${"0.13.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
537760
538063
  setUpdateAvailable(false);
537761
538064
  return;
537762
538065
  }
537763
538066
  latest = maxVersion;
537764
538067
  }
537765
- const hasUpdate = latest && !gte("0.12.0", latest) && !shouldSkipVersion(latest);
538068
+ const hasUpdate = latest && !gte("0.13.1", latest) && !shouldSkipVersion(latest);
537766
538069
  setUpdateAvailable(!!hasUpdate);
537767
538070
  if (hasUpdate) {
537768
- logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.12.0"} -> ${latest}`);
538071
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${"0.13.1"} -> ${latest}`);
537769
538072
  }
537770
538073
  };
537771
538074
  $2[0] = t1;
@@ -537799,7 +538102,7 @@ function PackageManagerAutoUpdater(t0) {
537799
538102
  wrap: "truncate",
537800
538103
  children: [
537801
538104
  "currentVersion: ",
537802
- "0.12.0"
538105
+ "0.13.1"
537803
538106
  ]
537804
538107
  });
537805
538108
  $2[3] = verbose;
@@ -553750,10 +554053,10 @@ async function autoUpdateCliInBackground() {
553750
554053
  return;
553751
554054
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
553752
554055
  const latest = await getLatestVersion(channel2);
553753
- if (!latest || gte("0.12.0", latest))
554056
+ if (!latest || gte("0.13.1", latest))
553754
554057
  return;
553755
554058
  writeToStdout(`
553756
- Nova versão disponível: ${latest} (atual: ${"0.12.0"})
554059
+ Nova versão disponível: ${latest} (atual: ${"0.13.1"})
553757
554060
  `);
553758
554061
  writeToStdout(`Atualizando automaticamente...
553759
554062
  `);
@@ -559378,7 +559681,7 @@ function useOfficialMarketplaceNotification() {
559378
559681
  useStartupNotification(_temp201);
559379
559682
  }
559380
559683
  async function _temp201() {
559381
- const result = await checkAndInstallOfficialMarketplace();
559684
+ const { verboo: result } = await checkAndInstallNativeMarketplaces();
559382
559685
  const notifs = [];
559383
559686
  if (result.configSaveFailed) {
559384
559687
  logForDebugging("Showing marketplace config save failure notification");
@@ -559398,7 +559701,7 @@ async function _temp201() {
559398
559701
  key: "marketplace-installed",
559399
559702
  jsx: /* @__PURE__ */ jsx_runtime448.jsx(ThemedText, {
559400
559703
  color: "success",
559401
- children: "✓ Anthropic marketplace installed · /plugin to see available plugins"
559704
+ children: "✓ Marketplace Verboo instalada · /plugin para ver os plugins"
559402
559705
  }),
559403
559706
  priority: "immediate",
559404
559707
  timeoutMs: 7000
@@ -559410,7 +559713,7 @@ async function _temp201() {
559410
559713
  key: "marketplace-install-failed",
559411
559714
  jsx: /* @__PURE__ */ jsx_runtime448.jsx(ThemedText, {
559412
559715
  color: "warning",
559413
- children: "Failed to install Anthropic marketplace · Will retry on next startup"
559716
+ children: "Não foi possível instalar a marketplace Verboo · Tentaremos novamente ao iniciar"
559414
559717
  }),
559415
559718
  priority: "immediate",
559416
559719
  timeoutMs: 8000
@@ -559706,14 +560009,14 @@ async function isOfficialMarketplaceInstalled() {
559706
560009
  return _isOfficialMarketplaceInstalledCache;
559707
560010
  }
559708
560011
  const config3 = await loadKnownMarketplacesConfigSafe();
559709
- _isOfficialMarketplaceInstalledCache = OFFICIAL_MARKETPLACE_NAME in config3;
560012
+ _isOfficialMarketplaceInstalledCache = CLAUDE_MARKETPLACE_NAME in config3;
559710
560013
  return _isOfficialMarketplaceInstalledCache;
559711
560014
  }
559712
560015
  async function isMarketplacePluginRelevant(pluginName, context2, signals2) {
559713
560016
  if (!await isOfficialMarketplaceInstalled()) {
559714
560017
  return false;
559715
560018
  }
559716
- if (isPluginInstalled(`${pluginName}@${OFFICIAL_MARKETPLACE_NAME}`)) {
560019
+ if (isPluginInstalled(`${pluginName}@${CLAUDE_MARKETPLACE_NAME}`)) {
559717
560020
  return false;
559718
560021
  }
559719
560022
  const { bashTools } = context2 ?? {};
@@ -560110,7 +560413,7 @@ var init_tipRegistry = __esm(() => {
560110
560413
  content: async (ctx) => {
560111
560414
  const blue2 = color("suggestion", ctx.theme);
560112
560415
  return `Working with HTML/CSS? Install the frontend-design plugin:
560113
- ${blue2(`/plugin install frontend-design@${OFFICIAL_MARKETPLACE_NAME}`)}`;
560416
+ ${blue2(`/plugin install frontend-design@${CLAUDE_MARKETPLACE_NAME}`)}`;
560114
560417
  },
560115
560418
  cooldownSessions: 3,
560116
560419
  isRelevant: async (context2) => isMarketplacePluginRelevant("frontend-design", context2, {
@@ -560122,7 +560425,7 @@ ${blue2(`/plugin install frontend-design@${OFFICIAL_MARKETPLACE_NAME}`)}`;
560122
560425
  content: async (ctx) => {
560123
560426
  const blue2 = color("suggestion", ctx.theme);
560124
560427
  return `Working with Vercel? Install the vercel plugin:
560125
- ${blue2(`/plugin install vercel@${OFFICIAL_MARKETPLACE_NAME}`)}`;
560428
+ ${blue2(`/plugin install vercel@${CLAUDE_MARKETPLACE_NAME}`)}`;
560126
560429
  },
560127
560430
  cooldownSessions: 3,
560128
560431
  isRelevant: async (context2) => isMarketplacePluginRelevant("vercel", context2, {
@@ -565091,6 +565394,7 @@ function useVoice({
565091
565394
  const onErrorRef = import_react317.useRef(onError);
565092
565395
  const cleanupTimerRef = import_react317.useRef(null);
565093
565396
  const releaseTimerRef = import_react317.useRef(null);
565397
+ const sessionLimitTimerRef = import_react317.useRef(null);
565094
565398
  const seenRepeatRef = import_react317.useRef(false);
565095
565399
  const repeatFallbackTimerRef = import_react317.useRef(null);
565096
565400
  const focusTriggeredRef = import_react317.useRef(false);
@@ -565127,6 +565431,10 @@ function useVoice({
565127
565431
  clearTimeout(releaseTimerRef.current);
565128
565432
  releaseTimerRef.current = null;
565129
565433
  }
565434
+ if (sessionLimitTimerRef.current) {
565435
+ clearTimeout(sessionLimitTimerRef.current);
565436
+ sessionLimitTimerRef.current = null;
565437
+ }
565130
565438
  if (repeatFallbackTimerRef.current) {
565131
565439
  clearTimeout(repeatFallbackTimerRef.current);
565132
565440
  repeatFallbackTimerRef.current = null;
@@ -565152,6 +565460,10 @@ function useVoice({
565152
565460
  function finishRecording() {
565153
565461
  logForDebugging("[voice] finishRecording: stopping recording, transitioning to processing");
565154
565462
  attemptGenRef.current++;
565463
+ if (sessionLimitTimerRef.current) {
565464
+ clearTimeout(sessionLimitTimerRef.current);
565465
+ sessionLimitTimerRef.current = null;
565466
+ }
565155
565467
  const focusTriggered = focusTriggeredRef.current;
565156
565468
  focusTriggeredRef.current = false;
565157
565469
  updateState("processing");
@@ -565279,6 +565591,14 @@ function useVoice({
565279
565591
  focusFlushedCharsRef.current = 0;
565280
565592
  everConnectedRef.current = false;
565281
565593
  const myGen = ++sessionGenRef.current;
565594
+ sessionLimitTimerRef.current = setTimeout((sessionLimitTimerRef2, stateRef2, onErrorRef2, finishRecording2) => {
565595
+ sessionLimitTimerRef2.current = null;
565596
+ if (stateRef2.current !== "recording")
565597
+ return;
565598
+ logForDebugging("[voice] 180-second session limit reached");
565599
+ onErrorRef2.current?.("Voice session reached the 180-second limit and was stopped.");
565600
+ finishRecording2();
565601
+ }, VOICE_SESSION_LIMIT_MS, sessionLimitTimerRef, stateRef, onErrorRef, finishRecording);
565282
565602
  const availability = await voiceModule.checkRecordingAvailability();
565283
565603
  if (!availability.available) {
565284
565604
  logForDebugging(`[voice] Recording not available: ${availability.reason ?? "unknown"}`);
@@ -571430,7 +571750,7 @@ function WelcomeV2() {
571430
571750
  dimColor: true,
571431
571751
  children: [
571432
571752
  "v",
571433
- "0.12.0",
571753
+ "0.13.1",
571434
571754
  " "
571435
571755
  ]
571436
571756
  })
@@ -571617,7 +571937,7 @@ function WelcomeV2() {
571617
571937
  dimColor: true,
571618
571938
  children: [
571619
571939
  "v",
571620
- "0.12.0",
571940
+ "0.13.1",
571621
571941
  " "
571622
571942
  ]
571623
571943
  })
@@ -571833,7 +572153,7 @@ function AppleTerminalWelcomeV2(t0) {
571833
572153
  dimColor: true,
571834
572154
  children: [
571835
572155
  "v",
571836
- "0.12.0",
572156
+ "0.13.1",
571837
572157
  " "
571838
572158
  ]
571839
572159
  });
@@ -572042,7 +572362,7 @@ function AppleTerminalWelcomeV2(t0) {
572042
572362
  dimColor: true,
572043
572363
  children: [
572044
572364
  "v",
572045
- "0.12.0",
572365
+ "0.13.1",
572046
572366
  " "
572047
572367
  ]
572048
572368
  });
@@ -589444,7 +589764,7 @@ __export(exports_update, {
589444
589764
  });
589445
589765
  async function update() {
589446
589766
  logEvent("tengu_update_check", {});
589447
- writeToStdout(`Current version: ${"0.12.0"}
589767
+ writeToStdout(`Current version: ${"0.13.1"}
589448
589768
  `);
589449
589769
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
589450
589770
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -589529,8 +589849,8 @@ async function update() {
589529
589849
  writeToStdout(`Verboo Code is managed by Homebrew.
589530
589850
  `);
589531
589851
  const latest = await getLatestVersion(channel2);
589532
- if (latest && !gte("0.12.0", latest)) {
589533
- writeToStdout(`Update available: ${"0.12.0"} → ${latest}
589852
+ if (latest && !gte("0.13.1", latest)) {
589853
+ writeToStdout(`Update available: ${"0.13.1"} → ${latest}
589534
589854
  `);
589535
589855
  writeToStdout(`
589536
589856
  `);
@@ -589546,8 +589866,8 @@ async function update() {
589546
589866
  writeToStdout(`Verboo Code is managed by winget.
589547
589867
  `);
589548
589868
  const latest = await getLatestVersion(channel2);
589549
- if (latest && !gte("0.12.0", latest)) {
589550
- writeToStdout(`Update available: ${"0.12.0"} → ${latest}
589869
+ if (latest && !gte("0.13.1", latest)) {
589870
+ writeToStdout(`Update available: ${"0.13.1"} → ${latest}
589551
589871
  `);
589552
589872
  writeToStdout(`
589553
589873
  `);
@@ -589563,8 +589883,8 @@ async function update() {
589563
589883
  writeToStdout(`Verboo Code is managed by apk.
589564
589884
  `);
589565
589885
  const latest = await getLatestVersion(channel2);
589566
- if (latest && !gte("0.12.0", latest)) {
589567
- writeToStdout(`Update available: ${"0.12.0"} → ${latest}
589886
+ if (latest && !gte("0.13.1", latest)) {
589887
+ writeToStdout(`Update available: ${"0.13.1"} → ${latest}
589568
589888
  `);
589569
589889
  writeToStdout(`
589570
589890
  `);
@@ -589617,11 +589937,11 @@ async function update() {
589617
589937
  `);
589618
589938
  await gracefulShutdown(1);
589619
589939
  }
589620
- if (result.latestVersion === "0.12.0") {
589621
- writeToStdout(source_default.green(`Verboo Code is up to date (${"0.12.0"})`) + `
589940
+ if (result.latestVersion === "0.13.1") {
589941
+ writeToStdout(source_default.green(`Verboo Code is up to date (${"0.13.1"})`) + `
589622
589942
  `);
589623
589943
  } else {
589624
- writeToStdout(source_default.green(`Successfully updated from ${"0.12.0"} to version ${result.latestVersion}`) + `
589944
+ writeToStdout(source_default.green(`Successfully updated from ${"0.13.1"} to version ${result.latestVersion}`) + `
589625
589945
  `);
589626
589946
  await regenerateCompletionCache();
589627
589947
  }
@@ -589681,12 +590001,12 @@ async function update() {
589681
590001
  `);
589682
590002
  await gracefulShutdown(1);
589683
590003
  }
589684
- if (latestVersion === "0.12.0") {
589685
- writeToStdout(source_default.green(`Verboo Code is up to date (${"0.12.0"})`) + `
590004
+ if (latestVersion === "0.13.1") {
590005
+ writeToStdout(source_default.green(`Verboo Code is up to date (${"0.13.1"})`) + `
589686
590006
  `);
589687
590007
  await gracefulShutdown(0);
589688
590008
  }
589689
- writeToStdout(`New version available: ${latestVersion} (current: ${"0.12.0"})
590009
+ writeToStdout(`New version available: ${latestVersion} (current: ${"0.13.1"})
589690
590010
  `);
589691
590011
  writeToStdout(`Installing update...
589692
590012
  `);
@@ -589731,7 +590051,7 @@ async function update() {
589731
590051
  logForDebugging(`update: Installation status: ${status2}`);
589732
590052
  switch (status2) {
589733
590053
  case "success":
589734
- writeToStdout(source_default.green(`Successfully updated from ${"0.12.0"} to version ${latestVersion}`) + `
590054
+ writeToStdout(source_default.green(`Successfully updated from ${"0.13.1"} to version ${latestVersion}`) + `
589735
590055
  `);
589736
590056
  await regenerateCompletionCache();
589737
590057
  break;
@@ -590986,7 +591306,7 @@ ${customInstructions}` : customInstructions;
590986
591306
  is_native_binary: isInBundledMode()
590987
591307
  });
590988
591308
  logMemoryDiagnostics("start", {
590989
- version: "0.12.0",
591309
+ version: "0.13.1",
590990
591310
  debug: debug2,
590991
591311
  debugToStderr,
590992
591312
  print: print ?? false,
@@ -591797,7 +592117,7 @@ Usage: verboo --remote "your task description"`, () => gracefulShutdown(1));
591797
592117
  pendingHookMessages
591798
592118
  }, renderAndRun);
591799
592119
  }
591800
- }).version(`0.12.0 (${cliDesc})`, "-v, --version", "Output the version number");
592120
+ }).version(`0.13.1 (${cliDesc})`, "-v, --version", "Output the version number");
591801
592121
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
591802
592122
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
591803
592123
  if (canUserConfigureAdvisor()) {
@@ -592372,7 +592692,7 @@ if (false) {}
592372
592692
  async function main2() {
592373
592693
  const args = process.argv.slice(2);
592374
592694
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
592375
- console.log(`${"0.12.0"} (Verboo Code)`);
592695
+ console.log(`${"0.13.1"} (Verboo Code)`);
592376
592696
  return;
592377
592697
  }
592378
592698
  if (!IS_VERBOO_CLI && args.includes("--provider")) {
@@ -592546,4 +592866,4 @@ async function main2() {
592546
592866
  }
592547
592867
  main2();
592548
592868
 
592549
- //# debugId=41EDA8A085BA361164756E2164756E21
592869
+ //# debugId=D352A9BC9A72F93D64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verboo/code",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "Verboo Code — coding agent for the Verboo platform",
5
5
  "type": "module",
6
6
  "bin": {