@modootoday/pmcp 0.18.4 → 0.19.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 (103) 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/{apply-75UWIUVQ.js → apply-IPTASVRS.js} +16 -17
  6. package/dist/{broadcast-CBMVOV3G.js → broadcast-56NPEJWM.js} +3 -4
  7. package/dist/{chunk-ARA4VDHD.js → chunk-2DAC45ZT.js} +2 -2
  8. package/dist/{chunk-JS5RTH4I.js → chunk-2Q6MNGU5.js} +2 -2
  9. package/dist/{chunk-ZWLUH3F2.js → chunk-2W6CEJD7.js} +2 -2
  10. package/dist/{chunk-YRGDWUFY.js → chunk-3BLHIEAK.js} +2 -2
  11. package/dist/{chunk-R26RWSFW.js → chunk-3CLLHFP7.js} +2 -2
  12. package/dist/{chunk-HE2C2S5A.js → chunk-3H5FZCKX.js} +3 -3
  13. package/dist/{chunk-TFRJ5QOS.js → chunk-7FAA32PB.js} +3 -3
  14. package/dist/{chunk-DCU2EXQV.js → chunk-D5D3V6RU.js} +4 -4
  15. package/dist/{chunk-LTZH5E3G.js → chunk-DHAPQUEF.js} +235 -30
  16. package/dist/{chunk-LBXO4VPG.js → chunk-E4FJOLPJ.js} +6 -3
  17. package/dist/{chunk-OPYFEHKG.js → chunk-G7JONWL4.js} +29 -1
  18. package/dist/{chunk-4JUSGIMX.js → chunk-G7NN23YK.js} +2 -2
  19. package/dist/chunk-GPSOPGJA.js +7 -0
  20. package/dist/{chunk-LGO2SZAS.js → chunk-IKJOXDCF.js} +2 -2
  21. package/dist/{chunk-QEW4J3IZ.js → chunk-ISNRDHSD.js} +2 -2
  22. package/dist/{chunk-S3PIAMXV.js → chunk-J5XQW2CM.js} +68 -8
  23. package/dist/{chunk-LFR245MZ.js → chunk-JAICIL6H.js} +5 -5
  24. package/dist/{chunk-GZHHEHKY.js → chunk-JJBSYUSQ.js} +19 -7
  25. package/dist/{chunk-YSUINA5Q.js → chunk-MB72PZH7.js} +8 -8
  26. package/dist/{chunk-3CA3NNVH.js → chunk-MFPQDXUQ.js} +5 -5
  27. package/dist/{chunk-VQ2HEGWH.js → chunk-OKW7VKNQ.js} +2 -2
  28. package/dist/{chunk-6UXJ62XJ.js → chunk-OWW5VY4D.js} +3 -3
  29. package/dist/{chunk-OB3P5RMN.js → chunk-U2FPMGEM.js} +2 -2
  30. package/dist/{chunk-XELAZAIM.js → chunk-UD3BEEBQ.js} +54 -12
  31. package/dist/{chunk-EAWPJHJ7.js → chunk-UGODVKBJ.js} +2 -2
  32. package/dist/{chunk-MSOZPOPX.js → chunk-UOLV2AWA.js} +7 -3
  33. package/dist/{chunk-FBIDDE3N.js → chunk-XKGS2FNF.js} +71 -51
  34. package/dist/{chunk-XMXBE5IQ.js → chunk-XS2QM6AT.js} +5 -5
  35. package/dist/{chunk-45Y3KZ3Q.js → chunk-Y65MO2SS.js} +87 -20
  36. package/dist/{chunk-DAR6RGRN.js → chunk-YTSJRA4Z.js} +2 -2
  37. package/dist/{chunk-QBJC4DRP.js → chunk-ZYMJV7YX.js} +14 -14
  38. package/dist/{cli-ZN7ZVDEZ.js → cli-MUP2NSXT.js} +10 -9
  39. package/dist/{cli-MI4ZCAZ3.js → cli-T5LHBUY2.js} +8 -8
  40. package/dist/cli.js +3 -3
  41. package/dist/{completion-WYJAKJE4.js → completion-ZY5P443T.js} +2 -2
  42. package/dist/{diagnostics-ADIVFSBW.js → diagnostics-KUNS6LCZ.js} +12 -12
  43. package/dist/{doctor-BBCS4DF5.js → doctor-UH7KEOSO.js} +18 -19
  44. package/dist/{entry-DMOTX4SS.js → entry-DOUDMRO2.js} +10 -10
  45. package/dist/{exec-mcp-OBUM3DVW.js → exec-mcp-TGW6FXGC.js} +13 -14
  46. package/dist/{harness-6AUE3I4Q.js → harness-7HC6UR2D.js} +3 -3
  47. package/dist/harness-launch-gate.js +4 -4
  48. package/dist/harness-worker.js +6 -6
  49. package/dist/hook-body.js +446 -278
  50. package/dist/{hook-spec-C5fWTSCH.d.ts → hook-spec-0aGt29Pg.d.ts} +22 -2
  51. package/dist/{hooks-HLPQPVRY.js → hooks-L2MKB75Z.js} +3 -3
  52. package/dist/{host-5Q3X6OY7.js → host-OAQZTYII.js} +15 -16
  53. package/dist/{host-LGSWU3PJ.js → host-QSBXKTWT.js} +7 -7
  54. package/dist/{host-run-4NMQQASQ.js → host-run-HFOADX32.js} +10 -6
  55. package/dist/http.js +1 -1
  56. package/dist/{import-mcp-WU7TO2RT.js → import-mcp-BCYXJAIU.js} +11 -12
  57. package/dist/index.d.ts +2 -2
  58. package/dist/index.js +17 -18
  59. package/dist/{init-XA6XXLGA.js → init-NVJVNZOD.js} +2 -2
  60. package/dist/{invoke-CYQZYU5T.js → invoke-KVTEPXSC.js} +8 -8
  61. package/dist/{list-FNGXY5D7.js → list-2VRPMASP.js} +13 -14
  62. package/dist/{logout-N753FBZP.js → logout-6T5ZDLHQ.js} +12 -13
  63. package/dist/{logs-TBUA4UWU.js → logs-H3RPKNTE.js} +3 -4
  64. package/dist/{mailbox-BMTZOSZ7.js → mailbox-O3MX6QPF.js} +3 -4
  65. package/dist/{mainline-KAD2ERLP.js → mainline-DG75NLBS.js} +306 -57
  66. package/dist/{mcp-GR4VXKTG.js → mcp-7UKG5TD3.js} +2 -2
  67. package/dist/{pause-7LILUVGL.js → pause-2HQ7CKMR.js} +3 -4
  68. package/dist/project/hook-adapter.d.ts +1 -1
  69. package/dist/{project-OEBACWEX.js → project-BPKQOSKQ.js} +4 -4
  70. package/dist/{resume-26VFAAMH.js → resume-ETFTR5V3.js} +3 -4
  71. package/dist/{run-MDRUOEFL.js → run-5JD62E7R.js} +11 -12
  72. package/dist/{run-7XNGPU2I.js → run-WGIRM6Z7.js} +4 -4
  73. package/dist/{serve-HXHNWKEK.js → serve-J575WVIU.js} +3 -3
  74. package/dist/setup-T6T2PFC4.js +20 -0
  75. package/dist/{start-login-PWCEKNED.js → start-login-2AYCHWLV.js} +12 -13
  76. package/dist/{status-QFOBQ42J.js → status-2YWTJOMH.js} +20 -27
  77. package/dist/{status-54IYX2FN.js → status-425ZKIE6.js} +12 -13
  78. package/dist/{status-RO55QPKV.js → status-GPSLH4VO.js} +3 -4
  79. package/dist/stdio.js +2 -2
  80. package/dist/{sweep-35LGQTTO.js → sweep-VY2TNOO5.js} +3 -4
  81. package/dist/{test-36ZUVALT.js → test-XBLZOX52.js} +50 -15
  82. package/dist/{tui-CSRW4DN2.js → tui-WNVBHP65.js} +4 -4
  83. package/dist/{unbroadcast-5QNGAJR2.js → unbroadcast-RKTBP57G.js} +3 -4
  84. package/dist/{worker-EODWT4KK.js → worker-CGF3UIJE.js} +8 -8
  85. package/dist/{worktree-create-PZSRB7PH.js → worktree-create-NO4UOOEP.js} +2 -2
  86. package/dist/{worktree-list-JYB6VXLW.js → worktree-list-NEIDD66X.js} +4 -4
  87. package/dist/{worktree-sync-UF5CXPWV.js → worktree-sync-W4BDDLRO.js} +8 -9
  88. package/docs/commands.md +1 -1
  89. package/docs/git-workflow.md +58 -1
  90. package/docs/hooks.md +29 -0
  91. package/docs/project-configuration.md +7 -7
  92. package/gemini-extension.json +2 -2
  93. package/mcp.json +1 -1
  94. package/package.json +5 -5
  95. package/plugin.json +1 -1
  96. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  97. package/plugins/pmcp/.mcp.json +1 -1
  98. package/plugins/pmcp/gemini-extension.json +2 -2
  99. package/plugins/pmcp/mcp.json +1 -1
  100. package/plugins/pmcp/plugin.json +1 -1
  101. package/dist/chunk-26WLNWDG.js +0 -93
  102. package/dist/chunk-MZCRCMEY.js +0 -7
  103. package/dist/setup-DTKZLZUT.js +0 -18
