@modootoday/pmcp 0.19.9 → 0.20.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 (107) 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-TM6B2Y3G.js → apply-QJ6MGLBX.js} +13 -13
  6. package/dist/{attachment-D84OGI6n.d.ts → attachment-ms6s8Aow.d.ts} +1 -1
  7. package/dist/{broadcast-DSCHWUMB.js → broadcast-LYOA6BEW.js} +4 -4
  8. package/dist/{chunk-YKU7KHJO.js → chunk-4VK5G3SV.js} +3 -3
  9. package/dist/{chunk-YXAPCHXJ.js → chunk-5JPD6VIH.js} +24 -4
  10. package/dist/{chunk-57FHYW74.js → chunk-66F3HLW4.js} +2 -2
  11. package/dist/{chunk-EONAJAMJ.js → chunk-7SDOSTW7.js} +3 -3
  12. package/dist/{chunk-IACJDHFQ.js → chunk-AWZF72SH.js} +5 -5
  13. package/dist/{chunk-FR6JHNLC.js → chunk-CQZYQAAV.js} +3 -3
  14. package/dist/{chunk-2S44RDO4.js → chunk-EKPMVEIA.js} +2 -2
  15. package/dist/{chunk-3UOFHLY4.js → chunk-FD6VGFYZ.js} +5 -5
  16. package/dist/chunk-FGYFA6JY.js +7 -0
  17. package/dist/{chunk-XNPOHPMJ.js → chunk-FQAJSNNU.js} +3 -3
  18. package/dist/{chunk-4XNAKVSO.js → chunk-IQD4W53M.js} +2 -2
  19. package/dist/{chunk-SPUCY4AG.js → chunk-IZABPDAO.js} +2 -2
  20. package/dist/{chunk-A6TM4NTI.js → chunk-J6HNP6HA.js} +2 -2
  21. package/dist/{chunk-PBDPWE5J.js → chunk-JBHGJKSL.js} +2 -2
  22. package/dist/{chunk-YYG3GUQW.js → chunk-K2C3KFGB.js} +9 -9
  23. package/dist/{chunk-BZ2RXI5I.js → chunk-L4MFGGSI.js} +2 -2
  24. package/dist/{chunk-W5RLIUNC.js → chunk-M2RYXWX2.js} +2 -2
  25. package/dist/{chunk-4XWVLC23.js → chunk-MZEMLFFD.js} +2 -2
  26. package/dist/{chunk-VDBUZKXC.js → chunk-O2JWF7ZM.js} +2 -2
  27. package/dist/{chunk-PG42KALG.js → chunk-OAIQ7A3R.js} +5 -5
  28. package/dist/{chunk-I4DLMIN5.js → chunk-ONP6JRFZ.js} +2 -2
  29. package/dist/{chunk-V7HG3STC.js → chunk-PQTM27GU.js} +32 -15
  30. package/dist/{chunk-YLPXTJJM.js → chunk-QDY6BWE6.js} +2 -2
  31. package/dist/{chunk-BRSESCGX.js → chunk-QOFSPFJ6.js} +13 -12
  32. package/dist/{chunk-RRKGSYQ4.js → chunk-QSIADSMQ.js} +13 -2
  33. package/dist/{chunk-MCYGYZVZ.js → chunk-QYH2NR6G.js} +2 -2
  34. package/dist/{chunk-XPWIJOZT.js → chunk-RBNMNKNN.js} +3 -3
  35. package/dist/{chunk-QTKD7JEL.js → chunk-RMHZFWHF.js} +15 -15
  36. package/dist/{chunk-QYQGPDBE.js → chunk-YDICIB2A.js} +2 -2
  37. package/dist/{chunk-CJ6OFTS3.js → chunk-YOWIYFIV.js} +6 -37
  38. package/dist/{claude-2C5L2HQL.js → claude-GT2BPXEL.js} +3 -3
  39. package/dist/{cli-YV6SFE4D.js → cli-6HTAJ54L.js} +4 -4
  40. package/dist/{cli-BVRPAI23.js → cli-IV5DJCXU.js} +8 -8
  41. package/dist/cli.js +3 -3
  42. package/dist/{completion-B3UT3GVI.js → completion-PPM7MEI2.js} +2 -2
  43. package/dist/{diagnostics-ONIAKCA3.js → diagnostics-EWU2ROTG.js} +6 -6
  44. package/dist/{doctor-MJFU5L6R.js → doctor-ZWZQMDKZ.js} +17 -17
  45. package/dist/{entry-DZGKCL4G.js → entry-NDICBQ2F.js} +10 -10
  46. package/dist/{exec-mcp-QK2VC6RX.js → exec-mcp-AG4G7SG7.js} +10 -10
  47. package/dist/{harness-GTED4GLK.js → harness-JABSZCAA.js} +3 -3
  48. package/dist/harness-launch-gate.js +4 -4
  49. package/dist/harness-worker.js +6 -6
  50. package/dist/hook-body.js +42 -20
  51. package/dist/{hooks-FRZ4SUNJ.js → hooks-YVQSDQV3.js} +3 -3
  52. package/dist/{host-AGNF2AQH.js → host-2SZRMHZX.js} +7 -7
  53. package/dist/{host-3HTCZNVJ.js → host-BWZ5LA4Q.js} +12 -12
  54. package/dist/{host-run-2OQZVQID.js → host-run-SXLV4LHI.js} +5 -5
  55. package/dist/http.d.ts +1 -1
  56. package/dist/http.js +1 -1
  57. package/dist/{import-mcp-7KEPR2B6.js → import-mcp-2M7SZRVQ.js} +8 -8
  58. package/dist/index.d.ts +2 -2
  59. package/dist/index.js +17 -17
  60. package/dist/{init-BHGCF7JL.js → init-HOOIFBAD.js} +2 -2
  61. package/dist/{invoke-CVHF6PEK.js → invoke-JP4MILYY.js} +8 -8
  62. package/dist/{list-6XGQ3FR3.js → list-UBSBUZKS.js} +10 -10
  63. package/dist/{logout-6RJLG2KG.js → logout-OO3DERRK.js} +9 -9
  64. package/dist/{logs-VTW7S2LR.js → logs-K3QXKRD4.js} +4 -4
  65. package/dist/mailbox/index.d.ts +3 -3
  66. package/dist/{mailbox-CNAONXN7.js → mailbox-DAJV6VAI.js} +9 -9
  67. package/dist/{mainline-JSG4MUKH.js → mainline-6K5BA3WX.js} +48 -25
  68. package/dist/{mcp-P55VLQLR.js → mcp-JXNTKRJG.js} +2 -2
  69. package/dist/{pause-V5VCNOSH.js → pause-GRVTSKOK.js} +4 -4
  70. package/dist/{project-B57IQPDK.js → project-M672MKQH.js} +4 -4
  71. package/dist/{pty-FD4JGBZL.js → pty-LHKJKY2E.js} +3 -3
  72. package/dist/{resume-7S4K3R4X.js → resume-6DMPGG3N.js} +4 -4
  73. package/dist/{run-MC2BPLOE.js → run-5W566T3V.js} +8 -8
  74. package/dist/{run-LFJXONLW.js → run-ORBIERI3.js} +4 -4
  75. package/dist/{serve-TFAEVXX3.js → serve-73SRPAV4.js} +3 -3
  76. package/dist/{setup-FHFQZJY6.js → setup-ULKDPF5B.js} +4 -4
  77. package/dist/{start-login-KXOHCR5A.js → start-login-BGFAMCZL.js} +9 -9
  78. package/dist/{status-AW7DOW7A.js → status-73FEFQUQ.js} +9 -9
  79. package/dist/{status-YXOIEVOJ.js → status-YCW6YJ3S.js} +13 -13
  80. package/dist/{status-OYRB3KL5.js → status-YHXEAJ7U.js} +7 -7
  81. package/dist/stdio.d.ts +2 -2
  82. package/dist/stdio.js +2 -2
  83. package/dist/{sweep-ZSYG6FNR.js → sweep-XF2HG3EO.js} +4 -4
  84. package/dist/{test-2HTOY4PJ.js → test-IMNBXOYW.js} +11 -13
  85. package/dist/{tui-DQFXYQ4H.js → tui-5GDA22TB.js} +4 -4
  86. package/dist/{unbroadcast-FONZJWEW.js → unbroadcast-XP3OCVN3.js} +4 -4
  87. package/dist/{validate-WOFI7TMT.js → validate-KFBCUFI4.js} +2 -2
  88. package/dist/{worker-UXPGXAV2.js → worker-RV6NGSXT.js} +8 -8
  89. package/docs/git-workflow.md +22 -5
  90. package/docs/hooks.md +1 -2
  91. package/docs/project-configuration.md +7 -5
  92. package/docs/upgrading.md +52 -0
  93. package/gemini-extension.json +2 -2
  94. package/mcp.json +1 -1
  95. package/package.json +5 -5
  96. package/plugin.json +1 -1
  97. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  98. package/plugins/pmcp/.mcp.json +1 -1
  99. package/plugins/pmcp/gemini-extension.json +2 -2
  100. package/plugins/pmcp/mcp.json +1 -1
  101. package/plugins/pmcp/mod/reader/read.ts +14 -4
  102. package/plugins/pmcp/mod/sessions/format.ts +16 -1
  103. package/plugins/pmcp/mod/sessions/types.ts +1 -1
  104. package/plugins/pmcp/plugin.json +1 -1
  105. package/schema/catalog-v1.json +1 -7
  106. package/dist/chunk-YGTJQVCK.js +0 -7
  107. package/dist/{core-C1LPjxK6.d.ts → core-Sug_rZrx.d.ts} +1 -1
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  policyRows
3
- } from "./chunk-2S44RDO4.js";
3
+ } from "./chunk-EKPMVEIA.js";
4
4
  import {
5
5
  specFrom
6
- } from "./chunk-PBDPWE5J.js";
6
+ } from "./chunk-JBHGJKSL.js";
7
7
  import "./chunk-7TD53M7L.js";
