@modootoday/pmcp 0.22.11 → 0.22.13

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 (125) 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-ZWO2F5EM.js +836 -0
  6. package/dist/{apply-DXM56NV3.js → apply-OIKQ5SIY.js} +21 -17
  7. package/dist/{available-BFXLII4A.js → available-Z5MIDFPH.js} +3 -3
  8. package/dist/{broadcast-DZGMSZRG.js → broadcast-BF2QL3O7.js} +6 -5
  9. package/dist/{chunk-TU2SG5BM.js → chunk-24L4MO7H.js} +2 -2
  10. package/dist/{chunk-7I7O7ZNT.js → chunk-3V37OZQH.js} +5 -3
  11. package/dist/{chunk-PEMMV5YQ.js → chunk-4O4ZOSBQ.js} +3 -3
  12. package/dist/{chunk-7ZWSCSZM.js → chunk-5IZFEVPW.js} +2 -2
  13. package/dist/{chunk-TQODDSIG.js → chunk-5KWDQFVY.js} +4 -4
  14. package/dist/{chunk-R5MT42JS.js → chunk-5OFQVW2K.js} +2 -2
  15. package/dist/{chunk-REFEJ4VJ.js → chunk-5PNS6V5C.js} +2 -2
  16. package/dist/chunk-65BW7Y6O.js +40 -0
  17. package/dist/{chunk-IATFWEAX.js → chunk-733WVP2R.js} +19 -7
  18. package/dist/{chunk-URCQLONP.js → chunk-737BENAU.js} +8 -8
  19. package/dist/{chunk-GFOQDLPL.js → chunk-74O7KZUH.js} +13 -3
  20. package/dist/{chunk-5ZUEPPFZ.js → chunk-7ZOQELXR.js} +9 -7
  21. package/dist/{chunk-ENOMRAFS.js → chunk-A6DARDQ4.js} +3 -3
  22. package/dist/{chunk-PUIWESU3.js → chunk-A7XCUR2C.js} +4 -4
  23. package/dist/{chunk-P4N7DBD5.js → chunk-ANJMLKBR.js} +2 -2
  24. package/dist/chunk-BN4XAXMQ.js +65 -0
  25. package/dist/chunk-FOLA4EUJ.js +261 -0
  26. package/dist/chunk-FQLCD4HU.js +24 -0
  27. package/dist/chunk-G4ATQPQI.js +35 -0
  28. package/dist/{chunk-TZWLT6FD.js → chunk-GNVME5AD.js} +2 -2
  29. package/dist/{chunk-OEH47H6A.js → chunk-GUHOEIHP.js} +3 -20
  30. package/dist/{chunk-PIVKGKMR.js → chunk-ISGBOJT7.js} +3 -3
  31. package/dist/{chunk-RPCIROW7.js → chunk-J3QUG6O5.js} +2 -2
  32. package/dist/{chunk-B2WRYGHJ.js → chunk-JW5NMQTU.js} +3 -3
  33. package/dist/{chunk-2GOR4ZKO.js → chunk-K2VU3B4W.js} +99 -27
  34. package/dist/{chunk-5QKXEWDB.js → chunk-MHKY6TNF.js} +6 -4
  35. package/dist/chunk-N7ANFMA5.js +171 -0
  36. package/dist/{chunk-URP3QIWI.js → chunk-NNGGNXF2.js} +2 -2
  37. package/dist/{chunk-7CSUKCU7.js → chunk-P5D6RKMT.js} +13 -94
  38. package/dist/{chunk-EA2OSLFJ.js → chunk-QBSJL3SP.js} +42 -31
  39. package/dist/chunk-SGFTHKKS.js +86 -0
  40. package/dist/{chunk-Z5RNKEHF.js → chunk-T4GVN7XO.js} +5 -5
  41. package/dist/chunk-T6C3TSTO.js +99 -0
  42. package/dist/{chunk-NRBQK6UX.js → chunk-TYY5TYHF.js} +14 -1
  43. package/dist/{chunk-VEOYGFEQ.js → chunk-UED3RH53.js} +2 -2
  44. package/dist/{chunk-37RGCHTK.js → chunk-VNZTULFD.js} +3 -3
  45. package/dist/chunk-VSTUKACC.js +7 -0
  46. package/dist/{chunk-A4PKLESO.js → chunk-WFY7ATSZ.js} +8 -4
  47. package/dist/{chunk-KPKMEUUH.js → chunk-XSWF7APE.js} +3 -3
  48. package/dist/{chunk-GIDKCJVZ.js → chunk-ZKB7ZNKY.js} +4 -4
  49. package/dist/{chunk-ZEERJLE5.js → chunk-ZS5IDQFJ.js} +6 -6
  50. package/dist/{cli-JXPJFHUA.js → cli-FSSYFCV3.js} +15 -9
  51. package/dist/{cli-34EDFXJA.js → cli-IHVNE3WL.js} +9 -9
  52. package/dist/cli.js +19 -13
  53. package/dist/{completion-25CHR7SR.js → completion-ZTTJVV4C.js} +8 -6
  54. package/dist/{diagnostics-4PQSTI2X.js → diagnostics-XC5L6Z3E.js} +11 -7
  55. package/dist/{doctor-MHFALEWR.js → doctor-FGDSUBR3.js} +21 -17
  56. package/dist/{entry-25VWXTCW.js → entry-NNB2CQLZ.js} +20 -16
  57. package/dist/{exec-mcp-OQP5OU26.js → exec-mcp-ZU3Z3XT6.js} +16 -12
  58. package/dist/{harness-DTXPIWKL.js → harness-B7ANLH5M.js} +5 -5
  59. package/dist/harness-launch-gate.js +9 -5
  60. package/dist/harness-worker.js +11 -7
  61. package/dist/heavy-IIZBO4YM.js +1909 -0
  62. package/dist/hook-body.js +69 -21
  63. package/dist/{hooks-E33GKFRS.js → hooks-IEJTW7BV.js} +5 -5
  64. package/dist/{host-4YG67ZQ2.js → host-5P4D7GSE.js} +18 -14
  65. package/dist/host-XXWQ23LD.js +28 -0
  66. package/dist/{host-run-AJR2THEY.js → host-run-AEWHFVQL.js} +11 -7
  67. package/dist/http.js +1 -1
  68. package/dist/{import-mcp-MGDRREMJ.js → import-mcp-BQM5DKYH.js} +16 -12
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +18 -14
  71. package/dist/{init-RMTFPDJQ.js → init-L6GUO3PW.js} +2 -2
  72. package/dist/{install-7V6NIA7W.js → install-OFVLR7TI.js} +3 -3
  73. package/dist/invoke-3BQ5NG3P.js +29 -0
  74. package/dist/{list-WJE6NS7Y.js → list-EU4MJOXA.js} +17 -13
  75. package/dist/{list-WK2IYUK7.js → list-WWYCGD3X.js} +4 -4
  76. package/dist/{logout-SZY5GBIH.js → logout-6DFDYJUI.js} +16 -12
  77. package/dist/{logs-UHJM7ZCL.js → logs-BRF6DBKG.js} +7 -6
  78. package/dist/{mailbox-YN6PG66A.js → mailbox-AQCTXO3H.js} +3 -3
  79. package/dist/{mailbox-NIMBOQPA.js → mailbox-QYA2LQSE.js} +9 -41
  80. package/dist/{mainline-74WCH4T4.js → mainline-O5AEHG3J.js} +69 -121
  81. package/dist/{marketplace-G4VQET5W.js → marketplace-TI5HFAHB.js} +2 -2
  82. package/dist/{mcp-AXHV547W.js → mcp-4R53HSGY.js} +2 -2
  83. package/dist/{mcp-BPTTJKWL.js → mcp-HR5JFUW7.js} +2 -2
  84. package/dist/{models-ISU4DCMA.js → models-63NQBSV3.js} +2 -2
  85. package/dist/{pause-CBZ3BTJL.js → pause-UF7FQDJX.js} +6 -5
  86. package/dist/{preview-DT7DWG5F.js → preview-WSESS2UN.js} +3 -3
  87. package/dist/{project-6GDQBLDC.js → project-JXXL24WN.js} +6 -6
  88. package/dist/{reindex-I7RYWCUR.js → reindex-3GPKAFBW.js} +5 -5
  89. package/dist/{report-ZHOHQ4PZ.js → report-JUSKQPAC.js} +7 -6
  90. package/dist/{resume-UJEWQ66P.js → resume-3WAROOQ3.js} +6 -5
  91. package/dist/{run-V4LBDW5O.js → run-VUUQS4WY.js} +5 -5
  92. package/dist/{run-5UM7WUTH.js → run-XRWU4L73.js} +14 -10
  93. package/dist/{serve-723OCAUT.js → serve-OEX5V5CD.js} +7 -7
  94. package/dist/{setup-SOUBEZ3H.js → setup-SWNAC2C7.js} +6 -4
  95. package/dist/{smoke-2FI5D74B.js → smoke-5BGJXAHX.js} +4 -4
  96. package/dist/{start-login-M425T4GS.js → start-login-MG26NDE3.js} +16 -12
  97. package/dist/{status-XAP66PLK.js → status-APADL7O2.js} +16 -12
  98. package/dist/{status-KN2ZE64O.js → status-GKCIVAAR.js} +6 -5
  99. package/dist/{status-QEFRBTOO.js → status-LH7Q255G.js} +18 -14
  100. package/dist/stdio.js +2 -2
  101. package/dist/{sweep-EPZCW63Q.js → sweep-VTVPDAPY.js} +6 -5
  102. package/dist/{test-TL7DRDMD.js → test-TK2J3IB7.js} +17 -13
  103. package/dist/{tui-DGGNATMI.js → tui-YTPHHKCW.js} +5 -5
  104. package/dist/{unbroadcast-N6LXHAMT.js → unbroadcast-CH7BAQ2G.js} +6 -5
  105. package/dist/{validate-KFBCUFI4.js → validate-5QVZBE6W.js} +4 -4
  106. package/dist/wait-4HYJJAWO.js +141 -0
  107. package/dist/{worker-N7EOJVI3.js → worker-RBXYAMR4.js} +13 -9
  108. package/dist/{worktree-create-KMXPQXIQ.js → worktree-create-FEZNQUQ6.js} +2 -2
  109. package/docs/commands.md +48 -12
  110. package/docs/git-workflow.md +51 -0
  111. package/docs/hooks.md +8 -1
  112. package/docs/project-configuration.md +134 -18
  113. package/docs/upgrading.md +11 -0
  114. package/gemini-extension.json +2 -2
  115. package/mcp.json +1 -1
  116. package/package.json +5 -5
  117. package/plugin.json +1 -1
  118. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  119. package/plugins/pmcp/.mcp.json +1 -1
  120. package/plugins/pmcp/gemini-extension.json +2 -2
  121. package/plugins/pmcp/mcp.json +1 -1
  122. package/plugins/pmcp/plugin.json +1 -1
  123. package/dist/chunk-L7LQEVTE.js +0 -7
  124. package/dist/host-W6B2O44Q.js +0 -24
  125. package/dist/invoke-JRFOK374.js +0 -25
