@modootoday/pmcp 0.20.0 → 0.22.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.
Files changed (124) 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-QJ6MGLBX.js → apply-3PR4UOES.js} +58 -24
  6. package/dist/{available-HYSDAFYH.js → available-BFXLII4A.js} +7 -7
  7. package/dist/{broadcast-LYOA6BEW.js → broadcast-ZALGUJVR.js} +4 -4
  8. package/dist/chunk-2GI5RM3M.js +53 -0
  9. package/dist/chunk-2QJGUR23.js +274 -0
  10. package/dist/{chunk-FD6VGFYZ.js → chunk-3LADLKAI.js} +207 -15
  11. package/dist/{chunk-MZEMLFFD.js → chunk-3OBJVG5R.js} +2 -2
  12. package/dist/{chunk-IQD4W53M.js → chunk-57Q75MS4.js} +18 -18
  13. package/dist/chunk-5YCKFU5Q.js +1672 -0
  14. package/dist/{chunk-IZABPDAO.js → chunk-5ZUDBC3P.js} +2 -2
  15. package/dist/{chunk-EKPMVEIA.js → chunk-73IDLWRI.js} +7 -4
  16. package/dist/{chunk-QYH2NR6G.js → chunk-7FV2LORT.js} +2 -2
  17. package/dist/{chunk-4VK5G3SV.js → chunk-E6YP2PMO.js} +3 -5
  18. package/dist/{chunk-RMHZFWHF.js → chunk-EPNTYTDZ.js} +33 -33
  19. package/dist/{chunk-5JPD6VIH.js → chunk-GBKRDRMZ.js} +22 -7
  20. package/dist/{chunk-T6GOWHK6.js → chunk-GFOQDLPL.js} +6 -1
  21. package/dist/{chunk-RBNMNKNN.js → chunk-JQVSDPFL.js} +3 -3
  22. package/dist/{chunk-OG7QR2DP.js → chunk-KEHB4FZP.js} +17 -2
  23. package/dist/chunk-KUBHGVTD.js +126 -0
  24. package/dist/chunk-L42U5XKC.js +7 -0
  25. package/dist/chunk-LFFIQBNY.js +115 -0
  26. package/dist/{chunk-O2JWF7ZM.js → chunk-LVNGMGOM.js} +2 -2
  27. package/dist/{chunk-PQTM27GU.js → chunk-MR5IBS6L.js} +6 -7
  28. package/dist/{chunk-OAIQ7A3R.js → chunk-NDED2O5B.js} +5 -5
  29. package/dist/{chunk-M2RYXWX2.js → chunk-NHUMPEPV.js} +2 -2
  30. package/dist/{chunk-ONP6JRFZ.js → chunk-OFJIMBTL.js} +2 -2
  31. package/dist/{chunk-YN5GQCHN.js → chunk-RHJEGLYM.js} +6 -1
  32. package/dist/{chunk-JBHGJKSL.js → chunk-RNC7PGW2.js} +2 -2
  33. package/dist/{chunk-J6HNP6HA.js → chunk-RNE4WPBS.js} +2 -2
  34. package/dist/{chunk-YDICIB2A.js → chunk-S4Y44CCC.js} +2 -2
  35. package/dist/{chunk-K2C3KFGB.js → chunk-SEM6WD7J.js} +29 -17
  36. package/dist/{chunk-CQZYQAAV.js → chunk-SLCNCAWY.js} +3 -3
  37. package/dist/{chunk-L4MFGGSI.js → chunk-SPZ42EWE.js} +2 -2
  38. package/dist/{chunk-QOFSPFJ6.js → chunk-TCW2H47H.js} +3405 -3395
  39. package/dist/{chunk-FQAJSNNU.js → chunk-TPGJXENR.js} +3 -3
  40. package/dist/chunk-UKR64U7J.js +20 -0
  41. package/dist/{chunk-66F3HLW4.js → chunk-XB363ZXT.js} +122 -4
  42. package/dist/{chunk-UD3BEEBQ.js → chunk-XZ2TDH3J.js} +80 -3
  43. package/dist/{chunk-QSIADSMQ.js → chunk-Z6WRFOFT.js} +3 -3
  44. package/dist/{claude-GT2BPXEL.js → claude-XVLF4N4S.js} +3 -3
  45. package/dist/{cli-IV5DJCXU.js → cli-6FWRBCWM.js} +8 -8
  46. package/dist/{cli-6HTAJ54L.js → cli-BEEDAD4E.js} +7 -7
  47. package/dist/cli.js +11 -11
  48. package/dist/{completion-PPM7MEI2.js → completion-LHYNCQ3N.js} +7 -7
  49. package/dist/{diagnostics-EWU2ROTG.js → diagnostics-ABTJUYZQ.js} +5 -6
  50. package/dist/{doctor-ZWZQMDKZ.js → doctor-GPPO5L4F.js} +36 -36
  51. package/dist/{entry-NDICBQ2F.js → entry-ARGY5CKA.js} +14 -15
  52. package/dist/{exec-mcp-AG4G7SG7.js → exec-mcp-JEF74XVP.js} +16 -14
  53. package/dist/{harness-JABSZCAA.js → harness-OCXW6YE4.js} +6 -6
  54. package/dist/harness-launch-gate.js +3 -4
  55. package/dist/harness-worker.js +5 -6
  56. package/dist/hook-body.js +247 -86
  57. package/dist/{hook-spec-C7umArqw.d.ts → hook-spec-hZL4MSgi.d.ts} +8 -3
  58. package/dist/hooks-JHXUN5MD.js +24 -0
  59. package/dist/{host-2SZRMHZX.js → host-OBRHBDRE.js} +6 -7
  60. package/dist/{host-BWZ5LA4Q.js → host-VI4ZFCZP.js} +18 -16
  61. package/dist/{host-run-SXLV4LHI.js → host-run-H7AITG7C.js} +5 -7
  62. package/dist/http.js +1 -1
  63. package/dist/{import-mcp-2M7SZRVQ.js → import-mcp-3Y33CUHF.js} +15 -12
  64. package/dist/index.d.ts +11 -2
  65. package/dist/index.js +25 -25
  66. package/dist/{init-HOOIFBAD.js → init-WZJHMWNJ.js} +3 -3
  67. package/dist/{install-HF6CROQP.js → install-7V6NIA7W.js} +4 -4
  68. package/dist/{invoke-JP4MILYY.js → invoke-GWWTXQLO.js} +7 -8
  69. package/dist/{list-UBSBUZKS.js → list-Y6UPLGNF.js} +21 -18
  70. package/dist/{logout-OO3DERRK.js → logout-KAUW4JZZ.js} +16 -13
  71. package/dist/{logs-K3QXKRD4.js → logs-74JGLQG6.js} +4 -4
  72. package/dist/{mailbox-DAJV6VAI.js → mailbox-VK5AVTHI.js} +7 -7
  73. package/dist/{mainline-6K5BA3WX.js → mainline-Q42M2GJ2.js} +173 -34
  74. package/dist/{mcp-JXNTKRJG.js → mcp-IDEUIY2F.js} +2 -2
  75. package/dist/{pause-GRVTSKOK.js → pause-CZ2OZYLC.js} +4 -4
  76. package/dist/project/hook-adapter.d.ts +1 -1
  77. package/dist/{project-M672MKQH.js → project-GVVWLDOJ.js} +5 -5
  78. package/dist/{pty-LHKJKY2E.js → pty-CDLQ4NP2.js} +3 -3
  79. package/dist/report-Z3JV2PCT.js +105 -0
  80. package/dist/{resume-6DMPGG3N.js → resume-DFIHT2RO.js} +4 -4
  81. package/dist/{run-ORBIERI3.js → run-HVNKQHVU.js} +4 -4
  82. package/dist/{run-5W566T3V.js → run-RRWB7U2Q.js} +15 -12
  83. package/dist/{serve-73SRPAV4.js → serve-KJSOU3BR.js} +3 -3
  84. package/dist/{session-XM2CR425.js → session-YZVX4NGN.js} +4 -4
  85. package/dist/{setup-ULKDPF5B.js → setup-3GET6K3J.js} +4 -4
  86. package/dist/smoke-FQQJOQBD.js +16 -0
  87. package/dist/{start-login-BGFAMCZL.js → start-login-RNHSEX5P.js} +16 -13
  88. package/dist/{status-YHXEAJ7U.js → status-3RTGDN2K.js} +10 -10
  89. package/dist/{status-YCW6YJ3S.js → status-RR4VZARJ.js} +40 -23
  90. package/dist/{status-73FEFQUQ.js → status-Y25ONHA5.js} +16 -13
  91. package/dist/stdio.js +2 -2
  92. package/dist/{sweep-XF2HG3EO.js → sweep-EPJMEZR6.js} +4 -4
  93. package/dist/{test-IMNBXOYW.js → test-7NYPQ6YU.js} +30 -20
  94. package/dist/{tui-5GDA22TB.js → tui-H5RPSF4B.js} +4 -4
  95. package/dist/{unbroadcast-XP3OCVN3.js → unbroadcast-NTOC3PY3.js} +4 -4
  96. package/dist/{worker-RV6NGSXT.js → worker-YWFTWIBP.js} +9 -10
  97. package/dist/{worktree-list-4PLE7K6L.js → worktree-list-EMKUMCTQ.js} +2 -2
  98. package/dist/{worktree-sync-GQVYAXGJ.js → worktree-sync-A277AF4M.js} +4 -6
  99. package/docs/commands.md +14 -7
  100. package/docs/git-workflow.md +53 -13
  101. package/docs/hooks.md +138 -10
  102. package/docs/project-configuration.md +31 -1
  103. package/docs/upgrading.md +58 -0
  104. package/gemini-extension.json +2 -2
  105. package/mcp.json +1 -1
  106. package/package.json +5 -5
  107. package/plugin.json +1 -1
  108. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  109. package/plugins/pmcp/.mcp.json +1 -1
  110. package/plugins/pmcp/gemini-extension.json +2 -2
  111. package/plugins/pmcp/mcp.json +1 -1
  112. package/plugins/pmcp/mod/sessions/format.ts +2 -2
  113. package/plugins/pmcp/plugin.json +1 -1
  114. package/plugins/pmcp/skills/agent-assets-migrate/SKILL.md +11 -8
  115. package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +11 -7
  116. package/skills/agent-assets-migrate/SKILL.md +11 -8
  117. package/skills/pmcp-project-init/SKILL.md +11 -7
  118. package/dist/chunk-7SDOSTW7.js +0 -130
  119. package/dist/chunk-AWZF72SH.js +0 -1025
  120. package/dist/chunk-FGYFA6JY.js +0 -7
  121. package/dist/chunk-ICF2JZSN.js +0 -92
  122. package/dist/chunk-ISNRDHSD.js +0 -74
  123. package/dist/chunk-QDY6BWE6.js +0 -396
  124. package/dist/hooks-YVQSDQV3.js +0 -21
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  HOST_MANIFEST,
3
3
  HOST_POLICY
