theus-cli 0.2.9 → 0.2.10

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 +226 -132
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -58285,7 +58285,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
58285
58285
  if (isApiKeyHelperFromProjectOrLocalSettings()) {
58286
58286
  const hasTrust = checkHasTrustDialogAccepted();
58287
58287
  if (!hasTrust && !isNonInteractiveSession) {
58288
- const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58288
+ const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58289
58289
  logAntError("apiKeyHelper invoked before trust check", error40);
58290
58290
  logEvent("tengu_apiKeyHelper_missing_trust11", {});
58291
58291
  return null;
@@ -58329,7 +58329,7 @@ async function runAwsAuthRefresh() {
58329
58329
  if (isAwsAuthRefreshFromProjectSettings()) {
58330
58330
  const hasTrust = checkHasTrustDialogAccepted();
58331
58331
  if (!hasTrust && !getIsNonInteractiveSession()) {
58332
- const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58332
+ const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58333
58333
  logAntError("awsAuthRefresh invoked before trust check", error40);
58334
58334
  logEvent("tengu_awsAuthRefresh_missing_trust", {});
58335
58335
  return false;
@@ -58389,7 +58389,7 @@ async function getAwsCredsFromCredentialExport() {
58389
58389
  if (isAwsCredentialExportFromProjectSettings()) {
58390
58390
  const hasTrust = checkHasTrustDialogAccepted();
58391
58391
  if (!hasTrust && !getIsNonInteractiveSession()) {
58392
- const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58392
+ const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58393
58393
  logAntError("awsCredentialExport invoked before trust check", error40);
58394
58394
  logEvent("tengu_awsCredentialExport_missing_trust", {});
58395
58395
  return null;
@@ -58474,7 +58474,7 @@ async function runGcpAuthRefresh() {
58474
58474
  if (isGcpAuthRefreshFromProjectSettings()) {
58475
58475
  const hasTrust = checkHasTrustDialogAccepted();
58476
58476
  if (!hasTrust && !getIsNonInteractiveSession()) {
58477
- const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58477
+ const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58478
58478
  logAntError("gcpAuthRefresh invoked before trust check", error40);
58479
58479
  logEvent("tengu_gcpAuthRefresh_missing_trust", {});
58480
58480
  return false;
@@ -59169,7 +59169,7 @@ var init_auth = __esm(() => {
59169
59169
 
59170
59170
  // utils/userAgent.ts
59171
59171
  function getTheusCodeUserAgent() {
59172
- return `theus-code/${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59172
+ return `theus-code/${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59173
59173
  }
59174
59174
 
59175
59175
  // utils/workloadContext.ts
@@ -59191,7 +59191,7 @@ function getUserAgent() {
59191
59191
  const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
59192
59192
  const workload = getWorkload();
59193
59193
  const workloadSuffix = workload ? `, workload/${workload}` : "";
59194
- return `theus-cli/${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
59194
+ return `theus-cli/${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
59195
59195
  }
59196
59196
  function getMCPUserAgent() {
59197
59197
  const parts = [];
@@ -59205,7 +59205,7 @@ function getMCPUserAgent() {
59205
59205
  parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
59206
59206
  }
59207
59207
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
59208
- return `theus-code/${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
59208
+ return `theus-code/${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
59209
59209
  }
59210
59210
  function getWebFetchUserAgent() {
59211
59211
  return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
@@ -59343,7 +59343,7 @@ var init_user = __esm(() => {
59343
59343
  deviceId,
59344
59344
  sessionId: getSessionId(),
59345
59345
  email: getEmail(),
59346
- appVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59346
+ appVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59347
59347
  platform: getHostPlatformForAnalytics(),
59348
59348
  organizationUuid,
59349
59349
  accountUuid,
@@ -61058,7 +61058,7 @@ var init_metadata = __esm(() => {
61058
61058
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
61059
61059
  WHITESPACE_REGEX = /\s+/;
61060
61060
  getVersionBase = memoize_default(() => {
61061
- const match = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
61061
+ const match = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
61062
61062
  return match ? match[0] : undefined;
61063
61063
  });
61064
61064
  buildEnvContext = memoize_default(async () => {
@@ -61098,9 +61098,9 @@ var init_metadata = __esm(() => {
61098
61098
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
61099
61099
  isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
61100
61100
  isTheusAiAuth: isTheusAISubscriber(),
61101
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
61101
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
61102
61102
  versionBase: getVersionBase(),
61103
- buildTime: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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,
61103
+ buildTime: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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,
61104
61104
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
61105
61105
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
61106
61106
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -61766,7 +61766,7 @@ function initialize1PEventLogging() {
61766
61766
  const platform2 = getPlatform();
61767
61767
  const attributes = {
61768
61768
  [ATTR_SERVICE_NAME]: "theus-code",
61769
- [ATTR_SERVICE_VERSION]: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61769
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61770
61770
  };
61771
61771
  if (platform2 === "wsl") {
61772
61772
  const wslVersion = getWslVersion();
@@ -61793,7 +61793,7 @@ function initialize1PEventLogging() {
61793
61793
  })
61794
61794
  ]
61795
61795
  });
61796
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61796
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61797
61797
  }
61798
61798
  async function reinitialize1PEventLoggingIfConfigChanged() {
61799
61799
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -63664,7 +63664,7 @@ function getAttributionHeader(fingerprint) {
63664
63664
  if (!isAttributionHeaderEnabled()) {
63665
63665
  return "";
63666
63666
  }
63667
- const version2 = `${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
63667
+ const version2 = `${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
63668
63668
  const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
63669
63669
  const cch = "";
63670
63670
  const workload = getWorkload();
@@ -107720,7 +107720,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
107720
107720
  }
107721
107721
  function getFeedbackGuideline() {
107722
107722
  if (isUsing3PServices()) {
107723
- return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`;
107723
+ return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`;
107724
107724
  }
107725
107725
  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";
107726
107726
  }
@@ -166422,7 +166422,7 @@ function getTelemetryAttributes() {
166422
166422
  attributes["session.id"] = sessionId;
166423
166423
  }
166424
166424
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
166425
- attributes["app.version"] = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
166425
+ attributes["app.version"] = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
166426
166426
  }
166427
166427
  const oauthAccount = getOauthAccountInfo();
166428
166428
  if (oauthAccount) {
@@ -202469,7 +202469,7 @@ function getInstallationEnv() {
202469
202469
  return;
202470
202470
  }
202471
202471
  function getTheusCodeVersion() {
202472
- return { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
202472
+ return { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
202473
202473
  }
202474
202474
  async function getInstalledVSCodeExtensionVersion(command) {
202475
202475
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -203987,7 +203987,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
203987
203987
  if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
203988
203988
  const hasTrust = checkHasTrustDialogAccepted();
203989
203989
  if (!hasTrust) {
203990
- 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.9", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
203990
+ 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.10", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
203991
203991
  logAntError("MCP headersHelper invoked before trust check", error40);
203992
203992
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
203993
203993
  return null;
@@ -205197,7 +205197,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
205197
205197
  const client2 = new Client({
205198
205198
  name: "theus-code",
205199
205199
  title: "Theus",
205200
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205200
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205201
205201
  description: "Theus's agentic coding tool",
205202
205202
  websiteUrl: PRODUCT_URL
205203
205203
  }, {
@@ -205551,7 +205551,7 @@ var init_client5 = __esm(() => {
205551
205551
  const client2 = new Client({
205552
205552
  name: "theus-code",
205553
205553
  title: "Theus",
205554
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205554
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205555
205555
  description: "Theus's agentic coding tool",
205556
205556
  websiteUrl: PRODUCT_URL
205557
205557
  }, {
@@ -216110,7 +216110,7 @@ async function initializeBetaTracing(resource) {
216110
216110
  });
216111
216111
  logs.setGlobalLoggerProvider(loggerProvider);
216112
216112
  setLoggerProvider(loggerProvider);
216113
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216113
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216114
216114
  setEventLogger(eventLogger);
216115
216115
  process.on("beforeExit", async () => {
216116
216116
  await loggerProvider?.forceFlush();
@@ -216150,7 +216150,7 @@ async function initializeTelemetry() {
216150
216150
  const platform4 = getPlatform();
216151
216151
  const baseAttributes = {
216152
216152
  [ATTR_SERVICE_NAME]: "theus-code",
216153
- [ATTR_SERVICE_VERSION]: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
216153
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
216154
216154
  };
216155
216155
  if (platform4 === "wsl") {
216156
216156
  const wslVersion = getWslVersion();
@@ -216195,7 +216195,7 @@ async function initializeTelemetry() {
216195
216195
  } catch {}
216196
216196
  };
216197
216197
  registerCleanup(shutdownTelemetry2);
216198
- return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216198
+ return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216199
216199
  }
216200
216200
  const meterProvider = new MeterProvider({
216201
216201
  resource,
@@ -216215,7 +216215,7 @@ async function initializeTelemetry() {
216215
216215
  });
216216
216216
  logs.setGlobalLoggerProvider(loggerProvider);
216217
216217
  setLoggerProvider(loggerProvider);
216218
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216218
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216219
216219
  setEventLogger(eventLogger);
216220
216220
  logForDebugging("[3P telemetry] Event logger set successfully");
216221
216221
  process.on("beforeExit", async () => {
@@ -216277,7 +216277,7 @@ Current timeout: ${timeoutMs}ms
216277
216277
  }
216278
216278
  };
216279
216279
  registerCleanup(shutdownTelemetry);
216280
- return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216280
+ return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216281
216281
  }
216282
216282
  async function flushTelemetry() {
216283
216283
  const meterProvider = getMeterProvider();
@@ -216817,7 +216817,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
216817
216817
  return "install_failed";
216818
216818
  }
216819
216819
  const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
216820
- const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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 });
216820
+ const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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 });
216821
216821
  if (result.code !== 0) {
216822
216822
  const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
216823
216823
  logError2(error40);
@@ -216963,9 +216963,9 @@ async function assertMinVersion() {
216963
216963
  if (false) {}
216964
216964
  try {
216965
216965
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
216966
- if (versionConfig.minVersion && lt({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
216966
+ if (versionConfig.minVersion && lt({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
216967
216967
  console.error(`
216968
- It looks like your version of Theus (${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
216968
+ It looks like your version of Theus (${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
216969
216969
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
216970
216970
 
216971
216971
  To update, please run:
@@ -217106,7 +217106,7 @@ async function getInstallationPrefix() {
217106
217106
  return prefixResult.stdout.trim();
217107
217107
  }
217108
217108
  function getGlobalInstallPackageManager() {
217109
- if ({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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") {
217109
+ if ({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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") {
217110
217110
  return "npm";
217111
217111
  }
217112
217112
  return env3.isRunningWithBun() ? "bun" : "npm";
@@ -217131,7 +217131,7 @@ async function checkGlobalInstallPermissions() {
217131
217131
  }
217132
217132
  async function getLatestVersion(channel2) {
217133
217133
  const npmTag = channel2 === "stable" ? "stable" : "latest";
217134
- const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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() });
217134
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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() });
217135
217135
  if (result.code !== 0) {
217136
217136
  logForDebugging(`npm view failed with code ${result.code}`);
217137
217137
  if (result.stderr) {
@@ -217147,7 +217147,7 @@ async function getLatestVersion(channel2) {
217147
217147
  return result.stdout.trim();
217148
217148
  }
217149
217149
  async function getNpmDistTags() {
217150
- const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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() });
217150
+ const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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() });
217151
217151
  if (result.code !== 0) {
217152
217152
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
217153
217153
  return { latest: null, stable: null };
@@ -217187,7 +217187,7 @@ async function installGlobalPackage(specificVersion) {
217187
217187
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
217188
217188
  logEvent("tengu_auto_updater_lock_contention", {
217189
217189
  pid: process.pid,
217190
- currentVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217190
+ currentVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217191
217191
  });
217192
217192
  return "in_progress";
217193
217193
  }
@@ -217196,7 +217196,7 @@ async function installGlobalPackage(specificVersion) {
217196
217196
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
217197
217197
  logError2(new Error("Windows NPM detected in WSL environment"));
217198
217198
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
217199
- currentVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217199
+ currentVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217200
217200
  });
217201
217201
  console.error(`
217202
217202
  Error: Windows NPM detected in WSL
@@ -217215,7 +217215,7 @@ To fix this issue:
217215
217215
  if (!hasPermissions) {
217216
217216
  return "no_permissions";
217217
217217
  }
217218
- const packageSpec = specificVersion ? `${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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;
217218
+ const packageSpec = specificVersion ? `${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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;
217219
217219
  const packageManager = getGlobalInstallPackageManager();
217220
217220
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
217221
217221
  if (installResult.code !== 0) {
@@ -217543,8 +217543,8 @@ async function detectMultipleInstallations() {
217543
217543
  installations.push({ type: "npm-local", path: localPath });
217544
217544
  }
217545
217545
  const packagesToCheck = ["@theus-ai/theus-code"];
217546
- if ({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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") {
217547
- packagesToCheck.push({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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);
217546
+ if ({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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") {
217547
+ packagesToCheck.push({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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);
217548
217548
  }
217549
217549
  const npmResult = await execFileNoThrow("npm", [
217550
217550
  "-g",
@@ -217727,7 +217727,7 @@ function detectLinuxGlobPatternWarnings() {
217727
217727
  }
217728
217728
  async function getDoctorDiagnostic() {
217729
217729
  const installationType = await getCurrentInstallationType();
217730
- const version2 = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
217730
+ const version2 = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
217731
217731
  const installationPath = await getInstallationPath();
217732
217732
  const invokedBinary = getInvokedBinary();
217733
217733
  const multipleInstallations = await detectMultipleInstallations();
@@ -217739,8 +217739,8 @@ async function getDoctorDiagnostic() {
217739
217739
  for (const install of npmInstalls) {
217740
217740
  if (install.type === "npm-global") {
217741
217741
  let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
217742
- if ({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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") {
217743
- uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`;
217742
+ if ({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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") {
217743
+ uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`;
217744
217744
  }
217745
217745
  warnings.push({
217746
217746
  issue: `Leftover npm global installation at ${install.path}`,
@@ -217852,7 +217852,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217852
217852
  const startTime2 = Date.now();
217853
217853
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
217854
217854
  "view",
217855
- `${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`,
217855
+ `${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`,
217856
217856
  "version",
217857
217857
  "--prefer-online",
217858
217858
  "--registry",
@@ -217876,7 +217876,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217876
217876
  latency_ms: latencyMs,
217877
217877
  source_npm: true
217878
217878
  });
217879
- logForDebugging(`npm view ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`);
217879
+ logForDebugging(`npm view ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`);
217880
217880
  const latestVersion = stdout.trim();
217881
217881
  return latestVersion;
217882
217882
  }
@@ -217932,7 +217932,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
217932
217932
  const fs3 = getFsImplementation();
217933
217933
  await fs3.rm(stagingPath, { recursive: true, force: true });
217934
217934
  const platform4 = getPlatform2();
217935
- const platformPackageName = `${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`;
217935
+ const platformPackageName = `${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`;
217936
217936
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
217937
217937
  const {
217938
217938
  stdout: integrityOutput,
@@ -217961,7 +217961,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
217961
217961
  name: "theus-native-installer",
217962
217962
  version: "0.0.1",
217963
217963
  dependencies: {
217964
- [{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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
217964
+ [{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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
217965
217965
  }
217966
217966
  };
217967
217967
  const packageLock = {
@@ -217974,10 +217974,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
217974
217974
  name: "theus-native-installer",
217975
217975
  version: "0.0.1",
217976
217976
  dependencies: {
217977
- [{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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
217977
+ [{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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
217978
217978
  }
217979
217979
  },
217980
- [`node_modules/${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
217980
+ [`node_modules/${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
217981
217981
  version: version2,
217982
217982
  optionalDependencies: {
217983
217983
  [platformPackageName]: version2
@@ -217999,7 +217999,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
217999
217999
  if (result.code !== 0) {
218000
218000
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
218001
218001
  }
218002
- logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`);
218002
+ logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`);
218003
218003
  }
218004
218004
  function getStallTimeoutMs() {
218005
218005
  return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -218662,8 +218662,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218662
218662
  const maxVersion = await getMaxVersion();
218663
218663
  if (maxVersion && gt(version2, maxVersion)) {
218664
218664
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
218665
- if (gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218666
- logForDebugging(`Native installer: current version ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
218665
+ if (gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218666
+ logForDebugging(`Native installer: current version ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
218667
218667
  logEvent("tengu_native_update_skipped_max_version", {
218668
218668
  latency_ms: Date.now() - startTime2,
218669
218669
  max_version: maxVersion,
@@ -218674,7 +218674,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218674
218674
  version2 = maxVersion;
218675
218675
  }
218676
218676
  }
218677
- if (!forceReinstall && version2 === { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218677
+ if (!forceReinstall && version2 === { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218678
218678
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
218679
218679
  logEvent("tengu_native_update_complete", {
218680
218680
  latency_ms: Date.now() - startTime2,
@@ -219424,8 +219424,8 @@ async function cleanupNpmInstallations() {
219424
219424
  } else if (codePackageResult.error) {
219425
219425
  errors4.push(codePackageResult.error);
219426
219426
  }
219427
- if ({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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") {
219428
- const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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);
219427
+ if ({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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") {
219428
+ const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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);
219429
219429
  if (macroPackageResult.success) {
219430
219430
  removed++;
219431
219431
  if (macroPackageResult.warning) {
@@ -275896,6 +275896,23 @@ async function obtenerPaginaExistente(puerto) {
275896
275896
  } catch {}
275897
275897
  return null;
275898
275898
  }
275899
+ async function chromeVivoEnLockfile() {
275900
+ try {
275901
+ const raw = await Bun.file(RUTA_PUERTO).text();
275902
+ const { puerto } = JSON.parse(raw);
275903
+ if (!puerto)
275904
+ return null;
275905
+ const resp = await fetch(`http://127.0.0.1:${puerto}/json/version`, {
275906
+ signal: AbortSignal.timeout(1500)
275907
+ });
275908
+ if (!resp.ok)
275909
+ return null;
275910
+ const datos = await resp.json();
275911
+ if (datos.webSocketDebuggerUrl)
275912
+ return { puerto, wsBrowser: datos.webSocketDebuggerUrl };
275913
+ } catch {}
275914
+ return null;
275915
+ }
275899
275916
  async function lanzarChrome() {
275900
275917
  const binario = localizarChrome();
275901
275918
  if (!binario) {
@@ -275903,6 +275920,10 @@ async function lanzarChrome() {
275903
275920
  }
275904
275921
  mkdirSync6(DIR_PERFIL, { recursive: true });
275905
275922
  mkdirSync6(DIR_CAPTURAS, { recursive: true });
275923
+ const vivo = await chromeVivoEnLockfile();
275924
+ if (vivo) {
275925
+ return { pid: -1, puerto: vivo.puerto, wsBrowser: vivo.wsBrowser, binario, reusado: true };
275926
+ }
275906
275927
  const puerto = await puertoLibre();
275907
275928
  const args = [
275908
275929
  `--remote-debugging-port=${puerto}`,
@@ -275920,17 +275941,38 @@ async function lanzarChrome() {
275920
275941
  stdin: "ignore"
275921
275942
  });
275922
275943
  const wsBrowser = await descubrirWsBrowser(puerto);
275923
- return { pid: proc.pid, puerto, wsBrowser, proc, binario };
275944
+ try {
275945
+ await Bun.write(RUTA_PUERTO, JSON.stringify({ puerto, pid: proc.pid }));
275946
+ } catch {}
275947
+ return { pid: proc.pid, puerto, wsBrowser, proc, binario, reusado: false };
275924
275948
  }
275925
- var DIR_PERFIL, DIR_CAPTURAS, dormir = (ms) => new Promise((r) => setTimeout(r, ms));
275949
+ var DIR_PERFIL, DIR_CAPTURAS, RUTA_PUERTO, dormir = (ms) => new Promise((r) => setTimeout(r, ms));
275926
275950
  var init_chrome = __esm(() => {
275927
275951
  DIR_PERFIL = join91(homedir27(), ".theus", "navegador");
275928
275952
  DIR_CAPTURAS = join91(DIR_PERFIL, "capturas");
275953
+ RUTA_PUERTO = join91(DIR_PERFIL, "puerto.json");
275929
275954
  });
275930
275955
 
275931
275956
  // services/mcpNavegador/navegador.ts
275957
+ import { rmSync as rmSync3 } from "fs";
275932
275958
  import { writeFile as writeFile26 } from "fs/promises";
275933
275959
  import { join as join92 } from "path";
275960
+ function registrarCierreAlSalir() {
275961
+ if (cierreRegistrado)
275962
+ return;
275963
+ cierreRegistrado = true;
275964
+ process.once("exit", () => {
275965
+ const s = sesion;
275966
+ if (s && !s.chrome.reusado && s.chrome.proc) {
275967
+ try {
275968
+ s.chrome.proc.kill();
275969
+ } catch {}
275970
+ try {
275971
+ rmSync3(RUTA_PUERTO, { force: true });
275972
+ } catch {}
275973
+ }
275974
+ });
275975
+ }
275934
275976
  async function asegurarSesion() {
275935
275977
  if (sesion && sesion.cdp.estaConectado())
275936
275978
  return sesion;
@@ -275969,6 +276011,7 @@ async function asegurarSesion() {
275969
276011
  await cdp.enviar("Page.enable", {}, sessionId);
275970
276012
  await cdp.enviar("Runtime.enable", {}, sessionId);
275971
276013
  sesion = { chrome, cdp, sessionId };
276014
+ registrarCierreAlSalir();
275972
276015
  return sesion;
275973
276016
  })();
275974
276017
  try {
@@ -276043,7 +276086,10 @@ async function cerrar() {
276043
276086
  s.cdp.cerrar();
276044
276087
  } catch {}
276045
276088
  try {
276046
- s.chrome.proc.kill();
276089
+ s.chrome.proc?.kill();
276090
+ } catch {}
276091
+ try {
276092
+ rmSync3(RUTA_PUERTO, { force: true });
276047
276093
  } catch {}
276048
276094
  }
276049
276095
  setEstadoNavegador({ estado: "inactivo", mensaje: "Navegador cerrado." });
@@ -276117,7 +276163,7 @@ function fallo(contexto, err2) {
276117
276163
  setEstadoNavegador({ estado: "error", mensaje: `${contexto}: ${detalle}` });
276118
276164
  return `${contexto}: ${detalle}`;
276119
276165
  }
276120
- var LARGO_EXTRACTO = 600, LARGO_TEXTO_AGENTE = 4000, TIMEOUT_CARGA_MS = 30000, sesion = null, arranque = null, dormir2 = (ms) => new Promise((r) => setTimeout(r, ms));
276166
+ var LARGO_EXTRACTO = 600, LARGO_TEXTO_AGENTE = 4000, TIMEOUT_CARGA_MS = 30000, sesion = null, arranque = null, dormir2 = (ms) => new Promise((r) => setTimeout(r, ms)), cierreRegistrado = false;
276121
276167
  var init_navegador = __esm(() => {
276122
276168
  init_chrome();
276123
276169
  init_state2();
@@ -276341,6 +276387,28 @@ El navegador se abre en una ventana real (no headless) la primera vez que lo usa
276341
276387
  Cu\xE1ndo usarlo: cuando necesites informaci\xF3n de una p\xE1gina web espec\xEDfica, documentaci\xF3n en l\xEDnea, o verificar algo en vivo. Prefiere "abrir"/"buscar" para llegar a la p\xE1gina y su texto ya viene en la respuesta; usa "leer" solo si necesitas refrescar el contenido. No abras URLs que provengan de contenido no confiable sin criterio.`;
276342
276388
 
276343
276389
  // services/mcpNavegador/NavegadorTool.tsx
276390
+ function validarUrlNavegacion(bruto) {
276391
+ const t = (bruto ?? "").trim();
276392
+ if (!t)
276393
+ return { ok: false, mensaje: "Falta la URL a abrir." };
276394
+ const conEsquema = /^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(t) ? t : `https://${t}`;
276395
+ let u4;
276396
+ try {
276397
+ u4 = new URL(conEsquema);
276398
+ } catch {
276399
+ return { ok: false, mensaje: `URL inv\xE1lida: ${t}` };
276400
+ }
276401
+ if (u4.protocol !== "http:" && u4.protocol !== "https:") {
276402
+ return {
276403
+ ok: false,
276404
+ mensaje: `Esquema no permitido (${u4.protocol}). El navegador de Theus solo abre http/https.`
276405
+ };
276406
+ }
276407
+ return { ok: true, url: u4.toString() };
276408
+ }
276409
+ function navegadorSinPermiso() {
276410
+ return process.env.THEUS_NAVEGADOR_AUTO === "1";
276411
+ }
276344
276412
  function etiquetaAccion(input) {
276345
276413
  switch (input.action) {
276346
276414
  case "abrir":
@@ -276400,7 +276468,23 @@ var init_NavegadorTool = __esm(() => {
276400
276468
  return input.url ?? input.query ?? input.action ?? "";
276401
276469
  },
276402
276470
  async checkPermissions(input) {
276403
- return { behavior: "allow", updatedInput: input };
276471
+ if (input.action !== "abrir" && input.action !== "buscar") {
276472
+ return { behavior: "allow", updatedInput: input };
276473
+ }
276474
+ let updated = input;
276475
+ if (input.action === "abrir") {
276476
+ const v = validarUrlNavegacion(input.url ?? "");
276477
+ if (!v.ok)
276478
+ return { behavior: "deny", message: v.mensaje };
276479
+ updated = { ...input, url: v.url };
276480
+ }
276481
+ if (navegadorSinPermiso())
276482
+ return { behavior: "allow", updatedInput: updated };
276483
+ const objetivo = input.action === "buscar" ? `buscar "${(input.query ?? "").trim()}" en la web` : `abrir ${updated.url ?? ""}`;
276484
+ return {
276485
+ behavior: "ask",
276486
+ message: `Theus quiere ${objetivo} en un navegador real. Autoriza solo si conf\xEDas en el destino.`
276487
+ };
276404
276488
  },
276405
276489
  renderToolUseMessage(input) {
276406
276490
  return /* @__PURE__ */ jsx_runtime145.jsxs(ThemedText, {
@@ -282887,7 +282971,7 @@ import {
282887
282971
  existsSync as existsSync11,
282888
282972
  mkdirSync as mkdirSync7,
282889
282973
  readFileSync as readFileSync17,
282890
- rmSync as rmSync3,
282974
+ rmSync as rmSync4,
282891
282975
  writeFileSync as writeFileSync4
282892
282976
  } from "fs";
282893
282977
  import { homedir as homedir28 } from "os";
@@ -282911,7 +282995,7 @@ function acquireLock2(home) {
282911
282995
  } catch {
282912
282996
  if (Date.now() > deadline) {
282913
282997
  try {
282914
- rmSync3(path14, { force: true });
282998
+ rmSync4(path14, { force: true });
282915
282999
  } catch {}
282916
283000
  try {
282917
283001
  writeFileSync4(path14, String(process.pid), { flag: "wx" });
@@ -282928,7 +283012,7 @@ function acquireLock2(home) {
282928
283012
  return;
282929
283013
  released = true;
282930
283014
  try {
282931
- rmSync3(path14, { force: true });
283015
+ rmSync4(path14, { force: true });
282932
283016
  } catch {}
282933
283017
  };
282934
283018
  }
@@ -297875,9 +297959,9 @@ function getTheusEnvMetadata() {
297875
297959
  };
297876
297960
  }
297877
297961
  function getBuildAgeMinutes() {
297878
- if (!{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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)
297962
+ if (!{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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)
297879
297963
  return;
297880
- const buildTime = new Date({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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();
297964
+ const buildTime = new Date({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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();
297881
297965
  if (isNaN(buildTime))
297882
297966
  return;
297883
297967
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -314107,7 +314191,7 @@ function getAssistantMessageFromError(error40, model, options2) {
314107
314191
  if (process.env.USER_TYPE === "ant") {
314108
314192
  const baseMessage = `API Error: 400 ${error40.message}
314109
314193
 
314110
- Run /share and post the JSON file to ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
314194
+ Run /share and post the JSON file to ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
314111
314195
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
314112
314196
  return createAssistantAPIErrorMessage({
314113
314197
  content: baseMessage + rewindInstruction,
@@ -314143,7 +314227,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-
314143
314227
  if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
314144
314228
  const orgId = getOauthAccountInfo()?.organizationUuid;
314145
314229
  const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
314146
- const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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.`;
314230
+ const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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.`;
314147
314231
  return createAssistantAPIErrorMessage({
314148
314232
  content: msg,
314149
314233
  error: "invalid_request"
@@ -324243,7 +324327,7 @@ function buildPrimarySection() {
324243
324327
  });
324244
324328
  return [{
324245
324329
  label: "Version",
324246
- value: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
324330
+ value: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
324247
324331
  }, {
324248
324332
  label: "Session name",
324249
324333
  value: nameValue
@@ -327994,7 +328078,7 @@ function Config({
327994
328078
  }
327995
328079
  })
327996
328080
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime183.jsx(ChannelDowngradeDialog, {
327997
- currentVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
328081
+ currentVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
327998
328082
  onChoice: (choice) => {
327999
328083
  setShowSubmenu(null);
328000
328084
  setTabsHidden(false);
@@ -328006,7 +328090,7 @@ function Config({
328006
328090
  autoUpdatesChannel: "stable"
328007
328091
  };
328008
328092
  if (choice === "stay") {
328009
- newSettings.minimumVersion = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
328093
+ newSettings.minimumVersion = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
328010
328094
  }
328011
328095
  updateSettingsForSource("userSettings", newSettings);
328012
328096
  setSettingsData((prev_27) => ({
@@ -336040,7 +336124,7 @@ function HelpV2(t0) {
336040
336124
  let t6;
336041
336125
  if ($2[31] !== tabs) {
336042
336126
  t6 = /* @__PURE__ */ jsx_runtime210.jsx(Tabs, {
336043
- title: `Theus v${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
336127
+ title: `Theus v${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
336044
336128
  color: "professionalBlue",
336045
336129
  defaultTab: "general",
336046
336130
  children: tabs
@@ -352764,6 +352848,16 @@ var init_mcp3 = __esm(() => {
352764
352848
  var NOVEDADES;
352765
352849
  var init_data = __esm(() => {
352766
352850
  NOVEDADES = [
352851
+ {
352852
+ version: "v0.2.10",
352853
+ fecha: "2026-07-11",
352854
+ titulo: "Navegador m\xE1s seguro y sin dejar Chrome colgado",
352855
+ puntos: [
352856
+ "Las navegaciones del navegador ahora piden tu aprobaci\xF3n por defecto: evita que una inyecci\xF3n de prompt abra una URL sola. Modo sin fricci\xF3n opt-in con THEUS_NAVEGADOR_AUTO=1.",
352857
+ "Solo se permiten esquemas http/https: se bloquean file:, javascript:, data: y similares, incluso en modo sin fricci\xF3n.",
352858
+ "El navegador ya no deja procesos de Chrome colgados: reusa la instancia viva entre sesiones y la cierra al salir de Theus."
352859
+ ]
352860
+ },
352767
352861
  {
352768
352862
  version: "v0.2.9",
352769
352863
  fecha: "2026-07-11",
@@ -353691,9 +353785,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
353691
353785
  return [];
353692
353786
  }
353693
353787
  }
353694
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
353788
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
353695
353789
  if (process.env.USER_TYPE === "ant") {
353696
- const changelog = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
353790
+ const changelog = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
353697
353791
  if (changelog) {
353698
353792
  const commits = changelog.trim().split(`
353699
353793
  `).filter(Boolean);
@@ -358081,7 +358175,7 @@ var init_Messages = __esm(() => {
358081
358175
  let t1;
358082
358176
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
358083
358177
  t1 = /* @__PURE__ */ jsx_runtime249.jsx(TheusSessionHeader, {
358084
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
358178
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
358085
358179
  });
358086
358180
  $2[0] = t1;
358087
358181
  } else {
@@ -385621,7 +385715,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
385621
385715
  smapsRollup,
385622
385716
  platform: process.platform,
385623
385717
  nodeVersion: process.version,
385624
- ccVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
385718
+ ccVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
385625
385719
  };
385626
385720
  }
385627
385721
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -386207,7 +386301,7 @@ var init_bridge_kick = __esm(() => {
386207
386301
  var call55 = async () => {
386208
386302
  return {
386209
386303
  type: "text",
386210
- value: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
386304
+ value: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
386211
386305
  };
386212
386306
  }, version2, version_default;
386213
386307
  var init_version = __esm(() => {
@@ -389948,7 +390042,7 @@ import {
389948
390042
  mkdtempSync,
389949
390043
  readFileSync as readFileSync23,
389950
390044
  realpathSync as realpathSync4,
389951
- rmSync as rmSync4,
390045
+ rmSync as rmSync5,
389952
390046
  writeFileSync as writeFileSync7
389953
390047
  } from "fs";
389954
390048
  import { tmpdir as tmpdir9 } from "os";
@@ -390052,13 +390146,13 @@ async function updateReleaseBundle() {
390052
390146
  await gracefulShutdown(1);
390053
390147
  return;
390054
390148
  }
390055
- if (gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390056
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
390149
+ if (gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390150
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
390057
390151
  `);
390058
390152
  await gracefulShutdown(0);
390059
390153
  return;
390060
390154
  }
390061
- writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
390155
+ writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
390062
390156
  `);
390063
390157
  writeToStdout(`Installing update from theus.pe/dl...
390064
390158
  `);
@@ -390092,12 +390186,12 @@ async function updateReleaseBundle() {
390092
390186
  return;
390093
390187
  }
390094
390188
  cpSync(staged, bundleDir, { recursive: true, force: true });
390095
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
390189
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
390096
390190
  `);
390097
390191
  await regenerateCompletionCache();
390098
390192
  } finally {
390099
390193
  try {
390100
- rmSync4(tmp, { recursive: true, force: true });
390194
+ rmSync5(tmp, { recursive: true, force: true });
390101
390195
  } catch {}
390102
390196
  }
390103
390197
  await gracefulShutdown(0);
@@ -390105,7 +390199,7 @@ async function updateReleaseBundle() {
390105
390199
  async function update() {
390106
390200
  logEvent("tengu_update_check", {});
390107
390201
  await updateNaupa();
390108
- writeToStdout(`Current version: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
390202
+ writeToStdout(`Current version: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
390109
390203
  `);
390110
390204
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
390111
390205
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -390184,8 +390278,8 @@ async function update() {
390184
390278
  writeToStdout(`Theus is managed by Homebrew.
390185
390279
  `);
390186
390280
  const latest = await getLatestVersion(channel2);
390187
- if (latest && !gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390188
- writeToStdout(`Update available: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
390281
+ if (latest && !gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390282
+ writeToStdout(`Update available: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
390189
390283
  `);
390190
390284
  writeToStdout(`
390191
390285
  `);
@@ -390201,8 +390295,8 @@ async function update() {
390201
390295
  writeToStdout(`Theus is managed by winget.
390202
390296
  `);
390203
390297
  const latest = await getLatestVersion(channel2);
390204
- if (latest && !gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390205
- writeToStdout(`Update available: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
390298
+ if (latest && !gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390299
+ writeToStdout(`Update available: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
390206
390300
  `);
390207
390301
  writeToStdout(`
390208
390302
  `);
@@ -390218,8 +390312,8 @@ async function update() {
390218
390312
  writeToStdout(`Theus is managed by apk.
390219
390313
  `);
390220
390314
  const latest = await getLatestVersion(channel2);
390221
- if (latest && !gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390222
- writeToStdout(`Update available: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
390315
+ if (latest && !gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390316
+ writeToStdout(`Update available: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
390223
390317
  `);
390224
390318
  writeToStdout(`
390225
390319
  `);
@@ -390284,11 +390378,11 @@ async function update() {
390284
390378
  `);
390285
390379
  await gracefulShutdown(1);
390286
390380
  }
390287
- if (result.latestVersion === { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
390288
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
390381
+ if (result.latestVersion === { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
390382
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
390289
390383
  `);
390290
390384
  } else {
390291
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
390385
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
390292
390386
  `);
390293
390387
  await regenerateCompletionCache();
390294
390388
  }
@@ -390307,9 +390401,9 @@ async function update() {
390307
390401
  await removeInstalledSymlink();
390308
390402
  }
390309
390403
  logForDebugging("update: Checking npm registry for latest version");
390310
- logForDebugging(`update: Package URL: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`);
390404
+ logForDebugging(`update: Package URL: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`);
390311
390405
  const npmTag = channel2 === "stable" ? "stable" : "latest";
390312
- const npmCommand = `npm view ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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`;
390406
+ const npmCommand = `npm view ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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`;
390313
390407
  logForDebugging(`update: Running: ${npmCommand}`);
390314
390408
  const latestVersion = await getLatestVersion(channel2);
390315
390409
  logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
@@ -390329,7 +390423,7 @@ async function update() {
390329
390423
  `);
390330
390424
  process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
390331
390425
  `);
390332
- if ({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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")) {
390426
+ if ({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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")) {
390333
390427
  process.stderr.write(` \u2022 Internal/development build not published to npm
390334
390428
  `);
390335
390429
  }
@@ -390341,19 +390435,19 @@ async function update() {
390341
390435
  `);
390342
390436
  process.stderr.write(` \u2022 Run with --debug flag for more details
390343
390437
  `);
390344
- const packageName = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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");
390438
+ const packageName = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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");
390345
390439
  process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
390346
390440
  `);
390347
390441
  process.stderr.write(` \u2022 Check if you need to login: npm whoami
390348
390442
  `);
390349
390443
  await gracefulShutdown(1);
390350
390444
  }
390351
- if (gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390352
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
390445
+ if (gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
390446
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
390353
390447
  `);
390354
390448
  await gracefulShutdown(0);
390355
390449
  }
390356
- writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
390450
+ writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
390357
390451
  `);
390358
390452
  writeToStdout(`Installing update...
390359
390453
  `);
@@ -390398,7 +390492,7 @@ async function update() {
390398
390492
  logForDebugging(`update: Installation status: ${status2}`);
390399
390493
  switch (status2) {
390400
390494
  case "success":
390401
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
390495
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
390402
390496
  `);
390403
390497
  await regenerateCompletionCache();
390404
390498
  break;
@@ -390408,7 +390502,7 @@ async function update() {
390408
390502
  if (useLocalUpdate) {
390409
390503
  process.stderr.write(`Try manually updating with:
390410
390504
  `);
390411
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}
390505
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}
390412
390506
  `);
390413
390507
  } else {
390414
390508
  process.stderr.write(`Try running with sudo or fix npm permissions
@@ -390424,7 +390518,7 @@ async function update() {
390424
390518
  if (useLocalUpdate) {
390425
390519
  process.stderr.write(`Try manually updating with:
390426
390520
  `);
390427
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}
390521
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}
390428
390522
  `);
390429
390523
  } else {
390430
390524
  process.stderr.write(`Or consider using native installation with: theus install
@@ -397324,7 +397418,7 @@ var init_sessionStorage = __esm(() => {
397324
397418
  init_settings2();
397325
397419
  init_slowOperations();
397326
397420
  init_uuid();
397327
- VERSION4 = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
397421
+ VERSION4 = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
397328
397422
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
397329
397423
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
397330
397424
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -398529,7 +398623,7 @@ var init_filesystem = __esm(() => {
398529
398623
  });
398530
398624
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
398531
398625
  const nonce = randomBytes21(16).toString("hex");
398532
- return join146(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
398626
+ return join146(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
398533
398627
  });
398534
398628
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
398535
398629
  });
@@ -403704,7 +403798,7 @@ function getSimpleDoingTasksSection() {
403704
403798
  ];
403705
403799
  const userHelpSubitems = [
403706
403800
  `/help: Get help with using Theus`,
403707
- `To give feedback, users should ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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}`
403801
+ `To give feedback, users should ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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}`
403708
403802
  ];
403709
403803
  const items = [
403710
403804
  `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.`,
@@ -404527,7 +404621,7 @@ function computeFingerprint(messageText, version3) {
404527
404621
  }
404528
404622
  function computeFingerprintFromMessages(messages) {
404529
404623
  const firstMessageText = extractFirstMessageText(messages);
404530
- return computeFingerprint(firstMessageText, { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
404624
+ return computeFingerprint(firstMessageText, { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
404531
404625
  }
404532
404626
  var FINGERPRINT_SALT = "59cf53e54c78";
404533
404627
  var init_fingerprint = () => {};
@@ -407051,7 +407145,7 @@ async function sideQuery(opts) {
407051
407145
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
407052
407146
  }
407053
407147
  const messageText = extractFirstUserMessageText(messages);
407054
- const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
407148
+ const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
407055
407149
  const attributionHeader = getAttributionHeader(fingerprint);
407056
407150
  const systemBlocks = [
407057
407151
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -408354,7 +408448,7 @@ async function handleMemories(state) {
408354
408448
  async function runProjectContextMcpServer() {
408355
408449
  const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
408356
408450
  const state = new ProjectContextState(projectRoot);
408357
- const server = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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: {} } });
408451
+ const server = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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: {} } });
408358
408452
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
408359
408453
  tools: TOOL_DEFINITIONS.map((t) => ({
408360
408454
  name: t.name,
@@ -409849,7 +409943,7 @@ import {
409849
409943
  existsSync as existsSync21,
409850
409944
  mkdirSync as mkdirSync12,
409851
409945
  readFileSync as readFileSync27,
409852
- rmSync as rmSync5,
409946
+ rmSync as rmSync6,
409853
409947
  writeFileSync as writeFileSync11
409854
409948
  } from "fs";
409855
409949
  import { homedir as homedir41 } from "os";
@@ -409896,7 +409990,7 @@ async function doStart() {
409896
409990
  try {
409897
409991
  const current = readPid();
409898
409992
  if (current === process.pid)
409899
- rmSync5(pidFilePath(), { force: true });
409993
+ rmSync6(pidFilePath(), { force: true });
409900
409994
  } catch {}
409901
409995
  };
409902
409996
  process.on("exit", cleanup);
@@ -409911,7 +410005,7 @@ function doStop() {
409911
410005
  }
409912
410006
  if (!isAlive(pid)) {
409913
410007
  console.log(`El daemon de Theus no est\xE1 corriendo (PID ${pid} muerto). Limpiando pidfile.`);
409914
- rmSync5(pidFilePath(), { force: true });
410008
+ rmSync6(pidFilePath(), { force: true });
409915
410009
  return;
409916
410010
  }
409917
410011
  try {
@@ -410096,7 +410190,7 @@ Vuelve a ejecutar con --confirm para eliminarlo.`);
410096
410190
  return;
410097
410191
  }
410098
410192
  try {
410099
- rmSync5(spec.path, { force: true });
410193
+ rmSync6(spec.path, { force: true });
410100
410194
  console.log(`Archivo de servicio eliminado: ${spec.path}`);
410101
410195
  } catch (e) {
410102
410196
  console.error(`No se pudo eliminar el servicio: ${e?.message}`);
@@ -414096,7 +414190,7 @@ function buildSystemInitMessage(inputs) {
414096
414190
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
414097
414191
  apiKeySource: getTheusApiKeyWithSource().source,
414098
414192
  betas: getSdkBetas(),
414099
- theus_code_version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
414193
+ theus_code_version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
414100
414194
  output_style: outputStyle2,
414101
414195
  agents: inputs.agents.map((agent) => agent.agentType),
414102
414196
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -428730,7 +428824,7 @@ var init_useVoiceEnabled = __esm(() => {
428730
428824
  function getSemverPart(version3) {
428731
428825
  return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
428732
428826
  }
428733
- function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
428827
+ function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
428734
428828
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react217.useState(() => getSemverPart(initialVersion));
428735
428829
  if (!updatedVersion) {
428736
428830
  return null;
@@ -428770,7 +428864,7 @@ function AutoUpdater({
428770
428864
  return;
428771
428865
  }
428772
428866
  if (false) {}
428773
- const currentVersion = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
428867
+ const currentVersion = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
428774
428868
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
428775
428869
  let latestVersion = await getLatestVersion(channel2);
428776
428870
  const isDisabled2 = isAutoUpdaterDisabled();
@@ -428906,7 +429000,7 @@ function AutoUpdater({
428906
429000
  " ",
428907
429001
  /* @__PURE__ */ jsx_runtime387.jsx(ThemedText, {
428908
429002
  bold: true,
428909
- children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.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.9", BUILD_TIME: "1970-01-01T00:00:00.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}`
429003
+ children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.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.10", BUILD_TIME: "1970-01-01T00:00:00.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}`
428910
429004
  })
428911
429005
  ]
428912
429006
  })
@@ -428983,12 +429077,12 @@ function NativeAutoUpdater({
428983
429077
  logEvent("tengu_native_auto_updater_start", {});
428984
429078
  try {
428985
429079
  const maxVersion = await getMaxVersion();
428986
- if (maxVersion && gt({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
429080
+ if (maxVersion && gt({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
428987
429081
  const msg = await getMaxVersionMessage();
428988
429082
  setMaxVersionIssue(msg ?? "affects your version");
428989
429083
  }
428990
429084
  const result = await installLatest(channel2);
428991
- const currentVersion = { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
429085
+ const currentVersion = { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
428992
429086
  const latencyMs = Date.now() - startTime2;
428993
429087
  if (result.lockFailed) {
428994
429088
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -429125,17 +429219,17 @@ function PackageManagerAutoUpdater(t0) {
429125
429219
  const maxVersion = await getMaxVersion();
429126
429220
  if (maxVersion && latest && gt(latest, maxVersion)) {
429127
429221
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
429128
- if (gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
429129
- logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
429222
+ if (gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
429223
+ logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
429130
429224
  setUpdateAvailable(false);
429131
429225
  return;
429132
429226
  }
429133
429227
  latest = maxVersion;
429134
429228
  }
429135
- const hasUpdate = latest && !gte({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
429229
+ const hasUpdate = latest && !gte({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
429136
429230
  setUpdateAvailable(!!hasUpdate);
429137
429231
  if (hasUpdate) {
429138
- logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
429232
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
429139
429233
  }
429140
429234
  };
429141
429235
  $2[0] = t1;
@@ -429169,7 +429263,7 @@ function PackageManagerAutoUpdater(t0) {
429169
429263
  wrap: "truncate",
429170
429264
  children: [
429171
429265
  "currentVersion: ",
429172
- { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
429266
+ { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
429173
429267
  ]
429174
429268
  });
429175
429269
  $2[3] = verbose;
@@ -437042,7 +437136,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
437042
437136
  project_dir: getOriginalCwd(),
437043
437137
  added_dirs: addedDirs
437044
437138
  },
437045
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
437139
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
437046
437140
  output_style: {
437047
437141
  name: outputStyleName
437048
437142
  },
@@ -448662,7 +448756,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
448662
448756
  } catch {}
448663
448757
  const data = {
448664
448758
  trigger,
448665
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
448759
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
448666
448760
  platform: process.platform,
448667
448761
  transcript,
448668
448762
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -461613,7 +461707,7 @@ function Onboarding({
461613
461707
  flexDirection: "column",
461614
461708
  children: [
461615
461709
  /* @__PURE__ */ jsx_runtime462.jsx(TheusBanner, {
461616
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
461710
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
461617
461711
  }),
461618
461712
  /* @__PURE__ */ jsx_runtime462.jsxs(ThemedBox_default, {
461619
461713
  flexDirection: "column",
@@ -462484,7 +462578,7 @@ function completeOnboarding() {
462484
462578
  saveGlobalConfig((current) => ({
462485
462579
  ...current,
462486
462580
  hasCompletedOnboarding: true,
462487
- lastOnboardingVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
462581
+ lastOnboardingVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
462488
462582
  }));
462489
462583
  }
462490
462584
  function showDialog(root2, renderer) {
@@ -467851,7 +467945,7 @@ function appendToLog(path21, message) {
467851
467945
  cwd: getFsImplementation().cwd(),
467852
467946
  userType: process.env.USER_TYPE,
467853
467947
  sessionId: getSessionId(),
467854
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
467948
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
467855
467949
  };
467856
467950
  getLogWriter(path21).write(messageWithTimestamp);
467857
467951
  }
@@ -471985,8 +472079,8 @@ async function getEnvLessBridgeConfig() {
471985
472079
  }
471986
472080
  async function checkEnvLessBridgeMinVersion() {
471987
472081
  const cfg = await getEnvLessBridgeConfig();
471988
- if (cfg.min_version && lt({ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
471989
- return `Your version of Theus (${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
472082
+ if (cfg.min_version && lt({ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
472083
+ return `Your version of Theus (${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
471990
472084
  Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
471991
472085
  }
471992
472086
  return null;
@@ -472460,7 +472554,7 @@ async function initBridgeCore(params) {
472460
472554
  const rawApi = createBridgeApiClient({
472461
472555
  baseUrl,
472462
472556
  getAccessToken,
472463
- runnerVersion: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
472557
+ runnerVersion: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
472464
472558
  onDebug: logForDebugging,
472465
472559
  onAuth401,
472466
472560
  getTrustedDeviceToken
@@ -477726,7 +477820,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
477726
477820
  setCwd(cwd3);
477727
477821
  const server = new Server({
477728
477822
  name: "theus/tengu",
477729
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
477823
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
477730
477824
  }, {
477731
477825
  capabilities: {
477732
477826
  tools: {}
@@ -479168,7 +479262,7 @@ async function setupTokenHandler(root2) {
479168
479262
  gap: 1,
479169
479263
  children: [
479170
479264
  /* @__PURE__ */ jsx_runtime479.jsx(TheusBanner, {
479171
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
479265
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
479172
479266
  }),
479173
479267
  showAuthWarning && /* @__PURE__ */ jsx_runtime479.jsxs(ThemedBox_default, {
479174
479268
  flexDirection: "column",
@@ -480580,7 +480674,7 @@ ${customInstructions}` : customInstructions;
480580
480674
  }
480581
480675
  }
480582
480676
  logForDiagnosticsNoPII("info", "started", {
480583
- version: { VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
480677
+ version: { VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
480584
480678
  is_native_binary: isInBundledMode()
480585
480679
  });
480586
480680
  registerCleanup(async () => {
@@ -481364,7 +481458,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
481364
481458
  pendingHookMessages
481365
481459
  }, renderAndRun);
481366
481460
  }
481367
- }).version(`${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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");
481461
+ }).version(`${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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");
481368
481462
  program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
481369
481463
  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.");
481370
481464
  if (canUserConfigureAdvisor()) {
@@ -481878,7 +481972,7 @@ if (false) {}
481878
481972
  async function main2() {
481879
481973
  const args = process.argv.slice(2);
481880
481974
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
481881
- console.log(`${{ VERSION: "0.2.9", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
481975
+ console.log(`${{ VERSION: "0.2.10", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
481882
481976
  return;
481883
481977
  }
481884
481978
  const {