@modootoday/pmcp 0.22.13 → 0.23.1
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 → affected-D6FRJPPI.js} +2 -2
- package/dist/{apply-OIKQ5SIY.js → apply-3PWUO4J5.js} +20 -19
- package/dist/{available-Z5MIDFPH.js → available-74CMIBPD.js} +9 -9
- package/dist/{broadcast-BF2QL3O7.js → broadcast-VKZY7WSD.js} +3 -3
- package/dist/chunk-2GZKA33O.js +173 -0
- package/dist/chunk-2HL2MFNI.js +159 -0
- package/dist/{chunk-5PNS6V5C.js → chunk-2K4WYN4C.js} +2 -2
- package/dist/{chunk-4O4ZOSBQ.js → chunk-2MX5C7B2.js} +3 -3
- package/dist/chunk-43MXRTKH.js +134 -0
- package/dist/chunk-4VVQLWTS.js +93 -0
- package/dist/{chunk-24L4MO7H.js → chunk-5HNLHI5F.js} +2 -2
- package/dist/{chunk-JEL35P7S.js → chunk-5NDUWEMW.js} +2 -2
- package/dist/{chunk-737BENAU.js → chunk-6NRLBSEG.js} +5 -5
- package/dist/chunk-6QJ3F445.js +166 -0
- package/dist/{chunk-7ZOQELXR.js → chunk-72V6U7CZ.js} +3 -3
- package/dist/{chunk-J3QUG6O5.js → chunk-7CHUMF3E.js} +2 -2
- package/dist/{chunk-INT7QLEU.js → chunk-7DJQASH3.js} +25 -6
- package/dist/chunk-7IRXUPM2.js +7 -0
- package/dist/{chunk-UED3RH53.js → chunk-DNSHJIS4.js} +2 -2
- package/dist/{chunk-ISGBOJT7.js → chunk-DZTSCJOZ.js} +3 -3
- package/dist/{chunk-KEHB4FZP.js → chunk-E2E4HIEN.js} +49 -3
- package/dist/{chunk-VNZTULFD.js → chunk-EQF64INS.js} +3 -3
- package/dist/{chunk-G4ATQPQI.js → chunk-F3R5HEUB.js} +5 -1
- package/dist/{chunk-JW5NMQTU.js → chunk-HES44LTA.js} +4 -4
- package/dist/{chunk-RHJEGLYM.js → chunk-HF5D6B2U.js} +45 -6
- package/dist/{chunk-5OFQVW2K.js → chunk-HYXOJYVR.js} +2 -2
- package/dist/chunk-JANBBPKP.js +50 -0
- package/dist/{chunk-A6DARDQ4.js → chunk-JJFPSFDU.js} +2 -2
- package/dist/{chunk-XNML2KIC.js → chunk-JPYQDOEW.js} +3 -3
- package/dist/{chunk-733WVP2R.js → chunk-KYGGQPAH.js} +2 -2
- package/dist/{chunk-NNGGNXF2.js → chunk-LGRFYN5T.js} +2 -2
- package/dist/{chunk-GNVME5AD.js → chunk-LO54UUDE.js} +2 -2
- package/dist/{chunk-XSWF7APE.js → chunk-OGCJO6HQ.js} +9 -8
- package/dist/{chunk-T4GVN7XO.js → chunk-P25V6NEX.js} +5 -5
- package/dist/{chunk-A7XCUR2C.js → chunk-Q6V274OB.js} +8 -6
- package/dist/chunk-QR6A3TYP.js +315 -0
- package/dist/{chunk-EIDIVIAD.js → chunk-QYLOIM4U.js} +9 -2
- package/dist/{chunk-ZKB7ZNKY.js → chunk-RRKA3GF5.js} +4 -4
- package/dist/{chunk-P5D6RKMT.js → chunk-RZYZILU4.js} +5 -3
- package/dist/{chunk-5IZFEVPW.js → chunk-SDQYZDHS.js} +2 -2
- package/dist/chunk-UVTGY2R3.js +78 -0
- package/dist/{chunk-LLT5FQBE.js → chunk-VBVNOLRR.js} +7 -3
- package/dist/{chunk-ABTJQ4QV.js → chunk-WBPVNCQO.js} +20 -5
- package/dist/{chunk-K2VU3B4W.js → chunk-WQBKQTNT.js} +3 -3
- package/dist/{chunk-YGOWIJPE.js → chunk-WZYGM3FR.js} +6 -2
- package/dist/chunk-Y6NFETNG.js +232 -0
- package/dist/{chunk-5KWDQFVY.js → chunk-YRNFMPZB.js} +7 -8
- package/dist/{chunk-ZS5IDQFJ.js → chunk-ZXMECZBI.js} +4 -4
- package/dist/{cli-IHVNE3WL.js → cli-GFDT4YXM.js} +14 -15
- package/dist/{cli-FSSYFCV3.js → cli-YWV7FLYO.js} +18 -12
- package/dist/cli.js +307 -47
- package/dist/{completion-ZTTJVV4C.js → completion-OKGNN7DE.js} +25 -23
- package/dist/{diagnostics-XC5L6Z3E.js → diagnostics-N4XRRCQG.js} +5 -5
- package/dist/{doctor-FGDSUBR3.js → doctor-3H6UYNEA.js} +20 -20
- package/dist/{entry-NNB2CQLZ.js → entry-KDLLG6ED.js} +9 -9
- package/dist/{exec-mcp-ZU3Z3XT6.js → exec-mcp-AENALAHJ.js} +8 -8
- package/dist/{harness-B7ANLH5M.js → harness-GRYTNUF2.js} +26 -44
- package/dist/harness-launch-gate.js +3 -3
- package/dist/harness-worker.js +5 -5
- package/dist/{heavy-IIZBO4YM.js → heavy-BGXKJKYB.js} +78 -22
- package/dist/hooks-V25ANQ4Q.js +24 -0
- package/dist/{host-XXWQ23LD.js → host-4EGPADOJ.js} +6 -6
- package/dist/{host-5P4D7GSE.js → host-MLSWY7D7.js} +17 -14
- package/dist/{host-run-AEWHFVQL.js → host-run-VI52IUKF.js} +5 -5
- package/dist/http.js +1 -1
- package/dist/{import-mcp-BQM5DKYH.js → import-mcp-FIXFLUDM.js} +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -9
- package/dist/init-ALTBFUPP.js +14 -0
- package/dist/{install-OFVLR7TI.js → install-5JH4DSFF.js} +10 -10
- package/dist/{invoke-3BQ5NG3P.js → invoke-7T7UY57O.js} +7 -7
- package/dist/{list-EU4MJOXA.js → list-JFZ7UZLV.js} +11 -11
- package/dist/{list-WWYCGD3X.js → list-LV5EKCF6.js} +11 -7
- package/dist/{logout-6DFDYJUI.js → logout-7CNBO76Z.js} +8 -8
- package/dist/{logs-BRF6DBKG.js → logs-2JEMSNSG.js} +7 -7
- package/dist/{mailbox-QYA2LQSE.js → mailbox-5FVFMQ2J.js} +6 -6
- package/dist/{mailbox-AQCTXO3H.js → mailbox-ZHZWZMAY.js} +14 -21
- package/dist/{mainline-O5AEHG3J.js → mainline-6PBT3VNR.js} +8 -7
- package/dist/{marketplace-TI5HFAHB.js → marketplace-2X3OOEPW.js} +10 -9
- package/dist/{mcp-HR5JFUW7.js → mcp-MVQVMAKJ.js} +4 -4
- package/dist/{mcp-4R53HSGY.js → mcp-PBTQ5SJW.js} +2 -2
- package/dist/{models-63NQBSV3.js → models-XSF45MCD.js} +9 -5
- package/dist/{pause-UF7FQDJX.js → pause-CMZOIHTJ.js} +3 -3
- package/dist/{preview-WSESS2UN.js → preview-465CQJBQ.js} +4 -4
- package/dist/{project-JXXL24WN.js → project-FZGJRG2U.js} +14 -12
- package/dist/{reindex-3GPKAFBW.js → reindex-D62HQAN2.js} +7 -7
- package/dist/{report-JUSKQPAC.js → report-UB7MXAUB.js} +10 -10
- package/dist/{resume-3WAROOQ3.js → resume-PAKIT4TT.js} +3 -3
- package/dist/{run-XRWU4L73.js → run-TOP37ZQC.js} +7 -7
- package/dist/run-VGJDMA2O.js +23 -0
- package/dist/{serve-OEX5V5CD.js → serve-LR7SJHNH.js} +13 -13
- package/dist/{session-YZVX4NGN.js → session-3YVVO2GR.js} +6 -6
- package/dist/{setup-SWNAC2C7.js → setup-6AQUOWOH.js} +3 -2
- package/dist/{smoke-5BGJXAHX.js → smoke-6X6IXQIQ.js} +4 -4
- package/dist/{start-login-MG26NDE3.js → start-login-X37KGCCB.js} +9 -9
- package/dist/{status-GKCIVAAR.js → status-4PYPTYUB.js} +4 -4
- package/dist/{status-APADL7O2.js → status-E4AFUOQO.js} +17 -10
- package/dist/{status-LH7Q255G.js → status-LBRK37GA.js} +27 -26
- package/dist/stdio.js +2 -2
- package/dist/{sweep-VTVPDAPY.js → sweep-VURZU6DI.js} +3 -3
- package/dist/{test-TK2J3IB7.js → test-D2EEFUN2.js} +11 -11
- package/dist/{tui-YTPHHKCW.js → tui-D7E3MD3X.js} +45 -19
- package/dist/{unbroadcast-CH7BAQ2G.js → unbroadcast-7AMLURCG.js} +3 -3
- package/dist/{validate-5QVZBE6W.js → validate-YXR7FJJX.js} +11 -9
- package/dist/{wait-4HYJJAWO.js → wait-HEODT7KV.js} +3 -3
- package/dist/{worker-RBXYAMR4.js → worker-WTBC6VYO.js} +7 -7
- package/dist/{worktree-create-FEZNQUQ6.js → worktree-create-FTSLMZWS.js} +2 -2
- package/docs/commands.md +64 -28
- package/docs/hooks.md +3 -3
- package/docs/project-configuration.md +33 -33
- package/docs/terminal-workspace.md +2 -0
- package/docs/upgrading.md +43 -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/plugins/pmcp/skills/headless-agents-ci-scaffold/SKILL.md +1 -1
- package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +1 -1
- package/plugins/pmcp/skills/pmcp-sessions-and-git/SKILL.md +3 -2
- package/skills/headless-agents-ci-scaffold/SKILL.md +1 -1
- package/skills/pmcp-project-init/SKILL.md +1 -1
- package/skills/pmcp-sessions-and-git/SKILL.md +3 -2
- package/dist/chunk-2P4Z2NUX.js +0 -28
- package/dist/chunk-3Y3HDMHA.js +0 -108
- package/dist/chunk-74O7KZUH.js +0 -45
- package/dist/chunk-BN4XAXMQ.js +0 -65
- package/dist/chunk-E3DQB5LS.js +0 -48
- package/dist/chunk-JWRZDYB5.js +0 -59
- package/dist/chunk-LMUBBIE2.js +0 -83
- package/dist/chunk-QBSJL3SP.js +0 -162
- package/dist/chunk-VSTUKACC.js +0 -7
- package/dist/chunk-WFY7ATSZ.js +0 -116
- package/dist/hooks-IEJTW7BV.js +0 -24
- package/dist/init-L6GUO3PW.js +0 -14
- package/dist/run-VUUQS4WY.js +0 -19
|
@@ -7,26 +7,26 @@ import {
|
|
|
7
7
|
} from "./chunk-C3G75JH7.js";
|
|
8
8
|
import {
|
|
9
9
|
requireTerminal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EQF64INS.js";
|
|
11
11
|
import "./chunk-5ZABTVSW.js";
|
|
12
12
|
import {
|
|
13
13
|
runTui
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LGRFYN5T.js";
|
|
15
15
|
import {
|
|
16
16
|
invoke
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P25V6NEX.js";
|
|
18
18
|
import {
|
|
19
19
|
lockFile
|
|
20
20
|
} from "./chunk-DZ2MRTYT.js";
|
|
21
21
|
import "./chunk-LMT3PPXJ.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-DZTSCJOZ.js";
|
|
23
|
+
import "./chunk-SDQYZDHS.js";
|
|
24
24
|
import {
|
|
25
25
|
locateExecutable
|
|
26
26
|
} from "./chunk-R2GPCZUX.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-LO54UUDE.js";
|
|
28
28
|
import "./chunk-34DECPVC.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-KYGGQPAH.js";
|
|
30
30
|
import "./chunk-FOLA4EUJ.js";
|
|
31
31
|
import "./chunk-N7ANFMA5.js";
|
|
32
32
|
import "./chunk-TYY5TYHF.js";
|
|
@@ -35,7 +35,7 @@ import "./chunk-FQLCD4HU.js";
|
|
|
35
35
|
import "./chunk-GUHOEIHP.js";
|
|
36
36
|
import "./chunk-IJBSOWHK.js";
|
|
37
37
|
import "./chunk-XWLMZKH2.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-7IRXUPM2.js";
|
|
39
39
|
import "./chunk-GJXOFDJT.js";
|
|
40
40
|
import "./chunk-PMJG2CXF.js";
|
|
41
41
|
import {
|
|
@@ -308,4 +308,4 @@ export {
|
|
|
308
308
|
launchStartup,
|
|
309
309
|
planStartup
|
|
310
310
|
};
|
|
311
|
-
//# sourceMappingURL=entry-
|
|
311
|
+
//# sourceMappingURL=entry-KDLLG6ED.js.map
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
} from "./chunk-UPQTAHUK.js";
|
|
9
9
|
import {
|
|
10
10
|
specFrom
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-YRNFMPZB.js";
|
|
12
|
+
import "./chunk-7CHUMF3E.js";
|
|
13
13
|
import {
|
|
14
14
|
launch
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WQBKQTNT.js";
|
|
16
16
|
import "./chunk-UYBWUOLR.js";
|
|
17
17
|
import "./chunk-UKR64U7J.js";
|
|
18
18
|
import "./chunk-42SO7KYX.js";
|
|
@@ -22,7 +22,7 @@ import "./chunk-LFFIQBNY.js";
|
|
|
22
22
|
import "./chunk-HQOB7OQS.js";
|
|
23
23
|
import "./chunk-73AKO4UL.js";
|
|
24
24
|
import "./chunk-M6X6HVQK.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-RZYZILU4.js";
|
|
26
26
|
import "./chunk-SUDG7B6S.js";
|
|
27
27
|
import "./chunk-3V37OZQH.js";
|
|
28
28
|
import "./chunk-Z6WRFOFT.js";
|
|
@@ -31,9 +31,9 @@ import {
|
|
|
31
31
|
McpAuthError
|
|
32
32
|
} from "./chunk-Q5H3L6Y4.js";
|
|
33
33
|
import "./chunk-ARXCYFFZ.js";
|
|
34
|
-
import "./chunk-WFY7ATSZ.js";
|
|
35
34
|
import "./chunk-V4NPDK6X.js";
|
|
36
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-Y6NFETNG.js";
|
|
36
|
+
import "./chunk-KYGGQPAH.js";
|
|
37
37
|
import "./chunk-FOLA4EUJ.js";
|
|
38
38
|
import "./chunk-N7ANFMA5.js";
|
|
39
39
|
import {
|
|
@@ -44,7 +44,7 @@ import "./chunk-FQLCD4HU.js";
|
|
|
44
44
|
import "./chunk-GUHOEIHP.js";
|
|
45
45
|
import "./chunk-IJBSOWHK.js";
|
|
46
46
|
import "./chunk-XWLMZKH2.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-7IRXUPM2.js";
|
|
48
48
|
import "./chunk-GJXOFDJT.js";
|
|
49
49
|
import "./chunk-PMJG2CXF.js";
|
|
50
50
|
import "./chunk-J6KL3COD.js";
|
|
@@ -370,4 +370,4 @@ function runExecMcp(context, name) {
|
|
|
370
370
|
export {
|
|
371
371
|
runExecMcp
|
|
372
372
|
};
|
|
373
|
-
//# sourceMappingURL=exec-mcp-
|
|
373
|
+
//# sourceMappingURL=exec-mcp-AENALAHJ.js.map
|
|
@@ -6,52 +6,20 @@ import {
|
|
|
6
6
|
unsupportedReceipt
|
|
7
7
|
} from "./chunk-F5XMGOOX.js";
|
|
8
8
|
import {
|
|
9
|
+
HARNESS_OPERATIONS,
|
|
9
10
|
harnessSpec
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QR6A3TYP.js";
|
|
11
12
|
import {
|
|
12
13
|
ArgumentError,
|
|
13
|
-
one
|
|
14
|
-
|
|
14
|
+
one,
|
|
15
|
+
unknownSubcommand
|
|
16
|
+
} from "./chunk-Y6NFETNG.js";
|
|
15
17
|
import {
|
|
16
18
|
object
|
|
17
19
|
} from "./chunk-5OMOPUE6.js";
|
|
18
20
|
|
|
19
21
|
// src/commands/harness/invocation.ts
|
|
20
22
|
import { readFileSync, statSync } from "fs";
|
|
21
|
-
var common = ["group-file", "generation"];
|
|
22
|
-
var options = {
|
|
23
|
-
"capabilities:inspect": [],
|
|
24
|
-
"doctor:inspect": [],
|
|
25
|
-
"group:create": ["input"],
|
|
26
|
-
"group:list": [],
|
|
27
|
-
"group:inspect": ["group-file"],
|
|
28
|
-
"group:configure": [...common, "input"],
|
|
29
|
-
"group:pause": common,
|
|
30
|
-
"group:resume": common,
|
|
31
|
-
"group:stop": common,
|
|
32
|
-
"session:start": [...common, "input"],
|
|
33
|
-
"session:list": ["group-file"],
|
|
34
|
-
"session:inspect": ["group-file", "session"],
|
|
35
|
-
"session:read": ["group-file", "session", "input"],
|
|
36
|
-
"session:watch": ["group-file", "session", "input"],
|
|
37
|
-
"session:stop": [...common, "session"],
|
|
38
|
-
"control:acquire": [...common, "session", "controller", "mode"],
|
|
39
|
-
"control:renew": [...common, "lease-file"],
|
|
40
|
-
"control:release": [...common, "lease-file"],
|
|
41
|
-
"input:write": [...common, "lease-file", "request-id", "text-file"],
|
|
42
|
-
"input:submit": [...common, "lease-file", "request-id"],
|
|
43
|
-
"input:interrupt": [...common, "lease-file"],
|
|
44
|
-
"attach:open": [...common, "session", "mode", "lease-file"],
|
|
45
|
-
"attach:inspect": ["group-file", "session"],
|
|
46
|
-
"attach:detach": [...common, "session"],
|
|
47
|
-
"delivery:list": ["group-file"],
|
|
48
|
-
"delivery:inspect": ["group-file", "request-id"],
|
|
49
|
-
"recovery:inspect": ["group-file", "include-starts"],
|
|
50
|
-
"recovery:reconcile": common,
|
|
51
|
-
"recovery:replace-main": [...common, "input"],
|
|
52
|
-
"recovery:stop-orphan": [...common, "session"],
|
|
53
|
-
"recovery:abort-start": [...common, "session"]
|
|
54
|
-
};
|
|
55
23
|
function file(path) {
|
|
56
24
|
const stat = statSync(path);
|
|
57
25
|
if (!stat.isFile() || stat.size > 65536)
|
|
@@ -61,9 +29,23 @@ function file(path) {
|
|
|
61
29
|
function parseInvocation(context) {
|
|
62
30
|
const [family, action, ...extra] = context.args.positional;
|
|
63
31
|
const key = `${family}:${action}`;
|
|
64
|
-
const allowed =
|
|
65
|
-
|
|
66
|
-
|
|
32
|
+
const allowed = HARNESS_OPERATIONS[key]?.options;
|
|
33
|
+
const families = [
|
|
34
|
+
"layout",
|
|
35
|
+
"host",
|
|
36
|
+
"mcp",
|
|
37
|
+
...new Set(
|
|
38
|
+
Object.keys(HARNESS_OPERATIONS).map((name) => name.split(":")[0])
|
|
39
|
+
)
|
|
40
|
+
];
|
|
41
|
+
if (!family || !families.includes(family))
|
|
42
|
+
throw unknownSubcommand("harness", family, families);
|
|
43
|
+
if (!allowed || !action) {
|
|
44
|
+
const actions = Object.keys(HARNESS_OPERATIONS).filter((name) => name.startsWith(`${family}:`)).map((name) => name.slice(family.length + 1));
|
|
45
|
+
throw unknownSubcommand(`harness ${family}`, action, actions);
|
|
46
|
+
}
|
|
47
|
+
if (extra.length > 0)
|
|
48
|
+
throw new ArgumentError(`unexpected ${extra.join(" ")}`);
|
|
67
49
|
for (const option of [
|
|
68
50
|
...context.args.options.keys(),
|
|
69
51
|
...context.args.flags
|
|
@@ -147,16 +129,16 @@ var harnessCommand = {
|
|
|
147
129
|
}
|
|
148
130
|
if (context.args.positional[0] === "layout") return runLayout(context);
|
|
149
131
|
if (context.args.positional[0] === "mcp") {
|
|
150
|
-
const { runPtyMcp } = await import("./mcp-
|
|
132
|
+
const { runPtyMcp } = await import("./mcp-PBTQ5SJW.js");
|
|
151
133
|
return runPtyMcp(context);
|
|
152
134
|
}
|
|
153
135
|
if (context.args.positional[0] === "host") {
|
|
154
|
-
const { runHost } = await import("./host-
|
|
136
|
+
const { runHost } = await import("./host-MLSWY7D7.js");
|
|
155
137
|
return runHost(context);
|
|
156
138
|
}
|
|
157
139
|
try {
|
|
158
140
|
const operation = parseInvocation(context);
|
|
159
|
-
const { invoke } = await import("./invoke-
|
|
141
|
+
const { invoke } = await import("./invoke-7T7UY57O.js");
|
|
160
142
|
const receipt = await invoke(operation);
|
|
161
143
|
context.ui.data(`${JSON.stringify(receipt)}
|
|
162
144
|
`);
|
|
@@ -174,4 +156,4 @@ var harnessCommand = {
|
|
|
174
156
|
export {
|
|
175
157
|
harnessCommand
|
|
176
158
|
};
|
|
177
|
-
//# sourceMappingURL=harness-
|
|
159
|
+
//# sourceMappingURL=harness-GRYTNUF2.js.map
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
assertProof,
|
|
8
8
|
assertResourceFresh,
|
|
9
9
|
createProof
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LO54UUDE.js";
|
|
11
11
|
import "./chunk-34DECPVC.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-KYGGQPAH.js";
|
|
13
13
|
import "./chunk-FOLA4EUJ.js";
|
|
14
14
|
import "./chunk-N7ANFMA5.js";
|
|
15
15
|
import "./chunk-TYY5TYHF.js";
|
|
@@ -18,7 +18,7 @@ import "./chunk-FQLCD4HU.js";
|
|
|
18
18
|
import "./chunk-GUHOEIHP.js";
|
|
19
19
|
import "./chunk-IJBSOWHK.js";
|
|
20
20
|
import "./chunk-XWLMZKH2.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-7IRXUPM2.js";
|
|
22
22
|
import "./chunk-GJXOFDJT.js";
|
|
23
23
|
import "./chunk-PMJG2CXF.js";
|
|
24
24
|
import {
|
package/dist/harness-worker.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runOperation
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-DZTSCJOZ.js";
|
|
4
|
+
import "./chunk-SDQYZDHS.js";
|
|
5
5
|
import "./chunk-R2GPCZUX.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-LO54UUDE.js";
|
|
7
7
|
import "./chunk-34DECPVC.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KYGGQPAH.js";
|
|
9
9
|
import "./chunk-FOLA4EUJ.js";
|
|
10
10
|
import "./chunk-N7ANFMA5.js";
|
|
11
11
|
import "./chunk-TYY5TYHF.js";
|
|
@@ -14,7 +14,7 @@ import "./chunk-FQLCD4HU.js";
|
|
|
14
14
|
import "./chunk-GUHOEIHP.js";
|
|
15
15
|
import "./chunk-IJBSOWHK.js";
|
|
16
16
|
import "./chunk-XWLMZKH2.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-7IRXUPM2.js";
|
|
18
18
|
import "./chunk-GJXOFDJT.js";
|
|
19
19
|
import "./chunk-PMJG2CXF.js";
|
|
20
20
|
import {
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-DZ2MRTYT.js";
|
|
10
10
|
import {
|
|
11
11
|
heavySpec
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-43MXRTKH.js";
|
|
13
|
+
import "./chunk-JPYQDOEW.js";
|
|
14
14
|
import {
|
|
15
15
|
ArgumentError,
|
|
16
16
|
EXIT,
|
|
17
17
|
one
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Y6NFETNG.js";
|
|
19
19
|
import {
|
|
20
20
|
BUSY_EXIT,
|
|
21
21
|
DISABLE_ENV,
|
|
@@ -57,6 +57,7 @@ import { constants } from "os";
|
|
|
57
57
|
|
|
58
58
|
// src/lease/scope.ts
|
|
59
59
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
60
|
+
import { existsSync } from "fs";
|
|
60
61
|
import { join as join2 } from "path";
|
|
61
62
|
|
|
62
63
|
// src/lease/iocontrol.ts
|
|
@@ -119,10 +120,44 @@ function scopeCgroup(unit) {
|
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
// src/lease/scope.ts
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
var BUS_FAILURE = /Failed to connect to (?:the )?bus/u;
|
|
124
|
+
var installed;
|
|
125
|
+
var probed = /* @__PURE__ */ new Map();
|
|
126
|
+
function probeScope(env) {
|
|
127
|
+
const run2 = spawnSync2("systemd-run", ["--user", "--scope", "-q", "true"], {
|
|
128
|
+
env,
|
|
129
|
+
encoding: "utf8",
|
|
130
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
131
|
+
timeout: 1e4
|
|
132
|
+
});
|
|
133
|
+
if (run2.status === 0) return null;
|
|
134
|
+
const line = (run2.stderr ?? "").trim().split("\n")[0];
|
|
135
|
+
return line || `systemd-run --user exited ${run2.status ?? "on a signal"}`;
|
|
136
|
+
}
|
|
137
|
+
function systemdRun() {
|
|
138
|
+
installed ??= spawnSync2("systemd-run", ["--user", "--version"], { stdio: "ignore" }).status === 0;
|
|
139
|
+
return installed;
|
|
140
|
+
}
|
|
141
|
+
function userManager(exists = existsSync, probe = probeScope, platform = process.platform, present = systemdRun) {
|
|
142
|
+
return {
|
|
143
|
+
unreachable(env) {
|
|
144
|
+
if (platform !== "linux") return "not Linux";
|
|
145
|
+
if (!present()) return "systemd-run is not installed";
|
|
146
|
+
const runtime = env["XDG_RUNTIME_DIR"];
|
|
147
|
+
if (!runtime) return "XDG_RUNTIME_DIR is not set";
|
|
148
|
+
const socket = exists(join2(runtime, "systemd", "private")) || exists(join2(runtime, "bus")) || Boolean(env["DBUS_SESSION_BUS_ADDRESS"]);
|
|
149
|
+
if (!socket) return `no user manager socket in ${runtime}`;
|
|
150
|
+
if (!probed.has(runtime)) probed.set(runtime, probe(env));
|
|
151
|
+
return probed.get(runtime) ?? null;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function lost(memoryMax, io2) {
|
|
156
|
+
const parts = [
|
|
157
|
+
...memoryMax === void 0 ? [] : [`MemoryMax=${memoryMax}`],
|
|
158
|
+
...io2 ? ["io.weight"] : []
|
|
159
|
+
];
|
|
160
|
+
return parts.join(" and ");
|
|
126
161
|
}
|
|
127
162
|
function wantsIo(settings2, lane, host) {
|
|
128
163
|
if (lane === null || settings2.io.enabled === false) return false;
|
|
@@ -147,14 +182,14 @@ async function weigh(unit, settings2, lane, host, say, onCgroup) {
|
|
|
147
182
|
}
|
|
148
183
|
}
|
|
149
184
|
function scoped(argv, settings2, lane, memoryMax, say, onCgroup = () => {
|
|
150
|
-
}, host = cgroupHost()) {
|
|
185
|
+
}, host = cgroupHost(), manager = userManager(), env = process.env) {
|
|
151
186
|
const io2 = wantsIo(settings2, lane, host);
|
|
152
187
|
if (memoryMax === void 0 && !io2) return { argv };
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
188
|
+
const reason2 = manager.unreachable(env);
|
|
189
|
+
if (reason2 !== null) {
|
|
190
|
+
say(
|
|
191
|
+
`no systemd user scope (${reason2}); running without ${lost(memoryMax, io2)}`
|
|
192
|
+
);
|
|
158
193
|
return { argv };
|
|
159
194
|
}
|
|
160
195
|
const unit = `pmcp-heavy-${process.pid}-${Date.now()}`;
|
|
@@ -170,6 +205,7 @@ function scoped(argv, settings2, lane, memoryMax, say, onCgroup = () => {
|
|
|
170
205
|
"--",
|
|
171
206
|
...argv
|
|
172
207
|
],
|
|
208
|
+
unscoped: argv,
|
|
173
209
|
...io2 && lane !== null ? { started: () => weigh(unit, settings2, lane, host, say, onCgroup) } : {}
|
|
174
210
|
};
|
|
175
211
|
}
|
|
@@ -865,13 +901,21 @@ function laneFor(run2) {
|
|
|
865
901
|
return { lane, weight };
|
|
866
902
|
}
|
|
867
903
|
var SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
904
|
+
var HEAD = 2048;
|
|
868
905
|
function execute(argv, run2, extra, watch) {
|
|
869
906
|
const [bin, ...rest] = argv;
|
|
870
907
|
return new Promise((resolve) => {
|
|
871
908
|
const child = spawn(bin ?? "true", rest, {
|
|
872
909
|
cwd: run2.cwd,
|
|
873
910
|
env: { ...run2.env, ...extra },
|
|
874
|
-
stdio: "inherit"
|
|
911
|
+
stdio: ["inherit", "inherit", watch.stderrHead ? "pipe" : "inherit"]
|
|
912
|
+
});
|
|
913
|
+
let head = "";
|
|
914
|
+
child.stderr?.on("data", (chunk) => {
|
|
915
|
+
process.stderr.write(chunk);
|
|
916
|
+
if (head.length >= HEAD) return;
|
|
917
|
+
head += chunk.toString("utf8");
|
|
918
|
+
watch.stderrHead?.(head.slice(0, HEAD));
|
|
875
919
|
});
|
|
876
920
|
void watch.started?.();
|
|
877
921
|
const forward = (signal) => child.kill(signal);
|
|
@@ -975,26 +1019,38 @@ async function runHeavy(run2) {
|
|
|
975
1019
|
const memoryMax = run2.settings.profiles[run2.profile]?.memoryMax;
|
|
976
1020
|
const held2 = outcome.kind === "held" ? outcome : null;
|
|
977
1021
|
const sampler = new Sampler();
|
|
978
|
-
const { argv, started } = scoped(
|
|
1022
|
+
const { argv, started, unscoped } = scoped(
|
|
979
1023
|
run2.argv,
|
|
980
1024
|
run2.settings,
|
|
981
1025
|
held2 ? lane : null,
|
|
982
1026
|
memoryMax,
|
|
983
1027
|
run2.say,
|
|
984
|
-
(dir) => sampler.useCgroup(dir)
|
|
1028
|
+
(dir) => sampler.useCgroup(dir),
|
|
1029
|
+
void 0,
|
|
1030
|
+
void 0,
|
|
1031
|
+
run2.env
|
|
985
1032
|
);
|
|
986
1033
|
const warn = held2 ? holdWarner(run2, epoch()) : () => {
|
|
987
1034
|
};
|
|
1035
|
+
const tick = (pid) => {
|
|
1036
|
+
warn();
|
|
1037
|
+
sampler.sample(pid);
|
|
1038
|
+
};
|
|
988
1039
|
const begun = Date.now();
|
|
989
1040
|
let code = 1;
|
|
1041
|
+
let head = "";
|
|
990
1042
|
try {
|
|
991
1043
|
code = await execute(argv, run2, held2?.env ?? {}, {
|
|
992
|
-
tick
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
},
|
|
996
|
-
...started ? { started } : {}
|
|
1044
|
+
tick,
|
|
1045
|
+
...started ? { started } : {},
|
|
1046
|
+
...unscoped ? { stderrHead: (text) => head = text } : {}
|
|
997
1047
|
});
|
|
1048
|
+
if (code !== 0 && unscoped && BUS_FAILURE.test(head.split("\n")[0] ?? "")) {
|
|
1049
|
+
run2.say(
|
|
1050
|
+
"systemd-run could not reach the user manager; running the command again without the scope"
|
|
1051
|
+
);
|
|
1052
|
+
code = await execute(unscoped, run2, held2?.env ?? {}, { tick });
|
|
1053
|
+
}
|
|
998
1054
|
} finally {
|
|
999
1055
|
const wall = Math.round((Date.now() - begun) / 100) / 10;
|
|
1000
1056
|
held2?.release(code, Math.round(wall));
|
|
@@ -1906,4 +1962,4 @@ var heavyCommand = { ...heavySpec, run };
|
|
|
1906
1962
|
export {
|
|
1907
1963
|
heavyCommand
|
|
1908
1964
|
};
|
|
1909
|
-
//# sourceMappingURL=heavy-
|
|
1965
|
+
//# sourceMappingURL=heavy-BGXKJKYB.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
hooksSpec
|
|
3
|
+
} from "./chunk-E2E4HIEN.js";
|
|
4
|
+
import "./chunk-JPYQDOEW.js";
|
|
5
|
+
import {
|
|
6
|
+
ArgumentError,
|
|
7
|
+
unknownSubcommand
|
|
8
|
+
} from "./chunk-Y6NFETNG.js";
|
|
9
|
+
|
|
10
|
+
// src/commands/hooks.ts
|
|
11
|
+
var VERBS = ["list", "test", "report"];
|
|
12
|
+
async function run(context) {
|
|
13
|
+
const [verb = "list", ...extra] = context.args.positional;
|
|
14
|
+
if (!VERBS.includes(verb)) throw unknownSubcommand("hooks", verb, VERBS);
|
|
15
|
+
if (extra.length) throw new ArgumentError(`unexpected ${extra.join(" ")}`);
|
|
16
|
+
if (verb === "list") return (await import("./list-JFZ7UZLV.js")).run(context);
|
|
17
|
+
if (verb === "test") return (await import("./test-D2EEFUN2.js")).run(context);
|
|
18
|
+
return (await import("./report-UB7MXAUB.js")).run(context);
|
|
19
|
+
}
|
|
20
|
+
var hooksCommand = { ...hooksSpec, run };
|
|
21
|
+
export {
|
|
22
|
+
hooksCommand
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=hooks-V25ANQ4Q.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requireTerminal,
|
|
3
3
|
terminalSupport
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EQF64INS.js";
|
|
5
5
|
import "./chunk-5ZABTVSW.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-LGRFYN5T.js";
|
|
7
7
|
import "./chunk-LMT3PPXJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-SDQYZDHS.js";
|
|
9
9
|
import "./chunk-R2GPCZUX.js";
|
|
10
10
|
import "./chunk-34DECPVC.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-KYGGQPAH.js";
|
|
12
12
|
import "./chunk-FOLA4EUJ.js";
|
|
13
13
|
import "./chunk-N7ANFMA5.js";
|
|
14
14
|
import "./chunk-TYY5TYHF.js";
|
|
@@ -17,7 +17,7 @@ import "./chunk-FQLCD4HU.js";
|
|
|
17
17
|
import "./chunk-GUHOEIHP.js";
|
|
18
18
|
import "./chunk-IJBSOWHK.js";
|
|
19
19
|
import "./chunk-XWLMZKH2.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-7IRXUPM2.js";
|
|
21
21
|
import "./chunk-GJXOFDJT.js";
|
|
22
22
|
import "./chunk-PMJG2CXF.js";
|
|
23
23
|
import "./chunk-J6KL3COD.js";
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
requireTerminal,
|
|
26
26
|
terminalSupport
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=host-
|
|
28
|
+
//# sourceMappingURL=host-4EGPADOJ.js.map
|
|
@@ -4,16 +4,16 @@ import {
|
|
|
4
4
|
} from "./chunk-F5XMGOOX.js";
|
|
5
5
|
import {
|
|
6
6
|
specFrom
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-YRNFMPZB.js";
|
|
8
|
+
import "./chunk-7CHUMF3E.js";
|
|
9
9
|
import {
|
|
10
10
|
approvalDir,
|
|
11
11
|
approvalState,
|
|
12
12
|
hostDigest,
|
|
13
13
|
projectedFiles,
|
|
14
14
|
writeApproval
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-JJFPSFDU.js";
|
|
16
|
+
import "./chunk-WQBKQTNT.js";
|
|
17
17
|
import "./chunk-UYBWUOLR.js";
|
|
18
18
|
import "./chunk-UKR64U7J.js";
|
|
19
19
|
import "./chunk-42SO7KYX.js";
|
|
@@ -23,7 +23,7 @@ import "./chunk-LFFIQBNY.js";
|
|
|
23
23
|
import "./chunk-HQOB7OQS.js";
|
|
24
24
|
import "./chunk-73AKO4UL.js";
|
|
25
25
|
import "./chunk-M6X6HVQK.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-RZYZILU4.js";
|
|
27
27
|
import "./chunk-SUDG7B6S.js";
|
|
28
28
|
import "./chunk-3V37OZQH.js";
|
|
29
29
|
import {
|
|
@@ -32,13 +32,14 @@ import {
|
|
|
32
32
|
import "./chunk-B3OZ4GGO.js";
|
|
33
33
|
import "./chunk-Q5H3L6Y4.js";
|
|
34
34
|
import "./chunk-ARXCYFFZ.js";
|
|
35
|
-
import {
|
|
36
|
-
ArgumentError
|
|
37
|
-
} from "./chunk-WFY7ATSZ.js";
|
|
38
35
|
import "./chunk-V4NPDK6X.js";
|
|
36
|
+
import {
|
|
37
|
+
ArgumentError,
|
|
38
|
+
unknownSubcommand
|
|
39
|
+
} from "./chunk-Y6NFETNG.js";
|
|
39
40
|
import {
|
|
40
41
|
hostDoctor
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KYGGQPAH.js";
|
|
42
43
|
import "./chunk-FOLA4EUJ.js";
|
|
43
44
|
import "./chunk-N7ANFMA5.js";
|
|
44
45
|
import "./chunk-TYY5TYHF.js";
|
|
@@ -47,7 +48,7 @@ import "./chunk-FQLCD4HU.js";
|
|
|
47
48
|
import "./chunk-GUHOEIHP.js";
|
|
48
49
|
import "./chunk-IJBSOWHK.js";
|
|
49
50
|
import "./chunk-XWLMZKH2.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-7IRXUPM2.js";
|
|
51
52
|
import "./chunk-GJXOFDJT.js";
|
|
52
53
|
import "./chunk-PMJG2CXF.js";
|
|
53
54
|
import "./chunk-J6KL3COD.js";
|
|
@@ -176,8 +177,10 @@ async function ask(question) {
|
|
|
176
177
|
var VERBS = ["approve", "status", "up", "down", "unit"];
|
|
177
178
|
async function runHost(context) {
|
|
178
179
|
const [, verb, ...extra] = context.args.positional;
|
|
179
|
-
if (
|
|
180
|
-
throw
|
|
180
|
+
if (!verb || !VERBS.includes(verb))
|
|
181
|
+
throw unknownSubcommand("harness host", verb, VERBS);
|
|
182
|
+
if (extra.length > 0)
|
|
183
|
+
throw new ArgumentError(`unexpected ${extra.join(" ")}`);
|
|
181
184
|
const spec = specFrom(context);
|
|
182
185
|
if (!spec.host) throw new ArgumentError("pmcp.toml has no [host] table");
|
|
183
186
|
const refused = hostVerbUnsupported(verb);
|
|
@@ -187,7 +190,7 @@ async function runHost(context) {
|
|
|
187
190
|
return 1;
|
|
188
191
|
}
|
|
189
192
|
if (verb === "up" || verb === "down" || verb === "unit") {
|
|
190
|
-
const { runHostVerb } = await import("./host-run-
|
|
193
|
+
const { runHostVerb } = await import("./host-run-VI52IUKF.js");
|
|
191
194
|
return runHostVerb(verb, spec, context);
|
|
192
195
|
}
|
|
193
196
|
if (verb === "status") {
|
|
@@ -215,4 +218,4 @@ async function runHost(context) {
|
|
|
215
218
|
export {
|
|
216
219
|
runHost
|
|
217
220
|
};
|
|
218
|
-
//# sourceMappingURL=host-
|
|
221
|
+
//# sourceMappingURL=host-MLSWY7D7.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
approvalDir,
|
|
7
7
|
approvalState
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JJFPSFDU.js";
|
|
9
9
|
import {
|
|
10
10
|
ArgumentError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y6NFETNG.js";
|
|
12
12
|
import {
|
|
13
13
|
missingBinary,
|
|
14
14
|
ptyBinary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KYGGQPAH.js";
|
|
16
16
|
import "./chunk-FOLA4EUJ.js";
|
|
17
17
|
import "./chunk-N7ANFMA5.js";
|
|
18
18
|
import "./chunk-TYY5TYHF.js";
|
|
@@ -25,7 +25,7 @@ import "./chunk-IJBSOWHK.js";
|
|
|
25
25
|
import "./chunk-XWLMZKH2.js";
|
|
26
26
|
import {
|
|
27
27
|
VERSION
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-7IRXUPM2.js";
|
|
29
29
|
import "./chunk-GJXOFDJT.js";
|
|
30
30
|
import "./chunk-PMJG2CXF.js";
|
|
31
31
|
import {
|
|
@@ -333,4 +333,4 @@ async function runHostVerb(verb, spec, context) {
|
|
|
333
333
|
export {
|
|
334
334
|
runHostVerb
|
|
335
335
|
};
|
|
336
|
-
//# sourceMappingURL=host-run-
|
|
336
|
+
//# sourceMappingURL=host-run-VI52IUKF.js.map
|