@iruidong/code 0.1.3 → 0.1.4
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/QUICKSTART.md +1 -1
- package/dist/cli.js +61 -23
- package/package.json +1 -1
package/QUICKSTART.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// ruidong v0.1.
|
|
2
|
+
// ruidong v0.1.4 (built from source)
|
|
3
3
|
// Copyright (c) Anthropic PBC. All rights reserved.
|
|
4
4
|
import { createRequire as __createRequire } from "module";const require=__createRequire(import.meta.url);
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -81,7 +81,7 @@ var __callDispose = (stack, error, hasError) => {
|
|
|
81
81
|
var PUBLIC_CLI_VERSION, BUILD_TIME, API_COMPAT_VERSION, API_COMPAT_VERSION_BASE;
|
|
82
82
|
var init_version = __esm({
|
|
83
83
|
"build-src/src/constants/version.ts"() {
|
|
84
|
-
PUBLIC_CLI_VERSION = "0.1.
|
|
84
|
+
PUBLIC_CLI_VERSION = "0.1.4";
|
|
85
85
|
BUILD_TIME = "2026-04-01T06:00:31.912Z";
|
|
86
86
|
API_COMPAT_VERSION = "2.1.88";
|
|
87
87
|
API_COMPAT_VERSION_BASE = API_COMPAT_VERSION.match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/)?.[0];
|
|
@@ -13083,15 +13083,15 @@ function setEnvIfUnset(key, value) {
|
|
|
13083
13083
|
}
|
|
13084
13084
|
process.env[key] = value;
|
|
13085
13085
|
}
|
|
13086
|
-
function
|
|
13087
|
-
const
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
"CLAUDE_CODE_USE_FOUNDRY"
|
|
13091
|
-
];
|
|
13092
|
-
if (providerFlagKeys.some((key) => process.env[key] !== void 0)) {
|
|
13086
|
+
function setManagedEnv(key, value) {
|
|
13087
|
+
const normalizedValue = value?.trim();
|
|
13088
|
+
if (!normalizedValue) {
|
|
13089
|
+
delete process.env[key];
|
|
13093
13090
|
return;
|
|
13094
13091
|
}
|
|
13092
|
+
process.env[key] = normalizedValue;
|
|
13093
|
+
}
|
|
13094
|
+
function applyProviderFlags(providerId) {
|
|
13095
13095
|
switch (providerId) {
|
|
13096
13096
|
case "bedrock":
|
|
13097
13097
|
process.env.CLAUDE_CODE_USE_BEDROCK = "1";
|
|
@@ -13115,6 +13115,39 @@ function applyProviderFlags(providerId) {
|
|
|
13115
13115
|
break;
|
|
13116
13116
|
}
|
|
13117
13117
|
}
|
|
13118
|
+
function selectConfiguredCredential(provider) {
|
|
13119
|
+
const hasConfiguredApiKey = provider.apiKey !== void 0;
|
|
13120
|
+
const hasConfiguredAuthToken = provider.authToken !== void 0;
|
|
13121
|
+
if (!hasConfiguredApiKey && !hasConfiguredAuthToken) {
|
|
13122
|
+
return null;
|
|
13123
|
+
}
|
|
13124
|
+
const authMode = provider.authMode ?? "auto";
|
|
13125
|
+
if (authMode === "api-key") {
|
|
13126
|
+
return "api-key";
|
|
13127
|
+
}
|
|
13128
|
+
if (authMode === "bearer") {
|
|
13129
|
+
return "bearer";
|
|
13130
|
+
}
|
|
13131
|
+
if (hasConfiguredAuthToken) {
|
|
13132
|
+
return "bearer";
|
|
13133
|
+
}
|
|
13134
|
+
return "api-key";
|
|
13135
|
+
}
|
|
13136
|
+
function applyProviderCredentialEnv(provider) {
|
|
13137
|
+
const selectedCredential = selectConfiguredCredential(provider);
|
|
13138
|
+
if (!selectedCredential) {
|
|
13139
|
+
return;
|
|
13140
|
+
}
|
|
13141
|
+
const resolvedApiKey = resolveSecretValue(provider.apiKey);
|
|
13142
|
+
const resolvedAuthToken = resolveSecretValue(provider.authToken);
|
|
13143
|
+
if (selectedCredential === "api-key") {
|
|
13144
|
+
setManagedEnv("ANTHROPIC_API_KEY", resolvedApiKey ?? resolvedAuthToken);
|
|
13145
|
+
delete process.env.ANTHROPIC_AUTH_TOKEN;
|
|
13146
|
+
return;
|
|
13147
|
+
}
|
|
13148
|
+
setManagedEnv("ANTHROPIC_AUTH_TOKEN", resolvedAuthToken ?? resolvedApiKey);
|
|
13149
|
+
delete process.env.ANTHROPIC_API_KEY;
|
|
13150
|
+
}
|
|
13118
13151
|
function applyOfficialMarketplaceConfig(official) {
|
|
13119
13152
|
if (!official) {
|
|
13120
13153
|
return;
|
|
@@ -13156,11 +13189,16 @@ function applyRuidongRuntimeConfig() {
|
|
|
13156
13189
|
const provider = config2.provider;
|
|
13157
13190
|
if (provider) {
|
|
13158
13191
|
applyProviderFlags(provider.id);
|
|
13159
|
-
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13192
|
+
if (provider.baseUrl !== void 0) {
|
|
13193
|
+
setManagedEnv("ANTHROPIC_BASE_URL", provider.baseUrl);
|
|
13194
|
+
}
|
|
13195
|
+
applyProviderCredentialEnv(provider);
|
|
13196
|
+
if (provider.authMode !== void 0) {
|
|
13197
|
+
setManagedEnv("ANTHROPIC_AUTH_MODE", provider.authMode);
|
|
13198
|
+
}
|
|
13199
|
+
if (provider.defaultModel !== void 0) {
|
|
13200
|
+
setManagedEnv("ANTHROPIC_MODEL", provider.defaultModel);
|
|
13201
|
+
}
|
|
13164
13202
|
}
|
|
13165
13203
|
applyOfficialMarketplaceConfig(config2.marketplace?.official);
|
|
13166
13204
|
setEnvIfUnset(
|
|
@@ -75104,7 +75142,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
75104
75142
|
{
|
|
75105
75143
|
name: "ruidong-code",
|
|
75106
75144
|
title: "ruidong",
|
|
75107
|
-
version: "0.1.
|
|
75145
|
+
version: "0.1.4",
|
|
75108
75146
|
description: "Ruidong Code agentic coding tool",
|
|
75109
75147
|
websiteUrl: PRODUCT_URL
|
|
75110
75148
|
},
|
|
@@ -75527,7 +75565,7 @@ var init_client3 = __esm({
|
|
|
75527
75565
|
{
|
|
75528
75566
|
name: "ruidong-code",
|
|
75529
75567
|
title: "ruidong",
|
|
75530
|
-
version: "0.1.
|
|
75568
|
+
version: "0.1.4",
|
|
75531
75569
|
description: "Ruidong Code agentic coding tool",
|
|
75532
75570
|
websiteUrl: PRODUCT_URL
|
|
75533
75571
|
},
|
|
@@ -87226,7 +87264,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
87226
87264
|
);
|
|
87227
87265
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
87228
87266
|
pid: process.pid,
|
|
87229
|
-
currentVersion: "0.1.
|
|
87267
|
+
currentVersion: "0.1.4"
|
|
87230
87268
|
});
|
|
87231
87269
|
return "in_progress";
|
|
87232
87270
|
}
|
|
@@ -87235,7 +87273,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
87235
87273
|
if (!env.isRunningWithBun() && env.isNpmFromWindowsPath()) {
|
|
87236
87274
|
logError(new Error("Windows NPM detected in WSL environment"));
|
|
87237
87275
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
87238
|
-
currentVersion: "0.1.
|
|
87276
|
+
currentVersion: "0.1.4"
|
|
87239
87277
|
});
|
|
87240
87278
|
console.error(`
|
|
87241
87279
|
Error: Windows NPM detected in WSL
|
|
@@ -87902,7 +87940,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
87902
87940
|
}
|
|
87903
87941
|
async function getDoctorDiagnostic() {
|
|
87904
87942
|
const installationType = await getCurrentInstallationType();
|
|
87905
|
-
const version2 = typeof MACRO !== "undefined" && "0.1.
|
|
87943
|
+
const version2 = typeof MACRO !== "undefined" && "0.1.4" ? "0.1.4" : "unknown";
|
|
87906
87944
|
const installationPath = await getInstallationPath();
|
|
87907
87945
|
const invokedBinary = getInvokedBinary();
|
|
87908
87946
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -88982,7 +89020,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
88982
89020
|
version2 = maxVersion;
|
|
88983
89021
|
}
|
|
88984
89022
|
}
|
|
88985
|
-
if (!forceReinstall && version2 === "0.1.
|
|
89023
|
+
if (!forceReinstall && version2 === "0.1.4" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
|
|
88986
89024
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
88987
89025
|
logEvent("tengu_native_update_complete", {
|
|
88988
89026
|
latency_ms: Date.now() - startTime,
|
|
@@ -187834,7 +187872,7 @@ ${sanitizedDescription}
|
|
|
187834
187872
|
**Environment Info**
|
|
187835
187873
|
- Platform: ${env.platform}
|
|
187836
187874
|
- Terminal: ${env.terminal}
|
|
187837
|
-
- Version: ${"0.1.
|
|
187875
|
+
- Version: ${"0.1.4"}
|
|
187838
187876
|
- Feedback ID: ${feedbackId}
|
|
187839
187877
|
|
|
187840
187878
|
**Errors**
|
|
@@ -254142,7 +254180,7 @@ function generateHtmlReport(data, insights) {
|
|
|
254142
254180
|
</html>`;
|
|
254143
254181
|
}
|
|
254144
254182
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
254145
|
-
const version2 = typeof MACRO !== "undefined" ? "0.1.
|
|
254183
|
+
const version2 = typeof MACRO !== "undefined" ? "0.1.4" : "unknown";
|
|
254146
254184
|
const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
|
|
254147
254185
|
const facets_summary = {
|
|
254148
254186
|
total: facets.size,
|
|
@@ -257906,7 +257944,7 @@ var init_sessionStorage = __esm({
|
|
|
257906
257944
|
init_settings2();
|
|
257907
257945
|
init_slowOperations();
|
|
257908
257946
|
init_uuid();
|
|
257909
|
-
VERSION2 = typeof MACRO !== "undefined" ? "0.1.
|
|
257947
|
+
VERSION2 = typeof MACRO !== "undefined" ? "0.1.4" : "unknown";
|
|
257910
257948
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
257911
257949
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
257912
257950
|
EPHEMERAL_PROGRESS_TYPES = /* @__PURE__ */ new Set([
|