theus-cli 0.2.57 → 0.2.59
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.
- package/cli.js +236 -138
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -58896,7 +58896,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
|
|
|
58896
58896
|
if (isApiKeyHelperFromProjectOrLocalSettings()) {
|
|
58897
58897
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58898
58898
|
if (!hasTrust && !isNonInteractiveSession) {
|
|
58899
|
-
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58899
|
+
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
58900
58900
|
logAntError("apiKeyHelper invoked before trust check", error40);
|
|
58901
58901
|
logEvent("tengu_apiKeyHelper_missing_trust11", {});
|
|
58902
58902
|
return null;
|
|
@@ -58940,7 +58940,7 @@ async function runAwsAuthRefresh() {
|
|
|
58940
58940
|
if (isAwsAuthRefreshFromProjectSettings()) {
|
|
58941
58941
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58942
58942
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58943
|
-
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58943
|
+
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
58944
58944
|
logAntError("awsAuthRefresh invoked before trust check", error40);
|
|
58945
58945
|
logEvent("tengu_awsAuthRefresh_missing_trust", {});
|
|
58946
58946
|
return false;
|
|
@@ -59000,7 +59000,7 @@ async function getAwsCredsFromCredentialExport() {
|
|
|
59000
59000
|
if (isAwsCredentialExportFromProjectSettings()) {
|
|
59001
59001
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
59002
59002
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
59003
|
-
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
59003
|
+
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
59004
59004
|
logAntError("awsCredentialExport invoked before trust check", error40);
|
|
59005
59005
|
logEvent("tengu_awsCredentialExport_missing_trust", {});
|
|
59006
59006
|
return null;
|
|
@@ -59085,7 +59085,7 @@ async function runGcpAuthRefresh() {
|
|
|
59085
59085
|
if (isGcpAuthRefreshFromProjectSettings()) {
|
|
59086
59086
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
59087
59087
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
59088
|
-
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
59088
|
+
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
59089
59089
|
logAntError("gcpAuthRefresh invoked before trust check", error40);
|
|
59090
59090
|
logEvent("tengu_gcpAuthRefresh_missing_trust", {});
|
|
59091
59091
|
return false;
|
|
@@ -59780,7 +59780,7 @@ var init_auth = __esm(() => {
|
|
|
59780
59780
|
|
|
59781
59781
|
// utils/userAgent.ts
|
|
59782
59782
|
function getTheusCodeUserAgent() {
|
|
59783
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59783
|
+
return `theus-code/${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
|
|
59784
59784
|
}
|
|
59785
59785
|
|
|
59786
59786
|
// utils/workloadContext.ts
|
|
@@ -59802,7 +59802,7 @@ function getUserAgent() {
|
|
|
59802
59802
|
const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
|
|
59803
59803
|
const workload = getWorkload();
|
|
59804
59804
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
59805
|
-
return `theus-cli/${{ VERSION: "0.2.
|
|
59805
|
+
return `theus-cli/${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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})`;
|
|
59806
59806
|
}
|
|
59807
59807
|
function getMCPUserAgent() {
|
|
59808
59808
|
const parts = [];
|
|
@@ -59816,7 +59816,7 @@ function getMCPUserAgent() {
|
|
|
59816
59816
|
parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
|
|
59817
59817
|
}
|
|
59818
59818
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
59819
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59819
|
+
return `theus-code/${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
|
|
59820
59820
|
}
|
|
59821
59821
|
function getWebFetchUserAgent() {
|
|
59822
59822
|
return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
|
|
@@ -59954,7 +59954,7 @@ var init_user = __esm(() => {
|
|
|
59954
59954
|
deviceId,
|
|
59955
59955
|
sessionId: getSessionId(),
|
|
59956
59956
|
email: getEmail(),
|
|
59957
|
-
appVersion: { VERSION: "0.2.
|
|
59957
|
+
appVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
59958
59958
|
platform: getHostPlatformForAnalytics(),
|
|
59959
59959
|
organizationUuid,
|
|
59960
59960
|
accountUuid,
|
|
@@ -61669,7 +61669,7 @@ var init_metadata = __esm(() => {
|
|
|
61669
61669
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
61670
61670
|
WHITESPACE_REGEX = /\s+/;
|
|
61671
61671
|
getVersionBase = memoize_default(() => {
|
|
61672
|
-
const match = { VERSION: "0.2.
|
|
61672
|
+
const match = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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]+)?/);
|
|
61673
61673
|
return match ? match[0] : undefined;
|
|
61674
61674
|
});
|
|
61675
61675
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -61709,9 +61709,9 @@ var init_metadata = __esm(() => {
|
|
|
61709
61709
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
61710
61710
|
isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
|
|
61711
61711
|
isTheusAiAuth: isTheusAISubscriber(),
|
|
61712
|
-
version: { VERSION: "0.2.
|
|
61712
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
61713
61713
|
versionBase: getVersionBase(),
|
|
61714
|
-
buildTime: { VERSION: "0.2.
|
|
61714
|
+
buildTime: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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,
|
|
61715
61715
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
61716
61716
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
61717
61717
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -62377,7 +62377,7 @@ function initialize1PEventLogging() {
|
|
|
62377
62377
|
const platform2 = getPlatform();
|
|
62378
62378
|
const attributes = {
|
|
62379
62379
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
62380
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
62380
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
62381
62381
|
};
|
|
62382
62382
|
if (platform2 === "wsl") {
|
|
62383
62383
|
const wslVersion = getWslVersion();
|
|
@@ -62404,7 +62404,7 @@ function initialize1PEventLogging() {
|
|
|
62404
62404
|
})
|
|
62405
62405
|
]
|
|
62406
62406
|
});
|
|
62407
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
62407
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
62408
62408
|
}
|
|
62409
62409
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
62410
62410
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -64275,7 +64275,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
64275
64275
|
if (!isAttributionHeaderEnabled()) {
|
|
64276
64276
|
return "";
|
|
64277
64277
|
}
|
|
64278
|
-
const version2 = `${{ VERSION: "0.2.
|
|
64278
|
+
const version2 = `${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`;
|
|
64279
64279
|
const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
|
|
64280
64280
|
const cch = "";
|
|
64281
64281
|
const workload = getWorkload();
|
|
@@ -108362,7 +108362,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
|
|
|
108362
108362
|
}
|
|
108363
108363
|
function getFeedbackGuideline() {
|
|
108364
108364
|
if (isUsing3PServices()) {
|
|
108365
|
-
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.
|
|
108365
|
+
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
108366
108366
|
}
|
|
108367
108367
|
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";
|
|
108368
108368
|
}
|
|
@@ -167334,7 +167334,7 @@ function getTelemetryAttributes() {
|
|
|
167334
167334
|
attributes["session.id"] = sessionId;
|
|
167335
167335
|
}
|
|
167336
167336
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
167337
|
-
attributes["app.version"] = { VERSION: "0.2.
|
|
167337
|
+
attributes["app.version"] = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
167338
167338
|
}
|
|
167339
167339
|
const oauthAccount = getOauthAccountInfo();
|
|
167340
167340
|
if (oauthAccount) {
|
|
@@ -203218,7 +203218,7 @@ function getInstallationEnv() {
|
|
|
203218
203218
|
return;
|
|
203219
203219
|
}
|
|
203220
203220
|
function getTheusCodeVersion() {
|
|
203221
|
-
return { VERSION: "0.2.
|
|
203221
|
+
return { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
203222
203222
|
}
|
|
203223
203223
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
203224
203224
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -204736,7 +204736,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
|
|
|
204736
204736
|
if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
|
|
204737
204737
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
204738
204738
|
if (!hasTrust) {
|
|
204739
|
-
const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
204739
|
+
const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
204740
204740
|
logAntError("MCP headersHelper invoked before trust check", error40);
|
|
204741
204741
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
204742
204742
|
return null;
|
|
@@ -205946,7 +205946,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
205946
205946
|
const client2 = new Client({
|
|
205947
205947
|
name: "theus-code",
|
|
205948
205948
|
title: "Theus",
|
|
205949
|
-
version: { VERSION: "0.2.
|
|
205949
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
|
|
205950
205950
|
description: "Theus's agentic coding tool",
|
|
205951
205951
|
websiteUrl: PRODUCT_URL
|
|
205952
205952
|
}, {
|
|
@@ -206300,7 +206300,7 @@ var init_client5 = __esm(() => {
|
|
|
206300
206300
|
const client2 = new Client({
|
|
206301
206301
|
name: "theus-code",
|
|
206302
206302
|
title: "Theus",
|
|
206303
|
-
version: { VERSION: "0.2.
|
|
206303
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
|
|
206304
206304
|
description: "Theus's agentic coding tool",
|
|
206305
206305
|
websiteUrl: PRODUCT_URL
|
|
206306
206306
|
}, {
|
|
@@ -216879,7 +216879,7 @@ async function initializeBetaTracing(resource) {
|
|
|
216879
216879
|
});
|
|
216880
216880
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216881
216881
|
setLoggerProvider(loggerProvider);
|
|
216882
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216882
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216883
216883
|
setEventLogger(eventLogger);
|
|
216884
216884
|
process.on("beforeExit", async () => {
|
|
216885
216885
|
await loggerProvider?.forceFlush();
|
|
@@ -216919,7 +216919,7 @@ async function initializeTelemetry() {
|
|
|
216919
216919
|
const platform4 = getPlatform();
|
|
216920
216920
|
const baseAttributes = {
|
|
216921
216921
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
216922
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
216922
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
216923
216923
|
};
|
|
216924
216924
|
if (platform4 === "wsl") {
|
|
216925
216925
|
const wslVersion = getWslVersion();
|
|
@@ -216964,7 +216964,7 @@ async function initializeTelemetry() {
|
|
|
216964
216964
|
} catch {}
|
|
216965
216965
|
};
|
|
216966
216966
|
registerCleanup(shutdownTelemetry2);
|
|
216967
|
-
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216967
|
+
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216968
216968
|
}
|
|
216969
216969
|
const meterProvider = new MeterProvider({
|
|
216970
216970
|
resource,
|
|
@@ -216984,7 +216984,7 @@ async function initializeTelemetry() {
|
|
|
216984
216984
|
});
|
|
216985
216985
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216986
216986
|
setLoggerProvider(loggerProvider);
|
|
216987
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216987
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216988
216988
|
setEventLogger(eventLogger);
|
|
216989
216989
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
216990
216990
|
process.on("beforeExit", async () => {
|
|
@@ -217046,7 +217046,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
217046
217046
|
}
|
|
217047
217047
|
};
|
|
217048
217048
|
registerCleanup(shutdownTelemetry);
|
|
217049
|
-
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
217049
|
+
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
217050
217050
|
}
|
|
217051
217051
|
async function flushTelemetry() {
|
|
217052
217052
|
const meterProvider = getMeterProvider();
|
|
@@ -217586,7 +217586,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
|
|
|
217586
217586
|
return "install_failed";
|
|
217587
217587
|
}
|
|
217588
217588
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
217589
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.
|
|
217589
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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 });
|
|
217590
217590
|
if (result.code !== 0) {
|
|
217591
217591
|
const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
|
|
217592
217592
|
logError2(error40);
|
|
@@ -217732,9 +217732,9 @@ async function assertMinVersion() {
|
|
|
217732
217732
|
if (false) {}
|
|
217733
217733
|
try {
|
|
217734
217734
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
217735
|
-
if (versionConfig.minVersion && lt({ VERSION: "0.2.
|
|
217735
|
+
if (versionConfig.minVersion && lt({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
217736
217736
|
console.error(`
|
|
217737
|
-
It looks like your version of Theus (${{ VERSION: "0.2.
|
|
217737
|
+
It looks like your version of Theus (${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
|
|
217738
217738
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
217739
217739
|
|
|
217740
217740
|
To update, please run:
|
|
@@ -217875,7 +217875,7 @@ async function getInstallationPrefix() {
|
|
|
217875
217875
|
return prefixResult.stdout.trim();
|
|
217876
217876
|
}
|
|
217877
217877
|
function getGlobalInstallPackageManager() {
|
|
217878
|
-
if ({ VERSION: "0.2.
|
|
217878
|
+
if ({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL === "theus-cli") {
|
|
217879
217879
|
return "npm";
|
|
217880
217880
|
}
|
|
217881
217881
|
return env3.isRunningWithBun() ? "bun" : "npm";
|
|
@@ -217900,7 +217900,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
217900
217900
|
}
|
|
217901
217901
|
async function getLatestVersion(channel2) {
|
|
217902
217902
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
217903
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.
|
|
217903
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217904
217904
|
if (result.code !== 0) {
|
|
217905
217905
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
217906
217906
|
if (result.stderr) {
|
|
@@ -217916,7 +217916,7 @@ async function getLatestVersion(channel2) {
|
|
|
217916
217916
|
return result.stdout.trim();
|
|
217917
217917
|
}
|
|
217918
217918
|
async function getNpmDistTags() {
|
|
217919
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.
|
|
217919
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217920
217920
|
if (result.code !== 0) {
|
|
217921
217921
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
217922
217922
|
return { latest: null, stable: null };
|
|
@@ -217956,7 +217956,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217956
217956
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
217957
217957
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
217958
217958
|
pid: process.pid,
|
|
217959
|
-
currentVersion: { VERSION: "0.2.
|
|
217959
|
+
currentVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217960
217960
|
});
|
|
217961
217961
|
return "in_progress";
|
|
217962
217962
|
}
|
|
@@ -217965,7 +217965,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217965
217965
|
if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
|
|
217966
217966
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
217967
217967
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
217968
|
-
currentVersion: { VERSION: "0.2.
|
|
217968
|
+
currentVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217969
217969
|
});
|
|
217970
217970
|
console.error(`
|
|
217971
217971
|
Error: Windows NPM detected in WSL
|
|
@@ -217984,7 +217984,7 @@ To fix this issue:
|
|
|
217984
217984
|
if (!hasPermissions) {
|
|
217985
217985
|
return "no_permissions";
|
|
217986
217986
|
}
|
|
217987
|
-
const packageSpec = specificVersion ? `${{ VERSION: "0.2.
|
|
217987
|
+
const packageSpec = specificVersion ? `${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}@${specificVersion}` : { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
217988
217988
|
const packageManager = getGlobalInstallPackageManager();
|
|
217989
217989
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
217990
217990
|
if (installResult.code !== 0) {
|
|
@@ -218312,8 +218312,8 @@ async function detectMultipleInstallations() {
|
|
|
218312
218312
|
installations.push({ type: "npm-local", path: localPath });
|
|
218313
218313
|
}
|
|
218314
218314
|
const packagesToCheck = ["@theus-ai/theus-code"];
|
|
218315
|
-
if ({ VERSION: "0.2.
|
|
218316
|
-
packagesToCheck.push({ VERSION: "0.2.
|
|
218315
|
+
if ({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
218316
|
+
packagesToCheck.push({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
218317
218317
|
}
|
|
218318
218318
|
const npmResult = await execFileNoThrow("npm", [
|
|
218319
218319
|
"-g",
|
|
@@ -218496,7 +218496,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
218496
218496
|
}
|
|
218497
218497
|
async function getDoctorDiagnostic() {
|
|
218498
218498
|
const installationType = await getCurrentInstallationType();
|
|
218499
|
-
const version2 = { VERSION: "0.2.
|
|
218499
|
+
const version2 = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
|
|
218500
218500
|
const installationPath = await getInstallationPath();
|
|
218501
218501
|
const invokedBinary = getInvokedBinary();
|
|
218502
218502
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -218508,8 +218508,8 @@ async function getDoctorDiagnostic() {
|
|
|
218508
218508
|
for (const install of npmInstalls) {
|
|
218509
218509
|
if (install.type === "npm-global") {
|
|
218510
218510
|
let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
|
|
218511
|
-
if ({ VERSION: "0.2.
|
|
218512
|
-
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.
|
|
218511
|
+
if ({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
218512
|
+
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
218513
218513
|
}
|
|
218514
218514
|
warnings.push({
|
|
218515
218515
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -218621,7 +218621,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218621
218621
|
const startTime2 = Date.now();
|
|
218622
218622
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
218623
218623
|
"view",
|
|
218624
|
-
`${{ VERSION: "0.2.
|
|
218624
|
+
`${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`,
|
|
218625
218625
|
"version",
|
|
218626
218626
|
"--prefer-online",
|
|
218627
218627
|
"--registry",
|
|
@@ -218645,7 +218645,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218645
218645
|
latency_ms: latencyMs,
|
|
218646
218646
|
source_npm: true
|
|
218647
218647
|
});
|
|
218648
|
-
logForDebugging(`npm view ${{ VERSION: "0.2.
|
|
218648
|
+
logForDebugging(`npm view ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218649
218649
|
const latestVersion = stdout.trim();
|
|
218650
218650
|
return latestVersion;
|
|
218651
218651
|
}
|
|
@@ -218701,7 +218701,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218701
218701
|
const fs3 = getFsImplementation();
|
|
218702
218702
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
218703
218703
|
const platform4 = getPlatform2();
|
|
218704
|
-
const platformPackageName = `${{ VERSION: "0.2.
|
|
218704
|
+
const platformPackageName = `${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
218705
218705
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
218706
218706
|
const {
|
|
218707
218707
|
stdout: integrityOutput,
|
|
@@ -218730,7 +218730,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218730
218730
|
name: "theus-native-installer",
|
|
218731
218731
|
version: "0.0.1",
|
|
218732
218732
|
dependencies: {
|
|
218733
|
-
[{ VERSION: "0.2.
|
|
218733
|
+
[{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218734
218734
|
}
|
|
218735
218735
|
};
|
|
218736
218736
|
const packageLock = {
|
|
@@ -218743,10 +218743,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218743
218743
|
name: "theus-native-installer",
|
|
218744
218744
|
version: "0.0.1",
|
|
218745
218745
|
dependencies: {
|
|
218746
|
-
[{ VERSION: "0.2.
|
|
218746
|
+
[{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218747
218747
|
}
|
|
218748
218748
|
},
|
|
218749
|
-
[`node_modules/${{ VERSION: "0.2.
|
|
218749
|
+
[`node_modules/${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
|
|
218750
218750
|
version: version2,
|
|
218751
218751
|
optionalDependencies: {
|
|
218752
218752
|
[platformPackageName]: version2
|
|
@@ -218768,7 +218768,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218768
218768
|
if (result.code !== 0) {
|
|
218769
218769
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
218770
218770
|
}
|
|
218771
|
-
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.
|
|
218771
|
+
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218772
218772
|
}
|
|
218773
218773
|
function getStallTimeoutMs() {
|
|
218774
218774
|
return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -219431,8 +219431,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
219431
219431
|
const maxVersion = await getMaxVersion();
|
|
219432
219432
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
219433
219433
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
219434
|
-
if (gte({ VERSION: "0.2.
|
|
219435
|
-
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.
|
|
219434
|
+
if (gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
219435
|
+
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
|
|
219436
219436
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
219437
219437
|
latency_ms: Date.now() - startTime2,
|
|
219438
219438
|
max_version: maxVersion,
|
|
@@ -219443,7 +219443,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
219443
219443
|
version2 = maxVersion;
|
|
219444
219444
|
}
|
|
219445
219445
|
}
|
|
219446
|
-
if (!forceReinstall && version2 === { VERSION: "0.2.
|
|
219446
|
+
if (!forceReinstall && version2 === { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
219447
219447
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
219448
219448
|
logEvent("tengu_native_update_complete", {
|
|
219449
219449
|
latency_ms: Date.now() - startTime2,
|
|
@@ -220193,8 +220193,8 @@ async function cleanupNpmInstallations() {
|
|
|
220193
220193
|
} else if (codePackageResult.error) {
|
|
220194
220194
|
errors4.push(codePackageResult.error);
|
|
220195
220195
|
}
|
|
220196
|
-
if ({ VERSION: "0.2.
|
|
220197
|
-
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.
|
|
220196
|
+
if ({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
220197
|
+
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
220198
220198
|
if (macroPackageResult.success) {
|
|
220199
220199
|
removed++;
|
|
220200
220200
|
if (macroPackageResult.warning) {
|
|
@@ -230683,6 +230683,27 @@ var init_ConsoleOAuthFlow = __esm(() => {
|
|
|
230683
230683
|
var NOVEDADES;
|
|
230684
230684
|
var init_data = __esm(() => {
|
|
230685
230685
|
NOVEDADES = [
|
|
230686
|
+
{
|
|
230687
|
+
version: "v0.2.59",
|
|
230688
|
+
fecha: "2026-07-26",
|
|
230689
|
+
titulo: "La recarga ya no te manda a un comando que no existe",
|
|
230690
|
+
puntos: [
|
|
230691
|
+
"El texto de ayuda de \xAB/recarga\xBB te dec\xEDa \xABtheus recarga turbo\xBB, que NO es un comando: en lugar de comprar, tu frase llegaba al modelo como si fuera una pregunta \u2014 gastabas una llamada, no aparec\xEDa ning\xFAn pago y la compra mor\xEDa en silencio. Peor que un error. Ahora imprime la orden real, que adem\xE1s es la misma que usamos para probarlo.",
|
|
230692
|
+
"Enter tampoco puede lanzar un cobro cuando ya agotaste los packs del ciclo: antes la pantalla lo avisaba pero la tecla segu\xEDa disparando la petici\xF3n, y el error que sal\xEDa no dec\xEDa la verdad. Ahora se bloquea antes de tocar la red.",
|
|
230693
|
+
"Y las peticiones llevan tiempo l\xEDmite: si el servidor no responde, ya no te quedas mirando \xABabriendo el pago\xBB sin salida.",
|
|
230694
|
+
"Si los precios que se muestran no vienen del servidor (por ejemplo si no hay conexi\xF3n), se avisa de que son de referencia y que el importe final lo confirma el pago."
|
|
230695
|
+
]
|
|
230696
|
+
},
|
|
230697
|
+
{
|
|
230698
|
+
version: "v0.2.58",
|
|
230699
|
+
fecha: "2026-07-26",
|
|
230700
|
+
titulo: "Si una actualizaci\xF3n del motor se corta, Theus lo repara",
|
|
230701
|
+
puntos: [
|
|
230702
|
+
"El motor de c\xF3digo apartaba su binario anterior antes de escribir el nuevo. Si la escritura se interrump\xEDa \u2014un antivirus bloqueando un ejecutable reci\xE9n creado, el disco lleno, la sesi\xF3n cortada\u2014 te quedabas sin motor y sin forma de reintentar: hab\xEDa que reinstalar a mano.",
|
|
230703
|
+
"Ahora, al actualizar, Theus comprueba que el motor siga ah\xED y, si la actualizaci\xF3n se interrumpi\xF3, restaura la versi\xF3n anterior desde la copia de seguridad y te lo dice. Sigues trabajando y lo reintentas cuando quieras.",
|
|
230704
|
+
"El motor tambi\xE9n se corrigi\xF3 de ra\xEDz (escribe el binario nuevo aparte y solo lo pone en su sitio cuando est\xE1 completo en disco), pero eso viaja en su pr\xF3xima versi\xF3n: esta comprobaci\xF3n protege a quien todav\xEDa no la tenga."
|
|
230705
|
+
]
|
|
230706
|
+
},
|
|
230686
230707
|
{
|
|
230687
230708
|
version: "v0.2.57",
|
|
230688
230709
|
fecha: "2026-07-26",
|
|
@@ -305702,9 +305723,9 @@ function getTheusEnvMetadata() {
|
|
|
305702
305723
|
};
|
|
305703
305724
|
}
|
|
305704
305725
|
function getBuildAgeMinutes() {
|
|
305705
|
-
if (!{ VERSION: "0.2.
|
|
305726
|
+
if (!{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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)
|
|
305706
305727
|
return;
|
|
305707
|
-
const buildTime = new Date({ VERSION: "0.2.
|
|
305728
|
+
const buildTime = new Date({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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();
|
|
305708
305729
|
if (isNaN(buildTime))
|
|
305709
305730
|
return;
|
|
305710
305731
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -322359,7 +322380,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
322359
322380
|
if (process.env.USER_TYPE === "ant") {
|
|
322360
322381
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
322361
322382
|
|
|
322362
|
-
Run /share and post the JSON file to ${{ VERSION: "0.2.
|
|
322383
|
+
Run /share and post the JSON file to ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
|
|
322363
322384
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
322364
322385
|
return createAssistantAPIErrorMessage({
|
|
322365
322386
|
content: baseMessage + rewindInstruction,
|
|
@@ -322395,7 +322416,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.57", BUILD_TIME: "1970-01
|
|
|
322395
322416
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
322396
322417
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
322397
322418
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
322398
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.
|
|
322419
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL} for help getting access.` : `${baseMsg} or reach out in ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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.`;
|
|
322399
322420
|
return createAssistantAPIErrorMessage({
|
|
322400
322421
|
content: msg,
|
|
322401
322422
|
error: "invalid_request"
|
|
@@ -330319,7 +330340,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
330319
330340
|
} catch {}
|
|
330320
330341
|
const data = {
|
|
330321
330342
|
trigger,
|
|
330322
|
-
version: { VERSION: "0.2.
|
|
330343
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
330323
330344
|
platform: process.platform,
|
|
330324
330345
|
transcript,
|
|
330325
330346
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -330524,10 +330545,10 @@ Si el usuario indic\xF3 una duraci\xF3n, p\xE1sala en el par\xE1metro \`duration
|
|
|
330524
330545
|
|
|
330525
330546
|
// commands/issue/index.ts
|
|
330526
330547
|
function getCliVersion() {
|
|
330527
|
-
return { VERSION: "0.2.
|
|
330548
|
+
return { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "desconocida";
|
|
330528
330549
|
}
|
|
330529
330550
|
function getIssuesExplainer() {
|
|
330530
|
-
return { VERSION: "0.2.
|
|
330551
|
+
return { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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 ? { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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 : "report issues to the Theus maintainers";
|
|
330531
330552
|
}
|
|
330532
330553
|
function getActiveModelLabel() {
|
|
330533
330554
|
try {
|
|
@@ -333360,7 +333381,7 @@ function buildPrimarySection() {
|
|
|
333360
333381
|
});
|
|
333361
333382
|
return [{
|
|
333362
333383
|
label: "Version",
|
|
333363
|
-
value: { VERSION: "0.2.
|
|
333384
|
+
value: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
333364
333385
|
}, {
|
|
333365
333386
|
label: "Session name",
|
|
333366
333387
|
value: nameValue
|
|
@@ -337176,7 +337197,7 @@ function Config({
|
|
|
337176
337197
|
}
|
|
337177
337198
|
})
|
|
337178
337199
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime189.jsx(ChannelDowngradeDialog, {
|
|
337179
|
-
currentVersion: { VERSION: "0.2.
|
|
337200
|
+
currentVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
337180
337201
|
onChoice: (choice) => {
|
|
337181
337202
|
setShowSubmenu(null);
|
|
337182
337203
|
setTabsHidden(false);
|
|
@@ -337188,7 +337209,7 @@ function Config({
|
|
|
337188
337209
|
autoUpdatesChannel: "stable"
|
|
337189
337210
|
};
|
|
337190
337211
|
if (choice === "stay") {
|
|
337191
|
-
newSettings.minimumVersion = { VERSION: "0.2.
|
|
337212
|
+
newSettings.minimumVersion = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
337192
337213
|
}
|
|
337193
337214
|
updateSettingsForSource("userSettings", newSettings);
|
|
337194
337215
|
setSettingsData((prev_27) => ({
|
|
@@ -345433,7 +345454,7 @@ function HelpV2(t0) {
|
|
|
345433
345454
|
let t6;
|
|
345434
345455
|
if ($2[31] !== tabs) {
|
|
345435
345456
|
t6 = /* @__PURE__ */ jsx_runtime217.jsx(Tabs, {
|
|
345436
|
-
title: `Theus v${{ VERSION: "0.2.
|
|
345457
|
+
title: `Theus v${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
|
|
345437
345458
|
color: "professionalBlue",
|
|
345438
345459
|
defaultTab: "general",
|
|
345439
345460
|
children: tabs
|
|
@@ -363685,7 +363706,7 @@ function Onboarding({
|
|
|
363685
363706
|
flexDirection: "column",
|
|
363686
363707
|
children: [
|
|
363687
363708
|
/* @__PURE__ */ jsx_runtime250.jsx(TheusBanner, {
|
|
363688
|
-
version: { VERSION: "0.2.
|
|
363709
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
363689
363710
|
}),
|
|
363690
363711
|
/* @__PURE__ */ jsx_runtime250.jsxs(ThemedBox_default, {
|
|
363691
363712
|
flexDirection: "column",
|
|
@@ -363909,6 +363930,13 @@ var init_providers3 = __esm(() => {
|
|
|
363909
363930
|
});
|
|
363910
363931
|
|
|
363911
363932
|
// commands/recarga/api.ts
|
|
363933
|
+
function esTimeout(err2) {
|
|
363934
|
+
const nombre = err2?.name;
|
|
363935
|
+
return nombre === "TimeoutError" || nombre === "AbortError";
|
|
363936
|
+
}
|
|
363937
|
+
function sinCupoDeCiclo(packsRestantes) {
|
|
363938
|
+
return typeof packsRestantes === "number" && Number.isFinite(packsRestantes) && packsRestantes <= 0;
|
|
363939
|
+
}
|
|
363912
363940
|
function safeAccessToken() {
|
|
363913
363941
|
try {
|
|
363914
363942
|
return getTheusAIOAuthTokens()?.accessToken;
|
|
@@ -363952,11 +363980,13 @@ async function fetchRecargaStatus(token) {
|
|
|
363952
363980
|
packs: PACKS_FALLBACK,
|
|
363953
363981
|
saldoCreditos: null,
|
|
363954
363982
|
packsRestantes: null,
|
|
363955
|
-
maxPacks: null
|
|
363983
|
+
maxPacks: null,
|
|
363984
|
+
importesLocales: true
|
|
363956
363985
|
};
|
|
363957
363986
|
try {
|
|
363958
363987
|
const res = await fetch(`${apiBase()}/v1/recarga/status`, {
|
|
363959
|
-
headers: { authorization: `Bearer ${token}`, "theus-version": "2023-06-01" }
|
|
363988
|
+
headers: { authorization: `Bearer ${token}`, "theus-version": "2023-06-01" },
|
|
363989
|
+
signal: AbortSignal.timeout(STATUS_TIMEOUT_MS)
|
|
363960
363990
|
});
|
|
363961
363991
|
if (!res.ok)
|
|
363962
363992
|
return apagado;
|
|
@@ -363975,12 +364005,14 @@ async function fetchRecargaStatus(token) {
|
|
|
363975
364005
|
return null;
|
|
363976
364006
|
return { id, nombre: String(p?.nombre || id), precioUsd, creditos };
|
|
363977
364007
|
}).filter((p) => p !== null);
|
|
364008
|
+
const usaFallback = remotos.length === 0;
|
|
363978
364009
|
return {
|
|
363979
364010
|
disponible: true,
|
|
363980
|
-
packs:
|
|
364011
|
+
packs: usaFallback ? PACKS_FALLBACK : remotos,
|
|
363981
364012
|
saldoCreditos: typeof data.saldo_creditos === "number" ? data.saldo_creditos : null,
|
|
363982
364013
|
packsRestantes: typeof data.packs_restantes === "number" ? data.packs_restantes : null,
|
|
363983
|
-
maxPacks: typeof data.max_packs_per_cycle === "number" ? data.max_packs_per_cycle : null
|
|
364014
|
+
maxPacks: typeof data.max_packs_per_cycle === "number" ? data.max_packs_per_cycle : null,
|
|
364015
|
+
importesLocales: usaFallback
|
|
363984
364016
|
};
|
|
363985
364017
|
} catch {
|
|
363986
364018
|
return apagado;
|
|
@@ -363995,7 +364027,8 @@ async function fetchCheckoutUrl(token, pack) {
|
|
|
363995
364027
|
"content-type": "application/json",
|
|
363996
364028
|
"theus-version": "2023-06-01"
|
|
363997
364029
|
},
|
|
363998
|
-
body: JSON.stringify({ pack })
|
|
364030
|
+
body: JSON.stringify({ pack }),
|
|
364031
|
+
signal: AbortSignal.timeout(CHECKOUT_TIMEOUT_MS)
|
|
363999
364032
|
});
|
|
364000
364033
|
const cuerpo = await res.json().catch(() => null);
|
|
364001
364034
|
if (res.ok) {
|
|
@@ -364041,7 +364074,15 @@ async function fetchCheckoutUrl(token, pack) {
|
|
|
364041
364074
|
reintentable: res.status >= 500,
|
|
364042
364075
|
requiereLogin: false
|
|
364043
364076
|
};
|
|
364044
|
-
} catch {
|
|
364077
|
+
} catch (err2) {
|
|
364078
|
+
if (esTimeout(err2)) {
|
|
364079
|
+
return {
|
|
364080
|
+
ok: false,
|
|
364081
|
+
motivo: "El servidor tard\xF3 demasiado en crear el pago seguro.",
|
|
364082
|
+
reintentable: true,
|
|
364083
|
+
requiereLogin: false
|
|
364084
|
+
};
|
|
364085
|
+
}
|
|
364045
364086
|
return {
|
|
364046
364087
|
ok: false,
|
|
364047
364088
|
motivo: "No pude contactar con el servidor. Comprueba tu conexi\xF3n.",
|
|
@@ -364058,7 +364099,7 @@ function precioPorCredito(pack) {
|
|
|
364058
364099
|
return "\u2014";
|
|
364059
364100
|
return `$${(pack.precioUsd / pack.creditos).toFixed(3)}/cr`;
|
|
364060
364101
|
}
|
|
364061
|
-
var PACKS_FALLBACK, PACK_IDS;
|
|
364102
|
+
var PACKS_FALLBACK, PACK_IDS, AVISO_IMPORTES_LOCALES = "Precios de referencia; el importe final lo confirma el pago.", STATUS_TIMEOUT_MS = 1e4, CHECKOUT_TIMEOUT_MS = 30000;
|
|
364062
364103
|
var init_api4 = __esm(() => {
|
|
364063
364104
|
init_oauth();
|
|
364064
364105
|
init_auth();
|
|
@@ -364085,8 +364126,11 @@ function decideTecla(faseT, tecla2, ctx) {
|
|
|
364085
364126
|
if (tecla2.abajo || tecla2.letra === "j") {
|
|
364086
364127
|
return { tipo: "mover", index: Math.min(Math.max(0, ctx.total - 1), ctx.index + 1) };
|
|
364087
364128
|
}
|
|
364088
|
-
if (tecla2.return)
|
|
364129
|
+
if (tecla2.return) {
|
|
364130
|
+
if (sinCupoDeCiclo(ctx.packsRestantes))
|
|
364131
|
+
return null;
|
|
364089
364132
|
return { tipo: "confirmar" };
|
|
364133
|
+
}
|
|
364090
364134
|
if (esc2)
|
|
364091
364135
|
return { tipo: "salir", mensaje: "Recarga cancelada. No se cobr\xF3 nada." };
|
|
364092
364136
|
return null;
|
|
@@ -364372,6 +364416,7 @@ function RecargaUI({
|
|
|
364372
364416
|
}, {
|
|
364373
364417
|
index,
|
|
364374
364418
|
total: estado?.packs.length ?? 0,
|
|
364419
|
+
packsRestantes: estado?.packsRestantes ?? null,
|
|
364375
364420
|
...pack ? { nombrePack: pack.nombre, creditos: pack.creditos } : {},
|
|
364376
364421
|
...fase.t === "acreditado" ? { saldo: fase.saldoNuevo } : {}
|
|
364377
364422
|
});
|
|
@@ -364490,7 +364535,7 @@ function RecargaUI({
|
|
|
364490
364535
|
if (fase.t === "eligiendo") {
|
|
364491
364536
|
const packs = estado?.packs ?? [];
|
|
364492
364537
|
const sel = packs[index];
|
|
364493
|
-
const sinCupo = estado?.packsRestantes
|
|
364538
|
+
const sinCupo = sinCupoDeCiclo(estado?.packsRestantes);
|
|
364494
364539
|
return /* @__PURE__ */ jsx_runtime253.jsxs(ThemedBox_default, {
|
|
364495
364540
|
flexDirection: "column",
|
|
364496
364541
|
marginTop: 1,
|
|
@@ -364503,6 +364548,13 @@ function RecargaUI({
|
|
|
364503
364548
|
packs,
|
|
364504
364549
|
index
|
|
364505
364550
|
}),
|
|
364551
|
+
estado?.importesLocales === true && /* @__PURE__ */ jsx_runtime253.jsx(ThemedBox_default, {
|
|
364552
|
+
marginTop: 1,
|
|
364553
|
+
children: /* @__PURE__ */ jsx_runtime253.jsx(ThemedText, {
|
|
364554
|
+
color: "warning",
|
|
364555
|
+
children: AVISO_IMPORTES_LOCALES
|
|
364556
|
+
})
|
|
364557
|
+
}),
|
|
364506
364558
|
/* @__PURE__ */ jsx_runtime253.jsx(ThemedBox_default, {
|
|
364507
364559
|
marginTop: 1,
|
|
364508
364560
|
children: /* @__PURE__ */ jsx_runtime253.jsxs(ThemedText, {
|
|
@@ -364784,6 +364836,9 @@ var exports_noninteractive = {};
|
|
|
364784
364836
|
__export(exports_noninteractive, {
|
|
364785
364837
|
call: () => call33
|
|
364786
364838
|
});
|
|
364839
|
+
function ordenRecarga(...partes) {
|
|
364840
|
+
return `theus -p "/recarga${partes.length > 0 ? ` ${partes.join(" ")}` : ""}"`;
|
|
364841
|
+
}
|
|
364787
364842
|
function formatPackLine(pack) {
|
|
364788
364843
|
return ` \u2022 ${pack.nombre} \u2014 $${pack.precioUsd} \u2192 ${formatCreditos(pack.creditos)} cr\xE9ditos`;
|
|
364789
364844
|
}
|
|
@@ -364804,7 +364859,7 @@ var call33 = async (args) => {
|
|
|
364804
364859
|
"",
|
|
364805
364860
|
" theus auth login",
|
|
364806
364861
|
"",
|
|
364807
|
-
|
|
364862
|
+
`Despu\xE9s vuelve a ejecutar: ${ordenRecarga()}`
|
|
364808
364863
|
].join(`
|
|
364809
364864
|
`)
|
|
364810
364865
|
};
|
|
@@ -364815,6 +364870,7 @@ var call33 = async (args) => {
|
|
|
364815
364870
|
}
|
|
364816
364871
|
const packs = estado.packs;
|
|
364817
364872
|
const { packId, confirmar } = parseArgs2(args);
|
|
364873
|
+
const sinCupo = sinCupoDeCiclo(estado.packsRestantes);
|
|
364818
364874
|
if (!packId) {
|
|
364819
364875
|
const lines = [];
|
|
364820
364876
|
lines.push("\uD83D\uDCB3 Recarga de cr\xE9ditos Theus");
|
|
@@ -364830,8 +364886,15 @@ var call33 = async (args) => {
|
|
|
364830
364886
|
lines.push("Packs disponibles:");
|
|
364831
364887
|
for (const pack2 of packs)
|
|
364832
364888
|
lines.push(formatPackLine(pack2));
|
|
364889
|
+
if (estado.importesLocales) {
|
|
364890
|
+
lines.push("");
|
|
364891
|
+
lines.push(AVISO_IMPORTES_LOCALES);
|
|
364892
|
+
}
|
|
364833
364893
|
lines.push("");
|
|
364834
|
-
if (
|
|
364894
|
+
if (sinCupo) {
|
|
364895
|
+
lines.push("Primero se consume la cuota incluida de tu plan; tu saldo de cr\xE9ditos");
|
|
364896
|
+
lines.push("recargado se usa solo despu\xE9s.");
|
|
364897
|
+
} else if (estado.packsRestantes != null) {
|
|
364835
364898
|
lines.push(`Te quedan ${estado.packsRestantes} packs comprables en este ciclo. Primero se consume`);
|
|
364836
364899
|
lines.push("la cuota incluida de tu plan; tu saldo recargado se usa solo despu\xE9s.");
|
|
364837
364900
|
} else {
|
|
@@ -364839,7 +364902,14 @@ var call33 = async (args) => {
|
|
|
364839
364902
|
lines.push("recargado se usa solo despu\xE9s.");
|
|
364840
364903
|
}
|
|
364841
364904
|
lines.push("");
|
|
364842
|
-
|
|
364905
|
+
if (sinCupo) {
|
|
364906
|
+
lines.push("Alcanzaste el m\xE1ximo de packs de este ciclo, as\xED que ahora no puedes comprar");
|
|
364907
|
+
lines.push("otro. El cupo se renueva con tu plan.");
|
|
364908
|
+
} else {
|
|
364909
|
+
lines.push(`Para comprar: ${ordenRecarga("<pack>")}`);
|
|
364910
|
+
lines.push(`Por ejemplo: ${ordenRecarga("turbo")}`);
|
|
364911
|
+
lines.push("(En una sesi\xF3n interactiva de Theus basta con escribir /recarga turbo.)");
|
|
364912
|
+
}
|
|
364843
364913
|
if (!safeIsSubscriber()) {
|
|
364844
364914
|
lines.push("");
|
|
364845
364915
|
lines.push("Nota: no detect\xE9 una sesi\xF3n de suscriptor de theus.pe activa.");
|
|
@@ -364851,15 +364921,26 @@ var call33 = async (args) => {
|
|
|
364851
364921
|
if (!pack) {
|
|
364852
364922
|
return { type: "text", value: `Pack desconocido: ${packId}` };
|
|
364853
364923
|
}
|
|
364924
|
+
if (sinCupo) {
|
|
364925
|
+
return {
|
|
364926
|
+
type: "text",
|
|
364927
|
+
value: [
|
|
364928
|
+
`No puedo comprar ${pack.nombre}: alcanzaste el m\xE1ximo de packs de este ciclo.`,
|
|
364929
|
+
"No se cobr\xF3 nada. El cupo se renueva con tu plan."
|
|
364930
|
+
].join(`
|
|
364931
|
+
`)
|
|
364932
|
+
};
|
|
364933
|
+
}
|
|
364854
364934
|
if (!confirmar) {
|
|
364855
364935
|
return {
|
|
364856
364936
|
type: "text",
|
|
364857
364937
|
value: [
|
|
364858
364938
|
`Pack ${pack.nombre} \u2014 $${pack.precioUsd} \u2192 ${formatCreditos(pack.creditos)} cr\xE9ditos (no expiran).`,
|
|
364939
|
+
...estado.importesLocales ? ["", AVISO_IMPORTES_LOCALES] : [],
|
|
364859
364940
|
"",
|
|
364860
364941
|
"Compra final, sin reembolsos.",
|
|
364861
364942
|
"",
|
|
364862
|
-
`Para abrir el checkout seguro de Stripe:
|
|
364943
|
+
`Para abrir el checkout seguro de Stripe: ${ordenRecarga(packId, "confirmar")}`,
|
|
364863
364944
|
"Nada se cobra ni se abre hasta que confirmes."
|
|
364864
364945
|
].join(`
|
|
364865
364946
|
`)
|
|
@@ -364873,7 +364954,8 @@ var call33 = async (args) => {
|
|
|
364873
364954
|
`No pude generar el pago de ${pack.nombre}. No se cobr\xF3 nada.`,
|
|
364874
364955
|
"",
|
|
364875
364956
|
res.motivo,
|
|
364876
|
-
...res.requiereLogin ? ["", " theus auth login"] : []
|
|
364957
|
+
...res.requiereLogin ? ["", " theus auth login"] : [],
|
|
364958
|
+
...res.reintentable ? ["", `Reintentar: ${ordenRecarga(packId, "confirmar")}`] : []
|
|
364877
364959
|
].join(`
|
|
364878
364960
|
`)
|
|
364879
364961
|
};
|
|
@@ -365044,9 +365126,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
365044
365126
|
return [];
|
|
365045
365127
|
}
|
|
365046
365128
|
}
|
|
365047
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.
|
|
365129
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
365048
365130
|
if (process.env.USER_TYPE === "ant") {
|
|
365049
|
-
const changelog = { VERSION: "0.2.
|
|
365131
|
+
const changelog = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
|
|
365050
365132
|
if (changelog) {
|
|
365051
365133
|
const commits = changelog.trim().split(`
|
|
365052
365134
|
`).filter(Boolean);
|
|
@@ -369248,7 +369330,7 @@ var init_Messages = __esm(() => {
|
|
|
369248
369330
|
let t1;
|
|
369249
369331
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
369250
369332
|
t1 = /* @__PURE__ */ jsx_runtime263.jsx(TheusSessionHeader, {
|
|
369251
|
-
version: { VERSION: "0.2.
|
|
369333
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
369252
369334
|
});
|
|
369253
369335
|
$2[0] = t1;
|
|
369254
369336
|
} else {
|
|
@@ -398072,7 +398154,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
398072
398154
|
smapsRollup,
|
|
398073
398155
|
platform: process.platform,
|
|
398074
398156
|
nodeVersion: process.version,
|
|
398075
|
-
ccVersion: { VERSION: "0.2.
|
|
398157
|
+
ccVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
398076
398158
|
};
|
|
398077
398159
|
}
|
|
398078
398160
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -398891,7 +398973,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
398891
398973
|
var call65 = async () => {
|
|
398892
398974
|
return {
|
|
398893
398975
|
type: "text",
|
|
398894
|
-
value: { VERSION: "0.2.
|
|
398976
|
+
value: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME ? `${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (built ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME})` : { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
398895
398977
|
};
|
|
398896
398978
|
}, version2, version_default;
|
|
398897
398979
|
var init_version = __esm(() => {
|
|
@@ -401492,7 +401574,7 @@ var SECRET_NAME_PATTERN, EXTRA_ENV_ALLOWLIST, REDACTED2 = "\u2039oculto\u203A",
|
|
|
401492
401574
|
const lines = [];
|
|
401493
401575
|
lines.push("## Entorno de ejecuci\xF3n");
|
|
401494
401576
|
lines.push("");
|
|
401495
|
-
const version3 = { VERSION: "0.2.
|
|
401577
|
+
const version3 = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION ? { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION : "desconocida";
|
|
401496
401578
|
lines.push(`- Versi\xF3n de Theus: ${version3}`);
|
|
401497
401579
|
lines.push(`- Directorio de trabajo: ${getCwd()}`);
|
|
401498
401580
|
lines.push(`- \xBFRepositorio git?: ${isGit ? "s\xED" : "no"}`);
|
|
@@ -403874,6 +403956,21 @@ function naupaVersionOf(bin) {
|
|
|
403874
403956
|
return null;
|
|
403875
403957
|
}
|
|
403876
403958
|
}
|
|
403959
|
+
function rescatarNaupaBorrado(binEnUso) {
|
|
403960
|
+
try {
|
|
403961
|
+
if (existsSync18(binEnUso))
|
|
403962
|
+
return;
|
|
403963
|
+
const apartado = `${binEnUso}.old`;
|
|
403964
|
+
if (!existsSync18(apartado))
|
|
403965
|
+
return;
|
|
403966
|
+
cpSync(apartado, binEnUso, { force: true });
|
|
403967
|
+
if (!existsSync18(binEnUso))
|
|
403968
|
+
return;
|
|
403969
|
+
writeToStdout(source_default.yellow("\xD1aupa: la actualizaci\xF3n se interrumpi\xF3 y dej\xF3 el motor sin binario. " + "Restaur\xE9 la versi\xF3n anterior desde la copia de seguridad, as\xED que " + "sigue funcionando. Vuelve a intentar \xABtheus update\xBB m\xE1s tarde.") + `
|
|
403970
|
+
`);
|
|
403971
|
+
logEvent("tengu_naupa_binario_restaurado", { ruta: "old" });
|
|
403972
|
+
} catch {}
|
|
403973
|
+
}
|
|
403877
403974
|
function rescatarNaupaMalUbicado(binEnUso) {
|
|
403878
403975
|
try {
|
|
403879
403976
|
const home = process.env.HOME ?? process.env.USERPROFILE;
|
|
@@ -403944,6 +404041,7 @@ async function updateNaupa() {
|
|
|
403944
404041
|
writeToStdout(source_default.yellow(`Aviso: \xD1aupa update termin\xF3 con c\xF3digo ${code}. ` + "Puedes reintentar a mano: naupa update --ui") + `
|
|
403945
404042
|
`);
|
|
403946
404043
|
}
|
|
404044
|
+
rescatarNaupaBorrado(bin);
|
|
403947
404045
|
rescatarNaupaMalUbicado(bin);
|
|
403948
404046
|
done();
|
|
403949
404047
|
});
|
|
@@ -404003,13 +404101,13 @@ async function updateReleaseBundle() {
|
|
|
404003
404101
|
await gracefulShutdown(1);
|
|
404004
404102
|
return;
|
|
404005
404103
|
}
|
|
404006
|
-
if (gte({ VERSION: "0.2.
|
|
404007
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
404104
|
+
if (gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
404105
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
404008
404106
|
`);
|
|
404009
404107
|
await gracefulShutdown(0);
|
|
404010
404108
|
return;
|
|
404011
404109
|
}
|
|
404012
|
-
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.
|
|
404110
|
+
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
404013
404111
|
`);
|
|
404014
404112
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
404015
404113
|
`);
|
|
@@ -404043,7 +404141,7 @@ async function updateReleaseBundle() {
|
|
|
404043
404141
|
return;
|
|
404044
404142
|
}
|
|
404045
404143
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
404046
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
404144
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} to version ${latest}`) + `
|
|
404047
404145
|
`);
|
|
404048
404146
|
await regenerateCompletionCache();
|
|
404049
404147
|
} finally {
|
|
@@ -404056,7 +404154,7 @@ async function updateReleaseBundle() {
|
|
|
404056
404154
|
async function update() {
|
|
404057
404155
|
logEvent("tengu_update_check", {});
|
|
404058
404156
|
await updateNaupa();
|
|
404059
|
-
writeToStdout(`Current version: ${{ VERSION: "0.2.
|
|
404157
|
+
writeToStdout(`Current version: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
404060
404158
|
`);
|
|
404061
404159
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
404062
404160
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -404135,8 +404233,8 @@ async function update() {
|
|
|
404135
404233
|
writeToStdout(`Theus is managed by Homebrew.
|
|
404136
404234
|
`);
|
|
404137
404235
|
const latest = await getLatestVersion(channel2);
|
|
404138
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
404139
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
404236
|
+
if (latest && !gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
404237
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
404140
404238
|
`);
|
|
404141
404239
|
writeToStdout(`
|
|
404142
404240
|
`);
|
|
@@ -404152,8 +404250,8 @@ async function update() {
|
|
|
404152
404250
|
writeToStdout(`Theus is managed by winget.
|
|
404153
404251
|
`);
|
|
404154
404252
|
const latest = await getLatestVersion(channel2);
|
|
404155
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
404156
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
404253
|
+
if (latest && !gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
404254
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
404157
404255
|
`);
|
|
404158
404256
|
writeToStdout(`
|
|
404159
404257
|
`);
|
|
@@ -404169,8 +404267,8 @@ async function update() {
|
|
|
404169
404267
|
writeToStdout(`Theus is managed by apk.
|
|
404170
404268
|
`);
|
|
404171
404269
|
const latest = await getLatestVersion(channel2);
|
|
404172
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
404173
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
404270
|
+
if (latest && !gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
404271
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
404174
404272
|
`);
|
|
404175
404273
|
writeToStdout(`
|
|
404176
404274
|
`);
|
|
@@ -404235,11 +404333,11 @@ async function update() {
|
|
|
404235
404333
|
`);
|
|
404236
404334
|
await gracefulShutdown(1);
|
|
404237
404335
|
}
|
|
404238
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
404239
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
404336
|
+
if (result.latestVersion === { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
404337
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
404240
404338
|
`);
|
|
404241
404339
|
} else {
|
|
404242
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
404340
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
404243
404341
|
`);
|
|
404244
404342
|
await regenerateCompletionCache();
|
|
404245
404343
|
}
|
|
@@ -404258,9 +404356,9 @@ async function update() {
|
|
|
404258
404356
|
await removeInstalledSymlink();
|
|
404259
404357
|
}
|
|
404260
404358
|
logForDebugging("update: Checking npm registry for latest version");
|
|
404261
|
-
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.
|
|
404359
|
+
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
404262
404360
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
404263
|
-
const npmCommand = `npm view ${{ VERSION: "0.2.
|
|
404361
|
+
const npmCommand = `npm view ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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`;
|
|
404264
404362
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
404265
404363
|
const latestVersion = await getLatestVersion(channel2);
|
|
404266
404364
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -404280,7 +404378,7 @@ async function update() {
|
|
|
404280
404378
|
`);
|
|
404281
404379
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
404282
404380
|
`);
|
|
404283
|
-
if ({ VERSION: "0.2.
|
|
404381
|
+
if ({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL && !{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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")) {
|
|
404284
404382
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
404285
404383
|
`);
|
|
404286
404384
|
}
|
|
@@ -404292,19 +404390,19 @@ async function update() {
|
|
|
404292
404390
|
`);
|
|
404293
404391
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
404294
404392
|
`);
|
|
404295
|
-
const packageName = { VERSION: "0.2.
|
|
404393
|
+
const packageName = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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");
|
|
404296
404394
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
404297
404395
|
`);
|
|
404298
404396
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
404299
404397
|
`);
|
|
404300
404398
|
await gracefulShutdown(1);
|
|
404301
404399
|
}
|
|
404302
|
-
if (gte({ VERSION: "0.2.
|
|
404303
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
404400
|
+
if (gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION, latestVersion)) {
|
|
404401
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
404304
404402
|
`);
|
|
404305
404403
|
await gracefulShutdown(0);
|
|
404306
404404
|
}
|
|
404307
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.
|
|
404405
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
404308
404406
|
`);
|
|
404309
404407
|
writeToStdout(`Installing update...
|
|
404310
404408
|
`);
|
|
@@ -404349,7 +404447,7 @@ async function update() {
|
|
|
404349
404447
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
404350
404448
|
switch (status2) {
|
|
404351
404449
|
case "success":
|
|
404352
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
404450
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
404353
404451
|
`);
|
|
404354
404452
|
await regenerateCompletionCache();
|
|
404355
404453
|
break;
|
|
@@ -404359,7 +404457,7 @@ async function update() {
|
|
|
404359
404457
|
if (useLocalUpdate) {
|
|
404360
404458
|
process.stderr.write(`Try manually updating with:
|
|
404361
404459
|
`);
|
|
404362
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
404460
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
404363
404461
|
`);
|
|
404364
404462
|
} else {
|
|
404365
404463
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -404375,7 +404473,7 @@ async function update() {
|
|
|
404375
404473
|
if (useLocalUpdate) {
|
|
404376
404474
|
process.stderr.write(`Try manually updating with:
|
|
404377
404475
|
`);
|
|
404378
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
404476
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
404379
404477
|
`);
|
|
404380
404478
|
} else {
|
|
404381
404479
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -414215,7 +414313,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
414215
414313
|
init_settings2();
|
|
414216
414314
|
init_slowOperations();
|
|
414217
414315
|
init_uuid();
|
|
414218
|
-
VERSION4 = { VERSION: "0.2.
|
|
414316
|
+
VERSION4 = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
414219
414317
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
414220
414318
|
SKIP_FIRST_PROMPT_PATTERN2 = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
414221
414319
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -415420,7 +415518,7 @@ var init_filesystem = __esm(() => {
|
|
|
415420
415518
|
});
|
|
415421
415519
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
415422
415520
|
const nonce = randomBytes21(16).toString("hex");
|
|
415423
|
-
return join150(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.
|
|
415521
|
+
return join150(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
|
|
415424
415522
|
});
|
|
415425
415523
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
415426
415524
|
});
|
|
@@ -420599,7 +420697,7 @@ function getSimpleDoingTasksSection() {
|
|
|
420599
420697
|
];
|
|
420600
420698
|
const userHelpSubitems = [
|
|
420601
420699
|
`/help: Get help with using Theus`,
|
|
420602
|
-
`To give feedback, users should ${{ VERSION: "0.2.
|
|
420700
|
+
`To give feedback, users should ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
420603
420701
|
];
|
|
420604
420702
|
const items = [
|
|
420605
420703
|
`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.`,
|
|
@@ -421499,7 +421597,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
421499
421597
|
}
|
|
421500
421598
|
function computeFingerprintFromMessages(messages) {
|
|
421501
421599
|
const firstMessageText = extractFirstMessageText(messages);
|
|
421502
|
-
return computeFingerprint(firstMessageText, { VERSION: "0.2.
|
|
421600
|
+
return computeFingerprint(firstMessageText, { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
421503
421601
|
}
|
|
421504
421602
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
421505
421603
|
var init_fingerprint = () => {};
|
|
@@ -424122,7 +424220,7 @@ async function sideQuery(opts) {
|
|
|
424122
424220
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
424123
424221
|
}
|
|
424124
424222
|
const messageText = extractFirstUserMessageText(messages);
|
|
424125
|
-
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.
|
|
424223
|
+
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
424126
424224
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
424127
424225
|
const systemBlocks = [
|
|
424128
424226
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -425425,7 +425523,7 @@ async function handleMemories(state) {
|
|
|
425425
425523
|
async function runProjectContextMcpServer() {
|
|
425426
425524
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
425427
425525
|
const state = new ProjectContextState(projectRoot);
|
|
425428
|
-
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.
|
|
425526
|
+
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION }, { capabilities: { tools: {} } });
|
|
425429
425527
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
425430
425528
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
425431
425529
|
name: t.name,
|
|
@@ -427407,7 +427505,7 @@ function createBridgeLogger(options2) {
|
|
|
427407
427505
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
427408
427506
|
regenerateQr(connectUrl);
|
|
427409
427507
|
if (verbose) {
|
|
427410
|
-
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.
|
|
427508
|
+
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
427411
427509
|
`);
|
|
427412
427510
|
}
|
|
427413
427511
|
if (verbose) {
|
|
@@ -428380,7 +428478,7 @@ function appendToLog(path19, message) {
|
|
|
428380
428478
|
cwd: getFsImplementation().cwd(),
|
|
428381
428479
|
userType: process.env.USER_TYPE,
|
|
428382
428480
|
sessionId: getSessionId(),
|
|
428383
|
-
version: { VERSION: "0.2.
|
|
428481
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
428384
428482
|
};
|
|
428385
428483
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
428386
428484
|
}
|
|
@@ -429650,7 +429748,7 @@ Spawn mode for this project:
|
|
|
429650
429748
|
const api2 = createBridgeApiClient({
|
|
429651
429749
|
baseUrl,
|
|
429652
429750
|
getAccessToken: getBridgeAccessToken2,
|
|
429653
|
-
runnerVersion: { VERSION: "0.2.
|
|
429751
|
+
runnerVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
429654
429752
|
onDebug: logForDebugging,
|
|
429655
429753
|
onAuth401: handleOAuth401Error2,
|
|
429656
429754
|
getTrustedDeviceToken
|
|
@@ -429888,7 +429986,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
429888
429986
|
const api2 = createBridgeApiClient({
|
|
429889
429987
|
baseUrl,
|
|
429890
429988
|
getAccessToken: opts.getAccessToken,
|
|
429891
|
-
runnerVersion: { VERSION: "0.2.
|
|
429989
|
+
runnerVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
429892
429990
|
onDebug: log2,
|
|
429893
429991
|
onAuth401: opts.onAuth401,
|
|
429894
429992
|
getTrustedDeviceToken
|
|
@@ -433954,7 +434052,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
433954
434052
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
433955
434053
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
433956
434054
|
betas: getSdkBetas(),
|
|
433957
|
-
theus_code_version: { VERSION: "0.2.
|
|
434055
|
+
theus_code_version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
433958
434056
|
output_style: outputStyle2,
|
|
433959
434057
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
433960
434058
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -433994,8 +434092,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
433994
434092
|
}
|
|
433995
434093
|
async function checkEnvLessBridgeMinVersion() {
|
|
433996
434094
|
const cfg = await getEnvLessBridgeConfig();
|
|
433997
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
433998
|
-
return `Your version of Theus (${{ VERSION: "0.2.
|
|
434095
|
+
if (cfg.min_version && lt({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
434096
|
+
return `Your version of Theus (${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
|
|
433999
434097
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
434000
434098
|
}
|
|
434001
434099
|
return null;
|
|
@@ -436319,7 +436417,7 @@ async function initBridgeCore(params) {
|
|
|
436319
436417
|
const rawApi = createBridgeApiClient({
|
|
436320
436418
|
baseUrl,
|
|
436321
436419
|
getAccessToken,
|
|
436322
|
-
runnerVersion: { VERSION: "0.2.
|
|
436420
|
+
runnerVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
436323
436421
|
onDebug: logForDebugging,
|
|
436324
436422
|
onAuth401,
|
|
436325
436423
|
getTrustedDeviceToken
|
|
@@ -453062,7 +453160,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
453062
453160
|
function getSemverPart(version3) {
|
|
453063
453161
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
453064
453162
|
}
|
|
453065
|
-
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.
|
|
453163
|
+
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
453066
453164
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react233.useState(() => getSemverPart(initialVersion));
|
|
453067
453165
|
if (!updatedVersion) {
|
|
453068
453166
|
return null;
|
|
@@ -453102,7 +453200,7 @@ function AutoUpdater({
|
|
|
453102
453200
|
return;
|
|
453103
453201
|
}
|
|
453104
453202
|
if (false) {}
|
|
453105
|
-
const currentVersion = { VERSION: "0.2.
|
|
453203
|
+
const currentVersion = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
453106
453204
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
453107
453205
|
let latestVersion = await getLatestVersion(channel2);
|
|
453108
453206
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -453238,7 +453336,7 @@ function AutoUpdater({
|
|
|
453238
453336
|
" ",
|
|
453239
453337
|
/* @__PURE__ */ jsx_runtime409.jsx(ThemedText, {
|
|
453240
453338
|
bold: true,
|
|
453241
|
-
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
453339
|
+
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.PACKAGE_URL}` : `npm i -g ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
453242
453340
|
})
|
|
453243
453341
|
]
|
|
453244
453342
|
})
|
|
@@ -453315,12 +453413,12 @@ function NativeAutoUpdater({
|
|
|
453315
453413
|
logEvent("tengu_native_auto_updater_start", {});
|
|
453316
453414
|
try {
|
|
453317
453415
|
const maxVersion = await getMaxVersion();
|
|
453318
|
-
if (maxVersion && gt({ VERSION: "0.2.
|
|
453416
|
+
if (maxVersion && gt({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
453319
453417
|
const msg = await getMaxVersionMessage();
|
|
453320
453418
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
453321
453419
|
}
|
|
453322
453420
|
const result = await installLatest(channel2);
|
|
453323
|
-
const currentVersion = { VERSION: "0.2.
|
|
453421
|
+
const currentVersion = { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
453324
453422
|
const latencyMs = Date.now() - startTime2;
|
|
453325
453423
|
if (result.lockFailed) {
|
|
453326
453424
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -453457,17 +453555,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
453457
453555
|
const maxVersion = await getMaxVersion();
|
|
453458
453556
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
453459
453557
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
453460
|
-
if (gte({ VERSION: "0.2.
|
|
453461
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.
|
|
453558
|
+
if (gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
453559
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
|
|
453462
453560
|
setUpdateAvailable(false);
|
|
453463
453561
|
return;
|
|
453464
453562
|
}
|
|
453465
453563
|
latest = maxVersion;
|
|
453466
453564
|
}
|
|
453467
|
-
const hasUpdate = latest && !gte({ VERSION: "0.2.
|
|
453565
|
+
const hasUpdate = latest && !gte({ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
|
|
453468
453566
|
setUpdateAvailable(!!hasUpdate);
|
|
453469
453567
|
if (hasUpdate) {
|
|
453470
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.
|
|
453568
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
|
|
453471
453569
|
}
|
|
453472
453570
|
};
|
|
453473
453571
|
$2[0] = t1;
|
|
@@ -453501,7 +453599,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
453501
453599
|
wrap: "truncate",
|
|
453502
453600
|
children: [
|
|
453503
453601
|
"currentVersion: ",
|
|
453504
|
-
{ VERSION: "0.2.
|
|
453602
|
+
{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
453505
453603
|
]
|
|
453506
453604
|
});
|
|
453507
453605
|
$2[3] = verbose;
|
|
@@ -461375,7 +461473,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
461375
461473
|
project_dir: getOriginalCwd(),
|
|
461376
461474
|
added_dirs: addedDirs
|
|
461377
461475
|
},
|
|
461378
|
-
version: { VERSION: "0.2.
|
|
461476
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
461379
461477
|
output_style: {
|
|
461380
461478
|
name: outputStyleName
|
|
461381
461479
|
},
|
|
@@ -485655,7 +485753,7 @@ function completeOnboarding() {
|
|
|
485655
485753
|
saveGlobalConfig((current) => ({
|
|
485656
485754
|
...current,
|
|
485657
485755
|
hasCompletedOnboarding: true,
|
|
485658
|
-
lastOnboardingVersion: { VERSION: "0.2.
|
|
485756
|
+
lastOnboardingVersion: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
485659
485757
|
}));
|
|
485660
485758
|
}
|
|
485661
485759
|
function showDialog(root2, renderer) {
|
|
@@ -496606,7 +496704,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
496606
496704
|
setCwd(cwd3);
|
|
496607
496705
|
const server2 = new Server({
|
|
496608
496706
|
name: "theus/tengu",
|
|
496609
|
-
version: { VERSION: "0.2.
|
|
496707
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
496610
496708
|
}, {
|
|
496611
496709
|
capabilities: {
|
|
496612
496710
|
tools: {}
|
|
@@ -498048,7 +498146,7 @@ async function setupTokenHandler(root2) {
|
|
|
498048
498146
|
gap: 1,
|
|
498049
498147
|
children: [
|
|
498050
498148
|
/* @__PURE__ */ jsx_runtime495.jsx(TheusBanner, {
|
|
498051
|
-
version: { VERSION: "0.2.
|
|
498149
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
498052
498150
|
}),
|
|
498053
498151
|
showAuthWarning && /* @__PURE__ */ jsx_runtime495.jsxs(ThemedBox_default, {
|
|
498054
498152
|
flexDirection: "column",
|
|
@@ -499530,7 +499628,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
499530
499628
|
}
|
|
499531
499629
|
}
|
|
499532
499630
|
logForDiagnosticsNoPII("info", "started", {
|
|
499533
|
-
version: { VERSION: "0.2.
|
|
499631
|
+
version: { VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
499534
499632
|
is_native_binary: isInBundledMode()
|
|
499535
499633
|
});
|
|
499536
499634
|
registerCleanup(async () => {
|
|
@@ -500398,7 +500496,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
500398
500496
|
pendingHookMessages
|
|
500399
500497
|
}, renderAndRun);
|
|
500400
500498
|
}
|
|
500401
|
-
}).version(`${{ VERSION: "0.2.
|
|
500499
|
+
}).version(`${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (Theus)`, "-v, --version", "Muestra el n\xFAmero de versi\xF3n");
|
|
500402
500500
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
500403
500501
|
program2.option("--tmux", "Crea una sesi\xF3n de tmux para el worktree (requiere --worktree). Usa paneles nativos de iTerm2 cuando est\xE1n disponibles; usa --tmux=classic para tmux tradicional.");
|
|
500404
500502
|
if (canUserConfigureAdvisor()) {
|
|
@@ -500950,7 +501048,7 @@ if (false) {}
|
|
|
500950
501048
|
async function main2() {
|
|
500951
501049
|
const args = process.argv.slice(2);
|
|
500952
501050
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
500953
|
-
console.log(`${{ VERSION: "0.2.
|
|
501051
|
+
console.log(`${{ VERSION: "0.2.59", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
|
|
500954
501052
|
return;
|
|
500955
501053
|
}
|
|
500956
501054
|
const {
|