@kenkaiiii/gg-core 5.100.1 → 5.100.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -362,47 +362,47 @@ async function extractFileFromTarGz(tgzPath, entryName, destPath) {
362
362
 
363
363
  // src/claude-code/manifest.json
364
364
  var manifest_default = {
365
- sdkVersion: "0.3.318",
366
- claudeCodeVersion: "2.1.318",
365
+ sdkVersion: "0.3.321",
366
+ claudeCodeVersion: "2.1.321",
367
367
  platforms: {
368
368
  "darwin-arm64": {
369
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.318.tgz",
370
- integrity: "sha512-AWoXeDXzAMD3RaA21lWuHvCrKd8xmbTTmKjovninn4j07jheoVSMzFbCFjpp4kk5TdhT36JtWPkAxvjNMbcO8w==",
369
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.3.321.tgz",
370
+ integrity: "sha512-r718mW98hvRbmCa0TtSgImHkgyPUjPXSHOsORrehn2a8Z0FU1A2RkX9gCjY7EzZgL0RNbZXsBbkuab//kUjzJw==",
371
371
  bin: "claude"
372
372
  },
373
373
  "darwin-x64": {
374
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.318.tgz",
375
- integrity: "sha512-6CkZ5PCdebSY/LePp16sf/HYRtM6zVuxtn8qYICFS5KUZFsjccJJ9swVsOdHXNHi4SWZcSmIFTwoUbfFCzisRw==",
374
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.3.321.tgz",
375
+ integrity: "sha512-C08vEnnDylWDaFprx/B1B13RZK3la1HOqR986igkZSwhY//Yxsk5eRI+gz7sxMfhcLZX2NS8PftCOiXr3S74/Q==",
376
376
  bin: "claude"
377
377
  },
378
378
  "linux-arm64": {
379
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.318.tgz",
380
- integrity: "sha512-mBm4su17aMitLBBCQj3bHdejyUDY6z/ormGih+HG24N689RSbdKECjGjkT87tDBIR/4jyoqmuSeHqM1DI8TJlg==",
379
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.3.321.tgz",
380
+ integrity: "sha512-vdk9tON09SnsSh/6ULzYTBgsKRat6FyIaqnh4snYl3uy3qX0jpv5UuFUWgS5tvQ1ewI0qYF2k+D78El4gi7/iQ==",
381
381
  bin: "claude"
382
382
  },
383
383
  "linux-arm64-musl": {
384
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.318.tgz",
385
- integrity: "sha512-l4LSYFOrvlYCrUImGfxMTQ0wg+T3s9CBhrBvPF/0oJGKZg+QnxHHU8jUVm9e9/xYmDRTtqFIrr4id/5AfH4XGw==",
384
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.3.321.tgz",
385
+ integrity: "sha512-+8zFXMpJT2r+0j4E1v9BgRf+Qjtmmp4IG/3mDLT6jB6iA+9UvG9RLex+cqct09d+7xP2mDP8kL4cD1WtKUFX1w==",
386
386
  bin: "claude"
387
387
  },
388
388
  "linux-x64": {
389
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.318.tgz",
390
- integrity: "sha512-+mE+ueBD3oRFdaG16rd0h+LMjdeivGxL0pr/+FZK7JeLWVu+yPSw/f/X02b9oK36/DWykiFTu2G6HnJ9/+YO6w==",
389
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.3.321.tgz",
390
+ integrity: "sha512-i/Y8Ps4q68SRwWB54yFXyItBwn5YHIOYY4R1gla6p4UwF/pM+xxrHycv+yecbC7oU30ShuBYKWN9mRIZ/BCMqw==",
391
391
  bin: "claude"
392
392
  },
393
393
  "linux-x64-musl": {
394
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.318.tgz",
395
- integrity: "sha512-SAF3lj/2OzTU84p+OOA13QEKA9+5fYAw0M9E7AJjdnRmVFGqQfbV7Do1i1f9Sj0mIubB3rLTRphGRw8O4HZjgA==",
394
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.3.321.tgz",
395
+ integrity: "sha512-ils3IGsNKIDiURuOgSWorLsjMOlKcMdXQCQyaygEycdtPFItPoIBIYDVjoC1I0XV4tlfXXCHfUvNrs23g4HKNw==",
396
396
  bin: "claude"
397
397
  },
398
398
  "win32-arm64": {
399
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.318.tgz",
400
- integrity: "sha512-19iVSZ4379QbZU1XnGUtfFvhKS1WzS8H1sbU/DbrzqbJ5Kq1eB1drj+obB1fCxTh6m26tRPj0zMJmdeu/jk3Gw==",
399
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.3.321.tgz",
400
+ integrity: "sha512-v6/8ikUcYRSYhH5PSGcHq8L6+DKRq/M4I3BzFckis6kMh3degvSuUD1u3+M/oSJ/bcSOA8tXbUgTTwKrlOgvwQ==",
401
401
  bin: "claude.exe"
402
402
  },
403
403
  "win32-x64": {
404
- url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.318.tgz",
405
- integrity: "sha512-ZdKVWpyVNVt0cXrOf8sUBaxcxLEAP+oGMdQDLBWr/BqOxTWLy7TBWOj1kzw+wVg/9WIkjkgQWeJzGXPWulR1sA==",
404
+ url: "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.3.321.tgz",
405
+ integrity: "sha512-9i7ziCR+Wg47cRhYONHnUpTGxUgxfy/+J3N3/4F8YGqz7WLSNH3hpGRj6uJzNK4EMyEhFsca532uD2we0ZMckQ==",
406
406
  bin: "claude.exe"
407
407
  }
408
408
  }
@@ -546,6 +546,15 @@ async function download(asset, dest, opts) {
546
546
  );
547
547
  }
548
548
  }
