theus-cli 0.2.37 → 0.2.39

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/cli.js +229 -135
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -58324,7 +58324,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
58324
58324
  if (isApiKeyHelperFromProjectOrLocalSettings()) {
58325
58325
  const hasTrust = checkHasTrustDialogAccepted();
58326
58326
  if (!hasTrust && !isNonInteractiveSession) {
58327
- const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58327
+ const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58328
58328
  logAntError("apiKeyHelper invoked before trust check", error40);
58329
58329
  logEvent("tengu_apiKeyHelper_missing_trust11", {});
58330
58330
  return null;
@@ -58368,7 +58368,7 @@ async function runAwsAuthRefresh() {
58368
58368
  if (isAwsAuthRefreshFromProjectSettings()) {
58369
58369
  const hasTrust = checkHasTrustDialogAccepted();
58370
58370
  if (!hasTrust && !getIsNonInteractiveSession()) {
58371
- const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58371
+ const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58372
58372
  logAntError("awsAuthRefresh invoked before trust check", error40);
58373
58373
  logEvent("tengu_awsAuthRefresh_missing_trust", {});
58374
58374
  return false;
@@ -58428,7 +58428,7 @@ async function getAwsCredsFromCredentialExport() {
58428
58428
  if (isAwsCredentialExportFromProjectSettings()) {
58429
58429
  const hasTrust = checkHasTrustDialogAccepted();
58430
58430
  if (!hasTrust && !getIsNonInteractiveSession()) {
58431
- const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58431
+ const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58432
58432
  logAntError("awsCredentialExport invoked before trust check", error40);
58433
58433
  logEvent("tengu_awsCredentialExport_missing_trust", {});
58434
58434
  return null;
@@ -58513,7 +58513,7 @@ async function runGcpAuthRefresh() {
58513
58513
  if (isGcpAuthRefreshFromProjectSettings()) {
58514
58514
  const hasTrust = checkHasTrustDialogAccepted();
58515
58515
  if (!hasTrust && !getIsNonInteractiveSession()) {
58516
- const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58516
+ const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
58517
58517
  logAntError("gcpAuthRefresh invoked before trust check", error40);
58518
58518
  logEvent("tengu_gcpAuthRefresh_missing_trust", {});
58519
58519
  return false;
@@ -59208,7 +59208,7 @@ var init_auth = __esm(() => {
59208
59208
 
59209
59209
  // utils/userAgent.ts
59210
59210
  function getTheusCodeUserAgent() {
59211
- return `theus-code/${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59211
+ return `theus-code/${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59212
59212
  }
59213
59213
 
59214
59214
  // utils/workloadContext.ts
@@ -59230,7 +59230,7 @@ function getUserAgent() {
59230
59230
  const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
59231
59231
  const workload = getWorkload();
59232
59232
  const workloadSuffix = workload ? `, workload/${workload}` : "";
59233
- return `theus-cli/${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (${process.env.USER_TYPE}, ${process.env.THEUS_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
59233
+ return `theus-cli/${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (${process.env.USER_TYPE}, ${process.env.THEUS_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
59234
59234
  }
59235
59235
  function getMCPUserAgent() {
59236
59236
  const parts = [];
@@ -59244,7 +59244,7 @@ function getMCPUserAgent() {
59244
59244
  parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
59245
59245
  }
59246
59246
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
59247
- return `theus-code/${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}${suffix}`;
59247
+ return `theus-code/${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}${suffix}`;
59248
59248
  }
59249
59249
  function getWebFetchUserAgent() {
59250
59250
  return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
@@ -59382,7 +59382,7 @@ var init_user = __esm(() => {
59382
59382
  deviceId,
59383
59383
  sessionId: getSessionId(),
59384
59384
  email: getEmail(),
59385
- appVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59385
+ appVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59386
59386
  platform: getHostPlatformForAnalytics(),
59387
59387
  organizationUuid,
59388
59388
  accountUuid,
@@ -61097,7 +61097,7 @@ var init_metadata = __esm(() => {
61097
61097
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
61098
61098
  WHITESPACE_REGEX = /\s+/;
61099
61099
  getVersionBase = memoize_default(() => {
61100
- const match = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
61100
+ const match = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
61101
61101
  return match ? match[0] : undefined;
61102
61102
  });
61103
61103
  buildEnvContext = memoize_default(async () => {
@@ -61137,9 +61137,9 @@ var init_metadata = __esm(() => {
61137
61137
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
61138
61138
  isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
61139
61139
  isTheusAiAuth: isTheusAISubscriber(),
61140
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
61140
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
61141
61141
  versionBase: getVersionBase(),
61142
- buildTime: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME,
61142
+ buildTime: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME,
61143
61143
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
61144
61144
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
61145
61145
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -61805,7 +61805,7 @@ function initialize1PEventLogging() {
61805
61805
  const platform2 = getPlatform();
61806
61806
  const attributes = {
61807
61807
  [ATTR_SERVICE_NAME]: "theus-code",
61808
- [ATTR_SERVICE_VERSION]: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61808
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61809
61809
  };
61810
61810
  if (platform2 === "wsl") {
61811
61811
  const wslVersion = getWslVersion();
@@ -61832,7 +61832,7 @@ function initialize1PEventLogging() {
61832
61832
  })
61833
61833
  ]
61834
61834
  });
61835
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61835
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61836
61836
  }
61837
61837
  async function reinitialize1PEventLoggingIfConfigChanged() {
61838
61838
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -63703,7 +63703,7 @@ function getAttributionHeader(fingerprint) {
63703
63703
  if (!isAttributionHeaderEnabled()) {
63704
63704
  return "";
63705
63705
  }
63706
- const version2 = `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}.${fingerprint}`;
63706
+ const version2 = `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}.${fingerprint}`;
63707
63707
  const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
63708
63708
  const cch = "";
63709
63709
  const workload = getWorkload();
@@ -107814,7 +107814,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
107814
107814
  }
107815
107815
  function getFeedbackGuideline() {
107816
107816
  if (isUsing3PServices()) {
107817
- return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`;
107817
+ return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`;
107818
107818
  }
107819
107819
  return "- When you cannot find an answer or the feature doesn't exist, direct the user to use /feedback to report a feature request or bug";
107820
107820
  }
@@ -166523,7 +166523,7 @@ function getTelemetryAttributes() {
166523
166523
  attributes["session.id"] = sessionId;
166524
166524
  }
166525
166525
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
166526
- attributes["app.version"] = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
166526
+ attributes["app.version"] = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
166527
166527
  }
166528
166528
  const oauthAccount = getOauthAccountInfo();
166529
166529
  if (oauthAccount) {
@@ -169446,7 +169446,60 @@ function formatLimitReachedText(limit, resetMessage, _model) {
169446
169446
  }
169447
169447
  return `You've hit your ${limit}${resetMessage}`;
169448
169448
  }
169449
- var FEEDBACK_CHANNEL_ANT = "#briarpatch-cc", RATE_LIMIT_ERROR_PREFIXES;
169449
+ function isGatewayQuotaExceededBody(body) {
169450
+ if (typeof body !== "object" || body === null)
169451
+ return false;
169452
+ const b = body;
169453
+ if (b.quota_exceeded === true)
169454
+ return true;
169455
+ const err2 = b.error;
169456
+ return typeof err2 === "object" && err2 !== null && err2.code === "quota_exceeded";
169457
+ }
169458
+ function asNonEmptyString(value) {
169459
+ if (typeof value === "string" && value.trim().length > 0)
169460
+ return value;
169461
+ if (typeof value === "number" && Number.isFinite(value))
169462
+ return String(value);
169463
+ return;
169464
+ }
169465
+ function isGatewayQuotaExceededMessage(text) {
169466
+ return text.startsWith(GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX);
169467
+ }
169468
+ function creditsFromBody(creditos, tt) {
169469
+ const direct = asNonEmptyString(creditos);
169470
+ if (direct)
169471
+ return direct;
169472
+ const ttStr = asNonEmptyString(tt);
169473
+ if (!ttStr)
169474
+ return;
169475
+ const ttNum = Number(ttStr);
169476
+ if (!Number.isFinite(ttNum))
169477
+ return;
169478
+ return String(Math.round(ttNum / 1000));
169479
+ }
169480
+ function getGatewayQuotaExceededMessage(body) {
169481
+ const pausePromise = "Sin sorpresas: al tope, Theus se pausa \u2014 jam\xE1s factura de m\xE1s.";
169482
+ const genericFallback = `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${THEUS_PRICING_URL} (anual = 2 meses gratis).`;
169483
+ if (!isGatewayQuotaExceededBody(body)) {
169484
+ return genericFallback;
169485
+ }
169486
+ const plan = asNonEmptyString(body.plan);
169487
+ const cuotaCreditos = creditsFromBody(body.creditos_cuota, body.cuota_tt);
169488
+ const reset3 = asNonEmptyString(body.reset);
169489
+ const url3 = asNonEmptyString(body.url) ?? THEUS_PRICING_URL;
169490
+ if (!plan || !cuotaCreditos || !reset3) {
169491
+ return `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
169492
+ }
169493
+ const base2 = `Llegaste al l\xEDmite de tu plan ${plan} (${cuotaCreditos} cr\xE9ditos) \xB7 se renueva ${reset3}. ${pausePromise}`;
169494
+ const upgradePlan = asNonEmptyString(body.upgrade?.plan);
169495
+ const upgradeCreditos = creditsFromBody(body.upgrade?.creditos, body.upgrade?.tt);
169496
+ const upgradePrecio = asNonEmptyString(body.upgrade?.precio);
169497
+ if (upgradePlan && upgradeCreditos && upgradePrecio) {
169498
+ return `${base2} \xBFNecesitas seguir hoy? ${upgradePlan} incluye ${upgradeCreditos} cr\xE9ditos por ${upgradePrecio} \u2192 ${url3} (anual = 2 meses gratis)`;
169499
+ }
169500
+ return `${base2} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
169501
+ }
169502
+ var FEEDBACK_CHANNEL_ANT = "#briarpatch-cc", RATE_LIMIT_ERROR_PREFIXES, THEUS_PRICING_URL = "https://theus.pe/precios", GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX = "Llegaste al l\xEDmite de tu plan";
169450
169503
  var init_rateLimitMessages = __esm(() => {
169451
169504
  init_auth();
169452
169505
  init_billing();
@@ -202536,7 +202589,7 @@ function getInstallationEnv() {
202536
202589
  return;
202537
202590
  }
202538
202591
  function getTheusCodeVersion() {
202539
- return { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
202592
+ return { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
202540
202593
  }
202541
202594
  async function getInstalledVSCodeExtensionVersion(command) {
202542
202595
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -204054,7 +204107,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
204054
204107
  if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
204055
204108
  const hasTrust = checkHasTrustDialogAccepted();
204056
204109
  if (!hasTrust) {
204057
- const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
204110
+ const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
204058
204111
  logAntError("MCP headersHelper invoked before trust check", error40);
204059
204112
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
204060
204113
  return null;
@@ -205264,7 +205317,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
205264
205317
  const client2 = new Client({
205265
205318
  name: "theus-code",
205266
205319
  title: "Theus",
205267
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ?? "unknown",
205320
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ?? "unknown",
205268
205321
  description: "Theus's agentic coding tool",
205269
205322
  websiteUrl: PRODUCT_URL
205270
205323
  }, {
@@ -205618,7 +205671,7 @@ var init_client5 = __esm(() => {
205618
205671
  const client2 = new Client({
205619
205672
  name: "theus-code",
205620
205673
  title: "Theus",
205621
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ?? "unknown",
205674
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ?? "unknown",
205622
205675
  description: "Theus's agentic coding tool",
205623
205676
  websiteUrl: PRODUCT_URL
205624
205677
  }, {
@@ -216196,7 +216249,7 @@ async function initializeBetaTracing(resource) {
216196
216249
  });
216197
216250
  logs.setGlobalLoggerProvider(loggerProvider);
216198
216251
  setLoggerProvider(loggerProvider);
216199
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216252
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216200
216253
  setEventLogger(eventLogger);
216201
216254
  process.on("beforeExit", async () => {
216202
216255
  await loggerProvider?.forceFlush();
@@ -216236,7 +216289,7 @@ async function initializeTelemetry() {
216236
216289
  const platform4 = getPlatform();
216237
216290
  const baseAttributes = {
216238
216291
  [ATTR_SERVICE_NAME]: "theus-code",
216239
- [ATTR_SERVICE_VERSION]: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
216292
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
216240
216293
  };
216241
216294
  if (platform4 === "wsl") {
216242
216295
  const wslVersion = getWslVersion();
@@ -216281,7 +216334,7 @@ async function initializeTelemetry() {
216281
216334
  } catch {}
216282
216335
  };
216283
216336
  registerCleanup(shutdownTelemetry2);
216284
- return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216337
+ return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216285
216338
  }
216286
216339
  const meterProvider = new MeterProvider({
216287
216340
  resource,
@@ -216301,7 +216354,7 @@ async function initializeTelemetry() {
216301
216354
  });
216302
216355
  logs.setGlobalLoggerProvider(loggerProvider);
216303
216356
  setLoggerProvider(loggerProvider);
216304
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216357
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216305
216358
  setEventLogger(eventLogger);
216306
216359
  logForDebugging("[3P telemetry] Event logger set successfully");
216307
216360
  process.on("beforeExit", async () => {
@@ -216363,7 +216416,7 @@ Current timeout: ${timeoutMs}ms
216363
216416
  }
216364
216417
  };
216365
216418
  registerCleanup(shutdownTelemetry);
216366
- return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216419
+ return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216367
216420
  }
216368
216421
  async function flushTelemetry() {
216369
216422
  const meterProvider = getMeterProvider();
@@ -216903,7 +216956,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
216903
216956
  return "install_failed";
216904
216957
  }
216905
216958
  const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
216906
- const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
216959
+ const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${versionSpec}`], { cwd: getLocalInstallDir(), maxBuffer: 1e6 });
216907
216960
  if (result.code !== 0) {
216908
216961
  const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
216909
216962
  logError2(error40);
@@ -217049,9 +217102,9 @@ async function assertMinVersion() {
217049
217102
  if (false) {}
217050
217103
  try {
217051
217104
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
217052
- if (versionConfig.minVersion && lt({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, versionConfig.minVersion)) {
217105
+ if (versionConfig.minVersion && lt({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, versionConfig.minVersion)) {
217053
217106
  console.error(`
217054
- It looks like your version of Theus (${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}) needs an update.
217107
+ It looks like your version of Theus (${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}) needs an update.
217055
217108
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
217056
217109
 
217057
217110
  To update, please run:
@@ -217192,7 +217245,7 @@ async function getInstallationPrefix() {
217192
217245
  return prefixResult.stdout.trim();
217193
217246
  }
217194
217247
  function getGlobalInstallPackageManager() {
217195
- if ({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL === "theus-cli") {
217248
+ if ({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL === "theus-cli") {
217196
217249
  return "npm";
217197
217250
  }
217198
217251
  return env3.isRunningWithBun() ? "bun" : "npm";
@@ -217217,7 +217270,7 @@ async function checkGlobalInstallPermissions() {
217217
217270
  }
217218
217271
  async function getLatestVersion(channel2) {
217219
217272
  const npmTag = channel2 === "stable" ? "stable" : "latest";
217220
- const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
217273
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${npmTag}`, "version", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
217221
217274
  if (result.code !== 0) {
217222
217275
  logForDebugging(`npm view failed with code ${result.code}`);
217223
217276
  if (result.stderr) {
@@ -217233,7 +217286,7 @@ async function getLatestVersion(channel2) {
217233
217286
  return result.stdout.trim();
217234
217287
  }
217235
217288
  async function getNpmDistTags() {
217236
- const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
217289
+ const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL, "dist-tags", "--json", "--prefer-online"], { abortSignal: AbortSignal.timeout(5000), cwd: homedir18() });
217237
217290
  if (result.code !== 0) {
217238
217291
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
217239
217292
  return { latest: null, stable: null };
@@ -217273,7 +217326,7 @@ async function installGlobalPackage(specificVersion) {
217273
217326
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
217274
217327
  logEvent("tengu_auto_updater_lock_contention", {
217275
217328
  pid: process.pid,
217276
- currentVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217329
+ currentVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217277
217330
  });
217278
217331
  return "in_progress";
217279
217332
  }
@@ -217282,7 +217335,7 @@ async function installGlobalPackage(specificVersion) {
217282
217335
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
217283
217336
  logError2(new Error("Windows NPM detected in WSL environment"));
217284
217337
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
217285
- currentVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217338
+ currentVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217286
217339
  });
217287
217340
  console.error(`
217288
217341
  Error: Windows NPM detected in WSL
@@ -217301,7 +217354,7 @@ To fix this issue:
217301
217354
  if (!hasPermissions) {
217302
217355
  return "no_permissions";
217303
217356
  }
217304
- const packageSpec = specificVersion ? `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${specificVersion}` : { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL;
217357
+ const packageSpec = specificVersion ? `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${specificVersion}` : { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL;
217305
217358
  const packageManager = getGlobalInstallPackageManager();
217306
217359
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
217307
217360
  if (installResult.code !== 0) {
@@ -217629,8 +217682,8 @@ async function detectMultipleInstallations() {
217629
217682
  installations.push({ type: "npm-local", path: localPath });
217630
217683
  }
217631
217684
  const packagesToCheck = ["@theus-ai/theus-code"];
217632
- if ({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
217633
- packagesToCheck.push({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL);
217685
+ if ({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
217686
+ packagesToCheck.push({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL);
217634
217687
  }
217635
217688
  const npmResult = await execFileNoThrow("npm", [
217636
217689
  "-g",
@@ -217813,7 +217866,7 @@ function detectLinuxGlobPatternWarnings() {
217813
217866
  }
217814
217867
  async function getDoctorDiagnostic() {
217815
217868
  const installationType = await getCurrentInstallationType();
217816
- const version2 = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "unknown";
217869
+ const version2 = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "unknown";
217817
217870
  const installationPath = await getInstallationPath();
217818
217871
  const invokedBinary = getInvokedBinary();
217819
217872
  const multipleInstallations = await detectMultipleInstallations();
@@ -217825,8 +217878,8 @@ async function getDoctorDiagnostic() {
217825
217878
  for (const install of npmInstalls) {
217826
217879
  if (install.type === "npm-global") {
217827
217880
  let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
217828
- if ({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
217829
- uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`;
217881
+ if ({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
217882
+ uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`;
217830
217883
  }
217831
217884
  warnings.push({
217832
217885
  issue: `Leftover npm global installation at ${install.path}`,
@@ -217938,7 +217991,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217938
217991
  const startTime2 = Date.now();
217939
217992
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
217940
217993
  "view",
217941
- `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${tag2}`,
217994
+ `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${tag2}`,
217942
217995
  "version",
217943
217996
  "--prefer-online",
217944
217997
  "--registry",
@@ -217962,7 +218015,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217962
218015
  latency_ms: latencyMs,
217963
218016
  source_npm: true
217964
218017
  });
217965
- logForDebugging(`npm view ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${tag2} version: ${stdout}`);
218018
+ logForDebugging(`npm view ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${tag2} version: ${stdout}`);
217966
218019
  const latestVersion = stdout.trim();
217967
218020
  return latestVersion;
217968
218021
  }
@@ -218018,7 +218071,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218018
218071
  const fs3 = getFsImplementation();
218019
218072
  await fs3.rm(stagingPath, { recursive: true, force: true });
218020
218073
  const platform4 = getPlatform2();
218021
- const platformPackageName = `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}-${platform4}`;
218074
+ const platformPackageName = `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}-${platform4}`;
218022
218075
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
218023
218076
  const {
218024
218077
  stdout: integrityOutput,
@@ -218047,7 +218100,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218047
218100
  name: "theus-native-installer",
218048
218101
  version: "0.0.1",
218049
218102
  dependencies: {
218050
- [{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
218103
+ [{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
218051
218104
  }
218052
218105
  };
218053
218106
  const packageLock = {
@@ -218060,10 +218113,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218060
218113
  name: "theus-native-installer",
218061
218114
  version: "0.0.1",
218062
218115
  dependencies: {
218063
- [{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
218116
+ [{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
218064
218117
  }
218065
218118
  },
218066
- [`node_modules/${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}`]: {
218119
+ [`node_modules/${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}`]: {
218067
218120
  version: version2,
218068
218121
  optionalDependencies: {
218069
218122
  [platformPackageName]: version2
@@ -218085,7 +218138,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218085
218138
  if (result.code !== 0) {
218086
218139
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
218087
218140
  }
218088
- logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${version2}`);
218141
+ logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL}@${version2}`);
218089
218142
  }
218090
218143
  function getStallTimeoutMs() {
218091
218144
  return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -218748,8 +218801,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218748
218801
  const maxVersion = await getMaxVersion();
218749
218802
  if (maxVersion && gt(version2, maxVersion)) {
218750
218803
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
218751
- if (gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
218752
- logForDebugging(`Native installer: current version ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
218804
+ if (gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
218805
+ logForDebugging(`Native installer: current version ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
218753
218806
  logEvent("tengu_native_update_skipped_max_version", {
218754
218807
  latency_ms: Date.now() - startTime2,
218755
218808
  max_version: maxVersion,
@@ -218760,7 +218813,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218760
218813
  version2 = maxVersion;
218761
218814
  }
218762
218815
  }
218763
- if (!forceReinstall && version2 === { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION && await versionIsAvailable(version2) && await isPossibleTheusBinary(executablePath)) {
218816
+ if (!forceReinstall && version2 === { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION && await versionIsAvailable(version2) && await isPossibleTheusBinary(executablePath)) {
218764
218817
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
218765
218818
  logEvent("tengu_native_update_complete", {
218766
218819
  latency_ms: Date.now() - startTime2,
@@ -219510,8 +219563,8 @@ async function cleanupNpmInstallations() {
219510
219563
  } else if (codePackageResult.error) {
219511
219564
  errors4.push(codePackageResult.error);
219512
219565
  }
219513
- if ({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
219514
- const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL);
219566
+ if ({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL !== "@theus-ai/theus-code") {
219567
+ const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL);
219515
219568
  if (macroPackageResult.success) {
219516
219569
  removed++;
219517
219570
  if (macroPackageResult.warning) {
@@ -232144,6 +232197,14 @@ function AssistantTextMessage(t0) {
232144
232197
  }
232145
232198
  return t2;
232146
232199
  }
232200
+ if (isGatewayQuotaExceededMessage(text)) {
232201
+ return /* @__PURE__ */ jsx_runtime81.jsx(MessageResponse, {
232202
+ children: /* @__PURE__ */ jsx_runtime81.jsx(ThemedText, {
232203
+ color: "error",
232204
+ children: text
232205
+ })
232206
+ });
232207
+ }
232147
232208
  switch (text) {
232148
232209
  case NO_RESPONSE_REQUESTED: {
232149
232210
  return null;
@@ -304780,9 +304841,9 @@ function getTheusEnvMetadata() {
304780
304841
  };
304781
304842
  }
304782
304843
  function getBuildAgeMinutes() {
304783
- if (!{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME)
304844
+ if (!{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME)
304784
304845
  return;
304785
- const buildTime = new Date({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME).getTime();
304846
+ const buildTime = new Date({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME).getTime();
304786
304847
  if (isNaN(buildTime))
304787
304848
  return;
304788
304849
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -321308,6 +321369,12 @@ function getAssistantMessageFromError(error40, model, options2) {
321308
321369
  error: "rate_limit"
321309
321370
  });
321310
321371
  }
321372
+ if (error40 instanceof import_sdk10.APIError && error40.status === 429 && isGatewayQuotaExceededBody(error40.error)) {
321373
+ return createAssistantAPIErrorMessage({
321374
+ content: getGatewayQuotaExceededMessage(error40.error),
321375
+ error: "rate_limit"
321376
+ });
321377
+ }
321311
321378
  if (error40 instanceof import_sdk10.APIError && error40.status === 429 && shouldProcessRateLimits(isTheusAISubscriber())) {
321312
321379
  const rateLimitType = error40.headers?.get?.("theus-ratelimit-unified-representative-claim");
321313
321380
  const overageStatus = error40.headers?.get?.("theus-ratelimit-unified-overage-status");
@@ -321424,7 +321491,7 @@ function getAssistantMessageFromError(error40, model, options2) {
321424
321491
  if (process.env.USER_TYPE === "ant") {
321425
321492
  const baseMessage = `API Error: 400 ${error40.message}
321426
321493
 
321427
- Run /share and post the JSON file to ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`;
321494
+ Run /share and post the JSON file to ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`;
321428
321495
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
321429
321496
  return createAssistantAPIErrorMessage({
321430
321497
  content: baseMessage + rewindInstruction,
@@ -321460,7 +321527,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01
321460
321527
  if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
321461
321528
  const orgId = getOauthAccountInfo()?.organizationUuid;
321462
321529
  const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
321463
- const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.`;
321530
+ const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.`;
321464
321531
  return createAssistantAPIErrorMessage({
321465
321532
  content: msg,
321466
321533
  error: "invalid_request"
@@ -321693,6 +321760,7 @@ var init_errors6 = __esm(() => {
321693
321760
  init_analytics();
321694
321761
  init_theusAiLimits();
321695
321762
  init_rateLimitMocking();
321763
+ init_rateLimitMessages();
321696
321764
  init_errorUtils();
321697
321765
  import_sdk10 = __toESM(require_sdk(), 1);
321698
321766
  });
@@ -331564,7 +331632,7 @@ function buildPrimarySection() {
331564
331632
  });
331565
331633
  return [{
331566
331634
  label: "Version",
331567
- value: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
331635
+ value: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
331568
331636
  }, {
331569
331637
  label: "Session name",
331570
331638
  value: nameValue
@@ -335380,7 +335448,7 @@ function Config({
335380
335448
  }
335381
335449
  })
335382
335450
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime189.jsx(ChannelDowngradeDialog, {
335383
- currentVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
335451
+ currentVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
335384
335452
  onChoice: (choice) => {
335385
335453
  setShowSubmenu(null);
335386
335454
  setTabsHidden(false);
@@ -335392,7 +335460,7 @@ function Config({
335392
335460
  autoUpdatesChannel: "stable"
335393
335461
  };
335394
335462
  if (choice === "stay") {
335395
- newSettings.minimumVersion = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
335463
+ newSettings.minimumVersion = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
335396
335464
  }
335397
335465
  updateSettingsForSource("userSettings", newSettings);
335398
335466
  setSettingsData((prev_27) => ({
@@ -343426,7 +343494,7 @@ function HelpV2(t0) {
343426
343494
  let t6;
343427
343495
  if ($2[31] !== tabs) {
343428
343496
  t6 = /* @__PURE__ */ jsx_runtime216.jsx(Tabs, {
343429
- title: `Theus v${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
343497
+ title: `Theus v${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
343430
343498
  color: "professionalBlue",
343431
343499
  defaultTab: "general",
343432
343500
  children: tabs
@@ -360594,6 +360662,11 @@ var init_ApproveApiKey = __esm(() => {
360594
360662
  });
360595
360663
 
360596
360664
  // components/Theus/TheusBanner.tsx
360665
+ function hasActiveSession() {
360666
+ if (!isTheusAuthEnabled())
360667
+ return true;
360668
+ return getOauthAccountInfo() !== undefined;
360669
+ }
360597
360670
  function TheusBanner({ minimal, version: version2 }) {
360598
360671
  const [themeName] = useTheme();
360599
360672
  const theme = getTheme(themeName);
@@ -360610,16 +360683,30 @@ function TheusBanner({ minimal, version: version2 }) {
360610
360683
  showFrame: !isCompact
360611
360684
  }),
360612
360685
  /* @__PURE__ */ jsx_runtime245.jsxs(ThemedBox_default, {
360686
+ flexDirection: "column",
360613
360687
  marginTop: isCompact ? 1 : 0,
360614
360688
  paddingLeft: isCompact ? 0 : 1,
360615
360689
  children: [
360616
- /* @__PURE__ */ jsx_runtime245.jsx(ThemedText, {
360617
- bold: true,
360618
- color: theme.peru,
360619
- children: "THEUS CLI"
360690
+ /* @__PURE__ */ jsx_runtime245.jsxs(ThemedBox_default, {
360691
+ flexWrap: "wrap",
360692
+ children: [
360693
+ /* @__PURE__ */ jsx_runtime245.jsx(ThemedText, {
360694
+ bold: true,
360695
+ color: theme.peru,
360696
+ children: "THEUS CLI"
360697
+ }),
360698
+ version2 && /* @__PURE__ */ jsx_runtime245.jsx(Text, {
360699
+ children: ` \xB7 v${version2}`
360700
+ })
360701
+ ]
360620
360702
  }),
360621
360703
  /* @__PURE__ */ jsx_runtime245.jsx(Text, {
360622
- children: ` \xB7 MISI\xD3N LOCAL${version2 ? ` \xB7 v${version2}` : ""}`
360704
+ wrap: "wrap",
360705
+ children: "Tu plan incluye el cat\xE1logo frontier. TITAN elige el modelo; t\xFA diriges."
360706
+ }),
360707
+ !hasActiveSession() && /* @__PURE__ */ jsx_runtime245.jsx(ThemedText, {
360708
+ dimColor: true,
360709
+ children: "\xBFPrimera vez? Escribe theus login"
360623
360710
  })
360624
360711
  ]
360625
360712
  })
@@ -360630,6 +360717,7 @@ var import_react143, jsx_runtime245, FULL_MIN_COLUMNS = 96, FULL_MIN_ROWS = 32;
360630
360717
  var init_TheusBanner = __esm(() => {
360631
360718
  init_ink2();
360632
360719
  init_TerminalSizeContext();
360720
+ init_auth();
360633
360721
  init_theme();
360634
360722
  init_TheusLoginHero();
360635
360723
  import_react143 = __toESM(require_react(), 1);
@@ -361517,7 +361605,7 @@ function Onboarding({
361517
361605
  flexDirection: "column",
361518
361606
  children: [
361519
361607
  /* @__PURE__ */ jsx_runtime249.jsx(TheusBanner, {
361520
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
361608
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
361521
361609
  }),
361522
361610
  /* @__PURE__ */ jsx_runtime249.jsxs(ThemedBox_default, {
361523
361611
  flexDirection: "column",
@@ -361862,9 +361950,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
361862
361950
  return [];
361863
361951
  }
361864
361952
  }
361865
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
361953
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
361866
361954
  if (process.env.USER_TYPE === "ant") {
361867
- const changelog = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION_CHANGELOG;
361955
+ const changelog = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION_CHANGELOG;
361868
361956
  if (changelog) {
361869
361957
  const commits = changelog.trim().split(`
361870
361958
  `).filter(Boolean);
@@ -366066,7 +366154,7 @@ var init_Messages = __esm(() => {
366066
366154
  let t1;
366067
366155
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
366068
366156
  t1 = /* @__PURE__ */ jsx_runtime261.jsx(TheusSessionHeader, {
366069
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
366157
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
366070
366158
  });
366071
366159
  $2[0] = t1;
366072
366160
  } else {
@@ -380984,7 +381072,10 @@ async function gatewayJson(path19) {
380984
381072
  return null;
380985
381073
  }
380986
381074
  }
380987
- function fmt(n2) {
381075
+ function creditsFromTT(tt) {
381076
+ return Math.round(tt / 1000);
381077
+ }
381078
+ function fmtCr(n2) {
380988
381079
  return Math.round(n2).toLocaleString("es-PE");
380989
381080
  }
380990
381081
  function bar(pct, width = 24) {
@@ -381020,16 +381111,19 @@ var call38 = async () => {
381020
381111
  };
381021
381112
  }
381022
381113
  const plan = overview.plan;
381023
- const limit = Number(plan.tokens_included || 0);
381114
+ const limitTT = Number(plan.tokens_included || 0);
381024
381115
  const usedTT = Number(usage?.tokens_weighted || 0);
381025
- const pct = limit > 0 ? Math.min(100, usedTT / limit * 100) : 0;
381026
- const remaining = Math.max(0, limit - usedTT);
381116
+ const pct = limitTT > 0 ? Math.min(100, usedTT / limitTT * 100) : 0;
381117
+ const limitCr = typeof plan.creditos_incluidos === "number" ? plan.creditos_incluidos : creditsFromTT(limitTT);
381118
+ const usedCr = typeof plan.creditos_usados === "number" ? plan.creditos_usados : creditsFromTT(usedTT);
381119
+ const remainingCr = typeof plan.creditos_restantes === "number" ? plan.creditos_restantes : Math.max(0, limitCr - usedCr);
381027
381120
  const lines = [];
381028
381121
  lines.push(`\uD83D\uDCCA Tu consumo \u2014 plan ${plan.name || plan.id || "Theus"}`);
381029
381122
  lines.push("");
381030
381123
  lines.push(` ${bar(pct)} ${pct.toFixed(0)}%`);
381031
- lines.push(` ${fmt(usedTT)} / ${fmt(limit)} TT usados \xB7 quedan ${fmt(remaining)} TT`);
381124
+ lines.push(` ${fmtCr(usedCr)} / ${fmtCr(limitCr)} cr\xE9ditos usados \xB7 quedan ${fmtCr(remainingCr)} cr\xE9ditos`);
381032
381125
  lines.push(` Renueva el ${fmtDate2(Number(plan.period_end || 0))} (al llegar al tope se pausa, sin cobros sorpresa).`);
381126
+ lines.push(" (1 cr\xE9dito = 1.000 TT \u2014 puedes verificarlo t\xFA mismo)");
381033
381127
  const byModel = new Map;
381034
381128
  for (const e of usage?.events || []) {
381035
381129
  const m = e.model || "desconocido";
@@ -381041,7 +381135,7 @@ var call38 = async () => {
381041
381135
  lines.push(" Por modelo este ciclo:");
381042
381136
  for (const [model, tt] of rows.slice(0, 12)) {
381043
381137
  const share = usedTT > 0 ? tt / usedTT * 100 : 0;
381044
- lines.push(` \u2022 ${model.padEnd(22).slice(0, 22)} ${fmt(tt).padStart(10)} TT (${share.toFixed(0)}%)`);
381138
+ lines.push(` \u2022 ${model.padEnd(22).slice(0, 22)} ${fmtCr(creditsFromTT(tt)).padStart(8)} cr (${share.toFixed(0)}%)`);
381045
381139
  }
381046
381140
  if (rows.length > 12)
381047
381141
  lines.push(` \u2026 y ${rows.length - 12} modelos m\xE1s`);
@@ -381049,7 +381143,7 @@ var call38 = async () => {
381049
381143
  lines.push(" A\xFAn no has consumido nada este ciclo.");
381050
381144
  }
381051
381145
  lines.push("");
381052
- lines.push(" TITAN elige el mejor modelo por tarea; cada modelo consume de tu cuota TT");
381146
+ lines.push(" TITAN elige el mejor modelo por tarea; cada modelo consume de tu cuota");
381053
381147
  lines.push(" seg\xFAn su costo. Usa /modelos para ver el cat\xE1logo completo.");
381054
381148
  return { type: "text", value: lines.join(`
381055
381149
  `) };
@@ -381060,7 +381154,7 @@ var init_usage2 = __esm(() => {
381060
381154
  uso = {
381061
381155
  type: "local",
381062
381156
  name: "uso",
381063
- description: "Tu consumo de la suscripci\xF3n: cuota TT del ciclo, por modelo y renovaci\xF3n",
381157
+ description: "Tu consumo de la suscripci\xF3n: cr\xE9ditos del ciclo, por modelo y renovaci\xF3n",
381064
381158
  availability: ["theus-ai"],
381065
381159
  isEnabled: () => true,
381066
381160
  supportsNonInteractive: true,
@@ -394532,7 +394626,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
394532
394626
  smapsRollup,
394533
394627
  platform: process.platform,
394534
394628
  nodeVersion: process.version,
394535
- ccVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
394629
+ ccVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
394536
394630
  };
394537
394631
  }
394538
394632
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -395118,7 +395212,7 @@ var init_bridge_kick = __esm(() => {
395118
395212
  var call57 = async () => {
395119
395213
  return {
395120
395214
  type: "text",
395121
- value: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME ? `${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (built ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME})` : { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
395215
+ value: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME ? `${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (built ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME})` : { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
395122
395216
  };
395123
395217
  }, version2, version_default;
395124
395218
  var init_version = __esm(() => {
@@ -399560,13 +399654,13 @@ async function updateReleaseBundle() {
399560
399654
  await gracefulShutdown(1);
399561
399655
  return;
399562
399656
  }
399563
- if (gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399564
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
399657
+ if (gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399658
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
399565
399659
  `);
399566
399660
  await gracefulShutdown(0);
399567
399661
  return;
399568
399662
  }
399569
- writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
399663
+ writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
399570
399664
  `);
399571
399665
  writeToStdout(`Installing update from theus.pe/dl...
399572
399666
  `);
@@ -399600,7 +399694,7 @@ async function updateReleaseBundle() {
399600
399694
  return;
399601
399695
  }
399602
399696
  cpSync(staged, bundleDir, { recursive: true, force: true });
399603
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latest}`) + `
399697
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latest}`) + `
399604
399698
  `);
399605
399699
  await regenerateCompletionCache();
399606
399700
  } finally {
@@ -399613,7 +399707,7 @@ async function updateReleaseBundle() {
399613
399707
  async function update() {
399614
399708
  logEvent("tengu_update_check", {});
399615
399709
  await updateNaupa();
399616
- writeToStdout(`Current version: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
399710
+ writeToStdout(`Current version: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
399617
399711
  `);
399618
399712
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
399619
399713
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -399692,8 +399786,8 @@ async function update() {
399692
399786
  writeToStdout(`Theus is managed by Homebrew.
399693
399787
  `);
399694
399788
  const latest = await getLatestVersion(channel2);
399695
- if (latest && !gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399696
- writeToStdout(`Update available: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
399789
+ if (latest && !gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399790
+ writeToStdout(`Update available: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
399697
399791
  `);
399698
399792
  writeToStdout(`
399699
399793
  `);
@@ -399709,8 +399803,8 @@ async function update() {
399709
399803
  writeToStdout(`Theus is managed by winget.
399710
399804
  `);
399711
399805
  const latest = await getLatestVersion(channel2);
399712
- if (latest && !gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399713
- writeToStdout(`Update available: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
399806
+ if (latest && !gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399807
+ writeToStdout(`Update available: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
399714
399808
  `);
399715
399809
  writeToStdout(`
399716
399810
  `);
@@ -399726,8 +399820,8 @@ async function update() {
399726
399820
  writeToStdout(`Theus is managed by apk.
399727
399821
  `);
399728
399822
  const latest = await getLatestVersion(channel2);
399729
- if (latest && !gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399730
- writeToStdout(`Update available: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
399823
+ if (latest && !gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest)) {
399824
+ writeToStdout(`Update available: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} \u2192 ${latest}
399731
399825
  `);
399732
399826
  writeToStdout(`
399733
399827
  `);
@@ -399792,11 +399886,11 @@ async function update() {
399792
399886
  `);
399793
399887
  await gracefulShutdown(1);
399794
399888
  }
399795
- if (result.latestVersion === { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
399796
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
399889
+ if (result.latestVersion === { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
399890
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
399797
399891
  `);
399798
399892
  } else {
399799
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${result.latestVersion}`) + `
399893
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${result.latestVersion}`) + `
399800
399894
  `);
399801
399895
  await regenerateCompletionCache();
399802
399896
  }
@@ -399815,9 +399909,9 @@ async function update() {
399815
399909
  await removeInstalledSymlink();
399816
399910
  }
399817
399911
  logForDebugging("update: Checking npm registry for latest version");
399818
- logForDebugging(`update: Package URL: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`);
399912
+ logForDebugging(`update: Package URL: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`);
399819
399913
  const npmTag = channel2 === "stable" ? "stable" : "latest";
399820
- const npmCommand = `npm view ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${npmTag} version`;
399914
+ const npmCommand = `npm view ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${npmTag} version`;
399821
399915
  logForDebugging(`update: Running: ${npmCommand}`);
399822
399916
  const latestVersion = await getLatestVersion(channel2);
399823
399917
  logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
@@ -399837,7 +399931,7 @@ async function update() {
399837
399931
  `);
399838
399932
  process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
399839
399933
  `);
399840
- if ({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && !{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL.startsWith("@theus")) {
399934
+ if ({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && !{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL.startsWith("@theus")) {
399841
399935
  process.stderr.write(` \u2022 Internal/development build not published to npm
399842
399936
  `);
399843
399937
  }
@@ -399849,19 +399943,19 @@ async function update() {
399849
399943
  `);
399850
399944
  process.stderr.write(` \u2022 Run with --debug flag for more details
399851
399945
  `);
399852
- const packageName = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@theus-ai/theus-cli" : "@theus-ai/theus-code");
399946
+ const packageName = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL || (process.env.USER_TYPE === "ant" ? "@theus-ai/theus-cli" : "@theus-ai/theus-code");
399853
399947
  process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
399854
399948
  `);
399855
399949
  process.stderr.write(` \u2022 Check if you need to login: npm whoami
399856
399950
  `);
399857
399951
  await gracefulShutdown(1);
399858
399952
  }
399859
- if (gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latestVersion)) {
399860
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
399953
+ if (gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latestVersion)) {
399954
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
399861
399955
  `);
399862
399956
  await gracefulShutdown(0);
399863
399957
  }
399864
- writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
399958
+ writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
399865
399959
  `);
399866
399960
  writeToStdout(`Installing update...
399867
399961
  `);
@@ -399906,7 +400000,7 @@ async function update() {
399906
400000
  logForDebugging(`update: Installation status: ${status2}`);
399907
400001
  switch (status2) {
399908
400002
  case "success":
399909
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latestVersion}`) + `
400003
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latestVersion}`) + `
399910
400004
  `);
399911
400005
  await regenerateCompletionCache();
399912
400006
  break;
@@ -399916,7 +400010,7 @@ async function update() {
399916
400010
  if (useLocalUpdate) {
399917
400011
  process.stderr.write(`Try manually updating with:
399918
400012
  `);
399919
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}
400013
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}
399920
400014
  `);
399921
400015
  } else {
399922
400016
  process.stderr.write(`Try running with sudo or fix npm permissions
@@ -399932,7 +400026,7 @@ async function update() {
399932
400026
  if (useLocalUpdate) {
399933
400027
  process.stderr.write(`Try manually updating with:
399934
400028
  `);
399935
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}
400029
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}
399936
400030
  `);
399937
400031
  } else {
399938
400032
  process.stderr.write(`Or consider using native installation with: theus install
@@ -409009,7 +409103,7 @@ var init_sessionStorage = __esm(() => {
409009
409103
  init_settings2();
409010
409104
  init_slowOperations();
409011
409105
  init_uuid();
409012
- VERSION4 = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
409106
+ VERSION4 = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
409013
409107
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
409014
409108
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
409015
409109
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -410214,7 +410308,7 @@ var init_filesystem = __esm(() => {
410214
410308
  });
410215
410309
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
410216
410310
  const nonce = randomBytes21(16).toString("hex");
410217
- return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, nonce);
410311
+ return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, nonce);
410218
410312
  });
410219
410313
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
410220
410314
  });
@@ -415393,7 +415487,7 @@ function getSimpleDoingTasksSection() {
415393
415487
  ];
415394
415488
  const userHelpSubitems = [
415395
415489
  `/help: Get help with using Theus`,
415396
- `To give feedback, users should ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`
415490
+ `To give feedback, users should ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`
415397
415491
  ];
415398
415492
  const items = [
415399
415493
  `The user will primarily request you to perform software engineering tasks. These may include solving bugs, adding new functionality, refactoring code, explaining code, and more. When given an unclear or generic instruction, consider it in the context of these software engineering tasks and the current working directory. For example, if the user asks you to change "methodName" to snake case, do not reply with just "method_name", instead find the method in the code and modify the code.`,
@@ -416293,7 +416387,7 @@ function computeFingerprint(messageText, version3) {
416293
416387
  }
416294
416388
  function computeFingerprintFromMessages(messages) {
416295
416389
  const firstMessageText = extractFirstMessageText(messages);
416296
- return computeFingerprint(firstMessageText, { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
416390
+ return computeFingerprint(firstMessageText, { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
416297
416391
  }
416298
416392
  var FINGERPRINT_SALT = "59cf53e54c78";
416299
416393
  var init_fingerprint = () => {};
@@ -418853,7 +418947,7 @@ async function sideQuery(opts) {
418853
418947
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
418854
418948
  }
418855
418949
  const messageText = extractFirstUserMessageText(messages);
418856
- const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
418950
+ const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
418857
418951
  const attributionHeader = getAttributionHeader(fingerprint);
418858
418952
  const systemBlocks = [
418859
418953
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -420156,7 +420250,7 @@ async function handleMemories(state) {
420156
420250
  async function runProjectContextMcpServer() {
420157
420251
  const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
420158
420252
  const state = new ProjectContextState(projectRoot);
420159
- const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION }, { capabilities: { tools: {} } });
420253
+ const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION }, { capabilities: { tools: {} } });
420160
420254
  server2.setRequestHandler(ListToolsRequestSchema, async () => ({
420161
420255
  tools: TOOL_DEFINITIONS.map((t) => ({
420162
420256
  name: t.name,
@@ -422136,7 +422230,7 @@ function createBridgeLogger(options2) {
422136
422230
  connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
422137
422231
  regenerateQr(connectUrl);
422138
422232
  if (verbose) {
422139
- write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
422233
+ write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
422140
422234
  `);
422141
422235
  }
422142
422236
  if (verbose) {
@@ -423109,7 +423203,7 @@ function appendToLog(path19, message) {
423109
423203
  cwd: getFsImplementation().cwd(),
423110
423204
  userType: process.env.USER_TYPE,
423111
423205
  sessionId: getSessionId(),
423112
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
423206
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
423113
423207
  };
423114
423208
  getLogWriter(path19).write(messageWithTimestamp);
423115
423209
  }
@@ -424379,7 +424473,7 @@ Spawn mode for this project:
424379
424473
  const api2 = createBridgeApiClient({
424380
424474
  baseUrl,
424381
424475
  getAccessToken: getBridgeAccessToken2,
424382
- runnerVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
424476
+ runnerVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
424383
424477
  onDebug: logForDebugging,
424384
424478
  onAuth401: handleOAuth401Error2,
424385
424479
  getTrustedDeviceToken
@@ -424617,7 +424711,7 @@ async function runBridgeHeadless(opts, signal) {
424617
424711
  const api2 = createBridgeApiClient({
424618
424712
  baseUrl,
424619
424713
  getAccessToken: opts.getAccessToken,
424620
- runnerVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
424714
+ runnerVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
424621
424715
  onDebug: log2,
424622
424716
  onAuth401: opts.onAuth401,
424623
424717
  getTrustedDeviceToken
@@ -428681,7 +428775,7 @@ function buildSystemInitMessage(inputs) {
428681
428775
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
428682
428776
  apiKeySource: getTheusApiKeyWithSource().source,
428683
428777
  betas: getSdkBetas(),
428684
- theus_code_version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
428778
+ theus_code_version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
428685
428779
  output_style: outputStyle2,
428686
428780
  agents: inputs.agents.map((agent) => agent.agentType),
428687
428781
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -428721,8 +428815,8 @@ async function getEnvLessBridgeConfig() {
428721
428815
  }
428722
428816
  async function checkEnvLessBridgeMinVersion() {
428723
428817
  const cfg = await getEnvLessBridgeConfig();
428724
- if (cfg.min_version && lt({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, cfg.min_version)) {
428725
- return `Your version of Theus (${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}) is too old for Remote Control.
428818
+ if (cfg.min_version && lt({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, cfg.min_version)) {
428819
+ return `Your version of Theus (${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}) is too old for Remote Control.
428726
428820
  Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
428727
428821
  }
428728
428822
  return null;
@@ -431045,7 +431139,7 @@ async function initBridgeCore(params) {
431045
431139
  const rawApi = createBridgeApiClient({
431046
431140
  baseUrl,
431047
431141
  getAccessToken,
431048
- runnerVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
431142
+ runnerVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
431049
431143
  onDebug: logForDebugging,
431050
431144
  onAuth401,
431051
431145
  getTrustedDeviceToken
@@ -447786,7 +447880,7 @@ var init_useVoiceEnabled = __esm(() => {
447786
447880
  function getSemverPart(version3) {
447787
447881
  return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
447788
447882
  }
447789
- function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
447883
+ function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
447790
447884
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react231.useState(() => getSemverPart(initialVersion));
447791
447885
  if (!updatedVersion) {
447792
447886
  return null;
@@ -447826,7 +447920,7 @@ function AutoUpdater({
447826
447920
  return;
447827
447921
  }
447828
447922
  if (false) {}
447829
- const currentVersion = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
447923
+ const currentVersion = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
447830
447924
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
447831
447925
  let latestVersion = await getLatestVersion(channel2);
447832
447926
  const isDisabled2 = isAutoUpdaterDisabled();
@@ -447962,7 +448056,7 @@ function AutoUpdater({
447962
448056
  " ",
447963
448057
  /* @__PURE__ */ jsx_runtime406.jsx(ThemedText, {
447964
448058
  bold: true,
447965
- children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}` : `npm i -g ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`
448059
+ children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}` : `npm i -g ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}`
447966
448060
  })
447967
448061
  ]
447968
448062
  })
@@ -448039,12 +448133,12 @@ function NativeAutoUpdater({
448039
448133
  logEvent("tengu_native_auto_updater_start", {});
448040
448134
  try {
448041
448135
  const maxVersion = await getMaxVersion();
448042
- if (maxVersion && gt({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
448136
+ if (maxVersion && gt({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
448043
448137
  const msg = await getMaxVersionMessage();
448044
448138
  setMaxVersionIssue(msg ?? "affects your version");
448045
448139
  }
448046
448140
  const result = await installLatest(channel2);
448047
- const currentVersion = { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
448141
+ const currentVersion = { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
448048
448142
  const latencyMs = Date.now() - startTime2;
448049
448143
  if (result.lockFailed) {
448050
448144
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -448181,17 +448275,17 @@ function PackageManagerAutoUpdater(t0) {
448181
448275
  const maxVersion = await getMaxVersion();
448182
448276
  if (maxVersion && latest && gt(latest, maxVersion)) {
448183
448277
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
448184
- if (gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
448185
- logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
448278
+ if (gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, maxVersion)) {
448279
+ logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} is already at or above maxVersion ${maxVersion}, skipping update`);
448186
448280
  setUpdateAvailable(false);
448187
448281
  return;
448188
448282
  }
448189
448283
  latest = maxVersion;
448190
448284
  }
448191
- const hasUpdate = latest && !gte({ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest) && !shouldSkipVersion(latest);
448285
+ const hasUpdate = latest && !gte({ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latest) && !shouldSkipVersion(latest);
448192
448286
  setUpdateAvailable(!!hasUpdate);
448193
448287
  if (hasUpdate) {
448194
- logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} -> ${latest}`);
448288
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} -> ${latest}`);
448195
448289
  }
448196
448290
  };
448197
448291
  $2[0] = t1;
@@ -448225,7 +448319,7 @@ function PackageManagerAutoUpdater(t0) {
448225
448319
  wrap: "truncate",
448226
448320
  children: [
448227
448321
  "currentVersion: ",
448228
- { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
448322
+ { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
448229
448323
  ]
448230
448324
  });
448231
448325
  $2[3] = verbose;
@@ -456098,7 +456192,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
456098
456192
  project_dir: getOriginalCwd(),
456099
456193
  added_dirs: addedDirs
456100
456194
  },
456101
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
456195
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
456102
456196
  output_style: {
456103
456197
  name: outputStyleName
456104
456198
  },
@@ -467518,7 +467612,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
467518
467612
  } catch {}
467519
467613
  const data = {
467520
467614
  trigger,
467521
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
467615
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
467522
467616
  platform: process.platform,
467523
467617
  transcript,
467524
467618
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -480525,7 +480619,7 @@ function completeOnboarding() {
480525
480619
  saveGlobalConfig((current) => ({
480526
480620
  ...current,
480527
480621
  hasCompletedOnboarding: true,
480528
- lastOnboardingVersion: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
480622
+ lastOnboardingVersion: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
480529
480623
  }));
480530
480624
  }
480531
480625
  function showDialog(root2, renderer) {
@@ -491413,7 +491507,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
491413
491507
  setCwd(cwd3);
491414
491508
  const server2 = new Server({
491415
491509
  name: "theus/tengu",
491416
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
491510
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
491417
491511
  }, {
491418
491512
  capabilities: {
491419
491513
  tools: {}
@@ -492855,7 +492949,7 @@ async function setupTokenHandler(root2) {
492855
492949
  gap: 1,
492856
492950
  children: [
492857
492951
  /* @__PURE__ */ jsx_runtime493.jsx(TheusBanner, {
492858
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
492952
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
492859
492953
  }),
492860
492954
  showAuthWarning && /* @__PURE__ */ jsx_runtime493.jsxs(ThemedBox_default, {
492861
492955
  flexDirection: "column",
@@ -494337,7 +494431,7 @@ ${assistantAddendum}` : assistantAddendum;
494337
494431
  }
494338
494432
  }
494339
494433
  logForDiagnosticsNoPII("info", "started", {
494340
- version: { VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
494434
+ version: { VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
494341
494435
  is_native_binary: isInBundledMode()
494342
494436
  });
494343
494437
  registerCleanup(async () => {
@@ -495205,7 +495299,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
495205
495299
  pendingHookMessages
495206
495300
  }, renderAndRun);
495207
495301
  }
495208
- }).version(`${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`, "-v, --version", "Muestra el n\xFAmero de versi\xF3n");
495302
+ }).version(`${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`, "-v, --version", "Muestra el n\xFAmero de versi\xF3n");
495209
495303
  program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
495210
495304
  program2.option("--tmux", "Crea una sesi\xF3n de tmux para el worktree (requiere --worktree). Usa paneles nativos de iTerm2 cuando est\xE1n disponibles; usa --tmux=classic para tmux tradicional.");
495211
495305
  if (canUserConfigureAdvisor()) {
@@ -495757,7 +495851,7 @@ if (false) {}
495757
495851
  async function main2() {
495758
495852
  const args = process.argv.slice(2);
495759
495853
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
495760
- console.log(`${{ VERSION: "0.2.37", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`);
495854
+ console.log(`${{ VERSION: "0.2.39", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`);
495761
495855
  return;
495762
495856
  }
495763
495857
  const {