@funnycode/myclaude 0.1.78 → 0.1.80

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.78",
8
- BUILD_TIME: "2026-07-15T17:32:54.182Z",
7
+ VERSION: "0.1.80",
8
+ BUILD_TIME: "2026-07-16T03:20:12.229Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -37938,7 +37938,7 @@ function getLocalOauthConfig() {
37938
37938
  CONSOLE_SUCCESS_URL: `${consoleBase}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,
37939
37939
  CLAUDEAI_SUCCESS_URL: `${consoleBase}/oauth/code/success?app=claude-code`,
37940
37940
  MANUAL_REDIRECT_URL: `${consoleBase}/oauth/code/callback`,
37941
- CLIENT_ID: "local-dev-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
37941
+ CLIENT_ID: "PLACEHOLDER_CLIENT_ID_DO_NOT_USE",
37942
37942
  OAUTH_FILE_SUFFIX: "-local-oauth",
37943
37943
  MCP_PROXY_URL: "http://localhost:8205",
37944
37944
  MCP_PROXY_PATH: "/v1/toolbox/shttp/mcp/{server_id}"
@@ -38026,7 +38026,7 @@ var init_oauth = __esm(() => {
38026
38026
  CONSOLE_SUCCESS_URL: "https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",
38027
38027
  CLAUDEAI_SUCCESS_URL: "https://platform.claude.com/oauth/code/success?app=claude-code",
38028
38028
  MANUAL_REDIRECT_URL: "https://platform.claude.com/oauth/code/callback",
38029
- CLIENT_ID: "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
38029
+ CLIENT_ID: "PLACEHOLDER_CLIENT_ID_DO_NOT_USE",
38030
38030
  OAUTH_FILE_SUFFIX: "",
38031
38031
  MCP_PROXY_URL: "https://mcp-proxy.anthropic.com",
38032
38032
  MCP_PROXY_PATH: "/v1/mcp/{server_id}"
@@ -38042,15 +38042,13 @@ var init_oauth = __esm(() => {
38042
38042
  CONSOLE_SUCCESS_URL: "https://platform.staging.ant.dev/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",
38043
38043
  CLAUDEAI_SUCCESS_URL: "https://platform.staging.ant.dev/oauth/code/success?app=claude-code",
38044
38044
  MANUAL_REDIRECT_URL: "https://platform.staging.ant.dev/oauth/code/callback",
38045
- CLIENT_ID: "local-dev-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
38045
+ CLIENT_ID: "PLACEHOLDER_CLIENT_ID_DO_NOT_USE",
38046
38046
  OAUTH_FILE_SUFFIX: "-staging-oauth",
38047
38047
  MCP_PROXY_URL: "https://mcp-proxy-staging.anthropic.com",
38048
38048
  MCP_PROXY_PATH: "/v1/mcp/{server_id}"
38049
38049
  } : undefined;
38050
38050
  ALLOWED_OAUTH_BASE_URLS = [
38051
- "https://beacon.claude-ai.staging.ant.dev",
38052
- "https://claude.fedstart.com",
38053
- "https://claude-staging.fedstart.com"
38051
+ "https://claude.fedstart.com"
38054
38052
  ];
38055
38053
  });
38056
38054
 
@@ -114189,12 +114187,11 @@ class AwsAuthStatusManager {
114189
114187
  var init_awsAuthStatusManager = () => {};
114190
114188
 
114191
114189
  // src/constants/betas.ts
114192
- var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER, ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS;
114190
+ var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER = "", ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS;
114193
114191
  var init_betas = __esm(() => {
114194
114192
  init_growthbook();
114195
114193
  SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER = getFeatureValue_CACHED_MAY_BE_STALE("CONNECTOR_TEXT", false) ? "summarize-connector-text-2026-03-13" : "";
114196
114194
  AFK_MODE_BETA_HEADER = getFeatureValue_CACHED_MAY_BE_STALE("TRANSCRIPT_CLASSIFIER", false) ? "afk-mode-2026-01-31" : "";
114197
- CLI_INTERNAL_BETA_HEADER = process.env.USER_TYPE === "ant" ? "cli-internal-2026-02-09" : "";
114198
114195
  BEDROCK_EXTRA_PARAMS_HEADERS = new Set([
114199
114196
  INTERLEAVED_THINKING_BETA_HEADER,
114200
114197
  CONTEXT_1M_BETA_HEADER,
@@ -117485,6 +117482,140 @@ var init_auth = __esm(() => {
117485
117482
  };
117486
117483
  });
117487
117484
 
117485
+ // package.json
117486
+ var package_default;
117487
+ var init_package = __esm(() => {
117488
+ package_default = {
117489
+ name: "@funnycode/myclaude",
117490
+ version: "0.1.80",
117491
+ private: false,
117492
+ description: "An open-source AI coding assistant in your terminal - powered by Claude",
117493
+ license: "MIT",
117494
+ type: "module",
117495
+ packageManager: "bun@1.3.5",
117496
+ repository: {
117497
+ type: "git",
117498
+ url: "https://github.com/thomaslwq/myclaude.git"
117499
+ },
117500
+ bugs: {
117501
+ url: "https://github.com/thomaslwq/myclaude/issues"
117502
+ },
117503
+ homepage: "https://github.com/thomaslwq/myclaude",
117504
+ engines: {
117505
+ bun: ">=1.3.5",
117506
+ node: ">=18.0.0"
117507
+ },
117508
+ scripts: {
117509
+ dev: "bun run ./src/dev-entry.ts",
117510
+ start: "bun run ./src/dev-entry.ts",
117511
+ test: "bun test",
117512
+ "test:watch": "bun test --watch",
117513
+ build: "bun run ./scripts/build.ts",
117514
+ prepublishOnly: "bun run build",
117515
+ version: "bun run ./src/dev-entry.ts --version"
117516
+ },
117517
+ bin: {
117518
+ myclaude: "bin/myclaude.cjs"
117519
+ },
117520
+ files: [
117521
+ "dist/",
117522
+ "seed/",
117523
+ "bin/",
117524
+ "LICENSE",
117525
+ "README.md",
117526
+ "README.zh-CN.md",
117527
+ "CHANGELOG.md",
117528
+ "docs/funnycode.png",
117529
+ "shims/node-domexception/"
117530
+ ],
117531
+ publishConfig: {
117532
+ access: "public"
117533
+ },
117534
+ dependencies: {
117535
+ "@alcalzone/ansi-tokenize": "0.3.0",
117536
+ "@anthropic-ai/claude-agent-sdk": "^0.3.207",
117537
+ "@anthropic-ai/mcpb": "2.1.2",
117538
+ "@anthropic-ai/sandbox-runtime": "0.0.44",
117539
+ "@anthropic-ai/sdk": "0.111.0",
117540
+ "@aws-sdk/client-bedrock-runtime": "3.1020.0",
117541
+ "@commander-js/extra-typings": "14.0.0",
117542
+ "@growthbook/growthbook": "1.6.5",
117543
+ "@modelcontextprotocol/sdk": "1.29.0",
117544
+ "@opentelemetry/api": "1.9.1",
117545
+ "@opentelemetry/api-logs": "0.214.0",
117546
+ "@opentelemetry/core": "2.6.1",
117547
+ "@opentelemetry/resources": "2.6.1",
117548
+ "@opentelemetry/sdk-logs": "0.214.0",
117549
+ "@opentelemetry/sdk-metrics": "2.6.1",
117550
+ "@opentelemetry/sdk-trace-base": "2.6.1",
117551
+ "@opentelemetry/semantic-conventions": "1.40.0",
117552
+ ajv: "8.18.0",
117553
+ asciichart: "1.5.25",
117554
+ "auto-bind": "5.0.1",
117555
+ axios: "1.14.0",
117556
+ "bidi-js": "1.0.3",
117557
+ chalk: "5.6.2",
117558
+ chokidar: "5.0.0",
117559
+ "cli-boxes": "4.0.1",
117560
+ "code-excerpt": "4.0.0",
117561
+ diff: "8.0.4",
117562
+ "emoji-regex": "10.6.0",
117563
+ "env-paths": "4.0.0",
117564
+ execa: "9.6.1",
117565
+ figures: "6.1.0",
117566
+ "fuse.js": "7.1.0",
117567
+ "get-east-asian-width": "1.5.0",
117568
+ "google-auth-library": "10.6.2",
117569
+ "highlight.js": "11.11.1",
117570
+ "https-proxy-agent": "8.0.0",
117571
+ ignore: "7.0.5",
117572
+ "indent-string": "5.0.0",
117573
+ ink: "6.8.0",
117574
+ "jsonc-parser": "3.3.1",
117575
+ "lodash-es": "4.17.23",
117576
+ "lru-cache": "11.2.7",
117577
+ marked: "17.0.5",
117578
+ "p-map": "7.0.4",
117579
+ picomatch: "4.0.4",
117580
+ "proper-lockfile": "4.1.2",
117581
+ qrcode: "1.5.4",
117582
+ react: "19.2.4",
117583
+ "react-reconciler": "0.33.0",
117584
+ semver: "7.7.4",
117585
+ "shell-quote": "1.8.3",
117586
+ "signal-exit": "4.1.0",
117587
+ "stack-utils": "2.0.6",
117588
+ "strip-ansi": "7.2.0",
117589
+ "supports-hyperlinks": "4.4.0",
117590
+ "tree-kill": "1.2.2",
117591
+ "type-fest": "5.5.0",
117592
+ undici: "7.24.6",
117593
+ "usehooks-ts": "3.1.1",
117594
+ "vscode-jsonrpc": "8.2.1",
117595
+ "vscode-languageserver-protocol": "3.17.5",
117596
+ "vscode-languageserver-types": "3.17.5",
117597
+ "wrap-ansi": "10.0.0",
117598
+ ws: "8.20.0",
117599
+ xss: "1.0.15",
117600
+ yaml: "2.8.3",
117601
+ zod: "4.3.6"
117602
+ },
117603
+ optionalDependencies: {
117604
+ "@ant/claude-for-chrome-mcp": "file:./shims/ant-claude-for-chrome-mcp",
117605
+ "@ant/computer-use-input": "file:./shims/ant-computer-use-input",
117606
+ "@ant/computer-use-mcp": "file:./shims/ant-computer-use-mcp",
117607
+ "@ant/computer-use-swift": "file:./shims/ant-computer-use-swift",
117608
+ "color-diff-napi": "file:./shims/color-diff-napi",
117609
+ "modifiers-napi": "file:./shims/modifiers-napi",
117610
+ "node-domexception": "file:./shims/node-domexception",
117611
+ "url-handler-napi": "file:./shims/url-handler-napi"
117612
+ },
117613
+ overrides: {
117614
+ "node-domexception": "file:./shims/node-domexception"
117615
+ }
117616
+ };
117617
+ });
117618
+
117488
117619
  // src/constants/system.ts
117489
117620
  function getCLISyspromptPrefix(options) {
117490
117621
  const apiProvider = getAPIProvider();
@@ -117509,13 +117640,12 @@ function getAttributionHeader(fingerprint) {
117509
117640
  if (!isAttributionHeaderEnabled()) {
117510
117641
  return "";
117511
117642
  }
117512
- const baseVersion = globalThis.MACRO?.VERSION ?? "unknown";
117643
+ const baseVersion = globalThis.MACRO?.VERSION ?? package_default.version;
117513
117644
  const version2 = `${baseVersion}.${fingerprint}`;
117514
117645
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
117515
- const cch = getFeatureValue_CACHED_MAY_BE_STALE("NATIVE_CLIENT_ATTESTATION", false) ? " cch=00000;" : "";
117516
117646
  const workload = getWorkload();
117517
117647
  const workloadPair = workload ? ` cc_workload=${workload};` : "";
117518
- const header = `x-anthropic-billing-header: cc_version=${version2}; cc_entrypoint=${entrypoint};${cch}${workloadPair}`;
117648
+ const header = `x-anthropic-billing-header: cc_version=${version2}; cc_entrypoint=${entrypoint};${workloadPair}`;
117519
117649
  logForDebugging(`attribution header ${header}`);
117520
117650
  return header;
117521
117651
  }
@@ -117526,6 +117656,7 @@ var init_system = __esm(() => {
117526
117656
  init_envUtils();
117527
117657
  init_providers();
117528
117658
  init_workloadContext();
117659
+ init_package();
117529
117660
  CLI_SYSPROMPT_PREFIX_VALUES = [
117530
117661
  DEFAULT_PREFIX,
117531
117662
  AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX,
@@ -201484,9 +201615,20 @@ var init_agentMemorySnapshot = __esm(() => {
201484
201615
  var SEND_MESSAGE_TOOL_NAME = "SendMessage";
201485
201616
 
201486
201617
  // src/constants/common.ts
201618
+ function isValidISODate(dateStr) {
201619
+ const isoDateRegex = /^\d{4}-\d{2}-\d{2}$/;
201620
+ if (!isoDateRegex.test(dateStr)) {
201621
+ return false;
201622
+ }
201623
+ const [year, month, day] = dateStr.split("-").map(Number);
201624
+ const parsedDate = new Date(year, month - 1, day);
201625
+ return parsedDate.getFullYear() === year && parsedDate.getMonth() === month - 1 && parsedDate.getDate() === day;
201626
+ }
201487
201627
  function getLocalISODate() {
201488
201628
  if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
201489
- return process.env.CLAUDE_CODE_OVERRIDE_DATE;
201629
+ if (isValidISODate(process.env.CLAUDE_CODE_OVERRIDE_DATE)) {
201630
+ return process.env.CLAUDE_CODE_OVERRIDE_DATE;
201631
+ }
201490
201632
  }
201491
201633
  const now2 = new Date;
201492
201634
  const year = now2.getFullYear();
@@ -201495,7 +201637,13 @@ function getLocalISODate() {
201495
201637
  return `${year}-${month}-${day}`;
201496
201638
  }
201497
201639
  function getLocalMonthYear() {
201498
- const date5 = process.env.CLAUDE_CODE_OVERRIDE_DATE ? new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE) : new Date;
201640
+ if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
201641
+ if (isValidISODate(process.env.CLAUDE_CODE_OVERRIDE_DATE)) {
201642
+ const date6 = new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE);
201643
+ return date6.toLocaleString("en-US", { month: "long", year: "numeric" });
201644
+ }
201645
+ }
201646
+ const date5 = new Date;
201499
201647
  return date5.toLocaleString("en-US", { month: "long", year: "numeric" });
201500
201648
  }
201501
201649
  var getSessionStartDate;
@@ -210032,7 +210180,9 @@ function appendToFile(filePath, entries) {
210032
210180
  return;
210033
210181
  fs11.mkdir(dirname27(filePath), { recursive: true }).then(() => fs11.appendFile(filePath, entries.join(`
