@modootoday/pmcp 0.22.2 → 0.22.4

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 (104) 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-AWZ32Z66.js → apply-D2VIRMFY.js} +13 -13
  6. package/dist/{broadcast-ZALGUJVR.js → broadcast-DZGMSZRG.js} +3 -3
  7. package/dist/{chunk-XZ2TDH3J.js → chunk-2A3F7ID4.js} +14 -5
  8. package/dist/{chunk-JP27V2H4.js → chunk-3IX5TBRW.js} +2 -2
  9. package/dist/{chunk-ZYLJUABY.js → chunk-5KA3RS5Y.js} +2 -2
  10. package/dist/{chunk-57Q75MS4.js → chunk-5QKXEWDB.js} +2 -2
  11. package/dist/{chunk-OMIIXLMO.js → chunk-7DYWCQVB.js} +1 -1
  12. package/dist/{chunk-MR5IBS6L.js → chunk-7I7O7ZNT.js} +41 -10
  13. package/dist/{chunk-U3IHGG7X.js → chunk-7XK2KWLJ.js} +3 -3
  14. package/dist/{chunk-7FV2LORT.js → chunk-B2WRYGHJ.js} +4 -3
  15. package/dist/{chunk-W6GA5RAW.js → chunk-CILQCERV.js} +2 -2
  16. package/dist/{chunk-5F7TL3V7.js → chunk-CPFJ7J4G.js} +6 -6
  17. package/dist/{chunk-NAXUAC5S.js → chunk-F34XIDXT.js} +2 -2
  18. package/dist/{chunk-NFJ44OE2.js → chunk-FE7WOHZM.js} +13 -4
  19. package/dist/{chunk-4Z6NPSWX.js → chunk-FFCDSSKA.js} +126 -37
  20. package/dist/{chunk-D2DDM5VZ.js → chunk-H45C5W2P.js} +2 -2
  21. package/dist/chunk-HOTGJQIV.js +7 -0
  22. package/dist/{chunk-G25LCRIG.js → chunk-JJT5XRMV.js} +2 -2
  23. package/dist/{chunk-SKOP4ZST.js → chunk-JONJ75SF.js} +5 -5
  24. package/dist/{chunk-GE2PHR35.js → chunk-KR6PFEWU.js} +3 -3
  25. package/dist/{chunk-U2NWTZQP.js → chunk-MIIGZRVC.js} +2 -2
  26. package/dist/{chunk-KLWZZTUQ.js → chunk-MTVRKWQI.js} +3 -3
  27. package/dist/{chunk-VGW3N3HC.js → chunk-NDY3T7Z4.js} +14 -14
  28. package/dist/{chunk-BUD3WS4Y.js → chunk-PFHSFYQB.js} +2 -2
  29. package/dist/{chunk-5A7QRZP6.js → chunk-QUBU3ETR.js} +5 -5
  30. package/dist/{chunk-KUBHGVTD.js → chunk-RRPNPZ6I.js} +16 -10
  31. package/dist/{chunk-GZQH3RJA.js → chunk-T7SLHAHQ.js} +3 -3
  32. package/dist/{chunk-FOIQUPIQ.js → chunk-TAVFL3YB.js} +2 -2
  33. package/dist/{chunk-T6MQPVLH.js → chunk-W4W3EHQP.js} +2 -2
  34. package/dist/{cli-6FWRBCWM.js → cli-34EDFXJA.js} +8 -8
  35. package/dist/{cli-BOSY6VFP.js → cli-VCKKTXUU.js} +6 -6
  36. package/dist/cli.js +3 -3
  37. package/dist/{completion-V756JVX6.js → completion-AAEBLVVB.js} +2 -2
  38. package/dist/{diagnostics-R7S3DNXD.js → diagnostics-3XI6SJXF.js} +5 -5
  39. package/dist/{doctor-44S5EWK5.js → doctor-GAJKPOKS.js} +14 -14
  40. package/dist/{entry-GSGCMXE5.js → entry-GZCLQTIN.js} +9 -9
  41. package/dist/{exec-mcp-3COXHDYT.js → exec-mcp-3V34UNPH.js} +10 -10
  42. package/dist/{harness-K4WL2NSH.js → harness-YH6U6MNV.js} +3 -3
  43. package/dist/harness-launch-gate.js +3 -3
  44. package/dist/harness-worker.js +5 -5
  45. package/dist/hook-body.js +281 -138
  46. package/dist/{hook-spec-hZL4MSgi.d.ts → hook-spec-Bd24eo2L.d.ts} +1 -0
  47. package/dist/{hooks-HQOLXR3A.js → hooks-JWB7D4ZB.js} +4 -4
  48. package/dist/{host-N5UILUK7.js → host-DLBXM72V.js} +6 -6
  49. package/dist/{host-4W3JUQAO.js → host-LNH3TUR5.js} +12 -12
  50. package/dist/{host-run-CVYRZB7R.js → host-run-FVO5PZK2.js} +4 -4
  51. package/dist/http.js +1 -1
  52. package/dist/{import-mcp-IAGC3LJU.js → import-mcp-O553FGF3.js} +9 -9
  53. package/dist/index.d.ts +2 -2
  54. package/dist/index.js +13 -13
  55. package/dist/{init-HPEVKKMU.js → init-A6AAIGJU.js} +2 -2
  56. package/dist/{invoke-TD5YR2G7.js → invoke-GDELKQCE.js} +7 -7
  57. package/dist/{list-YUHJ5CTT.js → list-CQ4CPNWI.js} +11 -11
  58. package/dist/{logout-JQ5UPC5W.js → logout-TG32MVMB.js} +10 -10
  59. package/dist/{logs-74JGLQG6.js → logs-UHJM7ZCL.js} +3 -3
  60. package/dist/{mailbox-VK5AVTHI.js → mailbox-NIMBOQPA.js} +3 -3
  61. package/dist/{mainline-7HO7RCQH.js → mainline-FMZ44NFC.js} +31 -14
  62. package/dist/{mcp-B6SYBT3X.js → mcp-UYQVTWEF.js} +2 -2
  63. package/dist/{pause-CZ2OZYLC.js → pause-CBZ3BTJL.js} +3 -3
  64. package/dist/project/hook-adapter.d.ts +1 -1
  65. package/dist/{project-GOW2MEFY.js → project-NOTN6SMK.js} +4 -4
  66. package/dist/{report-Z3JV2PCT.js → report-ZHOHQ4PZ.js} +3 -3
  67. package/dist/{resume-DFIHT2RO.js → resume-UJEWQ66P.js} +3 -3
  68. package/dist/{run-7UNRLLYD.js → run-77MDEDAX.js} +9 -9
  69. package/dist/{run-ZOSIKNDX.js → run-S5M6ZUUH.js} +4 -4
  70. package/dist/{serve-VRBL67KO.js → serve-YNHUW5PQ.js} +3 -3
  71. package/dist/{setup-QMYAW3MB.js → setup-HYEYYVDU.js} +3 -3
  72. package/dist/{smoke-EXPR7HLD.js → smoke-UA7VVDKD.js} +3 -3
  73. package/dist/{start-login-NRD323LK.js → start-login-SWQVPQG3.js} +10 -10
  74. package/dist/{status-3RTGDN2K.js → status-KN2ZE64O.js} +3 -3
  75. package/dist/{status-JN2GT5UM.js → status-NGO7AC3U.js} +12 -12
  76. package/dist/{status-ZY5B7V6R.js → status-YPFUSE7K.js} +10 -10
  77. package/dist/stdio.js +2 -2
  78. package/dist/{sweep-EPJMEZR6.js → sweep-EPZCW63Q.js} +3 -3
  79. package/dist/{test-VGJXKCQT.js → test-2UYV4LSU.js} +23 -16
  80. package/dist/{tui-GORRJIMA.js → tui-ZKP3D5JM.js} +4 -4
  81. package/dist/{unbroadcast-NTOC3PY3.js → unbroadcast-N6LXHAMT.js} +3 -3
  82. package/dist/{worker-LJG2NDMK.js → worker-7OBOBMWM.js} +7 -7
  83. package/dist/{worktree-list-EMKUMCTQ.js → worktree-list-6CCHXXOZ.js} +2 -2
  84. package/dist/{worktree-sync-A277AF4M.js → worktree-sync-5ZVA5PUC.js} +3 -3
  85. package/docs/commands.md +1 -1
  86. package/docs/git-workflow.md +7 -2
  87. package/docs/project-configuration.md +1 -0
  88. package/gemini-extension.json +2 -2
  89. package/mcp.json +1 -1
  90. package/package.json +5 -5
  91. package/plugin.json +1 -1
  92. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  93. package/plugins/pmcp/.mcp.json +1 -1
  94. package/plugins/pmcp/gemini-extension.json +2 -2
  95. package/plugins/pmcp/mcp.json +1 -1
  96. package/plugins/pmcp/mod/commands.ts +10 -4
  97. package/plugins/pmcp/mod/host.ts +17 -1
  98. package/plugins/pmcp/mod/reader/read.ts +3 -1
  99. package/plugins/pmcp/mod/reader/types.ts +2 -0
  100. package/plugins/pmcp/mod/register.tsx +2 -1
  101. package/plugins/pmcp/mod/snapshot.ts +1 -0
  102. package/plugins/pmcp/mod/state.ts +1 -0
  103. package/plugins/pmcp/plugin.json +1 -1
  104. package/dist/chunk-FWKQA6TX.js +0 -7
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-YIXDHQYE.js";
4
4
  import {
5
5
  distance
6
- } from "./chunk-KUBHGVTD.js";
6
+ } from "./chunk-RRPNPZ6I.js";
7
7
  import {
8
8
  listWorktrees
9
9
  } from "./chunk-2Q6MNGU5.js";
