theus-cli 0.2.48 → 0.2.50
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 +215 -136
- 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.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.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
|
}
|
|
@@ -116229,7 +116229,7 @@ function hashString2(str) {
|
|
|
116229
116229
|
}
|
|
116230
116230
|
return hash >>> 0;
|
|
116231
116231
|
}
|
|
116232
|
-
async function
|
|
116232
|
+
async function maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, ext) {
|
|
116233
116233
|
if (imageBuffer.length === 0) {
|
|
116234
116234
|
throw new ImageResizeError("Image file is empty (0 bytes)");
|
|
116235
116235
|
}
|
|
@@ -116407,7 +116407,7 @@ async function maybeResizeAndDownsampleImageBlock(imageBlock) {
|
|
|
116407
116407
|
const originalSize = imageBuffer.length;
|
|
116408
116408
|
const mediaType = imageBlock.source.media_type;
|
|
116409
116409
|
const ext = mediaType?.split("/")[1] || "png";
|
|
116410
|
-
const resized = await
|
|
116410
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, ext);
|
|
116411
116411
|
return {
|
|
116412
116412
|
block: {
|
|
116413
116413
|
type: "image",
|
|
@@ -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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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) {
|
|
@@ -183732,13 +183732,17 @@ var PROVIDER_TOOL_NAME = "Provider", DESCRIPTION8 = `Route a request to one or m
|
|
|
183732
183732
|
|
|
183733
183733
|
Use this when a turn needs a NON-TEXT capability or several capabilities at once:
|
|
183734
183734
|
- "genera una imagen de X" \u2192 capability: ["image"] (REAL generation)
|
|
183735
|
+
- "edita/retoca/cambia esta imagen" \u2192 capability: ["image"] + editarImagenes: [ruta o enlace]
|
|
183735
183736
|
- "genera un video de X" \u2192 capability: ["video"] (REAL generation)
|
|
183737
|
+
- "anima esta imagen" \u2192 capability: ["video"] + imagenUrl: ruta o enlace
|
|
183736
183738
|
- "chart this dataset" \u2192 capability: ["chart"], pass rows in \`data\`
|
|
183737
183739
|
- "write a report on Y" \u2192 capability: ["report"], pass sections in \`data\`
|
|
183738
183740
|
- "answer AND chart the numbers" \u2192 capability: ["text","chart"]
|
|
183739
183741
|
|
|
183740
183742
|
Capabilities: text | video | image | report | chart | embedding.
|
|
183741
183743
|
|
|
183744
|
+
EDITING an image: pass \`editarImagenes\` (local paths and/or links, up to 14) and the model TRANSFORMS what you give it instead of starting from scratch \u2014 retouch, recolor, replace the background, or merge several. Write the prompt as the CHANGE you want ("ponle fondo transparente"), not as a full scene description. A local file works directly: it travels embedded, nothing gets published anywhere.
|
|
183745
|
+
|
|
183742
183746
|
Image and video generation are REAL: they run against the user's Theus subscription gateway (configured automatically by \`theus login\`). The generated PNG/MP4 is saved under <cwd>/theus-media/ and the fused answer includes the relative file path \u2014 share that path with the user. Video generation can take up to a few minutes (the tool waits and downloads the result). If the user has no active session, the result explains (in Spanish) how to enable it with \`theus login\`.
|
|
183743
183747
|
|
|
183744
183748
|
The router picks the best enabled provider per capability (or all of them when \`combine\` is true), runs them in parallel, and returns one fused message with a provenance/cost summary.
|
|
@@ -202608,7 +202612,7 @@ function getInstallationEnv() {
|
|
|
202608
202612
|
return;
|
|
202609
202613
|
}
|
|
202610
202614
|
function getTheusCodeVersion() {
|
|
202611
|
-
return { VERSION: "0.2.
|
|
202615
|
+
return { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
202612
202616
|
}
|
|
202613
202617
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
202614
202618
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -204126,7 +204130,7 @@ async function getMcpHeadersFromHelper(serverName, config2) {
|
|
|
204126
204130
|
if ("scope" in config2 && isMcpServerFromProjectOrLocalSettings(config2) && !getIsNonInteractiveSession()) {
|
|
204127
204131
|
const hasTrust = checkHasTrustDialogAccepted();
|
|
204128
204132
|
if (!hasTrust) {
|
|
204129
|
-
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.
|
|
204133
|
+
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.50", BUILD_TIME: "1970-01-01T00:00:00.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}.`);
|
|
204130
204134
|
logAntError("MCP headersHelper invoked before trust check", error40);
|
|
204131
204135
|
logEvent("tengu_mcp_headersHelper_missing_trust", {});
|
|
204132
204136
|
return null;
|
|
@@ -204903,7 +204907,7 @@ async function transformResultContent(resultContent, serverName) {
|
|
|
204903
204907
|
case "image": {
|
|
204904
204908
|
const imageBuffer = Buffer.from(String(resultContent.data), "base64");
|
|
204905
204909
|
const ext = resultContent.mimeType?.split("/")[1] || "png";
|
|
204906
|
-
const resized = await
|
|
204910
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, ext);
|
|
204907
204911
|
return [
|
|
204908
204912
|
{
|
|
204909
204913
|
type: "image",
|
|
@@ -204930,7 +204934,7 @@ async function transformResultContent(resultContent, serverName) {
|
|
|
204930
204934
|
if (isImage) {
|
|
204931
204935
|
const imageBuffer = Buffer.from(resource.blob, "base64");
|
|
204932
204936
|
const ext = resource.mimeType?.split("/")[1] || "png";
|
|
204933
|
-
const resized = await
|
|
204937
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, ext);
|
|
204934
204938
|
const content = [];
|
|
204935
204939
|
if (prefix) {
|
|
204936
204940
|
content.push({
|
|
@@ -205336,7 +205340,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
205336
205340
|
const client2 = new Client({
|
|
205337
205341
|
name: "theus-code",
|
|
205338
205342
|
title: "Theus",
|
|
205339
|
-
version: { VERSION: "0.2.
|
|
205343
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
|
|
205340
205344
|
description: "Theus's agentic coding tool",
|
|
205341
205345
|
websiteUrl: PRODUCT_URL
|
|
205342
205346
|
}, {
|
|
@@ -205690,7 +205694,7 @@ var init_client5 = __esm(() => {
|
|
|
205690
205694
|
const client2 = new Client({
|
|
205691
205695
|
name: "theus-code",
|
|
205692
205696
|
title: "Theus",
|
|
205693
|
-
version: { VERSION: "0.2.
|
|
205697
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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",
|
|
205694
205698
|
description: "Theus's agentic coding tool",
|
|
205695
205699
|
websiteUrl: PRODUCT_URL
|
|
205696
205700
|
}, {
|
|
@@ -210513,7 +210517,7 @@ async function getImageFromClipboard() {
|
|
|
210513
210517
|
const sharp = await getImageProcessor();
|
|
210514
210518
|
imageBuffer = await sharp(imageBuffer).png().toBuffer();
|
|
210515
210519
|
}
|
|
210516
|
-
const resized = await
|
|
210520
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, "png");
|
|
210517
210521
|
const base64Image = resized.buffer.toString("base64");
|
|
210518
210522
|
const mediaType = detectImageFormatFromBase64(base64Image);
|
|
210519
210523
|
execa(commands.deleteFile, { shell: true, reject: false });
|
|
@@ -210604,7 +210608,7 @@ async function tryReadImageFromPath(text) {
|
|
|
210604
210608
|
imageBuffer = await sharp(imageBuffer).png().toBuffer();
|
|
210605
210609
|
}
|
|
210606
210610
|
const ext = extname7(imagePath).slice(1).toLowerCase() || "png";
|
|
210607
|
-
const resized = await
|
|
210611
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, imageBuffer.length, ext);
|
|
210608
210612
|
const base64Image = resized.buffer.toString("base64");
|
|
210609
210613
|
const mediaType = detectImageFormatFromBase64(base64Image);
|
|
210610
210614
|
return {
|
|
@@ -216268,7 +216272,7 @@ async function initializeBetaTracing(resource) {
|
|
|
216268
216272
|
});
|
|
216269
216273
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216270
216274
|
setLoggerProvider(loggerProvider);
|
|
216271
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216275
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216272
216276
|
setEventLogger(eventLogger);
|
|
216273
216277
|
process.on("beforeExit", async () => {
|
|
216274
216278
|
await loggerProvider?.forceFlush();
|
|
@@ -216308,7 +216312,7 @@ async function initializeTelemetry() {
|
|
|
216308
216312
|
const platform4 = getPlatform();
|
|
216309
216313
|
const baseAttributes = {
|
|
216310
216314
|
[ATTR_SERVICE_NAME]: "theus-code",
|
|
216311
|
-
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.
|
|
216315
|
+
[ATTR_SERVICE_VERSION]: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
216312
216316
|
};
|
|
216313
216317
|
if (platform4 === "wsl") {
|
|
216314
216318
|
const wslVersion = getWslVersion();
|
|
@@ -216353,7 +216357,7 @@ async function initializeTelemetry() {
|
|
|
216353
216357
|
} catch {}
|
|
216354
216358
|
};
|
|
216355
216359
|
registerCleanup(shutdownTelemetry2);
|
|
216356
|
-
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216360
|
+
return meterProvider2.getMeter("com.theus.theus_code", { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216357
216361
|
}
|
|
216358
216362
|
const meterProvider = new MeterProvider({
|
|
216359
216363
|
resource,
|
|
@@ -216373,7 +216377,7 @@ async function initializeTelemetry() {
|
|
|
216373
216377
|
});
|
|
216374
216378
|
logs.setGlobalLoggerProvider(loggerProvider);
|
|
216375
216379
|
setLoggerProvider(loggerProvider);
|
|
216376
|
-
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.
|
|
216380
|
+
const eventLogger = logs.getLogger("com.theus.theus_code.events", { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216377
216381
|
setEventLogger(eventLogger);
|
|
216378
216382
|
logForDebugging("[3P telemetry] Event logger set successfully");
|
|
216379
216383
|
process.on("beforeExit", async () => {
|
|
@@ -216435,7 +216439,7 @@ Current timeout: ${timeoutMs}ms
|
|
|
216435
216439
|
}
|
|
216436
216440
|
};
|
|
216437
216441
|
registerCleanup(shutdownTelemetry);
|
|
216438
|
-
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.
|
|
216442
|
+
return meterProvider.getMeter("com.theus.theus_code", { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
216439
216443
|
}
|
|
216440
216444
|
async function flushTelemetry() {
|
|
216441
216445
|
const meterProvider = getMeterProvider();
|
|
@@ -216975,7 +216979,7 @@ async function installOrUpdateTheusPackage(channel2, specificVersion) {
|
|
|
216975
216979
|
return "install_failed";
|
|
216976
216980
|
}
|
|
216977
216981
|
const versionSpec = specificVersion ? specificVersion : channel2 === "stable" ? "stable" : "latest";
|
|
216978
|
-
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.
|
|
216982
|
+
const result = await execFileNoThrowWithCwd("npm", ["install", `${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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 });
|
|
216979
216983
|
if (result.code !== 0) {
|
|
216980
216984
|
const error40 = new Error(`Failed to install Theus CLI package: ${result.stderr}`);
|
|
216981
216985
|
logError2(error40);
|
|
@@ -217121,9 +217125,9 @@ async function assertMinVersion() {
|
|
|
217121
217125
|
if (false) {}
|
|
217122
217126
|
try {
|
|
217123
217127
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
217124
|
-
if (versionConfig.minVersion && lt({ VERSION: "0.2.
|
|
217128
|
+
if (versionConfig.minVersion && lt({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
217125
217129
|
console.error(`
|
|
217126
|
-
It looks like your version of Theus (${{ VERSION: "0.2.
|
|
217130
|
+
It looks like your version of Theus (${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
|
|
217127
217131
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
217128
217132
|
|
|
217129
217133
|
To update, please run:
|
|
@@ -217264,7 +217268,7 @@ async function getInstallationPrefix() {
|
|
|
217264
217268
|
return prefixResult.stdout.trim();
|
|
217265
217269
|
}
|
|
217266
217270
|
function getGlobalInstallPackageManager() {
|
|
217267
|
-
if ({ VERSION: "0.2.
|
|
217271
|
+
if ({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217268
217272
|
return "npm";
|
|
217269
217273
|
}
|
|
217270
217274
|
return env3.isRunningWithBun() ? "bun" : "npm";
|
|
@@ -217289,7 +217293,7 @@ async function checkGlobalInstallPermissions() {
|
|
|
217289
217293
|
}
|
|
217290
217294
|
async function getLatestVersion(channel2) {
|
|
217291
217295
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
217292
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.
|
|
217296
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", `${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217293
217297
|
if (result.code !== 0) {
|
|
217294
217298
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
217295
217299
|
if (result.stderr) {
|
|
@@ -217305,7 +217309,7 @@ async function getLatestVersion(channel2) {
|
|
|
217305
217309
|
return result.stdout.trim();
|
|
217306
217310
|
}
|
|
217307
217311
|
async function getNpmDistTags() {
|
|
217308
|
-
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.
|
|
217312
|
+
const result = await execFileNoThrowWithCwd("npm", ["view", { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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() });
|
|
217309
217313
|
if (result.code !== 0) {
|
|
217310
217314
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
217311
217315
|
return { latest: null, stable: null };
|
|
@@ -217345,7 +217349,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217345
217349
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
217346
217350
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
217347
217351
|
pid: process.pid,
|
|
217348
|
-
currentVersion: { VERSION: "0.2.
|
|
217352
|
+
currentVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217349
217353
|
});
|
|
217350
217354
|
return "in_progress";
|
|
217351
217355
|
}
|
|
@@ -217354,7 +217358,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
217354
217358
|
if (!env3.isRunningWithBun() && env3.isNpmFromWindowsPath()) {
|
|
217355
217359
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
217356
217360
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
217357
|
-
currentVersion: { VERSION: "0.2.
|
|
217361
|
+
currentVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
217358
217362
|
});
|
|
217359
217363
|
console.error(`
|
|
217360
217364
|
Error: Windows NPM detected in WSL
|
|
@@ -217373,7 +217377,7 @@ To fix this issue:
|
|
|
217373
217377
|
if (!hasPermissions) {
|
|
217374
217378
|
return "no_permissions";
|
|
217375
217379
|
}
|
|
217376
|
-
const packageSpec = specificVersion ? `${{ VERSION: "0.2.
|
|
217380
|
+
const packageSpec = specificVersion ? `${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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;
|
|
217377
217381
|
const packageManager = getGlobalInstallPackageManager();
|
|
217378
217382
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
217379
217383
|
if (installResult.code !== 0) {
|
|
@@ -217701,8 +217705,8 @@ async function detectMultipleInstallations() {
|
|
|
217701
217705
|
installations.push({ type: "npm-local", path: localPath });
|
|
217702
217706
|
}
|
|
217703
217707
|
const packagesToCheck = ["@theus-ai/theus-code"];
|
|
217704
|
-
if ({ VERSION: "0.2.
|
|
217705
|
-
packagesToCheck.push({ VERSION: "0.2.
|
|
217708
|
+
if ({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217709
|
+
packagesToCheck.push({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
217706
217710
|
}
|
|
217707
217711
|
const npmResult = await execFileNoThrow("npm", [
|
|
217708
217712
|
"-g",
|
|
@@ -217885,7 +217889,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
217885
217889
|
}
|
|
217886
217890
|
async function getDoctorDiagnostic() {
|
|
217887
217891
|
const installationType = await getCurrentInstallationType();
|
|
217888
|
-
const version2 = { VERSION: "0.2.
|
|
217892
|
+
const version2 = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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";
|
|
217889
217893
|
const installationPath = await getInstallationPath();
|
|
217890
217894
|
const invokedBinary = getInvokedBinary();
|
|
217891
217895
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -217897,8 +217901,8 @@ async function getDoctorDiagnostic() {
|
|
|
217897
217901
|
for (const install of npmInstalls) {
|
|
217898
217902
|
if (install.type === "npm-global") {
|
|
217899
217903
|
let uninstallCmd = "npm -g uninstall @theus-ai/theus-code";
|
|
217900
|
-
if ({ VERSION: "0.2.
|
|
217901
|
-
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.
|
|
217904
|
+
if ({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
217905
|
+
uninstallCmd += ` && npm -g uninstall ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
217902
217906
|
}
|
|
217903
217907
|
warnings.push({
|
|
217904
217908
|
issue: `Leftover npm global installation at ${install.path}`,
|
|
@@ -218010,7 +218014,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218010
218014
|
const startTime2 = Date.now();
|
|
218011
218015
|
const { stdout, code, stderr } = await execFileNoThrowWithCwd("npm", [
|
|
218012
218016
|
"view",
|
|
218013
|
-
`${{ VERSION: "0.2.
|
|
218017
|
+
`${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`,
|
|
218014
218018
|
"version",
|
|
218015
218019
|
"--prefer-online",
|
|
218016
218020
|
"--registry",
|
|
@@ -218034,7 +218038,7 @@ async function getLatestVersionFromArtifactory(tag2 = "latest") {
|
|
|
218034
218038
|
latency_ms: latencyMs,
|
|
218035
218039
|
source_npm: true
|
|
218036
218040
|
});
|
|
218037
|
-
logForDebugging(`npm view ${{ VERSION: "0.2.
|
|
218041
|
+
logForDebugging(`npm view ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218038
218042
|
const latestVersion = stdout.trim();
|
|
218039
218043
|
return latestVersion;
|
|
218040
218044
|
}
|
|
@@ -218090,7 +218094,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218090
218094
|
const fs3 = getFsImplementation();
|
|
218091
218095
|
await fs3.rm(stagingPath, { recursive: true, force: true });
|
|
218092
218096
|
const platform4 = getPlatform2();
|
|
218093
|
-
const platformPackageName = `${{ VERSION: "0.2.
|
|
218097
|
+
const platformPackageName = `${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`;
|
|
218094
218098
|
logForDebugging(`Fetching integrity hash for ${platformPackageName}@${version2}`);
|
|
218095
218099
|
const {
|
|
218096
218100
|
stdout: integrityOutput,
|
|
@@ -218119,7 +218123,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218119
218123
|
name: "theus-native-installer",
|
|
218120
218124
|
version: "0.0.1",
|
|
218121
218125
|
dependencies: {
|
|
218122
|
-
[{ VERSION: "0.2.
|
|
218126
|
+
[{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218123
218127
|
}
|
|
218124
218128
|
};
|
|
218125
218129
|
const packageLock = {
|
|
@@ -218132,10 +218136,10 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218132
218136
|
name: "theus-native-installer",
|
|
218133
218137
|
version: "0.0.1",
|
|
218134
218138
|
dependencies: {
|
|
218135
|
-
[{ VERSION: "0.2.
|
|
218139
|
+
[{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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
|
|
218136
218140
|
}
|
|
218137
218141
|
},
|
|
218138
|
-
[`node_modules/${{ VERSION: "0.2.
|
|
218142
|
+
[`node_modules/${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`]: {
|
|
218139
218143
|
version: version2,
|
|
218140
218144
|
optionalDependencies: {
|
|
218141
218145
|
[platformPackageName]: version2
|
|
@@ -218157,7 +218161,7 @@ async function downloadVersionFromArtifactory(version2, stagingPath) {
|
|
|
218157
218161
|
if (result.code !== 0) {
|
|
218158
218162
|
throw new Error(`npm ci failed with code ${result.code}: ${result.stderr}`);
|
|
218159
218163
|
}
|
|
218160
|
-
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.
|
|
218164
|
+
logForDebugging(`Successfully downloaded and verified ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
218161
218165
|
}
|
|
218162
218166
|
function getStallTimeoutMs() {
|
|
218163
218167
|
return Number(process.env.THEUS_CODE_STALL_TIMEOUT_MS_FOR_TESTING) || DEFAULT_STALL_TIMEOUT_MS;
|
|
@@ -218820,8 +218824,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
218820
218824
|
const maxVersion = await getMaxVersion();
|
|
218821
218825
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
218822
218826
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
218823
|
-
if (gte({ VERSION: "0.2.
|
|
218824
|
-
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.
|
|
218827
|
+
if (gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
218828
|
+
logForDebugging(`Native installer: current version ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
|
|
218825
218829
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
218826
218830
|
latency_ms: Date.now() - startTime2,
|
|
218827
218831
|
max_version: maxVersion,
|
|
@@ -218832,7 +218836,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
218832
218836
|
version2 = maxVersion;
|
|
218833
218837
|
}
|
|
218834
218838
|
}
|
|
218835
|
-
if (!forceReinstall && version2 === { VERSION: "0.2.
|
|
218839
|
+
if (!forceReinstall && version2 === { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
218836
218840
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
218837
218841
|
logEvent("tengu_native_update_complete", {
|
|
218838
218842
|
latency_ms: Date.now() - startTime2,
|
|
@@ -219582,8 +219586,8 @@ async function cleanupNpmInstallations() {
|
|
|
219582
219586
|
} else if (codePackageResult.error) {
|
|
219583
219587
|
errors4.push(codePackageResult.error);
|
|
219584
219588
|
}
|
|
219585
|
-
if ({ VERSION: "0.2.
|
|
219586
|
-
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.
|
|
219589
|
+
if ({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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") {
|
|
219590
|
+
const macroPackageResult = await attemptNpmUninstall({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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);
|
|
219587
219591
|
if (macroPackageResult.success) {
|
|
219588
219592
|
removed++;
|
|
219589
219593
|
if (macroPackageResult.warning) {
|
|
@@ -230069,6 +230073,27 @@ var init_ConsoleOAuthFlow = __esm(() => {
|
|
|
230069
230073
|
var NOVEDADES;
|
|
230070
230074
|
var init_data = __esm(() => {
|
|
230071
230075
|
NOVEDADES = [
|
|
230076
|
+
{
|
|
230077
|
+
version: "v0.2.50",
|
|
230078
|
+
fecha: "2026-07-24",
|
|
230079
|
+
titulo: "Windows: ahora sabemos que funciona",
|
|
230080
|
+
puntos: [
|
|
230081
|
+
"Theus se instala y arranca en Windows nativo con \xABnpm install -g theus-cli\xBB (necesitas Bun), verificado en pruebas autom\xE1ticas sobre x64 y arm64. Antes la documentaci\xF3n te mandaba a WSL sin que nadie lo hubiera comprobado.",
|
|
230082
|
+
"WSL sigue siendo el camino m\xE1s rodado y es lo que recomendamos si prefieres no gestionar Bun a mano: ah\xED el instalador oficial funciona igual que en Linux.",
|
|
230083
|
+
"Honestidad: las pruebas cubren que instale y arranque, no una sesi\xF3n completa. Puede haber detalles \xE1speros en Windows nativo.",
|
|
230084
|
+
"Corregidos dos fallos que salieron al probarlo: rutas rotas al compilar en Windows, y un par\xE1metro mal declarado que pod\xEDa tumbar \xABtheus --help\xBB tras una instalaci\xF3n limpia en cualquier sistema."
|
|
230085
|
+
]
|
|
230086
|
+
},
|
|
230087
|
+
{
|
|
230088
|
+
version: "v0.2.49",
|
|
230089
|
+
fecha: "2026-07-24",
|
|
230090
|
+
titulo: "Editar im\xE1genes, no solo crearlas",
|
|
230091
|
+
puntos: [
|
|
230092
|
+
"Ya puedes pedirle que retoque una imagen: cambiar el fondo, recolorear, quitar algo o combinar varias. Le describes el cambio y \xE9l transforma la que le diste, en vez de empezar de cero.",
|
|
230093
|
+
"Vale una imagen de tu disco \u2014incluida la que Theus acaba de generar\u2014 o un enlace. La local viaja embebida en la petici\xF3n: no se publica en ning\xFAn sitio.",
|
|
230094
|
+
"Puedes partir de hasta 14 im\xE1genes a la vez para combinarlas."
|
|
230095
|
+
]
|
|
230096
|
+
},
|
|
230072
230097
|
{
|
|
230073
230098
|
version: "v0.2.48",
|
|
230074
230099
|
fecha: "2026-07-24",
|
|
@@ -242970,6 +242995,47 @@ async function publicarImagenLocal(ruta, gateway, signal) {
|
|
|
242970
242995
|
}
|
|
242971
242996
|
return { url: json2.url };
|
|
242972
242997
|
}
|
|
242998
|
+
async function construirReferencias(entradas) {
|
|
242999
|
+
if (entradas.length > MAX_REFERENCIAS) {
|
|
243000
|
+
return {
|
|
243001
|
+
error: `Puedo usar como m\xE1ximo ${MAX_REFERENCIAS} im\xE1genes de referencia y me pasaste ${entradas.length}.`
|
|
243002
|
+
};
|
|
243003
|
+
}
|
|
243004
|
+
const refs = [];
|
|
243005
|
+
for (const bruto of entradas) {
|
|
243006
|
+
const entrada = bruto.trim();
|
|
243007
|
+
if (!entrada)
|
|
243008
|
+
continue;
|
|
243009
|
+
if (/^https?:\/\//i.test(entrada) || entrada.startsWith("data:")) {
|
|
243010
|
+
refs.push({ type: "image_url", image_url: { url: entrada } });
|
|
243011
|
+
continue;
|
|
243012
|
+
}
|
|
243013
|
+
const abs = isAbsolute14(entrada) ? entrada : join69(process.cwd(), entrada);
|
|
243014
|
+
if (!existsSync5(abs)) {
|
|
243015
|
+
return {
|
|
243016
|
+
error: `No encuentro la imagen \xAB${entrada}\xBB. P\xE1same una ruta que exista o un enlace.`
|
|
243017
|
+
};
|
|
243018
|
+
}
|
|
243019
|
+
let datos;
|
|
243020
|
+
try {
|
|
243021
|
+
datos = readFileSync13(abs);
|
|
243022
|
+
} catch (err2) {
|
|
243023
|
+
return { error: `No pude leer \xAB${entrada}\xBB: ${err2.message}` };
|
|
243024
|
+
}
|
|
243025
|
+
let base643 = datos.toString("base64");
|
|
243026
|
+
let mime = MIME_POR_EXT[(abs.split(".").pop() ?? "").toLowerCase()] ?? "image/png";
|
|
243027
|
+
try {
|
|
243028
|
+
const r = await maybeResizeAndDownsampleImageBuffer(datos, datos.length, (abs.split(".").pop() ?? "png").toLowerCase());
|
|
243029
|
+
base643 = r.buffer.toString("base64");
|
|
243030
|
+
mime = `image/${r.mediaType}`;
|
|
243031
|
+
} catch {}
|
|
243032
|
+
refs.push({
|
|
243033
|
+
type: "image_url",
|
|
243034
|
+
image_url: { url: `data:${mime};base64,${base643}` }
|
|
243035
|
+
});
|
|
243036
|
+
}
|
|
243037
|
+
return { refs };
|
|
243038
|
+
}
|
|
242973
243039
|
async function writeMedia(fileName, bytes) {
|
|
242974
243040
|
const cwd2 = process.cwd();
|
|
242975
243041
|
const dir = join69(cwd2, MEDIA_DIR);
|
|
@@ -243002,6 +243068,15 @@ function createTheusMediaAdapter(options2 = {}) {
|
|
|
243002
243068
|
const size = request.params?.size;
|
|
243003
243069
|
if (typeof size === "string" && size)
|
|
243004
243070
|
body.size = size;
|
|
243071
|
+
const refsIn = request.params?.inputImages;
|
|
243072
|
+
if (Array.isArray(refsIn) && refsIn.length) {
|
|
243073
|
+
const construidas = await construirReferencias(refsIn.filter((x2) => typeof x2 === "string"));
|
|
243074
|
+
if ("error" in construidas) {
|
|
243075
|
+
return respond("image", construidas.error, start, imageModel);
|
|
243076
|
+
}
|
|
243077
|
+
if (construidas.refs.length)
|
|
243078
|
+
body.input_references = construidas.refs;
|
|
243079
|
+
}
|
|
243005
243080
|
const res = await fetch(`${gateway.baseURL}/images/generations`, {
|
|
243006
243081
|
method: "POST",
|
|
243007
243082
|
headers: headersFor(gateway),
|
|
@@ -243149,7 +243224,7 @@ Para verla: \`open ${rel}\` (no la leas al contexto).`, start, imageModel, { gat
|
|
|
243149
243224
|
}
|
|
243150
243225
|
};
|
|
243151
243226
|
}
|
|
243152
|
-
var OFFICIAL_PROVIDER_ID = "theus-official", MEDIA_DIR = "theus-media", DEFAULT_IMAGE_MODEL = "theus-image-flash", DEFAULT_VIDEO_MODEL = "theus-video", VIDEO_POLL_MS = 5000, VIDEO_TIMEOUT_MS, PREVIEW_TOKEN_BUDGET = 700, LOGIN_HINT = "Inicia sesi\xF3n con `theus login` para generar im\xE1genes/video con tu suscripci\xF3n.", CAPS3, MIME_POR_EXT;
|
|
243227
|
+
var OFFICIAL_PROVIDER_ID = "theus-official", MEDIA_DIR = "theus-media", DEFAULT_IMAGE_MODEL = "theus-image-flash", DEFAULT_VIDEO_MODEL = "theus-video", VIDEO_POLL_MS = 5000, VIDEO_TIMEOUT_MS, PREVIEW_TOKEN_BUDGET = 700, LOGIN_HINT = "Inicia sesi\xF3n con `theus login` para generar im\xE1genes/video con tu suscripci\xF3n.", CAPS3, MIME_POR_EXT, MAX_REFERENCIAS = 14;
|
|
243153
243228
|
var init_media = __esm(() => {
|
|
243154
243229
|
init_imageResizer();
|
|
243155
243230
|
init_entryApiKey();
|
|
@@ -261733,7 +261808,7 @@ async function resizeShellImageOutput(stdout, outputFilePath, outputFileSize) {
|
|
|
261733
261808
|
return null;
|
|
261734
261809
|
const buf = Buffer.from(parsed.data, "base64");
|
|
261735
261810
|
const ext = parsed.mediaType.split("/")[1] || "png";
|
|
261736
|
-
const resized = await
|
|
261811
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(buf, buf.length, ext);
|
|
261737
261812
|
return `data:image/${resized.mediaType};base64,${resized.buffer.toString("base64")}`;
|
|
261738
261813
|
}
|
|
261739
261814
|
function formatOutput(content) {
|
|
@@ -278498,7 +278573,8 @@ var init_ProviderTool = __esm(() => {
|
|
|
278498
278573
|
combine: exports_external.boolean().optional().describe("Run EVERY enabled provider per capability and fuse them (default: pick the single best)."),
|
|
278499
278574
|
size: exports_external.string().optional().describe('Imagen: resoluci\xF3n/relaci\xF3n como "1024x1024", "1024x1792" (vertical 9:16) o "1792x1024" (horizontal 16:9). Omite para el default del modelo.'),
|
|
278500
278575
|
durationSec: exports_external.number().int().positive().optional().describe("Video: duraci\xF3n del clip en segundos (p.ej. 4, 6, 8). Omite para el default del modelo."),
|
|
278501
|
-
imagenUrl: exports_external.string().optional().describe("Video a partir de una IMAGEN: la imagen que se usar\xE1 como primer fotograma. Acepta un enlace https o la RUTA LOCAL de un archivo (p. ej. la imagen que acabas de generar en theus-media/); en ese caso se publica sola con una URL temporal.")
|
|
278576
|
+
imagenUrl: exports_external.string().optional().describe("Video a partir de una IMAGEN: la imagen que se usar\xE1 como primer fotograma. Acepta un enlace https o la RUTA LOCAL de un archivo (p. ej. la imagen que acabas de generar en theus-media/); en ese caso se publica sola con una URL temporal."),
|
|
278577
|
+
editarImagenes: exports_external.array(exports_external.string()).max(14).optional().describe("EDITAR imagen: rutas locales o enlaces de las im\xE1genes de partida (hasta 14). Con esto el modelo TRANSFORMA lo que le das \u2014retocar, recolorear, cambiar el fondo, combinar varias\u2014 en vez de crear desde cero. El prompt debe describir el CAMBIO que quieres, no la escena entera.")
|
|
278502
278578
|
}));
|
|
278503
278579
|
ProviderTool = buildTool({
|
|
278504
278580
|
name: PROVIDER_TOOL_NAME,
|
|
@@ -278532,8 +278608,11 @@ var init_ProviderTool = __esm(() => {
|
|
|
278532
278608
|
async call(input, context2) {
|
|
278533
278609
|
const router = new Router(getRegistry());
|
|
278534
278610
|
const params = {};
|
|
278535
|
-
if (typeof input.size === "string" && input.size) {
|
|
278536
|
-
params.image = {
|
|
278611
|
+
if (typeof input.size === "string" && input.size || input.editarImagenes?.length) {
|
|
278612
|
+
params.image = {
|
|
278613
|
+
...typeof input.size === "string" && input.size ? { size: input.size } : {},
|
|
278614
|
+
...input.editarImagenes?.length ? { inputImages: input.editarImagenes } : {}
|
|
278615
|
+
};
|
|
278537
278616
|
}
|
|
278538
278617
|
if (typeof input.durationSec === "number" || input.imagenUrl) {
|
|
278539
278618
|
params.video = {
|
|
@@ -279406,7 +279485,7 @@ async function captura() {
|
|
|
279406
279485
|
await writeFile27(ruta, bruto);
|
|
279407
279486
|
setEstadoNavegador({ estado: "listo", capturaPath: ruta, mensaje: undefined });
|
|
279408
279487
|
try {
|
|
279409
|
-
const r = await
|
|
279488
|
+
const r = await maybeResizeAndDownsampleImageBuffer2(bruto, bruto.length, "png");
|
|
279410
279489
|
return {
|
|
279411
279490
|
ruta,
|
|
279412
279491
|
base64: r.buffer.toString("base64"),
|
|
@@ -304873,9 +304952,9 @@ function getTheusEnvMetadata() {
|
|
|
304873
304952
|
};
|
|
304874
304953
|
}
|
|
304875
304954
|
function getBuildAgeMinutes() {
|
|
304876
|
-
if (!{ VERSION: "0.2.
|
|
304955
|
+
if (!{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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)
|
|
304877
304956
|
return;
|
|
304878
|
-
const buildTime = new Date({ VERSION: "0.2.
|
|
304957
|
+
const buildTime = new Date({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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();
|
|
304879
304958
|
if (isNaN(buildTime))
|
|
304880
304959
|
return;
|
|
304881
304960
|
return Math.floor((Date.now() - buildTime) / 60000);
|
|
@@ -309747,7 +309826,7 @@ async function callInner(file_path, fullFilePath, resolvedFilePath, ext, offset,
|
|
|
309747
309826
|
const imageBlocks = await Promise.all(imageFiles.map(async (f) => {
|
|
309748
309827
|
const imgPath = path14.join(extractResult.data.file.outputDir, f);
|
|
309749
309828
|
const imgBuffer = await readFileAsync(imgPath);
|
|
309750
|
-
const resized = await
|
|
309829
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imgBuffer, imgBuffer.length, "jpeg");
|
|
309751
309830
|
return {
|
|
309752
309831
|
type: "image",
|
|
309753
309832
|
source: {
|
|
@@ -309882,7 +309961,7 @@ async function readImageWithTokenBudget(filePath, maxTokens = getDefaultFileRead
|
|
|
309882
309961
|
const detectedFormat = detectedMediaType.split("/")[1] || "png";
|
|
309883
309962
|
let result;
|
|
309884
309963
|
try {
|
|
309885
|
-
const resized = await
|
|
309964
|
+
const resized = await maybeResizeAndDownsampleImageBuffer2(imageBuffer, originalSize, detectedFormat);
|
|
309886
309965
|
result = createImageResponse(resized.buffer, resized.mediaType, originalSize, resized.dimensions);
|
|
309887
309966
|
} catch (e) {
|
|
309888
309967
|
if (e instanceof ImageResizeError)
|
|
@@ -321523,7 +321602,7 @@ function getAssistantMessageFromError(error40, model, options2) {
|
|
|
321523
321602
|
if (process.env.USER_TYPE === "ant") {
|
|
321524
321603
|
const baseMessage = `API Error: 400 ${error40.message}
|
|
321525
321604
|
|
|
321526
|
-
Run /share and post the JSON file to ${{ VERSION: "0.2.
|
|
321605
|
+
Run /share and post the JSON file to ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}.`;
|
|
321527
321606
|
const rewindInstruction = getIsNonInteractiveSession() ? "" : " Then, use /rewind to recover the conversation.";
|
|
321528
321607
|
return createAssistantAPIErrorMessage({
|
|
321529
321608
|
content: baseMessage + rewindInstruction,
|
|
@@ -321559,7 +321638,7 @@ Run /share and post the JSON file to ${{ VERSION: "0.2.48", BUILD_TIME: "1970-01
|
|
|
321559
321638
|
if (process.env.USER_TYPE === "ant" && !process.env.THEUS_MODEL && error40 instanceof Error && error40.message.toLowerCase().includes("invalid model name")) {
|
|
321560
321639
|
const orgId = getOauthAccountInfo()?.organizationUuid;
|
|
321561
321640
|
const baseMsg = `[THEUS-INTERNAL] Your org isn't gated into the \`${model}\` model. Either run \`theus\` with \`THEUS_MODEL=${getDefaultMainLoopModelSetting()}\``;
|
|
321562
|
-
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.
|
|
321641
|
+
const msg = orgId ? `${baseMsg} or share your orgId (${orgId}) in ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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.`;
|
|
321563
321642
|
return createAssistantAPIErrorMessage({
|
|
321564
321643
|
content: msg,
|
|
321565
321644
|
error: "invalid_request"
|
|
@@ -331732,7 +331811,7 @@ function buildPrimarySection() {
|
|
|
331732
331811
|
});
|
|
331733
331812
|
return [{
|
|
331734
331813
|
label: "Version",
|
|
331735
|
-
value: { VERSION: "0.2.
|
|
331814
|
+
value: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
331736
331815
|
}, {
|
|
331737
331816
|
label: "Session name",
|
|
331738
331817
|
value: nameValue
|
|
@@ -335548,7 +335627,7 @@ function Config({
|
|
|
335548
335627
|
}
|
|
335549
335628
|
})
|
|
335550
335629
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime188.jsx(ChannelDowngradeDialog, {
|
|
335551
|
-
currentVersion: { VERSION: "0.2.
|
|
335630
|
+
currentVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
335552
335631
|
onChoice: (choice) => {
|
|
335553
335632
|
setShowSubmenu(null);
|
|
335554
335633
|
setTabsHidden(false);
|
|
@@ -335560,7 +335639,7 @@ function Config({
|
|
|
335560
335639
|
autoUpdatesChannel: "stable"
|
|
335561
335640
|
};
|
|
335562
335641
|
if (choice === "stay") {
|
|
335563
|
-
newSettings.minimumVersion = { VERSION: "0.2.
|
|
335642
|
+
newSettings.minimumVersion = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
335564
335643
|
}
|
|
335565
335644
|
updateSettingsForSource("userSettings", newSettings);
|
|
335566
335645
|
setSettingsData((prev_27) => ({
|
|
@@ -343594,7 +343673,7 @@ function HelpV2(t0) {
|
|
|
343594
343673
|
let t6;
|
|
343595
343674
|
if ($2[31] !== tabs) {
|
|
343596
343675
|
t6 = /* @__PURE__ */ jsx_runtime215.jsx(Tabs, {
|
|
343597
|
-
title: `Theus v${{ VERSION: "0.2.
|
|
343676
|
+
title: `Theus v${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}`,
|
|
343598
343677
|
color: "professionalBlue",
|
|
343599
343678
|
defaultTab: "general",
|
|
343600
343679
|
children: tabs
|
|
@@ -361718,7 +361797,7 @@ function Onboarding({
|
|
|
361718
361797
|
flexDirection: "column",
|
|
361719
361798
|
children: [
|
|
361720
361799
|
/* @__PURE__ */ jsx_runtime248.jsx(TheusBanner, {
|
|
361721
|
-
version: { VERSION: "0.2.
|
|
361800
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
361722
361801
|
}),
|
|
361723
361802
|
/* @__PURE__ */ jsx_runtime248.jsxs(ThemedBox_default, {
|
|
361724
361803
|
flexDirection: "column",
|
|
@@ -362219,9 +362298,9 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
362219
362298
|
return [];
|
|
362220
362299
|
}
|
|
362221
362300
|
}
|
|
362222
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.
|
|
362301
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
362223
362302
|
if (process.env.USER_TYPE === "ant") {
|
|
362224
|
-
const changelog = { VERSION: "0.2.
|
|
362303
|
+
const changelog = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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;
|
|
362225
362304
|
if (changelog) {
|
|
362226
362305
|
const commits = changelog.trim().split(`
|
|
362227
362306
|
`).filter(Boolean);
|
|
@@ -366423,7 +366502,7 @@ var init_Messages = __esm(() => {
|
|
|
366423
366502
|
let t1;
|
|
366424
366503
|
if ($2[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
366425
366504
|
t1 = /* @__PURE__ */ jsx_runtime260.jsx(TheusSessionHeader, {
|
|
366426
|
-
version: { VERSION: "0.2.
|
|
366505
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
366427
366506
|
});
|
|
366428
366507
|
$2[0] = t1;
|
|
366429
366508
|
} else {
|
|
@@ -394899,7 +394978,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
394899
394978
|
smapsRollup,
|
|
394900
394979
|
platform: process.platform,
|
|
394901
394980
|
nodeVersion: process.version,
|
|
394902
|
-
ccVersion: { VERSION: "0.2.
|
|
394981
|
+
ccVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
394903
394982
|
};
|
|
394904
394983
|
}
|
|
394905
394984
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -395485,7 +395564,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
395485
395564
|
var call58 = async () => {
|
|
395486
395565
|
return {
|
|
395487
395566
|
type: "text",
|
|
395488
|
-
value: { VERSION: "0.2.
|
|
395567
|
+
value: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
395489
395568
|
};
|
|
395490
395569
|
}, version2, version_default;
|
|
395491
395570
|
var init_version = __esm(() => {
|
|
@@ -399927,13 +400006,13 @@ async function updateReleaseBundle() {
|
|
|
399927
400006
|
await gracefulShutdown(1);
|
|
399928
400007
|
return;
|
|
399929
400008
|
}
|
|
399930
|
-
if (gte({ VERSION: "0.2.
|
|
399931
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400009
|
+
if (gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
400010
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
399932
400011
|
`);
|
|
399933
400012
|
await gracefulShutdown(0);
|
|
399934
400013
|
return;
|
|
399935
400014
|
}
|
|
399936
|
-
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.
|
|
400015
|
+
writeToStdout(`New version available: ${latest} (current: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
399937
400016
|
`);
|
|
399938
400017
|
writeToStdout(`Installing update from theus.pe/dl...
|
|
399939
400018
|
`);
|
|
@@ -399967,7 +400046,7 @@ async function updateReleaseBundle() {
|
|
|
399967
400046
|
return;
|
|
399968
400047
|
}
|
|
399969
400048
|
cpSync(staged, bundleDir, { recursive: true, force: true });
|
|
399970
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400049
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
399971
400050
|
`);
|
|
399972
400051
|
await regenerateCompletionCache();
|
|
399973
400052
|
} finally {
|
|
@@ -399980,7 +400059,7 @@ async function updateReleaseBundle() {
|
|
|
399980
400059
|
async function update() {
|
|
399981
400060
|
logEvent("tengu_update_check", {});
|
|
399982
400061
|
await updateNaupa();
|
|
399983
|
-
writeToStdout(`Current version: ${{ VERSION: "0.2.
|
|
400062
|
+
writeToStdout(`Current version: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
399984
400063
|
`);
|
|
399985
400064
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
399986
400065
|
writeToStdout(`Checking for updates to ${channel2} version...
|
|
@@ -400059,8 +400138,8 @@ async function update() {
|
|
|
400059
400138
|
writeToStdout(`Theus is managed by Homebrew.
|
|
400060
400139
|
`);
|
|
400061
400140
|
const latest = await getLatestVersion(channel2);
|
|
400062
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400063
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
400141
|
+
if (latest && !gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
400142
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
400064
400143
|
`);
|
|
400065
400144
|
writeToStdout(`
|
|
400066
400145
|
`);
|
|
@@ -400076,8 +400155,8 @@ async function update() {
|
|
|
400076
400155
|
writeToStdout(`Theus is managed by winget.
|
|
400077
400156
|
`);
|
|
400078
400157
|
const latest = await getLatestVersion(channel2);
|
|
400079
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400080
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
400158
|
+
if (latest && !gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
400159
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
400081
400160
|
`);
|
|
400082
400161
|
writeToStdout(`
|
|
400083
400162
|
`);
|
|
@@ -400093,8 +400172,8 @@ async function update() {
|
|
|
400093
400172
|
writeToStdout(`Theus is managed by apk.
|
|
400094
400173
|
`);
|
|
400095
400174
|
const latest = await getLatestVersion(channel2);
|
|
400096
|
-
if (latest && !gte({ VERSION: "0.2.
|
|
400097
|
-
writeToStdout(`Update available: ${{ VERSION: "0.2.
|
|
400175
|
+
if (latest && !gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
400176
|
+
writeToStdout(`Update available: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}
|
|
400098
400177
|
`);
|
|
400099
400178
|
writeToStdout(`
|
|
400100
400179
|
`);
|
|
@@ -400159,11 +400238,11 @@ async function update() {
|
|
|
400159
400238
|
`);
|
|
400160
400239
|
await gracefulShutdown(1);
|
|
400161
400240
|
}
|
|
400162
|
-
if (result.latestVersion === { VERSION: "0.2.
|
|
400163
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400241
|
+
if (result.latestVersion === { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
400242
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
400164
400243
|
`);
|
|
400165
400244
|
} else {
|
|
400166
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400245
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
400167
400246
|
`);
|
|
400168
400247
|
await regenerateCompletionCache();
|
|
400169
400248
|
}
|
|
@@ -400182,9 +400261,9 @@ async function update() {
|
|
|
400182
400261
|
await removeInstalledSymlink();
|
|
400183
400262
|
}
|
|
400184
400263
|
logForDebugging("update: Checking npm registry for latest version");
|
|
400185
|
-
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.
|
|
400264
|
+
logForDebugging(`update: Package URL: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`);
|
|
400186
400265
|
const npmTag = channel2 === "stable" ? "stable" : "latest";
|
|
400187
|
-
const npmCommand = `npm view ${{ VERSION: "0.2.
|
|
400266
|
+
const npmCommand = `npm view ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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`;
|
|
400188
400267
|
logForDebugging(`update: Running: ${npmCommand}`);
|
|
400189
400268
|
const latestVersion = await getLatestVersion(channel2);
|
|
400190
400269
|
logForDebugging(`update: Latest version from npm: ${latestVersion || "FAILED"}`);
|
|
@@ -400204,7 +400283,7 @@ async function update() {
|
|
|
400204
400283
|
`);
|
|
400205
400284
|
process.stderr.write(` \u2022 Corporate proxy/firewall blocking npm
|
|
400206
400285
|
`);
|
|
400207
|
-
if ({ VERSION: "0.2.
|
|
400286
|
+
if ({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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")) {
|
|
400208
400287
|
process.stderr.write(` \u2022 Internal/development build not published to npm
|
|
400209
400288
|
`);
|
|
400210
400289
|
}
|
|
@@ -400216,19 +400295,19 @@ async function update() {
|
|
|
400216
400295
|
`);
|
|
400217
400296
|
process.stderr.write(` \u2022 Run with --debug flag for more details
|
|
400218
400297
|
`);
|
|
400219
|
-
const packageName = { VERSION: "0.2.
|
|
400298
|
+
const packageName = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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");
|
|
400220
400299
|
process.stderr.write(` \u2022 Manually check: npm view ${packageName} version
|
|
400221
400300
|
`);
|
|
400222
400301
|
process.stderr.write(` \u2022 Check if you need to login: npm whoami
|
|
400223
400302
|
`);
|
|
400224
400303
|
await gracefulShutdown(1);
|
|
400225
400304
|
}
|
|
400226
|
-
if (gte({ VERSION: "0.2.
|
|
400227
|
-
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.
|
|
400305
|
+
if (gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
400306
|
+
writeToStdout(source_default.green(`Theus is up to date (${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})`) + `
|
|
400228
400307
|
`);
|
|
400229
400308
|
await gracefulShutdown(0);
|
|
400230
400309
|
}
|
|
400231
|
-
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.
|
|
400310
|
+
writeToStdout(`New version available: ${latestVersion} (current: ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION})
|
|
400232
400311
|
`);
|
|
400233
400312
|
writeToStdout(`Installing update...
|
|
400234
400313
|
`);
|
|
@@ -400273,7 +400352,7 @@ async function update() {
|
|
|
400273
400352
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
400274
400353
|
switch (status2) {
|
|
400275
400354
|
case "success":
|
|
400276
|
-
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.
|
|
400355
|
+
writeToStdout(source_default.green(`Successfully updated from ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`) + `
|
|
400277
400356
|
`);
|
|
400278
400357
|
await regenerateCompletionCache();
|
|
400279
400358
|
break;
|
|
@@ -400283,7 +400362,7 @@ async function update() {
|
|
|
400283
400362
|
if (useLocalUpdate) {
|
|
400284
400363
|
process.stderr.write(`Try manually updating with:
|
|
400285
400364
|
`);
|
|
400286
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
400365
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400287
400366
|
`);
|
|
400288
400367
|
} else {
|
|
400289
400368
|
process.stderr.write(`Try running with sudo or fix npm permissions
|
|
@@ -400299,7 +400378,7 @@ async function update() {
|
|
|
400299
400378
|
if (useLocalUpdate) {
|
|
400300
400379
|
process.stderr.write(`Try manually updating with:
|
|
400301
400380
|
`);
|
|
400302
|
-
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
400381
|
+
process.stderr.write(` cd ~/.theus/local && npm update ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}
|
|
400303
400382
|
`);
|
|
400304
400383
|
} else {
|
|
400305
400384
|
process.stderr.write(`Or consider using native installation with: theus install
|
|
@@ -409382,7 +409461,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
409382
409461
|
init_settings2();
|
|
409383
409462
|
init_slowOperations();
|
|
409384
409463
|
init_uuid();
|
|
409385
|
-
VERSION4 = { VERSION: "0.2.
|
|
409464
|
+
VERSION4 = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
409386
409465
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
409387
409466
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
409388
409467
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -410587,7 +410666,7 @@ var init_filesystem = __esm(() => {
|
|
|
410587
410666
|
});
|
|
410588
410667
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
410589
410668
|
const nonce = randomBytes21(16).toString("hex");
|
|
410590
|
-
return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.
|
|
410669
|
+
return join149(getTheusTempDir(), "bundled-skills", { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
|
|
410591
410670
|
});
|
|
410592
410671
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
410593
410672
|
});
|
|
@@ -415766,7 +415845,7 @@ function getSimpleDoingTasksSection() {
|
|
|
415766
415845
|
];
|
|
415767
415846
|
const userHelpSubitems = [
|
|
415768
415847
|
`/help: Get help with using Theus`,
|
|
415769
|
-
`To give feedback, users should ${{ VERSION: "0.2.
|
|
415848
|
+
`To give feedback, users should ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
415770
415849
|
];
|
|
415771
415850
|
const items = [
|
|
415772
415851
|
`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.`,
|
|
@@ -416666,7 +416745,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
416666
416745
|
}
|
|
416667
416746
|
function computeFingerprintFromMessages(messages) {
|
|
416668
416747
|
const firstMessageText = extractFirstMessageText(messages);
|
|
416669
|
-
return computeFingerprint(firstMessageText, { VERSION: "0.2.
|
|
416748
|
+
return computeFingerprint(firstMessageText, { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
416670
416749
|
}
|
|
416671
416750
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
416672
416751
|
var init_fingerprint = () => {};
|
|
@@ -419226,7 +419305,7 @@ async function sideQuery(opts) {
|
|
|
419226
419305
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
419227
419306
|
}
|
|
419228
419307
|
const messageText = extractFirstUserMessageText(messages);
|
|
419229
|
-
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.
|
|
419308
|
+
const fingerprint = computeFingerprint(messageText, { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION);
|
|
419230
419309
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
419231
419310
|
const systemBlocks = [
|
|
419232
419311
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -420529,7 +420608,7 @@ async function handleMemories(state) {
|
|
|
420529
420608
|
async function runProjectContextMcpServer() {
|
|
420530
420609
|
const projectRoot = process.env.THEUS_PROJECT_ROOT || process.cwd();
|
|
420531
420610
|
const state = new ProjectContextState(projectRoot);
|
|
420532
|
-
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.
|
|
420611
|
+
const server2 = new Server({ name: SERVER_NAME, version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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: {} } });
|
|
420533
420612
|
server2.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
420534
420613
|
tools: TOOL_DEFINITIONS.map((t) => ({
|
|
420535
420614
|
name: t.name,
|
|
@@ -422509,7 +422588,7 @@ function createBridgeLogger(options2) {
|
|
|
422509
422588
|
connectUrl = buildBridgeConnectUrl(environmentId, cachedIngressUrl);
|
|
422510
422589
|
regenerateQr(connectUrl);
|
|
422511
422590
|
if (verbose) {
|
|
422512
|
-
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.
|
|
422591
|
+
write(source_default.dim(`Remote Control`) + ` v${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION}
|
|
422513
422592
|
`);
|
|
422514
422593
|
}
|
|
422515
422594
|
if (verbose) {
|
|
@@ -423482,7 +423561,7 @@ function appendToLog(path19, message) {
|
|
|
423482
423561
|
cwd: getFsImplementation().cwd(),
|
|
423483
423562
|
userType: process.env.USER_TYPE,
|
|
423484
423563
|
sessionId: getSessionId(),
|
|
423485
|
-
version: { VERSION: "0.2.
|
|
423564
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
423486
423565
|
};
|
|
423487
423566
|
getLogWriter(path19).write(messageWithTimestamp);
|
|
423488
423567
|
}
|
|
@@ -424752,7 +424831,7 @@ Spawn mode for this project:
|
|
|
424752
424831
|
const api2 = createBridgeApiClient({
|
|
424753
424832
|
baseUrl,
|
|
424754
424833
|
getAccessToken: getBridgeAccessToken2,
|
|
424755
|
-
runnerVersion: { VERSION: "0.2.
|
|
424834
|
+
runnerVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
424756
424835
|
onDebug: logForDebugging,
|
|
424757
424836
|
onAuth401: handleOAuth401Error2,
|
|
424758
424837
|
getTrustedDeviceToken
|
|
@@ -424990,7 +425069,7 @@ async function runBridgeHeadless(opts, signal) {
|
|
|
424990
425069
|
const api2 = createBridgeApiClient({
|
|
424991
425070
|
baseUrl,
|
|
424992
425071
|
getAccessToken: opts.getAccessToken,
|
|
424993
|
-
runnerVersion: { VERSION: "0.2.
|
|
425072
|
+
runnerVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
424994
425073
|
onDebug: log2,
|
|
424995
425074
|
onAuth401: opts.onAuth401,
|
|
424996
425075
|
getTrustedDeviceToken
|
|
@@ -429054,7 +429133,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
429054
429133
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
429055
429134
|
apiKeySource: getTheusApiKeyWithSource().source,
|
|
429056
429135
|
betas: getSdkBetas(),
|
|
429057
|
-
theus_code_version: { VERSION: "0.2.
|
|
429136
|
+
theus_code_version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
429058
429137
|
output_style: outputStyle2,
|
|
429059
429138
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
429060
429139
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -429094,8 +429173,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
429094
429173
|
}
|
|
429095
429174
|
async function checkEnvLessBridgeMinVersion() {
|
|
429096
429175
|
const cfg = await getEnvLessBridgeConfig();
|
|
429097
|
-
if (cfg.min_version && lt({ VERSION: "0.2.
|
|
429098
|
-
return `Your version of Theus (${{ VERSION: "0.2.
|
|
429176
|
+
if (cfg.min_version && lt({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
429177
|
+
return `Your version of Theus (${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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.
|
|
429099
429178
|
Version ${cfg.min_version} or higher is required. Run \`theus update\` to update.`;
|
|
429100
429179
|
}
|
|
429101
429180
|
return null;
|
|
@@ -431418,7 +431497,7 @@ async function initBridgeCore(params) {
|
|
|
431418
431497
|
const rawApi = createBridgeApiClient({
|
|
431419
431498
|
baseUrl,
|
|
431420
431499
|
getAccessToken,
|
|
431421
|
-
runnerVersion: { VERSION: "0.2.
|
|
431500
|
+
runnerVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
431422
431501
|
onDebug: logForDebugging,
|
|
431423
431502
|
onAuth401,
|
|
431424
431503
|
getTrustedDeviceToken
|
|
@@ -448159,7 +448238,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
448159
448238
|
function getSemverPart(version3) {
|
|
448160
448239
|
return `${import_semver14.major(version3, { loose: true })}.${import_semver14.minor(version3, { loose: true })}.${import_semver14.patch(version3, { loose: true })}`;
|
|
448161
448240
|
}
|
|
448162
|
-
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.
|
|
448241
|
+
function useUpdateNotification(updatedVersion, initialVersion = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION) {
|
|
448163
448242
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react231.useState(() => getSemverPart(initialVersion));
|
|
448164
448243
|
if (!updatedVersion) {
|
|
448165
448244
|
return null;
|
|
@@ -448199,7 +448278,7 @@ function AutoUpdater({
|
|
|
448199
448278
|
return;
|
|
448200
448279
|
}
|
|
448201
448280
|
if (false) {}
|
|
448202
|
-
const currentVersion = { VERSION: "0.2.
|
|
448281
|
+
const currentVersion = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
448203
448282
|
const channel2 = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
448204
448283
|
let latestVersion = await getLatestVersion(channel2);
|
|
448205
448284
|
const isDisabled2 = isAutoUpdaterDisabled();
|
|
@@ -448335,7 +448414,7 @@ function AutoUpdater({
|
|
|
448335
448414
|
" ",
|
|
448336
448415
|
/* @__PURE__ */ jsx_runtime405.jsx(ThemedText, {
|
|
448337
448416
|
bold: true,
|
|
448338
|
-
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.
|
|
448417
|
+
children: hasLocalInstall ? `cd ~/.theus/local && npm update ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.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.50", BUILD_TIME: "1970-01-01T00:00:00.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}`
|
|
448339
448418
|
})
|
|
448340
448419
|
]
|
|
448341
448420
|
})
|
|
@@ -448412,12 +448491,12 @@ function NativeAutoUpdater({
|
|
|
448412
448491
|
logEvent("tengu_native_auto_updater_start", {});
|
|
448413
448492
|
try {
|
|
448414
448493
|
const maxVersion = await getMaxVersion();
|
|
448415
|
-
if (maxVersion && gt({ VERSION: "0.2.
|
|
448494
|
+
if (maxVersion && gt({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
448416
448495
|
const msg = await getMaxVersionMessage();
|
|
448417
448496
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
448418
448497
|
}
|
|
448419
448498
|
const result = await installLatest(channel2);
|
|
448420
|
-
const currentVersion = { VERSION: "0.2.
|
|
448499
|
+
const currentVersion = { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION;
|
|
448421
448500
|
const latencyMs = Date.now() - startTime2;
|
|
448422
448501
|
if (result.lockFailed) {
|
|
448423
448502
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -448554,17 +448633,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448554
448633
|
const maxVersion = await getMaxVersion();
|
|
448555
448634
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
448556
448635
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
448557
|
-
if (gte({ VERSION: "0.2.
|
|
448558
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.
|
|
448636
|
+
if (gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)) {
|
|
448637
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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`);
|
|
448559
448638
|
setUpdateAvailable(false);
|
|
448560
448639
|
return;
|
|
448561
448640
|
}
|
|
448562
448641
|
latest = maxVersion;
|
|
448563
448642
|
}
|
|
448564
|
-
const hasUpdate = latest && !gte({ VERSION: "0.2.
|
|
448643
|
+
const hasUpdate = latest && !gte({ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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);
|
|
448565
448644
|
setUpdateAvailable(!!hasUpdate);
|
|
448566
448645
|
if (hasUpdate) {
|
|
448567
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.
|
|
448646
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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}`);
|
|
448568
448647
|
}
|
|
448569
448648
|
};
|
|
448570
448649
|
$2[0] = t1;
|
|
@@ -448598,7 +448677,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
448598
448677
|
wrap: "truncate",
|
|
448599
448678
|
children: [
|
|
448600
448679
|
"currentVersion: ",
|
|
448601
|
-
{ VERSION: "0.2.
|
|
448680
|
+
{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
448602
448681
|
]
|
|
448603
448682
|
});
|
|
448604
448683
|
$2[3] = verbose;
|
|
@@ -456471,7 +456550,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
456471
456550
|
project_dir: getOriginalCwd(),
|
|
456472
456551
|
added_dirs: addedDirs
|
|
456473
456552
|
},
|
|
456474
|
-
version: { VERSION: "0.2.
|
|
456553
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
456475
456554
|
output_style: {
|
|
456476
456555
|
name: outputStyleName
|
|
456477
456556
|
},
|
|
@@ -467891,7 +467970,7 @@ async function submitTranscriptShare(messages, trigger, appearanceId) {
|
|
|
467891
467970
|
} catch {}
|
|
467892
467971
|
const data = {
|
|
467893
467972
|
trigger,
|
|
467894
|
-
version: { VERSION: "0.2.
|
|
467973
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
467895
467974
|
platform: process.platform,
|
|
467896
467975
|
transcript,
|
|
467897
467976
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -480898,7 +480977,7 @@ function completeOnboarding() {
|
|
|
480898
480977
|
saveGlobalConfig((current) => ({
|
|
480899
480978
|
...current,
|
|
480900
480979
|
hasCompletedOnboarding: true,
|
|
480901
|
-
lastOnboardingVersion: { VERSION: "0.2.
|
|
480980
|
+
lastOnboardingVersion: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
480902
480981
|
}));
|
|
480903
480982
|
}
|
|
480904
480983
|
function showDialog(root2, renderer) {
|
|
@@ -491896,7 +491975,7 @@ async function startMCPServer(cwd3, debug3, verbose) {
|
|
|
491896
491975
|
setCwd(cwd3);
|
|
491897
491976
|
const server2 = new Server({
|
|
491898
491977
|
name: "theus/tengu",
|
|
491899
|
-
version: { VERSION: "0.2.
|
|
491978
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
491900
491979
|
}, {
|
|
491901
491980
|
capabilities: {
|
|
491902
491981
|
tools: {}
|
|
@@ -493338,7 +493417,7 @@ async function setupTokenHandler(root2) {
|
|
|
493338
493417
|
gap: 1,
|
|
493339
493418
|
children: [
|
|
493340
493419
|
/* @__PURE__ */ jsx_runtime492.jsx(TheusBanner, {
|
|
493341
|
-
version: { VERSION: "0.2.
|
|
493420
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION
|
|
493342
493421
|
}),
|
|
493343
493422
|
showAuthWarning && /* @__PURE__ */ jsx_runtime492.jsxs(ThemedBox_default, {
|
|
493344
493423
|
flexDirection: "column",
|
|
@@ -493872,7 +493951,7 @@ async function run7() {
|
|
|
493872
493951
|
});
|
|
493873
493952
|
program2.name("theus").description(`Theus - inicia una sesi\xF3n interactiva por defecto; usa -p/--print para salida no interactiva`).argument("[prompt]", "Tu prompt", String).helpOption("-h, --help", "Muestra la ayuda del comando").option("-d, --debug [filter]", 'Activa el modo de depuraci\xF3n con filtrado opcional por categor\xEDas (p. ej., "api,hooks" o "!1p,!file")', (_value) => {
|
|
493874
493953
|
return true;
|
|
493875
|
-
}).addOption(new Option("
|
|
493954
|
+
}).addOption(new Option("--debug-to-stderr", "Enable debug mode (to stderr)").argParser(Boolean).hideHelp()).option("--debug-file <path>", "Escribe los registros de depuraci\xF3n en una ruta de archivo espec\xEDfica (activa impl\xEDcitamente el modo de depuraci\xF3n)", () => true).option("--verbose", "Anula el ajuste de modo detallado de la configuraci\xF3n", () => true).option("-p, --print", "Imprime la respuesta y sale (\xFAtil para pipes). Nota: el di\xE1logo de confianza del espacio de trabajo se omite cuando Theus se ejecuta en modo -p. Usa esta opci\xF3n solo en directorios de confianza.", () => true).option("--bare", "Modo m\xEDnimo: omite hooks, LSP, sincronizaci\xF3n de plugins, atribuci\xF3n, memoria autom\xE1tica, precargas en segundo plano, lecturas del llavero y autodescubrimiento de memoria del proyecto. La autenticaci\xF3n del proveedor usa claves de API configuradas o apiKeyHelper v\xEDa --settings; nunca se leen OAuth ni el llavero. Las skills siguen resolvi\xE9ndose v\xEDa /nombre-de-skill. Proporciona contexto expl\xEDcitamente v\xEDa: --system-prompt[-file], --append-system-prompt[-file], --add-dir (directorios de memoria del proyecto), --mcp-config, --settings, --agents, --plugin-dir.", () => true).addOption(new Option("--init", "Run Setup hooks with init trigger, then continue").hideHelp()).addOption(new Option("--init-only", "Run Setup and SessionStart:startup hooks, then exit").hideHelp()).addOption(new Option("--maintenance", "Run Setup hooks with maintenance trigger, then continue").hideHelp()).addOption(new Option("--output-format <format>", 'Formato de salida (solo funciona con --print): "text" (por defecto), "json" (resultado \xFAnico) o "stream-json" (transmisi\xF3n en tiempo real)').choices(["text", "json", "stream-json"])).addOption(new Option("--json-schema <schema>", 'Esquema JSON para validar la salida estructurada. Ejemplo: {"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}').argParser(String)).option("--include-hook-events", "Incluye todos los eventos del ciclo de vida de los hooks en el flujo de salida (solo funciona con --output-format=stream-json)", () => true).option("--include-partial-messages", "Incluye fragmentos parciales de mensajes a medida que llegan (solo funciona con --print y --output-format=stream-json)", () => true).addOption(new Option("--input-format <format>", 'Formato de entrada (solo funciona con --print): "text" (por defecto) o "stream-json" (entrada en streaming en tiempo real)').choices(["text", "stream-json"])).option("--mcp-debug", "[OBSOLETO. Usa --debug en su lugar] Activa el modo de depuraci\xF3n de MCP (muestra errores de los servidores MCP)", () => true).option("--dangerously-skip-permissions", "Omite todas las verificaciones de permisos. Recomendado solo para sandboxes sin acceso a internet.", () => true).option("--allow-dangerously-skip-permissions", "Permite omitir todas las verificaciones de permisos como opci\xF3n, sin activarla por defecto. Recomendado solo para sandboxes sin acceso a internet.", () => true).addOption(new Option("--thinking <mode>", "Thinking mode: enabled (equivalent to adaptive), disabled").choices(["enabled", "adaptive", "disabled"]).hideHelp()).addOption(new Option("--max-thinking-tokens <tokens>", "[DEPRECATED. Use --thinking instead for newer models] Maximum number of thinking tokens (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-turns <turns>", "Maximum number of agentic turns in non-interactive mode. This will early exit the conversation after the specified number of turns. (only works with --print)").argParser(Number).hideHelp()).addOption(new Option("--max-budget-usd <amount>", "Monto m\xE1ximo en d\xF3lares a gastar en llamadas a la API (solo funciona con --print)").argParser((value) => {
|
|
493876
493955
|
const amount = Number(value);
|
|
493877
493956
|
if (isNaN(amount) || amount <= 0) {
|
|
493878
493957
|
throw new Error("--max-budget-usd must be a positive number greater than 0");
|
|
@@ -494820,7 +494899,7 @@ ${assistantAddendum}` : assistantAddendum;
|
|
|
494820
494899
|
}
|
|
494821
494900
|
}
|
|
494822
494901
|
logForDiagnosticsNoPII("info", "started", {
|
|
494823
|
-
version: { VERSION: "0.2.
|
|
494902
|
+
version: { VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", PACKAGE_URL: "theus-cli", NATIVE_PACKAGE_URL: "theus-cli-native", FEEDBACK_CHANNEL: "theus", VERSION_CHANGELOG: "", ISSUES_EXPLAINER: "report issues to the Theus maintainers" }.VERSION,
|
|
494824
494903
|
is_native_binary: isInBundledMode()
|
|
494825
494904
|
});
|
|
494826
494905
|
registerCleanup(async () => {
|
|
@@ -495688,7 +495767,7 @@ Usage: theus --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
495688
495767
|
pendingHookMessages
|
|
495689
495768
|
}, renderAndRun);
|
|
495690
495769
|
}
|
|
495691
|
-
}).version(`${{ VERSION: "0.2.
|
|
495770
|
+
}).version(`${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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");
|
|
495692
495771
|
program2.option("-w, --worktree [name]", "Crea un nuevo worktree de git para esta sesi\xF3n (opcionalmente indica un nombre)");
|
|
495693
495772
|
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.");
|
|
495694
495773
|
if (canUserConfigureAdvisor()) {
|
|
@@ -496240,7 +496319,7 @@ if (false) {}
|
|
|
496240
496319
|
async function main2() {
|
|
496241
496320
|
const args = process.argv.slice(2);
|
|
496242
496321
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
496243
|
-
console.log(`${{ VERSION: "0.2.
|
|
496322
|
+
console.log(`${{ VERSION: "0.2.50", BUILD_TIME: "1970-01-01T00:00:00.000Z", 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)`);
|
|
496244
496323
|
return;
|
|
496245
496324
|
}
|
|
496246
496325
|
const {
|