valent-pipeline 0.2.12 → 0.2.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valent-pipeline",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "v3 multi-agent AI pipeline for software development lifecycle",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,9 +29,9 @@ export async function init(options = {}) {
29
29
 
30
30
  console.log('\nInitializing valent-pipeline...\n');
31
31
 
32
- // 0. Ensure git repo exists
33
- if (!existsSync(join(projectRoot, '.git'))) {
34
- console.log(' No git repository detected. Initializing...');
32
+ // 0. Initialize git repo if needed
33
+ if (!existsSync(join(projectRoot, '.git')) && (options.yes || config.init_git)) {
34
+ console.log(' Initializing git repository...');
35
35
  const { execSync } = await import('child_process');
36
36
  execSync('git init', { cwd: projectRoot, stdio: 'pipe' });
37
37
  console.log(' Initialized git repository');
@@ -123,22 +123,23 @@ export async function init(options = {}) {
123
123
  } catch (err) {
124
124
  console.warn(` Warning: Failed to install ${mcpPackage}. Run "npm install -g ${mcpPackage}" manually.`);
125
125
  }
126
- // Register in .claude/settings.json mcpServers
127
- const mcpSettingsPath = join(projectRoot, '.claude', 'settings.json');
128
- let mcpSettings = {};
129
- if (fileExists(mcpSettingsPath)) {
126
+ // Register in .mcp.json (project-scope MCP config)
127
+ const mcpJsonPath = join(projectRoot, '.mcp.json');
128
+ let mcpConfig = {};
129
+ if (fileExists(mcpJsonPath)) {
130
130
  try {
131
- mcpSettings = JSON.parse(readFileSync(mcpSettingsPath, 'utf-8'));
131
+ mcpConfig = JSON.parse(readFileSync(mcpJsonPath, 'utf-8'));
132
132
  } catch { /* start fresh if parse fails */ }
133
133
  }
134
- if (!mcpSettings.mcpServers) mcpSettings.mcpServers = {};
135
- if (!mcpSettings.mcpServers[mcpName]) {
136
- mcpSettings.mcpServers[mcpName] = {
134
+ if (!mcpConfig.mcpServers) mcpConfig.mcpServers = {};
135
+ if (!mcpConfig.mcpServers[mcpName]) {
136
+ mcpConfig.mcpServers[mcpName] = {
137
+ type: 'stdio',
137
138
  command: 'npx',
138
- args: [mcpPackage]
139
+ args: ['-y', mcpPackage]
139
140
  };
140
- writeFileSafe(mcpSettingsPath, JSON.stringify(mcpSettings, null, 2) + '\n');
141
- console.log(` Registered ${mcpName} in .claude/settings.json`);
141
+ writeFileSafe(mcpJsonPath, JSON.stringify(mcpConfig, null, 2) + '\n');
142
+ console.log(` Registered ${mcpName} in .mcp.json`);
142
143
  }
143
144
  }
144
145
 
@@ -178,6 +179,17 @@ async function runWizard() {
178
179
 
179
180
  console.log('\n valent-pipeline init\n');
180
181
 
182
+ // Git repo check
183
+ if (!existsSync(join(process.cwd(), '.git'))) {
184
+ const { initGit } = await inquirer.prompt([{
185
+ type: 'confirm',
186
+ name: 'initGit',
187
+ message: 'No git repository detected. Initialize one?',
188
+ default: true,
189
+ }]);
190
+ config.init_git = initGit;
191
+ }
192
+
181
193
  // Project type
182
194
  const { projectType } = await inquirer.prompt([{
183
195
  type: 'list',