theus-cli 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +8 -0
  2. package/cli.js +785 -562
  3. package/package.json +2 -2
package/cli.js CHANGED
@@ -58125,7 +58125,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
58125
58125
  if (isApiKeyHelperFromProjectOrLocalSettings()) {
58126
58126
  const hasTrust = checkHasTrustDialogAccepted();
58127
58127
  if (!hasTrust && !isNonInteractiveSession) {
58128
- const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58128
+ const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58129
58129
  logAntError("apiKeyHelper invoked before trust check", error40);
58130
58130
  logEvent("tengu_apiKeyHelper_missing_trust11", {});
58131
58131
  return null;
@@ -58169,7 +58169,7 @@ async function runAwsAuthRefresh() {
58169
58169
  if (isAwsAuthRefreshFromProjectSettings()) {
58170
58170
  const hasTrust = checkHasTrustDialogAccepted();
58171
58171
  if (!hasTrust && !getIsNonInteractiveSession()) {
58172
- const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58172
+ const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58173
58173
  logAntError("awsAuthRefresh invoked before trust check", error40);
58174
58174
  logEvent("tengu_awsAuthRefresh_missing_trust", {});
58175
58175
  return false;
@@ -58229,7 +58229,7 @@ async function getAwsCredsFromCredentialExport() {
58229
58229
  if (isAwsCredentialExportFromProjectSettings()) {
58230
58230
  const hasTrust = checkHasTrustDialogAccepted();
58231
58231
  if (!hasTrust && !getIsNonInteractiveSession()) {
58232
- const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58232
+ const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58233
58233
  logAntError("awsCredentialExport invoked before trust check", error40);
58234
58234
  logEvent("tengu_awsCredentialExport_missing_trust", {});
58235
58235
  return null;
@@ -58314,7 +58314,7 @@ async function runGcpAuthRefresh() {
58314
58314
  if (isGcpAuthRefreshFromProjectSettings()) {
58315
58315
  const hasTrust = checkHasTrustDialogAccepted();
58316
58316
  if (!hasTrust && !getIsNonInteractiveSession()) {
58317
- const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58317
+ const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
58318
58318
  logAntError("gcpAuthRefresh invoked before trust check", error40);
58319
58319
  logEvent("tengu_gcpAuthRefresh_missing_trust", {});
58320
58320
  return false;
@@ -59009,7 +59009,7 @@ var init_auth = __esm(() => {
59009
59009
 
59010
59010
  // utils/userAgent.ts
59011
59011
  function getTheusCodeUserAgent() {
59012
- return `theus-code/${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59012
+ return `theus-code/${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
59013
59013
  }
59014
59014
 
59015
59015
  // utils/workloadContext.ts
@@ -59031,7 +59031,7 @@ function getUserAgent() {
59031
59031
  const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
59032
59032
  const workload = getWorkload();
59033
59033
  const workloadSuffix = workload ? `, workload/${workload}` : "";
59034
- return `theus-cli/${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
59034
+ return `theus-cli/${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
59035
59035
  }
59036
59036
  function getMCPUserAgent() {
59037
59037
  const parts = [];
@@ -59045,7 +59045,7 @@ function getMCPUserAgent() {
59045
59045
  parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
59046
59046
  }
59047
59047
  const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
59048
- return `theus-code/${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
59048
+ return `theus-code/${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
59049
59049
  }
59050
59050
  function getWebFetchUserAgent() {
59051
59051
  return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
@@ -59183,7 +59183,7 @@ var init_user = __esm(() => {
59183
59183
  deviceId,
59184
59184
  sessionId: getSessionId(),
59185
59185
  email: getEmail(),
59186
- appVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59186
+ appVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
59187
59187
  platform: getHostPlatformForAnalytics(),
59188
59188
  organizationUuid,
59189
59189
  accountUuid,
@@ -60894,7 +60894,7 @@ var init_metadata = __esm(() => {
60894
60894
  COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
60895
60895
  WHITESPACE_REGEX = /\s+/;
60896
60896
  getVersionBase = memoize_default(() => {
60897
- const match = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
60897
+ const match = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
60898
60898
  return match ? match[0] : undefined;
60899
60899
  });
60900
60900
  buildEnvContext = memoize_default(async () => {
@@ -60934,9 +60934,9 @@ var init_metadata = __esm(() => {
60934
60934
  isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
60935
60935
  isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
60936
60936
  isTheusAiAuth: isTheusAISubscriber(),
60937
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
60937
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
60938
60938
  versionBase: getVersionBase(),
60939
- buildTime: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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,
60939
+ buildTime: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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,
60940
60940
  deploymentEnvironment: env3.detectDeploymentEnvironment(),
60941
60941
  ...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
60942
60942
  githubEventName: process.env.GITHUB_EVENT_NAME,
@@ -61604,7 +61604,7 @@ function initialize1PEventLogging() {
61604
61604
  const platform2 = getPlatform();
61605
61605
  const attributes = {
61606
61606
  [ATTR_SERVICE_NAME]: "theus-code",
61607
- [ATTR_SERVICE_VERSION]: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61607
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
61608
61608
  };
61609
61609
  if (platform2 === "wsl") {
61610
61610
  const wslVersion = getWslVersion();
@@ -61631,7 +61631,7 @@ function initialize1PEventLogging() {
61631
61631
  })
61632
61632
  ]
61633
61633
  });
61634
- firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61634
+ firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
61635
61635
  }
61636
61636
  async function reinitialize1PEventLoggingIfConfigChanged() {
61637
61637
  if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
@@ -63510,7 +63510,7 @@ function getAttributionHeader(fingerprint) {
63510
63510
  if (!isAttributionHeaderEnabled()) {
63511
63511
  return "";
63512
63512
  }
63513
- const version2 = `${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
63513
+ const version2 = `${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
63514
63514
  const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
63515
63515
  const cch = "";
63516
63516
  const workload = getWorkload();
@@ -111273,7 +111273,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
111273
111273
  }
111274
111274
  function getFeedbackGuideline() {
111275
111275
  if (isUsing3PServices()) {
111276
- return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`;
111276
+ return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`;
111277
111277
  }
111278
111278
  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";
111279
111279
  }
@@ -169889,7 +169889,7 @@ function getTelemetryAttributes() {
169889
169889
  attributes["session.id"] = sessionId;
169890
169890
  }
169891
169891
  if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
169892
- attributes["app.version"] = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
169892
+ attributes["app.version"] = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
169893
169893
  }
169894
169894
  const oauthAccount = getOauthAccountInfo();
169895
169895
  if (oauthAccount) {
@@ -205898,7 +205898,7 @@ function getInstallationEnv() {
205898
205898
  return;
205899
205899
  }
205900
205900
  function getTheusCodeVersion() {
205901
- return { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
205901
+ return { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
205902
205902
  }
205903
205903
  async function getInstalledVSCodeExtensionVersion(command) {
205904
205904
  const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
@@ -207416,7 +207416,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
207416
207416
  if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
207417
207417
  const hasTrust = checkHasTrustDialogAccepted();
207418
207418
  if (!hasTrust) {
207419
- 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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
207419
+ 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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
207420
207420
  logAntError("MCP headersHelper invoked before trust check", error40);
207421
207421
  logEvent("tengu_mcp_headersHelper_missing_trust", {});
207422
207422
  return null;
@@ -208626,7 +208626,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
208626
208626
  const client2 = new Client({
208627
208627
  name: "theus-code",
208628
208628
  title: "Theus",
208629
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
208629
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
208630
208630
  description: "Theus's agentic coding tool",
208631
208631
  websiteUrl: PRODUCT_URL
208632
208632
  }, {
@@ -208980,7 +208980,7 @@ var init_client5 = __esm(() => {
208980
208980
  const client2 = new Client({
208981
208981
  name: "theus-code",
208982
208982
  title: "Theus",
208983
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
208983
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
208984
208984
  description: "Theus's agentic coding tool",
208985
208985
  websiteUrl: PRODUCT_URL
208986
208986
  }, {
@@ -219536,7 +219536,7 @@ async function initializeBetaTracing(resource) {
219536
219536
  });
219537
219537
  logs.setGlobalLoggerProvider(loggerProvider);
219538
219538
  setLoggerProvider(loggerProvider);
219539
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219539
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219540
219540
  setEventLogger(eventLogger);
219541
219541
  process.on("beforeExit", async () => {
219542
219542
  await loggerProvider?.forceFlush();
@@ -219576,7 +219576,7 @@ async function initializeTelemetry() {
219576
219576
  const platform4 = getPlatform();
219577
219577
  const baseAttributes = {
219578
219578
  [ATTR_SERVICE_NAME]: "theus-code",
219579
- [ATTR_SERVICE_VERSION]: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
219579
+ [ATTR_SERVICE_VERSION]: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
219580
219580
  };
219581
219581
  if (platform4 === "wsl") {
219582
219582
  const wslVersion = getWslVersion();
@@ -219621,7 +219621,7 @@ async function initializeTelemetry() {
219621
219621
  } catch {}
219622
219622
  };
219623
219623
  registerCleanup(shutdownTelemetry2);
219624
- return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219624
+ return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219625
219625
  }
219626
219626
  const meterProvider = new MeterProvider({
219627
219627
  resource,
@@ -219641,7 +219641,7 @@ async function initializeTelemetry() {
219641
219641
  });
219642
219642
  logs.setGlobalLoggerProvider(loggerProvider);
219643
219643
  setLoggerProvider(loggerProvider);
219644
- const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219644
+ const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219645
219645
  setEventLogger(eventLogger);
219646
219646
  logForDebugging("[3P telemetry] Event logger set successfully");
219647
219647
  process.on("beforeExit", async () => {
@@ -219703,7 +219703,7 @@ Current timeout: ${timeoutMs}ms
219703
219703
  }
219704
219704
  };
219705
219705
  registerCleanup(shutdownTelemetry);
219706
- return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219706
+ return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
219707
219707
  }
219708
219708
  async function flushTelemetry() {
219709
219709
  const meterProvider = getMeterProvider();
@@ -220243,7 +220243,7 @@ async function installOrUpdateTheusPackage(channel, specificVersion) {
220243
220243
  return "install_failed";
220244
220244
  }
220245
220245
  const versionSpec = specificVersion ? specificVersion : channel === "stable" ? "stable" : "latest";
220246
- const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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 });
220246
+ const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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 });
220247
220247
  if (result.code !== 0) {
220248
220248
  const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
220249
220249
  logError2(error40);
@@ -220389,9 +220389,9 @@ async function assertMinVersion() {
220389
220389
  if (false) {}
220390
220390
  try {
220391
220391
  const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
220392
- if (versionConfig.minVersion && lt({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
220392
+ if (versionConfig.minVersion && lt({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
220393
220393
  console.error(`
220394
- It looks like your version of Theus (${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
220394
+ It looks like your version of Theus (${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
220395
220395
  A newer version (${versionConfig.minVersion} or higher) is required to continue.
220396
220396
 
220397
220397
  To update, please run:
@@ -220551,7 +220551,7 @@ async function checkGlobalInstallPermissions() {
220551
220551
  }
220552
220552
  async function getLatestVersion(channel) {
220553
220553
  const npmTag = channel === "stable" ? "stable" : "latest";
220554
- const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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() });
220554
+ const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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() });
220555
220555
  if (result.code !== 0) {
220556
220556
  logForDebugging(`npm view failed with code ${result.code}`);
220557
220557
  if (result.stderr) {
@@ -220567,7 +220567,7 @@ async function getLatestVersion(channel) {
220567
220567
  return result.stdout.trim();
220568
220568
  }
220569
220569
  async function getNpmDistTags() {
220570
- const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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() });
220570
+ const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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() });
220571
220571
  if (result.code !== 0) {
220572
220572
  logForDebugging(`npm view dist-tags failed with code ${result.code}`);
220573
220573
  return { latest: null, stable: null };
@@ -220607,7 +220607,7 @@ async function installGlobalPackage(specificVersion) {
220607
220607
  logError2(new AutoUpdaterError("Another process is currently installing an update"));
220608
220608
  logEvent("tengu_auto_updater_lock_contention", {
220609
220609
  pid: process.pid,
220610
- currentVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
220610
+ currentVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
220611
220611
  });
220612
220612
  return "in_progress";
220613
220613
  }
@@ -220616,7 +220616,7 @@ async function installGlobalPackage(specificVersion) {
220616
220616
  if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
220617
220617
  logError2(new Error("Windows NPM detected in WSL environment"));
220618
220618
  logEvent("tengu_auto_updater_windows_npm_in_wsl", {
220619
- currentVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
220619
+ currentVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
220620
220620
  });
220621
220621
  console.error(`
220622
220622
  Error: Windows NPM detected in WSL
@@ -220635,7 +220635,7 @@ To fix this issue:
220635
220635
  if (!hasPermissions) {
220636
220636
  return "no_permissions";
220637
220637
  }
220638
- const packageSpec = specificVersion ? `${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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;
220638
+ const packageSpec = specificVersion ? `${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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;
220639
220639
  const packageManager = env3.isRunningWithBun() ? "bun" : "npm";
220640
220640
  const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
220641
220641
  if (installResult.code !== 0) {
@@ -220967,8 +220967,8 @@ async function detectMultipleInstallations() {
220967
220967
  installations.push({ type: "npm-local", path: localPath });
220968
220968
  }
220969
220969
  const packagesToCheck = ["@theus-ai/theus-code"];
220970
- if ({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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") {
220971
- packagesToCheck.push({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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);
220970
+ if ({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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") {
220971
+ packagesToCheck.push({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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);
220972
220972
  }
220973
220973
  const npmResult = await execFileNoThrow("npm", [
220974
220974
  "-g",
@@ -221151,7 +221151,7 @@ function detectLinuxGlobPatternWarnings() {
221151
221151
  }
221152
221152
  async function getDoctorDiagnostic() {
221153
221153
  const installationType = await getCurrentInstallationType();
221154
- const version2 = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
221154
+ const version2 = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
221155
221155
  const installationPath = await getInstallationPath();
221156
221156
  const invokedBinary = getInvokedBinary();
221157
221157
  const multipleInstallations = await detectMultipleInstallations();
@@ -221163,8 +221163,8 @@ async function getDoctorDiagnostic() {
221163
221163
  for (const install of npmInstalls) {
221164
221164
  if (install.type === "npm-global") {
221165
221165
  let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
221166
- if ({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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") {
221167
- uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`;
221166
+ if ({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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") {
221167
+ uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`;
221168
221168
  }
221169
221169
  warnings.push({
221170
221170
  issue: `Leftover npm global installation at ${install.path}`,
@@ -221276,7 +221276,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
221276
221276
  const startTime = Date.now();
221277
221277
  const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
221278
221278
  "view",
221279
- `${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`,
221279
+ `${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`,
221280
221280
  "version",
221281
221281
  "--prefer-online",
221282
221282
  "--registry",
@@ -221300,7 +221300,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
221300
221300
  latency_ms: latencyMs,
221301
221301
  source_npm: true
221302
221302
  });
221303
- logForDebugging(`npm view ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`);
221303
+ logForDebugging(`npm view ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`);
221304
221304
  const latestVersion = stdout.trim();
221305
221305
  return latestVersion;
221306
221306
  }
@@ -221356,7 +221356,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
221356
221356
  const fs3 = getFsImplementation();
221357
221357
  await fs3.rm(stagingPath, { recursive: true, force: true });
221358
221358
  const platform4 = getPlatform2();
221359
- const platformPackageName = `${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`;
221359
+ const platformPackageName = `${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`;
221360
221360
  logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
221361
221361
  const {
221362
221362
  stdout: integrityOutput,
@@ -221385,7 +221385,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
221385
221385
  name: "theus-native-installer",
221386
221386
  version: "0.0.1",
221387
221387
  dependencies: {
221388
- [{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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
221388
+ [{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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
221389
221389
  }
221390
221390
  };
221391
221391
  const packageLock = {
@@ -221398,10 +221398,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
221398
221398
  name: "theus-native-installer",
221399
221399
  version: "0.0.1",
221400
221400
  dependencies: {
221401
- [{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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
221401
+ [{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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
221402
221402
  }
221403
221403
  },
221404
- [`node_modules/${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
221404
+ [`node_modules/${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
221405
221405
  version: version2,
221406
221406
  optionalDependencies: {
221407
221407
  [platformPackageName]: version2
@@ -221423,7 +221423,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
221423
221423
  if (result.code !== 0) {
221424
221424
  throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
221425
221425
  }
221426
- logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`);
221426
+ logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`);
221427
221427
  }
221428
221428
  function getStallTimeoutMs() {
221429
221429
  return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
@@ -222086,8 +222086,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
222086
222086
  const maxVersion = await getMaxVersion();
222087
222087
  if (maxVersion && gt(version2, maxVersion)) {
222088
222088
  logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
222089
- if (gte({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
222090
- logForDebugging(`Native installer: current version ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
222089
+ if (gte({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
222090
+ logForDebugging(`Native installer: current version ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
222091
222091
  logEvent("tengu_native_update_skipped_max_version", {
222092
222092
  latency_ms: Date.now() - startTime,
222093
222093
  max_version: maxVersion,
@@ -222098,7 +222098,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
222098
222098
  version2 = maxVersion;
222099
222099
  }
222100
222100
  }
222101
- if (!forceReinstall && version2 === { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
222101
+ if (!forceReinstall && version2 === { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
222102
222102
  logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
222103
222103
  logEvent("tengu_native_update_complete", {
222104
222104
  latency_ms: Date.now() - startTime,
@@ -222840,8 +222840,8 @@ async function cleanupNpmInstallations() {
222840
222840
  } else if (codePackageResult.error) {
222841
222841
  errors4.push(codePackageResult.error);
222842
222842
  }
222843
- if ({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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") {
222844
- const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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);
222843
+ if ({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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") {
222844
+ const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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);
222845
222845
  if (macroPackageResult.success) {
222846
222846
  removed++;
222847
222847
  if (macroPackageResult.warning) {
@@ -232823,16 +232823,28 @@ var init_ConsoleOAuthFlow = __esm(() => {
232823
232823
  });
232824
232824
 
232825
232825
  // components/Theus/asciiLogo.ts
232826
- var THEUS_ASCII, THEUS_SIGNAL_FRAMES;
232826
+ var THEUS_ASCII, THEUS_TORCH_ASCII, THEUS_COMPACT_MARK, THEUS_SIGNAL_FRAMES;
232827
232827
  var init_asciiLogo = __esm(() => {
232828
- THEUS_ASCII = String.raw`
232829
- _______ _
232830
- |__ __| |
232831
- | | | |__ ___ _ _ ___
232832
- | | | '_ \ / _ \ | | / __|
232833
- | | | | | | __/ |_| \__ \
232834
- |_| |_| |_|\___|\__,_|___/
232835
- `;
232828
+ THEUS_ASCII = [
232829
+ " _______ _ _ _____ _ _ ____",
232830
+ "|__ __| | | | ____| | | / ___|",
232831
+ " | | | |_| | _| | | | \\___ \\",
232832
+ " | | | _ | |___| |_| |___) |",
232833
+ " |_| |_| |_|_____|\\___/|____/"
232834
+ ].join(`
232835
+ `);
232836
+ THEUS_TORCH_ASCII = [
232837
+ " /\\",
232838
+ " /\\//\\\\",
232839
+ " / \\/ \\",
232840
+ " ||",
232841
+ " ___||___",
232842
+ " /___||___\\",
232843
+ " ||"
232844
+ ].join(`
232845
+ `);
232846
+ THEUS_COMPACT_MARK = [" /\\ ", "/__\\", " || "].join(`
232847
+ `);
232836
232848
  THEUS_SIGNAL_FRAMES = [
232837
232849
  "[. ]",
232838
232850
  "[.. ]",
@@ -232867,40 +232879,59 @@ function PeruFlag({ red: red2 }) {
232867
232879
  }, row, true, undefined, this))
232868
232880
  }, undefined, false, undefined, this);
232869
232881
  }
232870
- function TheusLoginHero({ compact }) {
232882
+ function StatusDot({ color: color2, label }) {
232883
+ return /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232884
+ children: [
232885
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232886
+ color: color2,
232887
+ children: "* "
232888
+ }, undefined, false, undefined, this),
232889
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232890
+ children: label
232891
+ }, undefined, false, undefined, this)
232892
+ ]
232893
+ }, undefined, true, undefined, this);
232894
+ }
232895
+ function TheusLoginHero({ compact, showFrame = false }) {
232871
232896
  const [themeName] = useTheme();
232872
232897
  const theme = getTheme(themeName);
232873
- const { peru, dorado, grafito, verdeDato } = theme;
232898
+ const { peru, dorado, grafito, verdeDato, inactive } = theme;
232874
232899
  const [signalRef, time3] = useAnimationFrame(SIGNAL_INTERVAL_MS);
232875
232900
  const frame = Math.floor(time3 / SIGNAL_INTERVAL_MS) % THEUS_SIGNAL_FRAMES.length;
232876
232901
  const leftSignal = THEUS_SIGNAL_FRAMES[frame];
232877
232902
  const rightSignal = THEUS_SIGNAL_FRAMES[(THEUS_SIGNAL_FRAMES.length - 1 - frame) % THEUS_SIGNAL_FRAMES.length];
232878
- return /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232879
- ref: signalRef,
232903
+ const heroBody = /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232880
232904
  flexDirection: "column",
232881
- alignItems: "center",
232905
+ width: "100%",
232882
232906
  children: [
232883
- /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232884
- color: verdeDato,
232885
- children: COMPACT_SIGNAL_ART.join(`
232886
- `)
232887
- }, undefined, false, undefined, this),
232888
- !compact && /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232889
- color: dorado,
232890
- children: THEUS_ASCII
232891
- }, undefined, false, undefined, this),
232892
232907
  /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232893
- marginTop: 1,
232894
- alignItems: "center",
232895
- gap: 2,
232908
+ flexDirection: "row",
232909
+ alignItems: "flex-start",
232896
232910
  children: [
232897
- /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(PeruFlag, {
232898
- red: peru
232911
+ compact ? /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232912
+ marginRight: 1,
232913
+ children: /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232914
+ color: dorado,
232915
+ children: THEUS_COMPACT_MARK
232916
+ }, undefined, false, undefined, this)
232917
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232918
+ marginRight: 3,
232919
+ children: /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232920
+ color: dorado,
232921
+ children: THEUS_TORCH_ASCII
232922
+ }, undefined, false, undefined, this)
232899
232923
  }, undefined, false, undefined, this),
232900
232924
  /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232901
232925
  flexDirection: "column",
232926
+ flexGrow: 1,
232902
232927
  children: [
232928
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232929
+ bold: true,
232930
+ color: dorado,
232931
+ children: compact ? "THEUS" : THEUS_ASCII
232932
+ }, undefined, false, undefined, this),
232903
232933
  /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232934
+ marginTop: compact ? 0 : 1,
232904
232935
  children: [
232905
232936
  /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232906
232937
  color: peru,
@@ -232932,19 +232963,65 @@ function TheusLoginHero({ compact }) {
232932
232963
  ]
232933
232964
  }, undefined, true, undefined, this)
232934
232965
  ]
232935
- }, undefined, true, undefined, this)
232966
+ }, undefined, true, undefined, this),
232967
+ !compact && /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232968
+ marginTop: 1,
232969
+ flexDirection: "row",
232970
+ gap: 3,
232971
+ children: [
232972
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(StatusDot, {
232973
+ color: verdeDato,
232974
+ label: "Sesion activa"
232975
+ }, undefined, false, undefined, this),
232976
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(StatusDot, {
232977
+ color: verdeDato,
232978
+ label: "Memoria lista"
232979
+ }, undefined, false, undefined, this),
232980
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(StatusDot, {
232981
+ color: verdeDato,
232982
+ label: "Base visual lista"
232983
+ }, undefined, false, undefined, this)
232984
+ ]
232985
+ }, undefined, true, undefined, this),
232986
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232987
+ marginTop: compact ? 0 : 1,
232988
+ children: /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedText, {
232989
+ color: inactive,
232990
+ children: COMPACT_SIGNAL_ART.join(" ")
232991
+ }, undefined, false, undefined, this)
232992
+ }, undefined, false, undefined, this)
232936
232993
  ]
232937
232994
  }, undefined, true, undefined, this);
232995
+ return /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
232996
+ ref: signalRef,
232997
+ flexDirection: "column",
232998
+ width: "100%",
232999
+ borderStyle: showFrame ? "single" : undefined,
233000
+ borderColor: showFrame ? dorado : undefined,
233001
+ paddingX: showFrame ? 1 : 0,
233002
+ paddingY: showFrame ? 1 : 0,
233003
+ children: compact ? heroBody : /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(ThemedBox_default, {
233004
+ flexDirection: "row",
233005
+ alignItems: "center",
233006
+ gap: 2,
233007
+ children: [
233008
+ /* @__PURE__ */ jsx_dev_runtime72.jsxDEV(PeruFlag, {
233009
+ red: peru
233010
+ }, undefined, false, undefined, this),
233011
+ heroBody
233012
+ ]
233013
+ }, undefined, true, undefined, this)
233014
+ }, undefined, false, undefined, this);
232938
233015
  }
232939
- var jsx_dev_runtime72, COMPACT_SIGNAL_ART, SIGNAL_INTERVAL_MS = 140;
233016
+ var jsx_dev_runtime72, COMPACT_SIGNAL_ART, SIGNAL_INTERVAL_MS = 800;
232940
233017
  var init_TheusLoginHero = __esm(() => {
232941
233018
  init_ink2();
232942
233019
  init_theme();
232943
233020
  init_asciiLogo();
232944
233021
  jsx_dev_runtime72 = __toESM(require_jsx_dev_runtime(), 1);
232945
233022
  COMPACT_SIGNAL_ART = [
232946
- "0x THEUS // LOCAL-FIRST PROJECT INTELLIGENCE",
232947
- ":: graph index :: visual db :: byok :: mcp ::"
233023
+ "0x THEUS // INTELIGENCIA LOCAL-FIRST",
233024
+ ":: grafo local :: base visual :: modelo propio :: mcp ::"
232948
233025
  ];
232949
233026
  });
232950
233027
 
@@ -272854,7 +272931,7 @@ function getBrandEnv(key) {
272854
272931
  }
272855
272932
  return;
272856
272933
  }
272857
- var PRODUCT_NAME = "Theus", TAGLINE = "Multi-model agent for vibe coding, memory & visual data", ENV_PREFIX = "THEUS_", LEGACY_ENV_PREFIX = "THEUS_", THEUS_LEGACY_ENV_PREFIX = "THEUS_CODE_", LEGACY_ENV_PREFIXES, CONFIG_DIR_NAME = ".theus", LEGACY_CONFIG_DIR_NAME = ".theus", THEUS_LEGACY_CONFIG_DIR_NAME = ".theus", LEGACY_CONFIG_DIR_NAMES;
272934
+ var PRODUCT_NAME = "Theus", TAGLINE = "Agente multimodelo con memoria, grafo local y base visual", ENV_PREFIX = "THEUS_", LEGACY_ENV_PREFIX = "THEUS_", THEUS_LEGACY_ENV_PREFIX = "THEUS_CODE_", LEGACY_ENV_PREFIXES, CONFIG_DIR_NAME = ".theus", LEGACY_CONFIG_DIR_NAME = ".theus", THEUS_LEGACY_CONFIG_DIR_NAME = ".theus", LEGACY_CONFIG_DIR_NAMES;
272858
272935
  var init_branding = __esm(() => {
272859
272936
  LEGACY_ENV_PREFIXES = [
272860
272937
  LEGACY_ENV_PREFIX,
@@ -294071,9 +294148,9 @@ function getTheusEnvMetadata() {
294071
294148
  };
294072
294149
  }
294073
294150
  function getBuildAgeMinutes() {
294074
- if (!{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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)
294151
+ if (!{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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)
294075
294152
  return;
294076
- const buildTime = new Date({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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();
294153
+ const buildTime = new Date({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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();
294077
294154
  if (isNaN(buildTime))
294078
294155
  return;
294079
294156
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -310234,7 +310311,7 @@ function getAssistantMessageFromError(error40, model, options2) {
310234
310311
  if (process.env.USER_TYPE === "ant") {
310235
310312
  const baseMessage = `API Error: 400 ${error40.message}
310236
310313
 
310237
- Run /share and post the JSON file to ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
310314
+ Run /share and post the JSON file to ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
310238
310315
  const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
310239
310316
  return createAssistantAPIErrorMessage({
310240
310317
  content: baseMessage + rewindInstruction,
@@ -310270,7 +310347,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.1.0-theus", BUILD_TIME: "19
310270
310347
  if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
310271
310348
  const orgId = getOauthAccountInfo()?.organizationUuid;
310272
310349
  const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
310273
- const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.`;
310350
+ const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.`;
310274
310351
  return createAssistantAPIErrorMessage({
310275
310352
  content: msg,
310276
310353
  error: "invalid_request"
@@ -317747,7 +317824,7 @@ function Feedback({
317747
317824
  platform: env3.platform,
317748
317825
  gitRepo: envInfo.isGit,
317749
317826
  terminal: env3.terminal,
317750
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
317827
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
317751
317828
  transcript: normalizeMessagesForAPI(messages),
317752
317829
  errors: sanitizedErrors,
317753
317830
  lastApiRequest: getLastAPIRequest(),
@@ -317939,7 +318016,7 @@ function Feedback({
317939
318016
  ", ",
317940
318017
  env3.terminal,
317941
318018
  ", v",
317942
- { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
318019
+ { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
317943
318020
  ]
317944
318021
  }, undefined, true, undefined, this)
317945
318022
  ]
@@ -318045,7 +318122,7 @@ ${sanitizedDescription}
318045
318122
  ` + `**Environment Info**
318046
318123
  ` + `- Platform: ${env3.platform}
318047
318124
  ` + `- Terminal: ${env3.terminal}
318048
- ` + `- Version: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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"}
318125
+ ` + `- Version: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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"}
318049
318126
  ` + `- Feedback ID: ${feedbackId}
318050
318127
  ` + `
318051
318128
  **Errors**
@@ -323790,7 +323867,7 @@ function buildPrimarySection() {
323790
323867
  }, undefined, false, undefined, this);
323791
323868
  return [{
323792
323869
  label: "Version",
323793
- value: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
323870
+ value: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
323794
323871
  }, {
323795
323872
  label: "Session name",
323796
323873
  value: nameValue
@@ -327541,7 +327618,7 @@ function Config({
327541
327618
  }
327542
327619
  }, undefined, false, undefined, this)
327543
327620
  }, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime182.jsxDEV(ChannelDowngradeDialog, {
327544
- currentVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
327621
+ currentVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
327545
327622
  onChoice: (choice) => {
327546
327623
  setShowSubmenu(null);
327547
327624
  setTabsHidden(false);
@@ -327553,7 +327630,7 @@ function Config({
327553
327630
  autoUpdatesChannel: "stable"
327554
327631
  };
327555
327632
  if (choice === "stay") {
327556
- newSettings.minimumVersion = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
327633
+ newSettings.minimumVersion = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
327557
327634
  }
327558
327635
  updateSettingsForSource("userSettings", newSettings);
327559
327636
  setSettingsData((prev_27) => ({
@@ -335587,7 +335664,7 @@ function HelpV2(t0) {
335587
335664
  let t6;
335588
335665
  if ($2[31] !== tabs) {
335589
335666
  t6 = /* @__PURE__ */ jsx_dev_runtime209.jsxDEV(Tabs, {
335590
- title: `Theus v${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
335667
+ title: `Theus v${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
335591
335668
  color: "professionalBlue",
335592
335669
  defaultTab: "general",
335593
335670
  children: tabs
@@ -360857,9 +360934,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
360857
360934
  return [];
360858
360935
  }
360859
360936
  }
360860
- async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
360937
+ async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
360861
360938
  if (process.env.USER_TYPE === "ant") {
360862
- const changelog = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
360939
+ const changelog = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
360863
360940
  if (changelog) {
360864
360941
  const commits = changelog.trim().split(`
360865
360942
  `).filter(Boolean);
@@ -361935,14 +362012,15 @@ function TheusBanner({ minimal, version: version2 }) {
361935
362012
  const rightSignal = THEUS_SIGNAL_FRAMES[(THEUS_SIGNAL_FRAMES.length - 1 - frame) % THEUS_SIGNAL_FRAMES.length];
361936
362013
  return /* @__PURE__ */ jsx_dev_runtime252.jsxDEV(ThemedBox_default, {
361937
362014
  flexDirection: "column",
361938
- alignItems: "center",
362015
+ width: "100%",
361939
362016
  children: [
361940
362017
  /* @__PURE__ */ jsx_dev_runtime252.jsxDEV(TheusLoginHero, {
361941
- compact: minimal
362018
+ compact: minimal,
362019
+ showFrame: !minimal
361942
362020
  }, undefined, false, undefined, this),
361943
362021
  /* @__PURE__ */ jsx_dev_runtime252.jsxDEV(ThemedBox_default, {
361944
362022
  ref: signalRef,
361945
- marginTop: 1,
362023
+ marginTop: minimal ? 0 : 1,
361946
362024
  flexDirection: "column",
361947
362025
  alignItems: "center",
361948
362026
  children: [
@@ -361959,7 +362037,7 @@ function TheusBanner({ minimal, version: version2 }) {
361959
362037
  bold: true,
361960
362038
  backgroundColor: grafito,
361961
362039
  color: dorado,
361962
- children: ` ${PRODUCT_NAME.toUpperCase()} CODE `
362040
+ children: ` ${PRODUCT_NAME.toUpperCase()} CLI `
361963
362041
  }, undefined, false, undefined, this),
361964
362042
  /* @__PURE__ */ jsx_dev_runtime252.jsxDEV(ThemedText, {
361965
362043
  color: verdeDato,
@@ -361975,7 +362053,7 @@ function TheusBanner({ minimal, version: version2 }) {
361975
362053
  color: dim2,
361976
362054
  children: [
361977
362055
  TAGLINE,
361978
- version2 ? ` | v${version2}` : ""
362056
+ version2 ? ` | v${version2}` : ""
361979
362057
  ]
361980
362058
  }, undefined, true, undefined, this)
361981
362059
  ]
@@ -361983,7 +362061,7 @@ function TheusBanner({ minimal, version: version2 }) {
361983
362061
  ]
361984
362062
  }, undefined, true, undefined, this);
361985
362063
  }
361986
- var jsx_dev_runtime252, SIGNAL_INTERVAL_MS2 = 140;
362064
+ var jsx_dev_runtime252, SIGNAL_INTERVAL_MS2 = 800;
361987
362065
  var init_TheusBanner = __esm(() => {
361988
362066
  init_ink2();
361989
362067
  init_theme();
@@ -365077,7 +365155,7 @@ var init_Messages = __esm(() => {
365077
365155
  let t1;
365078
365156
  if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
365079
365157
  t1 = /* @__PURE__ */ jsx_dev_runtime261.jsxDEV(TheusBanner, {
365080
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
365158
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
365081
365159
  }, undefined, false, undefined, this);
365082
365160
  $2[0] = t1;
365083
365161
  } else {
@@ -388384,7 +388462,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
388384
388462
  smapsRollup,
388385
388463
  platform: process.platform,
388386
388464
  nodeVersion: process.version,
388387
- ccVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
388465
+ ccVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
388388
388466
  };
388389
388467
  }
388390
388468
  async function performHeapDump(trigger = "manual", dumpNumber = 0) {
@@ -388970,7 +389048,7 @@ var init_bridge_kick = __esm(() => {
388970
389048
  var call58 = async () => {
388971
389049
  return {
388972
389050
  type: "text",
388973
- value: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
389051
+ value: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
388974
389052
  };
388975
389053
  }, version2, version_default;
388976
389054
  var init_version = __esm(() => {
@@ -393014,12 +393092,394 @@ var init_remote_env2 = __esm(() => {
393014
393092
  };
393015
393093
  });
393016
393094
 
393095
+ // cli/update.ts
393096
+ var exports_update = {};
393097
+ __export(exports_update, {
393098
+ update: () => update
393099
+ });
393100
+ async function update() {
393101
+ logEvent("tengu_update_check", {});
393102
+ writeToStdout(`Current version: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
393103
+ `);
393104
+ const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
393105
+ writeToStdout(`Checking for updates to ${channel} version...
393106
+ `);
393107
+ logForDebugging("update: Starting update check");
393108
+ logForDebugging("update: Running diagnostic");
393109
+ const diagnostic = await getDoctorDiagnostic();
393110
+ logForDebugging(`update: Installation type: ${diagnostic.installationType}`);
393111
+ logForDebugging(`update: Config install method: ${diagnostic.configInstallMethod}`);
393112
+ if (diagnostic.multipleInstallations.length > 1) {
393113
+ writeToStdout(`
393114
+ `);
393115
+ writeToStdout(source_default.yellow("Warning: Multiple installations found") + `
393116
+ `);
393117
+ for (const install of diagnostic.multipleInstallations) {
393118
+ const current = diagnostic.installationType === install.type ? " (currently running)" : "";
393119
+ writeToStdout(`- ${install.type} at ${install.path}${current}
393120
+ `);
393121
+ }
393122
+ }
393123
+ if (diagnostic.warnings.length > 0) {
393124
+ writeToStdout(`
393125
+ `);
393126
+ for (const warning of diagnostic.warnings) {
393127
+ logForDebugging(`update: Warning detected: ${warning.issue}`);
393128
+ logForDebugging(`update: Showing warning: ${warning.issue}`);
393129
+ writeToStdout(source_default.yellow(`Warning: ${warning.issue}
393130
+ `));
393131
+ writeToStdout(source_default.bold(`Fix: ${warning.fix}
393132
+ `));
393133
+ }
393134
+ }
393135
+ const config3 = getGlobalConfig();
393136
+ if (!config3.installMethod && diagnostic.installationType !== "package-manager") {
393137
+ writeToStdout(`
393138
+ `);
393139
+ writeToStdout(`Updating configuration to track installation method...
393140
+ `);
393141
+ let detectedMethod = "unknown";
393142
+ switch (diagnostic.installationType) {
393143
+ case "npm-local":
393144
+ detectedMethod = "local";
393145
+ break;
393146
+ case "native":
393147
+ detectedMethod = "native";
393148
+ break;
393149
+ case "npm-global":
393150
+ detectedMethod = "global";
393151
+ break;
393152
+ default:
393153
+ detectedMethod = "unknown";
393154
+ }
393155
+ saveGlobalConfig((current) => ({
393156
+ ...current,
393157
+ installMethod: detectedMethod
393158
+ }));
393159
+ writeToStdout(`Installation method set to: ${detectedMethod}
393160
+ `);
393161
+ }
393162
+ if (diagnostic.installationType === "development") {
393163
+ writeToStdout(`
393164
+ `);
393165
+ writeToStdout(source_default.yellow("Warning: Cannot update development build") + `
393166
+ `);
393167
+ await gracefulShutdown(1);
393168
+ }
393169
+ if (diagnostic.installationType === "package-manager") {
393170
+ const packageManager = await getPackageManager();
393171
+ writeToStdout(`
393172
+ `);
393173
+ if (packageManager === "homebrew") {
393174
+ writeToStdout(`Theus is managed by Homebrew.
393175
+ `);
393176
+ const latest = await getLatestVersion(channel);
393177
+ if (latest && !gte({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
393178
+ writeToStdout(`Update available: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
393179
+ `);
393180
+ writeToStdout(`
393181
+ `);
393182
+ writeToStdout(`To update, run:
393183
+ `);
393184
+ writeToStdout(source_default.bold(" brew upgrade theus-code") + `
393185
+ `);
393186
+ } else {
393187
+ writeToStdout(`Theus is up to date!
393188
+ `);
393189
+ }
393190
+ } else if (packageManager === "winget") {
393191
+ writeToStdout(`Theus is managed by winget.
393192
+ `);
393193
+ const latest = await getLatestVersion(channel);
393194
+ if (latest && !gte({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
393195
+ writeToStdout(`Update available: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
393196
+ `);
393197
+ writeToStdout(`
393198
+ `);
393199
+ writeToStdout(`To update, run:
393200
+ `);
393201
+ writeToStdout(source_default.bold(" winget upgrade Theus.TheusCode") + `
393202
+ `);
393203
+ } else {
393204
+ writeToStdout(`Theus is up to date!
393205
+ `);
393206
+ }
393207
+ } else if (packageManager === "apk") {
393208
+ writeToStdout(`Theus is managed by apk.
393209
+ `);
393210
+ const latest = await getLatestVersion(channel);
393211
+ if (latest && !gte({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
393212
+ writeToStdout(`Update available: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
393213
+ `);
393214
+ writeToStdout(`
393215
+ `);
393216
+ writeToStdout(`To update, run:
393217
+ `);
393218
+ writeToStdout(source_default.bold(" apk upgrade theus-code") + `
393219
+ `);
393220
+ } else {
393221
+ writeToStdout(`Theus is up to date!
393222
+ `);
393223
+ }
393224
+ } else {
393225
+ writeToStdout(`Theus is managed by a package manager.
393226
+ `);
393227
+ writeToStdout(`Please use your package manager to update.
393228
+ `);
393229
+ }
393230
+ await gracefulShutdown(0);
393231
+ }
393232
+ if (config3.installMethod && diagnostic.configInstallMethod !== "not set" && diagnostic.installationType !== "package-manager") {
393233
+ const runningType = diagnostic.installationType;
393234
+ const configExpects = diagnostic.configInstallMethod;
393235
+ const typeMapping = {
393236
+ "npm-local": "local",
393237
+ "npm-global": "global",
393238
+ native: "native",
393239
+ development: "development",
393240
+ unknown: "unknown"
393241
+ };
393242
+ const normalizedRunningType = typeMapping[runningType] || runningType;
393243
+ if (normalizedRunningType !== configExpects && configExpects !== "unknown") {
393244
+ writeToStdout(`
393245
+ `);
393246
+ writeToStdout(source_default.yellow("Warning: Configuration mismatch") + `
393247
+ `);
393248
+ writeToStdout(`Config expects: ${configExpects} installation
393249
+ `);
393250
+ writeToStdout(`Currently running: ${runningType}
393251
+ `);
393252
+ writeToStdout(source_default.yellow(`Updating the ${runningType} installation you are currently using`) + `
393253
+ `);
393254
+ saveGlobalConfig((current) => ({
393255
+ ...current,
393256
+ installMethod: normalizedRunningType
393257
+ }));
393258
+ writeToStdout(`Config updated to reflect current installation method: ${normalizedRunningType}
393259
+ `);
393260
+ }
393261
+ }
393262
+ if (diagnostic.installationType === "native") {
393263
+ logForDebugging("update: Detected native installation, using native updater");
393264
+ try {
393265
+ const result = await installLatest(channel, true);
393266
+ if (result.lockFailed) {
393267
+ const pidInfo = result.lockHolderPid ? ` (PID ${result.lockHolderPid})` : "";
393268
+ writeToStdout(source_default.yellow(`Another Theus process${pidInfo} is currently running. Please try again in a moment.`) + `
393269
+ `);
393270
+ await gracefulShutdown(0);
393271
+ }
393272
+ if (!result.latestVersion) {
393273
+ process.stderr.write(`Failed to check for updates
393274
+ `);
393275
+ await gracefulShutdown(1);
393276
+ }
393277
+ if (result.latestVersion === { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
393278
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
393279
+ `);
393280
+ } else {
393281
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
393282
+ `);
393283
+ await regenerateCompletionCache();
393284
+ }
393285
+ await gracefulShutdown(0);
393286
+ } catch (error40) {
393287
+ process.stderr.write(`Error: Failed to install native update
393288
+ `);
393289
+ process.stderr.write(String(error40) + `
393290
+ `);
393291
+ process.stderr.write(`Try running "theus doctor" for diagnostics
393292
+ `);
393293
+ await gracefulShutdown(1);
393294
+ }
393295
+ }
393296
+ if (config3.installMethod !== "native") {
393297
+ await removeInstalledSymlink();
393298
+ }
393299
+ logForDebugging("update: Checking npm registry for latest version");
393300
+ logForDebugging(`update: Package URL: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`);
393301
+ const npmTag = channel === "stable" ? "stable" : "latest";
393302
+ const npmCommand = `npm view ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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`;
393303
+ logForDebugging(`update: Running: ${npmCommand}`);
393304
+ const latestVersion = await getLatestVersion(channel);
393305
+ logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
393306
+ if (!latestVersion) {
393307
+ logForDebugging("update: Failed to get latest version from npm registry");
393308
+ process.stderr.write(source_default.red("Failed to check for updates") + `
393309
+ `);
393310
+ process.stderr.write(`Unable to fetch latest version from npm registry
393311
+ `);
393312
+ process.stderr.write(`
393313
+ `);
393314
+ process.stderr.write(`Possible causes:
393315
+ `);
393316
+ process.stderr.write(` \u2022 Network connectivity issues
393317
+ `);
393318
+ process.stderr.write(` \u2022 npm registry is unreachable
393319
+ `);
393320
+ process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
393321
+ `);
393322
+ if ({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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")) {
393323
+ process.stderr.write(` \u2022 Internal/development build not published to npm
393324
+ `);
393325
+ }
393326
+ process.stderr.write(`
393327
+ `);
393328
+ process.stderr.write(`Try:
393329
+ `);
393330
+ process.stderr.write(` \u2022 Check your internet connection
393331
+ `);
393332
+ process.stderr.write(` \u2022 Run with --debug flag for more details
393333
+ `);
393334
+ const packageName = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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");
393335
+ process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
393336
+ `);
393337
+ process.stderr.write(` \u2022 Check if you need to login: npm whoami
393338
+ `);
393339
+ await gracefulShutdown(1);
393340
+ }
393341
+ if (latestVersion === { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
393342
+ writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
393343
+ `);
393344
+ await gracefulShutdown(0);
393345
+ }
393346
+ writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
393347
+ `);
393348
+ writeToStdout(`Installing update...
393349
+ `);
393350
+ let useLocalUpdate = false;
393351
+ let updateMethodName = "";
393352
+ switch (diagnostic.installationType) {
393353
+ case "npm-local":
393354
+ useLocalUpdate = true;
393355
+ updateMethodName = "local";
393356
+ break;
393357
+ case "npm-global":
393358
+ useLocalUpdate = false;
393359
+ updateMethodName = "global";
393360
+ break;
393361
+ case "unknown": {
393362
+ const isLocal = await localInstallationExists();
393363
+ useLocalUpdate = isLocal;
393364
+ updateMethodName = isLocal ? "local" : "global";
393365
+ writeToStdout(source_default.yellow("Warning: Could not determine installation type") + `
393366
+ `);
393367
+ writeToStdout(`Attempting ${updateMethodName} update based on file detection...
393368
+ `);
393369
+ break;
393370
+ }
393371
+ default:
393372
+ process.stderr.write(`Error: Cannot update ${diagnostic.installationType} installation
393373
+ `);
393374
+ await gracefulShutdown(1);
393375
+ }
393376
+ writeToStdout(`Using ${updateMethodName} installation update method...
393377
+ `);
393378
+ logForDebugging(`update: Update method determined: ${updateMethodName}`);
393379
+ logForDebugging(`update: useLocalUpdate: ${useLocalUpdate}`);
393380
+ let status2;
393381
+ if (useLocalUpdate) {
393382
+ logForDebugging("update: Calling installOrUpdateTheusPackage() for local update");
393383
+ status2 = await installOrUpdateTheusPackage(channel);
393384
+ } else {
393385
+ logForDebugging("update: Calling installGlobalPackage() for global update");
393386
+ status2 = await installGlobalPackage();
393387
+ }
393388
+ logForDebugging(`update: Installation status: ${status2}`);
393389
+ switch (status2) {
393390
+ case "success":
393391
+ writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
393392
+ `);
393393
+ await regenerateCompletionCache();
393394
+ break;
393395
+ case "no_permissions":
393396
+ process.stderr.write(`Error: Insufficient permissions to install update
393397
+ `);
393398
+ if (useLocalUpdate) {
393399
+ process.stderr.write(`Try manually updating with:
393400
+ `);
393401
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}
393402
+ `);
393403
+ } else {
393404
+ process.stderr.write(`Try running with sudo or fix npm permissions
393405
+ `);
393406
+ process.stderr.write(`Or consider using native installation with: theus install
393407
+ `);
393408
+ }
393409
+ await gracefulShutdown(1);
393410
+ break;
393411
+ case "install_failed":
393412
+ process.stderr.write(`Error: Failed to install update
393413
+ `);
393414
+ if (useLocalUpdate) {
393415
+ process.stderr.write(`Try manually updating with:
393416
+ `);
393417
+ process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}
393418
+ `);
393419
+ } else {
393420
+ process.stderr.write(`Or consider using native installation with: theus install
393421
+ `);
393422
+ }
393423
+ await gracefulShutdown(1);
393424
+ break;
393425
+ case "in_progress":
393426
+ process.stderr.write(`Error: Another instance is currently performing an update
393427
+ `);
393428
+ process.stderr.write(`Please wait and try again later
393429
+ `);
393430
+ await gracefulShutdown(1);
393431
+ break;
393432
+ }
393433
+ await gracefulShutdown(0);
393434
+ }
393435
+ var init_update = __esm(() => {
393436
+ init_source();
393437
+ init_analytics();
393438
+ init_autoUpdater();
393439
+ init_completionCache();
393440
+ init_config2();
393441
+ init_debug();
393442
+ init_doctorDiagnostic();
393443
+ init_gracefulShutdown();
393444
+ init_localInstaller();
393445
+ init_nativeInstaller();
393446
+ init_packageManagers();
393447
+ init_settings2();
393448
+ });
393449
+
393450
+ // commands/update/update.ts
393451
+ var exports_update2 = {};
393452
+ __export(exports_update2, {
393453
+ call: () => call69
393454
+ });
393455
+ var call69 = async () => {
393456
+ await update();
393457
+ return { type: "skip" };
393458
+ };
393459
+ var init_update2 = __esm(() => {
393460
+ init_update();
393461
+ });
393462
+
393463
+ // commands/update/index.ts
393464
+ var update2, update_default;
393465
+ var init_update3 = __esm(() => {
393466
+ update2 = {
393467
+ type: "local",
393468
+ name: "update",
393469
+ aliases: ["actualizar"],
393470
+ description: "Buscar e instalar la ultima version de Theus",
393471
+ supportsNonInteractive: false,
393472
+ load: () => Promise.resolve().then(() => (init_update2(), exports_update2))
393473
+ };
393474
+ update_default = update2;
393475
+ });
393476
+
393017
393477
  // commands/upgrade/upgrade.tsx
393018
393478
  var exports_upgrade = {};
393019
393479
  __export(exports_upgrade, {
393020
- call: () => call69
393480
+ call: () => call70
393021
393481
  });
393022
- async function call69(onDone, context3) {
393482
+ async function call70(onDone, context3) {
393023
393483
  try {
393024
393484
  if (isTheusAISubscriber()) {
393025
393485
  const tokens = getTheusAIOAuthTokens();
@@ -393079,7 +393539,7 @@ var init_upgrade2 = __esm(() => {
393079
393539
  // commands/rate-limit-options/rate-limit-options.tsx
393080
393540
  var exports_rate_limit_options = {};
393081
393541
  __export(exports_rate_limit_options, {
393082
- call: () => call70
393542
+ call: () => call71
393083
393543
  });
393084
393544
  function RateLimitOptionsMenu(t0) {
393085
393545
  const $2 = c3(25);
@@ -393213,7 +393673,7 @@ function RateLimitOptionsMenu(t0) {
393213
393673
  t5 = function handleSelect(value) {
393214
393674
  if (value === "upgrade") {
393215
393675
  logEvent("tengu_rate_limit_options_menu_select_upgrade", {});
393216
- call69(onDone, context3).then((jsx) => {
393676
+ call70(onDone, context3).then((jsx) => {
393217
393677
  if (jsx) {
393218
393678
  setSubCommandJSX(jsx);
393219
393679
  }
@@ -393273,7 +393733,7 @@ function RateLimitOptionsMenu(t0) {
393273
393733
  }
393274
393734
  return t7;
393275
393735
  }
393276
- async function call70(onDone, context3) {
393736
+ async function call71(onDone, context3) {
393277
393737
  return /* @__PURE__ */ jsx_dev_runtime351.jsxDEV(RateLimitOptionsMenu, {
393278
393738
  onDone,
393279
393739
  context: context3
@@ -393347,7 +393807,7 @@ var exports_effort = {};
393347
393807
  __export(exports_effort, {
393348
393808
  showCurrentEffort: () => showCurrentEffort,
393349
393809
  executeEffort: () => executeEffort,
393350
- call: () => call71
393810
+ call: () => call72
393351
393811
  });
393352
393812
  function setEffortValue(effortValue) {
393353
393813
  const persistable = toPersistableEffort(effortValue);
@@ -393498,7 +393958,7 @@ function ApplyEffortAndClose(t0) {
393498
393958
  React110.useEffect(t1, t2);
393499
393959
  return null;
393500
393960
  }
393501
- async function call71(onDone, _context, args) {
393961
+ async function call72(onDone, _context, args) {
393502
393962
  args = args?.trim() || "";
393503
393963
  if (COMMON_HELP_ARGS2.includes(args)) {
393504
393964
  onDone(`Usage: /effort [low|medium|high|max|auto]
@@ -396407,9 +396867,9 @@ var init_Stats = __esm(() => {
396407
396867
  // commands/stats/stats.tsx
396408
396868
  var exports_stats = {};
396409
396869
  __export(exports_stats, {
396410
- call: () => call72
396870
+ call: () => call73
396411
396871
  });
396412
- var jsx_dev_runtime354, call72 = async (onDone) => {
396872
+ var jsx_dev_runtime354, call73 = async (onDone) => {
396413
396873
  return /* @__PURE__ */ jsx_dev_runtime354.jsxDEV(Stats, {
396414
396874
  onClose: onDone
396415
396875
  }, undefined, false, undefined, this);
@@ -397944,7 +398404,7 @@ function generateHtmlReport(data, insights) {
397944
398404
  </html>`;
397945
398405
  }
397946
398406
  function buildExportData(data, insights, facets, remoteStats) {
397947
- const version3 = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
398407
+ const version3 = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
397948
398408
  const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
397949
398409
  const facets_summary = {
397950
398410
  total: facets.size,
@@ -398922,6 +399382,7 @@ var init_commands2 = __esm(() => {
398922
399382
  init_tag2();
398923
399383
  init_output_style();
398924
399384
  init_remote_env2();
399385
+ init_update3();
398925
399386
  init_upgrade2();
398926
399387
  init_extra_usage2();
398927
399388
  init_rate_limit_options2();
@@ -399033,6 +399494,7 @@ var init_commands2 = __esm(() => {
399033
399494
  rewind_default,
399034
399495
  security_review_default,
399035
399496
  terminalSetup_default,
399497
+ update_default,
399036
399498
  upgrade_default,
399037
399499
  extraUsage,
399038
399500
  extraUsageNonInteractive,
@@ -402057,7 +402519,7 @@ var init_sessionStorage = __esm(() => {
402057
402519
  init_settings2();
402058
402520
  init_slowOperations();
402059
402521
  init_uuid();
402060
- VERSION4 = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
402522
+ VERSION4 = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
402061
402523
  MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
402062
402524
  SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
402063
402525
  EPHEMERAL_PROGRESS_TYPES = new Set([
@@ -403262,7 +403724,7 @@ var init_filesystem = __esm(() => {
403262
403724
  });
403263
403725
  getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
403264
403726
  const nonce = randomBytes19(16).toString("hex");
403265
- return join140(getTheusTempDir(), "bundled-skills", { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
403727
+ return join140(getTheusTempDir(), "bundled-skills", { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
403266
403728
  });
403267
403729
  getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
403268
403730
  });
@@ -408437,7 +408899,7 @@ function getSimpleDoingTasksSection() {
408437
408899
  ];
408438
408900
  const userHelpSubitems = [
408439
408901
  `/help: Get help with using Theus`,
408440
- `To give feedback, users should ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`
408902
+ `To give feedback, users should ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`
408441
408903
  ];
408442
408904
  const items = [
408443
408905
  `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.`,
@@ -409259,7 +409721,7 @@ function computeFingerprint(messageText, version3) {
409259
409721
  }
409260
409722
  function computeFingerprintFromMessages(messages) {
409261
409723
  const firstMessageText = extractFirstMessageText(messages);
409262
- return computeFingerprint(firstMessageText, { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
409724
+ return computeFingerprint(firstMessageText, { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
409263
409725
  }
409264
409726
  var FINGERPRINT_SALT = "59cf53e54c78";
409265
409727
  var init_fingerprint = () => {};
@@ -411296,10 +411758,10 @@ function blocksFromOpenAIMessage(message) {
411296
411758
  }
411297
411759
  }
411298
411760
  if (Array.isArray(message.tool_calls)) {
411299
- for (const call73 of message.tool_calls) {
411300
- if (!call73 || typeof call73 !== "object")
411761
+ for (const call74 of message.tool_calls) {
411762
+ if (!call74 || typeof call74 !== "object")
411301
411763
  continue;
411302
- const typed = call73;
411764
+ const typed = call74;
411303
411765
  const name = typed.function?.name;
411304
411766
  if (!name)
411305
411767
  continue;
@@ -411449,7 +411911,7 @@ async function sideQuery(opts) {
411449
411911
  betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
411450
411912
  }
411451
411913
  const messageText = extractFirstUserMessageText(messages);
411452
- const fingerprint = computeFingerprint(messageText, { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
411914
+ const fingerprint = computeFingerprint(messageText, { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
411453
411915
  const attributionHeader = getAttributionHeader(fingerprint);
411454
411916
  const systemBlocks = [
411455
411917
  attributionHeader ? { type: "text", text: attributionHeader } : null,
@@ -416951,7 +417413,7 @@ function buildSystemInitMessage(inputs) {
416951
417413
  slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
416952
417414
  apiKeySource: getTheusApiKeyWithSource().source,
416953
417415
  betas: getSdkBetas(),
416954
- theus_code_version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
417416
+ theus_code_version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
416955
417417
  output_style: outputStyle2,
416956
417418
  agents: inputs.agents.map((agent) => agent.agentType),
416957
417419
  skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
@@ -421764,10 +422226,10 @@ function _temp166(rule) {
421764
422226
  function extractDirectories(updates) {
421765
422227
  if (!updates)
421766
422228
  return [];
421767
- return updates.flatMap((update) => {
421768
- switch (update.type) {
422229
+ return updates.flatMap((update3) => {
422230
+ switch (update3.type) {
421769
422231
  case "addDirectories":
421770
- return update.directories;
422232
+ return update3.directories;
421771
422233
  default:
421772
422234
  return [];
421773
422235
  }
@@ -421776,8 +422238,8 @@ function extractDirectories(updates) {
421776
422238
  function extractMode(updates) {
421777
422239
  if (!updates)
421778
422240
  return;
421779
- const update = updates.findLast((u4) => u4.type === "setMode");
421780
- return update?.type === "setMode" ? update.mode : undefined;
422241
+ const update3 = updates.findLast((u4) => u4.type === "setMode");
422242
+ return update3?.type === "setMode" ? update3.mode : undefined;
421781
422243
  }
421782
422244
  function SuggestionDisplay(t0) {
421783
422245
  const $2 = c3(22);
@@ -431577,9 +432039,9 @@ var init_useVoiceEnabled = __esm(() => {
431577
432039
 
431578
432040
  // hooks/useUpdateNotification.ts
431579
432041
  function getSemverPart(version3) {
431580
- return `${import_semver12.major(version3, { loose: true })}.${import_semver12.minor(version3, { loose: true })}.${import_semver12.patch(version3, { loose: true })}`;
432042
+ return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
431581
432043
  }
431582
- function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
432044
+ function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
431583
432045
  const [lastNotifiedSemver, setLastNotifiedSemver] = import_react221.useState(() => getSemverPart(initialVersion));
431584
432046
  if (!updatedVersion) {
431585
432047
  return null;
@@ -431591,10 +432053,10 @@ function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.1.
431591
432053
  }
431592
432054
  return null;
431593
432055
  }
431594
- var import_react221, import_semver12;
432056
+ var import_react221, import_semver13;
431595
432057
  var init_useUpdateNotification = __esm(() => {
431596
432058
  import_react221 = __toESM(require_react(), 1);
431597
- import_semver12 = __toESM(require_semver2(), 1);
432059
+ import_semver13 = __toESM(require_semver2(), 1);
431598
432060
  });
431599
432061
 
431600
432062
  // components/AutoUpdater.tsx
@@ -431619,7 +432081,7 @@ function AutoUpdater({
431619
432081
  return;
431620
432082
  }
431621
432083
  if (false) {}
431622
- const currentVersion = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
432084
+ const currentVersion = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
431623
432085
  const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
431624
432086
  let latestVersion = await getLatestVersion(channel);
431625
432087
  const isDisabled2 = isAutoUpdaterDisabled();
@@ -431755,7 +432217,7 @@ function AutoUpdater({
431755
432217
  " ",
431756
432218
  /* @__PURE__ */ jsx_dev_runtime399.jsxDEV(ThemedText, {
431757
432219
  bold: true,
431758
- children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`
432220
+ children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.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.1.1", BUILD_TIME: "1970-01-01T00:00:00.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}`
431759
432221
  }, undefined, false, undefined, this)
431760
432222
  ]
431761
432223
  }, undefined, true, undefined, this)
@@ -431832,12 +432294,12 @@ function NativeAutoUpdater({
431832
432294
  logEvent("tengu_native_auto_updater_start", {});
431833
432295
  try {
431834
432296
  const maxVersion = await getMaxVersion();
431835
- if (maxVersion && gt({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
432297
+ if (maxVersion && gt({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
431836
432298
  const msg = await getMaxVersionMessage();
431837
432299
  setMaxVersionIssue(msg ?? "affects your version");
431838
432300
  }
431839
432301
  const result = await installLatest(channel);
431840
- const currentVersion = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
432302
+ const currentVersion = { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
431841
432303
  const latencyMs = Date.now() - startTime;
431842
432304
  if (result.lockFailed) {
431843
432305
  logEvent("tengu_native_auto_updater_lock_contention", {
@@ -431974,17 +432436,17 @@ function PackageManagerAutoUpdater(t0) {
431974
432436
  const maxVersion = await getMaxVersion();
431975
432437
  if (maxVersion && latest && gt(latest, maxVersion)) {
431976
432438
  logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
431977
- if (gte({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
431978
- logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
432439
+ if (gte({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
432440
+ logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
431979
432441
  setUpdateAvailable(false);
431980
432442
  return;
431981
432443
  }
431982
432444
  latest = maxVersion;
431983
432445
  }
431984
- const hasUpdate = latest && !gte({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
432446
+ const hasUpdate = latest && !gte({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
431985
432447
  setUpdateAvailable(!!hasUpdate);
431986
432448
  if (hasUpdate) {
431987
- logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
432449
+ logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
431988
432450
  }
431989
432451
  };
431990
432452
  $2[0] = t1;
@@ -432018,7 +432480,7 @@ function PackageManagerAutoUpdater(t0) {
432018
432480
  wrap: "truncate",
432019
432481
  children: [
432020
432482
  "currentVersion: ",
432021
- { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
432483
+ { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
432022
432484
  ]
432023
432485
  }, undefined, true, undefined, this);
432024
432486
  $2[3] = verbose;
@@ -439891,7 +440353,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
439891
440353
  project_dir: getOriginalCwd(),
439892
440354
  added_dirs: addedDirs
439893
440355
  },
439894
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
440356
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
439895
440357
  output_style: {
439896
440358
  name: outputStyleName
439897
440359
  },
@@ -447613,7 +448075,7 @@ function createPermissionContext(tool, input, toolUseContext, assistantMessage,
447613
448075
  persistPermissionUpdates(updates);
447614
448076
  const appState = toolUseContext.getAppState();
447615
448077
  setToolPermissionContext(applyPermissionUpdates(appState.toolPermissionContext, updates));
447616
- return updates.some((update) => supportsPersistence(update.destination));
448078
+ return updates.some((update3) => supportsPersistence(update3.destination));
447617
448079
  },
447618
448080
  resolveIfAborted(resolve42) {
447619
448081
  if (!toolUseContext.abortController.signal.aborted)
@@ -451409,7 +451871,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
451409
451871
  } catch {}
451410
451872
  const data = {
451411
451873
  trigger,
451412
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
451874
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
451413
451875
  platform: process.platform,
451414
451876
  transcript,
451415
451877
  subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
@@ -461748,7 +462210,7 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
461748
462210
  return;
461749
462211
  const approvedHost = currentRequest.hostPattern.host;
461750
462212
  if (persistToSettings) {
461751
- const update = {
462213
+ const update3 = {
461752
462214
  type: "addRules",
461753
462215
  rules: [{
461754
462216
  toolName: WEB_FETCH_TOOL_NAME,
@@ -461759,9 +462221,9 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
461759
462221
  };
461760
462222
  setAppState((prev) => ({
461761
462223
  ...prev,
461762
- toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
462224
+ toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update3)
461763
462225
  }));
461764
- persistPermissionUpdate(update);
462226
+ persistPermissionUpdate(update3);
461765
462227
  SandboxManager2.refreshConfig();
461766
462228
  }
461767
462229
  setSandboxPermissionRequestQueue((queue2) => {
@@ -461823,7 +462285,7 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
461823
462285
  const approvedHost = currentRequest.host;
461824
462286
  sendSandboxPermissionResponseViaMailbox(currentRequest.workerName, currentRequest.requestId, approvedHost, allow, teamContext?.teamName);
461825
462287
  if (persistToSettings && allow) {
461826
- const update = {
462288
+ const update3 = {
461827
462289
  type: "addRules",
461828
462290
  rules: [{
461829
462291
  toolName: WEB_FETCH_TOOL_NAME,
@@ -461834,9 +462296,9 @@ Note: ctrl + z now suspends Theus, ctrl + _ undoes input.
461834
462296
  };
461835
462297
  setAppState((prev) => ({
461836
462298
  ...prev,
461837
- toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update)
462299
+ toolPermissionContext: applyPermissionUpdate(prev.toolPermissionContext, update3)
461838
462300
  }));
461839
- persistPermissionUpdate(update);
462301
+ persistPermissionUpdate(update3);
461840
462302
  SandboxManager2.refreshConfig();
461841
462303
  }
461842
462304
  setAppState((prev) => ({
@@ -462406,41 +462868,164 @@ __export(exports_StartupMenu, {
462406
462868
  default: () => StartupMenu_default,
462407
462869
  StartupMenu: () => StartupMenu
462408
462870
  });
462871
+ function MetricLine({
462872
+ label,
462873
+ value,
462874
+ accent,
462875
+ dim: dim2
462876
+ }) {
462877
+ return /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462878
+ children: [
462879
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462880
+ color: dim2,
462881
+ children: [
462882
+ label,
462883
+ ": "
462884
+ ]
462885
+ }, undefined, true, undefined, this),
462886
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462887
+ color: accent,
462888
+ children: value
462889
+ }, undefined, false, undefined, this)
462890
+ ]
462891
+ }, undefined, true, undefined, this);
462892
+ }
462409
462893
  function StartupMenu({ version: version3, onSelect, onExit: onExit2, projectIntelligence }) {
462410
462894
  const [theme2] = useTheme();
462895
+ const { columns } = useTerminalSize();
462411
462896
  const [ref, time4] = useAnimationFrame(180);
462412
462897
  const accent = theme2?.suggestion ?? "cyan";
462413
462898
  const dim2 = theme2?.secondaryText ?? "gray";
462414
462899
  const active = Math.floor(time4 / 260) % RAIL.length;
462900
+ const showSidePanel = columns >= 110;
462415
462901
  return /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462416
462902
  ref,
462417
462903
  flexDirection: "column",
462904
+ width: "100%",
462418
462905
  children: [
462419
462906
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(TheusBanner, {
462420
462907
  version: version3
462421
462908
  }, undefined, false, undefined, this),
462909
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462910
+ marginTop: 1,
462911
+ flexDirection: showSidePanel ? "row" : "column",
462912
+ width: "100%",
462913
+ gap: showSidePanel ? 2 : 0,
462914
+ children: [
462915
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462916
+ borderStyle: "single",
462917
+ borderColor: accent,
462918
+ flexDirection: "column",
462919
+ paddingX: 1,
462920
+ paddingY: 1,
462921
+ flexGrow: 1,
462922
+ children: [
462923
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462924
+ bold: true,
462925
+ color: accent,
462926
+ children: "Acciones"
462927
+ }, undefined, false, undefined, this),
462928
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462929
+ marginTop: 1,
462930
+ children: /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(Select, {
462931
+ options: OPTIONS,
462932
+ visibleOptionCount: OPTIONS.length,
462933
+ layout: "compact",
462934
+ onChange: (value) => value === "exit" ? onExit2?.() : onSelect(value),
462935
+ onCancel: () => onExit2?.()
462936
+ }, undefined, false, undefined, this)
462937
+ }, undefined, false, undefined, this)
462938
+ ]
462939
+ }, undefined, true, undefined, this),
462940
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462941
+ borderStyle: "single",
462942
+ borderColor: dim2,
462943
+ flexDirection: "column",
462944
+ paddingX: 1,
462945
+ paddingY: 1,
462946
+ marginTop: showSidePanel ? 0 : 1,
462947
+ width: showSidePanel ? 42 : "100%",
462948
+ children: [
462949
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462950
+ bold: true,
462951
+ color: accent,
462952
+ children: "Proyecto"
462953
+ }, undefined, false, undefined, this),
462954
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462955
+ marginTop: 1,
462956
+ flexDirection: "column",
462957
+ children: projectIntelligence ? /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(jsx_dev_runtime463.Fragment, {
462958
+ children: [
462959
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(MetricLine, {
462960
+ label: "Archivos",
462961
+ value: projectIntelligence.filesIndexed,
462962
+ accent,
462963
+ dim: dim2
462964
+ }, undefined, false, undefined, this),
462965
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(MetricLine, {
462966
+ label: "Simbolos",
462967
+ value: projectIntelligence.symbolsFound,
462968
+ accent,
462969
+ dim: dim2
462970
+ }, undefined, false, undefined, this),
462971
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(MetricLine, {
462972
+ label: "Nodos",
462973
+ value: projectIntelligence.nodes,
462974
+ accent,
462975
+ dim: dim2
462976
+ }, undefined, false, undefined, this),
462977
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(MetricLine, {
462978
+ label: "Tablas",
462979
+ value: projectIntelligence.databaseTables,
462980
+ accent,
462981
+ dim: dim2
462982
+ }, undefined, false, undefined, this),
462983
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(MetricLine, {
462984
+ label: "Relaciones",
462985
+ value: projectIntelligence.databaseRelations,
462986
+ accent,
462987
+ dim: dim2
462988
+ }, undefined, false, undefined, this)
462989
+ ]
462990
+ }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462991
+ color: dim2,
462992
+ children: "Indice local no disponible todavia."
462993
+ }, undefined, false, undefined, this)
462994
+ }, undefined, false, undefined, this),
462995
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462996
+ marginTop: 1,
462997
+ flexDirection: "column",
462998
+ children: [
462999
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
463000
+ bold: true,
463001
+ color: accent,
463002
+ children: "Estado"
463003
+ }, undefined, false, undefined, this),
463004
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
463005
+ color: dim2,
463006
+ children: "Enter selecciona"
463007
+ }, undefined, false, undefined, this),
463008
+ /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
463009
+ color: dim2,
463010
+ children: "Esc sale"
463011
+ }, undefined, false, undefined, this)
463012
+ ]
463013
+ }, undefined, true, undefined, this)
463014
+ ]
463015
+ }, undefined, true, undefined, this)
463016
+ ]
463017
+ }, undefined, true, undefined, this),
462422
463018
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462423
463019
  marginTop: 1,
462424
463020
  flexDirection: "column",
462425
- alignItems: "center",
462426
463021
  children: projectIntelligence ? /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(jsx_dev_runtime463.Fragment, {
462427
- children: [
462428
- /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462429
- color: accent,
462430
- children: `Indexed ${projectIntelligence.filesIndexed} files | ${projectIntelligence.symbolsFound} symbols | ${projectIntelligence.nodes} nodes`
462431
- }, undefined, false, undefined, this),
462432
- /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462433
- color: dim2,
462434
- children: `Dashboard ${projectIntelligence.dashboardUrl} | API ${projectIntelligence.apiUrl}`
462435
- }, undefined, false, undefined, this),
462436
- /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462437
- color: dim2,
462438
- children: `Visual DB ${projectIntelligence.databaseTables} tables | ${projectIntelligence.databaseRelations} relations`
462439
- }, undefined, false, undefined, this)
462440
- ]
462441
- }, undefined, true, undefined, this) : /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
463022
+ children: /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
463023
+ color: dim2,
463024
+ children: `Dashboard ${projectIntelligence.dashboardUrl} | API ${projectIntelligence.apiUrl}`
463025
+ }, undefined, false, undefined, this)
463026
+ }, undefined, false, undefined, this) : /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462442
463027
  color: dim2,
462443
- children: "Local project index is unavailable. Run /dashboard or /grafo to retry."
463028
+ children: "Ejecuta /dashboard o /grafo para reintentar el indice local."
462444
463029
  }, undefined, false, undefined, this)
462445
463030
  }, undefined, false, undefined, this),
462446
463031
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
@@ -462456,19 +463041,11 @@ function StartupMenu({ version: version3, onSelect, onExit: onExit2, projectInte
462456
463041
  }, undefined, false, undefined, this),
462457
463042
  /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedBox_default, {
462458
463043
  marginTop: 1,
462459
- marginBottom: 1,
462460
463044
  justifyContent: "center",
462461
463045
  children: /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(ThemedText, {
462462
463046
  color: dim2,
462463
- children: "Arrows/flechas to move | Enter or number to select | Esc to exit"
463047
+ children: "Flechas para mover | Enter o numero para seleccionar | Esc para salir"
462464
463048
  }, undefined, false, undefined, this)
462465
- }, undefined, false, undefined, this),
462466
- /* @__PURE__ */ jsx_dev_runtime463.jsxDEV(Select, {
462467
- options: OPTIONS,
462468
- visibleOptionCount: OPTIONS.length,
462469
- layout: "expanded",
462470
- onChange: (value) => value === "exit" ? onExit2?.() : onSelect(value),
462471
- onCancel: () => onExit2?.()
462472
463049
  }, undefined, false, undefined, this)
462473
463050
  ]
462474
463051
  }, undefined, true, undefined, this);
@@ -462476,52 +463053,53 @@ function StartupMenu({ version: version3, onSelect, onExit: onExit2, projectInte
462476
463053
  var jsx_dev_runtime463, OPTIONS, RAIL, StartupMenu_default;
462477
463054
  var init_StartupMenu = __esm(() => {
462478
463055
  init_ink2();
463056
+ init_useTerminalSize();
462479
463057
  init_select();
462480
463058
  init_TheusBanner();
462481
463059
  jsx_dev_runtime463 = __toESM(require_jsx_dev_runtime(), 1);
462482
463060
  OPTIONS = [
462483
463061
  {
462484
- label: "Start / Iniciar",
463062
+ label: "Iniciar sesion",
462485
463063
  value: "new-project",
462486
- description: "Open a fresh Theus session in this workspace"
463064
+ description: "Abrir una conversacion nueva en este workspace"
462487
463065
  },
462488
463066
  {
462489
- label: "Connect model / Conectar modelo",
463067
+ label: "Conectar modelo",
462490
463068
  value: "providers",
462491
- description: "Set local model, custom endpoint, or BYOK provider"
463069
+ description: "Configurar modelo local, endpoint propio o API key"
462492
463070
  },
462493
463071
  {
462494
- label: "Skills / Habilidades",
463072
+ label: "Habilidades",
462495
463073
  value: "skills",
462496
- description: "Browse and run executable workflow skills"
463074
+ description: "Ver y ejecutar workflows disponibles"
462497
463075
  },
462498
463076
  {
462499
- label: "Graph dashboard / Grafo",
463077
+ label: "Dashboard local",
462500
463078
  value: "memory",
462501
- description: "Open the local project API, graph and memory index"
463079
+ description: "Abrir API local, grafo del proyecto y memoria"
462502
463080
  },
462503
463081
  {
462504
- label: "Visual database / Base de datos",
463082
+ label: "Base visual",
462505
463083
  value: "visual-db",
462506
- description: "Inspect detected SQL or Prisma schema visually"
463084
+ description: "Inspeccionar esquemas SQL o Prisma detectados"
462507
463085
  },
462508
463086
  {
462509
- label: "Resume / Continuar",
463087
+ label: "Continuar",
462510
463088
  value: "resume",
462511
- description: "Continue a previous Theus session"
463089
+ description: "Retomar una sesion anterior de Theus"
462512
463090
  },
462513
463091
  {
462514
- label: "Settings / Ajustes",
463092
+ label: "Ajustes",
462515
463093
  value: "settings",
462516
- description: "Theme, permissions, model profile and terminal setup"
463094
+ description: "Tema, permisos, perfil de modelo y terminal"
462517
463095
  },
462518
463096
  {
462519
- label: "Exit / Salir",
463097
+ label: "Salir",
462520
463098
  value: "exit",
462521
- description: "Close Theus"
463099
+ description: "Cerrar Theus"
462522
463100
  }
462523
463101
  ];
462524
- RAIL = ["[theus.pe]", "[local]", "[byok]", "[mcp]", "[memory]"];
463102
+ RAIL = ["[theus.pe]", "[local]", "[modelo propio]", "[mcp]", "[memoria]"];
462525
463103
  StartupMenu_default = StartupMenu;
462526
463104
  });
462527
463105
 
@@ -463814,7 +464392,7 @@ function Onboarding({
463814
464392
  flexDirection: "column",
463815
464393
  children: [
463816
464394
  /* @__PURE__ */ jsx_dev_runtime472.jsxDEV(TheusBanner, {
463817
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
464395
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
463818
464396
  }, undefined, false, undefined, this),
463819
464397
  /* @__PURE__ */ jsx_dev_runtime472.jsxDEV(ThemedBox_default, {
463820
464398
  flexDirection: "column",
@@ -464693,7 +465271,7 @@ function completeOnboarding() {
464693
465271
  saveGlobalConfig((current) => ({
464694
465272
  ...current,
464695
465273
  hasCompletedOnboarding: true,
464696
- lastOnboardingVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
465274
+ lastOnboardingVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
464697
465275
  }));
464698
465276
  }
464699
465277
  function showDialog(root2, renderer) {
@@ -469409,7 +469987,7 @@ function appendToLog(path21, message) {
469409
469987
  cwd: getFsImplementation().cwd(),
469410
469988
  userType: process.env.USER_TYPE,
469411
469989
  sessionId: getSessionId(),
469412
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
469990
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
469413
469991
  };
469414
469992
  getLogWriter(path21).write(messageWithTimestamp);
469415
469993
  }
@@ -473447,8 +474025,8 @@ async function getEnvLessBridgeConfig() {
473447
474025
  }
473448
474026
  async function checkEnvLessBridgeMinVersion() {
473449
474027
  const cfg = await getEnvLessBridgeConfig();
473450
- if (cfg.min_version && lt({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
473451
- return `Your version of Theus (${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
474028
+ if (cfg.min_version && lt({ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
474029
+ return `Your version of Theus (${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
473452
474030
  Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
473453
474031
  }
473454
474032
  return null;
@@ -473922,7 +474500,7 @@ async function initBridgeCore(params) {
473922
474500
  const rawApi = createBridgeApiClient({
473923
474501
  baseUrl,
473924
474502
  getAccessToken,
473925
- runnerVersion: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
474503
+ runnerVersion: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
473926
474504
  onDebug: logForDebugging,
473927
474505
  onAuth401,
473928
474506
  getTrustedDeviceToken
@@ -479610,7 +480188,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
479610
480188
  setCwd(cwd3);
479611
480189
  const server = new Server({
479612
480190
  name: "theus/tengu",
479613
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
480191
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
479614
480192
  }, {
479615
480193
  capabilities: {
479616
480194
  tools: {}
@@ -481052,7 +481630,7 @@ async function setupTokenHandler(root2) {
481052
481630
  gap: 1,
481053
481631
  children: [
481054
481632
  /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(TheusBanner, {
481055
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
481633
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
481056
481634
  }, undefined, false, undefined, this),
481057
481635
  showAuthWarning && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
481058
481636
  flexDirection: "column",
@@ -481216,361 +481794,6 @@ var init_agents3 = __esm(() => {
481216
481794
  init_cwd2();
481217
481795
  });
481218
481796
 
481219
- // cli/update.ts
481220
- var exports_update = {};
481221
- __export(exports_update, {
481222
- update: () => update
481223
- });
481224
- async function update() {
481225
- logEvent("tengu_update_check", {});
481226
- writeToStdout(`Current version: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
481227
- `);
481228
- const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
481229
- writeToStdout(`Checking for updates to ${channel} version...
481230
- `);
481231
- logForDebugging("update: Starting update check");
481232
- logForDebugging("update: Running diagnostic");
481233
- const diagnostic = await getDoctorDiagnostic();
481234
- logForDebugging(`update: Installation type: ${diagnostic.installationType}`);
481235
- logForDebugging(`update: Config install method: ${diagnostic.configInstallMethod}`);
481236
- if (diagnostic.multipleInstallations.length > 1) {
481237
- writeToStdout(`
481238
- `);
481239
- writeToStdout(source_default.yellow("Warning: Multiple installations found") + `
481240
- `);
481241
- for (const install2 of diagnostic.multipleInstallations) {
481242
- const current = diagnostic.installationType === install2.type ? " (currently running)" : "";
481243
- writeToStdout(`- ${install2.type} at ${install2.path}${current}
481244
- `);
481245
- }
481246
- }
481247
- if (diagnostic.warnings.length > 0) {
481248
- writeToStdout(`
481249
- `);
481250
- for (const warning of diagnostic.warnings) {
481251
- logForDebugging(`update: Warning detected: ${warning.issue}`);
481252
- logForDebugging(`update: Showing warning: ${warning.issue}`);
481253
- writeToStdout(source_default.yellow(`Warning: ${warning.issue}
481254
- `));
481255
- writeToStdout(source_default.bold(`Fix: ${warning.fix}
481256
- `));
481257
- }
481258
- }
481259
- const config3 = getGlobalConfig();
481260
- if (!config3.installMethod && diagnostic.installationType !== "package-manager") {
481261
- writeToStdout(`
481262
- `);
481263
- writeToStdout(`Updating configuration to track installation method...
481264
- `);
481265
- let detectedMethod = "unknown";
481266
- switch (diagnostic.installationType) {
481267
- case "npm-local":
481268
- detectedMethod = "local";
481269
- break;
481270
- case "native":
481271
- detectedMethod = "native";
481272
- break;
481273
- case "npm-global":
481274
- detectedMethod = "global";
481275
- break;
481276
- default:
481277
- detectedMethod = "unknown";
481278
- }
481279
- saveGlobalConfig((current) => ({
481280
- ...current,
481281
- installMethod: detectedMethod
481282
- }));
481283
- writeToStdout(`Installation method set to: ${detectedMethod}
481284
- `);
481285
- }
481286
- if (diagnostic.installationType === "development") {
481287
- writeToStdout(`
481288
- `);
481289
- writeToStdout(source_default.yellow("Warning: Cannot update development build") + `
481290
- `);
481291
- await gracefulShutdown(1);
481292
- }
481293
- if (diagnostic.installationType === "package-manager") {
481294
- const packageManager = await getPackageManager();
481295
- writeToStdout(`
481296
- `);
481297
- if (packageManager === "homebrew") {
481298
- writeToStdout(`Theus is managed by Homebrew.
481299
- `);
481300
- const latest = await getLatestVersion(channel);
481301
- if (latest && !gte({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
481302
- writeToStdout(`Update available: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
481303
- `);
481304
- writeToStdout(`
481305
- `);
481306
- writeToStdout(`To update, run:
481307
- `);
481308
- writeToStdout(source_default.bold(" brew upgrade theus-code") + `
481309
- `);
481310
- } else {
481311
- writeToStdout(`Theus is up to date!
481312
- `);
481313
- }
481314
- } else if (packageManager === "winget") {
481315
- writeToStdout(`Theus is managed by winget.
481316
- `);
481317
- const latest = await getLatestVersion(channel);
481318
- if (latest && !gte({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
481319
- writeToStdout(`Update available: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
481320
- `);
481321
- writeToStdout(`
481322
- `);
481323
- writeToStdout(`To update, run:
481324
- `);
481325
- writeToStdout(source_default.bold(" winget upgrade Theus.TheusCode") + `
481326
- `);
481327
- } else {
481328
- writeToStdout(`Theus is up to date!
481329
- `);
481330
- }
481331
- } else if (packageManager === "apk") {
481332
- writeToStdout(`Theus is managed by apk.
481333
- `);
481334
- const latest = await getLatestVersion(channel);
481335
- if (latest && !gte({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
481336
- writeToStdout(`Update available: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
481337
- `);
481338
- writeToStdout(`
481339
- `);
481340
- writeToStdout(`To update, run:
481341
- `);
481342
- writeToStdout(source_default.bold(" apk upgrade theus-code") + `
481343
- `);
481344
- } else {
481345
- writeToStdout(`Theus is up to date!
481346
- `);
481347
- }
481348
- } else {
481349
- writeToStdout(`Theus is managed by a package manager.
481350
- `);
481351
- writeToStdout(`Please use your package manager to update.
481352
- `);
481353
- }
481354
- await gracefulShutdown(0);
481355
- }
481356
- if (config3.installMethod && diagnostic.configInstallMethod !== "not set" && diagnostic.installationType !== "package-manager") {
481357
- const runningType = diagnostic.installationType;
481358
- const configExpects = diagnostic.configInstallMethod;
481359
- const typeMapping = {
481360
- "npm-local": "local",
481361
- "npm-global": "global",
481362
- native: "native",
481363
- development: "development",
481364
- unknown: "unknown"
481365
- };
481366
- const normalizedRunningType = typeMapping[runningType] || runningType;
481367
- if (normalizedRunningType !== configExpects && configExpects !== "unknown") {
481368
- writeToStdout(`
481369
- `);
481370
- writeToStdout(source_default.yellow("Warning: Configuration mismatch") + `
481371
- `);
481372
- writeToStdout(`Config expects: ${configExpects} installation
481373
- `);
481374
- writeToStdout(`Currently running: ${runningType}
481375
- `);
481376
- writeToStdout(source_default.yellow(`Updating the ${runningType} installation you are currently using`) + `
481377
- `);
481378
- saveGlobalConfig((current) => ({
481379
- ...current,
481380
- installMethod: normalizedRunningType
481381
- }));
481382
- writeToStdout(`Config updated to reflect current installation method: ${normalizedRunningType}
481383
- `);
481384
- }
481385
- }
481386
- if (diagnostic.installationType === "native") {
481387
- logForDebugging("update: Detected native installation, using native updater");
481388
- try {
481389
- const result = await installLatest(channel, true);
481390
- if (result.lockFailed) {
481391
- const pidInfo = result.lockHolderPid ? ` (PID ${result.lockHolderPid})` : "";
481392
- writeToStdout(source_default.yellow(`Another Theus process${pidInfo} is currently running. Please try again in a moment.`) + `
481393
- `);
481394
- await gracefulShutdown(0);
481395
- }
481396
- if (!result.latestVersion) {
481397
- process.stderr.write(`Failed to check for updates
481398
- `);
481399
- await gracefulShutdown(1);
481400
- }
481401
- if (result.latestVersion === { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
481402
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
481403
- `);
481404
- } else {
481405
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
481406
- `);
481407
- await regenerateCompletionCache();
481408
- }
481409
- await gracefulShutdown(0);
481410
- } catch (error40) {
481411
- process.stderr.write(`Error: Failed to install native update
481412
- `);
481413
- process.stderr.write(String(error40) + `
481414
- `);
481415
- process.stderr.write(`Try running "theus doctor" for diagnostics
481416
- `);
481417
- await gracefulShutdown(1);
481418
- }
481419
- }
481420
- if (config3.installMethod !== "native") {
481421
- await removeInstalledSymlink();
481422
- }
481423
- logForDebugging("update: Checking npm registry for latest version");
481424
- logForDebugging(`update: Package URL: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}`);
481425
- const npmTag = channel === "stable" ? "stable" : "latest";
481426
- const npmCommand = `npm view ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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`;
481427
- logForDebugging(`update: Running: ${npmCommand}`);
481428
- const latestVersion = await getLatestVersion(channel);
481429
- logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
481430
- if (!latestVersion) {
481431
- logForDebugging("update: Failed to get latest version from npm registry");
481432
- process.stderr.write(source_default.red("Failed to check for updates") + `
481433
- `);
481434
- process.stderr.write(`Unable to fetch latest version from npm registry
481435
- `);
481436
- process.stderr.write(`
481437
- `);
481438
- process.stderr.write(`Possible causes:
481439
- `);
481440
- process.stderr.write(` \u2022 Network connectivity issues
481441
- `);
481442
- process.stderr.write(` \u2022 npm registry is unreachable
481443
- `);
481444
- process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
481445
- `);
481446
- if ({ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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")) {
481447
- process.stderr.write(` \u2022 Internal/development build not published to npm
481448
- `);
481449
- }
481450
- process.stderr.write(`
481451
- `);
481452
- process.stderr.write(`Try:
481453
- `);
481454
- process.stderr.write(` \u2022 Check your internet connection
481455
- `);
481456
- process.stderr.write(` \u2022 Run with --debug flag for more details
481457
- `);
481458
- const packageName = { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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");
481459
- process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
481460
- `);
481461
- process.stderr.write(` \u2022 Check if you need to login: npm whoami
481462
- `);
481463
- await gracefulShutdown(1);
481464
- }
481465
- if (latestVersion === { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
481466
- writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
481467
- `);
481468
- await gracefulShutdown(0);
481469
- }
481470
- writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
481471
- `);
481472
- writeToStdout(`Installing update...
481473
- `);
481474
- let useLocalUpdate = false;
481475
- let updateMethodName = "";
481476
- switch (diagnostic.installationType) {
481477
- case "npm-local":
481478
- useLocalUpdate = true;
481479
- updateMethodName = "local";
481480
- break;
481481
- case "npm-global":
481482
- useLocalUpdate = false;
481483
- updateMethodName = "global";
481484
- break;
481485
- case "unknown": {
481486
- const isLocal = await localInstallationExists();
481487
- useLocalUpdate = isLocal;
481488
- updateMethodName = isLocal ? "local" : "global";
481489
- writeToStdout(source_default.yellow("Warning: Could not determine installation type") + `
481490
- `);
481491
- writeToStdout(`Attempting ${updateMethodName} update based on file detection...
481492
- `);
481493
- break;
481494
- }
481495
- default:
481496
- process.stderr.write(`Error: Cannot update ${diagnostic.installationType} installation
481497
- `);
481498
- await gracefulShutdown(1);
481499
- }
481500
- writeToStdout(`Using ${updateMethodName} installation update method...
481501
- `);
481502
- logForDebugging(`update: Update method determined: ${updateMethodName}`);
481503
- logForDebugging(`update: useLocalUpdate: ${useLocalUpdate}`);
481504
- let status2;
481505
- if (useLocalUpdate) {
481506
- logForDebugging("update: Calling installOrUpdateTheusPackage() for local update");
481507
- status2 = await installOrUpdateTheusPackage(channel);
481508
- } else {
481509
- logForDebugging("update: Calling installGlobalPackage() for global update");
481510
- status2 = await installGlobalPackage();
481511
- }
481512
- logForDebugging(`update: Installation status: ${status2}`);
481513
- switch (status2) {
481514
- case "success":
481515
- writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
481516
- `);
481517
- await regenerateCompletionCache();
481518
- break;
481519
- case "no_permissions":
481520
- process.stderr.write(`Error: Insufficient permissions to install update
481521
- `);
481522
- if (useLocalUpdate) {
481523
- process.stderr.write(`Try manually updating with:
481524
- `);
481525
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}
481526
- `);
481527
- } else {
481528
- process.stderr.write(`Try running with sudo or fix npm permissions
481529
- `);
481530
- process.stderr.write(`Or consider using native installation with: theus install
481531
- `);
481532
- }
481533
- await gracefulShutdown(1);
481534
- break;
481535
- case "install_failed":
481536
- process.stderr.write(`Error: Failed to install update
481537
- `);
481538
- if (useLocalUpdate) {
481539
- process.stderr.write(`Try manually updating with:
481540
- `);
481541
- process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.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}
481542
- `);
481543
- } else {
481544
- process.stderr.write(`Or consider using native installation with: theus install
481545
- `);
481546
- }
481547
- await gracefulShutdown(1);
481548
- break;
481549
- case "in_progress":
481550
- process.stderr.write(`Error: Another instance is currently performing an update
481551
- `);
481552
- process.stderr.write(`Please wait and try again later
481553
- `);
481554
- await gracefulShutdown(1);
481555
- break;
481556
- }
481557
- await gracefulShutdown(0);
481558
- }
481559
- var init_update = __esm(() => {
481560
- init_source();
481561
- init_analytics();
481562
- init_autoUpdater();
481563
- init_completionCache();
481564
- init_config2();
481565
- init_debug();
481566
- init_doctorDiagnostic();
481567
- init_gracefulShutdown();
481568
- init_localInstaller();
481569
- init_nativeInstaller();
481570
- init_packageManagers();
481571
- init_settings2();
481572
- });
481573
-
481574
481797
  // main.tsx
481575
481798
  var exports_main2 = {};
481576
481799
  __export(exports_main2, {
@@ -482756,7 +482979,7 @@ ${customInstructions}` : customInstructions;
482756
482979
  }
482757
482980
  }
482758
482981
  logForDiagnosticsNoPII("info", "started", {
482759
- version: { VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
482982
+ version: { VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
482760
482983
  is_native_binary: isInBundledMode()
482761
482984
  });
482762
482985
  registerCleanup(async () => {
@@ -483540,7 +483763,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
483540
483763
  pendingHookMessages
483541
483764
  }, renderAndRun);
483542
483765
  }
483543
- }).version(`${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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", "Output the version number");
483766
+ }).version(`${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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", "Output the version number");
483544
483767
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
483545
483768
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
483546
483769
  if (canUserConfigureAdvisor()) {
@@ -483760,9 +483983,9 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
483760
483983
  });
483761
483984
  program2.command("update").alias("upgrade").description("Check for updates and install if available").action(async () => {
483762
483985
  const {
483763
- update: update2
483986
+ update: update3
483764
483987
  } = await Promise.resolve().then(() => (init_update(), exports_update));
483765
- await update2();
483988
+ await update3();
483766
483989
  });
483767
483990
  if (false) {}
483768
483991
  if (false) {}
@@ -484054,7 +484277,7 @@ if (false) {}
484054
484277
  async function main2() {
484055
484278
  const args = process.argv.slice(2);
484056
484279
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
484057
- console.log(`${{ VERSION: "0.1.0-theus", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
484280
+ console.log(`${{ VERSION: "0.1.1", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
484058
484281
  return;
484059
484282
  }
484060
484283
  const {