ccg-workflow 3.0.9 → 3.0.10

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/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 { A as diagnoseMcpConfig, B as isWindows, C as readClaudeCodeConfig, D as fixWindowsMcpConfig, E as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, F as configMcp, G as version } from './shared/ccg-workflow.DF2nGUzy.mjs';
4
+ import { A as diagnoseMcpConfig, B as isWindows, C as readClaudeCodeConfig, D as fixWindowsMcpConfig, E as writeClaudeCodeConfig, r as readCcgConfig, b as initI18n, a as i18n, s as showMainMenu, i as init, F as configMcp, G as version } from './shared/ccg-workflow.Btj19K42.mjs';
5
5
  import 'inquirer';
6
6
  import 'ora';
7
7
  import 'node:child_process';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { c as changeLanguage, y as checkForUpdates, z as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, v as getCurrentVersion, x as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, n as installCodexMode, k as installWorkflows, q as migrateToV1_4_0, t as needsMigration, r as readCcgConfig, s as showMainMenu, p as uninstallAceTool, o as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.DF2nGUzy.mjs';
1
+ export { c as changeLanguage, y as checkForUpdates, z as compareVersions, d as createDefaultConfig, e as createDefaultRouting, g as getCcgDir, f as getConfigPath, v as getCurrentVersion, x as getLatestVersion, j as getWorkflowById, h as getWorkflowConfigs, a as i18n, i as init, b as initI18n, l as installAceTool, m as installAceToolRs, n as installCodexMode, k as installWorkflows, q as migrateToV1_4_0, t as needsMigration, r as readCcgConfig, s as showMainMenu, p as uninstallAceTool, o as uninstallWorkflows, u as update, w as writeCcgConfig } from './shared/ccg-workflow.Btj19K42.mjs';
2
2
  import 'ansis';
3
3
  import 'inquirer';
4
4
  import 'ora';
@@ -10,7 +10,7 @@ import fs from 'fs-extra';
10
10
  import { parse, stringify } from 'smol-toml';
11
11
  import i18next from 'i18next';
12
12
 
13
- const version = "3.0.9";
13
+ const version = "3.0.10";
14
14
 
15
15
  function cmd(id, order, category, name, nameEn, description, descriptionEn, cmdOverride) {
16
16
  return {
@@ -121,7 +121,7 @@ function findPackageRoot$1(startDir) {
121
121
  );
122
122
  return startDir;
123
123
  }
124
- const PACKAGE_ROOT$1 = findPackageRoot$1(__dirname$2);
124
+ const PACKAGE_ROOT = findPackageRoot$1(__dirname$2);
125
125
  const MCP_PROVIDERS = {
126
126
  "ace-tool": { tool: "mcp__ace-tool__search_context", param: "query" },
127
127
  "ace-tool-rs": { tool: "mcp__ace-tool__search_context", param: "query" },
@@ -1093,7 +1093,7 @@ async function installSkillGeneratedCommands(ctx) {
1093
1093
  }
1094
1094
  }
1095
1095
  async function installCodexMode() {
1096
- const codexTemplateDir = join(PACKAGE_ROOT$1, "templates", "codex");
1096
+ const codexTemplateDir = join(PACKAGE_ROOT, "templates", "codex");
1097
1097
  if (!await fs.pathExists(codexTemplateDir)) {
1098
1098
  return { success: false, message: "Codex template directory not found" };
1099
1099
  }
@@ -1356,7 +1356,7 @@ async function installWorkflows(workflowIds, installDir, force = false, config)
1356
1356
  mcpProvider: config?.mcpProvider || "fast-context",
1357
1357
  skipImpeccable: config?.skipImpeccable || false
1358
1358
  },
1359
- templateDir: join(PACKAGE_ROOT$1, "templates"),
1359
+ templateDir: join(PACKAGE_ROOT, "templates"),
1360
1360
  result: {
1361
1361
  success: true,
1362
1362
  installedCommands: [],
@@ -1366,7 +1366,7 @@ async function installWorkflows(workflowIds, installDir, force = false, config)
1366
1366
  }
1367
1367
  };
1368
1368
  if (!await fs.pathExists(ctx.templateDir)) {
1369
- const errorMsg = `Template directory not found: ${ctx.templateDir} (PACKAGE_ROOT=${PACKAGE_ROOT$1}). This usually means the npm package is incomplete or the cache is corrupted. Try: npm cache clean --force && npx ccg-workflow@latest`;
1369
+ const errorMsg = `Template directory not found: ${ctx.templateDir} (PACKAGE_ROOT=${PACKAGE_ROOT}). This usually means the npm package is incomplete or the cache is corrupted. Try: npm cache clean --force && npx ccg-workflow@latest`;
1370
1370
  ctx.result.errors.push(errorMsg);
1371
1371
  ctx.result.success = false;
1372
1372
  return ctx.result;
@@ -2990,6 +2990,18 @@ async function migrateToV1_4_0() {
2990
2990
  return result;
2991
2991
  }
2992
2992
  async function needsMigration() {
2993
+ try {
2994
+ const configPath = join(homedir(), ".claude", ".ccg", "config.toml");
2995
+ if (await fs.pathExists(configPath)) {
2996
+ const content = await fs.readFile(configPath, "utf-8");
2997
+ const versionMatch = content.match(/version\s*=\s*"([^"]+)"/);
2998
+ if (versionMatch) {
2999
+ const major = Number.parseInt(versionMatch[1].split(".")[0], 10);
3000
+ if (major >= 2) return false;
3001
+ }
3002
+ }
3003
+ } catch {
3004
+ }
2993
3005
  const oldCcgDir = join(homedir(), ".ccg");
2994
3006
  const oldPromptsDir = join(homedir(), ".claude", "prompts", "ccg");
2995
3007
  const oldConfigFile = join(homedir(), ".claude", "commands", "ccg", "_config.md");
@@ -3983,30 +3995,11 @@ function findPackageRoot(startDir) {
3983
3995
  dir = parentDir;
3984
3996
  }
3985
3997
  }
3986
- const PACKAGE_ROOT = findPackageRoot(__dirname$1);
3987
- async function readPackageVersion(pkgPath) {
3988
- try {
3989
- if (!await fs.pathExists(pkgPath)) {
3990
- return null;
3991
- }
3992
- const pkg = await fs.readJSON(pkgPath);
3993
- return pkg.version || null;
3994
- } catch {
3995
- return null;
3996
- }
3997
- }
3998
+ findPackageRoot(__dirname$1);
3998
3999
  async function getCurrentVersion() {
3999
- const relativePkgPath = fileURLToPath(new URL("../../package.json", import.meta.url));
4000
- const relativeVersion = await readPackageVersion(relativePkgPath);
4001
- if (relativeVersion) {
4002
- return relativeVersion;
4003
- }
4004
- const rootPkgPath = join(PACKAGE_ROOT, "package.json");
4005
- const rootVersion = await readPackageVersion(rootPkgPath);
4006
- if (rootVersion) {
4007
- return rootVersion;
4000
+ {
4001
+ return version;
4008
4002
  }
4009
- return process.env.npm_package_version || "0.0.0";
4010
4003
  }
4011
4004
  async function getLatestVersion(packageName = "ccg-workflow") {
4012
4005
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccg-workflow",
3
- "version": "3.0.9",
3
+ "version": "3.0.10",
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",