@modootoday/pmcp 0.22.12 → 0.22.13

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 (121) 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/affected-ZWO2F5EM.js +836 -0
  6. package/dist/{apply-LPKZZ6EL.js → apply-OIKQ5SIY.js} +19 -15
  7. package/dist/{available-BFXLII4A.js → available-Z5MIDFPH.js} +3 -3
  8. package/dist/{broadcast-DZGMSZRG.js → broadcast-BF2QL3O7.js} +6 -5
  9. package/dist/{chunk-DYZVHO2L.js → chunk-24L4MO7H.js} +2 -2
  10. package/dist/{chunk-7I7O7ZNT.js → chunk-3V37OZQH.js} +5 -3
  11. package/dist/{chunk-PEMMV5YQ.js → chunk-4O4ZOSBQ.js} +3 -3
  12. package/dist/{chunk-FODUHLZM.js → chunk-5IZFEVPW.js} +2 -2
  13. package/dist/{chunk-D5MIZM6L.js → chunk-5KWDQFVY.js} +4 -4
  14. package/dist/{chunk-R5MT42JS.js → chunk-5OFQVW2K.js} +2 -2
  15. package/dist/{chunk-OAX6MIOZ.js → chunk-5PNS6V5C.js} +2 -2
  16. package/dist/chunk-65BW7Y6O.js +40 -0
  17. package/dist/{chunk-SPZQRLL5.js → chunk-733WVP2R.js} +18 -6
  18. package/dist/{chunk-HUBJWC7T.js → chunk-737BENAU.js} +7 -7
  19. package/dist/{chunk-GFOQDLPL.js → chunk-74O7KZUH.js} +13 -3
  20. package/dist/{chunk-2OOWAGBE.js → chunk-7ZOQELXR.js} +3 -3
  21. package/dist/{chunk-ITOTOC6Y.js → chunk-A6DARDQ4.js} +3 -3
  22. package/dist/{chunk-PUIWESU3.js → chunk-A7XCUR2C.js} +4 -4
  23. package/dist/chunk-BN4XAXMQ.js +65 -0
  24. package/dist/chunk-FOLA4EUJ.js +261 -0
  25. package/dist/chunk-FQLCD4HU.js +24 -0
  26. package/dist/chunk-G4ATQPQI.js +35 -0
  27. package/dist/{chunk-DP326AER.js → chunk-GNVME5AD.js} +2 -2
  28. package/dist/{chunk-OEH47H6A.js → chunk-GUHOEIHP.js} +3 -20
  29. package/dist/{chunk-UMQLIRSU.js → chunk-ISGBOJT7.js} +3 -3
  30. package/dist/{chunk-RPCIROW7.js → chunk-J3QUG6O5.js} +2 -2
  31. package/dist/{chunk-B2WRYGHJ.js → chunk-JW5NMQTU.js} +3 -3
  32. package/dist/{chunk-63RZGEVI.js → chunk-K2VU3B4W.js} +98 -26
  33. package/dist/{chunk-5QKXEWDB.js → chunk-MHKY6TNF.js} +6 -4
  34. package/dist/chunk-N7ANFMA5.js +171 -0
  35. package/dist/{chunk-EX4YXPVW.js → chunk-NNGGNXF2.js} +2 -2
  36. package/dist/{chunk-7CSUKCU7.js → chunk-P5D6RKMT.js} +13 -94
  37. package/dist/{chunk-SMZPYJQI.js → chunk-QBSJL3SP.js} +42 -31
  38. package/dist/chunk-SGFTHKKS.js +86 -0
  39. package/dist/{chunk-N63QCJHX.js → chunk-T4GVN7XO.js} +5 -5
  40. package/dist/chunk-T6C3TSTO.js +99 -0
  41. package/dist/{chunk-UDVYVRGJ.js → chunk-UED3RH53.js} +2 -2
  42. package/dist/{chunk-SUJCVEBM.js → chunk-VNZTULFD.js} +3 -3
  43. package/dist/chunk-VSTUKACC.js +7 -0
  44. package/dist/{chunk-A4PKLESO.js → chunk-WFY7ATSZ.js} +8 -4
  45. package/dist/{chunk-KPKMEUUH.js → chunk-XSWF7APE.js} +3 -3
  46. package/dist/{chunk-MIFPPUWY.js → chunk-ZKB7ZNKY.js} +4 -4
  47. package/dist/{chunk-2GRECE6B.js → chunk-ZS5IDQFJ.js} +4 -4
  48. package/dist/{cli-JXPJFHUA.js → cli-FSSYFCV3.js} +15 -9
  49. package/dist/{cli-34EDFXJA.js → cli-IHVNE3WL.js} +9 -9
  50. package/dist/cli.js +19 -13
  51. package/dist/{completion-KTECNPVY.js → completion-ZTTJVV4C.js} +8 -6
  52. package/dist/{diagnostics-I5VZHK42.js → diagnostics-XC5L6Z3E.js} +10 -6
  53. package/dist/{doctor-JJ2VUNHT.js → doctor-FGDSUBR3.js} +19 -15
  54. package/dist/{entry-OT7BN3ID.js → entry-NNB2CQLZ.js} +19 -15
  55. package/dist/{exec-mcp-3E4SRJUY.js → exec-mcp-ZU3Z3XT6.js} +15 -11
  56. package/dist/{harness-Q236VJSU.js → harness-B7ANLH5M.js} +5 -5
  57. package/dist/harness-launch-gate.js +8 -4
  58. package/dist/harness-worker.js +10 -6
  59. package/dist/heavy-IIZBO4YM.js +1909 -0
  60. package/dist/hook-body.js +69 -21
  61. package/dist/{hooks-PABOEQO6.js → hooks-IEJTW7BV.js} +5 -5
  62. package/dist/{host-UDC4HVX3.js → host-5P4D7GSE.js} +17 -13
  63. package/dist/{host-LT5JMUFJ.js → host-XXWQ23LD.js} +11 -7
  64. package/dist/{host-run-LD63JGN7.js → host-run-AEWHFVQL.js} +10 -6
  65. package/dist/http.js +1 -1
  66. package/dist/{import-mcp-URVONIZ3.js → import-mcp-BQM5DKYH.js} +14 -10
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +16 -12
  69. package/dist/{init-4O24ZNUQ.js → init-L6GUO3PW.js} +2 -2
  70. package/dist/{install-7V6NIA7W.js → install-OFVLR7TI.js} +3 -3
  71. package/dist/{invoke-JW5OC2HO.js → invoke-3BQ5NG3P.js} +12 -8
  72. package/dist/{list-UM4DYJRL.js → list-EU4MJOXA.js} +16 -12
  73. package/dist/{list-WK2IYUK7.js → list-WWYCGD3X.js} +4 -4
  74. package/dist/{logout-H5X4D26I.js → logout-6DFDYJUI.js} +15 -11
  75. package/dist/{logs-UHJM7ZCL.js → logs-BRF6DBKG.js} +7 -6
  76. package/dist/{mailbox-YN6PG66A.js → mailbox-AQCTXO3H.js} +3 -3
  77. package/dist/{mailbox-NIMBOQPA.js → mailbox-QYA2LQSE.js} +9 -41
  78. package/dist/{mainline-74WCH4T4.js → mainline-O5AEHG3J.js} +69 -121
  79. package/dist/{marketplace-G4VQET5W.js → marketplace-TI5HFAHB.js} +2 -2
  80. package/dist/{mcp-AXHV547W.js → mcp-4R53HSGY.js} +2 -2
  81. package/dist/{mcp-6P3MVT4V.js → mcp-HR5JFUW7.js} +2 -2
  82. package/dist/{models-ISU4DCMA.js → models-63NQBSV3.js} +2 -2
  83. package/dist/{pause-CBZ3BTJL.js → pause-UF7FQDJX.js} +6 -5
  84. package/dist/{preview-DT7DWG5F.js → preview-WSESS2UN.js} +3 -3
  85. package/dist/{project-6QUIC73W.js → project-JXXL24WN.js} +5 -5
  86. package/dist/{reindex-I7RYWCUR.js → reindex-3GPKAFBW.js} +5 -5
  87. package/dist/{report-ZHOHQ4PZ.js → report-JUSKQPAC.js} +7 -6
  88. package/dist/{resume-UJEWQ66P.js → resume-3WAROOQ3.js} +6 -5
  89. package/dist/{run-GZK3XJ62.js → run-VUUQS4WY.js} +5 -5
  90. package/dist/{run-HQTB7N2R.js → run-XRWU4L73.js} +13 -9
  91. package/dist/{serve-APEVIJD2.js → serve-OEX5V5CD.js} +7 -7
  92. package/dist/{setup-SOUBEZ3H.js → setup-SWNAC2C7.js} +6 -4
  93. package/dist/{smoke-2FI5D74B.js → smoke-5BGJXAHX.js} +4 -4
  94. package/dist/{start-login-ER7DEGYN.js → start-login-MG26NDE3.js} +15 -11
  95. package/dist/{status-7NYXRZ3R.js → status-APADL7O2.js} +15 -11
  96. package/dist/{status-KN2ZE64O.js → status-GKCIVAAR.js} +6 -5
  97. package/dist/{status-OGABWCPO.js → status-LH7Q255G.js} +17 -13
  98. package/dist/stdio.js +2 -2
  99. package/dist/{sweep-EPZCW63Q.js → sweep-VTVPDAPY.js} +6 -5
  100. package/dist/{test-WRZQERYC.js → test-TK2J3IB7.js} +16 -12
  101. package/dist/{tui-YUHQ36FC.js → tui-YTPHHKCW.js} +5 -5
  102. package/dist/{unbroadcast-N6LXHAMT.js → unbroadcast-CH7BAQ2G.js} +6 -5
  103. package/dist/{validate-KFBCUFI4.js → validate-5QVZBE6W.js} +4 -4
  104. package/dist/wait-4HYJJAWO.js +141 -0
  105. package/dist/{worker-OKBJNDEI.js → worker-RBXYAMR4.js} +12 -8
  106. package/dist/{worktree-create-KMXPQXIQ.js → worktree-create-FEZNQUQ6.js} +2 -2
  107. package/docs/commands.md +48 -12
  108. package/docs/git-workflow.md +51 -0
  109. package/docs/hooks.md +8 -1
  110. package/docs/project-configuration.md +134 -18
  111. package/docs/upgrading.md +11 -0
  112. package/gemini-extension.json +2 -2
  113. package/mcp.json +1 -1
  114. package/package.json +5 -5
  115. package/plugin.json +1 -1
  116. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  117. package/plugins/pmcp/.mcp.json +1 -1
  118. package/plugins/pmcp/gemini-extension.json +2 -2
  119. package/plugins/pmcp/mcp.json +1 -1
  120. package/plugins/pmcp/plugin.json +1 -1
  121. package/dist/chunk-3C5FVHQ3.js +0 -7
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  catalogFrom,
3
3
  rootsFrom