549
+ function compareVersions(a, b) {
550
+ const pa = a.split(/[.-]/).map((n) => Number.parseInt(n, 10) || 0);
551
+ const pb = b.split(/[.-]/).map((n) => Number.parseInt(n, 10) || 0);
552
+ for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
553
+ const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
554
+ if (diff !== 0) return diff;
555
+ }
556
+ return 0;
557
+ }
549
558
  async function removeOldVersions(home, keep) {
550
559
  let entries;
551
560
  try {
@@ -556,6 +565,7 @@ async function removeOldVersions(home, keep) {
556
565
  for (const entry of entries) {
557
566
  if (!entry.isDirectory() || entry.name === keep || entry.name === "config") continue;
558
567
  if (!/^\d+\.\d+\.\d+/.test(entry.name)) continue;
568
+ if (compareVersions(entry.name, keep) > 0) continue;
559
569
  await import_promises2.default.rm(import_node_path2.default.join(home, entry.name), { recursive: true, force: true }).catch(() => {
560
570
  });
561
571
  }
@@ -4319,6 +4329,8 @@ var SubscriptionUsageError = class extends Error {
4319
4329
  this.retryAfterMs = retryAfterMs2;
4320
4330
  this.name = "SubscriptionUsageError";
4321
4331
  }
4332
+ status;
4333
+ retryAfterMs;
4322
4334
  };
4323
4335
  function finiteNumber(value) {
4324
4336
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
@@ -4780,7 +4792,7 @@ var import_node_fs5 = __toESM(require("fs"), 1);
4780
4792
  var import_node_path6 = __toESM(require("path"), 1);
4781
4793
  var CHECK_INTERVAL_MS = 60 * 60 * 1e3;
4782
4794
  var FETCH_TIMEOUT_MS = 1e4;
4783
- function compareVersions(a, b) {
4795
+ function compareVersions2(a, b) {
4784
4796
  const pa = a.split(".").map(Number);
4785
4797
  const pb = b.split(".").map(Number);
4786
4798
  for (let i = 0; i < 3; i++) {
@@ -4866,7 +4878,7 @@ function createAutoUpdater(config) {
4866
4878
  latestVersion: latestVersion ?? void 0,
4867
4879
  updatePending: false
4868
4880
  };
4869
- if (latestVersion && compareVersions(latestVersion, currentVersion) > 0) {
4881
+ if (latestVersion && compareVersions2(latestVersion, currentVersion) > 0) {
4870
4882
  newState.updatePending = true;
4871
4883
  }
4872
4884
  writeState(newState);
@@ -4878,7 +4890,7 @@ function createAutoUpdater(config) {
4878
4890
  const state = readState();
4879
4891
  let message = null;
4880
4892
  if (state?.updatePending && state.latestVersion) {
4881
- if (compareVersions(state.latestVersion, currentVersion) > 0) {
4893
+ if (compareVersions2(state.latestVersion, currentVersion) > 0) {
4882
4894
  const info = detectInstallInfo();
4883
4895
  if (info.updateCommand) {
4884
4896
  performUpdateInBackground(info.updateCommand);
@@ -4905,7 +4917,7 @@ function createAutoUpdater(config) {
4905
4917
  try {
4906
4918
  const state = readState();
4907
4919
  if (!state?.latestVersion) return null;
4908
- if (compareVersions(state.latestVersion, currentVersion) <= 0) return null;
4920
+ if (compareVersions2(state.latestVersion, currentVersion) <= 0) return null;
4909
4921
  return { latestVersion: state.latestVersion };
4910
4922
  } catch {
4911
4923
  return null;
@@ -4916,7 +4928,7 @@ function createAutoUpdater(config) {
4916
4928
  periodicTimer = setInterval(() => {
4917
4929
  fetchLatestVersion().then((latestVersion) => {
4918
4930
  if (!latestVersion) return;
4919
- if (compareVersions(latestVersion, currentVersion) <= 0) return;
4931
+ if (compareVersions2(latestVersion, currentVersion) <= 0) return;
4920
4932
  const info = detectInstallInfo();
4921
4933
  if (!info.updateCommand) return;
4922
4934
  writeState({ lastCheckedAt: Date.now(), latestVersion, updatePending: true });