@modootoday/pmcp 0.22.11 → 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.
- package/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/dist/affected-ZWO2F5EM.js +836 -0
- package/dist/{apply-DXM56NV3.js → apply-OIKQ5SIY.js} +21 -17
- package/dist/{available-BFXLII4A.js → available-Z5MIDFPH.js} +3 -3
- package/dist/{broadcast-DZGMSZRG.js → broadcast-BF2QL3O7.js} +6 -5
- package/dist/{chunk-TU2SG5BM.js → chunk-24L4MO7H.js} +2 -2
- package/dist/{chunk-7I7O7ZNT.js → chunk-3V37OZQH.js} +5 -3
- package/dist/{chunk-PEMMV5YQ.js → chunk-4O4ZOSBQ.js} +3 -3
- package/dist/{chunk-7ZWSCSZM.js → chunk-5IZFEVPW.js} +2 -2
- package/dist/{chunk-TQODDSIG.js → chunk-5KWDQFVY.js} +4 -4
- package/dist/{chunk-R5MT42JS.js → chunk-5OFQVW2K.js} +2 -2
- package/dist/{chunk-REFEJ4VJ.js → chunk-5PNS6V5C.js} +2 -2
- package/dist/chunk-65BW7Y6O.js +40 -0
- package/dist/{chunk-IATFWEAX.js → chunk-733WVP2R.js} +19 -7
- package/dist/{chunk-URCQLONP.js → chunk-737BENAU.js} +8 -8
- package/dist/{chunk-GFOQDLPL.js → chunk-74O7KZUH.js} +13 -3
- package/dist/{chunk-5ZUEPPFZ.js → chunk-7ZOQELXR.js} +9 -7
- package/dist/{chunk-ENOMRAFS.js → chunk-A6DARDQ4.js} +3 -3
- package/dist/{chunk-PUIWESU3.js → chunk-A7XCUR2C.js} +4 -4
- package/dist/{chunk-P4N7DBD5.js → chunk-ANJMLKBR.js} +2 -2
- package/dist/chunk-BN4XAXMQ.js +65 -0
- package/dist/chunk-FOLA4EUJ.js +261 -0
- package/dist/chunk-FQLCD4HU.js +24 -0
- package/dist/chunk-G4ATQPQI.js +35 -0
- package/dist/{chunk-TZWLT6FD.js → chunk-GNVME5AD.js} +2 -2
- package/dist/{chunk-OEH47H6A.js → chunk-GUHOEIHP.js} +3 -20
- package/dist/{chunk-PIVKGKMR.js → chunk-ISGBOJT7.js} +3 -3
- package/dist/{chunk-RPCIROW7.js → chunk-J3QUG6O5.js} +2 -2
- package/dist/{chunk-B2WRYGHJ.js → chunk-JW5NMQTU.js} +3 -3
- package/dist/{chunk-2GOR4ZKO.js → chunk-K2VU3B4W.js} +99 -27
- package/dist/{chunk-5QKXEWDB.js → chunk-MHKY6TNF.js} +6 -4
- package/dist/chunk-N7ANFMA5.js +171 -0
- package/dist/{chunk-URP3QIWI.js → chunk-NNGGNXF2.js} +2 -2
- package/dist/{chunk-7CSUKCU7.js → chunk-P5D6RKMT.js} +13 -94
- package/dist/{chunk-EA2OSLFJ.js → chunk-QBSJL3SP.js} +42 -31
- package/dist/chunk-SGFTHKKS.js +86 -0
- package/dist/{chunk-Z5RNKEHF.js → chunk-T4GVN7XO.js} +5 -5
- package/dist/chunk-T6C3TSTO.js +99 -0
- package/dist/{chunk-NRBQK6UX.js → chunk-TYY5TYHF.js} +14 -1
- package/dist/{chunk-VEOYGFEQ.js → chunk-UED3RH53.js} +2 -2
- package/dist/{chunk-37RGCHTK.js → chunk-VNZTULFD.js} +3 -3
- package/dist/chunk-VSTUKACC.js +7 -0
- package/dist/{chunk-A4PKLESO.js → chunk-WFY7ATSZ.js} +8 -4
- package/dist/{chunk-KPKMEUUH.js → chunk-XSWF7APE.js} +3 -3
- package/dist/{chunk-GIDKCJVZ.js → chunk-ZKB7ZNKY.js} +4 -4
- package/dist/{chunk-ZEERJLE5.js → chunk-ZS5IDQFJ.js} +6 -6
- package/dist/{cli-JXPJFHUA.js → cli-FSSYFCV3.js} +15 -9
- package/dist/{cli-34EDFXJA.js → cli-IHVNE3WL.js} +9 -9
- package/dist/cli.js +19 -13
- package/dist/{completion-25CHR7SR.js → completion-ZTTJVV4C.js} +8 -6
- package/dist/{diagnostics-4PQSTI2X.js → diagnostics-XC5L6Z3E.js} +11 -7
- package/dist/{doctor-MHFALEWR.js → doctor-FGDSUBR3.js} +21 -17
- package/dist/{entry-25VWXTCW.js → entry-NNB2CQLZ.js} +20 -16
- package/dist/{exec-mcp-OQP5OU26.js → exec-mcp-ZU3Z3XT6.js} +16 -12
- package/dist/{harness-DTXPIWKL.js → harness-B7ANLH5M.js} +5 -5
- package/dist/harness-launch-gate.js +9 -5
- package/dist/harness-worker.js +11 -7
- package/dist/heavy-IIZBO4YM.js +1909 -0
- package/dist/hook-body.js +69 -21
- package/dist/{hooks-E33GKFRS.js → hooks-IEJTW7BV.js} +5 -5
- package/dist/{host-4YG67ZQ2.js → host-5P4D7GSE.js} +18 -14
- package/dist/host-XXWQ23LD.js +28 -0
- package/dist/{host-run-AJR2THEY.js → host-run-AEWHFVQL.js} +11 -7
- package/dist/http.js +1 -1
- package/dist/{import-mcp-MGDRREMJ.js → import-mcp-BQM5DKYH.js} +16 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -14
- package/dist/{init-RMTFPDJQ.js → init-L6GUO3PW.js} +2 -2
- package/dist/{install-7V6NIA7W.js → install-OFVLR7TI.js} +3 -3
- package/dist/invoke-3BQ5NG3P.js +29 -0
- package/dist/{list-WJE6NS7Y.js → list-EU4MJOXA.js} +17 -13
- package/dist/{list-WK2IYUK7.js → list-WWYCGD3X.js} +4 -4
- package/dist/{logout-SZY5GBIH.js → logout-6DFDYJUI.js} +16 -12
- package/dist/{logs-UHJM7ZCL.js → logs-BRF6DBKG.js} +7 -6
- package/dist/{mailbox-YN6PG66A.js → mailbox-AQCTXO3H.js} +3 -3
- package/dist/{mailbox-NIMBOQPA.js → mailbox-QYA2LQSE.js} +9 -41
- package/dist/{mainline-74WCH4T4.js → mainline-O5AEHG3J.js} +69 -121
- package/dist/{marketplace-G4VQET5W.js → marketplace-TI5HFAHB.js} +2 -2
- package/dist/{mcp-AXHV547W.js → mcp-4R53HSGY.js} +2 -2
- package/dist/{mcp-BPTTJKWL.js → mcp-HR5JFUW7.js} +2 -2
- package/dist/{models-ISU4DCMA.js → models-63NQBSV3.js} +2 -2
- package/dist/{pause-CBZ3BTJL.js → pause-UF7FQDJX.js} +6 -5
- package/dist/{preview-DT7DWG5F.js → preview-WSESS2UN.js} +3 -3
- package/dist/{project-6GDQBLDC.js → project-JXXL24WN.js} +6 -6
- package/dist/{reindex-I7RYWCUR.js → reindex-3GPKAFBW.js} +5 -5
- package/dist/{report-ZHOHQ4PZ.js → report-JUSKQPAC.js} +7 -6
- package/dist/{resume-UJEWQ66P.js → resume-3WAROOQ3.js} +6 -5
- package/dist/{run-V4LBDW5O.js → run-VUUQS4WY.js} +5 -5
- package/dist/{run-5UM7WUTH.js → run-XRWU4L73.js} +14 -10
- package/dist/{serve-723OCAUT.js → serve-OEX5V5CD.js} +7 -7
- package/dist/{setup-SOUBEZ3H.js → setup-SWNAC2C7.js} +6 -4
- package/dist/{smoke-2FI5D74B.js → smoke-5BGJXAHX.js} +4 -4
- package/dist/{start-login-M425T4GS.js → start-login-MG26NDE3.js} +16 -12
- package/dist/{status-XAP66PLK.js → status-APADL7O2.js} +16 -12
- package/dist/{status-KN2ZE64O.js → status-GKCIVAAR.js} +6 -5
- package/dist/{status-QEFRBTOO.js → status-LH7Q255G.js} +18 -14
- package/dist/stdio.js +2 -2
- package/dist/{sweep-EPZCW63Q.js → sweep-VTVPDAPY.js} +6 -5
- package/dist/{test-TL7DRDMD.js → test-TK2J3IB7.js} +17 -13
- package/dist/{tui-DGGNATMI.js → tui-YTPHHKCW.js} +5 -5
- package/dist/{unbroadcast-N6LXHAMT.js → unbroadcast-CH7BAQ2G.js} +6 -5
- package/dist/{validate-KFBCUFI4.js → validate-5QVZBE6W.js} +4 -4
- package/dist/wait-4HYJJAWO.js +141 -0
- package/dist/{worker-N7EOJVI3.js → worker-RBXYAMR4.js} +13 -9
- package/dist/{worktree-create-KMXPQXIQ.js → worktree-create-FEZNQUQ6.js} +2 -2
- package/docs/commands.md +48 -12
- package/docs/git-workflow.md +51 -0
- package/docs/hooks.md +8 -1
- package/docs/project-configuration.md +134 -18
- package/docs/upgrading.md +11 -0
- package/gemini-extension.json +2 -2
- package/mcp.json +1 -1
- package/package.json +5 -5
- package/plugin.json +1 -1
- package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
- package/plugins/pmcp/.mcp.json +1 -1
- package/plugins/pmcp/gemini-extension.json +2 -2
- package/plugins/pmcp/mcp.json +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/dist/chunk-L7LQEVTE.js +0 -7
- package/dist/host-W6B2O44Q.js +0 -24
- package/dist/invoke-JRFOK374.js +0 -25
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
serverFrom
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
10
|
-
import "./chunk-
|
|
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-
|
|
20
|
+
import "./chunk-P5D6RKMT.js";
|
|
21
21
|
import "./chunk-SUDG7B6S.js";
|
|
22
|
-
import "./chunk-
|
|
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-
|
|
27
|
+
import "./chunk-WFY7ATSZ.js";
|
|
28
28
|
import "./chunk-V4NPDK6X.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-733WVP2R.js";
|
|
30
|
+
import "./chunk-FOLA4EUJ.js";
|
|
31
|
+
import "./chunk-N7ANFMA5.js";
|
|
32
|
+
import "./chunk-TYY5TYHF.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-
|
|
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-
|
|
53
|
+
//# sourceMappingURL=logout-6DFDYJUI.js.map
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
pruneLogs,
|
|
7
7
|
readLogs,
|
|
8
8
|
tail
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MHKY6TNF.js";
|
|
10
10
|
import {
|
|
11
11
|
configFrom
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-J3QUG6O5.js";
|
|
13
13
|
import {
|
|
14
14
|
isLogLevel
|
|
15
15
|
} from "./chunk-HQOB7OQS.js";
|
|
16
|
-
import "./chunk-
|
|
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-
|
|
26
|
-
import "./chunk-
|
|
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-
|
|
107
|
+
//# sourceMappingURL=logs-BRF6DBKG.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
configFrom
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
24
|
-
import "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
66
|
+
import { join as join7 } from "path";
|
|
58
67
|
|
|
59
68
|
// src/git/mainline/deliver.ts
|
|
60
|
-
import { readFileSync
|
|
61
|
-
import { dirname as
|
|
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
|
|
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 =
|
|
228
|
+
const dir = join2(root, path);
|
|
292
229
|
const short = pin.slice(0, 10);
|
|
293
|
-
if (!existsSync2(
|
|
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
|
|
301
|
+
import { mkdtempSync, rmdirSync, rmSync as rmSync2 } from "fs";
|
|
365
302
|
import { tmpdir } from "os";
|
|
366
|
-
import { join as
|
|
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
|
-
|
|
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(
|
|
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 ??
|
|
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(
|
|
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
|
|
720
|
-
import { dirname as
|
|
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
|
-
|
|
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
|
|
716
|
+
import { join as join6 } from "path";
|
|
769
717
|
|
|
770
718
|
// src/git/mainline/identical-files.ts
|
|
771
|
-
import { spawnSync
|
|
719
|
+
import { spawnSync } from "child_process";
|
|
772
720
|
import {
|
|
773
|
-
closeSync
|
|
721
|
+
closeSync,
|
|
774
722
|
copyFileSync,
|
|
775
723
|
existsSync as existsSync3,
|
|
776
724
|
lstatSync,
|
|
777
725
|
mkdtempSync as mkdtempSync2,
|
|
778
|
-
openSync
|
|
779
|
-
readFileSync as
|
|
726
|
+
openSync,
|
|
727
|
+
readFileSync as readFileSync2,
|
|
780
728
|
renameSync as renameSync2,
|
|
781
|
-
rmSync as
|
|
729
|
+
rmSync as rmSync3
|
|
782
730
|
} from "fs";
|
|
783
|
-
import { join as
|
|
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 =
|
|
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 =
|
|
805
|
-
return blob.status === 0 &&
|
|
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(
|
|
839
|
-
const leftCheckout = mode === GITLINK2 && existsSync3(
|
|
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 =
|
|
812
|
+
fd = openSync(lock, "wx");
|
|
865
813
|
temporary = mkdtempSync2(`${index}.sync-`);
|
|
866
|
-
const scratch =
|
|
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
|
-
|
|
823
|
+
closeSync(fd);
|
|
876
824
|
fd = void 0;
|
|
877
825
|
renameSync2(lock, index);
|
|
878
|
-
|
|
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)
|
|
834
|
+
if (fd !== void 0) closeSync(fd);
|
|
887
835
|
if (temporary !== void 0 && !movedHead)
|
|
888
|
-
|
|
889
|
-
if (fd !== void 0 && !movedHead && existsSync3(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(
|
|
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:
|
|
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-
|
|
1112
|
+
//# sourceMappingURL=mainline-O5AEHG3J.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
ArgumentError,
|
|
9
9
|
one
|
|
10
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
32
|
+
//# sourceMappingURL=models-63NQBSV3.js.map
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-JW5NMQTU.js";
|
|
4
|
+
import "./chunk-3V37OZQH.js";
|
|
5
5
|
import "./chunk-Z6WRFOFT.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-WFY7ATSZ.js";
|
|
7
|
+
import "./chunk-FQLCD4HU.js";
|
|
8
|
+
import "./chunk-GUHOEIHP.js";
|
|
8
9
|
import "./chunk-IJBSOWHK.js";
|
|
9
10
|
import "./chunk-GJXOFDJT.js";
|
|
10
11
|
import "./chunk-PMJG2CXF.js";
|
|
@@ -14,4 +15,4 @@ var run = (context) => change(context, "pause");
|
|
|
14
15
|
export {
|
|
15
16
|
run
|
|
16
17
|
};
|
|
17
|
-
//# sourceMappingURL=pause-
|
|
18
|
+
//# sourceMappingURL=pause-UF7FQDJX.js.map
|