@modootoday/pmcp 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/{apply-QJ6MGLBX.js → apply-6FLMTJDV.js} +57 -23
- package/dist/{available-HYSDAFYH.js → available-BFXLII4A.js} +7 -7
- package/dist/{broadcast-LYOA6BEW.js → broadcast-ZALGUJVR.js} +4 -4
- package/dist/chunk-2GI5RM3M.js +53 -0
- package/dist/{chunk-ICF2JZSN.js → chunk-2MAD4WNZ.js} +2 -2
- package/dist/{chunk-YDICIB2A.js → chunk-33KGCJB2.js} +2 -2
- package/dist/{chunk-FQAJSNNU.js → chunk-3X5JQYKN.js} +3 -3
- package/dist/{chunk-IQD4W53M.js → chunk-57Q75MS4.js} +18 -18
- package/dist/{chunk-EKPMVEIA.js → chunk-5FW7A6TG.js} +7 -4
- package/dist/chunk-5YCKFU5Q.js +1672 -0
- package/dist/{chunk-QYH2NR6G.js → chunk-7FV2LORT.js} +2 -2
- package/dist/{chunk-66F3HLW4.js → chunk-DEY23WTH.js} +122 -4
- package/dist/chunk-DJZPPCJP.js +274 -0
- package/dist/{chunk-MZEMLFFD.js → chunk-G6JXCUSK.js} +2 -2
- package/dist/{chunk-T6GOWHK6.js → chunk-GFOQDLPL.js} +6 -1
- package/dist/{chunk-OAIQ7A3R.js → chunk-GQP4GWU4.js} +5 -5
- package/dist/chunk-H4ZOKIER.js +7 -0
- package/dist/{chunk-RBNMNKNN.js → chunk-JQVSDPFL.js} +3 -3
- package/dist/{chunk-OG7QR2DP.js → chunk-KEHB4FZP.js} +17 -2
- package/dist/chunk-KUBHGVTD.js +126 -0
- package/dist/{chunk-IZABPDAO.js → chunk-KVNNVLJR.js} +2 -2
- package/dist/chunk-LFFIQBNY.js +115 -0
- package/dist/{chunk-PQTM27GU.js → chunk-MR5IBS6L.js} +6 -7
- package/dist/{chunk-M2RYXWX2.js → chunk-NHUMPEPV.js} +2 -2
- package/dist/{chunk-ONP6JRFZ.js → chunk-OFJIMBTL.js} +2 -2
- package/dist/{chunk-J6HNP6HA.js → chunk-OFPNCLG7.js} +2 -2
- package/dist/{chunk-FD6VGFYZ.js → chunk-OS5DF3LL.js} +207 -15
- package/dist/{chunk-L4MFGGSI.js → chunk-POTI2RJ6.js} +2 -2
- package/dist/{chunk-RMHZFWHF.js → chunk-R3MVL67T.js} +33 -33
- package/dist/{chunk-YN5GQCHN.js → chunk-RHJEGLYM.js} +6 -1
- package/dist/{chunk-4VK5G3SV.js → chunk-TBKVC2TA.js} +3 -5
- package/dist/{chunk-K2C3KFGB.js → chunk-UFWQTZDX.js} +29 -17
- package/dist/{chunk-JBHGJKSL.js → chunk-VBDDFO2V.js} +2 -2
- package/dist/{chunk-QOFSPFJ6.js → chunk-VUM6LO77.js} +3417 -3395
- package/dist/{chunk-CQZYQAAV.js → chunk-YLITJLTR.js} +3 -3
- package/dist/{chunk-O2JWF7ZM.js → chunk-Z4Q6RYJH.js} +2 -2
- package/dist/{chunk-QSIADSMQ.js → chunk-Z6WRFOFT.js} +3 -3
- package/dist/{chunk-5JPD6VIH.js → chunk-ZIJ5IUXH.js} +9 -3
- package/dist/{claude-GT2BPXEL.js → claude-XVLF4N4S.js} +3 -3
- package/dist/{cli-IV5DJCXU.js → cli-6FWRBCWM.js} +8 -8
- package/dist/{cli-6HTAJ54L.js → cli-RVPR3MH3.js} +7 -7
- package/dist/cli.js +11 -11
- package/dist/{completion-PPM7MEI2.js → completion-YTPHEVEW.js} +7 -7
- package/dist/{diagnostics-EWU2ROTG.js → diagnostics-IW54MLFK.js} +5 -6
- package/dist/{doctor-ZWZQMDKZ.js → doctor-EN4JPSKV.js} +35 -35
- package/dist/{entry-NDICBQ2F.js → entry-TQWSDTJ4.js} +14 -15
- package/dist/{exec-mcp-AG4G7SG7.js → exec-mcp-KKQ75N5O.js} +15 -13
- package/dist/{harness-JABSZCAA.js → harness-EB76F6BG.js} +6 -6
- package/dist/harness-launch-gate.js +3 -4
- package/dist/harness-worker.js +5 -6
- package/dist/hook-body.js +247 -86
- package/dist/{hook-spec-C7umArqw.d.ts → hook-spec-hZL4MSgi.d.ts} +8 -3
- package/dist/hooks-YWSHUNLM.js +24 -0
- package/dist/{host-2SZRMHZX.js → host-LSVITS6M.js} +6 -7
- package/dist/{host-BWZ5LA4Q.js → host-OGGADMBT.js} +17 -15
- package/dist/{host-run-SXLV4LHI.js → host-run-XO2TS4JC.js} +5 -7
- package/dist/http.js +1 -1
- package/dist/{import-mcp-2M7SZRVQ.js → import-mcp-BJDJTPVS.js} +14 -11
- package/dist/index.d.ts +11 -2
- package/dist/index.js +24 -24
- package/dist/{init-HOOIFBAD.js → init-773PTQM5.js} +3 -3
- package/dist/{install-HF6CROQP.js → install-7V6NIA7W.js} +4 -4
- package/dist/{invoke-JP4MILYY.js → invoke-Y7XH5S2L.js} +7 -8
- package/dist/{list-UBSBUZKS.js → list-5W65XVES.js} +20 -17
- package/dist/{logout-OO3DERRK.js → logout-XO6ALD45.js} +15 -12
- package/dist/{logs-K3QXKRD4.js → logs-74JGLQG6.js} +4 -4
- package/dist/{mailbox-DAJV6VAI.js → mailbox-VK5AVTHI.js} +7 -7
- package/dist/{mainline-6K5BA3WX.js → mainline-M2NSTAGC.js} +70 -24
- package/dist/{mcp-JXNTKRJG.js → mcp-R62ZNVGJ.js} +2 -2
- package/dist/{pause-GRVTSKOK.js → pause-CZ2OZYLC.js} +4 -4
- package/dist/project/hook-adapter.d.ts +1 -1
- package/dist/{project-M672MKQH.js → project-W5DQIZA6.js} +5 -5
- package/dist/{pty-LHKJKY2E.js → pty-CDLQ4NP2.js} +3 -3
- package/dist/report-Z3JV2PCT.js +105 -0
- package/dist/{resume-6DMPGG3N.js → resume-DFIHT2RO.js} +4 -4
- package/dist/{run-5W566T3V.js → run-OZLGSRHF.js} +14 -11
- package/dist/{run-ORBIERI3.js → run-WYJMTLX7.js} +4 -4
- package/dist/{serve-73SRPAV4.js → serve-DCQGAGB7.js} +3 -3
- package/dist/{session-XM2CR425.js → session-YZVX4NGN.js} +4 -4
- package/dist/{setup-ULKDPF5B.js → setup-D3KEJBGO.js} +4 -4
- package/dist/smoke-FQQJOQBD.js +16 -0
- package/dist/{start-login-BGFAMCZL.js → start-login-EKXM75XQ.js} +15 -12
- package/dist/{status-YCW6YJ3S.js → status-23UDIYYP.js} +39 -22
- package/dist/{status-YHXEAJ7U.js → status-3RTGDN2K.js} +10 -10
- package/dist/{status-73FEFQUQ.js → status-EDSEG32U.js} +15 -12
- package/dist/stdio.js +2 -2
- package/dist/{sweep-XF2HG3EO.js → sweep-EPJMEZR6.js} +4 -4
- package/dist/{test-IMNBXOYW.js → test-TM6PIZTV.js} +30 -20
- package/dist/{tui-5GDA22TB.js → tui-EQNJIDN5.js} +4 -4
- package/dist/{unbroadcast-XP3OCVN3.js → unbroadcast-NTOC3PY3.js} +4 -4
- package/dist/{worker-RV6NGSXT.js → worker-7X6WBPEI.js} +9 -10
- package/dist/{worktree-list-4PLE7K6L.js → worktree-list-EMKUMCTQ.js} +2 -2
- package/dist/{worktree-sync-GQVYAXGJ.js → worktree-sync-T6C5YEYS.js} +3 -3
- package/docs/commands.md +13 -6
- package/docs/git-workflow.md +28 -9
- package/docs/hooks.md +138 -10
- package/docs/project-configuration.md +27 -1
- package/docs/upgrading.md +42 -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/mod/sessions/format.ts +2 -2
- package/plugins/pmcp/plugin.json +1 -1
- package/dist/chunk-7SDOSTW7.js +0 -130
- package/dist/chunk-AWZF72SH.js +0 -1025
- package/dist/chunk-FGYFA6JY.js +0 -7
- package/dist/chunk-ISNRDHSD.js +0 -74
- package/dist/chunk-QDY6BWE6.js +0 -396
- package/dist/hooks-YVQSDQV3.js +0 -21
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
isAncestor,
|
|
18
18
|
touchedPaths,
|
|
19
19
|
undelivered
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KUBHGVTD.js";
|
|
21
21
|
import {
|
|
22
22
|
reportModes,
|
|
23
23
|
restoreModes,
|
|
@@ -27,12 +27,14 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
gateTreePath,
|
|
29
29
|
leaseSpecs
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import
|
|
30
|
+
} from "./chunk-ZIJ5IUXH.js";
|
|
31
|
+
import {
|
|
32
|
+
detect
|
|
33
|
+
} from "./chunk-2Q6MNGU5.js";
|
|
32
34
|
import {
|
|
33
35
|
createFilesStore
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-MR5IBS6L.js";
|
|
37
|
+
import "./chunk-Z6WRFOFT.js";
|
|
36
38
|
import {
|
|
37
39
|
git,
|
|
38
40
|
gitOk,
|
|
@@ -46,7 +48,7 @@ import "./chunk-GJXOFDJT.js";
|
|
|
46
48
|
import "./chunk-PMJG2CXF.js";
|
|
47
49
|
|
|
48
50
|
// src/git/mainline/deliver.ts
|
|
49
|
-
import { readFileSync as readFileSync2
|
|
51
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
50
52
|
import { dirname as dirname3, join as join5 } from "path";
|
|
51
53
|
import { loadavg } from "os";
|
|
52
54
|
|
|
@@ -393,13 +395,9 @@ function push(options, tip, preHook) {
|
|
|
393
395
|
const dir = options.gate?.logDir ?? join5(dirname3(gateTree(options.tree).tree), "logs");
|
|
394
396
|
const log = gateLog(dir, tip);
|
|
395
397
|
report.info(`the pre-push hook gates ${tip.slice(0, 10)}; gate log: ${log}`);
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
process.stderr.write(output);
|
|
400
|
-
if (options.track)
|
|
401
|
-
options.track.gate = { exit: pushed.status, log, by: "pre-push" };
|
|
402
|
-
return pushed;
|
|
398
|
+
const status = runCommandLogged(["git", ...args], ctx.root, log, env);
|
|
399
|
+
if (options.track) options.track.gate = { exit: status, log, by: "pre-push" };
|
|
400
|
+
return { status, stdout: "", stderr: "" };
|
|
403
401
|
}
|
|
404
402
|
function attempts(options) {
|
|
405
403
|
const { ctx, report } = options;
|
|
@@ -429,6 +427,7 @@ function attempts(options) {
|
|
|
429
427
|
report.warn(replayed.error);
|
|
430
428
|
return 1;
|
|
431
429
|
}
|
|
430
|
+
if (options.track) options.track.replayed = replayed.tip;
|
|
432
431
|
const preHook = options.deliver.gate === "pre-push";
|
|
433
432
|
const command = preHook ? void 0 : options.gate?.command;
|
|
434
433
|
if (command !== void 0) {
|
|
@@ -450,6 +449,12 @@ function attempts(options) {
|
|
|
450
449
|
return 1;
|
|
451
450
|
}
|
|
452
451
|
}
|
|
452
|
+
if (options.noPush) {
|
|
453
|
+
report.info(
|
|
454
|
+
`replayed ${replayed.tip.slice(0, 10)}; --no-push, so nothing was pushed`
|
|
455
|
+
);
|
|
456
|
+
return 0;
|
|
457
|
+
}
|
|
453
458
|
const pushed = push(options, replayed.tip, preHook);
|
|
454
459
|
if (pushed.status === 0) {
|
|
455
460
|
if (options.track) options.track.delivered = replayed.tip;
|
|
@@ -537,7 +542,7 @@ function underLock(options) {
|
|
|
537
542
|
});
|
|
538
543
|
try {
|
|
539
544
|
if (!loadAllows(options)) return 1;
|
|
540
|
-
if (options.pushPins && !pinsPushed(options)) return 1;
|
|
545
|
+
if (options.pushPins && !options.noPush && !pinsPushed(options)) return 1;
|
|
541
546
|
return attempts(options);
|
|
542
547
|
} finally {
|
|
543
548
|
removeHolder(lock);
|
|
@@ -558,7 +563,14 @@ function blocked(options) {
|
|
|
558
563
|
);
|
|
559
564
|
}
|
|
560
565
|
function deliver(options) {
|
|
561
|
-
const track = {
|
|
566
|
+
const track = {
|
|
567
|
+
attempts: 0,
|
|
568
|
+
gate: null,
|
|
569
|
+
replayed: null,
|
|
570
|
+
delivered: null,
|
|
571
|
+
leases: [],
|
|
572
|
+
sync: null
|
|
573
|
+
};
|
|
562
574
|
let reason;
|
|
563
575
|
const report = {
|
|
564
576
|
info: (line) => options.report.info(line),
|
|
@@ -577,14 +589,22 @@ function deliver(options) {
|
|
|
577
589
|
delivered: track.delivered,
|
|
578
590
|
upstream: options.ctx.upstream,
|
|
579
591
|
attempts: track.attempts,
|
|
592
|
+
replayed: track.replayed,
|
|
580
593
|
gate: track.gate,
|
|
581
594
|
leases: track.leases,
|
|
595
|
+
sync: track.sync,
|
|
582
596
|
...code !== 0 && reason ? { reason } : {}
|
|
583
597
|
});
|
|
584
598
|
return code;
|
|
585
599
|
}
|
|
586
600
|
function deliverOnce(options) {
|
|
587
601
|
const { ctx, report } = options;
|
|
602
|
+
if (options.noPush && options.deliver.gate === "pre-push") {
|
|
603
|
+
report.warn(
|
|
604
|
+
'--no-push cannot gate with gate = "pre-push": the push is the gate; nothing ran'
|
|
605
|
+
);
|
|
606
|
+
return 2;
|
|
607
|
+
}
|
|
588
608
|
const refusal2 = blocked(options);
|
|
589
609
|
if (refusal2 !== null) {
|
|
590
610
|
report.warn(refusal2);
|
|
@@ -596,7 +616,7 @@ function deliverOnce(options) {
|
|
|
596
616
|
}
|
|
597
617
|
const commits = undelivered(ctx.root, ctx.upstream, options.named);
|
|
598
618
|
const touched = touchedPaths(ctx.root, commits);
|
|
599
|
-
const leased = options.leases.filter(
|
|
619
|
+
const leased = options.noPush ? [] : options.leases.filter(
|
|
600
620
|
(spec) => spec.paths.some((path) => touched.has(path))
|
|
601
621
|
);
|
|
602
622
|
const last = commits.at(-1) ?? "HEAD";
|
|
@@ -618,8 +638,9 @@ function deliverOnce(options) {
|
|
|
618
638
|
report.info(`took lease ${spec.name}`);
|
|
619
639
|
}
|
|
620
640
|
const code = underLock(options);
|
|
621
|
-
if (code !== 0) return code;
|
|
622
|
-
options.afterDeliver?.();
|
|
641
|
+
if (code !== 0 || options.noPush) return code;
|
|
642
|
+
const synced = options.afterDeliver?.() ?? null;
|
|
643
|
+
if (options.track) options.track.sync = synced;
|
|
623
644
|
if (taken.length > 0)
|
|
624
645
|
options.recordDelivery?.({
|
|
625
646
|
leases: taken,
|
|
@@ -824,6 +845,20 @@ function install(options) {
|
|
|
824
845
|
function syncMainline(options) {
|
|
825
846
|
return withUmask(options.umask, () => syncOnce(options));
|
|
826
847
|
}
|
|
848
|
+
function syncMainlineResult(options) {
|
|
849
|
+
let reason;
|
|
850
|
+
const report = {
|
|
851
|
+
info: (line) => options.report.info(line),
|
|
852
|
+
warn: (line) => {
|
|
853
|
+
reason = line;
|
|
854
|
+
options.report.warn(line);
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
const head = () => gitText(options.ctx.root, ["rev-parse", "HEAD"]);
|
|
858
|
+
const from = head();
|
|
859
|
+
const code = syncMainline({ ...options, report });
|
|
860
|
+
return { from, to: head(), code, ...reason ? { reason } : {} };
|
|
861
|
+
}
|
|
827
862
|
function syncOnce(options) {
|
|
828
863
|
const { ctx, sync, report } = options;
|
|
829
864
|
const blocked2 = refusal(ctx);
|
|
@@ -898,22 +933,32 @@ var mainlineDeliver = (setup, context, report) => {
|
|
|
898
933
|
const { config, ctx, stateDir } = setup;
|
|
899
934
|
const settings = config.deliver ?? off("git.mainline.deliver");
|
|
900
935
|
const sync = config.sync;
|
|
936
|
+
const mainCheckout = () => {
|
|
937
|
+
const when = sync?.afterDeliver ?? "from_main";
|
|
938
|
+
if (sync === void 0 || when === "off") return null;
|
|
939
|
+
if (!ctx.linked) return ctx;
|
|
940
|
+
if (when !== "always") return null;
|
|
941
|
+
return detect(ctx.mainRoot, { remote: ctx.remote, mainline: ctx.mainline });
|
|
942
|
+
};
|
|
901
943
|
const afterDeliver = () => {
|
|
902
|
-
|
|
944
|
+
const main = mainCheckout();
|
|
945
|
+
if (sync === void 0 || main === null) return null;
|
|
903
946
|
const followSubmodules = config.submodules?.follow === "clean_pins";
|
|
904
947
|
const sharedSubmodules = config.submodules?.shared ?? [];
|
|
905
|
-
|
|
906
|
-
ctx,
|
|
948
|
+
const synced = syncMainlineResult({
|
|
949
|
+
ctx: main,
|
|
907
950
|
sync,
|
|
908
951
|
followSubmodules,
|
|
909
952
|
sharedSubmodules,
|
|
910
953
|
stateDir,
|
|
911
954
|
report,
|
|
912
955
|
...config.umask !== void 0 ? { umask: config.umask } : {}
|
|
913
|
-
})
|
|
956
|
+
});
|
|
957
|
+
if (synced.code !== 0)
|
|
914
958
|
report.warn(
|
|
915
|
-
"delivered; only the main checkout did not catch up, run pmcp git sync after the refusal above is cleared"
|
|
959
|
+
"delivered; only the main checkout did not catch up, run pmcp git sync there after the refusal above is cleared"
|
|
916
960
|
);
|
|
961
|
+
return synced;
|
|
917
962
|
};
|
|
918
963
|
return deliver({
|
|
919
964
|
ctx,
|
|
@@ -925,6 +970,7 @@ var mainlineDeliver = (setup, context, report) => {
|
|
|
925
970
|
leases: leaseSpecs(config),
|
|
926
971
|
store: filesSessionGate(setup.stateDir, setup.leaseFiles),
|
|
927
972
|
duringPause: context.args.flags.has("during-pause"),
|
|
973
|
+
noPush: context.args.flags.has("no-push"),
|
|
928
974
|
afterDeliver,
|
|
929
975
|
recordDelivery: deliveryEvents(setup),
|
|
930
976
|
pushPins: config.submodules?.push === "pins",
|
|
@@ -940,4 +986,4 @@ export {
|
|
|
940
986
|
mainlineDeliver,
|
|
941
987
|
mainlineSync
|
|
942
988
|
};
|
|
943
|
-
//# sourceMappingURL=mainline-
|
|
989
|
+
//# sourceMappingURL=mainline-M2NSTAGC.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-WYJMTLX7.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-R62ZNVGJ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7FV2LORT.js";
|
|
4
|
+
import "./chunk-MR5IBS6L.js";
|
|
5
|
+
import "./chunk-Z6WRFOFT.js";
|
|
6
6
|
import "./chunk-A4PKLESO.js";
|
|
7
7
|
import "./chunk-OEH47H6A.js";
|
|
8
8
|
import "./chunk-IJBSOWHK.js";
|
|
@@ -14,4 +14,4 @@ var run = (context) => change(context, "pause");
|
|
|
14
14
|
export {
|
|
15
15
|
run
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=pause-
|
|
17
|
+
//# sourceMappingURL=pause-CZ2OZYLC.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-NRBQK6UX.js";
|
|
4
4
|
import {
|
|
5
5
|
projectSpec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RHJEGLYM.js";
|
|
7
7
|
import "./chunk-JEL35P7S.js";
|
|
8
8
|
import "./chunk-XNML2KIC.js";
|
|
9
9
|
import {
|
|
@@ -19,7 +19,7 @@ async function route(context, verb, name) {
|
|
|
19
19
|
if (name === void 0 || context.args.flags.has("check") || context.args.flags.has("write") || many(context.args, "source").length > 0 || many(context.args, "name").length > 0) {
|
|
20
20
|
throw new ArgumentError("exec-mcp takes only a declared MCP alias");
|
|
21
21
|
}
|
|
22
|
-
const { runExecMcp } = await import("./exec-mcp-
|
|
22
|
+
const { runExecMcp } = await import("./exec-mcp-KKQ75N5O.js");
|
|
23
23
|
return await runExecMcp(context, name);
|
|
24
24
|
}
|
|
25
25
|
if (verb === "import-mcp") {
|
|
@@ -28,13 +28,13 @@ async function route(context, verb, name) {
|
|
|
28
28
|
"import-mcp takes --source, --name and --write; no positional name or --check"
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
const { importMcp } = await import("./import-mcp-
|
|
31
|
+
const { importMcp } = await import("./import-mcp-BJDJTPVS.js");
|
|
32
32
|
return importMcp(context);
|
|
33
33
|
}
|
|
34
34
|
if (many(context.args, "source").length > 0 || one(context.args, "name") !== void 0 || context.args.flags.has("write")) {
|
|
35
35
|
throw new ArgumentError("--source, --name and --write require import-mcp");
|
|
36
36
|
}
|
|
37
|
-
const apply = await import("./apply-
|
|
37
|
+
const apply = await import("./apply-6FLMTJDV.js");
|
|
38
38
|
if (verb === void 0) return apply.projectOrCheck(context);
|
|
39
39
|
if (context.args.flags.has("check")) {
|
|
40
40
|
throw new ArgumentError("--check takes no subcommand");
|
|
@@ -67,4 +67,4 @@ var projectCommand = {
|
|
|
67
67
|
export {
|
|
68
68
|
projectCommand
|
|
69
69
|
};
|
|
70
|
-
//# sourceMappingURL=project-
|
|
70
|
+
//# sourceMappingURL=project-W5DQIZA6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ptyRef
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-OFJIMBTL.js";
|
|
4
|
+
import "./chunk-Z6WRFOFT.js";
|
|
5
5
|
|
|
6
6
|
// src/sessions/wake/pty.ts
|
|
7
7
|
import { createConnection } from "net";
|
|
@@ -91,4 +91,4 @@ async function ptyTurn(record, text, _context) {
|
|
|
91
91
|
export {
|
|
92
92
|
ptyTurn
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=pty-
|
|
94
|
+
//# sourceMappingURL=pty-CDLQ4NP2.js.map
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import {
|
|
2
|
+
logLocation,
|
|
3
|
+
parseSince,
|
|
4
|
+
readLogs
|
|
5
|
+
} from "./chunk-57Q75MS4.js";
|
|
6
|
+
import {
|
|
7
|
+
configFrom
|
|
8
|
+
} from "./chunk-RPCIROW7.js";
|
|
9
|
+
import {
|
|
10
|
+
guardLines,
|
|
11
|
+
readReportTable,
|
|
12
|
+
report,
|
|
13
|
+
wouldRefuse
|
|
14
|
+
} from "./chunk-LFFIQBNY.js";
|
|
15
|
+
import "./chunk-HQOB7OQS.js";
|
|
16
|
+
import "./chunk-MR5IBS6L.js";
|
|
17
|
+
import "./chunk-Z6WRFOFT.js";
|
|
18
|
+
import {
|
|
19
|
+
ArgumentError,
|
|
20
|
+
one
|
|
21
|
+
} from "./chunk-A4PKLESO.js";
|
|
22
|
+
import "./chunk-OEH47H6A.js";
|
|
23
|
+
import "./chunk-IJBSOWHK.js";
|
|
24
|
+
import "./chunk-GJXOFDJT.js";
|
|
25
|
+
import "./chunk-PMJG2CXF.js";
|
|
26
|
+
|
|
27
|
+
// src/commands/hooks/report.ts
|
|
28
|
+
async function run(context) {
|
|
29
|
+
const config = configFrom(context);
|
|
30
|
+
if (!config)
|
|
31
|
+
throw new ArgumentError("no pmcp.toml here or above; pass --config");
|
|
32
|
+
const hooks = config.raw.hooks ?? {};
|
|
33
|
+
let settings;
|
|
34
|
+
let since;
|
|
35
|
+
try {
|
|
36
|
+
settings = readReportTable(hooks["report"]);
|
|
37
|
+
const value = one(context.args, "since");
|
|
38
|
+
if (value !== void 0) since = parseSince(value);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
throw new ArgumentError(
|
|
41
|
+
error instanceof Error ? error.message : String(error)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
const location = logLocation(config, context.env);
|
|
45
|
+
const logged = readLogs(
|
|
46
|
+
location.dir,
|
|
47
|
+
{ component: "hooks.entry", ...since ? { since } : {} },
|
|
48
|
+
location.file
|
|
49
|
+
);
|
|
50
|
+
const { kept, excluded } = guardLines(logged, settings);
|
|
51
|
+
const guard = one(context.args, "switch-check");
|
|
52
|
+
const json = context.args.flags.has("json");
|
|
53
|
+
if (guard !== void 0) {
|
|
54
|
+
const found = wouldRefuse(kept, guard);
|
|
55
|
+
if (json)
|
|
56
|
+
context.ui.data(
|
|
57
|
+
JSON.stringify({ version: 1, guard, refused: found }) + "\n"
|
|
58
|
+
);
|
|
59
|
+
else {
|
|
60
|
+
for (const line of found)
|
|
61
|
+
context.ui.line(
|
|
62
|
+
[
|
|
63
|
+
line.ts,
|
|
64
|
+
line.runtime,
|
|
65
|
+
line.session.slice(0, 8),
|
|
66
|
+
`${line.mode}: ${line.raw} -> ${line.verdict}`,
|
|
67
|
+
line.tool ?? ""
|
|
68
|
+
].filter(Boolean).join(" ")
|
|
69
|
+
);
|
|
70
|
+
context.ui.line(
|
|
71
|
+
`${guard} would have refused ${found.length} call(s) it let through`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
return 0;
|
|
75
|
+
}
|
|
76
|
+
const summary = report(kept, excluded);
|
|
77
|
+
if (json) {
|
|
78
|
+
context.ui.data(
|
|
79
|
+
JSON.stringify({
|
|
80
|
+
version: 1,
|
|
81
|
+
...since ? { since: since.toISOString() } : {},
|
|
82
|
+
...summary
|
|
83
|
+
}) + "\n"
|
|
84
|
+
);
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
87
|
+
if (summary.lines === 0)
|
|
88
|
+
context.ui.line(
|
|
89
|
+
"no guard log lines; guards log at debug level ([logging] level or PMCP_LOG=debug)"
|
|
90
|
+
);
|
|
91
|
+
for (const row of summary.guards) {
|
|
92
|
+
const counts = (values) => Object.entries(values).sort(([a], [b]) => a.localeCompare(b)).map(([name, value]) => `${name} ${value}`).join(", ");
|
|
93
|
+
context.ui.line(
|
|
94
|
+
`${row.policy} ${row.runtime} [${row.modes.join(",")}]: ${row.calls} call(s), ${row.sessions} session(s); found ${counts(row.raw)}; gave ${counts(row.verdict)}; p50 ${row.durationMs.p50}ms p95 ${row.durationMs.p95}ms max ${row.durationMs.max}ms`
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
context.ui.line(
|
|
98
|
+
`${summary.lines} guard run(s) in ${summary.sessions} session(s)${summary.excluded ? `; ${summary.excluded} excluded by [hooks.report] exclude_sessions` : ""}`
|
|
99
|
+
);
|
|
100
|
+
return 0;
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
run
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=report-Z3JV2PCT.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-7FV2LORT.js";
|
|
4
|
+
import "./chunk-MR5IBS6L.js";
|
|
5
|
+
import "./chunk-Z6WRFOFT.js";
|
|
6
6
|
import "./chunk-A4PKLESO.js";
|
|
7
7
|
import "./chunk-OEH47H6A.js";
|
|
8
8
|
import "./chunk-IJBSOWHK.js";
|
|
@@ -14,4 +14,4 @@ var run = (context) => change(context, "resume");
|
|
|
14
14
|
export {
|
|
15
15
|
run
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=resume-
|
|
17
|
+
//# sourceMappingURL=resume-DFIHT2RO.js.map
|
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readSpec
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-ICF2JZSN.js";
|
|
3
|
+
} from "./chunk-VUM6LO77.js";
|
|
4
|
+
import "./chunk-2MAD4WNZ.js";
|
|
6
5
|
import "./chunk-UD3BEEBQ.js";
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-KUBHGVTD.js";
|
|
8
7
|
import "./chunk-EATCUWGG.js";
|
|
8
|
+
import "./chunk-OFJIMBTL.js";
|
|
9
9
|
import "./chunk-NRBQK6UX.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-LFFIQBNY.js";
|
|
11
|
+
import "./chunk-HQOB7OQS.js";
|
|
12
|
+
import "./chunk-73AKO4UL.js";
|
|
11
13
|
import "./chunk-P6LNYYYH.js";
|
|
12
14
|
import {
|
|
13
15
|
readGitConfig
|
|
14
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZIJ5IUXH.js";
|
|
15
17
|
import {
|
|
16
18
|
detect
|
|
17
19
|
} from "./chunk-2Q6MNGU5.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-MR5IBS6L.js";
|
|
21
|
+
import "./chunk-Z6WRFOFT.js";
|
|
20
22
|
import "./chunk-G7JONWL4.js";
|
|
21
23
|
import "./chunk-Q5H3L6Y4.js";
|
|
24
|
+
import "./chunk-5YCKFU5Q.js";
|
|
22
25
|
import {
|
|
23
26
|
ArgumentError,
|
|
24
27
|
one
|
|
25
28
|
} from "./chunk-A4PKLESO.js";
|
|
26
29
|
import "./chunk-V4NPDK6X.js";
|
|
27
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-DEY23WTH.js";
|
|
28
31
|
import "./chunk-OEH47H6A.js";
|
|
29
32
|
import "./chunk-IJBSOWHK.js";
|
|
30
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-H4ZOKIER.js";
|
|
31
34
|
import {
|
|
32
35
|
readConfig
|
|
33
36
|
} from "./chunk-GJXOFDJT.js";
|
|
@@ -124,4 +127,4 @@ function run(context) {
|
|
|
124
127
|
export {
|
|
125
128
|
run
|
|
126
129
|
};
|
|
127
|
-
//# sourceMappingURL=run-
|
|
130
|
+
//# sourceMappingURL=run-OZLGSRHF.js.map
|
|
@@ -9,11 +9,11 @@ async function executeMcpCommand(context) {
|
|
|
9
9
|
throw new ArgumentError("Use pmcp mcp <login|logout|status> <name>");
|
|
10
10
|
if (context.args.flags.has("json") && verb !== "status")
|
|
11
11
|
throw new ArgumentError("--json requires mcp status");
|
|
12
|
-
if (verb === "status") return (await import("./status-
|
|
13
|
-
if (verb === "logout") return (await import("./logout-
|
|
14
|
-
return (await import("./start-login-
|
|
12
|
+
if (verb === "status") return (await import("./status-EDSEG32U.js")).run(context);
|
|
13
|
+
if (verb === "logout") return (await import("./logout-XO6ALD45.js")).run(context);
|
|
14
|
+
return (await import("./start-login-EKXM75XQ.js")).run(context);
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
17
|
executeMcpCommand
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=run-
|
|
19
|
+
//# sourceMappingURL=run-WYJMTLX7.js.map
|
|
@@ -19,7 +19,7 @@ import "./chunk-73AKO4UL.js";
|
|
|
19
19
|
import {
|
|
20
20
|
serve,
|
|
21
21
|
serveWithMailbox
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-G6JXCUSK.js";
|
|
23
23
|
import {
|
|
24
24
|
serveSpec
|
|
25
25
|
} from "./chunk-LLT5FQBE.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
one
|
|
31
31
|
} from "./chunk-A4PKLESO.js";
|
|
32
32
|
import "./chunk-ISZOLR3D.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-Z4Q6RYJH.js";
|
|
34
34
|
import "./chunk-6WXMJOMI.js";
|
|
35
35
|
import "./chunk-4CRRLDDS.js";
|
|
36
36
|
import "./chunk-YSAWTGNA.js";
|
|
@@ -101,4 +101,4 @@ var serveCommand = {
|
|
|
101
101
|
export {
|
|
102
102
|
serveCommand
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=serve-
|
|
104
|
+
//# sourceMappingURL=serve-DCQGAGB7.js.map
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
invocation
|
|
3
|
-
} from "./chunk-J7UYNJCR.js";
|
|
4
1
|
import {
|
|
5
2
|
clearSession,
|
|
6
3
|
discover,
|
|
@@ -10,6 +7,9 @@ import {
|
|
|
10
7
|
startDevice,
|
|
11
8
|
writeSession
|
|
12
9
|
} from "./chunk-RMATE45Z.js";
|
|
10
|
+
import {
|
|
11
|
+
invocation
|
|
12
|
+
} from "./chunk-J7UYNJCR.js";
|
|
13
13
|
import {
|
|
14
14
|
loginSpec,
|
|
15
15
|
logoutSpec,
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
logoutCommand,
|
|
157
157
|
whoamiCommand
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=session-
|
|
159
|
+
//# sourceMappingURL=session-YZVX4NGN.js.map
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
gateTreePath,
|
|
3
3
|
leaseSpecs,
|
|
4
4
|
loadGit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZIJ5IUXH.js";
|
|
6
6
|
import "./chunk-2Q6MNGU5.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-MR5IBS6L.js";
|
|
8
|
+
import "./chunk-Z6WRFOFT.js";
|
|
9
9
|
import "./chunk-G7JONWL4.js";
|
|
10
10
|
import "./chunk-OEH47H6A.js";
|
|
11
11
|
import "./chunk-IJBSOWHK.js";
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
leaseSpecs,
|
|
17
17
|
loadGit
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=setup-
|
|
19
|
+
//# sourceMappingURL=setup-D3KEJBGO.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
printSmoke,
|
|
3
|
+
run,
|
|
4
|
+
runSmoke
|
|
5
|
+
} from "./chunk-2GI5RM3M.js";
|
|
6
|
+
import "./chunk-RPCIROW7.js";
|
|
7
|
+
import "./chunk-5YCKFU5Q.js";
|
|
8
|
+
import "./chunk-A4PKLESO.js";
|
|
9
|
+
import "./chunk-GJXOFDJT.js";
|
|
10
|
+
import "./chunk-PMJG2CXF.js";
|
|
11
|
+
export {
|
|
12
|
+
printSmoke,
|
|
13
|
+
run,
|
|
14
|
+
runSmoke
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=smoke-FQQJOQBD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
serverFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OFPNCLG7.js";
|
|
4
4
|
import {
|
|
5
5
|
storeBearer,
|
|
6
6
|
tokenRequest,
|
|
@@ -14,33 +14,36 @@ import {
|
|
|
14
14
|
writeCredentials
|
|
15
15
|
} from "./chunk-UPQTAHUK.js";
|
|
16
16
|
import "./chunk-RPCIROW7.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-ICF2JZSN.js";
|
|
17
|
+
import "./chunk-VUM6LO77.js";
|
|
18
|
+
import "./chunk-2MAD4WNZ.js";
|
|
20
19
|
import "./chunk-UD3BEEBQ.js";
|
|
21
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KUBHGVTD.js";
|
|
22
21
|
import "./chunk-EATCUWGG.js";
|
|
22
|
+
import "./chunk-OFJIMBTL.js";
|
|
23
23
|
import "./chunk-NRBQK6UX.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LFFIQBNY.js";
|
|
25
|
+
import "./chunk-HQOB7OQS.js";
|
|
26
|
+
import "./chunk-73AKO4UL.js";
|
|
25
27
|
import "./chunk-P6LNYYYH.js";
|
|
26
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-ZIJ5IUXH.js";
|
|
27
29
|
import "./chunk-2Q6MNGU5.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-MR5IBS6L.js";
|
|
31
|
+
import "./chunk-Z6WRFOFT.js";
|
|
30
32
|
import "./chunk-G7JONWL4.js";
|
|
31
33
|
import {
|
|
32
34
|
McpAuthError,
|
|
33
35
|
safeEndpoint
|
|
34
36
|
} from "./chunk-Q5H3L6Y4.js";
|
|
37
|
+
import "./chunk-5YCKFU5Q.js";
|
|
35
38
|
import {
|
|
36
39
|
ArgumentError,
|
|
37
40
|
one
|
|
38
41
|
} from "./chunk-A4PKLESO.js";
|
|
39
42
|
import "./chunk-V4NPDK6X.js";
|
|
40
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-DEY23WTH.js";
|
|
41
44
|
import "./chunk-OEH47H6A.js";
|
|
42
45
|
import "./chunk-IJBSOWHK.js";
|
|
43
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-H4ZOKIER.js";
|
|
44
47
|
import "./chunk-GJXOFDJT.js";
|
|
45
48
|
import "./chunk-PMJG2CXF.js";
|
|
46
49
|
import "./chunk-J6KL3COD.js";
|
|
@@ -414,4 +417,4 @@ async function run(context) {
|
|
|
414
417
|
export {
|
|
415
418
|
run
|
|
416
419
|
};
|
|
417
|
-
//# sourceMappingURL=start-login-
|
|
420
|
+
//# sourceMappingURL=start-login-EKXM75XQ.js.map
|