8
8
  import "./chunk-RPCIROW7.js";
9
9
  import {
10
10
  RUNTIME_IDS
11
- } from "./chunk-BRSESCGX.js";
11
+ } from "./chunk-QOFSPFJ6.js";
12
12
  import "./chunk-HQOB7OQS.js";
13
13
  import "./chunk-ICF2JZSN.js";
14
14
  import "./chunk-UD3BEEBQ.js";
15
15
  import "./chunk-ISNRDHSD.js";
16
16
  import "./chunk-EATCUWGG.js";
17
17
  import "./chunk-NRBQK6UX.js";
18
- import "./chunk-I4DLMIN5.js";
18
+ import "./chunk-ONP6JRFZ.js";
19
19
  import "./chunk-P6LNYYYH.js";
20
- import "./chunk-YXAPCHXJ.js";
20
+ import "./chunk-5JPD6VIH.js";
21
21
  import "./chunk-2Q6MNGU5.js";
22
- import "./chunk-V7HG3STC.js";
23
- import "./chunk-RRKGSYQ4.js";
22
+ import "./chunk-PQTM27GU.js";
23
+ import "./chunk-QSIADSMQ.js";
24
24
  import "./chunk-G7JONWL4.js";
25
25
  import "./chunk-Q5H3L6Y4.js";
