valent-pipeline 0.2.9 → 0.2.11
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
|
@@ -25,7 +25,7 @@ Use the standard 200k context window. Per `pipeline-config.yaml` `orchestration.
|
|
|
25
25
|
After loading `pipeline-config.yaml`, check if visual validation infrastructure is required:
|
|
26
26
|
|
|
27
27
|
1. If `project.type` is `fullstack-web` or `frontend-only`, verify `{tech_stack.browser_automation_mcp}` is accessible (e.g., `npx @anthropic-ai/playwright-mcp --version` or check `.claude/settings.json` for the MCP registration).
|
|
28
|
-
2. If not accessible → **STOP** with: `Browser automation MCP ({tech_stack.browser_automation_mcp}) is not installed. Visual validation cannot run. Install it with: npx valent-pipeline init --force (or npm install -g @
|
|
28
|
+
2. If not accessible → **STOP** with: `Browser automation MCP ({tech_stack.browser_automation_mcp}) is not installed. Visual validation cannot run. Install it with: npx valent-pipeline init --force (or npm install -g @playwright/mcp). Then re-run this epic.`
|
|
29
29
|
|
|
30
30
|
This is an infrastructure prerequisite. Don't waste tokens spawning Lead into a pipeline that can't run visual validation for UI projects.
|
|
31
31
|
|
|
@@ -18,7 +18,7 @@ Use the standard 200k context window. Auto-compression fires every 2-3 stories.
|
|
|
18
18
|
After loading `pipeline-config.yaml`, check if visual validation infrastructure is required:
|
|
19
19
|
|
|
20
20
|
1. If `project.type` is `fullstack-web` or `frontend-only`, verify `{tech_stack.browser_automation_mcp}` is accessible (e.g., `npx @anthropic-ai/playwright-mcp --version` or check `.claude/settings.json` for the MCP registration).
|
|
21
|
-
2. If not accessible → **STOP** with: `Browser automation MCP ({tech_stack.browser_automation_mcp}) is not installed. Visual validation cannot run. Install it with: npx valent-pipeline init --force (or npm install -g @
|
|
21
|
+
2. If not accessible → **STOP** with: `Browser automation MCP ({tech_stack.browser_automation_mcp}) is not installed. Visual validation cannot run. Install it with: npx valent-pipeline init --force (or npm install -g @playwright/mcp). Then re-run.`
|
|
22
22
|
|
|
23
23
|
This is an infrastructure prerequisite. Don't waste tokens spawning Lead into a pipeline that can't run visual validation for UI projects.
|
|
24
24
|
|
|
@@ -23,7 +23,7 @@ If no argument is provided, resolve the next work item from the backlog (see Ste
|
|
|
23
23
|
After loading `pipeline-config.yaml`, check if visual validation infrastructure is required:
|
|
24
24
|
|
|
25
25
|
1. If `project.type` is `fullstack-web` or `frontend-only`, verify `{tech_stack.browser_automation_mcp}` is accessible (e.g., `npx @anthropic-ai/playwright-mcp --version` or check `.claude/settings.json` for the MCP registration).
|
|
26
|
-
2. If not accessible → **STOP** with: `Browser automation MCP ({tech_stack.browser_automation_mcp}) is not installed. Visual validation cannot run. Install it with: npx valent-pipeline init --force (or npm install -g @
|
|
26
|
+
2. If not accessible → **STOP** with: `Browser automation MCP ({tech_stack.browser_automation_mcp}) is not installed. Visual validation cannot run. Install it with: npx valent-pipeline init --force (or npm install -g @playwright/mcp). Then re-run this story.`
|
|
27
27
|
|
|
28
28
|
This is an infrastructure prerequisite — same category as "does `pipeline-config.yaml` exist?" Don't waste tokens spawning Lead into a pipeline that can't run visual validation for UI projects.
|
|
29
29
|
|
package/src/commands/init.js
CHANGED
|
@@ -100,40 +100,37 @@ export async function init(options = {}) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
// 7b. Install browser automation MCP for UI projects
|
|
103
|
-
const projectType = config.project?.type || 'fullstack-web';
|
|
104
103
|
const uiProjectTypes = ['fullstack-web', 'frontend-only'];
|
|
105
|
-
|
|
104
|
+
const shouldInstallMcp = options.yes
|
|
105
|
+
? uiProjectTypes.includes(config.project?.type || 'fullstack-web')
|
|
106
|
+
: config.install_browser_mcp;
|
|
107
|
+
if (shouldInstallMcp) {
|
|
106
108
|
const mcpName = config.tech_stack?.browser_automation_mcp || 'playwright-mcp';
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
console.log(`
|
|
113
|
-
|
|
109
|
+
const mcpPackage = '@playwright/mcp';
|
|
110
|
+
console.log(` Installing ${mcpPackage}...`);
|
|
111
|
+
const { execSync } = await import('child_process');
|
|
112
|
+
try {
|
|
113
|
+
execSync(`npm install -g ${mcpPackage}`, { stdio: 'pipe' });
|
|
114
|
+
console.log(` Installed ${mcpPackage}`);
|
|
115
|
+
} catch (err) {
|
|
116
|
+
console.warn(` Warning: Failed to install ${mcpPackage}. Run "npm install -g ${mcpPackage}" manually.`);
|
|
117
|
+
}
|
|
118
|
+
// Register in .claude/settings.json mcpServers
|
|
119
|
+
const mcpSettingsPath = join(projectRoot, '.claude', 'settings.json');
|
|
120
|
+
let mcpSettings = {};
|
|
121
|
+
if (fileExists(mcpSettingsPath)) {
|
|
114
122
|
try {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
} catch { /* start fresh if parse fails */ }
|
|
127
|
-
}
|
|
128
|
-
if (!mcpSettings.mcpServers) mcpSettings.mcpServers = {};
|
|
129
|
-
if (!mcpSettings.mcpServers[mcpName]) {
|
|
130
|
-
mcpSettings.mcpServers[mcpName] = {
|
|
131
|
-
command: 'npx',
|
|
132
|
-
args: [`@anthropic-ai/${mcpName}`]
|
|
133
|
-
};
|
|
134
|
-
writeFileSafe(mcpSettingsPath, JSON.stringify(mcpSettings, null, 2) + '\n');
|
|
135
|
-
console.log(` Registered ${mcpName} in .claude/settings.json`);
|
|
136
|
-
}
|
|
123
|
+
mcpSettings = JSON.parse(readFileSync(mcpSettingsPath, 'utf-8'));
|
|
124
|
+
} catch { /* start fresh if parse fails */ }
|
|
125
|
+
}
|
|
126
|
+
if (!mcpSettings.mcpServers) mcpSettings.mcpServers = {};
|
|
127
|
+
if (!mcpSettings.mcpServers[mcpName]) {
|
|
128
|
+
mcpSettings.mcpServers[mcpName] = {
|
|
129
|
+
command: 'npx',
|
|
130
|
+
args: [mcpPackage]
|
|
131
|
+
};
|
|
132
|
+
writeFileSafe(mcpSettingsPath, JSON.stringify(mcpSettings, null, 2) + '\n');
|
|
133
|
+
console.log(` Registered ${mcpName} in .claude/settings.json`);
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
136
|
|
|
@@ -167,14 +164,6 @@ export async function init(options = {}) {
|
|
|
167
164
|
console.log('');
|
|
168
165
|
}
|
|
169
166
|
|
|
170
|
-
async function confirmPrompt(message, defaultValue = true) {
|
|
171
|
-
const inquirer = (await import('inquirer')).default;
|
|
172
|
-
const { answer } = await inquirer.prompt([{
|
|
173
|
-
type: 'confirm', name: 'answer', message, default: defaultValue,
|
|
174
|
-
}]);
|
|
175
|
-
return answer;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
167
|
async function runWizard() {
|
|
179
168
|
const inquirer = (await import('inquirer')).default;
|
|
180
169
|
const config = JSON.parse(JSON.stringify(defaults));
|
|
@@ -229,6 +218,17 @@ async function runWizard() {
|
|
|
229
218
|
}]);
|
|
230
219
|
config.tech_stack.test_framework_e2e = testE2e;
|
|
231
220
|
|
|
221
|
+
// Browser automation MCP (UI projects only)
|
|
222
|
+
if (['fullstack-web', 'frontend-only'].includes(projectType)) {
|
|
223
|
+
const { installBrowserMcp } = await inquirer.prompt([{
|
|
224
|
+
type: 'confirm',
|
|
225
|
+
name: 'installBrowserMcp',
|
|
226
|
+
message: 'Install browser automation MCP (playwright-mcp) for visual validation?',
|
|
227
|
+
default: true,
|
|
228
|
+
}]);
|
|
229
|
+
config.install_browser_mcp = installBrowserMcp;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
232
|
// Knowledge mode
|
|
233
233
|
const { knowledgeMode } = await inquirer.prompt([{
|
|
234
234
|
type: 'list',
|