ccg-workflow 1.7.84 → 1.7.85

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/README.md CHANGED
@@ -354,4 +354,4 @@ MIT
354
354
 
355
355
  ---
356
356
 
357
- v1.7.84 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues) | [Contributing](./CONTRIBUTING.md)
357
+ v1.7.85 | [Issues](https://github.com/fengshao1227/ccg-workflow/issues) | [Contributing](./CONTRIBUTING.md)
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.DPGNdJGO.mjs';
4
+ import { z as diagnoseMcpConfig, A as isWindows, B as readClaudeCodeConfig, C as fixWindowsMcpConfig, D as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, E as configMcp, F as version } from './shared/ccg-workflow.B9Mj76CP.mjs';
5
5
  import 'inquirer';
6
6
  import 'node:child_process';
7
7
  import 'node:util';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.DPGNdJGO.mjs';
1
+ export { c as changeLanguage, x as checkForUpdates, y as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, t as getCurrentVersion, v as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, k as installWorkflows, p as migrateToV1_4_0, q as needsMigration, r as readCcgConfig, s as showMainMenu, o as uninstallAceTool, n as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.B9Mj76CP.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'node:child_process';
@@ -10,7 +10,7 @@ import { parse, stringify } from 'smol-toml';
10
10
  import i18next from 'i18next';
11
11
  import ora from 'ora';
12
12
 
13
- const version = "1.7.84";
13
+ const version = "1.7.85";
14
14
 
15
15
  function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
16
16
  return {
@@ -637,19 +637,19 @@ async function removeFastContextPrompt() {
637
637
 
638
638
  const GITHUB_REPO = "fengshao1227/ccg-workflow";
639
639
  const RELEASE_TAG = "preset";
640
- const BINARY_DOWNLOAD_URL = `https://github.com/${GITHUB_REPO}/releases/download/${RELEASE_TAG}`;
641
- async function downloadBinaryFromRelease(binaryName, destPath) {
642
- const url = `${BINARY_DOWNLOAD_URL}/${binaryName}`;
643
- const MAX_ATTEMPTS = 3;
644
- const TIMEOUT_MS = 6e4;
645
- for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) {
640
+ const BINARY_SOURCES = [
641
+ { name: "GitHub Release", url: `https://github.com/${GITHUB_REPO}/releases/download/${RELEASE_TAG}`, timeoutMs: 8e3 },
642
+ { name: "Cloudflare R2", url: "https://pub-29270440a0854a49bf1589cd3662c067.r2.dev/preset", timeoutMs: 6e4 }
643
+ ];
644
+ async function downloadFromUrl(url, destPath, timeoutMs, maxAttempts = 2) {
645
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
646
646
  try {
647
647
  const controller = new AbortController();
648
- const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
648
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
649
649
  const response = await fetch(url, { redirect: "follow", signal: controller.signal });
650
650
  if (!response.ok) {
651
651
  clearTimeout(timer);
652
- if (attempt < MAX_ATTEMPTS) {
652
+ if (attempt < maxAttempts) {
653
653
  await new Promise((resolve) => setTimeout(resolve, attempt * 2e3));
654
654
  continue;
655
655
  }
@@ -663,7 +663,7 @@ async function downloadBinaryFromRelease(binaryName, destPath) {
663
663
  }
664
664
  return true;
665
665
  } catch {
666
- if (attempt < MAX_ATTEMPTS) {
666
+ if (attempt < maxAttempts) {
667
667
  await new Promise((resolve) => setTimeout(resolve, attempt * 2e3));
668
668
  continue;
669
669
  }
@@ -672,6 +672,14 @@ async function downloadBinaryFromRelease(binaryName, destPath) {
672
672
  }
673
673
  return false;
674
674
  }
675
+ async function downloadBinaryFromRelease(binaryName, destPath) {
676
+ for (const source of BINARY_SOURCES) {
677
+ const url = `${source.url}/${binaryName}`;
678
+ const ok = await downloadFromUrl(url, destPath, source.timeoutMs);
679
+ if (ok) return true;
680
+ }
681
+ return false;
682
+ }
675
683
  async function copyMdTemplates(ctx, srcDir, destDir, options = {}) {
676
684
  const installed = [];
677
685
  if (!await fs.pathExists(srcDir)) return installed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "1.7.84",
3
+ "version": "1.7.85",
4
4
  "description": "Claude + Codex + Gemini multi-model collaboration system - smart routing development workflow",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",