@funnycode/myclaude 0.1.280 → 0.1.291

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/dist/myclaude.js CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.280",
8
- BUILD_TIME: "2026-08-19T00:59:52.123Z",
7
+ VERSION: "0.1.291",
8
+ BUILD_TIME: "2026-08-23T13:47:23.454Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -120027,7 +120027,7 @@ var package_default;
120027
120027
  var init_package = __esm(() => {
120028
120028
  package_default = {
120029
120029
  name: "@funnycode/myclaude",
120030
- version: "0.1.280",
120030
+ version: "0.1.291",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -282574,13 +282574,13 @@ __export(exports_sessionIdCompat, {
282574
282574
  resetCseShimGateForTesting: () => resetCseShimGateForTesting,
282575
282575
  getCseShimGate: () => getCseShimGate
282576
282576
  });
282577
- function setCseShimGate(gate) {
282577
+ async function setCseShimGate(gate) {
282578
282578
  _isCseShimEnabled = gate;
282579
282579
  }
282580
282580
  function getCseShimGate() {
282581
282581
  return _isCseShimEnabled;
282582
282582
  }
282583
- function resetCseShimGateForTesting() {
282583
+ async function resetCseShimGateForTesting() {
282584
282584
  _isCseShimEnabled = undefined;
282585
282585
  }
282586
282586
  function toCompatSessionId(id) {
@@ -480186,34 +480186,63 @@ function sanitizeCommand(command6) {
480186
480186
  for (const node of parsed) {
480187
480187
  if (typeof node === "string") {
480188
480188
  if (/[`$<>|;&\\\n\r]/.test(node)) {
480189
- throw new Error(`Invalid command: shell metacharacter in token "${node}" is not allowed: "${command6}"`);
480189
+ throw new Error("Invalid command: shell metacharacter in token is not allowed (input omitted for security)");
480190
480190
  }
480191
480191
  argv.push(node);
480192
480192
  continue;
480193
480193
  }
480194
480194
  if (node && typeof node === "object") {
480195
480195
  const kind = node.op || node.pattern || "shell metacharacter";
480196
- throw new Error(`Invalid command: shell metacharacter/operator (${kind}) is not allowed: "${command6}"`);
480196
+ throw new Error(`Invalid command: shell metacharacter/operator (${kind}) is not allowed (input omitted for security)`);
480197
480197
  }
480198
- throw new Error(`Invalid command: unexpected token in command: "${command6}"`);
480198
+ throw new Error("Invalid command: unexpected token in command (input omitted for security)");
480199
480199
  }
480200
480200
  if (argv.length === 0) {
480201
480201
  throw new Error("Invalid command: no program specified");
480202
480202
  }
480203
480203
  const program = argv[0];
480204
480204
  if (!ALLOWED_COMMANDS.has(program)) {
480205
- throw new Error(`Invalid command: program "${program}" is not on the allowlist of permitted commands`);
480205
+ throw new Error("Invalid command: program is not on the allowlist of permitted commands (input omitted for security)");
480206
+ }
480207
+ const FILE_OPERATING_COMMANDS = new Set(["cp", "mv", "touch", "mkdir", "tsc", "vitest"]);
480208
+ if (FILE_OPERATING_COMMANDS.has(program)) {
480209
+ for (let i3 = 1;i3 < argv.length; i3++) {
480210
+ const arg = argv[i3];
480211
+ if (typeof arg !== "string")
480212
+ continue;
480213
+ if (arg.includes("\x00")) {
480214
+ throw new Error("Invalid command argument: NUL byte detected (input omitted for security)");
480215
+ }
480216
+ const valuesToCheck = [arg];
480217
+ const eqIndex = arg.indexOf("=");
480218
+ if (eqIndex !== -1) {
480219
+ valuesToCheck.push(arg.slice(eqIndex + 1));
480220
+ }
480221
+ for (const value of valuesToCheck) {
480222
+ const normalized = value.replace(/\\/g, "/");
480223
+ if (normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized)) {
480224
+ throw new Error("Invalid command argument: absolute paths are not allowed (input omitted for security)");
480225
+ }
480226
+ const parts = normalized.split("/");
480227
+ for (const part of parts) {
480228
+ if (part === "..") {
480229
+ throw new Error("Invalid command argument: path traversal (..) is not allowed (input omitted for security)");
480230
+ }
480231
+ }
480232
+ }
480233
+ }
480206
480234
  }
480207
480235
  return argv;
480208
480236
  }
480209
480237
  function escapeCodeSpan(text2) {
480210
- const maxRun = (text2.match(/`+/g) || []).reduce((m2, s) => Math.max(m2, s.length), 0);
480238
+ const sanitized = text2.replace(/\r\n|\r|\n/g, " ");
480239
+ const maxRun = (sanitized.match(/`+/g) || []).reduce((m2, s) => Math.max(m2, s.length), 0);
480211
480240
  const delim = "`".repeat(maxRun + 1);
480212
- const pad = text2.startsWith("`") || text2.endsWith("`") ? " " : "";
480213
- return `${delim}${pad}${text2}${pad}${delim}`;
480241
+ const pad = sanitized.startsWith("`") || sanitized.endsWith("`") ? " " : "";
480242
+ return `${delim}${pad}${sanitized}${pad}${delim}`;
480214
480243
  }
480215
480244
  function escapeMarkdown(text2) {
480216
- return text2.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\*/g, "\\*").replace(/_/g, "\\_").replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/#/g, "\\#").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/!/g, "\\!").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
480245
+ return text2.replace(/\r\n|\r|\n/g, " ").replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\*/g, "\\*").replace(/_/g, "\\_").replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/#/g, "\\#").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/!/g, "\\!").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
480217
480246
  }
480218
480247
  function generateDiffPreview(flow) {
480219
480248
  const lines2 = [];
@@ -480255,6 +480284,7 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480255
480284
  startTime: Date.now(),
480256
480285
  aborted: false
480257
480286
  };
480287
+ const callbackErrors = [];
480258
480288
  if (options?.preview && options?.onPreview) {
480259
480289
  const preview = generateDiffPreview(flow);
480260
480290
  const approved = await options.onPreview(preview);
@@ -480268,7 +480298,12 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480268
480298
  state.currentStepIndex = i3;
480269
480299
  try {
480270
480300
  if (onStepStart) {
480271
- await onStepStart(step, state);
480301
+ try {
480302
+ await onStepStart(step, state);
480303
+ } catch (callbackError) {
480304
+ console.error(`onStepStart callback failed for step "${step.id}":`, callbackError);
480305
+ callbackErrors.push(callbackError);
480306
+ }
480272
480307
  }
480273
480308
  if (step.command) {
480274
480309
  await executeCommand(step.command, context2);
@@ -480284,6 +480319,7 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480284
480319
  await onStepComplete(step, state);
480285
480320
  } catch (callbackError) {
480286
480321
  console.error(`onStepComplete callback failed for step "${step.id}":`, callbackError);
480322
+ callbackErrors.push(callbackError);
480287
480323
  }
480288
480324
  }
480289
480325
  } catch (error52) {
@@ -480293,6 +480329,7 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480293
480329
  await onStepFail(step, state, error52);
480294
480330
  } catch (callbackError) {
480295
480331
  console.error(`onStepFail callback failed for step "${step.id}":`, callbackError);
480332
+ callbackErrors.push(callbackError);
480296
480333
  }
480297
480334
  }
480298
480335
  const shouldContinue = await shouldContinueOnError(error52, step);
@@ -480307,7 +480344,14 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480307
480344
  await onComplete(state);
480308
480345
  } catch (callbackError) {
480309
480346
  console.error("onComplete callback failed:", callbackError);
480347
+ callbackErrors.push(callbackError);
480348
+ }
480349
+ }
480350
+ if (callbackErrors.length > 0) {
480351
+ if (callbackErrors.length === 1) {
480352
+ throw callbackErrors[0];
480310
480353
  }
480354
+ throw new AggregateError(callbackErrors, "Multiple callback errors occurred during flow execution");
480311
480355
  }
480312
480356
  return state;
480313
480357
  }
@@ -480317,24 +480361,45 @@ async function executeCommand(command6, context2) {
480317
480361
  await context2.bridge.runCommand(argv);
480318
480362
  return;
480319
480363
  }
480320
- throw new Error("No bridge.runCommand available to execute: " + command6);
480364
+ throw new Error("No bridge.runCommand available to execute command (input omitted for security)");
480321
480365
  }
480322
480366
  async function executeFileOperation(file2, context2) {
480367
+ if (typeof file2 !== "string") {
480368
+ throw new Error("Invalid file path: must be a string");
480369
+ }
480370
+ if (file2.includes("\x00")) {
480371
+ throw new Error("Invalid file path: NUL byte detected");
480372
+ }
480373
+ const normalized = file2.replace(/\\/g, "/");
480374
+ if (normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized)) {
480375
+ throw new Error("Invalid file path: absolute paths are not allowed");
480376
+ }
480377
+ const parts = normalized.split("/");
480378
+ for (const part of parts) {
480379
+ if (part === "..") {
480380
+ throw new Error("Invalid file path: path traversal (..) is not allowed");
480381
+ }
480382
+ }
480323
480383
  if (context2?.bridge?.editFile) {
480324
480384
  await context2.bridge.editFile(file2);
480325
480385
  return;
480326
480386
  }
480327
- throw new Error("No bridge.editFile available to edit: " + file2);
480387
+ throw new Error("No bridge.editFile available to edit file (input omitted for security)");
480328
480388
  }
480329
480389
  async function shouldContinueOnError(error52, step) {
480330
- const transientCodes = ["ETIMEDOUT"];
480390
+ const transientCodes = [
480391
+ "ETIMEDOUT",
480392
+ "ECONNRESET",
480393
+ "ENETUNREACH",
480394
+ "EPIPE",
480395
+ "EAI_AGAIN"
480396
+ ];
480331
480397
  const err2 = error52;
480332
- if (err2.code && transientCodes.includes(err2.code)) {
480398
+ const codeFromProps = typeof err2.code === "string" ? err2.code : typeof err2.errno === "string" ? err2.errno : null;
480399
+ if (codeFromProps && transientCodes.includes(codeFromProps)) {
480333
480400
  return true;
480334
480401
  }
480335
- const ipv4Port = String.raw`\d{1,3}(?:\.\d{1,3}){3}:\d+`;
480336
- const hostnamePort = String.raw`[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?){1,}:\d+`;
480337
- if (transientCodes.some((code) => new RegExp(`(^|:\\s*)${code}\\b|\\b${code}\\s+(?:${ipv4Port}|${hostnamePort})`).test(error52.message))) {
480402
+ if (transientCodes.some((code) => new RegExp(`(^|:\\s*)${code}\\b`).test(error52.message))) {
480338
480403
  return true;
480339
480404
  }
480340
480405
  if (/^No bridge\.(runCommand|editFile) available/.test(error52.message)) {
@@ -480346,13 +480411,11 @@ var import_shell_quote4, ALLOWED_COMMANDS;
480346
480411
  var init_executor = __esm(() => {
480347
480412
  import_shell_quote4 = __toESM(require_shell_quote(), 1);
480348
480413
  ALLOWED_COMMANDS = new Set([
480349
- "npm",
480350
480414
  "mkdir",
480351
480415
  "touch",
480352
480416
  "cp",
480353
480417
  "mv",
480354
480418
  "echo",
480355
- "git",
480356
480419
  "tsc",
480357
480420
  "vitest"
480358
480421
  ]);
@@ -582879,7 +582942,7 @@ async function initReplBridge(options) {
582879
582942
  outboundOnly,
582880
582943
  tags
582881
582944
  } = options ?? {};
582882
- setCseShimGate(isCseShimEnabled);
582945
+ await setCseShimGate(isCseShimEnabled);
582883
582946
  const [
582884
582947
  { getFeatureValue_CACHED_WITH_REFRESH: getFeatureValue_CACHED_WITH_REFRESH4 },
582885
582948
  { getOrganizationUUID: getOrganizationUUID2 },
package/dist/myclaude.mjs CHANGED
@@ -4,8 +4,8 @@
4
4
  // MACRO - build-time constants (injected by build.ts)
5
5
  // MACRO injected by build script
6
6
  globalThis.MACRO = {
7
- VERSION: "0.1.280",
8
- BUILD_TIME: "2026-08-19T00:59:52.123Z",
7
+ VERSION: "0.1.291",
8
+ BUILD_TIME: "2026-08-23T13:47:23.454Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -120027,7 +120027,7 @@ var package_default;
120027
120027
  var init_package = __esm(() => {
120028
120028
  package_default = {
120029
120029
  name: "@funnycode/myclaude",
120030
- version: "0.1.280",
120030
+ version: "0.1.291",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -282574,13 +282574,13 @@ __export(exports_sessionIdCompat, {
282574
282574
  resetCseShimGateForTesting: () => resetCseShimGateForTesting,
282575
282575
  getCseShimGate: () => getCseShimGate
282576
282576
  });
282577
- function setCseShimGate(gate) {
282577
+ async function setCseShimGate(gate) {
282578
282578
  _isCseShimEnabled = gate;
282579
282579
  }
282580
282580
  function getCseShimGate() {
282581
282581
  return _isCseShimEnabled;
282582
282582
  }
282583
- function resetCseShimGateForTesting() {
282583
+ async function resetCseShimGateForTesting() {
282584
282584
  _isCseShimEnabled = undefined;
282585
282585
  }
282586
282586
  function toCompatSessionId(id) {
@@ -480186,34 +480186,63 @@ function sanitizeCommand(command6) {
480186
480186
  for (const node of parsed) {
480187
480187
  if (typeof node === "string") {
480188
480188
  if (/[`$<>|;&\\\n\r]/.test(node)) {
480189
- throw new Error(`Invalid command: shell metacharacter in token "${node}" is not allowed: "${command6}"`);
480189
+ throw new Error("Invalid command: shell metacharacter in token is not allowed (input omitted for security)");
480190
480190
  }
480191
480191
  argv.push(node);
480192
480192
  continue;
480193
480193
  }
480194
480194
  if (node && typeof node === "object") {
480195
480195
  const kind = node.op || node.pattern || "shell metacharacter";
480196
- throw new Error(`Invalid command: shell metacharacter/operator (${kind}) is not allowed: "${command6}"`);
480196
+ throw new Error(`Invalid command: shell metacharacter/operator (${kind}) is not allowed (input omitted for security)`);
480197
480197
  }
480198
- throw new Error(`Invalid command: unexpected token in command: "${command6}"`);
480198
+ throw new Error("Invalid command: unexpected token in command (input omitted for security)");
480199
480199
  }
480200
480200
  if (argv.length === 0) {
480201
480201
  throw new Error("Invalid command: no program specified");
480202
480202
  }
480203
480203
  const program = argv[0];
480204
480204
  if (!ALLOWED_COMMANDS.has(program)) {
480205
- throw new Error(`Invalid command: program "${program}" is not on the allowlist of permitted commands`);
480205
+ throw new Error("Invalid command: program is not on the allowlist of permitted commands (input omitted for security)");
480206
+ }
480207
+ const FILE_OPERATING_COMMANDS = new Set(["cp", "mv", "touch", "mkdir", "tsc", "vitest"]);
480208
+ if (FILE_OPERATING_COMMANDS.has(program)) {
480209
+ for (let i3 = 1;i3 < argv.length; i3++) {
480210
+ const arg = argv[i3];
480211
+ if (typeof arg !== "string")
480212
+ continue;
480213
+ if (arg.includes("\x00")) {
480214
+ throw new Error("Invalid command argument: NUL byte detected (input omitted for security)");
480215
+ }
480216
+ const valuesToCheck = [arg];
480217
+ const eqIndex = arg.indexOf("=");
480218
+ if (eqIndex !== -1) {
480219
+ valuesToCheck.push(arg.slice(eqIndex + 1));
480220
+ }
480221
+ for (const value of valuesToCheck) {
480222
+ const normalized = value.replace(/\\/g, "/");
480223
+ if (normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized)) {
480224
+ throw new Error("Invalid command argument: absolute paths are not allowed (input omitted for security)");
480225
+ }
480226
+ const parts = normalized.split("/");
480227
+ for (const part of parts) {
480228
+ if (part === "..") {
480229
+ throw new Error("Invalid command argument: path traversal (..) is not allowed (input omitted for security)");
480230
+ }
480231
+ }
480232
+ }
480233
+ }
480206
480234
  }
480207
480235
  return argv;
480208
480236
  }
480209
480237
  function escapeCodeSpan(text2) {
480210
- const maxRun = (text2.match(/`+/g) || []).reduce((m2, s) => Math.max(m2, s.length), 0);
480238
+ const sanitized = text2.replace(/\r\n|\r|\n/g, " ");
480239
+ const maxRun = (sanitized.match(/`+/g) || []).reduce((m2, s) => Math.max(m2, s.length), 0);
480211
480240
  const delim = "`".repeat(maxRun + 1);
480212
- const pad = text2.startsWith("`") || text2.endsWith("`") ? " " : "";
480213
- return `${delim}${pad}${text2}${pad}${delim}`;
480241
+ const pad = sanitized.startsWith("`") || sanitized.endsWith("`") ? " " : "";
480242
+ return `${delim}${pad}${sanitized}${pad}${delim}`;
480214
480243
  }
480215
480244
  function escapeMarkdown(text2) {
480216
- return text2.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\*/g, "\\*").replace(/_/g, "\\_").replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/#/g, "\\#").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/!/g, "\\!").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
480245
+ return text2.replace(/\r\n|\r|\n/g, " ").replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\*/g, "\\*").replace(/_/g, "\\_").replace(/\[/g, "\\[").replace(/\]/g, "\\]").replace(/#/g, "\\#").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/!/g, "\\!").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
480217
480246
  }
480218
480247
  function generateDiffPreview(flow) {
480219
480248
  const lines2 = [];
@@ -480255,6 +480284,7 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480255
480284
  startTime: Date.now(),
480256
480285
  aborted: false
480257
480286
  };
480287
+ const callbackErrors = [];
480258
480288
  if (options?.preview && options?.onPreview) {
480259
480289
  const preview = generateDiffPreview(flow);
480260
480290
  const approved = await options.onPreview(preview);
@@ -480268,7 +480298,12 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480268
480298
  state.currentStepIndex = i3;
480269
480299
  try {
480270
480300
  if (onStepStart) {
480271
- await onStepStart(step, state);
480301
+ try {
480302
+ await onStepStart(step, state);
480303
+ } catch (callbackError) {
480304
+ console.error(`onStepStart callback failed for step "${step.id}":`, callbackError);
480305
+ callbackErrors.push(callbackError);
480306
+ }
480272
480307
  }
480273
480308
  if (step.command) {
480274
480309
  await executeCommand(step.command, context2);
@@ -480284,6 +480319,7 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480284
480319
  await onStepComplete(step, state);
480285
480320
  } catch (callbackError) {
480286
480321
  console.error(`onStepComplete callback failed for step "${step.id}":`, callbackError);
480322
+ callbackErrors.push(callbackError);
480287
480323
  }
480288
480324
  }
480289
480325
  } catch (error52) {
@@ -480293,6 +480329,7 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480293
480329
  await onStepFail(step, state, error52);
480294
480330
  } catch (callbackError) {
480295
480331
  console.error(`onStepFail callback failed for step "${step.id}":`, callbackError);
480332
+ callbackErrors.push(callbackError);
480296
480333
  }
480297
480334
  }
480298
480335
  const shouldContinue = await shouldContinueOnError(error52, step);
@@ -480307,7 +480344,14 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480307
480344
  await onComplete(state);
480308
480345
  } catch (callbackError) {
480309
480346
  console.error("onComplete callback failed:", callbackError);
480347
+ callbackErrors.push(callbackError);
480348
+ }
480349
+ }
480350
+ if (callbackErrors.length > 0) {
480351
+ if (callbackErrors.length === 1) {
480352
+ throw callbackErrors[0];
480310
480353
  }
480354
+ throw new AggregateError(callbackErrors, "Multiple callback errors occurred during flow execution");
480311
480355
  }
480312
480356
  return state;
480313
480357
  }
@@ -480317,24 +480361,45 @@ async function executeCommand(command6, context2) {
480317
480361
  await context2.bridge.runCommand(argv);
480318
480362
  return;
480319
480363
  }
480320
- throw new Error("No bridge.runCommand available to execute: " + command6);
480364
+ throw new Error("No bridge.runCommand available to execute command (input omitted for security)");
480321
480365
  }
480322
480366
  async function executeFileOperation(file2, context2) {
480367
+ if (typeof file2 !== "string") {
480368
+ throw new Error("Invalid file path: must be a string");
480369
+ }
480370
+ if (file2.includes("\x00")) {
480371
+ throw new Error("Invalid file path: NUL byte detected");
480372
+ }
480373
+ const normalized = file2.replace(/\\/g, "/");
480374
+ if (normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized)) {
480375
+ throw new Error("Invalid file path: absolute paths are not allowed");
480376
+ }
480377
+ const parts = normalized.split("/");
480378
+ for (const part of parts) {
480379
+ if (part === "..") {
480380
+ throw new Error("Invalid file path: path traversal (..) is not allowed");
480381
+ }
480382
+ }
480323
480383
  if (context2?.bridge?.editFile) {
480324
480384
  await context2.bridge.editFile(file2);
480325
480385
  return;
480326
480386
  }
480327
- throw new Error("No bridge.editFile available to edit: " + file2);
480387
+ throw new Error("No bridge.editFile available to edit file (input omitted for security)");
480328
480388
  }
480329
480389
  async function shouldContinueOnError(error52, step) {
480330
- const transientCodes = ["ETIMEDOUT"];
480390
+ const transientCodes = [
480391
+ "ETIMEDOUT",
480392
+ "ECONNRESET",
480393
+ "ENETUNREACH",
480394
+ "EPIPE",
480395
+ "EAI_AGAIN"
480396
+ ];
480331
480397
  const err2 = error52;
480332
- if (err2.code && transientCodes.includes(err2.code)) {
480398
+ const codeFromProps = typeof err2.code === "string" ? err2.code : typeof err2.errno === "string" ? err2.errno : null;
480399
+ if (codeFromProps && transientCodes.includes(codeFromProps)) {
480333
480400
  return true;
480334
480401
  }
480335
- const ipv4Port = String.raw`\d{1,3}(?:\.\d{1,3}){3}:\d+`;
480336
- const hostnamePort = String.raw`[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?){1,}:\d+`;
480337
- if (transientCodes.some((code) => new RegExp(`(^|:\\s*)${code}\\b|\\b${code}\\s+(?:${ipv4Port}|${hostnamePort})`).test(error52.message))) {
480402
+ if (transientCodes.some((code) => new RegExp(`(^|:\\s*)${code}\\b`).test(error52.message))) {
480338
480403
  return true;
480339
480404
  }
480340
480405
  if (/^No bridge\.(runCommand|editFile) available/.test(error52.message)) {
@@ -480346,13 +480411,11 @@ var import_shell_quote4, ALLOWED_COMMANDS;
480346
480411
  var init_executor = __esm(() => {
480347
480412
  import_shell_quote4 = __toESM(require_shell_quote(), 1);
480348
480413
  ALLOWED_COMMANDS = new Set([
480349
- "npm",
480350
480414
  "mkdir",
480351
480415
  "touch",
480352
480416
  "cp",
480353
480417
  "mv",
480354
480418
  "echo",
480355
- "git",
480356
480419
  "tsc",
480357
480420
  "vitest"
480358
480421
  ]);
@@ -582879,7 +582942,7 @@ async function initReplBridge(options) {
582879
582942
  outboundOnly,
582880
582943
  tags
582881
582944
  } = options ?? {};
582882
- setCseShimGate(isCseShimEnabled);
582945
+ await setCseShimGate(isCseShimEnabled);
582883
582946
  const [
582884
582947
  { getFeatureValue_CACHED_WITH_REFRESH: getFeatureValue_CACHED_WITH_REFRESH4 },
582885
582948
  { getOrganizationUUID: getOrganizationUUID2 },
package/package.json CHANGED
@@ -1,131 +1,131 @@
1
- {
2
- "name": "@funnycode/myclaude",
3
- "version": "0.1.280",
4
- "private": false,
5
- "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
- "license": "MIT",
7
- "type": "module",
8
- "packageManager": "bun@1.3.5",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thomaslwq/myclaude.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/thomaslwq/myclaude/issues"
15
- },
16
- "homepage": "https://github.com/thomaslwq/myclaude",
17
- "engines": {
18
- "bun": ">=1.3.5",
19
- "node": ">=18.17.0"
20
- },
21
- "scripts": {
22
- "dev": "bun run ./src/dev-entry.ts",
23
- "start": "bun run ./src/dev-entry.ts",
24
- "test": "bun test",
25
- "test:watch": "bun test --watch",
26
- "test:perf": "bun test src/tests/performance-regression.test.ts",
27
- "build": "bun run ./scripts/build.ts",
28
- "prepublishOnly": "bun run build",
29
- "version": "bun run ./src/dev-entry.ts --version"
30
- },
31
- "bin": {
32
- "myclaude": "bin/myclaude.cjs"
33
- },
34
- "files": [
35
- "dist/",
36
- "seed/",
37
- "bin/",
38
- "LICENSE",
39
- "README.md",
40
- "README.zh-CN.md",
41
- "CHANGELOG.md",
42
- "docs/funnycode.png",
43
- "shims/node-domexception/"
44
- ],
45
- "publishConfig": {
46
- "access": "public"
47
- },
48
- "dependencies": {
49
- "@alcalzone/ansi-tokenize": "0.3.0",
50
- "@anthropic-ai/claude-agent-sdk": "0.3.207",
51
- "@anthropic-ai/mcpb": "2.1.2",
52
- "@anthropic-ai/sandbox-runtime": "0.0.44",
53
- "@anthropic-ai/sdk": "0.111.0",
54
- "@aws-sdk/client-bedrock-runtime": "3.1020.0",
55
- "@commander-js/extra-typings": "14.0.0",
56
- "@growthbook/growthbook": "1.6.5",
57
- "@modelcontextprotocol/sdk": "1.29.0",
58
- "@opentelemetry/api": "1.9.1",
59
- "@opentelemetry/api-logs": "0.221.0",
60
- "@opentelemetry/core": "1.28.0",
61
- "@opentelemetry/resources": "1.28.0",
62
- "@opentelemetry/sdk-logs": "0.52.0",
63
- "@opentelemetry/sdk-metrics": "1.28.0",
64
- "@opentelemetry/sdk-trace-base": "1.28.0",
65
- "@opentelemetry/semantic-conventions": "1.43.0",
66
- "ajv": "8.18.0",
67
- "asciichart": "1.5.25",
68
- "async-mutex": "0.5.0",
69
- "auto-bind": "5.0.1",
70
- "axios": "1.19.0",
71
- "bidi-js": "1.0.3",
72
- "chalk": "5.6.2",
73
- "chokidar": "5.0.0",
74
- "cli-boxes": "4.0.1",
75
- "code-excerpt": "4.0.0",
76
- "diff": "8.0.4",
77
- "emoji-regex": "10.6.0",
78
- "env-paths": "4.0.0",
79
- "execa": "9.6.1",
80
- "figures": "6.1.0",
81
- "fuse.js": "7.1.0",
82
- "get-east-asian-width": "1.5.0",
83
- "google-auth-library": "10.6.2",
84
- "highlight.js": "11.11.1",
85
- "https-proxy-agent": "8.0.0",
86
- "ignore": "7.0.5",
87
- "indent-string": "5.0.0",
88
- "ink": "6.8.0",
89
- "jsonc-parser": "3.3.1",
90
- "lodash-es": "4.17.23",
91
- "lru-cache": "11.5.2",
92
- "marked": "18.0.9",
93
- "p-map": "7.0.4",
94
- "picomatch": "4.0.4",
95
- "proper-lockfile": "4.1.2",
96
- "qrcode": "1.5.4",
97
- "react": "19.2.8",
98
- "react-reconciler": "0.33.0",
99
- "semver": "7.8.5",
100
- "shell-quote": "1.8.3",
101
- "signal-exit": "4.1.0",
102
- "stack-utils": "2.0.6",
103
- "strip-ansi": "7.2.0",
104
- "supports-hyperlinks": "4.4.0",
105
- "tree-kill": "1.2.2",
106
- "type-fest": "5.5.0",
107
- "undici": "7.24.6",
108
- "usehooks-ts": "3.1.1",
109
- "vscode-jsonrpc": "8.2.1",
110
- "vscode-languageserver-protocol": "3.17.5",
111
- "vscode-languageserver-types": "3.17.5",
112
- "wrap-ansi": "10.0.0",
113
- "ws": "8.20.0",
114
- "xss": "1.0.15",
115
- "yaml": "2.8.3",
116
- "zod": "4.4.3"
117
- },
118
- "optionalDependencies": {
119
- "@ant/claude-for-chrome-mcp": "file:./shims/ant-claude-for-chrome-mcp",
120
- "@ant/computer-use-input": "file:./shims/ant-computer-use-input",
121
- "@ant/computer-use-mcp": "file:./shims/ant-computer-use-mcp",
122
- "@ant/computer-use-swift": "file:./shims/ant-computer-use-swift",
123
- "color-diff-napi": "file:./shims/color-diff-napi",
124
- "modifiers-napi": "file:./shims/modifiers-napi",
125
- "node-domexception": "file:./shims/node-domexception",
126
- "url-handler-napi": "file:./shims/url-handler-napi"
127
- },
128
- "overrides": {
129
- "node-domexception": "file:./shims/node-domexception"
130
- }
131
- }
1
+ {
2
+ "name": "@funnycode/myclaude",
3
+ "version": "0.1.291",
4
+ "private": false,
5
+ "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "packageManager": "bun@1.3.5",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thomaslwq/myclaude.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/thomaslwq/myclaude/issues"
15
+ },
16
+ "homepage": "https://github.com/thomaslwq/myclaude",
17
+ "engines": {
18
+ "bun": ">=1.3.5",
19
+ "node": ">=18.17.0"
20
+ },
21
+ "scripts": {
22
+ "dev": "bun run ./src/dev-entry.ts",
23
+ "start": "bun run ./src/dev-entry.ts",
24
+ "test": "bun test",
25
+ "test:watch": "bun test --watch",
26
+ "test:perf": "bun test src/tests/performance-regression.test.ts",
27
+ "build": "bun run ./scripts/build.ts",
28
+ "prepublishOnly": "bun run build",
29
+ "version": "bun run ./src/dev-entry.ts --version"
30
+ },
31
+ "bin": {
32
+ "myclaude": "bin/myclaude.cjs"
33
+ },
34
+ "files": [
35
+ "dist/",
36
+ "seed/",
37
+ "bin/",
38
+ "LICENSE",
39
+ "README.md",
40
+ "README.zh-CN.md",
41
+ "CHANGELOG.md",
42
+ "docs/funnycode.png",
43
+ "shims/node-domexception/"
44
+ ],
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "dependencies": {
49
+ "@alcalzone/ansi-tokenize": "0.3.0",
50
+ "@anthropic-ai/claude-agent-sdk": "0.3.207",
51
+ "@anthropic-ai/mcpb": "2.1.2",
52
+ "@anthropic-ai/sandbox-runtime": "0.0.44",
53
+ "@anthropic-ai/sdk": "0.111.0",
54
+ "@aws-sdk/client-bedrock-runtime": "3.1020.0",
55
+ "@commander-js/extra-typings": "14.0.0",
56
+ "@growthbook/growthbook": "1.6.5",
57
+ "@modelcontextprotocol/sdk": "1.29.0",
58
+ "@opentelemetry/api": "1.9.1",
59
+ "@opentelemetry/api-logs": "0.221.0",
60
+ "@opentelemetry/core": "1.28.0",
61
+ "@opentelemetry/resources": "1.28.0",
62
+ "@opentelemetry/sdk-logs": "0.52.0",
63
+ "@opentelemetry/sdk-metrics": "1.28.0",
64
+ "@opentelemetry/sdk-trace-base": "1.28.0",
65
+ "@opentelemetry/semantic-conventions": "1.43.0",
66
+ "ajv": "8.18.0",
67
+ "asciichart": "1.5.25",
68
+ "async-mutex": "0.5.0",
69
+ "auto-bind": "5.0.1",
70
+ "axios": "1.19.0",
71
+ "bidi-js": "1.0.3",
72
+ "chalk": "5.6.2",
73
+ "chokidar": "5.0.0",
74
+ "cli-boxes": "4.0.1",
75
+ "code-excerpt": "4.0.0",
76
+ "diff": "8.0.4",
77
+ "emoji-regex": "10.6.0",
78
+ "env-paths": "4.0.0",
79
+ "execa": "9.6.1",
80
+ "figures": "6.1.0",
81
+ "fuse.js": "7.1.0",
82
+ "get-east-asian-width": "1.5.0",
83
+ "google-auth-library": "10.6.2",
84
+ "highlight.js": "11.11.1",
85
+ "https-proxy-agent": "8.0.0",
86
+ "ignore": "7.0.5",
87
+ "indent-string": "5.0.0",
88
+ "ink": "6.8.0",
89
+ "jsonc-parser": "3.3.1",
90
+ "lodash-es": "4.17.23",
91
+ "lru-cache": "11.5.2",
92
+ "marked": "18.0.9",
93
+ "p-map": "7.0.4",
94
+ "picomatch": "4.0.4",
95
+ "proper-lockfile": "4.1.2",
96
+ "qrcode": "1.5.4",
97
+ "react": "19.2.8",
98
+ "react-reconciler": "0.33.0",
99
+ "semver": "7.8.5",
100
+ "shell-quote": "1.8.3",
101
+ "signal-exit": "4.1.0",
102
+ "stack-utils": "2.0.6",
103
+ "strip-ansi": "7.2.0",
104
+ "supports-hyperlinks": "4.4.0",
105
+ "tree-kill": "1.2.2",
106
+ "type-fest": "5.5.0",
107
+ "undici": "7.24.6",
108
+ "usehooks-ts": "3.1.1",
109
+ "vscode-jsonrpc": "8.2.1",
110
+ "vscode-languageserver-protocol": "3.17.5",
111
+ "vscode-languageserver-types": "3.17.5",
112
+ "wrap-ansi": "10.0.0",
113
+ "ws": "8.20.0",
114
+ "xss": "1.0.15",
115
+ "yaml": "2.8.3",
116
+ "zod": "4.4.3"
117
+ },
118
+ "optionalDependencies": {
119
+ "@ant/claude-for-chrome-mcp": "file:./shims/ant-claude-for-chrome-mcp",
120
+ "@ant/computer-use-input": "file:./shims/ant-computer-use-input",
121
+ "@ant/computer-use-mcp": "file:./shims/ant-computer-use-mcp",
122
+ "@ant/computer-use-swift": "file:./shims/ant-computer-use-swift",
123
+ "color-diff-napi": "file:./shims/color-diff-napi",
124
+ "modifiers-napi": "file:./shims/modifiers-napi",
125
+ "node-domexception": "file:./shims/node-domexception",
126
+ "url-handler-napi": "file:./shims/url-handler-napi"
127
+ },
128
+ "overrides": {
129
+ "node-domexception": "file:./shims/node-domexception"
130
+ }
131
+ }