210034
210182
  `) + `
210035
- `)).catch(() => {});
210183
+ `)).catch((err2) => {
210184
+ logForDebugging(`dumpPrompts.appendToFile error: ${err2}`, { level: "error" });
210185
+ });
210036
210186
  }
210037
210187
  function initFingerprint(req) {
210038
210188
  const tools = req.tools;
@@ -210071,7 +210221,9 @@ function dumpRequest(body, ts, state, filePath) {
210071
210221
  }
210072
210222
  state.messageCountSeen = messages.length;
210073
210223
  appendToFile(filePath, entries);
210074
- } catch {}
210224
+ } catch (err2) {
210225
+ logForDebugging(`dumpPrompts.dumpRequest error: ${err2}`, { level: "error" });
210226
+ }
210075
210227
  }
210076
210228
  function createDumpPromptsFetch(agentIdOrSessionId) {
210077
210229
  const filePath = getDumpPromptsPath(agentIdOrSessionId);
@@ -210118,7 +210270,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210118
210270
  if (line.startsWith("data: ") && line !== "data: [DONE]") {
210119
210271
  try {
210120
210272
  chunks.push(jsonParse(line.slice(6)));
210121
- } catch {}
210273
+ } catch (err2) {
210274
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210275
+ }
210122
210276
  }
