@modootoday/pmcp 0.22.1 → 0.22.3
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-VMOFDOCN.js → apply-CYVC5LDG.js} +15 -14
- package/dist/{broadcast-ZALGUJVR.js → broadcast-DZGMSZRG.js} +3 -3
- package/dist/{chunk-57Q75MS4.js → chunk-5QKXEWDB.js} +2 -2
- package/dist/{chunk-5YCKFU5Q.js → chunk-7DYWCQVB.js} +1 -1
- package/dist/{chunk-MR5IBS6L.js → chunk-7I7O7ZNT.js} +41 -10
- package/dist/{chunk-ALX7BECI.js → chunk-7LUYI7QM.js} +2 -2
- package/dist/{chunk-M5LC5TKQ.js → chunk-7Q3AIS4Q.js} +2 -2
- package/dist/{chunk-7FV2LORT.js → chunk-B2WRYGHJ.js} +4 -3
- package/dist/{chunk-P2LJADGI.js → chunk-CALWIRAI.js} +14 -14
- package/dist/{chunk-2GI5RM3M.js → chunk-CILQCERV.js} +2 -2
- package/dist/{chunk-XYEI7KRO.js → chunk-ESCOMAPX.js} +3 -3
- package/dist/{chunk-GBKRDRMZ.js → chunk-FE7WOHZM.js} +17 -5
- package/dist/{chunk-D5BLJIAA.js → chunk-HV52EUSL.js} +9 -9
- package/dist/{chunk-GRRURNVA.js → chunk-ICZH4NFR.js} +5 -5
- package/dist/chunk-JTRFZQTB.js +7 -0
- package/dist/{chunk-3W2GELNR.js → chunk-JUG4W7RF.js} +2 -2
- package/dist/{chunk-6HCEEC6V.js → chunk-MLGXDSHZ.js} +17 -15
- package/dist/{chunk-TMXWSGXH.js → chunk-MQMWVJZB.js} +3 -3
- package/dist/{chunk-3TS3CX3R.js → chunk-MZF7VOQA.js} +2 -2
- package/dist/{chunk-SB6X342E.js → chunk-NQFULJZC.js} +3 -3
- package/dist/{chunk-V6LLHO4S.js → chunk-ONYZIC2F.js} +7 -7
- package/dist/{chunk-DPVLHB3K.js → chunk-PR2RBEXI.js} +2 -2
- package/dist/{chunk-XWAE3VEQ.js → chunk-RZZZHQCE.js} +2 -2
- package/dist/{chunk-UVGW56SY.js → chunk-ULFV3EIZ.js} +27 -7
- package/dist/{chunk-FHK5BE2D.js → chunk-UQNRGU3V.js} +2 -2
- package/dist/{chunk-NYA4GX44.js → chunk-V7LZTVWS.js} +2 -2
- package/dist/{chunk-OKMWYNZF.js → chunk-WPX4ONFT.js} +24 -7
- package/dist/chunk-XWLMZKH2.js +12 -0
- package/dist/{cli-6FWRBCWM.js → cli-34EDFXJA.js} +8 -8
- package/dist/{cli-BEEDAD4E.js → cli-A6HKRICM.js} +4 -4
- package/dist/cli.js +3 -3
- package/dist/{completion-XA7SR2OU.js → completion-FDLVWLAC.js} +2 -2
- package/dist/{diagnostics-AYSD3454.js → diagnostics-DYLW7WYV.js} +7 -5
- package/dist/{doctor-PDLZL4BR.js → doctor-FRQ5H5FU.js} +21 -14
- package/dist/{entry-5CKOI3QK.js → entry-XPZZNQ4L.js} +11 -9
- package/dist/{exec-mcp-EJZVPVU5.js → exec-mcp-HOM2ZANM.js} +12 -11
- package/dist/{harness-VMQJY3KY.js → harness-WIGJRE5P.js} +3 -3
- package/dist/harness-launch-gate.js +5 -3
- package/dist/harness-worker.js +7 -5
- package/dist/hook-body.js +189 -76
- package/dist/{hook-spec-hZL4MSgi.d.ts → hook-spec-Bd24eo2L.d.ts} +1 -0
- package/dist/{hooks-SKD67KMA.js → hooks-MIF3FONJ.js} +4 -4
- package/dist/{host-GY2LFEZX.js → host-CE5TW5SC.js} +12 -11
- package/dist/{host-4BA3LM7Z.js → host-JKZLOCZS.js} +8 -6
- package/dist/{host-run-X3VDTIQ2.js → host-run-MJGJ7NVE.js} +6 -4
- package/dist/http.js +1 -1
- package/dist/{import-mcp-G2VTD5KR.js → import-mcp-T3GZYEE5.js} +11 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -15
- package/dist/{init-JEK3QUAK.js → init-D5VPDF2B.js} +2 -2
- package/dist/{invoke-7BUFBFJU.js → invoke-HEAOQLFQ.js} +9 -7
- package/dist/{list-D3Y3TIC6.js → list-PCLCFG2J.js} +11 -10
- package/dist/{logout-T4JLFE2D.js → logout-3ZXFXKHB.js} +10 -9
- package/dist/{logs-74JGLQG6.js → logs-UHJM7ZCL.js} +3 -3
- package/dist/{mailbox-VK5AVTHI.js → mailbox-NIMBOQPA.js} +3 -3
- package/dist/{mainline-Q42M2GJ2.js → mainline-6CTSVOWP.js} +63 -29
- package/dist/{mcp-GPIHVL65.js → mcp-T6PYHRUL.js} +2 -2
- package/dist/{pause-CZ2OZYLC.js → pause-CBZ3BTJL.js} +3 -3
- package/dist/project/hook-adapter.d.ts +1 -1
- package/dist/{project-6QRKXOMM.js → project-H4R3Q3QO.js} +7 -7
- package/dist/{report-Z3JV2PCT.js → report-ZHOHQ4PZ.js} +3 -3
- package/dist/{resume-DFIHT2RO.js → resume-UJEWQ66P.js} +3 -3
- package/dist/{run-YHOLKUYB.js → run-FMTHUOAZ.js} +4 -4
- package/dist/{run-MVP22ENA.js → run-V74M7PZK.js} +9 -8
- package/dist/{serve-EAESQK2I.js → serve-JKNEC4AX.js} +3 -3
- package/dist/{setup-3GET6K3J.js → setup-HYEYYVDU.js} +3 -3
- package/dist/{smoke-FQQJOQBD.js → smoke-UA7VVDKD.js} +4 -3
- package/dist/{start-login-K3TAZ3IH.js → start-login-JRMVLK5J.js} +10 -9
- package/dist/{status-25DRPV7U.js → status-6273XFHT.js} +10 -9
- package/dist/{status-3RTGDN2K.js → status-KN2ZE64O.js} +3 -3
- package/dist/{status-DPPNTGHB.js → status-RG2GFDQU.js} +12 -11
- package/dist/stdio.js +2 -2
- package/dist/{sweep-EPJMEZR6.js → sweep-EPZCW63Q.js} +3 -3
- package/dist/{test-I2V5AMQF.js → test-M365FK5N.js} +23 -15
- package/dist/{tui-VCEN2L5I.js → tui-PKPYE76A.js} +4 -4
- package/dist/{unbroadcast-NTOC3PY3.js → unbroadcast-N6LXHAMT.js} +3 -3
- package/dist/{worker-NPQFYEBU.js → worker-C23EAPCY.js} +9 -7
- package/docs/commands.md +1 -1
- package/docs/git-workflow.md +21 -12
- package/docs/hooks.md +7 -1
- package/docs/project-configuration.md +1 -0
- package/docs/upgrading.md +13 -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/commands.ts +10 -4
- package/plugins/pmcp/mod/host.ts +17 -1
- package/plugins/pmcp/mod/reader/read.ts +3 -1
- package/plugins/pmcp/mod/reader/types.ts +2 -0
- package/plugins/pmcp/mod/register.tsx +2 -1
- package/plugins/pmcp/mod/snapshot.ts +1 -0
- package/plugins/pmcp/mod/state.ts +1 -0
- package/plugins/pmcp/plugin.json +1 -1
- package/dist/chunk-ACHBHIGD.js +0 -7
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
logLocation,
|
|
6
6
|
readLogs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5QKXEWDB.js";
|
|
8
8
|
import {
|
|
9
9
|
policyRows
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MQMWVJZB.js";
|
|
11
11
|
import "./chunk-7TD53M7L.js";
|
|
12
12
|
import {
|
|
13
13
|
configFrom
|
|
14
14
|
} from "./chunk-RPCIROW7.js";
|
|
15
15
|
import {
|
|
16
16
|
checkProject
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ONYZIC2F.js";
|
|
18
18
|
import {
|
|
19
19
|
checkBudget,
|
|
20
20
|
readSpec
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-MLGXDSHZ.js";
|
|
22
22
|
import "./chunk-UKR64U7J.js";
|
|
23
23
|
import "./chunk-XZ2TDH3J.js";
|
|
24
24
|
import {
|
|
@@ -26,14 +26,13 @@ import {
|
|
|
26
26
|
} from "./chunk-KUBHGVTD.js";
|
|
27
27
|
import "./chunk-EATCUWGG.js";
|
|
28
28
|
import "./chunk-OFJIMBTL.js";
|
|
29
|
-
import "./chunk-NRBQK6UX.js";
|
|
30
29
|
import "./chunk-LFFIQBNY.js";
|
|
31
30
|
import "./chunk-HQOB7OQS.js";
|
|
32
31
|
import "./chunk-73AKO4UL.js";
|
|
33
32
|
import "./chunk-P6LNYYYH.js";
|
|
34
33
|
import {
|
|
35
34
|
readGitConfig
|
|
36
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-FE7WOHZM.js";
|
|
37
36
|
import {
|
|
38
37
|
defaultMainline,
|
|
39
38
|
defaultRemote
|
|
@@ -41,11 +40,11 @@ import {
|
|
|
41
40
|
import {
|
|
42
41
|
openStore,
|
|
43
42
|
readStoreSettings
|
|
44
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-7I7O7ZNT.js";
|
|
45
44
|
import "./chunk-Z6WRFOFT.js";
|
|
46
45
|
import "./chunk-G7JONWL4.js";
|
|
47
46
|
import "./chunk-Q5H3L6Y4.js";
|
|
48
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-7DYWCQVB.js";
|
|
49
48
|
import {
|
|
50
49
|
statusSpec
|
|
51
50
|
} from "./chunk-KEHB4FZP.js";
|
|
@@ -54,13 +53,15 @@ import {
|
|
|
54
53
|
ArgumentError
|
|
55
54
|
} from "./chunk-A4PKLESO.js";
|
|
56
55
|
import "./chunk-V4NPDK6X.js";
|
|
57
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-ULFV3EIZ.js";
|
|
57
|
+
import "./chunk-NRBQK6UX.js";
|
|
58
58
|
import "./chunk-OEH47H6A.js";
|
|
59
59
|
import {
|
|
60
60
|
checkoutOf,
|
|
61
61
|
worktreesOf
|
|
62
62
|
} from "./chunk-IJBSOWHK.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-XWLMZKH2.js";
|
|
64
|
+
import "./chunk-JTRFZQTB.js";
|
|
64
65
|
import "./chunk-GJXOFDJT.js";
|
|
65
66
|
import "./chunk-PMJG2CXF.js";
|
|
66
67
|
import "./chunk-J6KL3COD.js";
|
|
@@ -295,4 +296,4 @@ var statusCommand = {
|
|
|
295
296
|
export {
|
|
296
297
|
statusCommand
|
|
297
298
|
};
|
|
298
|
-
//# sourceMappingURL=status-
|
|
299
|
+
//# sourceMappingURL=status-RG2GFDQU.js.map
|
package/dist/stdio.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
resolveRoots,
|
|
5
5
|
serve,
|
|
6
6
|
serveWithMailbox
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-V7LZTVWS.js";
|
|
8
|
+
import "./chunk-JUG4W7RF.js";
|
|
9
9
|
import "./chunk-6WXMJOMI.js";
|
|
10
10
|
import "./chunk-4CRRLDDS.js";
|
|
11
11
|
import "./chunk-YSAWTGNA.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-B2WRYGHJ.js";
|
|
4
|
+
import "./chunk-7I7O7ZNT.js";
|
|
5
5
|
import "./chunk-Z6WRFOFT.js";
|
|
6
6
|
import "./chunk-A4PKLESO.js";
|
|
7
7
|
import "./chunk-OEH47H6A.js";
|
|
@@ -14,4 +14,4 @@ var run = (context) => change(context, "sweep");
|
|
|
14
14
|
export {
|
|
15
15
|
run
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=sweep-
|
|
17
|
+
//# sourceMappingURL=sweep-EPZCW63Q.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
specFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PR2RBEXI.js";
|
|
4
4
|
import {
|
|
5
5
|
sourceFor
|
|
6
6
|
} from "./chunk-7TD53M7L.js";
|
|
@@ -11,13 +11,12 @@ import {
|
|
|
11
11
|
commandsOf,
|
|
12
12
|
customMode,
|
|
13
13
|
customPolicy
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MLGXDSHZ.js";
|
|
15
15
|
import "./chunk-UKR64U7J.js";
|
|
16
16
|
import "./chunk-XZ2TDH3J.js";
|
|
17
17
|
import "./chunk-KUBHGVTD.js";
|
|
18
18
|
import "./chunk-EATCUWGG.js";
|
|
19
19
|
import "./chunk-OFJIMBTL.js";
|
|
20
|
-
import "./chunk-NRBQK6UX.js";
|
|
21
20
|
import "./chunk-LFFIQBNY.js";
|
|
22
21
|
import {
|
|
23
22
|
DEFAULT_LOG_SETTINGS,
|
|
@@ -25,13 +24,13 @@ import {
|
|
|
25
24
|
} from "./chunk-HQOB7OQS.js";
|
|
26
25
|
import "./chunk-73AKO4UL.js";
|
|
27
26
|
import "./chunk-P6LNYYYH.js";
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-FE7WOHZM.js";
|
|
29
28
|
import "./chunk-2Q6MNGU5.js";
|
|
30
29
|
import {
|
|
31
30
|
SESSION_ID,
|
|
32
31
|
createFilesStore,
|
|
33
32
|
writeJson
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-7I7O7ZNT.js";
|
|
35
34
|
import {
|
|
36
35
|
STATE_FILES,
|
|
37
36
|
asBroadcast,
|
|
@@ -47,13 +46,14 @@ import {
|
|
|
47
46
|
NEUTRAL_EVENTS,
|
|
48
47
|
RUNTIMES,
|
|
49
48
|
RUNTIME_IDS
|
|
50
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-7DYWCQVB.js";
|
|
51
50
|
import {
|
|
52
51
|
ArgumentError,
|
|
53
52
|
one
|
|
54
53
|
} from "./chunk-A4PKLESO.js";
|
|
55
54
|
import "./chunk-V4NPDK6X.js";
|
|
56
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-ULFV3EIZ.js";
|
|
56
|
+
import "./chunk-NRBQK6UX.js";
|
|
57
57
|
import {
|
|
58
58
|
expandPath
|
|
59
59
|
} from "./chunk-OEH47H6A.js";
|
|
@@ -61,7 +61,8 @@ import {
|
|
|
61
61
|
checkoutOf,
|
|
62
62
|
worktreesOf
|
|
63
63
|
} from "./chunk-IJBSOWHK.js";
|
|
64
|
-
import "./chunk-
|
|
64
|
+
import "./chunk-XWLMZKH2.js";
|
|
65
|
+
import "./chunk-JTRFZQTB.js";
|
|
65
66
|
import "./chunk-GJXOFDJT.js";
|
|
66
67
|
import "./chunk-PMJG2CXF.js";
|
|
67
68
|
import "./chunk-J6KL3COD.js";
|
|
@@ -263,11 +264,12 @@ async function runPolicy(selected, input, deps) {
|
|
|
263
264
|
const { policy, mode } = selected;
|
|
264
265
|
const log = deps.log.child({ policy: policy.id });
|
|
265
266
|
const started = deps.now();
|
|
266
|
-
const finish = (decision) => {
|
|
267
|
+
const finish = (decision, raw) => {
|
|
267
268
|
deps.onPolicy?.({
|
|
268
269
|
policy: policy.id,
|
|
269
270
|
mode,
|
|
270
271
|
decision,
|
|
272
|
+
...raw ? { raw } : {},
|
|
271
273
|
durationMs: deps.now() - started
|
|
272
274
|
});
|
|
273
275
|
return decision;
|
|
@@ -307,7 +309,7 @@ async function runPolicy(selected, input, deps) {
|
|
|
307
309
|
...input.tool ? { tool: input.tool.kind, native: input.tool.native } : {},
|
|
308
310
|
duration_ms: deps.now() - started
|
|
309
311
|
});
|
|
310
|
-
return finish(decision);
|
|
312
|
+
return finish(decision, raw);
|
|
311
313
|
} catch (error) {
|
|
312
314
|
log.error("policy failed", {
|
|
313
315
|
error: error instanceof Error ? error.message : String(error)
|
|
@@ -532,7 +534,11 @@ async function simulate(input, compiled, store) {
|
|
|
532
534
|
source: sourceFor(result.policy),
|
|
533
535
|
skipped: skipped.has(result.policy),
|
|
534
536
|
verdict: result.decision.verdict ?? "allow",
|
|
535
|
-
reason: result.decision.reason ?? result.decision.context?.join("\n") ?? null
|
|
537
|
+
reason: result.decision.reason ?? result.decision.context?.join("\n") ?? null,
|
|
538
|
+
raw: result.raw ? {
|
|
539
|
+
verdict: result.raw.verdict ?? "allow",
|
|
540
|
+
reason: result.raw.reason ?? result.raw.context?.join("\n") ?? null
|
|
541
|
+
} : null
|
|
536
542
|
});
|
|
537
543
|
}
|
|
538
544
|
});
|
|
@@ -543,7 +549,7 @@ async function simulate(input, compiled, store) {
|
|
|
543
549
|
async function run(context) {
|
|
544
550
|
const fixtures = one(context.args, "fixtures");
|
|
545
551
|
if (fixtures !== void 0)
|
|
546
|
-
return (await import("./smoke-
|
|
552
|
+
return (await import("./smoke-UA7VVDKD.js")).run(context, fixtures);
|
|
547
553
|
const runtime = one(context.args, "runtime");
|
|
548
554
|
if (!RUNTIME_IDS.includes(runtime))
|
|
549
555
|
throw new ArgumentError("--runtime must be claude or codex");
|
|
@@ -576,7 +582,8 @@ async function run(context) {
|
|
|
576
582
|
throw new ArgumentError("Tool selectors require before_tool or after_tool");
|
|
577
583
|
const scratch = mkdtempSync(join3(tmpdir(), "pmcp-hooks-test-"));
|
|
578
584
|
try {
|
|
579
|
-
const
|
|
585
|
+
const { pauseFile: _project, ...sessions } = compiled.sessions;
|
|
586
|
+
const store = createFilesStore(scratch, sessions);
|
|
580
587
|
seedState(store, context.cwd, one(context.args, "session-state"));
|
|
581
588
|
const report = await simulate(input, compiled, store);
|
|
582
589
|
const rendered = adapter.render(input, report.decision);
|
|
@@ -593,7 +600,8 @@ async function run(context) {
|
|
|
593
600
|
if (!context.args.flags.has("json")) {
|
|
594
601
|
for (const row of report.policies)
|
|
595
602
|
context.ui.line(
|
|
596
|
-
row.policy + ": " + row.verdict + " " + row.durationMs + "ms" + (row.skipped ? " (external effects skipped)" : "") + (row.reason ? " " + row.reason : "")
|
|
603
|
+
row.policy + ": " + row.verdict + " " + row.durationMs + "ms" + (row.skipped ? " (external effects skipped)" : "") + (row.reason ? " " + row.reason : "") + // A guard in observe, warn or graded mode: what it found, before its mode.
|
|
604
|
+
(row.raw && row.raw.verdict !== row.verdict ? ` (${row.mode}; found ${row.raw.verdict}` + (row.raw.reason && row.raw.reason !== row.reason ? `: ${row.raw.reason}` : "") + ")" : "")
|
|
597
605
|
);
|
|
598
606
|
context.ui.data(
|
|
599
607
|
"Rendered (exit " + rendered.exitCode + "):\n" + rendered.stdout + "\n"
|
|
@@ -607,4 +615,4 @@ async function run(context) {
|
|
|
607
615
|
export {
|
|
608
616
|
run
|
|
609
617
|
};
|
|
610
|
-
//# sourceMappingURL=test-
|
|
618
|
+
//# sourceMappingURL=test-M365FK5N.js.map
|
|
@@ -112,10 +112,10 @@ var tuiCommand = {
|
|
|
112
112
|
try {
|
|
113
113
|
let receipt;
|
|
114
114
|
if (invocation.action === "doctor") {
|
|
115
|
-
const { inspectTerminalHost } = await import("./diagnostics-
|
|
115
|
+
const { inspectTerminalHost } = await import("./diagnostics-DYLW7WYV.js");
|
|
116
116
|
receipt = inspectTerminalHost();
|
|
117
117
|
} else if (invocation.action === "start-worker") {
|
|
118
|
-
const { startWorkspaceWorker } = await import("./worker-
|
|
118
|
+
const { startWorkspaceWorker } = await import("./worker-C23EAPCY.js");
|
|
119
119
|
receipt = await startWorkspaceWorker(
|
|
120
120
|
{ config: invocation.startup?.config, cwd: context.cwd },
|
|
121
121
|
invocation.startup.runtime,
|
|
@@ -128,7 +128,7 @@ var tuiCommand = {
|
|
|
128
128
|
cwd: context.cwd
|
|
129
129
|
});
|
|
130
130
|
} else {
|
|
131
|
-
const { launchStartup, planStartup } = await import("./entry-
|
|
131
|
+
const { launchStartup, planStartup } = await import("./entry-XPZZNQ4L.js");
|
|
132
132
|
const request = { ...invocation.startup, cwd: context.cwd };
|
|
133
133
|
receipt = invocation.action === "plan" ? planStartup(request) : await launchStartup(
|
|
134
134
|
request,
|
|
@@ -150,4 +150,4 @@ var tuiCommand = {
|
|
|
150
150
|
export {
|
|
151
151
|
tuiCommand
|
|
152
152
|
};
|
|
153
|
-
//# sourceMappingURL=tui-
|
|
153
|
+
//# sourceMappingURL=tui-PKPYE76A.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-B2WRYGHJ.js";
|
|
4
|
+
import "./chunk-7I7O7ZNT.js";
|
|
5
5
|
import "./chunk-Z6WRFOFT.js";
|
|
6
6
|
import "./chunk-A4PKLESO.js";
|
|
7
7
|
import "./chunk-OEH47H6A.js";
|
|
@@ -14,4 +14,4 @@ var run = (context) => change(context, "unbroadcast");
|
|
|
14
14
|
export {
|
|
15
15
|
run
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=unbroadcast-
|
|
17
|
+
//# sourceMappingURL=unbroadcast-N6LXHAMT.js.map
|
|
@@ -5,19 +5,21 @@ import {
|
|
|
5
5
|
} from "./chunk-C3G75JH7.js";
|
|
6
6
|
import {
|
|
7
7
|
invoke
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ICZH4NFR.js";
|
|
9
9
|
import "./chunk-DZ2MRTYT.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-NQFULJZC.js";
|
|
11
|
+
import "./chunk-7Q3AIS4Q.js";
|
|
12
12
|
import {
|
|
13
13
|
locateExecutable
|
|
14
14
|
} from "./chunk-R2GPCZUX.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-UQNRGU3V.js";
|
|
16
16
|
import "./chunk-34DECPVC.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-ULFV3EIZ.js";
|
|
18
|
+
import "./chunk-NRBQK6UX.js";
|
|
18
19
|
import "./chunk-OEH47H6A.js";
|
|
19
20
|
import "./chunk-IJBSOWHK.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-XWLMZKH2.js";
|
|
22
|
+
import "./chunk-JTRFZQTB.js";
|
|
21
23
|
import "./chunk-GJXOFDJT.js";
|
|
22
24
|
import "./chunk-PMJG2CXF.js";
|
|
23
25
|
import {
|
|
@@ -77,4 +79,4 @@ async function startWorkspaceWorker(request, runtime, memoryMb) {
|
|
|
77
79
|
export {
|
|
78
80
|
startWorkspaceWorker
|
|
79
81
|
};
|
|
80
|
-
//# sourceMappingURL=worker-
|
|
82
|
+
//# sourceMappingURL=worker-C23EAPCY.js.map
|
package/docs/commands.md
CHANGED
|
@@ -40,7 +40,7 @@ pmcp hooks test --runtime claude --event before_tool --path fixture.txt --sessio
|
|
|
40
40
|
|
|
41
41
|
List compiled policies per runtime and neutral event, including mode and source table. Test constructs a synthetic payload in that runtime's recorded shape, normalizes it, runs policy selection and composition, lowers unsupported asks, and renders the native response. The event accepts a neutral name or a supported native name. Choose at most one of `--command`, `--path` and `--tool`; these selectors require a tool event. Tool accepts a native name or shell, edit, read or other, subject to that runtime's tool vocabulary. No native runtime or model call is needed.
|
|
42
42
|
|
|
43
|
-
Session state is isolated in a temporary directory, then removed. Commands and patches are classified, never executed. External custom guards, validators, Stop projection subprocesses and worktree synchronization are explicitly marked skipped. Their simulated context reports this limitation; the command does not claim a full live result. Exit 0 means the simulation completed, even when the rendered decision denies; invalid input exits 2. Per-policy timings and reasons precede the rendered output in human mode.
|
|
43
|
+
Session state is isolated in a temporary directory, then removed. Commands and patches are classified, never executed. External custom guards, validators, Stop projection subprocesses and worktree synchronization are explicitly marked skipped. Their simulated context reports this limitation; the command does not claim a full live result. Exit 0 means the simulation completed, even when the rendered decision denies; invalid input exits 2. Per-policy timings and reasons precede the rendered output in human mode. Each policy row also gives `raw`, `{verdict, reason}` as the guard found it before its mode, so a guard in `observe`, `warn` or `graded` mode shows what `deny` would have done; human mode adds it as `(observe; found deny: …)` where it differs.
|
|
44
44
|
|
|
45
45
|
`--session-state` accepts a JSON object with optional `records` (session records with valid 8–64 character IDs), `pause` (by, reason, since), `leases` (name to pid, subject, since, optional cwd), and `broadcast` (id, by, text, since). Pause and broadcast may be null. Existing liveness and unseen-broadcast rules apply. This file and the real session store remain unchanged.
|
|
46
46
|
|
package/docs/git-workflow.md
CHANGED
|
@@ -63,10 +63,16 @@ session's lease, or a git operation in progress holds the desk where it is
|
|
|
63
63
|
gate's worktree, default `<state dir>/gate/tree`; a relative path is relative to
|
|
64
64
|
the main checkout, like `state_dir`), `lock_wait_seconds`
|
|
65
65
|
(default `5400`), `lock_env` (an environment variable name), `tree_env` (an
|
|
66
|
-
environment variable name)
|
|
67
|
-
gate
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
environment variable name), `log_dir` (default `<state dir>/gate-logs`, wherever
|
|
67
|
+
the gate tree is) and `log_keep` (default `20`). Each gate's full output, stdout
|
|
68
|
+
and stderr as they streamed to the terminal, is kept in
|
|
69
|
+
`<log_dir>/<tip>/<UTC time>-<run>.log`, one file per gate run of that replayed
|
|
70
|
+
tip (the full hash), with `<log_dir>/<tip>/latest` holding the newest file's
|
|
71
|
+
name; a pre-push gate's output is kept the same way. pmcp names the file when
|
|
72
|
+
the gate starts and again if it fails, and the `--json` receipt names it for
|
|
73
|
+
passing and failing runs alike, so a failure can be read without running the
|
|
74
|
+
gate again. The newest `log_keep` tips are kept, with every run of each; older
|
|
75
|
+
tips' directories are removed when a new tip's is made. With `max_load` (the 1-minute load average, e.g. `6`) a
|
|
70
76
|
delivery that holds the lock waits until the load is below it before the gate starts,
|
|
71
77
|
checking every 15 seconds for up to `load_wait_seconds` (default `1800`), and then
|
|
72
78
|
fails without running the gate; once started, a gate is never retried.
|
|
@@ -128,7 +134,8 @@ variable reaches the push only if `push_env` names it.
|
|
|
128
134
|
staying on stderr: `{ok, code, delivered, upstream, attempts, replayed, gate,
|
|
129
135
|
leases, sync, desk_sync, reason?}`, where `delivered` is the upstream commit it pushed (or
|
|
130
136
|
`null`), `replayed` the tip of its last replay onto the upstream (or `null`),
|
|
131
|
-
`gate` is `{exit, log, by}` for the last gate run (or `null`; `
|
|
137
|
+
`gate` is `{exit, log, logs, by}` for the last gate run (or `null`; `log` is that
|
|
138
|
+
run's file, `logs` the tip's directory holding every run, and `by` is
|
|
132
139
|
`"command"` or `"pre-push"`), `leases` the leases it took, `sync` the main
|
|
133
140
|
checkout's sync after the delivery (or `null` when none ran) as
|
|
134
141
|
`{from, to, code, reason?}`: the main checkout's HEAD before and after, the exit
|
|
@@ -185,10 +192,12 @@ formats: within a release line fields are only added, never renamed, retyped or
|
|
|
185
192
|
removed, and readers ignore fields they do not know. Times are UTC ISO 8601
|
|
186
193
|
strings, and JSON files are written whole through a rename.
|
|
187
194
|
|
|
188
|
-
| File | Where
|
|
189
|
-
| ------------------- |
|
|
190
|
-
| `lock` | beside the gate tree
|
|
191
|
-
| `holder.json` | beside `lock`
|
|
192
|
-
|
|
|
193
|
-
|
|
|
194
|
-
|
|
|
195
|
+
| File | Where | Content |
|
|
196
|
+
| ------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
197
|
+
| `lock` | beside the gate tree | Empty; held with `flock -x` for the whole of one delivery's gate. |
|
|
198
|
+
| `holder.json` | beside `lock` | `{tip, subject, checkout, pid, startedAt}`: the commit being gated (full hash), its subject, the checkout delivering it, the holding process and when it took the lock. Removed by its writer before the lock is released, and only when `pid` is its own. |
|
|
199
|
+
| gate logs | `[git.mainline.gate] log_dir`, else `<state dir>/gate-logs` | `<tip>/<UTC time>-<run>.log` per gate run of a replayed tip (full hash), the output as it streamed; `<tip>/latest` holds the newest file's name. The newest `log_keep` tip directories are kept. |
|
|
200
|
+
| `pause.json` | the state directory, or `[sessions] pause_file` | `{by, reason, since}`, all strings: who paused (a session id or a name), why, and when. Present means paused, for every session but `by`; a file missing a field or not JSON reads as no pause. Removed on resume. |
|
|
201
|
+
| `<name>-lease.json` | the state directory, or `[sessions.leases.<name>] file` | `{pid, subject, since, cwd?}`. A lease whose `pid` is not alive is free; whoever takes it next replaces the file. |
|
|
202
|
+
| lease events | `[sessions.leases.<name>] events` | JSON Lines, one per delivery that changed the leased paths: `{at, subject, commit, hash, installed, lease}`, with `commit` the delivered upstream (10 characters), `hash` the leased files' hash in the main checkout after sync, and `installed` whether sync's install ran for that hash. |
|
|
203
|
+
| install stamp | `[git.mainline.sync] stamp`, else pmcp's state directory | One line: the hash last installed. With `stamp_hash = "plain"` it is the sha256 hex of the single `install_when_changed` file's bytes; with `"pmcp"`, a hash of every listed path and its name. |
|
package/docs/hooks.md
CHANGED
|
@@ -14,7 +14,13 @@ features use. Gemini, Antigravity, Grok and OpenCode are opt-in: name them in
|
|
|
14
14
|
`[hooks] targets` and pmcp registers the same hook in their files (see
|
|
15
15
|
[Runtime support](#runtime-support)). `pmcp.lock` pins the hash of `policy.json`; the hook refuses to
|
|
16
16
|
act on a policy that does not match it, so every policy change is a reviewed
|
|
17
|
-
projection.
|
|
17
|
+
projection. When `pmcp.lock` itself cannot be read, as when a merge leaves git
|
|
18
|
+
conflict markers in it, no guard can be verified, so the hook refuses every tool
|
|
19
|
+
call except its repair: a read, an edit or write of `pmcp.lock` alone, and
|
|
20
|
+
`git show <rev>:pmcp.lock > pmcp.lock`, `git checkout [<rev>|--ours|--theirs]
|
|
21
|
+
[--] pmcp.lock` or `git restore [--source=<rev>] [--] pmcp.lock`. The refusal names
|
|
22
|
+
the line with the first marker and those commands; `pmcp project --check` and
|
|
23
|
+
`pmcp doctor` report the same. Codex shows changed entries under `/hooks` as needing review;
|
|
18
24
|
untrusted hooks do not run. Each Codex, Claude and Grok entry carries a
|
|
19
25
|
`statusMessage` such as `pmcp session start` or `pmcp before tool`: Codex
|
|
20
26
|
lists hooks under that name, and Claude and Grok show it while the hook runs.
|
|
@@ -482,6 +482,7 @@ lives in one directory shared by every checkout of the repository.
|
|
|
482
482
|
| ---------------- | ------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
483
483
|
| `store` | string | `"files"` | The only store. |
|
|
484
484
|
| `state_dir` | path | `$XDG_STATE_HOME/pmcp/projects/<id>` (`~/.local/state/...`) | `<id>` is the first 16 hex digits of the sha256 of the git common directory. `~`, `~/` and `$HOME/` expand to the home directory and a relative path is relative to the main checkout: the directory holding `pmcp.toml`, taken in the worktree of the git common directory, so the main checkout and every linked worktree share one state. Outside git it is relative to the directory holding `pmcp.toml`. The hooks, the Claude Code session panes and the git commands resolve it the same way; so does `[git.mainline.gate] tree`. |
|
|
485
|
+
| `pause_file` | path | `<state dir>/pause.json` | Where the pause lives: absolute, `~/…`, `$HOME/…`, or `${gate_dir}/…` for the directory of the gate tree (so it follows `[git.mainline.gate] tree_env`). Point it at the file another tool already pauses the same work with; `pmcp sessions pause` and `resume`, `/pmcp pause`, the `[sessions.pause]` guard, `pmcp git deliver` (`--during-pause` still overrides) and `pmcp git sync` then all read and write that file. Its format is in [Shared file formats](git-workflow.md#shared-file-formats). |
|
|
485
486
|
|
|
486
487
|
`store` and `state_dir` alone enable nothing; each feature has its own table:
|
|
487
488
|
|
package/docs/upgrading.md
CHANGED
|
@@ -5,6 +5,19 @@
|
|
|
5
5
|
What to do when a release changes something you rely on. Each release's notes on GitHub
|
|
6
6
|
Releases list its breaking changes and link here.
|
|
7
7
|
|
|
8
|
+
## From 0.22.1 to 0.22.2
|
|
9
|
+
|
|
10
|
+
**Gate logs move to a directory per tip in the state directory.** A delivery's gate output was
|
|
11
|
+
`<dir of the gate tree>/logs/<time>-<tip>.log`, the newest 20 runs kept. It is now
|
|
12
|
+
`<state dir>/gate-logs/<tip>/<time>-<run>.log` (or under `[git.mainline.gate] log_dir`), every
|
|
13
|
+
run of a tip kept, with `<tip>/latest` naming the newest, and the newest `log_keep` (default 20) tips kept. The `--json` receipt's `gate` gains `logs`, the tip's directory. pmcp no longer
|
|
14
|
+
writes or prunes the old `logs/` directory; delete it when you no longer need it. A tool that
|
|
15
|
+
looked for logs there should use the receipt's `gate.log` or `<log_dir>/<tip>/latest`.
|
|
16
|
+
|
|
17
|
+
**A `pmcp.lock` a merge left unreadable no longer locks a session out.** The hook refuses
|
|
18
|
+
everything but the lock's repair, and names the conflict line and the commands that restore
|
|
19
|
+
it; see [Hooks](hooks.md).
|
|
20
|
+
|
|
8
21
|
## From 0.22.0 to 0.22.1
|
|
9
22
|
|
|
10
23
|
**Codex agent files are named with underscores.** Codex refuses a hyphen in the name it
|
package/gemini-extension.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcp",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.3",
|
|
4
4
|
"mcpServers": {
|
|
5
5
|
"pmcp": {
|
|
6
6
|
"type": "stdio",
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["-y", "@modootoday/pmcp@0.22.
|
|
8
|
+
"args": ["-y", "@modootoday/pmcp@0.22.3", "serve"]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
package/mcp.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modootoday/pmcp",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.3",
|
|
4
4
|
"license": "Elastic-2.0",
|
|
5
5
|
"author": "modootoday",
|
|
6
6
|
"description": "Use the skills your packages already ship, and keep your AI tools' project configuration in one place.",
|
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
"bun": ">=1.3.0"
|
|
137
137
|
},
|
|
138
138
|
"optionalDependencies": {
|
|
139
|
-
"@modootoday/pmcp-linux-x64": "0.22.
|
|
140
|
-
"@modootoday/pmcp-linux-arm64": "0.22.
|
|
141
|
-
"@modootoday/pmcp-darwin-x64": "0.22.
|
|
142
|
-
"@modootoday/pmcp-darwin-arm64": "0.22.
|
|
139
|
+
"@modootoday/pmcp-linux-x64": "0.22.3",
|
|
140
|
+
"@modootoday/pmcp-linux-arm64": "0.22.3",
|
|
141
|
+
"@modootoday/pmcp-darwin-x64": "0.22.3",
|
|
142
|
+
"@modootoday/pmcp-darwin-arm64": "0.22.3"
|
|
143
143
|
}
|
|
144
144
|
}
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "pmcp",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.3",
|
|
5
5
|
"description": "Find package skills and use native runtime project configuration.",
|
|
6
6
|
"author": { "name": "modootoday" },
|
|
7
7
|
"license": "Elastic-2.0",
|
package/plugins/pmcp/.mcp.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcp",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.3",
|
|
4
4
|
"mcpServers": {
|
|
5
5
|
"pmcp": {
|
|
6
6
|
"type": "stdio",
|
|
7
7
|
"command": "npx",
|
|
8
|
-
"args": ["-y", "@modootoday/pmcp@0.22.
|
|
8
|
+
"args": ["-y", "@modootoday/pmcp@0.22.3", "serve"]
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
}
|
package/plugins/pmcp/mcp.json
CHANGED
|
@@ -2,14 +2,20 @@ import { STATE_PATHS } from "./reader/index";
|
|
|
2
2
|
import { refresh } from "./snapshot";
|
|
3
3
|
import { PANE_ID, state } from "./state";
|
|
4
4
|
|
|
5
|
+
// The pause may live outside the state dir ([sessions] pause_file); the rest never does.
|
|
6
|
+
function statePath(name: string): string {
|
|
7
|
+
if (name === STATE_PATHS.pause && state.pauseFile) return state.pauseFile;
|
|
8
|
+
return `${state.stateDir}/${name}`;
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
async function writeState($: any, name: string, value: object): Promise<void> {
|
|
6
|
-
const
|
|
7
|
-
await $.process.run(["mkdir", "-p",
|
|
8
|
-
await $.fs.write(
|
|
12
|
+
const path = statePath(name);
|
|
13
|
+
await $.process.run(["mkdir", "-p", path.slice(0, path.lastIndexOf("/"))]);
|
|
14
|
+
await $.fs.write(path, `${JSON.stringify(value, null, 2)}\n`);
|
|
9
15
|
}
|
|
10
16
|
|
|
11
17
|
async function removeState($: any, name: string): Promise<void> {
|
|
12
|
-
await $.process.run(["rm", "-f",
|
|
18
|
+
await $.process.run(["rm", "-f", statePath(name)]);
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
async function togglePane($: any): Promise<{ text: string }> {
|
package/plugins/pmcp/mod/host.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseUiSettings, UI_SETTINGS_FILE } from "./reader/index";
|
|
1
|
+
import { parseUiSettings, STATE_PATHS, UI_SETTINGS_FILE } from "./reader/index";
|
|
2
2
|
import type { StateFiles, UiSettings } from "./reader/index";
|
|
3
3
|
|
|
4
4
|
export function hostFiles($: any): StateFiles {
|
|
@@ -28,6 +28,22 @@ export async function resolveStateDir(
|
|
|
28
28
|
return String(run.stdout).trim();
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
// The pause the hooks read ([sessions] pause_file); a hook too old to answer keeps the state dir's.
|
|
32
|
+
export async function resolvePauseFile(
|
|
33
|
+
$: any,
|
|
34
|
+
root: string,
|
|
35
|
+
stateDir: string,
|
|
36
|
+
): Promise<string> {
|
|
37
|
+
const fallback = `${stateDir}/${STATE_PATHS.pause}`;
|
|
38
|
+
const hook = `${root}/.agents/pmcp-hooks/hook.mjs`;
|
|
39
|
+
if (!(await $.fs.exists(hook))) return fallback;
|
|
40
|
+
const run = await $.process
|
|
41
|
+
.run(["node", hook, "--pause-file"])
|
|
42
|
+
.catch(() => null);
|
|
43
|
+
const answer = run && run.exitCode === 0 ? String(run.stdout).trim() : "";
|
|
44
|
+
return answer.startsWith("/") ? answer : fallback;
|
|
45
|
+
}
|
|
46
|
+
|
|
31
47
|
export async function findSettings(
|
|
32
48
|
$: any,
|
|
33
49
|
cwd: string,
|
|
@@ -94,7 +94,9 @@ export async function readSessionState(
|
|
|
94
94
|
const at = (name: string) => `${options.stateDir}/${name}`;
|
|
95
95
|
return {
|
|
96
96
|
records: await readRecords(files, options),
|
|
97
|
-
pause: asPause(
|
|
97
|
+
pause: asPause(
|
|
98
|
+
await readJson(files, options.pauseFile ?? at(STATE_PATHS.pause)),
|
|
99
|
+
),
|
|
98
100
|
lease: await readLease(files, options),
|
|
99
101
|
broadcast: asBroadcast(await readJson(files, at(STATE_PATHS.broadcast))),
|
|
100
102
|
};
|