@@ -3,19 +3,18 @@ import {
3
3
  } from "./chunk-YIXDHQYE.js";
4
4
  import {
5
5
  syncWorktree
6
- } from "./chunk-DCU2EXQV.js";
7
- import "./chunk-XELAZAIM.js";
8
- import "./chunk-QEW4J3IZ.js";
9
- import "./chunk-OPYFEHKG.js";
6
+ } from "./chunk-D5D3V6RU.js";
7
+ import {
8
+ installSpec
9
+ } from "./chunk-UD3BEEBQ.js";
10
+ import "./chunk-ISNRDHSD.js";
11
+ import "./chunk-G7JONWL4.js";
10
12
 
11
13
  // src/git/cli/worktree-sync.ts
12
14
  var worktreeSync = (setup, _context, report) => {
13
15
  const { config, ctx } = setup;
14
16
  if (config.worktrees === void 0) off("git.worktrees");
15
- const command = config.sync?.install;
16
- const installs = command !== void 0 && config.worktreeSync?.installAfterMove !== "off";
17
- const when = config.sync?.installWhenChanged ?? [];
18
- const install = installs ? { command, when, stateDir: setup.stateDir } : void 0;
17
+ const install = config.worktreeSync?.installAfterMove !== "off" ? installSpec(config.sync, setup.stateDir) : void 0;
19
18
  const result = syncWorktree({
20
19
  ctx,
21
20
  followSubmodules: config.submodules?.follow === "clean_pins",
@@ -27,4 +26,4 @@ var worktreeSync = (setup, _context, report) => {
27
26
  export {
28
27
  worktreeSync
29
28
  };
30
- //# sourceMappingURL=worktree-sync-UF5CXPWV.js.map
29
+ //# sourceMappingURL=worktree-sync-W4BDDLRO.js.map
package/docs/commands.md CHANGED
@@ -173,7 +173,7 @@ Read this project's JSONL logs from the state directory, or the file `[hooks] er
173
173
  pmcp git worktree create review [--base <ref>]
174
174
  pmcp git worktree list
175
175
  pmcp git worktree sync
176
- pmcp git deliver [<commit>...] [--during-pause]
176
+ pmcp git deliver [<commit>...] [--during-pause] [--json]
177
177
  pmcp git sync
178
178
  ```
179
179
 
@@ -40,7 +40,34 @@ session). Installs never block a session.
40
40
  `[git.mainline.gate]`: `command` (argv; no gate when missing), `tree` (the
41
41
  gate's worktree, default `<state dir>/gate/tree`; a relative path is relative to
42
42
  the main checkout, like `state_dir`), `lock_wait_seconds`
43
- (default `5400`).
43
+ (default `5400`), `lock_env` (an environment variable name), `tree_env` (an
44
+ environment variable name) and `log_dir` (default `<dir of tree>/logs`). Each
45
+ gate's full output goes to `<log_dir>/<UTC time>-<tip>.log` as well as the
46
+ terminal; pmcp names the file when the gate starts and again if it fails, and
47
+ keeps the newest 20. With `max_load` (the 1-minute load average, e.g. `6`) a
48
+ delivery that holds the lock waits until the load is below it before the gate starts,
49
+ checking every 15 seconds for up to `load_wait_seconds` (default `1800`), and then
50
+ fails without running the gate; once started, a gate is never retried.
51
+
52
+ One delivery gates at a time: pmcp takes an exclusive `flock` on the file `lock`
53
+ beside the gate tree (`<dir of tree>/lock`), so another tool that takes the same
54
+ file with `flock` (a workspace land script) and pmcp never gate together. With
55
+ `lock_env` set, pmcp sets that variable to `1` for the gate command and its
56
+ children, and a `pmcp git deliver` started with it already `1` runs under its
57
+ caller's lock instead of waiting for it. `tree_env` names a variable that, when
58
+ set, gives the gate tree instead of `tree`, and so moves the lock and every
59
+ `${gate_dir}/` path with it (a temporary gate for tests or a bootstrap).
60
+ While a delivery holds the lock it keeps `holder.json` beside it,
61
+ `{tip, subject, checkout, pid, startedAt}`, so a tool waiting on the same lock
62
+ can say whose gate it waits for; the file is removed on release.
63
+
64
+ A lease is `<state dir>/<name>-lease.json` unless `[sessions.leases.<name>] file`
65
+ places it elsewhere, for another tool that coordinates the same lockfile; both
66
+ read and write `{pid, subject, cwd, since}`, and a record whose process is gone
67
+ counts as free. With `events` set, each delivery that changed the leased paths
68
+ appends one line there: `{at, subject, commit, hash, installed, lease}`, where
69
+ `commit` is the delivered upstream, `hash` the leased files' hash in the main
70
+ checkout after sync, and `installed` whether sync's install ran for that hash.
44
71
 
45
72
  `[git.mainline.deliver]` enables `pmcp git deliver`, which replays commits onto
46
73
  the fetched mainline, runs the gate, and pushes one delivery at a time:
@@ -50,11 +77,41 @@ through delivery), `during_pause` (`"refuse"` default or `"allow"`),
50
77
  `lease_wait_seconds` (default `3600`) and `notify` (argv run after a
51
78
  delivery).
52
79
 
80
+ `pmcp git deliver --json` prints one receipt on stdout when it ends, progress
81
+ staying on stderr: `{ok, code, delivered, upstream, attempts, gate, leases,
82
+ reason?}`, where `delivered` is the upstream commit it pushed (or `null`), `gate`
83
+ is `{exit, log}` for the last gate run (or `null`), `leases` the leases it took
84
+ and `reason` the last refusal or failure. Exit codes: `0` delivered or nothing
85
+ to deliver; `1` refused, a lease or the gate lock held too long, a replay
86
+ conflict, the gate failed, the push failed or it gave up after `attempts`; `2`
87
+ fetch failed or no configuration.
88
+
53
89
  `[git.mainline.sync]` enables `pmcp git sync`, which moves the main checkout to
54
90
  the mainline: `install` (argv), `install_when_changed` (paths; when no
55
91
  `[sessions.leases]` are declared, these become an implicit `lockfile` lease),
56
92
  `keep_identical_files` and `refuse_with_unlanded` (booleans, default `true`).
57
93
 
94
+ After a successful install, sync records the hash it installed in a stamp and
95
+ installs again only when that hash changes. By default the stamp is pmcp's own,
96
+ in its state directory. `stamp` puts it at a path another tool also reads
97
+ (`${git_dir}/name` is in the checkout's own git directory, so each worktree has
98
+ one; `~/` and absolute paths work too). `stamp_hash = "plain"` makes the hash the
99
+ sha256 of the single `install_when_changed` file's bytes, which other tools can
100
+ compute and write themselves; the default `"pmcp"` hashes every listed path with
101
+ its name. Delivery events record the same hash and whether the stamp matches it.
102
+
58
103
  `[git.submodules]`: `follow = "clean_pins"` (the default when the table is
59
104
  present) moves submodules to the pinned commit when they are clean; `"off"`
60
105
  leaves them. Without the table submodules are not followed.
106
+ `shared` lists submodules other sessions also edit in the main checkout (a
107
+ brand app, for example): those move to the new pin even with uncommitted edits, as
108
+ long as no edited or untracked file is one the pin changes. When one is, the
109
+ submodule stays on the old pin and sync names the files; pmcp never restores,
110
+ stashes or discards them.
111
+
112
+ With `push = "pins"`, `pmcp git deliver` first makes sure every submodule commit the
113
+ delivered commits pin is on that submodule's origin. A pin already on a remote branch
114
+ needs nothing. Otherwise exactly the pinned commit is pushed to the submodule's
115
+ branch (`branch` in `.gitmodules`, else `main`) as a fast-forward, never a later
116
+ commit; if that branch has moved past the pin's base, delivery stops before
117
+ anything else moves.
package/docs/hooks.md CHANGED
@@ -103,6 +103,35 @@ A project script under `.agents/guards/` that decides like a built-in guard.
103
103
  The script receives the JSON contract described under
104
104
  [Deprecated shell guards](#deprecated-shell-guards). Custom guards have no `mode`.
105
105
 
106
+ ## `[hooks.failure]`
107
+
108
+ What a guard that fails to evaluate means for the call: it threw, or it ran past
109
+ `timeout_ms`. A guard's own deny is a verdict and is never affected. Without the
110
+ table a failed guard refuses the call (a bookkeeping guard such as the session
111
+ registry lets it through), as it always has.
112
+
113
+ | Key | Type | Default | Meaning |
114
+ | ------------ | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115
+ | `timeout_ms` | integer | `2000` | Longest one try of a guard may take (100 to 60000). The projected runtime timeout covers every try. |
116
+ | `retry` | integer | `1` | Further tries before the failure counts (0 to 3). |
117
+ | `pass` | list | `[]` | What still goes through after the last try, with a warning: `read` (read tools) and `edit-own-worktree` (edits whose every path is inside the session's linked worktree, never the shared main checkout). Everything else, every shell call included, is refused. |
118
+
119
+ ```toml
120
+ [hooks.failure]
121
+ timeout_ms = 2000
122
+ retry = 1
123
+ pass = ["read", "edit-own-worktree"]
124
+ ```
125
+
126
+ The same applies when the hook as a whole fails (it cannot load its policy, read the
127
+ session store or evaluate): the call is judged by its tool kind alone. A policy that
128
+ no longer matches pmcp.lock is still refused, table or not. The runtime timeout pmcp
129
+ projects covers every try plus the hook's startup, so the runtime never stops the hook
130
+ before the table decides.
131
+
132
+ Either way the call carries one line naming the guard and the cause, e.g.
133
+ `pmcp hooks: sessions.leases failed (timeout 2000 ms); refused`.
134
+
106
135
  ## `[hooks.checks.after_edit]` and `[hooks.checks.on_stop]`
107
136
 
108
137
  Checks report through context and never block; a check that cannot run is
@@ -456,13 +456,13 @@ lives in one directory shared by every checkout of the repository.
456
456
 
457
457
  `store` and `state_dir` alone enable nothing; each feature has its own table:
458
458
 
459
- | Table | Keys | Effect |
460
- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
461
- | `[sessions.registry]` | `liveness` (`"pid_heartbeat"`, the only value), `stale_minutes` (default `30`) | Records each session with its process and heartbeat; `pmcp sessions status` lists them. |
462
- | `[sessions.pause]` | `mode` (`deny` default, `ask`, `warn`, `off`), `refuses` (`"mutating"`), `scripts` (regular expressions, default `[]`: a `node` script matching one also counts as mutating, e.g. your own delivery or sync script) | While `pmcp sessions pause` is in effect, edits and mutating commands are refused for every session but the one that paused; reading continues. |
463
- | `[sessions.broadcast]` | `keep` (default `10`), `deliver_on` (default `["session_start", "prompt", "before_tool"]`; also `after_tool`, `stop`) | Delivers `pmcp sessions broadcast` text once to each session, as context on the listed events. |
464
- | `[sessions.leases.<name>]` | `path` (string, shown in the message and used by git delivery), `blocks` (required list of argv prefixes) | While another session holds lease `<name>`, commands starting with a listed prefix are denied until its delivery finishes. |
465
- | `[sessions.roles.<name>]` | `agent_type` (default `<name>`, also matches `plugin:<name>`), `allow_edits` (default `false`), `allow_commands` (list of argv prefixes, default `[]`) | A subagent of that type may edit only if allowed and run only the listed commands. Claude only. |
459
+ | Table | Keys | Effect |
460
+ | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
461
+ | `[sessions.registry]` | `liveness` (`"pid_heartbeat"`, the only value), `stale_minutes` (default `30`) | Records each session with its process and heartbeat; `pmcp sessions status` lists them. |
462
+ | `[sessions.pause]` | `mode` (`deny` default, `ask`, `warn`, `off`), `refuses` (`"mutating"`), `scripts` (regular expressions, default `[]`: a `node` script matching one also counts as mutating, e.g. your own delivery or sync script) | While `pmcp sessions pause` is in effect, edits and mutating commands are refused for every session but the one that paused; reading continues. |
463
+ | `[sessions.broadcast]` | `keep` (default `10`), `deliver_on` (default `["session_start", "prompt", "before_tool"]`; also `after_tool`, `stop`) | Delivers `pmcp sessions broadcast` text once to each session, as context on the listed events. |
464
+ | `[sessions.leases.<name>]` | `path` (string, shown in the message and used by git delivery), `blocks` (required list of argv prefixes), `file` and `events` (optional paths: absolute, `~/…`, or `${gate_dir}/…` for the directory of the gate tree) | While another session holds lease `<name>`, commands starting with a listed prefix are denied until its delivery finishes. |
465
+ | `[sessions.roles.<name>]` | `agent_type` (default `<name>`, also matches `plugin:<name>`), `allow_edits` (default `false`), `allow_commands` (list of argv prefixes, default `[]`) | A subagent of that type may edit only if allowed and run only the listed commands. Claude only. |
466
466
 
467
467
  These tables have no `mode`, except pause. Without `[sessions.registry]` no
468
468
  session is recorded, and `[ui.claude]` refuses to project.
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.18.4",
3
+ "version": "0.19.1",
4
4
  "mcpServers": {
5
5
  "pmcp": {
6
6
  "type": "stdio",
7
7
  "command": "npx",
8
- "args": ["-y", "@modootoday/pmcp@0.18.4", "serve"]
8
+ "args": ["-y", "@modootoday/pmcp@0.19.1", "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.18.4", "serve"]
7
+ "args": ["-y", "@modootoday/pmcp@0.19.1", "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.18.4",
3
+ "version": "0.19.1",
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.18.4",
140
- "@modootoday/pmcp-linux-arm64": "0.18.4",
141
- "@modootoday/pmcp-darwin-x64": "0.18.4",
142
- "@modootoday/pmcp-darwin-arm64": "0.18.4"
139
+ "@modootoday/pmcp-linux-x64": "0.19.1",
140
+ "@modootoday/pmcp-linux-arm64": "0.19.1",
141
+ "@modootoday/pmcp-darwin-x64": "0.19.1",
142
+ "@modootoday/pmcp-darwin-arm64": "0.19.1"
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.18.4",
4
+ "version": "0.19.1",
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.18.4",
3
+ "version": "0.19.1",
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.18.4", "serve"]
6
+ "args": ["-y", "@modootoday/pmcp@0.19.1", "serve"]
7
7
  }
8
8
  }
9
9
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.18.4",
3
+ "version": "0.19.1",
4
4
  "mcpServers": {
5
5
  "pmcp": {
6
6
  "type": "stdio",
7
7
  "command": "npx",
8
- "args": ["-y", "@modootoday/pmcp@0.18.4", "serve"]
8
+ "args": ["-y", "@modootoday/pmcp@0.19.1", "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.18.4", "serve"]
7
+ "args": ["-y", "@modootoday/pmcp@0.19.1", "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.18.4",
4
+ "version": "0.19.1",
5
5
  "description": "Find package skills and use native runtime project configuration.",
6
6
  "author": { "name": "modootoday" },
7
7
  "license": "Elastic-2.0",
@@ -1,93 +0,0 @@
1
- import {
2
- createFilesStore
3
- } from "./chunk-LTZH5E3G.js";
4
- import {
5
- projectStateDir
6
- } from "./chunk-OEH47H6A.js";
7
-
8
- // src/sessions/settings.ts
9
- var MAILBOX_KEYS = [
10
- "enabled",
11
- "ttl_minutes",
12
- "max_delivered",
13
- "audit",
14
- "wake"
15
- ];
16
- function flag(value, where, fallback) {
17
- if (value === void 0) return fallback;
18
- if (typeof value !== "boolean")
19
- throw new Error(`${where} must be true or false`);
20
- return value;
21
- }
22
- function readMailbox(raw) {
23
- if (raw === void 0)
24
- return { enabled: false, ttlMinutes: 1440, maxDelivered: 5, audit: true };
25
- const mailbox = table(raw, "[sessions.mailbox]");
26
- const unknown = Object.keys(mailbox).find(
27
- (key) => !MAILBOX_KEYS.includes(key)
28
- );
29
- if (unknown) throw new Error(`[sessions.mailbox] unknown key ${unknown}`);
30
- return {
31
- enabled: flag(mailbox["enabled"], "[sessions.mailbox] enabled", true),
32
- ttlMinutes: positiveInteger(
33
- mailbox["ttl_minutes"],
34
- "[sessions.mailbox] ttl_minutes",
35
- 1440
36
- ),
37
- maxDelivered: positiveInteger(
38
- mailbox["max_delivered"],
39
- "[sessions.mailbox] max_delivered",
40
- 5
41
- ),
42
- audit: flag(mailbox["audit"], "[sessions.mailbox] audit", true),
43
- // Only when on, so mailboxes without wake keep the same compiled policy and hash.
44
- ...flag(mailbox["wake"], "[sessions.mailbox] wake", false) ? { wake: true } : {}
45
- };
46
- }
47
- function table(value, where) {
48
- if (value === void 0) return {};
49
- if (value === null || typeof value !== "object" || Array.isArray(value))
50
- throw new Error(`${where} must be a table`);
51
- return value;
52
- }
53
- function positiveInteger(value, where, fallback) {
54
- if (value === void 0) return fallback;
55
- if (typeof value !== "number" || !Number.isSafeInteger(value) || value <= 0) {
56
- throw new Error(`${where} must be a positive integer`);
57
- }
58
- return value;
59
- }
60
- function readStoreSettings(raw) {
61
- const sessions = table(raw, "[sessions]");
62
- if ((sessions["store"] ?? "files") !== "files")
63
- throw new Error('[sessions] store must be "files"');
64
- const stateDir = sessions["state_dir"];
65
- if (stateDir !== void 0 && (typeof stateDir !== "string" || stateDir === "")) {
66
- throw new Error("[sessions] state_dir must be a path");
67
- }
68
- const registry = table(sessions["registry"], "[sessions.registry]");
69
- const broadcast = table(sessions["broadcast"], "[sessions.broadcast]");
70
- return {
71
- ...typeof stateDir === "string" ? { stateDir } : {},
72
- staleMs: positiveInteger(
73
- registry["stale_minutes"],
74
- "[sessions.registry] stale_minutes",
75
- 30
76
- ) * 6e4,
77
- keepBroadcasts: positiveInteger(
78
- broadcast["keep"],
79
- "[sessions.broadcast] keep",
80
- 10
81
- ),
82
- mailbox: readMailbox(sessions["mailbox"])
83
- };
84
- }
85
- function openStore(root, settings) {
86
- return createFilesStore(projectStateDir(root, settings.stateDir), settings);
87
- }
88
-
89
- export {
90
- readStoreSettings,
91
- openStore
92
- };
93
- //# sourceMappingURL=chunk-26WLNWDG.js.map
@@ -1,7 +0,0 @@
1
- // src/commands/version.ts
2
- var VERSION = "0.18.4";
3
-
4
- export {
5
- VERSION
6
- };
7
- //# sourceMappingURL=chunk-MZCRCMEY.js.map
@@ -1,18 +0,0 @@
1
- import {
2
- gateTreePath,
3
- leaseSpecs,
4
- loadGit
5
- } from "./chunk-GZHHEHKY.js";
6
- import "./chunk-S3PIAMXV.js";
7
- import "./chunk-JS5RTH4I.js";
8
- import "./chunk-OPYFEHKG.js";
9
- import "./chunk-OEH47H6A.js";
10
- import "./chunk-IJBSOWHK.js";
11
- import "./chunk-QPL7E2HW.js";
12
- import "./chunk-PMJG2CXF.js";
13
- export {
14
- gateTreePath,
15
- leaseSpecs,
16
- loadGit
17
- };
18
- //# sourceMappingURL=setup-DTKZLZUT.js.map