@@ -51,24 +51,25 @@ Every table pmcp reads, and where it is described. An unknown key inside one
51
51
  of these tables is an error unless noted; an unknown top-level table is
52
52
  ignored.
53
53
 
54
- | Table | Section |
55
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
56
- | `[catalog]`, `[catalog.validation]` | [Project config](#project-config) |
57
- | `[embedding]`, `[embedding.encoder]` | [Embedding models](embeddings.md) |
58
- | `[marketplaces.<name>]` | [Marketplaces](#marketplaces) |
59
- | `[targets]`, `[skills.<name>]`, `[agents.<name>.<tool>]`, `[rules.packages]` | [Native files for each agent tool](#native-files-for-each-agent-tool) |
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) |
62
- | `[budget]` | [Budget](#budget) |
63
- | `[[hooks.shell]]`, `[[hooks.edit]]` | [Deprecated shell guards](hooks.md#deprecated-shell-guards) |
64
- | `[sessions]`, `[sessions.registry]`, `[sessions.pause]`, `[sessions.broadcast]`, `[sessions.mailbox]`, `[sessions.leases.<name>]`, `[sessions.roles.<name>]` | [Sessions](#sessions) |
65
- | `[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) |
66
- | `[logging]`, `[logging.components]` | [Logging](#logging) |
67
- | `[permissions.claude]` | [Claude permission rules](#claude-permission-rules) |
68
- | `[ui.claude]` | [Claude session panes](#claude-session-panes) |
69
- | `[tui]`, `[mailbox]` | [Terminal workspace](terminal-workspace.md) |
70
- | `[host]`, `[[host.sessions]]`, `[[host.answers]]`, `[host.browser]`, `[host.desktop]`, `[[host.desktop.launch]]` | [Sessions pmcp-pty hosts](#sessions-pmcp-pty-hosts) |
71
- | `[harness]` | [Terminal harness](terminal-harness.md#create-a-group-and-its-sessions) |
54
+ | Table | Section |
55
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
56
+ | `[catalog]`, `[catalog.validation]` | [Project config](#project-config) |
57
+ | `[embedding]`, `[embedding.encoder]` | [Embedding models](embeddings.md) |
58
+ | `[marketplaces.<name>]` | [Marketplaces](#marketplaces) |
59
+ | `[targets]`, `[skills.<name>]`, `[agents.<name>.<tool>]`, `[rules.packages]` | [Native files for each agent tool](#native-files-for-each-agent-tool) |
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) |
62
+ | `[budget]` | [Budget](#budget) |
63
+ | `[[hooks.shell]]`, `[[hooks.edit]]` | [Deprecated shell guards](hooks.md#deprecated-shell-guards) |
64
+ | `[sessions]`, `[sessions.registry]`, `[sessions.pause]`, `[sessions.broadcast]`, `[sessions.mailbox]`, `[sessions.leases.<name>]`, `[sessions.roles.<name>]` | [Sessions](#sessions) |
65
+ | `[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) |
66
+ | `[logging]`, `[logging.components]` | [Logging](#logging) |
67
+ | `[permissions.claude]` | [Claude permission rules](#claude-permission-rules) |
68
+ | `[ui.claude]` | [Claude session panes](#claude-session-panes) |
69
+ | `[tui]`, `[mailbox]` | [Terminal workspace](terminal-workspace.md) |
70
+ | `[host]`, `[[host.sessions]]`, `[[host.answers]]`, `[host.browser]`, `[host.desktop]`, `[[host.desktop.launch]]` | [Sessions pmcp-pty hosts](#sessions-pmcp-pty-hosts) |
71
+ | `[host.lease]`, `[host.lease.lanes]`, `[host.lease.weights]`, `[[host.lease.commands]]`, `[host.lease.profiles.<name>]`, `[host.lease.io]`, `[host.lease.io.weights]`, `[host.lease.io.max]` | [Host lease](#host-lease) |
72
+ | `[harness]` | [Terminal harness](terminal-harness.md#create-a-group-and-its-sessions) |
72
73
 
73
74
  ## Marketplaces
74
75
 
@@ -256,6 +257,118 @@ boundary, since any process running as you can write the approvals directory
256
257
  directly. A real boundary needs the approvals stored under a different user or
257
258
  owned by root.
258
259
 
260
+ ## Host lease
261
+
262
+ `[host.lease]` configures the host-wide budget behind
263
+ [`pmcp heavy`](commands.md#heavy): heavy commands (installs, test suites,
264
+ typechecks, builds, gates) from every session and worktree on the host start
265
+ only while their lane has a free slot, their weight fits what the running jobs
266
+ leave of the budget, and the host is under its load and IO limits. It trades
267
+ throughput for stability: a queued job waits instead of overflowing memory or
268
+ IO beside the others. Turn it off (`enabled = false`) on a host that runs one
269
+ session at a time or has room for every job at once; keep it on where several
270
+ agents share one machine. It is on by default, also without the table.
271
+
272
+ ```toml
273
+ [host.lease]
274
+ max_load = 8
275
+ max_io = 8
276
+ budget = 4
277
+ hold_warn = 1800
278
+ hold_max = 3600
279
+ heavy = [["npm", "install"], ["npm", "test"], ["cargo", "build"]]
280
+ guard = "deny"
281
+
282
+ [host.lease.lanes]
283
+ interactive = 2
284
+
285
+ [[host.lease.commands]]
286
+ argv = ["npm", "install"]
287
+ lane = "bulk"
288
+ weight = 3
289
+
290
+ [host.lease.profiles.gate]
291
+ max_wait = 2700
292
+ load_grace = 600
293
+ ```
294
+
295
+ | Key | Type | Default | Meaning |
296
+ | ------------------- | ------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
297
+ | `enabled` | boolean | `true` | `false` runs every `pmcp heavy` command at once, gates without the lease and turns the guard off. |
298
+ | `dir` | path | `~/.cache/pmcp/host` | Where the lock file (`heavy.lock`), the admission lock, the `running/` and `waiters/` records, the holder record and `heavy.log` live. Every tool sharing the lease names the same directory. |
299
+ | `budget` | integer | `4` | The most weight that runs at once. `1` is one job at a time. |
300
+ | `lanes.<lane>` | integer | gate 1, hook 1, interactive 2, bulk 1 | How many jobs of a lane run at once; `0` closes the lane. |
301
+ | `weights.<lane>` | integer | gate 1, hook 1, interactive 2, bulk 3 | A job's weight when neither `--weight` nor a `commands` entry names one. A weight above the budget counts as the budget. |
302
+ | `commands` | tables | none | `argv` prefix, `lane` and `weight` for commands run without `--lane` or `--weight`; the first match wins. |
303
+ | `tiny` | argv lists | none | Commands so short (a few seconds) that they take no slot and no budget (weight 0, also `--weight 0`); only the hard ceiling holds them back, and the log still records them. |
304
+ | `per_session` | integer | `1` | How many jobs one agent session may have queued in the interactive lane, and in the bulk lane; the next one waits outside the queue holding no place. `0` is no cap. Gate and hook are exempt. |
305
+ | `marker_env` | name | `PMCP_HEAVY_LEASE` | Set to the job's pid for the leased command; a nested `pmcp heavy` whose marker names a running job runs at once. |
306
+ | `legacy_marker_env` | name | none | A second marker, set and honoured like `marker_env`, for a shell wrapper that shares `dir`. |
307
+ | `legacy_skip_env` | name | none | A second skip variable, honoured like `PMCP_HEAVY_DISABLE`, and set for the leased command so a nested shell wrapper runs at once. |
308
+ | `max_load` | number | the CPU count | A job starts only while the 1-minute load average is below this. |
309
+ | `max_io` | number | `8` | And while IO pressure (`some`, the `io_window` average) is below this. A host without pressure files checks load only; one without a load average checks neither. |
310
+ | `io_window` | string | `avg60` | Which pressure average the check reads: `avg10` follows spikes, `avg60` and `avg300` smooth them so the queue does not stall on a burst. |
311
+ | `max_wait` | seconds | `3600` | How long the `default` profile waits; then nothing runs and the exit is 75. |
312
+ | `load_grace` | seconds | `900` | After this long waiting on the host, a job may start into moderate overload, but only while no leased job runs, so a grace never starts two jobs together. `0` is no grace. |
313
+ | `hard_factor` | number | `2` | Never start, grace or not, while load or IO is at this many times its limit; such a job waits until `max_wait`, then exits 75. |
314
+ | `hold_warn` | seconds | `1800` | A job running past this prints one warning, and `pmcp heavy status` marks it. |
315
+ | `hold_max` | seconds | none | `pmcp heavy status` flags a job past this as over the limit. Nothing is killed. |
316
+ | `memory_max` | size | none | Runs each command in `systemd-run --user --scope -p MemoryMax=<size> -p MemorySwapMax=0` where that is available, so a runaway job is killed alone. |
317
+ | `heartbeat`, `poll` | seconds | `60`, `15` | How often a waiter prints that it is still waiting, and how often the host is reread. |
318
+ | `profiles.<name>` | table | gate 2700/600, hook 900/30 | `max_wait`, `load_grace` and `memory_max` for `pmcp heavy --profile <name>`. The `gate` and `hook` profiles also choose their lane. Any other profile starts from the top-level values. |
319
+ | `heavy` | argv lists | none | The commands the `host.lease` guard expects under the lease, as argv prefixes. Empty, the guard is off. pmcp lists none of its own. |
320
+ | `guard` | string | `observe` | The `host.lease` guard's mode: `observe` logs only, `warn` tells the agent, `deny` refuses with the command to run instead (`pmcp heavy -- <command>`), `off`. A command already wrapped passes. |
321
+ | `io.enabled` | `"auto"` or boolean | `"auto"` | Each leased job runs in its own `systemd-run --user` scope and gets its lane's `io.weight` where the cgroup v2 io controller reaches the user manager; elsewhere nothing changes. `true` also says when it could not; `false` never. |
322
+ | `io.weights.<lane>` | integer | gate 500, hook 300, interactive 100, bulk 25 | The scope's `io.weight` per lane (1 to 10000). |
323
+ | `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. |
324
+ | `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. |
325
+ | `usage_cap` | bytes | `5000000` | `usage.jsonl` (one record per run) moves to `usage.jsonl.1` past this size. |
326
+
327
+ Lanes, in the order a short budget goes to them: `gate` (a land's gate),
328
+ `hook` (commit-hook work, a short slot that skips the host wait unless the host
329
+ is past `hard_factor`), `interactive` (the tests, builds and
330
+ typechecks a session waits on now, the default) and `bulk` (batch runs,
331
+ experiments, bootstraps, installs). Within a lane the oldest waiter goes first,
332
+ and the first waiter the remaining budget cannot fit holds back the ones behind
333
+ it, so a heavy job is not starved by lighter ones. Admission and release happen
334
+ under a short lock beside the records, and dead processes' records are dropped
335
+ on every admission, so running weight never exceeds the budget and a crashed
336
+ job frees its share.
337
+
338
+ `pmcp heavy --now --reason <text>` (or `PMCP_HEAVY_NOW=<reason>` in a script) is
339
+ the emergency bypass: the command starts at once, outside the lanes, the budget
340
+ and the host check, and never exits 75, but it needs a reason, is logged as a
341
+ `bypass` line, shows as `bypass running` in status and counts its weight, so the
342
+ other jobs' admission sees its load. It is not the off switch below.
343
+
344
+ Every run appends one record to `usage.jsonl` beside the lease files: the
345
+ command's signature (the program and the lower-case words before its first
346
+ option, path or value; never argument values or the environment), the package
347
+ directory relative to the project, lane, weight, how it started (queue, grace,
348
+ bypass), exit code, wall time, user and system CPU time, peak RSS and bytes read
349
+ and written. CPU time comes from the reaped process tree; peak RSS and IO come
350
+ from the job's cgroup when it runs in a scope, else from `/proc` sampled once a
351
+ second. `pmcp heavy stats` summarises them per signature. The weights are still
352
+ the configured ones.
353
+
354
+ `PMCP_HEAVY_DISABLE=<reason>` is the one way to run without the lease for a
355
+ single command or a whole shell (a test suite, an emergency): `pmcp heavy`
356
+ runs at once and logs the reason, and the guard lets a command that sets it
357
+ pass. `enabled = false` is the switch for a host or project that does not
358
+ want the lease at all.
359
+
360
+ The files extend those of a shell wrapper that takes the same lock with
361
+ `flock`: records hold `key=value` lines (`pid`, `since`, `started`, `cwd`,
362
+ `label`, then pmcp's `lane`, `weight`, `queued`, `session`), and `heavy.log` has
363
+ one tab-separated line per event (`<UTC time>`, `<pid>`,
364
+ `acquired|released|timeout|grace|skip`, `<details>`), pmcp appending to the
365
+ details only. Each running pmcp job holds the lock file shared, so a wrapper
366
+ holding it exclusively counts as the whole budget, and a wrapper waits until no
367
+ pmcp job runs. Point `dir`, `legacy_marker_env` and `legacy_skip_env` at such a
368
+ wrapper's values and the two exclude each other while both are in use. A
369
+ wrapper does not join the lanes, so the order and the budget are complete only
370
+ once every caller uses `pmcp heavy`.
371
+
259
372
  ## Browser and desktop for agents
260
373
 
261
374
  pmcp-browser and pmcp-desktop, and how to declare them: [Browser and desktop](browser-and-desktop.md).
@@ -776,6 +889,9 @@ notice_paths = ["AGENTS.md", "pmcp.toml"]
776
889
 
777
890
  [git.submodules]
778
891
 
892
+ [host.lease]
893
+ heavy = [["npm", "install"], ["npm", "test"]]
894
+
779
895
  [logging]
780
896
  level = "warn"
781
897
 
package/docs/upgrading.md CHANGED
@@ -5,6 +5,17 @@
5
5
  What to do when a release changes something you rely on. Each release's notes on GitHub
6
6
  Releases list its breaking changes and link here.
7
7
 
8
+ ## From 0.22.12 to 0.22.13
9
+
10
+ **A gate command that exits 75 makes `pmcp git deliver` exit 75.** 75 now means a test stage
11
+ under `pmcp heavy` never got the host lease: deliver reports "gate not run: host busy,
12
+ nothing pushed, retry later" instead of a failed gate and exit 1. A gate that used 75 for
13
+ another failure should exit with another code.
14
+
15
+ **Words after `--` belong to the command.** `-q`, `--quiet`, `--color`, `--no-color` and
16
+ `--help` after a bare `--` are no longer read as pmcp's own options, so
17
+ `pmcp heavy -- grep -q x file` passes `-q` to grep.
18
+
8
19
  ## From 0.22.8 to 0.22.9
9
20
 
10
21
  **Guards read commands with the shell's grammar.** A `cd` chain, a subshell, a pipeline stage
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.22.11",
3
+ "version": "0.22.13",
4
4
  "mcpServers": {
5
5
  "pmcp": {
6
6
  "type": "stdio",
7
7
  "command": "npx",
8
- "args": ["-y", "@modootoday/pmcp@0.22.11", "serve"]
8
+ "args": ["-y", "@modootoday/pmcp@0.22.13", "serve"]
9
9
  }
10
10
  }
11
11
  }
package/mcp.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "pmcp": {
5
5
  "type": "stdio",
6
6
  "command": "npx",
7
- "args": ["-y", "@modootoday/pmcp@0.22.11", "serve"]
7
+ "args": ["-y", "@modootoday/pmcp@0.22.13", "serve"]
8
8
  }
9
9
  }
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modootoday/pmcp",
3
- "version": "0.22.11",
3
+ "version": "0.22.13",
4
4
  "license": "Elastic-2.0",
5
5
  "author": "modootoday",
6
6
  "description": "Use the skills your packages already ship, and keep your AI tools' project configuration in one place.",
@@ -136,9 +136,9 @@
136
136
  "bun": ">=1.3.0"
137
137
  },
138
138
  "optionalDependencies": {
139
- "@modootoday/pmcp-linux-x64": "0.22.11",
140
- "@modootoday/pmcp-linux-arm64": "0.22.11",
141
- "@modootoday/pmcp-darwin-x64": "0.22.11",
142
- "@modootoday/pmcp-darwin-arm64": "0.22.11"
139
+ "@modootoday/pmcp-linux-x64": "0.22.13",
140
+ "@modootoday/pmcp-linux-arm64": "0.22.13",
141
+ "@modootoday/pmcp-darwin-x64": "0.22.13",
142
+ "@modootoday/pmcp-darwin-arm64": "0.22.13"
143
143
  }
144
144
  }
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "pmcp",
4
- "version": "0.22.11",
4
+ "version": "0.22.13",
5
5
  "description": "Find package skills and use native runtime project configuration.",
6
6
  "author": { "name": "modootoday" },
7
7
  "license": "Elastic-2.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.22.11",
3
+ "version": "0.22.13",
4
4
  "description": "Find package skills and use native runtime project configuration.",
5
5
  "author": { "name": "modootoday" },
6
6
  "license": "Elastic-2.0",
@@ -3,7 +3,7 @@
3
3
  "pmcp": {
4
4
  "type": "stdio",
5
5
  "command": "npx",
6
- "args": ["-y", "@modootoday/pmcp@0.22.11", "serve"]
6
+ "args": ["-y", "@modootoday/pmcp@0.22.13", "serve"]
7
7
  }
8
8
  }
9
9
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.22.11",
3
+ "version": "0.22.13",
4
4
  "mcpServers": {
5
5
  "pmcp": {
6
6
  "type": "stdio",
7
7
  "command": "npx",
8
- "args": ["-y", "@modootoday/pmcp@0.22.11", "serve"]
8
+ "args": ["-y", "@modootoday/pmcp@0.22.13", "serve"]
9
9
  }
10
10
  }
11
11
  }
@@ -4,7 +4,7 @@
4
4
  "pmcp": {
5
5
  "type": "stdio",
6
6
  "command": "npx",
7
- "args": ["-y", "@modootoday/pmcp@0.22.11", "serve"]
7
+ "args": ["-y", "@modootoday/pmcp@0.22.13", "serve"]
8
8
  }
9
9
  }
10
10
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "pmcp",
4
- "version": "0.22.11",
4
+ "version": "0.22.13",
5
5
  "description": "Find package skills and use native runtime project configuration.",
6
6
  "author": { "name": "modootoday" },
7
7
  "license": "Elastic-2.0",
@@ -1,7 +0,0 @@
1
- // src/commands/version.ts
2
- var VERSION = "0.22.11";
3
-
4
- export {
5
- VERSION
6
- };
7
- //# sourceMappingURL=chunk-L7LQEVTE.js.map
@@ -1,24 +0,0 @@
1
- import {
2
- requireTerminal,
3
- terminalSupport
4
- } from "./chunk-37RGCHTK.js";
5
- import "./chunk-5ZABTVSW.js";
6
- import "./chunk-URP3QIWI.js";
7
- import "./chunk-LMT3PPXJ.js";
8
- import "./chunk-7ZWSCSZM.js";
9
- import "./chunk-R2GPCZUX.js";
10
- import "./chunk-34DECPVC.js";
11
- import "./chunk-IATFWEAX.js";
12
- import "./chunk-NRBQK6UX.js";
13
- import "./chunk-OEH47H6A.js";
14
- import "./chunk-IJBSOWHK.js";
15
- import "./chunk-XWLMZKH2.js";
16
- import "./chunk-L7LQEVTE.js";
17
- import "./chunk-GJXOFDJT.js";
18
- import "./chunk-PMJG2CXF.js";
19
- import "./chunk-J6KL3COD.js";
20
- export {
21
- requireTerminal,
22
- terminalSupport
23
- };
24
- //# sourceMappingURL=host-W6B2O44Q.js.map
@@ -1,25 +0,0 @@
1
- import {
2
- invoke
3
- } from "./chunk-Z5RNKEHF.js";
4
- import "./chunk-DZ2MRTYT.js";
5
- import "./chunk-PIVKGKMR.js";
6
- import "./chunk-7ZWSCSZM.js";
7
- import "./chunk-R2GPCZUX.js";
8
- import "./chunk-TZWLT6FD.js";
9
- import "./chunk-34DECPVC.js";
10
- import "./chunk-IATFWEAX.js";
11
- import "./chunk-NRBQK6UX.js";
12
- import "./chunk-OEH47H6A.js";
13
- import "./chunk-IJBSOWHK.js";
14
- import "./chunk-XWLMZKH2.js";
15
- import "./chunk-L7LQEVTE.js";
16
- import "./chunk-GJXOFDJT.js";
17
- import "./chunk-PMJG2CXF.js";
18
- import "./chunk-ITDJ2EXN.js";
19
- import "./chunk-5OMOPUE6.js";
20
- import "./chunk-BU65MNVU.js";
21
- import "./chunk-J6KL3COD.js";
22
- export {
23
- invoke
24
- };
25
- //# sourceMappingURL=invoke-JRFOK374.js.map