@modootoday/pmcp 0.25.0 → 0.26.1

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 (111) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.mcp.json +1 -1
  5. package/dist/{affected-IPFJM2KD.js → affected-4FILH743.js} +174 -77
  6. package/dist/{apply-6XLLYLJT.js → apply-7HWNHSQB.js} +17 -15
  7. package/dist/{broadcast-34CEG2NQ.js → broadcast-U7ZYOJWE.js} +4 -4
  8. package/dist/{chunk-2TXVOHRS.js → chunk-2VL3C52Y.js} +4 -4
  9. package/dist/{chunk-UKR64U7J.js → chunk-374AZ4J4.js} +2 -2
  10. package/dist/{chunk-ISWR2XIU.js → chunk-3T7CJS4A.js} +2 -2
  11. package/dist/{chunk-PGZZI42O.js → chunk-5ZP3ABPI.js} +2 -2
  12. package/dist/{chunk-SSQ6EWNA.js → chunk-A7MF7RMO.js} +7 -7
  13. package/dist/{chunk-3P6Y2BAO.js → chunk-BSG74PTY.js} +3 -3
  14. package/dist/{chunk-SRSKCFFS.js → chunk-CJD2HFXF.js} +3 -3
  15. package/dist/chunk-D7IDT7OA.js +21 -0
  16. package/dist/chunk-E272CFPS.js +14 -0
  17. package/dist/{chunk-LZVHFPN6.js → chunk-E7BPELYH.js} +5 -5
  18. package/dist/chunk-EIBKHS74.js +7 -0
  19. package/dist/chunk-FLG7VRTC.js +1 -0
  20. package/dist/{chunk-BG6TONJO.js → chunk-GIK4TROM.js} +2 -2
  21. package/dist/{chunk-ARXCYFFZ.js → chunk-GQRDEIQA.js} +22 -2
  22. package/dist/{chunk-UQHJUTDW.js → chunk-GYL2C2Y5.js} +2 -2
  23. package/dist/{chunk-TOR6SKRB.js → chunk-JDVDA5HW.js} +508 -48
  24. package/dist/chunk-KLIYFD3W.js +32 -0
  25. package/dist/{chunk-5MUD7FHP.js → chunk-KWEW5EBE.js} +2 -2
  26. package/dist/{chunk-PECS47OL.js → chunk-M2XABD33.js} +3 -3
  27. package/dist/{chunk-MBHI2TKQ.js → chunk-MFQAQ4IJ.js} +5 -5
  28. package/dist/{chunk-NAHAESFV.js → chunk-OHCUPXU4.js} +18 -5
  29. package/dist/{chunk-3V37OZQH.js → chunk-PAY6HEEY.js} +2 -2
  30. package/dist/{chunk-DITIXBFB.js → chunk-PZ6D3WKD.js} +65 -1
  31. package/dist/{chunk-QYHM6554.js → chunk-RGTWJWQ7.js} +3 -3
  32. package/dist/{chunk-VYQJPT27.js → chunk-S2FUWBLO.js} +18 -4
  33. package/dist/{chunk-DWHM5BAY.js → chunk-T52AGUO7.js} +2 -2
  34. package/dist/{chunk-OGCJO6HQ.js → chunk-TQRLWO4F.js} +2 -2
  35. package/dist/{chunk-EC5QLEZD.js → chunk-UHKHXS3E.js} +14 -6
  36. package/dist/{chunk-MHKY6TNF.js → chunk-VN34GLGJ.js} +3 -3
  37. package/dist/chunk-WUFNKK3U.js +71 -0
  38. package/dist/chunk-X6W7JIED.js +25 -0
  39. package/dist/{chunk-RF6RDJYH.js → chunk-XPLT6DJC.js} +26 -19
  40. package/dist/{chunk-C3KRMTIZ.js → chunk-YJVSN6UN.js} +2 -2
  41. package/dist/{chunk-EWYLWBKS.js → chunk-YKICVMF7.js} +22 -5
  42. package/dist/{chunk-TJW4DP26.js → chunk-ZT75ACJ2.js} +2 -2
  43. package/dist/{cli-QDQYUHAP.js → cli-FVUHK2NB.js} +6 -6
  44. package/dist/{cli-5G2OYTIL.js → cli-ZOY2274X.js} +8 -8
  45. package/dist/cli.js +9 -14
  46. package/dist/{completion-3GVNPLZY.js → completion-O3KRUSJG.js} +5 -4
  47. package/dist/{diagnostics-2W7QDQNG.js → diagnostics-PB5TKIAL.js} +7 -7
  48. package/dist/{doctor-3TDO5LJ5.js → doctor-JVWINJT5.js} +31 -20
  49. package/dist/{entry-E62DZQJF.js → entry-CY74PLN3.js} +13 -13
  50. package/dist/{exec-mcp-4N7FLY52.js → exec-mcp-HAKUGQZM.js} +14 -12
  51. package/dist/{harness-E2AUZDLV.js → harness-N234LNM7.js} +3 -3
  52. package/dist/harness-launch-gate.js +5 -5
  53. package/dist/harness-worker.js +7 -7
  54. package/dist/{heavy-HZQVFI6P.js → heavy-X3KZ7WBU.js} +186 -99
  55. package/dist/hook-body.js +548 -116
  56. package/dist/{hook-spec-Bd24eo2L.d.ts → hook-spec-u7hnz571.d.ts} +10 -0
  57. package/dist/{hooks-VAEAK2FY.js → hooks-7K624JQC.js} +4 -4
  58. package/dist/{host-I2EMQ7UE.js → host-CCJFOCZJ.js} +16 -14
  59. package/dist/{host-4GJDGTLW.js → host-PT7NRWG6.js} +8 -8
  60. package/dist/{host-run-DDMKD3BU.js → host-run-RRBFTVYW.js} +6 -6
  61. package/dist/http.js +1 -1
  62. package/dist/{import-mcp-TNSAMJXI.js → import-mcp-GCNNSLWH.js} +13 -11
  63. package/dist/index.d.ts +2 -2
  64. package/dist/index.js +17 -15
  65. package/dist/{init-UA7MDNTZ.js → init-A4NLTERR.js} +2 -2
  66. package/dist/{invoke-HW7NBPGP.js → invoke-G4LNWPTL.js} +9 -9
  67. package/dist/{list-A7VQJXE5.js → list-EZYULVDW.js} +16 -14
  68. package/dist/{logout-HNPLUKJY.js → logout-BYO3UJUH.js} +14 -12
  69. package/dist/{logs-2JEMSNSG.js → logs-J4W6GFMK.js} +4 -4
  70. package/dist/{mailbox-MR6TPD3P.js → mailbox-6MHH6CUA.js} +4 -4
  71. package/dist/{mainline-MSLW3UFD.js → mainline-SWZPKA7U.js} +13 -9
  72. package/dist/{mcp-6C23GX2E.js → mcp-CZNYDYTJ.js} +2 -2
  73. package/dist/owners-MPI22SFU.js +63 -0
  74. package/dist/{pause-H6ZYZF7C.js → pause-3IMVYXQQ.js} +4 -4
  75. package/dist/project/hook-adapter.d.ts +1 -1
  76. package/dist/{project-BX6NCGKB.js → project-GLT3SO7Y.js} +4 -4
  77. package/dist/{report-43SFNNCF.js → report-MWXB5XKE.js} +4 -4
  78. package/dist/{resume-2BWGSTCN.js → resume-7LCSV4X3.js} +4 -4
  79. package/dist/{run-2UVAWBAF.js → run-J5O2V3MB.js} +13 -11
  80. package/dist/{run-7TRWZFEZ.js → run-OBQBKBPV.js} +4 -4
  81. package/dist/{serve-4XZ5SKJJ.js → serve-QCG4PCVS.js} +3 -3
  82. package/dist/{setup-GRWLDBVB.js → setup-7JHWLV7K.js} +6 -4
  83. package/dist/{smoke-6X6IXQIQ.js → smoke-GZECLXOJ.js} +3 -3
  84. package/dist/{start-login-AR7ITWNV.js → start-login-LRO3RTHD.js} +14 -12
  85. package/dist/{status-ZY6LDQSF.js → status-BQLT7JRE.js} +14 -12
  86. package/dist/{status-VQCMJFVE.js → status-EZTFSD5S.js} +18 -16
  87. package/dist/{status-2GDYLIR3.js → status-QFMN7IUG.js} +4 -4
  88. package/dist/stdio.js +2 -2
  89. package/dist/{sweep-76BUOGEI.js → sweep-BS7HVSNP.js} +4 -4
  90. package/dist/{test-VWGNFSH5.js → test-O7TN5SBA.js} +25 -15
  91. package/dist/{tui-TUMOQBE7.js → tui-ODLF6QWC.js} +4 -4
  92. package/dist/{unbroadcast-HJHYUHZL.js → unbroadcast-GRGX3F6T.js} +4 -4
  93. package/dist/{worker-NEEPJRVV.js → worker-AK4GLGPZ.js} +11 -11
  94. package/dist/{worktree-sync-MUVKK2CV.js → worktree-sync-BQZD4J73.js} +5 -2
  95. package/docs/commands.md +12 -3
  96. package/docs/git-workflow.md +40 -5
  97. package/docs/hooks.md +69 -14
  98. package/docs/project-configuration.md +63 -4
  99. package/docs/upgrading.md +13 -0
  100. package/gemini-extension.json +2 -2
  101. package/mcp.json +1 -1
  102. package/package.json +5 -5
  103. package/plugin.json +1 -1
  104. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  105. package/plugins/pmcp/.mcp.json +1 -1
  106. package/plugins/pmcp/gemini-extension.json +2 -2
  107. package/plugins/pmcp/mcp.json +1 -1
  108. package/plugins/pmcp/plugin.json +1 -1
  109. package/dist/chunk-7TD53M7L.js +0 -13
  110. package/dist/chunk-FQLCD4HU.js +0 -24
  111. package/dist/chunk-SMBU3QLE.js +0 -7
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  change
3
- } from "./chunk-C3KRMTIZ.js";
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-3V37OZQH.js";
7
+ import "./chunk-PAY6HEEY.js";
8
8
  import "./chunk-Z6WRFOFT.js";
