theus-cli 0.2.24 → 0.2.26

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 +920 -325
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -49423,6 +49423,16 @@ var init_managedPath = __esm(() => {
49423
49423
  });
49424
49424
  });
49425
49425
 
49426
+ // proactive/proactiveEnabled.ts
49427
+ function isProactiveForced() {
49428
+ return PROACTIVE_FORCED;
49429
+ }
49430
+ var PROACTIVE_FORCED;
49431
+ var init_proactiveEnabled = __esm(() => {
49432
+ init_envUtils();
49433
+ PROACTIVE_FORCED = isEnvTruthy(process.env.THEUS_PROACTIVE);
49434
+ });
49435
+
49426
49436
  // utils/lazySchema.ts
49427
49437
  function lazySchema(factory2) {
49428
49438
  let cached2;
@@ -51178,6 +51188,7 @@ function isMcpServerUrlEntry(entry) {
51178
51188
  }
51179
51189
  var EnvironmentVariablesSchema, PermissionsSchema, ExtraKnownMarketplaceSchema, AllowedMcpServerEntrySchema, DeniedMcpServerEntrySchema, CUSTOMIZATION_SURFACES, SettingsSchema;
51180
51190
  var init_types3 = __esm(() => {
51191
+ init_proactiveEnabled();
51181
51192
  init_v4();
51182
51193
  init_sandboxTypes();
51183
51194
  init_envUtils();
@@ -51356,7 +51367,10 @@ var init_types3 = __esm(() => {
51356
51367
  ...process.env.USER_TYPE === "ant" ? {
51357
51368
  classifierPermissionsEnabled: exports_external.boolean().optional().describe("Enable AI-based classification for Bash(prompt:...) permission rules")
51358
51369
  } : {},
51359
- ...{},
51370
+ ...isProactiveForced() ? {
51371
+ minSleepDurationMs: exports_external.number().nonnegative().int().optional().describe("Minimum duration in milliseconds that the Sleep tool must sleep for. " + "Useful for throttling proactive tick frequency."),
51372
+ maxSleepDurationMs: exports_external.number().int().min(-1).optional().describe("Maximum duration in milliseconds that the Sleep tool can sleep for. " + "Set to -1 for indefinite sleep (waits for user input). " + "Useful for limiting idle time in remote/managed environments.")
51373
+ } : {},
51360
51374
  ...{},
51361
51375
  ...{},
51362
51376
  channelsEnabled: exports_external.boolean().optional().describe("Teams/Enterprise opt-in for channel notifications (MCP servers with the " + "theus/channel capability pushing inbound messages). Default off. " + "Set true to allow; users then select servers via --channels."),
@@ -58304,7 +58318,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
58304
58318
  if (isApiKeyHelperFromProjectOrLocalSettings()) {
58305
58319
  const hasTrust = checkHasTrustDialogAccepted();
58306
58320
  if (!hasTrust && !isNonInteractiveSession) {
58307
- const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58321
+ const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58308
58322
  logAntError("apiKeyHelper invoked before trust check", error40);
58309
58323
  logEvent("tengu_apiKeyHelper_missing_trust11", {});
58310
58324
  return null;
@@ -58348,7 +58362,7 @@ async function runAwsAuthRefresh() {
58348
58362
  if (isAwsAuthRefreshFromProjectSettings()) {
58349
58363
  const hasTrust = checkHasTrustDialogAccepted();
58350
58364
  if (!hasTrust && !getIsNonInteractiveSession()) {
58351
- const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58365
+ const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58352
58366
  logAntError("awsAuthRefresh invoked before trust check", error40);
58353
58367
  logEvent("tengu_awsAuthRefresh_missing_trust", {});
58354
58368
  return false;
@@ -58408,7 +58422,7 @@ async function getAwsCredsFromCredentialExport() {
58408
58422
  if (isAwsCredentialExportFromProjectSettings()) {
58409
58423
  const hasTrust = checkHasTrustDialogAccepted();
58410
58424
  if (!hasTrust && !getIsNonInteractiveSession()) {
58411
- const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58425
+ const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58412
58426
  logAntError("awsCredentialExport invoked before trust check", error40);
58413
58427
  logEvent("tengu_awsCredentialExport_missing_trust", {});
58414
58428
  return null;
@@ -58493,7 +58507,7 @@ async function runGcpAuthRefresh() {
58493
58507
  if (isGcpAuthRefreshFromProjectSettings()) {
58494
58508
  const hasTrust = checkHasTrustDialogAccepted();
58495
58509
  if (!hasTrust && !getIsNonInteractiveSession()) {
58496
- const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58510
+ const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58497
58511
  logAntError("gcpAuthRefresh invoked before trust check", error40);
58498
58512
  logEvent("tengu_gcpAuthRefresh_missing_trust", {});
58499
58513
  return false;
@@ -59188,7 +59202,7 @@ var init_auth = __esm(() => {
59188
59202
 
59189
59203
  // utils/userAgent.ts
59190
59204
  function getTheusCodeUserAgent() {
59191
- return `theus-code/${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59205
+ return `theus-code/${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59192
59206
  }
59193
59207
 
59194
59208
  // utils/workloadContext.ts
@@ -59210,7 +59224,7 @@ function getUserAgent() {
59210
59224
  const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
59211
59225
  const workload = getWorkload();
59212
59226
  const workloadSuffix = workload ? `, workload/${workload}` : "";
59213
- return `theus-cli/${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
59227
+ return `theus-cli/${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
59214
59228
  }
59215
59229
  function getMCPUserAgent() {
59216
59230
  const parts = [];
@@ -59224,7 +59238,7 @@ function getMCPUserAgent() {
59224
59238
  parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
59225
59239
  }
59226
59240
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
59227
- return `theus-code/${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
59241
+ return `theus-code/${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
59228
59242
  }
59229
59243
  function getWebFetchUserAgent() {
59230
59244
  return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
@@ -59362,7 +59376,7 @@ var init_user = __esm(() => {
59362
59376
  deviceId,
59363
59377
  sessionId: getSessionId(),
59364
59378
  email: getEmail(),
59365
- appVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59379
+ appVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59366
59380
  platform: getHostPlatformForAnalytics(),
59367
59381
  organizationUuid,
59368
59382
  accountUuid,
@@ -61077,7 +61091,7 @@ var init_metadata = __esm(() => {
61077
61091
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
61078
61092
  WHITESPACE_REGEX = /\s+/;
61079
61093
  getVersionBase = memoize_default(() => {
61080
- const match = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
61094
+ const match = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
61081
61095
  return match ? match[0] : undefined;
61082
61096
  });
61083
61097
  buildEnvContext = memoize_default(async () => {
@@ -61117,9 +61131,9 @@ var init_metadata = __esm(() => {
61117
61131
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
61118
61132
  isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
61119
61133
  isTheusAiAuth: isTheusAISubscriber(),
61120
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
61134
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
61121
61135
  versionBase: getVersionBase(),
61122
- buildTime: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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,
61136
+ buildTime: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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,
61123
61137
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
61124
61138
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
61125
61139
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -61785,7 +61799,7 @@ function initialize1PEventLogging() {
61785
61799
  const platform2 = getPlatform();
61786
61800
  const attributes = {
61787
61801
  [ATTR_SERVICE_NAME]: "theus-code",
61788
- [ATTR_SERVICE_VERSION]: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61802
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61789
61803
  };
61790
61804
  if (platform2 === "wsl") {
61791
61805
  const wslVersion = getWslVersion();
@@ -61812,7 +61826,7 @@ function initialize1PEventLogging() {
61812
61826
  })
61813
61827
  ]
61814
61828
  });
61815
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61829
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61816
61830
  }
61817
61831
  async function reinitialize1PEventLoggingIfConfigChanged() {
61818
61832
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -63683,7 +63697,7 @@ function getAttributionHeader(fingerprint) {
63683
63697
  if (!isAttributionHeaderEnabled()) {
63684
63698
  return "";
63685
63699
  }
63686
- const version2 = `${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
63700
+ const version2 = `${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
63687
63701
  const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
63688
63702
  const cch = "";
63689
63703
  const workload = getWorkload();
@@ -107783,7 +107797,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
107783
107797
  }
107784
107798
  function getFeedbackGuideline() {
107785
107799
  if (isUsing3PServices()) {
107786
- return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`;
107800
+ return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`;
107787
107801
  }
107788
107802
  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";
107789
107803
  }
@@ -117041,20 +117055,20 @@ var init_headlessProfiler = __esm(() => {
117041
117055
  });
117042
117056
 
117043
117057
  // tools/SleepTool/prompt.ts
117044
- var SLEEP_TOOL_NAME = "Sleep", DESCRIPTION6 = "Wait for a specified duration", SLEEP_TOOL_PROMPT;
117058
+ var SLEEP_TOOL_NAME = "Sleep", DESCRIPTION6 = "Espera una duraci\xF3n determinada", SLEEP_TOOL_PROMPT;
117045
117059
  var init_prompt8 = __esm(() => {
117046
117060
  init_xml();
117047
- SLEEP_TOOL_PROMPT = `Wait for a specified duration. The user can interrupt the sleep at any time.
117061
+ SLEEP_TOOL_PROMPT = `Espera una duraci\xF3n determinada. El usuario puede interrumpir la espera en cualquier momento.
117048
117062
 
117049
- Use this when the user tells you to sleep or rest, when you have nothing to do, or when you're waiting for something.
117063
+ \xDAsala cuando el usuario te diga que duermas o descanses, cuando no tengas nada que hacer, o cuando est\xE9s esperando algo.
117050
117064
 
117051
- You may receive <${TICK_TAG}> prompts \u2014 these are periodic check-ins. Look for useful work to do before sleeping.
117065
+ Puedes recibir mensajes <${TICK_TAG}> \u2014 son verificaciones peri\xF3dicas. Busca trabajo \xFAtil que hacer antes de dormir.
117052
117066
 
117053
- You can call this concurrently with other tools \u2014 it won't interfere with them.
117067
+ Puedes llamarla en paralelo con otras herramientas \u2014 no interfiere con ellas.
117054
117068
 
117055
- Prefer this over \`Bash(sleep ...)\` \u2014 it doesn't hold a shell process.
117069
+ Prefi\xE9rela sobre \`Bash(sleep ...)\` \u2014 no retiene un proceso de shell.
117056
117070
 
117057
- Each wake-up costs an API call, but the prompt cache expires after 5 minutes of inactivity \u2014 balance accordingly.`;
117071
+ Cada despertar cuesta una llamada a la API; balancea en consecuencia.`;
117058
117072
  });
117059
117073
 
117060
117074
  // utils/hooks/postSamplingHooks.ts
@@ -166488,7 +166502,7 @@ function getTelemetryAttributes() {
166488
166502
  attributes["session.id"] = sessionId;
166489
166503
  }
166490
166504
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
166491
- attributes["app.version"] = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
166505
+ attributes["app.version"] = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
166492
166506
  }
166493
166507
  const oauthAccount = getOauthAccountInfo();
166494
166508
  if (oauthAccount) {
@@ -202546,7 +202560,7 @@ function getInstallationEnv() {
202546
202560
  return;
202547
202561
  }
202548
202562
  function getTheusCodeVersion() {
202549
- return { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
202563
+ return { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
202550
202564
  }
202551
202565
  async function getInstalledVSCodeExtensionVersion(command) {
202552
202566
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -204064,7 +204078,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
204064
204078
  if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
204065
204079
  const hasTrust = checkHasTrustDialogAccepted();
204066
204080
  if (!hasTrust) {
204067
- 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.24", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
204081
+ 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.26", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
204068
204082
  logAntError("MCP headersHelper invoked before trust check", error40);
204069
204083
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
204070
204084
  return null;
@@ -205274,7 +205288,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
205274
205288
  const client2 = new Client({
205275
205289
  name: "theus-code",
205276
205290
  title: "Theus",
205277
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205291
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205278
205292
  description: "Theus's agentic coding tool",
205279
205293
  websiteUrl: PRODUCT_URL
205280
205294
  }, {
@@ -205628,7 +205642,7 @@ var init_client5 = __esm(() => {
205628
205642
  const client2 = new Client({
205629
205643
  name: "theus-code",
205630
205644
  title: "Theus",
205631
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205645
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
205632
205646
  description: "Theus's agentic coding tool",
205633
205647
  websiteUrl: PRODUCT_URL
205634
205648
  }, {
@@ -216206,7 +216220,7 @@ async function initializeBetaTracing(resource) {
216206
216220
  });
216207
216221
  logs.setGlobalLoggerProvider(loggerProvider);
216208
216222
  setLoggerProvider(loggerProvider);
216209
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216223
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216210
216224
  setEventLogger(eventLogger);
216211
216225
  process.on("beforeExit", async () => {
216212
216226
  await loggerProvider?.forceFlush();
@@ -216246,7 +216260,7 @@ async function initializeTelemetry() {
216246
216260
  const platform4 = getPlatform();
216247
216261
  const baseAttributes = {
216248
216262
  [ATTR_SERVICE_NAME]: "theus-code",
216249
- [ATTR_SERVICE_VERSION]: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
216263
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
216250
216264
  };
216251
216265
  if (platform4 === "wsl") {
216252
216266
  const wslVersion = getWslVersion();
@@ -216291,7 +216305,7 @@ async function initializeTelemetry() {
216291
216305
  } catch {}
216292
216306
  };
216293
216307
  registerCleanup(shutdownTelemetry2);
216294
- return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216308
+ return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216295
216309
  }
216296
216310
  const meterProvider = new MeterProvider({
216297
216311
  resource,
@@ -216311,7 +216325,7 @@ async function initializeTelemetry() {
216311
216325
  });
216312
216326
  logs.setGlobalLoggerProvider(loggerProvider);
216313
216327
  setLoggerProvider(loggerProvider);
216314
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216328
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216315
216329
  setEventLogger(eventLogger);
216316
216330
  logForDebugging("[3P telemetry] Event logger set successfully");
216317
216331
  process.on("beforeExit", async () => {
@@ -216373,7 +216387,7 @@ Current timeout: ${timeoutMs}ms
216373
216387
  }
216374
216388
  };
216375
216389
  registerCleanup(shutdownTelemetry);
216376
- return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216390
+ return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
216377
216391
  }
216378
216392
  async function flushTelemetry() {
216379
216393
  const meterProvider = getMeterProvider();
@@ -216913,7 +216927,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
216913
216927
  return "install_failed";
216914
216928
  }
216915
216929
  const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
216916
- const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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 });
216930
+ const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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 });
216917
216931
  if (result.code !== 0) {
216918
216932
  const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
216919
216933
  logError2(error40);
@@ -217059,9 +217073,9 @@ async function assertMinVersion() {
217059
217073
  if (false) {}
217060
217074
  try {
217061
217075
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
217062
- if (versionConfig.minVersion && lt({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
217076
+ if (versionConfig.minVersion && lt({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
217063
217077
  console.error(`
217064
- It looks like your version of Theus (${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
217078
+ It looks like your version of Theus (${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
217065
217079
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
217066
217080
 
217067
217081
  To update, please run:
@@ -217202,7 +217216,7 @@ async function getInstallationPrefix() {
217202
217216
  return prefixResult.stdout.trim();
217203
217217
  }
217204
217218
  function getGlobalInstallPackageManager() {
217205
- if ({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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") {
217219
+ if ({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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") {
217206
217220
  return "npm";
217207
217221
  }
217208
217222
  return env3.isRunningWithBun() ? "bun" : "npm";
@@ -217227,7 +217241,7 @@ async function checkGlobalInstallPermissions() {
217227
217241
  }
217228
217242
  async function getLatestVersion(channel2) {
217229
217243
  const npmTag = channel2 === "stable" ? "stable" : "latest";
217230
- const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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() });
217244
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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() });
217231
217245
  if (result.code !== 0) {
217232
217246
  logForDebugging(`npm view failed with code ${result.code}`);
217233
217247
  if (result.stderr) {
@@ -217243,7 +217257,7 @@ async function getLatestVersion(channel2) {
217243
217257
  return result.stdout.trim();
217244
217258
  }
217245
217259
  async function getNpmDistTags() {
217246
- const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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() });
217260
+ const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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() });
217247
217261
  if (result.code !== 0) {
217248
217262
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
217249
217263
  return { latest: null, stable: null };
@@ -217283,7 +217297,7 @@ async function installGlobalPackage(specificVersion) {
217283
217297
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
217284
217298
  logEvent("tengu_auto_updater_lock_contention", {
217285
217299
  pid: process.pid,
217286
- currentVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217300
+ currentVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217287
217301
  });
217288
217302
  return "in_progress";
217289
217303
  }
@@ -217292,7 +217306,7 @@ async function installGlobalPackage(specificVersion) {
217292
217306
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
217293
217307
  logError2(new Error("Windows NPM detected in WSL environment"));
217294
217308
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
217295
- currentVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217309
+ currentVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
217296
217310
  });
217297
217311
  console.error(`
217298
217312
  Error: Windows NPM detected in WSL
@@ -217311,7 +217325,7 @@ To fix this issue:
217311
217325
  if (!hasPermissions) {
217312
217326
  return "no_permissions";
217313
217327
  }
217314
- const packageSpec = specificVersion ? `${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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;
217328
+ const packageSpec = specificVersion ? `${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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;
217315
217329
  const packageManager = getGlobalInstallPackageManager();
217316
217330
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
217317
217331
  if (installResult.code !== 0) {
@@ -217639,8 +217653,8 @@ async function detectMultipleInstallations() {
217639
217653
  installations.push({ type: "npm-local", path: localPath });
217640
217654
  }
217641
217655
  const packagesToCheck = ["@theus-ai/theus-code"];
217642
- if ({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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") {
217643
- packagesToCheck.push({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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);
217656
+ if ({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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") {
217657
+ packagesToCheck.push({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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);
217644
217658
  }
217645
217659
  const npmResult = await execFileNoThrow("npm", [
217646
217660
  "-g",
@@ -217823,7 +217837,7 @@ function detectLinuxGlobPatternWarnings() {
217823
217837
  }
217824
217838
  async function getDoctorDiagnostic() {
217825
217839
  const installationType = await getCurrentInstallationType();
217826
- const version2 = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
217840
+ const version2 = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
217827
217841
  const installationPath = await getInstallationPath();
217828
217842
  const invokedBinary = getInvokedBinary();
217829
217843
  const multipleInstallations = await detectMultipleInstallations();
@@ -217835,8 +217849,8 @@ async function getDoctorDiagnostic() {
217835
217849
  for (const install of npmInstalls) {
217836
217850
  if (install.type === "npm-global") {
217837
217851
  let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
217838
- if ({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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") {
217839
- uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`;
217852
+ if ({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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") {
217853
+ uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`;
217840
217854
  }
217841
217855
  warnings.push({
217842
217856
  issue: `Leftover npm global installation at ${install.path}`,
@@ -217948,7 +217962,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217948
217962
  const startTime2 = Date.now();
217949
217963
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
217950
217964
  "view",
217951
- `${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`,
217965
+ `${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`,
217952
217966
  "version",
217953
217967
  "--prefer-online",
217954
217968
  "--registry",
@@ -217972,7 +217986,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
217972
217986
  latency_ms: latencyMs,
217973
217987
  source_npm: true
217974
217988
  });
217975
- logForDebugging(`npm view ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`);
217989
+ logForDebugging(`npm view ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`);
217976
217990
  const latestVersion = stdout.trim();
217977
217991
  return latestVersion;
217978
217992
  }
@@ -218028,7 +218042,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218028
218042
  const fs3 = getFsImplementation();
218029
218043
  await fs3.rm(stagingPath, { recursive: true, force: true });
218030
218044
  const platform4 = getPlatform2();
218031
- const platformPackageName = `${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`;
218045
+ const platformPackageName = `${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`;
218032
218046
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
218033
218047
  const {
218034
218048
  stdout: integrityOutput,
@@ -218057,7 +218071,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218057
218071
  name: "theus-native-installer",
218058
218072
  version: "0.0.1",
218059
218073
  dependencies: {
218060
- [{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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
218074
+ [{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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
218061
218075
  }
218062
218076
  };
218063
218077
  const packageLock = {
@@ -218070,10 +218084,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218070
218084
  name: "theus-native-installer",
218071
218085
  version: "0.0.1",
218072
218086
  dependencies: {
218073
- [{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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
218087
+ [{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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
218074
218088
  }
218075
218089
  },
218076
- [`node_modules/${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
218090
+ [`node_modules/${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
218077
218091
  version: version2,
218078
218092
  optionalDependencies: {
218079
218093
  [platformPackageName]: version2
@@ -218095,7 +218109,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
218095
218109
  if (result.code !== 0) {
218096
218110
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
218097
218111
  }
218098
- logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`);
218112
+ logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`);
218099
218113
  }
218100
218114
  function getStallTimeoutMs() {
218101
218115
  return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -218758,8 +218772,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218758
218772
  const maxVersion = await getMaxVersion();
218759
218773
  if (maxVersion && gt(version2, maxVersion)) {
218760
218774
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
218761
- if (gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218762
- logForDebugging(`Native installer: current version ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
218775
+ if (gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218776
+ logForDebugging(`Native installer: current version ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
218763
218777
  logEvent("tengu_native_update_skipped_max_version", {
218764
218778
  latency_ms: Date.now() - startTime2,
218765
218779
  max_version: maxVersion,
@@ -218770,7 +218784,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
218770
218784
  version2 = maxVersion;
218771
218785
  }
218772
218786
  }
218773
- if (!forceReinstall && version2 === { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218787
+ if (!forceReinstall && version2 === { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
218774
218788
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
218775
218789
  logEvent("tengu_native_update_complete", {
218776
218790
  latency_ms: Date.now() - startTime2,
@@ -219520,8 +219534,8 @@ async function cleanupNpmInstallations() {
219520
219534
  } else if (codePackageResult.error) {
219521
219535
  errors4.push(codePackageResult.error);
219522
219536
  }
219523
- if ({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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") {
219524
- const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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);
219537
+ if ({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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") {
219538
+ const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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);
219525
219539
  if (macroPackageResult.success) {
219526
219540
  removed++;
219527
219541
  if (macroPackageResult.warning) {
@@ -275472,17 +275486,17 @@ var BRIEF_TOOL_NAME2 = "SendUserMessage", LEGACY_BRIEF_TOOL_NAME2 = "Brief", DES
275472
275486
 
275473
275487
  \`status\` labels intent: 'normal' when replying to what they just asked; 'proactive' when you're initiating \u2014 a scheduled task finished, a blocker surfaced during background work, you need input on something they haven't asked about. Set it honestly; downstream routing uses it.`, BRIEF_PROACTIVE_SECTION;
275474
275488
  var init_prompt14 = __esm(() => {
275475
- BRIEF_PROACTIVE_SECTION = `## Talking to the user
275489
+ BRIEF_PROACTIVE_SECTION = `## C\xF3mo hablarle al usuario
275476
275490
 
275477
- ${BRIEF_TOOL_NAME2} is where your replies go. Text outside it is visible if the user expands the detail view, but most won't \u2014 assume unread. Anything you want them to actually see goes through ${BRIEF_TOOL_NAME2}. The failure mode: the real answer lives in plain text while ${BRIEF_TOOL_NAME2} just says "done!" \u2014 they see "done!" and miss everything.
275491
+ Responde SIEMPRE en espa\xF1ol. ${BRIEF_TOOL_NAME2} es por donde salen tus respuestas. El texto fuera de esa herramienta se ve si el usuario expande la vista de detalle, pero la mayor\xEDa no lo har\xE1 \u2014 asume que no se lee. Todo lo que quieras que vea de verdad va por ${BRIEF_TOOL_NAME2}. El modo de fallo: la respuesta real queda en texto plano mientras ${BRIEF_TOOL_NAME2} solo dice "\xA1listo!" \u2014 el usuario ve "\xA1listo!" y se pierde todo lo dem\xE1s.
275478
275492
 
275479
- So: every time the user says something, the reply they actually read comes through ${BRIEF_TOOL_NAME2}. Even for "hi". Even for "thanks".
275493
+ As\xED que: cada vez que el usuario diga algo, la respuesta que realmente lee sale por ${BRIEF_TOOL_NAME2}. Incluso para un "hola". Incluso para un "gracias".
275480
275494
 
275481
- If you can answer right away, send the answer. If you need to go look \u2014 run a command, read files, check something \u2014 ack first in one line ("On it \u2014 checking the test output"), then work, then send the result. Without the ack they're staring at a spinner.
275495
+ Si puedes responder de inmediato, env\xEDa la respuesta. Si necesitas ir a mirar \u2014 correr un comando, leer archivos, verificar algo \u2014 primero acusa recibo en una l\xEDnea ("Voy \u2014 reviso la salida de los tests"), luego trabaja, luego env\xEDa el resultado. Sin ese acuse, el usuario se queda mirando un spinner.
275482
275496
 
275483
- For longer work: ack \u2192 work \u2192 result. Between those, send a checkpoint when something useful happened \u2014 a decision you made, a surprise you hit, a phase boundary. Skip the filler ("running tests...") \u2014 a checkpoint earns its place by carrying information.
275497
+ Para trabajo m\xE1s largo: acuse \u2192 trabajo \u2192 resultado. Entre medias, env\xEDa un checkpoint cuando pase algo \xFAtil \u2014 una decisi\xF3n que tomaste, una sorpresa que encontraste, el fin de una fase. Evita el relleno ("corriendo tests...") \u2014 un checkpoint se gana su lugar cuando lleva informaci\xF3n.
275484
275498
 
275485
- Keep messages tight \u2014 the decision, the file:line, the PR number. Second person always ("your config"), never third.`;
275499
+ Mant\xE9n los mensajes concisos \u2014 la decisi\xF3n, el archivo:l\xEDnea, el n\xFAmero de PR. Siempre en segunda persona ("tu config"), nunca en tercera.`;
275486
275500
  });
275487
275501
 
275488
275502
  // tools/BriefTool/UI.tsx
@@ -283808,6 +283822,129 @@ var init_UI25 = __esm(() => {
283808
283822
  jsx_runtime155 = __toESM(require_jsx_runtime(), 1);
283809
283823
  });
283810
283824
 
283825
+ // proactive/index.js
283826
+ var exports_proactive = {};
283827
+ __export(exports_proactive, {
283828
+ subscribeToProactiveChanges: () => subscribeToProactiveChanges,
283829
+ setNextTickAt: () => setNextTickAt,
283830
+ setContextBlocked: () => setContextBlocked,
283831
+ resumeProactive: () => resumeProactive,
283832
+ pauseProactive: () => pauseProactive,
283833
+ isProactivePaused: () => isProactivePaused,
283834
+ isProactiveForced: () => isProactiveForced,
283835
+ isProactiveActive: () => isProactiveActive,
283836
+ isContextBlocked: () => isContextBlocked,
283837
+ getProactiveSource: () => getProactiveSource,
283838
+ getNextTickAt: () => getNextTickAt,
283839
+ deactivateProactive: () => deactivateProactive,
283840
+ activateProactive: () => activateProactive,
283841
+ __resetProactiveState: () => __resetProactiveState
283842
+ });
283843
+ function debug(msg) {
283844
+ if (process.env.THEUS_PROACTIVE_DEBUG === "1") {
283845
+ try {
283846
+ process.stderr.write(`[proactive] ${msg}
283847
+ `);
283848
+ } catch {}
283849
+ }
283850
+ }
283851
+ function notify2() {
283852
+ for (const cb of Array.from(listeners)) {
283853
+ try {
283854
+ cb();
283855
+ } catch {}
283856
+ }
283857
+ }
283858
+ function isProactiveActive() {
283859
+ return active;
283860
+ }
283861
+ function isProactivePaused() {
283862
+ return paused;
283863
+ }
283864
+ function isContextBlocked() {
283865
+ return contextBlocked;
283866
+ }
283867
+ function getNextTickAt() {
283868
+ return nextTickAt;
283869
+ }
283870
+ function getProactiveSource() {
283871
+ return proactiveSource;
283872
+ }
283873
+ function subscribeToProactiveChanges(cb) {
283874
+ if (typeof cb !== "function")
283875
+ return () => {};
283876
+ listeners.add(cb);
283877
+ return () => {
283878
+ listeners.delete(cb);
283879
+ };
283880
+ }
283881
+ function activateProactive(src) {
283882
+ if (active && !paused) {
283883
+ if (src)
283884
+ proactiveSource = src;
283885
+ return;
283886
+ }
283887
+ active = true;
283888
+ paused = false;
283889
+ proactiveSource = src ?? proactiveSource ?? "command";
283890
+ debug(`activate (source=${proactiveSource})`);
283891
+ notify2();
283892
+ }
283893
+ function deactivateProactive() {
283894
+ if (!active && !paused && nextTickAt === null)
283895
+ return;
283896
+ active = false;
283897
+ paused = false;
283898
+ nextTickAt = null;
283899
+ debug("deactivate");
283900
+ notify2();
283901
+ }
283902
+ function pauseProactive() {
283903
+ if (!active || paused)
283904
+ return;
283905
+ paused = true;
283906
+ nextTickAt = null;
283907
+ debug("pause");
283908
+ notify2();
283909
+ }
283910
+ function resumeProactive() {
283911
+ if (!paused)
283912
+ return;
283913
+ paused = false;
283914
+ debug("resume");
283915
+ notify2();
283916
+ }
283917
+ function setContextBlocked(blocked) {
283918
+ const next = !!blocked;
283919
+ if (contextBlocked === next)
283920
+ return;
283921
+ contextBlocked = next;
283922
+ if (next)
283923
+ nextTickAt = null;
283924
+ debug(`contextBlocked=${next}`);
283925
+ notify2();
283926
+ }
283927
+ function setNextTickAt(ts) {
283928
+ const next = typeof ts === "number" && Number.isFinite(ts) ? ts : null;
283929
+ if (nextTickAt === next)
283930
+ return;
283931
+ nextTickAt = next;
283932
+ notify2();
283933
+ }
283934
+ function __resetProactiveState() {
283935
+ active = false;
283936
+ paused = false;
283937
+ contextBlocked = false;
283938
+ proactiveSource = null;
283939
+ nextTickAt = null;
283940
+ listeners.clear();
283941
+ }
283942
+ var active = false, paused = false, contextBlocked = false, proactiveSource = null, nextTickAt = null, listeners;
283943
+ var init_proactive = __esm(() => {
283944
+ init_proactiveEnabled();
283945
+ listeners = new Set;
283946
+ });
283947
+
283811
283948
  // tools/SleepTool/SleepTool.ts
283812
283949
  var exports_SleepTool = {};
283813
283950
  __export(exports_SleepTool, {
@@ -283847,13 +283984,15 @@ function resolveDurationMs({ seconds, until }) {
283847
283984
  }
283848
283985
  return Math.min(Math.max(0, ms), MAX_SLEEP_SECONDS * 1000);
283849
283986
  }
283850
- var proactiveModule = null, DEFAULT_SLEEP_SECONDS = 30, MAX_SLEEP_SECONDS = 86400, POLL_INTERVAL_MS2 = 1000, inputSchema37, outputSchema31, SleepTool;
283987
+ var proactiveModule, DEFAULT_SLEEP_SECONDS = 30, MAX_SLEEP_SECONDS = 86400, POLL_INTERVAL_MS2 = 1000, inputSchema37, outputSchema31, SleepTool;
283851
283988
  var init_SleepTool = __esm(() => {
283989
+ init_proactiveEnabled();
283852
283990
  init_v4();
283853
283991
  init_Tool();
283854
283992
  init_messageQueueManager();
283855
283993
  init_prompt8();
283856
283994
  init_UI25();
283995
+ proactiveModule = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
283857
283996
  inputSchema37 = lazySchema(() => exports_external.strictObject({
283858
283997
  seconds: exports_external.number().min(0).max(MAX_SLEEP_SECONDS).optional().describe(`Cu\xE1ntos segundos dormir (0\u2013${MAX_SLEEP_SECONDS}). Por defecto ${DEFAULT_SLEEP_SECONDS}.`),
283859
283998
  until: exports_external.string().optional().describe('Marca de tiempo ISO 8601 hasta la que dormir. Si se indica, tiene prioridad sobre "seconds".')
@@ -285592,6 +285731,9 @@ function parseAddress(to) {
285592
285731
  }
285593
285732
 
285594
285733
  // utils/systemPrompt.ts
285734
+ function isProactiveActive_SAFE_TO_CALL_ANYWHERE() {
285735
+ return proactiveModule2?.isProactiveActive() ?? false;
285736
+ }
285595
285737
  function buildEffectiveSystemPrompt({
285596
285738
  mainThreadAgentDefinition,
285597
285739
  toolUseContext,
@@ -285616,16 +285758,27 @@ function buildEffectiveSystemPrompt({
285616
285758
  source: "main-thread"
285617
285759
  });
285618
285760
  }
285619
- if (agentSystemPrompt && false) {}
285761
+ if (agentSystemPrompt && isProactiveForced() && isProactiveActive_SAFE_TO_CALL_ANYWHERE()) {
285762
+ return asSystemPrompt([
285763
+ ...defaultSystemPrompt,
285764
+ `
285765
+ # Custom Agent Instructions
285766
+ ${agentSystemPrompt}`,
285767
+ ...appendSystemPrompt ? [appendSystemPrompt] : []
285768
+ ]);
285769
+ }
285620
285770
  return asSystemPrompt([
285621
285771
  ...agentSystemPrompt ? [agentSystemPrompt] : customSystemPrompt ? [customSystemPrompt] : defaultSystemPrompt,
285622
285772
  ...appendSystemPrompt ? [appendSystemPrompt] : []
285623
285773
  ]);
285624
285774
  }
285775
+ var proactiveModule2;
285625
285776
  var init_systemPrompt = __esm(() => {
285777
+ init_proactiveEnabled();
285626
285778
  init_analytics();
285627
285779
  init_loadAgentsDir();
285628
285780
  init_envUtils();
285781
+ proactiveModule2 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
285629
285782
  });
285630
285783
 
285631
285784
  // tools/AgentTool/forkSubagent.ts
@@ -289158,8 +289311,9 @@ function resolveTeamName(input, appState) {
289158
289311
  return;
289159
289312
  return input.team_name || appState.teamContext?.teamName;
289160
289313
  }
289161
- var jsx_runtime160, proactiveModule2 = null, PROGRESS_THRESHOLD_MS2 = 2000, isBackgroundTasksDisabled2, baseInputSchema, fullInputSchema2, inputSchema8, outputSchema37, AgentTool;
289314
+ var jsx_runtime160, proactiveModule3, PROGRESS_THRESHOLD_MS2 = 2000, isBackgroundTasksDisabled2, baseInputSchema, fullInputSchema2, inputSchema8, outputSchema37, AgentTool;
289162
289315
  var init_AgentTool = __esm(() => {
289316
+ init_proactiveEnabled();
289163
289317
  init_Tool();
289164
289318
  init_promptCategory();
289165
289319
  init_v4();
@@ -289207,6 +289361,7 @@ var init_AgentTool = __esm(() => {
289207
289361
  init_runAgent();
289208
289362
  init_UI4();
289209
289363
  jsx_runtime160 = __toESM(require_jsx_runtime(), 1);
289364
+ proactiveModule3 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
289210
289365
  isBackgroundTasksDisabled2 = isEnvTruthy(process.env.THEUS_CODE_DISABLE_BACKGROUND_TASKS);
289211
289366
  baseInputSchema = lazySchema(() => exports_external.object({
289212
289367
  description: exports_external.string().describe("A short (3-5 word) description of the task"),
@@ -289468,7 +289623,7 @@ var init_AgentTool = __esm(() => {
289468
289623
  const isCoordinator = false;
289469
289624
  const forceAsync = isForkSubagentEnabled();
289470
289625
  const assistantForceAsync = false;
289471
- const shouldRunAsync = (run_in_background === true || selectedAgent.background === true || isCoordinator || forceAsync || assistantForceAsync || (proactiveModule2?.isProactiveActive() ?? false)) && !isBackgroundTasksDisabled2;
289626
+ const shouldRunAsync = (run_in_background === true || selectedAgent.background === true || isCoordinator || forceAsync || assistantForceAsync || (proactiveModule3?.isProactiveActive() ?? false)) && !isBackgroundTasksDisabled2;
289472
289627
  const workerPermissionContext = {
289473
289628
  ...appState.toolPermissionContext,
289474
289629
  mode: selectedAgent.permissionMode ?? "acceptEdits"
@@ -300533,9 +300688,9 @@ function getTheusEnvMetadata() {
300533
300688
  };
300534
300689
  }
300535
300690
  function getBuildAgeMinutes() {
300536
- if (!{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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)
300691
+ if (!{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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)
300537
300692
  return;
300538
- const buildTime = new Date({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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();
300693
+ const buildTime = new Date({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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();
300539
300694
  if (isNaN(buildTime))
300540
300695
  return;
300541
300696
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -301358,12 +301513,16 @@ Recent messages are preserved verbatim.`;
301358
301513
  if (suppressFollowUpQuestions) {
301359
301514
  let continuation = `${baseSummary}
301360
301515
  Continue the conversation from where it left off without asking the user any further questions. Resume directly \u2014 do not acknowledge the summary, do not recap what was happening, do not preface with "I'll continue" or similar. Pick up the last task as if the break never happened.`;
301361
- if (false) {}
301516
+ if (isProactiveForced() && proactiveModule4?.isProactiveActive()) {
301517
+ continuation += `
301518
+
301519
+ Est\xE1s en modo aut\xF3nomo/proactivo. Este NO es un primer despertar \u2014 ya estabas trabajando de forma aut\xF3noma antes de la compactaci\xF3n. Contin\xFAa tu ciclo de trabajo: retoma donde lo dejaste seg\xFAn el resumen de arriba. No saludes al usuario ni preguntes en qu\xE9 trabajar. Responde siempre en espa\xF1ol.`;
301520
+ }
301362
301521
  return continuation;
301363
301522
  }
301364
301523
  return baseSummary;
301365
301524
  }
301366
- var NO_TOOLS_PREAMBLE = `CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.
301525
+ var proactiveModule4, NO_TOOLS_PREAMBLE = `CRITICAL: Respond with TEXT ONLY. Do NOT call any tools.
301367
301526
 
301368
301527
  - Do NOT use Read, Bash, Grep, Glob, Edit, Write, or ANY other tool.
301369
301528
  - You already have all the context you need in the conversation above.
@@ -301398,6 +301557,8 @@ var NO_TOOLS_PREAMBLE = `CRITICAL: Respond with TEXT ONLY. Do NOT call any tools
301398
301557
  - Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.
301399
301558
  2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.`, BASE_COMPACT_PROMPT, PARTIAL_COMPACT_PROMPT, PARTIAL_COMPACT_UP_TO_PROMPT, NO_TOOLS_TRAILER;
301400
301559
  var init_prompt22 = __esm(() => {
301560
+ init_proactiveEnabled();
301561
+ proactiveModule4 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
301401
301562
  BASE_COMPACT_PROMPT = `Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions.
301402
301563
  This summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing development work without losing context.
301403
301564
 
@@ -316777,7 +316938,7 @@ function getAssistantMessageFromError(error40, model, options2) {
316777
316938
  if (process.env.USER_TYPE === "ant") {
316778
316939
  const baseMessage = `API Error: 400 ${error40.message}
316779
316940
 
316780
- Run /share and post the JSON file to ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
316941
+ Run /share and post the JSON file to ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
316781
316942
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
316782
316943
  return createAssistantAPIErrorMessage({
316783
316944
  content: baseMessage + rewindInstruction,
@@ -316813,7 +316974,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01
316813
316974
  if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
316814
316975
  const orgId = getOauthAccountInfo()?.organizationUuid;
316815
316976
  const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
316816
- const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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.`;
316977
+ const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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.`;
316817
316978
  return createAssistantAPIErrorMessage({
316818
316979
  content: msg,
316819
316980
  error: "invalid_request"
@@ -323694,7 +323855,7 @@ function ScrollBox({
323694
323855
  const [, forceRender] = import_react97.useState(0);
323695
323856
  const listenersRef = import_react97.useRef(new Set);
323696
323857
  const renderQueuedRef = import_react97.useRef(false);
323697
- const notify2 = () => {
323858
+ const notify3 = () => {
323698
323859
  for (const l of listenersRef.current)
323699
323860
  l();
323700
323861
  };
@@ -323702,7 +323863,7 @@ function ScrollBox({
323702
323863
  markScrollActivity();
323703
323864
  markDirty(el);
323704
323865
  markCommitStart();
323705
- notify2();
323866
+ notify3();
323706
323867
  if (renderQueuedRef.current)
323707
323868
  return;
323708
323869
  renderQueuedRef.current = true;
@@ -323750,7 +323911,7 @@ function ScrollBox({
323750
323911
  el.pendingScrollDelta = undefined;
323751
323912
  el.stickyScroll = true;
323752
323913
  markDirty(el);
323753
- notify2();
323914
+ notify3();
323754
323915
  forceRender((n2) => n2 + 1);
323755
323916
  },
323756
323917
  getScrollTop() {
@@ -325010,7 +325171,10 @@ async function clearConversation({
325010
325171
  }
325011
325172
  }
325012
325173
  setMessages(() => []);
325013
- if (false) {}
325174
+ if (isProactiveForced()) {
325175
+ const { setContextBlocked: setContextBlocked2 } = (init_proactive(), __toCommonJS(exports_proactive));
325176
+ setContextBlocked2(false);
325177
+ }
325014
325178
  if (setConversationId) {
325015
325179
  setConversationId(randomUUID26());
325016
325180
  }
@@ -325091,6 +325255,7 @@ async function clearConversation({
325091
325255
  }
325092
325256
  }
325093
325257
  var init_conversation = __esm(() => {
325258
+ init_proactiveEnabled();
325094
325259
  init_state();
325095
325260
  init_analytics();
325096
325261
  init_LocalAgentTask();
@@ -326913,7 +327078,7 @@ function buildPrimarySection() {
326913
327078
  });
326914
327079
  return [{
326915
327080
  label: "Version",
326916
- value: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
327081
+ value: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
326917
327082
  }, {
326918
327083
  label: "Session name",
326919
327084
  value: nameValue
@@ -330729,7 +330894,7 @@ function Config({
330729
330894
  }
330730
330895
  })
330731
330896
  }) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime185.jsx(ChannelDowngradeDialog, {
330732
- currentVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
330897
+ currentVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
330733
330898
  onChoice: (choice) => {
330734
330899
  setShowSubmenu(null);
330735
330900
  setTabsHidden(false);
@@ -330741,7 +330906,7 @@ function Config({
330741
330906
  autoUpdatesChannel: "stable"
330742
330907
  };
330743
330908
  if (choice === "stay") {
330744
- newSettings.minimumVersion = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
330909
+ newSettings.minimumVersion = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
330745
330910
  }
330746
330911
  updateSettingsForSource("userSettings", newSettings);
330747
330912
  setSettingsData((prev_27) => ({
@@ -338775,7 +338940,7 @@ function HelpV2(t0) {
338775
338940
  let t6;
338776
338941
  if ($2[31] !== tabs) {
338777
338942
  t6 = /* @__PURE__ */ jsx_runtime212.jsx(Tabs, {
338778
- title: `Theus v${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
338943
+ title: `Theus v${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
338779
338944
  color: "professionalBlue",
338780
338945
  defaultTab: "general",
338781
338946
  children: tabs
@@ -347447,9 +347612,9 @@ function DiscoverPlugins({
347447
347612
  const [loading, setLoading] = import_react133.useState(true);
347448
347613
  const [installCounts, setInstallCounts] = import_react133.useState(null);
347449
347614
  const [isSearchMode, setIsSearchModeRaw] = import_react133.useState(false);
347450
- const setIsSearchMode = import_react133.useCallback((active) => {
347451
- setIsSearchModeRaw(active);
347452
- onSearchModeChange?.(active);
347615
+ const setIsSearchMode = import_react133.useCallback((active2) => {
347616
+ setIsSearchModeRaw(active2);
347617
+ onSearchModeChange?.(active2);
347453
347618
  }, [onSearchModeChange]);
347454
347619
  const {
347455
347620
  query: searchQuery,
@@ -351340,9 +351505,9 @@ function ManagePlugins({
351340
351505
  const pluginErrors = useAppState((s_1) => s_1.plugins.errors);
351341
351506
  const flaggedPlugins = getFlaggedPlugins();
351342
351507
  const [isSearchMode, setIsSearchModeRaw] = import_react135.useState(false);
351343
- const setIsSearchMode = import_react135.useCallback((active) => {
351344
- setIsSearchModeRaw(active);
351345
- onSearchModeChange?.(active);
351508
+ const setIsSearchMode = import_react135.useCallback((active2) => {
351509
+ setIsSearchModeRaw(active2);
351510
+ onSearchModeChange?.(active2);
351346
351511
  }, [onSearchModeChange]);
351347
351512
  const isTerminalFocused = useTerminalFocus();
351348
351513
  const {
@@ -355496,6 +355661,24 @@ var init_mcp3 = __esm(() => {
355496
355661
  var NOVEDADES;
355497
355662
  var init_data = __esm(() => {
355498
355663
  NOVEDADES = [
355664
+ {
355665
+ version: "v0.2.26",
355666
+ fecha: "2026-07-12",
355667
+ titulo: "Modo proactivo, ahora en espa\xF1ol",
355668
+ puntos: [
355669
+ "El agente en modo proactivo ahora responde en espa\xF1ol y ya no repite saludos: saluda una vez y luego duerme en silencio cuando no hay trabajo.",
355670
+ "Traducidos los textos internos del ciclo aut\xF3nomo (trabajo aut\xF3nomo, herramienta de espera y continuaci\xF3n tras compactaci\xF3n)."
355671
+ ]
355672
+ },
355673
+ {
355674
+ version: "v0.2.25",
355675
+ fecha: "2026-07-12",
355676
+ titulo: "Modo proactivo (beta)",
355677
+ puntos: [
355678
+ "Modo proactivo reconstruido (beta, opt-in): el agente trabaja solo entre turnos \u2014 duerme y despierta cuando hay trabajo o mensajes. Act\xEDvalo con THEUS_PROACTIVE=1 y luego /proactive on (apagado por defecto mientras se estabiliza).",
355679
+ "Nuevo comando /proactive (on/off/pause/resume/status) y arranque con --proactive. La herramienta de espera se activa sola con el modo."
355680
+ ]
355681
+ },
355499
355682
  {
355500
355683
  version: "v0.2.24",
355501
355684
  fecha: "2026-07-12",
@@ -357139,7 +357322,7 @@ function Onboarding({
357139
357322
  flexDirection: "column",
357140
357323
  children: [
357141
357324
  /* @__PURE__ */ jsx_runtime245.jsx(TheusBanner, {
357142
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
357325
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
357143
357326
  }),
357144
357327
  /* @__PURE__ */ jsx_runtime245.jsxs(ThemedBox_default, {
357145
357328
  flexDirection: "column",
@@ -357484,9 +357667,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
357484
357667
  return [];
357485
357668
  }
357486
357669
  }
357487
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
357670
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
357488
357671
  if (process.env.USER_TYPE === "ant") {
357489
- const changelog = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
357672
+ const changelog = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
357490
357673
  if (changelog) {
357491
357674
  const commits = changelog.trim().split(`
357492
357675
  `).filter(Boolean);
@@ -361516,7 +361699,7 @@ function shouldRenderStatically(message, streamingToolUseIDs, inProgressToolUseI
361516
361699
  }
361517
361700
  }
361518
361701
  }
361519
- var React86, import_react152, jsx_runtime258, LogoHeader, proactiveModule3 = null, BRIEF_TOOL_NAME4 = null, SEND_USER_FILE_TOOL_NAME2 = null, MAX_MESSAGES_TO_SHOW_IN_TRANSCRIPT_MODE = 30, MAX_MESSAGES_WITHOUT_VIRTUALIZATION = 200, MESSAGE_CAP_STEP = 50, MessagesImpl = ({
361702
+ var React86, import_react152, jsx_runtime258, LogoHeader, proactiveModule5, BRIEF_TOOL_NAME4 = null, SEND_USER_FILE_TOOL_NAME2 = null, MAX_MESSAGES_TO_SHOW_IN_TRANSCRIPT_MODE = 30, MAX_MESSAGES_WITHOUT_VIRTUALIZATION = 200, MESSAGE_CAP_STEP = 50, MessagesImpl = ({
361520
361703
  messages,
361521
361704
  tools,
361522
361705
  commands,
@@ -361701,7 +361884,7 @@ var React86, import_react152, jsx_runtime258, LogoHeader, proactiveModule3 = nul
361701
361884
  progress
361702
361885
  } = useTerminalNotification();
361703
361886
  const prevProgressState = import_react152.useRef(null);
361704
- const progressEnabled = getGlobalConfig().terminalProgressBarEnabled && !getIsRemoteMode() && !(proactiveModule3?.isProactiveActive() ?? false);
361887
+ const progressEnabled = getGlobalConfig().terminalProgressBarEnabled && !getIsRemoteMode() && !(proactiveModule5?.isProactiveActive() ?? false);
361705
361888
  import_react152.useEffect(() => {
361706
361889
  const state = progressEnabled ? hasToolsInProgress ? "indeterminate" : "completed" : null;
361707
361890
  if (prevProgressState.current === state)
@@ -361848,6 +362031,7 @@ var React86, import_react152, jsx_runtime258, LogoHeader, proactiveModule3 = nul
361848
362031
  });
361849
362032
  }, Messages;
361850
362033
  var init_Messages = __esm(() => {
362034
+ init_proactiveEnabled();
361851
362035
  init_compiler_runtime();
361852
362036
  init_source();
361853
362037
  init_state();
@@ -361888,7 +362072,7 @@ var init_Messages = __esm(() => {
361888
362072
  let t1;
361889
362073
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
361890
362074
  t1 = /* @__PURE__ */ jsx_runtime258.jsx(TheusSessionHeader, {
361891
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
362075
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
361892
362076
  });
361893
362077
  $2[0] = t1;
361894
362078
  } else {
@@ -361918,6 +362102,7 @@ var init_Messages = __esm(() => {
361918
362102
  }
361919
362103
  return t2;
361920
362104
  });
362105
+ proactiveModule5 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
361921
362106
  Messages = React86.memo(MessagesImpl, (prev, next) => {
361922
362107
  const keys2 = Object.keys(prev);
361923
362108
  for (const key of keys2) {
@@ -370757,14 +370942,14 @@ async function launchUltraplan2(opts) {
370757
370942
  onSessionReady
370758
370943
  } = opts;
370759
370944
  const {
370760
- ultraplanSessionUrl: active,
370945
+ ultraplanSessionUrl: active2,
370761
370946
  ultraplanLaunching
370762
370947
  } = getAppState();
370763
- if (active || ultraplanLaunching) {
370948
+ if (active2 || ultraplanLaunching) {
370764
370949
  logEvent("tengu_ultraplan_create_failed", {
370765
- reason: active ? "already_polling" : "already_launching"
370950
+ reason: active2 ? "already_polling" : "already_launching"
370766
370951
  });
370767
- return buildAlreadyActiveMessage(active);
370952
+ return buildAlreadyActiveMessage(active2);
370768
370953
  }
370769
370954
  if (!blurb && !seedPlan) {
370770
370955
  return [
@@ -370913,14 +371098,14 @@ var ULTRAPLAN_TIMEOUT_MS, CCR_TERMS_URL2 = "https://docs.theus.pe/docs/en/theus-
370913
371098
  return null;
370914
371099
  }
370915
371100
  const {
370916
- ultraplanSessionUrl: active,
371101
+ ultraplanSessionUrl: active2,
370917
371102
  ultraplanLaunching
370918
371103
  } = context3.getAppState();
370919
- if (active || ultraplanLaunching) {
371104
+ if (active2 || ultraplanLaunching) {
370920
371105
  logEvent("tengu_ultraplan_create_failed", {
370921
- reason: active ? "already_polling" : "already_launching"
371106
+ reason: active2 ? "already_polling" : "already_launching"
370922
371107
  });
370923
- onDone(buildAlreadyActiveMessage(active), {
371108
+ onDone(buildAlreadyActiveMessage(active2), {
370924
371109
  display: "system"
370925
371110
  });
370926
371111
  return null;
@@ -383418,8 +383603,8 @@ function resolveAgentOverrides(allAgents, activeAgents) {
383418
383603
  if (seen.has(key))
383419
383604
  continue;
383420
383605
  seen.add(key);
383421
- const active = activeMap.get(agent.agentType);
383422
- const overriddenBy = active && active.source !== agent.source ? active.source : undefined;
383606
+ const active2 = activeMap.get(agent.agentType);
383607
+ const overriddenBy = active2 && active2.source !== agent.source ? active2.source : undefined;
383423
383608
  resolved.push({ ...agent, overriddenBy });
383424
383609
  }
383425
383610
  return resolved;
@@ -389645,7 +389830,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
389645
389830
  smapsRollup,
389646
389831
  platform: process.platform,
389647
389832
  nodeVersion: process.version,
389648
- ccVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
389833
+ ccVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
389649
389834
  };
389650
389835
  }
389651
389836
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -389764,7 +389949,7 @@ function validateBridgeId(id, label) {
389764
389949
  return id;
389765
389950
  }
389766
389951
  function createBridgeApiClient(deps) {
389767
- function debug(msg) {
389952
+ function debug2(msg) {
389768
389953
  deps.onDebug?.(msg);
389769
389954
  }
389770
389955
  let consecutiveEmptyPolls = 0;
@@ -389797,27 +389982,27 @@ function createBridgeApiClient(deps) {
389797
389982
  return response;
389798
389983
  }
389799
389984
  if (!deps.onAuth401) {
389800
- debug(`[bridge:api] ${context3}: 401 received, no refresh handler`);
389985
+ debug2(`[bridge:api] ${context3}: 401 received, no refresh handler`);
389801
389986
  return response;
389802
389987
  }
389803
- debug(`[bridge:api] ${context3}: 401 received, attempting token refresh`);
389988
+ debug2(`[bridge:api] ${context3}: 401 received, attempting token refresh`);
389804
389989
  const refreshed2 = await deps.onAuth401(accessToken);
389805
389990
  if (refreshed2) {
389806
- debug(`[bridge:api] ${context3}: Token refreshed, retrying request`);
389991
+ debug2(`[bridge:api] ${context3}: Token refreshed, retrying request`);
389807
389992
  const newToken = resolveAuth();
389808
389993
  const retryResponse = await fn(newToken);
389809
389994
  if (retryResponse.status !== 401) {
389810
389995
  return retryResponse;
389811
389996
  }
389812
- debug(`[bridge:api] ${context3}: Retry after refresh also got 401`);
389997
+ debug2(`[bridge:api] ${context3}: Retry after refresh also got 401`);
389813
389998
  } else {
389814
- debug(`[bridge:api] ${context3}: Token refresh failed`);
389999
+ debug2(`[bridge:api] ${context3}: Token refresh failed`);
389815
390000
  }
389816
390001
  return response;
389817
390002
  }
389818
390003
  return {
389819
390004
  async registerBridgeEnvironment(config3) {
389820
- debug(`[bridge:api] POST /v1/environments/bridge bridgeId=${config3.bridgeId}`);
390005
+ debug2(`[bridge:api] POST /v1/environments/bridge bridgeId=${config3.bridgeId}`);
389821
390006
  const response = await withOAuthRetry((token) => axios_default.post(`${deps.baseUrl}/v1/environments/bridge`, {
389822
390007
  machine_name: config3.machineName,
389823
390008
  directory: config3.dir,
@@ -389834,9 +390019,9 @@ function createBridgeApiClient(deps) {
389834
390019
  validateStatus: (status2) => status2 < 500
389835
390020
  }), "Registration");
389836
390021
  handleErrorStatus(response.status, response.data, "Registration");
389837
- debug(`[bridge:api] POST /v1/environments/bridge -> ${response.status} environment_id=${response.data.environment_id}`);
389838
- debug(`[bridge:api] >>> ${debugBody({ machine_name: config3.machineName, directory: config3.dir, branch: config3.branch, git_repo_url: config3.gitRepoUrl, max_sessions: config3.maxSessions, metadata: { worker_type: config3.workerType } })}`);
389839
- debug(`[bridge:api] <<< ${debugBody(response.data)}`);
390022
+ debug2(`[bridge:api] POST /v1/environments/bridge -> ${response.status} environment_id=${response.data.environment_id}`);
390023
+ debug2(`[bridge:api] >>> ${debugBody({ machine_name: config3.machineName, directory: config3.dir, branch: config3.branch, git_repo_url: config3.gitRepoUrl, max_sessions: config3.maxSessions, metadata: { worker_type: config3.workerType } })}`);
390024
+ debug2(`[bridge:api] <<< ${debugBody(response.data)}`);
389840
390025
  return response.data;
389841
390026
  },
389842
390027
  async pollForWork(environmentId, environmentSecret, signal, reclaimOlderThanMs) {
@@ -389854,101 +390039,101 @@ function createBridgeApiClient(deps) {
389854
390039
  if (!response.data) {
389855
390040
  consecutiveEmptyPolls = prevEmptyPolls + 1;
389856
390041
  if (consecutiveEmptyPolls === 1 || consecutiveEmptyPolls % EMPTY_POLL_LOG_INTERVAL === 0) {
389857
- debug(`[bridge:api] GET .../work/poll -> ${response.status} (no work, ${consecutiveEmptyPolls} consecutive empty polls)`);
390042
+ debug2(`[bridge:api] GET .../work/poll -> ${response.status} (no work, ${consecutiveEmptyPolls} consecutive empty polls)`);
389858
390043
  }
389859
390044
  return null;
389860
390045
  }
389861
- debug(`[bridge:api] GET .../work/poll -> ${response.status} workId=${response.data.id} type=${response.data.data?.type}${response.data.data?.id ? ` sessionId=${response.data.data.id}` : ""}`);
389862
- debug(`[bridge:api] <<< ${debugBody(response.data)}`);
390046
+ debug2(`[bridge:api] GET .../work/poll -> ${response.status} workId=${response.data.id} type=${response.data.data?.type}${response.data.data?.id ? ` sessionId=${response.data.data.id}` : ""}`);
390047
+ debug2(`[bridge:api] <<< ${debugBody(response.data)}`);
389863
390048
  return response.data;
389864
390049
  },
389865
390050
  async acknowledgeWork(environmentId, workId, sessionToken2) {
389866
390051
  validateBridgeId(environmentId, "environmentId");
389867
390052
  validateBridgeId(workId, "workId");
389868
- debug(`[bridge:api] POST .../work/${workId}/ack`);
390053
+ debug2(`[bridge:api] POST .../work/${workId}/ack`);
389869
390054
  const response = await axios_default.post(`${deps.baseUrl}/v1/environments/${environmentId}/work/${workId}/ack`, {}, {
389870
390055
  headers: getHeaders(sessionToken2),
389871
390056
  timeout: 1e4,
389872
390057
  validateStatus: (s) => s < 500
389873
390058
  });
389874
390059
  handleErrorStatus(response.status, response.data, "Acknowledge");
389875
- debug(`[bridge:api] POST .../work/${workId}/ack -> ${response.status}`);
390060
+ debug2(`[bridge:api] POST .../work/${workId}/ack -> ${response.status}`);
389876
390061
  },
389877
390062
  async stopWork(environmentId, workId, force) {
389878
390063
  validateBridgeId(environmentId, "environmentId");
389879
390064
  validateBridgeId(workId, "workId");
389880
- debug(`[bridge:api] POST .../work/${workId}/stop force=${force}`);
390065
+ debug2(`[bridge:api] POST .../work/${workId}/stop force=${force}`);
389881
390066
  const response = await withOAuthRetry((token) => axios_default.post(`${deps.baseUrl}/v1/environments/${environmentId}/work/${workId}/stop`, { force }, {
389882
390067
  headers: getHeaders(token),
389883
390068
  timeout: 1e4,
389884
390069
  validateStatus: (s) => s < 500
389885
390070
  }), "StopWork");
389886
390071
  handleErrorStatus(response.status, response.data, "StopWork");
389887
- debug(`[bridge:api] POST .../work/${workId}/stop -> ${response.status}`);
390072
+ debug2(`[bridge:api] POST .../work/${workId}/stop -> ${response.status}`);
389888
390073
  },
389889
390074
  async deregisterEnvironment(environmentId) {
389890
390075
  validateBridgeId(environmentId, "environmentId");
389891
- debug(`[bridge:api] DELETE /v1/environments/bridge/${environmentId}`);
390076
+ debug2(`[bridge:api] DELETE /v1/environments/bridge/${environmentId}`);
389892
390077
  const response = await withOAuthRetry((token) => axios_default.delete(`${deps.baseUrl}/v1/environments/bridge/${environmentId}`, {
389893
390078
  headers: getHeaders(token),
389894
390079
  timeout: 1e4,
389895
390080
  validateStatus: (s) => s < 500
389896
390081
  }), "Deregister");
389897
390082
  handleErrorStatus(response.status, response.data, "Deregister");
389898
- debug(`[bridge:api] DELETE /v1/environments/bridge/${environmentId} -> ${response.status}`);
390083
+ debug2(`[bridge:api] DELETE /v1/environments/bridge/${environmentId} -> ${response.status}`);
389899
390084
  },
389900
390085
  async archiveSession(sessionId) {
389901
390086
  validateBridgeId(sessionId, "sessionId");
389902
- debug(`[bridge:api] POST /v1/sessions/${sessionId}/archive`);
390087
+ debug2(`[bridge:api] POST /v1/sessions/${sessionId}/archive`);
389903
390088
  const response = await withOAuthRetry((token) => axios_default.post(`${deps.baseUrl}/v1/sessions/${sessionId}/archive`, {}, {
389904
390089
  headers: getHeaders(token),
389905
390090
  timeout: 1e4,
389906
390091
  validateStatus: (s) => s < 500
389907
390092
  }), "ArchiveSession");
389908
390093
  if (response.status === 409) {
389909
- debug(`[bridge:api] POST /v1/sessions/${sessionId}/archive -> 409 (already archived)`);
390094
+ debug2(`[bridge:api] POST /v1/sessions/${sessionId}/archive -> 409 (already archived)`);
389910
390095
  return;
389911
390096
  }
389912
390097
  handleErrorStatus(response.status, response.data, "ArchiveSession");
389913
- debug(`[bridge:api] POST /v1/sessions/${sessionId}/archive -> ${response.status}`);
390098
+ debug2(`[bridge:api] POST /v1/sessions/${sessionId}/archive -> ${response.status}`);
389914
390099
  },
389915
390100
  async reconnectSession(environmentId, sessionId) {
389916
390101
  validateBridgeId(environmentId, "environmentId");
389917
390102
  validateBridgeId(sessionId, "sessionId");
389918
- debug(`[bridge:api] POST /v1/environments/${environmentId}/bridge/reconnect session_id=${sessionId}`);
390103
+ debug2(`[bridge:api] POST /v1/environments/${environmentId}/bridge/reconnect session_id=${sessionId}`);
389919
390104
  const response = await withOAuthRetry((token) => axios_default.post(`${deps.baseUrl}/v1/environments/${environmentId}/bridge/reconnect`, { session_id: sessionId }, {
389920
390105
  headers: getHeaders(token),
389921
390106
  timeout: 1e4,
389922
390107
  validateStatus: (s) => s < 500
389923
390108
  }), "ReconnectSession");
389924
390109
  handleErrorStatus(response.status, response.data, "ReconnectSession");
389925
- debug(`[bridge:api] POST .../bridge/reconnect -> ${response.status}`);
390110
+ debug2(`[bridge:api] POST .../bridge/reconnect -> ${response.status}`);
389926
390111
  },
389927
390112
  async heartbeatWork(environmentId, workId, sessionToken2) {
389928
390113
  validateBridgeId(environmentId, "environmentId");
389929
390114
  validateBridgeId(workId, "workId");
389930
- debug(`[bridge:api] POST .../work/${workId}/heartbeat`);
390115
+ debug2(`[bridge:api] POST .../work/${workId}/heartbeat`);
389931
390116
  const response = await axios_default.post(`${deps.baseUrl}/v1/environments/${environmentId}/work/${workId}/heartbeat`, {}, {
389932
390117
  headers: getHeaders(sessionToken2),
389933
390118
  timeout: 1e4,
389934
390119
  validateStatus: (s) => s < 500
389935
390120
  });
389936
390121
  handleErrorStatus(response.status, response.data, "Heartbeat");
389937
- debug(`[bridge:api] POST .../work/${workId}/heartbeat -> ${response.status} lease_extended=${response.data.lease_extended} state=${response.data.state}`);
390122
+ debug2(`[bridge:api] POST .../work/${workId}/heartbeat -> ${response.status} lease_extended=${response.data.lease_extended} state=${response.data.state}`);
389938
390123
  return response.data;
389939
390124
  },
389940
390125
  async sendPermissionResponseEvent(sessionId, event, sessionToken2) {
389941
390126
  validateBridgeId(sessionId, "sessionId");
389942
- debug(`[bridge:api] POST /v1/sessions/${sessionId}/events type=${event.type}`);
390127
+ debug2(`[bridge:api] POST /v1/sessions/${sessionId}/events type=${event.type}`);
389943
390128
  const response = await axios_default.post(`${deps.baseUrl}/v1/sessions/${sessionId}/events`, { events: [event] }, {
389944
390129
  headers: getHeaders(sessionToken2),
389945
390130
  timeout: 1e4,
389946
390131
  validateStatus: (s) => s < 500
389947
390132
  });
389948
390133
  handleErrorStatus(response.status, response.data, "SendPermissionResponseEvent");
389949
- debug(`[bridge:api] POST /v1/sessions/${sessionId}/events -> ${response.status}`);
389950
- debug(`[bridge:api] >>> ${debugBody({ events: [event] })}`);
389951
- debug(`[bridge:api] <<< ${debugBody(response.data)}`);
390134
+ debug2(`[bridge:api] POST /v1/sessions/${sessionId}/events -> ${response.status}`);
390135
+ debug2(`[bridge:api] >>> ${debugBody({ events: [event] })}`);
390136
+ debug2(`[bridge:api] <<< ${debugBody(response.data)}`);
389952
390137
  }
389953
390138
  };
389954
390139
  }
@@ -390231,7 +390416,7 @@ var init_bridge_kick = __esm(() => {
390231
390416
  var call57 = async () => {
390232
390417
  return {
390233
390418
  type: "text",
390234
- value: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
390419
+ value: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
390235
390420
  };
390236
390421
  }, version2, version_default;
390237
390422
  var init_version = __esm(() => {
@@ -390728,13 +390913,13 @@ function IntelligenceBar({ onDone }) {
390728
390913
  }
390729
390914
  }
390730
390915
  const labelCells = LEVELS.map((l, i3) => {
390731
- const active = i3 === index;
390916
+ const active2 = i3 === index;
390732
390917
  return /* @__PURE__ */ jsx_runtime331.jsxs(ThemedText, {
390733
- bold: active,
390734
- color: active ? isMax ? baseColor : NEON : undefined,
390735
- dimColor: !active,
390918
+ bold: active2,
390919
+ color: active2 ? isMax ? baseColor : NEON : undefined,
390920
+ dimColor: !active2,
390736
390921
  children: [
390737
- active ? `\u25B8 ${l.label}` : ` ${l.label}`,
390922
+ active2 ? `\u25B8 ${l.label}` : ` ${l.label}`,
390738
390923
  " "
390739
390924
  ]
390740
390925
  }, l.key);
@@ -393289,10 +393474,10 @@ function CatalogModelPicker({
393289
393474
  }
393290
393475
  return out;
393291
393476
  }, [catalog, aliasOptions]);
393292
- const active = getActiveSessionSelection();
393477
+ const active2 = getActiveSessionSelection();
393293
393478
  const defaultValue = import_react188.useMemo(() => {
393294
- if (active) {
393295
- const value = catalogValue(active);
393479
+ if (active2) {
393480
+ const value = catalogValue(active2);
393296
393481
  if (selectOptions.some((o2) => o2.value === value))
393297
393482
  return value;
393298
393483
  }
@@ -393305,8 +393490,8 @@ function CatalogModelPicker({
393305
393490
  return alias;
393306
393491
  }
393307
393492
  return selectOptions[0]?.value;
393308
- }, [active, mainLoopModel, catalog, selectOptions]);
393309
- const currentLabel = active ? `${active.label} \xB7 ${active.providerId}` : mainLoopModel ?? "predeterminado";
393493
+ }, [active2, mainLoopModel, catalog, selectOptions]);
393494
+ const currentLabel = active2 ? `${active2.label} \xB7 ${active2.providerId}` : mainLoopModel ?? "predeterminado";
393310
393495
  const handleCancel = React111.useCallback(() => {
393311
393496
  logEvent("tengu_model_command_menu", {
393312
393497
  action: "cancel"
@@ -394673,13 +394858,13 @@ async function updateReleaseBundle() {
394673
394858
  await gracefulShutdown(1);
394674
394859
  return;
394675
394860
  }
394676
- if (gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394677
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
394861
+ if (gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394862
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
394678
394863
  `);
394679
394864
  await gracefulShutdown(0);
394680
394865
  return;
394681
394866
  }
394682
- writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
394867
+ writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
394683
394868
  `);
394684
394869
  writeToStdout(`Installing update from theus.pe/dl...
394685
394870
  `);
@@ -394713,7 +394898,7 @@ async function updateReleaseBundle() {
394713
394898
  return;
394714
394899
  }
394715
394900
  cpSync(staged, bundleDir, { recursive: true, force: true });
394716
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
394901
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
394717
394902
  `);
394718
394903
  await regenerateCompletionCache();
394719
394904
  } finally {
@@ -394726,7 +394911,7 @@ async function updateReleaseBundle() {
394726
394911
  async function update() {
394727
394912
  logEvent("tengu_update_check", {});
394728
394913
  await updateNaupa();
394729
- writeToStdout(`Current version: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
394914
+ writeToStdout(`Current version: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
394730
394915
  `);
394731
394916
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
394732
394917
  writeToStdout(`Checking for updates to ${channel2} version...
@@ -394805,8 +394990,8 @@ async function update() {
394805
394990
  writeToStdout(`Theus is managed by Homebrew.
394806
394991
  `);
394807
394992
  const latest = await getLatestVersion(channel2);
394808
- if (latest && !gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394809
- writeToStdout(`Update available: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
394993
+ if (latest && !gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394994
+ writeToStdout(`Update available: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
394810
394995
  `);
394811
394996
  writeToStdout(`
394812
394997
  `);
@@ -394822,8 +395007,8 @@ async function update() {
394822
395007
  writeToStdout(`Theus is managed by winget.
394823
395008
  `);
394824
395009
  const latest = await getLatestVersion(channel2);
394825
- if (latest && !gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394826
- writeToStdout(`Update available: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
395010
+ if (latest && !gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
395011
+ writeToStdout(`Update available: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
394827
395012
  `);
394828
395013
  writeToStdout(`
394829
395014
  `);
@@ -394839,8 +395024,8 @@ async function update() {
394839
395024
  writeToStdout(`Theus is managed by apk.
394840
395025
  `);
394841
395026
  const latest = await getLatestVersion(channel2);
394842
- if (latest && !gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394843
- writeToStdout(`Update available: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
395027
+ if (latest && !gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
395028
+ writeToStdout(`Update available: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
394844
395029
  `);
394845
395030
  writeToStdout(`
394846
395031
  `);
@@ -394905,11 +395090,11 @@ async function update() {
394905
395090
  `);
394906
395091
  await gracefulShutdown(1);
394907
395092
  }
394908
- if (result.latestVersion === { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
394909
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
395093
+ if (result.latestVersion === { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
395094
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
394910
395095
  `);
394911
395096
  } else {
394912
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
395097
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
394913
395098
  `);
394914
395099
  await regenerateCompletionCache();
394915
395100
  }
@@ -394928,9 +395113,9 @@ async function update() {
394928
395113
  await removeInstalledSymlink();
394929
395114
  }
394930
395115
  logForDebugging("update: Checking npm registry for latest version");
394931
- logForDebugging(`update: Package URL: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`);
395116
+ logForDebugging(`update: Package URL: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`);
394932
395117
  const npmTag = channel2 === "stable" ? "stable" : "latest";
394933
- const npmCommand = `npm view ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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`;
395118
+ const npmCommand = `npm view ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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`;
394934
395119
  logForDebugging(`update: Running: ${npmCommand}`);
394935
395120
  const latestVersion = await getLatestVersion(channel2);
394936
395121
  logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
@@ -394950,7 +395135,7 @@ async function update() {
394950
395135
  `);
394951
395136
  process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
394952
395137
  `);
394953
- if ({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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")) {
395138
+ if ({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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")) {
394954
395139
  process.stderr.write(` \u2022 Internal/development build not published to npm
394955
395140
  `);
394956
395141
  }
@@ -394962,19 +395147,19 @@ async function update() {
394962
395147
  `);
394963
395148
  process.stderr.write(` \u2022 Run with --debug flag for more details
394964
395149
  `);
394965
- const packageName = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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");
395150
+ const packageName = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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");
394966
395151
  process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
394967
395152
  `);
394968
395153
  process.stderr.write(` \u2022 Check if you need to login: npm whoami
394969
395154
  `);
394970
395155
  await gracefulShutdown(1);
394971
395156
  }
394972
- if (gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
394973
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
395157
+ if (gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
395158
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
394974
395159
  `);
394975
395160
  await gracefulShutdown(0);
394976
395161
  }
394977
- writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
395162
+ writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
394978
395163
  `);
394979
395164
  writeToStdout(`Installing update...
394980
395165
  `);
@@ -395019,7 +395204,7 @@ async function update() {
395019
395204
  logForDebugging(`update: Installation status: ${status2}`);
395020
395205
  switch (status2) {
395021
395206
  case "success":
395022
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
395207
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
395023
395208
  `);
395024
395209
  await regenerateCompletionCache();
395025
395210
  break;
@@ -395029,7 +395214,7 @@ async function update() {
395029
395214
  if (useLocalUpdate) {
395030
395215
  process.stderr.write(`Try manually updating with:
395031
395216
  `);
395032
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}
395217
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}
395033
395218
  `);
395034
395219
  } else {
395035
395220
  process.stderr.write(`Try running with sudo or fix npm permissions
@@ -395045,7 +395230,7 @@ async function update() {
395045
395230
  if (useLocalUpdate) {
395046
395231
  process.stderr.write(`Try manually updating with:
395047
395232
  `);
395048
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}
395233
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}
395049
395234
  `);
395050
395235
  } else {
395051
395236
  process.stderr.write(`Or consider using native installation with: theus install
@@ -398597,6 +398782,107 @@ var init_agents_platform = __esm(() => {
398597
398782
  agents_platform_default = _s24;
398598
398783
  });
398599
398784
 
398785
+ // commands/proactive.js
398786
+ var exports_proactive2 = {};
398787
+ __export(exports_proactive2, {
398788
+ default: () => proactive_default
398789
+ });
398790
+ function statusLine() {
398791
+ if (!isProactiveActive())
398792
+ return "Modo proactivo: DESACTIVADO.";
398793
+ if (isProactivePaused())
398794
+ return "Modo proactivo: ACTIVO (en pausa).";
398795
+ return "Modo proactivo: ACTIVO.";
398796
+ }
398797
+ var ON_MESSAGE, call74 = async (args) => {
398798
+ const arg = (args ?? "").trim().toLowerCase();
398799
+ let value;
398800
+ switch (arg) {
398801
+ case "on":
398802
+ case "activar":
398803
+ case "start":
398804
+ if (isProactiveActive() && !isProactivePaused()) {
398805
+ value = "El modo proactivo ya estaba activo.";
398806
+ } else {
398807
+ activateProactive("command");
398808
+ value = ON_MESSAGE;
398809
+ }
398810
+ break;
398811
+ case "off":
398812
+ case "desactivar":
398813
+ case "stop":
398814
+ if (!isProactiveActive()) {
398815
+ value = "El modo proactivo ya estaba desactivado.";
398816
+ } else {
398817
+ deactivateProactive();
398818
+ value = "Modo proactivo DESACTIVADO. Vuelves al modo interactivo normal.";
398819
+ }
398820
+ break;
398821
+ case "pause":
398822
+ case "pausa":
398823
+ case "pausar":
398824
+ if (!isProactiveActive()) {
398825
+ value = "El modo proactivo no est\xE1 activo.";
398826
+ } else {
398827
+ pauseProactive();
398828
+ value = "Modo proactivo EN PAUSA. Usa /proactive resume para reanudar.";
398829
+ }
398830
+ break;
398831
+ case "resume":
398832
+ case "reanudar":
398833
+ if (!isProactiveActive()) {
398834
+ value = "El modo proactivo no est\xE1 activo.";
398835
+ } else {
398836
+ resumeProactive();
398837
+ value = "Modo proactivo REANUDADO.";
398838
+ }
398839
+ break;
398840
+ case "status":
398841
+ case "estado":
398842
+ value = statusLine();
398843
+ break;
398844
+ case "":
398845
+ case "toggle":
398846
+ if (isProactiveActive()) {
398847
+ deactivateProactive();
398848
+ value = "Modo proactivo DESACTIVADO. Vuelves al modo interactivo normal.";
398849
+ } else {
398850
+ activateProactive("command");
398851
+ value = ON_MESSAGE;
398852
+ }
398853
+ break;
398854
+ default:
398855
+ value = `Uso: /proactive [on|off|pause|resume|status]. ${statusLine()}`;
398856
+ break;
398857
+ }
398858
+ return { type: "text", value };
398859
+ }, proactive, proactive_default;
398860
+ var init_proactive2 = __esm(() => {
398861
+ init_proactive();
398862
+ init_proactiveEnabled();
398863
+ ON_MESSAGE = "Modo proactivo ACTIVADO. El agente trabajar\xE1 solo entre turnos: duerme y " + "despierta cuando haya trabajo o mensajes. La herramienta de espera queda " + "disponible. Escribe tu objetivo, o usa /proactive off para detenerlo.";
398864
+ proactive = {
398865
+ type: "local",
398866
+ name: "proactive",
398867
+ aliases: ["proactivo"],
398868
+ description: "Activa/desactiva el modo proactivo: el agente trabaja solo entre turnos (duerme y despierta cuando hay trabajo)",
398869
+ argumentHint: "[on|off|pause|resume|status]",
398870
+ isEnabled: () => {
398871
+ try {
398872
+ return isProactiveForced();
398873
+ } catch {
398874
+ return false;
398875
+ }
398876
+ },
398877
+ isHidden: false,
398878
+ userInvocable: true,
398879
+ disableModelInvocation: true,
398880
+ supportsNonInteractive: true,
398881
+ load: () => Promise.resolve({ call: call74 })
398882
+ };
398883
+ proactive_default = proactive;
398884
+ });
398885
+
398600
398886
  // commands/brief.ts
398601
398887
  var exports_brief = {};
398602
398888
  __export(exports_brief, {
@@ -398781,7 +399067,7 @@ var exports_assistant = {};
398781
399067
  __export(exports_assistant, {
398782
399068
  installAssistant: () => installAssistant,
398783
399069
  computeDefaultInstallDir: () => computeDefaultInstallDir,
398784
- call: () => call74,
399070
+ call: () => call75,
398785
399071
  NewInstallWizard: () => NewInstallWizard
398786
399072
  });
398787
399073
  import { existsSync as existsSync18, mkdirSync as mkdirSync10, readFileSync as readFileSync24, writeFileSync as writeFileSync8 } from "fs";
@@ -398938,7 +399224,7 @@ function AssistantCommandFlow({
398938
399224
  onCancel: () => onDone()
398939
399225
  });
398940
399226
  }
398941
- async function call74(onDone, _context, _args) {
399227
+ async function call75(onDone, _context, _args) {
398942
399228
  return /* @__PURE__ */ jsx_runtime354.jsx(AssistantCommandFlow, {
398943
399229
  onDone
398944
399230
  });
@@ -399210,7 +399496,7 @@ function PeersPanel({ onDone }) {
399210
399496
  ]
399211
399497
  });
399212
399498
  }
399213
- var import_react193, jsx_runtime355, KIND_LABELS, call75 = async (onDone) => {
399499
+ var import_react193, jsx_runtime355, KIND_LABELS, call76 = async (onDone) => {
399214
399500
  return /* @__PURE__ */ jsx_runtime355.jsx(PeersPanel, {
399215
399501
  onDone
399216
399502
  });
@@ -399232,7 +399518,7 @@ var init_peers = __esm(() => {
399232
399518
  name: "peers",
399233
399519
  description: "Lista otras sesiones de Theus vivas en esta m\xE1quina",
399234
399520
  isEnabled: () => isUdsInboxEnabled(),
399235
- load: () => Promise.resolve({ call: call75 })
399521
+ load: () => Promise.resolve({ call: call76 })
399236
399522
  };
399237
399523
  peers_default = peers;
399238
399524
  });
@@ -399911,7 +400197,7 @@ var init_sprites = __esm(() => {
399911
400197
  // commands/buddy/buddy.tsx
399912
400198
  var exports_buddy = {};
399913
400199
  __export(exports_buddy, {
399914
- call: () => call76
400200
+ call: () => call77
399915
400201
  });
399916
400202
  async function generateSoul(bones, inspirationSeed) {
399917
400203
  const especie = SPECIES_ES[bones.species];
@@ -400188,7 +400474,7 @@ function BuddyPanel({
400188
400474
  ]
400189
400475
  });
400190
400476
  }
400191
- var import_react195, jsx_runtime357, HATCH_TIMEOUT_MS = 15000, TICK_MS2 = 400, call76 = async (onDone, _context, args) => {
400477
+ var import_react195, jsx_runtime357, HATCH_TIMEOUT_MS = 15000, TICK_MS2 = 400, call77 = async (onDone, _context, args) => {
400192
400478
  const arg = (args ?? "").trim().toLowerCase();
400193
400479
  if (arg === "silencio" || arg === "silenciar" || arg === "mute") {
400194
400480
  const config3 = getGlobalConfig();
@@ -400383,8 +400669,9 @@ function formatDescriptionWithSource(cmd) {
400383
400669
  }
400384
400670
  return `${cmd.description} (${getSettingSourceName(cmd.source)})`;
400385
400671
  }
400386
- var agentsPlatform, proactive = null, briefCommand, assistantCommand, bridge = null, remoteControlServerCommand = null, voiceCommand = null, forceSnip = null, workflowsCmd = null, webCmd = null, clearSkillIndexCache2 = null, subscribePr = null, ultraplan = null, peersCmd, forkCmd, buddy2, INTERNAL_ONLY_COMMANDS2, COMMANDS, builtInCommandNames, getWorkflowCommands = null, loadAllCommands, getSkillToolCommands, getSlashCommandToolSkills, REMOTE_SAFE_COMMANDS, BRIDGE_SAFE_COMMANDS;
400672
+ var agentsPlatform, proactive2, briefCommand, assistantCommand, bridge = null, remoteControlServerCommand = null, voiceCommand = null, forceSnip = null, workflowsCmd = null, webCmd = null, clearSkillIndexCache2 = null, subscribePr = null, ultraplan = null, peersCmd, forkCmd, buddy2, INTERNAL_ONLY_COMMANDS2, COMMANDS, builtInCommandNames, getWorkflowCommands = null, loadAllCommands, getSkillToolCommands, getSlashCommandToolSkills, REMOTE_SAFE_COMMANDS, BRIDGE_SAFE_COMMANDS;
400387
400673
  var init_commands2 = __esm(() => {
400674
+ init_proactiveEnabled();
400388
400675
  init_add_dir2();
400389
400676
  init_autofix_pr();
400390
400677
  init_backfill_sessions();
@@ -400490,6 +400777,7 @@ var init_commands2 = __esm(() => {
400490
400777
  init_debug_tool_call();
400491
400778
  init_constants();
400492
400779
  agentsPlatform = process.env.USER_TYPE === "ant" ? (init_agents_platform(), __toCommonJS(exports_agents_platform)).default : null;
400780
+ proactive2 = isProactiveForced() ? (init_proactive2(), __toCommonJS(exports_proactive2)).default : null;
400493
400781
  briefCommand = isKairosForced() || false || (init_briefEnabled(), __toCommonJS(exports_briefEnabled)).isBriefForced() ? (init_brief(), __toCommonJS(exports_brief)).default : null;
400494
400782
  assistantCommand = isKairosForced() ? (init_assistant2(), __toCommonJS(exports_assistant2)).default : null;
400495
400783
  peersCmd = (init_udsInboxEnabled(), __toCommonJS(exports_udsInboxEnabled)).isUdsInboxEnabled() ? (init_peers(), __toCommonJS(exports_peers)).default : null;
@@ -400589,7 +400877,7 @@ var init_commands2 = __esm(() => {
400589
400877
  ...webCmd ? [webCmd] : [],
400590
400878
  ...forkCmd ? [forkCmd] : [],
400591
400879
  ...buddy2 ? [buddy2] : [],
400592
- ...proactive ? [proactive] : [],
400880
+ ...proactive2 ? [proactive2] : [],
400593
400881
  ...briefCommand ? [briefCommand] : [],
400594
400882
  ...assistantCommand ? [assistantCommand] : [],
400595
400883
  ...bridge ? [bridge] : [],
@@ -403428,8 +403716,8 @@ function extractFirstPromptFromChunk(chunk2) {
403428
403716
  if (bashInput)
403429
403717
  return `! ${bashInput}`;
403430
403718
  if (SKIP_FIRST_PROMPT_PATTERN.test(result)) {
403431
- if (false)
403432
- ;
403719
+ if (isProactiveForced() && result.startsWith(`<${TICK_TAG}>`))
403720
+ hasTickMessages = true;
403433
403721
  continue;
403434
403722
  }
403435
403723
  if (result.length > 200) {
@@ -403443,8 +403731,8 @@ function extractFirstPromptFromChunk(chunk2) {
403443
403731
  }
403444
403732
  if (firstCommandFallback)
403445
403733
  return firstCommandFallback;
403446
- if (false)
403447
- ;
403734
+ if (isProactiveForced() && hasTickMessages)
403735
+ return "Proactive session";
403448
403736
  return "";
403449
403737
  }
403450
403738
  function extractJsonStringFieldPrefix(text, key, maxLen) {
@@ -403571,6 +403859,7 @@ async function enrichLogs(allLogs, startIndex, count4) {
403571
403859
  }
403572
403860
  var VERSION4, MAX_TOMBSTONE_REWRITE_BYTES, SKIP_FIRST_PROMPT_PATTERN, EPHEMERAL_PROGRESS_TYPES, MAX_TRANSCRIPT_READ_BYTES, agentTranscriptSubdirs, getProjectDir2, project = null, cleanupRegistered4 = false, REMOTE_FLUSH_INTERVAL_MS = 10, METADATA_TYPE_MARKERS, METADATA_MARKER_BUFS, METADATA_PREFIX_BOUND = 25, getSessionMessages, INITIAL_ENRICH_COUNT = 50;
403573
403861
  var init_sessionStorage = __esm(() => {
403862
+ init_proactiveEnabled();
403574
403863
  init_memoize();
403575
403864
  init_analytics();
403576
403865
  init_state();
@@ -403600,14 +403889,14 @@ var init_sessionStorage = __esm(() => {
403600
403889
  init_settings2();
403601
403890
  init_slowOperations();
403602
403891
  init_uuid();
403603
- VERSION4 = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
403892
+ VERSION4 = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
403604
403893
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
403605
403894
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
403606
403895
  EPHEMERAL_PROGRESS_TYPES = new Set([
403607
403896
  "bash_progress",
403608
403897
  "powershell_progress",
403609
403898
  "mcp_progress",
403610
- ...[]
403899
+ ...isProactiveForced() ? ["sleep_progress"] : []
403611
403900
  ]);
403612
403901
  MAX_TRANSCRIPT_READ_BYTES = 50 * 1024 * 1024;
403613
403902
  agentTranscriptSubdirs = new Map;
@@ -404805,7 +405094,7 @@ var init_filesystem = __esm(() => {
404805
405094
  });
404806
405095
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
404807
405096
  const nonce = randomBytes21(16).toString("hex");
404808
- return join148(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
405097
+ return join148(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
404809
405098
  });
404810
405099
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
404811
405100
  });
@@ -408768,19 +409057,19 @@ async function executeStatusLineCommand(statusLineInput, signal, timeoutMs = 500
408768
409057
  logForDebugging(`Skipping StatusLine command execution - workspace trust not accepted`);
408769
409058
  return;
408770
409059
  }
408771
- let statusLine;
409060
+ let statusLine2;
408772
409061
  if (shouldAllowManagedHooksOnly()) {
408773
- statusLine = getSettingsForSource("policySettings")?.statusLine;
409062
+ statusLine2 = getSettingsForSource("policySettings")?.statusLine;
408774
409063
  } else {
408775
- statusLine = getSettings_DEPRECATED()?.statusLine;
409064
+ statusLine2 = getSettings_DEPRECATED()?.statusLine;
408776
409065
  }
408777
- if (!statusLine || statusLine.type !== "command") {
409066
+ if (!statusLine2 || statusLine2.type !== "command") {
408778
409067
  return;
408779
409068
  }
408780
409069
  const abortSignal = signal || AbortSignal.timeout(timeoutMs);
408781
409070
  try {
408782
409071
  const jsonInput = jsonStringify(statusLineInput);
408783
- const result = await execCommandHook(statusLine, "StatusLine", "statusLine", jsonInput, abortSignal, randomUUID31());
409072
+ const result = await execCommandHook(statusLine2, "StatusLine", "statusLine", jsonInput, abortSignal, randomUUID31());
408784
409073
  if (result.aborted) {
408785
409074
  return;
408786
409075
  }
@@ -408790,12 +409079,12 @@ async function executeStatusLineCommand(statusLineInput, signal, timeoutMs = 500
408790
409079
  `);
408791
409080
  if (output) {
408792
409081
  if (logResult2) {
408793
- logForDebugging(`StatusLine [${statusLine.command}] completed with status ${result.status}`);
409082
+ logForDebugging(`StatusLine [${statusLine2.command}] completed with status ${result.status}`);
408794
409083
  }
408795
409084
  return output;
408796
409085
  }
408797
409086
  } else if (logResult2) {
408798
- logForDebugging(`StatusLine [${statusLine.command}] completed with status ${result.status}`, { level: "warn" });
409087
+ logForDebugging(`StatusLine [${statusLine2.command}] completed with status ${result.status}`, { level: "warn" });
408799
409088
  }
408800
409089
  return;
408801
409090
  } catch (error40) {
@@ -409920,6 +410209,10 @@ import { type as osType2, version as osVersion, release as osRelease2 } from "os
409920
410209
  function getHooksSection() {
409921
410210
  return `Users may configure 'hooks', shell commands that execute in response to events like tool calls, in settings. Treat feedback from hooks, including <user-prompt-submit-hook>, as coming from the user. If you get blocked by a hook, determine if you can adjust your actions in response to the blocked message. If not, ask the user to check their hooks configuration.`;
409922
410211
  }
410212
+ function getSystemRemindersSection() {
410213
+ return `- Tool results and user messages may include <system-reminder> tags. <system-reminder> tags contain useful information and reminders. They are automatically added by the system, and bear no direct relation to the specific tool results or user messages in which they appear.
410214
+ - The conversation has unlimited context through automatic summarization.`;
410215
+ }
409923
410216
  function getInternalModelOverrideSection() {
409924
410217
  if (process.env.USER_TYPE !== "ant")
409925
410218
  return null;
@@ -409980,7 +410273,7 @@ function getSimpleDoingTasksSection() {
409980
410273
  ];
409981
410274
  const userHelpSubitems = [
409982
410275
  `/help: Get help with using Theus`,
409983
- `To give feedback, users should ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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}`
410276
+ `To give feedback, users should ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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}`
409984
410277
  ];
409985
410278
  const items = [
409986
410279
  `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.`,
@@ -410135,7 +410428,24 @@ Date: ${getSessionStartDate()}`
410135
410428
  ]);
410136
410429
  const settings = getInitialSettings();
410137
410430
  const enabledTools = new Set(tools.map((_) => _.name));
410138
- if (false) {}
410431
+ if (isProactiveForced() && proactiveModule6?.isProactiveActive()) {
410432
+ logForDebugging(`[SystemPrompt] path=simple-proactive`);
410433
+ return [
410434
+ `
410435
+ Eres un agente aut\xF3nomo. Usa las herramientas disponibles para hacer trabajo \xFAtil. Responde SIEMPRE en espa\xF1ol.
410436
+
410437
+ ${CYBER_RISK_INSTRUCTION}`,
410438
+ getSystemRemindersSection(),
410439
+ await loadMemoryPrompt(),
410440
+ envInfo,
410441
+ getLanguageSection(settings.language),
410442
+ isMcpInstructionsDeltaEnabled() ? null : getMcpInstructionsSection(mcpClients),
410443
+ getScratchpadInstructions(),
410444
+ getFunctionResultClearingSection(model),
410445
+ SUMMARIZE_TOOL_RESULTS_SECTION,
410446
+ getProactiveSection()
410447
+ ].filter((s) => s !== null);
410448
+ }
410139
410449
  const dynamicSections = [
410140
410450
  systemPromptSection("session_guidance", () => getSessionSpecificGuidanceSection(enabledTools, skillToolCommands)),
410141
410451
  systemPromptSection("memory", () => loadMemoryPrompt()),
@@ -410318,8 +410628,67 @@ function getFunctionResultClearingSection(model) {
410318
410628
 
410319
410629
  Old tool results will be automatically cleared from context to free up space. The ${config3.keepRecent} most recent results are always kept.`;
410320
410630
  }
410321
- var getCachedMCConfigForFRC = null, DISCOVER_SKILLS_TOOL_NAME = null, SYSTEM_PROMPT_DYNAMIC_BOUNDARY = "__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__", FRONTIER_MODEL_NAME = "Theus Opus 4.6", THEUS_4_5_OR_4_6_MODEL_IDS, DEFAULT_AGENT_PROMPT = `You are an agent for Theus, Theus's official CLI for Theus. Given the user's message, you should use the tools available to complete the task. Complete the task fully\u2014don't gold-plate, but don't leave it half-done. When you complete the task, respond with a concise report covering what was done and any key findings \u2014 the caller will relay this to the user, so it only needs the essentials.`, SUMMARIZE_TOOL_RESULTS_SECTION = `When working with tool results, write down any important information you might need later in your response, as the original tool result may be cleared later.`;
410631
+ function getProactiveSection() {
410632
+ if (!isProactiveForced())
410633
+ return null;
410634
+ if (!proactiveModule6?.isProactiveActive())
410635
+ return null;
410636
+ return `# Trabajo aut\xF3nomo
410637
+
410638
+ Est\xE1s trabajando de forma aut\xF3noma. Recibir\xE1s mensajes \`<${TICK_TAG}>\` que te mantienen vivo entre turnos \u2014 tr\xE1talos como "est\xE1s despierto, \xBFahora qu\xE9?". La hora en cada \`<${TICK_TAG}>\` es la hora local actual del usuario. \xDAsala para saber en qu\xE9 momento del d\xEDa est\xE1s \u2014 las marcas de tiempo de herramientas externas (Slack, GitHub, etc.) pueden estar en otra zona horaria.
410639
+
410640
+ **Responde SIEMPRE en espa\xF1ol.** Nunca repitas ni cites el contenido de un tick en tu respuesta. Varios ticks pueden llegar juntos en un solo mensaje: es normal, procesa solo el \xFAltimo.
410641
+
410642
+ ## Ritmo
410643
+
410644
+ Usa la herramienta ${SLEEP_TOOL_NAME} para controlar cu\xE1nto esperas entre acciones. Duerme m\xE1s cuando esperas procesos lentos, menos cuando iteras activamente. Cada despertar cuesta una llamada a la API; balancea en consecuencia.
410645
+
410646
+ **Si no tienes nada \xFAtil que hacer en un tick, DEBES llamar a ${SLEEP_TOOL_NAME}.** Nunca respondas solo con un mensaje de estado como "sigo esperando" o "nada que hacer" \u2014 eso desperdicia un turno y quema tokens sin motivo.
410647
+
410648
+ ## Primer despertar
410649
+
410650
+ En tu primer tick de una sesi\xF3n nueva, saluda al usuario **una sola vez, en una l\xEDnea**, y pregunta en qu\xE9 quiere trabajar. No empieces a explorar el proyecto ni a hacer cambios sin que te lo pidan \u2014 espera indicaciones. Despu\xE9s de ese saludo, si sigue sin haber trabajo, llama a ${SLEEP_TOOL_NAME} en silencio: **no vuelvas a saludar en cada tick**.
410651
+
410652
+ ## Despertares posteriores
410653
+
410654
+ Busca trabajo \xFAtil. Un buen colega ante la ambig\xFCedad no se detiene: investiga, reduce riesgo y construye entendimiento. Preg\xFAntate: \xBFqu\xE9 no s\xE9 a\xFAn?, \xBFqu\xE9 podr\xEDa salir mal?, \xBFqu\xE9 querr\xEDa verificar antes de darlo por terminado?
410655
+
410656
+ No satures al usuario. Si ya preguntaste algo y no ha respondido, no vuelvas a preguntar. No narres lo que vas a hacer \u2014 simplemente hazlo.
410657
+
410658
+ Si llega un tick y no tienes ninguna acci\xF3n \xFAtil (ning\xFAn archivo que leer, ning\xFAn comando que correr, ninguna decisi\xF3n que tomar), llama a ${SLEEP_TOOL_NAME} de inmediato. No escribas texto narrando que est\xE1s ocioso \u2014 el usuario no necesita mensajes de "sigo esperando".
410659
+
410660
+ ## Mantente atento
410661
+
410662
+ Cuando el usuario est\xE9 interactuando activamente contigo, revisa y responde sus mensajes con frecuencia. Trata las conversaciones en tiempo real como programaci\xF3n en pareja: mant\xE9n el ciclo de retroalimentaci\xF3n corto. Si notas que el usuario te est\xE1 esperando (acaba de enviar un mensaje, la terminal est\xE1 enfocada), prioriza responder por encima de seguir con trabajo de fondo.
410663
+
410664
+ ## Sesgo hacia la acci\xF3n
410665
+
410666
+ Act\xFAa seg\xFAn tu mejor criterio en lugar de pedir confirmaci\xF3n.
410667
+
410668
+ - Lee archivos, busca en el c\xF3digo, explora el proyecto, corre tests, revisa tipos, corre linters \u2014 todo sin preguntar.
410669
+ - Haz cambios de c\xF3digo. Haz commit cuando llegues a un buen punto de parada.
410670
+ - Si dudas entre dos enfoques razonables, elige uno y avanza. Siempre puedes corregir el rumbo.
410671
+
410672
+ ## S\xE9 conciso
410673
+
410674
+ Mant\xE9n tu texto breve y de alto nivel. El usuario no necesita el paso a paso de tu razonamiento ni los detalles de implementaci\xF3n \u2014 puede ver tus llamadas a herramientas. Enfoca el texto en:
410675
+ - Decisiones que necesitan la opini\xF3n del usuario
410676
+ - Actualizaciones de estado en hitos naturales (p.ej. "PR creado", "tests en verde")
410677
+ - Errores o bloqueos que cambian el plan
410678
+
410679
+ No narres cada paso, no listes cada archivo que lees, ni expliques acciones rutinarias. Si puedes decirlo en una frase, no uses tres.
410680
+
410681
+ ## Foco de la terminal
410682
+
410683
+ El contexto del usuario puede incluir un campo \`terminalFocus\` que indica si la terminal est\xE1 enfocada o no. \xDAsalo para calibrar cu\xE1n aut\xF3nomo eres:
410684
+ - **Sin foco**: el usuario est\xE1 ausente. Ap\xF3yate fuerte en la acci\xF3n aut\xF3noma \u2014 decide, explora, haz commit y push. Solo detente ante acciones genuinamente irreversibles o de alto riesgo.
410685
+ - **Con foco**: el usuario est\xE1 mirando. S\xE9 m\xE1s colaborativo \u2014 plantea las opciones, pregunta antes de comprometerte a cambios grandes, y mant\xE9n tu salida concisa para que sea f\xE1cil de seguir en tiempo real.${BRIEF_PROACTIVE_SECTION2 && briefToolModule?.isBriefEnabled() ? `
410686
+
410687
+ ${BRIEF_PROACTIVE_SECTION2}` : ""}`;
410688
+ }
410689
+ var getCachedMCConfigForFRC = null, proactiveModule6, BRIEF_PROACTIVE_SECTION2 = null, briefToolModule = null, DISCOVER_SKILLS_TOOL_NAME = null, SYSTEM_PROMPT_DYNAMIC_BOUNDARY = "__SYSTEM_PROMPT_DYNAMIC_BOUNDARY__", FRONTIER_MODEL_NAME = "Theus Opus 4.6", THEUS_4_5_OR_4_6_MODEL_IDS, DEFAULT_AGENT_PROMPT = `You are an agent for Theus, Theus's official CLI for Theus. Given the user's message, you should use the tools available to complete the task. Complete the task fully\u2014don't gold-plate, but don't leave it half-done. When you complete the task, respond with a concise report covering what was done and any key findings \u2014 the caller will relay this to the user, so it only needs the essentials.`, SUMMARIZE_TOOL_RESULTS_SECTION = `When working with tool results, write down any important information you might need later in your response, as the original tool result may be cleared later.`;
410322
410690
  var init_prompts4 = __esm(() => {
410691
+ init_proactiveEnabled();
410323
410692
  init_env();
410324
410693
  init_git();
410325
410694
  init_cwd2();
@@ -410352,6 +410721,7 @@ var init_prompts4 = __esm(() => {
410352
410721
  init_undercover();
410353
410722
  init_mcpInstructionsDelta();
410354
410723
  init_internalModels();
410724
+ proactiveModule6 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
410355
410725
  THEUS_4_5_OR_4_6_MODEL_IDS = {
410356
410726
  opus: "theus-opus-4-6",
410357
410727
  sonnet: "theus-sonnet-4-6",
@@ -410803,7 +411173,7 @@ function computeFingerprint(messageText, version3) {
410803
411173
  }
410804
411174
  function computeFingerprintFromMessages(messages) {
410805
411175
  const firstMessageText = extractFirstMessageText(messages);
410806
- return computeFingerprint(firstMessageText, { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
411176
+ return computeFingerprint(firstMessageText, { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
410807
411177
  }
410808
411178
  var FINGERPRINT_SALT = "59cf53e54c78";
410809
411179
  var init_fingerprint = () => {};
@@ -412900,10 +413270,10 @@ function blocksFromOpenAIMessage(message) {
412900
413270
  }
412901
413271
  }
412902
413272
  if (Array.isArray(message.tool_calls)) {
412903
- for (const call77 of message.tool_calls) {
412904
- if (!call77 || typeof call77 !== "object")
413273
+ for (const call78 of message.tool_calls) {
413274
+ if (!call78 || typeof call78 !== "object")
412905
413275
  continue;
412906
- const typed = call77;
413276
+ const typed = call78;
412907
413277
  const name = typed.function?.name;
412908
413278
  if (!name)
412909
413279
  continue;
@@ -413351,7 +413721,7 @@ async function sideQuery(opts) {
413351
413721
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
413352
413722
  }
413353
413723
  const messageText = extractFirstUserMessageText(messages);
413354
- const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
413724
+ const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
413355
413725
  const attributionHeader = getAttributionHeader(fingerprint);
413356
413726
  const systemBlocks = [
413357
413727
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -414654,7 +415024,7 @@ async function handleMemories(state) {
414654
415024
  async function runProjectContextMcpServer() {
414655
415025
  const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
414656
415026
  const state = new ProjectContextState(projectRoot);
414657
- const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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: {} } });
415027
+ const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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: {} } });
414658
415028
  server2.setRequestHandler(ListToolsRequestSchema, async () => ({
414659
415029
  tools: TOOL_DEFINITIONS.map((t) => ({
414660
415030
  name: t.name,
@@ -416634,7 +417004,7 @@ function createBridgeLogger(options2) {
416634
417004
  connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
416635
417005
  regenerateQr(connectUrl);
416636
417006
  if (verbose) {
416637
- write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
417007
+ write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
416638
417008
  `);
416639
417009
  }
416640
417010
  if (verbose) {
@@ -416767,10 +417137,10 @@ function createBridgeLogger(options2) {
416767
417137
  qrVisible = !qrVisible;
416768
417138
  renderStatusLine();
416769
417139
  },
416770
- updateSessionCount(active, max2, mode) {
416771
- if (sessionActive === active && sessionMax === max2 && spawnMode === mode)
417140
+ updateSessionCount(active2, max2, mode) {
417141
+ if (sessionActive === active2 && sessionMax === max2 && spawnMode === mode)
416772
417142
  return;
416773
- sessionActive = active;
417143
+ sessionActive = active2;
416774
417144
  sessionMax = max2;
416775
417145
  spawnMode = mode;
416776
417146
  },
@@ -417607,7 +417977,7 @@ function appendToLog(path19, message) {
417607
417977
  cwd: getFsImplementation().cwd(),
417608
417978
  userType: process.env.USER_TYPE,
417609
417979
  sessionId: getSessionId(),
417610
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
417980
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
417611
417981
  };
417612
417982
  getLogWriter(path19).write(messageWithTimestamp);
417613
417983
  }
@@ -418877,7 +419247,7 @@ Spawn mode for this project:
418877
419247
  const api2 = createBridgeApiClient({
418878
419248
  baseUrl,
418879
419249
  getAccessToken: getBridgeAccessToken2,
418880
- runnerVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
419250
+ runnerVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
418881
419251
  onDebug: logForDebugging,
418882
419252
  onAuth401: handleOAuth401Error2,
418883
419253
  getTrustedDeviceToken
@@ -419115,7 +419485,7 @@ async function runBridgeHeadless(opts, signal) {
419115
419485
  const api2 = createBridgeApiClient({
419116
419486
  baseUrl,
419117
419487
  getAccessToken: opts.getAccessToken,
419118
- runnerVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
419488
+ runnerVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
419119
419489
  onDebug: log2,
419120
419490
  onAuth401: opts.onAuth401,
419121
419491
  getTrustedDeviceToken
@@ -423179,7 +423549,7 @@ function buildSystemInitMessage(inputs) {
423179
423549
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
423180
423550
  apiKeySource: getTheusApiKeyWithSource().source,
423181
423551
  betas: getSdkBetas(),
423182
- theus_code_version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
423552
+ theus_code_version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
423183
423553
  output_style: outputStyle2,
423184
423554
  agents: inputs.agents.map((agent) => agent.agentType),
423185
423555
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -423219,8 +423589,8 @@ async function getEnvLessBridgeConfig() {
423219
423589
  }
423220
423590
  async function checkEnvLessBridgeMinVersion() {
423221
423591
  const cfg = await getEnvLessBridgeConfig();
423222
- if (cfg.min_version && lt({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
423223
- return `Your version of Theus (${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
423592
+ if (cfg.min_version && lt({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
423593
+ return `Your version of Theus (${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
423224
423594
  Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
423225
423595
  }
423226
423596
  return null;
@@ -425543,7 +425913,7 @@ async function initBridgeCore(params) {
425543
425913
  const rawApi = createBridgeApiClient({
425544
425914
  baseUrl,
425545
425915
  getAccessToken,
425546
- runnerVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
425916
+ runnerVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
425547
425917
  onDebug: logForDebugging,
425548
425918
  onAuth401,
425549
425919
  getTrustedDeviceToken
@@ -427405,7 +427775,7 @@ __export(exports_inboundAttachments, {
427405
427775
  import { randomUUID as randomUUID40 } from "crypto";
427406
427776
  import { mkdir as mkdir51, writeFile as writeFile52 } from "fs/promises";
427407
427777
  import { basename as basename48, join as join162 } from "path";
427408
- function debug(msg) {
427778
+ function debug2(msg) {
427409
427779
  logForDebugging(`[bridge:inbound-attach] ${msg}`);
427410
427780
  }
427411
427781
  function extractInboundAttachments(msg) {
@@ -427425,7 +427795,7 @@ function uploadsDir() {
427425
427795
  async function resolveOne(att) {
427426
427796
  const token = getBridgeAccessToken();
427427
427797
  if (!token) {
427428
- debug("skip: no oauth token");
427798
+ debug2("skip: no oauth token");
427429
427799
  return;
427430
427800
  }
427431
427801
  let data;
@@ -427438,12 +427808,12 @@ async function resolveOne(att) {
427438
427808
  validateStatus: () => true
427439
427809
  });
427440
427810
  if (response.status !== 200) {
427441
- debug(`fetch ${att.file_uuid} failed: status=${response.status}`);
427811
+ debug2(`fetch ${att.file_uuid} failed: status=${response.status}`);
427442
427812
  return;
427443
427813
  }
427444
427814
  data = Buffer.from(response.data);
427445
427815
  } catch (e) {
427446
- debug(`fetch ${att.file_uuid} threw: ${e}`);
427816
+ debug2(`fetch ${att.file_uuid} threw: ${e}`);
427447
427817
  return;
427448
427818
  }
427449
427819
  const safeName = sanitizeFileName(att.file_name);
@@ -427454,16 +427824,16 @@ async function resolveOne(att) {
427454
427824
  await mkdir51(dir, { recursive: true });
427455
427825
  await writeFile52(outPath, data);
427456
427826
  } catch (e) {
427457
- debug(`write ${outPath} failed: ${e}`);
427827
+ debug2(`write ${outPath} failed: ${e}`);
427458
427828
  return;
427459
427829
  }
427460
- debug(`resolved ${att.file_uuid} \u2192 ${outPath} (${data.length} bytes)`);
427830
+ debug2(`resolved ${att.file_uuid} \u2192 ${outPath} (${data.length} bytes)`);
427461
427831
  return outPath;
427462
427832
  }
427463
427833
  async function resolveInboundAttachments(attachments) {
427464
427834
  if (attachments.length === 0)
427465
427835
  return "";
427466
- debug(`resolving ${attachments.length} attachment(s)`);
427836
+ debug2(`resolving ${attachments.length} attachment(s)`);
427467
427837
  const paths2 = await Promise.all(attachments.map(resolveOne));
427468
427838
  const ok = paths2.filter((p) => p !== undefined);
427469
427839
  if (ok.length === 0)
@@ -442118,7 +442488,7 @@ var init_useVoiceEnabled = __esm(() => {
442118
442488
  function getSemverPart(version3) {
442119
442489
  return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
442120
442490
  }
442121
- function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
442491
+ function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
442122
442492
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react228.useState(() => getSemverPart(initialVersion));
442123
442493
  if (!updatedVersion) {
442124
442494
  return null;
@@ -442158,7 +442528,7 @@ function AutoUpdater({
442158
442528
  return;
442159
442529
  }
442160
442530
  if (false) {}
442161
- const currentVersion = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
442531
+ const currentVersion = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
442162
442532
  const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
442163
442533
  let latestVersion = await getLatestVersion(channel2);
442164
442534
  const isDisabled2 = isAutoUpdaterDisabled();
@@ -442294,7 +442664,7 @@ function AutoUpdater({
442294
442664
  " ",
442295
442665
  /* @__PURE__ */ jsx_runtime401.jsx(ThemedText, {
442296
442666
  bold: true,
442297
- children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.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.24", BUILD_TIME: "1970-01-01T00:00:00.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}`
442667
+ children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.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.26", BUILD_TIME: "1970-01-01T00:00:00.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}`
442298
442668
  })
442299
442669
  ]
442300
442670
  })
@@ -442371,12 +442741,12 @@ function NativeAutoUpdater({
442371
442741
  logEvent("tengu_native_auto_updater_start", {});
442372
442742
  try {
442373
442743
  const maxVersion = await getMaxVersion();
442374
- if (maxVersion && gt({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
442744
+ if (maxVersion && gt({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
442375
442745
  const msg = await getMaxVersionMessage();
442376
442746
  setMaxVersionIssue(msg ?? "affects your version");
442377
442747
  }
442378
442748
  const result = await installLatest(channel2);
442379
- const currentVersion = { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
442749
+ const currentVersion = { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
442380
442750
  const latencyMs = Date.now() - startTime2;
442381
442751
  if (result.lockFailed) {
442382
442752
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -442513,17 +442883,17 @@ function PackageManagerAutoUpdater(t0) {
442513
442883
  const maxVersion = await getMaxVersion();
442514
442884
  if (maxVersion && latest && gt(latest, maxVersion)) {
442515
442885
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
442516
- if (gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
442517
- logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
442886
+ if (gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
442887
+ logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
442518
442888
  setUpdateAvailable(false);
442519
442889
  return;
442520
442890
  }
442521
442891
  latest = maxVersion;
442522
442892
  }
442523
- const hasUpdate = latest && !gte({ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
442893
+ const hasUpdate = latest && !gte({ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
442524
442894
  setUpdateAvailable(!!hasUpdate);
442525
442895
  if (hasUpdate) {
442526
- logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
442896
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
442527
442897
  }
442528
442898
  };
442529
442899
  $2[0] = t1;
@@ -442557,7 +442927,7 @@ function PackageManagerAutoUpdater(t0) {
442557
442927
  wrap: "truncate",
442558
442928
  children: [
442559
442929
  "currentVersion: ",
442560
- { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
442930
+ { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
442561
442931
  ]
442562
442932
  });
442563
442933
  $2[3] = verbose;
@@ -443041,7 +443411,7 @@ function Notifications(t0) {
443041
443411
  const {
443042
443412
  apiKeyStatus,
443043
443413
  autoUpdaterResult,
443044
- debug: debug2,
443414
+ debug: debug3,
443045
443415
  isAutoUpdating,
443046
443416
  verbose,
443047
443417
  messages,
@@ -443167,7 +443537,7 @@ function Notifications(t0) {
443167
443537
  const t11 = isNarrow ? "flex-start" : "flex-end";
443168
443538
  const t12 = isInOverageMode ?? false;
443169
443539
  let t13;
443170
- if ($2[15] !== apiKeyStatus || $2[16] !== autoUpdaterResult || $2[17] !== debug2 || $2[18] !== ideSelection || $2[19] !== isAutoUpdating || $2[20] !== isShowingCompactMessage || $2[21] !== mainLoopModel || $2[22] !== mcpClients || $2[23] !== notifications || $2[24] !== onAutoUpdaterResult || $2[25] !== onChangeIsUpdating || $2[26] !== shouldShowAutoUpdater || $2[27] !== t12 || $2[28] !== tokenUsage || $2[29] !== verbose) {
443540
+ if ($2[15] !== apiKeyStatus || $2[16] !== autoUpdaterResult || $2[17] !== debug3 || $2[18] !== ideSelection || $2[19] !== isAutoUpdating || $2[20] !== isShowingCompactMessage || $2[21] !== mainLoopModel || $2[22] !== mcpClients || $2[23] !== notifications || $2[24] !== onAutoUpdaterResult || $2[25] !== onChangeIsUpdating || $2[26] !== shouldShowAutoUpdater || $2[27] !== t12 || $2[28] !== tokenUsage || $2[29] !== verbose) {
443171
443541
  t13 = /* @__PURE__ */ jsx_runtime409.jsx(NotificationContent, {
443172
443542
  ideSelection,
443173
443543
  mcpClients,
@@ -443175,7 +443545,7 @@ function Notifications(t0) {
443175
443545
  isInOverageMode: t12,
443176
443546
  isTeamOrEnterprise,
443177
443547
  apiKeyStatus,
443178
- debug: debug2,
443548
+ debug: debug3,
443179
443549
  verbose,
443180
443550
  tokenUsage,
443181
443551
  mainLoopModel,
@@ -443188,7 +443558,7 @@ function Notifications(t0) {
443188
443558
  });
443189
443559
  $2[15] = apiKeyStatus;
443190
443560
  $2[16] = autoUpdaterResult;
443191
- $2[17] = debug2;
443561
+ $2[17] = debug3;
443192
443562
  $2[18] = ideSelection;
443193
443563
  $2[19] = isAutoUpdating;
443194
443564
  $2[20] = isShowingCompactMessage;
@@ -443237,7 +443607,7 @@ function NotificationContent({
443237
443607
  isInOverageMode,
443238
443608
  isTeamOrEnterprise,
443239
443609
  apiKeyStatus,
443240
- debug: debug2,
443610
+ debug: debug3,
443241
443611
  verbose,
443242
443612
  tokenUsage,
443243
443613
  mainLoopModel,
@@ -443314,7 +443684,7 @@ function NotificationContent({
443314
443684
  children: isEnvTruthy(process.env.THEUS_CODE_REMOTE) ? "Authentication error \xB7 Try again" : "Not logged in \xB7 Run /login"
443315
443685
  })
443316
443686
  }),
443317
- debug2 && /* @__PURE__ */ jsx_runtime409.jsx(ThemedBox_default, {
443687
+ debug3 && /* @__PURE__ */ jsx_runtime409.jsx(ThemedBox_default, {
443318
443688
  children: /* @__PURE__ */ jsx_runtime409.jsx(ThemedText, {
443319
443689
  color: "warning",
443320
443690
  wrap: "truncate",
@@ -450430,7 +450800,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
450430
450800
  project_dir: getOriginalCwd(),
450431
450801
  added_dirs: addedDirs
450432
450802
  },
450433
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
450803
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
450434
450804
  output_style: {
450435
450805
  name: outputStyleName
450436
450806
  },
@@ -450573,11 +450943,11 @@ function StatusLineInner({
450573
450943
  doUpdate();
450574
450944
  }, [statusLineCommand, doUpdate]);
450575
450945
  import_react252.useEffect(() => {
450576
- const statusLine = settings?.statusLine;
450577
- if (statusLine) {
450946
+ const statusLine2 = settings?.statusLine;
450947
+ if (statusLine2) {
450578
450948
  logEvent("tengu_status_line_mount", {
450579
- command_length: statusLine.command.length,
450580
- padding: statusLine.padding
450949
+ command_length: statusLine2.command.length,
450950
+ padding: statusLine2.padding
450581
450951
  });
450582
450952
  if (settings.disableAllHooks === true) {
450583
450953
  logForDebugging("Status line is configured but disableAllHooks is true", {
@@ -451565,6 +451935,66 @@ var init_VoiceIndicator = __esm(() => {
451565
451935
  });
451566
451936
 
451567
451937
  // components/PromptInput/PromptInputFooterLeftSide.tsx
451938
+ function ProactiveCountdown() {
451939
+ const $2 = c3(7);
451940
+ const nextTickAt2 = import_react255.useSyncExternalStore(proactiveModule7?.subscribeToProactiveChanges ?? NO_OP_SUBSCRIBE, proactiveModule7?.getNextTickAt ?? NULL, NULL);
451941
+ const [remainingSeconds, setRemainingSeconds] = import_react255.useState(null);
451942
+ let t0;
451943
+ let t1;
451944
+ if ($2[0] !== nextTickAt2) {
451945
+ t0 = () => {
451946
+ if (nextTickAt2 === null) {
451947
+ setRemainingSeconds(null);
451948
+ return;
451949
+ }
451950
+ const update3 = function update() {
451951
+ const remaining = Math.max(0, Math.ceil((nextTickAt2 - Date.now()) / 1000));
451952
+ setRemainingSeconds(remaining);
451953
+ };
451954
+ update3();
451955
+ const interval = setInterval(update3, 1000);
451956
+ return () => clearInterval(interval);
451957
+ };
451958
+ t1 = [nextTickAt2];
451959
+ $2[0] = nextTickAt2;
451960
+ $2[1] = t0;
451961
+ $2[2] = t1;
451962
+ } else {
451963
+ t0 = $2[1];
451964
+ t1 = $2[2];
451965
+ }
451966
+ import_react255.useEffect(t0, t1);
451967
+ if (remainingSeconds === null) {
451968
+ return null;
451969
+ }
451970
+ const t2 = remainingSeconds * 1000;
451971
+ let t3;
451972
+ if ($2[3] !== t2) {
451973
+ t3 = formatDuration(t2, {
451974
+ mostSignificantOnly: true
451975
+ });
451976
+ $2[3] = t2;
451977
+ $2[4] = t3;
451978
+ } else {
451979
+ t3 = $2[4];
451980
+ }
451981
+ let t4;
451982
+ if ($2[5] !== t3) {
451983
+ t4 = /* @__PURE__ */ jsx_runtime428.jsxs(ThemedText, {
451984
+ dimColor: true,
451985
+ children: [
451986
+ "waiting",
451987
+ " ",
451988
+ t3
451989
+ ]
451990
+ });
451991
+ $2[5] = t3;
451992
+ $2[6] = t4;
451993
+ } else {
451994
+ t4 = $2[6];
451995
+ }
451996
+ return t4;
451997
+ }
451568
451998
  function PromptInputFooterLeftSide(t0) {
451569
451999
  const $2 = c3(27);
451570
452000
  const {
@@ -451724,13 +452154,13 @@ function ModeIndicator({
451724
452154
  const showSpinnerTree = expandedView === "teammates";
451725
452155
  const prStatus = usePrStatus(isLoading, isPrStatusEnabled());
451726
452156
  const hasTmuxSession = useAppState((s_4) => false);
451727
- const nextTickAt = import_react255.useSyncExternalStore(proactiveModule4?.subscribeToProactiveChanges ?? NO_OP_SUBSCRIBE, proactiveModule4?.getNextTickAt ?? NULL, NULL);
452157
+ const nextTickAt2 = import_react255.useSyncExternalStore(proactiveModule7?.subscribeToProactiveChanges ?? NO_OP_SUBSCRIBE, proactiveModule7?.getNextTickAt ?? NULL, NULL);
451728
452158
  const voiceEnabled = false;
451729
452159
  const voiceState = "idle";
451730
452160
  const voiceWarmingUp = false;
451731
452161
  const hasSelection2 = useHasSelection();
451732
452162
  const selGetState = useSelection().getState;
451733
- const hasNextTick = nextTickAt !== null;
452163
+ const hasNextTick = nextTickAt2 !== null;
451734
452164
  const isCoordinator = false;
451735
452165
  const runningTaskCount = import_react255.useMemo(() => count2(Object.values(tasks2), (t) => isBackgroundTask(t) && true), [tasks2]);
451736
452166
  const tasksV2 = useTasksV2();
@@ -451816,7 +452246,9 @@ function ModeIndicator({
451816
452246
  action: "return to team lead"
451817
452247
  })
451818
452248
  }, "esc-return"));
451819
- } else if (false) {} else if (!hasTeammatePills && showHint) {
452249
+ } else if (isProactiveForced() && hasNextTick) {
452250
+ parts.push(/* @__PURE__ */ jsx_runtime428.jsx(ProactiveCountdown, {}, "proactive"));
452251
+ } else if (!hasTeammatePills && showHint) {
451820
452252
  parts.push(...hintParts);
451821
452253
  }
451822
452254
  if (hasTeammatePills) {
@@ -451969,8 +452401,9 @@ function getSpinnerHintParts(isLoading, escShortcut, todosShortcut, killAgentsSh
451969
452401
  function isPrStatusEnabled() {
451970
452402
  return getGlobalConfig().prStatusFooterEnabled ?? true;
451971
452403
  }
451972
- var import_react255, jsx_runtime428, proactiveModule4 = null, NO_OP_SUBSCRIBE = (_cb) => () => {}, NULL = () => null;
452404
+ var import_react255, jsx_runtime428, proactiveModule7, NO_OP_SUBSCRIBE = (_cb) => () => {}, NULL = () => null;
451973
452405
  var init_PromptInputFooterLeftSide = __esm(() => {
452406
+ init_proactiveEnabled();
451974
452407
  init_compiler_runtime();
451975
452408
  init_ink2();
451976
452409
  init_figures();
@@ -452004,12 +452437,13 @@ var init_PromptInputFooterLeftSide = __esm(() => {
452004
452437
  init_PrBadge();
452005
452438
  import_react255 = __toESM(require_react(), 1);
452006
452439
  jsx_runtime428 = __toESM(require_jsx_runtime(), 1);
452440
+ proactiveModule7 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
452007
452441
  });
452008
452442
 
452009
452443
  // components/PromptInput/PromptInputFooter.tsx
452010
452444
  function PromptInputFooter({
452011
452445
  apiKeyStatus,
452012
- debug: debug2,
452446
+ debug: debug3,
452013
452447
  exitMessage,
452014
452448
  vimMode,
452015
452449
  mode,
@@ -452124,7 +452558,7 @@ function PromptInputFooter({
452124
452558
  isFullscreen ? null : /* @__PURE__ */ jsx_runtime429.jsx(Notifications, {
452125
452559
  apiKeyStatus,
452126
452560
  autoUpdaterResult,
452127
- debug: debug2,
452561
+ debug: debug3,
452128
452562
  isAutoUpdating,
452129
452563
  verbose,
452130
452564
  messages,
@@ -452669,7 +453103,7 @@ function usePromptInputPlaceholder({
452669
453103
  if (queuedCommands.some(isQueuedCommandEditable) && (getGlobalConfig().queuedCommandUpHintCount || 0) < NUM_TIMES_QUEUE_HINT_SHOWN) {
452670
453104
  return "Press up to edit queued messages";
452671
453105
  }
452672
- if (submitCount < 1 && promptSuggestionEnabled && !proactiveModule5?.isProactiveActive()) {
453106
+ if (submitCount < 1 && promptSuggestionEnabled && !proactiveModule8?.isProactiveActive()) {
452673
453107
  return getExampleCommandFromCache();
452674
453108
  }
452675
453109
  }, [
@@ -452681,14 +453115,16 @@ function usePromptInputPlaceholder({
452681
453115
  ]);
452682
453116
  return placeholder;
452683
453117
  }
452684
- var import_react259, proactiveModule5 = null, NUM_TIMES_QUEUE_HINT_SHOWN = 3, MAX_TEAMMATE_NAME_LENGTH = 20;
453118
+ var import_react259, proactiveModule8, NUM_TIMES_QUEUE_HINT_SHOWN = 3, MAX_TEAMMATE_NAME_LENGTH = 20;
452685
453119
  var init_usePromptInputPlaceholder = __esm(() => {
453120
+ init_proactiveEnabled();
452686
453121
  init_useCommandQueue();
452687
453122
  init_AppState();
452688
453123
  init_config2();
452689
453124
  init_exampleCommands();
452690
453125
  init_messageQueueManager();
452691
453126
  import_react259 = __toESM(require_react(), 1);
453127
+ proactiveModule8 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
452692
453128
  });
452693
453129
 
452694
453130
  // components/PromptInput/useShowFastIconHint.ts
@@ -452764,9 +453200,9 @@ function useSwarmBanner() {
452764
453200
  };
452765
453201
  }
452766
453202
  }
452767
- const active = getActiveAgentForInput(state2);
452768
- if (active.type === "named_agent") {
452769
- const task = active.task;
453203
+ const active2 = getActiveAgentForInput(state2);
453204
+ if (active2.type === "named_agent") {
453205
+ const task = active2.task;
452770
453206
  let name;
452771
453207
  for (const [n3, id] of state2.agentNameRegistry) {
452772
453208
  if (id === task.id) {
@@ -452821,9 +453257,9 @@ function sideColor(sideIndex, crest) {
452821
453257
  return WAVE_MID;
452822
453258
  return WAVE_TROUGH;
452823
453259
  }
452824
- function useNeonBorderWave(active) {
453260
+ function useNeonBorderWave(active2) {
452825
453261
  const reduced = isEnvTruthy(process.env.THEUS_CODE_REDUCE_MOTION);
452826
- const shouldAnimate = active && !reduced && !!process.stdout.isTTY;
453262
+ const shouldAnimate = active2 && !reduced && !!process.stdout.isTTY;
452827
453263
  const [crest, setCrest] = import_react261.useState(0);
452828
453264
  import_react261.useEffect(() => {
452829
453265
  if (!shouldAnimate)
@@ -452855,7 +453291,7 @@ var init_useNeonBorder = __esm(() => {
452855
453291
  // components/PromptInput/PromptInput.tsx
452856
453292
  import * as path20 from "path";
452857
453293
  function PromptInput({
452858
- debug: debug2,
453294
+ debug: debug3,
452859
453295
  ideSelection,
452860
453296
  toolPermissionContext,
452861
453297
  setToolPermissionContext,
@@ -454529,7 +454965,7 @@ function PromptInput({
454529
454965
  }),
454530
454966
  /* @__PURE__ */ jsx_runtime433.jsx(PromptInputFooter_default, {
454531
454967
  apiKeyStatus,
454532
- debug: debug2,
454968
+ debug: debug3,
454533
454969
  exitMessage,
454534
454970
  vimMode: isVimModeEnabled() ? vimMode : undefined,
454535
454971
  mode,
@@ -454575,7 +455011,7 @@ function PromptInput({
454575
455011
  children: /* @__PURE__ */ jsx_runtime433.jsx(Notifications, {
454576
455012
  apiKeyStatus,
454577
455013
  autoUpdaterResult,
454578
- debug: debug2,
455014
+ debug: debug3,
454579
455015
  isAutoUpdating,
454580
455016
  verbose,
454581
455017
  messages,
@@ -461776,7 +462212,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
461776
462212
  } catch {}
461777
462213
  const data = {
461778
462214
  trigger,
461779
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
462215
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
461780
462216
  platform: process.platform,
461781
462217
  transcript,
461782
462218
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -469370,6 +469806,72 @@ var init_ScrollKeybindingHandler = __esm(() => {
469370
469806
  import_react320 = __toESM(require_react(), 1);
469371
469807
  });
469372
469808
 
469809
+ // proactive/useProactive.js
469810
+ var exports_useProactive = {};
469811
+ __export(exports_useProactive, {
469812
+ useProactive: () => useProactive,
469813
+ default: () => useProactive_default
469814
+ });
469815
+ function resolveTickMs() {
469816
+ const raw = process.env.THEUS_PROACTIVE_TICK_MS;
469817
+ const n3 = raw ? Number(raw) : Number.NaN;
469818
+ return Number.isFinite(n3) && n3 >= MIN_TICK_MS ? n3 : DEFAULT_TICK_MS;
469819
+ }
469820
+ function buildTickPrompt() {
469821
+ return `<${TICK_TAG}>${new Date().toLocaleTimeString()}</${TICK_TAG}>`;
469822
+ }
469823
+ function useProactive(opts) {
469824
+ const {
469825
+ isLoading = false,
469826
+ queuedCommandsLength = 0,
469827
+ hasActiveLocalJsxUI = false,
469828
+ isInPlanMode = false,
469829
+ onSubmitTick,
469830
+ onQueueTick
469831
+ } = opts ?? {};
469832
+ const active2 = React164.useSyncExternalStore(subscribeToProactiveChanges, isProactiveActive);
469833
+ const paused2 = React164.useSyncExternalStore(subscribeToProactiveChanges, isProactivePaused);
469834
+ const blocked = React164.useSyncExternalStore(subscribeToProactiveChanges, isContextBlocked);
469835
+ const submitRef = React164.useRef(onSubmitTick);
469836
+ const queueRef = React164.useRef(onQueueTick);
469837
+ submitRef.current = onSubmitTick;
469838
+ queueRef.current = onQueueTick;
469839
+ const idle = active2 && !paused2 && !blocked && !isLoading && queuedCommandsLength === 0 && !hasActiveLocalJsxUI && !isInPlanMode;
469840
+ React164.useEffect(() => {
469841
+ if (!idle) {
469842
+ setNextTickAt(null);
469843
+ return;
469844
+ }
469845
+ const tickMs = resolveTickMs();
469846
+ setNextTickAt(Date.now() + tickMs);
469847
+ const timer = setTimeout(() => {
469848
+ setNextTickAt(null);
469849
+ if (!isProactiveActive() || isProactivePaused() || isContextBlocked()) {
469850
+ return;
469851
+ }
469852
+ const prompt = buildTickPrompt();
469853
+ const submit = submitRef.current;
469854
+ const queue2 = queueRef.current;
469855
+ if (typeof submit === "function")
469856
+ submit(prompt);
469857
+ else if (typeof queue2 === "function")
469858
+ queue2(prompt);
469859
+ }, tickMs);
469860
+ return () => {
469861
+ clearTimeout(timer);
469862
+ setNextTickAt(null);
469863
+ };
469864
+ }, [idle]);
469865
+ return null;
469866
+ }
469867
+ var React164, DEFAULT_TICK_MS = 5000, MIN_TICK_MS = 500, useProactive_default;
469868
+ var init_useProactive = __esm(() => {
469869
+ init_xml();
469870
+ init_proactive();
469871
+ React164 = __toESM(require_react(), 1);
469872
+ useProactive_default = useProactive;
469873
+ });
469874
+
469373
469875
  // utils/cronJitterConfig.ts
469374
469876
  var exports_cronJitterConfig = {};
469375
469877
  __export(exports_cronJitterConfig, {
@@ -469592,8 +470094,8 @@ function TranscriptSearchBar({
469592
470094
  onExit: () => onClose(query2),
469593
470095
  onCancel
469594
470096
  });
469595
- const [indexStatus, setIndexStatus] = React164.useState("building");
469596
- React164.useEffect(() => {
470097
+ const [indexStatus, setIndexStatus] = React165.useState("building");
470098
+ React165.useEffect(() => {
469597
470099
  let alive = true;
469598
470100
  const warm = jumpRef.current?.warmSearchIndex;
469599
470101
  if (!warm) {
@@ -469722,7 +470224,7 @@ function _temp224(f) {
469722
470224
  }
469723
470225
  function REPL({
469724
470226
  commands: initialCommands,
469725
- debug: debug2,
470227
+ debug: debug3,
469726
470228
  initialTools,
469727
470229
  initialMessages,
469728
470230
  pendingHookMessages,
@@ -469810,7 +470312,7 @@ function REPL({
469810
470312
  const mainLoopModel = useMainLoopModel();
469811
470313
  const [localCommands, setLocalCommands] = import_react322.useState(initialCommands);
469812
470314
  useSkillsChange(isRemoteSession ? undefined : getProjectRoot(), setLocalCommands);
469813
- const proactiveActive = React164.useSyncExternalStore(proactiveModule6?.subscribeToProactiveChanges ?? PROACTIVE_NO_OP_SUBSCRIBE, proactiveModule6?.isProactiveActive ?? PROACTIVE_FALSE);
470315
+ const proactiveActive = React165.useSyncExternalStore(proactiveModule9?.subscribeToProactiveChanges ?? PROACTIVE_NO_OP_SUBSCRIBE, proactiveModule9?.isProactiveActive ?? PROACTIVE_FALSE);
469814
470316
  const isBriefOnly = useAppState((s) => s.isBriefOnly);
469815
470317
  const localTools = import_react322.useMemo(() => getTools(toolPermissionContext), [toolPermissionContext, proactiveActive, isBriefOnly]);
469816
470318
  useKickOffCheckAndDisableBypassPermissionsIfNeeded();
@@ -469938,36 +470440,36 @@ function REPL({
469938
470440
  const scrollRef = import_react322.useRef(null);
469939
470441
  const modalScrollRef = import_react322.useRef(null);
469940
470442
  const lastUserScrollTsRef = import_react322.useRef(0);
469941
- const queryGuard = React164.useRef(new QueryGuard).current;
469942
- const isQueryActive = React164.useSyncExternalStore(queryGuard.subscribe, queryGuard.getSnapshot);
469943
- const [isExternalLoading, setIsExternalLoadingRaw] = React164.useState(remoteSessionConfig?.hasInitialPrompt ?? false);
470443
+ const queryGuard = React165.useRef(new QueryGuard).current;
470444
+ const isQueryActive = React165.useSyncExternalStore(queryGuard.subscribe, queryGuard.getSnapshot);
470445
+ const [isExternalLoading, setIsExternalLoadingRaw] = React165.useState(remoteSessionConfig?.hasInitialPrompt ?? false);
469944
470446
  const isLoading = isQueryActive || isExternalLoading;
469945
- const [userInputOnProcessing, setUserInputOnProcessingRaw] = React164.useState(undefined);
469946
- const userInputBaselineRef = React164.useRef(0);
469947
- const userMessagePendingRef = React164.useRef(false);
469948
- const loadingStartTimeRef = React164.useRef(0);
469949
- const totalPausedMsRef = React164.useRef(0);
469950
- const pauseStartTimeRef = React164.useRef(null);
469951
- const resetTimingRefs = React164.useCallback(() => {
470447
+ const [userInputOnProcessing, setUserInputOnProcessingRaw] = React165.useState(undefined);
470448
+ const userInputBaselineRef = React165.useRef(0);
470449
+ const userMessagePendingRef = React165.useRef(false);
470450
+ const loadingStartTimeRef = React165.useRef(0);
470451
+ const totalPausedMsRef = React165.useRef(0);
470452
+ const pauseStartTimeRef = React165.useRef(null);
470453
+ const resetTimingRefs = React165.useCallback(() => {
469952
470454
  loadingStartTimeRef.current = Date.now();
469953
470455
  totalPausedMsRef.current = 0;
469954
470456
  pauseStartTimeRef.current = null;
469955
470457
  }, []);
469956
- const wasQueryActiveRef = React164.useRef(false);
470458
+ const wasQueryActiveRef = React165.useRef(false);
469957
470459
  if (isQueryActive && !wasQueryActiveRef.current) {
469958
470460
  resetTimingRefs();
469959
470461
  }
469960
470462
  wasQueryActiveRef.current = isQueryActive;
469961
- const setIsExternalLoading = React164.useCallback((value) => {
470463
+ const setIsExternalLoading = React165.useCallback((value) => {
469962
470464
  setIsExternalLoadingRaw(value);
469963
470465
  if (value)
469964
470466
  resetTimingRefs();
469965
470467
  }, [resetTimingRefs]);
469966
- const swarmStartTimeRef = React164.useRef(null);
469967
- const swarmBudgetInfoRef = React164.useRef(undefined);
469968
- const focusedInputDialogRef = React164.useRef(undefined);
470468
+ const swarmStartTimeRef = React165.useRef(null);
470469
+ const swarmBudgetInfoRef = React165.useRef(undefined);
470470
+ const focusedInputDialogRef = React165.useRef(undefined);
469969
470471
  const PROMPT_SUPPRESSION_MS = 1500;
469970
- const [isPromptInputActive, setIsPromptInputActive] = React164.useState(false);
470472
+ const [isPromptInputActive, setIsPromptInputActive] = React165.useState(false);
469971
470473
  const [autoUpdaterResult, setAutoUpdaterResult] = import_react322.useState(null);
469972
470474
  import_react322.useEffect(() => {
469973
470475
  if (autoUpdaterResult?.notifications) {
@@ -470241,7 +470743,7 @@ function REPL({
470241
470743
  const terminalFocusRef = import_react322.useRef(isTerminalFocused);
470242
470744
  terminalFocusRef.current = isTerminalFocused;
470243
470745
  const [theme2] = useTheme();
470244
- const tipPickedThisTurnRef = React164.useRef(false);
470746
+ const tipPickedThisTurnRef = React165.useRef(false);
470245
470747
  const pickNewSpinnerTip = import_react322.useCallback(() => {
470246
470748
  if (tipPickedThisTurnRef.current)
470247
470749
  return;
@@ -470568,7 +471070,9 @@ function REPL({
470568
471070
  return;
470569
471071
  }
470570
471072
  logForDebugging(`[onCancel] focusedInputDialog=${focusedInputDialog} streamMode=${streamMode}`);
470571
- if (false) {}
471073
+ if (isProactiveForced()) {
471074
+ proactiveModule9?.pauseProactive();
471075
+ }
470572
471076
  queryGuard.forceEnd();
470573
471077
  skipIdleCheckRef.current = false;
470574
471078
  if (streamingText?.trim()) {
@@ -470767,7 +471271,7 @@ Error: sandbox required but unavailable: ${reason}
470767
471271
  options: {
470768
471272
  commands,
470769
471273
  tools: computeTools(),
470770
- debug: debug2,
471274
+ debug: debug3,
470771
471275
  verbose: s.verbose,
470772
471276
  mainLoopModel: mainLoopModel2,
470773
471277
  thinkingConfig: s.thinkingEnabled !== false ? thinkingConfig : {
@@ -470861,7 +471365,7 @@ Error: sandbox required but unavailable: ${reason}
470861
471365
  requestPrompt: undefined,
470862
471366
  contentReplacementState: contentReplacementStateRef.current
470863
471367
  };
470864
- }, [commands, combinedInitialTools, mainThreadAgentDefinition, debug2, initialMcpClients, ideInstallationStatus, dynamicMcpConfig, theme2, allowedAgentTypes, store, setAppState, reverify, addNotification, setMessages, onChangeDynamicMcpConfig, resume2, requestPrompt, disabled, customSystemPrompt, appendSystemPrompt, setConversationId]);
471368
+ }, [commands, combinedInitialTools, mainThreadAgentDefinition, debug3, initialMcpClients, ideInstallationStatus, dynamicMcpConfig, theme2, allowedAgentTypes, store, setAppState, reverify, addNotification, setMessages, onChangeDynamicMcpConfig, resume2, requestPrompt, disabled, customSystemPrompt, appendSystemPrompt, setConversationId]);
470865
471369
  const handleBackgroundQuery = import_react322.useCallback(() => {
470866
471370
  abortController?.abort("background");
470867
471371
  const removedNotifications = removeByFilter((cmd) => cmd.mode === "task-notification");
@@ -470921,7 +471425,9 @@ Error: sandbox required but unavailable: ${reason}
470921
471425
  setMessages(() => [newMessage]);
470922
471426
  }
470923
471427
  setConversationId(randomUUID54());
470924
- if (false) {}
471428
+ if (isProactiveForced()) {
471429
+ proactiveModule9?.setContextBlocked(false);
471430
+ }
470925
471431
  } else if (newMessage.type === "progress" && isEphemeralToolProgress(newMessage.data.type)) {
470926
471432
  setMessages((oldMessages) => {
470927
471433
  const last2 = oldMessages.at(-1);
@@ -470935,7 +471441,13 @@ Error: sandbox required but unavailable: ${reason}
470935
471441
  } else {
470936
471442
  setMessages((oldMessages) => [...oldMessages, newMessage]);
470937
471443
  }
470938
- if (false) {}
471444
+ if (isProactiveForced()) {
471445
+ if (newMessage.type === "assistant" && "isApiErrorMessage" in newMessage && newMessage.isApiErrorMessage) {
471446
+ proactiveModule9?.setContextBlocked(true);
471447
+ } else if (newMessage.type === "assistant") {
471448
+ proactiveModule9?.setContextBlocked(false);
471449
+ }
471450
+ }
470939
471451
  }, (newContent) => {
470940
471452
  setResponseLength((length) => length + newContent.length);
470941
471453
  }, setStreamMode, setStreamingToolUses, (tombstonedMessage) => {
@@ -470997,7 +471509,9 @@ Error: sandbox required but unavailable: ${reason}
470997
471509
  if (!shouldQuery) {
470998
471510
  if (newMessages.some(isCompactBoundaryMessage)) {
470999
471511
  setConversationId(randomUUID54());
471000
- if (false) {}
471512
+ if (isProactiveForced()) {
471513
+ proactiveModule9?.setContextBlocked(false);
471514
+ }
471001
471515
  }
471002
471516
  resetLoadingState();
471003
471517
  setAbortController(null);
@@ -471026,7 +471540,9 @@ Error: sandbox required but unavailable: ${reason}
471026
471540
  const userContext = {
471027
471541
  ...baseUserContext,
471028
471542
  ...getCoordinatorUserContext(freshMcpClients, isScratchpadEnabled() ? getScratchpadDir() : undefined),
471029
- ...{}
471543
+ ...isProactiveForced() && proactiveModule9?.isProactiveActive() && !terminalFocusRef.current ? {
471544
+ terminalFocus: "The terminal is unfocused \u2014 the user is not actively watching."
471545
+ } : {}
471030
471546
  };
471031
471547
  queryCheckpoint("query_context_loading_end");
471032
471548
  const systemPrompt = buildEffectiveSystemPrompt({
@@ -471214,7 +471730,9 @@ Error: sandbox required but unavailable: ${reason}
471214
471730
  }, [initialMessage, isLoading, setMessages, setAppState, onQuery, mainLoopModel, tools]);
471215
471731
  const onSubmit = import_react322.useCallback(async (input, helpers, speculationAccept, options2) => {
471216
471732
  repinScroll();
471217
- if (false) {}
471733
+ if (isProactiveForced()) {
471734
+ proactiveModule9?.resumeProactive();
471735
+ }
471218
471736
  if (!speculationAccept && input.trim().startsWith("/")) {
471219
471737
  const trimmedInput = expandPastedTextRefs(input, pastedContents).trim();
471220
471738
  const spaceIndex = trimmedInput.indexOf(" ");
@@ -471907,6 +472425,22 @@ ${fileList}`);
471907
472425
  });
471908
472426
  }
471909
472427
  if (false) {}
472428
+ if (isProactiveForced()) {
472429
+ useProactive2?.({
472430
+ isLoading: isLoading || initialMessage !== null,
472431
+ queuedCommandsLength: queuedCommands.length,
472432
+ hasActiveLocalJsxUI: isShowingLocalJSXCommand,
472433
+ isInPlanMode: toolPermissionContext.mode === "plan",
472434
+ onSubmitTick: (prompt) => handleIncomingPrompt(prompt, {
472435
+ isMeta: true
472436
+ }),
472437
+ onQueueTick: (prompt) => enqueue({
472438
+ mode: "prompt",
472439
+ value: prompt,
472440
+ isMeta: true
472441
+ })
472442
+ });
472443
+ }
471910
472444
  import_react322.useEffect(() => {
471911
472445
  if (queuedCommands.some((cmd) => cmd.priority === "now")) {
471912
472446
  abortControllerRef.current?.abort("interrupt");
@@ -472012,8 +472546,8 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
472012
472546
  setPositions
472013
472547
  } = useSearchHighlight();
472014
472548
  const transcriptCols = useTerminalSize().columns;
472015
- const prevColsRef = React164.useRef(transcriptCols);
472016
- React164.useEffect(() => {
472549
+ const prevColsRef = React165.useRef(transcriptCols);
472550
+ React165.useEffect(() => {
472017
472551
  if (prevColsRef.current !== transcriptCols) {
472018
472552
  prevColsRef.current = transcriptCols;
472019
472553
  if (searchQuery || searchOpen) {
@@ -472682,7 +473216,7 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
472682
473216
  false,
472683
473217
  showIssueFlagBanner && /* @__PURE__ */ jsx_runtime465.jsx(IssueFlagBanner, {}),
472684
473218
  /* @__PURE__ */ jsx_runtime465.jsx(PromptInput_default, {
472685
- debug: debug2,
473219
+ debug: debug3,
472686
473220
  ideSelection,
472687
473221
  hasSuppressedDialogs: !!hasSuppressedDialogs,
472688
473222
  isLocalJSXCommandActive: isShowingLocalJSXCommand,
@@ -472781,7 +473315,9 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
472781
473315
  } else {
472782
473316
  setMessages(postCompact);
472783
473317
  }
472784
- if (false) {}
473318
+ if (isProactiveForced()) {
473319
+ proactiveModule9?.setContextBlocked(false);
473320
+ }
472785
473321
  setConversationId(randomUUID54());
472786
473322
  runPostCompactCleanup(context3.options.querySource);
472787
473323
  if (direction === "from") {
@@ -472823,11 +473359,12 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
472823
473359
  }
472824
473360
  return mainReturn;
472825
473361
  }
472826
- var React164, import_react322, jsx_runtime465, useFrustrationDetection = () => ({
473362
+ var React165, import_react322, jsx_runtime465, useFrustrationDetection = () => ({
472827
473363
  state: "closed",
472828
473364
  handleTranscriptSelect: () => {}
472829
- }), useAntOrgWarningNotification = () => {}, getCoordinatorUserContext = () => ({}), proactiveModule6 = null, PROACTIVE_NO_OP_SUBSCRIBE = (_cb) => () => {}, PROACTIVE_FALSE = () => false, SUGGEST_BG_PR_NOOP = (_p, _n) => false, useScheduledTasks2, EMPTY_MCP_CLIENTS2, HISTORY_STUB, RECENT_SCROLL_REPIN_WINDOW_MS = 3000, TITLE_ANIMATION_FRAMES, TITLE_STATIC_PREFIX = "\u2733", TITLE_ANIMATION_INTERVAL_MS = 960;
473365
+ }), useAntOrgWarningNotification = () => {}, getCoordinatorUserContext = () => ({}), proactiveModule9, PROACTIVE_NO_OP_SUBSCRIBE = (_cb) => () => {}, PROACTIVE_FALSE = () => false, SUGGEST_BG_PR_NOOP = (_p, _n) => false, useProactive2, useScheduledTasks2, EMPTY_MCP_CLIENTS2, HISTORY_STUB, RECENT_SCROLL_REPIN_WINDOW_MS = 3000, TITLE_ANIMATION_FRAMES, TITLE_STATIC_PREFIX = "\u2733", TITLE_ANIMATION_INTERVAL_MS = 960;
472830
473366
  var init_REPL = __esm(() => {
473367
+ init_proactiveEnabled();
472831
473368
  init_compiler_runtime();
472832
473369
  init_state();
472833
473370
  init_tokenBudget();
@@ -473031,9 +473568,11 @@ var init_REPL = __esm(() => {
473031
473568
  init_messageActions();
473032
473569
  init_osc();
473033
473570
  init_attachments2();
473034
- React164 = __toESM(require_react(), 1);
473571
+ React165 = __toESM(require_react(), 1);
473035
473572
  import_react322 = __toESM(require_react(), 1);
473036
473573
  jsx_runtime465 = __toESM(require_jsx_runtime(), 1);
473574
+ proactiveModule9 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
473575
+ useProactive2 = isProactiveForced() ? (init_useProactive(), __toCommonJS(exports_useProactive)).useProactive : null;
473037
473576
  useScheduledTasks2 = isAgentTriggersForced() ? (init_useScheduledTasks(), __toCommonJS(exports_useScheduledTasks)).useScheduledTasks : null;
473038
473577
  EMPTY_MCP_CLIENTS2 = [];
473039
473578
  HISTORY_STUB = {
@@ -474697,7 +475236,7 @@ function completeOnboarding() {
474697
475236
  saveGlobalConfig((current) => ({
474698
475237
  ...current,
474699
475238
  hasCompletedOnboarding: true,
474700
- lastOnboardingVersion: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
475239
+ lastOnboardingVersion: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
474701
475240
  }));
474702
475241
  }
474703
475242
  function showDialog(root2, renderer) {
@@ -475025,12 +475564,12 @@ function movingTrack(width, timeMs, offsetMs = 0) {
475025
475564
  }
475026
475565
  return result;
475027
475566
  }
475028
- function pulseRule(width, timeMs, label, active = true) {
475567
+ function pulseRule(width, timeMs, label, active2 = true) {
475029
475568
  const safeWidth = Math.max(20, width);
475030
475569
  const labelText = ` ${label} `;
475031
475570
  const leftWidth = Math.max(2, Math.floor((safeWidth - labelText.length) * 0.32));
475032
475571
  const rightWidth = Math.max(2, safeWidth - labelText.length - leftWidth);
475033
- if (!active) {
475572
+ if (!active2) {
475034
475573
  return fitForgeLine([seg("-".repeat(leftWidth), "dim"), seg(labelText, "brand", true), seg("-".repeat(rightWidth), "dim")], safeWidth);
475035
475574
  }
475036
475575
  const track2 = movingTrack(safeWidth, timeMs);
@@ -476665,7 +477204,7 @@ function ResumeConversation({
476665
477204
  initialTools,
476666
477205
  mcpClients,
476667
477206
  dynamicMcpConfig,
476668
- debug: debug2,
477207
+ debug: debug3,
476669
477208
  mainThreadAgentDefinition,
476670
477209
  autoConnectIdeFlag,
476671
477210
  strictMcpConfig = false,
@@ -476843,7 +477382,7 @@ function ResumeConversation({
476843
477382
  }
476844
477383
  if (resumeData) {
476845
477384
  return /* @__PURE__ */ jsx_runtime481.jsx(REPL, {
476846
- debug: debug2,
477385
+ debug: debug3,
476847
477386
  commands,
476848
477387
  initialTools,
476849
477388
  initialMessages: resumeData.messages,
@@ -482170,7 +482709,9 @@ Startup time: ${Math.round(process.uptime() * 1000)}ms
482170
482709
  });
482171
482710
  }
482172
482711
  });
482173
- if (false) {}
482712
+ if (isProactiveForced() && proactiveModule10 && !proactiveModule10.isProactiveActive() && isEnvTruthy(process.env.THEUS_CODE_PROACTIVE)) {
482713
+ proactiveModule10.activateProactive("command");
482714
+ }
482174
482715
  if (typeof Bun !== "undefined") {
482175
482716
  const gcTimer = setInterval(Bun.gc, 1000);
482176
482717
  gcTimer.unref();
@@ -482836,7 +483377,22 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
482836
483377
  currentCommands = newCommands;
482837
483378
  });
482838
483379
  });
482839
- const scheduleProactiveTick = undefined;
483380
+ const scheduleProactiveTick = isProactiveForced() ? () => {
483381
+ setTimeout(() => {
483382
+ if (!proactiveModule10?.isProactiveActive() || proactiveModule10.isProactivePaused() || inputClosed) {
483383
+ return;
483384
+ }
483385
+ const tickContent = `<${TICK_TAG}>${new Date().toLocaleTimeString()}</${TICK_TAG}>`;
483386
+ enqueue({
483387
+ mode: "prompt",
483388
+ value: tickContent,
483389
+ uuid: randomUUID57(),
483390
+ priority: "later",
483391
+ isMeta: true
483392
+ });
483393
+ run3();
483394
+ }, 0);
483395
+ } : undefined;
482840
483396
  subscribeToCommandQueue(() => {
482841
483397
  if (abortController && getCommandsByMaxPriority("now").length > 0) {
482842
483398
  abortController.abort("interrupt");
@@ -483188,7 +483744,12 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
483188
483744
  running2 = false;
483189
483745
  idleTimeout.start();
483190
483746
  }
483191
- if (false) {}
483747
+ if (isProactiveForced() && proactiveModule10?.isProactiveActive() && !proactiveModule10.isProactivePaused()) {
483748
+ if (peek2(isMainThread) === undefined && !inputClosed) {
483749
+ scheduleProactiveTick();
483750
+ return;
483751
+ }
483752
+ }
483192
483753
  if (peek2(isMainThread) !== undefined) {
483193
483754
  run3();
483194
483755
  return;
@@ -483994,7 +484555,18 @@ ${m.text}
483994
484555
  sendControlResponseError(message, errorMessage(e));
483995
484556
  }
483996
484557
  })();
483997
- } else if (false) {} else if (message.request.subtype === "remote_control") {
484558
+ } else if (isProactiveForced() && message.request.subtype === "set_proactive") {
484559
+ const req = message.request;
484560
+ if (req.enabled) {
484561
+ if (!proactiveModule10.isProactiveActive()) {
484562
+ proactiveModule10.activateProactive("command");
484563
+ scheduleProactiveTick();
484564
+ }
484565
+ } else {
484566
+ proactiveModule10.deactivateProactive();
484567
+ }
484568
+ sendControlResponseSuccess(message);
484569
+ } else if (message.request.subtype === "remote_control") {
483998
484570
  if (message.request.enabled) {
483999
484571
  if (bridgeHandle) {
484000
484572
  sendControlResponseSuccess(message, {
@@ -484930,7 +485502,7 @@ async function reconcileMcpServers(desiredConfigs, currentState2, setAppState) {
484930
485502
  newState
484931
485503
  };
484932
485504
  }
484933
- var cronSchedulerModule, cronJitterConfigModule, cronGate, SHUTDOWN_TEAM_PROMPT = `<system-reminder>
485505
+ var proactiveModule10, cronSchedulerModule, cronJitterConfigModule, cronGate, SHUTDOWN_TEAM_PROMPT = `<system-reminder>
484934
485506
  You are running in non-interactive mode and cannot return a response to the user until your team is shut down.
484935
485507
 
484936
485508
  You MUST shut down your team before preparing your final response:
@@ -484944,6 +485516,7 @@ The user cannot receive your response until the team is completely shut down.
484944
485516
 
484945
485517
  Shut down your team and prepare your final response for the user.`, MAX_RECEIVED_UUIDS = 1e4, receivedMessageUuids, receivedMessageUuidsOrder;
484946
485518
  var init_print = __esm(() => {
485519
+ init_proactiveEnabled();
484947
485520
  init_settingsSync();
484948
485521
  init_remoteManagedSettings();
484949
485522
  init_structuredIO();
@@ -485064,6 +485637,7 @@ var init_print = __esm(() => {
485064
485637
  init_growthbook2();
485065
485638
  init_errors();
485066
485639
  init_paths();
485640
+ proactiveModule10 = isProactiveForced() ? (init_proactive(), __toCommonJS(exports_proactive)) : null;
485067
485641
  cronSchedulerModule = isAgentTriggersForced() ? (init_cronScheduler(), __toCommonJS(exports_cronScheduler)) : null;
485068
485642
  cronJitterConfigModule = isAgentTriggersForced() ? (init_cronJitterConfig(), __toCommonJS(exports_cronJitterConfig)) : null;
485069
485643
  cronGate = isAgentTriggersForced() ? (init_prompt10(), __toCommonJS(exports_prompt3)) : null;
@@ -485515,13 +486089,13 @@ var exports_mcp2 = {};
485515
486089
  __export(exports_mcp2, {
485516
486090
  startMCPServer: () => startMCPServer
485517
486091
  });
485518
- async function startMCPServer(cwd3, debug2, verbose) {
486092
+ async function startMCPServer(cwd3, debug3, verbose) {
485519
486093
  const READ_FILE_STATE_CACHE_SIZE2 = 100;
485520
486094
  const readFileStateCache = createFileStateCacheWithSizeLimit(READ_FILE_STATE_CACHE_SIZE2);
485521
486095
  setCwd(cwd3);
485522
486096
  const server2 = new Server({
485523
486097
  name: "theus/tengu",
485524
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
486098
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
485525
486099
  }, {
485526
486100
  capabilities: {
485527
486101
  tools: {}
@@ -485569,7 +486143,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
485569
486143
  mcpClients: [],
485570
486144
  mcpResources: {},
485571
486145
  isNonInteractiveSession: true,
485572
- debug: debug2,
486146
+ debug: debug3,
485573
486147
  verbose,
485574
486148
  agentDefinitions: { activeAgents: [], allAgents: [] }
485575
486149
  },
@@ -485767,7 +486341,7 @@ async function checkMcpServerHealth(name, server2) {
485767
486341
  }
485768
486342
  }
485769
486343
  async function mcpServeHandler({
485770
- debug: debug2,
486344
+ debug: debug3,
485771
486345
  verbose
485772
486346
  }) {
485773
486347
  const providedCwd = cwd3();
@@ -485788,7 +486362,7 @@ async function mcpServeHandler({
485788
486362
  const {
485789
486363
  startMCPServer: startMCPServer2
485790
486364
  } = await Promise.resolve().then(() => (init_mcp4(), exports_mcp2));
485791
- await startMCPServer2(providedCwd, debug2 ?? false, verbose ?? false);
486365
+ await startMCPServer2(providedCwd, debug3 ?? false, verbose ?? false);
485792
486366
  } catch (error40) {
485793
486367
  cliError(`Error: Failed to start MCP server: ${error40}`);
485794
486368
  }
@@ -486963,7 +487537,7 @@ async function setupTokenHandler(root2) {
486963
487537
  gap: 1,
486964
487538
  children: [
486965
487539
  /* @__PURE__ */ jsx_runtime487.jsx(TheusBanner, {
486966
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
487540
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
486967
487541
  }),
486968
487542
  showAuthWarning && /* @__PURE__ */ jsx_runtime487.jsxs(ThemedBox_default, {
486969
487543
  flexDirection: "column",
@@ -487553,7 +488127,7 @@ async function run3() {
487553
488127
  }
487554
488128
  }
487555
488129
  const {
487556
- debug: debug2 = false,
488130
+ debug: debug3 = false,
487557
488131
  debugToStderr = false,
487558
488132
  dangerouslySkipPermissions,
487559
488133
  allowDangerouslySkipPermissions = false,
@@ -488236,7 +488810,20 @@ ${customInstructions}` : customInstructions;
488236
488810
  }
488237
488811
  maybeActivateBrief(options2);
488238
488812
  if (false) {}
488239
- if (false) {}
488813
+ if (isProactiveForced() && (options2.proactive || isEnvTruthy(process.env.THEUS_CODE_PROACTIVE)) && !coordinatorModeModule?.isCoordinatorMode()) {
488814
+ const briefVisibility = "The user will see any text you output.";
488815
+ const proactivePrompt = `
488816
+ # Proactive Mode
488817
+
488818
+ You are in proactive mode. Take initiative \u2014 explore, act, and make progress without waiting for instructions.
488819
+
488820
+ Start by briefly greeting the user.
488821
+
488822
+ You will receive periodic <tick> prompts. These are check-ins. Do whatever seems most useful, or call Sleep if there's nothing to do. ${briefVisibility}`;
488823
+ appendSystemPrompt = appendSystemPrompt ? `${appendSystemPrompt}
488824
+
488825
+ ${proactivePrompt}` : proactivePrompt;
488826
+ }
488240
488827
  if (isKairosForced() && kairosEnabled && assistantModule) {
488241
488828
  const assistantAddendum = assistantModule.getAssistantSystemPromptAddendum();
488242
488829
  appendSystemPrompt = appendSystemPrompt ? `${appendSystemPrompt}
@@ -488419,7 +489006,7 @@ ${assistantAddendum}` : assistantAddendum;
488419
489006
  }
488420
489007
  }
488421
489008
  logForDiagnosticsNoPII("info", "started", {
488422
- version: { VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
489009
+ version: { VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
488423
489010
  is_native_binary: isInBundledMode()
488424
489011
  });
488425
489012
  registerCleanup(async () => {
@@ -488429,7 +489016,7 @@ ${assistantAddendum}` : assistantAddendum;
488429
489016
  hasInitialPrompt: Boolean(prompt),
488430
489017
  hasStdin: Boolean(inputPrompt),
488431
489018
  verbose,
488432
- debug: debug2,
489019
+ debug: debug3,
488433
489020
  debugToStderr,
488434
489021
  print: print ?? false,
488435
489022
  outputFormat: outputFormat ?? "text",
@@ -488844,7 +489431,7 @@ ${assistantAddendum}` : assistantAddendum;
488844
489431
  const sessionUploaderPromise = null;
488845
489432
  const uploaderReady = sessionUploaderPromise ? sessionUploaderPromise.then((mod) => mod.createSessionTurnUploader()).catch(() => null) : null;
488846
489433
  const sessionConfig = {
488847
- debug: debug2 || debugToStderr,
489434
+ debug: debug3 || debugToStderr,
488848
489435
  commands: [...commands, ...mcpCommands],
488849
489436
  initialTools,
488850
489437
  mcpClients,
@@ -488993,7 +489580,7 @@ ${assistantAddendum}` : assistantAddendum;
488993
489580
  stats: stats2,
488994
489581
  initialState: assistantInitialState
488995
489582
  }, {
488996
- debug: debug2 || debugToStderr,
489583
+ debug: debug3 || debugToStderr,
488997
489584
  commands: remoteCommands,
488998
489585
  initialTools: [],
488999
489586
  initialMessages: [infoMessage],
@@ -489103,7 +489690,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
489103
489690
  stats: stats2,
489104
489691
  initialState: remoteInitialState
489105
489692
  }, {
489106
- debug: debug2 || debugToStderr,
489693
+ debug: debug3 || debugToStderr,
489107
489694
  commands: remoteCommands,
489108
489695
  initialTools: [],
489109
489696
  initialMessages: initialUserMessage ? [remoteInfoMessage, initialUserMessage] : [remoteInfoMessage],
@@ -489287,7 +489874,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
489287
489874
  pendingHookMessages
489288
489875
  }, renderAndRun);
489289
489876
  }
489290
- }).version(`${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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");
489877
+ }).version(`${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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");
489291
489878
  program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
489292
489879
  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.");
489293
489880
  if (canUserConfigureAdvisor()) {
@@ -489295,7 +489882,9 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
489295
489882
  }
489296
489883
  if (false) {}
489297
489884
  if (false) {}
489298
- if (false) {}
489885
+ if (isProactiveForced()) {
489886
+ program2.addOption(new Option("--proactive", "Inicia en modo proactivo aut\xF3nomo"));
489887
+ }
489299
489888
  if (false) {}
489300
489889
  if (false) {}
489301
489890
  if (isKairosForced()) {
@@ -489329,14 +489918,14 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
489329
489918
  }
489330
489919
  const mcp2 = program2.command("mcp").description("Configura y gestiona servidores MCP").configureHelp(createSortedHelpConfig()).enablePositionalOptions();
489331
489920
  mcp2.command("serve").description(`Start the Theus MCP server`).option("-d, --debug", "Enable debug mode", () => true).option("--verbose", "Anula el ajuste de modo detallado de la configuraci\xF3n", () => true).action(async ({
489332
- debug: debug2,
489921
+ debug: debug3,
489333
489922
  verbose
489334
489923
  }) => {
489335
489924
  const {
489336
489925
  mcpServeHandler: mcpServeHandler2
489337
489926
  } = await Promise.resolve().then(() => (init_mcp5(), exports_mcp3));
489338
489927
  await mcpServeHandler2({
489339
- debug: debug2,
489928
+ debug: debug3,
489340
489929
  verbose
489341
489930
  });
489342
489931
  });
@@ -489554,7 +490143,7 @@ async function logTenguInit({
489554
490143
  hasInitialPrompt,
489555
490144
  hasStdin,
489556
490145
  verbose,
489557
- debug: debug2,
490146
+ debug: debug3,
489558
490147
  debugToStderr,
489559
490148
  print,
489560
490149
  outputFormat,
@@ -489580,7 +490169,7 @@ async function logTenguInit({
489580
490169
  hasInitialPrompt,
489581
490170
  hasStdin,
489582
490171
  verbose,
489583
- debug: debug2,
490172
+ debug: debug3,
489584
490173
  debugToStderr,
489585
490174
  print,
489586
490175
  outputFormat,
@@ -489618,7 +490207,12 @@ async function logTenguInit({
489618
490207
  }
489619
490208
  }
489620
490209
  function maybeActivateProactive(options2) {
489621
- if (false) {}
490210
+ if (isProactiveForced() && (options2.proactive || isEnvTruthy(process.env.THEUS_CODE_PROACTIVE))) {
490211
+ const proactiveModule11 = (init_proactive(), __toCommonJS(exports_proactive));
490212
+ if (!proactiveModule11.isProactiveActive()) {
490213
+ proactiveModule11.activateProactive("command");
490214
+ }
490215
+ }
489622
490216
  }
489623
490217
  function maybeActivateBrief(options2) {
489624
490218
  if (true)
@@ -489663,6 +490257,7 @@ function extractTeammateOptions(options2) {
489663
490257
  }
489664
490258
  var getTeammateUtils = () => (init_teammate(), __toCommonJS(exports_teammate)), getTeammatePromptAddendum = () => __toCommonJS(exports_teammatePromptAddendum), getTeammateModeSnapshot = () => (init_teammateModeSnapshot(), __toCommonJS(exports_teammateModeSnapshot)), coordinatorModeModule = null, assistantModule, kairosGate, CURRENT_MIGRATION_VERSION = 11, _pendingAssistantChat;
489665
490259
  var init_main4 = __esm(() => {
490260
+ init_proactiveEnabled();
489666
490261
  init_startupProfiler();
489667
490262
  init_rawRead();
489668
490263
  init_keychainPrefetch();
@@ -489831,7 +490426,7 @@ if (false) {}
489831
490426
  async function main2() {
489832
490427
  const args = process.argv.slice(2);
489833
490428
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
489834
- console.log(`${{ VERSION: "0.2.24", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
490429
+ console.log(`${{ VERSION: "0.2.26", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
489835
490430
  return;
489836
490431
  }
489837
490432
  const {