@modootoday/pmcp 0.22.3 → 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-CYVC5LDG.js → apply-D2VIRMFY.js} +9 -9
- package/dist/{chunk-XZ2TDH3J.js → chunk-2A3F7ID4.js} +14 -5
- package/dist/{chunk-7LUYI7QM.js → chunk-3IX5TBRW.js} +2 -2
- package/dist/{chunk-V7LZTVWS.js → chunk-5KA3RS5Y.js} +2 -2
- package/dist/{chunk-ESCOMAPX.js → chunk-7XK2KWLJ.js} +3 -3
- package/dist/{chunk-WPX4ONFT.js → chunk-CPFJ7J4G.js} +5 -5
- package/dist/{chunk-ULFV3EIZ.js → chunk-F34XIDXT.js} +2 -2
- package/dist/{chunk-MLGXDSHZ.js → chunk-FFCDSSKA.js} +120 -33
- package/dist/{chunk-UQNRGU3V.js → chunk-H45C5W2P.js} +2 -2
- package/dist/chunk-HOTGJQIV.js +7 -0
- package/dist/{chunk-JUG4W7RF.js → chunk-JJT5XRMV.js} +2 -2
- package/dist/{chunk-ICZH4NFR.js → chunk-JONJ75SF.js} +5 -5
- package/dist/{chunk-NQFULJZC.js → chunk-KR6PFEWU.js} +3 -3
- package/dist/{chunk-MZF7VOQA.js → chunk-MIIGZRVC.js} +2 -2
- package/dist/{chunk-ONYZIC2F.js → chunk-MTVRKWQI.js} +3 -3
- package/dist/{chunk-CALWIRAI.js → chunk-NDY3T7Z4.js} +12 -12
- package/dist/{chunk-RZZZHQCE.js → chunk-PFHSFYQB.js} +2 -2
- package/dist/{chunk-HV52EUSL.js → chunk-QUBU3ETR.js} +4 -4
- package/dist/{chunk-KUBHGVTD.js → chunk-RRPNPZ6I.js} +16 -10
- package/dist/{chunk-MQMWVJZB.js → chunk-T7SLHAHQ.js} +2 -2
- package/dist/{chunk-PR2RBEXI.js → chunk-TAVFL3YB.js} +2 -2
- package/dist/{chunk-7Q3AIS4Q.js → chunk-W4W3EHQP.js} +2 -2
- package/dist/{cli-A6HKRICM.js → cli-VCKKTXUU.js} +5 -5
- package/dist/cli.js +3 -3
- package/dist/{completion-FDLVWLAC.js → completion-AAEBLVVB.js} +2 -2
- package/dist/{diagnostics-DYLW7WYV.js → diagnostics-3XI6SJXF.js} +5 -5
- package/dist/{doctor-FRQ5H5FU.js → doctor-GAJKPOKS.js} +11 -11
- package/dist/{entry-XPZZNQ4L.js → entry-GZCLQTIN.js} +9 -9
- package/dist/{exec-mcp-HOM2ZANM.js → exec-mcp-3V34UNPH.js} +7 -7
- package/dist/{harness-WIGJRE5P.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 +173 -74
- package/dist/{hooks-MIF3FONJ.js → hooks-JWB7D4ZB.js} +3 -3
- package/dist/{host-JKZLOCZS.js → host-DLBXM72V.js} +6 -6
- package/dist/{host-CE5TW5SC.js → host-LNH3TUR5.js} +9 -9
- package/dist/{host-run-MJGJ7NVE.js → host-run-FVO5PZK2.js} +4 -4
- package/dist/http.js +1 -1
- package/dist/{import-mcp-T3GZYEE5.js → import-mcp-O553FGF3.js} +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/{init-D5VPDF2B.js → init-A6AAIGJU.js} +2 -2
- package/dist/{invoke-HEAOQLFQ.js → invoke-GDELKQCE.js} +7 -7
- package/dist/{list-PCLCFG2J.js → list-CQ4CPNWI.js} +8 -8
- package/dist/{logout-3ZXFXKHB.js → logout-TG32MVMB.js} +7 -7
- package/dist/{mainline-6CTSVOWP.js → mainline-FMZ44NFC.js} +22 -8
- package/dist/{mcp-T6PYHRUL.js → mcp-UYQVTWEF.js} +2 -2
- package/dist/{project-H4R3Q3QO.js → project-NOTN6SMK.js} +4 -4
- package/dist/{run-V74M7PZK.js → run-77MDEDAX.js} +6 -6
- package/dist/{run-FMTHUOAZ.js → run-S5M6ZUUH.js} +4 -4
- package/dist/{serve-JKNEC4AX.js → serve-YNHUW5PQ.js} +3 -3
- package/dist/{start-login-JRMVLK5J.js → start-login-SWQVPQG3.js} +7 -7
- package/dist/{status-RG2GFDQU.js → status-NGO7AC3U.js} +8 -8
- package/dist/{status-6273XFHT.js → status-YPFUSE7K.js} +7 -7
- package/dist/stdio.js +2 -2
- package/dist/{test-M365FK5N.js → test-2UYV4LSU.js} +7 -7
- package/dist/{tui-PKPYE76A.js → tui-ZKP3D5JM.js} +4 -4
- package/dist/{worker-C23EAPCY.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/git-workflow.md +6 -2
- package/gemini-extension.json +2 -2
- package/mcp.json +1 -1
- package/package.json +5 -5
- package/plugin.json +1 -1
- package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
- package/plugins/pmcp/.mcp.json +1 -1
- package/plugins/pmcp/gemini-extension.json +2 -2
- package/plugins/pmcp/mcp.json +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/dist/chunk-JTRFZQTB.js +0 -7
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
},
|
|
613
613
|
{
|
|
614
614
|
"name": "pmcp",
|
|
615
|
-
"version": "0.22.
|
|
615
|
+
"version": "0.22.4",
|
|
616
616
|
"description": "Find package skills and use native runtime project configuration.",
|
|
617
617
|
"source": { "source": "local", "path": "./plugins/pmcp" },
|
|
618
618
|
"policy": { "installation": "AVAILABLE", "authentication": "ON_USE" },
|
package/.mcp.json
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-PEMMV5YQ.js";
|
|
4
4
|
import {
|
|
5
5
|
specFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TAVFL3YB.js";
|
|
7
7
|
import {
|
|
8
8
|
printSmoke,
|
|
9
9
|
runSmoke
|
|
@@ -15,17 +15,17 @@ import {
|
|
|
15
15
|
describeHookProblem,
|
|
16
16
|
project,
|
|
17
17
|
unmanagedHookProblems
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QUBU3ETR.js";
|
|
19
19
|
import "./chunk-P4N7DBD5.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-MTVRKWQI.js";
|
|
21
21
|
import {
|
|
22
22
|
checkBudget,
|
|
23
23
|
renderFrontmatter,
|
|
24
24
|
splitFrontmatter
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-FFCDSSKA.js";
|
|
26
26
|
import "./chunk-UKR64U7J.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-2A3F7ID4.js";
|
|
28
|
+
import "./chunk-RRPNPZ6I.js";
|
|
29
29
|
import "./chunk-EATCUWGG.js";
|
|
30
30
|
import "./chunk-OFJIMBTL.js";
|
|
31
31
|
import "./chunk-LFFIQBNY.js";
|
|
@@ -53,14 +53,14 @@ import {
|
|
|
53
53
|
import "./chunk-YSAWTGNA.js";
|
|
54
54
|
import {
|
|
55
55
|
recordProjector
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-F34XIDXT.js";
|
|
57
57
|
import {
|
|
58
58
|
ProjectError
|
|
59
59
|
} from "./chunk-NRBQK6UX.js";
|
|
60
60
|
import "./chunk-OEH47H6A.js";
|
|
61
61
|
import "./chunk-IJBSOWHK.js";
|
|
62
62
|
import "./chunk-XWLMZKH2.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-HOTGJQIV.js";
|
|
64
64
|
import "./chunk-GJXOFDJT.js";
|
|
65
65
|
import "./chunk-PMJG2CXF.js";
|
|
66
66
|
import "./chunk-J6KL3COD.js";
|
|
@@ -275,4 +275,4 @@ export {
|
|
|
275
275
|
projectOrCheck,
|
|
276
276
|
removeAndProject
|
|
277
277
|
};
|
|
278
|
-
//# sourceMappingURL=apply-
|
|
278
|
+
//# sourceMappingURL=apply-D2VIRMFY.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
GitReadError,
|
|
2
3
|
cherry,
|
|
3
4
|
distance
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RRPNPZ6I.js";
|
|
5
6
|
import {
|
|
6
7
|
reportModes,
|
|
7
8
|
restoreModes,
|
|
@@ -178,15 +179,23 @@ function updateToPins(root, paths) {
|
|
|
178
179
|
|
|
179
180
|
// src/git/worktrees/sync.ts
|
|
180
181
|
function heldBy(root, upstream, ahead) {
|
|
181
|
-
const
|
|
182
|
+
const status = git(root, [
|
|
182
183
|
"status",
|
|
183
184
|
"--porcelain",
|
|
184
185
|
"--untracked-files=no",
|
|
185
186
|
"--ignore-submodules=all"
|
|
186
187
|
]);
|
|
187
|
-
if (
|
|
188
|
+
if (status.status !== 0)
|
|
189
|
+
return `git status failed (exit ${status.status}): ${status.stderr.trim()}`;
|
|
190
|
+
if (status.stdout.trim()) return "uncommitted changes";
|
|
188
191
|
if (ahead === 0) return null;
|
|
189
|
-
|
|
192
|
+
let own;
|
|
193
|
+
try {
|
|
194
|
+
own = cherry(root, upstream).missing.length;
|
|
195
|
+
} catch (error) {
|
|
196
|
+
if (error instanceof GitReadError) return error.message;
|
|
197
|
+
throw error;
|
|
198
|
+
}
|
|
190
199
|
if (own > 0) return `${own} unlanded commit(s)`;
|
|
191
200
|
return null;
|
|
192
201
|
}
|
|
@@ -252,4 +261,4 @@ export {
|
|
|
252
261
|
followPins,
|
|
253
262
|
syncWorktree
|
|
254
263
|
};
|
|
255
|
-
//# sourceMappingURL=chunk-
|
|
264
|
+
//# sourceMappingURL=chunk-2A3F7ID4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HOST_MANIFEST,
|
|
3
3
|
HOST_POLICY
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F34XIDXT.js";
|
|
5
5
|
import {
|
|
6
6
|
projectStateDir
|
|
7
7
|
} from "./chunk-OEH47H6A.js";
|
|
@@ -99,4 +99,4 @@ export {
|
|
|
99
99
|
hostApprovalDoctor,
|
|
100
100
|
writeApproval
|
|
101
101
|
};
|
|
102
|
-
//# sourceMappingURL=chunk-
|
|
102
|
+
//# sourceMappingURL=chunk-3IX5TBRW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSkillServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JJT5XRMV.js";
|
|
4
4
|
import {
|
|
5
5
|
attachMailbox
|
|
6
6
|
} from "./chunk-JZKAJUVT.js";
|
|
@@ -84,4 +84,4 @@ export {
|
|
|
84
84
|
serveWithMailbox,
|
|
85
85
|
main
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-5KA3RS5Y.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-5ZABTVSW.js";
|
|
4
4
|
import {
|
|
5
5
|
dependencies
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PFHSFYQB.js";
|
|
7
7
|
import {
|
|
8
8
|
interactiveEntry
|
|
9
9
|
} from "./chunk-LMT3PPXJ.js";
|
|
10
10
|
import {
|
|
11
11
|
assertNativeHost
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-W4W3EHQP.js";
|
|
13
13
|
|
|
14
14
|
// src/tui/startup/host.ts
|
|
15
15
|
function terminalSupport() {
|
|
@@ -42,4 +42,4 @@ export {
|
|
|
42
42
|
terminalSupport,
|
|
43
43
|
requireTerminal
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=chunk-
|
|
45
|
+
//# sourceMappingURL=chunk-7XK2KWLJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hostApprovalDoctor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3IX5TBRW.js";
|
|
4
4
|
import {
|
|
5
5
|
wakeableBy
|
|
6
6
|
} from "./chunk-JQVSDPFL.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
describeHookProblem,
|
|
13
13
|
project,
|
|
14
14
|
unmanagedHooks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QUBU3ETR.js";
|
|
16
16
|
import {
|
|
17
17
|
ANTIGRAVITY_MCP_PLUGIN,
|
|
18
18
|
agentNames,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
skillNames,
|
|
24
24
|
splitFrontmatter,
|
|
25
25
|
uiClaudeDoctor
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FFCDSSKA.js";
|
|
27
27
|
import {
|
|
28
28
|
pathPmcp,
|
|
29
29
|
pmcpCommand
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
hostEnvDoctor,
|
|
38
38
|
ptyBinaryDoctor,
|
|
39
39
|
readLockFile
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-F34XIDXT.js";
|
|
41
41
|
import {
|
|
42
42
|
ProjectError
|
|
43
43
|
} from "./chunk-NRBQK6UX.js";
|
|
@@ -671,4 +671,4 @@ export {
|
|
|
671
671
|
spawnRunner,
|
|
672
672
|
doctor
|
|
673
673
|
};
|
|
674
|
-
//# sourceMappingURL=chunk-
|
|
674
|
+
//# sourceMappingURL=chunk-CPFJ7J4G.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-XWLMZKH2.js";
|
|
10
10
|
import {
|
|
11
11
|
VERSION
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HOTGJQIV.js";
|
|
13
13
|
import {
|
|
14
14
|
ConfigError
|
|
15
15
|
} from "./chunk-GJXOFDJT.js";
|
|
@@ -598,4 +598,4 @@ export {
|
|
|
598
598
|
hostEnvDoctor,
|
|
599
599
|
hostDoctor
|
|
600
600
|
};
|
|
601
|
-
//# sourceMappingURL=chunk-
|
|
601
|
+
//# sourceMappingURL=chunk-F34XIDXT.js.map
|
|
@@ -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,
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -5084,9 +5164,16 @@ function readMainlineDeliver(tables, root) {
|
|
|
5084
5164
|
dir: root,
|
|
5085
5165
|
raw: { git: tables.git, sessions: tables.sessions }
|
|
5086
5166
|
};
|
|
5087
|
-
const
|
|
5088
|
-
if (!deliver?.refuseDirectPush) return null;
|
|
5089
|
-
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
|
+
};
|
|
5090
5177
|
}
|
|
5091
5178
|
|
|
5092
5179
|
// src/hooks/compile.ts
|
|
@@ -5426,4 +5513,4 @@ export {
|
|
|
5426
5513
|
checkBudget,
|
|
5427
5514
|
readSpec
|
|
5428
5515
|
};
|
|
5429
|
-
//# 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
|