4
- } from "./chunk-PEMMV5YQ.js";
5
- import "./chunk-RPCIROW7.js";
4
+ } from "./chunk-4O4ZOSBQ.js";
5
+ import "./chunk-J3QUG6O5.js";
6
6
  import "./chunk-73AKO4UL.js";
7
7
  import {
8
8
  listSpec
9
9
  } from "./chunk-INT7QLEU.js";
10
10
  import "./chunk-JEL35P7S.js";
11
- import "./chunk-A4PKLESO.js";
11
+ import "./chunk-WFY7ATSZ.js";
12
12
  import "./chunk-4CRRLDDS.js";
13
13
  import "./chunk-YSAWTGNA.js";
14
14
  import "./chunk-GJXOFDJT.js";
@@ -65,4 +65,4 @@ var listCommand = {
65
65
  export {
66
66
  listCommand
67
67
  };
68
- //# sourceMappingURL=list-WK2IYUK7.js.map
68
+ //# sourceMappingURL=list-WWYCGD3X.js.map
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  serverFrom
3
- } from "./chunk-MIFPPUWY.js";
3
+ } from "./chunk-ZKB7ZNKY.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
- import "./chunk-RPCIROW7.js";
10
- import "./chunk-63RZGEVI.js";
11
- import "./chunk-UKR64U7J.js";
9
+ import "./chunk-J3QUG6O5.js";
10
+ import "./chunk-K2VU3B4W.js";
12
11
  import "./chunk-UYBWUOLR.js";
