@webpresso/agent-kit 0.21.4 → 0.23.0
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/.claude-plugin/plugin.json +1 -1
- package/README.md +93 -66
- package/bin/_run.js +143 -1
- package/bin/runtime-manifest.json +40 -0
- package/catalog/AGENTS.md.tpl +7 -6
- package/catalog/agent/commands/plan-refine.md +3 -3
- package/catalog/agent/commands/pll.md +2 -0
- package/catalog/agent/guides/parallel-execution.md +2 -0
- package/catalog/agent/rules/extraction-parity.md +27 -1
- package/catalog/agent/rules/public-package-safety.md +24 -1
- package/catalog/agent/skills/plan-refine/SKILL.md +5 -4
- package/catalog/agent/skills/pll/SKILL.md +1 -0
- package/catalog/base-kit/.github/workflows/ci.webpresso.yml.tmpl +33 -0
- 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 +2 -0
- package/catalog/docs/templates/blueprint.yaml +16 -15
- 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 +10 -12
- package/dist/esm/audit/blueprint-db-consistency.d.ts +1 -1
- package/dist/esm/audit/blueprint-db-consistency.js +6 -8
- package/dist/esm/audit/blueprint-lifecycle-sql.js +10 -3
- package/dist/esm/audit/cloudflare-deploy-contract.d.ts +3 -0
- package/dist/esm/audit/cloudflare-deploy-contract.js +64 -0
- package/dist/esm/audit/no-legacy-cli-bin.d.ts +3 -0
- package/dist/esm/audit/no-legacy-cli-bin.js +100 -0
- package/dist/esm/audit/package-surface.js +14 -1
- package/dist/esm/audit/repo-guardrails.js +40 -13
- package/dist/esm/audit/resolve-audit-script.d.ts +24 -0
- package/dist/esm/audit/resolve-audit-script.js +27 -0
- package/dist/esm/audit/roadmap-links.js +23 -10
- package/dist/esm/blueprint/core/schema.d.ts +8 -8
- package/dist/esm/blueprint/core/schema.js +2 -2
- package/dist/esm/blueprint/db/enums.d.ts +1 -1
- package/dist/esm/blueprint/db/ingester.js +18 -10
- package/dist/esm/blueprint/index.d.ts +0 -1
- package/dist/esm/blueprint/index.js +0 -2
- package/dist/esm/blueprint/lifecycle/audit.js +9 -2
- package/dist/esm/blueprint/lifecycle/local.js +15 -4
- package/dist/esm/blueprint/local.d.ts +0 -3
- package/dist/esm/blueprint/local.js +0 -2
- package/dist/esm/blueprint/service/BlueprintCreationService.js +16 -8
- package/dist/esm/blueprint/service/BlueprintService.js +37 -19
- package/dist/esm/blueprint/service/scanner.js +73 -9
- package/dist/esm/blueprint/tracked-document/schema.d.ts +2 -2
- package/dist/esm/blueprint/utils/document-paths.d.ts +23 -0
- package/dist/esm/blueprint/utils/document-paths.js +91 -0
- 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/package-manifest.js +7 -0
- package/dist/esm/build/release-policy.d.ts +27 -0
- package/dist/esm/build/release-policy.js +29 -0
- package/dist/esm/build/runtime-targets.d.ts +13 -0
- package/dist/esm/build/runtime-targets.js +48 -0
- 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/auto-update/detect-pm.d.ts +15 -0
- package/dist/esm/cli/auto-update/detect-pm.js +24 -9
- package/dist/esm/cli/auto-update/skip.js +9 -1
- package/dist/esm/cli/bundle/agent-command-inventory.d.ts +120 -0
- package/dist/esm/cli/bundle/agent-command-inventory.js +100 -0
- package/dist/esm/cli/bundle/index.d.ts +17 -0
- package/dist/esm/cli/bundle/index.js +15 -0
- package/dist/esm/cli/cli.d.ts +1 -1
- package/dist/esm/cli/cli.js +49 -5
- package/dist/esm/cli/commands/audit-core.d.ts +1 -1
- package/dist/esm/cli/commands/audit.js +4 -7
- package/dist/esm/cli/commands/blueprint/router.js +16 -10
- package/dist/esm/cli/commands/blueprint/template-resolver.js +8 -4
- package/dist/esm/cli/commands/hook.d.ts +8 -0
- package/dist/esm/cli/commands/hook.js +47 -0
- package/dist/esm/cli/commands/init/host-visibility.js +4 -2
- package/dist/esm/cli/commands/init/index.js +80 -7
- package/dist/esm/cli/commands/init/scaffold-base-kit.d.ts +12 -0
- package/dist/esm/cli/commands/init/scaffold-base-kit.js +142 -7
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/codex-ownership.js +9 -1
- package/dist/esm/cli/commands/init/scaffolders/agent-hooks/index.js +130 -20
- package/dist/esm/cli/commands/init/scaffolders/agent-kit-global/index.d.ts +65 -0
- package/dist/esm/cli/commands/init/scaffolders/agent-kit-global/index.js +64 -0
- package/dist/esm/cli/commands/package-manager.d.ts +15 -0
- package/dist/esm/cli/commands/package-manager.js +42 -0
- package/dist/esm/cli/commands/test.d.ts +1 -0
- package/dist/esm/cli/commands/test.js +2 -1
- package/dist/esm/cli/commands/typecheck.js +10 -19
- package/dist/esm/cli/package-scripts.d.ts +12 -0
- package/dist/esm/cli/package-scripts.js +59 -0
- package/dist/esm/cli/utils.js +3 -22
- package/dist/esm/cli/wp-extensions.d.ts +14 -0
- package/dist/esm/cli/wp-extensions.js +34 -0
- package/dist/esm/config/docs-lint/schemas/common.d.ts +1 -1
- package/dist/esm/config/docs-lint/schemas/implementation-plan.d.ts +2 -2
- package/dist/esm/config/docs-lint/schemas/parent-roadmap.d.ts +1 -1
- package/dist/esm/config/stryker/index.d.ts +85 -0
- package/dist/esm/config/stryker/index.js +31 -0
- package/dist/esm/e2e/command-builder.js +35 -7
- package/dist/esm/e2e/config.d.ts +56 -0
- package/dist/esm/e2e/config.js +114 -0
- package/dist/esm/e2e/execution.js +8 -0
- package/dist/esm/e2e/run-planner.js +2 -0
- package/dist/esm/e2e/types.d.ts +3 -0
- package/dist/esm/format/index.js +5 -1
- package/dist/esm/hooks/guard-switch/index.d.ts +1 -1
- package/dist/esm/hooks/guard-switch/index.js +22 -14
- package/dist/esm/hooks/post-tool/lint-after-edit.d.ts +1 -0
- package/dist/esm/hooks/post-tool/lint-after-edit.js +5 -2
- package/dist/esm/hooks/pretool-guard/validators/file-conventions.js +1 -1
- package/dist/esm/hooks/pretool-guard/validators/forbidden-commands.d.ts +6 -0
- package/dist/esm/hooks/pretool-guard/validators/forbidden-commands.js +27 -2
- package/dist/esm/hooks/pretool-guard/validators/path-contract.d.ts +2 -1
- package/dist/esm/hooks/pretool-guard/validators/path-contract.js +59 -34
- package/dist/esm/hooks/pretool-guard/validators/plan-frontmatter.js +3 -3
- package/dist/esm/hooks/shared/routing-block.js +18 -4
- package/dist/esm/hooks/shared/validators/blueprint.js +3 -0
- package/dist/esm/hooks/stop/qa-changed-files.d.ts +1 -0
- package/dist/esm/hooks/stop/qa-changed-files.js +5 -2
- package/dist/esm/lint/index.js +3 -1
- package/dist/esm/mcp/auto-discover.d.ts +2 -0
- package/dist/esm/mcp/auto-discover.js +14 -6
- package/dist/esm/mcp/blueprint-server.js +379 -80
- package/dist/esm/mcp/cli.js +21 -0
- package/dist/esm/mcp/runners/test.js +15 -0
- package/dist/esm/mcp/server.d.ts +7 -0
- package/dist/esm/mcp/server.js +16 -27
- package/dist/esm/mcp/tools/_registry.d.ts +3 -0
- package/dist/esm/mcp/tools/_registry.js +21 -0
- package/dist/esm/mcp/tools/audit.d.ts +1 -0
- package/dist/esm/mcp/tools/audit.js +13 -8
- package/dist/esm/mcp/tools/typecheck.js +4 -2
- package/dist/esm/mutation/affected.d.ts +9 -0
- package/dist/esm/mutation/affected.js +36 -0
- package/dist/esm/package.json +8 -0
- package/dist/esm/runtime/package-version.d.ts +2 -0
- package/dist/esm/runtime/package-version.js +43 -0
- package/dist/esm/test/command-builder.d.ts +4 -0
- package/dist/esm/test/command-builder.js +28 -3
- 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 +24 -0
- package/dist/esm/tool-runtime/resolve-runner.d.ts +16 -0
- package/dist/esm/tool-runtime/resolve-runner.js +42 -0
- package/dist/esm/typecheck/index.js +4 -2
- package/dist/esm/wp-extension/index.d.ts +50 -0
- package/dist/esm/wp-extension/index.js +268 -0
- package/package.json +75 -46
- package/skills/plan-refine/SKILL.md +5 -4
- package/skills/pll/SKILL.md +1 -0
- 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,104 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export const graphNodeTypeSchema = z.enum([
|
|
3
|
-
'task',
|
|
4
|
-
'milestone',
|
|
5
|
-
'decision',
|
|
6
|
-
'external',
|
|
7
|
-
'tech_debt',
|
|
8
|
-
'blueprint',
|
|
9
|
-
]);
|
|
10
|
-
export const graphEdgeTypeSchema = z.enum(['depends_on', 'blocks', 'relates_to']);
|
|
11
|
-
export const graphNodeSchema = z.object({
|
|
12
|
-
id: z.string().min(1),
|
|
13
|
-
type: graphNodeTypeSchema,
|
|
14
|
-
label: z.string().min(1),
|
|
15
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
16
|
-
});
|
|
17
|
-
export const graphEdgeSchema = z.object({
|
|
18
|
-
source: z.string().min(1),
|
|
19
|
-
target: z.string().min(1),
|
|
20
|
-
type: graphEdgeTypeSchema,
|
|
21
|
-
label: z.string().optional(),
|
|
22
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
23
|
-
});
|
|
24
|
-
export const graphLayoutSchema = z.object({
|
|
25
|
-
direction: z.enum(['TD', 'LR', 'BT', 'RL']).default('TD'),
|
|
26
|
-
rankdir: z.string().optional(),
|
|
27
|
-
});
|
|
28
|
-
function hasCycle(edges) {
|
|
29
|
-
const adjacency = new Map();
|
|
30
|
-
const visiting = new Set();
|
|
31
|
-
const visited = new Set();
|
|
32
|
-
for (const edge of edges) {
|
|
33
|
-
const targets = adjacency.get(edge.source) ?? [];
|
|
34
|
-
targets.push(edge.target);
|
|
35
|
-
adjacency.set(edge.source, targets);
|
|
36
|
-
}
|
|
37
|
-
function visit(node) {
|
|
38
|
-
if (visiting.has(node)) {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
if (visited.has(node)) {
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
visiting.add(node);
|
|
45
|
-
const targets = adjacency.get(node) ?? [];
|
|
46
|
-
for (const target of targets) {
|
|
47
|
-
if (visit(target)) {
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
visiting.delete(node);
|
|
52
|
-
visited.add(node);
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
|
-
for (const node of adjacency.keys()) {
|
|
56
|
-
if (visit(node)) {
|
|
57
|
-
return true;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
export const normalizedGraphSchema = z
|
|
63
|
-
.object({
|
|
64
|
-
nodes: z.array(graphNodeSchema),
|
|
65
|
-
edges: z.array(graphEdgeSchema),
|
|
66
|
-
layout: graphLayoutSchema.optional(),
|
|
67
|
-
})
|
|
68
|
-
.superRefine((graph, context) => {
|
|
69
|
-
const nodeIds = new Set();
|
|
70
|
-
for (const [index, node] of graph.nodes.entries()) {
|
|
71
|
-
if (nodeIds.has(node.id)) {
|
|
72
|
-
context.addIssue({
|
|
73
|
-
code: z.ZodIssueCode.custom,
|
|
74
|
-
message: `Duplicate node id: ${node.id}`,
|
|
75
|
-
path: ['nodes', index, 'id'],
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
nodeIds.add(node.id);
|
|
79
|
-
}
|
|
80
|
-
for (const [index, edge] of graph.edges.entries()) {
|
|
81
|
-
if (!nodeIds.has(edge.source)) {
|
|
82
|
-
context.addIssue({
|
|
83
|
-
code: z.ZodIssueCode.custom,
|
|
84
|
-
message: `Edge source not found: ${edge.source}`,
|
|
85
|
-
path: ['edges', index, 'source'],
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
if (!nodeIds.has(edge.target)) {
|
|
89
|
-
context.addIssue({
|
|
90
|
-
code: z.ZodIssueCode.custom,
|
|
91
|
-
message: `Edge target not found: ${edge.target}`,
|
|
92
|
-
path: ['edges', index, 'target'],
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (hasCycle(graph.edges)) {
|
|
97
|
-
context.addIssue({
|
|
98
|
-
code: z.ZodIssueCode.custom,
|
|
99
|
-
message: 'Graph contains a cycle',
|
|
100
|
-
path: ['edges'],
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
//# sourceMappingURL=schema.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TaskGraph } from '#dag/task-graph';
|
|
2
|
-
import { type NormalizedGraph } from '#graph/schema';
|
|
3
|
-
export declare function taskGraphToNormalizedGraph(taskGraph: TaskGraph<{
|
|
4
|
-
title: string;
|
|
5
|
-
}>): NormalizedGraph;
|
|
6
|
-
//# sourceMappingURL=task-graph-adapter.d.ts.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { normalizedGraphSchema } from '#graph/schema';
|
|
2
|
-
export function taskGraphToNormalizedGraph(taskGraph) {
|
|
3
|
-
const tasks = taskGraph.getTopologicalOrder();
|
|
4
|
-
const waves = taskGraph.getWaves();
|
|
5
|
-
const waveByTaskId = new Map();
|
|
6
|
-
for (const [waveIndex, wave] of waves.entries()) {
|
|
7
|
-
for (const task of wave) {
|
|
8
|
-
waveByTaskId.set(task.id, waveIndex);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
const nodes = tasks.map((task) => ({
|
|
12
|
-
id: task.id,
|
|
13
|
-
type: 'task',
|
|
14
|
-
label: task.data?.title ?? task.id,
|
|
15
|
-
metadata: {
|
|
16
|
-
wave_number: waveByTaskId.get(task.id) ?? 0,
|
|
17
|
-
},
|
|
18
|
-
}));
|
|
19
|
-
const edges = tasks.flatMap((task) => task.dependencies.map((dependencyId) => ({
|
|
20
|
-
source: dependencyId,
|
|
21
|
-
target: task.id,
|
|
22
|
-
type: 'depends_on',
|
|
23
|
-
})));
|
|
24
|
-
return normalizedGraphSchema.parse({
|
|
25
|
-
nodes,
|
|
26
|
-
edges,
|
|
27
|
-
layout: { direction: 'TD' },
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=task-graph-adapter.js.map
|