@modootoday/pmcp 0.22.2 → 0.22.4
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-D2VIRMFY.js} +13 -13
- package/dist/{broadcast-ZALGUJVR.js → broadcast-DZGMSZRG.js} +3 -3
- package/dist/{chunk-XZ2TDH3J.js → chunk-2A3F7ID4.js} +14 -5
- package/dist/{chunk-JP27V2H4.js → chunk-3IX5TBRW.js} +2 -2
- package/dist/{chunk-ZYLJUABY.js → chunk-5KA3RS5Y.js} +2 -2
- 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-U3IHGG7X.js → chunk-7XK2KWLJ.js} +3 -3
- package/dist/{chunk-7FV2LORT.js → chunk-B2WRYGHJ.js} +4 -3
- package/dist/{chunk-W6GA5RAW.js → chunk-CILQCERV.js} +2 -2
- package/dist/{chunk-5F7TL3V7.js → chunk-CPFJ7J4G.js} +6 -6
- package/dist/{chunk-NAXUAC5S.js → chunk-F34XIDXT.js} +2 -2
- package/dist/{chunk-NFJ44OE2.js → chunk-FE7WOHZM.js} +13 -4
- package/dist/{chunk-4Z6NPSWX.js → chunk-FFCDSSKA.js} +126 -37
- package/dist/{chunk-D2DDM5VZ.js → chunk-H45C5W2P.js} +2 -2
- package/dist/chunk-HOTGJQIV.js +7 -0
- package/dist/{chunk-G25LCRIG.js → chunk-JJT5XRMV.js} +2 -2
- package/dist/{chunk-SKOP4ZST.js → chunk-JONJ75SF.js} +5 -5
- package/dist/{chunk-GE2PHR35.js → chunk-KR6PFEWU.js} +3 -3
- package/dist/{chunk-U2NWTZQP.js → chunk-MIIGZRVC.js} +2 -2
- package/dist/{chunk-KLWZZTUQ.js → chunk-MTVRKWQI.js} +3 -3
- package/dist/{chunk-VGW3N3HC.js → chunk-NDY3T7Z4.js} +14 -14
- package/dist/{chunk-BUD3WS4Y.js → chunk-PFHSFYQB.js} +2 -2
- package/dist/{chunk-5A7QRZP6.js → chunk-QUBU3ETR.js} +5 -5
- package/dist/{chunk-KUBHGVTD.js → chunk-RRPNPZ6I.js} +16 -10
- package/dist/{chunk-GZQH3RJA.js → chunk-T7SLHAHQ.js} +3 -3
- package/dist/{chunk-FOIQUPIQ.js → chunk-TAVFL3YB.js} +2 -2
- package/dist/{chunk-T6MQPVLH.js → chunk-W4W3EHQP.js} +2 -2
- package/dist/{cli-6FWRBCWM.js → cli-34EDFXJA.js} +8 -8
- package/dist/{cli-BOSY6VFP.js → cli-VCKKTXUU.js} +6 -6
- package/dist/cli.js +3 -3
- package/dist/{completion-V756JVX6.js → completion-AAEBLVVB.js} +2 -2
- package/dist/{diagnostics-R7S3DNXD.js → diagnostics-3XI6SJXF.js} +5 -5
- package/dist/{doctor-44S5EWK5.js → doctor-GAJKPOKS.js} +14 -14
- package/dist/{entry-GSGCMXE5.js → entry-GZCLQTIN.js} +9 -9
- package/dist/{exec-mcp-3COXHDYT.js → exec-mcp-3V34UNPH.js} +10 -10
- package/dist/{harness-K4WL2NSH.js → harness-YH6U6MNV.js} +3 -3
- package/dist/harness-launch-gate.js +3 -3
- package/dist/harness-worker.js +5 -5
- package/dist/hook-body.js +281 -138
- package/dist/{hook-spec-hZL4MSgi.d.ts → hook-spec-Bd24eo2L.d.ts} +1 -0
- package/dist/{hooks-HQOLXR3A.js → hooks-JWB7D4ZB.js} +4 -4
- package/dist/{host-N5UILUK7.js → host-DLBXM72V.js} +6 -6
- package/dist/{host-4W3JUQAO.js → host-LNH3TUR5.js} +12 -12
- package/dist/{host-run-CVYRZB7R.js → host-run-FVO5PZK2.js} +4 -4
- package/dist/http.js +1 -1
- package/dist/{import-mcp-IAGC3LJU.js → import-mcp-O553FGF3.js} +9 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.js +13 -13
- package/dist/{init-HPEVKKMU.js → init-A6AAIGJU.js} +2 -2
- package/dist/{invoke-TD5YR2G7.js → invoke-GDELKQCE.js} +7 -7
- package/dist/{list-YUHJ5CTT.js → list-CQ4CPNWI.js} +11 -11
- package/dist/{logout-JQ5UPC5W.js → logout-TG32MVMB.js} +10 -10
- 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-FMZ44NFC.js} +31 -14
- package/dist/{mcp-B6SYBT3X.js → mcp-UYQVTWEF.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-NOTN6SMK.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-7UNRLLYD.js → run-77MDEDAX.js} +9 -9
- package/dist/{run-ZOSIKNDX.js → run-S5M6ZUUH.js} +4 -4
- package/dist/{serve-VRBL67KO.js → serve-YNHUW5PQ.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-SWQVPQG3.js} +10 -10
- package/dist/{status-3RTGDN2K.js → status-KN2ZE64O.js} +3 -3
- package/dist/{status-JN2GT5UM.js → status-NGO7AC3U.js} +12 -12
- package/dist/{status-ZY5B7V6R.js → status-YPFUSE7K.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-2UYV4LSU.js} +23 -16
- package/dist/{tui-GORRJIMA.js → tui-ZKP3D5JM.js} +4 -4
- package/dist/{unbroadcast-NTOC3PY3.js → unbroadcast-N6LXHAMT.js} +3 -3
- package/dist/{worker-LJG2NDMK.js → worker-7OBOBMWM.js} +7 -7
- package/dist/{worktree-list-EMKUMCTQ.js → worktree-list-6CCHXXOZ.js} +2 -2
- package/dist/{worktree-sync-A277AF4M.js → worktree-sync-5ZVA5PUC.js} +3 -3
- package/docs/commands.md +1 -1
- package/docs/git-workflow.md +7 -2
- 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
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-UKR64U7J.js";
|
|
4
4
|
import {
|
|
5
5
|
syncWorktree
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2A3F7ID4.js";
|
|
7
7
|
import {
|
|
8
8
|
localCli,
|
|
9
9
|
pmcpCommand,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
leaseSpecs,
|
|
30
30
|
readGitConfig
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-FE7WOHZM.js";
|
|
32
32
|
import {
|
|
33
33
|
detect
|
|
34
34
|
} from "./chunk-2Q6MNGU5.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
inboxKey,
|
|
37
37
|
noticeOf,
|
|
38
38
|
readStoreSettings
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7I7O7ZNT.js";
|
|
40
40
|
import {
|
|
41
41
|
STATE_FILES,
|
|
42
42
|
runtimePid
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
RUNTIME_IDS,
|
|
59
59
|
climbCommand,
|
|
60
60
|
readTestTable
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-7DYWCQVB.js";
|
|
62
62
|
import {
|
|
63
63
|
TOOLS
|
|
64
64
|
} from "./chunk-V4NPDK6X.js";
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
readHost,
|
|
69
69
|
readLock,
|
|
70
70
|
readLockFile
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-F34XIDXT.js";
|
|
72
72
|
import {
|
|
73
73
|
ProjectError,
|
|
74
74
|
RULES_DIR,
|
|
@@ -167,7 +167,7 @@ function shellWord(text) {
|
|
|
167
167
|
return pieces.join("");
|
|
168
168
|
}
|
|
169
169
|
function forwardedVariables(server) {
|
|
170
|
-
const
|
|
170
|
+
const names3 = new Set(server.envVars ?? []);
|
|
171
171
|
const words = [
|
|
172
172
|
server.command ?? "",
|
|
173
173
|
...server.args,
|
|
@@ -177,11 +177,11 @@ function forwardedVariables(server) {
|
|
|
177
177
|
for (const word of words) {
|
|
178
178
|
for (const match of word.matchAll(VARIABLE)) {
|
|
179
179
|
if (match[1] !== "PROJECT_ROOT") {
|
|
180
|
-
|
|
180
|
+
names3.add(match[1]);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
return [...
|
|
184
|
+
return [...names3].sort();
|
|
185
185
|
}
|
|
186
186
|
function launch(spec) {
|
|
187
187
|
if (spec.command === void 0) {
|
|
@@ -969,9 +969,9 @@ function hookOutputs(spec) {
|
|
|
969
969
|
}
|
|
970
970
|
|
|
971
971
|
// src/project/adapters/opencode-skills.ts
|
|
972
|
-
function opencodeSkillOutputs(spec,
|
|
972
|
+
function opencodeSkillOutputs(spec, names3) {
|
|
973
973
|
if (!spec.tools.has("opencode")) return [];
|
|
974
|
-
return
|
|
974
|
+
return names3.filter((name) => spec.skills[name]?.invocation === "user").map(
|
|
975
975
|
(name) => jsonOutput(OPENCODE_CONFIG, ["permission", "skill", name], "deny")
|
|
976
976
|
);
|
|
977
977
|
}
|
|
@@ -1478,9 +1478,9 @@ function agentNames(root) {
|
|
|
1478
1478
|
);
|
|
1479
1479
|
}
|
|
1480
1480
|
function skillOutputs(spec) {
|
|
1481
|
-
const
|
|
1482
|
-
const outputs = opencodeSkillOutputs(spec,
|
|
1483
|
-
for (const name of
|
|
1481
|
+
const names3 = skillNames(spec.root);
|
|
1482
|
+
const outputs = opencodeSkillOutputs(spec, names3);
|
|
1483
|
+
for (const name of names3) {
|
|
1484
1484
|
const target = `../../.agents/skills/${name}`;
|
|
1485
1485
|
if (spec.tools.has("claude")) {
|
|
1486
1486
|
outputs.push({ kind: "link", path: `.claude/skills/${name}`, target });
|
|
@@ -1694,11 +1694,11 @@ function checkBudget(spec, settings) {
|
|
|
1694
1694
|
}
|
|
1695
1695
|
const tracked = settings.packageBytes !== void 0 || settings.forbidPaths.length > 0 ? trackedFiles(spec.root) : [];
|
|
1696
1696
|
if (settings.packageBytes !== void 0) {
|
|
1697
|
-
const
|
|
1697
|
+
const names3 = new Set(
|
|
1698
1698
|
["AGENTS.md", spec.packageRules?.file].filter(Boolean)
|
|
1699
1699
|
);
|
|
1700
1700
|
for (const file of tracked) {
|
|
1701
|
-
if (!file.includes("/") || !
|
|
1701
|
+
if (!file.includes("/") || !names3.has(basename(file))) continue;
|
|
1702
1702
|
const path = join7(spec.root, file);
|
|
1703
1703
|
if (regularFile(path))
|
|
1704
1704
|
row("package_bytes", file, measure(path).bytes, settings.packageBytes);
|
|
@@ -2482,10 +2482,10 @@ function bypasses(step, options2) {
|
|
|
2482
2482
|
return options2.noVerify && name === "git" && step.argv.includes("--no-verify");
|
|
2483
2483
|
}
|
|
2484
2484
|
function fallback(command, options2) {
|
|
2485
|
-
const
|
|
2486
|
-
if (options2.noVerify)
|
|
2487
|
-
if (
|
|
2488
|
-
return new RegExp(`(?:^|[^\\w-])(?:${
|
|
2485
|
+
const names3 = options2.variables.map(escape);
|
|
2486
|
+
if (options2.noVerify) names3.push("--no-verify");
|
|
2487
|
+
if (names3.length === 0) return false;
|
|
2488
|
+
return new RegExp(`(?:^|[^\\w-])(?:${names3.join("|")})\\b`, "u").test(
|
|
2489
2489
|
command
|
|
2490
2490
|
);
|
|
2491
2491
|
}
|
|
@@ -3535,7 +3535,7 @@ function classEnd(pattern, start) {
|
|
|
3535
3535
|
function patternCost(pattern, flavor, onlyMatching, limits) {
|
|
3536
3536
|
const largest = Math.max(0, ...repetitionCounts(pattern, flavor));
|
|
3537
3537
|
if (largest > limits.threshold)
|
|
3538
|
-
return `a repetition count of ${largest} (the limit is ${limits.threshold})`;
|
|
3538
|
+
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`;
|
|
3539
3539
|
if (flavor === "perl" && nestedQuantifier(pattern))
|
|
3540
3540
|
return "a -P pattern with a quantified group inside a quantifier, such as (a+)+ or (.*)*";
|
|
3541
3541
|
if (limits.onlyMatchingWildcards && onlyMatching && (pattern.match(/\.\*/gu) ?? []).length > 1)
|
|
@@ -4000,8 +4000,8 @@ function claimants(store, session, root) {
|
|
|
4000
4000
|
(record) => record.live && record.session !== session && record.worktree === root
|
|
4001
4001
|
).map((record) => record.alias || record.session.slice(0, 8));
|
|
4002
4002
|
}
|
|
4003
|
-
function claimantNotice(root,
|
|
4004
|
-
return `Another live session works in ${root}: ${
|
|
4003
|
+
function claimantNotice(root, names3) {
|
|
4004
|
+
return `Another live session works in ${root}: ${names3.join(", ")}. Edit only files that are yours, and name every path when you commit.`;
|
|
4005
4005
|
}
|
|
4006
4006
|
|
|
4007
4007
|
// src/hooks/policies/workspace/leftovers.ts
|
|
@@ -4150,12 +4150,84 @@ var sharedCheckout = {
|
|
|
4150
4150
|
};
|
|
4151
4151
|
|
|
4152
4152
|
// src/hooks/policies/workspace/mainline-deliver.ts
|
|
4153
|
+
import { spawnSync as spawnSync5 } from "child_process";
|
|
4153
4154
|
import { resolve as resolve6 } from "path";
|
|
4154
4155
|
var PUSH = /\bgit\b[^|;&\n]*\spush\b/u;
|
|
4155
|
-
var REASON7 = "This repository's mainline moves only through pmcp git deliver, which replays, gates and pushes one delivery at a time. Commit, then run pmcp git deliver; other repositories push
|
|
4156
|
+
var REASON7 = "This repository's mainline moves only through pmcp git deliver, which replays, gates and pushes one delivery at a time. Commit, then run pmcp git deliver; other branches, other remotes and other repositories push as usual.";
|
|
4157
|
+
var VALUE_OPTIONS = /* @__PURE__ */ new Set([
|
|
4158
|
+
"--repo",
|
|
4159
|
+
"--receive-pack",
|
|
4160
|
+
"--exec",
|
|
4161
|
+
"-o",
|
|
4162
|
+
"--push-option"
|
|
4163
|
+
]);
|
|
4164
|
+
var EVERY_BRANCH = /* @__PURE__ */ new Set(["--all", "--branches", "--mirror"]);
|
|
4156
4165
|
function sameRepository(dir, commonDir) {
|
|
4157
4166
|
return checkoutOf(dir)?.commonDir === commonDir;
|
|
4158
4167
|
}
|
|
4168
|
+
function gitText2(dir, args) {
|
|
4169
|
+
const run3 = spawnSync5("git", ["-C", dir, ...args], {
|
|
4170
|
+
encoding: "utf8",
|
|
4171
|
+
timeout: 5e3
|
|
4172
|
+
});
|
|
4173
|
+
return run3.status === 0 ? run3.stdout.trim() : "";
|
|
4174
|
+
}
|
|
4175
|
+
function names2(ref, branch) {
|
|
4176
|
+
if (ref.includes("*")) return true;
|
|
4177
|
+
return [branch, `heads/${branch}`, `refs/heads/${branch}`].includes(ref);
|
|
4178
|
+
}
|
|
4179
|
+
function movesMainline(dir, args, options2) {
|
|
4180
|
+
const positional = [];
|
|
4181
|
+
let repo = "";
|
|
4182
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
4183
|
+
const word = args[index];
|
|
4184
|
+
if (word === "--") {
|
|
4185
|
+
positional.push(...args.slice(index + 1));
|
|
4186
|
+
break;
|
|
4187
|
+
}
|
|
4188
|
+
if (!word.startsWith("-") || word === "-") {
|
|
4189
|
+
positional.push(word);
|
|
4190
|
+
continue;
|
|
4191
|
+
}
|
|
4192
|
+
const option = word.split("=")[0];
|
|
4193
|
+
if (option === "-n" || option === "--dry-run") return false;
|
|
4194
|
+
if (/^-[a-zA-Z]+$/u.test(word) && word.includes("n")) return false;
|
|
4195
|
+
if (EVERY_BRANCH.has(option)) return true;
|
|
4196
|
+
if (VALUE_OPTIONS.has(option) && !word.includes("=")) {
|
|
4197
|
+
if (option === "--repo") repo = args[index + 1] ?? "";
|
|
4198
|
+
index += 1;
|
|
4199
|
+
continue;
|
|
4200
|
+
}
|
|
4201
|
+
if (option === "--repo") repo = word.slice("--repo=".length);
|
|
4202
|
+
}
|
|
4203
|
+
const ctx = detect(dir, {
|
|
4204
|
+
...options2.remote ? { remote: options2.remote } : {},
|
|
4205
|
+
...options2.branch ? { mainline: options2.branch } : {}
|
|
4206
|
+
});
|
|
4207
|
+
const remote = options2.remote ?? ctx?.remote ?? "origin";
|
|
4208
|
+
const branch = options2.branch ?? ctx?.mainline ?? "main";
|
|
4209
|
+
const target = positional[0] ?? repo;
|
|
4210
|
+
if (target && target !== remote && /^[\w.-]+$/u.test(target)) return false;
|
|
4211
|
+
const current = gitText2(dir, ["symbolic-ref", "--short", "-q", "HEAD"]);
|
|
4212
|
+
const refspecs = positional.slice(1);
|
|
4213
|
+
if (refspecs.length === 0) {
|
|
4214
|
+
if (!current) return false;
|
|
4215
|
+
const upstream = gitText2(dir, [
|
|
4216
|
+
"rev-parse",
|
|
4217
|
+
"--abbrev-ref",
|
|
4218
|
+
"--symbolic-full-name",
|
|
4219
|
+
"@{upstream}"
|
|
4220
|
+
]);
|
|
4221
|
+
return current === branch || upstream === `${remote}/${branch}`;
|
|
4222
|
+
}
|
|
4223
|
+
return refspecs.some((spec) => {
|
|
4224
|
+
const plain = spec.replace(/^\+/u, "");
|
|
4225
|
+
const colon = plain.indexOf(":");
|
|
4226
|
+
let dst = colon < 0 ? plain : plain.slice(colon + 1) || plain.slice(0, colon);
|
|
4227
|
+
if (dst === "HEAD" || dst === "@") dst = current;
|
|
4228
|
+
return dst !== "" && names2(dst, branch);
|
|
4229
|
+
});
|
|
4230
|
+
}
|
|
4159
4231
|
var mainlineDeliver = {
|
|
4160
4232
|
id: "git.mainline.deliver",
|
|
4161
4233
|
events: ["before_tool"],
|
|
@@ -4163,10 +4235,17 @@ var mainlineDeliver = {
|
|
|
4163
4235
|
fail: "closed",
|
|
4164
4236
|
defaultMode: "deny",
|
|
4165
4237
|
options(raw) {
|
|
4166
|
-
onlyKeys(raw, []);
|
|
4167
|
-
|
|
4238
|
+
onlyKeys(raw, ["remote", "branch"]);
|
|
4239
|
+
const text = (key) => {
|
|
4240
|
+
const value = raw[key];
|
|
4241
|
+
if (value === void 0) return {};
|
|
4242
|
+
if (typeof value !== "string" || value === "")
|
|
4243
|
+
throw new Error(`${key} must be a name`);
|
|
4244
|
+
return { [key]: value };
|
|
4245
|
+
};
|
|
4246
|
+
return { ...text("remote"), ...text("branch") };
|
|
4168
4247
|
},
|
|
4169
|
-
evaluate(input) {
|
|
4248
|
+
evaluate(input, ctx) {
|
|
4170
4249
|
const call = shellCall(input);
|
|
4171
4250
|
const project = checkoutOf(input.projectRoot);
|
|
4172
4251
|
if (!call || !project) return pass;
|
|
@@ -4179,7 +4258,8 @@ var mainlineDeliver = {
|
|
|
4179
4258
|
const git = gitCall(step.argv);
|
|
4180
4259
|
if (git.sub !== "push") continue;
|
|
4181
4260
|
const dir = resolve6(input.cwd, step.dir, git.dir);
|
|
4182
|
-
if (sameRepository(dir, project.commonDir))
|
|
4261
|
+
if (!sameRepository(dir, project.commonDir)) continue;
|
|
4262
|
+
if (movesMainline(dir, step.argv.slice(git.at + 1), ctx.options))
|
|
4183
4263
|
return { verdict: "deny", reason: REASON7 };
|
|
4184
4264
|
}
|
|
4185
4265
|
return pass;
|
|
@@ -4296,7 +4376,7 @@ var worktreeSync = {
|
|
|
4296
4376
|
};
|
|
4297
4377
|
|
|
4298
4378
|
// src/hooks/policies/custom.ts
|
|
4299
|
-
import { spawnSync as
|
|
4379
|
+
import { spawnSync as spawnSync6 } from "child_process";
|
|
4300
4380
|
import { createHash as createHash5 } from "crypto";
|
|
4301
4381
|
import { existsSync as existsSync9, readFileSync as readFileSync9, realpathSync as realpathSync3 } from "fs";
|
|
4302
4382
|
import { isAbsolute as isAbsolute7, relative as relative8, resolve as resolve8 } from "path";
|
|
@@ -4348,7 +4428,7 @@ function guardHash(root, command) {
|
|
|
4348
4428
|
return createHash5("sha256").update(readFileSync9(guardScript(root, command))).digest("hex");
|
|
4349
4429
|
}
|
|
4350
4430
|
function programVersion(program2, root, env = process.env) {
|
|
4351
|
-
const run3 =
|
|
4431
|
+
const run3 = spawnSync6(program2, ["--version"], {
|
|
4352
4432
|
cwd: root,
|
|
4353
4433
|
env: { PATH: env["PATH"], LANG: "C.UTF-8" },
|
|
4354
4434
|
encoding: "utf8",
|
|
@@ -4418,7 +4498,7 @@ function run2(entry, input, log) {
|
|
|
4418
4498
|
const args = entry.command.map(
|
|
4419
4499
|
(part) => part.startsWith(".agents/guards/") ? resolve8(root, part) : part
|
|
4420
4500
|
);
|
|
4421
|
-
const result =
|
|
4501
|
+
const result = spawnSync6(args[0], args.slice(1), {
|
|
4422
4502
|
cwd: root,
|
|
4423
4503
|
env: { PATH: process.env["PATH"], LANG: "C.UTF-8" },
|
|
4424
4504
|
input: request(entry, input),
|
|
@@ -4700,7 +4780,7 @@ function readCustom(root, hooks, guards) {
|
|
|
4700
4780
|
[hooks["edit"], "after_edit"],
|
|
4701
4781
|
[guards["custom"], void 0]
|
|
4702
4782
|
];
|
|
4703
|
-
const
|
|
4783
|
+
const names3 = /* @__PURE__ */ new Set();
|
|
4704
4784
|
const found = [];
|
|
4705
4785
|
for (const [list2, implied] of sources) {
|
|
4706
4786
|
if (list2 === void 0) continue;
|
|
@@ -4708,9 +4788,9 @@ function readCustom(root, hooks, guards) {
|
|
|
4708
4788
|
throw new Error("custom guards must be arrays of tables");
|
|
4709
4789
|
for (const value of list2) {
|
|
4710
4790
|
const entry = readEntry(root, value, implied);
|
|
4711
|
-
if (
|
|
4791
|
+
if (names3.has(entry.name))
|
|
4712
4792
|
throw new Error("shell names must be unique lowercase names");
|
|
4713
|
-
|
|
4793
|
+
names3.add(entry.name);
|
|
4714
4794
|
if (entry.mode !== "off") found.push(entry);
|
|
4715
4795
|
}
|
|
4716
4796
|
}
|
|
@@ -4905,6 +4985,7 @@ function readHooksTable(table3, tools) {
|
|
|
4905
4985
|
var KEYS5 = [
|
|
4906
4986
|
"store",
|
|
4907
4987
|
"state_dir",
|
|
4988
|
+
"pause_file",
|
|
4908
4989
|
"registry",
|
|
4909
4990
|
"pause",
|
|
4910
4991
|
"broadcast",
|
|
@@ -5083,9 +5164,16 @@ function readMainlineDeliver(tables, root) {
|
|
|
5083
5164
|
dir: root,
|
|
5084
5165
|
raw: { git: tables.git, sessions: tables.sessions }
|
|
5085
5166
|
};
|
|
5086
|
-
const
|
|
5087
|
-
if (!deliver?.refuseDirectPush) return null;
|
|
5088
|
-
return {
|
|
5167
|
+
const git = readGitConfig(config);
|
|
5168
|
+
if (!git?.deliver?.refuseDirectPush) return null;
|
|
5169
|
+
return {
|
|
5170
|
+
id: "git.mainline.deliver",
|
|
5171
|
+
mode: "deny",
|
|
5172
|
+
options: {
|
|
5173
|
+
...git.remote ? { remote: git.remote } : {},
|
|
5174
|
+
...git.mainline ? { branch: git.mainline } : {}
|
|
5175
|
+
}
|
|
5176
|
+
};
|
|
5089
5177
|
}
|
|
5090
5178
|
|
|
5091
5179
|
// src/hooks/compile.ts
|
|
@@ -5141,6 +5229,7 @@ function compileHooks(tables, options2) {
|
|
|
5141
5229
|
...sessions.mailbox?.enabled ? { mailbox: sessions.mailbox } : {},
|
|
5142
5230
|
// Only when declared, like the mailbox, so other projects keep the same policy.json.
|
|
5143
5231
|
...sessions.leaseFiles ? { leaseFiles: sessions.leaseFiles } : {},
|
|
5232
|
+
...sessions.pauseFile ? { pauseFile: sessions.pauseFile } : {},
|
|
5144
5233
|
...sessions.gate ? { gate: sessions.gate } : {}
|
|
5145
5234
|
},
|
|
5146
5235
|
guards,
|
|
@@ -5424,4 +5513,4 @@ export {
|
|
|
5424
5513
|
checkBudget,
|
|
5425
5514
|
readSpec
|
|
5426
5515
|
};
|
|
5427
|
-
//# sourceMappingURL=chunk-
|
|
5516
|
+
//# sourceMappingURL=chunk-FFCDSSKA.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-34DECPVC.js";
|
|
4
4
|
import {
|
|
5
5
|
ptyBinary
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-F34XIDXT.js";
|
|
7
7
|
import {
|
|
8
8
|
GroupStore,
|
|
9
9
|
egressPolicy,
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
prepareBridge,
|
|
776
776
|
assertBridge
|
|
777
777
|
};
|
|
778
|
-
//# sourceMappingURL=chunk-
|
|
778
|
+
//# sourceMappingURL=chunk-H45C5W2P.js.map
|
|
@@ -1190,7 +1190,7 @@ function registerReadTool(server, tools) {
|
|
|
1190
1190
|
|
|
1191
1191
|
// src/mcp.ts
|
|
1192
1192
|
var SERVER_NAME = "pmcp";
|
|
1193
|
-
var SERVER_VERSION = "0.22.
|
|
1193
|
+
var SERVER_VERSION = "0.22.4";
|
|
1194
1194
|
var MAX_TOOL_INPUT_ELEMENTS = 1e4;
|
|
1195
1195
|
function registerSkillTools(server, tools) {
|
|
1196
1196
|
registerCatalogTool(server, tools);
|
|
@@ -1247,4 +1247,4 @@ export {
|
|
|
1247
1247
|
registerSkillTools,
|
|
1248
1248
|
createSkillServer
|
|
1249
1249
|
};
|
|
1250
|
-
//# sourceMappingURL=chunk-
|
|
1250
|
+
//# sourceMappingURL=chunk-JJT5XRMV.js.map
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
observeSession,
|
|
8
8
|
openGroup,
|
|
9
9
|
runOperation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KR6PFEWU.js";
|
|
11
11
|
import {
|
|
12
12
|
nativeHostTools
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W4W3EHQP.js";
|
|
14
14
|
import {
|
|
15
15
|
locateExecutable
|
|
16
16
|
} from "./chunk-R2GPCZUX.js";
|
|
17
17
|
import {
|
|
18
18
|
artifact,
|
|
19
19
|
stateDirectory
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-H45C5W2P.js";
|
|
21
21
|
import {
|
|
22
22
|
ptyBinary
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-F34XIDXT.js";
|
|
24
24
|
import {
|
|
25
25
|
GroupStore,
|
|
26
26
|
privateJson
|
|
@@ -249,4 +249,4 @@ async function invoke(operation) {
|
|
|
249
249
|
export {
|
|
250
250
|
invoke
|
|
251
251
|
};
|
|
252
|
-
//# sourceMappingURL=chunk-
|
|
252
|
+
//# sourceMappingURL=chunk-JONJ75SF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertNativeHost
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4W3EHQP.js";
|
|
4
4
|
import {
|
|
5
5
|
locateExecutable
|
|
6
6
|
} from "./chunk-R2GPCZUX.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resourceClaim,
|
|
34
34
|
resourceRunning,
|
|
35
35
|
runtimeUnit
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-H45C5W2P.js";
|
|
37
37
|
import {
|
|
38
38
|
command
|
|
39
39
|
} from "./chunk-34DECPVC.js";
|
|
@@ -1981,4 +1981,4 @@ export {
|
|
|
1981
1981
|
isReadOnly,
|
|
1982
1982
|
runOperation
|
|
1983
1983
|
};
|
|
1984
|
-
//# sourceMappingURL=chunk-
|
|
1984
|
+
//# sourceMappingURL=chunk-KR6PFEWU.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RPCIROW7.js";
|
|
4
4
|
import {
|
|
5
5
|
readSpec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FFCDSSKA.js";
|
|
7
7
|
import {
|
|
8
8
|
ArgumentError
|
|
9
9
|
} from "./chunk-A4PKLESO.js";
|
|
@@ -25,4 +25,4 @@ function serverFrom(context) {
|
|
|
25
25
|
export {
|
|
26
26
|
serverFrom
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-MIIGZRVC.js.map
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
splitKeyed,
|
|
20
20
|
versionMatches,
|
|
21
21
|
withoutBlock
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FFCDSSKA.js";
|
|
23
23
|
import {
|
|
24
24
|
lockVersionProblem,
|
|
25
25
|
readLock,
|
|
26
26
|
replaceFile
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-F34XIDXT.js";
|
|
28
28
|
import {
|
|
29
29
|
ProjectError,
|
|
30
30
|
RULES_DIR,
|
|
@@ -271,4 +271,4 @@ export {
|
|
|
271
271
|
prepare,
|
|
272
272
|
checkProject
|
|
273
273
|
};
|
|
274
|
-
//# sourceMappingURL=chunk-
|
|
274
|
+
//# sourceMappingURL=chunk-MTVRKWQI.js.map
|
|
@@ -61,11 +61,11 @@ var completionSpec = {
|
|
|
61
61
|
var COMMANDS = [
|
|
62
62
|
{
|
|
63
63
|
...statusSpec,
|
|
64
|
-
load: async () => (await import("./status-
|
|
64
|
+
load: async () => (await import("./status-NGO7AC3U.js")).statusCommand
|
|
65
65
|
},
|
|
66
|
-
{ ...initSpec, load: async () => (await import("./init-
|
|
67
|
-
{ ...hooksSpec, load: async () => (await import("./hooks-
|
|
68
|
-
{ ...serveSpec, load: async () => (await import("./serve-
|
|
66
|
+
{ ...initSpec, load: async () => (await import("./init-A6AAIGJU.js")).initCommand },
|
|
67
|
+
{ ...hooksSpec, load: async () => (await import("./hooks-JWB7D4ZB.js")).hooksCommand },
|
|
68
|
+
{ ...serveSpec, load: async () => (await import("./serve-YNHUW5PQ.js")).serveCommand },
|
|
69
69
|
{ ...listSpec, load: async () => (await import("./list-WK2IYUK7.js")).listCommand },
|
|
70
70
|
{
|
|
71
71
|
...indexSpec,
|
|
@@ -102,19 +102,19 @@ var COMMANDS = [
|
|
|
102
102
|
{ ...syncSpec, load: async () => (await import("./install-7V6NIA7W.js")).syncCommand },
|
|
103
103
|
{
|
|
104
104
|
...projectSpec,
|
|
105
|
-
load: async () => (await import("./project-
|
|
105
|
+
load: async () => (await import("./project-NOTN6SMK.js")).projectCommand
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
...doctorSpec,
|
|
109
|
-
load: async () => (await import("./doctor-
|
|
109
|
+
load: async () => (await import("./doctor-GAJKPOKS.js")).doctorCommand
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
...sessionsSpec,
|
|
113
|
-
load: async () => (await import("./cli-
|
|
113
|
+
load: async () => (await import("./cli-34EDFXJA.js")).sessionsCommand
|
|
114
114
|
},
|
|
115
|
-
{ ...logsSpec, load: async () => (await import("./logs-
|
|
116
|
-
{ ...gitSpec, load: async () => (await import("./cli-
|
|
117
|
-
{ ...mcpSpec, load: async () => (await import("./mcp-
|
|
115
|
+
{ ...logsSpec, load: async () => (await import("./logs-UHJM7ZCL.js")).logsCommand },
|
|
116
|
+
{ ...gitSpec, load: async () => (await import("./cli-VCKKTXUU.js")).gitCommand },
|
|
117
|
+
{ ...mcpSpec, load: async () => (await import("./mcp-UYQVTWEF.js")).mcpCommand },
|
|
118
118
|
{
|
|
119
119
|
...validateSpec,
|
|
120
120
|
load: async () => (await import("./validate-KFBCUFI4.js")).validateCommand
|
|
@@ -125,16 +125,16 @@ var COMMANDS = [
|
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
...harnessSpec,
|
|
128
|
-
load: async () => (await import("./harness-
|
|
128
|
+
load: async () => (await import("./harness-YH6U6MNV.js")).harnessCommand
|
|
129
129
|
},
|
|
130
|
-
{ ...tuiSpec, load: async () => (await import("./tui-
|
|
130
|
+
{ ...tuiSpec, load: async () => (await import("./tui-ZKP3D5JM.js")).tuiCommand },
|
|
131
131
|
{
|
|
132
132
|
...marketplaceSpec,
|
|
133
133
|
load: async () => (await import("./marketplace-G4VQET5W.js")).marketplaceCommand
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
...completionSpec,
|
|
137
|
-
load: async () => (await import("./completion-
|
|
137
|
+
load: async () => (await import("./completion-AAEBLVVB.js")).completionCommand
|
|
138
138
|
}
|
|
139
139
|
];
|
|
140
140
|
var PLANNED = [];
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
PLANNED,
|
|
149
149
|
commandNamed
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-NDY3T7Z4.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
nativeBinary,
|
|
9
9
|
ptyBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-F34XIDXT.js";
|
|
11
11
|
|
|
12
12
|
// src/tui/rust.ts
|
|
13
13
|
import { spawn } from "child_process";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
runTui,
|
|
63
63
|
dependencies
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-PFHSFYQB.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
prepare,
|
|
8
8
|
present,
|
|
9
9
|
writeNative
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MTVRKWQI.js";
|
|
11
11
|
import {
|
|
12
12
|
ANTIGRAVITY_MCP_PLUGIN,
|
|
13
13
|
BUNDLE_NATIVE_FILES,
|
|
@@ -21,16 +21,16 @@ import {
|
|
|
21
21
|
same,
|
|
22
22
|
splitKeyed,
|
|
23
23
|
withoutBlock
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FFCDSSKA.js";
|
|
25
25
|
import {
|
|
26
26
|
HOOK_DIRECTORY
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-7DYWCQVB.js";
|
|
28
28
|
import {
|
|
29
29
|
LOCK_FILE,
|
|
30
30
|
replaceFile,
|
|
31
31
|
replaceLink,
|
|
32
32
|
writeLock
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-F34XIDXT.js";
|
|
34
34
|
import {
|
|
35
35
|
RULES_DIR,
|
|
36
36
|
legacyLinks
|
|
@@ -400,4 +400,4 @@ export {
|
|
|
400
400
|
unmanagedHooks,
|
|
401
401
|
describeHookProblem
|
|
402
402
|
};
|
|
403
|
-
//# sourceMappingURL=chunk-
|
|
403
|
+
//# sourceMappingURL=chunk-QUBU3ETR.js.map
|
|
@@ -52,8 +52,18 @@ function pinsSuperseded(cwd, upstream, sha) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// src/git/landed.ts
|
|
55
|
+
var GitReadError = class extends Error {
|
|
56
|
+
};
|
|
57
|
+
function read(cwd, args) {
|
|
58
|
+
const run = git(cwd, args);
|
|
59
|
+
if (run.status !== 0)
|
|
60
|
+
throw new GitReadError(
|
|
61
|
+
`git ${args.join(" ")} failed (exit ${run.status}); nothing was chosen: ${run.stderr.trim()}`
|
|
62
|
+
);
|
|
63
|
+
return run.stdout;
|
|
64
|
+
}
|
|
55
65
|
function cherry(cwd, upstream, head = "HEAD") {
|
|
56
|
-
const listed =
|
|
66
|
+
const listed = read(cwd, ["cherry", "-v", upstream, head]);
|
|
57
67
|
const carried = [];
|
|
58
68
|
const missing = [];
|
|
59
69
|
for (const line of listed.split("\n")) {
|
|
@@ -72,14 +82,9 @@ function undelivered(cwd, upstream, named) {
|
|
|
72
82
|
);
|
|
73
83
|
const shas = [];
|
|
74
84
|
for (const ref of named) {
|
|
75
|
-
const sha =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"-q",
|
|
79
|
-
`${ref}^{commit}`
|
|
80
|
-
]);
|
|
81
|
-
if (!sha) throw new Error(`${ref} is not a commit`);
|
|
82
|
-
const listed = git(cwd, ["cherry", upstream, sha, `${sha}^`]).stdout;
|
|
85
|
+
const sha = read(cwd, ["rev-parse", "--verify", `${ref}^{commit}`]).trim();
|
|
86
|
+
if (!sha) throw new GitReadError(`${ref} is not a commit`);
|
|
87
|
+
const listed = read(cwd, ["cherry", upstream, sha, `${sha}^`]);
|
|
83
88
|
if (listed.startsWith("+ ") && !pinsSuperseded(cwd, upstream, sha))
|
|
84
89
|
shas.push(sha);
|
|
85
90
|
}
|
|
@@ -117,10 +122,11 @@ function distance(cwd, upstream) {
|
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
export {
|
|
125
|
+
GitReadError,
|
|
120
126
|
cherry,
|
|
121
127
|
undelivered,
|
|
122
128
|
touchedPaths,
|
|
123
129
|
isAncestor,
|
|
124
130
|
distance
|
|
125
131
|
};
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-RRPNPZ6I.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
POLICIES,
|
|
6
6
|
customMode,
|
|
7
7
|
customPolicy
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FFCDSSKA.js";
|
|
9
9
|
import {
|
|
10
10
|
RUNTIMES
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7DYWCQVB.js";
|
|
12
12
|
|
|
13
13
|
// src/hooks/inspection/list.ts
|
|
14
14
|
function policyRows(compiled) {
|
|
@@ -42,4 +42,4 @@ function policyRows(compiled) {
|
|
|
42
42
|
export {
|
|
43
43
|
policyRows
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-T7SLHAHQ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RPCIROW7.js";
|
|
4
4
|
import {
|
|
5
5
|
readSpec
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FFCDSSKA.js";
|
|
7
7
|
import {
|
|
8
8
|
ArgumentError
|
|
9
9
|
} from "./chunk-A4PKLESO.js";
|
|
@@ -28,4 +28,4 @@ function specFrom(context) {
|
|
|
28
28
|
export {
|
|
29
29
|
specFrom
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-TAVFL3YB.js.map
|