4
- } from "./chunk-7SDOSTW7.js";
4
+ } from "./chunk-XB363ZXT.js";
5
5
  import {
6
6
  projectStateDir
7
7
  } from "./chunk-OEH47H6A.js";
@@ -99,4 +99,4 @@ export {
99
99
  hostApprovalDoctor,
100
100
  writeApproval
101
101
  };
102
- //# sourceMappingURL=chunk-IZABPDAO.js.map
102
+ //# sourceMappingURL=chunk-5ZUDBC3P.js.map
@@ -3,9 +3,12 @@ import {
3
3
  } from "./chunk-7TD53M7L.js";
4
4
  import {
5
5
  POLICIES,
6
- RUNTIMES,
6
+ customMode,
7
7
  customPolicy
8
- } from "./chunk-QOFSPFJ6.js";
8
+ } from "./chunk-TCW2H47H.js";
9
+ import {
10
+ RUNTIMES
11
+ } from "./chunk-5YCKFU5Q.js";
9
12
 
10
13
  // src/hooks/inspection/list.ts
11
14
  function policyRows(compiled) {
@@ -19,7 +22,7 @@ function policyRows(compiled) {
19
22
  id: "custom." + entry.name,
20
23
  policy: customPolicy(entry),
21
24
  options: {},
22
- mode: "deny"
25
+ mode: customMode(entry)
23
26
  }));