26
26
  import {
@@ -28,10 +28,10 @@ import {
28
28
  one
29
29
  } from "./chunk-A4PKLESO.js";
30
30
  import "./chunk-V4NPDK6X.js";
31
- import "./chunk-57FHYW74.js";
31
+ import "./chunk-66F3HLW4.js";
32
32
  import "./chunk-OEH47H6A.js";
33
33
  import "./chunk-IJBSOWHK.js";
34
- import "./chunk-YGTJQVCK.js";
34
+ import "./chunk-FGYFA6JY.js";
35
35
  import "./chunk-GJXOFDJT.js";
36
36
  import "./chunk-PMJG2CXF.js";
37
37
  import "./chunk-J6KL3COD.js";
@@ -63,4 +63,4 @@ function run(context) {
63
63
  export {
64
64
  run
65
65
  };
66
- //# sourceMappingURL=list-6XGQ3FR3.js.map
66
+ //# sourceMappingURL=list-UBSBUZKS.js.map
@@ -1,33 +1,33 @@
1
1
  import {
2
2
  serverFrom
3
- } from "./chunk-A6TM4NTI.js";
3
+ } from "./chunk-J6HNP6HA.js";
4
4
  import {
5
5
  logout
6
6
  } from "./chunk-E2YOZ2FF.js";
7
7
  import "./chunk-DZ2MRTYT.js";
8
8
  import "./chunk-UPQTAHUK.js";
9
9
  import "./chunk-RPCIROW7.js";
10
- import "./chunk-BRSESCGX.js";
10
+ import "./chunk-QOFSPFJ6.js";
11
11
  import "./chunk-HQOB7OQS.js";
12
12
  import "./chunk-ICF2JZSN.js";
13
13
  import "./chunk-UD3BEEBQ.js";
14
14
  import "./chunk-ISNRDHSD.js";
15
15
  import "./chunk-EATCUWGG.js";
16
16
  import "./chunk-NRBQK6UX.js";
17
- import "./chunk-I4DLMIN5.js";
17
+ import "./chunk-ONP6JRFZ.js";
18
18
  import "./chunk-P6LNYYYH.js";
19
- import "./chunk-YXAPCHXJ.js";
19
+ import "./chunk-5JPD6VIH.js";
20
20
  import "./chunk-2Q6MNGU5.js";
21
- import "./chunk-V7HG3STC.js";
22
- import "./chunk-RRKGSYQ4.js";
21
+ import "./chunk-PQTM27GU.js";
22
+ import "./chunk-QSIADSMQ.js";
23
23
  import "./chunk-G7JONWL4.js";
24
24
  import "./chunk-Q5H3L6Y4.js";
25
25
  import "./chunk-A4PKLESO.js";
26
26
  import "./chunk-V4NPDK6X.js";
27
- import "./chunk-57FHYW74.js";
27
+ import "./chunk-66F3HLW4.js";
28
28
  import "./chunk-OEH47H6A.js";
29
29
  import "./chunk-IJBSOWHK.js";
30
- import "./chunk-YGTJQVCK.js";
30
+ import "./chunk-FGYFA6JY.js";
31
31
  import "./chunk-GJXOFDJT.js";
32
32
  import "./chunk-PMJG2CXF.js";
33
33
  import "./chunk-J6KL3COD.js";
@@ -42,4 +42,4 @@ async function run(context) {
42
42
  export {
43
43
  run
44
44
  };
45
- //# sourceMappingURL=logout-6RJLG2KG.js.map
45
+ //# sourceMappingURL=logout-OO3DERRK.js.map
@@ -6,15 +6,15 @@ import {
6
6
  pruneLogs,
7
7
  readLogs,
8
8
  tail
9
- } from "./chunk-4XNAKVSO.js";
9
+ } from "./chunk-IQD4W53M.js";
10
10
  import {
11
11
  configFrom
12
12
  } from "./chunk-RPCIROW7.js";
13
13
  import {
14
14
  isLogLevel
15
15
  } from "./chunk-HQOB7OQS.js";
16
- import "./chunk-V7HG3STC.js";
17
- import "./chunk-RRKGSYQ4.js";
16
+ import "./chunk-PQTM27GU.js";
17
+ import "./chunk-QSIADSMQ.js";
18
18
  import {
19
19
  logsSpec
20
20
  } from "./chunk-YGOWIJPE.js";
@@ -103,4 +103,4 @@ var logsCommand = { ...logsSpec, run };
103
103
  export {
104
104
  logsCommand
105
105
  };
106
- //# sourceMappingURL=logs-VTW7S2LR.js.map
106
+ //# sourceMappingURL=logs-K3QXKRD4.js.map
@@ -1,7 +1,7 @@
1
- import { a as MailboxConfig, b as MailboxStore, B as Binding, R as Row, A as ActorCredential, M as MailboxService } from '../core-C1LPjxK6.js';
2
- export { c as MailboxError, d as MailboxOperation, e as Result, f as failure, i as inboxSchema, m as messageSchema, o as operationSchema, s as sendSchema, g as sessionsSchema } from '../core-C1LPjxK6.js';
1
+ import { a as MailboxConfig, b as MailboxStore, B as Binding, R as Row, A as ActorCredential, M as MailboxService } from '../core-Sug_rZrx.js';
2
+ export { c as MailboxError, d as MailboxOperation, e as Result, f as failure, i as inboxSchema, m as messageSchema, o as operationSchema, s as sendSchema, g as sessionsSchema } from '../core-Sug_rZrx.js';
3
3
  import { McpServer } from '@modelcontextprotocol/server';
4
- export { M as MailboxAttachmentOptions, a as attachMailbox } from '../attachment-D84OGI6n.js';
4
+ export { M as MailboxAttachmentOptions, a as attachMailbox } from '../attachment-ms6s8Aow.js';
5
5
  import { P as ProjectConfig } from '../config-DzHB75Jz.js';
6
6
  import 'zod';
7
7
  import '../encoder-DGRy9skC.js';
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  storeFrom
3
- } from "./chunk-MCYGYZVZ.js";
3
+ } from "./chunk-QYH2NR6G.js";
4
4
  import {
5
5
  pmcpCommand
6
6
  } from "./chunk-EATCUWGG.js";
