@modootoday/pmcp 0.19.9 → 0.21.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/{apply-TM6B2Y3G.js → apply-6FLMTJDV.js} +57 -23
- package/dist/{attachment-D84OGI6n.d.ts → attachment-ms6s8Aow.d.ts} +1 -1
- package/dist/{available-HYSDAFYH.js → available-BFXLII4A.js} +7 -7
- package/dist/{broadcast-DSCHWUMB.js → broadcast-ZALGUJVR.js} +4 -4
- package/dist/chunk-2GI5RM3M.js +53 -0
- package/dist/{chunk-ICF2JZSN.js → chunk-2MAD4WNZ.js} +2 -2
- package/dist/{chunk-QYQGPDBE.js → chunk-33KGCJB2.js} +2 -2
- package/dist/{chunk-XNPOHPMJ.js → chunk-3X5JQYKN.js} +3 -3
- package/dist/{chunk-4XNAKVSO.js → chunk-57Q75MS4.js} +18 -18
- package/dist/{chunk-2S44RDO4.js → chunk-5FW7A6TG.js} +7 -4
- package/dist/chunk-5YCKFU5Q.js +1672 -0
- package/dist/{chunk-MCYGYZVZ.js → chunk-7FV2LORT.js} +2 -2
- package/dist/{chunk-57FHYW74.js → chunk-DEY23WTH.js} +122 -4
- package/dist/chunk-DJZPPCJP.js +274 -0
- package/dist/{chunk-4XWVLC23.js → chunk-G6JXCUSK.js} +2 -2
- package/dist/{chunk-T6GOWHK6.js → chunk-GFOQDLPL.js} +6 -1
- package/dist/{chunk-PG42KALG.js → chunk-GQP4GWU4.js} +5 -5
- package/dist/chunk-H4ZOKIER.js +7 -0
- package/dist/{chunk-XPWIJOZT.js → chunk-JQVSDPFL.js} +3 -3
- package/dist/{chunk-OG7QR2DP.js → chunk-KEHB4FZP.js} +17 -2
- package/dist/chunk-KUBHGVTD.js +126 -0
- package/dist/{chunk-SPUCY4AG.js → chunk-KVNNVLJR.js} +2 -2
- package/dist/chunk-LFFIQBNY.js +115 -0
- package/dist/{chunk-V7HG3STC.js → chunk-MR5IBS6L.js} +31 -15
- package/dist/{chunk-W5RLIUNC.js → chunk-NHUMPEPV.js} +2 -2
- package/dist/{chunk-I4DLMIN5.js → chunk-OFJIMBTL.js} +2 -2
- package/dist/{chunk-A6TM4NTI.js → chunk-OFPNCLG7.js} +2 -2
- package/dist/{chunk-3UOFHLY4.js → chunk-OS5DF3LL.js} +207 -15
- package/dist/{chunk-BZ2RXI5I.js → chunk-POTI2RJ6.js} +2 -2
- package/dist/{chunk-QTKD7JEL.js → chunk-R3MVL67T.js} +34 -34
- package/dist/{chunk-YN5GQCHN.js → chunk-RHJEGLYM.js} +6 -1
- package/dist/{chunk-YKU7KHJO.js → chunk-TBKVC2TA.js} +3 -5
- package/dist/{chunk-YYG3GUQW.js → chunk-UFWQTZDX.js} +29 -17
- package/dist/{chunk-PBDPWE5J.js → chunk-VBDDFO2V.js} +2 -2
- package/dist/{chunk-BRSESCGX.js → chunk-VUM6LO77.js} +4717 -4694
- package/dist/{chunk-FR6JHNLC.js → chunk-YLITJLTR.js} +3 -3
- package/dist/{chunk-CJ6OFTS3.js → chunk-YOWIYFIV.js} +6 -37
- package/dist/{chunk-VDBUZKXC.js → chunk-Z4Q6RYJH.js} +2 -2
- package/dist/{chunk-RRKGSYQ4.js → chunk-Z6WRFOFT.js} +13 -2
- package/dist/{chunk-YXAPCHXJ.js → chunk-ZIJ5IUXH.js} +31 -5
- package/dist/{claude-2C5L2HQL.js → claude-XVLF4N4S.js} +3 -3
- package/dist/{cli-BVRPAI23.js → cli-6FWRBCWM.js} +8 -8
- package/dist/{cli-YV6SFE4D.js → cli-RVPR3MH3.js} +7 -7
- package/dist/cli.js +11 -11
- package/dist/{completion-B3UT3GVI.js → completion-YTPHEVEW.js} +7 -7
- package/dist/{diagnostics-ONIAKCA3.js → diagnostics-IW54MLFK.js} +5 -6
- package/dist/{doctor-MJFU5L6R.js → doctor-EN4JPSKV.js} +35 -35
- package/dist/{entry-DZGKCL4G.js → entry-TQWSDTJ4.js} +14 -15
- package/dist/{exec-mcp-QK2VC6RX.js → exec-mcp-KKQ75N5O.js} +15 -13
- package/dist/{harness-GTED4GLK.js → harness-EB76F6BG.js} +6 -6
- package/dist/harness-launch-gate.js +3 -4
- package/dist/harness-worker.js +5 -6
- package/dist/hook-body.js +281 -98
- package/dist/{hook-spec-C7umArqw.d.ts → hook-spec-hZL4MSgi.d.ts} +8 -3
- package/dist/hooks-YWSHUNLM.js +24 -0
- package/dist/{host-AGNF2AQH.js → host-LSVITS6M.js} +6 -7
- package/dist/{host-3HTCZNVJ.js → host-OGGADMBT.js} +17 -15
- package/dist/{host-run-2OQZVQID.js → host-run-XO2TS4JC.js} +5 -7
- package/dist/http.d.ts +1 -1
- package/dist/http.js +1 -1
- package/dist/{import-mcp-7KEPR2B6.js → import-mcp-BJDJTPVS.js} +14 -11
- package/dist/index.d.ts +12 -3
- package/dist/index.js +25 -25
- package/dist/{init-BHGCF7JL.js → init-773PTQM5.js} +3 -3
- package/dist/{install-HF6CROQP.js → install-7V6NIA7W.js} +4 -4
- package/dist/{invoke-CVHF6PEK.js → invoke-Y7XH5S2L.js} +7 -8
- package/dist/{list-6XGQ3FR3.js → list-5W65XVES.js} +20 -17
- package/dist/{logout-6RJLG2KG.js → logout-XO6ALD45.js} +15 -12
- package/dist/{logs-VTW7S2LR.js → logs-74JGLQG6.js} +4 -4
- package/dist/mailbox/index.d.ts +3 -3
- package/dist/{mailbox-CNAONXN7.js → mailbox-VK5AVTHI.js} +9 -9
- package/dist/{mainline-JSG4MUKH.js → mainline-M2NSTAGC.js} +105 -36
- package/dist/{mcp-P55VLQLR.js → mcp-R62ZNVGJ.js} +2 -2
- package/dist/{pause-V5VCNOSH.js → pause-CZ2OZYLC.js} +4 -4
- package/dist/project/hook-adapter.d.ts +1 -1
- package/dist/{project-B57IQPDK.js → project-W5DQIZA6.js} +5 -5
- package/dist/{pty-FD4JGBZL.js → pty-CDLQ4NP2.js} +3 -3
- package/dist/report-Z3JV2PCT.js +105 -0
- package/dist/{resume-7S4K3R4X.js → resume-DFIHT2RO.js} +4 -4
- package/dist/{run-MC2BPLOE.js → run-OZLGSRHF.js} +14 -11
- package/dist/{run-LFJXONLW.js → run-WYJMTLX7.js} +4 -4
- package/dist/{serve-TFAEVXX3.js → serve-DCQGAGB7.js} +3 -3
- package/dist/{session-XM2CR425.js → session-YZVX4NGN.js} +4 -4
- package/dist/{setup-FHFQZJY6.js → setup-D3KEJBGO.js} +4 -4
- package/dist/smoke-FQQJOQBD.js +16 -0
- package/dist/{start-login-KXOHCR5A.js → start-login-EKXM75XQ.js} +15 -12
- package/dist/{status-YXOIEVOJ.js → status-23UDIYYP.js} +39 -22
- package/dist/{status-OYRB3KL5.js → status-3RTGDN2K.js} +10 -10
- package/dist/{status-AW7DOW7A.js → status-EDSEG32U.js} +15 -12
- package/dist/stdio.d.ts +2 -2
- package/dist/stdio.js +2 -2
- package/dist/{sweep-ZSYG6FNR.js → sweep-EPJMEZR6.js} +4 -4
- package/dist/{test-2HTOY4PJ.js → test-TM6PIZTV.js} +26 -18
- package/dist/{tui-DQFXYQ4H.js → tui-EQNJIDN5.js} +4 -4
- package/dist/{unbroadcast-FONZJWEW.js → unbroadcast-NTOC3PY3.js} +4 -4
- package/dist/{validate-WOFI7TMT.js → validate-KFBCUFI4.js} +2 -2
- package/dist/{worker-UXPGXAV2.js → worker-7X6WBPEI.js} +9 -10
- package/dist/{worktree-list-4PLE7K6L.js → worktree-list-EMKUMCTQ.js} +2 -2
- package/dist/{worktree-sync-GQVYAXGJ.js → worktree-sync-T6C5YEYS.js} +3 -3
- package/docs/commands.md +13 -6
- package/docs/git-workflow.md +46 -10
- package/docs/hooks.md +139 -12
- package/docs/project-configuration.md +34 -6
- package/docs/upgrading.md +94 -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/mod/reader/read.ts +14 -4
- package/plugins/pmcp/mod/sessions/format.ts +16 -1
- package/plugins/pmcp/mod/sessions/types.ts +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/schema/catalog-v1.json +1 -7
- package/dist/chunk-EONAJAMJ.js +0 -130
- package/dist/chunk-IACJDHFQ.js +0 -1025
- package/dist/chunk-ISNRDHSD.js +0 -74
- package/dist/chunk-YGTJQVCK.js +0 -7
- package/dist/chunk-YLPXTJJM.js +0 -396
- package/dist/hooks-FRZ4SUNJ.js +0 -21
- package/dist/{core-C1LPjxK6.d.ts → core-Sug_rZrx.d.ts} +1 -1
package/docs/commands.md
CHANGED
|
@@ -20,7 +20,7 @@ An unrecognised command does not fall through to a server the caller did not ask
|
|
|
20
20
|
pmcp status [--config <file>] [--json]
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
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,
|
|
23
|
+
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 2 when projection or worktree ahead/behind drift exists or a budget limit is exceeded. Missing or invalid input follows the normal usage/failure exit contract. Human output is a compact summary on stderr; JSON retains the full details.
|
|
24
24
|
|
|
25
25
|
## init
|
|
26
26
|
|
|
@@ -44,6 +44,13 @@ Session state is isolated in a temporary directory, then removed. Commands and p
|
|
|
44
44
|
|
|
45
45
|
`--session-state` accepts a JSON object with optional `records` (session records with valid 8–64 character IDs), `pause` (by, reason, since), `leases` (name to pid, subject, since, optional cwd), and `broadcast` (id, by, text, since). Pause and broadcast may be null. Existing liveness and unseen-broadcast rules apply. This file and the real session store remain unchanged.
|
|
46
46
|
|
|
47
|
+
```sh
|
|
48
|
+
pmcp hooks report [--since 2d] [--json]
|
|
49
|
+
pmcp hooks report --switch-check shell.heredoc [--since 2d] [--json]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`report` summarises the guard lines the hook bundle writes to the project log at debug level (`[logging] level = "debug"`, or `PMCP_LOG=debug`). For each guard and runtime it counts the runs, what the guard found before its mode (`raw`: allow, deny, ask) and what the call got, the modes seen, the sessions, and the p50, p95 and longest durations. Sessions matching a `[hooks.report] exclude_sessions` regex (replays, smoke runs) are left out and counted. `--since` takes a duration such as `10m`, `2h` or `3d`, or an ISO time. `--switch-check <guard>` lists instead the calls that guard found something in and let through, because it was in `observe` or `warn`: what `deny` would have refused. The log holds no command, prompt or transcript text, so neither does the report. `--json` prints `{version, since?, lines, sessions, excluded, guards}`, or `{version, guard, refused}` with `--switch-check`.
|
|
53
|
+
|
|
47
54
|
## Read command JSON schemas
|
|
48
55
|
|
|
49
56
|
These opt-in snapshots write one JSON object and a newline to stdout, with `version: 1`. No color or human summary is mixed into stdout. Errors remain on stderr. Without the flag, existing human output is retained, including MCP status's original unversioned object and logs' JSONL stream. Schemas are named in [schemas.json](https://pmcp.build/commands/schemas.json); each entry under `schemas` uses the shared root `$defs`. Consumers must allow unknown fields inside session, decision and log records. Tokens are never part of an auth status object.
|
|
@@ -133,11 +140,11 @@ Credentials and attachment files contain secrets and must stay outside source co
|
|
|
133
140
|
|
|
134
141
|
```sh
|
|
135
142
|
pmcp project
|
|
136
|
-
pmcp project --check
|
|
143
|
+
pmcp project --check [--smoke]
|
|
137
144
|
pmcp project import-mcp --source codex:/path/to/config.toml
|
|
138
145
|
```
|
|
139
146
|
|
|
140
|
-
Generate selected runtimes' native files from `pmcp.toml`. Unmanaged entries and credential references are preserved; conflicts stop the write. `--check` reports drift without writes, and MCP import previews changes by default; `--write` applies them. [Configuration and guard examples](project-configuration.md).
|
|
147
|
+
Generate selected runtimes' native files from `pmcp.toml`. Unmanaged entries and credential references are preserved; conflicts stop the write. `--check` reports drift without writes, and MCP import previews changes by default; `--write` applies them. `--check --smoke` then runs the `[hooks.test] fixtures` file as `pmcp hooks test --fixtures` does, and exits 2 on any finding. [Configuration and guard examples](project-configuration.md).
|
|
141
148
|
|
|
142
149
|
Configuration files and the ownership lock are replaced atomically one file at a time. If projection is interrupted, inspect with `pmcp project --check`, then run `pmcp project` explicitly to repair drift. Projection does not start a runtime or replay terminal input. The complete set of files is not a single transaction.
|
|
143
150
|
|
|
@@ -173,7 +180,7 @@ Read this project's JSONL logs from the state directory, or the file `[hooks] er
|
|
|
173
180
|
pmcp git worktree create review [--base <ref>]
|
|
174
181
|
pmcp git worktree list
|
|
175
182
|
pmcp git worktree sync
|
|
176
|
-
pmcp git deliver [<commit>...] [--during-pause] [--json]
|
|
183
|
+
pmcp git deliver [<commit>...] [--during-pause] [--no-push] [--json]
|
|
177
184
|
pmcp git sync
|
|
178
185
|
```
|
|
179
186
|
|
|
@@ -182,7 +189,7 @@ The git workflow configured by [`[git]`](git-workflow.md). Each subcommand needs
|
|
|
182
189
|
- `worktree create <alias>` makes a linked worktree under `[git.worktrees] root` on a new branch from the upstream (or `--base`), links the configured files from the main checkout, runs `bootstrap`, and prints the path.
|
|
183
190
|
- `worktree list` prints alias, branch, behind/ahead and path for the main checkout and each linked worktree.
|
|
184
191
|
- `worktree sync` moves the current worktree onto the mainline when that loses nothing; exit 1 when it is held back.
|
|
185
|
-
- `deliver` fetches, replays the named commits (default: the ones the upstream lacks) onto the mainline, runs the gate in its own tree under a lock, and pushes; it replays again if the mainline moved. A delivery that touches a leased path holds that lease until it has pushed and installed, and it refuses during a pause unless `--during-pause` or `during_pause = "allow"`. Exit 0 delivered or nothing to deliver
|
|
192
|
+
- `deliver` fetches, replays the named commits (default: the ones the upstream lacks) onto the mainline, runs the gate in its own tree under a lock, and pushes; it replays again if the mainline moved. A delivery that touches a leased path holds that lease until it has pushed and installed, and it refuses during a pause unless `--during-pause` or `during_pause = "allow"`. `--no-push` replays and runs the gate command, then stops: it takes no lease and pushes, syncs and notifies nothing, and it refuses `gate = "pre-push"`, where the push is the gate. Exit 0 delivered, gated with `--no-push`, or nothing to deliver; 1 refused, gate failed or attempts exhausted; 2 fetch failed or `--no-push` with the pre-push gate.
|
|
186
193
|
- `sync` moves the main checkout to the mainline, installs when a listed file changed, and follows clean submodule pins. Exit 0 moved or already equal, 1 when local work would be lost, 2 when blocked (undelivered edits) or the fetch failed.
|
|
187
194
|
|
|
188
195
|
## completion
|
|
@@ -212,7 +219,7 @@ pmcp doctor
|
|
|
212
219
|
pmcp doctor --memory
|
|
213
220
|
```
|
|
214
221
|
|
|
215
|
-
Inspect native configuration and prerequisites. The optional memory report shows enabled state and paths; it does not read memory contents or synchronize personal memory. [Doctor scope and runtime compatibility](project-configuration.md).
|
|
222
|
+
Inspect native configuration and prerequisites, including [native hook entries pmcp does not own](hooks.md#native-hook-entries-pmcp-does-not-own), which `project --check` also checks. The optional memory report shows enabled state and paths; it does not read memory contents or synchronize personal memory. [Doctor scope and runtime compatibility](project-configuration.md).
|
|
216
223
|
|
|
217
224
|
## validate
|
|
218
225
|
|
package/docs/git-workflow.md
CHANGED
|
@@ -18,8 +18,8 @@ repository that also has linked worktrees, tracks the files it edits there,
|
|
|
18
18
|
and names leftovers not yet delivered, because they block syncing the shared main for
|
|
19
19
|
everyone. Keys: `enabled` (`"auto"` default, following `[git] enabled`, or a
|
|
20
20
|
boolean), `warn_on_session`, `track_edits`, `warn_claimants` (booleans, default
|
|
21
|
-
`true`).
|
|
22
|
-
|
|
21
|
+
`true`). Like every feature it is opt-in: declare the table, even empty, to
|
|
22
|
+
turn it on.
|
|
23
23
|
|
|
24
24
|
`[git.worktrees]` configures the linked worktrees `pmcp git worktree` creates:
|
|
25
25
|
|
|
@@ -78,22 +78,58 @@ the fetched mainline, runs the gate, and pushes one delivery at a time:
|
|
|
78
78
|
`attempts` (default `3`), `refuse_direct_push` (default `true`: a hook refuses
|
|
79
79
|
`git push` from any checkout of this repository, so the mainline moves only
|
|
80
80
|
through delivery), `during_pause` (`"refuse"` default or `"allow"`),
|
|
81
|
-
`lease_wait_seconds` (default `3600`)
|
|
82
|
-
delivery)
|
|
81
|
+
`lease_wait_seconds` (default `3600`), `notify` (argv run after a
|
|
82
|
+
delivery), `gate` and `push_env`.
|
|
83
|
+
|
|
84
|
+
A commit is already on the mainline when `git cherry` finds the same patch there,
|
|
85
|
+
or when it only moves submodule pins, each to a commit that the mainline's pin for
|
|
86
|
+
that path equals or contains. Containment is read in the submodule's checkout,
|
|
87
|
+
else in the repository git keeps for it, and without either the commit counts as
|
|
88
|
+
missing. Delivery skips such a commit; `pmcp git sync` and worktree sync move past
|
|
89
|
+
it as a landed duplicate, so another session's newer pin never makes a replay
|
|
90
|
+
conflict or a sync refusal.
|
|
91
|
+
|
|
92
|
+
The push of a delivery runs the repository's own hooks, so a pre-push hook that
|
|
93
|
+
gates as well needs one of two set-ups.
|
|
94
|
+
|
|
95
|
+
- `gate = "pre-push"` makes that hook the gate: pmcp takes the lock, replays and
|
|
96
|
+
retries, runs no `[git.mainline.gate] command` (declaring one is an error),
|
|
97
|
+
and pushes with `lock_env` set to `1`, so a hook that takes the same lock does
|
|
98
|
+
not wait on pmcp. The push output streams to the terminal as it comes and is
|
|
99
|
+
kept as the gate log, and a refused push is a failed gate.
|
|
100
|
+
- `gate = "command"` (the default) keeps pmcp's command as the gate.
|
|
101
|
+
`push_env` (a table of variable names to strings, default `{}`) adds variables
|
|
102
|
+
to the push alone in either mode, so a hook can recognise a delivery that was
|
|
103
|
+
already gated and step aside.
|
|
104
|
+
|
|
105
|
+
Every delivery push also carries `PMCP_GIT_DELIVER=1`. In command mode the lock
|
|
106
|
+
variable reaches the push only if `push_env` names it.
|
|
83
107
|
|
|
84
108
|
`pmcp git deliver --json` prints one receipt on stdout when it ends, progress
|
|
85
|
-
staying on stderr: `{ok, code, delivered, upstream, attempts,
|
|
86
|
-
reason?}`, where `delivered` is the upstream commit it pushed (or
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
109
|
+
staying on stderr: `{ok, code, delivered, upstream, attempts, replayed, gate,
|
|
110
|
+
leases, sync, reason?}`, where `delivered` is the upstream commit it pushed (or
|
|
111
|
+
`null`), `replayed` the tip of its last replay onto the upstream (or `null`),
|
|
112
|
+
`gate` is `{exit, log, by}` for the last gate run (or `null`; `by` is
|
|
113
|
+
`"command"` or `"pre-push"`), `leases` the leases it took, `sync` the main
|
|
114
|
+
checkout's sync after the delivery (or `null` when none ran) as
|
|
115
|
+
`{from, to, code, reason?}`: the main checkout's HEAD before and after, the exit
|
|
116
|
+
code `pmcp git sync` would have, and its last warning; and `reason` is the last
|
|
117
|
+
refusal or failure. `--no-push` stops after the gate, so its receipt has
|
|
118
|
+
`replayed` and `gate` but `delivered` and `sync` are `null`.
|
|
119
|
+
Exit codes: `0` delivered or nothing to deliver, even when the sync after it was
|
|
120
|
+
refused; `1` refused, a lease or the gate lock held too long, a replay
|
|
90
121
|
conflict, the gate failed, the push failed or it gave up after `attempts`; `2`
|
|
91
122
|
fetch failed or no configuration.
|
|
92
123
|
|
|
93
124
|
`[git.mainline.sync]` enables `pmcp git sync`, which moves the main checkout to
|
|
94
125
|
the mainline: `install` (argv), `install_when_changed` (paths; when no
|
|
95
126
|
`[sessions.leases]` are declared, these become an implicit `lockfile` lease),
|
|
96
|
-
`keep_identical_files` and `refuse_with_unlanded` (booleans, default `true`)
|
|
127
|
+
`keep_identical_files` and `refuse_with_unlanded` (booleans, default `true`) and
|
|
128
|
+
`after_deliver`. With the table present, a delivery syncs the main checkout once it is
|
|
129
|
+
delivered, holding its leases through the install: `after_deliver = "from_main"`
|
|
130
|
+
(the default) does so only for a delivery run in the main checkout, `"always"`
|
|
131
|
+
also for one run in a linked worktree, and `"off"` never. Every refusal of
|
|
132
|
+
`pmcp git sync` still applies, and a refused sync leaves the delivery a success.
|
|
97
133
|
|
|
98
134
|
After a successful install, sync records the hash it installed in a stamp and
|
|
99
135
|
installs again only when that hash changes. By default the stamp is pmcp's own,
|
package/docs/hooks.md
CHANGED
|
@@ -31,8 +31,7 @@ compile cache off.
|
|
|
31
31
|
|
|
32
32
|
Every feature is opt-in: a table that is missing turns its feature off, and a
|
|
33
33
|
declared table, even an empty one, turns it on. The exceptions are documented
|
|
34
|
-
where they apply: `[git]` features detect git (`enabled = "auto"`),
|
|
35
|
-
`[git.shared_checkout]` is on in any git checkout once the bundle exists, and
|
|
34
|
+
where they apply: declared `[git]` features detect git (`enabled = "auto"`), and
|
|
36
35
|
logging falls back to its defaults rather than to no logging. The bundle is
|
|
37
36
|
projected only when `[hooks]` declares guards or checks, a `[sessions.*]`
|
|
38
37
|
feature table is declared, `[git.shared_checkout]` or `[git.worktrees.sync]` is
|
|
@@ -105,18 +104,128 @@ command the parser cannot read is judged by a conservative pattern instead.
|
|
|
105
104
|
|
|
106
105
|
## `[[hooks.guards.custom]]`
|
|
107
106
|
|
|
108
|
-
A project
|
|
107
|
+
A project command that decides like a built-in guard: a script under
|
|
108
|
+
`.agents/guards/`, or an installed program pinned by its version.
|
|
109
|
+
|
|
110
|
+
| Key | Type | Default | Meaning |
|
|
111
|
+
| ------------ | --------- | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| `name` | string | required | `^[a-z0-9][a-z0-9-]*$`, unique across custom, shell and edit entries. |
|
|
113
|
+
| `command` | argv list | required | Without `version`, the first or second element is the script, which must exist inside `.agents/guards/`; its sha256 is pinned in `policy.json`. With `version`, the first element is the program, found on `PATH`. |
|
|
114
|
+
| `version` | string | none | The version an installed program reports: `pmcp project`, `pmcp project --check` and `pmcp doctor` run `<program> --version` and refuse when the output does not contain it as a whole token (`1.2.3` matches `tool v1.2.3`, not `1.2.30`). A script under `.agents/guards/` cannot take one. |
|
|
115
|
+
| `targets` | list | required | Any `[hooks] targets` runtime. A runtime in `[hooks] targets` runs it in the hook bundle; otherwise Codex, Gemini and Antigravity use the shell adapter, and Claude, Grok and OpenCode are an error. |
|
|
116
|
+
| `timeout_ms` | integer | `15000` | 100 to 60000. |
|
|
117
|
+
| `on` | string | `"before_shell"` | `before_shell`, `after_edit`, `prompt`, `stop` or `session_start`. |
|
|
118
|
+
| `mode` | string | `"deny"` | `deny`, `ask`, `warn`, `observe` or `off`, as for a built-in guard. |
|
|
119
|
+
|
|
120
|
+
What a refusal (`mode = "deny"`) does depends on the event and the runtime; pmcp
|
|
121
|
+
renders it as each runtime's hooks can take it, and where one cannot, the reason
|
|
122
|
+
goes nowhere:
|
|
123
|
+
|
|
124
|
+
| `on` | Claude Code | Codex | Gemini, OpenCode | Antigravity | Grok |
|
|
125
|
+
| --------------- | ------------------------------------ | ------------------------------------ | --------------------- | ---------------------------------- | ----------------------------------------------- |
|
|
126
|
+
| `before_shell` | refuses the call (`ask` asks) | refuses the call | refuses the call | refuses the call | refuses the call |
|
|
127
|
+
| `after_edit` | the reason as feedback | the reason as feedback | the reason as context | nothing | the reason as context |
|
|
128
|
+
| `prompt` | blocks the prompt, with the reason | blocks the prompt, with the reason | the reason as context | the reason as a message | nothing |
|
|
129
|
+
| `stop` | keeps the turn going with the reason | keeps the turn going with the reason | nothing | continues the turn with the reason | the reason as context, which continues the turn |
|
|
130
|
+
| `session_start` | the reason as context | the reason as context | the reason as context | the reason as a message | the reason as context at its next tool call |
|
|
131
|
+
|
|
132
|
+
With `mode = "warn"` the reason reaches every runtime as context, at that event
|
|
133
|
+
or, where the runtime takes none there, at the next event that carries context.
|
|
134
|
+
A session cannot be refused at its start, so on `session_start` the modes
|
|
135
|
+
`deny` and `ask` act as `warn`. `ask` asks only in Claude Code; elsewhere
|
|
136
|
+
`[hooks] ask_fallback` decides. A turn kept going by `stop` is not kept going
|
|
137
|
+
again by the stop that ends it.
|
|
138
|
+
|
|
139
|
+
### The guard contract, `pmcp.guard.v1`
|
|
140
|
+
|
|
141
|
+
The command gets one JSON object on stdin:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"protocol": "pmcp.guard.v1",
|
|
146
|
+
"runtime": "claude",
|
|
147
|
+
"event": "before_shell",
|
|
148
|
+
"session": "<session id>",
|
|
149
|
+
"command": "<the shell command, or empty>",
|
|
150
|
+
"cwd": "<the session's directory>",
|
|
151
|
+
"paths": ["<the edited paths, after_edit>"],
|
|
152
|
+
"prompt": "<the prompt text, on prompt only>"
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
It runs in the project root with only `PATH` and `LANG`, and answers on stdout
|
|
157
|
+
with one JSON object and exit 0:
|
|
109
158
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"decision": "deny",
|
|
162
|
+
"reason": "why",
|
|
163
|
+
"findings": [{ "path": "src/a.ts", "line": 3, "message": "what is wrong" }]
|
|
164
|
+
}
|
|
165
|
+
```
|
|
117
166
|
|
|
118
|
-
|
|
119
|
-
|
|
167
|
+
`decision` is `allow` or `deny`; `reason` and `findings` are optional, and
|
|
168
|
+
`protocol`, when echoed, must be `pmcp.guard.v1`. Each finding needs `message`
|
|
169
|
+
and may give `path` and `line` (a whole number from 1). Up to 20 findings are
|
|
170
|
+
added to a refusal's reason, one `path:line: message` line each, and findings
|
|
171
|
+
with `allow` reach the session as a note; either way the guard log records how
|
|
172
|
+
many there were. Any other reply, a nonzero exit, or running past `timeout_ms`
|
|
173
|
+
is a failed guard, which refuses. A guard written for the earlier contract, which
|
|
174
|
+
had no `protocol`, `session`, `prompt` or `findings`, keeps working unchanged.
|
|
175
|
+
|
|
176
|
+
`mode` means what it does for a built-in guard: the script runs and its refusal
|
|
177
|
+
is a deny, an ask, a note in the session's context (`warn`), or only a log line
|
|
178
|
+
(`observe`); `off` does not run it. The guard log records the script's own
|
|
179
|
+
verdict as `raw` in every mode. Only the hook bundle applies a mode: a runtime
|
|
180
|
+
the shell adapter serves (Codex, Gemini or Antigravity outside `[hooks]
|
|
181
|
+
targets`) can only refuse, so a mode other than `deny` there is a configuration
|
|
182
|
+
error naming the guard, the mode and the runtime. The same holds for `on` other
|
|
183
|
+
than `before_shell` or `after_edit` and for an installed program with `version`:
|
|
184
|
+
the shell adapter runs neither, and keeps the earlier contract below.
|
|
185
|
+
|
|
186
|
+
A command that needs to end a session's turn with a check of its own (tests, a
|
|
187
|
+
linter, a generated-file check) is a custom guard with `on = "stop"` and
|
|
188
|
+
`mode = "warn"`.
|
|
189
|
+
|
|
190
|
+
## `[hooks.report]`
|
|
191
|
+
|
|
192
|
+
Read by [`pmcp hooks report`](commands.md#hooks) alone; it changes nothing in the
|
|
193
|
+
hooks.
|
|
194
|
+
|
|
195
|
+
| Key | Type | Default | Meaning |
|
|
196
|
+
| ------------------ | ---- | ------- | --------------------------------------------------------------------------------- |
|
|
197
|
+
| `exclude_sessions` | list | `[]` | Regexes; guard log lines of a session id matching one are left out of the report. |
|
|
198
|
+
|
|
199
|
+
## `[hooks.test]`
|
|
200
|
+
|
|
201
|
+
| Key | Type | Default | Meaning |
|
|
202
|
+
| ---------- | ---- | ------- | --------------------------------------------------------------------------------------------- |
|
|
203
|
+
| `fixtures` | path | none | The cases `pmcp project --check --smoke` runs; relative to the directory holding `pmcp.toml`. |
|
|
204
|
+
|
|
205
|
+
A fixtures file is JSON: `{cases, failure?}`. Each case is
|
|
206
|
+
`{name, guard, command, cwd?, expect}`, where `guard` is the guard the case is
|
|
207
|
+
about (`shell.heredoc`, `custom.<name>`), `cwd = "linked-worktree"` runs it from a
|
|
208
|
+
scratch repository with a branch checked out in a linked worktree, and `expect`
|
|
209
|
+
is `allow`, `deny` or `ask` for every runtime, or a table of runtime to one of
|
|
210
|
+
them (a runtime left out does not run the case). `failure`, when present, must
|
|
211
|
+
equal the projected `[hooks.failure]` (`{timeoutMs, retry, pass}`).
|
|
212
|
+
|
|
213
|
+
`pmcp hooks test --fixtures <file>` and `pmcp project --check --smoke` run each
|
|
214
|
+
case through the projected `.agents/pmcp-hooks/hook.mjs`, once per `[hooks]
|
|
215
|
+
targets` runtime that answers a shell call, with that runtime's own payload. The
|
|
216
|
+
command is classified by the guards, never run; state goes to a throwaway
|
|
217
|
+
`XDG_STATE_HOME`, and `GIT_*` variables are removed, so a run from inside a git
|
|
218
|
+
hook does not look at the repository being committed. Findings:
|
|
219
|
+
|
|
220
|
+
- a decision that differs from `expect`, or a hook that fails or times out;
|
|
221
|
+
- coverage: every guard that can refuse (`deny`, `ask` or `graded`, including
|
|
222
|
+
custom guards on `before_shell`) needs, per runtime, one case it refuses and
|
|
223
|
+
one it lets through;
|
|
224
|
+
- `[hooks.failure]` differing from the fixtures' `failure`;
|
|
225
|
+
- a target whose native hook entry is missing, and a run in which no case ran.
|
|
226
|
+
|
|
227
|
+
`hooks test --fixtures` exits 0 with no finding and 1 otherwise; `project --check
|
|
228
|
+
--smoke` exits 2 on a finding, as for drift.
|
|
120
229
|
|
|
121
230
|
## `[hooks.failure]`
|
|
122
231
|
|
|
@@ -167,6 +276,24 @@ as `projector.json`), and only at the version `pmcp.lock` records. A pmcp on
|
|
|
167
276
|
`PATH` is never used. When none matches, the session hears
|
|
168
277
|
`projecting pmcp not available` once instead of a drift report.
|
|
169
278
|
|
|
279
|
+
## Native hook entries pmcp does not own
|
|
280
|
+
|
|
281
|
+
Hook entries a project or a tool wrote itself run beside pmcp's, and a broken one
|
|
282
|
+
fails every call it matches. `pmcp project --check` (exit 2) and `pmcp doctor`
|
|
283
|
+
check each such entry in `.claude/settings.json`, `.claude/settings.local.json`,
|
|
284
|
+
`.codex/hooks.json`, and the `hooks/hooks.json` (or the manifest's `hooks` path)
|
|
285
|
+
of each plugin whose `.claude-plugin/plugin.json` is tracked by git. Entries that
|
|
286
|
+
run `.agents/pmcp-hooks/` are pmcp's and are not checked here.
|
|
287
|
+
|
|
288
|
+
The command's first simple command is read, never run. A leading `NAME=value`
|
|
289
|
+
is skipped; `$CLAUDE_PROJECT_DIR` is the project root, `${CLAUDE_PLUGIN_ROOT}` the
|
|
290
|
+
plugin's directory (an error outside a plugin), and `~` and `$HOME` the home
|
|
291
|
+
directory. A program run directly must be an existing file that is executable
|
|
292
|
+
and starts with `#!`; a script given to an interpreter (`node`, `bun`, `deno`,
|
|
293
|
+
`tsx`, `python`, `python3`, `bash`, `sh`, `zsh`, `dash`, `ruby`, `perl`) must
|
|
294
|
+
exist. A bare program name found on `PATH`, inline code (`node -e`) and a path
|
|
295
|
+
built from another variable are not checked.
|
|
296
|
+
|
|
170
297
|
## Runtime support
|
|
171
298
|
|
|
172
299
|
From the measured capability files in `docs/hooks/capabilities/` (Claude Code
|
|
@@ -36,11 +36,11 @@ deny_list = "private-terms.txt"
|
|
|
36
36
|
tiers = ["open", "free", "paid", "internal"]
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
| Key | Type | Default | Meaning
|
|
40
|
-
| ----------- | ------ | -------------------------------------- |
|
|
41
|
-
| `profile` | string | none | `catalog-v1`:
|
|
42
|
-
| `deny_list` | path | none | A file of terms, one per line (`#` starts a comment), that no file of a skill may contain, compared without case. Relative to `pmcp.toml`. A finding names the list line, never the term. A missing file is an error.
|
|
43
|
-
| `tiers` | list | `["open", "free", "paid", "internal"]` | The tier names this catalog uses, lowest first, in kebab case. `catalog-v1` reports a tier outside the list as `tier.unknown`; its tier-specific rules know only the four default names. The metadata schema itself takes any kebab-case name.
|
|
39
|
+
| Key | Type | Default | Meaning |
|
|
40
|
+
| ----------- | ------ | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
41
|
+
| `profile` | string | none | `catalog-v1`: general marketplace catalog rules (strict metadata, name equal to the directory, tier inheritance, ASCII descriptions, approval for scripts, locales); the marketplace's tier applies, else the skill's own `metadata.tier`, else `open`. `library`: the manual library skill metadata schema. |
|
|
42
|
+
| `deny_list` | path | none | A file of terms, one per line (`#` starts a comment), that no file of a skill may contain, compared without case. Relative to `pmcp.toml`. A finding names the list line, never the term. A missing file is an error. |
|
|
43
|
+
| `tiers` | list | `["open", "free", "paid", "internal"]` | The tier names this catalog uses, lowest first, in kebab case. `catalog-v1` reports a tier outside the list as `tier.unknown`; its tier-specific rules know only the four default names. The metadata schema itself takes any kebab-case name. |
|
|
44
44
|
|
|
45
45
|
Both apply to named skill directories and, with no directory named, to every
|
|
46
46
|
skill the catalog reaches.
|
|
@@ -58,7 +58,8 @@ 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.*]`
|
|
61
|
+
| `[hooks]`, `[hooks.guards.*]`, `[[hooks.guards.custom]]`, `[hooks.checks.*]`, `[hooks.failure]`, `[hooks.report]`, `[hooks.test]` | [Hooks](hooks.md) |
|
|
62
|
+
| `[budget]` | [Budget](#budget) |
|
|
62
63
|
| `[[hooks.shell]]`, `[[hooks.edit]]` | [Deprecated shell guards](hooks.md#deprecated-shell-guards) |
|
|
63
64
|
| `[sessions]`, `[sessions.registry]`, `[sessions.pause]`, `[sessions.broadcast]`, `[sessions.mailbox]`, `[sessions.leases.<name>]`, `[sessions.roles.<name>]` | [Sessions](#sessions) |
|
|
64
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) |
|
|
@@ -579,6 +580,31 @@ messages too.
|
|
|
579
580
|
|
|
580
581
|
Worktrees, delivery to the mainline and main checkout sync: [Git workflow](git-workflow.md).
|
|
581
582
|
|
|
583
|
+
## Budget
|
|
584
|
+
|
|
585
|
+
`[budget]` sets limits on what every agent session loads and on paths the
|
|
586
|
+
project keeps out of its tree. `pmcp project --check` exits 2 when one is
|
|
587
|
+
exceeded, naming each, and `pmcp status` shows the measurements beside the
|
|
588
|
+
limits (its JSON gains `budget: {rows, problems}`, and an exceeded limit counts
|
|
589
|
+
as drift). Every key is optional; nothing is checked without the table.
|
|
590
|
+
|
|
591
|
+
| Key | Type | Meaning |
|
|
592
|
+
| --------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
593
|
+
| `root_bytes` | integer | Largest size of each of `AGENTS.md`, `CLAUDE.md` and `GEMINI.md` at the root that is a file (a symbolic link to another is not measured twice). |
|
|
594
|
+
| `root_lines` | integer | Largest line count of the same files. |
|
|
595
|
+
| `package_bytes` | integer | Largest size of each tracked `AGENTS.md` below the root, and of each `[rules.packages] file`. |
|
|
596
|
+
| `skills_max` | integer | Most skills under `.agents/skills` (each a folder with a `SKILL.md`), the skills every runtime is offered. |
|
|
597
|
+
| `forbid_paths` | glob list | Tracked paths that must not exist: `*` within a segment, `**` across segments, `?` one character; a glob naming a directory covers everything below it (`docs/adr`). |
|
|
598
|
+
|
|
599
|
+
```toml
|
|
600
|
+
[budget]
|
|
601
|
+
root_bytes = 16000
|
|
602
|
+
root_lines = 300
|
|
603
|
+
package_bytes = 8000
|
|
604
|
+
skills_max = 40
|
|
605
|
+
forbid_paths = [".spec/**", "docs/adr"]
|
|
606
|
+
```
|
|
607
|
+
|
|
582
608
|
## Logging
|
|
583
609
|
|
|
584
610
|
| `[logging]` key | Type | Default | Allowed |
|
|
@@ -700,6 +726,8 @@ allow_commands = [["pmcp", "git", "deliver"], ["git", "log"], ["git", "status"]]
|
|
|
700
726
|
[git]
|
|
701
727
|
remote = "origin"
|
|
702
728
|
|
|
729
|
+
[git.shared_checkout]
|
|
730
|
+
|
|
703
731
|
[git.mainline]
|
|
704
732
|
branch = "main"
|
|
705
733
|
|
package/docs/upgrading.md
CHANGED
|
@@ -5,6 +5,100 @@
|
|
|
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.20 to 0.21
|
|
9
|
+
|
|
10
|
+
**Session records are written to `sessions/` alone.** 0.20 also wrote each record to the
|
|
11
|
+
deprecated `fleet/` in the state directory; 0.21 stops. A tool that still reads `fleet/`
|
|
12
|
+
must read `sessions/<session>.json` instead. pmcp still reads `fleet/`, and of two copies
|
|
13
|
+
uses the one updated last, so a hook bundle from before 0.20 sharing the state directory
|
|
14
|
+
keeps being followed until `pmcp project` runs there again.
|
|
15
|
+
|
|
16
|
+
**`pmcp project --check` also fails on a broken hook entry pmcp does not own.** A command
|
|
17
|
+
in `.claude/settings*.json`, `.codex/hooks.json` or a tracked plugin's `hooks.json` that
|
|
18
|
+
names a missing script, or a script run directly that is not executable or has no `#!`
|
|
19
|
+
line, now makes `--check` exit 2 and `pmcp doctor` report a failure. Fix the entry, or the
|
|
20
|
+
script; [Hooks](hooks.md#native-hook-entries-pmcp-does-not-own) lists what is checked.
|
|
21
|
+
|
|
22
|
+
The rest is new, not removed:
|
|
23
|
+
|
|
24
|
+
- A commit that only moves submodule pins, each to a commit the mainline's pin already
|
|
25
|
+
equals or contains, now counts as delivered. `pmcp git deliver` skips it, and
|
|
26
|
+
`pmcp git sync` and worktree sync move past it instead of refusing.
|
|
27
|
+
- `[git.mainline.sync] after_deliver = "always"` also syncs the main checkout after a
|
|
28
|
+
delivery run in a linked worktree; `"off"` turns the sync after a delivery off. The
|
|
29
|
+
default `"from_main"` is 0.20's behaviour.
|
|
30
|
+
- With `gate = "pre-push"` the push output streams to the terminal as it comes; the gate
|
|
31
|
+
log still keeps all of it.
|
|
32
|
+
- The `pmcp git deliver --json` receipt gains `sync`, the main checkout's sync after the
|
|
33
|
+
delivery, and `replayed`, the tip of the last replay.
|
|
34
|
+
- `pmcp git deliver --no-push` replays and gates, then stops. See
|
|
35
|
+
[Git workflow](git-workflow.md).
|
|
36
|
+
- `[[hooks.guards.custom]]` takes `mode` like a built-in guard (the default `deny` is
|
|
37
|
+
0.20's behaviour), `on = "prompt"`, `"stop"` or `"session_start"`, and an installed
|
|
38
|
+
program pinned by `version` instead of a script. Its request gains `protocol`
|
|
39
|
+
(`pmcp.guard.v1`), `session` and, on `prompt`, `prompt`; its reply may add `findings`.
|
|
40
|
+
A guard that reads only the earlier fields keeps working. See
|
|
41
|
+
[Hooks](hooks.md#hooksguardscustom).
|
|
42
|
+
- `pmcp hooks report` summarises the guard log; `[hooks.report] exclude_sessions` leaves
|
|
43
|
+
sessions out.
|
|
44
|
+
- `pmcp hooks test --fixtures <file>`, and `pmcp project --check --smoke` with
|
|
45
|
+
`[hooks.test] fixtures`, run cases through the projected hooks.
|
|
46
|
+
- `[budget]` limits the root and package instruction files, the skills and the tracked
|
|
47
|
+
paths; `pmcp project --check` enforces it and `pmcp status` shows it. See
|
|
48
|
+
[Budget](project-configuration.md#budget).
|
|
49
|
+
|
|
50
|
+
## From 0.19 to 0.20
|
|
51
|
+
|
|
52
|
+
0.20 removes defaults that suited one kind of project rather than pmcp's users in general.
|
|
53
|
+
Each one stays available as configuration; add the lines below to `pmcp.toml` to keep what
|
|
54
|
+
0.19 did, then run `pmcp project`.
|
|
55
|
+
|
|
56
|
+
**The shared-checkout notice is opt-in.** 0.19 turned `[git.shared_checkout]` on in any git
|
|
57
|
+
checkout once the hook bundle existed. Declare it to keep the notice:
|
|
58
|
+
|
|
59
|
+
```toml
|
|
60
|
+
[git.shared_checkout]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Dated `.bak` files are no longer secret paths by default.** 0.19 treated a file named like
|
|
64
|
+
`config.bak.20261027` as a credential. If yours hold credentials:
|
|
65
|
+
|
|
66
|
+
```toml
|
|
67
|
+
[hooks.guards.shell.secret_exfiltration]
|
|
68
|
+
extra_secret_paths = ['\.bak\.\d{8,}']
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`.env.<name>` directories (`.env.d/`, `.env.local/`) are still caught as `.env` variants.
|
|
72
|
+
|
|
73
|
+
**`bun run git:land` and `bun run git:sync` are no longer lockfile operations by name.** The
|
|
74
|
+
shell classifier had them built in. A project's own landing or sync script is data:
|
|
75
|
+
|
|
76
|
+
- a package script run with `bun`, `npm`, `pnpm` or `yarn run` is matched by
|
|
77
|
+
`[sessions.pause] script_names`, whose default `"^git:"` still covers `git:*` scripts;
|
|
78
|
+
- a script run with `node` is matched by `[sessions.pause] scripts`, for example
|
|
79
|
+
`scripts = ['tools/release/(land|sync)\.mjs$']`.
|
|
80
|
+
|
|
81
|
+
**`catalog-v1` validates general catalog rules only.** `pmcp validate` with
|
|
82
|
+
`[catalog.validation] profile = "catalog-v1"` no longer reports `description.trigger`,
|
|
83
|
+
`keywords.ascii`, `output-license.required`, `server-tools.forbidden`,
|
|
84
|
+
`server-tools.required` or `server-tools.order`. `metadata.server-tools` is an optional list of
|
|
85
|
+
any tool names. A catalog that relies on those rules runs its own check beside
|
|
86
|
+
`pmcp validate`.
|
|
87
|
+
|
|
88
|
+
**Session records move from `fleet/` to `sessions/` in the state directory.** 0.20 writes
|
|
89
|
+
every record to both `sessions/<session>.json` and the deprecated `fleet/<session>.json`, and
|
|
90
|
+
reads both, using the copy updated last, so an older pmcp sharing the state directory (a hook
|
|
91
|
+
bundle not yet projected again) is followed. A tool that reads `fleet/` keeps working through
|
|
92
|
+
0.20; move it to `sessions/` and run `pmcp project` everywhere before 0.21, which stops
|
|
93
|
+
writing `fleet/`. A mail
|
|
94
|
+
recipient's linked worktree is now `worktree` throughout; `desk:<path>` is still accepted as a
|
|
95
|
+
spelling of `worktree:<path>`.
|
|
96
|
+
|
|
97
|
+
**Deliveries can leave gating to the repository's pre-push hook.** This is new, not a
|
|
98
|
+
removal. `[git.mainline.deliver] gate = "pre-push"` and `push_env` are described in
|
|
99
|
+
[Git workflow](git-workflow.md). A delivery's push now always carries `PMCP_GIT_DELIVER=1`, and
|
|
100
|
+
the `--json` receipt's `gate` gains `by`.
|
|
101
|
+
|
|
8
102
|
## From 0.17 to 0.18
|
|
9
103
|
|
|
10
104
|
0.18 replaces tmux with pmcp's own terminal host, so it does not read tmux groups or views.
|
package/gemini-extension.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"mcpServers": {
|
|
5
5
|
"pmcp": {
|
|
6
6
|
"type": "stdio",
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["-y", "@modootoday/pmcp@0.
|
|
8
|
+
"args": ["-y", "@modootoday/pmcp@0.21.0", "serve"]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
package/mcp.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modootoday/pmcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
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.
|
|
140
|
-
"@modootoday/pmcp-linux-arm64": "0.
|
|
141
|
-
"@modootoday/pmcp-darwin-x64": "0.
|
|
142
|
-
"@modootoday/pmcp-darwin-arm64": "0.
|
|
139
|
+
"@modootoday/pmcp-linux-x64": "0.21.0",
|
|
140
|
+
"@modootoday/pmcp-linux-arm64": "0.21.0",
|
|
141
|
+
"@modootoday/pmcp-darwin-x64": "0.21.0",
|
|
142
|
+
"@modootoday/pmcp-darwin-arm64": "0.21.0"
|
|
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.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"description": "Find package skills and use native runtime project configuration.",
|
|
6
6
|
"author": { "name": "modootoday" },
|
|
7
7
|
"license": "Elastic-2.0",
|
package/plugins/pmcp/.mcp.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"mcpServers": {
|
|
5
5
|
"pmcp": {
|
|
6
6
|
"type": "stdio",
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["-y", "@modootoday/pmcp@0.
|
|
8
|
+
"args": ["-y", "@modootoday/pmcp@0.21.0", "serve"]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|