24
27
  return [...guards, ...custom].flatMap((entry) => {
25
28
  const events = entry.policy.eventsFor?.(entry.policy.options(entry.options)) ?? entry.policy.events;
@@ -39,4 +42,4 @@ function policyRows(compiled) {
39
42
  export {
40
43
  policyRows
41
44
  };
42
- //# sourceMappingURL=chunk-EKPMVEIA.js.map
45
+ //# sourceMappingURL=chunk-73IDLWRI.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  openStore,
3
3
  readStoreSettings
4
- } from "./chunk-PQTM27GU.js";
4
+ } from "./chunk-MR5IBS6L.js";
5
5
  import {
6
6
  ArgumentError,
7
7
  one
@@ -73,4 +73,4 @@ export {
73
73
  storeFrom,
74
74
  change
75
75
  };
76
- //# sourceMappingURL=chunk-QYH2NR6G.js.map
76
+ //# sourceMappingURL=chunk-7FV2LORT.js.map
@@ -5,11 +5,9 @@ import {
5
5
  command
6
6
  } from "./chunk-34DECPVC.js";
7
7
  import {
8
+ nativeBinary,
8
9
  ptyBinary
9
- } from "./chunk-7SDOSTW7.js";
10
- import {
11
- nativeBinary
12
- } from "./chunk-66F3HLW4.js";
10
+ } from "./chunk-XB363ZXT.js";
13
11
 
14
12
  // src/tui/rust.ts
15
13
  import { spawn } from "child_process";
@@ -64,4 +62,4 @@ export {
64
62
  runTui,
65
63
  dependencies
66
64
  };
67
- //# sourceMappingURL=chunk-4VK5G3SV.js.map
65
+ //# sourceMappingURL=chunk-E6YP2PMO.js.map
@@ -1,16 +1,19 @@
1
1
  import {
2
2
  marketplaceSpec
3
3
  } from "./chunk-2P4Z2NUX.js";
4
+ import {
5
+ mailboxSpec
6
+ } from "./chunk-JWRZDYB5.js";
4
7
  import {
5
8
  harnessSpec,
6
9
  tuiSpec
7
10
  } from "./chunk-3Y3HDMHA.js";
11
+ import {
12
+ gitSpec
13
+ } from "./chunk-GFOQDLPL.js";
8
14
  import {
9
15
  mcpSpec
10
16
  } from "./chunk-E3DQB5LS.js";
11
- import {
12
- mailboxSpec
13
- } from "./chunk-JWRZDYB5.js";
14
17
  import {
15
18
  sessionsSpec
16
19
  } from "./chunk-LMUBBIE2.js";
@@ -18,12 +21,15 @@ import {
18
21
  logsSpec
19
22
  } from "./chunk-YGOWIJPE.js";
20
23
  import {
21
- gitSpec
22
- } from "./chunk-T6GOWHK6.js";
24
+ availableSpec,
25
+ installSpec,
26
+ previewSpec,
27
+ syncSpec
28
+ } from "./chunk-ABTJQ4QV.js";
23
29
  import {
24
30
  doctorSpec,
25
31
  projectSpec
26
- } from "./chunk-YN5GQCHN.js";
32
+ } from "./chunk-RHJEGLYM.js";
27
33
  import {
28
34
  serveSpec
29
35
  } from "./chunk-LLT5FQBE.js";