7
7
  import {
8
8
  ptyRef
9
- } from "./chunk-I4DLMIN5.js";
9
+ } from "./chunk-ONP6JRFZ.js";
10
10
  import {
11
11
  addressedTo,
12
12
  inboxKey,
13
13
  normalizeSelector,
14
14
  sentBy
15
- } from "./chunk-V7HG3STC.js";
15
+ } from "./chunk-PQTM27GU.js";
16
16
  import {
17
17
  ancestors
18
- } from "./chunk-RRKGSYQ4.js";
18
+ } from "./chunk-QSIADSMQ.js";
19
19
  import {
20
20
  ArgumentError,
21
21
  many,
@@ -68,7 +68,7 @@ function inferSession(env, records, chain) {
68
68
 
69
69
  // src/sessions/wake/index.ts
70
70
  var TRANSPORTS = {
71
- claude: async () => (await import("./claude-2C5L2HQL.js")).claudeInbox,
71
+ claude: async () => (await import("./claude-GT2BPXEL.js")).claudeInbox,
72
72
  opencode: async () => (await import("./opencode-CN7JLQYO.js")).opencodeServer
73
73
  };
74
74
  function recipientOf(record) {
@@ -78,7 +78,7 @@ function recipientOf(record) {
78
78
  session: record.session,
79
79
  ...record.alias ? { alias: record.alias } : {},
80
80
  roles,
81
- ...record.worktree ? { desk: record.worktree } : {},
81
+ ...record.worktree ? { worktree: record.worktree } : {},
82
82
  ...record.startedAt ? { since: record.startedAt } : {}
83
83
  };
84
84
  }
@@ -90,7 +90,7 @@ function wakeText(session, mail, pmcp = "pmcp") {
90
90
  var NONE = "no wake transport for this runtime; the mail arrives at its next event";
91
91
  async function wakeOne(record, text, context) {
92
92
  if (ptyRef(record))
93
- return (await import("./pty-FD4JGBZL.js")).ptyTurn(record, text, context);
93
+ return (await import("./pty-LHKJKY2E.js")).ptyTurn(record, text, context);
94
94
  const load = TRANSPORTS[record.runtime ?? ""];
95
95
  if (load) return (await load()).wake(record, text, context);
96
96
  const runtime = record.runtime ?? "unknown";
@@ -156,7 +156,7 @@ function caller(context, store) {
156
156
  ...session ? { session } : {},
157
157
  ...alias ? { alias } : {},
158
158
  roles,
159
- ...record?.worktree ? { desk: record.worktree } : {},
159
+ ...record?.worktree ? { worktree: record.worktree } : {},
160
160
  ...record?.startedAt ? { since: record.startedAt } : {}
161
161
  };
162
162
  }
@@ -281,4 +281,4 @@ export {
281
281
  reply,
282
282
  send
283
283
  };
284
- //# sourceMappingURL=mailbox-CNAONXN7.js.map
284
+ //# sourceMappingURL=mailbox-DAJV6VAI.js.map
@@ -27,12 +27,12 @@ import {
27
27
  import {
28
28
  gateTreePath,
29
29
  leaseSpecs
30
- } from "./chunk-YXAPCHXJ.js";
30
+ } from "./chunk-5JPD6VIH.js";
31
31
  import "./chunk-2Q6MNGU5.js";
32
32
  import {
33
33
  createFilesStore
34
- } from "./chunk-V7HG3STC.js";
35
- import "./chunk-RRKGSYQ4.js";
34
+ } from "./chunk-PQTM27GU.js";
35
+ import "./chunk-QSIADSMQ.js";
36
36
  import {
37
37
  git,
38
38
  gitOk,
@@ -46,7 +46,8 @@ import "./chunk-GJXOFDJT.js";
46
46
  import "./chunk-PMJG2CXF.js";
47
47
 
48
48
  // src/git/mainline/deliver.ts
49
- import { readFileSync as readFileSync2 } from "fs";
49
+ import { readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
50
+ import { dirname as dirname3, join as join5 } from "path";
50
51
  import { loadavg } from "os";
51
52
 
52
53
  // src/git/mainline/gate.ts
@@ -379,6 +380,27 @@ function subject(cwd, sha) {
379
380
  function fetch(ctx) {
380
381
  return git(ctx.root, ["fetch", "-q", ctx.remote, ctx.mainline]).status === 0;
381
382
  }
383
+ function push(options, tip, preHook) {
384
+ const { ctx, report } = options;
385
+ const lockEnv = options.gate?.lockEnv;
386
+ const env = {
387
+ ...options.deliver.pushEnv,
388
+ ...preHook && lockEnv ? { [lockEnv]: "1" } : {},
389
+ PMCP_GIT_DELIVER: "1"
390
+ };
391
+ const args = ["push", ctx.remote, `${tip}:refs/heads/${ctx.mainline}`];
392
+ if (!preHook) return git(ctx.root, args, env);
393
+ const dir = options.gate?.logDir ?? join5(dirname3(gateTree(options.tree).tree), "logs");
394
+ const log = gateLog(dir, tip);
395
+ report.info(`the pre-push hook gates ${tip.slice(0, 10)}; gate log: ${log}`);
396
+ const pushed = git(ctx.root, args, env);
397
+ const output = `${pushed.stdout}${pushed.stderr}`;
398
+ writeFileSync2(log, output);
399
+ process.stderr.write(output);
400
+ if (options.track)
401
+ options.track.gate = { exit: pushed.status, log, by: "pre-push" };
402
+ return pushed;
403
+ }
382
404
  function attempts(options) {
383
405
  const { ctx, report } = options;
384
406
  const { lock, tree } = gateTree(options.tree);
@@ -407,7 +429,8 @@ function attempts(options) {
407
429
  report.warn(replayed.error);
408
430
  return 1;
409
431
  }
410
- const command = options.gate?.command;
432
+ const preHook = options.deliver.gate === "pre-push";
433
+ const command = preHook ? void 0 : options.gate?.command;
411
434
  if (command !== void 0) {
412
435
  const run = runGate(
413
436
  ctx.mainRoot,
@@ -420,19 +443,14 @@ function attempts(options) {
420
443
  options.gate?.logDir,
421
444
  options.umask !== void 0
422
445
  );
423
- if (options.track) options.track.gate = { exit: run.code, log: run.log };
446
+ if (options.track)
447
+ options.track.gate = { exit: run.code, log: run.log, by: "command" };
424
448
  if (run.code !== 0) {
425
449
  report.warn("the gate failed; nothing was pushed");
426
450
  return 1;
427
451
  }
428
452
  }
429
- const pushed = git(
430
- ctx.root,
431
- ["push", ctx.remote, `${replayed.tip}:refs/heads/${ctx.mainline}`],
432
- {
433
- PMCP_GIT_DELIVER: "1"
434
- }
435
- );
453
+ const pushed = push(options, replayed.tip, preHook);
436
454
  if (pushed.status === 0) {
437
455
  if (options.track) options.track.delivered = replayed.tip;
438
456
  report.info(`delivered ${replayed.tip.slice(0, 10)} to ${ctx.upstream}`);
@@ -440,10 +458,15 @@ function attempts(options) {
440
458
  }
441
459
  fetch(ctx);
442
460
  if (isAncestor(ctx.root, ctx.upstream, replayed.tip)) {
443
- report.warn(
444
- `the push failed for a reason other than a newer ${ctx.upstream}:
461
+ if (preHook)
462
+ report.warn(
463
+ `the pre-push gate failed (exit ${pushed.status}); nothing was pushed; full gate log: ${options.track?.gate?.log}`
464
+ );
465
+ else
466
+ report.warn(
467
+ `the push failed for a reason other than a newer ${ctx.upstream}:
445
468
  ${pushed.stderr.trim()}`
446
- );
469
+ );
447
470
  return 1;
448
471
  }
449
472
  report.info(`${ctx.upstream} moved while the gate ran; replaying again`);
@@ -615,7 +638,7 @@ function deliverOnce(options) {
615
638
 
616
639
  // src/git/mainline/delivery-events.ts
617
640
  import { appendFileSync, mkdirSync as mkdirSync3 } from "fs";
618
- import { dirname as dirname3 } from "path";
641
+ import { dirname as dirname4 } from "path";
619
642
  function deliveryEvents(setup) {
620
643
  return (delivery) => {
621
644
  const specs = leaseSpecs(setup.config);
@@ -628,7 +651,7 @@ function deliveryEvents(setup) {
628
651
  const spec = installSpec(sync, setup.stateDir);
629
652
  const state = spec ? installState(root, spec) : { hash: lockHash(root, paths), installed: false };
630
653
  const { hash, installed } = state;
631
- mkdirSync3(dirname3(events), { recursive: true });
654
+ mkdirSync3(dirname4(events), { recursive: true });
632
655
  appendFileSync(
633
656
  events,
634
657
  `${JSON.stringify({
@@ -660,7 +683,7 @@ function filesSessionGate(stateDir, leaseFiles = {}) {
660
683
 
661
684
  // src/git/mainline/sync.ts
662
685
  import { existsSync as existsSync4 } from "fs";
663
- import { join as join6 } from "path";
686
+ import { join as join7 } from "path";
664
687
 
665
688
  // src/git/mainline/identical-files.ts
666
689
  import { spawnSync as spawnSync2 } from "child_process";
@@ -675,7 +698,7 @@ import {
675
698
  renameSync,
676
699
  rmSync as rmSync4
677
700
  } from "fs";
678
- import { join as join5 } from "path";
701
+ import { join as join6 } from "path";
679
702
  var FILE_MODES = /* @__PURE__ */ new Set(["100644", "100755"]);
680
703
  function refuse(path) {
681
704
  return {
@@ -689,7 +712,7 @@ function identical(cwd, path, mode, oid) {
689
712
  if (!FILE_MODES.has(mode)) return false;
690
713
  let current = cwd;
691
714
  for (const segment of path.split("/")) {
692
- current = join5(current, segment);
715
+ current = join6(current, segment);
693
716
  if (lstatSync(current).isSymbolicLink()) return false;
694
717
  }
695
718
  const stat = lstatSync(current);
@@ -714,7 +737,7 @@ function adopt(cwd, target, env) {
714
737
  if (!match) continue;
715
738
  const [, mode = "", oid = "", path = ""] = match;
716
739
  if (existing.has(path)) continue;
717
- if (!lstatSync(join5(cwd, path), { throwIfNoEntry: false })) continue;
740
+ if (!lstatSync(join6(cwd, path), { throwIfNoEntry: false })) continue;
718
741
  if (!identical(cwd, path, mode, oid)) return refuse(path);
719
742
  const added = git(
720
743
  cwd,
@@ -741,7 +764,7 @@ function resetKeepingIdenticalFiles(cwd, target) {
741
764
  try {
742
765
  fd = openSync2(lock, "wx");
743
766
  temporary = mkdtempSync2(`${index}.sync-`);
744
- const scratch = join5(temporary, "index");
767
+ const scratch = join6(temporary, "index");
745
768
  copyFileSync(index, scratch);
746
769
  const env = { GIT_INDEX_FILE: scratch };
747
770
  const refused = adopt(cwd, target, env);
@@ -785,7 +808,7 @@ function refusal(ctx) {
785
808
  if (branch !== ctx.mainline)
786
809
  return `the main checkout is on ${branch || "a detached HEAD"}, not ${ctx.mainline}`;
787
810
  for (const marker of IN_PROGRESS) {
788
- if (existsSync4(join6(ctx.gitDir, marker)))
811
+ if (existsSync4(join7(ctx.gitDir, marker)))
789
812
  return `${marker} is present; another git command is running or unfinished`;
790
813
  }
791
814
  return null;
@@ -917,4 +940,4 @@ export {
917
940
  mainlineDeliver,
918
941
  mainlineSync
919
942
  };
920
- //# sourceMappingURL=mainline-JSG4MUKH.js.map
943
+ //# sourceMappingURL=mainline-6K5BA3WX.js.map
@@ -5,11 +5,11 @@ import "./chunk-XNML2KIC.js";
5
5
 
6
6
  // src/commands/mcp.ts
7
7
  async function run(context) {
8
- const { executeMcpCommand } = await import("./run-LFJXONLW.js");
8
+ const { executeMcpCommand } = await import("./run-ORBIERI3.js");
9
9
  return executeMcpCommand(context);
10
10
  }
11
11
  var mcpCommand = { ...mcpSpec, run };
12
12
  export {
13
13
  mcpCommand
14
14
  };
15
- //# sourceMappingURL=mcp-P55VLQLR.js.map
15
+ //# sourceMappingURL=mcp-JXNTKRJG.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  change
3
- } from "./chunk-MCYGYZVZ.js";
4
- import "./chunk-V7HG3STC.js";
5
- import "./chunk-RRKGSYQ4.js";
3
+ } from "./chunk-QYH2NR6G.js";
4
+ import "./chunk-PQTM27GU.js";
5
+ import "./chunk-QSIADSMQ.js";
6
6
  import "./chunk-A4PKLESO.js";
7
7
  import "./chunk-OEH47H6A.js";
8
8
  import "./chunk-IJBSOWHK.js";
@@ -14,4 +14,4 @@ var run = (context) => change(context, "pause");
14
14
  export {
15
15
  run
16
16
  };
17
- //# sourceMappingURL=pause-V5VCNOSH.js.map
17
+ //# sourceMappingURL=pause-GRVTSKOK.js.map
@@ -19,7 +19,7 @@ async function route(context, verb, name) {
19
19
  if (name === void 0 || context.args.flags.has("check") || context.args.flags.has("write") || many(context.args, "source").length > 0 || many(context.args, "name").length > 0) {
20
20
  throw new ArgumentError("exec-mcp takes only a declared MCP alias");
21
21
  }
22
- const { runExecMcp } = await import("./exec-mcp-QK2VC6RX.js");
22
+ const { runExecMcp } = await import("./exec-mcp-AG4G7SG7.js");
23
23
  return await runExecMcp(context, name);
24
24
  }
25
25
  if (verb === "import-mcp") {
@@ -28,13 +28,13 @@ async function route(context, verb, name) {
28
28
  "import-mcp takes --source, --name and --write; no positional name or --check"
29
29
  );
30
30
  }
31
- const { importMcp } = await import("./import-mcp-7KEPR2B6.js");
31
+ const { importMcp } = await import("./import-mcp-2M7SZRVQ.js");
32
32
  return importMcp(context);
33
33
  }
34
34
  if (many(context.args, "source").length > 0 || one(context.args, "name") !== void 0 || context.args.flags.has("write")) {
35
35
  throw new ArgumentError("--source, --name and --write require import-mcp");
36
36
  }
37
- const apply = await import("./apply-TM6B2Y3G.js");
37
+ const apply = await import("./apply-QJ6MGLBX.js");
38
38
  if (verb === void 0) return apply.projectOrCheck(context);
39
39
  if (context.args.flags.has("check")) {
40
40
  throw new ArgumentError("--check takes no subcommand");
@@ -67,4 +67,4 @@ var projectCommand = {
67
67
  export {
68
68
  projectCommand
69
69
  };
70
- //# sourceMappingURL=project-B57IQPDK.js.map
70
+ //# sourceMappingURL=project-M672MKQH.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ptyRef
3
- } from "./chunk-I4DLMIN5.js";
4
- import "./chunk-RRKGSYQ4.js";
3
+ } from "./chunk-ONP6JRFZ.js";
4
+ import "./chunk-QSIADSMQ.js";
5
5
 
6
6
  // src/sessions/wake/pty.ts
7
7
  import { createConnection } from "net";
@@ -91,4 +91,4 @@ async function ptyTurn(record, text, _context) {
91
91
  export {
92
92
  ptyTurn
93
93
  };
94
- //# sourceMappingURL=pty-FD4JGBZL.js.map
94
+ //# sourceMappingURL=pty-LHKJKY2E.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  change
3
- } from "./chunk-MCYGYZVZ.js";
4
- import "./chunk-V7HG3STC.js";
5
- import "./chunk-RRKGSYQ4.js";
3
+ } from "./chunk-QYH2NR6G.js";
4
+ import "./chunk-PQTM27GU.js";
5
+ import "./chunk-QSIADSMQ.js";
6
6
  import "./chunk-A4PKLESO.js";
7
7
  import "./chunk-OEH47H6A.js";
8
8
  import "./chunk-IJBSOWHK.js";
@@ -14,4 +14,4 @@ var run = (context) => change(context, "resume");
14
14
  export {
15
15
  run
16
16
  };
17
- //# sourceMappingURL=resume-7S4K3R4X.js.map
17
+ //# sourceMappingURL=resume-6DMPGG3N.js.map
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  readSpec
3
- } from "./chunk-BRSESCGX.js";
3
+ } from "./chunk-QOFSPFJ6.js";
4
4
  import "./chunk-HQOB7OQS.js";
5
5
  import "./chunk-ICF2JZSN.js";
6
6
  import "./chunk-UD3BEEBQ.js";
7
7
  import "./chunk-ISNRDHSD.js";
8
8
  import "./chunk-EATCUWGG.js";
9
9
  import "./chunk-NRBQK6UX.js";
10
- import "./chunk-I4DLMIN5.js";
10
+ import "./chunk-ONP6JRFZ.js";
11
11
  import "./chunk-P6LNYYYH.js";
12
12
  import {
13
13
  readGitConfig
14
- } from "./chunk-YXAPCHXJ.js";
14
+ } from "./chunk-5JPD6VIH.js";
15
15
  import {
16
16
  detect
17
17
  } from "./chunk-2Q6MNGU5.js";
18
- import "./chunk-V7HG3STC.js";
19
- import "./chunk-RRKGSYQ4.js";
18
+ import "./chunk-PQTM27GU.js";
19
+ import "./chunk-QSIADSMQ.js";
20
20
  import "./chunk-G7JONWL4.js";
21
21
  import "./chunk-Q5H3L6Y4.js";
22
22
  import {
@@ -24,10 +24,10 @@ import {
24
24
  one
25
25
  } from "./chunk-A4PKLESO.js";
26
26
  import "./chunk-V4NPDK6X.js";
27
- import "./chunk-57FHYW74.js";
27
+ import "./chunk-66F3HLW4.js";
28
28
  import "./chunk-OEH47H6A.js";
29
29
  import "./chunk-IJBSOWHK.js";
30
- import "./chunk-YGTJQVCK.js";
30
+ import "./chunk-FGYFA6JY.js";
31
31
  import {
32
32
  readConfig
33
33
  } from "./chunk-GJXOFDJT.js";
@@ -124,4 +124,4 @@ function run(context) {
124
124
  export {
125
125
  run
126
126
  };
127
- //# sourceMappingURL=run-MC2BPLOE.js.map
127
+ //# sourceMappingURL=run-5W566T3V.js.map
@@ -9,11 +9,11 @@ async function executeMcpCommand(context) {
9
9
  throw new ArgumentError("Use pmcp mcp <login|logout|status> <name>");
10
10
  if (context.args.flags.has("json") && verb !== "status")
11
11
  throw new ArgumentError("--json requires mcp status");
12
- if (verb === "status") return (await import("./status-AW7DOW7A.js")).run(context);
13
- if (verb === "logout") return (await import("./logout-6RJLG2KG.js")).run(context);
14
- return (await import("./start-login-KXOHCR5A.js")).run(context);
12
+ if (verb === "status") return (await import("./status-73FEFQUQ.js")).run(context);
13
+ if (verb === "logout") return (await import("./logout-OO3DERRK.js")).run(context);
14
+ return (await import("./start-login-BGFAMCZL.js")).run(context);
15
15
  }
16
16
  export {
17
17
  executeMcpCommand
18
18
  };
19
- //# sourceMappingURL=run-LFJXONLW.js.map
19
+ //# sourceMappingURL=run-ORBIERI3.js.map
@@ -19,7 +19,7 @@ import "./chunk-73AKO4UL.js";
19
19
  import {
20
20
  serve,
21
21
  serveWithMailbox
22
- } from "./chunk-4XWVLC23.js";
22
+ } from "./chunk-MZEMLFFD.js";
23
23
  import {
24
24
  serveSpec
25
25
  } from "./chunk-LLT5FQBE.js";
@@ -30,7 +30,7 @@ import {
30
30
  one
31
31
  } from "./chunk-A4PKLESO.js";
32
32
  import "./chunk-ISZOLR3D.js";
33
- import "./chunk-VDBUZKXC.js";
33
+ import "./chunk-O2JWF7ZM.js";
34
34
  import "./chunk-6WXMJOMI.js";
35
35
  import "./chunk-4CRRLDDS.js";
36
36
  import "./chunk-YSAWTGNA.js";
@@ -101,4 +101,4 @@ var serveCommand = {
101
101
  export {
102
102
  serveCommand
103
103
  };
104
- //# sourceMappingURL=serve-TFAEVXX3.js.map
104
+ //# sourceMappingURL=serve-73SRPAV4.js.map
@@ -2,10 +2,10 @@ import {
2
2
  gateTreePath,
3
3
  leaseSpecs,
4
4
  loadGit
5
- } from "./chunk-YXAPCHXJ.js";
5
+ } from "./chunk-5JPD6VIH.js";
6
6
  import "./chunk-2Q6MNGU5.js";
7
- import "./chunk-V7HG3STC.js";
8
- import "./chunk-RRKGSYQ4.js";
7
+ import "./chunk-PQTM27GU.js";
8
+ import "./chunk-QSIADSMQ.js";
9
9
  import "./chunk-G7JONWL4.js";
10
10
  import "./chunk-OEH47H6A.js";
11
11
  import "./chunk-IJBSOWHK.js";
@@ -16,4 +16,4 @@ export {
16
16
  leaseSpecs,
17
17
  loadGit
18
18
  };
19
- //# sourceMappingURL=setup-FHFQZJY6.js.map
19
+ //# sourceMappingURL=setup-ULKDPF5B.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  serverFrom
3
- } from "./chunk-A6TM4NTI.js";
3
+ } from "./chunk-J6HNP6HA.js";
4
4
  import {
5
5
  storeBearer,
6
6
  tokenRequest,
@@ -14,19 +14,19 @@ import {
14
14
  writeCredentials
15
15
  } from "./chunk-UPQTAHUK.js";
16
16
  import "./chunk-RPCIROW7.js";
17
- import "./chunk-BRSESCGX.js";
17
+ import "./chunk-QOFSPFJ6.js";
18
18
  import "./chunk-HQOB7OQS.js";
19
19
  import "./chunk-ICF2JZSN.js";
20
20
  import "./chunk-UD3BEEBQ.js";
21
21
  import "./chunk-ISNRDHSD.js";
22
22
  import "./chunk-EATCUWGG.js";
23
23
  import "./chunk-NRBQK6UX.js";
24
- import "./chunk-I4DLMIN5.js";
24
+ import "./chunk-ONP6JRFZ.js";
25
25
  import "./chunk-P6LNYYYH.js";
26
- import "./chunk-YXAPCHXJ.js";
26
+ import "./chunk-5JPD6VIH.js";
27
27
  import "./chunk-2Q6MNGU5.js";
28
- import "./chunk-V7HG3STC.js";
29
- import "./chunk-RRKGSYQ4.js";
28
+ import "./chunk-PQTM27GU.js";
29
+ import "./chunk-QSIADSMQ.js";
30
30
  import "./chunk-G7JONWL4.js";
31
31
  import {
32
32
  McpAuthError,
@@ -37,10 +37,10 @@ import {
37
37
  one
38
38
  } from "./chunk-A4PKLESO.js";
39
39
  import "./chunk-V4NPDK6X.js";
40
- import "./chunk-57FHYW74.js";
40
+ import "./chunk-66F3HLW4.js";
41
41
  import "./chunk-OEH47H6A.js";
42
42
  import "./chunk-IJBSOWHK.js";
43
- import "./chunk-YGTJQVCK.js";
43
+ import "./chunk-FGYFA6JY.js";
44
44
  import "./chunk-GJXOFDJT.js";
45
45
  import "./chunk-PMJG2CXF.js";
46
46
  import "./chunk-J6KL3COD.js";
@@ -414,4 +414,4 @@ async function run(context) {
414
414
  export {
415
415
  run
416
416
  };
417
- //# sourceMappingURL=start-login-KXOHCR5A.js.map
417
+ //# sourceMappingURL=start-login-BGFAMCZL.js.map