@@ -48,4 +48,4 @@ var worktreeList = (setup, context) => {
48
48
  export {
49
49
  worktreeList
50
50
  };
51
- //# sourceMappingURL=worktree-list-EMKUMCTQ.js.map
51
+ //# sourceMappingURL=worktree-list-6CCHXXOZ.js.map
@@ -4,8 +4,8 @@ import {
4
4
  import {
5
5
  installSpec,
6
6
  syncWorktree
7
- } from "./chunk-XZ2TDH3J.js";
8
- import "./chunk-KUBHGVTD.js";
7
+ } from "./chunk-2A3F7ID4.js";
8
+ import "./chunk-RRPNPZ6I.js";
9
9
  import "./chunk-P6LNYYYH.js";
10
10
  import "./chunk-G7JONWL4.js";
11
11
 
@@ -26,4 +26,4 @@ var worktreeSync = (setup, _context, report) => {
26
26
  export {
27
27
  worktreeSync
28
28
  };
29
- //# sourceMappingURL=worktree-sync-A277AF4M.js.map
29
+ //# sourceMappingURL=worktree-sync-5ZVA5PUC.js.map
package/docs/commands.md CHANGED
@@ -40,7 +40,7 @@ pmcp hooks test --runtime claude --event before_tool --path fixture.txt --sessio
40
40
 
41
41
  List compiled policies per runtime and neutral event, including mode and source table. Test constructs a synthetic payload in that runtime's recorded shape, normalizes it, runs policy selection and composition, lowers unsupported asks, and renders the native response. The event accepts a neutral name or a supported native name. Choose at most one of `--command`, `--path` and `--tool`; these selectors require a tool event. Tool accepts a native name or shell, edit, read or other, subject to that runtime's tool vocabulary. No native runtime or model call is needed.
42
42
 
43
- Session state is isolated in a temporary directory, then removed. Commands and patches are classified, never executed. External custom guards, validators, Stop projection subprocesses and worktree synchronization are explicitly marked skipped. Their simulated context reports this limitation; the command does not claim a full live result. Exit 0 means the simulation completed, even when the rendered decision denies; invalid input exits 2. Per-policy timings and reasons precede the rendered output in human mode.
43
+ Session state is isolated in a temporary directory, then removed. Commands and patches are classified, never executed. External custom guards, validators, Stop projection subprocesses and worktree synchronization are explicitly marked skipped. Their simulated context reports this limitation; the command does not claim a full live result. Exit 0 means the simulation completed, even when the rendered decision denies; invalid input exits 2. Per-policy timings and reasons precede the rendered output in human mode. Each policy row also gives `raw`, `{verdict, reason}` as the guard found it before its mode, so a guard in `observe`, `warn` or `graded` mode shows what `deny` would have done; human mode adds it as `(observe; found deny: …)` where it differs.
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
 
@@ -101,8 +101,12 @@ The fields of every shared file are listed under
101
101
  `[git.mainline.deliver]` enables `pmcp git deliver`, which replays commits onto
102
102
  the fetched mainline, runs the gate, and pushes one delivery at a time:
103
103
  `attempts` (default `3`), `refuse_direct_push` (default `true`: a hook refuses
104
- `git push` from any checkout of this repository, so the mainline moves only
105
- through delivery), `during_pause` (`"refuse"` default or `"allow"`),
104
+ a `git push` from any checkout of this repository that would move the mainline
105
+ on the delivery remote, so the mainline moves only through delivery. That
106
+ covers a push naming the mainline as its destination, a push with no refspec
107
+ from the mainline or a branch tracking it, `--all`, `--mirror`, wildcard
108
+ refspecs, and a push to a URL. A dry run, another branch, a tag, another
109
+ remote and a submodule's own push pass), `during_pause` (`"refuse"` default or `"allow"`),
106
110
  `lease_wait_seconds` (default `3600`), `notify` (argv run after a
107
111
  delivery), `gate` and `push_env`.
108
112
 
@@ -197,6 +201,7 @@ strings, and JSON files are written whole through a rename.
197
201
  | `lock` | beside the gate tree | Empty; held with `flock -x` for the whole of one delivery's gate. |
198
202
  | `holder.json` | beside `lock` | `{tip, subject, checkout, pid, startedAt}`: the commit being gated (full hash), its subject, the checkout delivering it, the holding process and when it took the lock. Removed by its writer before the lock is released, and only when `pid` is its own. |
199
203
  | gate logs | `[git.mainline.gate] log_dir`, else `<state dir>/gate-logs` | `<tip>/<UTC time>-<run>.log` per gate run of a replayed tip (full hash), the output as it streamed; `<tip>/latest` holds the newest file's name. The newest `log_keep` tip directories are kept. |
204
+ | `pause.json` | the state directory, or `[sessions] pause_file` | `{by, reason, since}`, all strings: who paused (a session id or a name), why, and when. Present means paused, for every session but `by`; a file missing a field or not JSON reads as no pause. Removed on resume. |
200
205
  | `<name>-lease.json` | the state directory, or `[sessions.leases.<name>] file` | `{pid, subject, since, cwd?}`. A lease whose `pid` is not alive is free; whoever takes it next replaces the file. |
201
206
  | lease events | `[sessions.leases.<name>] events` | JSON Lines, one per delivery that changed the leased paths: `{at, subject, commit, hash, installed, lease}`, with `commit` the delivered upstream (10 characters), `hash` the leased files' hash in the main checkout after sync, and `installed` whether sync's install ran for that hash. |
202
207
  | install stamp | `[git.mainline.sync] stamp`, else pmcp's state directory | One line: the hash last installed. With `stamp_hash = "plain"` it is the sha256 hex of the single `install_when_changed` file's bytes; with `"pmcp"`, a hash of every listed path and its name. |
@@ -482,6 +482,7 @@ lives in one directory shared by every checkout of the repository.
482
482
  | ---------------- | ------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
483
483
  | `store` | string | `"files"` | The only store. |
484
484
  | `state_dir` | path | `$XDG_STATE_HOME/pmcp/projects/<id>` (`~/.local/state/...`) | `<id>` is the first 16 hex digits of the sha256 of the git common directory. `~`, `~/` and `$HOME/` expand to the home directory and a relative path is relative to the main checkout: the directory holding `pmcp.toml`, taken in the worktree of the git common directory, so the main checkout and every linked worktree share one state. Outside git it is relative to the directory holding `pmcp.toml`. The hooks, the Claude Code session panes and the git commands resolve it the same way; so does `[git.mainline.gate] tree`. |
485
+ | `pause_file` | path | `<state dir>/pause.json` | Where the pause lives: absolute, `~/…`, `$HOME/…`, or `${gate_dir}/…` for the directory of the gate tree (so it follows `[git.mainline.gate] tree_env`). Point it at the file another tool already pauses the same work with; `pmcp sessions pause` and `resume`, `/pmcp pause`, the `[sessions.pause]` guard, `pmcp git deliver` (`--during-pause` still overrides) and `pmcp git sync` then all read and write that file. Its format is in [Shared file formats](git-workflow.md#shared-file-formats). |
485
486
 
486
487
  `store` and `state_dir` alone enable nothing; each feature has its own table:
487
488
 
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.22.2",
3
+ "version": "0.22.4",
4
4
  "mcpServers": {
5
5
  "pmcp": {
6
6
  "type": "stdio",
7
7
  "command": "npx",
8
- "args": ["-y", "@modootoday/pmcp@0.22.2", "serve"]
8
+ "args": ["-y", "@modootoday/pmcp@0.22.4", "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.2", "serve"]
7
+ "args": ["-y", "@modootoday/pmcp@0.22.4", "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.2",
3
+ "version": "0.22.4",
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.2",
140
- "@modootoday/pmcp-linux-arm64": "0.22.2",
141
- "@modootoday/pmcp-darwin-x64": "0.22.2",
142
- "@modootoday/pmcp-darwin-arm64": "0.22.2"
139
+ "@modootoday/pmcp-linux-x64": "0.22.4",
140
+ "@modootoday/pmcp-linux-arm64": "0.22.4",
141
+ "@modootoday/pmcp-darwin-x64": "0.22.4",
142
+ "@modootoday/pmcp-darwin-arm64": "0.22.4"
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.2",
4
+ "version": "0.22.4",
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.2",
3
+ "version": "0.22.4",
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.2", "serve"]
6
+ "args": ["-y", "@modootoday/pmcp@0.22.4", "serve"]
7
7
  }
8
8
  }
9
9
  }
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.22.2",
3
+ "version": "0.22.4",
4
4
  "mcpServers": {
5
5
  "pmcp": {
6
6
  "type": "stdio",
7
7
  "command": "npx",
8
- "args": ["-y", "@modootoday/pmcp@0.22.2", "serve"]
8
+ "args": ["-y", "@modootoday/pmcp@0.22.4", "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.2", "serve"]
7
+ "args": ["-y", "@modootoday/pmcp@0.22.4", "serve"]
8
8
  }
9
9
  }
10
10
  }
@@ -2,14 +2,20 @@ import { STATE_PATHS } from "./reader/index";
2
2
  import { refresh } from "./snapshot";
3
3
  import { PANE_ID, state } from "./state";
4
4
 
5
+ // The pause may live outside the state dir ([sessions] pause_file); the rest never does.
6
+ function statePath(name: string): string {
7
+ if (name === STATE_PATHS.pause && state.pauseFile) return state.pauseFile;
8
+ return `${state.stateDir}/${name}`;
9
+ }
10
+
5
11
  async function writeState($: any, name: string, value: object): Promise<void> {
6
- const dir = state.stateDir;
7
- await $.process.run(["mkdir", "-p", dir]);
8
- await $.fs.write(`${dir}/${name}`, `${JSON.stringify(value, null, 2)}\n`);
12
+ const path = statePath(name);
13
+ await $.process.run(["mkdir", "-p", path.slice(0, path.lastIndexOf("/"))]);
14
+ await $.fs.write(path, `${JSON.stringify(value, null, 2)}\n`);
9
15
  }
10
16
 
11
17
  async function removeState($: any, name: string): Promise<void> {
12
- await $.process.run(["rm", "-f", `${state.stateDir}/${name}`]);
18
+ await $.process.run(["rm", "-f", statePath(name)]);
13
19
  }
14
20
 
15
21
  async function togglePane($: any): Promise<{ text: string }> {
@@ -1,4 +1,4 @@
1
- import { parseUiSettings, UI_SETTINGS_FILE } from "./reader/index";
1
+ import { parseUiSettings, STATE_PATHS, UI_SETTINGS_FILE } from "./reader/index";
2
2
  import type { StateFiles, UiSettings } from "./reader/index";
3
3
 
4
4
  export function hostFiles($: any): StateFiles {
@@ -28,6 +28,22 @@ export async function resolveStateDir(
28
28
  return String(run.stdout).trim();
29
29
  }
30
30
 
31
+ // The pause the hooks read ([sessions] pause_file); a hook too old to answer keeps the state dir's.
32
+ export async function resolvePauseFile(
33
+ $: any,
34
+ root: string,
35
+ stateDir: string,
36
+ ): Promise<string> {
37
+ const fallback = `${stateDir}/${STATE_PATHS.pause}`;
38
+ const hook = `${root}/.agents/pmcp-hooks/hook.mjs`;
39
+ if (!(await $.fs.exists(hook))) return fallback;
40
+ const run = await $.process
41
+ .run(["node", hook, "--pause-file"])
42
+ .catch(() => null);
43
+ const answer = run && run.exitCode === 0 ? String(run.stdout).trim() : "";
44
+ return answer.startsWith("/") ? answer : fallback;
45
+ }
46
+
31
47
  export async function findSettings(
32
48
  $: any,
33
49
  cwd: string,
@@ -94,7 +94,9 @@ export async function readSessionState(
94
94
  const at = (name: string) => `${options.stateDir}/${name}`;
95
95
  return {
96
96
  records: await readRecords(files, options),
97
- pause: asPause(await readJson(files, at(STATE_PATHS.pause))),
97
+ pause: asPause(
98
+ await readJson(files, options.pauseFile ?? at(STATE_PATHS.pause)),
99
+ ),
98
100
  lease: await readLease(files, options),
99
101
  broadcast: asBroadcast(await readJson(files, at(STATE_PATHS.broadcast))),
100
102
  };
@@ -26,6 +26,8 @@ export interface StateFiles {
26
26
 
27
27
  export interface ReadOptions {
28
28
  readonly stateDir: string;
29
+ // [sessions] pause_file as the hook resolves it; absent means pause.json in stateDir.
30
+ readonly pauseFile?: string;
29
31
  readonly now: number;
30
32
  }
31
33
 
@@ -3,7 +3,7 @@ import { atom, read, type On } from "claude-code";
3
3
  import { runCommand } from "./commands";
4
4
  import { drawBand, drawPane } from "./draw";
5
5
  import { holdForeignEdit } from "./guard";
6
- import { findSettings, resolveStateDir } from "./host";
6
+ import { findSettings, resolvePauseFile, resolveStateDir } from "./host";
7
7
  import { refresh } from "./snapshot";
8
8
  import { EDITS, PANE_ID, POLL_MS, state, type Kept } from "./state";
9
9
 
@@ -23,6 +23,7 @@ async function start($: any, e: any): Promise<void> {
23
23
  state.root = found.root;
24
24
  state.settings = found.settings;
25
25
  state.stateDir = stateDir;
26
+ state.pauseFile = await resolvePauseFile($, found.root, stateDir);
26
27
  const saved = await read($, kept);
27
28
  if (saved) {
28
29
  state.snapshot = saved.snapshot;
@@ -58,6 +58,7 @@ export async function refresh($: any): Promise<void> {
58
58
  state.now = Number(await $.clock.now());
59
59
  const read = await readSessionState(hostFiles($), {
60
60
  stateDir: state.stateDir,
61
+ ...(state.pauseFile ? { pauseFile: state.pauseFile } : {}),
61
62
  now: state.now,
62
63
  });
63
64
  const next = { ...read, records: [...read.records].sort(byKind) };
@@ -20,6 +20,7 @@ export const state = {
20
20
  root: "",
21
21
 
22
22
  stateDir: "",
23
+ pauseFile: "",
23
24
  settings: null as UiSettings | null,
24
25
  isOpen: false,
25
26
  signature: "",
@@ -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.2",
4
+ "version": "0.22.4",
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.2";
3
-
4
- export {
5
- VERSION
6
- };
7
- //# sourceMappingURL=chunk-FWKQA6TX.js.map