12
+ import "./chunk-UKR64U7J.js";
13
13
  import "./chunk-42SO7KYX.js";
14
14
  import "./chunk-EATCUWGG.js";
15
15
  import "./chunk-OFJIMBTL.js";
@@ -17,21 +17,25 @@ import "./chunk-LFFIQBNY.js";
17
17
  import "./chunk-HQOB7OQS.js";
18
18
  import "./chunk-73AKO4UL.js";
19
19
  import "./chunk-M6X6HVQK.js";
20
- import "./chunk-7CSUKCU7.js";
20
+ import "./chunk-P5D6RKMT.js";
21
21
  import "./chunk-SUDG7B6S.js";
22
- import "./chunk-7I7O7ZNT.js";
22
+ import "./chunk-3V37OZQH.js";
23
23
  import "./chunk-Z6WRFOFT.js";
24
24
  import "./chunk-B3OZ4GGO.js";
25
25
  import "./chunk-Q5H3L6Y4.js";
26
26
  import "./chunk-ARXCYFFZ.js";
27
- import "./chunk-A4PKLESO.js";
27
+ import "./chunk-WFY7ATSZ.js";
28
28
  import "./chunk-V4NPDK6X.js";
29
- import "./chunk-SPZQRLL5.js";
29
+ import "./chunk-733WVP2R.js";
30
+ import "./chunk-FOLA4EUJ.js";
31
+ import "./chunk-N7ANFMA5.js";
30
32
  import "./chunk-TYY5TYHF.js";
31
- import "./chunk-OEH47H6A.js";
33
+ import "./chunk-T6C3TSTO.js";
34
+ import "./chunk-FQLCD4HU.js";
35
+ import "./chunk-GUHOEIHP.js";
32
36
  import "./chunk-IJBSOWHK.js";
33
37
  import "./chunk-XWLMZKH2.js";
34
- import "./chunk-3C5FVHQ3.js";
38
+ import "./chunk-VSTUKACC.js";
35
39
  import "./chunk-GJXOFDJT.js";
36
40
  import "./chunk-PMJG2CXF.js";
37
41
  import "./chunk-J6KL3COD.js";
@@ -46,4 +50,4 @@ async function run(context) {
46
50
  export {
47
51
  run
48
52
  };
49
- //# sourceMappingURL=logout-H5X4D26I.js.map
53
+ //# sourceMappingURL=logout-6DFDYJUI.js.map
@@ -6,14 +6,14 @@ import {
6
6
  pruneLogs,
7
7
  readLogs,
8
8
  tail
9
- } from "./chunk-5QKXEWDB.js";
9
+ } from "./chunk-MHKY6TNF.js";
10
10
  import {
11
11
  configFrom
12
- } from "./chunk-RPCIROW7.js";
12
+ } from "./chunk-J3QUG6O5.js";
13
13
  import {
14
14
  isLogLevel
15
15
  } from "./chunk-HQOB7OQS.js";
16
- import "./chunk-7I7O7ZNT.js";
16
+ import "./chunk-3V37OZQH.js";
17
17
  import "./chunk-Z6WRFOFT.js";
