@iruidong/code 0.1.1 → 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 CHANGED
@@ -10,7 +10,7 @@ ruidong --version
10
10
  Expected output:
11
11
 
12
12
  ```bash
13
- Ruidong Code v0.1.1
13
+ Ruidong Code v0.1.3
14
14
  ```
15
15
 
16
16
  ## 2. Initialize provider config
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // ruidong v0.1.1 (built from source)
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.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.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.1",
75530
+ version: "0.1.3",
75531
75531
  description: "Ruidong Code agentic coding tool",
75532
75532
  websiteUrl: PRODUCT_URL
75533
75533
  },
@@ -86817,12 +86817,12 @@ async function installOrUpdateClaudePackage(channel, specificVersion) {
86817
86817
  const versionSpec = specificVersion ? specificVersion : channel === "stable" ? "stable" : "latest";
86818
86818
  const result = await execFileNoThrowWithCwd(
86819
86819
  "npm",
86820
- ["install", `${"@ruidong/code"}@${versionSpec}`],
86820
+ ["install", `${"@iruidong/code"}@${versionSpec}`],
86821
86821
  { cwd: getLocalInstallDir(), maxBuffer: 1e6 }
86822
86822
  );
86823
86823
  if (result.code !== 0) {
86824
86824
  const error = new Error(
86825
- `Failed to install Claude CLI package: ${result.stderr}`
86825
+ `Failed to install Ruidong Code package: ${result.stderr}`
86826
86826
  );
86827
86827
  logError(error);
86828
86828
  return result.code === 190 ? "in_progress" : "install_failed";
@@ -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 execFileNoThrowWithCwd(
87147
- "npm",
87148
- ["view", `${PACKAGE_NAME}@${npmTag}`, "version", "--prefer-online"],
87149
- { abortSignal: AbortSignal.timeout(5e3), cwd: homedir18() }
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 execFileNoThrowWithCwd(
87167
- "npm",
87168
- ["view", PACKAGE_NAME, "dist-tags", "--json", "--prefer-online"],
87169
- { abortSignal: AbortSignal.timeout(5e3), cwd: homedir18() }
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.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.1"
87238
+ currentVersion: "0.1.3"
87222
87239
  });
87223
87240
  console.error(`
87224
87241
  Error: Windows NPM detected in WSL
@@ -87299,7 +87316,7 @@ var init_autoUpdater = __esm({
87299
87316
  init_slowOperations();
87300
87317
  GCS_BUCKET_URL = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases";
87301
87318
  CLI_COMMAND = "ruidong";
87302
- PACKAGE_NAME = "@ruidong/code";
87319
+ PACKAGE_NAME = "@iruidong/code";
87303
87320
  AutoUpdaterError = class extends ClaudeError {
87304
87321
  };
87305
87322
  LOCK_TIMEOUT_MS = 5 * 60 * 1e3;
@@ -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.1" ? "0.1.1" : "unknown";
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();
@@ -87978,7 +87995,7 @@ var init_doctorDiagnostic = __esm({
87978
87995
  init_slowOperations();
87979
87996
  init_which();
87980
87997
  CLI_COMMAND2 = "ruidong";
87981
- PACKAGE_NAME2 = "@ruidong/code";
87998
+ PACKAGE_NAME2 = "@iruidong/code";
87982
87999
  }
87983
88000
  });
87984
88001
 
@@ -88380,7 +88397,7 @@ var init_download = __esm({
88380
88397
  init_installer();
88381
88398
  GCS_BUCKET_URL2 = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases";
88382
88399
  ARTIFACTORY_REGISTRY_URL = "https://artifactory.infra.ant.dev/artifactory/api/npm/npm-all/";
88383
- PACKAGE_NAME3 = "@ruidong/code";
88400
+ PACKAGE_NAME3 = "@iruidong/code";
88384
88401
  DEFAULT_STALL_TIMEOUT_MS = 6e4;
88385
88402
  MAX_DOWNLOAD_RETRIES = 3;
88386
88403
  StallTimeoutError = class extends Error {
@@ -88965,7 +88982,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
88965
88982
  version2 = maxVersion;
88966
88983
  }
88967
88984
  }
88968
- if (!forceReinstall && version2 === "0.1.1" && await versionIsAvailable(version2) && await isPossibleClaudeBinary(executablePath)) {
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,
@@ -89836,7 +89853,7 @@ var init_installer = __esm({
89836
89853
  init_download();
89837
89854
  init_pidLock();
89838
89855
  VERSION_RETENTION_COUNT = 2;
89839
- PACKAGE_NAME4 = "@ruidong/code";
89856
+ PACKAGE_NAME4 = "@iruidong/code";
89840
89857
  LOCK_STALE_MS = 7 * 24 * 60 * 60 * 1e3;
89841
89858
  inFlightInstall = null;
89842
89859
  }
@@ -144008,7 +144025,7 @@ __export(voice_exports2, {
144008
144025
  startRecording: () => startRecording,
144009
144026
  stopRecording: () => stopRecording
144010
144027
  });
144011
- import { spawn as spawn4, spawnSync as spawnSync2 } from "child_process";
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 = spawnSync2(cmd, ["--version"], {
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.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 spawnSync3
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 = spawnSync3(`${editor} ${lineArg}"${filePath}"`, {
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 = spawnSync3(base, args, syncOpts);
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.1" : "unknown";
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.1" : "unknown";
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 spawnSync4 } from "child_process";
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 = spawnSync4("tmux", ["-V"], { encoding: "utf-8" });
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 = spawnSync4("tmux", ["show-options", "-g", "prefix"], {
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 = spawnSync4(
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
- spawnSync4(
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
- spawnSync4(
265546
+ spawnSync5(
265530
265547
  "tmux",
265531
265548
  ["split-window", "-h", "-t", tmuxSessionName, "-c", worktreeDir],
265532
265549
  { cwd: worktreeDir }
265533
265550
  );
265534
- spawnSync4(
265551
+ spawnSync5(
265535
265552
  "tmux",
265536
265553
  ["send-keys", "-t", tmuxSessionName, "bun run watch", "Enter"],
265537
265554
  { cwd: worktreeDir }
265538
265555
  );
265539
- spawnSync4(
265556
+ spawnSync5(
265540
265557
  "tmux",
265541
265558
  ["split-window", "-v", "-t", tmuxSessionName, "-c", worktreeDir],
265542
265559
  { cwd: worktreeDir }
265543
265560
  );
265544
- spawnSync4("tmux", ["send-keys", "-t", tmuxSessionName, "bun run start"], {
265561
+ spawnSync5("tmux", ["send-keys", "-t", tmuxSessionName, "bun run start"], {
265545
265562
  cwd: worktreeDir
265546
265563
  });
265547
- spawnSync4("tmux", ["select-pane", "-t", `${tmuxSessionName}:0.0`], {
265564
+ spawnSync5("tmux", ["select-pane", "-t", `${tmuxSessionName}:0.0`], {
265548
265565
  cwd: worktreeDir
265549
265566
  });
265550
265567
  if (isAlreadyInTmux) {
265551
- spawnSync4("tmux", ["switch-client", "-t", tmuxSessionName], {
265568
+ spawnSync5("tmux", ["switch-client", "-t", tmuxSessionName], {
265552
265569
  stdio: "inherit"
265553
265570
  });
265554
265571
  } else {
265555
- spawnSync4(
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
- spawnSync4("tmux", ["switch-client", "-t", tmuxSessionName], {
265584
+ spawnSync5("tmux", ["switch-client", "-t", tmuxSessionName], {
265568
265585
  stdio: "inherit"
265569
265586
  });
265570
265587
  } else {
265571
- spawnSync4(
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
- spawnSync4("tmux", ["switch-client", "-t", tmuxSessionName], {
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
- spawnSync4("tmux", tmuxArgs, {
265623
+ spawnSync5("tmux", tmuxArgs, {
265607
265624
  stdio: "inherit",
265608
265625
  cwd: worktreeDir,
265609
265626
  env: tmuxEnv
@@ -285261,7 +285278,7 @@ function AutoUpdater({
285261
285278
  /* @__PURE__ */ jsx401(ThemedText, { bold: true, children: "ruidong doctor" }),
285262
285279
  " or",
285263
285280
  " ",
285264
- /* @__PURE__ */ jsx401(ThemedText, { bold: true, children: hasLocalInstall ? "cd ~/.ruidong-code/local && npm update @ruidong/code" : "npm i -g @ruidong/code" })
285281
+ /* @__PURE__ */ jsx401(ThemedText, { bold: true, children: hasLocalInstall ? "cd ~/.ruidong-code/local && npm update @iruidong/code" : "npm i -g @iruidong/code" })
285265
285282
  ] })
285266
285283
  ] });
285267
285284
  }
@@ -337347,7 +337364,7 @@ var init_update = __esm({
337347
337364
  init_settings2();
337348
337365
  PRODUCT_NAME = "Ruidong Code";
337349
337366
  CLI_COMMAND3 = "ruidong";
337350
- PACKAGE_NAME5 = "@ruidong/code";
337367
+ PACKAGE_NAME5 = "@iruidong/code";
337351
337368
  LOCAL_INSTALL_DIR = "~/.ruidong-code/local";
337352
337369
  }
337353
337370
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iruidong/code",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Ruidong Code CLI for anthropic-compatible coding workflows",
5
5
  "type": "module",
6
6
  "private": false,