9
9
  import "./chunk-Y6NFETNG.js";
10
- import "./chunk-FQLCD4HU.js";
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-76BUOGEI.js.map
21
+ //# sourceMappingURL=sweep-BS7HVSNP.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  specFrom
3
- } from "./chunk-BG6TONJO.js";
3
+ } from "./chunk-GIK4TROM.js";
4
4
  import {
5
5
  sourceFor
6
- } from "./chunk-7TD53M7L.js";
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-TOR6SKRB.js";
16
- import "./chunk-VYQJPT27.js";
17
- import "./chunk-UKR64U7J.js";
16
+ } from "./chunk-JDVDA5HW.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-EWYLWBKS.js";
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-3V37OZQH.js";
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-ARXCYFFZ.js";
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-2TXVOHRS.js";
58
- import "./chunk-DITIXBFB.js";
60
+ import "./chunk-2VL3C52Y.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-FQLCD4HU.js";
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-SMBU3QLE.js";
74
+ import "./chunk-EIBKHS74.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
- return [...guards, ...custom].filter((selected) => listens(selected, input));
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-6X6IXQIQ.js")).run(context, fixtures);
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-VWGNFSH5.js.map
642
+ //# sourceMappingURL=test-O7TN5SBA.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-2W7QDQNG.js");
143
+ const { inspectTerminalHost } = await import("./diagnostics-PB5TKIAL.js");
144
144
  receipt = inspectTerminalHost();
