@funnycode/myclaude 0.1.79 → 0.1.81

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.79",
8
- BUILD_TIME: "2026-07-15T19:25:35.599Z",
7
+ VERSION: "0.1.81",
8
+ BUILD_TIME: "2026-07-16T06:38:00.106Z",
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
 
@@ -117484,6 +117482,140 @@ var init_auth = __esm(() => {
117484
117482
  };
117485
117483
  });
117486
117484
 
117485
+ // package.json
117486
+ var package_default;
117487
+ var init_package = __esm(() => {
117488
+ package_default = {
117489
+ name: "@funnycode/myclaude",
117490
+ version: "0.1.81",
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
+
117487
117619
  // src/constants/system.ts
117488
117620
  function getCLISyspromptPrefix(options) {
117489
117621
  const apiProvider = getAPIProvider();
@@ -117508,13 +117640,12 @@ function getAttributionHeader(fingerprint) {
117508
117640
  if (!isAttributionHeaderEnabled()) {
117509
117641
  return "";
117510
117642
  }
117511
- const baseVersion = globalThis.MACRO?.VERSION ?? "unknown";
117643
+ const baseVersion = globalThis.MACRO?.VERSION ?? package_default.version;
117512
117644
  const version2 = `${baseVersion}.${fingerprint}`;
117513
117645
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
117514
- const cch = getFeatureValue_CACHED_MAY_BE_STALE("NATIVE_CLIENT_ATTESTATION", false) ? " cch=00000;" : "";
117515
117646
  const workload = getWorkload();
117516
117647
  const workloadPair = workload ? ` cc_workload=${workload};` : "";
117517
- 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}`;
117518
117649
  logForDebugging(`attribution header ${header}`);
117519
117650
  return header;
117520
117651
  }
@@ -117525,6 +117656,7 @@ var init_system = __esm(() => {
117525
117656
  init_envUtils();
117526
117657
  init_providers();
117527
117658
  init_workloadContext();
117659
+ init_package();
117528
117660
  CLI_SYSPROMPT_PREFIX_VALUES = [
117529
117661
  DEFAULT_PREFIX,
117530
117662
  AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX,
@@ -210023,6 +210155,29 @@ import { dirname as dirname27, join as join48 } from "path";
210023
210155
  function hashString3(str) {
210024
210156
  return createHash5("sha256").update(str).digest("hex");
210025
210157
  }
210158
+ function enqueueDumpRequest(agentIdOrSessionId, callback) {
210159
+ if (!dumpRequestQueue.has(agentIdOrSessionId)) {
210160
+ dumpRequestQueue.set(agentIdOrSessionId, []);
210161
+ }
210162
+ dumpRequestQueue.get(agentIdOrSessionId).push(callback);
210163
+ if (dumpRequestQueue.get(agentIdOrSessionId).length === 1) {
210164
+ processQueue(agentIdOrSessionId);
210165
+ }
210166
+ }
210167
+ function processQueue(agentIdOrSessionId) {
210168
+ const queue = dumpRequestQueue.get(agentIdOrSessionId);
210169
+ if (!queue || queue.length === 0) {
210170
+ dumpRequestQueue.delete(agentIdOrSessionId);
210171
+ return;
210172
+ }
210173
+ const callback = queue.shift();
210174
+ callback();
210175
+ if (queue.length > 0) {
210176
+ setImmediate(() => processQueue(agentIdOrSessionId));
210177
+ } else {
210178
+ dumpRequestQueue.delete(agentIdOrSessionId);
210179
+ }
210180
+ }
210026
210181
  function clearDumpState(agentIdOrSessionId) {
210027
210182
  dumpState.delete(agentIdOrSessionId);
210028
210183
  }
@@ -210032,10 +210187,14 @@ function clearAllDumpState() {
210032
210187
  function addApiRequestToCache(requestData) {
210033
210188
  if (process.env.USER_TYPE !== "ant")
210034
210189
  return;
210035
- cachedApiRequests.push({
210190
+ const metadata = {
210036
210191
  timestamp: new Date().toISOString(),
210037
- request: requestData
210038
- });
210192
+ request: {
210193
+ model: requestData.model,
210194
+ requestHash: hashString3(JSON.stringify(requestData))
210195
+ }
210196
+ };
210197
+ cachedApiRequests.push(metadata);
210039
210198
  if (cachedApiRequests.length > MAX_CACHED_REQUESTS) {
210040
210199
  cachedApiRequests.shift();
210041
210200
  }
@@ -210106,7 +210265,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210106
210265
  let timestamp;
210107
210266
  if (init2?.method === "POST" && init2.body) {
210108
210267
  timestamp = new Date().toISOString();
210109
- setImmediate(dumpRequest, init2.body, timestamp, state, filePath);
210268
+ enqueueDumpRequest(agentIdOrSessionId, () => {
210269
+ dumpRequest(init2.body, timestamp, state, filePath);
210270
+ });
210110
210271
  }
210111
210272
  const response = await globalThis.fetch(input, init2);
210112
210273
  if (timestamp && response.ok && process.env.USER_TYPE === "ant" && process.env.DUMP_PROMPTS === "1") {
@@ -210158,7 +210319,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210158
210319
  return response;
210159
210320
  };
210160
210321
  }
210161
- var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState;
210322
+ var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue;
210162
210323
  var init_dumpPrompts = __esm(() => {
210163
210324
  init_state();
210164
210325
  init_envUtils();
@@ -210166,6 +210327,7 @@ var init_dumpPrompts = __esm(() => {
210166
210327
  init_debug();
210167
210328
  cachedApiRequests = [];
210168
210329
  dumpState = new Map;
210330
+ dumpRequestQueue = new Map;
210169
210331
  });
210170
210332
 
210171
210333
  // src/utils/abortController.ts
@@ -406683,13 +406845,13 @@ var init_AppState = __esm(() => {
406683
406845
  function useNotifications() {
406684
406846
  const store = useAppStateStore();
406685
406847
  const setAppState = useSetAppState();
406686
- const processQueue = import_react85.useCallback(() => {
406848
+ const processQueue2 = import_react85.useCallback(() => {
406687
406849
  setAppState((prev) => {
406688
406850
  const next = getNext(prev.notifications.queue);
406689
406851
  if (prev.notifications.current !== null || !next) {
406690
406852
  return prev;
406691
406853
  }
406692
- currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue2) => {
406854
+ currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue3) => {
406693
406855
  currentTimeoutId = null;
406694
406856
  setAppState2((prev2) => {
406695
406857
  if (prev2.notifications.current?.key !== nextKey) {
@@ -406703,8 +406865,8 @@ function useNotifications() {
406703
406865
  }
406704
406866
  };
406705
406867
  });
406706
- processQueue2();
406707
- }, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue);
406868
+ processQueue3();
406869
+ }, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue2);
406708
406870
  return {
406709
406871
  ...prev,
406710
406872
  notifications: {
@@ -406720,7 +406882,7 @@ function useNotifications() {
406720
406882
  clearTimeout(currentTimeoutId);
406721
406883
  currentTimeoutId = null;
406722
406884
  }
406723
- currentTimeoutId = setTimeout((setAppState2, notif2, processQueue2) => {
406885
+ currentTimeoutId = setTimeout((setAppState2, notif2, processQueue3) => {
406724
406886
  currentTimeoutId = null;
406725
406887
  setAppState2((prev) => {
406726
406888
  if (prev.notifications.current?.key !== notif2.key) {
@@ -406734,8 +406896,8 @@ function useNotifications() {
406734
406896
  }
406735
406897
  };
406736
406898
  });
406737
- processQueue2();
406738
- }, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue);
406899
+ processQueue3();
406900
+ }, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue2);
406739
406901
  setAppState((prev) => ({
406740
406902
  ...prev,
406741
406903
  notifications: {
@@ -406753,7 +406915,7 @@ function useNotifications() {
406753
406915
  clearTimeout(currentTimeoutId);
406754
406916
  currentTimeoutId = null;
406755
406917
  }
406756
- currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue2) => {
406918
+ currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue3) => {
406757
406919
  currentTimeoutId = null;
406758
406920
  setAppState2((p) => {
406759
406921
  if (p.notifications.current?.key !== foldedKey) {
@@ -406767,8 +406929,8 @@ function useNotifications() {
406767
406929
  }
406768
406930
  };
406769
406931
  });
406770
- processQueue2();
406771
- }, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue);
406932
+ processQueue3();
406933
+ }, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue2);
406772
406934
  return {
406773
406935
  ...prev,
406774
406936
  notifications: {
@@ -406808,8 +406970,8 @@ function useNotifications() {
406808
406970
  }
406809
406971
  };
406810
406972
  });
406811
- processQueue();
406812
- }, [setAppState, processQueue]);
406973
+ processQueue2();
406974
+ }, [setAppState, processQueue2]);
406813
406975
  const removeNotification = import_react85.useCallback((key2) => {
406814
406976
  setAppState((prev) => {
406815
406977
  const isCurrent = prev.notifications.current?.key === key2;
@@ -406829,11 +406991,11 @@ function useNotifications() {
406829
406991
  }
406830
406992
  };
406831
406993
  });
406832
- processQueue();
406833
- }, [setAppState, processQueue]);
406994
+ processQueue2();
406995
+ }, [setAppState, processQueue2]);
406834
406996
  import_react85.useEffect(() => {
406835
406997
  if (store.getState().notifications.queue.length > 0) {
406836
- processQueue();
406998
+ processQueue2();
406837
406999
  }
406838
407000
  }, []);
406839
407001
  return {
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.79",
8
- BUILD_TIME: "2026-07-15T19:25:35.599Z",
7
+ VERSION: "0.1.81",
8
+ BUILD_TIME: "2026-07-16T06:38:00.106Z",
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
 
@@ -117484,6 +117482,140 @@ var init_auth = __esm(() => {
117484
117482
  };
117485
117483
  });
117486
117484
 
117485
+ // package.json
117486
+ var package_default;
117487
+ var init_package = __esm(() => {
117488
+ package_default = {
117489
+ name: "@funnycode/myclaude",
117490
+ version: "0.1.81",
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
+
117487
117619
  // src/constants/system.ts
117488
117620
  function getCLISyspromptPrefix(options) {
117489
117621
  const apiProvider = getAPIProvider();
@@ -117508,13 +117640,12 @@ function getAttributionHeader(fingerprint) {
117508
117640
  if (!isAttributionHeaderEnabled()) {
117509
117641
  return "";
117510
117642
  }
117511
- const baseVersion = globalThis.MACRO?.VERSION ?? "unknown";
117643
+ const baseVersion = globalThis.MACRO?.VERSION ?? package_default.version;
117512
117644
  const version2 = `${baseVersion}.${fingerprint}`;
117513
117645
  const entrypoint = process.env.CLAUDE_CODE_ENTRYPOINT ?? "unknown";
117514
- const cch = getFeatureValue_CACHED_MAY_BE_STALE("NATIVE_CLIENT_ATTESTATION", false) ? " cch=00000;" : "";
117515
117646
  const workload = getWorkload();
117516
117647
  const workloadPair = workload ? ` cc_workload=${workload};` : "";
117517
- 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}`;
117518
117649
  logForDebugging(`attribution header ${header}`);
117519
117650
  return header;
117520
117651
  }
@@ -117525,6 +117656,7 @@ var init_system = __esm(() => {
117525
117656
  init_envUtils();
117526
117657
  init_providers();
117527
117658
  init_workloadContext();
117659
+ init_package();
117528
117660
  CLI_SYSPROMPT_PREFIX_VALUES = [
117529
117661
  DEFAULT_PREFIX,
117530
117662
  AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX,
@@ -210023,6 +210155,29 @@ import { dirname as dirname27, join as join48 } from "path";
210023
210155
  function hashString3(str) {
210024
210156
  return createHash5("sha256").update(str).digest("hex");
210025
210157
  }
210158
+ function enqueueDumpRequest(agentIdOrSessionId, callback) {
210159
+ if (!dumpRequestQueue.has(agentIdOrSessionId)) {
210160
+ dumpRequestQueue.set(agentIdOrSessionId, []);
210161
+ }
210162
+ dumpRequestQueue.get(agentIdOrSessionId).push(callback);
210163
+ if (dumpRequestQueue.get(agentIdOrSessionId).length === 1) {
210164
+ processQueue(agentIdOrSessionId);
210165
+ }
210166
+ }
210167
+ function processQueue(agentIdOrSessionId) {
210168
+ const queue = dumpRequestQueue.get(agentIdOrSessionId);
210169
+ if (!queue || queue.length === 0) {
210170
+ dumpRequestQueue.delete(agentIdOrSessionId);
210171
+ return;
210172
+ }
210173
+ const callback = queue.shift();
210174
+ callback();
210175
+ if (queue.length > 0) {
210176
+ setImmediate(() => processQueue(agentIdOrSessionId));
210177
+ } else {
210178
+ dumpRequestQueue.delete(agentIdOrSessionId);
210179
+ }
210180
+ }
210026
210181
  function clearDumpState(agentIdOrSessionId) {
210027
210182
  dumpState.delete(agentIdOrSessionId);
210028
210183
  }
@@ -210032,10 +210187,14 @@ function clearAllDumpState() {
210032
210187
  function addApiRequestToCache(requestData) {
210033
210188
  if (process.env.USER_TYPE !== "ant")
210034
210189
  return;
210035
- cachedApiRequests.push({
210190
+ const metadata = {
210036
210191
  timestamp: new Date().toISOString(),
210037
- request: requestData
210038
- });
210192
+ request: {
210193
+ model: requestData.model,
210194
+ requestHash: hashString3(JSON.stringify(requestData))
210195
+ }
210196
+ };
210197
+ cachedApiRequests.push(metadata);
210039
210198
  if (cachedApiRequests.length > MAX_CACHED_REQUESTS) {
210040
210199
  cachedApiRequests.shift();
210041
210200
  }
@@ -210106,7 +210265,9 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210106
210265
  let timestamp;
210107
210266
  if (init2?.method === "POST" && init2.body) {
210108
210267
  timestamp = new Date().toISOString();
210109
- setImmediate(dumpRequest, init2.body, timestamp, state, filePath);
210268
+ enqueueDumpRequest(agentIdOrSessionId, () => {
210269
+ dumpRequest(init2.body, timestamp, state, filePath);
210270
+ });
210110
210271
  }
210111
210272
  const response = await globalThis.fetch(input, init2);
210112
210273
  if (timestamp && response.ok && process.env.USER_TYPE === "ant" && process.env.DUMP_PROMPTS === "1") {
@@ -210158,7 +210319,7 @@ function createDumpPromptsFetch(agentIdOrSessionId) {
210158
210319
  return response;
210159
210320
  };
210160
210321
  }
210161
- var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState;
210322
+ var MAX_CACHED_REQUESTS = 5, cachedApiRequests, dumpState, dumpRequestQueue;
210162
210323
  var init_dumpPrompts = __esm(() => {
210163
210324
  init_state();
210164
210325
  init_envUtils();
@@ -210166,6 +210327,7 @@ var init_dumpPrompts = __esm(() => {
210166
210327
  init_debug();
210167
210328
  cachedApiRequests = [];
210168
210329
  dumpState = new Map;
210330
+ dumpRequestQueue = new Map;
210169
210331
  });
210170
210332
 
210171
210333
  // src/utils/abortController.ts
@@ -406683,13 +406845,13 @@ var init_AppState = __esm(() => {
406683
406845
  function useNotifications() {
406684
406846
  const store = useAppStateStore();
406685
406847
  const setAppState = useSetAppState();
406686
- const processQueue = import_react85.useCallback(() => {
406848
+ const processQueue2 = import_react85.useCallback(() => {
406687
406849
  setAppState((prev) => {
406688
406850
  const next = getNext(prev.notifications.queue);
406689
406851
  if (prev.notifications.current !== null || !next) {
406690
406852
  return prev;
406691
406853
  }
406692
- currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue2) => {
406854
+ currentTimeoutId = setTimeout((setAppState2, nextKey, processQueue3) => {
406693
406855
  currentTimeoutId = null;
406694
406856
  setAppState2((prev2) => {
406695
406857
  if (prev2.notifications.current?.key !== nextKey) {
@@ -406703,8 +406865,8 @@ function useNotifications() {
406703
406865
  }
406704
406866
  };
406705
406867
  });
406706
- processQueue2();
406707
- }, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue);
406868
+ processQueue3();
406869
+ }, next.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, next.key, processQueue2);
406708
406870
  return {
406709
406871
  ...prev,
406710
406872
  notifications: {
@@ -406720,7 +406882,7 @@ function useNotifications() {
406720
406882
  clearTimeout(currentTimeoutId);
406721
406883
  currentTimeoutId = null;
406722
406884
  }
406723
- currentTimeoutId = setTimeout((setAppState2, notif2, processQueue2) => {
406885
+ currentTimeoutId = setTimeout((setAppState2, notif2, processQueue3) => {
406724
406886
  currentTimeoutId = null;
406725
406887
  setAppState2((prev) => {
406726
406888
  if (prev.notifications.current?.key !== notif2.key) {
@@ -406734,8 +406896,8 @@ function useNotifications() {
406734
406896
  }
406735
406897
  };
406736
406898
  });
406737
- processQueue2();
406738
- }, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue);
406899
+ processQueue3();
406900
+ }, notif.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, notif, processQueue2);
406739
406901
  setAppState((prev) => ({
406740
406902
  ...prev,
406741
406903
  notifications: {
@@ -406753,7 +406915,7 @@ function useNotifications() {
406753
406915
  clearTimeout(currentTimeoutId);
406754
406916
  currentTimeoutId = null;
406755
406917
  }
406756
- currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue2) => {
406918
+ currentTimeoutId = setTimeout((setAppState2, foldedKey, processQueue3) => {
406757
406919
  currentTimeoutId = null;
406758
406920
  setAppState2((p) => {
406759
406921
  if (p.notifications.current?.key !== foldedKey) {
@@ -406767,8 +406929,8 @@ function useNotifications() {
406767
406929
  }
406768
406930
  };
406769
406931
  });
406770
- processQueue2();
406771
- }, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue);
406932
+ processQueue3();
406933
+ }, folded.timeoutMs ?? DEFAULT_TIMEOUT_MS2, setAppState, folded.key, processQueue2);
406772
406934
  return {
406773
406935
  ...prev,
406774
406936
  notifications: {
@@ -406808,8 +406970,8 @@ function useNotifications() {
406808
406970
  }
406809
406971
  };
406810
406972
  });
406811
- processQueue();
406812
- }, [setAppState, processQueue]);
406973
+ processQueue2();
406974
+ }, [setAppState, processQueue2]);
406813
406975
  const removeNotification = import_react85.useCallback((key2) => {
406814
406976
  setAppState((prev) => {
406815
406977
  const isCurrent = prev.notifications.current?.key === key2;
@@ -406829,11 +406991,11 @@ function useNotifications() {
406829
406991
  }
406830
406992
  };
406831
406993
  });
406832
- processQueue();
406833
- }, [setAppState, processQueue]);
406994
+ processQueue2();
406995
+ }, [setAppState, processQueue2]);
406834
406996
  import_react85.useEffect(() => {
406835
406997
  if (store.getState().notifications.queue.length > 0) {
406836
- processQueue();
406998
+ processQueue2();
406837
406999
  }
406838
407000
  }, []);
406839
407001
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnycode/myclaude",
3
- "version": "0.1.79",
3
+ "version": "0.1.81",
4
4
  "private": false,
5
5
  "description": "An open-source AI coding assistant in your terminal - powered by Claude",
6
6
  "license": "MIT",