@iruidong/code 0.1.2 → 0.1.3
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 +59 -42
- 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.3 (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.3";
|
|
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];
|
|
@@ -75104,7 +75104,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
75104
75104
|
{
|
|
75105
75105
|
name: "ruidong-code",
|
|
75106
75106
|
title: "ruidong",
|
|
75107
|
-
version: "0.1.
|
|
75107
|
+
version: "0.1.3",
|
|
75108
75108
|
description: "Ruidong Code agentic coding tool",
|
|
75109
75109
|
websiteUrl: PRODUCT_URL
|
|
75110
75110
|
},
|
|
@@ -75527,7 +75527,7 @@ var init_client3 = __esm({
|
|
|
75527
75527
|
{
|
|
75528
75528
|
name: "ruidong-code",
|
|
75529
75529
|
title: "ruidong",
|
|
75530
|
-
version: "0.1.
|
|
75530
|
+
version: "0.1.3",
|
|
75531
75531
|
description: "Ruidong Code agentic coding tool",
|
|
75532
75532
|
websiteUrl: PRODUCT_URL
|
|
75533
75533
|
},
|
|
@@ -86958,6 +86958,7 @@ var init_shellConfig = __esm({
|
|
|
86958
86958
|
|
|
86959
86959
|
// build-src/src/utils/autoUpdater.ts
|
|
86960
86960
|
import axios20 from "axios";
|
|
86961
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
86961
86962
|
import { constants as fsConstants2 } from "fs";
|
|
86962
86963
|
import { access as access2, writeFile as writeFile11 } from "fs/promises";
|
|
86963
86964
|
import { homedir as homedir18 } from "os";
|
|
@@ -87141,13 +87142,27 @@ async function checkGlobalInstallPermissions() {
|
|
|
87141
87142
|
return { hasPermissions: false, npmPrefix: null };
|
|
87142
87143
|
}
|
|
87143
87144
|
}
|
|
87145
|
+
async function execNpmView(args) {
|
|
87146
|
+
const result = spawnSync2("npm", args, {
|
|
87147
|
+
cwd: homedir18(),
|
|
87148
|
+
timeout: 5e3,
|
|
87149
|
+
maxBuffer: 1e6,
|
|
87150
|
+
encoding: "utf8"
|
|
87151
|
+
});
|
|
87152
|
+
return {
|
|
87153
|
+
stdout: result.stdout ?? "",
|
|
87154
|
+
stderr: result.stderr ?? "",
|
|
87155
|
+
code: result.status ?? (result.error ? 1 : 0)
|
|
87156
|
+
};
|
|
87157
|
+
}
|
|
87144
87158
|
async function getLatestVersion(channel) {
|
|
87145
87159
|
const npmTag = channel === "stable" ? "stable" : "latest";
|
|
87146
|
-
const result = await
|
|
87147
|
-
"
|
|
87148
|
-
|
|
87149
|
-
|
|
87150
|
-
|
|
87160
|
+
const result = await execNpmView([
|
|
87161
|
+
"view",
|
|
87162
|
+
`${PACKAGE_NAME}@${npmTag}`,
|
|
87163
|
+
"version",
|
|
87164
|
+
"--prefer-online"
|
|
87165
|
+
]);
|
|
87151
87166
|
if (result.code !== 0) {
|
|
87152
87167
|
logForDebugging(`npm view failed with code ${result.code}`);
|
|
87153
87168
|
if (result.stderr) {
|
|
@@ -87163,11 +87178,13 @@ async function getLatestVersion(channel) {
|
|
|
87163
87178
|
return result.stdout.trim();
|
|
87164
87179
|
}
|
|
87165
87180
|
async function getNpmDistTags() {
|
|
87166
|
-
const result = await
|
|
87167
|
-
"
|
|
87168
|
-
|
|
87169
|
-
|
|
87170
|
-
|
|
87181
|
+
const result = await execNpmView([
|
|
87182
|
+
"view",
|
|
87183
|
+
PACKAGE_NAME,
|
|
87184
|
+
"dist-tags",
|
|
87185
|
+
"--json",
|
|
87186
|
+
"--prefer-online"
|
|
87187
|
+
]);
|
|
87171
87188
|
if (result.code !== 0) {
|
|
87172
87189
|
logForDebugging(`npm view dist-tags failed with code ${result.code}`);
|
|
87173
87190
|
return { latest: null, stable: null };
|
|
@@ -87209,7 +87226,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
87209
87226
|
);
|
|
87210
87227
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
87211
87228
|
pid: process.pid,
|
|
87212
|
-
currentVersion: "0.1.
|
|
87229
|
+
currentVersion: "0.1.3"
|
|
87213
87230
|
});
|
|
87214
87231
|
return "in_progress";
|
|
87215
87232
|
}
|
|
@@ -87218,7 +87235,7 @@ async function installGlobalPackage(specificVersion) {
|
|
|
87218
87235
|
if (!env.isRunningWithBun() && env.isNpmFromWindowsPath()) {
|
|
87219
87236
|
logError(new Error("Windows NPM detected in WSL environment"));
|
|
87220
87237
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
87221
|
-
currentVersion: "0.1.
|
|
87238
|
+
currentVersion: "0.1.3"
|
|
87222
87239
|
});
|
|
87223
87240
|
console.error(`
|
|
87224
87241
|
Error: Windows NPM detected in WSL
|
|
@@ -87885,7 +87902,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
87885
87902
|
}
|
|
87886
87903
|
async function getDoctorDiagnostic() {
|
|
87887
87904
|
const installationType = await getCurrentInstallationType();
|
|
87888
|
-
const version2 = typeof MACRO !== "undefined" && "0.1.
|
|
87905
|
+
const version2 = typeof MACRO !== "undefined" && "0.1.3" ? "0.1.3" : "unknown";
|
|
87889
87906
|
const installationPath = await getInstallationPath();
|
|
87890
87907
|
const invokedBinary = getInvokedBinary();
|
|
87891
87908
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -88965,7 +88982,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
88965
88982
|
version2 = maxVersion;
|
|
88966
88983
|
}
|
|
88967
88984
|
}
|
|
88968
|
-
if (!forceReinstall && version2 === "0.1.
|
|
88985
|
+
if (!forceReinstall && version2 === "0.1.3" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
|
|
88969
88986
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
88970
88987
|
logEvent("tengu_native_update_complete", {
|
|
88971
88988
|
latency_ms: Date.now() - startTime,
|
|
@@ -144008,7 +144025,7 @@ __export(voice_exports2, {
|
|
|
144008
144025
|
startRecording: () => startRecording,
|
|
144009
144026
|
stopRecording: () => stopRecording
|
|
144010
144027
|
});
|
|
144011
|
-
import { spawn as spawn4, spawnSync as
|
|
144028
|
+
import { spawn as spawn4, spawnSync as spawnSync3 } from "child_process";
|
|
144012
144029
|
import { readFile as readFile25 } from "fs/promises";
|
|
144013
144030
|
function loadAudioNapi() {
|
|
144014
144031
|
audioNapiPromise ??= (async () => {
|
|
@@ -144022,7 +144039,7 @@ function loadAudioNapi() {
|
|
|
144022
144039
|
return audioNapiPromise;
|
|
144023
144040
|
}
|
|
144024
144041
|
function hasCommand2(cmd) {
|
|
144025
|
-
const result =
|
|
144042
|
+
const result = spawnSync3(cmd, ["--version"], {
|
|
144026
144043
|
stdio: "ignore",
|
|
144027
144044
|
timeout: 3e3
|
|
144028
144045
|
});
|
|
@@ -187817,7 +187834,7 @@ ${sanitizedDescription}
|
|
|
187817
187834
|
**Environment Info**
|
|
187818
187835
|
- Platform: ${env.platform}
|
|
187819
187836
|
- Terminal: ${env.terminal}
|
|
187820
|
-
- Version: ${"0.1.
|
|
187837
|
+
- Version: ${"0.1.3"}
|
|
187821
187838
|
- Feedback ID: ${feedbackId}
|
|
187822
187839
|
|
|
187823
187840
|
**Errors**
|
|
@@ -200449,7 +200466,7 @@ var init_MemoryUpdateNotification = __esm({
|
|
|
200449
200466
|
// build-src/src/utils/editor.ts
|
|
200450
200467
|
import {
|
|
200451
200468
|
spawn as spawn5,
|
|
200452
|
-
spawnSync as
|
|
200469
|
+
spawnSync as spawnSync4
|
|
200453
200470
|
} from "child_process";
|
|
200454
200471
|
import memoize61 from "lodash-es/memoize.js";
|
|
200455
200472
|
import { basename as basename37 } from "path";
|
|
@@ -200499,7 +200516,7 @@ function openFileInExternalEditor(filePath, line) {
|
|
|
200499
200516
|
let result;
|
|
200500
200517
|
if (process.platform === "win32") {
|
|
200501
200518
|
const lineArg = useGotoLine ? `+${line} ` : "";
|
|
200502
|
-
result =
|
|
200519
|
+
result = spawnSync4(`${editor} ${lineArg}"${filePath}"`, {
|
|
200503
200520
|
...syncOpts,
|
|
200504
200521
|
shell: true
|
|
200505
200522
|
});
|
|
@@ -200508,7 +200525,7 @@ function openFileInExternalEditor(filePath, line) {
|
|
|
200508
200525
|
...editorArgs,
|
|
200509
200526
|
...useGotoLine ? [`+${line}`, filePath] : [filePath]
|
|
200510
200527
|
];
|
|
200511
|
-
result =
|
|
200528
|
+
result = spawnSync4(base, args, syncOpts);
|
|
200512
200529
|
}
|
|
200513
200530
|
if (result.error) {
|
|
200514
200531
|
logForDebugging(`editor spawn failed: ${result.error}`, {
|
|
@@ -254125,7 +254142,7 @@ function generateHtmlReport(data, insights) {
|
|
|
254125
254142
|
</html>`;
|
|
254126
254143
|
}
|
|
254127
254144
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
254128
|
-
const version2 = typeof MACRO !== "undefined" ? "0.1.
|
|
254145
|
+
const version2 = typeof MACRO !== "undefined" ? "0.1.3" : "unknown";
|
|
254129
254146
|
const remote_hosts_collected = remoteStats?.hosts.filter((h) => h.sessionCount > 0).map((h) => h.name);
|
|
254130
254147
|
const facets_summary = {
|
|
254131
254148
|
total: facets.size,
|
|
@@ -257889,7 +257906,7 @@ var init_sessionStorage = __esm({
|
|
|
257889
257906
|
init_settings2();
|
|
257890
257907
|
init_slowOperations();
|
|
257891
257908
|
init_uuid();
|
|
257892
|
-
VERSION2 = typeof MACRO !== "undefined" ? "0.1.
|
|
257909
|
+
VERSION2 = typeof MACRO !== "undefined" ? "0.1.3" : "unknown";
|
|
257893
257910
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
257894
257911
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
257895
257912
|
EPHEMERAL_PROGRESS_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -264653,7 +264670,7 @@ __export(worktree_exports, {
|
|
|
264653
264670
|
worktreeBranchName: () => worktreeBranchName
|
|
264654
264671
|
});
|
|
264655
264672
|
import chalk38 from "chalk";
|
|
264656
|
-
import { spawnSync as
|
|
264673
|
+
import { spawnSync as spawnSync5 } from "child_process";
|
|
264657
264674
|
import {
|
|
264658
264675
|
copyFile as copyFile10,
|
|
264659
264676
|
mkdir as mkdir41,
|
|
@@ -265352,7 +265369,7 @@ async function execIntoTmuxWorktree(args) {
|
|
|
265352
265369
|
error: "Error: --tmux is not supported on Windows"
|
|
265353
265370
|
};
|
|
265354
265371
|
}
|
|
265355
|
-
const tmuxCheck =
|
|
265372
|
+
const tmuxCheck = spawnSync5("tmux", ["-V"], { encoding: "utf-8" });
|
|
265356
265373
|
if (tmuxCheck.status !== 0) {
|
|
265357
265374
|
const installHint = process.platform === "darwin" ? "Install tmux with: brew install tmux" : "Install tmux with: sudo apt install tmux";
|
|
265358
265375
|
return {
|
|
@@ -265459,7 +265476,7 @@ async function execIntoTmuxWorktree(args) {
|
|
|
265459
265476
|
newArgs.push(arg);
|
|
265460
265477
|
}
|
|
265461
265478
|
let tmuxPrefix = "C-b";
|
|
265462
|
-
const prefixResult =
|
|
265479
|
+
const prefixResult = spawnSync5("tmux", ["show-options", "-g", "prefix"], {
|
|
265463
265480
|
encoding: "utf-8"
|
|
265464
265481
|
});
|
|
265465
265482
|
if (prefixResult.status === 0 && prefixResult.stdout) {
|
|
@@ -265486,7 +265503,7 @@ async function execIntoTmuxWorktree(args) {
|
|
|
265486
265503
|
CLAUDE_CODE_TMUX_PREFIX: tmuxPrefix,
|
|
265487
265504
|
CLAUDE_CODE_TMUX_PREFIX_CONFLICTS: prefixConflicts ? "1" : ""
|
|
265488
265505
|
};
|
|
265489
|
-
const hasSessionResult =
|
|
265506
|
+
const hasSessionResult = spawnSync5(
|
|
265490
265507
|
"tmux",
|
|
265491
265508
|
["has-session", "-t", tmuxSessionName],
|
|
265492
265509
|
{ encoding: "utf-8" }
|
|
@@ -265510,7 +265527,7 @@ ${y("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2
|
|
|
265510
265527
|
const isClaudeCliInternal = repoName === "claude-cli-internal";
|
|
265511
265528
|
const shouldSetupDevPanes = isAnt && isClaudeCliInternal && !sessionExists;
|
|
265512
265529
|
if (shouldSetupDevPanes) {
|
|
265513
|
-
|
|
265530
|
+
spawnSync5(
|
|
265514
265531
|
"tmux",
|
|
265515
265532
|
[
|
|
265516
265533
|
"new-session",
|
|
@@ -265526,33 +265543,33 @@ ${y("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2
|
|
|
265526
265543
|
],
|
|
265527
265544
|
{ cwd: worktreeDir, env: tmuxEnv }
|
|
265528
265545
|
);
|
|
265529
|
-
|
|
265546
|
+
spawnSync5(
|
|
265530
265547
|
"tmux",
|
|
265531
265548
|
["split-window", "-h", "-t", tmuxSessionName, "-c", worktreeDir],
|
|
265532
265549
|
{ cwd: worktreeDir }
|
|
265533
265550
|
);
|
|
265534
|
-
|
|
265551
|
+
spawnSync5(
|
|
265535
265552
|
"tmux",
|
|
265536
265553
|
["send-keys", "-t", tmuxSessionName, "bun run watch", "Enter"],
|
|
265537
265554
|
{ cwd: worktreeDir }
|
|
265538
265555
|
);
|
|
265539
|
-
|
|
265556
|
+
spawnSync5(
|
|
265540
265557
|
"tmux",
|
|
265541
265558
|
["split-window", "-v", "-t", tmuxSessionName, "-c", worktreeDir],
|
|
265542
265559
|
{ cwd: worktreeDir }
|
|
265543
265560
|
);
|
|
265544
|
-
|
|
265561
|
+
spawnSync5("tmux", ["send-keys", "-t", tmuxSessionName, "bun run start"], {
|
|
265545
265562
|
cwd: worktreeDir
|
|
265546
265563
|
});
|
|
265547
|
-
|
|
265564
|
+
spawnSync5("tmux", ["select-pane", "-t", `${tmuxSessionName}:0.0`], {
|
|
265548
265565
|
cwd: worktreeDir
|
|
265549
265566
|
});
|
|
265550
265567
|
if (isAlreadyInTmux) {
|
|
265551
|
-
|
|
265568
|
+
spawnSync5("tmux", ["switch-client", "-t", tmuxSessionName], {
|
|
265552
265569
|
stdio: "inherit"
|
|
265553
265570
|
});
|
|
265554
265571
|
} else {
|
|
265555
|
-
|
|
265572
|
+
spawnSync5(
|
|
265556
265573
|
"tmux",
|
|
265557
265574
|
[...tmuxGlobalArgs, "attach-session", "-t", tmuxSessionName],
|
|
265558
265575
|
{
|
|
@@ -265564,11 +265581,11 @@ ${y("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2
|
|
|
265564
265581
|
} else {
|
|
265565
265582
|
if (isAlreadyInTmux) {
|
|
265566
265583
|
if (sessionExists) {
|
|
265567
|
-
|
|
265584
|
+
spawnSync5("tmux", ["switch-client", "-t", tmuxSessionName], {
|
|
265568
265585
|
stdio: "inherit"
|
|
265569
265586
|
});
|
|
265570
265587
|
} else {
|
|
265571
|
-
|
|
265588
|
+
spawnSync5(
|
|
265572
265589
|
"tmux",
|
|
265573
265590
|
[
|
|
265574
265591
|
"new-session",
|
|
@@ -265584,7 +265601,7 @@ ${y("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2
|
|
|
265584
265601
|
],
|
|
265585
265602
|
{ cwd: worktreeDir, env: tmuxEnv }
|
|
265586
265603
|
);
|
|
265587
|
-
|
|
265604
|
+
spawnSync5("tmux", ["switch-client", "-t", tmuxSessionName], {
|
|
265588
265605
|
stdio: "inherit"
|
|
265589
265606
|
});
|
|
265590
265607
|
}
|
|
@@ -265603,7 +265620,7 @@ ${y("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2
|
|
|
265603
265620
|
process.execPath,
|
|
265604
265621
|
...newArgs
|
|
265605
265622
|
];
|
|
265606
|
-
|
|
265623
|
+
spawnSync5("tmux", tmuxArgs, {
|
|
265607
265624
|
stdio: "inherit",
|
|
265608
265625
|
cwd: worktreeDir,
|
|
265609
265626
|
env: tmuxEnv
|