multi-agents-cli 1.0.3 → 1.0.4

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/init.js +23 -2
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -55,9 +55,16 @@ if (isGlobalCLI) {
55
55
 
56
56
  // Initialize git
57
57
  try {
58
- execSync('git init', { cwd: targetDir, stdio: 'pipe' });
58
+ execSync('git init -b main', { cwd: targetDir, stdio: 'pipe' });
59
59
  execSync('git commit --allow-empty -m "init: project created"', { cwd: targetDir, stdio: 'pipe' });
60
- } catch { /* git may not have user config yet — continue */ }
60
+ } catch {
61
+ // Fallback for older git versions that don't support -b flag
62
+ try {
63
+ execSync('git init', { cwd: targetDir, stdio: 'pipe' });
64
+ execSync('git checkout -b main', { cwd: targetDir, stdio: 'pipe' });
65
+ execSync('git commit --allow-empty -m "init: project created"', { cwd: targetDir, stdio: 'pipe' });
66
+ } catch { /* continue */ }
67
+ }
61
68
  }
62
69
 
63
70
  // ── Lock check ────────────────────────────────────────────────────────────────
@@ -900,6 +907,20 @@ If a dependency is not met:
900
907
  fs.writeFileSync(path.join(ROOT, 'BUILD_STATE.md'), buildState, 'utf8');
901
908
  console.log(` ${green('✓')} BUILD_STATE.md generated`);
902
909
 
910
+ // ── Generate user project package.json ───────────────────────────────────────
911
+
912
+ const userPackage = {
913
+ name: projectName.toLowerCase().replace(/\s+/g, '-'),
914
+ version: '1.0.0',
915
+ private: true,
916
+ scripts: {
917
+ launch: 'cd "$(git rev-parse --git-common-dir)/.." && node .workflow/launch.js',
918
+ complete: 'cd "$(git rev-parse --git-common-dir)/.." && node .workflow/complete.js',
919
+ },
920
+ };
921
+ fs.writeFileSync(path.join(ROOT, 'package.json'), JSON.stringify(userPackage, null, 2), 'utf8');
922
+ console.log(` ${green('✓')} package.json generated`);
923
+
903
924
  // ── Tracking ──────────────────────────────────────────────────────────────────
904
925
 
905
926
  const trackingPath = path.join(RUNTIME_DIR, '.tracking.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multi-agents-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Multi-agent workflow orchestration for Claude Code — isolated git worktrees, structured state tracking, autonomous task chaining",
5
5
  "keywords": [
6
6
  "claude-code",