18
18
  import {
19
19
  logsSpec
@@ -22,8 +22,9 @@ import "./chunk-XNML2KIC.js";
22
22
  import {
23
23
  ArgumentError,
24
24
  one
25
- } from "./chunk-A4PKLESO.js";
26
- import "./chunk-OEH47H6A.js";
25
+ } from "./chunk-WFY7ATSZ.js";
26
+ import "./chunk-FQLCD4HU.js";
27
+ import "./chunk-GUHOEIHP.js";
27
28
  import "./chunk-IJBSOWHK.js";
28
29
  import "./chunk-GJXOFDJT.js";
29
30
  import "./chunk-PMJG2CXF.js";
@@ -103,4 +104,4 @@ var logsCommand = { ...logsSpec, run };
103
104
  export {
104
105
  logsCommand
105
106
  };
106
- //# sourceMappingURL=logs-UHJM7ZCL.js.map
107
+ //# sourceMappingURL=logs-BRF6DBKG.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configFrom
3
- } from "./chunk-RPCIROW7.js";
3
+ } from "./chunk-J3QUG6O5.js";
4
4
  import {
5
5
  mailboxSpec
6
6
  } from "./chunk-JWRZDYB5.js";
@@ -8,7 +8,7 @@ import "./chunk-XNML2KIC.js";
8
8
  import {
9
9
  ArgumentError,
10
10
  one
11
- } from "./chunk-A4PKLESO.js";
11
+ } from "./chunk-WFY7ATSZ.js";
12
12
  import {
13
13
  MailboxError,
14
14
  MailboxService,
@@ -186,4 +186,4 @@ var mailboxCommand = {
186
186
  export {
187
187
  mailboxCommand
188
188
  };
189
- //# sourceMappingURL=mailbox-YN6PG66A.js.map
189
+ //# sourceMappingURL=mailbox-AQCTXO3H.js.map
@@ -1,6 +1,9 @@
1
+ import {
2
+ inferSession
3
+ } from "./chunk-65BW7Y6O.js";
1
4
  import {
2
5
  storeFrom
3
- } from "./chunk-B2WRYGHJ.js";
6
+ } from "./chunk-JW5NMQTU.js";
4
7
  import {
5
8
  pmcpCommand
6
9
  } from "./chunk-EATCUWGG.js";
@@ -12,7 +15,7 @@ import {
12
15
  inboxKey,
13
16
  normalizeSelector,
14
17
  sentBy
15
- } from "./chunk-7I7O7ZNT.js";
18
+ } from "./chunk-3V37OZQH.js";
16
19
  import {
17
20
  ancestors
18
21
  } from "./chunk-Z6WRFOFT.js";
@@ -20,8 +23,9 @@ import {
20
23
  ArgumentError,
21
24
  many,
22
25
  one
23
- } from "./chunk-A4PKLESO.js";
24
- import "./chunk-OEH47H6A.js";
26
+ } from "./chunk-WFY7ATSZ.js";
27
+ import "./chunk-FQLCD4HU.js";
28
+ import "./chunk-GUHOEIHP.js";
25
29
  import "./chunk-IJBSOWHK.js";
26
30
  import "./chunk-GJXOFDJT.js";
27
31
  import "./chunk-PMJG2CXF.js";
@@ -30,42 +34,6 @@ import "./chunk-PMJG2CXF.js";
30
34
  import { readFileSync } from "fs";
31
35
  import { homedir } from "os";
32
36
 
33
- // src/sessions/identity.ts
34
- var SESSION_VARIABLES = [
35
- ["codex", "CODEX_THREAD_ID"],
36
- ["grok", "GROK_SESSION_ID"],
37
- ["antigravity", "ANTIGRAVITY_CONVERSATION_ID"],
38
- ["claude", "CLAUDE_CODE_SESSION_ID"]
39
- ];
40
- var MARKERS = [
41
- ["codex", "CODEX_THREAD_ID"],
42
- ["grok", "GROK_AGENT"],
43
- ["antigravity", "ANTIGRAVITY_AGENT"],
44
- ["opencode", "OPENCODE"],
45
- ["gemini", "GEMINI_CLI"],
46
- ["claude", "CLAUDECODE"]
47
- ];
48
- function inferSession(env, records, chain) {
49
- const live = records.filter(
50
- (record) => record.live && record.pid !== void 0
51
- );
52
- for (const pid of chain) {
53
- const record = live.find((entry) => entry.pid === pid);
54
- if (record)
55
- return {
56
- session: record.session,
57
- ...record.runtime ? { runtime: record.runtime } : {},
58
- via: "process"
59
- };
60
- }
61
- for (const [runtime, name] of SESSION_VARIABLES) {
62
- const value = env[name];
63
- if (value) return { session: value, runtime, via: "environment" };
64
- }
65
- const marker = MARKERS.find(([, name]) => env[name]);
66
- return marker ? { runtime: marker[0] } : {};
67
- }
68
-
69
37
  // src/sessions/wake/index.ts