210123
210277
  }
210124
210278
  }
@@ -210128,7 +210282,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210128
210282
  }
210129
210283
  await fs11.appendFile(filePath, jsonStringify({ type: "response", timestamp, data }) + `
210130
210284
  `);
210131
- } catch {}
210285
+ } catch (err2) {
210286
+ logForDebugging(`dumpPrompts.response handler error: ${err2}`, { level: "error" });
210287
+ }
210132
210288
  })();
210133
210289
  }
210134
210290
  return response;
@@ -210139,6 +210295,7 @@ var init_dumpPrompts = __esm(() => {
210139
210295
  init_state();
210140
210296
  init_envUtils();
210141
210297
  init_slowOperations();
210298
+ init_debug();
210142
210299
  cachedApiRequests = [];
210143
210300
  dumpState = new Map;
210144
210301
  });
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.78",
8
- BUILD_TIME: "2026-07-15T17:32:54.182Z",
7
+ VERSION: "0.1.80",
8
+ BUILD_TIME: "2026-07-16T03:20:12.229Z",
9
9
  PACKAGE_URL: "@funnycode/myclaude",
10
10
  NATIVE_PACKAGE_URL: "@funnycode/myclaude",
11
11
  VERSION_CHANGELOG: '',
@@ -37938,7 +37938,7 @@ function getLocalOauthConfig() {
37938
37938
  CONSOLE_SUCCESS_URL: `${consoleBase}/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code`,
37939
37939
  CLAUDEAI_SUCCESS_URL: `${consoleBase}/oauth/code/success?app=claude-code`,
37940
37940
  MANUAL_REDIRECT_URL: `${consoleBase}/oauth/code/callback`,
37941
- CLIENT_ID: "local-dev-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
37941
+ CLIENT_ID: "PLACEHOLDER_CLIENT_ID_DO_NOT_USE",
37942
37942
  OAUTH_FILE_SUFFIX: "-local-oauth",
37943
37943
  MCP_PROXY_URL: "http://localhost:8205",
37944
37944
  MCP_PROXY_PATH: "/v1/toolbox/shttp/mcp/{server_id}"
@@ -38026,7 +38026,7 @@ var init_oauth = __esm(() => {
38026
38026
  CONSOLE_SUCCESS_URL: "https://platform.claude.com/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",
38027
38027
  CLAUDEAI_SUCCESS_URL: "https://platform.claude.com/oauth/code/success?app=claude-code",
38028
38028
  MANUAL_REDIRECT_URL: "https://platform.claude.com/oauth/code/callback",
38029
- CLIENT_ID: "9d1c250a-e61b-44d9-88ed-5944d1962f5e",
38029
+ CLIENT_ID: "PLACEHOLDER_CLIENT_ID_DO_NOT_USE",
38030
38030
  OAUTH_FILE_SUFFIX: "",
38031
38031
  MCP_PROXY_URL: "https://mcp-proxy.anthropic.com",
38032
38032
  MCP_PROXY_PATH: "/v1/mcp/{server_id}"
@@ -38042,15 +38042,13 @@ var init_oauth = __esm(() => {
38042
38042
  CONSOLE_SUCCESS_URL: "https://platform.staging.ant.dev/buy_credits?returnUrl=/oauth/code/success%3Fapp%3Dclaude-code",
38043
38043
  CLAUDEAI_SUCCESS_URL: "https://platform.staging.ant.dev/oauth/code/success?app=claude-code",
38044
38044
  MANUAL_REDIRECT_URL: "https://platform.staging.ant.dev/oauth/code/callback",
38045
- CLIENT_ID: "local-dev-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
38045
+ CLIENT_ID: "PLACEHOLDER_CLIENT_ID_DO_NOT_USE",
38046
38046
  OAUTH_FILE_SUFFIX: "-staging-oauth",
38047
38047
  MCP_PROXY_URL: "https://mcp-proxy-staging.anthropic.com",
38048
38048
  MCP_PROXY_PATH: "/v1/mcp/{server_id}"
38049
38049
  } : undefined;
38050
38050
  ALLOWED_OAUTH_BASE_URLS = [
38051
- "https://beacon.claude-ai.staging.ant.dev",
38052
- "https://claude.fedstart.com",
38053
- "https://claude-staging.fedstart.com"
38051
+ "https://claude.fedstart.com"
38054
38052
  ];
38055
38053
  });
38056
38054
 
@@ -114189,12 +114187,11 @@ class AwsAuthStatusManager {
114189
114187
  var init_awsAuthStatusManager = () => {};
114190
114188
 
114191
114189
  // src/constants/betas.ts
114192
- var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER, ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS;
114190
+ var CLAUDE_CODE_20250219_BETA_HEADER = "claude-code-20250219", INTERLEAVED_THINKING_BETA_HEADER = "interleaved-thinking-2025-05-14", CONTEXT_1M_BETA_HEADER = "context-1m-2025-08-07", CONTEXT_MANAGEMENT_BETA_HEADER = "context-management-2025-06-27", STRUCTURED_OUTPUTS_BETA_HEADER = "structured-outputs-2025-12-15", WEB_SEARCH_BETA_HEADER = "web-search-2025-03-05", TOOL_SEARCH_BETA_HEADER_1P = "advanced-tool-use-2025-11-20", TOOL_SEARCH_BETA_HEADER_3P = "tool-search-tool-2025-10-19", EFFORT_BETA_HEADER = "effort-2025-11-24", TASK_BUDGETS_BETA_HEADER = "task-budgets-2026-03-13", PROMPT_CACHING_SCOPE_BETA_HEADER = "prompt-caching-scope-2026-01-05", FAST_MODE_BETA_HEADER = "fast-mode-2026-02-01", REDACT_THINKING_BETA_HEADER = "redact-thinking-2026-02-12", TOKEN_EFFICIENT_TOOLS_BETA_HEADER = "token-efficient-tools-2026-03-28", SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER, AFK_MODE_BETA_HEADER, CLI_INTERNAL_BETA_HEADER = "", ADVISOR_BETA_HEADER = "advisor-tool-2026-03-01", BEDROCK_EXTRA_PARAMS_HEADERS, VERTEX_COUNT_TOKENS_ALLOWED_BETAS;
114193
114191
  var init_betas = __esm(() => {
114194
114192
  init_growthbook();
114195
114193
  SUMMARIZE_CONNECTOR_TEXT_BETA_HEADER = getFeatureValue_CACHED_MAY_BE_STALE("CONNECTOR_TEXT", false) ? "summarize-connector-text-2026-03-13" : "";
114196
114194
  AFK_MODE_BETA_HEADER = getFeatureValue_CACHED_MAY_BE_STALE("TRANSCRIPT_CLASSIFIER", false) ? "afk-mode-2026-01-31" : "";
114197
- CLI_INTERNAL_BETA_HEADER = process.env.USER_TYPE === "ant" ? "cli-internal-2026-02-09" : "";
114198
114195
  BEDROCK_EXTRA_PARAMS_HEADERS = new Set([
114199
114196
  INTERLEAVED_THINKING_BETA_HEADER,
114200
114197
  CONTEXT_1M_BETA_HEADER,
@@ -117485,6 +117482,140 @@ var init_auth = __esm(() => {
117485
117482
  };
117486
117483
  });
117487
117484
 
117485
+ // package.json
117486
+ var package_default;
117487
+ var init_package = __esm(() => {
117488
+ package_default = {
117489
+ name: "@funnycode/myclaude",
117490
+ version: "0.1.80",
117491
+ private: false,
117492
+ description: "An open-source AI coding assistant in your terminal - powered by Claude",
117493
+ license: "MIT",
117494
+ type: "module",
117495
+ packageManager: "bun@1.3.5",
117496
+ repository: {
117497
+ type: "git",
117498
+ url: "https://github.com/thomaslwq/myclaude.git"
117499
+ },
117500
+ bugs: {
117501
+ url: "https://github.com/thomaslwq/myclaude/issues"
117502
+ },
117503
+ homepage: "https://github.com/thomaslwq/myclaude",
117504
+ engines: {
117505
+ bun: ">=1.3.5",
117506
+ node: ">=18.0.0"
117507
+ },
117508
+ scripts: {
117509
+ dev: "bun run ./src/dev-entry.ts",
117510
+ start: "bun run ./src/dev-entry.ts",
117511
+ test: "bun test",
117512
+ "test:watch": "bun test --watch",
117513
+ build: "bun run ./scripts/build.ts",
117514
+ prepublishOnly: "bun run build",
117515
+ version: "bun run ./src/dev-entry.ts --version"
117516
+ },
117517
+ bin: {
117518
+ myclaude: "bin/myclaude.cjs"
117519
+ },
117520
+ files: [
117521
+ "dist/",
117522
+ "seed/",
117523
+ "bin/",
117524
+ "LICENSE",
117525
+ "README.md",
117526
+ "README.zh-CN.md",
117527
+ "CHANGELOG.md",
117528
+ "docs/funnycode.png",
117529
+ "shims/node-domexception/"
117530
+ ],
117531
+ publishConfig: {
117532
+ access: "public"
117533
+ },
117534
+ dependencies: {
117535
+ "@alcalzone/ansi-tokenize": "0.3.0",
117536
+ "@anthropic-ai/claude-agent-sdk": "^0.3.207",
117537
+ "@anthropic-ai/mcpb": "2.1.2",
117538
+ "@anthropic-ai/sandbox-runtime": "0.0.44",
117539
+ "@anthropic-ai/sdk": "0.111.0",
117540
+ "@aws-sdk/client-bedrock-runtime": "3.1020.0",
117541
+ "@commander-js/extra-typings": "14.0.0",
117542
+ "@growthbook/growthbook": "1.6.5",
117543
+ "@modelcontextprotocol/sdk": "1.29.0",
117544
+ "@opentelemetry/api": "1.9.1",
117545
+ "@opentelemetry/api-logs": "0.214.0",
117546
+ "@opentelemetry/core": "2.6.1",
117547
+ "@opentelemetry/resources": "2.6.1",
117548
+ "@opentelemetry/sdk-logs": "0.214.0",
117549
+ "@opentelemetry/sdk-metrics": "2.6.1",
117550
+ "@opentelemetry/sdk-trace-base": "2.6.1",
117551
+ "@opentelemetry/semantic-conventions": "1.40.0",
117552
+ ajv: "8.18.0",
117553
+ asciichart: "1.5.25",
117554
+ "auto-bind": "5.0.1",
117555
+ axios: "1.14.0",
117556
+ "bidi-js": "1.0.3",
117557
+ chalk: "5.6.2",
117558
+ chokidar: "5.0.0",
117559
+ "cli-boxes": "4.0.1",
117560
+ "code-excerpt": "4.0.0",
117561
+ diff: "8.0.4",
117562
+ "emoji-regex": "10.6.0",
117563
+ "env-paths": "4.0.0",
117564
+ execa: "9.6.1",
117565
+ figures: "6.1.0",
117566
+ "fuse.js": "7.1.0",
117567
+ "get-east-asian-width": "1.5.0",
117568
+ "google-auth-library": "10.6.2",
117569
+ "highlight.js": "11.11.1",
117570
+ "https-proxy-agent": "8.0.0",
117571
+ ignore: "7.0.5",
117572
+ "indent-string": "5.0.0",
117573
+ ink: "6.8.0",
117574
+ "jsonc-parser": "3.3.1",
117575
+ "lodash-es": "4.17.23",
117576
+ "lru-cache": "11.2.7",
117577
+ marked: "17.0.5",
117578
+ "p-map": "7.0.4",
117579
+ picomatch: "4.0.4",
117580
+ "proper-lockfile": "4.1.2",
117581
+ qrcode: "1.5.4",
117582
+ react: "19.2.4",
117583
+ "react-reconciler": "0.33.0",
117584
+ semver: "7.7.4",
117585
+ "shell-quote": "1.8.3",
117586
+ "signal-exit": "4.1.0",
117587
+ "stack-utils": "2.0.6",
117588
+ "strip-ansi": "7.2.0",
117589
+ "supports-hyperlinks": "4.4.0",
117590
+ "tree-kill": "1.2.2",
117591
+ "type-fest": "5.5.0",
117592
+ undici: "7.24.6",
117593
+ "usehooks-ts": "3.1.1",
117594
+ "vscode-jsonrpc": "8.2.1",
117595
+ "vscode-languageserver-protocol": "3.17.5",
117596
+ "vscode-languageserver-types": "3.17.5",
117597
+ "wrap-ansi": "10.0.0",
117598
+ ws: "8.20.0",
117599
+ xss: "1.0.15",
117600
+ yaml: "2.8.3",
117601
+ zod: "4.3.6"
117602
+ },
117603
+ optionalDependencies: {
117604
+ "@ant/claude-for-chrome-mcp": "file:./shims/ant-claude-for-chrome-mcp",
117605
+ "@ant/computer-use-input": "file:./shims/ant-computer-use-input",
117606
+ "@ant/computer-use-mcp": "file:./shims/ant-computer-use-mcp",
117607
+ "@ant/computer-use-swift": "file:./shims/ant-computer-use-swift",
117608
+ "color-diff-napi": "file:./shims/color-diff-napi",
117609
+ "modifiers-napi": "file:./shims/modifiers-napi",
117610
+ "node-domexception": "file:./shims/node-domexception",
117611
+ "url-handler-napi": "file:./shims/url-handler-napi"
117612
+ },
117613
+ overrides: {
117614
+ "node-domexception": "file:./shims/node-domexception"
117615
+ }
117616
+ };
117617
+ });
117618
+
117488
117619
  // src/constants/system.ts
117489
117620
  function getCLISyspromptPrefix(options) {
117490
117621
  const apiProvider = getAPIProvider();
@@ -117509,13 +117640,12 @@ function getAttributionHeader(fingerprint) {
117509
117640
  if (!isAttributionHeaderEnabled()) {
117510
117641
  return "";
117511
117642
  }
117512
- const baseVersion = globalThis.MACRO?.VERSION ?? "unknown";
117643
+ const baseVersion = globalThis.MACRO?.VERSION ?? package_default.version;
117513
117644
  const version2 = `${baseVersion}.${fingerprint}`;
117514
117645
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
117515
- const cch = getFeatureValue_CACHED_MAY_BE_STALE("NATIVE_CLIENT_ATTESTATION", false) ? " cch=00000;" : "";
117516
117646
  const workload = getWorkload();
117517
117647
  const workloadPair = workload ? ` cc_workload=${workload};` : "";
117518
- const header = `x-anthropic-billing-header: cc_version=${version2}; cc_entrypoint=${entrypoint};${cch}${workloadPair}`;
117648
+ const header = `x-anthropic-billing-header: cc_version=${version2}; cc_entrypoint=${entrypoint};${workloadPair}`;
117519
117649
  logForDebugging(`attribution header ${header}`);
117520
117650
  return header;
117521
117651
  }
@@ -117526,6 +117656,7 @@ var init_system = __esm(() => {
117526
117656
  init_envUtils();
117527
117657
  init_providers();
117528
117658
  init_workloadContext();
117659
+ init_package();
117529
117660
  CLI_SYSPROMPT_PREFIX_VALUES = [
117530
117661
  DEFAULT_PREFIX,
117531
117662
  AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX,
@@ -201484,9 +201615,20 @@ var init_agentMemorySnapshot = __esm(() => {
201484
201615
  var SEND_MESSAGE_TOOL_NAME = "SendMessage";
201485
201616
 
201486
201617
  // src/constants/common.ts
201618
+ function isValidISODate(dateStr) {
201619
+ const isoDateRegex = /^\d{4}-\d{2}-\d{2}$/;
201620
+ if (!isoDateRegex.test(dateStr)) {
201621
+ return false;
201622
+ }
201623
+ const [year, month, day] = dateStr.split("-").map(Number);
201624
+ const parsedDate = new Date(year, month - 1, day);
201625
+ return parsedDate.getFullYear() === year && parsedDate.getMonth() === month - 1 && parsedDate.getDate() === day;
201626
+ }
201487
201627
  function getLocalISODate() {
201488
201628
  if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
201489
- return process.env.CLAUDE_CODE_OVERRIDE_DATE;
201629
+ if (isValidISODate(process.env.CLAUDE_CODE_OVERRIDE_DATE)) {
201630
+ return process.env.CLAUDE_CODE_OVERRIDE_DATE;
201631
+ }
201490
201632
  }
201491
201633
  const now2 = new Date;
201492
201634
  const year = now2.getFullYear();
@@ -201495,7 +201637,13 @@ function getLocalISODate() {
201495
201637
  return `${year}-${month}-${day}`;
201496
201638
  }
201497
201639
  function getLocalMonthYear() {
201498
- const date5 = process.env.CLAUDE_CODE_OVERRIDE_DATE ? new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE) : new Date;
201640
+ if (process.env.CLAUDE_CODE_OVERRIDE_DATE) {
201641
+ if (isValidISODate(process.env.CLAUDE_CODE_OVERRIDE_DATE)) {
201642
+ const date6 = new Date(process.env.CLAUDE_CODE_OVERRIDE_DATE);
201643
+ return date6.toLocaleString("en-US", { month: "long", year: "numeric" });
201644
+ }
201645
+ }
201646
+ const date5 = new Date;
201499
201647
  return date5.toLocaleString("en-US", { month: "long", year: "numeric" });
201500
201648
  }
201501
201649
  var getSessionStartDate;
@@ -210032,7 +210180,9 @@ function appendToFile(filePath, entries) {
210032
210180
  return;
210033
210181
  fs11.mkdir(dirname27(filePath), { recursive: true }).then(() => fs11.appendFile(filePath, entries.join(`
210034
210182
  `) + `
210035
- `)).catch(() => {});
210183
+ `)).catch((err2) => {
210184
+ logForDebugging(`dumpPrompts.appendToFile error: ${err2}`, { level: "error" });
210185
+ });
210036
210186
  }
210037
210187
  function initFingerprint(req) {
210038
210188
  const tools = req.tools;
@@ -210071,7 +210221,9 @@ function dumpRequest(body, ts, state, filePath) {
210071
210221
  }
210072
210222
  state.messageCountSeen = messages.length;
210073
210223
  appendToFile(filePath, entries);
210074
- } catch {}
210224
+ } catch (err2) {
210225
+ logForDebugging(`dumpPrompts.dumpRequest error: ${err2}`, { level: "error" });
210226
+ }
210075
210227
  }
210076
210228
  function createDumpPromptsFetch(agentIdOrSessionId) {
210077
210229
  const filePath = getDumpPromptsPath(agentIdOrSessionId);
@@ -210118,7 +210270,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210118
210270
  if (line.startsWith("data: ") && line !== "data: [DONE]") {
210119
210271
  try {
210120
210272
  chunks.push(jsonParse(line.slice(6)));
210121
- } catch {}
210273
+ } catch (err2) {
210274
+ logForDebugging(`dumpPrompts.SSE parse error: ${err2}`, { level: "error" });
210275
+ }
210122
210276
  }
210123
210277
  }
210124
210278
  }
@@ -210128,7 +210282,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210128
210282
  }
210129
210283
  await fs11.appendFile(filePath, jsonStringify({ type: "response", timestamp, data }) + `
210130
210284
  `);
210131
- } catch {}
210285
+ } catch (err2) {
210286
+ logForDebugging(`dumpPrompts.response handler error: ${err2}`, { level: "error" });
210287
+ }
210132
210288
  })();
210133
210289
  }
210134
210290
  return response;
@@ -210139,6 +210295,7 @@ var init_dumpPrompts = __esm(() => {
210139
210295
  init_state();
210140
210296
  init_envUtils();
210141
210297
  init_slowOperations();
210298
+ init_debug();
210142
210299
  cachedApiRequests = [];
210143
210300
  dumpState = new Map;
210144
210301
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",