theus-cli 0.2.38 → 0.2.41
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 +437 -255
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -58324,7 +58324,7 @@ async function _executeApiKeyHelper(isNonInteractiveSession) {
|
|
|
58324
58324
|
if (isApiKeyHelperFromProjectOrLocalSettings()) {
|
|
58325
58325
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58326
58326
|
if (!hasTrust && !isNonInteractiveSession) {
|
|
58327
|
-
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58327
|
+
const error40 = new Error(`Security: apiKeyHelper executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
58328
58328
|
logAntError("apiKeyHelper invoked before trust check", error40);
|
|
58329
58329
|
logEvent("tengu_apiKeyHelper_missing_trust11", {});
|
|
58330
58330
|
return null;
|
|
@@ -58368,7 +58368,7 @@ async function runAwsAuthRefresh() {
|
|
|
58368
58368
|
if (isAwsAuthRefreshFromProjectSettings()) {
|
|
58369
58369
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58370
58370
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58371
|
-
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58371
|
+
const error40 = new Error(`Security: awsAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
58372
58372
|
logAntError("awsAuthRefresh invoked before trust check", error40);
|
|
58373
58373
|
logEvent("tengu_awsAuthRefresh_missing_trust", {});
|
|
58374
58374
|
return false;
|
|
@@ -58428,7 +58428,7 @@ async function getAwsCredsFromCredentialExport() {
|
|
|
58428
58428
|
if (isAwsCredentialExportFromProjectSettings()) {
|
|
58429
58429
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58430
58430
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58431
|
-
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58431
|
+
const error40 = new Error(`Security: awsCredentialExport executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
58432
58432
|
logAntError("awsCredentialExport invoked before trust check", error40);
|
|
58433
58433
|
logEvent("tengu_awsCredentialExport_missing_trust", {});
|
|
58434
58434
|
return null;
|
|
@@ -58513,7 +58513,7 @@ async function runGcpAuthRefresh() {
|
|
|
58513
58513
|
if (isGcpAuthRefreshFromProjectSettings()) {
|
|
58514
58514
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
58515
58515
|
if (!hasTrust && !getIsNonInteractiveSession()) {
|
|
58516
|
-
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
58516
|
+
const error40 = new Error(`Security: gcpAuthRefresh executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.FEEDBACK_CHANNEL}.`);
|
|
58517
58517
|
logAntError("gcpAuthRefresh invoked before trust check", error40);
|
|
58518
58518
|
logEvent("tengu_gcpAuthRefresh_missing_trust", {});
|
|
58519
58519
|
return false;
|
|
@@ -59208,7 +59208,7 @@ var init_auth = __esm(() => {
|
|
|
59208
59208
|
|
|
59209
59209
|
// utils/userAgent.ts
|
|
59210
59210
|
function getTheusCodeUserAgent() {
|
|
59211
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59211
|
+
return `theus-code/${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`;
|
|
59212
59212
|
}
|
|
59213
59213
|
|
|
59214
59214
|
// utils/workloadContext.ts
|
|
@@ -59230,7 +59230,7 @@ function getUserAgent() {
|
|
|
59230
59230
|
const clientApp = process.env.THEUS_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}` : "";
|
|
59231
59231
|
const workload = getWorkload();
|
|
59232
59232
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
59233
|
-
return `theus-cli/${{ VERSION: "0.2.
|
|
59233
|
+
return `theus-cli/${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION} (${process.env.USER_TYPE}, ${process.env.THEUS_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
59234
59234
|
}
|
|
59235
59235
|
function getMCPUserAgent() {
|
|
59236
59236
|
const parts = [];
|
|
@@ -59244,7 +59244,7 @@ function getMCPUserAgent() {
|
|
|
59244
59244
|
parts.push(`client-app/${process.env.THEUS_AGENT_SDK_CLIENT_APP}`);
|
|
59245
59245
|
}
|
|
59246
59246
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
59247
|
-
return `theus-code/${{ VERSION: "0.2.
|
|
59247
|
+
return `theus-code/${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}${suffix}`;
|
|
59248
59248
|
}
|
|
59249
59249
|
function getWebFetchUserAgent() {
|
|
59250
59250
|
return `Theus-User (${getTheusCodeUserAgent()}; +https://support.theus.pe/)`;
|
|
@@ -59382,7 +59382,7 @@ var init_user = __esm(() => {
|
|
|
59382
59382
|
deviceId,
|
|
59383
59383
|
sessionId: getSessionId(),
|
|
59384
59384
|
email: getEmail(),
|
|
59385
|
-
appVersion: { VERSION: "0.2.
|
|
59385
|
+
appVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
59386
59386
|
platform: getHostPlatformForAnalytics(),
|
|
59387
59387
|
organizationUuid,
|
|
59388
59388
|
accountUuid,
|
|
@@ -61097,7 +61097,7 @@ var init_metadata = __esm(() => {
|
|
|
61097
61097
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
61098
61098
|
WHITESPACE_REGEX = /\s+/;
|
|
61099
61099
|
getVersionBase = memoize_default(() => {
|
|
61100
|
-
const match = { VERSION: "0.2.
|
|
61100
|
+
const match = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
61101
61101
|
return match ? match[0] : undefined;
|
|
61102
61102
|
});
|
|
61103
61103
|
buildEnvContext = memoize_default(async () => {
|
|
@@ -61137,9 +61137,9 @@ var init_metadata = __esm(() => {
|
|
|
61137
61137
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
61138
61138
|
isTheusCodeAction: isEnvTruthy(process.env.THEUS_CODE_ACTION),
|
|
61139
61139
|
isTheusAiAuth: isTheusAISubscriber(),
|
|
61140
|
-
version: { VERSION: "0.2.
|
|
61140
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
61141
61141
|
versionBase: getVersionBase(),
|
|
61142
|
-
buildTime: { VERSION: "0.2.
|
|
61142
|
+
buildTime: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.BUILD_TIME,
|
|
61143
61143
|
deploymentEnvironment: env3.detectDeploymentEnvironment(),
|
|
61144
61144
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
61145
61145
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
@@ -61805,7 +61805,7 @@ function initialize1PEventLogging() {
|
|
|
61805
61805
|
const platform2 = getPlatform();
|
|
61806
61806
|
const attributes = {
|
|
61807
61807
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
61808
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
61808
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
61809
61809
|
};
|
|
61810
61810
|
if (platform2 === "wsl") {
|
|
61811
61811
|
const wslVersion = getWslVersion();
|
|
@@ -61832,7 +61832,7 @@ function initialize1PEventLogging() {
|
|
|
61832
61832
|
})
|
|
61833
61833
|
]
|
|
61834
61834
|
});
|
|
61835
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
61835
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.theus.theus_code.events", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
61836
61836
|
}
|
|
61837
61837
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
61838
61838
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -63703,7 +63703,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
63703
63703
|
if (!isAttributionHeaderEnabled()) {
|
|
63704
63704
|
return "";
|
|
63705
63705
|
}
|
|
63706
|
-
const version2 = `${{ VERSION: "0.2.
|
|
63706
|
+
const version2 = `${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}.${fingerprint}`;
|
|
63707
63707
|
const entrypoint = process.env.THEUS_CODE_ENTRYPOINT ?? "unknown";
|
|
63708
63708
|
const cch = "";
|
|
63709
63709
|
const workload = getWorkload();
|
|
@@ -107814,7 +107814,7 @@ Complete the user's request by providing accurate, documentation-based guidance.
|
|
|
107814
107814
|
}
|
|
107815
107815
|
function getFeedbackGuideline() {
|
|
107816
107816
|
if (isUsing3PServices()) {
|
|
107817
|
-
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.
|
|
107817
|
+
return `- When you cannot find an answer or the feature doesn't exist, direct the user to ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.ISSUES_EXPLAINER}`;
|
|
107818
107818
|
}
|
|
107819
107819
|
return "- When you cannot find an answer or the feature doesn't exist, direct the user to use /feedback to report a feature request or bug";
|
|
107820
107820
|
}
|
|
@@ -166523,7 +166523,7 @@ function getTelemetryAttributes() {
|
|
|
166523
166523
|
attributes["session.id"] = sessionId;
|
|
166524
166524
|
}
|
|
166525
166525
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
166526
|
-
attributes["app.version"] = { VERSION: "0.2.
|
|
166526
|
+
attributes["app.version"] = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
166527
166527
|
}
|
|
166528
166528
|
const oauthAccount = getOauthAccountInfo();
|
|
166529
166529
|
if (oauthAccount) {
|
|
@@ -169447,7 +169447,13 @@ function formatLimitReachedText(limit, resetMessage, _model) {
|
|
|
169447
169447
|
return `You've hit your ${limit}${resetMessage}`;
|
|
169448
169448
|
}
|
|
169449
169449
|
function isGatewayQuotaExceededBody(body) {
|
|
169450
|
-
|
|
169450
|
+
if (typeof body !== "object" || body === null)
|
|
169451
|
+
return false;
|
|
169452
|
+
const b = body;
|
|
169453
|
+
if (b.quota_exceeded === true)
|
|
169454
|
+
return true;
|
|
169455
|
+
const err2 = b.error;
|
|
169456
|
+
return typeof err2 === "object" && err2 !== null && err2.code === "quota_exceeded";
|
|
169451
169457
|
}
|
|
169452
169458
|
function asNonEmptyString(value) {
|
|
169453
169459
|
if (typeof value === "string" && value.trim().length > 0)
|
|
@@ -169459,6 +169465,18 @@ function asNonEmptyString(value) {
|
|
|
169459
169465
|
function isGatewayQuotaExceededMessage(text) {
|
|
169460
169466
|
return text.startsWith(GATEWAY_QUOTA_EXCEEDED_MESSAGE_PREFIX);
|
|
169461
169467
|
}
|
|
169468
|
+
function creditsFromBody(creditos, tt) {
|
|
169469
|
+
const direct = asNonEmptyString(creditos);
|
|
169470
|
+
if (direct)
|
|
169471
|
+
return direct;
|
|
169472
|
+
const ttStr = asNonEmptyString(tt);
|
|
169473
|
+
if (!ttStr)
|
|
169474
|
+
return;
|
|
169475
|
+
const ttNum = Number(ttStr);
|
|
169476
|
+
if (!Number.isFinite(ttNum))
|
|
169477
|
+
return;
|
|
169478
|
+
return String(Math.round(ttNum / 1000));
|
|
169479
|
+
}
|
|
169462
169480
|
function getGatewayQuotaExceededMessage(body) {
|
|
169463
169481
|
const pausePromise = "Sin sorpresas: al tope, Theus se pausa \u2014 jam\xE1s factura de m\xE1s.";
|
|
169464
169482
|
const genericFallback = `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${THEUS_PRICING_URL} (anual = 2 meses gratis).`;
|
|
@@ -169466,18 +169484,18 @@ function getGatewayQuotaExceededMessage(body) {
|
|
|
169466
169484
|
return genericFallback;
|
|
169467
169485
|
}
|
|
169468
169486
|
const plan = asNonEmptyString(body.plan);
|
|
169469
|
-
const
|
|
169487
|
+
const cuotaCreditos = creditsFromBody(body.creditos_cuota, body.cuota_tt);
|
|
169470
169488
|
const reset3 = asNonEmptyString(body.reset);
|
|
169471
169489
|
const url3 = asNonEmptyString(body.url) ?? THEUS_PRICING_URL;
|
|
169472
|
-
if (!plan || !
|
|
169490
|
+
if (!plan || !cuotaCreditos || !reset3) {
|
|
169473
169491
|
return `Llegaste al l\xEDmite de tu plan. ${pausePromise} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
|
|
169474
169492
|
}
|
|
169475
|
-
const base2 = `Llegaste al l\xEDmite de tu plan ${plan} (${
|
|
169493
|
+
const base2 = `Llegaste al l\xEDmite de tu plan ${plan} (${cuotaCreditos} cr\xE9ditos) \xB7 se renueva ${reset3}. ${pausePromise}`;
|
|
169476
169494
|
const upgradePlan = asNonEmptyString(body.upgrade?.plan);
|
|
169477
|
-
const
|
|
169495
|
+
const upgradeCreditos = creditsFromBody(body.upgrade?.creditos, body.upgrade?.tt);
|
|
169478
169496
|
const upgradePrecio = asNonEmptyString(body.upgrade?.precio);
|
|
169479
|
-
if (upgradePlan &&
|
|
169480
|
-
return `${base2} \xBFNecesitas seguir hoy? ${upgradePlan} incluye ${
|
|
169497
|
+
if (upgradePlan && upgradeCreditos && upgradePrecio) {
|
|
169498
|
+
return `${base2} \xBFNecesitas seguir hoy? ${upgradePlan} incluye ${upgradeCreditos} cr\xE9ditos por ${upgradePrecio} \u2192 ${url3} (anual = 2 meses gratis)`;
|
|
169481
169499
|
}
|
|
169482
169500
|
return `${base2} Revisa tus opciones en ${url3} (anual = 2 meses gratis).`;
|
|
169483
169501
|
}
|
|
@@ -202571,7 +202589,7 @@ function getInstallationEnv() {
|
|
|
202571
202589
|
return;
|
|
202572
202590
|
}
|
|
202573
202591
|
function getTheusCodeVersion() {
|
|
202574
|
-
return { VERSION: "0.2.
|
|
202592
|
+
return { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
202575
202593
|
}
|
|
202576
202594
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
202577
202595
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -204089,7 +204107,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
|
|
|
204089
204107
|
if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
|
|
204090
204108
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
204091
204109
|
if (!hasTrust) {
|
|
204092
|
-
const error40 = new Error(`Security: headersHelper for MCP server '${serverName}' executed before workspace trust is confirmed. If you see this message, post in ${{ VERSION: "0.2.
|
|
204110
|
+
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.41", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
204093
204111
|
logAntError("MCP headersHelper invoked before trust check", error40);
|
|
204094
204112
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
204095
204113
|
return null;
|
|
@@ -205299,7 +205317,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
205299
205317
|
const client2 = new Client({
|
|
205300
205318
|
name: "theus-code",
|
|
205301
205319
|
title: "Theus",
|
|
205302
|
-
version: { VERSION: "0.2.
|
|
205320
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
|
|
205303
205321
|
description: "Theus's agentic coding tool",
|
|
205304
205322
|
websiteUrl: PRODUCT_URL
|
|
205305
205323
|
}, {
|
|
@@ -205653,7 +205671,7 @@ var init_client5 = __esm(() => {
|
|
|
205653
205671
|
const client2 = new Client({
|
|
205654
205672
|
name: "theus-code",
|
|
205655
205673
|
title: "Theus",
|
|
205656
|
-
version: { VERSION: "0.2.
|
|
205674
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
|
|
205657
205675
|
description: "Theus's agentic coding tool",
|
|
205658
205676
|
websiteUrl: PRODUCT_URL
|
|
205659
205677
|
}, {
|
|
@@ -216231,7 +216249,7 @@ async function initializeBetaTracing(resource) {
|
|
|
216231
216249
|
});
|
|
216232
216250
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216233
216251
|
setLoggerProvider(loggerProvider);
|
|
216234
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216252
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216235
216253
|
setEventLogger(eventLogger);
|
|
216236
216254
|
process.on("beforeExit", async () => {
|
|
216237
216255
|
await loggerProvider?.forceFlush();
|
|
@@ -216271,7 +216289,7 @@ async function initializeTelemetry() {
|
|
|
216271
216289
|
const platform4 = getPlatform();
|
|
216272
216290
|
const baseAttributes = {
|
|
216273
216291
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
216274
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
216292
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
216275
216293
|
};
|
|
216276
216294
|
if (platform4 === "wsl") {
|
|
216277
216295
|
const wslVersion = getWslVersion();
|
|
@@ -216316,7 +216334,7 @@ async function initializeTelemetry() {
|
|
|
216316
216334
|
} catch {}
|
|
216317
216335
|
};
|
|
216318
216336
|
registerCleanup(shutdownTelemetry2);
|
|
216319
|
-
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216337
|
+
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216320
216338
|
}
|
|
216321
216339
|
const meterProvider = new MeterProvider({
|
|
216322
216340
|
resource,
|
|
@@ -216336,7 +216354,7 @@ async function initializeTelemetry() {
|
|
|
216336
216354
|
});
|
|
216337
216355
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216338
216356
|
setLoggerProvider(loggerProvider);
|
|
216339
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216357
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216340
216358
|
setEventLogger(eventLogger);
|
|
216341
216359
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
216342
216360
|
process.on("beforeExit", async () => {
|
|
@@ -216398,7 +216416,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
216398
216416
|
}
|
|
216399
216417
|
};
|
|
216400
216418
|
registerCleanup(shutdownTelemetry);
|
|
216401
|
-
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216419
|
+
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216402
216420
|
}
|
|
216403
216421
|
async function flushTelemetry() {
|
|
216404
216422
|
const meterProvider = getMeterProvider();
|
|
@@ -216938,7 +216956,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
|
|
|
216938
216956
|
return "install_failed";
|
|
216939
216957
|
}
|
|
216940
216958
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
216941
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.
|
|
216959
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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 });
|
|
216942
216960
|
if (result.code !== 0) {
|
|
216943
216961
|
const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
|
|
216944
216962
|
logError2(error40);
|
|
@@ -217084,9 +217102,9 @@ async function assertMinVersion() {
|
|
|
217084
217102
|
if (false) {}
|
|
217085
217103
|
try {
|
|
217086
217104
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
217087
|
-
if (versionConfig.minVersion && lt({ VERSION: "0.2.
|
|
217105
|
+
if (versionConfig.minVersion && lt({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
217088
217106
|
console.error(`
|
|
217089
|
-
It looks like your version of Theus (${{ VERSION: "0.2.
|
|
217107
|
+
It looks like your version of Theus (${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
|
|
217090
217108
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
217091
217109
|
|
|
217092
217110
|
To update, please run:
|
|
@@ -217227,7 +217245,7 @@ async function getInstallationPrefix() {
|
|
|
217227
217245
|
return prefixResult.stdout.trim();
|
|
217228
217246
|
}
|
|
217229
217247
|
function getGlobalInstallPackageManager() {
|
|
217230
|
-
if ({ VERSION: "0.2.
|
|
217248
|
+
if ({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217231
217249
|
return "npm";
|
|
217232
217250
|
}
|
|
217233
217251
|
return env3.isRunningWithBun() ? "bun" : "npm";
|
|
@@ -217252,7 +217270,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
217252
217270
|
}
|
|
217253
217271
|
async function getLatestVersion(channel2) {
|
|
217254
217272
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
217255
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.
|
|
217273
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217256
217274
|
if (result.code !== 0) {
|
|
217257
217275
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
217258
217276
|
if (result.stderr) {
|
|
@@ -217268,7 +217286,7 @@ async function getLatestVersion(channel2) {
|
|
|
217268
217286
|
return result.stdout.trim();
|
|
217269
217287
|
}
|
|
217270
217288
|
async function getNpmDistTags() {
|
|
217271
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.
|
|
217289
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217272
217290
|
if (result.code !== 0) {
|
|
217273
217291
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
217274
217292
|
return { latest: null, stable: null };
|
|
@@ -217308,7 +217326,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217308
217326
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
217309
217327
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
217310
217328
|
pid: process.pid,
|
|
217311
|
-
currentVersion: { VERSION: "0.2.
|
|
217329
|
+
currentVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217312
217330
|
});
|
|
217313
217331
|
return "in_progress";
|
|
217314
217332
|
}
|
|
@@ -217317,7 +217335,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217317
217335
|
if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
|
|
217318
217336
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
217319
217337
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
217320
|
-
currentVersion: { VERSION: "0.2.
|
|
217338
|
+
currentVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217321
217339
|
});
|
|
217322
217340
|
console.error(`
|
|
217323
217341
|
Error: Windows NPM detected in WSL
|
|
@@ -217336,7 +217354,7 @@ To fix this issue:
|
|
|
217336
217354
|
if (!hasPermissions) {
|
|
217337
217355
|
return "no_permissions";
|
|
217338
217356
|
}
|
|
217339
|
-
const packageSpec = specificVersion ? `${{ VERSION: "0.2.
|
|
217357
|
+
const packageSpec = specificVersion ? `${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
217340
217358
|
const packageManager = getGlobalInstallPackageManager();
|
|
217341
217359
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
217342
217360
|
if (installResult.code !== 0) {
|
|
@@ -217664,8 +217682,8 @@ async function detectMultipleInstallations() {
|
|
|
217664
217682
|
installations.push({ type: "npm-local", path: localPath });
|
|
217665
217683
|
}
|
|
217666
217684
|
const packagesToCheck = ["@theus-ai/theus-code"];
|
|
217667
|
-
if ({ VERSION: "0.2.
|
|
217668
|
-
packagesToCheck.push({ VERSION: "0.2.
|
|
217685
|
+
if ({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217686
|
+
packagesToCheck.push({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
217669
217687
|
}
|
|
217670
217688
|
const npmResult = await execFileNoThrow("npm", [
|
|
217671
217689
|
"-g",
|
|
@@ -217848,7 +217866,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
217848
217866
|
}
|
|
217849
217867
|
async function getDoctorDiagnostic() {
|
|
217850
217868
|
const installationType = await getCurrentInstallationType();
|
|
217851
|
-
const version2 = { VERSION: "0.2.
|
|
217869
|
+
const version2 = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
|
|
217852
217870
|
const installationPath = await getInstallationPath();
|
|
217853
217871
|
const invokedBinary = getInvokedBinary();
|
|
217854
217872
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -217860,8 +217878,8 @@ async function getDoctorDiagnostic() {
|
|
|
217860
217878
|
for (const install of npmInstalls) {
|
|
217861
217879
|
if (install.type === "npm-global") {
|
|
217862
217880
|
let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
|
|
217863
|
-
if ({ VERSION: "0.2.
|
|
217864
|
-
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.
|
|
217881
|
+
if ({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217882
|
+
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
217865
217883
|
}
|
|
217866
217884
|
warnings.push({
|
|
217867
217885
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -217973,7 +217991,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
217973
217991
|
const startTime2 = Date.now();
|
|
217974
217992
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
217975
217993
|
"view",
|
|
217976
|
-
`${{ VERSION: "0.2.
|
|
217994
|
+
`${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`,
|
|
217977
217995
|
"version",
|
|
217978
217996
|
"--prefer-online",
|
|
217979
217997
|
"--registry",
|
|
@@ -217997,7 +218015,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
217997
218015
|
latency_ms: latencyMs,
|
|
217998
218016
|
source_npm: true
|
|
217999
218017
|
});
|
|
218000
|
-
logForDebugging(`npm view ${{ VERSION: "0.2.
|
|
218018
|
+
logForDebugging(`npm view ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218001
218019
|
const latestVersion = stdout.trim();
|
|
218002
218020
|
return latestVersion;
|
|
218003
218021
|
}
|
|
@@ -218053,7 +218071,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218053
218071
|
const fs3 = getFsImplementation();
|
|
218054
218072
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
218055
218073
|
const platform4 = getPlatform2();
|
|
218056
|
-
const platformPackageName = `${{ VERSION: "0.2.
|
|
218074
|
+
const platformPackageName = `${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
218057
218075
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
218058
218076
|
const {
|
|
218059
218077
|
stdout: integrityOutput,
|
|
@@ -218082,7 +218100,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218082
218100
|
name: "theus-native-installer",
|
|
218083
218101
|
version: "0.0.1",
|
|
218084
218102
|
dependencies: {
|
|
218085
|
-
[{ VERSION: "0.2.
|
|
218103
|
+
[{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218086
218104
|
}
|
|
218087
218105
|
};
|
|
218088
218106
|
const packageLock = {
|
|
@@ -218095,10 +218113,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218095
218113
|
name: "theus-native-installer",
|
|
218096
218114
|
version: "0.0.1",
|
|
218097
218115
|
dependencies: {
|
|
218098
|
-
[{ VERSION: "0.2.
|
|
218116
|
+
[{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.NATIVE_PACKAGE_URL]: version2
|
|
218099
218117
|
}
|
|
218100
218118
|
},
|
|
218101
|
-
[`node_modules/${{ VERSION: "0.2.
|
|
218119
|
+
[`node_modules/${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
|
|
218102
218120
|
version: version2,
|
|
218103
218121
|
optionalDependencies: {
|
|
218104
218122
|
[platformPackageName]: version2
|
|
@@ -218120,7 +218138,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218120
218138
|
if (result.code !== 0) {
|
|
218121
218139
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
218122
218140
|
}
|
|
218123
|
-
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.
|
|
218141
|
+
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218124
218142
|
}
|
|
218125
218143
|
function getStallTimeoutMs() {
|
|
218126
218144
|
return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -218783,8 +218801,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
218783
218801
|
const maxVersion = await getMaxVersion();
|
|
218784
218802
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
218785
218803
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
218786
|
-
if (gte({ VERSION: "0.2.
|
|
218787
|
-
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.
|
|
218804
|
+
if (gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
218805
|
+
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
|
|
218788
218806
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
218789
218807
|
latency_ms: Date.now() - startTime2,
|
|
218790
218808
|
max_version: maxVersion,
|
|
@@ -218795,7 +218813,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
218795
218813
|
version2 = maxVersion;
|
|
218796
218814
|
}
|
|
218797
218815
|
}
|
|
218798
|
-
if (!forceReinstall && version2 === { VERSION: "0.2.
|
|
218816
|
+
if (!forceReinstall && version2 === { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
218799
218817
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
218800
218818
|
logEvent("tengu_native_update_complete", {
|
|
218801
218819
|
latency_ms: Date.now() - startTime2,
|
|
@@ -219545,8 +219563,8 @@ async function cleanupNpmInstallations() {
|
|
|
219545
219563
|
} else if (codePackageResult.error) {
|
|
219546
219564
|
errors4.push(codePackageResult.error);
|
|
219547
219565
|
}
|
|
219548
|
-
if ({ VERSION: "0.2.
|
|
219549
|
-
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.
|
|
219566
|
+
if ({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
219567
|
+
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
219550
219568
|
if (macroPackageResult.success) {
|
|
219551
219569
|
removed++;
|
|
219552
219570
|
if (macroPackageResult.warning) {
|
|
@@ -304823,9 +304841,9 @@ function getTheusEnvMetadata() {
|
|
|
304823
304841
|
};
|
|
304824
304842
|
}
|
|
304825
304843
|
function getBuildAgeMinutes() {
|
|
304826
|
-
if (!{ VERSION: "0.2.
|
|
304844
|
+
if (!{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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)
|
|
304827
304845
|
return;
|
|
304828
|
-
const buildTime = new Date({ VERSION: "0.2.
|
|
304846
|
+
const buildTime = new Date({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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();
|
|
304829
304847
|
if (isNaN(buildTime))
|
|
304830
304848
|
return;
|
|
304831
304849
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -321473,7 +321491,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
321473
321491
|
if (process.env.USER_TYPE === "ant") {
|
|
321474
321492
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
321475
321493
|
|
|
321476
|
-
Run /share and post the JSON file to ${{ VERSION: "0.2.
|
|
321494
|
+
Run /share and post the JSON file to ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
|
|
321477
321495
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
321478
321496
|
return createAssistantAPIErrorMessage({
|
|
321479
321497
|
content: baseMessage + rewindInstruction,
|
|
@@ -321509,7 +321527,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.38", BUILD_TIME: "1970-01
|
|
|
321509
321527
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
321510
321528
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
321511
321529
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
321512
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.
|
|
321530
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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.`;
|
|
321513
321531
|
return createAssistantAPIErrorMessage({
|
|
321514
321532
|
content: msg,
|
|
321515
321533
|
error: "invalid_request"
|
|
@@ -331614,7 +331632,7 @@ function buildPrimarySection() {
|
|
|
331614
331632
|
});
|
|
331615
331633
|
return [{
|
|
331616
331634
|
label: "Version",
|
|
331617
|
-
value: { VERSION: "0.2.
|
|
331635
|
+
value: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
331618
331636
|
}, {
|
|
331619
331637
|
label: "Session name",
|
|
331620
331638
|
value: nameValue
|
|
@@ -335430,7 +335448,7 @@ function Config({
|
|
|
335430
335448
|
}
|
|
335431
335449
|
})
|
|
335432
335450
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime189.jsx(ChannelDowngradeDialog, {
|
|
335433
|
-
currentVersion: { VERSION: "0.2.
|
|
335451
|
+
currentVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
335434
335452
|
onChoice: (choice) => {
|
|
335435
335453
|
setShowSubmenu(null);
|
|
335436
335454
|
setTabsHidden(false);
|
|
@@ -335442,7 +335460,7 @@ function Config({
|
|
|
335442
335460
|
autoUpdatesChannel: "stable"
|
|
335443
335461
|
};
|
|
335444
335462
|
if (choice === "stay") {
|
|
335445
|
-
newSettings.minimumVersion = { VERSION: "0.2.
|
|
335463
|
+
newSettings.minimumVersion = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
335446
335464
|
}
|
|
335447
335465
|
updateSettingsForSource("userSettings", newSettings);
|
|
335448
335466
|
setSettingsData((prev_27) => ({
|
|
@@ -343476,7 +343494,7 @@ function HelpV2(t0) {
|
|
|
343476
343494
|
let t6;
|
|
343477
343495
|
if ($2[31] !== tabs) {
|
|
343478
343496
|
t6 = /* @__PURE__ */ jsx_runtime216.jsx(Tabs, {
|
|
343479
|
-
title: `Theus v${{ VERSION: "0.2.
|
|
343497
|
+
title: `Theus v${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
|
|
343480
343498
|
color: "professionalBlue",
|
|
343481
343499
|
defaultTab: "general",
|
|
343482
343500
|
children: tabs
|
|
@@ -361587,7 +361605,7 @@ function Onboarding({
|
|
|
361587
361605
|
flexDirection: "column",
|
|
361588
361606
|
children: [
|
|
361589
361607
|
/* @__PURE__ */ jsx_runtime249.jsx(TheusBanner, {
|
|
361590
|
-
version: { VERSION: "0.2.
|
|
361608
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
361591
361609
|
}),
|
|
361592
361610
|
/* @__PURE__ */ jsx_runtime249.jsxs(ThemedBox_default, {
|
|
361593
361611
|
flexDirection: "column",
|
|
@@ -361810,6 +361828,162 @@ var init_providers3 = __esm(() => {
|
|
|
361810
361828
|
providers_default = providers;
|
|
361811
361829
|
});
|
|
361812
361830
|
|
|
361831
|
+
// commands/recarga/index.ts
|
|
361832
|
+
function safeAccessToken() {
|
|
361833
|
+
try {
|
|
361834
|
+
return getTheusAIOAuthTokens()?.accessToken;
|
|
361835
|
+
} catch {
|
|
361836
|
+
return;
|
|
361837
|
+
}
|
|
361838
|
+
}
|
|
361839
|
+
function safeIsSubscriber() {
|
|
361840
|
+
try {
|
|
361841
|
+
return isTheusAISubscriber();
|
|
361842
|
+
} catch {
|
|
361843
|
+
return false;
|
|
361844
|
+
}
|
|
361845
|
+
}
|
|
361846
|
+
function apiBase() {
|
|
361847
|
+
return getOauthConfig().BASE_API_URL.replace(/\/+$/, "");
|
|
361848
|
+
}
|
|
361849
|
+
async function fetchRecargaDisponible(token) {
|
|
361850
|
+
try {
|
|
361851
|
+
const res = await fetch(`${apiBase()}/v1/recarga/status`, {
|
|
361852
|
+
headers: { authorization: `Bearer ${token}`, "theus-version": "2023-06-01" }
|
|
361853
|
+
});
|
|
361854
|
+
if (!res.ok)
|
|
361855
|
+
return false;
|
|
361856
|
+
const data = await res.json().catch(() => null);
|
|
361857
|
+
return data?.disponible === true;
|
|
361858
|
+
} catch {
|
|
361859
|
+
return false;
|
|
361860
|
+
}
|
|
361861
|
+
}
|
|
361862
|
+
async function fetchCheckoutUrl(token, pack) {
|
|
361863
|
+
try {
|
|
361864
|
+
const res = await fetch(`${apiBase()}/v1/recarga/checkout`, {
|
|
361865
|
+
method: "POST",
|
|
361866
|
+
headers: {
|
|
361867
|
+
authorization: `Bearer ${token}`,
|
|
361868
|
+
"content-type": "application/json",
|
|
361869
|
+
"theus-version": "2023-06-01"
|
|
361870
|
+
},
|
|
361871
|
+
body: JSON.stringify({ pack })
|
|
361872
|
+
});
|
|
361873
|
+
if (!res.ok)
|
|
361874
|
+
return null;
|
|
361875
|
+
const data = await res.json().catch(() => null);
|
|
361876
|
+
return typeof data?.checkout_url === "string" && data.checkout_url.length > 0 ? data.checkout_url : null;
|
|
361877
|
+
} catch {
|
|
361878
|
+
return null;
|
|
361879
|
+
}
|
|
361880
|
+
}
|
|
361881
|
+
function formatCreditos(n2) {
|
|
361882
|
+
return n2.toLocaleString("es-PE");
|
|
361883
|
+
}
|
|
361884
|
+
function formatPackLine(pack) {
|
|
361885
|
+
return ` \u2022 ${pack.nombre} \u2014 $${pack.precioUsd} \u2192 ${formatCreditos(pack.creditos)} cr\xE9ditos`;
|
|
361886
|
+
}
|
|
361887
|
+
function parseArgs(raw) {
|
|
361888
|
+
const parts = raw.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
361889
|
+
const packId = PACK_IDS.find((id) => parts[0] === id) ?? null;
|
|
361890
|
+
const confirmar = parts.includes("confirmar");
|
|
361891
|
+
return { packId, confirmar };
|
|
361892
|
+
}
|
|
361893
|
+
var PACKS, PACK_IDS, call28 = async (args) => {
|
|
361894
|
+
const token = safeAccessToken();
|
|
361895
|
+
if (!token) {
|
|
361896
|
+
return {
|
|
361897
|
+
type: "text",
|
|
361898
|
+
value: ["A\xFAn no has iniciado sesi\xF3n. Para recargar cr\xE9ditos:", " theus auth login"].join(`
|
|
361899
|
+
`)
|
|
361900
|
+
};
|
|
361901
|
+
}
|
|
361902
|
+
const disponible = await fetchRecargaDisponible(token);
|
|
361903
|
+
if (!disponible) {
|
|
361904
|
+
return { type: "text", value: "La recarga a\xFAn no est\xE1 disponible." };
|
|
361905
|
+
}
|
|
361906
|
+
const { packId, confirmar } = parseArgs(args);
|
|
361907
|
+
if (!packId) {
|
|
361908
|
+
const lines = [];
|
|
361909
|
+
lines.push("\uD83D\uDCB3 Recarga de cr\xE9ditos Theus");
|
|
361910
|
+
lines.push("");
|
|
361911
|
+
lines.push("Los cr\xE9ditos no expiran y no hay cobros sorpresa: la recarga es prepago");
|
|
361912
|
+
lines.push("expl\xEDcito \u2014 t\xFA eliges cu\xE1ndo comprar, nunca se cobra nada autom\xE1ticamente");
|
|
361913
|
+
lines.push("cuando se agota tu cuota del plan.");
|
|
361914
|
+
lines.push("");
|
|
361915
|
+
lines.push("Packs disponibles:");
|
|
361916
|
+
for (const pack2 of PACKS)
|
|
361917
|
+
lines.push(formatPackLine(pack2));
|
|
361918
|
+
lines.push("");
|
|
361919
|
+
lines.push("M\xE1ximo 4 packs por ciclo. Primero se consume la cuota incluida de tu plan;");
|
|
361920
|
+
lines.push("tu saldo de cr\xE9ditos recargado se usa solo despu\xE9s.");
|
|
361921
|
+
lines.push("");
|
|
361922
|
+
lines.push("Para comprar: theus recarga <pack> (por ejemplo: theus recarga turbo)");
|
|
361923
|
+
if (!safeIsSubscriber()) {
|
|
361924
|
+
lines.push("");
|
|
361925
|
+
lines.push("Nota: no detect\xE9 una sesi\xF3n de suscriptor de theus.pe activa.");
|
|
361926
|
+
}
|
|
361927
|
+
return { type: "text", value: lines.join(`
|
|
361928
|
+
`) };
|
|
361929
|
+
}
|
|
361930
|
+
const pack = PACKS.find((p) => p.id === packId);
|
|
361931
|
+
if (!pack) {
|
|
361932
|
+
return { type: "text", value: `Pack desconocido: ${packId}` };
|
|
361933
|
+
}
|
|
361934
|
+
if (!confirmar) {
|
|
361935
|
+
return {
|
|
361936
|
+
type: "text",
|
|
361937
|
+
value: [
|
|
361938
|
+
`Pack ${pack.nombre} \u2014 $${pack.precioUsd} \u2192 ${formatCreditos(pack.creditos)} cr\xE9ditos (no expiran).`,
|
|
361939
|
+
"",
|
|
361940
|
+
"Compra final, sin reembolsos.",
|
|
361941
|
+
"",
|
|
361942
|
+
`Para abrir el checkout seguro de Stripe: theus recarga ${packId} confirmar`,
|
|
361943
|
+
"Nada se cobra ni se abre hasta que confirmes."
|
|
361944
|
+
].join(`
|
|
361945
|
+
`)
|
|
361946
|
+
};
|
|
361947
|
+
}
|
|
361948
|
+
const checkoutUrl = await fetchCheckoutUrl(token, packId);
|
|
361949
|
+
if (!checkoutUrl) {
|
|
361950
|
+
return {
|
|
361951
|
+
type: "text",
|
|
361952
|
+
value: `No pude generar el checkout de Stripe para ${pack.nombre} ahora mismo. Intenta de nuevo en unos minutos.`
|
|
361953
|
+
};
|
|
361954
|
+
}
|
|
361955
|
+
const opened = await openBrowser(checkoutUrl);
|
|
361956
|
+
return {
|
|
361957
|
+
type: "text",
|
|
361958
|
+
value: [
|
|
361959
|
+
"Compra final, sin reembolsos.",
|
|
361960
|
+
opened ? `Navegador abierto en el checkout de Stripe para ${pack.nombre}. Si no se abri\xF3, visita: ${checkoutUrl}` : `No pude abrir el navegador autom\xE1ticamente. Visita el checkout manualmente: ${checkoutUrl}`
|
|
361961
|
+
].join(`
|
|
361962
|
+
`)
|
|
361963
|
+
};
|
|
361964
|
+
}, recarga, recarga_default;
|
|
361965
|
+
var init_recarga = __esm(() => {
|
|
361966
|
+
init_oauth();
|
|
361967
|
+
init_auth();
|
|
361968
|
+
init_browser();
|
|
361969
|
+
PACKS = [
|
|
361970
|
+
{ id: "impulso", nombre: "Impulso", precioUsd: 10, creditos: 390 },
|
|
361971
|
+
{ id: "turbo", nombre: "Turbo", precioUsd: 25, creditos: 1000 },
|
|
361972
|
+
{ id: "nitro", nombre: "Nitro", precioUsd: 60, creditos: 2450 }
|
|
361973
|
+
];
|
|
361974
|
+
PACK_IDS = PACKS.map((p) => p.id);
|
|
361975
|
+
recarga = {
|
|
361976
|
+
type: "local",
|
|
361977
|
+
name: "recarga",
|
|
361978
|
+
description: "Compra packs de cr\xE9ditos prepago (no expiran) para seguir trabajando",
|
|
361979
|
+
argumentHint: "[impulso|turbo|nitro] [confirmar]",
|
|
361980
|
+
isEnabled: () => true,
|
|
361981
|
+
supportsNonInteractive: true,
|
|
361982
|
+
load: () => Promise.resolve({ call: call28 })
|
|
361983
|
+
};
|
|
361984
|
+
recarga_default = recarga;
|
|
361985
|
+
});
|
|
361986
|
+
|
|
361813
361987
|
// utils/releaseNotes.ts
|
|
361814
361988
|
import { mkdir as mkdir40, readFile as readFile46, writeFile as writeFile45 } from "fs/promises";
|
|
361815
361989
|
import { dirname as dirname57, join as join134 } from "path";
|
|
@@ -361932,9 +362106,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
361932
362106
|
return [];
|
|
361933
362107
|
}
|
|
361934
362108
|
}
|
|
361935
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.
|
|
362109
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
361936
362110
|
if (process.env.USER_TYPE === "ant") {
|
|
361937
|
-
const changelog = { VERSION: "0.2.
|
|
362111
|
+
const changelog = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
|
|
361938
362112
|
if (changelog) {
|
|
361939
362113
|
const commits = changelog.trim().split(`
|
|
361940
362114
|
`).filter(Boolean);
|
|
@@ -361973,7 +362147,7 @@ var init_releaseNotes = __esm(() => {
|
|
|
361973
362147
|
// commands/release-notes/release-notes.ts
|
|
361974
362148
|
var exports_release_notes = {};
|
|
361975
362149
|
__export(exports_release_notes, {
|
|
361976
|
-
call: () =>
|
|
362150
|
+
call: () => call29
|
|
361977
362151
|
});
|
|
361978
362152
|
function formatReleaseNotes(notes) {
|
|
361979
362153
|
return notes.map(([version2, notes2]) => {
|
|
@@ -361986,7 +362160,7 @@ ${bulletPoints}`;
|
|
|
361986
362160
|
|
|
361987
362161
|
`);
|
|
361988
362162
|
}
|
|
361989
|
-
async function
|
|
362163
|
+
async function call29() {
|
|
361990
362164
|
let freshNotes = [];
|
|
361991
362165
|
try {
|
|
361992
362166
|
const timeoutPromise = new Promise((_, reject2) => {
|
|
@@ -362514,9 +362688,9 @@ var init_createSession = __esm(() => {
|
|
|
362514
362688
|
// commands/rename/rename.ts
|
|
362515
362689
|
var exports_rename = {};
|
|
362516
362690
|
__export(exports_rename, {
|
|
362517
|
-
call: () =>
|
|
362691
|
+
call: () => call30
|
|
362518
362692
|
});
|
|
362519
|
-
async function
|
|
362693
|
+
async function call30(onDone, context3, args) {
|
|
362520
362694
|
if (isTeammate()) {
|
|
362521
362695
|
onDone("Cannot rename: This session is a swarm teammate. Teammate names are set by the team leader.", { display: "system" });
|
|
362522
362696
|
return null;
|
|
@@ -366136,7 +366310,7 @@ var init_Messages = __esm(() => {
|
|
|
366136
366310
|
let t1;
|
|
366137
366311
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
366138
366312
|
t1 = /* @__PURE__ */ jsx_runtime261.jsx(TheusSessionHeader, {
|
|
366139
|
-
version: { VERSION: "0.2.
|
|
366313
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
366140
366314
|
});
|
|
366141
366315
|
$2[0] = t1;
|
|
366142
366316
|
} else {
|
|
@@ -368919,7 +369093,7 @@ var init_crossProjectResume = __esm(() => {
|
|
|
368919
369093
|
var exports_resume = {};
|
|
368920
369094
|
__export(exports_resume, {
|
|
368921
369095
|
filterResumableSessions: () => filterResumableSessions,
|
|
368922
|
-
call: () =>
|
|
369096
|
+
call: () => call31
|
|
368923
369097
|
});
|
|
368924
369098
|
function resumeHelpMessage(result) {
|
|
368925
369099
|
switch (result.resultType) {
|
|
@@ -369104,7 +369278,7 @@ function ResumeCommand({
|
|
|
369104
369278
|
function filterResumableSessions(logs2, currentSessionId) {
|
|
369105
369279
|
return logs2.filter((l) => !l.isSidechain && getSessionIdFromLog(l) !== currentSessionId);
|
|
369106
369280
|
}
|
|
369107
|
-
var React91, jsx_runtime266,
|
|
369281
|
+
var React91, jsx_runtime266, call31 = async (onDone, context3, args) => {
|
|
369108
369282
|
const onResume = async (sessionId, log, entrypoint) => {
|
|
369109
369283
|
try {
|
|
369110
369284
|
await context3.resume?.(sessionId, log, entrypoint);
|
|
@@ -369567,7 +369741,7 @@ var init_UltrareviewOverageDialog = __esm(() => {
|
|
|
369567
369741
|
// commands/review/ultrareviewCommand.tsx
|
|
369568
369742
|
var exports_ultrareviewCommand = {};
|
|
369569
369743
|
__export(exports_ultrareviewCommand, {
|
|
369570
|
-
call: () =>
|
|
369744
|
+
call: () => call32
|
|
369571
369745
|
});
|
|
369572
369746
|
function contentBlocksToString(blocks) {
|
|
369573
369747
|
return blocks.map((b) => b.type === "text" ? b.text : "").filter(Boolean).join(`
|
|
@@ -369587,7 +369761,7 @@ async function launchAndDone(args, context3, onDone, billingNote, signal) {
|
|
|
369587
369761
|
});
|
|
369588
369762
|
}
|
|
369589
369763
|
}
|
|
369590
|
-
var jsx_runtime268,
|
|
369764
|
+
var jsx_runtime268, call32 = async (onDone, context3, args) => {
|
|
369591
369765
|
const gate = await checkOverageGate();
|
|
369592
369766
|
if (gate.kind === "not-enabled") {
|
|
369593
369767
|
onDone("Ya usaste tus ultrareviews gratuitos. Activa el uso extra en https://theus.pe/settings/billing para continuar.", {
|
|
@@ -373961,7 +374135,7 @@ var require_server = __commonJS((exports) => {
|
|
|
373961
374135
|
// commands/session/session.tsx
|
|
373962
374136
|
var exports_session = {};
|
|
373963
374137
|
__export(exports_session, {
|
|
373964
|
-
call: () =>
|
|
374138
|
+
call: () => call33
|
|
373965
374139
|
});
|
|
373966
374140
|
function SessionInfo(t0) {
|
|
373967
374141
|
const $2 = c3(19);
|
|
@@ -374134,7 +374308,7 @@ function _temp245(e) {
|
|
|
374134
374308
|
function _temp114(s) {
|
|
374135
374309
|
return s.remoteSessionUrl;
|
|
374136
374310
|
}
|
|
374137
|
-
var import_qrcode, import_react158, jsx_runtime269,
|
|
374311
|
+
var import_qrcode, import_react158, jsx_runtime269, call33 = async (onDone) => {
|
|
374138
374312
|
return /* @__PURE__ */ jsx_runtime269.jsx(SessionInfo, {
|
|
374139
374313
|
onDone
|
|
374140
374314
|
});
|
|
@@ -374492,9 +374666,9 @@ var init_SkillsMenu = __esm(() => {
|
|
|
374492
374666
|
// commands/skills/skills.tsx
|
|
374493
374667
|
var exports_skills = {};
|
|
374494
374668
|
__export(exports_skills, {
|
|
374495
|
-
call: () =>
|
|
374669
|
+
call: () => call34
|
|
374496
374670
|
});
|
|
374497
|
-
async function
|
|
374671
|
+
async function call34(onDone, context3) {
|
|
374498
374672
|
return /* @__PURE__ */ jsx_runtime271.jsx(SkillsMenu, {
|
|
374499
374673
|
onExit: onDone,
|
|
374500
374674
|
commands: context3.options.commands
|
|
@@ -374522,9 +374696,9 @@ var init_skills2 = __esm(() => {
|
|
|
374522
374696
|
// commands/status/status.tsx
|
|
374523
374697
|
var exports_status = {};
|
|
374524
374698
|
__export(exports_status, {
|
|
374525
|
-
call: () =>
|
|
374699
|
+
call: () => call35
|
|
374526
374700
|
});
|
|
374527
|
-
async function
|
|
374701
|
+
async function call35(onDone, context3) {
|
|
374528
374702
|
return /* @__PURE__ */ jsx_runtime272.jsx(Settings, {
|
|
374529
374703
|
onClose: onDone,
|
|
374530
374704
|
context: context3,
|
|
@@ -375147,7 +375321,7 @@ ${reasons}`,
|
|
|
375147
375321
|
} : prev);
|
|
375148
375322
|
}
|
|
375149
375323
|
}
|
|
375150
|
-
var ULTRAPLAN_TIMEOUT_MS, CCR_TERMS_URL2 = "https://docs.theus.pe/docs/en/theus-code-on-the-web", _rawPrompt, DEFAULT_INSTRUCTIONS, ULTRAPLAN_INSTRUCTIONS,
|
|
375324
|
+
var ULTRAPLAN_TIMEOUT_MS, CCR_TERMS_URL2 = "https://docs.theus.pe/docs/en/theus-code-on-the-web", _rawPrompt, DEFAULT_INSTRUCTIONS, ULTRAPLAN_INSTRUCTIONS, call36 = async (onDone, context3, args) => {
|
|
375151
375325
|
const blurb = args.trim();
|
|
375152
375326
|
if (!blurb) {
|
|
375153
375327
|
const msg = await launchUltraplan2({
|
|
@@ -375210,7 +375384,7 @@ var init_ultraplan = __esm(() => {
|
|
|
375210
375384
|
argumentHint: "<prompt>",
|
|
375211
375385
|
isEnabled: () => false,
|
|
375212
375386
|
load: () => Promise.resolve({
|
|
375213
|
-
call:
|
|
375387
|
+
call: call36
|
|
375214
375388
|
})
|
|
375215
375389
|
};
|
|
375216
375390
|
});
|
|
@@ -380689,9 +380863,9 @@ var init_BackgroundTasksDialog = __esm(() => {
|
|
|
380689
380863
|
// commands/tasks/tasks.tsx
|
|
380690
380864
|
var exports_tasks = {};
|
|
380691
380865
|
__export(exports_tasks, {
|
|
380692
|
-
call: () =>
|
|
380866
|
+
call: () => call37
|
|
380693
380867
|
});
|
|
380694
|
-
async function
|
|
380868
|
+
async function call37(onDone, context3) {
|
|
380695
380869
|
return /* @__PURE__ */ jsx_runtime284.jsx(BackgroundTasksDialog, {
|
|
380696
380870
|
toolUseContext: context3,
|
|
380697
380871
|
onDone
|
|
@@ -380727,7 +380901,7 @@ function fmtDate(iso) {
|
|
|
380727
380901
|
return "";
|
|
380728
380902
|
}
|
|
380729
380903
|
}
|
|
380730
|
-
var
|
|
380904
|
+
var call38 = async () => {
|
|
380731
380905
|
let sessions;
|
|
380732
380906
|
try {
|
|
380733
380907
|
const { fetchCodeSessionsFromSessionsAPI: fetchCodeSessionsFromSessionsAPI2 } = await Promise.resolve().then(() => (init_api3(), exports_api));
|
|
@@ -380768,7 +380942,7 @@ var init_teleport2 = __esm(() => {
|
|
|
380768
380942
|
isEnabled: () => true,
|
|
380769
380943
|
isHidden: false,
|
|
380770
380944
|
supportsNonInteractive: true,
|
|
380771
|
-
load: () => Promise.resolve({ call:
|
|
380945
|
+
load: () => Promise.resolve({ call: call38 })
|
|
380772
380946
|
};
|
|
380773
380947
|
teleport_default = teleport;
|
|
380774
380948
|
});
|
|
@@ -381031,7 +381205,7 @@ var init_terminalSetup2 = __esm(() => {
|
|
|
381031
381205
|
});
|
|
381032
381206
|
|
|
381033
381207
|
// commands/usage/index.ts
|
|
381034
|
-
function
|
|
381208
|
+
function safeAccessToken2() {
|
|
381035
381209
|
try {
|
|
381036
381210
|
return getTheusAIOAuthTokens()?.accessToken;
|
|
381037
381211
|
} catch {
|
|
@@ -381039,7 +381213,7 @@ function safeAccessToken() {
|
|
|
381039
381213
|
}
|
|
381040
381214
|
}
|
|
381041
381215
|
async function gatewayJson(path19) {
|
|
381042
|
-
const token =
|
|
381216
|
+
const token = safeAccessToken2();
|
|
381043
381217
|
if (!token)
|
|
381044
381218
|
return null;
|
|
381045
381219
|
const base2 = getOauthConfig().BASE_API_URL.replace(/\/+$/, "");
|
|
@@ -381054,7 +381228,10 @@ async function gatewayJson(path19) {
|
|
|
381054
381228
|
return null;
|
|
381055
381229
|
}
|
|
381056
381230
|
}
|
|
381057
|
-
function
|
|
381231
|
+
function creditsFromTT(tt) {
|
|
381232
|
+
return Math.round(tt / 1000);
|
|
381233
|
+
}
|
|
381234
|
+
function fmtCr(n2) {
|
|
381058
381235
|
return Math.round(n2).toLocaleString("es-PE");
|
|
381059
381236
|
}
|
|
381060
381237
|
function bar(pct, width = 24) {
|
|
@@ -381074,8 +381251,8 @@ function fmtDate2(epoch) {
|
|
|
381074
381251
|
return "\u2014";
|
|
381075
381252
|
}
|
|
381076
381253
|
}
|
|
381077
|
-
var
|
|
381078
|
-
if (!
|
|
381254
|
+
var call39 = async () => {
|
|
381255
|
+
if (!safeAccessToken2()) {
|
|
381079
381256
|
return { type: "text", value: `Inicia sesi\xF3n para ver tu consumo:
|
|
381080
381257
|
theus auth login` };
|
|
381081
381258
|
}
|
|
@@ -381090,16 +381267,19 @@ var call38 = async () => {
|
|
|
381090
381267
|
};
|
|
381091
381268
|
}
|
|
381092
381269
|
const plan = overview.plan;
|
|
381093
|
-
const
|
|
381270
|
+
const limitTT = Number(plan.tokens_included || 0);
|
|
381094
381271
|
const usedTT = Number(usage?.tokens_weighted || 0);
|
|
381095
|
-
const pct =
|
|
381096
|
-
const
|
|
381272
|
+
const pct = limitTT > 0 ? Math.min(100, usedTT / limitTT * 100) : 0;
|
|
381273
|
+
const limitCr = typeof plan.creditos_incluidos === "number" ? plan.creditos_incluidos : creditsFromTT(limitTT);
|
|
381274
|
+
const usedCr = typeof plan.creditos_usados === "number" ? plan.creditos_usados : creditsFromTT(usedTT);
|
|
381275
|
+
const remainingCr = typeof plan.creditos_restantes === "number" ? plan.creditos_restantes : Math.max(0, limitCr - usedCr);
|
|
381097
381276
|
const lines = [];
|
|
381098
381277
|
lines.push(`\uD83D\uDCCA Tu consumo \u2014 plan ${plan.name || plan.id || "Theus"}`);
|
|
381099
381278
|
lines.push("");
|
|
381100
381279
|
lines.push(` ${bar(pct)} ${pct.toFixed(0)}%`);
|
|
381101
|
-
lines.push(` ${
|
|
381280
|
+
lines.push(` ${fmtCr(usedCr)} / ${fmtCr(limitCr)} cr\xE9ditos usados \xB7 quedan ${fmtCr(remainingCr)} cr\xE9ditos`);
|
|
381102
381281
|
lines.push(` Renueva el ${fmtDate2(Number(plan.period_end || 0))} (al llegar al tope se pausa, sin cobros sorpresa).`);
|
|
381282
|
+
lines.push(" (1 cr\xE9dito = 1.000 TT \u2014 puedes verificarlo t\xFA mismo)");
|
|
381103
381283
|
const byModel = new Map;
|
|
381104
381284
|
for (const e of usage?.events || []) {
|
|
381105
381285
|
const m = e.model || "desconocido";
|
|
@@ -381111,7 +381291,7 @@ var call38 = async () => {
|
|
|
381111
381291
|
lines.push(" Por modelo este ciclo:");
|
|
381112
381292
|
for (const [model, tt] of rows.slice(0, 12)) {
|
|
381113
381293
|
const share = usedTT > 0 ? tt / usedTT * 100 : 0;
|
|
381114
|
-
lines.push(` \u2022 ${model.padEnd(22).slice(0, 22)} ${
|
|
381294
|
+
lines.push(` \u2022 ${model.padEnd(22).slice(0, 22)} ${fmtCr(creditsFromTT(tt)).padStart(8)} cr (${share.toFixed(0)}%)`);
|
|
381115
381295
|
}
|
|
381116
381296
|
if (rows.length > 12)
|
|
381117
381297
|
lines.push(` \u2026 y ${rows.length - 12} modelos m\xE1s`);
|
|
@@ -381119,7 +381299,7 @@ var call38 = async () => {
|
|
|
381119
381299
|
lines.push(" A\xFAn no has consumido nada este ciclo.");
|
|
381120
381300
|
}
|
|
381121
381301
|
lines.push("");
|
|
381122
|
-
lines.push(" TITAN elige el mejor modelo por tarea; cada modelo consume de tu cuota
|
|
381302
|
+
lines.push(" TITAN elige el mejor modelo por tarea; cada modelo consume de tu cuota");
|
|
381123
381303
|
lines.push(" seg\xFAn su costo. Usa /modelos para ver el cat\xE1logo completo.");
|
|
381124
381304
|
return { type: "text", value: lines.join(`
|
|
381125
381305
|
`) };
|
|
@@ -381130,11 +381310,11 @@ var init_usage2 = __esm(() => {
|
|
|
381130
381310
|
uso = {
|
|
381131
381311
|
type: "local",
|
|
381132
381312
|
name: "uso",
|
|
381133
|
-
description: "Tu consumo de la suscripci\xF3n:
|
|
381313
|
+
description: "Tu consumo de la suscripci\xF3n: cr\xE9ditos del ciclo, por modelo y renovaci\xF3n",
|
|
381134
381314
|
availability: ["theus-ai"],
|
|
381135
381315
|
isEnabled: () => true,
|
|
381136
381316
|
supportsNonInteractive: true,
|
|
381137
|
-
load: () => Promise.resolve({ call:
|
|
381317
|
+
load: () => Promise.resolve({ call: call39 })
|
|
381138
381318
|
};
|
|
381139
381319
|
usage_default = uso;
|
|
381140
381320
|
});
|
|
@@ -381142,7 +381322,7 @@ var init_usage2 = __esm(() => {
|
|
|
381142
381322
|
// commands/theme/theme.tsx
|
|
381143
381323
|
var exports_theme = {};
|
|
381144
381324
|
__export(exports_theme, {
|
|
381145
|
-
call: () =>
|
|
381325
|
+
call: () => call40
|
|
381146
381326
|
});
|
|
381147
381327
|
function ThemePickerCommand(t0) {
|
|
381148
381328
|
const $2 = c3(8);
|
|
@@ -381192,7 +381372,7 @@ function ThemePickerCommand(t0) {
|
|
|
381192
381372
|
}
|
|
381193
381373
|
return t3;
|
|
381194
381374
|
}
|
|
381195
|
-
var jsx_runtime285,
|
|
381375
|
+
var jsx_runtime285, call40 = async (onDone, _context) => {
|
|
381196
381376
|
return /* @__PURE__ */ jsx_runtime285.jsx(ThemePickerCommand, {
|
|
381197
381377
|
onDone
|
|
381198
381378
|
});
|
|
@@ -381221,9 +381401,9 @@ var init_theme3 = __esm(() => {
|
|
|
381221
381401
|
// commands/vim/vim.ts
|
|
381222
381402
|
var exports_vim = {};
|
|
381223
381403
|
__export(exports_vim, {
|
|
381224
|
-
call: () =>
|
|
381404
|
+
call: () => call41
|
|
381225
381405
|
});
|
|
381226
|
-
var
|
|
381406
|
+
var call41 = async () => {
|
|
381227
381407
|
const config3 = getGlobalConfig();
|
|
381228
381408
|
let currentMode = config3.editorMode || "normal";
|
|
381229
381409
|
if (currentMode === "emacs") {
|
|
@@ -381296,7 +381476,7 @@ var init_gate = __esm(() => {
|
|
|
381296
381476
|
var exports_thinkback = {};
|
|
381297
381477
|
__export(exports_thinkback, {
|
|
381298
381478
|
playAnimation: () => playAnimation,
|
|
381299
|
-
call: () =>
|
|
381479
|
+
call: () => call42
|
|
381300
381480
|
});
|
|
381301
381481
|
import { readFile as readFile47 } from "fs/promises";
|
|
381302
381482
|
import { join as join135 } from "path";
|
|
@@ -381833,7 +382013,7 @@ function ThinkbackFlow(t0) {
|
|
|
381833
382013
|
}
|
|
381834
382014
|
return t8;
|
|
381835
382015
|
}
|
|
381836
|
-
async function
|
|
382016
|
+
async function call42(onDone) {
|
|
381837
382017
|
return /* @__PURE__ */ jsx_runtime286.jsx(ThinkbackFlow, {
|
|
381838
382018
|
onDone
|
|
381839
382019
|
});
|
|
@@ -381881,14 +382061,14 @@ var init_thinkback2 = __esm(() => {
|
|
|
381881
382061
|
// commands/thinkback-play/thinkback-play.ts
|
|
381882
382062
|
var exports_thinkback_play = {};
|
|
381883
382063
|
__export(exports_thinkback_play, {
|
|
381884
|
-
call: () =>
|
|
382064
|
+
call: () => call43
|
|
381885
382065
|
});
|
|
381886
382066
|
import { join as join136 } from "path";
|
|
381887
382067
|
function getPluginId2() {
|
|
381888
382068
|
const marketplaceName = process.env.USER_TYPE === "ant" ? INTERNAL_MARKETPLACE_NAME : OFFICIAL_MARKETPLACE_NAME;
|
|
381889
382069
|
return `thinkback@${marketplaceName}`;
|
|
381890
382070
|
}
|
|
381891
|
-
async function
|
|
382071
|
+
async function call43() {
|
|
381892
382072
|
const v2Data = loadInstalledPluginsV2();
|
|
381893
382073
|
const pluginId = getPluginId2();
|
|
381894
382074
|
const installations = v2Data.plugins[pluginId];
|
|
@@ -384383,9 +384563,9 @@ var init_PermissionRuleList = __esm(() => {
|
|
|
384383
384563
|
// commands/permissions/permissions.tsx
|
|
384384
384564
|
var exports_permissions2 = {};
|
|
384385
384565
|
__export(exports_permissions2, {
|
|
384386
|
-
call: () =>
|
|
384566
|
+
call: () => call44
|
|
384387
384567
|
});
|
|
384388
|
-
var jsx_runtime294,
|
|
384568
|
+
var jsx_runtime294, call44 = async (onDone, context3) => {
|
|
384389
384569
|
return /* @__PURE__ */ jsx_runtime294.jsx(PermissionRuleList, {
|
|
384390
384570
|
onExit: onDone,
|
|
384391
384571
|
onRetryDenials: (commands) => {
|
|
@@ -384415,7 +384595,7 @@ var init_permissions4 = __esm(() => {
|
|
|
384415
384595
|
// commands/plan/plan.tsx
|
|
384416
384596
|
var exports_plan = {};
|
|
384417
384597
|
__export(exports_plan, {
|
|
384418
|
-
call: () =>
|
|
384598
|
+
call: () => call45
|
|
384419
384599
|
});
|
|
384420
384600
|
function PlanDisplay(t0) {
|
|
384421
384601
|
const $2 = c3(11);
|
|
@@ -384503,7 +384683,7 @@ function PlanDisplay(t0) {
|
|
|
384503
384683
|
}
|
|
384504
384684
|
return t5;
|
|
384505
384685
|
}
|
|
384506
|
-
async function
|
|
384686
|
+
async function call45(onDone, context3, args) {
|
|
384507
384687
|
const {
|
|
384508
384688
|
getAppState,
|
|
384509
384689
|
setAppState
|
|
@@ -384649,7 +384829,7 @@ var init_FastIcon = __esm(() => {
|
|
|
384649
384829
|
// commands/fast/fast.tsx
|
|
384650
384830
|
var exports_fast = {};
|
|
384651
384831
|
__export(exports_fast, {
|
|
384652
|
-
call: () =>
|
|
384832
|
+
call: () => call46,
|
|
384653
384833
|
FastModePicker: () => FastModePicker
|
|
384654
384834
|
});
|
|
384655
384835
|
function applyFastMode(enable, setAppState) {
|
|
@@ -384964,7 +385144,7 @@ async function handleFastModeShortcut(enable, getAppState, setAppState) {
|
|
|
384964
385144
|
return `Fast mode OFF`;
|
|
384965
385145
|
}
|
|
384966
385146
|
}
|
|
384967
|
-
async function
|
|
385147
|
+
async function call46(onDone, context3, args) {
|
|
384968
385148
|
if (!isFastModeEnabled()) {
|
|
384969
385149
|
return null;
|
|
384970
385150
|
}
|
|
@@ -385452,9 +385632,9 @@ var init_Passes = __esm(() => {
|
|
|
385452
385632
|
// commands/passes/passes.tsx
|
|
385453
385633
|
var exports_passes = {};
|
|
385454
385634
|
__export(exports_passes, {
|
|
385455
|
-
call: () =>
|
|
385635
|
+
call: () => call47
|
|
385456
385636
|
});
|
|
385457
|
-
async function
|
|
385637
|
+
async function call47(onDone) {
|
|
385458
385638
|
const config3 = getGlobalConfig();
|
|
385459
385639
|
const isFirstVisit = !config3.hasVisitedPasses;
|
|
385460
385640
|
if (isFirstVisit) {
|
|
@@ -386226,9 +386406,9 @@ var init_Grove = __esm(() => {
|
|
|
386226
386406
|
// commands/privacy-settings/privacy-settings.tsx
|
|
386227
386407
|
var exports_privacy_settings = {};
|
|
386228
386408
|
__export(exports_privacy_settings, {
|
|
386229
|
-
call: () =>
|
|
386409
|
+
call: () => call48
|
|
386230
386410
|
});
|
|
386231
|
-
async function
|
|
386411
|
+
async function call48(onDone) {
|
|
386232
386412
|
const qualified = await isQualifiedForGrove();
|
|
386233
386413
|
if (!qualified) {
|
|
386234
386414
|
onDone(FALLBACK_MESSAGE);
|
|
@@ -388074,9 +388254,9 @@ var init_HooksConfigMenu = __esm(() => {
|
|
|
388074
388254
|
// commands/hooks/hooks.tsx
|
|
388075
388255
|
var exports_hooks = {};
|
|
388076
388256
|
__export(exports_hooks, {
|
|
388077
|
-
call: () =>
|
|
388257
|
+
call: () => call49
|
|
388078
388258
|
});
|
|
388079
|
-
var jsx_runtime307,
|
|
388259
|
+
var jsx_runtime307, call49 = async (onDone, context3) => {
|
|
388080
388260
|
logEvent("tengu_hooks_command", {});
|
|
388081
388261
|
const appState = context3.getAppState();
|
|
388082
388262
|
const permissionContext = appState.toolPermissionContext;
|
|
@@ -388109,10 +388289,10 @@ var init_hooks3 = __esm(() => {
|
|
|
388109
388289
|
// commands/files/files.ts
|
|
388110
388290
|
var exports_files = {};
|
|
388111
388291
|
__export(exports_files, {
|
|
388112
|
-
call: () =>
|
|
388292
|
+
call: () => call50
|
|
388113
388293
|
});
|
|
388114
388294
|
import { relative as relative29 } from "path";
|
|
388115
|
-
async function
|
|
388295
|
+
async function call50(_args, context3) {
|
|
388116
388296
|
const files = context3.readFileState ? cacheKeys(context3.readFileState) : [];
|
|
388117
388297
|
if (files.length === 0) {
|
|
388118
388298
|
return { type: "text", value: "No files in context" };
|
|
@@ -388145,7 +388325,7 @@ var init_files3 = __esm(() => {
|
|
|
388145
388325
|
var exports_branch = {};
|
|
388146
388326
|
__export(exports_branch, {
|
|
388147
388327
|
deriveFirstPrompt: () => deriveFirstPrompt,
|
|
388148
|
-
call: () =>
|
|
388328
|
+
call: () => call51
|
|
388149
388329
|
});
|
|
388150
388330
|
import { randomUUID as randomUUID29 } from "crypto";
|
|
388151
388331
|
import { mkdir as mkdir41, readFile as readFile48, writeFile as writeFile46 } from "fs/promises";
|
|
@@ -388251,7 +388431,7 @@ async function getUniqueForkName(baseName) {
|
|
|
388251
388431
|
}
|
|
388252
388432
|
return `${baseName} (Branch ${nextNumber})`;
|
|
388253
388433
|
}
|
|
388254
|
-
async function
|
|
388434
|
+
async function call51(onDone, context3, args) {
|
|
388255
388435
|
const customTitle = args?.trim() || undefined;
|
|
388256
388436
|
const originalSessionId = getSessionId();
|
|
388257
388437
|
try {
|
|
@@ -394235,9 +394415,9 @@ var init_AgentsMenu = __esm(() => {
|
|
|
394235
394415
|
// commands/agents/agents.tsx
|
|
394236
394416
|
var exports_agents = {};
|
|
394237
394417
|
__export(exports_agents, {
|
|
394238
|
-
call: () =>
|
|
394418
|
+
call: () => call52
|
|
394239
394419
|
});
|
|
394240
|
-
async function
|
|
394420
|
+
async function call52(onDone, context3) {
|
|
394241
394421
|
const appState = context3.getAppState();
|
|
394242
394422
|
const permissionContext = appState.toolPermissionContext;
|
|
394243
394423
|
const tools = getTools(permissionContext);
|
|
@@ -394268,9 +394448,9 @@ var init_agents2 = __esm(() => {
|
|
|
394268
394448
|
// commands/plugin/plugin.tsx
|
|
394269
394449
|
var exports_plugin = {};
|
|
394270
394450
|
__export(exports_plugin, {
|
|
394271
|
-
call: () =>
|
|
394451
|
+
call: () => call53
|
|
394272
394452
|
});
|
|
394273
|
-
async function
|
|
394453
|
+
async function call53(onDone, _context, args) {
|
|
394274
394454
|
return /* @__PURE__ */ jsx_runtime333.jsx(PluginSettings, {
|
|
394275
394455
|
onComplete: onDone,
|
|
394276
394456
|
args
|
|
@@ -394437,12 +394617,12 @@ var init_refresh = __esm(() => {
|
|
|
394437
394617
|
// commands/reload-plugins/reload-plugins.ts
|
|
394438
394618
|
var exports_reload_plugins = {};
|
|
394439
394619
|
__export(exports_reload_plugins, {
|
|
394440
|
-
call: () =>
|
|
394620
|
+
call: () => call54
|
|
394441
394621
|
});
|
|
394442
394622
|
function n2(count4, noun) {
|
|
394443
394623
|
return `${count4} ${plural(count4, noun)}`;
|
|
394444
394624
|
}
|
|
394445
|
-
var
|
|
394625
|
+
var call54 = async (_args, context3) => {
|
|
394446
394626
|
if (false) {}
|
|
394447
394627
|
const r = await refreshActivePlugins(context3.setAppState);
|
|
394448
394628
|
const parts = [
|
|
@@ -394485,9 +394665,9 @@ var init_reload_plugins2 = __esm(() => {
|
|
|
394485
394665
|
// commands/rewind/rewind.ts
|
|
394486
394666
|
var exports_rewind = {};
|
|
394487
394667
|
__export(exports_rewind, {
|
|
394488
|
-
call: () =>
|
|
394668
|
+
call: () => call55
|
|
394489
394669
|
});
|
|
394490
|
-
async function
|
|
394670
|
+
async function call55(_args, context3) {
|
|
394491
394671
|
if (context3.openMessageSelector) {
|
|
394492
394672
|
context3.openMessageSelector();
|
|
394493
394673
|
}
|
|
@@ -394602,7 +394782,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
394602
394782
|
smapsRollup,
|
|
394603
394783
|
platform: process.platform,
|
|
394604
394784
|
nodeVersion: process.version,
|
|
394605
|
-
ccVersion: { VERSION: "0.2.
|
|
394785
|
+
ccVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
394606
394786
|
};
|
|
394607
394787
|
}
|
|
394608
394788
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -394673,9 +394853,9 @@ var init_heapDumpService = __esm(() => {
|
|
|
394673
394853
|
// commands/heapdump/heapdump.ts
|
|
394674
394854
|
var exports_heapdump = {};
|
|
394675
394855
|
__export(exports_heapdump, {
|
|
394676
|
-
call: () =>
|
|
394856
|
+
call: () => call56
|
|
394677
394857
|
});
|
|
394678
|
-
async function
|
|
394858
|
+
async function call56() {
|
|
394679
394859
|
const result = await performHeapDump();
|
|
394680
394860
|
if (!result.success) {
|
|
394681
394861
|
return {
|
|
@@ -395046,7 +395226,7 @@ var USAGE = `/bridge-kick <subcommand>
|
|
|
395046
395226
|
reconnect-session fail next POST /bridge/reconnect fails
|
|
395047
395227
|
heartbeat <status> next heartbeat throws BridgeFatalError(status)
|
|
395048
395228
|
reconnect call reconnectEnvironmentWithSession directly
|
|
395049
|
-
status print bridge state`,
|
|
395229
|
+
status print bridge state`, call57 = async (args) => {
|
|
395050
395230
|
const h2 = getBridgeDebugHandle();
|
|
395051
395231
|
if (!h2) {
|
|
395052
395232
|
return {
|
|
@@ -395179,16 +395359,16 @@ var init_bridge_kick = __esm(() => {
|
|
|
395179
395359
|
description: "Inyecta estados de fallo del bridge para pruebas manuales de recuperaci\xF3n",
|
|
395180
395360
|
isEnabled: () => process.env.USER_TYPE === "ant",
|
|
395181
395361
|
supportsNonInteractive: false,
|
|
395182
|
-
load: () => Promise.resolve({ call:
|
|
395362
|
+
load: () => Promise.resolve({ call: call57 })
|
|
395183
395363
|
};
|
|
395184
395364
|
bridge_kick_default = bridgeKick;
|
|
395185
395365
|
});
|
|
395186
395366
|
|
|
395187
395367
|
// commands/version.ts
|
|
395188
|
-
var
|
|
395368
|
+
var call58 = async () => {
|
|
395189
395369
|
return {
|
|
395190
395370
|
type: "text",
|
|
395191
|
-
value: { VERSION: "0.2.
|
|
395371
|
+
value: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
395192
395372
|
};
|
|
395193
395373
|
}, version2, version_default;
|
|
395194
395374
|
var init_version = __esm(() => {
|
|
@@ -395198,7 +395378,7 @@ var init_version = __esm(() => {
|
|
|
395198
395378
|
description: "Muestra la versi\xF3n que ejecuta esta sesi\xF3n (no la que descarg\xF3 el autoupdate)",
|
|
395199
395379
|
isEnabled: () => true,
|
|
395200
395380
|
supportsNonInteractive: true,
|
|
395201
|
-
load: () => Promise.resolve({ call:
|
|
395381
|
+
load: () => Promise.resolve({ call: call58 })
|
|
395202
395382
|
};
|
|
395203
395383
|
version_default = version2;
|
|
395204
395384
|
});
|
|
@@ -395495,7 +395675,7 @@ function TelegramOnboarding({
|
|
|
395495
395675
|
]
|
|
395496
395676
|
});
|
|
395497
395677
|
}
|
|
395498
|
-
var import_qrcode2, import_react185, jsx_runtime334,
|
|
395678
|
+
var import_qrcode2, import_react185, jsx_runtime334, call59 = async (onDone) => {
|
|
395499
395679
|
return /* @__PURE__ */ jsx_runtime334.jsx(TelegramOnboarding, {
|
|
395500
395680
|
onDone
|
|
395501
395681
|
});
|
|
@@ -395513,20 +395693,20 @@ var init_telegram = __esm(() => {
|
|
|
395513
395693
|
name: "telegram",
|
|
395514
395694
|
description: "Vincula tu Telegram con Theus y configura el control remoto del agente",
|
|
395515
395695
|
isEnabled: () => true,
|
|
395516
|
-
load: () => Promise.resolve({ call:
|
|
395696
|
+
load: () => Promise.resolve({ call: call59 })
|
|
395517
395697
|
};
|
|
395518
395698
|
telegram_default = telegram;
|
|
395519
395699
|
});
|
|
395520
395700
|
|
|
395521
395701
|
// commands/modelos/index.ts
|
|
395522
|
-
function
|
|
395702
|
+
function safeAccessToken3() {
|
|
395523
395703
|
try {
|
|
395524
395704
|
return getTheusAIOAuthTokens()?.accessToken;
|
|
395525
395705
|
} catch {
|
|
395526
395706
|
return;
|
|
395527
395707
|
}
|
|
395528
395708
|
}
|
|
395529
|
-
function
|
|
395709
|
+
function safeIsSubscriber2() {
|
|
395530
395710
|
try {
|
|
395531
395711
|
return isTheusAISubscriber();
|
|
395532
395712
|
} catch {
|
|
@@ -395534,7 +395714,7 @@ function safeIsSubscriber() {
|
|
|
395534
395714
|
}
|
|
395535
395715
|
}
|
|
395536
395716
|
async function fetchModels() {
|
|
395537
|
-
const token =
|
|
395717
|
+
const token = safeAccessToken3();
|
|
395538
395718
|
if (!token)
|
|
395539
395719
|
return null;
|
|
395540
395720
|
const base2 = getOauthConfig().BASE_API_URL.replace(/\/+$/, "");
|
|
@@ -395550,7 +395730,7 @@ async function fetchModels() {
|
|
|
395550
395730
|
return null;
|
|
395551
395731
|
}
|
|
395552
395732
|
}
|
|
395553
|
-
var
|
|
395733
|
+
var call60 = async () => {
|
|
395554
395734
|
const lines = [];
|
|
395555
395735
|
lines.push("\uD83E\uDDE0 Tus modelos en Theus");
|
|
395556
395736
|
lines.push("");
|
|
@@ -395559,13 +395739,13 @@ var call59 = async () => {
|
|
|
395559
395739
|
lines.push("mejor modelo por debajo, y responde con una sola voz. Es lo que hace el CLI");
|
|
395560
395740
|
lines.push('por defecto (modelo "theus-router-auto").');
|
|
395561
395741
|
lines.push("");
|
|
395562
|
-
if (!
|
|
395742
|
+
if (!safeAccessToken3()) {
|
|
395563
395743
|
lines.push("A\xFAn no has iniciado sesi\xF3n. Para usar tus modelos:");
|
|
395564
395744
|
lines.push(" theus auth login");
|
|
395565
395745
|
return { type: "text", value: lines.join(`
|
|
395566
395746
|
`) };
|
|
395567
395747
|
}
|
|
395568
|
-
const usingGateway =
|
|
395748
|
+
const usingGateway = safeIsSubscriber2();
|
|
395569
395749
|
const base2 = getOauthConfig().BASE_API_URL.replace(/\/+$/, "");
|
|
395570
395750
|
const models = await fetchModels();
|
|
395571
395751
|
if (models && models.length) {
|
|
@@ -395600,7 +395780,7 @@ var init_modelos = __esm(() => {
|
|
|
395600
395780
|
description: "Explica c\xF3mo Theus te da acceso a los mejores modelos v\xEDa TITAN y lista el cat\xE1logo",
|
|
395601
395781
|
isEnabled: () => true,
|
|
395602
395782
|
supportsNonInteractive: true,
|
|
395603
|
-
load: () => Promise.resolve({ call:
|
|
395783
|
+
load: () => Promise.resolve({ call: call60 })
|
|
395604
395784
|
};
|
|
395605
395785
|
modelos_default = modelos;
|
|
395606
395786
|
});
|
|
@@ -395768,7 +395948,7 @@ function IntelligenceBar({ onDone }) {
|
|
|
395768
395948
|
]
|
|
395769
395949
|
});
|
|
395770
395950
|
}
|
|
395771
|
-
var import_react186, jsx_runtime335, REDUCE_MOTION2, FRAME_MS2 = 90, BAR_W = 34, LEVELS, NEON2 = "#39ff14", NEON_DIM = "#1f7a10", PULSE = "#d6ffc2", MAX_CYCLE,
|
|
395951
|
+
var import_react186, jsx_runtime335, REDUCE_MOTION2, FRAME_MS2 = 90, BAR_W = 34, LEVELS, NEON2 = "#39ff14", NEON_DIM = "#1f7a10", PULSE = "#d6ffc2", MAX_CYCLE, call61 = async (onDone) => {
|
|
395772
395952
|
return /* @__PURE__ */ jsx_runtime335.jsx(IntelligenceBar, {
|
|
395773
395953
|
onDone
|
|
395774
395954
|
});
|
|
@@ -395795,7 +395975,7 @@ var init_inteligencia = __esm(() => {
|
|
|
395795
395975
|
name: "inteligencia",
|
|
395796
395976
|
description: "Define el nivel de inteligencia/esfuerzo del modelo con una barra animada",
|
|
395797
395977
|
isEnabled: () => true,
|
|
395798
|
-
load: () => Promise.resolve({ call:
|
|
395978
|
+
load: () => Promise.resolve({ call: call61 })
|
|
395799
395979
|
};
|
|
395800
395980
|
inteligencia_default = inteligencia;
|
|
395801
395981
|
});
|
|
@@ -396949,10 +397129,10 @@ var init_SandboxSettings = __esm(() => {
|
|
|
396949
397129
|
// commands/sandbox-toggle/sandbox-toggle.tsx
|
|
396950
397130
|
var exports_sandbox_toggle = {};
|
|
396951
397131
|
__export(exports_sandbox_toggle, {
|
|
396952
|
-
call: () =>
|
|
397132
|
+
call: () => call62
|
|
396953
397133
|
});
|
|
396954
397134
|
import { relative as relative30 } from "path";
|
|
396955
|
-
async function
|
|
397135
|
+
async function call62(onDone, _context, args) {
|
|
396956
397136
|
const settings = getSettings_DEPRECATED();
|
|
396957
397137
|
const themeName = settings.theme || "light";
|
|
396958
397138
|
const platform6 = getPlatform();
|
|
@@ -397057,7 +397237,7 @@ var init_sandbox_toggle2 = __esm(() => {
|
|
|
397057
397237
|
});
|
|
397058
397238
|
|
|
397059
397239
|
// commands/advisor.ts
|
|
397060
|
-
var
|
|
397240
|
+
var call63 = async (args, context3) => {
|
|
397061
397241
|
const arg = args.trim().toLowerCase();
|
|
397062
397242
|
const baseModel = parseUserSpecifiedModel(context3.getAppState().mainLoopModel ?? getDefaultMainLoopModelSetting());
|
|
397063
397243
|
if (!arg) {
|
|
@@ -397143,7 +397323,7 @@ var init_advisor2 = __esm(() => {
|
|
|
397143
397323
|
return !canUserConfigureAdvisor();
|
|
397144
397324
|
},
|
|
397145
397325
|
supportsNonInteractive: true,
|
|
397146
|
-
load: () => Promise.resolve({ call:
|
|
397326
|
+
load: () => Promise.resolve({ call: call63 })
|
|
397147
397327
|
};
|
|
397148
397328
|
advisor_default = advisor;
|
|
397149
397329
|
});
|
|
@@ -397557,12 +397737,12 @@ var init_ExitFlow = __esm(() => {
|
|
|
397557
397737
|
// commands/exit/exit.tsx
|
|
397558
397738
|
var exports_exit = {};
|
|
397559
397739
|
__export(exports_exit, {
|
|
397560
|
-
call: () =>
|
|
397740
|
+
call: () => call64
|
|
397561
397741
|
});
|
|
397562
397742
|
function getRandomGoodbyeMessage2() {
|
|
397563
397743
|
return sample_default(GOODBYE_MESSAGES2) ?? "Goodbye!";
|
|
397564
397744
|
}
|
|
397565
|
-
async function
|
|
397745
|
+
async function call64(onDone) {
|
|
397566
397746
|
if (false) {}
|
|
397567
397747
|
const showWorktree = getCurrentWorktreeSession() !== null;
|
|
397568
397748
|
if (showWorktree) {
|
|
@@ -397856,7 +398036,7 @@ var exports_export = {};
|
|
|
397856
398036
|
__export(exports_export, {
|
|
397857
398037
|
sanitizeFilename: () => sanitizeFilename,
|
|
397858
398038
|
extractFirstPrompt: () => extractFirstPrompt,
|
|
397859
|
-
call: () =>
|
|
398039
|
+
call: () => call65
|
|
397860
398040
|
});
|
|
397861
398041
|
import { join as join141 } from "path";
|
|
397862
398042
|
function formatTimestamp(date6) {
|
|
@@ -397897,7 +398077,7 @@ async function exportWithReactRenderer(context3) {
|
|
|
397897
398077
|
const tools = context3.options.tools || [];
|
|
397898
398078
|
return renderMessagesToPlainText(context3.messages, tools);
|
|
397899
398079
|
}
|
|
397900
|
-
async function
|
|
398080
|
+
async function call65(onDone, context3, args) {
|
|
397901
398081
|
const content = await exportWithReactRenderer(context3);
|
|
397902
398082
|
const filename = args.trim();
|
|
397903
398083
|
if (filename) {
|
|
@@ -398355,7 +398535,7 @@ var init_CatalogModelPicker = __esm(() => {
|
|
|
398355
398535
|
// commands/model/model.tsx
|
|
398356
398536
|
var exports_model2 = {};
|
|
398357
398537
|
__export(exports_model2, {
|
|
398358
|
-
call: () =>
|
|
398538
|
+
call: () => call66
|
|
398359
398539
|
});
|
|
398360
398540
|
function ModelPickerWrapper(t0) {
|
|
398361
398541
|
const $2 = c3(17);
|
|
@@ -398603,7 +398783,7 @@ function renderModelLabel(model) {
|
|
|
398603
398783
|
const rendered = renderDefaultModelSetting(model ?? getDefaultMainLoopModelSetting());
|
|
398604
398784
|
return model === null ? `${rendered} (default)` : rendered;
|
|
398605
398785
|
}
|
|
398606
|
-
var React114, jsx_runtime348,
|
|
398786
|
+
var React114, jsx_runtime348, call66 = async (onDone, _context, args) => {
|
|
398607
398787
|
args = args?.trim() || "";
|
|
398608
398788
|
if (COMMON_INFO_ARGS.includes(args)) {
|
|
398609
398789
|
logEvent("tengu_model_command_inline_help", {
|
|
@@ -398689,7 +398869,7 @@ var init_model3 = __esm(() => {
|
|
|
398689
398869
|
// commands/tag/tag.tsx
|
|
398690
398870
|
var exports_tag = {};
|
|
398691
398871
|
__export(exports_tag, {
|
|
398692
|
-
call: () =>
|
|
398872
|
+
call: () => call67
|
|
398693
398873
|
});
|
|
398694
398874
|
function ConfirmRemoveTag(t0) {
|
|
398695
398875
|
const $2 = c3(11);
|
|
@@ -398913,7 +399093,7 @@ Examples:
|
|
|
398913
399093
|
React115.useEffect(t1, t2);
|
|
398914
399094
|
return null;
|
|
398915
399095
|
}
|
|
398916
|
-
async function
|
|
399096
|
+
async function call67(onDone, _context, args) {
|
|
398917
399097
|
args = args?.trim() || "";
|
|
398918
399098
|
if (COMMON_INFO_ARGS.includes(args) || COMMON_HELP_ARGS.includes(args)) {
|
|
398919
399099
|
return /* @__PURE__ */ jsx_runtime349.jsx(ShowHelp, {
|
|
@@ -398962,9 +399142,9 @@ var init_tag2 = __esm(() => {
|
|
|
398962
399142
|
// commands/output-style/output-style.tsx
|
|
398963
399143
|
var exports_output_style = {};
|
|
398964
399144
|
__export(exports_output_style, {
|
|
398965
|
-
call: () =>
|
|
399145
|
+
call: () => call68
|
|
398966
399146
|
});
|
|
398967
|
-
async function
|
|
399147
|
+
async function call68(onDone) {
|
|
398968
399148
|
onDone("/output-style has been deprecated. Use /config to change your output style, or set it in your settings file. Changes take effect on the next session.", {
|
|
398969
399149
|
display: "system"
|
|
398970
399150
|
});
|
|
@@ -399483,9 +399663,9 @@ var init_RemoteEnvironmentDialog = __esm(() => {
|
|
|
399483
399663
|
// commands/remote-env/remote-env.tsx
|
|
399484
399664
|
var exports_remote_env = {};
|
|
399485
399665
|
__export(exports_remote_env, {
|
|
399486
|
-
call: () =>
|
|
399666
|
+
call: () => call69
|
|
399487
399667
|
});
|
|
399488
|
-
async function
|
|
399668
|
+
async function call69(onDone) {
|
|
399489
399669
|
return /* @__PURE__ */ jsx_runtime351.jsx(RemoteEnvironmentDialog, {
|
|
399490
399670
|
onDone
|
|
399491
399671
|
});
|
|
@@ -399630,13 +399810,13 @@ async function updateReleaseBundle() {
|
|
|
399630
399810
|
await gracefulShutdown(1);
|
|
399631
399811
|
return;
|
|
399632
399812
|
}
|
|
399633
|
-
if (gte({ VERSION: "0.2.
|
|
399634
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
399813
|
+
if (gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
399814
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
399635
399815
|
`);
|
|
399636
399816
|
await gracefulShutdown(0);
|
|
399637
399817
|
return;
|
|
399638
399818
|
}
|
|
399639
|
-
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.
|
|
399819
|
+
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
399640
399820
|
`);
|
|
399641
399821
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
399642
399822
|
`);
|
|
@@ -399670,7 +399850,7 @@ async function updateReleaseBundle() {
|
|
|
399670
399850
|
return;
|
|
399671
399851
|
}
|
|
399672
399852
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
399673
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
399853
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
399674
399854
|
`);
|
|
399675
399855
|
await regenerateCompletionCache();
|
|
399676
399856
|
} finally {
|
|
@@ -399683,7 +399863,7 @@ async function updateReleaseBundle() {
|
|
|
399683
399863
|
async function update() {
|
|
399684
399864
|
logEvent("tengu_update_check", {});
|
|
399685
399865
|
await updateNaupa();
|
|
399686
|
-
writeToStdout(`Current version: ${{ VERSION: "0.2.
|
|
399866
|
+
writeToStdout(`Current version: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
399687
399867
|
`);
|
|
399688
399868
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
399689
399869
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -399762,8 +399942,8 @@ async function update() {
|
|
|
399762
399942
|
writeToStdout(`Theus is managed by Homebrew.
|
|
399763
399943
|
`);
|
|
399764
399944
|
const latest = await getLatestVersion(channel2);
|
|
399765
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
399766
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
399945
|
+
if (latest && !gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
399946
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
399767
399947
|
`);
|
|
399768
399948
|
writeToStdout(`
|
|
399769
399949
|
`);
|
|
@@ -399779,8 +399959,8 @@ async function update() {
|
|
|
399779
399959
|
writeToStdout(`Theus is managed by winget.
|
|
399780
399960
|
`);
|
|
399781
399961
|
const latest = await getLatestVersion(channel2);
|
|
399782
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
399783
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
399962
|
+
if (latest && !gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
399963
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
399784
399964
|
`);
|
|
399785
399965
|
writeToStdout(`
|
|
399786
399966
|
`);
|
|
@@ -399796,8 +399976,8 @@ async function update() {
|
|
|
399796
399976
|
writeToStdout(`Theus is managed by apk.
|
|
399797
399977
|
`);
|
|
399798
399978
|
const latest = await getLatestVersion(channel2);
|
|
399799
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
399800
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
399979
|
+
if (latest && !gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
399980
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
399801
399981
|
`);
|
|
399802
399982
|
writeToStdout(`
|
|
399803
399983
|
`);
|
|
@@ -399862,11 +400042,11 @@ async function update() {
|
|
|
399862
400042
|
`);
|
|
399863
400043
|
await gracefulShutdown(1);
|
|
399864
400044
|
}
|
|
399865
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
399866
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400045
|
+
if (result.latestVersion === { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
400046
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
399867
400047
|
`);
|
|
399868
400048
|
} else {
|
|
399869
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400049
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
399870
400050
|
`);
|
|
399871
400051
|
await regenerateCompletionCache();
|
|
399872
400052
|
}
|
|
@@ -399885,9 +400065,9 @@ async function update() {
|
|
|
399885
400065
|
await removeInstalledSymlink();
|
|
399886
400066
|
}
|
|
399887
400067
|
logForDebugging("update: Checking npm registry for latest version");
|
|
399888
|
-
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.
|
|
400068
|
+
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
399889
400069
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
399890
|
-
const npmCommand = `npm view ${{ VERSION: "0.2.
|
|
400070
|
+
const npmCommand = `npm view ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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`;
|
|
399891
400071
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
399892
400072
|
const latestVersion = await getLatestVersion(channel2);
|
|
399893
400073
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -399907,7 +400087,7 @@ async function update() {
|
|
|
399907
400087
|
`);
|
|
399908
400088
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
399909
400089
|
`);
|
|
399910
|
-
if ({ VERSION: "0.2.
|
|
400090
|
+
if ({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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")) {
|
|
399911
400091
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
399912
400092
|
`);
|
|
399913
400093
|
}
|
|
@@ -399919,19 +400099,19 @@ async function update() {
|
|
|
399919
400099
|
`);
|
|
399920
400100
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
399921
400101
|
`);
|
|
399922
|
-
const packageName = { VERSION: "0.2.
|
|
400102
|
+
const packageName = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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");
|
|
399923
400103
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
399924
400104
|
`);
|
|
399925
400105
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
399926
400106
|
`);
|
|
399927
400107
|
await gracefulShutdown(1);
|
|
399928
400108
|
}
|
|
399929
|
-
if (gte({ VERSION: "0.2.
|
|
399930
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400109
|
+
if (gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
400110
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
399931
400111
|
`);
|
|
399932
400112
|
await gracefulShutdown(0);
|
|
399933
400113
|
}
|
|
399934
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.
|
|
400114
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
399935
400115
|
`);
|
|
399936
400116
|
writeToStdout(`Installing update...
|
|
399937
400117
|
`);
|
|
@@ -399976,7 +400156,7 @@ async function update() {
|
|
|
399976
400156
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
399977
400157
|
switch (status2) {
|
|
399978
400158
|
case "success":
|
|
399979
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400159
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
399980
400160
|
`);
|
|
399981
400161
|
await regenerateCompletionCache();
|
|
399982
400162
|
break;
|
|
@@ -399986,7 +400166,7 @@ async function update() {
|
|
|
399986
400166
|
if (useLocalUpdate) {
|
|
399987
400167
|
process.stderr.write(`Try manually updating with:
|
|
399988
400168
|
`);
|
|
399989
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
400169
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
399990
400170
|
`);
|
|
399991
400171
|
} else {
|
|
399992
400172
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -400002,7 +400182,7 @@ async function update() {
|
|
|
400002
400182
|
if (useLocalUpdate) {
|
|
400003
400183
|
process.stderr.write(`Try manually updating with:
|
|
400004
400184
|
`);
|
|
400005
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
400185
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400006
400186
|
`);
|
|
400007
400187
|
} else {
|
|
400008
400188
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -400041,9 +400221,9 @@ var init_update = __esm(() => {
|
|
|
400041
400221
|
// commands/update/update.ts
|
|
400042
400222
|
var exports_update2 = {};
|
|
400043
400223
|
__export(exports_update2, {
|
|
400044
|
-
call: () =>
|
|
400224
|
+
call: () => call70
|
|
400045
400225
|
});
|
|
400046
|
-
var
|
|
400226
|
+
var call70 = async () => {
|
|
400047
400227
|
await update();
|
|
400048
400228
|
return { type: "skip" };
|
|
400049
400229
|
};
|
|
@@ -400068,9 +400248,9 @@ var init_update3 = __esm(() => {
|
|
|
400068
400248
|
// commands/upgrade/upgrade.tsx
|
|
400069
400249
|
var exports_upgrade = {};
|
|
400070
400250
|
__export(exports_upgrade, {
|
|
400071
|
-
call: () =>
|
|
400251
|
+
call: () => call71
|
|
400072
400252
|
});
|
|
400073
|
-
async function
|
|
400253
|
+
async function call71(onDone, context3) {
|
|
400074
400254
|
try {
|
|
400075
400255
|
if (isTheusAISubscriber()) {
|
|
400076
400256
|
const tokens = getTheusAIOAuthTokens();
|
|
@@ -400130,7 +400310,7 @@ var init_upgrade2 = __esm(() => {
|
|
|
400130
400310
|
// commands/rate-limit-options/rate-limit-options.tsx
|
|
400131
400311
|
var exports_rate_limit_options = {};
|
|
400132
400312
|
__export(exports_rate_limit_options, {
|
|
400133
|
-
call: () =>
|
|
400313
|
+
call: () => call72
|
|
400134
400314
|
});
|
|
400135
400315
|
function RateLimitOptionsMenu(t0) {
|
|
400136
400316
|
const $2 = c3(25);
|
|
@@ -400264,7 +400444,7 @@ function RateLimitOptionsMenu(t0) {
|
|
|
400264
400444
|
t5 = function handleSelect(value) {
|
|
400265
400445
|
if (value === "upgrade") {
|
|
400266
400446
|
logEvent("tengu_rate_limit_options_menu_select_upgrade", {});
|
|
400267
|
-
|
|
400447
|
+
call71(onDone, context3).then((jsx350) => {
|
|
400268
400448
|
if (jsx350) {
|
|
400269
400449
|
setSubCommandJSX(jsx350);
|
|
400270
400450
|
}
|
|
@@ -400324,7 +400504,7 @@ function RateLimitOptionsMenu(t0) {
|
|
|
400324
400504
|
}
|
|
400325
400505
|
return t7;
|
|
400326
400506
|
}
|
|
400327
|
-
async function
|
|
400507
|
+
async function call72(onDone, context3) {
|
|
400328
400508
|
return /* @__PURE__ */ jsx_runtime353.jsx(RateLimitOptionsMenu, {
|
|
400329
400509
|
onDone,
|
|
400330
400510
|
context: context3
|
|
@@ -400398,7 +400578,7 @@ var exports_effort = {};
|
|
|
400398
400578
|
__export(exports_effort, {
|
|
400399
400579
|
showCurrentEffort: () => showCurrentEffort,
|
|
400400
400580
|
executeEffort: () => executeEffort,
|
|
400401
|
-
call: () =>
|
|
400581
|
+
call: () => call73
|
|
400402
400582
|
});
|
|
400403
400583
|
function setEffortValue(effortValue) {
|
|
400404
400584
|
const persistable = toPersistableEffort(effortValue);
|
|
@@ -400549,7 +400729,7 @@ function ApplyEffortAndClose(t0) {
|
|
|
400549
400729
|
React117.useEffect(t1, t2);
|
|
400550
400730
|
return null;
|
|
400551
400731
|
}
|
|
400552
|
-
async function
|
|
400732
|
+
async function call73(onDone, _context, args) {
|
|
400553
400733
|
args = args?.trim() || "";
|
|
400554
400734
|
if (COMMON_HELP_ARGS2.includes(args)) {
|
|
400555
400735
|
onDone(`Usage: /effort [low|medium|high|max|auto]
|
|
@@ -403458,9 +403638,9 @@ var init_Stats = __esm(() => {
|
|
|
403458
403638
|
// commands/stats/stats.tsx
|
|
403459
403639
|
var exports_stats = {};
|
|
403460
403640
|
__export(exports_stats, {
|
|
403461
|
-
call: () =>
|
|
403641
|
+
call: () => call74
|
|
403462
403642
|
});
|
|
403463
|
-
var jsx_runtime356,
|
|
403643
|
+
var jsx_runtime356, call74 = async (onDone) => {
|
|
403464
403644
|
return /* @__PURE__ */ jsx_runtime356.jsx(Stats, {
|
|
403465
403645
|
onClose: onDone
|
|
403466
403646
|
});
|
|
@@ -403566,7 +403746,7 @@ function statusLine() {
|
|
|
403566
403746
|
return "Modo proactivo: ACTIVO (en pausa).";
|
|
403567
403747
|
return "Modo proactivo: ACTIVO.";
|
|
403568
403748
|
}
|
|
403569
|
-
var ON_MESSAGE,
|
|
403749
|
+
var ON_MESSAGE, call75 = async (args) => {
|
|
403570
403750
|
const arg = (args ?? "").trim().toLowerCase();
|
|
403571
403751
|
let value;
|
|
403572
403752
|
switch (arg) {
|
|
@@ -403650,7 +403830,7 @@ var init_proactive2 = __esm(() => {
|
|
|
403650
403830
|
userInvocable: true,
|
|
403651
403831
|
disableModelInvocation: true,
|
|
403652
403832
|
supportsNonInteractive: true,
|
|
403653
|
-
load: () => Promise.resolve({ call:
|
|
403833
|
+
load: () => Promise.resolve({ call: call75 })
|
|
403654
403834
|
};
|
|
403655
403835
|
proactive_default = proactive;
|
|
403656
403836
|
});
|
|
@@ -403839,7 +404019,7 @@ var exports_assistant = {};
|
|
|
403839
404019
|
__export(exports_assistant, {
|
|
403840
404020
|
installAssistant: () => installAssistant,
|
|
403841
404021
|
computeDefaultInstallDir: () => computeDefaultInstallDir,
|
|
403842
|
-
call: () =>
|
|
404022
|
+
call: () => call76,
|
|
403843
404023
|
NewInstallWizard: () => NewInstallWizard
|
|
403844
404024
|
});
|
|
403845
404025
|
import { existsSync as existsSync19, mkdirSync as mkdirSync10, readFileSync as readFileSync25, writeFileSync as writeFileSync8 } from "fs";
|
|
@@ -403996,7 +404176,7 @@ function AssistantCommandFlow({
|
|
|
403996
404176
|
onCancel: () => onDone()
|
|
403997
404177
|
});
|
|
403998
404178
|
}
|
|
403999
|
-
async function
|
|
404179
|
+
async function call76(onDone, _context, _args) {
|
|
404000
404180
|
return /* @__PURE__ */ jsx_runtime358.jsx(AssistantCommandFlow, {
|
|
404001
404181
|
onDone
|
|
404002
404182
|
});
|
|
@@ -404183,7 +404363,7 @@ function renderList(cwd2) {
|
|
|
404183
404363
|
return L2.join(`
|
|
404184
404364
|
`);
|
|
404185
404365
|
}
|
|
404186
|
-
function
|
|
404366
|
+
function parseArgs2(str2) {
|
|
404187
404367
|
const s = (str2 ?? "").trim();
|
|
404188
404368
|
if (!s)
|
|
404189
404369
|
return {};
|
|
@@ -404196,7 +404376,7 @@ function parseArgs(str2) {
|
|
|
404196
404376
|
}
|
|
404197
404377
|
return { input: s };
|
|
404198
404378
|
}
|
|
404199
|
-
var WORKFLOW_EXTS, ANCHO = 64, REGLA, HELP,
|
|
404379
|
+
var WORKFLOW_EXTS, ANCHO = 64, REGLA, HELP, call77 = async (rawArgs, context3) => {
|
|
404200
404380
|
const cwd2 = safeCwd2();
|
|
404201
404381
|
const raw = (rawArgs ?? "").trim();
|
|
404202
404382
|
const parts = raw.length ? raw.split(/\s+/) : [];
|
|
@@ -404231,7 +404411,7 @@ var WORKFLOW_EXTS, ANCHO = 64, REGLA, HELP, call76 = async (rawArgs, context3) =
|
|
|
404231
404411
|
` + renderList(cwd2)
|
|
404232
404412
|
};
|
|
404233
404413
|
}
|
|
404234
|
-
const args =
|
|
404414
|
+
const args = parseArgs2(argStr2);
|
|
404235
404415
|
const setAppState = context3.setAppStateForTasks ?? context3.setAppState;
|
|
404236
404416
|
if (typeof setAppState !== "function") {
|
|
404237
404417
|
return {
|
|
@@ -404362,7 +404542,7 @@ var init_workflows = __esm(() => {
|
|
|
404362
404542
|
userInvocable: true,
|
|
404363
404543
|
disableModelInvocation: true,
|
|
404364
404544
|
supportsNonInteractive: true,
|
|
404365
|
-
load: () => Promise.resolve({ call:
|
|
404545
|
+
load: () => Promise.resolve({ call: call77 })
|
|
404366
404546
|
};
|
|
404367
404547
|
workflows_default = workflows;
|
|
404368
404548
|
});
|
|
@@ -404589,7 +404769,7 @@ function PeersPanel({ onDone }) {
|
|
|
404589
404769
|
]
|
|
404590
404770
|
});
|
|
404591
404771
|
}
|
|
404592
|
-
var import_react195, jsx_runtime359, KIND_LABELS,
|
|
404772
|
+
var import_react195, jsx_runtime359, KIND_LABELS, call78 = async (onDone) => {
|
|
404593
404773
|
return /* @__PURE__ */ jsx_runtime359.jsx(PeersPanel, {
|
|
404594
404774
|
onDone
|
|
404595
404775
|
});
|
|
@@ -404611,7 +404791,7 @@ var init_peers = __esm(() => {
|
|
|
404611
404791
|
name: "peers",
|
|
404612
404792
|
description: "Lista otras sesiones de Theus vivas en esta m\xE1quina",
|
|
404613
404793
|
isEnabled: () => isUdsInboxEnabled(),
|
|
404614
|
-
load: () => Promise.resolve({ call:
|
|
404794
|
+
load: () => Promise.resolve({ call: call78 })
|
|
404615
404795
|
};
|
|
404616
404796
|
peers_default = peers;
|
|
404617
404797
|
});
|
|
@@ -405290,7 +405470,7 @@ var init_sprites = __esm(() => {
|
|
|
405290
405470
|
// commands/buddy/buddy.tsx
|
|
405291
405471
|
var exports_buddy = {};
|
|
405292
405472
|
__export(exports_buddy, {
|
|
405293
|
-
call: () =>
|
|
405473
|
+
call: () => call79
|
|
405294
405474
|
});
|
|
405295
405475
|
async function generateSoul(bones, inspirationSeed) {
|
|
405296
405476
|
const especie = SPECIES_ES[bones.species];
|
|
@@ -405567,7 +405747,7 @@ function BuddyPanel({
|
|
|
405567
405747
|
]
|
|
405568
405748
|
});
|
|
405569
405749
|
}
|
|
405570
|
-
var import_react197, jsx_runtime361, HATCH_TIMEOUT_MS = 15000, TICK_MS2 = 400,
|
|
405750
|
+
var import_react197, jsx_runtime361, HATCH_TIMEOUT_MS = 15000, TICK_MS2 = 400, call79 = async (onDone, _context, args) => {
|
|
405571
405751
|
const arg = (args ?? "").trim().toLowerCase();
|
|
405572
405752
|
if (arg === "silencio" || arg === "silenciar" || arg === "mute") {
|
|
405573
405753
|
const config3 = getGlobalConfig();
|
|
@@ -405894,6 +406074,7 @@ var init_commands2 = __esm(() => {
|
|
|
405894
406074
|
init_onboarding();
|
|
405895
406075
|
init_pr_comments();
|
|
405896
406076
|
init_providers3();
|
|
406077
|
+
init_recarga();
|
|
405897
406078
|
init_release_notes2();
|
|
405898
406079
|
init_rename2();
|
|
405899
406080
|
init_resume2();
|
|
@@ -406038,6 +406219,7 @@ var init_commands2 = __esm(() => {
|
|
|
406038
406219
|
plugin_default,
|
|
406039
406220
|
pr_comments_default,
|
|
406040
406221
|
providers_default,
|
|
406222
|
+
recarga_default,
|
|
406041
406223
|
release_notes_default,
|
|
406042
406224
|
reload_plugins_default,
|
|
406043
406225
|
rename_default,
|
|
@@ -409079,7 +409261,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
409079
409261
|
init_settings2();
|
|
409080
409262
|
init_slowOperations();
|
|
409081
409263
|
init_uuid();
|
|
409082
|
-
VERSION4 = { VERSION: "0.2.
|
|
409264
|
+
VERSION4 = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
409083
409265
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
409084
409266
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
409085
409267
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -410284,7 +410466,7 @@ var init_filesystem = __esm(() => {
|
|
|
410284
410466
|
});
|
|
410285
410467
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
410286
410468
|
const nonce = randomBytes21(16).toString("hex");
|
|
410287
|
-
return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.
|
|
410469
|
+
return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
|
|
410288
410470
|
});
|
|
410289
410471
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
410290
410472
|
});
|
|
@@ -415463,7 +415645,7 @@ function getSimpleDoingTasksSection() {
|
|
|
415463
415645
|
];
|
|
415464
415646
|
const userHelpSubitems = [
|
|
415465
415647
|
`/help: Get help with using Theus`,
|
|
415466
|
-
`To give feedback, users should ${{ VERSION: "0.2.
|
|
415648
|
+
`To give feedback, users should ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
415467
415649
|
];
|
|
415468
415650
|
const items = [
|
|
415469
415651
|
`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.`,
|
|
@@ -416363,7 +416545,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
416363
416545
|
}
|
|
416364
416546
|
function computeFingerprintFromMessages(messages) {
|
|
416365
416547
|
const firstMessageText = extractFirstMessageText(messages);
|
|
416366
|
-
return computeFingerprint(firstMessageText, { VERSION: "0.2.
|
|
416548
|
+
return computeFingerprint(firstMessageText, { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
416367
416549
|
}
|
|
416368
416550
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
416369
416551
|
var init_fingerprint = () => {};
|
|
@@ -418472,10 +418654,10 @@ function blocksFromOpenAIMessage(message) {
|
|
|
418472
418654
|
}
|
|
418473
418655
|
}
|
|
418474
418656
|
if (Array.isArray(message.tool_calls)) {
|
|
418475
|
-
for (const
|
|
418476
|
-
if (!
|
|
418657
|
+
for (const call80 of message.tool_calls) {
|
|
418658
|
+
if (!call80 || typeof call80 !== "object")
|
|
418477
418659
|
continue;
|
|
418478
|
-
const typed =
|
|
418660
|
+
const typed = call80;
|
|
418479
418661
|
const name = typed.function?.name;
|
|
418480
418662
|
if (!name)
|
|
418481
418663
|
continue;
|
|
@@ -418923,7 +419105,7 @@ async function sideQuery(opts) {
|
|
|
418923
419105
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
418924
419106
|
}
|
|
418925
419107
|
const messageText = extractFirstUserMessageText(messages);
|
|
418926
|
-
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.
|
|
419108
|
+
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
418927
419109
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
418928
419110
|
const systemBlocks = [
|
|
418929
419111
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -420226,7 +420408,7 @@ async function handleMemories(state) {
|
|
|
420226
420408
|
async function runProjectContextMcpServer() {
|
|
420227
420409
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
420228
420410
|
const state = new ProjectContextState(projectRoot);
|
|
420229
|
-
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.
|
|
420411
|
+
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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: {} } });
|
|
420230
420412
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
420231
420413
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
420232
420414
|
name: t.name,
|
|
@@ -422206,7 +422388,7 @@ function createBridgeLogger(options2) {
|
|
|
422206
422388
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
422207
422389
|
regenerateQr(connectUrl);
|
|
422208
422390
|
if (verbose) {
|
|
422209
|
-
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.
|
|
422391
|
+
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
422210
422392
|
`);
|
|
422211
422393
|
}
|
|
422212
422394
|
if (verbose) {
|
|
@@ -423179,7 +423361,7 @@ function appendToLog(path19, message) {
|
|
|
423179
423361
|
cwd: getFsImplementation().cwd(),
|
|
423180
423362
|
userType: process.env.USER_TYPE,
|
|
423181
423363
|
sessionId: getSessionId(),
|
|
423182
|
-
version: { VERSION: "0.2.
|
|
423364
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
423183
423365
|
};
|
|
423184
423366
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
423185
423367
|
}
|
|
@@ -423283,7 +423465,7 @@ var exports_bridgeMain = {};
|
|
|
423283
423465
|
__export(exports_bridgeMain, {
|
|
423284
423466
|
runBridgeLoop: () => runBridgeLoop,
|
|
423285
423467
|
runBridgeHeadless: () => runBridgeHeadless,
|
|
423286
|
-
parseArgs: () =>
|
|
423468
|
+
parseArgs: () => parseArgs3,
|
|
423287
423469
|
isServerError: () => isServerError,
|
|
423288
423470
|
isConnectionError: () => isConnectionError,
|
|
423289
423471
|
bridgeMain: () => bridgeMain,
|
|
@@ -424102,7 +424284,7 @@ function parseCapacityValue(raw) {
|
|
|
424102
424284
|
}
|
|
424103
424285
|
return n3;
|
|
424104
424286
|
}
|
|
424105
|
-
function
|
|
424287
|
+
function parseArgs3(args) {
|
|
424106
424288
|
let verbose = false;
|
|
424107
424289
|
let sandbox = false;
|
|
424108
424290
|
let debugFile;
|
|
@@ -424269,7 +424451,7 @@ async function fetchSessionTitle(compatSessionId, baseUrl) {
|
|
|
424269
424451
|
return session2?.title || undefined;
|
|
424270
424452
|
}
|
|
424271
424453
|
async function bridgeMain(args) {
|
|
424272
|
-
const parsed =
|
|
424454
|
+
const parsed = parseArgs3(args);
|
|
424273
424455
|
if (parsed.help) {
|
|
424274
424456
|
await printHelp();
|
|
424275
424457
|
return;
|
|
@@ -424449,7 +424631,7 @@ Spawn mode for this project:
|
|
|
424449
424631
|
const api2 = createBridgeApiClient({
|
|
424450
424632
|
baseUrl,
|
|
424451
424633
|
getAccessToken: getBridgeAccessToken2,
|
|
424452
|
-
runnerVersion: { VERSION: "0.2.
|
|
424634
|
+
runnerVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
424453
424635
|
onDebug: logForDebugging,
|
|
424454
424636
|
onAuth401: handleOAuth401Error2,
|
|
424455
424637
|
getTrustedDeviceToken
|
|
@@ -424687,7 +424869,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
424687
424869
|
const api2 = createBridgeApiClient({
|
|
424688
424870
|
baseUrl,
|
|
424689
424871
|
getAccessToken: opts.getAccessToken,
|
|
424690
|
-
runnerVersion: { VERSION: "0.2.
|
|
424872
|
+
runnerVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
424691
424873
|
onDebug: log2,
|
|
424692
424874
|
onAuth401: opts.onAuth401,
|
|
424693
424875
|
getTrustedDeviceToken
|
|
@@ -428751,7 +428933,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
428751
428933
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
428752
428934
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
428753
428935
|
betas: getSdkBetas(),
|
|
428754
|
-
theus_code_version: { VERSION: "0.2.
|
|
428936
|
+
theus_code_version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
428755
428937
|
output_style: outputStyle2,
|
|
428756
428938
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
428757
428939
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -428791,8 +428973,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
428791
428973
|
}
|
|
428792
428974
|
async function checkEnvLessBridgeMinVersion() {
|
|
428793
428975
|
const cfg = await getEnvLessBridgeConfig();
|
|
428794
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
428795
|
-
return `Your version of Theus (${{ VERSION: "0.2.
|
|
428976
|
+
if (cfg.min_version && lt({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
428977
|
+
return `Your version of Theus (${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
|
|
428796
428978
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
428797
428979
|
}
|
|
428798
428980
|
return null;
|
|
@@ -431115,7 +431297,7 @@ async function initBridgeCore(params) {
|
|
|
431115
431297
|
const rawApi = createBridgeApiClient({
|
|
431116
431298
|
baseUrl,
|
|
431117
431299
|
getAccessToken,
|
|
431118
|
-
runnerVersion: { VERSION: "0.2.
|
|
431300
|
+
runnerVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
431119
431301
|
onDebug: logForDebugging,
|
|
431120
431302
|
onAuth401,
|
|
431121
431303
|
getTrustedDeviceToken
|
|
@@ -447856,7 +448038,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
447856
448038
|
function getSemverPart(version3) {
|
|
447857
448039
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
447858
448040
|
}
|
|
447859
|
-
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.
|
|
448041
|
+
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
447860
448042
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react231.useState(() => getSemverPart(initialVersion));
|
|
447861
448043
|
if (!updatedVersion) {
|
|
447862
448044
|
return null;
|
|
@@ -447896,7 +448078,7 @@ function AutoUpdater({
|
|
|
447896
448078
|
return;
|
|
447897
448079
|
}
|
|
447898
448080
|
if (false) {}
|
|
447899
|
-
const currentVersion = { VERSION: "0.2.
|
|
448081
|
+
const currentVersion = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
447900
448082
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
447901
448083
|
let latestVersion = await getLatestVersion(channel2);
|
|
447902
448084
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -448032,7 +448214,7 @@ function AutoUpdater({
|
|
|
448032
448214
|
" ",
|
|
448033
448215
|
/* @__PURE__ */ jsx_runtime406.jsx(ThemedText, {
|
|
448034
448216
|
bold: true,
|
|
448035
|
-
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
448217
|
+
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.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.41", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
448036
448218
|
})
|
|
448037
448219
|
]
|
|
448038
448220
|
})
|
|
@@ -448109,12 +448291,12 @@ function NativeAutoUpdater({
|
|
|
448109
448291
|
logEvent("tengu_native_auto_updater_start", {});
|
|
448110
448292
|
try {
|
|
448111
448293
|
const maxVersion = await getMaxVersion();
|
|
448112
|
-
if (maxVersion && gt({ VERSION: "0.2.
|
|
448294
|
+
if (maxVersion && gt({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
448113
448295
|
const msg = await getMaxVersionMessage();
|
|
448114
448296
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
448115
448297
|
}
|
|
448116
448298
|
const result = await installLatest(channel2);
|
|
448117
|
-
const currentVersion = { VERSION: "0.2.
|
|
448299
|
+
const currentVersion = { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
448118
448300
|
const latencyMs = Date.now() - startTime2;
|
|
448119
448301
|
if (result.lockFailed) {
|
|
448120
448302
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -448251,17 +448433,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448251
448433
|
const maxVersion = await getMaxVersion();
|
|
448252
448434
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
448253
448435
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
448254
|
-
if (gte({ VERSION: "0.2.
|
|
448255
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.
|
|
448436
|
+
if (gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
448437
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
|
|
448256
448438
|
setUpdateAvailable(false);
|
|
448257
448439
|
return;
|
|
448258
448440
|
}
|
|
448259
448441
|
latest = maxVersion;
|
|
448260
448442
|
}
|
|
448261
|
-
const hasUpdate = latest && !gte({ VERSION: "0.2.
|
|
448443
|
+
const hasUpdate = latest && !gte({ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
|
|
448262
448444
|
setUpdateAvailable(!!hasUpdate);
|
|
448263
448445
|
if (hasUpdate) {
|
|
448264
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.
|
|
448446
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
|
|
448265
448447
|
}
|
|
448266
448448
|
};
|
|
448267
448449
|
$2[0] = t1;
|
|
@@ -448295,7 +448477,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448295
448477
|
wrap: "truncate",
|
|
448296
448478
|
children: [
|
|
448297
448479
|
"currentVersion: ",
|
|
448298
|
-
{ VERSION: "0.2.
|
|
448480
|
+
{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
448299
448481
|
]
|
|
448300
448482
|
});
|
|
448301
448483
|
$2[3] = verbose;
|
|
@@ -456168,7 +456350,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
456168
456350
|
project_dir: getOriginalCwd(),
|
|
456169
456351
|
added_dirs: addedDirs
|
|
456170
456352
|
},
|
|
456171
|
-
version: { VERSION: "0.2.
|
|
456353
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
456172
456354
|
output_style: {
|
|
456173
456355
|
name: outputStyleName
|
|
456174
456356
|
},
|
|
@@ -467588,7 +467770,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
467588
467770
|
} catch {}
|
|
467589
467771
|
const data = {
|
|
467590
467772
|
trigger,
|
|
467591
|
-
version: { VERSION: "0.2.
|
|
467773
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
467592
467774
|
platform: process.platform,
|
|
467593
467775
|
transcript,
|
|
467594
467776
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -480595,7 +480777,7 @@ function completeOnboarding() {
|
|
|
480595
480777
|
saveGlobalConfig((current) => ({
|
|
480596
480778
|
...current,
|
|
480597
480779
|
hasCompletedOnboarding: true,
|
|
480598
|
-
lastOnboardingVersion: { VERSION: "0.2.
|
|
480780
|
+
lastOnboardingVersion: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
480599
480781
|
}));
|
|
480600
480782
|
}
|
|
480601
480783
|
function showDialog(root2, renderer) {
|
|
@@ -491483,7 +491665,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
491483
491665
|
setCwd(cwd3);
|
|
491484
491666
|
const server2 = new Server({
|
|
491485
491667
|
name: "theus/tengu",
|
|
491486
|
-
version: { VERSION: "0.2.
|
|
491668
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
491487
491669
|
}, {
|
|
491488
491670
|
capabilities: {
|
|
491489
491671
|
tools: {}
|
|
@@ -492925,7 +493107,7 @@ async function setupTokenHandler(root2) {
|
|
|
492925
493107
|
gap: 1,
|
|
492926
493108
|
children: [
|
|
492927
493109
|
/* @__PURE__ */ jsx_runtime493.jsx(TheusBanner, {
|
|
492928
|
-
version: { VERSION: "0.2.
|
|
493110
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
492929
493111
|
}),
|
|
492930
493112
|
showAuthWarning && /* @__PURE__ */ jsx_runtime493.jsxs(ThemedBox_default, {
|
|
492931
493113
|
flexDirection: "column",
|
|
@@ -494407,7 +494589,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
494407
494589
|
}
|
|
494408
494590
|
}
|
|
494409
494591
|
logForDiagnosticsNoPII("info", "started", {
|
|
494410
|
-
version: { VERSION: "0.2.
|
|
494592
|
+
version: { VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
494411
494593
|
is_native_binary: isInBundledMode()
|
|
494412
494594
|
});
|
|
494413
494595
|
registerCleanup(async () => {
|
|
@@ -495275,7 +495457,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
495275
495457
|
pendingHookMessages
|
|
495276
495458
|
}, renderAndRun);
|
|
495277
495459
|
}
|
|
495278
|
-
}).version(`${{ VERSION: "0.2.
|
|
495460
|
+
}).version(`${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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");
|
|
495279
495461
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
495280
495462
|
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.");
|
|
495281
495463
|
if (canUserConfigureAdvisor()) {
|
|
@@ -495827,7 +496009,7 @@ if (false) {}
|
|
|
495827
496009
|
async function main2() {
|
|
495828
496010
|
const args = process.argv.slice(2);
|
|
495829
496011
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
495830
|
-
console.log(`${{ VERSION: "0.2.
|
|
496012
|
+
console.log(`${{ VERSION: "0.2.41", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
|
|
495831
496013
|
return;
|
|
495832
496014
|
}
|
|
495833
496015
|
const {
|