70
38
  var TRANSPORTS = {
71
39
  claude: async () => (await import("./claude-XVLF4N4S.js")).claudeInbox,
@@ -281,4 +249,4 @@ export {
281
249
  reply,
282
250
  send
283
251
  };
284
- //# sourceMappingURL=mailbox-NIMBOQPA.js.map
252
+ //# sourceMappingURL=mailbox-QYA2LQSE.js.map
@@ -1,13 +1,13 @@
1
+ import {
2
+ acquireHostLock,
3
+ readHolder,
4
+ removeHolder,
5
+ writeHolder
6
+ } from "./chunk-SGFTHKKS.js";
1
7
  import {
2
8
  off
3
9
  } from "./chunk-YIXDHQYE.js";
4
- import {
5
- flockAvailable,
6
- lockFile
7
- } from "./chunk-DZ2MRTYT.js";
8
- import {
9
- globPattern
10
- } from "./chunk-UKR64U7J.js";
10
+ import "./chunk-DZ2MRTYT.js";
11
11
  import {
12
12
  followPins,
13
13
  initAddedSubmodules,
@@ -17,6 +17,9 @@ import {
17
17
  lockHash,
18
18
  syncWorktree
19
19
  } from "./chunk-UYBWUOLR.js";
20
+ import {
21
+ globPattern
22
+ } from "./chunk-UKR64U7J.js";
20
23
  import {
21
24
  GitReadError,
22
25
  cherry,
@@ -33,13 +36,13 @@ import {
33
36
  import {
34
37
  gateTreePath,
35
38
  leaseSpecs
36
- } from "./chunk-7CSUKCU7.js";
39
+ } from "./chunk-P5D6RKMT.js";
37
40
  import {
38
41
  detect
39
42
  } from "./chunk-SUDG7B6S.js";
40
43
  import {
41
44
  createFilesStore
42
- } from "./chunk-7I7O7ZNT.js";
45
+ } from "./chunk-3V37OZQH.js";
43
46
  import "./chunk-Z6WRFOFT.js";
44
47
  import {
45
48
  git,
@@ -48,17 +51,23 @@ import {
48
51
  runCommand,
49
52
  runCommandLogged
50
53
  } from "./chunk-B3OZ4GGO.js";
51
- import "./chunk-OEH47H6A.js";
54
+ import {
55
+ BUSY_EXIT
56
+ } from "./chunk-FOLA4EUJ.js";
57
+ import "./chunk-N7ANFMA5.js";
58
+ import "./chunk-T6C3TSTO.js";
59
+ import "./chunk-FQLCD4HU.js";
60
+ import "./chunk-GUHOEIHP.js";
52
61
  import "./chunk-IJBSOWHK.js";
53
62
  import "./chunk-GJXOFDJT.js";
54
63
  import "./chunk-PMJG2CXF.js";
55
64
 
56
65
  // src/git/cli/mainline.ts
57
- import { join as join8 } from "path";
66
+ import { join as join7 } from "path";
58
67
 
59
68
  // src/git/mainline/deliver.ts
60
- import { readFileSync as readFileSync2 } from "fs";
61
- import { dirname as dirname3, join as join5 } from "path";
69
+ import { readFileSync } from "fs";
70
+ import { dirname as dirname2, join as join4 } from "path";
62
71
  import { loadavg } from "os";
63
72
 
64
73
  // src/git/mainline/gate.ts
@@ -159,7 +168,7 @@ function gateLog(dir, tip, keep = KEEP_TIPS) {
159
168
  renameSync(temporary, join(logs, "latest"));
160
169
  return { log: join(logs, name), logs };
161
170
  }
162
- function runGate(mainRoot, tree, tip, command, links, report, lockEnv, logDir2, restore = false, keep = KEEP_TIPS) {
171
+ function runGate(mainRoot, tree, tip, command, links, report, lockEnv, logDir2, restore = false, keep = KEEP_TIPS, extraEnv = {}) {
163
172
  const problem = prepareGateTree(
164
173
  mainRoot,
165
174
  tree,
@@ -174,6 +183,7 @@ function runGate(mainRoot, tree, tip, command, links, report, lockEnv, logDir2,
174
183
  const { log, logs } = gateLog(logDir2, tip, keep);
175
184
  report.info(`gate on ${tip.slice(0, 10)} in ${tree}; gate log: ${log}`);
176
185
  const code = runCommandLogged(command, tree, log, {
186
+ ...extraEnv,
177
187
  PMCP_GATE_TIP: tip,
178
188
  PMCP_GATE_MAIN: mainRoot,
179
189
  ...lockEnv ? { [lockEnv]: "1" } : {}
@@ -183,82 +193,9 @@ function runGate(mainRoot, tree, tip, command, links, report, lockEnv, logDir2,
183
193
  return { code, log, logs };
184
194
  }
185
195
 
186
- // src/git/mainline/lock.ts
187
- import { spawnSync } from "child_process";
188
- import {
189
- closeSync,
190
- mkdirSync as mkdirSync2,
191
- openSync,
192
- readFileSync,
193
- rmSync as rmSync2,
194
- writeFileSync as writeFileSync2
195
- } from "fs";
196
- import { dirname as dirname2, join as join2 } from "path";
197
- function flock(fd, args) {
198
- const run = spawnSync("flock", [...args, "3"], {
199
- stdio: ["ignore", "ignore", "pipe", fd]
200
- });
201
- if (run.error !== void 0)
202
- throw new Error(`flock (util-linux) is required: ${run.error.message}`);
203
- return run.status ?? 1;
204
- }
205
- function acquireHostLock(path, waitSeconds, onWait) {
206
- mkdirSync2(dirname2(path), { recursive: true });
207
- if (!flockAvailable()) {
208
- const now = lockFile(path, 0);
209
- if (now) return now;
210
- onWait?.();
211
- return lockFile(path, waitSeconds * 1e3);
212
- }
213
- const fd = openSync(path, "a");
214
- try {
215
- if (flock(fd, ["-n"]) !== 0) {
216
- onWait?.();
217
- if (flock(fd, ["-w", String(waitSeconds)]) !== 0) {
218
- closeSync(fd);
219
- return null;
220
- }
221
- }
222
- } catch (error) {
223
- closeSync(fd);
224
- throw error;
225
- }
226
- let open = true;
227
- return {
228
- release: () => {
229
- if (!open) return;
230
- open = false;
231
- closeSync(fd);
232
- }
233
- };
234
- }
235
- function holderFile(lockPath) {
236
- return join2(dirname2(lockPath), "holder.json");
237
- }
238
- function writeHolder(lockPath, holder) {
239
- const record = {
240
- ...holder,
241
- pid: process.pid,
242
- startedAt: (/* @__PURE__ */ new Date()).toISOString()
243
- };
244
- writeFileSync2(holderFile(lockPath), `${JSON.stringify(record)}
245
- `);
246
- }
247
- function removeHolder(lockPath) {
248
- if (readHolder(lockPath)?.pid === process.pid)
249
- rmSync2(holderFile(lockPath), { force: true });
250
- }
251
- function readHolder(lockPath) {
252
- try {
253
- return JSON.parse(readFileSync(holderFile(lockPath), "utf8"));
254
- } catch {
255
- return null;
256
- }
257
- }
258
-
259
196
  // src/git/mainline/pins.ts
260
197
  import { existsSync as existsSync2 } from "fs";
261
- import { join as join3 } from "path";
198
+ import { join as join2 } from "path";
262
199
  var GITLINK = /^:(?:160000|000000) 160000 [0-9a-f]{40} ([0-9a-f]{40}) [AM]\t(.+)$/u;
263
200
  function pins(root, upstream, tip) {
264
201
  const raw = gitText(root, [
@@ -288,9 +225,9 @@ function branchOf(root, path) {
288
225
  }
289
226
  function pushPins(root, upstream, tip, report) {
290
227
  for (const [path, pin] of pins(root, upstream, tip)) {
291
- const dir = join3(root, path);
228
+ const dir = join2(root, path);
292
229
  const short = pin.slice(0, 10);
293
- if (!existsSync2(join3(dir, ".git"))) {
230
+ if (!existsSync2(join2(dir, ".git"))) {
294
231
  report.warn(
295
232
  `${path}: not checked out here, so ${short} cannot be pushed`
296
233
  );
@@ -361,14 +298,14 @@ function waitForLeases(store, specs, waitSeconds, report, pollMs = 1e3) {
361
298
  }
362
299
 
363
300
  // src/git/mainline/replay.ts
364
- import { mkdtempSync, rmdirSync, rmSync as rmSync3 } from "fs";
301
+ import { mkdtempSync, rmdirSync, rmSync as rmSync2 } from "fs";
365
302
  import { tmpdir } from "os";
366
- import { join as join4 } from "path";
303
+ import { join as join3 } from "path";
367
304
  function remove(root, dir) {
368
305
  const removed = git(root, ["worktree", "remove", "--force", dir]);
369
306
  if (removed.status !== 0)
370
307
  return `worktree cleanup failed; preserved ${dir}: ${removed.stderr.trim()}`;
371
- rmSync3(dir, { recursive: true, force: true });
308
+ rmSync2(dir, { recursive: true, force: true });
372
309
  return null;
373
310
  }
374
311
  function withoutHints(stderr) {
@@ -391,7 +328,7 @@ nothing was pushed; rebase onto ${base} and deliver again`
391
328
  };
392
329
  }
393
330
  function replay(root, base, commits) {
394
- const dir = mkdtempSync(join4(tmpdir(), "pmcp-deliver-"));
331
+ const dir = mkdtempSync(join3(tmpdir(), "pmcp-deliver-"));
395
332
  const added = git(root, ["worktree", "add", "-q", "--detach", dir, base]);
396
333
  if (added.status !== 0) {
397
334
  rmdirSync(dir);
@@ -430,7 +367,7 @@ function push(options, tip, preHook) {
430
367
  return { status, stdout: "", stderr: "" };
431
368
  }
432
369
  function logDir(options) {
433
- return options.gate?.logDir ?? options.logDir ?? join5(dirname3(gateTree(options.tree).tree), "gate-logs");
370
+ return options.gate?.logDir ?? options.logDir ?? join4(dirname2(gateTree(options.tree).tree), "gate-logs");
434
371
  }
435
372
  function attempts(options) {
436
373
  const { ctx, report } = options;
@@ -476,6 +413,17 @@ function attempts(options) {
476
413
  options.umask !== void 0,
477
414
  options.gate?.logKeep
478
415
  );
416
+ if (run.code === BUSY_EXIT) {
417
+ report.warn("gate not run: host busy, nothing pushed, retry later");
418
+ if (options.track)
419
+ options.track.gate = {
420
+ exit: run.code,
421
+ log: run.log,
422
+ logs: run.logs,
423
+ by: "command"
424
+ };
425
+ return BUSY_EXIT;
426
+ }
479
427
  if (options.track)
480
428
  options.track.gate = {
481
429
  exit: run.code,
@@ -522,7 +470,7 @@ ${pushed.stderr.trim()}`
522
470
  }
523
471
  function hostLoad() {
524
472
  try {
525
- return Number(readFileSync2("/proc/loadavg", "utf8").split(" ")[0]);
473
+ return Number(readFileSync("/proc/loadavg", "utf8").split(" ")[0]);
526
474
  } catch {
527
475
  return loadavg()[0] ?? 0;
528
476
  }
@@ -716,8 +664,8 @@ function deliverOnce(options) {
716
664
  }
717
665
 
718
666
  // src/git/mainline/delivery-events.ts
719
- import { appendFileSync, mkdirSync as mkdirSync3 } from "fs";
720
- import { dirname as dirname4 } from "path";
667
+ import { appendFileSync, mkdirSync as mkdirSync2 } from "fs";
668
+ import { dirname as dirname3 } from "path";
721
669
  function deliveryEvents(setup) {
722
670
  return (delivery) => {
723
671
  const specs = leaseSpecs(setup.config);
@@ -730,7 +678,7 @@ function deliveryEvents(setup) {
730
678
  const spec = installSpec(sync, setup.stateDir);
731
679
  const state = spec ? installState(root, spec) : { hash: lockHash(root, paths), installed: false };
732
680
  const { hash, installed } = state;
733
- mkdirSync3(dirname4(events), { recursive: true });
681
+ mkdirSync2(dirname3(events), { recursive: true });
734
682
  appendFileSync(
735
683
  events,
736
684
  `${JSON.stringify({
@@ -765,22 +713,22 @@ function filesSessionGate(stateDir, leaseFiles = {}, pauseFile) {
765
713
 
766
714
  // src/git/mainline/sync.ts
767
715
  import { existsSync as existsSync4 } from "fs";
768
- import { join as join7 } from "path";
716
+ import { join as join6 } from "path";
769
717
 
770
718
  // src/git/mainline/identical-files.ts
771
- import { spawnSync as spawnSync2 } from "child_process";
719
+ import { spawnSync } from "child_process";
772
720
  import {
773
- closeSync as closeSync2,
721
+ closeSync,
774
722
  copyFileSync,
775
723
  existsSync as existsSync3,
776
724
  lstatSync,
777
725
  mkdtempSync as mkdtempSync2,
778
- openSync as openSync2,
779
- readFileSync as readFileSync3,
726
+ openSync,
727
+ readFileSync as readFileSync2,
780
728
  renameSync as renameSync2,
781
- rmSync as rmSync4
729
+ rmSync as rmSync3
782
730
  } from "fs";
783
- import { join as join6 } from "path";
731
+ import { join as join5 } from "path";
784
732
  var FILE_MODES = /* @__PURE__ */ new Set(["100644", "100755"]);
785
733
  var GITLINK2 = "160000";
786
734
  function refuse(path) {
@@ -795,14 +743,14 @@ function identical(cwd, path, mode, oid) {
795
743
  if (!FILE_MODES.has(mode)) return false;
796
744
  let current = cwd;
797
745
  for (const segment of path.split("/")) {
798
- current = join6(current, segment);
746
+ current = join5(current, segment);
799
747
  if (lstatSync(current).isSymbolicLink()) return false;
800
748
  }
801
749
  const stat = lstatSync(current);
802
750
  if (!stat.isFile()) return false;
803
751
  if (Boolean(stat.mode & 73) !== (mode === "100755")) return false;
804
- const blob = spawnSync2("git", ["cat-file", "blob", oid], { cwd });
805
- return blob.status === 0 && readFileSync3(current).equals(blob.stdout);
752
+ const blob = spawnSync("git", ["cat-file", "blob", oid], { cwd });
753
+ return blob.status === 0 && readFileSync2(current).equals(blob.stdout);
806
754
  }
807
755
  function directoriesOf(paths) {
808
756
  const dirs = /* @__PURE__ */ new Set();
@@ -835,8 +783,8 @@ function adopt(cwd, target, env) {
835
783
  const [, mode = "", oid = "", path = ""] = match;
836
784
  if (existing.has(path)) continue;
837
785
  if (trackedDirs.has(path)) continue;
838
- if (!lstatSync(join6(cwd, path), { throwIfNoEntry: false })) continue;
839
- const leftCheckout = mode === GITLINK2 && existsSync3(join6(cwd, path, ".git"));
786
+ if (!lstatSync(join5(cwd, path), { throwIfNoEntry: false })) continue;
787
+ const leftCheckout = mode === GITLINK2 && existsSync3(join5(cwd, path, ".git"));
840
788
  if (!leftCheckout && !identical(cwd, path, mode, oid)) return refuse(path);
841
789
  const added = git(
842
790
  cwd,
@@ -861,9 +809,9 @@ function resetKeepingIdenticalFiles(cwd, target) {
861
809
  let temporary;
862
810
  let movedHead = false;
863
811
  try {
864
- fd = openSync2(lock, "wx");
812
+ fd = openSync(lock, "wx");
865
813
  temporary = mkdtempSync2(`${index}.sync-`);
866
- const scratch = join6(temporary, "index");
814
+ const scratch = join5(temporary, "index");
867
815
  copyFileSync(index, scratch);
868
816
  const env = { GIT_INDEX_FILE: scratch };
869
817
  const refused = adopt(cwd, target, env);
@@ -872,10 +820,10 @@ function resetKeepingIdenticalFiles(cwd, target) {
872
820
  if (moved.status !== 0) return moved;
873
821
  movedHead = true;
874
822
  copyFileSync(scratch, lock);
875
- closeSync2(fd);
823
+ closeSync(fd);
876
824
  fd = void 0;
877
825
  renameSync2(lock, index);
878
- rmSync4(temporary, { recursive: true, force: true });
826
+ rmSync3(temporary, { recursive: true, force: true });
879
827
  return moved;
880
828
  } catch (error) {
881
829
  const recovery = movedHead ? `; HEAD moved, recovery index kept at ${temporary}/index` : "";
@@ -883,10 +831,10 @@ function resetKeepingIdenticalFiles(cwd, target) {
883
831
  return { status: 1, stdout: "", stderr: `${reason}${recovery}
884
832
  ` };
885
833
  } finally {
886
- if (fd !== void 0) closeSync2(fd);
834
+ if (fd !== void 0) closeSync(fd);
887
835
  if (temporary !== void 0 && !movedHead)
888
- rmSync4(temporary, { recursive: true, force: true });
889
- if (fd !== void 0 && !movedHead && existsSync3(lock)) rmSync4(lock);
836
+ rmSync3(temporary, { recursive: true, force: true });
837
+ if (fd !== void 0 && !movedHead && existsSync3(lock)) rmSync3(lock);
890
838
  }
891
839
  }
892
840
 
@@ -902,7 +850,7 @@ var IN_PROGRESS = [
902
850
  ];
903
851
  function inProgress(ctx) {
904
852
  for (const marker of IN_PROGRESS) {
905
- if (existsSync4(join7(ctx.gitDir, marker)))
853
+ if (existsSync4(join6(ctx.gitDir, marker)))
906
854
  return `${marker} is present; another git command is running or unfinished`;
907
855
  }
908
856
  return null;
@@ -1139,7 +1087,7 @@ var mainlineDeliver = (setup, context, report) => {
1139
1087
  ...config.gate === void 0 ? {} : { gate: config.gate },
1140
1088
  tree: gateTreePath(setup),
1141
1089
  // Gate output lives in the state dir whatever the gate tree is, unless log_dir says.
1142
- logDir: join8(setup.stateDir, "gate-logs"),
1090
+ logDir: join7(setup.stateDir, "gate-logs"),
1143
1091
  links: config.worktrees?.linkFromMain ?? [],
1144
1092
  leases: leaseSpecs(config),
1145
1093
  store: filesSessionGate(setup.stateDir, setup.leaseFiles, setup.pauseFile),
@@ -1161,4 +1109,4 @@ export {
1161
1109
  mainlineDeliver,
1162
1110
  mainlineSync
1163
1111
  };
1164
- //# sourceMappingURL=mainline-74WCH4T4.js.map
1112
+ //# sourceMappingURL=mainline-O5AEHG3J.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  ArgumentError,
9
9
  one
10
- } from "./chunk-A4PKLESO.js";
10
+ } from "./chunk-WFY7ATSZ.js";
11
11
  import {
12
12
  containedPath,
13
13
  readLocalMarketplace
@@ -188,4 +188,4 @@ var marketplaceCommand = {
188
188
  export {
189
189
  marketplaceCommand
190
190
  };
191
- //# sourceMappingURL=marketplace-G4VQET5W.js.map
191
+ //# sourceMappingURL=marketplace-TI5HFAHB.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-NQPURJT5.js";
5
5
  import {
6
6
  ArgumentError
7
- } from "./chunk-A4PKLESO.js";
7
+ } from "./chunk-WFY7ATSZ.js";
8
8
 
9
9
  // src/commands/harness/mcp.ts
10
10
  import { McpServer } from "@modelcontextprotocol/server";
@@ -190,4 +190,4 @@ async function runPtyMcp(context) {
190
190
  export {
191
191
  runPtyMcp
192
192
  };
193
- //# sourceMappingURL=mcp-AXHV547W.js.map
193
+ //# sourceMappingURL=mcp-4R53HSGY.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-GZK3XJ62.js");
8
+ const { executeMcpCommand } = await import("./run-VUUQS4WY.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-6P3MVT4V.js.map
15
+ //# sourceMappingURL=mcp-HR5JFUW7.js.map
@@ -2,7 +2,7 @@ import {
2
2
  modelsSpec
3
3
  } from "./chunk-INT7QLEU.js";
4
4
  import "./chunk-JEL35P7S.js";
5
- import "./chunk-A4PKLESO.js";
5
+ import "./chunk-WFY7ATSZ.js";
6
6
  import {
7
7
  embeddingModels
8
8
  } from "./chunk-PMJG2CXF.js";
@@ -29,4 +29,4 @@ var modelsCommand = {
29
29
  export {
30
30
  modelsCommand
31
31
  };
32
- //# sourceMappingURL=models-ISU4DCMA.js.map
32
+ //# sourceMappingURL=models-63NQBSV3.js.map