@funnycode/myclaude 0.1.285 → 0.1.292

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.285",
8
- BUILD_TIME: "2026-08-21T08:33:09.704Z",
7
+ VERSION: "0.1.292",
8
+ BUILD_TIME: "2026-08-23T17:01:45.131Z",
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.285",
120030
+ version: "0.1.292",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -120094,7 +120094,7 @@ var init_package = __esm(() => {
120094
120094
  asciichart: "1.5.25",
120095
120095
  "async-mutex": "0.5.0",
120096
120096
  "auto-bind": "5.0.1",
120097
- axios: "1.19.0",
120097
+ axios: "1.7.9",
120098
120098
  "bidi-js": "1.0.3",
120099
120099
  chalk: "5.6.2",
120100
120100
  chokidar: "5.0.0",
@@ -282575,19 +282575,13 @@ __export(exports_sessionIdCompat, {
282575
282575
  getCseShimGate: () => getCseShimGate
282576
282576
  });
282577
282577
  async function setCseShimGate(gate) {
282578
- await _gateMutex.runExclusive(() => {
282579
- if (_isCseShimEnabled === undefined) {
282580
- _isCseShimEnabled = gate;
282581
- }
282582
- });
282578
+ _isCseShimEnabled = gate;
282583
282579
  }
282584
282580
  function getCseShimGate() {
282585
282581
  return _isCseShimEnabled;
282586
282582
  }
282587
282583
  async function resetCseShimGateForTesting() {
282588
- await _gateMutex.runExclusive(() => {
282589
- _isCseShimEnabled = undefined;
282590
- });
282584
+ _isCseShimEnabled = undefined;
282591
282585
  }
282592
282586
  function toCompatSessionId(id) {
282593
282587
  if (!id.startsWith("cse_"))
@@ -282603,11 +282597,7 @@ function toInfraSessionId(id) {
282603
282597
  return id;
282604
282598
  return "cse_" + id.slice("session_".length);
282605
282599
  }
282606
- var _isCseShimEnabled, _gateMutex;
282607
- var init_sessionIdCompat = __esm(() => {
282608
- init_async_mutex();
282609
- _gateMutex = new Mutex;
282610
- });
282600
+ var _isCseShimEnabled;
282611
282601
 
282612
282602
  // src/constants/product.ts
282613
282603
  function isRemoteSessionStaging(sessionId, ingressUrl) {
@@ -282626,7 +282616,7 @@ function getClaudeAiBaseUrl(sessionId, ingressUrl) {
282626
282616
  return CLAUDE_AI_BASE_URL;
282627
282617
  }
282628
282618
  function getRemoteSessionUrl(sessionId, ingressUrl) {
282629
- const { toCompatSessionId: toCompatSessionId2 } = (init_sessionIdCompat(), __toCommonJS(exports_sessionIdCompat));
282619
+ const { toCompatSessionId: toCompatSessionId2 } = __toCommonJS(exports_sessionIdCompat);
282630
282620
  const compatId = toCompatSessionId2(sessionId);
282631
282621
  const baseUrl = getClaudeAiBaseUrl(compatId, ingressUrl);
282632
282622
  return `${baseUrl}/code/${compatId}`;
@@ -387589,7 +387579,6 @@ var init_concurrentSessions = __esm(() => {
387589
387579
  // src/bridge/replBridgeHandle.ts
387590
387580
  var init_replBridgeHandle = __esm(() => {
387591
387581
  init_concurrentSessions();
387592
- init_sessionIdCompat();
387593
387582
  });
387594
387583
 
387595
387584
  // src/tasks/LocalMainSessionTask.ts
@@ -464046,7 +464035,6 @@ var init_createSession = __esm(() => {
464046
464035
  init_debug();
464047
464036
  init_errors();
464048
464037
  init_debugUtils();
464049
- init_sessionIdCompat();
464050
464038
  });
464051
464039
 
464052
464040
  // src/commands/rename/rename.ts
@@ -480216,16 +480204,45 @@ function sanitizeCommand(command6) {
480216
480204
  if (!ALLOWED_COMMANDS.has(program)) {
480217
480205
  throw new Error("Invalid command: program is not on the allowlist of permitted commands (input omitted for security)");
480218
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
+ }
480234
+ }
480219
480235
  return argv;
480220
480236
  }
480221
480237
  function escapeCodeSpan(text2) {
480222
- 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);
480223
480240
  const delim = "`".repeat(maxRun + 1);
480224
- const pad = text2.startsWith("`") || text2.endsWith("`") ? " " : "";
480225
- return `${delim}${pad}${text2}${pad}${delim}`;
480241
+ const pad = sanitized.startsWith("`") || sanitized.endsWith("`") ? " " : "";
480242
+ return `${delim}${pad}${sanitized}${pad}${delim}`;
480226
480243
  }
480227
480244
  function escapeMarkdown(text2) {
480228
- return text2.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, "\\)");
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, "\\)");
480229
480246
  }
480230
480247
  function generateDiffPreview(flow) {
480231
480248
  const lines2 = [];
@@ -480281,7 +480298,12 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480281
480298
  state.currentStepIndex = i3;
480282
480299
  try {
480283
480300
  if (onStepStart) {
480284
- 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
+ }
480285
480307
  }
480286
480308
  if (step.command) {
480287
480309
  await executeCommand(step.command, context2);
@@ -480370,9 +480392,7 @@ async function shouldContinueOnError(error52, step) {
480370
480392
  "ECONNRESET",
480371
480393
  "ENETUNREACH",
480372
480394
  "EPIPE",
480373
- "EAI_AGAIN",
480374
- "ENOTFOUND",
480375
- "ECONNREFUSED"
480395
+ "EAI_AGAIN"
480376
480396
  ];
480377
480397
  const err2 = error52;
480378
480398
  const codeFromProps = typeof err2.code === "string" ? err2.code : typeof err2.errno === "string" ? err2.errno : null;
@@ -582303,7 +582323,6 @@ var init_replBridge = __esm(() => {
582303
582323
  init_cleanupRegistry();
582304
582324
  init_bridgeMessaging();
582305
582325
  init_workSecret();
582306
- init_sessionIdCompat();
582307
582326
  init_concurrentSessions();
582308
582327
  init_trustedDevice();
582309
582328
  init_HybridTransport();
@@ -582884,7 +582903,6 @@ var init_remoteBridgeCore = __esm(() => {
582884
582903
  init_axios2();
582885
582904
  init_replBridgeTransport();
582886
582905
  init_workSecret();
582887
- init_sessionIdCompat();
582888
582906
  init_jwtUtils();
582889
582907
  init_trustedDevice();
582890
582908
  init_envLessBridgeConfig();
@@ -583175,7 +583193,6 @@ var init_initReplBridge = __esm(() => {
583175
583193
  init_envLessBridgeConfig();
583176
583194
  init_pollConfig();
583177
583195
  init_replBridge();
583178
- init_sessionIdCompat();
583179
583196
  });
583180
583197
 
583181
583198
  // src/cli/print.ts
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.285",
8
- BUILD_TIME: "2026-08-21T08:33:09.704Z",
7
+ VERSION: "0.1.292",
8
+ BUILD_TIME: "2026-08-23T17:01:45.131Z",
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.285",
120030
+ version: "0.1.292",
120031
120031
  private: false,
120032
120032
  description: "An open-source AI coding assistant in your terminal - powered by Claude",
120033
120033
  license: "MIT",
@@ -120094,7 +120094,7 @@ var init_package = __esm(() => {
120094
120094
  asciichart: "1.5.25",
120095
120095
  "async-mutex": "0.5.0",
120096
120096
  "auto-bind": "5.0.1",
120097
- axios: "1.19.0",
120097
+ axios: "1.7.9",
120098
120098
  "bidi-js": "1.0.3",
120099
120099
  chalk: "5.6.2",
120100
120100
  chokidar: "5.0.0",
@@ -282575,19 +282575,13 @@ __export(exports_sessionIdCompat, {
282575
282575
  getCseShimGate: () => getCseShimGate
282576
282576
  });
282577
282577
  async function setCseShimGate(gate) {
282578
- await _gateMutex.runExclusive(() => {
282579
- if (_isCseShimEnabled === undefined) {
282580
- _isCseShimEnabled = gate;
282581
- }
282582
- });
282578
+ _isCseShimEnabled = gate;
282583
282579
  }
282584
282580
  function getCseShimGate() {
282585
282581
  return _isCseShimEnabled;
282586
282582
  }
282587
282583
  async function resetCseShimGateForTesting() {
282588
- await _gateMutex.runExclusive(() => {
282589
- _isCseShimEnabled = undefined;
282590
- });
282584
+ _isCseShimEnabled = undefined;
282591
282585
  }
282592
282586
  function toCompatSessionId(id) {
282593
282587
  if (!id.startsWith("cse_"))
@@ -282603,11 +282597,7 @@ function toInfraSessionId(id) {
282603
282597
  return id;
282604
282598
  return "cse_" + id.slice("session_".length);
282605
282599
  }
282606
- var _isCseShimEnabled, _gateMutex;
282607
- var init_sessionIdCompat = __esm(() => {
282608
- init_async_mutex();
282609
- _gateMutex = new Mutex;
282610
- });
282600
+ var _isCseShimEnabled;
282611
282601
 
282612
282602
  // src/constants/product.ts
282613
282603
  function isRemoteSessionStaging(sessionId, ingressUrl) {
@@ -282626,7 +282616,7 @@ function getClaudeAiBaseUrl(sessionId, ingressUrl) {
282626
282616
  return CLAUDE_AI_BASE_URL;
282627
282617
  }
282628
282618
  function getRemoteSessionUrl(sessionId, ingressUrl) {
282629
- const { toCompatSessionId: toCompatSessionId2 } = (init_sessionIdCompat(), __toCommonJS(exports_sessionIdCompat));
282619
+ const { toCompatSessionId: toCompatSessionId2 } = __toCommonJS(exports_sessionIdCompat);
282630
282620
  const compatId = toCompatSessionId2(sessionId);
282631
282621
  const baseUrl = getClaudeAiBaseUrl(compatId, ingressUrl);
282632
282622
  return `${baseUrl}/code/${compatId}`;
@@ -387589,7 +387579,6 @@ var init_concurrentSessions = __esm(() => {
387589
387579
  // src/bridge/replBridgeHandle.ts
387590
387580
  var init_replBridgeHandle = __esm(() => {
387591
387581
  init_concurrentSessions();
387592
- init_sessionIdCompat();
387593
387582
  });
387594
387583
 
387595
387584
  // src/tasks/LocalMainSessionTask.ts
@@ -464046,7 +464035,6 @@ var init_createSession = __esm(() => {
464046
464035
  init_debug();
464047
464036
  init_errors();
464048
464037
  init_debugUtils();
464049
- init_sessionIdCompat();
464050
464038
  });
464051
464039
 
464052
464040
  // src/commands/rename/rename.ts
@@ -480216,16 +480204,45 @@ function sanitizeCommand(command6) {
480216
480204
  if (!ALLOWED_COMMANDS.has(program)) {
480217
480205
  throw new Error("Invalid command: program is not on the allowlist of permitted commands (input omitted for security)");
480218
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
+ }
480234
+ }
480219
480235
  return argv;
480220
480236
  }
480221
480237
  function escapeCodeSpan(text2) {
480222
- 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);
480223
480240
  const delim = "`".repeat(maxRun + 1);
480224
- const pad = text2.startsWith("`") || text2.endsWith("`") ? " " : "";
480225
- return `${delim}${pad}${text2}${pad}${delim}`;
480241
+ const pad = sanitized.startsWith("`") || sanitized.endsWith("`") ? " " : "";
480242
+ return `${delim}${pad}${sanitized}${pad}${delim}`;
480226
480243
  }
480227
480244
  function escapeMarkdown(text2) {
480228
- return text2.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, "\\)");
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, "\\)");
480229
480246
  }
480230
480247
  function generateDiffPreview(flow) {
480231
480248
  const lines2 = [];
@@ -480281,7 +480298,12 @@ async function executeFlow(flow, context2, onStepStart, onStepComplete, onStepFa
480281
480298
  state.currentStepIndex = i3;
480282
480299
  try {
480283
480300
  if (onStepStart) {
480284
- 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
+ }
480285
480307
  }
480286
480308
  if (step.command) {
480287
480309
  await executeCommand(step.command, context2);
@@ -480370,9 +480392,7 @@ async function shouldContinueOnError(error52, step) {
480370
480392
  "ECONNRESET",
480371
480393
  "ENETUNREACH",
480372
480394
  "EPIPE",
480373
- "EAI_AGAIN",
480374
- "ENOTFOUND",
480375
- "ECONNREFUSED"
480395
+ "EAI_AGAIN"
480376
480396
  ];
480377
480397
  const err2 = error52;
480378
480398
  const codeFromProps = typeof err2.code === "string" ? err2.code : typeof err2.errno === "string" ? err2.errno : null;
@@ -582303,7 +582323,6 @@ var init_replBridge = __esm(() => {
582303
582323
  init_cleanupRegistry();
582304
582324
  init_bridgeMessaging();
582305
582325
  init_workSecret();
582306
- init_sessionIdCompat();
582307
582326
  init_concurrentSessions();
582308
582327
  init_trustedDevice();
582309
582328
  init_HybridTransport();
@@ -582884,7 +582903,6 @@ var init_remoteBridgeCore = __esm(() => {
582884
582903
  init_axios2();
582885
582904
  init_replBridgeTransport();
582886
582905
  init_workSecret();
582887
- init_sessionIdCompat();
582888
582906
  init_jwtUtils();
582889
582907
  init_trustedDevice();
582890
582908
  init_envLessBridgeConfig();
@@ -583175,7 +583193,6 @@ var init_initReplBridge = __esm(() => {
583175
583193
  init_envLessBridgeConfig();
583176
583194
  init_pollConfig();
583177
583195
  init_replBridge();
583178
- init_sessionIdCompat();
583179
583196
  });
583180
583197
 
583181
583198
  // src/cli/print.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.285",
3
+ "version": "0.1.292",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",
@@ -67,7 +67,7 @@
67
67
  "asciichart": "1.5.25",
68
68
  "async-mutex": "0.5.0",
69
69
  "auto-bind": "5.0.1",
70
- "axios": "1.19.0",
70
+ "axios": "1.7.9",
71
71
  "bidi-js": "1.0.3",
72
72
  "chalk": "5.6.2",
73
73
  "chokidar": "5.0.0",