theus-cli 0.2.37 → 0.2.38

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 +197 -127
  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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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,42 @@ 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
+ return typeof body === "object" && body !== null && body.error === "quota_exceeded";
169451
+ }
169452
+ function asNonEmptyString(value) {
169453
+ if (typeof value === "string" && value.trim().length > 0)
169454
+ return value;
169455
+ if (typeof value === "number" && Number.isFinite(value))
169456
+ return String(value);
169457
+ return;
169458
+ }
169459
+ function isGatewayQuotaExceededMessage(text) {
169460
+ return text.startsWith(GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX);
169461
+ }
169462
+ function getGatewayQuotaExceededMessage(body) {
169463
+ const pausePromise = "Sin sorpresas: al tope, Theus se pausa \u2014 jam\xE1s factura de m\xE1s.";
169464
+ const genericFallback = `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${THEUS_PRICING_URL} (anual = 2 meses gratis).`;
169465
+ if (!isGatewayQuotaExceededBody(body)) {
169466
+ return genericFallback;
169467
+ }
169468
+ const plan = asNonEmptyString(body.plan);
169469
+ const cuotaTt = asNonEmptyString(body.cuota_tt);
169470
+ const reset3 = asNonEmptyString(body.reset);
169471
+ const url3 = asNonEmptyString(body.url) ?? THEUS_PRICING_URL;
169472
+ if (!plan || !cuotaTt || !reset3) {
169473
+ return `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
169474
+ }
169475
+ const base2 = `Llegaste al l\xEDmite de tu plan ${plan} (${cuotaTt} TT) \xB7 se renueva ${reset3}. ${pausePromise}`;
169476
+ const upgradePlan = asNonEmptyString(body.upgrade?.plan);
169477
+ const upgradeTt = asNonEmptyString(body.upgrade?.tt);
169478
+ const upgradePrecio = asNonEmptyString(body.upgrade?.precio);
169479
+ if (upgradePlan && upgradeTt && upgradePrecio) {
169480
+ return `${base2} \xBFNecesitas seguir hoy? ${upgradePlan} incluye ${upgradeTt} TT por ${upgradePrecio} \u2192 ${url3} (anual = 2 meses gratis)`;
169481
+ }
169482
+ return `${base2} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
169483
+ }
169484
+ 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
169485
  var init_rateLimitMessages = __esm(() => {
169451
169486
  init_auth();
169452
169487
  init_billing();
@@ -202536,7 +202571,7 @@ function getInstallationEnv() {
202536
202571
  return;
202537
202572
  }
202538
202573
  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;
202574
+ return { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
202575
  }
202541
202576
  async function getInstalledVSCodeExtensionVersion(command) {
202542
202577
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -204054,7 +204089,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
204054
204089
  if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
204055
204090
  const hasTrust = checkHasTrustDialogAccepted();
204056
204091
  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}.`);
204092
+ 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.38", BUILD_TIME: "1970-01-01T00:00:00.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
204093
  logAntError("MCP headersHelper invoked before trust check", error40);
204059
204094
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
204060
204095
  return null;
@@ -205264,7 +205299,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
205264
205299
  const client2 = new Client({
205265
205300
  name: "theus-code",
205266
205301
  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",
205302
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
205303
  description: "Theus's agentic coding tool",
205269
205304
  websiteUrl: PRODUCT_URL
205270
205305
  }, {
@@ -205618,7 +205653,7 @@ var init_client5 = __esm(() => {
205618
205653
  const client2 = new Client({
205619
205654
  name: "theus-code",
205620
205655
  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",
205656
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
205657
  description: "Theus's agentic coding tool",
205623
205658
  websiteUrl: PRODUCT_URL
205624
205659
  }, {
@@ -216196,7 +216231,7 @@ async function initializeBetaTracing(resource) {
216196
216231
  });
216197
216232
  logs.setGlobalLoggerProvider(loggerProvider);
216198
216233
  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);
216234
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
216235
  setEventLogger(eventLogger);
216201
216236
  process.on("beforeExit", async () => {
216202
216237
  await loggerProvider?.forceFlush();
@@ -216236,7 +216271,7 @@ async function initializeTelemetry() {
216236
216271
  const platform4 = getPlatform();
216237
216272
  const baseAttributes = {
216238
216273
  [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
216274
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
216275
  };
216241
216276
  if (platform4 === "wsl") {
216242
216277
  const wslVersion = getWslVersion();
@@ -216281,7 +216316,7 @@ async function initializeTelemetry() {
216281
216316
  } catch {}
216282
216317
  };
216283
216318
  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);
216319
+ return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
216320
  }
216286
216321
  const meterProvider = new MeterProvider({
216287
216322
  resource,
@@ -216301,7 +216336,7 @@ async function initializeTelemetry() {
216301
216336
  });
216302
216337
  logs.setGlobalLoggerProvider(loggerProvider);
216303
216338
  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);
216339
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
216340
  setEventLogger(eventLogger);
216306
216341
  logForDebugging("[3P telemetry] Event logger set successfully");
216307
216342
  process.on("beforeExit", async () => {
@@ -216363,7 +216398,7 @@ Current timeout: ${timeoutMs}ms
216363
216398
  }
216364
216399
  };
216365
216400
  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);
216401
+ return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
216402
  }
216368
216403
  async function flushTelemetry() {
216369
216404
  const meterProvider = getMeterProvider();
@@ -216903,7 +216938,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
216903
216938
  return "install_failed";
216904
216939
  }
216905
216940
  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 });
216941
+ const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
216942
  if (result.code !== 0) {
216908
216943
  const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
216909
216944
  logError2(error40);
@@ -217049,9 +217084,9 @@ async function assertMinVersion() {
217049
217084
  if (false) {}
217050
217085
  try {
217051
217086
  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)) {
217087
+ if (versionConfig.minVersion && lt({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217088
  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.
217089
+ It looks like your version of Theus (${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217090
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
217056
217091
 
217057
217092
  To update, please run:
@@ -217192,7 +217227,7 @@ async function getInstallationPrefix() {
217192
217227
  return prefixResult.stdout.trim();
217193
217228
  }
217194
217229
  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") {
217230
+ if ({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217231
  return "npm";
217197
217232
  }
217198
217233
  return env3.isRunningWithBun() ? "bun" : "npm";
@@ -217217,7 +217252,7 @@ async function checkGlobalInstallPermissions() {
217217
217252
  }
217218
217253
  async function getLatestVersion(channel2) {
217219
217254
  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() });
217255
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217256
  if (result.code !== 0) {
217222
217257
  logForDebugging(`npm view failed with code ${result.code}`);
217223
217258
  if (result.stderr) {
@@ -217233,7 +217268,7 @@ async function getLatestVersion(channel2) {
217233
217268
  return result.stdout.trim();
217234
217269
  }
217235
217270
  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() });
217271
+ const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217272
  if (result.code !== 0) {
217238
217273
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
217239
217274
  return { latest: null, stable: null };
@@ -217273,7 +217308,7 @@ async function installGlobalPackage(specificVersion) {
217273
217308
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
217274
217309
  logEvent("tengu_auto_updater_lock_contention", {
217275
217310
  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
217311
+ currentVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217312
  });
217278
217313
  return "in_progress";
217279
217314
  }
@@ -217282,7 +217317,7 @@ async function installGlobalPackage(specificVersion) {
217282
217317
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
217283
217318
  logError2(new Error("Windows NPM detected in WSL environment"));
217284
217319
  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
217320
+ currentVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217321
  });
217287
217322
  console.error(`
217288
217323
  Error: Windows NPM detected in WSL
@@ -217301,7 +217336,7 @@ To fix this issue:
217301
217336
  if (!hasPermissions) {
217302
217337
  return "no_permissions";
217303
217338
  }
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;
217339
+ const packageSpec = specificVersion ? `${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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
217340
  const packageManager = getGlobalInstallPackageManager();
217306
217341
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
217307
217342
  if (installResult.code !== 0) {
@@ -217629,8 +217664,8 @@ async function detectMultipleInstallations() {
217629
217664
  installations.push({ type: "npm-local", path: localPath });
217630
217665
  }
217631
217666
  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);
217667
+ if ({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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") {
217668
+ packagesToCheck.push({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217669
  }
217635
217670
  const npmResult = await execFileNoThrow("npm", [
217636
217671
  "-g",
@@ -217813,7 +217848,7 @@ function detectLinuxGlobPatternWarnings() {
217813
217848
  }
217814
217849
  async function getDoctorDiagnostic() {
217815
217850
  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";
217851
+ const version2 = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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
217852
  const installationPath = await getInstallationPath();
217818
217853
  const invokedBinary = getInvokedBinary();
217819
217854
  const multipleInstallations = await detectMultipleInstallations();
@@ -217825,8 +217860,8 @@ async function getDoctorDiagnostic() {
217825
217860
  for (const install of npmInstalls) {
217826
217861
  if (install.type === "npm-global") {
217827
217862
  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}`;
217863
+ if ({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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") {
217864
+ uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217865
  }
217831
217866
  warnings.push({
217832
217867
  issue: `Leftover npm global installation at ${install.path}`,
@@ -217938,7 +217973,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217938
217973
  const startTime2 = Date.now();
217939
217974
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
217940
217975
  "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}`,
217976
+ `${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
217977
  "version",
217943
217978
  "--prefer-online",
217944
217979
  "--registry",
@@ -217962,7 +217997,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217962
217997
  latency_ms: latencyMs,
217963
217998
  source_npm: true
217964
217999
  });
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}`);
218000
+ logForDebugging(`npm view ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218001
  const latestVersion = stdout.trim();
217967
218002
  return latestVersion;
217968
218003
  }
@@ -218018,7 +218053,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218018
218053
  const fs3 = getFsImplementation();
218019
218054
  await fs3.rm(stagingPath, { recursive: true, force: true });
218020
218055
  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}`;
218056
+ const platformPackageName = `${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218057
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
218023
218058
  const {
218024
218059
  stdout: integrityOutput,
@@ -218047,7 +218082,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218047
218082
  name: "theus-native-installer",
218048
218083
  version: "0.0.1",
218049
218084
  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
218085
+ [{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218086
  }
218052
218087
  };
218053
218088
  const packageLock = {
@@ -218060,10 +218095,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218060
218095
  name: "theus-native-installer",
218061
218096
  version: "0.0.1",
218062
218097
  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
218098
+ [{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218099
  }
218065
218100
  },
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}`]: {
218101
+ [`node_modules/${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218102
  version: version2,
218068
218103
  optionalDependencies: {
218069
218104
  [platformPackageName]: version2
@@ -218085,7 +218120,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218085
218120
  if (result.code !== 0) {
218086
218121
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
218087
218122
  }
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}`);
218123
+ logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218124
  }
218090
218125
  function getStallTimeoutMs() {
218091
218126
  return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -218748,8 +218783,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218748
218783
  const maxVersion = await getMaxVersion();
218749
218784
  if (maxVersion && gt(version2, maxVersion)) {
218750
218785
  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`);
218786
+ if (gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
218787
+ logForDebugging(`Native installer: current version ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218788
  logEvent("tengu_native_update_skipped_max_version", {
218754
218789
  latency_ms: Date.now() - startTime2,
218755
218790
  max_version: maxVersion,
@@ -218760,7 +218795,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218760
218795
  version2 = maxVersion;
218761
218796
  }
218762
218797
  }
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)) {
218798
+ if (!forceReinstall && version2 === { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
218799
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
218765
218800
  logEvent("tengu_native_update_complete", {
218766
218801
  latency_ms: Date.now() - startTime2,
@@ -219510,8 +219545,8 @@ async function cleanupNpmInstallations() {
219510
219545
  } else if (codePackageResult.error) {
219511
219546
  errors4.push(codePackageResult.error);
219512
219547
  }
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);
219548
+ if ({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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") {
219549
+ const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
219550
  if (macroPackageResult.success) {
219516
219551
  removed++;
219517
219552
  if (macroPackageResult.warning) {
@@ -232144,6 +232179,14 @@ function AssistantTextMessage(t0) {
232144
232179
  }
232145
232180
  return t2;
232146
232181
  }
232182
+ if (isGatewayQuotaExceededMessage(text)) {
232183
+ return /* @__PURE__ */ jsx_runtime81.jsx(MessageResponse, {
232184
+ children: /* @__PURE__ */ jsx_runtime81.jsx(ThemedText, {
232185
+ color: "error",
232186
+ children: text
232187
+ })
232188
+ });
232189
+ }
232147
232190
  switch (text) {
232148
232191
  case NO_RESPONSE_REQUESTED: {
232149
232192
  return null;
@@ -304780,9 +304823,9 @@ function getTheusEnvMetadata() {
304780
304823
  };
304781
304824
  }
304782
304825
  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)
304826
+ if (!{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
304827
  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();
304828
+ const buildTime = new Date({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
304829
  if (isNaN(buildTime))
304787
304830
  return;
304788
304831
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -321308,6 +321351,12 @@ function getAssistantMessageFromError(error40, model, options2) {
321308
321351
  error: "rate_limit"
321309
321352
  });
321310
321353
  }
321354
+ if (error40 instanceof import_sdk10.APIError && error40.status === 429 && isGatewayQuotaExceededBody(error40.error)) {
321355
+ return createAssistantAPIErrorMessage({
321356
+ content: getGatewayQuotaExceededMessage(error40.error),
321357
+ error: "rate_limit"
321358
+ });
321359
+ }
321311
321360
  if (error40 instanceof import_sdk10.APIError && error40.status === 429 && shouldProcessRateLimits(isTheusAISubscriber())) {
321312
321361
  const rateLimitType = error40.headers?.get?.("theus-ratelimit-unified-representative-claim");
321313
321362
  const overageStatus = error40.headers?.get?.("theus-ratelimit-unified-overage-status");
@@ -321424,7 +321473,7 @@ function getAssistantMessageFromError(error40, model, options2) {
321424
321473
  if (process.env.USER_TYPE === "ant") {
321425
321474
  const baseMessage = `API Error: 400 ${error40.message}
321426
321475
 
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}.`;
321476
+ Run /share and post the JSON file to ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
321477
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
321429
321478
  return createAssistantAPIErrorMessage({
321430
321479
  content: baseMessage + rewindInstruction,
@@ -321460,7 +321509,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.37", BUILD_TIME: "1970-01
321460
321509
  if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
321461
321510
  const orgId = getOauthAccountInfo()?.organizationUuid;
321462
321511
  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.`;
321512
+ const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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
321513
  return createAssistantAPIErrorMessage({
321465
321514
  content: msg,
321466
321515
  error: "invalid_request"
@@ -321693,6 +321742,7 @@ var init_errors6 = __esm(() => {
321693
321742
  init_analytics();
321694
321743
  init_theusAiLimits();
321695
321744
  init_rateLimitMocking();
321745
+ init_rateLimitMessages();
321696
321746
  init_errorUtils();
321697
321747
  import_sdk10 = __toESM(require_sdk(), 1);
321698
321748
  });
@@ -331564,7 +331614,7 @@ function buildPrimarySection() {
331564
331614
  });
331565
331615
  return [{
331566
331616
  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
331617
+ value: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
331618
  }, {
331569
331619
  label: "Session name",
331570
331620
  value: nameValue
@@ -335380,7 +335430,7 @@ function Config({
335380
335430
  }
335381
335431
  })
335382
335432
  }) : 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,
335433
+ currentVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
335434
  onChoice: (choice) => {
335385
335435
  setShowSubmenu(null);
335386
335436
  setTabsHidden(false);
@@ -335392,7 +335442,7 @@ function Config({
335392
335442
  autoUpdatesChannel: "stable"
335393
335443
  };
335394
335444
  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;
335445
+ newSettings.minimumVersion = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
335446
  }
335397
335447
  updateSettingsForSource("userSettings", newSettings);
335398
335448
  setSettingsData((prev_27) => ({
@@ -343426,7 +343476,7 @@ function HelpV2(t0) {
343426
343476
  let t6;
343427
343477
  if ($2[31] !== tabs) {
343428
343478
  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}`,
343479
+ title: `Theus v${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
343480
  color: "professionalBlue",
343431
343481
  defaultTab: "general",
343432
343482
  children: tabs
@@ -360594,6 +360644,11 @@ var init_ApproveApiKey = __esm(() => {
360594
360644
  });
360595
360645
 
360596
360646
  // components/Theus/TheusBanner.tsx
360647
+ function hasActiveSession() {
360648
+ if (!isTheusAuthEnabled())
360649
+ return true;
360650
+ return getOauthAccountInfo() !== undefined;
360651
+ }
360597
360652
  function TheusBanner({ minimal, version: version2 }) {
360598
360653
  const [themeName] = useTheme();
360599
360654
  const theme = getTheme(themeName);
@@ -360610,16 +360665,30 @@ function TheusBanner({ minimal, version: version2 }) {
360610
360665
  showFrame: !isCompact
360611
360666
  }),
360612
360667
  /* @__PURE__ */ jsx_runtime245.jsxs(ThemedBox_default, {
360668
+ flexDirection: "column",
360613
360669
  marginTop: isCompact ? 1 : 0,
360614
360670
  paddingLeft: isCompact ? 0 : 1,
360615
360671
  children: [
360616
- /* @__PURE__ */ jsx_runtime245.jsx(ThemedText, {
360617
- bold: true,
360618
- color: theme.peru,
360619
- children: "THEUS CLI"
360672
+ /* @__PURE__ */ jsx_runtime245.jsxs(ThemedBox_default, {
360673
+ flexWrap: "wrap",
360674
+ children: [
360675
+ /* @__PURE__ */ jsx_runtime245.jsx(ThemedText, {
360676
+ bold: true,
360677
+ color: theme.peru,
360678
+ children: "THEUS CLI"
360679
+ }),
360680
+ version2 && /* @__PURE__ */ jsx_runtime245.jsx(Text, {
360681
+ children: ` \xB7 v${version2}`
360682
+ })
360683
+ ]
360620
360684
  }),
360621
360685
  /* @__PURE__ */ jsx_runtime245.jsx(Text, {
360622
- children: ` \xB7 MISI\xD3N LOCAL${version2 ? ` \xB7 v${version2}` : ""}`
360686
+ wrap: "wrap",
360687
+ children: "Tu plan incluye el cat\xE1logo frontier. TITAN elige el modelo; t\xFA diriges."
360688
+ }),
360689
+ !hasActiveSession() && /* @__PURE__ */ jsx_runtime245.jsx(ThemedText, {
360690
+ dimColor: true,
360691
+ children: "\xBFPrimera vez? Escribe theus login"
360623
360692
  })
360624
360693
  ]
360625
360694
  })
@@ -360630,6 +360699,7 @@ var import_react143, jsx_runtime245, FULL_MIN_COLUMNS = 96, FULL_MIN_ROWS = 32;
360630
360699
  var init_TheusBanner = __esm(() => {
360631
360700
  init_ink2();
360632
360701
  init_TerminalSizeContext();
360702
+ init_auth();
360633
360703
  init_theme();
360634
360704
  init_TheusLoginHero();
360635
360705
  import_react143 = __toESM(require_react(), 1);
@@ -361517,7 +361587,7 @@ function Onboarding({
361517
361587
  flexDirection: "column",
361518
361588
  children: [
361519
361589
  /* @__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
361590
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
361591
  }),
361522
361592
  /* @__PURE__ */ jsx_runtime249.jsxs(ThemedBox_default, {
361523
361593
  flexDirection: "column",
@@ -361862,9 +361932,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
361862
361932
  return [];
361863
361933
  }
361864
361934
  }
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) {
361935
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
361936
  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;
361937
+ const changelog = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
361938
  if (changelog) {
361869
361939
  const commits = changelog.trim().split(`
361870
361940
  `).filter(Boolean);
@@ -366066,7 +366136,7 @@ var init_Messages = __esm(() => {
366066
366136
  let t1;
366067
366137
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
366068
366138
  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
366139
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
366140
  });
366071
366141
  $2[0] = t1;
366072
366142
  } else {
@@ -394532,7 +394602,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
394532
394602
  smapsRollup,
394533
394603
  platform: process.platform,
394534
394604
  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
394605
+ ccVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
394606
  };
394537
394607
  }
394538
394608
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -395118,7 +395188,7 @@ var init_bridge_kick = __esm(() => {
395118
395188
  var call57 = async () => {
395119
395189
  return {
395120
395190
  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
395191
+ value: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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
395192
  };
395123
395193
  }, version2, version_default;
395124
395194
  var init_version = __esm(() => {
@@ -399560,13 +399630,13 @@ async function updateReleaseBundle() {
399560
399630
  await gracefulShutdown(1);
399561
399631
  return;
399562
399632
  }
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})`) + `
399633
+ if (gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
399634
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399635
  `);
399566
399636
  await gracefulShutdown(0);
399567
399637
  return;
399568
399638
  }
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})
399639
+ writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399640
  `);
399571
399641
  writeToStdout(`Installing update from theus.pe/dl...
399572
399642
  `);
@@ -399600,7 +399670,7 @@ async function updateReleaseBundle() {
399600
399670
  return;
399601
399671
  }
399602
399672
  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}`) + `
399673
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399674
  `);
399605
399675
  await regenerateCompletionCache();
399606
399676
  } finally {
@@ -399613,7 +399683,7 @@ async function updateReleaseBundle() {
399613
399683
  async function update() {
399614
399684
  logEvent("tengu_update_check", {});
399615
399685
  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}
399686
+ writeToStdout(`Current version: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399687
  `);
399618
399688
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
399619
399689
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -399692,8 +399762,8 @@ async function update() {
399692
399762
  writeToStdout(`Theus is managed by Homebrew.
399693
399763
  `);
399694
399764
  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}
399765
+ if (latest && !gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
399766
+ writeToStdout(`Update available: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399767
  `);
399698
399768
  writeToStdout(`
399699
399769
  `);
@@ -399709,8 +399779,8 @@ async function update() {
399709
399779
  writeToStdout(`Theus is managed by winget.
399710
399780
  `);
399711
399781
  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}
399782
+ if (latest && !gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
399783
+ writeToStdout(`Update available: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399784
  `);
399715
399785
  writeToStdout(`
399716
399786
  `);
@@ -399726,8 +399796,8 @@ async function update() {
399726
399796
  writeToStdout(`Theus is managed by apk.
399727
399797
  `);
399728
399798
  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}
399799
+ if (latest && !gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
399800
+ writeToStdout(`Update available: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399801
  `);
399732
399802
  writeToStdout(`
399733
399803
  `);
@@ -399792,11 +399862,11 @@ async function update() {
399792
399862
  `);
399793
399863
  await gracefulShutdown(1);
399794
399864
  }
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})`) + `
399865
+ if (result.latestVersion === { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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) {
399866
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399867
  `);
399798
399868
  } 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}`) + `
399869
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399870
  `);
399801
399871
  await regenerateCompletionCache();
399802
399872
  }
@@ -399815,9 +399885,9 @@ async function update() {
399815
399885
  await removeInstalledSymlink();
399816
399886
  }
399817
399887
  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}`);
399888
+ logForDebugging(`update: Package URL: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399889
  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`;
399890
+ const npmCommand = `npm view ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399891
  logForDebugging(`update: Running: ${npmCommand}`);
399822
399892
  const latestVersion = await getLatestVersion(channel2);
399823
399893
  logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
@@ -399837,7 +399907,7 @@ async function update() {
399837
399907
  `);
399838
399908
  process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
399839
399909
  `);
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")) {
399910
+ if ({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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
399911
  process.stderr.write(` \u2022 Internal/development build not published to npm
399842
399912
  `);
399843
399913
  }
@@ -399849,19 +399919,19 @@ async function update() {
399849
399919
  `);
399850
399920
  process.stderr.write(` \u2022 Run with --debug flag for more details
399851
399921
  `);
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");
399922
+ const packageName = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399923
  process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
399854
399924
  `);
399855
399925
  process.stderr.write(` \u2022 Check if you need to login: npm whoami
399856
399926
  `);
399857
399927
  await gracefulShutdown(1);
399858
399928
  }
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})`) + `
399929
+ if (gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
399930
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399931
  `);
399862
399932
  await gracefulShutdown(0);
399863
399933
  }
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})
399934
+ writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399935
  `);
399866
399936
  writeToStdout(`Installing update...
399867
399937
  `);
@@ -399906,7 +399976,7 @@ async function update() {
399906
399976
  logForDebugging(`update: Installation status: ${status2}`);
399907
399977
  switch (status2) {
399908
399978
  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}`) + `
399979
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399980
  `);
399911
399981
  await regenerateCompletionCache();
399912
399982
  break;
@@ -399916,7 +399986,7 @@ async function update() {
399916
399986
  if (useLocalUpdate) {
399917
399987
  process.stderr.write(`Try manually updating with:
399918
399988
  `);
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}
399989
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
399990
  `);
399921
399991
  } else {
399922
399992
  process.stderr.write(`Try running with sudo or fix npm permissions
@@ -399932,7 +400002,7 @@ async function update() {
399932
400002
  if (useLocalUpdate) {
399933
400003
  process.stderr.write(`Try manually updating with:
399934
400004
  `);
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}
400005
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
400006
  `);
399937
400007
  } else {
399938
400008
  process.stderr.write(`Or consider using native installation with: theus install
@@ -409009,7 +409079,7 @@ var init_sessionStorage = __esm(() => {
409009
409079
  init_settings2();
409010
409080
  init_slowOperations();
409011
409081
  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;
409082
+ VERSION4 = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
409083
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
409014
409084
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
409015
409085
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -410214,7 +410284,7 @@ var init_filesystem = __esm(() => {
410214
410284
  });
410215
410285
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
410216
410286
  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);
410287
+ return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
410288
  });
410219
410289
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
410220
410290
  });
@@ -415393,7 +415463,7 @@ function getSimpleDoingTasksSection() {
415393
415463
  ];
415394
415464
  const userHelpSubitems = [
415395
415465
  `/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}`
415466
+ `To give feedback, users should ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
415467
  ];
415398
415468
  const items = [
415399
415469
  `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 +416363,7 @@ function computeFingerprint(messageText, version3) {
416293
416363
  }
416294
416364
  function computeFingerprintFromMessages(messages) {
416295
416365
  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);
416366
+ return computeFingerprint(firstMessageText, { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
416367
  }
416298
416368
  var FINGERPRINT_SALT = "59cf53e54c78";
416299
416369
  var init_fingerprint = () => {};
@@ -418853,7 +418923,7 @@ async function sideQuery(opts) {
418853
418923
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
418854
418924
  }
418855
418925
  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);
418926
+ const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
418927
  const attributionHeader = getAttributionHeader(fingerprint);
418858
418928
  const systemBlocks = [
418859
418929
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -420156,7 +420226,7 @@ async function handleMemories(state) {
420156
420226
  async function runProjectContextMcpServer() {
420157
420227
  const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
420158
420228
  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: {} } });
420229
+ const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
420230
  server2.setRequestHandler(ListToolsRequestSchema, async () => ({
420161
420231
  tools: TOOL_DEFINITIONS.map((t) => ({
420162
420232
  name: t.name,
@@ -422136,7 +422206,7 @@ function createBridgeLogger(options2) {
422136
422206
  connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
422137
422207
  regenerateQr(connectUrl);
422138
422208
  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}
422209
+ write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
422210
  `);
422141
422211
  }
422142
422212
  if (verbose) {
@@ -423109,7 +423179,7 @@ function appendToLog(path19, message) {
423109
423179
  cwd: getFsImplementation().cwd(),
423110
423180
  userType: process.env.USER_TYPE,
423111
423181
  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
423182
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
423183
  };
423114
423184
  getLogWriter(path19).write(messageWithTimestamp);
423115
423185
  }
@@ -424379,7 +424449,7 @@ Spawn mode for this project:
424379
424449
  const api2 = createBridgeApiClient({
424380
424450
  baseUrl,
424381
424451
  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,
424452
+ runnerVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
424453
  onDebug: logForDebugging,
424384
424454
  onAuth401: handleOAuth401Error2,
424385
424455
  getTrustedDeviceToken
@@ -424617,7 +424687,7 @@ async function runBridgeHeadless(opts, signal) {
424617
424687
  const api2 = createBridgeApiClient({
424618
424688
  baseUrl,
424619
424689
  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,
424690
+ runnerVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
424691
  onDebug: log2,
424622
424692
  onAuth401: opts.onAuth401,
424623
424693
  getTrustedDeviceToken
@@ -428681,7 +428751,7 @@ function buildSystemInitMessage(inputs) {
428681
428751
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
428682
428752
  apiKeySource: getTheusApiKeyWithSource().source,
428683
428753
  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,
428754
+ theus_code_version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
428755
  output_style: outputStyle2,
428686
428756
  agents: inputs.agents.map((agent) => agent.agentType),
428687
428757
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -428721,8 +428791,8 @@ async function getEnvLessBridgeConfig() {
428721
428791
  }
428722
428792
  async function checkEnvLessBridgeMinVersion() {
428723
428793
  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.
428794
+ if (cfg.min_version && lt({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
428795
+ return `Your version of Theus (${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
428796
  Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
428727
428797
  }
428728
428798
  return null;
@@ -431045,7 +431115,7 @@ async function initBridgeCore(params) {
431045
431115
  const rawApi = createBridgeApiClient({
431046
431116
  baseUrl,
431047
431117
  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,
431118
+ runnerVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
431119
  onDebug: logForDebugging,
431050
431120
  onAuth401,
431051
431121
  getTrustedDeviceToken
@@ -447786,7 +447856,7 @@ var init_useVoiceEnabled = __esm(() => {
447786
447856
  function getSemverPart(version3) {
447787
447857
  return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
447788
447858
  }
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) {
447859
+ function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
447860
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react231.useState(() => getSemverPart(initialVersion));
447791
447861
  if (!updatedVersion) {
447792
447862
  return null;
@@ -447826,7 +447896,7 @@ function AutoUpdater({
447826
447896
  return;
447827
447897
  }
447828
447898
  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;
447899
+ const currentVersion = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
447900
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
447831
447901
  let latestVersion = await getLatestVersion(channel2);
447832
447902
  const isDisabled2 = isAutoUpdaterDisabled();
@@ -447962,7 +448032,7 @@ function AutoUpdater({
447962
448032
  " ",
447963
448033
  /* @__PURE__ */ jsx_runtime406.jsx(ThemedText, {
447964
448034
  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}`
448035
+ children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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.38", BUILD_TIME: "1970-01-01T00:00:00.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
448036
  })
447967
448037
  ]
447968
448038
  })
@@ -448039,12 +448109,12 @@ function NativeAutoUpdater({
448039
448109
  logEvent("tengu_native_auto_updater_start", {});
448040
448110
  try {
448041
448111
  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)) {
448112
+ if (maxVersion && gt({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
448113
  const msg = await getMaxVersionMessage();
448044
448114
  setMaxVersionIssue(msg ?? "affects your version");
448045
448115
  }
448046
448116
  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;
448117
+ const currentVersion = { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
448118
  const latencyMs = Date.now() - startTime2;
448049
448119
  if (result.lockFailed) {
448050
448120
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -448181,17 +448251,17 @@ function PackageManagerAutoUpdater(t0) {
448181
448251
  const maxVersion = await getMaxVersion();
448182
448252
  if (maxVersion && latest && gt(latest, maxVersion)) {
448183
448253
  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`);
448254
+ if (gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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)) {
448255
+ logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
448256
  setUpdateAvailable(false);
448187
448257
  return;
448188
448258
  }
448189
448259
  latest = maxVersion;
448190
448260
  }
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);
448261
+ const hasUpdate = latest && !gte({ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
448262
  setUpdateAvailable(!!hasUpdate);
448193
448263
  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}`);
448264
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
448265
  }
448196
448266
  };
448197
448267
  $2[0] = t1;
@@ -448225,7 +448295,7 @@ function PackageManagerAutoUpdater(t0) {
448225
448295
  wrap: "truncate",
448226
448296
  children: [
448227
448297
  "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
448298
+ { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
448299
  ]
448230
448300
  });
448231
448301
  $2[3] = verbose;
@@ -456098,7 +456168,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
456098
456168
  project_dir: getOriginalCwd(),
456099
456169
  added_dirs: addedDirs
456100
456170
  },
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,
456171
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
456172
  output_style: {
456103
456173
  name: outputStyleName
456104
456174
  },
@@ -467518,7 +467588,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
467518
467588
  } catch {}
467519
467589
  const data = {
467520
467590
  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,
467591
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
467592
  platform: process.platform,
467523
467593
  transcript,
467524
467594
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -480525,7 +480595,7 @@ function completeOnboarding() {
480525
480595
  saveGlobalConfig((current) => ({
480526
480596
  ...current,
480527
480597
  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
480598
+ lastOnboardingVersion: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
480599
  }));
480530
480600
  }
480531
480601
  function showDialog(root2, renderer) {
@@ -491413,7 +491483,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
491413
491483
  setCwd(cwd3);
491414
491484
  const server2 = new Server({
491415
491485
  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
491486
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
491487
  }, {
491418
491488
  capabilities: {
491419
491489
  tools: {}
@@ -492855,7 +492925,7 @@ async function setupTokenHandler(root2) {
492855
492925
  gap: 1,
492856
492926
  children: [
492857
492927
  /* @__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
492928
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
492929
  }),
492860
492930
  showAuthWarning && /* @__PURE__ */ jsx_runtime493.jsxs(ThemedBox_default, {
492861
492931
  flexDirection: "column",
@@ -494337,7 +494407,7 @@ ${assistantAddendum}` : assistantAddendum;
494337
494407
  }
494338
494408
  }
494339
494409
  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,
494410
+ version: { VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
494411
  is_native_binary: isInBundledMode()
494342
494412
  });
494343
494413
  registerCleanup(async () => {
@@ -495205,7 +495275,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
495205
495275
  pendingHookMessages
495206
495276
  }, renderAndRun);
495207
495277
  }
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");
495278
+ }).version(`${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
495279
  program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
495210
495280
  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
495281
  if (canUserConfigureAdvisor()) {
@@ -495757,7 +495827,7 @@ if (false) {}
495757
495827
  async function main2() {
495758
495828
  const args = process.argv.slice(2);
495759
495829
  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)`);
495830
+ console.log(`${{ VERSION: "0.2.38", BUILD_TIME: "1970-01-01T00:00:00.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
495831
  return;
495762
495832
  }
495763
495833
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theus-cli",
3
- "version": "0.2.37",
3
+ "version": "0.2.38",
4
4
  "description": "Theus — multi-model agent for vibe coding, persistent memory, indexing graphs and visual databases",
5
5
  "type": "module",
6
6
  "bin": {