145
145
  } else if (invocation.action === "start-worker") {
146
- const { startWorkspaceWorker } = await import("./worker-NEEPJRVV.js");
146
+ const { startWorkspaceWorker } = await import("./worker-AK4GLGPZ.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-E62DZQJF.js");
159
+ const { launchStartup, planStartup } = await import("./entry-CY74PLN3.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-TUMOQBE7.js.map
179
+ //# sourceMappingURL=tui-ODLF6QWC.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  change
3
- } from "./chunk-C3KRMTIZ.js";
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-3V37OZQH.js";
7
+ import "./chunk-PAY6HEEY.js";
8
8
  import "./chunk-Z6WRFOFT.js";
9
9
  import "./chunk-Y6NFETNG.js";
10
- import "./chunk-FQLCD4HU.js";
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-HJHYUHZL.js.map
21
+ //# sourceMappingURL=unbroadcast-GRGX3F6T.js.map
@@ -1,29 +1,29 @@
1
+ import {
2
+ invoke
3
+ } from "./chunk-E7BPELYH.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-3P6Y2BAO.js";
11
- import "./chunk-ISWR2XIU.js";
10
+ import "./chunk-BSG74PTY.js";
11
+ import "./chunk-3T7CJS4A.js";
12
12
  import {
13
13
  locateExecutable
14
14
  } from "./chunk-R2GPCZUX.js";
15
- import "./chunk-DWHM5BAY.js";
15
+ import "./chunk-T52AGUO7.js";
16
16
  import "./chunk-34DECPVC.js";
17
- import "./chunk-2TXVOHRS.js";
18
- import "./chunk-DITIXBFB.js";
17
+ import "./chunk-2VL3C52Y.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-FQLCD4HU.js";
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-SMBU3QLE.js";
26
+ import "./chunk-EIBKHS74.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-NEEPJRVV.js.map
86
+ //# sourceMappingURL=worker-AK4GLGPZ.js.map
@@ -4,10 +4,13 @@ import {
4
4
  import {
5
5
  installSpec,
6
6
  syncWorktree
7
- } from "./chunk-VYQJPT27.js";
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-MUVKK2CV.js.map
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 or a budget limit is exceeded; 2 when there is no `pmcp.toml`. 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.
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 <ticket>` reads the state (queued with its position, running, done, or lost when the runner died), `--json` as data; `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.
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 or an exceeded budget, `project --check` drift, stale or undeclared outputs, a `hooks test --fixtures` or `--smoke` finding |
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).
@@ -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 under the git dir
65
- (`pmcp-displaced/<time>/<path>`), never deleted, and the line says to run the
66
- install again. A file git does not ignore leaves the submodule unchecked, and the
67
- line names the path.
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.git.push_without_verify]` | deny | deny, ask, warn, observe, off | `git push --no-verify`. |
88
- | `[hooks.guards.git.forced_branch_move]` | deny | deny, ask, warn, observe, off | Forcing a branch that is checked out in another working tree. |
89
- | `[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. |
90
- | `[hooks.guards.git.stage_all]` | deny | deny, ask, warn, observe, off | `git add -A`, `git add .`, `git commit -a` and similar; stage explicit paths. |
91
- | `[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. |
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]` | [Hooks](hooks.md) |
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` shows the measurements beside the
782
- limits (its JSON gains `budget: {rows, problems}`, and an exceeded limit counts
783
- as drift). Every key is optional; nothing is checked without the table.
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