@webpresso/agent-kit 0.21.3 → 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.
Files changed (99) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +105 -41
  4. package/catalog/AGENTS.md.tpl +3 -1
  5. package/catalog/agent/rules/changeset-release.md +13 -16
  6. package/catalog/agent/skills/plan-refine/SKILL.md +5 -4
  7. package/catalog/base-kit/commitlint.config.ts.tmpl +1 -3
  8. package/catalog/base-kit/e2e/fixtures/smoke.html.tmpl +13 -0
  9. package/catalog/base-kit/e2e/smoke.spec.ts.tmpl +13 -0
  10. package/catalog/base-kit/oxlint.config.ts.tmpl +26 -0
  11. package/catalog/base-kit/playwright.config.ts.tmpl +10 -0
  12. package/catalog/base-kit/src/quality-sample.test.ts.tmpl +19 -0
  13. package/catalog/base-kit/src/quality-sample.ts.tmpl +11 -0
  14. package/catalog/base-kit/stryker.config.ts.tmpl +14 -0
  15. package/catalog/base-kit/tsconfig.json.tmpl +9 -0
  16. package/catalog/base-kit/vitest.config.ts.tmpl +10 -0
  17. package/catalog/docs/templates/adr.md +1 -1
  18. package/catalog/docs/templates/blueprint.md +1 -0
  19. package/catalog/docs/templates/blueprint.yaml +6 -3
  20. package/catalog/docs/templates/guide.md +1 -1
  21. package/catalog/docs/templates/postmortem.md +1 -1
  22. package/catalog/docs/templates/research.md +1 -1
  23. package/catalog/docs/templates/runbook.md +1 -1
  24. package/catalog/docs/templates/system.md +12 -3
  25. package/catalog/docs/templates/tech-debt.md +1 -0
  26. package/commands/blueprint.md +37 -4
  27. package/dist/esm/audit/resolve-audit-script.d.ts +24 -0
  28. package/dist/esm/audit/resolve-audit-script.js +27 -0
  29. package/dist/esm/blueprint/db/enums.d.ts +1 -1
  30. package/dist/esm/blueprint/index.d.ts +0 -1
  31. package/dist/esm/blueprint/index.js +0 -2
  32. package/dist/esm/blueprint/local.d.ts +0 -3
  33. package/dist/esm/blueprint/local.js +0 -2
  34. package/dist/esm/blueprint/service/BlueprintCreationService.js +5 -2
  35. package/dist/esm/blueprint/utils/package-assets.d.ts +11 -0
  36. package/dist/esm/blueprint/utils/package-assets.js +33 -4
  37. package/dist/esm/build/sync-catalog-doc-templates.d.ts +23 -0
  38. package/dist/esm/build/sync-catalog-doc-templates.js +93 -0
  39. package/dist/esm/cli/commands/audit.js +2 -7
  40. package/dist/esm/cli/commands/blueprint/router.js +5 -2
  41. package/dist/esm/cli/commands/blueprint/template-resolver.js +8 -4
  42. package/dist/esm/cli/commands/init/host-visibility.js +4 -2
  43. package/dist/esm/cli/commands/init/index.js +46 -7
  44. package/dist/esm/cli/commands/init/scaffold-base-kit.d.ts +12 -0
  45. package/dist/esm/cli/commands/init/scaffold-base-kit.js +141 -6
  46. package/dist/esm/cli/commands/typecheck.js +10 -4
  47. package/dist/esm/e2e/command-builder.js +26 -7
  48. package/dist/esm/e2e/execution.js +4 -0
  49. package/dist/esm/e2e/run-planner.js +1 -0
  50. package/dist/esm/e2e/types.d.ts +1 -0
  51. package/dist/esm/format/index.js +7 -1
  52. package/dist/esm/lint/index.js +3 -1
  53. package/dist/esm/mcp/blueprint-server.js +361 -66
  54. package/dist/esm/mcp/tools/audit.js +2 -8
  55. package/dist/esm/mcp/tools/e2e.d.ts +1 -1
  56. package/dist/esm/package.json +3 -0
  57. package/dist/esm/secret-gate/runner.js +4 -0
  58. package/dist/esm/test/command-builder.d.ts +1 -0
  59. package/dist/esm/test/command-builder.js +8 -2
  60. package/dist/esm/test-helpers/hermetic-env.d.ts +25 -0
  61. package/dist/esm/test-helpers/hermetic-env.js +31 -0
  62. package/dist/esm/tool-runtime/index.d.ts +5 -0
  63. package/dist/esm/tool-runtime/index.js +23 -0
  64. package/dist/esm/tool-runtime/resolve-runner.d.ts +13 -0
  65. package/dist/esm/tool-runtime/resolve-runner.js +40 -0
  66. package/package.json +12 -18
  67. package/skills/plan-refine/SKILL.md +5 -4
  68. package/dist/esm/blueprint/dag/cycle-detector.d.ts +0 -12
  69. package/dist/esm/blueprint/dag/cycle-detector.js +0 -46
  70. package/dist/esm/blueprint/dag/executor.d.ts +0 -140
  71. package/dist/esm/blueprint/dag/executor.js +0 -292
  72. package/dist/esm/blueprint/dag/index.d.ts +0 -20
  73. package/dist/esm/blueprint/dag/index.js +0 -17
  74. package/dist/esm/blueprint/dag/interfaces.d.ts +0 -56
  75. package/dist/esm/blueprint/dag/interfaces.js +0 -13
  76. package/dist/esm/blueprint/dag/local/independence.d.ts +0 -107
  77. package/dist/esm/blueprint/dag/local/independence.js +0 -231
  78. package/dist/esm/blueprint/dag/local/index.d.ts +0 -14
  79. package/dist/esm/blueprint/dag/local/index.js +0 -14
  80. package/dist/esm/blueprint/dag/local/package-graph.d.ts +0 -66
  81. package/dist/esm/blueprint/dag/local/package-graph.js +0 -148
  82. package/dist/esm/blueprint/dag/plan-parser.d.ts +0 -54
  83. package/dist/esm/blueprint/dag/plan-parser.js +0 -236
  84. package/dist/esm/blueprint/dag/task-graph-algorithms.d.ts +0 -13
  85. package/dist/esm/blueprint/dag/task-graph-algorithms.js +0 -236
  86. package/dist/esm/blueprint/dag/task-graph.d.ts +0 -171
  87. package/dist/esm/blueprint/dag/task-graph.js +0 -370
  88. package/dist/esm/blueprint/dag/types.d.ts +0 -17
  89. package/dist/esm/blueprint/dag/types.js +0 -2
  90. package/dist/esm/blueprint/graph/index.d.ts +0 -5
  91. package/dist/esm/blueprint/graph/index.js +0 -5
  92. package/dist/esm/blueprint/graph/mermaid-parser.d.ts +0 -3
  93. package/dist/esm/blueprint/graph/mermaid-parser.js +0 -93
  94. package/dist/esm/blueprint/graph/mermaid-serializer.d.ts +0 -3
  95. package/dist/esm/blueprint/graph/mermaid-serializer.js +0 -20
  96. package/dist/esm/blueprint/graph/schema.d.ts +0 -89
  97. package/dist/esm/blueprint/graph/schema.js +0 -104
  98. package/dist/esm/blueprint/graph/task-graph-adapter.d.ts +0 -6
  99. 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