@@ -38,17 +44,11 @@ import {
38
44
  logoutSpec,
39
45
  whoamiSpec
40
46
  } from "./chunk-EIDIVIAD.js";
41
- import {
42
- availableSpec,
43
- installSpec,
44
- previewSpec,
45
- syncSpec
46
- } from "./chunk-ABTJQ4QV.js";
47
47
  import {
48
48
  hooksSpec,
49
49
  initSpec,
50
50
  statusSpec
51
- } from "./chunk-OG7QR2DP.js";
51
+ } from "./chunk-KEHB4FZP.js";
52
52
 
53
53
  // src/commands/specs/completion.ts
54
54
  var completionSpec = {
@@ -61,11 +61,11 @@ var completionSpec = {
61
61
  var COMMANDS = [
62
62
  {
63
63
  ...statusSpec,
64
- load: async () => (await import("./status-YCW6YJ3S.js")).statusCommand
64
+ load: async () => (await import("./status-RR4VZARJ.js")).statusCommand
65
65
  },
66
- { ...initSpec, load: async () => (await import("./init-HOOIFBAD.js")).initCommand },
67
- { ...hooksSpec, load: async () => (await import("./hooks-YVQSDQV3.js")).hooksCommand },
68
- { ...serveSpec, load: async () => (await import("./serve-73SRPAV4.js")).serveCommand },
66
+ { ...initSpec, load: async () => (await import("./init-WZJHMWNJ.js")).initCommand },
67
+ { ...hooksSpec, load: async () => (await import("./hooks-JHXUN5MD.js")).hooksCommand },
68
+ { ...serveSpec, load: async () => (await import("./serve-KJSOU3BR.js")).serveCommand },
69
69
  { ...listSpec, load: async () => (await import("./list-WK2IYUK7.js")).listCommand },
70
70
  {
71
71
  ...indexSpec,
@@ -77,19 +77,19 @@ var COMMANDS = [
77
77
  },
78
78
  {
79
79
  ...loginSpec,
80
- load: async () => (await import("./session-XM2CR425.js")).loginCommand
80
+ load: async () => (await import("./session-YZVX4NGN.js")).loginCommand
81
81
  },
82
82
  {
83
83
  ...logoutSpec,
84
- load: async () => (await import("./session-XM2CR425.js")).logoutCommand
84
+ load: async () => (await import("./session-YZVX4NGN.js")).logoutCommand
85
85
  },
86
86
  {
87
87
  ...whoamiSpec,
88
- load: async () => (await import("./session-XM2CR425.js")).whoamiCommand
88
+ load: async () => (await import("./session-YZVX4NGN.js")).whoamiCommand
89
89
  },
90
90
  {
91
91
  ...availableSpec,
92
- load: async () => (await import("./available-HYSDAFYH.js")).availableCommand
92
+ load: async () => (await import("./available-BFXLII4A.js")).availableCommand
93
93
  },
94
94
  {
95
95
  ...previewSpec,
@@ -97,24 +97,24 @@ var COMMANDS = [
97
97
  },
98
98
  {
99
99
  ...installSpec,
100
- load: async () => (await import("./install-HF6CROQP.js")).installCommand
100
+ load: async () => (await import("./install-7V6NIA7W.js")).installCommand
101
101
  },
102
- { ...syncSpec, load: async () => (await import("./install-HF6CROQP.js")).syncCommand },
102
+ { ...syncSpec, load: async () => (await import("./install-7V6NIA7W.js")).syncCommand },
103
103
  {
104
104
  ...projectSpec,
105
- load: async () => (await import("./project-M672MKQH.js")).projectCommand
105
+ load: async () => (await import("./project-GVVWLDOJ.js")).projectCommand
106
106
  },
107
107
  {
108
108
  ...doctorSpec,
109
- load: async () => (await import("./doctor-ZWZQMDKZ.js")).doctorCommand
109
+ load: async () => (await import("./doctor-GPPO5L4F.js")).doctorCommand
110
110
  },
111
111
  {
112
112
  ...sessionsSpec,
113
- load: async () => (await import("./cli-IV5DJCXU.js")).sessionsCommand
113
+ load: async () => (await import("./cli-6FWRBCWM.js")).sessionsCommand
114
114
  },
115
- { ...logsSpec, load: async () => (await import("./logs-K3QXKRD4.js")).logsCommand },
116
- { ...gitSpec, load: async () => (await import("./cli-6HTAJ54L.js")).gitCommand },
117
- { ...mcpSpec, load: async () => (await import("./mcp-JXNTKRJG.js")).mcpCommand },
115
+ { ...logsSpec, load: async () => (await import("./logs-74JGLQG6.js")).logsCommand },
116
+ { ...gitSpec, load: async () => (await import("./cli-BEEDAD4E.js")).gitCommand },
117
+ { ...mcpSpec, load: async () => (await import("./mcp-IDEUIY2F.js")).mcpCommand },
118
118
  {
119
119
  ...validateSpec,
120
120
  load: async () => (await import("./validate-KFBCUFI4.js")).validateCommand
@@ -125,16 +125,16 @@ var COMMANDS = [
125
125
  },
126
126
  {
127
127
  ...harnessSpec,
128
- load: async () => (await import("./harness-JABSZCAA.js")).harnessCommand
128
+ load: async () => (await import("./harness-OCXW6YE4.js")).harnessCommand
129
129
  },
130
- { ...tuiSpec, load: async () => (await import("./tui-5GDA22TB.js")).tuiCommand },
130
+ { ...tuiSpec, load: async () => (await import("./tui-H5RPSF4B.js")).tuiCommand },
131
131
  {
132
132
  ...marketplaceSpec,
133
133
  load: async () => (await import("./marketplace-G4VQET5W.js")).marketplaceCommand
134
134
  },
135
135
  {
136
136
  ...completionSpec,
137
- load: async () => (await import("./completion-PPM7MEI2.js")).completionCommand
137
+ load: async () => (await import("./completion-LHYNCQ3N.js")).completionCommand
138
138
  }
139
139
  ];
140
140
  var PLANNED = [];
@@ -148,4 +148,4 @@ export {
148
148
  PLANNED,
149
149
  commandNamed
150
150
  };
151
- //# sourceMappingURL=chunk-RMHZFWHF.js.map
151
+ //# sourceMappingURL=chunk-EPNTYTDZ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  readStoreSettings,
6
6
  resolveLeaseFiles
7
- } from "./chunk-PQTM27GU.js";
7
+ } from "./chunk-MR5IBS6L.js";
8
8
  import {
9
9
  expandPath,
10
10
  projectStateDir
@@ -116,9 +116,11 @@ function worktrees(path, source) {
116
116
  "alias_pattern",
117
117
  "bootstrap",
118
118
  "link_from_main",
119
- "sync"
119
+ "sync",
120
+ "desks"
120
121
  ]);
121
122
  const pattern = read.string("alias_pattern") ?? "^[a-z][a-z0-9-]{1,30}$";
123
+ const root = read.string("root") ?? ".claude/worktrees";
122
124
  try {
123
125
  new RegExp(pattern, "u");
124
126
  } catch {
@@ -128,11 +130,12 @@ function worktrees(path, source) {
128
130
  );
129
131
  }
130
132
  return {
131
- root: read.string("root") ?? ".claude/worktrees",
133
+ root,
132
134
  branchPrefix: read.string("branch_prefix") ?? "worktree-",
133
135
  aliasPattern: pattern,
134
136
  bootstrap: read.argv("bootstrap"),
135
- linkFromMain: read.list("link_from_main")
137
+ linkFromMain: read.list("link_from_main"),
138
+ desks: read.string("desks") ?? `${root.replace(/\/+$/u, "")}/*`
136
139
  };
137
140
  }
138
141
  function worktreeSync(path, source) {
@@ -140,9 +143,15 @@ function worktreeSync(path, source) {
140
143
  "on_session_start",
141
144
  "install_after_move",
142
145
  "between_prompts",
143
- "notice_paths"
146
+ "notice_paths",
147
+ "after_deliver"
144
148
  ]);
145
149
  return {
150
+ afterDeliver: read.oneOf(
151
+ "after_deliver",
152
+ ["desk", "off"],
153
+ "off"
154
+ ),
146
155
  onSessionStart: read.string("on_session_start") ?? "fetch_and_move",
147
156
  installAfterMove: read.oneOf(
148
157
  "install_after_move",
@@ -207,7 +216,8 @@ function mainlineSync(path, source) {
207
216
  "keep_identical_files",
208
217
  "refuse_with_unlanded",
209
218
  "stamp",
210
- "stamp_hash"
219
+ "stamp_hash",
220
+ "after_deliver"
211
221
  ]);
212
222
  const installWhenChanged = read.list("install_when_changed");
213
223
  const stamp = read.string("stamp");
@@ -230,6 +240,11 @@ function mainlineSync(path, source) {
230
240
  installWhenChanged,
231
241
  keepIdenticalFiles: read.bool("keep_identical_files", true),
232
242
  refuseWithUnlanded: read.bool("refuse_with_unlanded", true),
243
+ afterDeliver: read.oneOf(
244
+ "after_deliver",
245
+ ["from_main", "always", "off"],
246
+ "from_main"
247
+ ),
233
248
  ...stamp !== void 0 ? {
234
249
  stamp: {
235
250
  path: stamp.startsWith("${git_dir}/") ? stamp : expandPath("/", stamp),
@@ -365,4 +380,4 @@ export {
365
380
  gateTreePath,
366
381
  leaseSpecs
367
382
  };
368
- //# sourceMappingURL=chunk-5JPD6VIH.js.map
383
+ //# sourceMappingURL=chunk-GBKRDRMZ.js.map
@@ -20,6 +20,11 @@ var gitSpec = {
20
20
  name: "during-pause",
21
21
  describe: "Deliver although the sessions are paused",
22
22
  boolean: true
23
+ },
24
+ {
25
+ name: "no-push",
26
+ describe: "Replay and gate, then stop without pushing",
27
+ boolean: true
23
28
  }
24
29
  ]
25
30
  };
@@ -27,4 +32,4 @@ var gitSpec = {
27
32
  export {
28
33
  gitSpec
29
34
  };
30
- //# sourceMappingURL=chunk-T6GOWHK6.js.map
35
+ //# sourceMappingURL=chunk-GFOQDLPL.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  claudeSocket
3
- } from "./chunk-M2RYXWX2.js";
3
+ } from "./chunk-NHUMPEPV.js";
4
4
  import {
5
5
  opencodeUrl
6
6
  } from "./chunk-TIA4SPU2.js";
7
7
  import {
8
8
  ptyReachable,
9
9
  ptyRef
10
- } from "./chunk-ONP6JRFZ.js";
10
+ } from "./chunk-OFJIMBTL.js";
11
11
 
12
12
  // src/sessions/wake/probe.ts
13
13
  function wakeableBy(record, context) {
@@ -22,4 +22,4 @@ function wakeableBy(record, context) {
22
22
  export {
23
23
  wakeableBy
24
24
  };
25
- //# sourceMappingURL=chunk-RBNMNKNN.js.map
25
+ //# sourceMappingURL=chunk-JQVSDPFL.js.map
@@ -30,10 +30,25 @@ var initSpec = {
30
30
  var hooksSpec = {
31
31
  name: "hooks",
32
32
  describe: "List compiled policies or simulate a native hook without a runtime",
33
- usage: "pmcp hooks list | test --runtime claude|codex --event <event> [--command <text> | --path <path> | --tool <name>] [--session-state <file>] [--json]",
33
+ usage: "pmcp hooks list | test --runtime claude|codex --event <event> [--command <text> | --path <path> | --tool <name>] [--session-state <file>] [--json] | test --fixtures <file> [--json] | report [--since <when>] [--switch-check <guard>] [--json]",
34
34
  options: [
35
35
  configOption,
36
36
  jsonOption,
37
+ {
38
+ name: "fixtures",
39
+ describe: "Run these cases through the projected hook entry for every wired runtime.",
40
+ placeholder: "<file>"
41
+ },
42
+ {
43
+ name: "since",
44
+ describe: "Report only log lines from this long ago (10m, 2h, 3d) or this ISO time.",
45
+ placeholder: "<when>"
46
+ },
47
+ {
48
+ name: "switch-check",
49
+ describe: "List the calls this guard found something in but let through.",
50
+ placeholder: "<guard>"
51
+ },
37
52
  {
38
53
  name: "runtime",
39
54
  describe: "Native runtime to inspect.",
@@ -72,4 +87,4 @@ export {
72
87
  initSpec,
73
88
  hooksSpec
74
89
  };
75
- //# sourceMappingURL=chunk-OG7QR2DP.js.map
90
+ //# sourceMappingURL=chunk-KEHB4FZP.js.map
@@ -0,0 +1,126 @@
1
+ import {
2
+ git,
3
+ gitText
4
+ } from "./chunk-G7JONWL4.js";
5
+
6
+ // src/git/superseded.ts
7
+ import { existsSync } from "fs";
8
+ import { join } from "path";
9
+ var GITLINK = /^:160000 160000 [0-9a-f]{40} ([0-9a-f]{40}) M$/u;
10
+ function submoduleRepo(cwd, path) {
11
+ const checkout = join(cwd, path);
12
+ if (existsSync(join(checkout, ".git"))) return checkout;
13
+ const common = gitText(cwd, [
14
+ "rev-parse",
15
+ "--path-format=absolute",
16
+ "--git-common-dir"
17
+ ]);
18
+ const kept = common ? join(common, "modules", path) : "";
19
+ return kept && existsSync(kept) ? kept : null;
20
+ }
21
+ function pinsSuperseded(cwd, upstream, sha) {
22
+ const parents = gitText(cwd, ["rev-list", "--parents", "-n", "1", sha]);
23
+ if (parents.split(" ").length !== 2) return false;
24
+ const diff = git(cwd, [
25
+ "diff-tree",
26
+ "--raw",
27
+ "--no-commit-id",
28
+ "--no-renames",
29
+ "--abbrev=40",
30
+ "-z",
31
+ "-r",
32
+ `${sha}^`,
33
+ sha
34
+ ]);
35
+ const fields = diff.stdout.split("\0").slice(0, -1);
36
+ if (diff.status !== 0 || fields.length === 0 || fields.length % 2 !== 0)
37
+ return false;
38
+ for (let index = 0; index < fields.length; index += 2) {
39
+ const pin = GITLINK.exec(fields[index] ?? "")?.[1];
40
+ const path = fields[index + 1];
41
+ if (pin === void 0 || !path) return false;
42
+ const listed = gitText(cwd, ["ls-tree", upstream, "--", path]);
43
+ const theirs = /^160000 commit ([0-9a-f]{40})\t/u.exec(listed)?.[1];
44
+ if (theirs === void 0) return false;
45
+ if (theirs === pin) continue;
46
+ const repo = submoduleRepo(cwd, path);
47
+ if (repo === null) return false;
48
+ if (git(repo, ["merge-base", "--is-ancestor", pin, theirs]).status !== 0)
49
+ return false;
50
+ }
51
+ return true;
52
+ }
53
+
54
+ // src/git/landed.ts
55
+ function cherry(cwd, upstream, head = "HEAD") {
56
+ const listed = git(cwd, ["cherry", "-v", upstream, head]).stdout;
57
+ const carried = [];
58
+ const missing = [];
59
+ for (const line of listed.split("\n")) {
60
+ if (line.startsWith("- ")) carried.push(line.slice(2));
61
+ if (!line.startsWith("+ ")) continue;
62
+ const sha = line.slice(2).split(" ")[0] ?? "";
63
+ if (pinsSuperseded(cwd, upstream, sha)) carried.push(line.slice(2));
64
+ else missing.push(line.slice(2));
65
+ }
66
+ return { carried, missing };
67
+ }
68
+ function undelivered(cwd, upstream, named) {
69
+ if (named.length === 0)
70
+ return cherry(cwd, upstream).missing.map(
71
+ (line) => line.split(" ")[0] ?? ""
72
+ );
73
+ const shas = [];
74
+ for (const ref of named) {
75
+ const sha = gitText(cwd, [
76
+ "rev-parse",
77
+ "--verify",
78
+ "-q",
79
+ `${ref}^{commit}`
80
+ ]);
81
+ if (!sha) throw new Error(`${ref} is not a commit`);
82
+ const listed = git(cwd, ["cherry", upstream, sha, `${sha}^`]).stdout;
83
+ if (listed.startsWith("+ ") && !pinsSuperseded(cwd, upstream, sha))
84
+ shas.push(sha);
85
+ }
86
+ return shas;
87
+ }
88
+ function touchedPaths(cwd, commits) {
89
+ const paths = /* @__PURE__ */ new Set();
90
+ for (const sha of commits) {
91
+ const listed = gitText(cwd, [
92
+ "diff-tree",
93
+ "--no-commit-id",
94
+ "--name-only",
95
+ "-r",
96
+ sha
97
+ ]);
98
+ for (const path of listed.split("\n")) {
99
+ if (path) paths.add(path);
100
+ }
101
+ }
102
+ return paths;
103
+ }
104
+ function isAncestor(cwd, ancestor, of) {
105
+ return git(cwd, ["merge-base", "--is-ancestor", ancestor, of]).status === 0;
106
+ }
107
+ function distance(cwd, upstream) {
108
+ const counted = gitText(cwd, [
109
+ "rev-list",
110
+ "--left-right",
111
+ "--count",
112
+ `${upstream}...HEAD`
113
+ ]);
114
+ if (!counted) return null;
115
+ const [behind = 0, ahead = 0] = counted.split(/\s+/u).map(Number);
116
+ return { behind, ahead };
117
+ }
118
+
119
+ export {
120
+ cherry,
121
+ undelivered,
122
+ touchedPaths,
123
+ isAncestor,
124
+ distance
125
+ };
126
+ //# sourceMappingURL=chunk-KUBHGVTD.js.map
@@ -0,0 +1,7 @@
1
+ // src/commands/version.ts
2
+ var VERSION = "0.22.0";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-L42U5XKC.js.map
@@ -0,0 +1,115 @@
1
+ // src/hooks/inspection/report.ts
2
+ function readReportTable(value) {
3
+ if (value === void 0) return { excludeSessions: [] };
4
+ if (value === null || typeof value !== "object" || Array.isArray(value))
5
+ throw new Error("[hooks.report] must be a table");
6
+ const table = value;
7
+ const unknown = Object.keys(table).find((key) => key !== "exclude_sessions");
8
+ if (unknown) throw new Error(`unknown [hooks.report] key ${unknown}`);
9
+ const list = table["exclude_sessions"] ?? [];
10
+ if (!Array.isArray(list) || !list.every((item) => typeof item === "string"))
11
+ throw new Error(
12
+ "[hooks.report] exclude_sessions must be a list of regexes"
13
+ );
14
+ return {
15
+ excludeSessions: list.map((source) => {
16
+ try {
17
+ return new RegExp(source, "u");
18
+ } catch {
19
+ throw new Error(
20
+ `[hooks.report] exclude_sessions has an invalid regex ${source}`
21
+ );
22
+ }
23
+ })
24
+ };
25
+ }
26
+ function guardLines(lines, settings) {
27
+ const kept = [];
28
+ let excluded = 0;
29
+ for (const line of lines) {
30
+ if (line.component !== "hooks.entry" || line["msg"] !== "policy") continue;
31
+ const data = line["data"] ?? {};
32
+ if (typeof line["policy"] !== "string" || typeof data["raw"] !== "string")
33
+ continue;
34
+ const session = String(line["session"] ?? "");
35
+ if (settings.excludeSessions.some((pattern) => pattern.test(session))) {
36
+ excluded += 1;
37
+ continue;
38
+ }
39
+ kept.push({
40
+ ts: String(line.ts ?? ""),
41
+ policy: line["policy"],
42
+ runtime: String(line["runtime"] ?? ""),
43
+ session,
44
+ mode: String(data["mode"] ?? ""),
45
+ raw: data["raw"],
46
+ verdict: String(line["verdict"] ?? "allow"),
47
+ ...typeof data["tool"] === "string" ? { tool: data["tool"] } : {},
48
+ durationMs: Number(line["duration_ms"] ?? 0)
49
+ });
50
+ }
51
+ return { kept, excluded };
52
+ }
53
+ function percentile(sorted, share) {
54
+ if (sorted.length === 0) return 0;
55
+ const index = Math.min(
56
+ sorted.length - 1,
57
+ Math.max(0, Math.ceil(share * sorted.length) - 1)
58
+ );
59
+ return sorted[index];
60
+ }
61
+ var count = (into, key) => {
62
+ into[key] = (into[key] ?? 0) + 1;
63
+ };
64
+ function report(lines, excluded) {
65
+ const groups = /* @__PURE__ */ new Map();
66
+ for (const line of lines) {
67
+ const key = `${line.policy}\0${line.runtime}`;
68
+ groups.set(key, [...groups.get(key) ?? [], line]);
69
+ }
70
+ const guards = [...groups.values()].map((group) => {
71
+ const raw = {};
72
+ const verdict = {};
73
+ for (const line of group) {
74
+ count(raw, line.raw);
75
+ count(verdict, line.verdict);
76
+ }
77
+ const durations = group.map((line) => line.durationMs).sort((a, b) => a - b);
78
+ return {
79
+ policy: group[0].policy,
80
+ runtime: group[0].runtime,
81
+ calls: group.length,
82
+ raw,
83
+ verdict,
84
+ modes: [...new Set(group.map((line) => line.mode))].sort(),
85
+ sessions: new Set(group.map((line) => line.session)).size,
86
+ durationMs: {
87
+ p50: percentile(durations, 0.5),
88
+ p95: percentile(durations, 0.95),
89
+ max: durations.at(-1) ?? 0
90
+ }
91
+ };
92
+ });
93
+ guards.sort(
94
+ (a, b) => a.policy.localeCompare(b.policy) || a.runtime.localeCompare(b.runtime)
95
+ );
96
+ return {
97
+ lines: lines.length,
98
+ sessions: new Set(lines.map((line) => line.session)).size,
99
+ excluded,
100
+ guards
101
+ };
102
+ }
103
+ function wouldRefuse(lines, policy) {
104
+ return lines.filter(
105
+ (line) => line.policy === policy && line.raw !== "allow" && line.verdict !== "deny" && line.verdict !== line.raw
106
+ );
107
+ }
108
+
109
+ export {
110
+ readReportTable,
111
+ guardLines,
112
+ report,
113
+ wouldRefuse
114
+ };
115
+ //# sourceMappingURL=chunk-LFFIQBNY.js.map
@@ -1190,7 +1190,7 @@ function registerReadTool(server, tools) {
1190
1190
 
1191
1191
  // src/mcp.ts
1192
1192
  var SERVER_NAME = "pmcp";
1193
- var SERVER_VERSION = "0.20.0";
1193
+ var SERVER_VERSION = "0.22.0";
1194
1194
  var MAX_TOOL_INPUT_ELEMENTS = 1e4;
1195
1195
  function registerSkillTools(server, tools) {
1196
1196
  registerCatalogTool(server, tools);
@@ -1247,4 +1247,4 @@ export {
1247
1247
  registerSkillTools,
1248
1248
  createSkillServer
1249
1249
  };
1250
- //# sourceMappingURL=chunk-O2JWF7ZM.js.map
1250
+ //# sourceMappingURL=chunk-LVNGMGOM.js.map