@webpresso/agent-kit 3.3.2 → 3.3.3
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/catalog/AGENTS.md.tpl +3 -5
- package/catalog/agent/skills/verify/SKILL.md +12 -12
- package/catalog/compose/admin-blocks-registry.json +659 -0
- package/dist/esm/blueprint/core/parser.js +2 -4
- package/dist/esm/blueprint/core/validation/criteria.js +2 -1
- package/dist/esm/blueprint/lifecycle/review-provenance.js +85 -30
- package/dist/esm/build/cli-mcp-parity.js +3 -2
- package/dist/esm/build/package-manifest.js +7 -2
- package/dist/esm/cli/commands/audit-core.js +9 -1
- package/dist/esm/cli/commands/audit.js +16 -5
- package/dist/esm/cli/commands/init/mcp-spec.d.ts +18 -3
- package/dist/esm/cli/commands/init/mcp-spec.js +54 -6
- package/dist/esm/cli/commands/init/scaffold-agents-md.js +5 -7
- package/dist/esm/cli/commands/package-manager.js +8 -2
- package/dist/esm/compose/compose.d.ts +38 -0
- package/dist/esm/compose/compose.js +143 -0
- package/dist/esm/compose/escape-html.d.ts +5 -0
- package/dist/esm/compose/escape-html.js +12 -0
- package/dist/esm/compose/ops-report-render.d.ts +5 -0
- package/dist/esm/compose/ops-report-render.js +71 -0
- package/dist/esm/compose/ops-report-schema.d.ts +42 -0
- package/dist/esm/compose/ops-report-schema.js +46 -0
- package/dist/esm/compose/preview.d.ts +14 -0
- package/dist/esm/compose/preview.js +32 -0
- package/dist/esm/compose/registry-resolve.d.ts +47 -0
- package/dist/esm/compose/registry-resolve.js +133 -0
- package/dist/esm/git/changed-files.d.ts +20 -0
- package/dist/esm/git/changed-files.js +63 -0
- package/dist/esm/hooks/stop/qa-changed-files.js +6 -1
- package/dist/esm/mcp/blueprint/handlers/validate.js +6 -0
- package/dist/esm/mcp/tools/_names.d.ts +1 -1
- package/dist/esm/mcp/tools/_names.js +4 -0
- package/dist/esm/mcp/tools/_registry.js +8 -0
- package/dist/esm/mcp/tools/release-progress.d.ts +9 -0
- package/dist/esm/mcp/tools/release-progress.js +110 -0
- package/dist/esm/mcp/tools/wp-ui-blocks-list.d.ts +3 -0
- package/dist/esm/mcp/tools/wp-ui-blocks-list.js +43 -0
- package/dist/esm/mcp/tools/wp-ui-compose.d.ts +3 -0
- package/dist/esm/mcp/tools/wp-ui-compose.js +62 -0
- package/dist/esm/mcp/tools/wp-ui-preview.d.ts +3 -0
- package/dist/esm/mcp/tools/wp-ui-preview.js +52 -0
- package/dist/esm/package.json +2 -0
- package/package.json +23 -12
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `wp_release_progress` — read-only Release workflow phase reporter for agents.
|
|
3
|
+
*
|
|
4
|
+
* Shares {@link runReleaseProgress} with the CLI so MCP and `wp release-progress`
|
|
5
|
+
* never diverge. Does not mutate GitHub; only reads via `gh`.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { runReleaseProgress, } from "#cli/commands/release-progress.js";
|
|
9
|
+
import { createSummaryOutputSchema, createSummaryResult } from "./_shared/result.js";
|
|
10
|
+
import { readonlyOpsBaseSchema } from "./_readonly-ops.js";
|
|
11
|
+
const inputSchema = readonlyOpsBaseSchema
|
|
12
|
+
.extend({
|
|
13
|
+
runId: z.union([z.string().min(1), z.number().int().positive()]).optional(),
|
|
14
|
+
repo: z.string().min(1).optional(),
|
|
15
|
+
})
|
|
16
|
+
.strict();
|
|
17
|
+
const releaseProgressDetailsSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
runId: z.string(),
|
|
20
|
+
repo: z.string(),
|
|
21
|
+
phase: z.enum(["detect", "native-matrix", "publish", "done", "failed"]),
|
|
22
|
+
detail: z.string(),
|
|
23
|
+
native: z.object({
|
|
24
|
+
done: z.number().int().nonnegative(),
|
|
25
|
+
total: z.number().int().nonnegative(),
|
|
26
|
+
failed: z.number().int().nonnegative(),
|
|
27
|
+
inProgress: z.number().int().nonnegative(),
|
|
28
|
+
}),
|
|
29
|
+
publishRunning: z.boolean(),
|
|
30
|
+
publishDone: z.boolean(),
|
|
31
|
+
publishFailed: z.boolean(),
|
|
32
|
+
line: z.string(),
|
|
33
|
+
})
|
|
34
|
+
.strict();
|
|
35
|
+
const outputSchema = createSummaryOutputSchema({
|
|
36
|
+
details: releaseProgressDetailsSchema,
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* Build the tool descriptor. Tests inject gh seams; production uses defaults.
|
|
40
|
+
*/
|
|
41
|
+
export function createReleaseProgressTool(deps = {}) {
|
|
42
|
+
return {
|
|
43
|
+
name: "wp_release_progress",
|
|
44
|
+
description: "Read-only GitHub Actions Release workflow phase reporter (detect | native-matrix | publish | done | failed) with session-memory native matrix counts. Use instead of silent npm view polls after Version Packages merge. Does not mutate GitHub. Prefer this over shelling `wp release-progress` when available.",
|
|
45
|
+
inputSchema,
|
|
46
|
+
outputSchema,
|
|
47
|
+
annotations: {
|
|
48
|
+
title: "Release progress",
|
|
49
|
+
readOnlyHint: true,
|
|
50
|
+
destructiveHint: false,
|
|
51
|
+
idempotentHint: true,
|
|
52
|
+
openWorldHint: true,
|
|
53
|
+
},
|
|
54
|
+
handler: async (raw) => {
|
|
55
|
+
const input = inputSchema.parse(raw ?? {});
|
|
56
|
+
const repo = input.repo ?? "webpresso/agent-kit";
|
|
57
|
+
try {
|
|
58
|
+
const result = runReleaseProgress({
|
|
59
|
+
runId: input.runId,
|
|
60
|
+
repo,
|
|
61
|
+
json: false,
|
|
62
|
+
fetchJobs: deps.fetchJobs,
|
|
63
|
+
resolveLatestRunId: deps.resolveLatestRunId,
|
|
64
|
+
// Suppress CLI text I/O; structuredContent is the MCP contract.
|
|
65
|
+
stdout: { write: () => undefined },
|
|
66
|
+
stderr: { write: () => undefined },
|
|
67
|
+
});
|
|
68
|
+
const { progress, runId, line } = result;
|
|
69
|
+
const failed = progress.phase === "failed";
|
|
70
|
+
return createSummaryResult({
|
|
71
|
+
passed: !failed,
|
|
72
|
+
summary: line,
|
|
73
|
+
details: {
|
|
74
|
+
runId,
|
|
75
|
+
repo,
|
|
76
|
+
phase: progress.phase,
|
|
77
|
+
detail: progress.detail,
|
|
78
|
+
native: progress.native,
|
|
79
|
+
publishRunning: progress.publishRunning,
|
|
80
|
+
publishDone: progress.publishDone,
|
|
81
|
+
publishFailed: progress.publishFailed,
|
|
82
|
+
line,
|
|
83
|
+
},
|
|
84
|
+
warnings: failed ? [progress.detail] : [],
|
|
85
|
+
}, { isError: failed });
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
89
|
+
return createSummaryResult({
|
|
90
|
+
passed: false,
|
|
91
|
+
summary: `release-progress failed: ${message}`,
|
|
92
|
+
details: {
|
|
93
|
+
runId: input.runId === undefined ? "" : String(input.runId),
|
|
94
|
+
repo,
|
|
95
|
+
phase: "failed",
|
|
96
|
+
detail: message,
|
|
97
|
+
native: { done: 0, total: 0, failed: 0, inProgress: 0 },
|
|
98
|
+
publishRunning: false,
|
|
99
|
+
publishDone: false,
|
|
100
|
+
publishFailed: false,
|
|
101
|
+
line: `release-progress phase=failed native=0/0 ${message}`,
|
|
102
|
+
},
|
|
103
|
+
warnings: [message],
|
|
104
|
+
}, { isError: true });
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const tool = createReleaseProgressTool();
|
|
110
|
+
export default tool;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resolveBlockRegistry } from "#compose/registry-resolve.js";
|
|
3
|
+
const inputSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
cwd: z.string().optional(),
|
|
6
|
+
profile: z.enum(["admin-crud", "ops-report"]).optional(),
|
|
7
|
+
})
|
|
8
|
+
.strict();
|
|
9
|
+
const tool = {
|
|
10
|
+
name: "wp_ui_blocks_list",
|
|
11
|
+
description: "List the agent UI block catalog for composition. Resolves project `.webpresso/generated/frontend/blocks/registry.json` when present, otherwise the offline catalog snapshot. Always returns source (project|snapshot), registryVersion, and warnings (e.g. snapshot used inside a webpresso tree without a generated registry).",
|
|
12
|
+
inputSchema,
|
|
13
|
+
annotations: {
|
|
14
|
+
title: "UI blocks list",
|
|
15
|
+
readOnlyHint: true,
|
|
16
|
+
destructiveHint: false,
|
|
17
|
+
idempotentHint: true,
|
|
18
|
+
openWorldHint: false,
|
|
19
|
+
},
|
|
20
|
+
handler: async (raw) => {
|
|
21
|
+
const input = inputSchema.parse(raw ?? {});
|
|
22
|
+
const resolved = resolveBlockRegistry({ cwd: input.cwd });
|
|
23
|
+
// admin-crud: full registry (list/detail/form). ops-report: no admin blocks.
|
|
24
|
+
const blocks = input.profile === "ops-report" ? [] : resolved.registry.blocks;
|
|
25
|
+
const summary = `UI blocks: ${blocks.length} (source=${resolved.source}, version=${resolved.registryVersion})`;
|
|
26
|
+
const payload = {
|
|
27
|
+
passed: true,
|
|
28
|
+
summary,
|
|
29
|
+
source: resolved.source,
|
|
30
|
+
registryVersion: resolved.registryVersion,
|
|
31
|
+
path: resolved.path,
|
|
32
|
+
warnings: [...resolved.warnings],
|
|
33
|
+
profiles: ["admin-crud", "ops-report"],
|
|
34
|
+
blocks,
|
|
35
|
+
webpressoPresentWithoutRegistry: resolved.webpressoPresentWithoutRegistry,
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
content: [{ type: "text", text: summary }],
|
|
39
|
+
structuredContent: payload,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export default tool;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { composeValidate } from "#compose/compose.js";
|
|
3
|
+
const inputSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
cwd: z.string().optional(),
|
|
6
|
+
profile: z.enum(["admin-crud", "ops-report"]),
|
|
7
|
+
kind: z.enum(["list", "detail", "form"]).optional(),
|
|
8
|
+
spec: z.unknown(),
|
|
9
|
+
})
|
|
10
|
+
.strict()
|
|
11
|
+
.superRefine((value, ctx) => {
|
|
12
|
+
if (value.profile === "admin-crud" && value.kind === undefined) {
|
|
13
|
+
ctx.addIssue({
|
|
14
|
+
code: "custom",
|
|
15
|
+
message: "kind is required for admin-crud (list|detail|form)",
|
|
16
|
+
path: ["kind"],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const tool = {
|
|
21
|
+
name: "wp_ui_compose",
|
|
22
|
+
description: "Validate a profile-discriminated UI compose input. admin-crud: validate list/detail/form specs against the block registry (returns input spec unchanged when legal). ops-report: validate flat OpsReportSpec. Does not write files or open a browser.",
|
|
23
|
+
inputSchema,
|
|
24
|
+
annotations: {
|
|
25
|
+
title: "UI compose validate",
|
|
26
|
+
readOnlyHint: true,
|
|
27
|
+
destructiveHint: false,
|
|
28
|
+
idempotentHint: true,
|
|
29
|
+
openWorldHint: false,
|
|
30
|
+
},
|
|
31
|
+
handler: async (raw) => {
|
|
32
|
+
const input = inputSchema.parse(raw ?? {});
|
|
33
|
+
const composeInput = input.profile === "admin-crud"
|
|
34
|
+
? {
|
|
35
|
+
profile: "admin-crud",
|
|
36
|
+
kind: input.kind,
|
|
37
|
+
spec: input.spec && typeof input.spec === "object" && !Array.isArray(input.spec)
|
|
38
|
+
? input.spec
|
|
39
|
+
: {},
|
|
40
|
+
}
|
|
41
|
+
: { profile: "ops-report", spec: input.spec };
|
|
42
|
+
const result = composeValidate(composeInput, { cwd: input.cwd });
|
|
43
|
+
const summary = result.ok
|
|
44
|
+
? `compose ok (${result.profile})`
|
|
45
|
+
: `compose failed (${result.profile}): ${result.diagnostics.map((d) => d.message).join("; ")}`;
|
|
46
|
+
return {
|
|
47
|
+
content: [{ type: "text", text: summary }],
|
|
48
|
+
structuredContent: {
|
|
49
|
+
passed: result.ok,
|
|
50
|
+
summary,
|
|
51
|
+
profile: result.profile,
|
|
52
|
+
ok: result.ok,
|
|
53
|
+
spec: result.spec,
|
|
54
|
+
diagnostics: result.diagnostics,
|
|
55
|
+
registrySource: result.registrySource,
|
|
56
|
+
registryVersion: result.registryVersion,
|
|
57
|
+
warnings: result.warnings,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
export default tool;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { previewOpsReport } from "#compose/preview.js";
|
|
3
|
+
const inputSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
cwd: z.string().optional(),
|
|
6
|
+
profile: z.literal("ops-report"),
|
|
7
|
+
spec: z.unknown(),
|
|
8
|
+
})
|
|
9
|
+
.strict();
|
|
10
|
+
const tool = {
|
|
11
|
+
name: "wp_ui_preview",
|
|
12
|
+
description: "Validate an ops-report compose spec, write self-contained HTML under the worktree state surface (or .webpresso/compose fallback), and return { path } only. Does not open a browser. admin-crud is not supported for preview.",
|
|
13
|
+
inputSchema,
|
|
14
|
+
annotations: {
|
|
15
|
+
title: "UI ops-report preview",
|
|
16
|
+
readOnlyHint: false,
|
|
17
|
+
destructiveHint: false,
|
|
18
|
+
idempotentHint: true,
|
|
19
|
+
openWorldHint: false,
|
|
20
|
+
},
|
|
21
|
+
handler: async (raw) => {
|
|
22
|
+
try {
|
|
23
|
+
const input = inputSchema.parse(raw ?? {});
|
|
24
|
+
const { path } = previewOpsReport({ cwd: input.cwd, spec: input.spec });
|
|
25
|
+
const summary = `ops-report preview written: ${path}`;
|
|
26
|
+
return {
|
|
27
|
+
content: [{ type: "text", text: summary }],
|
|
28
|
+
structuredContent: {
|
|
29
|
+
passed: true,
|
|
30
|
+
summary,
|
|
31
|
+
path,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
const message = error instanceof z.ZodError
|
|
37
|
+
? `Invalid wp_ui_preview input: ${error.issues.map((i) => i.message).join("; ")} (ops-report profile only; admin-crud is not supported)`
|
|
38
|
+
: error instanceof Error
|
|
39
|
+
? error.message
|
|
40
|
+
: String(error);
|
|
41
|
+
return {
|
|
42
|
+
content: [{ type: "text", text: message }],
|
|
43
|
+
structuredContent: {
|
|
44
|
+
passed: false,
|
|
45
|
+
summary: message,
|
|
46
|
+
},
|
|
47
|
+
isError: true,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export default tool;
|
package/dist/esm/package.json
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"#worktrees/*": "./worktrees/*.js",
|
|
26
26
|
"#fleet/*.js": "./fleet/*.js",
|
|
27
27
|
"#fleet/*": "./fleet/*.js",
|
|
28
|
+
"#compose/*.js": "./compose/*.js",
|
|
29
|
+
"#compose/*": "./compose/*.js",
|
|
28
30
|
"#cli/auto-update/*.js": "./cli/auto-update/*.js",
|
|
29
31
|
"#cli/auto-update/*": "./cli/auto-update/*.js",
|
|
30
32
|
"#cli/*.js": "./cli/*.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpresso/agent-kit",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TypeScript-first agent harness for guarded develop/deploy workflows: wp CLI gates, MCP tools, hooks, memory, worktrees, secrets, audits, and evidence checks.",
|
|
6
6
|
"keywords": [
|
|
@@ -78,6 +78,8 @@
|
|
|
78
78
|
"#worktrees/*": "./src/worktrees/*.ts",
|
|
79
79
|
"#fleet/*.js": "./src/fleet/*.ts",
|
|
80
80
|
"#fleet/*": "./src/fleet/*.ts",
|
|
81
|
+
"#compose/*.js": "./src/compose/*.ts",
|
|
82
|
+
"#compose/*": "./src/compose/*.ts",
|
|
81
83
|
"#cli/auto-update/*.js": "./src/cli/auto-update/*.ts",
|
|
82
84
|
"#cli/auto-update/*": "./src/cli/auto-update/*.ts",
|
|
83
85
|
"#cli/*.js": "./src/cli/*.ts",
|
|
@@ -505,19 +507,28 @@
|
|
|
505
507
|
"packageManager": "pnpm@11.10.0",
|
|
506
508
|
"webpresso": {
|
|
507
509
|
"agentConfigVersion": "0.1.5",
|
|
510
|
+
"dependencyFreshnessExceptions": [
|
|
511
|
+
{
|
|
512
|
+
"package": "@xterm/xterm",
|
|
513
|
+
"reason": "Pinned to the 5.5 major the desktop-pty-loadtest spike actually measured. The spike's GUI performance gate for the terminal pane is still recorded as pending, so adopting the 6.0 renderer major would make that structural evidence non-transferable and leave apps/desktop with no supporting measurement at all. Upgrading is a separate change that must carry its own measurement.",
|
|
514
|
+
"owner": "ozby",
|
|
515
|
+
"expiry": "2026-10-31",
|
|
516
|
+
"linkedIssue": "https://github.com/webpresso/agent-kit/pull/889"
|
|
517
|
+
}
|
|
518
|
+
],
|
|
508
519
|
"setupWpActionRef": "c2c71a7a4be446fc6858e6b57bf55a11ccfa2d88"
|
|
509
520
|
},
|
|
510
521
|
"optionalDependencies": {
|
|
511
|
-
"@webpresso/agent-kit-runtime-darwin-arm64": "3.3.
|
|
512
|
-
"@webpresso/agent-kit-runtime-darwin-x64": "3.3.
|
|
513
|
-
"@webpresso/agent-kit-runtime-linux-x64": "3.3.
|
|
514
|
-
"@webpresso/agent-kit-runtime-linux-arm64": "3.3.
|
|
515
|
-
"@webpresso/agent-kit-runtime-windows-x64": "3.3.
|
|
516
|
-
"@webpresso/agent-kit-session-memory-darwin-x64": "3.3.
|
|
517
|
-
"@webpresso/agent-kit-session-memory-darwin-arm64": "3.3.
|
|
518
|
-
"@webpresso/agent-kit-session-memory-linux-x64": "3.3.
|
|
519
|
-
"@webpresso/agent-kit-session-memory-linux-arm64": "3.3.
|
|
520
|
-
"@webpresso/agent-kit-session-memory-win32-x64": "3.3.
|
|
521
|
-
"@webpresso/agent-kit-session-memory-win32-arm64": "3.3.
|
|
522
|
+
"@webpresso/agent-kit-runtime-darwin-arm64": "3.3.3",
|
|
523
|
+
"@webpresso/agent-kit-runtime-darwin-x64": "3.3.3",
|
|
524
|
+
"@webpresso/agent-kit-runtime-linux-x64": "3.3.3",
|
|
525
|
+
"@webpresso/agent-kit-runtime-linux-arm64": "3.3.3",
|
|
526
|
+
"@webpresso/agent-kit-runtime-windows-x64": "3.3.3",
|
|
527
|
+
"@webpresso/agent-kit-session-memory-darwin-x64": "3.3.3",
|
|
528
|
+
"@webpresso/agent-kit-session-memory-darwin-arm64": "3.3.3",
|
|
529
|
+
"@webpresso/agent-kit-session-memory-linux-x64": "3.3.3",
|
|
530
|
+
"@webpresso/agent-kit-session-memory-linux-arm64": "3.3.3",
|
|
531
|
+
"@webpresso/agent-kit-session-memory-win32-x64": "3.3.3",
|
|
532
|
+
"@webpresso/agent-kit-session-memory-win32-arm64": "3.3.3"
|
|
522
533
|
}
|
|
523
534
|
}
|