@webpresso/agent-kit 0.26.1 → 0.26.2
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 -58
- package/README.md +9 -0
- package/dist/esm/hooks/doctor.d.ts +12 -0
- package/dist/esm/hooks/doctor.js +40 -1
- package/package.json +6 -6
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Webpresso agent-kit Claude Code plugin: blueprints, skills, hooks, MCP server",
|
|
9
|
-
"version": "0.26.
|
|
9
|
+
"version": "0.26.2"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
]
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
|
-
"version": "0.26.
|
|
26
|
+
"version": "0.26.2"
|
|
27
27
|
}
|
|
@@ -1,66 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webpresso",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "Webpresso agent-kit: blueprints, skills, lore commit protocol, tech-debt lifecycle",
|
|
5
5
|
"skills": "./skills",
|
|
6
6
|
"commands": "./commands",
|
|
7
|
-
"hooks": {
|
|
8
|
-
"PreToolUse": [
|
|
9
|
-
{
|
|
10
|
-
"matcher": "Bash|Edit|Write|MultiEdit|WebFetch|Read|Grep",
|
|
11
|
-
"hooks": [
|
|
12
|
-
{
|
|
13
|
-
"type": "command",
|
|
14
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/bin/wp-pretool-guard.js"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"PostToolUse": [
|
|
20
|
-
{
|
|
21
|
-
"matcher": "Edit|Write",
|
|
22
|
-
"hooks": [
|
|
23
|
-
{
|
|
24
|
-
"type": "command",
|
|
25
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/bin/wp-post-tool.js",
|
|
26
|
-
"timeout": 15
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"Stop": [
|
|
32
|
-
{
|
|
33
|
-
"hooks": [
|
|
34
|
-
{
|
|
35
|
-
"type": "command",
|
|
36
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/bin/wp-stop-qa.js"
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"UserPromptSubmit": [
|
|
42
|
-
{
|
|
43
|
-
"hooks": [
|
|
44
|
-
{
|
|
45
|
-
"type": "command",
|
|
46
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/bin/wp-guard-switch.js",
|
|
47
|
-
"timeout": 5
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"SessionStart": [
|
|
53
|
-
{
|
|
54
|
-
"matcher": "startup|resume|compact",
|
|
55
|
-
"hooks": [
|
|
56
|
-
{
|
|
57
|
-
"type": "command",
|
|
58
|
-
"command": "node ${CLAUDE_PLUGIN_ROOT}/bin/wp-sessionstart-routing.js"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
7
|
"mcpServers": {
|
|
65
8
|
"webpresso": {
|
|
66
9
|
"command": "node",
|
package/README.md
CHANGED
|
@@ -44,6 +44,15 @@ Playwright, unit-test and file-based e2e smoke assets), wires `AGENTS.md` /
|
|
|
44
44
|
execution-owned vs authoring-owned dependency migration guidance. Re-running
|
|
45
45
|
refreshes the webpresso-owned pieces and preserves consumer-owned files.
|
|
46
46
|
|
|
47
|
+
> **`wp setup` is required for hooks.** The Claude Code hooks (PreToolUse guard,
|
|
48
|
+
> Stop-QA gate, SessionStart routing, …) are installed by `wp setup` into your
|
|
49
|
+
> repo's `.claude/settings.json`. They are intentionally **not** shipped in the
|
|
50
|
+
> plugin manifest — declaring them in both places double-fires every hook (Claude
|
|
51
|
+
> Code does not dedup across sources), and settings.json is the more reliable
|
|
52
|
+
> surface. So enabling the plugin alone does **not** activate hooks; run
|
|
53
|
+
> `wp setup`. Run `wp hooks doctor` to check — it warns if the managed hooks are
|
|
54
|
+
> missing from `.claude/settings.json`.
|
|
55
|
+
|
|
47
56
|
`wp` owns **execution** for the generic tool lanes it manages (test / mutation /
|
|
48
57
|
e2e / lint / format / typecheck). That does **not** mean every local
|
|
49
58
|
devDependency disappears — keep dependencies your repo imports directly (e.g.
|
|
@@ -13,6 +13,8 @@ export interface DoctorCheck {
|
|
|
13
13
|
name: string;
|
|
14
14
|
ok: boolean;
|
|
15
15
|
detail?: string;
|
|
16
|
+
/** Advisory checks surface a warning but do not flip the doctor's exit code. */
|
|
17
|
+
advisory?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export interface DoctorResult {
|
|
18
20
|
ok: boolean;
|
|
@@ -28,6 +30,16 @@ export interface RunHooksDoctorOptions {
|
|
|
28
30
|
}
|
|
29
31
|
export declare function findOwningPackageRoot(startDir: string): string | null;
|
|
30
32
|
export declare function checkRtkOnPath(cwd?: string): Promise<DoctorCheck | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Verify the consumer's `.claude/settings.json` carries the managed agent-kit
|
|
35
|
+
* hook launchers. Since the hooks are single-sourced there (not in the plugin
|
|
36
|
+
* manifest), a missing reference means a plugin-only install that never ran
|
|
37
|
+
* `wp setup` — i.e. no agent-kit hooks are active.
|
|
38
|
+
*/
|
|
39
|
+
export declare function checkManagedHooksInstalled(cwd?: string): {
|
|
40
|
+
ok: boolean;
|
|
41
|
+
detail?: string;
|
|
42
|
+
};
|
|
31
43
|
export declare function runHooksDoctor(opts?: RunHooksDoctorOptions): Promise<DoctorResult>;
|
|
32
44
|
export declare function printHooksDoctor(opts?: RunHooksDoctorOptions): Promise<number>;
|
|
33
45
|
export {};
|
package/dist/esm/hooks/doctor.js
CHANGED
|
@@ -590,6 +590,40 @@ function checkLiveSourceDevLink(cwd = process.cwd()) {
|
|
|
590
590
|
detail: `${state.package} → ${state.linkedFrom}`,
|
|
591
591
|
};
|
|
592
592
|
}
|
|
593
|
+
// Marker for the managed hook launchers `wp setup` writes under
|
|
594
|
+
// `.claude/hooks/managed/` (CLAUDE_MANAGED_HOOK_SUBDIR in the agent-hooks
|
|
595
|
+
// scaffolder). The plugin manifest no longer ships hooks (they double-fired
|
|
596
|
+
// against these and were the less reliable surface), so settings.json is the
|
|
597
|
+
// single source — if it does not reference them, the hooks are not installed.
|
|
598
|
+
const MANAGED_HOOK_MARKER = 'hooks/managed/wp-pretool-guard';
|
|
599
|
+
/**
|
|
600
|
+
* Verify the consumer's `.claude/settings.json` carries the managed agent-kit
|
|
601
|
+
* hook launchers. Since the hooks are single-sourced there (not in the plugin
|
|
602
|
+
* manifest), a missing reference means a plugin-only install that never ran
|
|
603
|
+
* `wp setup` — i.e. no agent-kit hooks are active.
|
|
604
|
+
*/
|
|
605
|
+
export function checkManagedHooksInstalled(cwd = process.cwd()) {
|
|
606
|
+
const settingsPath = join(cwd, '.claude', 'settings.json');
|
|
607
|
+
if (!tryAccess(settingsPath)) {
|
|
608
|
+
return {
|
|
609
|
+
ok: false,
|
|
610
|
+
detail: 'no .claude/settings.json — run `wp setup` to install the agent-kit hooks',
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
try {
|
|
614
|
+
const raw = readFileSync(settingsPath, 'utf-8');
|
|
615
|
+
if (!raw.includes(MANAGED_HOOK_MARKER)) {
|
|
616
|
+
return {
|
|
617
|
+
ok: false,
|
|
618
|
+
detail: 'agent-kit hooks not found in .claude/settings.json — run `wp setup`',
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
return { ok: true };
|
|
622
|
+
}
|
|
623
|
+
catch (err) {
|
|
624
|
+
return { ok: false, detail: `failed to read .claude/settings.json: ${String(err)}` };
|
|
625
|
+
}
|
|
626
|
+
}
|
|
593
627
|
export async function runHooksDoctor(opts = {}) {
|
|
594
628
|
const checks = [];
|
|
595
629
|
const isWin = platform() === 'win32';
|
|
@@ -609,6 +643,11 @@ export async function runHooksDoctor(opts = {}) {
|
|
|
609
643
|
}
|
|
610
644
|
checks.push(checkConsumerCodexHookPaths(opts.cwd));
|
|
611
645
|
checks.push({ name: 'plugin.json integrity', ...checkPluginJson() });
|
|
646
|
+
checks.push({
|
|
647
|
+
name: 'managed hooks installed (.claude/settings.json)',
|
|
648
|
+
advisory: true,
|
|
649
|
+
...checkManagedHooksInstalled(opts.cwd),
|
|
650
|
+
});
|
|
612
651
|
if (opts.skipMcp) {
|
|
613
652
|
checks.push({ name: 'MCP server liveness', ok: true, detail: 'skipped (--skip-mcp)' });
|
|
614
653
|
}
|
|
@@ -676,7 +715,7 @@ export async function runHooksDoctor(opts = {}) {
|
|
|
676
715
|
}
|
|
677
716
|
}
|
|
678
717
|
}
|
|
679
|
-
const nonMcpChecks = checks.filter((c) => !c.name.startsWith('MCP '));
|
|
718
|
+
const nonMcpChecks = checks.filter((c) => !c.name.startsWith('MCP ') && !c.advisory);
|
|
680
719
|
const overallOk = nonMcpChecks.every((c) => c.ok);
|
|
681
720
|
return { ok: overallOk, checks };
|
|
682
721
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpresso/agent-kit",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -710,10 +710,10 @@
|
|
|
710
710
|
"@stryker-mutator/typescript-checker": "^9.6.1",
|
|
711
711
|
"@playwright/test": "^1.55.0",
|
|
712
712
|
"wrangler": "^4.50.0",
|
|
713
|
-
"@webpresso/agent-kit-runtime-darwin-arm64": "0.26.
|
|
714
|
-
"@webpresso/agent-kit-runtime-darwin-x64": "0.26.
|
|
715
|
-
"@webpresso/agent-kit-runtime-linux-x64": "0.26.
|
|
716
|
-
"@webpresso/agent-kit-runtime-linux-arm64": "0.26.
|
|
717
|
-
"@webpresso/agent-kit-runtime-windows-x64": "0.26.
|
|
713
|
+
"@webpresso/agent-kit-runtime-darwin-arm64": "0.26.2",
|
|
714
|
+
"@webpresso/agent-kit-runtime-darwin-x64": "0.26.2",
|
|
715
|
+
"@webpresso/agent-kit-runtime-linux-x64": "0.26.2",
|
|
716
|
+
"@webpresso/agent-kit-runtime-linux-arm64": "0.26.2",
|
|
717
|
+
"@webpresso/agent-kit-runtime-windows-x64": "0.26.2"
|
|
718
718
|
}
|
|
719
719
|
}
|