@webpresso/agent-kit 0.21.4 → 0.21.5
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/.claude-plugin/marketplace.json +2 -2
- package/README.md +105 -41
- package/catalog/agent/skills/plan-refine/SKILL.md +5 -4
- package/catalog/base-kit/commitlint.config.ts.tmpl +1 -3
- package/catalog/base-kit/e2e/fixtures/smoke.html.tmpl +13 -0
- package/catalog/base-kit/e2e/smoke.spec.ts.tmpl +13 -0
- package/catalog/base-kit/oxlint.config.ts.tmpl +26 -0
- package/catalog/base-kit/playwright.config.ts.tmpl +10 -0
- package/catalog/base-kit/src/quality-sample.test.ts.tmpl +19 -0
- package/catalog/base-kit/src/quality-sample.ts.tmpl +11 -0
- package/catalog/base-kit/stryker.config.ts.tmpl +14 -0
- package/catalog/base-kit/tsconfig.json.tmpl +9 -0
- package/catalog/base-kit/vitest.config.ts.tmpl +10 -0
- package/catalog/docs/templates/adr.md +1 -1
- package/catalog/docs/templates/blueprint.md +1 -0
- package/catalog/docs/templates/blueprint.yaml +6 -3
- package/catalog/docs/templates/guide.md +1 -1
- package/catalog/docs/templates/postmortem.md +1 -1
- package/catalog/docs/templates/research.md +1 -1
- package/catalog/docs/templates/runbook.md +1 -1
- package/catalog/docs/templates/system.md +12 -3
- package/catalog/docs/templates/tech-debt.md +1 -0
- package/commands/blueprint.md +37 -4
- package/dist/esm/audit/resolve-audit-script.d.ts +24 -0
- package/dist/esm/audit/resolve-audit-script.js +27 -0
- package/dist/esm/blueprint/index.d.ts +0 -1
- package/dist/esm/blueprint/index.js +0 -2
- package/dist/esm/blueprint/local.d.ts +0 -3
- package/dist/esm/blueprint/local.js +0 -2
- package/dist/esm/blueprint/service/BlueprintCreationService.js +5 -2
- package/dist/esm/blueprint/utils/package-assets.d.ts +11 -0
- package/dist/esm/blueprint/utils/package-assets.js +33 -4
- package/dist/esm/build/sync-catalog-doc-templates.d.ts +23 -0
- package/dist/esm/build/sync-catalog-doc-templates.js +93 -0
- package/dist/esm/cli/commands/audit.js +2 -7
- package/dist/esm/cli/commands/blueprint/router.js +5 -2
- package/dist/esm/cli/commands/blueprint/template-resolver.js +8 -4
- package/dist/esm/cli/commands/init/host-visibility.js +4 -2
- package/dist/esm/cli/commands/init/index.js +46 -7
- package/dist/esm/cli/commands/init/scaffold-base-kit.d.ts +12 -0
- package/dist/esm/cli/commands/init/scaffold-base-kit.js +141 -6
- package/dist/esm/cli/commands/typecheck.js +10 -4
- package/dist/esm/e2e/command-builder.js +26 -7
- package/dist/esm/e2e/execution.js +4 -0
- package/dist/esm/e2e/run-planner.js +1 -0
- package/dist/esm/e2e/types.d.ts +1 -0
- package/dist/esm/format/index.js +7 -1
- package/dist/esm/lint/index.js +3 -1
- package/dist/esm/mcp/blueprint-server.js +361 -66
- package/dist/esm/mcp/tools/audit.js +2 -8
- package/dist/esm/mcp/tools/e2e.d.ts +1 -1
- package/dist/esm/package.json +3 -0
- package/dist/esm/test/command-builder.d.ts +1 -0
- package/dist/esm/test/command-builder.js +8 -2
- package/dist/esm/test-helpers/hermetic-env.d.ts +25 -0
- package/dist/esm/test-helpers/hermetic-env.js +31 -0
- package/dist/esm/tool-runtime/index.d.ts +5 -0
- package/dist/esm/tool-runtime/index.js +23 -0
- package/dist/esm/tool-runtime/resolve-runner.d.ts +13 -0
- package/dist/esm/tool-runtime/resolve-runner.js +40 -0
- package/package.json +12 -19
- package/skills/plan-refine/SKILL.md +5 -4
- package/dist/esm/blueprint/dag/cycle-detector.d.ts +0 -12
- package/dist/esm/blueprint/dag/cycle-detector.js +0 -46
- package/dist/esm/blueprint/dag/executor.d.ts +0 -140
- package/dist/esm/blueprint/dag/executor.js +0 -292
- package/dist/esm/blueprint/dag/index.d.ts +0 -20
- package/dist/esm/blueprint/dag/index.js +0 -17
- package/dist/esm/blueprint/dag/interfaces.d.ts +0 -56
- package/dist/esm/blueprint/dag/interfaces.js +0 -13
- package/dist/esm/blueprint/dag/local/independence.d.ts +0 -107
- package/dist/esm/blueprint/dag/local/independence.js +0 -231
- package/dist/esm/blueprint/dag/local/index.d.ts +0 -14
- package/dist/esm/blueprint/dag/local/index.js +0 -14
- package/dist/esm/blueprint/dag/local/package-graph.d.ts +0 -66
- package/dist/esm/blueprint/dag/local/package-graph.js +0 -148
- package/dist/esm/blueprint/dag/plan-parser.d.ts +0 -54
- package/dist/esm/blueprint/dag/plan-parser.js +0 -236
- package/dist/esm/blueprint/dag/task-graph-algorithms.d.ts +0 -13
- package/dist/esm/blueprint/dag/task-graph-algorithms.js +0 -236
- package/dist/esm/blueprint/dag/task-graph.d.ts +0 -171
- package/dist/esm/blueprint/dag/task-graph.js +0 -370
- package/dist/esm/blueprint/dag/types.d.ts +0 -17
- package/dist/esm/blueprint/dag/types.js +0 -2
- package/dist/esm/blueprint/graph/index.d.ts +0 -5
- package/dist/esm/blueprint/graph/index.js +0 -5
- package/dist/esm/blueprint/graph/mermaid-parser.d.ts +0 -3
- package/dist/esm/blueprint/graph/mermaid-parser.js +0 -93
- package/dist/esm/blueprint/graph/mermaid-serializer.d.ts +0 -3
- package/dist/esm/blueprint/graph/mermaid-serializer.js +0 -20
- package/dist/esm/blueprint/graph/schema.d.ts +0 -89
- package/dist/esm/blueprint/graph/schema.js +0 -104
- package/dist/esm/blueprint/graph/task-graph-adapter.d.ts +0 -6
- package/dist/esm/blueprint/graph/task-graph-adapter.js +0 -30
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getManagedRunner } from '#tool-runtime';
|
|
1
2
|
import { spawnSync } from 'node:child_process';
|
|
2
3
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
4
|
import { join } from 'node:path';
|
|
@@ -17,14 +18,19 @@ export function registerTypecheckCommand(cli) {
|
|
|
17
18
|
export function buildTypecheckCommand(options = {}) {
|
|
18
19
|
const cwd = options.cwd ?? process.cwd();
|
|
19
20
|
if (hasCheckTypesScript(cwd)) {
|
|
21
|
+
const resolution = getManagedRunner('vp');
|
|
20
22
|
return {
|
|
21
|
-
command:
|
|
22
|
-
args: ['run', 'check-types'],
|
|
23
|
+
command: resolution.command,
|
|
24
|
+
args: [...resolution.args, 'run', 'check-types'],
|
|
23
25
|
};
|
|
24
26
|
}
|
|
27
|
+
const resolution = getManagedRunner('tsc', {
|
|
28
|
+
fallbackCommand: 'tsc',
|
|
29
|
+
fallbackArgs: [],
|
|
30
|
+
});
|
|
25
31
|
return {
|
|
26
|
-
command:
|
|
27
|
-
args: ['--noEmit', ...(options.pretty ? [] : ['--pretty', 'false'])],
|
|
32
|
+
command: resolution.command,
|
|
33
|
+
args: [...resolution.args, '--noEmit', ...(options.pretty ? [] : ['--pretty', 'false'])],
|
|
28
34
|
};
|
|
29
35
|
}
|
|
30
36
|
export function runTypecheckCommand(options = {}, deps = {}) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getManagedRunner } from '#tool-runtime';
|
|
1
2
|
import path from 'node:path';
|
|
2
3
|
export function buildE2eCommand(options) {
|
|
3
4
|
switch (options.step.runner) {
|
|
@@ -15,10 +16,11 @@ function buildPlaywrightCommand(options) {
|
|
|
15
16
|
throw new Error(`Step ${step.logName} uses runner "playwright" but does not define configPath.`);
|
|
16
17
|
}
|
|
17
18
|
const { baseDir, configArg, files } = resolveRunnerPaths(step.configPath, options.files ?? []);
|
|
18
|
-
const
|
|
19
|
+
const resolution = withBaseDir(getManagedRunner('playwright', { filterOutput: options.filterOutput }), baseDir);
|
|
20
|
+
const args = [...resolution.args, 'test', '--config', configArg];
|
|
19
21
|
appendPlaywrightFlags(args, options);
|
|
20
22
|
args.push(...(step.fixedArgs ?? []), ...files, ...(options.passthrough ?? []));
|
|
21
|
-
return { command:
|
|
23
|
+
return { command: resolution.command, args };
|
|
22
24
|
}
|
|
23
25
|
function buildVitestE2eCommand(options) {
|
|
24
26
|
const { step } = options;
|
|
@@ -26,12 +28,13 @@ function buildVitestE2eCommand(options) {
|
|
|
26
28
|
throw new Error(`Step ${step.logName} uses runner "vitest" but does not define configPath.`);
|
|
27
29
|
}
|
|
28
30
|
const { baseDir, configArg, files } = resolveRunnerPaths(step.configPath, options.files ?? []);
|
|
29
|
-
const
|
|
31
|
+
const resolution = withBaseDir(getManagedRunner('vitest', { filterOutput: options.filterOutput }), baseDir);
|
|
32
|
+
const args = [...resolution.args, 'run', '--config', configArg];
|
|
30
33
|
if (options.workers !== undefined) {
|
|
31
34
|
args.push('--poolOptions.threads.maxThreads', String(options.workers));
|
|
32
35
|
}
|
|
33
36
|
args.push(...(step.fixedArgs ?? []), ...files, ...(options.passthrough ?? []));
|
|
34
|
-
return { command:
|
|
37
|
+
return { command: resolution.command, args };
|
|
35
38
|
}
|
|
36
39
|
function buildCustomCommand(options) {
|
|
37
40
|
const { step } = options;
|
|
@@ -69,9 +72,6 @@ function appendPlaywrightFlags(args, options) {
|
|
|
69
72
|
args.push('--test-list', options.testList);
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
|
-
function buildPnpmExecPrefix(baseDir) {
|
|
73
|
-
return baseDir === '.' ? ['exec'] : ['--dir', baseDir, 'exec'];
|
|
74
|
-
}
|
|
75
75
|
function resolveRunnerPaths(configPath, files) {
|
|
76
76
|
const normalizedConfigPath = configPath.replace(/\\/gu, '/');
|
|
77
77
|
const baseDir = path.posix.dirname(normalizedConfigPath);
|
|
@@ -95,4 +95,23 @@ function resolveRunnerPaths(configPath, files) {
|
|
|
95
95
|
}),
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
+
function withBaseDir(resolution, baseDir) {
|
|
99
|
+
if (baseDir === '.') {
|
|
100
|
+
return { command: resolution.command, args: [...resolution.args] };
|
|
101
|
+
}
|
|
102
|
+
if (resolution.command === 'vp') {
|
|
103
|
+
return {
|
|
104
|
+
command: resolution.command,
|
|
105
|
+
args: ['--dir', baseDir, ...resolution.args],
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const [wrappedCommand, ...wrappedArgs] = resolution.args;
|
|
109
|
+
if (resolution.command === 'rtk' && wrappedCommand === 'vp') {
|
|
110
|
+
return {
|
|
111
|
+
command: resolution.command,
|
|
112
|
+
args: ['vp', '--dir', baseDir, ...wrappedArgs],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return { command: resolution.command, args: [...resolution.args] };
|
|
116
|
+
}
|
|
98
117
|
//# sourceMappingURL=command-builder.js.map
|
|
@@ -18,6 +18,7 @@ export async function createE2eExecutionPlan(input, cwd = process.cwd()) {
|
|
|
18
18
|
workers: input.workers,
|
|
19
19
|
testList: input.testList,
|
|
20
20
|
passthrough: input.passthrough,
|
|
21
|
+
filterOutput: input.filterOutput,
|
|
21
22
|
});
|
|
22
23
|
}
|
|
23
24
|
const hostAdapter = await loadConfiguredHostAdapter(cwd);
|
|
@@ -35,6 +36,7 @@ export async function createE2eExecutionPlan(input, cwd = process.cwd()) {
|
|
|
35
36
|
workers: input.workers,
|
|
36
37
|
testList: input.testList,
|
|
37
38
|
passthrough: input.passthrough,
|
|
39
|
+
filterOutput: input.filterOutput,
|
|
38
40
|
});
|
|
39
41
|
}
|
|
40
42
|
if (hostAdapter.adapter.buildExecutionPlan) {
|
|
@@ -49,6 +51,7 @@ export async function createE2eExecutionPlan(input, cwd = process.cwd()) {
|
|
|
49
51
|
workers: input.workers,
|
|
50
52
|
testList: input.testList,
|
|
51
53
|
passthrough: input.passthrough,
|
|
54
|
+
filterOutput: input.filterOutput,
|
|
52
55
|
});
|
|
53
56
|
}
|
|
54
57
|
return planE2eRun({
|
|
@@ -60,6 +63,7 @@ export async function createE2eExecutionPlan(input, cwd = process.cwd()) {
|
|
|
60
63
|
workers: input.workers,
|
|
61
64
|
testList: input.testList,
|
|
62
65
|
passthrough: input.passthrough,
|
|
66
|
+
filterOutput: input.filterOutput,
|
|
63
67
|
});
|
|
64
68
|
}
|
|
65
69
|
export function plannedGroupsToCommandConfigs(groups) {
|
package/dist/esm/e2e/types.d.ts
CHANGED
package/dist/esm/format/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { isMissingBinary, isRunFailure, runCommand } from '#mcp/tools/_shared/run-command';
|
|
10
10
|
import { resolveProjectRoot } from '#mcp/tools/_shared/project-root';
|
|
11
|
+
import { getManagedRunner } from '#tool-runtime';
|
|
11
12
|
const DEFAULT_FORMAT_TIMEOUT_MS = 5 * 60 * 1_000;
|
|
12
13
|
/**
|
|
13
14
|
* Run formatter and return a structured result. Throws a clear error when
|
|
@@ -33,7 +34,12 @@ export async function runFormat(options = {}) {
|
|
|
33
34
|
args.push('--ignore-path', '.gitignore');
|
|
34
35
|
if (options.files && options.files.length > 0)
|
|
35
36
|
args.push(...options.files);
|
|
36
|
-
const
|
|
37
|
+
const resolution = getManagedRunner('oxfmt', {
|
|
38
|
+
fallbackCommand: 'oxfmt',
|
|
39
|
+
fallbackArgs: [],
|
|
40
|
+
filterOutput: false,
|
|
41
|
+
});
|
|
42
|
+
const outcome = await runCommand(resolution.command, [...resolution.args, ...args], runOptions);
|
|
37
43
|
if (isRunFailure(outcome)) {
|
|
38
44
|
if (isMissingBinary(outcome)) {
|
|
39
45
|
throw new Error("oxfmt binary not found on PATH. Install it as a devDependency: 'vp install -D oxfmt'");
|
package/dist/esm/lint/index.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { isRunFailure, runCommand } from '#mcp/tools/_shared/run-command';
|
|
10
10
|
import { resolveProjectRoot } from '#mcp/tools/_shared/project-root';
|
|
11
|
+
import { getManagedRunner } from '#tool-runtime';
|
|
11
12
|
const DEFAULT_LINT_TIMEOUT_MS = 5 * 60 * 1_000;
|
|
12
13
|
/**
|
|
13
14
|
* Parse oxlint's `--format=json` output (ESLint-compatible array shape) into
|
|
@@ -92,7 +93,8 @@ export async function runLint(options = {}) {
|
|
|
92
93
|
else {
|
|
93
94
|
lintArgs.push('.');
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
+
const resolution = getManagedRunner('vp', { filterOutput: false });
|
|
97
|
+
const vpOutcome = await runCommand(resolution.command, [...resolution.args, ...lintArgs], runOptions);
|
|
96
98
|
if (isRunFailure(vpOutcome)) {
|
|
97
99
|
return {
|
|
98
100
|
passed: false,
|