@axiomatic-labs/claudeflow 2.51.1 → 2.51.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.
Files changed (2) hide show
  1. package/lib/install.js +13 -6
  2. package/package.json +1 -1
package/lib/install.js CHANGED
@@ -570,13 +570,20 @@ function mergeSettings(cwd, payloadSettings) {
570
570
  const arr = hooks[evt] || (hooks[evt] = []);
571
571
  for (const entry of ph[evt]) arr.push(entry);
572
572
  }
573
- // Merge the shipped env (e.g. CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, which gates the SendMessage tool the
574
- // review→fix resume loop depends on). ADD-IF-ABSENT: never clobber a key the user already set (so a user who
575
- // explicitly disabled a flag keeps their choice); we only fill in keys they haven't.
573
+ // Merge the shipped env. ADD-IF-ABSENT: never clobber a key the user set (a user who explicitly changed a flag
574
+ // keeps their choice); we only fill keys they haven't EXCEPT we migrate a STALE claudeflow-shipped default to
575
+ // the current one. claudeflow OWNS these keys; a value it wrote in a PAST version is not a user choice.
576
+ // `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` shipped "1" pre-v2.50 (the SendMessage resume loop); v2.50+ ships "0"
577
+ // for the fresh-fork model, and a project stuck at "1" keeps the removed tool live — so a stale "1" → shipped "0".
578
+ const ENV_STALE_DEFAULTS = { CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: ['1'] };
576
579
  const pe = (payloadSettings && payloadSettings.env) || {};
577
580
  if (Object.keys(pe).length) {
578
581
  const env = data.env || (data.env = {});
579
- for (const k of Object.keys(pe)) { if (!(k in env)) env[k] = pe[k]; }
582
+ for (const k of Object.keys(pe)) {
583
+ if (!(k in env)) { env[k] = pe[k]; continue; }
584
+ const stale = ENV_STALE_DEFAULTS[k];
585
+ if (stale && stale.indexOf(env[k]) !== -1 && env[k] !== pe[k]) env[k] = pe[k];
586
+ }
580
587
  }
581
588
  if (payloadSettings && payloadSettings['$schema'] && !data['$schema']) data['$schema'] = payloadSettings['$schema'];
582
589
  fs.mkdirSync(path.dirname(sp), { recursive: true });
@@ -1034,8 +1041,8 @@ function installFromPayload(src, cwd, options = {}) {
1034
1041
  }
1035
1042
  });
1036
1043
 
1037
- // 5) settings.json — MERGE the shipped hooks + env (add-if-absent) into the user's settings (never clobber).
1038
- // ALWAYS runs (isolated above) this is what wires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS et al.
1044
+ // 5) settings.json — MERGE the shipped hooks + env into the user's settings: add-if-absent (never clobber a
1045
+ // user value) + migrate a stale claudeflow-owned default (AGENT_TEAMS "1" shipped "0"). ALWAYS runs.
1039
1046
  step('settings', () => {
1040
1047
  const srcSettings = path.join(src, '.claude', 'settings.json');
1041
1048
  if (fs.existsSync(srcSettings)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomatic-labs/claudeflow",
3
- "version": "2.51.1",
3
+ "version": "2.51.3",
4
4
  "description": "Claudeflow — AI-powered development toolkit for Claude Code and Codex. Skills, agents, hooks, and quality gates that ship production apps.",
5
5
  "bin": {
6
6
  "claudeflow": "./bin/cli.js"