@modootoday/pmcp 0.22.2 → 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-AWZ32Z66.js → apply-CYVC5LDG.js} +11 -11
- package/dist/{broadcast-ZALGUJVR.js → broadcast-DZGMSZRG.js} +3 -3
- package/dist/{chunk-57Q75MS4.js → chunk-5QKXEWDB.js} +2 -2
- package/dist/{chunk-OMIIXLMO.js → chunk-7DYWCQVB.js} +1 -1
- package/dist/{chunk-MR5IBS6L.js → chunk-7I7O7ZNT.js} +41 -10
- package/dist/{chunk-JP27V2H4.js → chunk-7LUYI7QM.js} +2 -2
- package/dist/{chunk-T6MQPVLH.js → chunk-7Q3AIS4Q.js} +2 -2
- package/dist/{chunk-7FV2LORT.js → chunk-B2WRYGHJ.js} +4 -3
- package/dist/{chunk-VGW3N3HC.js → chunk-CALWIRAI.js} +14 -14
- package/dist/{chunk-W6GA5RAW.js → chunk-CILQCERV.js} +2 -2
- package/dist/{chunk-U3IHGG7X.js → chunk-ESCOMAPX.js} +3 -3
- package/dist/{chunk-NFJ44OE2.js → chunk-FE7WOHZM.js} +13 -4
- package/dist/{chunk-5A7QRZP6.js → chunk-HV52EUSL.js} +5 -5
- package/dist/{chunk-SKOP4ZST.js → chunk-ICZH4NFR.js} +5 -5
- package/dist/chunk-JTRFZQTB.js +7 -0
- package/dist/{chunk-G25LCRIG.js → chunk-JUG4W7RF.js} +2 -2
- package/dist/{chunk-4Z6NPSWX.js → chunk-MLGXDSHZ.js} +8 -6
- package/dist/{chunk-GZQH3RJA.js → chunk-MQMWVJZB.js} +3 -3
- package/dist/{chunk-U2NWTZQP.js → chunk-MZF7VOQA.js} +2 -2
- package/dist/{chunk-GE2PHR35.js → chunk-NQFULJZC.js} +3 -3
- package/dist/{chunk-KLWZZTUQ.js → chunk-ONYZIC2F.js} +3 -3
- package/dist/{chunk-FOIQUPIQ.js → chunk-PR2RBEXI.js} +2 -2
- package/dist/{chunk-BUD3WS4Y.js → chunk-RZZZHQCE.js} +2 -2
- package/dist/{chunk-NAXUAC5S.js → chunk-ULFV3EIZ.js} +2 -2
- package/dist/{chunk-D2DDM5VZ.js → chunk-UQNRGU3V.js} +2 -2
- package/dist/{chunk-ZYLJUABY.js → chunk-V7LZTVWS.js} +2 -2
- package/dist/{chunk-5F7TL3V7.js → chunk-WPX4ONFT.js} +6 -6
- package/dist/{cli-6FWRBCWM.js → cli-34EDFXJA.js} +8 -8
- package/dist/{cli-BOSY6VFP.js → cli-A6HKRICM.js} +4 -4
- package/dist/cli.js +3 -3
- package/dist/{completion-V756JVX6.js → completion-FDLVWLAC.js} +2 -2
- package/dist/{diagnostics-R7S3DNXD.js → diagnostics-DYLW7WYV.js} +5 -5
- package/dist/{doctor-44S5EWK5.js → doctor-FRQ5H5FU.js} +12 -12
- package/dist/{entry-GSGCMXE5.js → entry-XPZZNQ4L.js} +9 -9
- package/dist/{exec-mcp-3COXHDYT.js → exec-mcp-HOM2ZANM.js} +8 -8
- package/dist/{harness-K4WL2NSH.js → harness-WIGJRE5P.js} +3 -3
- package/dist/harness-launch-gate.js +3 -3
- package/dist/harness-worker.js +5 -5
- package/dist/hook-body.js +108 -64
- package/dist/{hook-spec-hZL4MSgi.d.ts → hook-spec-Bd24eo2L.d.ts} +1 -0
- package/dist/{hooks-HQOLXR3A.js → hooks-MIF3FONJ.js} +4 -4
- package/dist/{host-4W3JUQAO.js → host-CE5TW5SC.js} +10 -10
- package/dist/{host-N5UILUK7.js → host-JKZLOCZS.js} +6 -6
- package/dist/{host-run-CVYRZB7R.js → host-run-MJGJ7NVE.js} +4 -4
- package/dist/http.js +1 -1
- package/dist/{import-mcp-IAGC3LJU.js → import-mcp-T3GZYEE5.js} +7 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -11
- package/dist/{init-HPEVKKMU.js → init-D5VPDF2B.js} +2 -2
- package/dist/{invoke-TD5YR2G7.js → invoke-HEAOQLFQ.js} +7 -7
- package/dist/{list-YUHJ5CTT.js → list-PCLCFG2J.js} +9 -9
- package/dist/{logout-JQ5UPC5W.js → logout-3ZXFXKHB.js} +8 -8
- package/dist/{logs-74JGLQG6.js → logs-UHJM7ZCL.js} +3 -3
- package/dist/{mailbox-VK5AVTHI.js → mailbox-NIMBOQPA.js} +3 -3
- package/dist/{mainline-7HO7RCQH.js → mainline-6CTSVOWP.js} +10 -7
- package/dist/{mcp-B6SYBT3X.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-GOW2MEFY.js → project-H4R3Q3QO.js} +4 -4
- package/dist/{report-Z3JV2PCT.js → report-ZHOHQ4PZ.js} +3 -3
- package/dist/{resume-DFIHT2RO.js → resume-UJEWQ66P.js} +3 -3
- package/dist/{run-ZOSIKNDX.js → run-FMTHUOAZ.js} +4 -4
- package/dist/{run-7UNRLLYD.js → run-V74M7PZK.js} +7 -7
- package/dist/{serve-VRBL67KO.js → serve-JKNEC4AX.js} +3 -3
- package/dist/{setup-QMYAW3MB.js → setup-HYEYYVDU.js} +3 -3
- package/dist/{smoke-EXPR7HLD.js → smoke-UA7VVDKD.js} +3 -3
- package/dist/{start-login-NRD323LK.js → start-login-JRMVLK5J.js} +8 -8
- package/dist/{status-ZY5B7V6R.js → status-6273XFHT.js} +8 -8
- package/dist/{status-3RTGDN2K.js → status-KN2ZE64O.js} +3 -3
- package/dist/{status-JN2GT5UM.js → status-RG2GFDQU.js} +10 -10
- package/dist/stdio.js +2 -2
- package/dist/{sweep-EPJMEZR6.js → sweep-EPZCW63Q.js} +3 -3
- package/dist/{test-VGJXKCQT.js → test-M365FK5N.js} +21 -14
- package/dist/{tui-GORRJIMA.js → tui-PKPYE76A.js} +4 -4
- package/dist/{unbroadcast-NTOC3PY3.js → unbroadcast-N6LXHAMT.js} +3 -3
- package/dist/{worker-LJG2NDMK.js → worker-C23EAPCY.js} +7 -7
- package/docs/commands.md +1 -1
- package/docs/git-workflow.md +1 -0
- package/docs/project-configuration.md +1 -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-FWKQA6TX.js +0 -7
package/dist/hook-body.js
CHANGED
|
@@ -741,11 +741,12 @@ async function runPolicy(selected, input, deps) {
|
|
|
741
741
|
const { policy, mode } = selected;
|
|
742
742
|
const log = deps.log.child({ policy: policy.id });
|
|
743
743
|
const started = deps.now();
|
|
744
|
-
const finish = (decision) => {
|
|
744
|
+
const finish = (decision, raw) => {
|
|
745
745
|
deps.onPolicy?.({
|
|
746
746
|
policy: policy.id,
|
|
747
747
|
mode,
|
|
748
748
|
decision,
|
|
749
|
+
...raw ? { raw } : {},
|
|
749
750
|
durationMs: deps.now() - started
|
|
750
751
|
});
|
|
751
752
|
return decision;
|
|
@@ -785,7 +786,7 @@ async function runPolicy(selected, input, deps) {
|
|
|
785
786
|
...input.tool ? { tool: input.tool.kind, native: input.tool.native } : {},
|
|
786
787
|
duration_ms: deps.now() - started
|
|
787
788
|
});
|
|
788
|
-
return finish(decision);
|
|
789
|
+
return finish(decision, raw);
|
|
789
790
|
} catch (error) {
|
|
790
791
|
log.error("policy failed", {
|
|
791
792
|
error: error instanceof Error ? error.message : String(error)
|
|
@@ -2252,7 +2253,7 @@ function classEnd(pattern, start) {
|
|
|
2252
2253
|
function patternCost(pattern, flavor, onlyMatching, limits) {
|
|
2253
2254
|
const largest = Math.max(0, ...repetitionCounts(pattern, flavor));
|
|
2254
2255
|
if (largest > limits.threshold)
|
|
2255
|
-
return `a repetition count of ${largest} (the limit is ${limits.threshold})`;
|
|
2256
|
+
return `a repetition count of ${largest} (the limit is ${limits.threshold}), whose cost is in compiling the pattern, so even an empty input holds the core`;
|
|
2256
2257
|
if (flavor === "perl" && nestedQuantifier(pattern))
|
|
2257
2258
|
return "a -P pattern with a quantified group inside a quantifier, such as (a+)+ or (.*)*";
|
|
2258
2259
|
if (limits.onlyMatchingWildcards && onlyMatching && (pattern.match(/\.\*/gu) ?? []).length > 1)
|
|
@@ -5474,13 +5475,73 @@ function hookLogger(root, compiled, runtime2, event) {
|
|
|
5474
5475
|
}
|
|
5475
5476
|
|
|
5476
5477
|
// src/hooks/entry/state-dir.ts
|
|
5477
|
-
|
|
5478
|
-
|
|
5478
|
+
import { join as join18 } from "node:path";
|
|
5479
|
+
|
|
5480
|
+
// src/sessions/lease-files.ts
|
|
5481
|
+
import { dirname as dirname9, isAbsolute as isAbsolute13, join as join17 } from "node:path";
|
|
5482
|
+
var GATE_DIR = "${gate_dir}/";
|
|
5483
|
+
function gateTree(root, stateDir, gate, env) {
|
|
5484
|
+
const override = gate.treeEnv ? env[gate.treeEnv] : void 0;
|
|
5485
|
+
if (override) return override;
|
|
5486
|
+
return gate.tree ? expandPath(root, gate.tree) : join17(stateDir, "gate", "tree");
|
|
5487
|
+
}
|
|
5488
|
+
function atGateDir(path, gateDir) {
|
|
5489
|
+
return path.startsWith(GATE_DIR) ? join17(gateDir, path.slice(GATE_DIR.length)) : path;
|
|
5490
|
+
}
|
|
5491
|
+
function resolvePauseFile(file2, gateDir) {
|
|
5492
|
+
return file2 === void 0 ? void 0 : atGateDir(file2, gateDir);
|
|
5493
|
+
}
|
|
5494
|
+
function resolveLeaseFiles(files2, gateDir) {
|
|
5495
|
+
const resolve21 = (path) => path === void 0 ? void 0 : atGateDir(path, gateDir);
|
|
5496
|
+
return Object.fromEntries(
|
|
5497
|
+
Object.entries(files2 ?? {}).map(([name, f]) => {
|
|
5498
|
+
const file2 = resolve21(f.file);
|
|
5499
|
+
const events2 = resolve21(f.events);
|
|
5500
|
+
return [
|
|
5501
|
+
name,
|
|
5502
|
+
{ ...file2 ? { file: file2 } : {}, ...events2 ? { events: events2 } : {} }
|
|
5503
|
+
];
|
|
5504
|
+
})
|
|
5505
|
+
);
|
|
5506
|
+
}
|
|
5507
|
+
function leaseFilesFor(root, stateDir, files2, gate, env) {
|
|
5508
|
+
if (!files2 || Object.keys(files2).length === 0) return {};
|
|
5509
|
+
return resolveLeaseFiles(
|
|
5510
|
+
files2,
|
|
5511
|
+
dirname9(gateTree(root, stateDir, gate ?? {}, env))
|
|
5512
|
+
);
|
|
5513
|
+
}
|
|
5514
|
+
function pauseFileFor(root, stateDir, file2, gate, env) {
|
|
5515
|
+
if (!file2) return void 0;
|
|
5516
|
+
return resolvePauseFile(
|
|
5517
|
+
file2,
|
|
5518
|
+
dirname9(gateTree(root, stateDir, gate ?? {}, env))
|
|
5519
|
+
);
|
|
5520
|
+
}
|
|
5521
|
+
|
|
5522
|
+
// src/hooks/entry/state-dir.ts
|
|
5523
|
+
function verified(root) {
|
|
5479
5524
|
try {
|
|
5480
|
-
|
|
5525
|
+
return readCompiled(root);
|
|
5481
5526
|
} catch {
|
|
5527
|
+
return null;
|
|
5482
5528
|
}
|
|
5483
|
-
|
|
5529
|
+
}
|
|
5530
|
+
function stateDirAnswer(root) {
|
|
5531
|
+
return `${projectStateDir(root, verified(root)?.stateDir)}
|
|
5532
|
+
`;
|
|
5533
|
+
}
|
|
5534
|
+
function pauseFileAnswer(root) {
|
|
5535
|
+
const compiled = verified(root);
|
|
5536
|
+
const stateDir = projectStateDir(root, compiled?.stateDir);
|
|
5537
|
+
const file2 = pauseFileFor(
|
|
5538
|
+
root,
|
|
5539
|
+
stateDir,
|
|
5540
|
+
compiled?.sessions.pauseFile,
|
|
5541
|
+
compiled?.sessions.gate,
|
|
5542
|
+
process.env
|
|
5543
|
+
);
|
|
5544
|
+
return `${file2 ?? join18(stateDir, STATE_FILES.pause)}
|
|
5484
5545
|
`;
|
|
5485
5546
|
}
|
|
5486
5547
|
|
|
@@ -5518,10 +5579,10 @@ var gitProbe = {
|
|
|
5518
5579
|
};
|
|
5519
5580
|
|
|
5520
5581
|
// src/sessions/files/broadcast.ts
|
|
5521
|
-
import { join as
|
|
5582
|
+
import { join as join19 } from "node:path";
|
|
5522
5583
|
|
|
5523
5584
|
// src/sessions/files/json.ts
|
|
5524
|
-
import { dirname as
|
|
5585
|
+
import { dirname as dirname10 } from "node:path";
|
|
5525
5586
|
function readJson3(path) {
|
|
5526
5587
|
try {
|
|
5527
5588
|
return JSON.parse(readFileSync(path, "utf8"));
|
|
@@ -5530,7 +5591,7 @@ function readJson3(path) {
|
|
|
5530
5591
|
}
|
|
5531
5592
|
}
|
|
5532
5593
|
function writeJson(path, value) {
|
|
5533
|
-
mkdirSync(
|
|
5594
|
+
mkdirSync(dirname10(path), { recursive: true, mode: 448 });
|
|
5534
5595
|
const temporary = `${path}.${process.pid}.tmp`;
|
|
5535
5596
|
writeFileSync(temporary, `${JSON.stringify(value, null, 2)}
|
|
5536
5597
|
`, {
|
|
@@ -5554,7 +5615,7 @@ function readLines(path) {
|
|
|
5554
5615
|
});
|
|
5555
5616
|
}
|
|
5556
5617
|
function writeLines(path, values) {
|
|
5557
|
-
mkdirSync(
|
|
5618
|
+
mkdirSync(dirname10(path), { recursive: true, mode: 448 });
|
|
5558
5619
|
writeFileSync(
|
|
5559
5620
|
path,
|
|
5560
5621
|
`${values.map((value) => JSON.stringify(value)).join("\n")}
|
|
@@ -5565,8 +5626,8 @@ function writeLines(path, values) {
|
|
|
5565
5626
|
|
|
5566
5627
|
// src/sessions/files/broadcast.ts
|
|
5567
5628
|
function filesBroadcast(dir, keep, registry2) {
|
|
5568
|
-
const latestPath =
|
|
5569
|
-
const historyPath =
|
|
5629
|
+
const latestPath = join19(dir, STATE_FILES.broadcast);
|
|
5630
|
+
const historyPath = join19(dir, STATE_FILES.history);
|
|
5570
5631
|
const list = () => {
|
|
5571
5632
|
const latest = asBroadcast(readJson3(latestPath));
|
|
5572
5633
|
if (!latest) return [];
|
|
@@ -5610,9 +5671,9 @@ function filesBroadcast(dir, keep, registry2) {
|
|
|
5610
5671
|
}
|
|
5611
5672
|
|
|
5612
5673
|
// src/sessions/files/leases.ts
|
|
5613
|
-
import { dirname as
|
|
5674
|
+
import { dirname as dirname11, join as join20 } from "node:path";
|
|
5614
5675
|
function filesLeases(dir, files2 = {}) {
|
|
5615
|
-
const leasePath = (name) => files2[name]?.file ??
|
|
5676
|
+
const leasePath = (name) => files2[name]?.file ?? join20(dir, leaseFile(name));
|
|
5616
5677
|
const read3 = (name) => {
|
|
5617
5678
|
const lease = asLease(readJson3(leasePath(name)));
|
|
5618
5679
|
if (!lease || !alive(lease.pid)) return null;
|
|
@@ -5632,7 +5693,7 @@ function filesLeases(dir, files2 = {}) {
|
|
|
5632
5693
|
...lease.cwd ? { cwd: lease.cwd } : {},
|
|
5633
5694
|
since: (/* @__PURE__ */ new Date()).toISOString()
|
|
5634
5695
|
};
|
|
5635
|
-
mkdirSync(
|
|
5696
|
+
mkdirSync(dirname11(path), { recursive: true });
|
|
5636
5697
|
const temp = `${path}.${process.pid}.${Date.now()}.tmp`;
|
|
5637
5698
|
writeFileSync(temp, `${JSON.stringify(record)}
|
|
5638
5699
|
`);
|
|
@@ -5662,28 +5723,28 @@ function filesLeases(dir, files2 = {}) {
|
|
|
5662
5723
|
}
|
|
5663
5724
|
|
|
5664
5725
|
// src/sessions/files/mailbox.ts
|
|
5665
|
-
import { join as
|
|
5726
|
+
import { join as join21 } from "node:path";
|
|
5666
5727
|
var ID = /^\d{13}-[0-9a-f]{8}$/u;
|
|
5667
5728
|
var SAFE_KEY = /^@?[\w.-]+$/u;
|
|
5668
5729
|
function filesMailbox(dir, settings) {
|
|
5669
|
-
const messages =
|
|
5670
|
-
const inbox =
|
|
5671
|
-
const pathOf = (id) =>
|
|
5730
|
+
const messages = join21(dir, "messages");
|
|
5731
|
+
const inbox = join21(dir, "inbox");
|
|
5732
|
+
const pathOf = (id) => join21(messages, `${id}.json`);
|
|
5672
5733
|
const marker = (key, id, kind) => {
|
|
5673
5734
|
if (!SAFE_KEY.test(key) || !ID.test(id))
|
|
5674
5735
|
throw new Error(`invalid mailbox key ${key} or id ${id}`);
|
|
5675
|
-
return
|
|
5736
|
+
return join21(inbox, key, `${id}.${kind}`);
|
|
5676
5737
|
};
|
|
5677
5738
|
const audit = (event, fields2) => {
|
|
5678
5739
|
if (!settings.audit) return;
|
|
5679
5740
|
const line = { at: (/* @__PURE__ */ new Date()).toISOString(), event, ...fields2 };
|
|
5680
|
-
appendFileSync(
|
|
5741
|
+
appendFileSync(join21(dir, "messages.jsonl"), `${JSON.stringify(line)}
|
|
5681
5742
|
`, {
|
|
5682
5743
|
mode: 384
|
|
5683
5744
|
});
|
|
5684
5745
|
};
|
|
5685
5746
|
const touch = (path) => {
|
|
5686
|
-
mkdirSync(
|
|
5747
|
+
mkdirSync(join21(path, ".."), { recursive: true, mode: 448 });
|
|
5687
5748
|
try {
|
|
5688
5749
|
writeFileSync(path, "", { flag: "wx", mode: 384 });
|
|
5689
5750
|
return true;
|
|
@@ -5700,7 +5761,7 @@ function filesMailbox(dir, settings) {
|
|
|
5700
5761
|
if (existsSync(inbox))
|
|
5701
5762
|
for (const key of readdirSync(inbox))
|
|
5702
5763
|
for (const kind of ["ack", "delivered"])
|
|
5703
|
-
rmSync(
|
|
5764
|
+
rmSync(join21(inbox, key, `${message.id}.${kind}`), { force: true });
|
|
5704
5765
|
audit(event, { id: message.id });
|
|
5705
5766
|
};
|
|
5706
5767
|
return {
|
|
@@ -5776,9 +5837,9 @@ function filesMailbox(dir, settings) {
|
|
|
5776
5837
|
}
|
|
5777
5838
|
|
|
5778
5839
|
// src/sessions/files/pause.ts
|
|
5779
|
-
import { join as
|
|
5780
|
-
function filesPause(dir) {
|
|
5781
|
-
const path =
|
|
5840
|
+
import { join as join22 } from "node:path";
|
|
5841
|
+
function filesPause(dir, file2) {
|
|
5842
|
+
const path = file2 ?? join22(dir, STATE_FILES.pause);
|
|
5782
5843
|
return {
|
|
5783
5844
|
read: () => asPause(readJson3(path)),
|
|
5784
5845
|
write(pause2) {
|
|
@@ -5796,12 +5857,12 @@ function filesPause(dir) {
|
|
|
5796
5857
|
}
|
|
5797
5858
|
|
|
5798
5859
|
// src/sessions/files/registry.ts
|
|
5799
|
-
import { join as
|
|
5860
|
+
import { join as join23 } from "node:path";
|
|
5800
5861
|
var SESSION_ID = /^[A-Za-z0-9_-]{8,64}$/u;
|
|
5801
5862
|
function filesRegistry(dir, staleMs) {
|
|
5802
|
-
const records =
|
|
5803
|
-
const dirs = [records,
|
|
5804
|
-
const pathsOf = (session) => dirs.map((records2) =>
|
|
5863
|
+
const records = join23(dir, STATE_FILES.records);
|
|
5864
|
+
const dirs = [records, join23(dir, STATE_FILES.legacyRecords)];
|
|
5865
|
+
const pathsOf = (session) => dirs.map((records2) => join23(records2, `${session}.json`));
|
|
5805
5866
|
const get = (session) => {
|
|
5806
5867
|
if (!SESSION_ID.test(session)) return null;
|
|
5807
5868
|
return latestRecord(
|
|
@@ -5820,7 +5881,7 @@ function filesRegistry(dir, staleMs) {
|
|
|
5820
5881
|
for (const name of names2)
|
|
5821
5882
|
found.set(name, [
|
|
5822
5883
|
...found.get(name) ?? [],
|
|
5823
|
-
asRecord(readJson3(
|
|
5884
|
+
asRecord(readJson3(join23(folder, name)))
|
|
5824
5885
|
]);
|
|
5825
5886
|
}
|
|
5826
5887
|
return [...found.values()].map(latestRecord).filter((record) => record !== null).map((record) => ({ ...record, live: isLive(record, now, staleMs) }));
|
|
@@ -5847,7 +5908,7 @@ function filesRegistry(dir, staleMs) {
|
|
|
5847
5908
|
next["worktree"] = checkout?.root ?? "";
|
|
5848
5909
|
next["branch"] = checkout?.branch ?? "";
|
|
5849
5910
|
}
|
|
5850
|
-
writeJson(
|
|
5911
|
+
writeJson(join23(records, `${session}.json`), next);
|
|
5851
5912
|
return next;
|
|
5852
5913
|
},
|
|
5853
5914
|
sweep(now = Date.now()) {
|
|
@@ -5872,7 +5933,7 @@ function createFilesStore(dir, options2 = {}) {
|
|
|
5872
5933
|
return {
|
|
5873
5934
|
dir,
|
|
5874
5935
|
registry: registry2,
|
|
5875
|
-
pause: filesPause(dir),
|
|
5936
|
+
pause: filesPause(dir, options2.pauseFile),
|
|
5876
5937
|
leases: filesLeases(dir, options2.leaseFiles),
|
|
5877
5938
|
// With the mailbox on, a broadcast is also a message to all, which the mailbox delivers;
|
|
5878
5939
|
// broadcast.json stays the record status, snapshot and the Claude band read.
|
|
@@ -5897,41 +5958,16 @@ function createFilesStore(dir, options2 = {}) {
|
|
|
5897
5958
|
};
|
|
5898
5959
|
}
|
|
5899
5960
|
|
|
5900
|
-
// src/sessions/lease-files.ts
|
|
5901
|
-
import { dirname as dirname11, isAbsolute as isAbsolute13, join as join22 } from "node:path";
|
|
5902
|
-
var GATE_DIR = "${gate_dir}/";
|
|
5903
|
-
function gateTree(root, stateDir, gate, env) {
|
|
5904
|
-
const override = gate.treeEnv ? env[gate.treeEnv] : void 0;
|
|
5905
|
-
if (override) return override;
|
|
5906
|
-
return gate.tree ? expandPath(root, gate.tree) : join22(stateDir, "gate", "tree");
|
|
5907
|
-
}
|
|
5908
|
-
function resolveLeaseFiles(files2, gateDir) {
|
|
5909
|
-
const resolve21 = (path) => path?.startsWith(GATE_DIR) ? join22(gateDir, path.slice(GATE_DIR.length)) : path;
|
|
5910
|
-
return Object.fromEntries(
|
|
5911
|
-
Object.entries(files2 ?? {}).map(([name, f]) => {
|
|
5912
|
-
const file2 = resolve21(f.file);
|
|
5913
|
-
const events2 = resolve21(f.events);
|
|
5914
|
-
return [
|
|
5915
|
-
name,
|
|
5916
|
-
{ ...file2 ? { file: file2 } : {}, ...events2 ? { events: events2 } : {} }
|
|
5917
|
-
];
|
|
5918
|
-
})
|
|
5919
|
-
);
|
|
5920
|
-
}
|
|
5921
|
-
function leaseFilesFor(root, stateDir, files2, gate, env) {
|
|
5922
|
-
if (!files2 || Object.keys(files2).length === 0) return {};
|
|
5923
|
-
return resolveLeaseFiles(
|
|
5924
|
-
files2,
|
|
5925
|
-
dirname11(gateTree(root, stateDir, gate ?? {}, env))
|
|
5926
|
-
);
|
|
5927
|
-
}
|
|
5928
|
-
|
|
5929
5961
|
// src/hooks/entry.ts
|
|
5930
5962
|
async function main(argv, root) {
|
|
5931
5963
|
if (argv[0] === "--state-dir") {
|
|
5932
5964
|
writeStdout(stateDirAnswer(root));
|
|
5933
5965
|
return 0;
|
|
5934
5966
|
}
|
|
5967
|
+
if (argv[0] === "--pause-file") {
|
|
5968
|
+
writeStdout(pauseFileAnswer(root));
|
|
5969
|
+
return 0;
|
|
5970
|
+
}
|
|
5935
5971
|
const projected = runtime(argv[0] ?? "");
|
|
5936
5972
|
const event = argv[1];
|
|
5937
5973
|
if (!projected || !NEUTRAL_EVENTS.includes(event) || !projected.nativeEvent(event)) {
|
|
@@ -5959,6 +5995,13 @@ async function main(argv, root) {
|
|
|
5959
5995
|
if (!input) return pass2();
|
|
5960
5996
|
const run3 = log.child({ session: input.session.id });
|
|
5961
5997
|
const stateDir = projectStateDir(root, compiled.stateDir);
|
|
5998
|
+
const pauseFile = pauseFileFor(
|
|
5999
|
+
root,
|
|
6000
|
+
stateDir,
|
|
6001
|
+
compiled.sessions.pauseFile,
|
|
6002
|
+
compiled.sessions.gate,
|
|
6003
|
+
process.env
|
|
6004
|
+
);
|
|
5962
6005
|
const store = createFilesStore(stateDir, {
|
|
5963
6006
|
...compiled.sessions,
|
|
5964
6007
|
leaseFiles: leaseFilesFor(
|
|
@@ -5967,7 +6010,8 @@ async function main(argv, root) {
|
|
|
5967
6010
|
compiled.sessions.leaseFiles,
|
|
5968
6011
|
compiled.sessions.gate,
|
|
5969
6012
|
process.env
|
|
5970
|
-
)
|
|
6013
|
+
),
|
|
6014
|
+
...pauseFile ? { pauseFile } : {}
|
|
5971
6015
|
});
|
|
5972
6016
|
const decision = await dispatch(input, compiled, {
|
|
5973
6017
|
log: run3,
|
|
@@ -68,6 +68,7 @@ interface CompiledPolicy {
|
|
|
68
68
|
readonly keepBroadcasts: number;
|
|
69
69
|
readonly mailbox?: MailboxSettings;
|
|
70
70
|
readonly leaseFiles?: Readonly<Record<string, LeaseFiles>>;
|
|
71
|
+
readonly pauseFile?: string;
|
|
71
72
|
readonly gate?: GateLocation;
|
|
72
73
|
};
|
|
73
74
|
readonly guards: readonly CompiledGuard[];
|
|
@@ -11,14 +11,14 @@ async function run(context) {
|
|
|
11
11
|
const [verb = "list", ...extra] = context.args.positional;
|
|
12
12
|
const usage = "Use hooks list, hooks test or hooks report";
|
|
13
13
|
if (extra.length) throw new ArgumentError(usage);
|
|
14
|
-
if (verb === "list") return (await import("./list-
|
|
15
|
-
if (verb === "test") return (await import("./test-
|
|
14
|
+
if (verb === "list") return (await import("./list-PCLCFG2J.js")).run(context);
|
|
15
|
+
if (verb === "test") return (await import("./test-M365FK5N.js")).run(context);
|
|
16
16
|
if (verb === "report")
|
|
17
|
-
return (await import("./report-
|
|
17
|
+
return (await import("./report-ZHOHQ4PZ.js")).run(context);
|
|
18
18
|
throw new ArgumentError(usage);
|
|
19
19
|
}
|
|
20
20
|
var hooksCommand = { ...hooksSpec, run };
|
|
21
21
|
export {
|
|
22
22
|
hooksCommand
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=hooks-
|
|
24
|
+
//# sourceMappingURL=hooks-MIF3FONJ.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-F5XMGOOX.js";
|
|
5
5
|
import {
|
|
6
6
|
specFrom
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PR2RBEXI.js";
|
|
8
8
|
import "./chunk-RPCIROW7.js";
|
|
9
9
|
import {
|
|
10
10
|
approvalDir,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
hostDigest,
|
|
13
13
|
projectedFiles,
|
|
14
14
|
writeApproval
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-7LUYI7QM.js";
|
|
16
|
+
import "./chunk-MLGXDSHZ.js";
|
|
17
17
|
import "./chunk-UKR64U7J.js";
|
|
18
18
|
import "./chunk-XZ2TDH3J.js";
|
|
19
19
|
import "./chunk-KUBHGVTD.js";
|
|
@@ -23,27 +23,27 @@ import "./chunk-LFFIQBNY.js";
|
|
|
23
23
|
import "./chunk-HQOB7OQS.js";
|
|
24
24
|
import "./chunk-73AKO4UL.js";
|
|
25
25
|
import "./chunk-P6LNYYYH.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-FE7WOHZM.js";
|
|
27
27
|
import "./chunk-2Q6MNGU5.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-7I7O7ZNT.js";
|
|
29
29
|
import {
|
|
30
30
|
ancestors
|
|
31
31
|
} from "./chunk-Z6WRFOFT.js";
|
|
32
32
|
import "./chunk-G7JONWL4.js";
|
|
33
33
|
import "./chunk-Q5H3L6Y4.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-7DYWCQVB.js";
|
|
35
35
|
import {
|
|
36
36
|
ArgumentError
|
|
37
37
|
} from "./chunk-A4PKLESO.js";
|
|
38
38
|
import "./chunk-V4NPDK6X.js";
|
|
39
39
|
import {
|
|
40
40
|
hostDoctor
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ULFV3EIZ.js";
|
|
42
42
|
import "./chunk-NRBQK6UX.js";
|
|
43
43
|
import "./chunk-OEH47H6A.js";
|
|
44
44
|
import "./chunk-IJBSOWHK.js";
|
|
45
45
|
import "./chunk-XWLMZKH2.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-JTRFZQTB.js";
|
|
47
47
|
import "./chunk-GJXOFDJT.js";
|
|
48
48
|
import "./chunk-PMJG2CXF.js";
|
|
49
49
|
import "./chunk-J6KL3COD.js";
|
|
@@ -183,7 +183,7 @@ async function runHost(context) {
|
|
|
183
183
|
return 1;
|
|
184
184
|
}
|
|
185
185
|
if (verb === "up" || verb === "down" || verb === "unit") {
|
|
186
|
-
const { runHostVerb } = await import("./host-run-
|
|
186
|
+
const { runHostVerb } = await import("./host-run-MJGJ7NVE.js");
|
|
187
187
|
return runHostVerb(verb, spec, context);
|
|
188
188
|
}
|
|
189
189
|
if (verb === "status") {
|
|
@@ -211,4 +211,4 @@ async function runHost(context) {
|
|
|
211
211
|
export {
|
|
212
212
|
runHost
|
|
213
213
|
};
|
|
214
|
-
//# sourceMappingURL=host-
|
|
214
|
+
//# sourceMappingURL=host-CE5TW5SC.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requireTerminal,
|
|
3
3
|
terminalSupport
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ESCOMAPX.js";
|
|
5
5
|
import "./chunk-5ZABTVSW.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-RZZZHQCE.js";
|
|
7
7
|
import "./chunk-LMT3PPXJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7Q3AIS4Q.js";
|
|
9
9
|
import "./chunk-R2GPCZUX.js";
|
|
10
10
|
import "./chunk-34DECPVC.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ULFV3EIZ.js";
|
|
12
12
|
import "./chunk-NRBQK6UX.js";
|
|
13
13
|
import "./chunk-OEH47H6A.js";
|
|
14
14
|
import "./chunk-IJBSOWHK.js";
|
|
15
15
|
import "./chunk-XWLMZKH2.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-JTRFZQTB.js";
|
|
17
17
|
import "./chunk-GJXOFDJT.js";
|
|
18
18
|
import "./chunk-PMJG2CXF.js";
|
|
19
19
|
import "./chunk-J6KL3COD.js";
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
requireTerminal,
|
|
22
22
|
terminalSupport
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=host-
|
|
24
|
+
//# sourceMappingURL=host-JKZLOCZS.js.map
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
approvalDir,
|
|
7
7
|
approvalState
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7LUYI7QM.js";
|
|
9
9
|
import {
|
|
10
10
|
ArgumentError
|
|
11
11
|
} from "./chunk-A4PKLESO.js";
|
|
12
12
|
import {
|
|
13
13
|
missingBinary,
|
|
14
14
|
ptyBinary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ULFV3EIZ.js";
|
|
16
16
|
import "./chunk-NRBQK6UX.js";
|
|
17
17
|
import {
|
|
18
18
|
projectStateDir
|
|
@@ -21,7 +21,7 @@ import "./chunk-IJBSOWHK.js";
|
|
|
21
21
|
import "./chunk-XWLMZKH2.js";
|
|
22
22
|
import {
|
|
23
23
|
VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JTRFZQTB.js";
|
|
25
25
|
import "./chunk-GJXOFDJT.js";
|
|
26
26
|
import "./chunk-PMJG2CXF.js";
|
|
27
27
|
import {
|
|
@@ -329,4 +329,4 @@ async function runHostVerb(verb, spec, context) {
|
|
|
329
329
|
export {
|
|
330
330
|
runHostVerb
|
|
331
331
|
};
|
|
332
|
-
//# sourceMappingURL=host-run-
|
|
332
|
+
//# sourceMappingURL=host-run-MJGJ7NVE.js.map
|
package/dist/http.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-P4N7DBD5.js";
|
|
7
7
|
import {
|
|
8
8
|
readMcp
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MLGXDSHZ.js";
|
|
10
10
|
import "./chunk-UKR64U7J.js";
|
|
11
11
|
import "./chunk-XZ2TDH3J.js";
|
|
12
12
|
import "./chunk-KUBHGVTD.js";
|
|
@@ -16,13 +16,13 @@ import "./chunk-LFFIQBNY.js";
|
|
|
16
16
|
import "./chunk-HQOB7OQS.js";
|
|
17
17
|
import "./chunk-73AKO4UL.js";
|
|
18
18
|
import "./chunk-P6LNYYYH.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-FE7WOHZM.js";
|
|
20
20
|
import "./chunk-2Q6MNGU5.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-7I7O7ZNT.js";
|
|
22
22
|
import "./chunk-Z6WRFOFT.js";
|
|
23
23
|
import "./chunk-G7JONWL4.js";
|
|
24
24
|
import "./chunk-Q5H3L6Y4.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-7DYWCQVB.js";
|
|
26
26
|
import {
|
|
27
27
|
ArgumentError,
|
|
28
28
|
many
|
|
@@ -30,14 +30,14 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
TOOLS
|
|
32
32
|
} from "./chunk-V4NPDK6X.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-ULFV3EIZ.js";
|
|
34
34
|
import {
|
|
35
35
|
ProjectError
|
|
36
36
|
} from "./chunk-NRBQK6UX.js";
|
|
37
37
|
import "./chunk-OEH47H6A.js";
|
|
38
38
|
import "./chunk-IJBSOWHK.js";
|
|
39
39
|
import "./chunk-XWLMZKH2.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-JTRFZQTB.js";
|
|
41
41
|
import "./chunk-GJXOFDJT.js";
|
|
42
42
|
import "./chunk-PMJG2CXF.js";
|
|
43
43
|
import "./chunk-J6KL3COD.js";
|
|
@@ -402,4 +402,4 @@ function importMcp(context) {
|
|
|
402
402
|
export {
|
|
403
403
|
importMcp
|
|
404
404
|
};
|
|
405
|
-
//# sourceMappingURL=import-mcp-
|
|
405
|
+
//# sourceMappingURL=import-mcp-T3GZYEE5.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { l as loadEmbedder, r as readCatalog } from './load-BEUBABtB.js';
|
|
|
5
5
|
export { D as DEFAULT_MODEL_ID, a as EmbeddingModel, b as EncoderDtype, E as EncoderOptions, c as EncoderSpec, R as ResolvedEncoder, e as embeddingModels, d as encoderSpec, r as resolveEncoder } from './encoder-DGRy9skC.js';
|
|
6
6
|
import { P as ProjectConfig, V as ValidationSettings, F as Finding$1 } from './config-DzHB75Jz.js';
|
|
7
7
|
export { C as CONFIG_FILE, a as CatalogSection, b as ConfigError, E as EmbeddingSection, f as findConfig, r as readConfig } from './config-DzHB75Jz.js';
|
|
8
|
-
import { S as ShellHookSpec, a as HookSpecs } from './hook-spec-
|
|
8
|
+
import { S as ShellHookSpec, a as HookSpecs } from './hook-spec-Bd24eo2L.js';
|
|
9
9
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
10
10
|
import { M as MailboxService } from './core-Sug_rZrx.js';
|
|
11
11
|
import 'zod';
|
|
@@ -304,7 +304,7 @@ declare function resolveSkillFileUri(uri: string, entries: readonly SkillEntry[]
|
|
|
304
304
|
} | null;
|
|
305
305
|
|
|
306
306
|
declare const SERVER_NAME = "pmcp";
|
|
307
|
-
declare const SERVER_VERSION = "0.22.
|
|
307
|
+
declare const SERVER_VERSION = "0.22.3";
|
|
308
308
|
declare function registerSkillTools(server: McpServer, tools: SkillTools): McpServer;
|
|
309
309
|
interface SkillMcpOptions extends SkillServerOptions {
|
|
310
310
|
readonly mailbox?: MailboxService;
|
package/dist/index.js
CHANGED
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
} from "./chunk-YOWIYFIV.js";
|
|
5
5
|
import {
|
|
6
6
|
doctor
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-WPX4ONFT.js";
|
|
8
|
+
import "./chunk-7LUYI7QM.js";
|
|
9
9
|
import "./chunk-JQVSDPFL.js";
|
|
10
10
|
import "./chunk-VJFEN6DJ.js";
|
|
11
11
|
import "./chunk-NHUMPEPV.js";
|
|
12
12
|
import "./chunk-TIA4SPU2.js";
|
|
13
13
|
import {
|
|
14
14
|
project
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HV52EUSL.js";
|
|
16
16
|
import "./chunk-P4N7DBD5.js";
|
|
17
17
|
import {
|
|
18
18
|
prepareSearch
|
|
19
19
|
} from "./chunk-NLHLA2N5.js";
|
|
20
20
|
import {
|
|
21
21
|
deadGlobs
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ONYZIC2F.js";
|
|
23
23
|
import {
|
|
24
24
|
plan,
|
|
25
25
|
readSpec
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MLGXDSHZ.js";
|
|
27
27
|
import "./chunk-UKR64U7J.js";
|
|
28
28
|
import "./chunk-XZ2TDH3J.js";
|
|
29
29
|
import "./chunk-KUBHGVTD.js";
|
|
@@ -33,13 +33,13 @@ import "./chunk-LFFIQBNY.js";
|
|
|
33
33
|
import "./chunk-HQOB7OQS.js";
|
|
34
34
|
import "./chunk-73AKO4UL.js";
|
|
35
35
|
import "./chunk-P6LNYYYH.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-FE7WOHZM.js";
|
|
37
37
|
import "./chunk-2Q6MNGU5.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-7I7O7ZNT.js";
|
|
39
39
|
import "./chunk-Z6WRFOFT.js";
|
|
40
40
|
import "./chunk-G7JONWL4.js";
|
|
41
41
|
import "./chunk-Q5H3L6Y4.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-7DYWCQVB.js";
|
|
43
43
|
import {
|
|
44
44
|
TOOLS
|
|
45
45
|
} from "./chunk-V4NPDK6X.js";
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
registerSkillsExtension,
|
|
83
83
|
resolveSkillFileUri,
|
|
84
84
|
skillFileUri
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-JUG4W7RF.js";
|
|
86
86
|
import {
|
|
87
87
|
normaliseIntent
|
|
88
88
|
} from "./chunk-6WXMJOMI.js";
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
import "./chunk-6STKGOCW.js";
|
|
118
118
|
import {
|
|
119
119
|
LOCK_FILE
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-ULFV3EIZ.js";
|
|
121
121
|
import {
|
|
122
122
|
ProjectError,
|
|
123
123
|
deriveName
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
import "./chunk-OEH47H6A.js";
|
|
126
126
|
import "./chunk-IJBSOWHK.js";
|
|
127
127
|
import "./chunk-XWLMZKH2.js";
|
|
128
|
-
import "./chunk-
|
|
128
|
+
import "./chunk-JTRFZQTB.js";
|
|
129
129
|
import {
|
|
130
130
|
CONFIG_FILE,
|
|
131
131
|
ConfigError,
|
|
@@ -6,9 +6,9 @@ import "./chunk-XNML2KIC.js";
|
|
|
6
6
|
// src/commands/init.ts
|
|
7
7
|
var initCommand = {
|
|
8
8
|
...initSpec,
|
|
9
|
-
run: async (context) => (await import("./run-
|
|
9
|
+
run: async (context) => (await import("./run-V74M7PZK.js")).run(context)
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
12
|
initCommand
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=init-
|
|
14
|
+
//# sourceMappingURL=init-D5VPDF2B.js.map
|