@modootoday/pmcp 0.25.0 → 0.26.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/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/dist/{affected-IPFJM2KD.js → affected-4FILH743.js} +174 -77
- package/dist/{apply-6XLLYLJT.js → apply-HJUCYQDQ.js} +17 -15
- package/dist/{broadcast-34CEG2NQ.js → broadcast-U7ZYOJWE.js} +4 -4
- package/dist/{chunk-BG6TONJO.js → chunk-2GL5L2G5.js} +2 -2
- package/dist/{chunk-PGZZI42O.js → chunk-2JUHFM4V.js} +2 -2
- package/dist/{chunk-UKR64U7J.js → chunk-374AZ4J4.js} +2 -2
- package/dist/{chunk-ISWR2XIU.js → chunk-3JOFDNL4.js} +2 -2
- package/dist/{chunk-2TXVOHRS.js → chunk-3KISMGVP.js} +4 -4
- package/dist/{chunk-SRSKCFFS.js → chunk-6XE3WW7S.js} +3 -3
- package/dist/{chunk-5MUD7FHP.js → chunk-7FHOSWNQ.js} +2 -2
- package/dist/{chunk-QYHM6554.js → chunk-7PBWLYCO.js} +3 -3
- package/dist/{chunk-PECS47OL.js → chunk-C7Y2MBCN.js} +3 -3
- package/dist/chunk-D7IDT7OA.js +21 -0
- package/dist/chunk-E272CFPS.js +14 -0
- package/dist/chunk-FLG7VRTC.js +1 -0
- package/dist/{chunk-3P6Y2BAO.js → chunk-FXDGW2IH.js} +3 -3
- package/dist/{chunk-RF6RDJYH.js → chunk-GIL3RBRX.js} +26 -19
- package/dist/{chunk-ARXCYFFZ.js → chunk-GQRDEIQA.js} +22 -2
- package/dist/chunk-J43Z4O3G.js +7 -0
- package/dist/chunk-KLIYFD3W.js +32 -0
- package/dist/{chunk-UQHJUTDW.js → chunk-KQV2EPAP.js} +2 -2
- package/dist/{chunk-DWHM5BAY.js → chunk-LCPCRZ7N.js} +2 -2
- package/dist/{chunk-MBHI2TKQ.js → chunk-NQZMGQFG.js} +5 -5
- package/dist/{chunk-SSQ6EWNA.js → chunk-OBCBCLS2.js} +7 -7
- package/dist/{chunk-LZVHFPN6.js → chunk-OG2ESRQP.js} +5 -5
- package/dist/{chunk-NAHAESFV.js → chunk-OHCUPXU4.js} +18 -5
- package/dist/{chunk-3V37OZQH.js → chunk-PAY6HEEY.js} +2 -2
- package/dist/{chunk-DITIXBFB.js → chunk-PZ6D3WKD.js} +65 -1
- package/dist/{chunk-TJW4DP26.js → chunk-Q5BQIRM3.js} +2 -2
- package/dist/{chunk-VYQJPT27.js → chunk-S2FUWBLO.js} +18 -4
- package/dist/{chunk-OGCJO6HQ.js → chunk-TQRLWO4F.js} +2 -2
- package/dist/{chunk-EC5QLEZD.js → chunk-UVPIVSZB.js} +14 -6
- package/dist/{chunk-MHKY6TNF.js → chunk-VN34GLGJ.js} +3 -3
- package/dist/chunk-WUFNKK3U.js +71 -0
- package/dist/{chunk-TOR6SKRB.js → chunk-Y7FYCVUK.js} +508 -48
- package/dist/{chunk-C3KRMTIZ.js → chunk-YJVSN6UN.js} +2 -2
- package/dist/{chunk-EWYLWBKS.js → chunk-YKICVMF7.js} +22 -5
- package/dist/{cli-QDQYUHAP.js → cli-FVUHK2NB.js} +6 -6
- package/dist/{cli-5G2OYTIL.js → cli-ZOY2274X.js} +8 -8
- package/dist/cli.js +6 -5
- package/dist/{completion-3GVNPLZY.js → completion-ZKWGPMEK.js} +5 -4
- package/dist/{diagnostics-2W7QDQNG.js → diagnostics-IM2OPAPL.js} +7 -7
- package/dist/{doctor-3TDO5LJ5.js → doctor-VZTHEPVC.js} +31 -20
- package/dist/{entry-E62DZQJF.js → entry-Q4EI4PNO.js} +13 -13
- package/dist/{exec-mcp-4N7FLY52.js → exec-mcp-AWGUQVT2.js} +14 -12
- package/dist/{harness-E2AUZDLV.js → harness-L4C5XWKR.js} +3 -3
- package/dist/harness-launch-gate.js +5 -5
- package/dist/harness-worker.js +7 -7
- package/dist/{heavy-HZQVFI6P.js → heavy-OG3UVZNY.js} +181 -99
- package/dist/hook-body.js +548 -116
- package/dist/{hook-spec-Bd24eo2L.d.ts → hook-spec-u7hnz571.d.ts} +10 -0
- package/dist/{hooks-VAEAK2FY.js → hooks-2E6PJJQK.js} +4 -4
- package/dist/{host-4GJDGTLW.js → host-OQDBQJB2.js} +8 -8
- package/dist/{host-I2EMQ7UE.js → host-RJJGTKWA.js} +16 -14
- package/dist/{host-run-DDMKD3BU.js → host-run-PWCIXJDN.js} +6 -6
- package/dist/http.js +1 -1
- package/dist/{import-mcp-TNSAMJXI.js → import-mcp-2H2NRUCL.js} +13 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -15
- package/dist/{init-UA7MDNTZ.js → init-O2UCU2WT.js} +2 -2
- package/dist/{invoke-HW7NBPGP.js → invoke-SJ3JHRJU.js} +9 -9
- package/dist/{list-A7VQJXE5.js → list-SJVXZGKK.js} +16 -14
- package/dist/{logout-HNPLUKJY.js → logout-ROKXWR3T.js} +14 -12
- package/dist/{logs-2JEMSNSG.js → logs-J4W6GFMK.js} +4 -4
- package/dist/{mailbox-MR6TPD3P.js → mailbox-6MHH6CUA.js} +4 -4
- package/dist/{mainline-MSLW3UFD.js → mainline-SWZPKA7U.js} +13 -9
- package/dist/{mcp-6C23GX2E.js → mcp-U7MVFAB4.js} +2 -2
- package/dist/owners-MPI22SFU.js +63 -0
- package/dist/{pause-H6ZYZF7C.js → pause-3IMVYXQQ.js} +4 -4
- package/dist/project/hook-adapter.d.ts +1 -1
- package/dist/{project-BX6NCGKB.js → project-MGUYHUF7.js} +4 -4
- package/dist/{report-43SFNNCF.js → report-MWXB5XKE.js} +4 -4
- package/dist/{resume-2BWGSTCN.js → resume-7LCSV4X3.js} +4 -4
- package/dist/{run-2UVAWBAF.js → run-DDWLS6FY.js} +13 -11
- package/dist/{run-7TRWZFEZ.js → run-TBO5JO4Y.js} +4 -4
- package/dist/{serve-4XZ5SKJJ.js → serve-RBQYB3FP.js} +3 -3
- package/dist/{setup-GRWLDBVB.js → setup-7JHWLV7K.js} +6 -4
- package/dist/{smoke-6X6IXQIQ.js → smoke-GZECLXOJ.js} +3 -3
- package/dist/{start-login-AR7ITWNV.js → start-login-SOTNDUP6.js} +14 -12
- package/dist/{status-VQCMJFVE.js → status-EBIUQIGY.js} +18 -16
- package/dist/{status-2GDYLIR3.js → status-QFMN7IUG.js} +4 -4
- package/dist/{status-ZY6LDQSF.js → status-TSTOFNZU.js} +14 -12
- package/dist/stdio.js +2 -2
- package/dist/{sweep-76BUOGEI.js → sweep-BS7HVSNP.js} +4 -4
- package/dist/{test-VWGNFSH5.js → test-4PZHHWOQ.js} +25 -15
- package/dist/{tui-TUMOQBE7.js → tui-QD2LMXHV.js} +4 -4
- package/dist/{unbroadcast-HJHYUHZL.js → unbroadcast-GRGX3F6T.js} +4 -4
- package/dist/{worker-NEEPJRVV.js → worker-SPJ4HFWV.js} +11 -11
- package/dist/{worktree-sync-MUVKK2CV.js → worktree-sync-BQZD4J73.js} +5 -2
- package/docs/commands.md +12 -3
- package/docs/git-workflow.md +40 -5
- package/docs/hooks.md +69 -14
- package/docs/project-configuration.md +63 -4
- package/docs/upgrading.md +13 -0
- package/gemini-extension.json +2 -2
- package/mcp.json +1 -1
- package/package.json +5 -5
- package/plugin.json +1 -1
- package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
- package/plugins/pmcp/.mcp.json +1 -1
- package/plugins/pmcp/gemini-extension.json +2 -2
- package/plugins/pmcp/mcp.json +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/dist/chunk-7TD53M7L.js +0 -13
- package/dist/chunk-FQLCD4HU.js +0 -24
- package/dist/chunk-SMBU3QLE.js +0 -7
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YJVSN6UN.js";
|
|
4
4
|
import "./chunk-65BW7Y6O.js";
|
|
5
5
|
import "./chunk-OIKT4SYO.js";
|
|
6
6
|
import "./chunk-NQCAKDRY.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-PAY6HEEY.js";
|
|
8
8
|
import "./chunk-Z6WRFOFT.js";
|
|
9
9
|
import "./chunk-Y6NFETNG.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-KLIYFD3W.js";
|
|
11
11
|
import "./chunk-GUHOEIHP.js";
|
|
12
12
|
import "./chunk-IJBSOWHK.js";
|
|
13
13
|
import "./chunk-GJXOFDJT.js";
|
|
@@ -18,4 +18,4 @@ var run = (context) => change(context, "sweep");
|
|
|
18
18
|
export {
|
|
19
19
|
run
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=sweep-
|
|
21
|
+
//# sourceMappingURL=sweep-BS7HVSNP.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
specFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2GL5L2G5.js";
|
|
4
4
|
import {
|
|
5
5
|
sourceFor
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-E272CFPS.js";
|
|
7
7
|
import "./chunk-7CHUMF3E.js";
|
|
8
8
|
import {
|
|
9
9
|
POLICIES,
|
|
@@ -11,10 +11,11 @@ import {
|
|
|
11
11
|
afterFailure,
|
|
12
12
|
customMode,
|
|
13
13
|
customPolicy,
|
|
14
|
+
externalPolicy,
|
|
14
15
|
readScript
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-Y7FYCVUK.js";
|
|
17
|
+
import "./chunk-S2FUWBLO.js";
|
|
18
|
+
import "./chunk-FLG7VRTC.js";
|
|
18
19
|
import "./chunk-2GD7PQ7J.js";
|
|
19
20
|
import "./chunk-EATCUWGG.js";
|
|
20
21
|
import "./chunk-OFJIMBTL.js";
|
|
@@ -26,13 +27,15 @@ import {
|
|
|
26
27
|
} from "./chunk-HQOB7OQS.js";
|
|
27
28
|
import "./chunk-73AKO4UL.js";
|
|
28
29
|
import "./chunk-VQBXWMLT.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-YKICVMF7.js";
|
|
31
|
+
import "./chunk-WUFNKK3U.js";
|
|
32
|
+
import "./chunk-374AZ4J4.js";
|
|
30
33
|
import "./chunk-SDFJJJB5.js";
|
|
31
34
|
import {
|
|
32
35
|
SESSION_ID,
|
|
33
36
|
createFilesStore,
|
|
34
37
|
writeJson
|
|
35
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PAY6HEEY.js";
|
|
36
39
|
import {
|
|
37
40
|
STATE_FILES,
|
|
38
41
|
asBroadcast,
|
|
@@ -48,18 +51,18 @@ import {
|
|
|
48
51
|
NEUTRAL_EVENTS,
|
|
49
52
|
RUNTIMES,
|
|
50
53
|
RUNTIME_IDS
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-GQRDEIQA.js";
|
|
52
55
|
import "./chunk-V4NPDK6X.js";
|
|
53
56
|
import {
|
|
54
57
|
ArgumentError,
|
|
55
58
|
one
|
|
56
59
|
} from "./chunk-Y6NFETNG.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-3KISMGVP.js";
|
|
61
|
+
import "./chunk-PZ6D3WKD.js";
|
|
59
62
|
import "./chunk-N7ANFMA5.js";
|
|
60
63
|
import "./chunk-TYY5TYHF.js";
|
|
61
64
|
import "./chunk-T6C3TSTO.js";
|
|
62
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-KLIYFD3W.js";
|
|
63
66
|
import {
|
|
64
67
|
expandPath
|
|
65
68
|
} from "./chunk-GUHOEIHP.js";
|
|
@@ -68,7 +71,7 @@ import {
|
|
|
68
71
|
worktreesOf
|
|
69
72
|
} from "./chunk-IJBSOWHK.js";
|
|
70
73
|
import "./chunk-XWLMZKH2.js";
|
|
71
|
-
import "./chunk-
|
|
74
|
+
import "./chunk-J43Z4O3G.js";
|
|
72
75
|
import "./chunk-GJXOFDJT.js";
|
|
73
76
|
import "./chunk-PMJG2CXF.js";
|
|
74
77
|
import "./chunk-J6KL3COD.js";
|
|
@@ -379,7 +382,14 @@ function selectPolicies(compiled, input) {
|
|
|
379
382
|
mode: customMode(entry),
|
|
380
383
|
options: {}
|
|
381
384
|
}));
|
|
382
|
-
|
|
385
|
+
const external = (compiled.external ?? []).map((entry) => ({
|
|
386
|
+
policy: externalPolicy(entry),
|
|
387
|
+
mode: entry.mode,
|
|
388
|
+
options: {}
|
|
389
|
+
}));
|
|
390
|
+
return [...guards, ...custom, ...external].filter(
|
|
391
|
+
(selected) => listens(selected, input)
|
|
392
|
+
);
|
|
383
393
|
}
|
|
384
394
|
|
|
385
395
|
// src/hooks/dispatch/stop-loop.ts
|
|
@@ -563,7 +573,7 @@ async function simulate(input, compiled, store) {
|
|
|
563
573
|
async function run(context) {
|
|
564
574
|
const fixtures = one(context.args, "fixtures");
|
|
565
575
|
if (fixtures !== void 0)
|
|
566
|
-
return (await import("./smoke-
|
|
576
|
+
return (await import("./smoke-GZECLXOJ.js")).run(context, fixtures);
|
|
567
577
|
const runtime = one(context.args, "runtime");
|
|
568
578
|
if (!RUNTIME_IDS.includes(runtime))
|
|
569
579
|
throw new ArgumentError("--runtime must be claude or codex");
|
|
@@ -629,4 +639,4 @@ async function run(context) {
|
|
|
629
639
|
export {
|
|
630
640
|
run
|
|
631
641
|
};
|
|
632
|
-
//# sourceMappingURL=test-
|
|
642
|
+
//# sourceMappingURL=test-4PZHHWOQ.js.map
|
|
@@ -140,10 +140,10 @@ var tuiCommand = {
|
|
|
140
140
|
try {
|
|
141
141
|
let receipt;
|
|
142
142
|
if (invocation.action === "doctor") {
|
|
143
|
-
const { inspectTerminalHost } = await import("./diagnostics-
|
|
143
|
+
const { inspectTerminalHost } = await import("./diagnostics-IM2OPAPL.js");
|
|
144
144
|
receipt = inspectTerminalHost();
|
|
145
145
|
} else if (invocation.action === "start-worker") {
|
|
146
|
-
const { startWorkspaceWorker } = await import("./worker-
|
|
146
|
+
const { startWorkspaceWorker } = await import("./worker-SPJ4HFWV.js");
|
|
147
147
|
receipt = await startWorkspaceWorker(
|
|
148
148
|
{ config: invocation.startup?.config, cwd: context.cwd },
|
|
149
149
|
invocation.startup.runtime,
|
|
@@ -156,7 +156,7 @@ var tuiCommand = {
|
|
|
156
156
|
cwd: context.cwd
|
|
157
157
|
});
|
|
158
158
|
} else {
|
|
159
|
-
const { launchStartup, planStartup } = await import("./entry-
|
|
159
|
+
const { launchStartup, planStartup } = await import("./entry-Q4EI4PNO.js");
|
|
160
160
|
const request = { ...invocation.startup, cwd: context.cwd };
|
|
161
161
|
receipt = invocation.action === "plan" ? planStartup(request) : await launchStartup(
|
|
162
162
|
request,
|
|
@@ -176,4 +176,4 @@ var tuiCommand = {
|
|
|
176
176
|
export {
|
|
177
177
|
tuiCommand
|
|
178
178
|
};
|
|
179
|
-
//# sourceMappingURL=tui-
|
|
179
|
+
//# sourceMappingURL=tui-QD2LMXHV.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YJVSN6UN.js";
|
|
4
4
|
import "./chunk-65BW7Y6O.js";
|
|
5
5
|
import "./chunk-OIKT4SYO.js";
|
|
6
6
|
import "./chunk-NQCAKDRY.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-PAY6HEEY.js";
|
|
8
8
|
import "./chunk-Z6WRFOFT.js";
|
|
9
9
|
import "./chunk-Y6NFETNG.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-KLIYFD3W.js";
|
|
11
11
|
import "./chunk-GUHOEIHP.js";
|
|
12
12
|
import "./chunk-IJBSOWHK.js";
|
|
13
13
|
import "./chunk-GJXOFDJT.js";
|
|
@@ -18,4 +18,4 @@ var run = (context) => change(context, "unbroadcast");
|
|
|
18
18
|
export {
|
|
19
19
|
run
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=unbroadcast-
|
|
21
|
+
//# sourceMappingURL=unbroadcast-GRGX3F6T.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
invoke
|
|
3
|
+
} from "./chunk-OG2ESRQP.js";
|
|
1
4
|
import {
|
|
2
5
|
readStartup,
|
|
3
6
|
startupFile,
|
|
4
7
|
startupSettings
|
|
5
8
|
} from "./chunk-C3G75JH7.js";
|
|
6
|
-
import {
|
|
7
|
-
invoke
|
|
8
|
-
} from "./chunk-LZVHFPN6.js";
|
|
9
9
|
import "./chunk-DZ2MRTYT.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-FXDGW2IH.js";
|
|
11
|
+
import "./chunk-3JOFDNL4.js";
|
|
12
12
|
import {
|
|
13
13
|
locateExecutable
|
|
14
14
|
} from "./chunk-R2GPCZUX.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-LCPCRZ7N.js";
|
|
16
16
|
import "./chunk-34DECPVC.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-3KISMGVP.js";
|
|
18
|
+
import "./chunk-PZ6D3WKD.js";
|
|
19
19
|
import "./chunk-N7ANFMA5.js";
|
|
20
20
|
import "./chunk-TYY5TYHF.js";
|
|
21
21
|
import "./chunk-T6C3TSTO.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-KLIYFD3W.js";
|
|
23
23
|
import "./chunk-GUHOEIHP.js";
|
|
24
24
|
import "./chunk-IJBSOWHK.js";
|
|
25
25
|
import "./chunk-XWLMZKH2.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-J43Z4O3G.js";
|
|
27
27
|
import "./chunk-GJXOFDJT.js";
|
|
28
28
|
import "./chunk-PMJG2CXF.js";
|
|
29
29
|
import {
|
|
@@ -83,4 +83,4 @@ async function startWorkspaceWorker(request, runtime, memoryMb) {
|
|
|
83
83
|
export {
|
|
84
84
|
startWorkspaceWorker
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=worker-
|
|
86
|
+
//# sourceMappingURL=worker-SPJ4HFWV.js.map
|
|
@@ -4,10 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
installSpec,
|
|
6
6
|
syncWorktree
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S2FUWBLO.js";
|
|
8
8
|
import "./chunk-2GD7PQ7J.js";
|
|
9
9
|
import "./chunk-VQBXWMLT.js";
|
|
10
10
|
import "./chunk-23PE3HZB.js";
|
|
11
|
+
import "./chunk-KLIYFD3W.js";
|
|
12
|
+
import "./chunk-GUHOEIHP.js";
|
|
13
|
+
import "./chunk-IJBSOWHK.js";
|
|
11
14
|
|
|
12
15
|
// src/git/cli/worktree-sync.ts
|
|
13
16
|
var worktreeSync = (setup, _context, report) => {
|
|
@@ -26,4 +29,4 @@ var worktreeSync = (setup, _context, report) => {
|
|
|
26
29
|
export {
|
|
27
30
|
worktreeSync
|
|
28
31
|
};
|
|
29
|
-
//# sourceMappingURL=worktree-sync-
|
|
32
|
+
//# sourceMappingURL=worktree-sync-BQZD4J73.js.map
|
package/docs/commands.md
CHANGED
|
@@ -22,7 +22,7 @@ An unrecognised command does not fall through to a server the caller did not ask
|
|
|
22
22
|
pmcp status [--config <file>] [--json]
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Show enabled features and their TOML or auto source, projection drift, live sessions, pause, leases, unseen broadcasts, worktree ahead/behind counts, shared MCP credential presence, logged errors from the last hour, and, with a [`[budget]`](project-configuration.md#budget) table, each limit beside what it measured. Reads do not acknowledge broadcasts, refresh credentials, prune logs, fetch or move git refs. Projection uses the same check as `project --check`. Exit 0, or 4 when projection drift exists
|
|
25
|
+
Show enabled features and their TOML or auto source, projection drift, live sessions, pause, leases, unseen broadcasts, worktree ahead/behind counts, shared MCP credential presence, logged errors from the last hour, and, with a [`[budget]`](project-configuration.md#budget) table, each limit beside what it measured, and how many are over. Reads do not acknowledge broadcasts, refresh credentials, prune logs, fetch or move git refs. Projection uses the same check as `project --check`. Exit 0, or 4 when projection drift exists; 2 when there is no `pmcp.toml`. A limit over its number is reported and never changes the exit code: `project --check` is the one that judges it. Linked worktrees ahead of or behind the mainline are live state in a multi-session workspace: the summary and `data.lagging` count them, and they never change the exit code. Missing or invalid input follows the normal usage/failure exit contract. Human output is a compact summary on stdout; JSON retains the full details.
|
|
26
26
|
|
|
27
27
|
## init
|
|
28
28
|
|
|
@@ -238,7 +238,7 @@ pmcp heavy priority <id> gate --reason "blocks a land"
|
|
|
238
238
|
pmcp heavy priority <id> +2 --reason "the session waits on it"
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Run a heavy command within the host-wide budget of [`[host.lease]`](project-configuration.md#host-lease), across every session and worktree on the host. A job starts once its lane has a free slot, its weight fits what the running jobs leave of the budget, and the host is under `max_load` and `max_io` (or, past `load_grace` and with nothing leased running, under `hard_factor` times them). Waiting jobs start by lane (gate, hook, interactive, bulk), oldest first within a lane, with a line on standard error every `heartbeat`; `--lane` and `--weight` override the profile and `[host.lease] commands`. The command runs with the lease marker set, so a nested `pmcp heavy` runs at once. Everything after `--` is the command, options included. `status` prints the lock, the host readings, when the host was last settled, the holder record, each waiter with its lane, weight, position and a rough wait estimate from the log's run times, the lanes' use and the running weight against the budget, each running job against `hold_warn` and `hold_max`, the IO average the check reads, how many jobs started on `load_grace` in the last day, and the busiest processes outside the lease. With the lease disabled (`enabled = false`), the command runs at once. With `PMCP_HEAVY_DISABLE=<reason>` set to an allowed reason (`nested` inside a leased job, `operator` for the operator, or one listed in `[host.lease] skip_reasons` or `skip_always`), an ordinary command runs at once and its usage record keeps the reason; any other reason runs nothing and exits 2 with the allowed list, but a bulk job (`--lane bulk`, or a `commands` entry with `lane = "bulk"`) still queues in the bulk lane, with a line saying the skip was not honoured, unless `[host.lease] skip_always` lists the reason. `--now --reason <text>` (or `PMCP_HEAVY_NOW=<reason>`) is the operator's emergency bypass: it runs at once, logged and shown in status, and still counts its weight; from an agent session it exits 1 and names who to ask, as `promote --now` and `cancel --force` on another session's job do. Where the io controller reaches the user's scopes, each job runs in its own scope with its lane's `io.weight`. `submit` queues the command and returns a ticket at once, so the caller keeps working: a detached runner (its own session, so it outlives the caller) waits and runs it under the same rules, its output in the ticket's log and its exit code and usage record in the ticket's result. `result <
|
|
241
|
+
Run a heavy command within the host-wide budget of [`[host.lease]`](project-configuration.md#host-lease), across every session and worktree on the host. A job starts once its lane has a free slot, its weight fits what the running jobs leave of the budget, and the host is under `max_load` and `max_io` (or, past `load_grace` and with nothing leased running, under `hard_factor` times them). Waiting jobs start by lane (gate, hook, interactive, bulk), oldest first within a lane, with a line on standard error every `heartbeat`; `--lane` and `--weight` override the profile and `[host.lease] commands`. The command runs with the lease marker set, so a nested `pmcp heavy` runs at once. Everything after `--` is the command, options included. `status` prints the lock, the host readings, when the host was last settled, the holder record, each waiter with its lane, weight, position and a rough wait estimate from the log's run times, the lanes' use and the running weight against the budget, each running job against `hold_warn` and `hold_max`, the IO average the check reads, how many jobs started on `load_grace` in the last day, and the busiest processes outside the lease. With the lease disabled (`enabled = false`), the command runs at once. With `PMCP_HEAVY_DISABLE=<reason>` set to an allowed reason (`nested` inside a leased job, `operator` for the operator, or one listed in `[host.lease] skip_reasons` or `skip_always`), an ordinary command runs at once and its usage record keeps the reason; any other reason runs nothing and exits 2 with the allowed list, but a bulk job (`--lane bulk`, or a `commands` entry with `lane = "bulk"`) still queues in the bulk lane, with a line saying the skip was not honoured, unless `[host.lease] skip_always` lists the reason. `--now --reason <text>` (or `PMCP_HEAVY_NOW=<reason>`) is the operator's emergency bypass: it runs at once, logged and shown in status, and still counts its weight; from an agent session it exits 1 and names who to ask, as `promote --now` and `cancel --force` on another session's job do. Where the io controller reaches the user's scopes, each job runs in its own scope with its lane's `io.weight`. `submit` queues the command and returns a ticket at once, so the caller keeps working: a detached runner (its own session, so it outlives the caller) waits and runs it under the same rules, its output in the ticket's log and its exit code and usage record in the ticket's result. Every job keeps its stdout and stderr in its ticket, bounded by `[host.lease] job_log_bytes` (default 4 MiB, rotated once to `log.1`, so a job keeps at most twice that): a submitted job's runner writes them there, and a blocking run opens a ticket of its own and copies them there as they reach the terminal, so the command sees pipes instead of a terminal; a blocking run that fails ends with a line naming its id. `job_log_bytes = 0`, or a disabled lease, keeps nothing for blocking runs, which then write to the terminal directly. `result <id>` reads the state (queued with its position, running, done, or lost when the runner died), `--json` as data, and `result <id> --log` prints the kept output instead, the rotated part first; `--tail <n>` keeps its last n lines. `wait <ticket>` blocks until it is done, prints the log's tail and exits with the job's code (75 at `--timeout`); `cancel <ticket>` stops a queued job and, with `--force`, a running one. Tickets live under `<dir>/tickets/` and finished ones are removed after a week. Every waiting or running job has an id (a ticket's, or one made for a blocking run), shown by `status` and `queue`: `queue` lists the waiters with id, lane, position, waited and estimated time, weight, pid, session and label; `promote <id> --now --reason` starts a waiter at once as a bypass; `priority <id> <lane|+N|-N> --reason` moves it to another lane's end or N places within its lane; `cancel <id>` takes a waiter out of the queue (its run exits 130) and, with `--force`, stops a running job. The waiting process reads the change on its next poll; each change is made under the admission lock and logged as a `control` line with the uid, the session and the reason, and a waiter whose process died is removed instead of changed. `stats` lists each command signature's recorded runs with the median and 90th percentile of wall time, CPU time, peak RSS and IO and how many skipped the lease, after a line with the share of all runs that skipped it and lines counting the skip reasons and the refused ones, the most-run first; `--top <n>` keeps the first n, `--json` as data. Exit: the command's own code; 75 when nothing ran within `max_wait`, with the reason (the queue, the session's cap, a shell wrapper's hold, a host past `hard_factor`); 2 for a missing `--`, an unknown profile or lane, a bad weight, `--now` without a reason, or a skip reason that is not allowed; 1 for an operator verb outside the operator's terminal.
|
|
242
242
|
|
|
243
243
|
## wait
|
|
244
244
|
|
|
@@ -250,6 +250,15 @@ pmcp wait --until no-process:"vitest run"
|
|
|
250
250
|
|
|
251
251
|
Sleep until every condition holds: `--pid` until that process has exited, `--until exists:<path>`, `gone:<path>`, `load-below:<n>` (1-minute load average) or `no-process:<text>` (no command line contains the text). It never matches itself or the shells that started it, which a loop around `pgrep -f` does, and it sleeps between checks (`--interval`, default 5 s) instead of spinning. Exit 0 once met, 75 after `--timeout` (default 3600 s), 2 for an unreadable condition.
|
|
252
252
|
|
|
253
|
+
## owners
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
pmcp owners services/auth/src/login.ts
|
|
257
|
+
pmcp owners docs --json
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Name who looks after each path, from [`[[owners]]`](project-configuration.md#owners): one line per matching entry, `<path> belongs to <owner>: <note>`, or `<path>: no owner`. Paths are taken from the working directory and matched relative to the directory holding `pmcp.toml`. `--json` gives `paths`, each with `path` and `owners` (owner, note, mode). It only reads. Exit 0, or 2 without a path or a `pmcp.toml`, or with an invalid `[[owners]]`.
|
|
261
|
+
|
|
253
262
|
## completion
|
|
254
263
|
|
|
255
264
|
```sh
|
|
@@ -392,7 +401,7 @@ Every command uses one table, so a script can branch on the code alone:
|
|
|
392
401
|
| `1` | it ran and failed, or found a problem | no skills under those roots, a partial index, no SQLite to store vectors in, `validate` errors, a `doctor` FAIL, a declined or failed install, a refused delivery, a failed gate or fetch |
|
|
393
402
|
| `2` | usage error: it could not run as asked | an unknown command, subcommand or option, a missing value, no `pmcp.toml` or a missing `[git]` table, `git sync` in the wrong checkout |
|
|
394
403
|
| `3` | an optional dependency is missing | `index` without `@huggingface/transformers` |
|
|
395
|
-
| `4` | a check ran and found differences | `status` drift
|
|
404
|
+
| `4` | a check ran and found differences | `status` projection drift, `project --check` drift or an exceeded budget, stale or undeclared outputs, a `hooks test --fixtures` or `--smoke` finding |
|
|
396
405
|
| `75` | the host stayed busy, so nothing ran; retry later | `heavy` past `max_wait`, a `git deliver` gate whose test stage never got the host lease, `wait` past `--timeout` |
|
|
397
406
|
|
|
398
407
|
1 says the project is not what you expected; 2 says the command line or the setup is wrong, so retrying the same command will not help; 3 says the machine is missing something optional and the server still works without it; 4 says a check did its job and found something to fix, usually with `pmcp project`. A command that runs another command, such as `heavy`, exits with that command's code. Before 0.23.0, drift exited 2 like a usage error; see [Upgrading](upgrading.md).
|
package/docs/git-workflow.md
CHANGED
|
@@ -61,10 +61,16 @@ session's lease, or a git operation in progress holds the desk where it is
|
|
|
61
61
|
|
|
62
62
|
Both kinds check out a submodule the move adds, such as a directory split into its
|
|
63
63
|
own repository. When that path still holds files from before and git ignores all of
|
|
64
|
-
them (install or build output), they are moved
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
line names
|
|
64
|
+
them (install or build output), they are moved out of the checkout to
|
|
65
|
+
`$XDG_STATE_HOME/pmcp/displaced/<project id>/<UTC time>/<path>` (`~/.local/state`
|
|
66
|
+
without `XDG_STATE_HOME`; the project id is the one the state directory uses, shared
|
|
67
|
+
by every worktree of the repository), never deleted, and the line names that
|
|
68
|
+
directory and says to run the install again. Nothing under the checkout or its git
|
|
69
|
+
dir holds them, so a scan of the tree, `git clean` or a new worktree never meets
|
|
70
|
+
them; remove a directory there once the install has run. A file git does not ignore
|
|
71
|
+
leaves the submodule unchecked, and the line names the path. Releases up to 0.25.0
|
|
72
|
+
kept them under the git dir in `pmcp-displaced/`; pmcp no longer writes there, and
|
|
73
|
+
what is there can be moved or removed by hand.
|
|
68
74
|
|
|
69
75
|
`[git.mainline.gate]`: `command` (argv; no gate when missing), `tree` (the
|
|
70
76
|
gate's worktree, default `<state dir>/gate/tree`; a relative path is relative to
|
|
@@ -124,7 +130,9 @@ from the mainline or a branch tracking it, `--all`, `--mirror`, wildcard
|
|
|
124
130
|
refspecs, and a push to a URL. A dry run, another branch, a tag, another
|
|
125
131
|
remote and a submodule's own push pass), `during_pause` (`"refuse"` default or `"allow"`),
|
|
126
132
|
`lease_wait_seconds` (default `3600`), `notify` (argv run after a
|
|
127
|
-
delivery), `gate` and `push_env`.
|
|
133
|
+
delivery), `gate` and `push_env`. When the project declares
|
|
134
|
+
[`[[owners]]`](project-configuration.md#owners), delivery first prints one line
|
|
135
|
+
for each owner whose paths the commits touch; it never stops the delivery.
|
|
128
136
|
|
|
129
137
|
A commit is already on the mainline when `git cherry` finds the same patch there,
|
|
130
138
|
or when it only moves submodule pins, each to a commit that the mainline's pin for
|
|
@@ -244,6 +252,33 @@ trailing `*` matches a prefix) every member builds with: a change to one selects
|
|
|
244
252
|
root field outside the dependency fields and `inert_root_fields` (default `scripts`,
|
|
245
253
|
`description`, `version`) or a lockfile that does not parse.
|
|
246
254
|
|
|
255
|
+
A change to the root `workspaces` globs does not select `ALL` by itself: the members are listed at
|
|
256
|
+
both revisions, the members the globs added are selected, the ones they dropped are reported
|
|
257
|
+
in `--json` as `workspaceMembers` (`added`, `removed`; a dropped member is no longer one, so it
|
|
258
|
+
is not run), and `on_member_change` is selected when either list is not empty. A `workspaces`
|
|
259
|
+
value that is not a list of globs (or `{packages}` holding one) at either revision, or another
|
|
260
|
+
non-inert root field changing with it, still selects `ALL`. Listing `workspaces` in
|
|
261
|
+
`inert_root_fields` ignores the field entirely, as before, with no member comparison.
|
|
262
|
+
|
|
263
|
+
A dependency of the root `package.json` itself (a CLI the root's scripts or git hooks run)
|
|
264
|
+
belongs to no member, so without more the lockfile adapter selects only the members whose own
|
|
265
|
+
resolution of it moved. `[git.affected.root_dependencies]` (it needs `[git.affected.lockfile]`)
|
|
266
|
+
names the members that use each one: a key is a package name, or a prefix ending in `*`, and
|
|
267
|
+
its value the member directories, an empty list meaning no member is affected.
|
|
268
|
+
|
|
269
|
+
```toml
|
|
270
|
+
[git.affected.root_dependencies]
|
|
271
|
+
"@modootoday/pmcp" = ["tools/husky-hook-runner", "tools/pmcp-verify"]
|
|
272
|
+
"eslint-*" = []
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Once the table is declared, every root dependency whose range changed, or whose resolved
|
|
276
|
+
package (or anything below it) moved in the lockfile, must be mapped: the mapped members are
|
|
277
|
+
selected beside the members whose resolution moved (and their consumers with
|
|
278
|
+
`consumers = true`), and one changed root dependency the table does not map selects `ALL`,
|
|
279
|
+
naming it. `--json` lists the mappings that applied in `rootDependencies`
|
|
280
|
+
(`name`, the `key` that matched, `members`). A name in `toolchain` still selects `ALL` first.
|
|
281
|
+
|
|
247
282
|
Consumer edges are a member's `dependencies`, `peerDependencies` and `optionalDependencies`, the
|
|
248
283
|
`devDependencies` its production source under `src/` imports (all of them when its
|
|
249
284
|
`tsconfig.json` `exclude` names no tests), the member whose tsconfig preset it extends, and
|
package/docs/hooks.md
CHANGED
|
@@ -75,20 +75,21 @@ an `observe` or `warn` guard found something in but let through is written at in
|
|
|
75
75
|
instead, so `pmcp hooks report --switch-check <guard>` counts a week of observe at the
|
|
76
76
|
default log level.
|
|
77
77
|
|
|
78
|
-
| Table | Default mode | Modes | Refuses
|
|
79
|
-
| ------------------------------------------ | ------------ | ------------------------------------- |
|
|
80
|
-
| `[hooks.guards.shell.in_place_edit]` | deny | deny, ask, warn, observe, off | `sed -i`, `perl -i`, `awk -i inplace`: edits without a diff.
|
|
81
|
-
| `[hooks.guards.shell.heredoc]` | deny | deny, ask, warn, observe, off | Heredocs and here-strings, whose body the shell expands silently.
|
|
82
|
-
| `[hooks.guards.shell.stdin_interpreter]` | ask | deny, ask, warn, observe, off | An interpreter reading its program from stdin (`python3 -`, `cat x.py \| python3`).
|
|
83
|
-
| `[hooks.guards.shell.compose_teardown]` | deny | deny, ask, warn, observe, off | `docker compose down`, and `stop`, `rm` or `kill` with no service named: they hit every service.
|
|
84
|
-
| `[hooks.guards.shell.secret_exfiltration]` | graded | deny, ask, warn, observe, off, graded | Reading a credential asks; sending one over the network, or changing a live one, denies.
|
|
85
|
-
| `[hooks.guards.shell.host_approval]` | deny | deny, ask, warn, observe, off | `host approve`, and commands or edits touching the host approvals directory. On by itself when `[host]` is declared.
|
|
86
|
-
| `[hooks.guards.shell.runaway_regex]` | deny | deny, ask, warn, observe, off | A grep pattern that can hold a core for minutes: a repetition count over the threshold (`\{0,2500\}`, `{0,2500}` with `-E` or `-P`), or a `-P` group quantified inside a quantifier such as `(a+)+`. ripgrep (`rg`) matches in linear time and is never refused.
|
|
87
|
-
| `[hooks.guards.
|
|
88
|
-
| `[hooks.guards.git.
|
|
89
|
-
| `[hooks.guards.git.
|
|
90
|
-
| `[hooks.guards.git.
|
|
91
|
-
| `[hooks.guards.
|
|
78
|
+
| Table | Default mode | Modes | Refuses |
|
|
79
|
+
| ------------------------------------------ | ------------ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
+
| `[hooks.guards.shell.in_place_edit]` | deny | deny, ask, warn, observe, off | `sed -i`, `perl -i`, `awk -i inplace`: edits without a diff. |
|
|
81
|
+
| `[hooks.guards.shell.heredoc]` | deny | deny, ask, warn, observe, off | Heredocs and here-strings, whose body the shell expands silently. |
|
|
82
|
+
| `[hooks.guards.shell.stdin_interpreter]` | ask | deny, ask, warn, observe, off | An interpreter reading its program from stdin (`python3 -`, `cat x.py \| python3`). |
|
|
83
|
+
| `[hooks.guards.shell.compose_teardown]` | deny | deny, ask, warn, observe, off | `docker compose down`, and `stop`, `rm` or `kill` with no service named: they hit every service. |
|
|
84
|
+
| `[hooks.guards.shell.secret_exfiltration]` | graded | deny, ask, warn, observe, off, graded | Reading a credential asks; sending one over the network, or changing a live one, denies. |
|
|
85
|
+
| `[hooks.guards.shell.host_approval]` | deny | deny, ask, warn, observe, off | `host approve`, and commands or edits touching the host approvals directory. On by itself when `[host]` is declared. |
|
|
86
|
+
| `[hooks.guards.shell.runaway_regex]` | deny | deny, ask, warn, observe, off | A grep pattern that can hold a core for minutes: a repetition count over the threshold (`\{0,2500\}`, `{0,2500}` with `-E` or `-P`), or a `-P` group quantified inside a quantifier such as `(a+)+`. ripgrep (`rg`) matches in linear time and is never refused. |
|
|
87
|
+
| `[hooks.guards.shell.self_matching_wait]` | observe | deny, ask, warn, observe, off | A `while`, `until` or `for` loop that polls with `pgrep -f`, `pkill -f`, `pidwait -f` or `ps \| grep` (also inside `$( )` or `bash -c`): the pattern matches the shell running the loop, whose command line holds it, so the wait may never end. `ps -p`, `ps -C` and `pgrep` without `-f` pass. The reason points to `pmcp wait --pid`, `pmcp wait --until no-process:<text>` and `pmcp heavy wait <ticket>`. Starts in observe; set `mode = "deny"` once a week of hits is measured. |
|
|
88
|
+
| `[hooks.guards.git.push_without_verify]` | deny | deny, ask, warn, observe, off | `git push --no-verify`. |
|
|
89
|
+
| `[hooks.guards.git.forced_branch_move]` | deny | deny, ask, warn, observe, off | Forcing a branch that is checked out in another working tree. |
|
|
90
|
+
| `[hooks.guards.git.gate_bypass_env]` | deny | deny, ask, warn, observe, off | Setting a named gate-bypass variable where it takes effect, and optionally `--no-verify` on any git command. |
|
|
91
|
+
| `[hooks.guards.git.stage_all]` | deny | deny, ask, warn, observe, off | `git add -A`, `git add .`, `git commit -a` and similar; stage explicit paths. |
|
|
92
|
+
| `[hooks.guards.pmcp.operator_verbs]` | deny | deny, ask, warn, observe, off | The operator verbs: `pmcp sessions pause` and `resume`, `pmcp heavy --now` and `promote --now`, `pmcp heavy cancel --force`, `pmcp git deliver --during-pause`, and setting `PMCP_HEAVY_NOW`, `PMCP_OPERATOR_TOKEN` or the lease skip `PMCP_HEAVY_DISABLE=operator`. On by itself with any session feature. |
|
|
92
93
|
|
|
93
94
|
Options:
|
|
94
95
|
|
|
@@ -214,6 +215,60 @@ A command that needs to end a session's turn with a check of its own (tests, a
|
|
|
214
215
|
linter, a generated-file check) is a custom guard with `on = "stop"` and
|
|
215
216
|
`mode = "warn"`.
|
|
216
217
|
|
|
218
|
+
## `[[hooks.guards.external]]`
|
|
219
|
+
|
|
220
|
+
A checker the project already has (a document linter, a size or schema check)
|
|
221
|
+
judges each file an agent edits whose path a glob matches, and its own JSON
|
|
222
|
+
answer becomes the guard's verdict. Unlike a custom guard it needs no adapter
|
|
223
|
+
script and speaks no pmcp protocol: pmcp passes the path (and, with `stdin`,
|
|
224
|
+
the new text) and reads the checker's exit code and `items`. It runs in the hook
|
|
225
|
+
bundle for every `[hooks] targets` runtime.
|
|
226
|
+
|
|
227
|
+
| Key | Type | Default | Meaning |
|
|
228
|
+
| ------------ | --------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
229
|
+
| `name` | string | required | `^[a-z0-9][a-z0-9-]*$`, unique among external guards; the guard id is `external.<name>`. |
|
|
230
|
+
| `paths` | glob list | required | Project-relative globs (`*` within a segment, `**` across segments); an edited file that matches one is checked. Other edits do not run it. |
|
|
231
|
+
| `command` | argv list | required | The checker. Each `{path}` is replaced by the edited file's project-relative path; with no `{path}`, the path is added as the last argument. |
|
|
232
|
+
| `timeout_ms` | integer | `15000` | 100 to 60000, for all the files of one edit together. |
|
|
233
|
+
| `mode` | string | `"observe"` | `deny`, `warn`, `observe` or `off`. A new external guard starts in `observe`; move it to `deny` once its hits are measured. |
|
|
234
|
+
| `stdin` | boolean | `false` | Send the file's new text on stdin, so the edit is checked before it is written (see below). |
|
|
235
|
+
| `on_error` | string | `"allow"` | What a checker that cannot answer means in `deny` mode: `allow` lets the edit through with a log line, `deny` refuses it. |
|
|
236
|
+
|
|
237
|
+
When it runs. With `stdin = true`, before the write, when the runtime's payload
|
|
238
|
+
says what the edit writes: the whole new text, or replacements pmcp applies to
|
|
239
|
+
the file as it stands (Claude Code's `Write`, `Edit` and `MultiEdit`). A `deny`
|
|
240
|
+
then refuses the edit before anything is written. When the payload cannot say
|
|
241
|
+
(another runtime's patch, a replacement whose old text is not in the file), the
|
|
242
|
+
check runs after the write instead, with the file's text from disk on stdin, and
|
|
243
|
+
a `deny` reaches the agent as feedback on the edit. Without `stdin`, it always
|
|
244
|
+
runs after the write and the checker reads the file itself.
|
|
245
|
+
|
|
246
|
+
The command runs in the project root with only `PATH`, `HOME` and `LANG`, once
|
|
247
|
+
per matched file. Exit 0 passes. Exit 1 is a finding, and stdout must then be a
|
|
248
|
+
JSON object with a non-empty `items` array: each item a string, or an object with
|
|
249
|
+
`message` and optionally `path`, `line` and `rule`, shown as
|
|
250
|
+
`path:line: rule: message`, up to 20 lines. Anything else (exit 2 or another
|
|
251
|
+
code, exit 1 without such JSON, a checker that cannot start or runs past
|
|
252
|
+
`timeout_ms`) is a checker error: logged at warn, said to a `warn` session once
|
|
253
|
+
per session, and in `deny` mode refused only with `on_error = "deny"`.
|
|
254
|
+
|
|
255
|
+
`deny` refuses a finding, `warn` gives it to the agent as context, and `observe`
|
|
256
|
+
logs it for `pmcp hooks report`. The numbers a size checker judges can live in
|
|
257
|
+
[`[budgets]`](project-configuration.md#budgets), so a project keeps one place for
|
|
258
|
+
them:
|
|
259
|
+
|
|
260
|
+
```toml
|
|
261
|
+
[budgets]
|
|
262
|
+
"**/AGENTS.md" = { bytes = 4096 }
|
|
263
|
+
|
|
264
|
+
[[hooks.guards.external]]
|
|
265
|
+
name = "doc-budget"
|
|
266
|
+
paths = ["**/AGENTS.md", ".agents/rules/*.md"]
|
|
267
|
+
command = ["node_modules/.bin/doc-check", "--stdin-path", "{path}", "--json"]
|
|
268
|
+
stdin = true
|
|
269
|
+
mode = "warn"
|
|
270
|
+
```
|
|
271
|
+
|
|
217
272
|
## `[hooks.report]`
|
|
218
273
|
|
|
219
274
|
Read by [`pmcp hooks report`](commands.md#hooks) alone; it changes nothing in the
|
|
@@ -58,8 +58,10 @@ ignored.
|
|
|
58
58
|
| `[marketplaces.<name>]` | [Marketplaces](#marketplaces) |
|
|
59
59
|
| `[targets]`, `[skills.<name>]`, `[agents.<name>.<tool>]`, `[rules.packages]` | [Native files for each agent tool](#native-files-for-each-agent-tool) |
|
|
60
60
|
| `[mcp.<alias>]` | [Unified project MCP configuration](#unified-project-mcp-configuration) |
|
|
61
|
-
| `[hooks]`, `[hooks.guards.*]`, `[[hooks.guards.custom]]`, `[hooks.checks.*]`, `[hooks.failure]`, `[hooks.report]`, `[hooks.test]`
|
|
61
|
+
| `[hooks]`, `[hooks.guards.*]`, `[[hooks.guards.custom]]`, `[[hooks.guards.external]]`, `[hooks.checks.*]`, `[hooks.failure]`, `[hooks.report]`, `[hooks.test]` | [Hooks](hooks.md) |
|
|
62
62
|
| `[budget]` | [Budget](#budget) |
|
|
63
|
+
| `[budgets]` | [Budgets](#budgets) |
|
|
64
|
+
| `[[owners]]` | [Owners](#owners) |
|
|
63
65
|
| `[[hooks.shell]]`, `[[hooks.edit]]` | [Deprecated shell guards](hooks.md#deprecated-shell-guards) |
|
|
64
66
|
| `[sessions]`, `[sessions.registry]`, `[sessions.pause]`, `[sessions.broadcast]`, `[sessions.mailbox]`, `[sessions.leases.<name>]`, `[sessions.roles.<name>]`, `[sessions.operator]` | [Sessions](#sessions) |
|
|
65
67
|
| `[git]`, `[git.shared_checkout]`, `[git.worktrees]`, `[git.worktrees.sync]`, `[git.mainline]`, `[git.mainline.gate]`, `[git.mainline.deliver]`, `[git.mainline.sync]`, `[git.submodules]` | [Git workflow](git-workflow.md) |
|
|
@@ -326,6 +328,7 @@ load_grace = 600
|
|
|
326
328
|
| `io.max.<lane>` | string | none | An `io.max` line for the lane's scopes, such as `"259:0 wbps=50000000"`; the device is this host's to name. |
|
|
327
329
|
| `settle_window` | seconds | `60` | After a leased job ends, its own leftover IO may hold the queue only this long: then a waiter starts on a moderately busy host (below `hard_factor`). `0` turns it off. |
|
|
328
330
|
| `usage_cap` | bytes | `5000000` | `usage.jsonl` (one record per run) moves to `usage.jsonl.1` past this size. |
|
|
331
|
+
| `job_log_bytes` | bytes | `4194304` | Each job's stdout and stderr are kept in its ticket (`<dir>/tickets/<id>/log`), moving to `log.1` past this size; `pmcp heavy result <id> --log` prints them. `0` keeps nothing for blocking runs, which then write to the terminal directly; a submitted job always keeps its output. |
|
|
329
332
|
|
|
330
333
|
Lanes, in the order a short budget goes to them: `gate` (a land's gate),
|
|
331
334
|
`hook` (commit-hook work, a short slot that skips the host wait unless the host
|
|
@@ -770,6 +773,31 @@ are still written, so `pmcp sessions status`, the session list and the
|
|
|
770
773
|
Claude Code session panes read broadcasts as before. `unbroadcast` withdraws those
|
|
771
774
|
messages too.
|
|
772
775
|
|
|
776
|
+
## Owners
|
|
777
|
+
|
|
778
|
+
`[[owners]]` says who looks after a path, so an agent that edits or delivers it
|
|
779
|
+
is told whom to tell. It only informs and never refuses.
|
|
780
|
+
|
|
781
|
+
| Key | Type | Default | Meaning |
|
|
782
|
+
| ------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
|
|
783
|
+
| `paths` | glob list | required | Globs relative to the directory holding `pmcp.toml`, as in `[budget] forbid_paths`; a directory covers what is below it. |
|
|
784
|
+
| `owner` | string | required | The person, team or session that looks after them. |
|
|
785
|
+
| `note` | string | none | What to do, such as whom to ask first. |
|
|
786
|
+
| `mode` | string | `"warn"` | `warn` tells the agent; `observe` only logs that the path was edited. |
|
|
787
|
+
|
|
788
|
+
With `warn`, an agent that edits a matching file gets one line of context after
|
|
789
|
+
the edit, `pmcp owners: <path> belongs to <owner>: <note>`, once per owner per
|
|
790
|
+
session; `pmcp git deliver` prints the same line, with how many more delivered
|
|
791
|
+
paths matched, for each owner its commits touch. Declaring `[[owners]]` projects
|
|
792
|
+
the hook bundle. [`pmcp owners <path>`](commands.md#owners) answers for any path.
|
|
793
|
+
|
|
794
|
+
```toml
|
|
795
|
+
[[owners]]
|
|
796
|
+
paths = ["services/auth", "services/billing"]
|
|
797
|
+
owner = "hub team"
|
|
798
|
+
note = "tell them before you land a change here"
|
|
799
|
+
```
|
|
800
|
+
|
|
773
801
|
## Git workflow
|
|
774
802
|
|
|
775
803
|
Worktrees, delivery to the mainline and main checkout sync: [Git workflow](git-workflow.md).
|
|
@@ -778,9 +806,11 @@ Worktrees, delivery to the mainline and main checkout sync: [Git workflow](git-w
|
|
|
778
806
|
|
|
779
807
|
`[budget]` sets limits on what every agent session loads and on paths the
|
|
780
808
|
project keeps out of its tree. `pmcp project --check` exits 4 when one is
|
|
781
|
-
exceeded, naming each, and `pmcp status`
|
|
782
|
-
limits (its JSON gains `budget: {rows, problems}
|
|
783
|
-
|
|
809
|
+
exceeded, naming each, and `pmcp status` reports the measurements beside the
|
|
810
|
+
limits (its JSON gains `budget: {rows, problems}`) without judging them: an
|
|
811
|
+
exceeded limit is not drift and leaves its exit code alone, so `project --check`
|
|
812
|
+
stays the one judge. Every key is optional; nothing is checked without the
|
|
813
|
+
table.
|
|
784
814
|
|
|
785
815
|
| Key | Type | Meaning |
|
|
786
816
|
| --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -799,6 +829,27 @@ skills_max = 40
|
|
|
799
829
|
forbid_paths = [".spec/**", "docs/adr"]
|
|
800
830
|
```
|
|
801
831
|
|
|
832
|
+
A project whose document limits another checker judges leaves those keys out of
|
|
833
|
+
`[budget]` and keeps the numbers in `[budgets]` instead.
|
|
834
|
+
|
|
835
|
+
## Budgets
|
|
836
|
+
|
|
837
|
+
`[budgets]` holds byte and line limits per path glob, so the numbers live in one
|
|
838
|
+
place while another tool judges them. Each key is a project-relative glob, as in
|
|
839
|
+
`forbid_paths`, and each value an inline table with `bytes`, `lines` or both
|
|
840
|
+
(whole numbers from 1); any other key, or an entry with neither, is a
|
|
841
|
+
configuration error. pmcp validates the table and judges none of it: neither
|
|
842
|
+
`project --check` nor `status` measures it. A checker reads it from `pmcp.toml`
|
|
843
|
+
at the TOML path `budgets` (how overlapping globs combine is the checker's), and
|
|
844
|
+
an [external guard](hooks.md#hooksguardsexternal) can run that checker on every
|
|
845
|
+
edit of a matching file.
|
|
846
|
+
|
|
847
|
+
```toml
|
|
848
|
+
[budgets]
|
|
849
|
+
"**/AGENTS.md" = { bytes = 4096 }
|
|
850
|
+
"AGENTS.md" = { bytes = 12288, lines = 200 }
|
|
851
|
+
```
|
|
852
|
+
|
|
802
853
|
## Logging
|
|
803
854
|
|
|
804
855
|
| `[logging]` key | Type | Default | Allowed |
|
|
@@ -876,6 +927,9 @@ publish = ["deploy", "secret put", "secret delete"]
|
|
|
876
927
|
[hooks.guards.shell.runaway_regex]
|
|
877
928
|
threshold = 255
|
|
878
929
|
|
|
930
|
+
[hooks.guards.shell.self_matching_wait]
|
|
931
|
+
mode = "deny"
|
|
932
|
+
|
|
879
933
|
[hooks.guards.git.push_without_verify]
|
|
880
934
|
|
|
881
935
|
[hooks.guards.git.forced_branch_move]
|
|
@@ -897,6 +951,11 @@ command = ["node", "{validator}"]
|
|
|
897
951
|
|
|
898
952
|
[hooks.checks.on_stop]
|
|
899
953
|
|
|
954
|
+
[[owners]]
|
|
955
|
+
paths = ["services/auth"]
|
|
956
|
+
owner = "hub team"
|
|
957
|
+
note = "tell them before you land a change here"
|
|
958
|
+
|
|
900
959
|
[sessions]
|
|
901
960
|
state_dir = ".pmcp-state"
|
|
902
961
|
|