@modootoday/pmcp 0.25.0 → 0.26.1
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/{affected-IPFJM2KD.js → affected-4FILH743.js} +174 -77
- package/dist/{apply-6XLLYLJT.js → apply-7HWNHSQB.js} +17 -15
- package/dist/{broadcast-34CEG2NQ.js → broadcast-U7ZYOJWE.js} +4 -4
- package/dist/{chunk-2TXVOHRS.js → chunk-2VL3C52Y.js} +4 -4
- package/dist/{chunk-UKR64U7J.js → chunk-374AZ4J4.js} +2 -2
- package/dist/{chunk-ISWR2XIU.js → chunk-3T7CJS4A.js} +2 -2
- package/dist/{chunk-PGZZI42O.js → chunk-5ZP3ABPI.js} +2 -2
- package/dist/{chunk-SSQ6EWNA.js → chunk-A7MF7RMO.js} +7 -7
- package/dist/{chunk-3P6Y2BAO.js → chunk-BSG74PTY.js} +3 -3
- package/dist/{chunk-SRSKCFFS.js → chunk-CJD2HFXF.js} +3 -3
- package/dist/chunk-D7IDT7OA.js +21 -0
- package/dist/chunk-E272CFPS.js +14 -0
- package/dist/{chunk-LZVHFPN6.js → chunk-E7BPELYH.js} +5 -5
- package/dist/chunk-EIBKHS74.js +7 -0
- package/dist/chunk-FLG7VRTC.js +1 -0
- package/dist/{chunk-BG6TONJO.js → chunk-GIK4TROM.js} +2 -2
- package/dist/{chunk-ARXCYFFZ.js → chunk-GQRDEIQA.js} +22 -2
- package/dist/{chunk-UQHJUTDW.js → chunk-GYL2C2Y5.js} +2 -2
- package/dist/{chunk-TOR6SKRB.js → chunk-JDVDA5HW.js} +508 -48
- package/dist/chunk-KLIYFD3W.js +32 -0
- package/dist/{chunk-5MUD7FHP.js → chunk-KWEW5EBE.js} +2 -2
- package/dist/{chunk-PECS47OL.js → chunk-M2XABD33.js} +3 -3
- package/dist/{chunk-MBHI2TKQ.js → chunk-MFQAQ4IJ.js} +5 -5
- package/dist/{chunk-NAHAESFV.js → chunk-OHCUPXU4.js} +18 -5
- package/dist/{chunk-3V37OZQH.js → chunk-PAY6HEEY.js} +2 -2
- package/dist/{chunk-DITIXBFB.js → chunk-PZ6D3WKD.js} +65 -1
- package/dist/{chunk-QYHM6554.js → chunk-RGTWJWQ7.js} +3 -3
- package/dist/{chunk-VYQJPT27.js → chunk-S2FUWBLO.js} +18 -4
- package/dist/{chunk-DWHM5BAY.js → chunk-T52AGUO7.js} +2 -2
- package/dist/{chunk-OGCJO6HQ.js → chunk-TQRLWO4F.js} +2 -2
- package/dist/{chunk-EC5QLEZD.js → chunk-UHKHXS3E.js} +14 -6
- package/dist/{chunk-MHKY6TNF.js → chunk-VN34GLGJ.js} +3 -3
- package/dist/chunk-WUFNKK3U.js +71 -0
- package/dist/chunk-X6W7JIED.js +25 -0
- package/dist/{chunk-RF6RDJYH.js → chunk-XPLT6DJC.js} +26 -19
- package/dist/{chunk-C3KRMTIZ.js → chunk-YJVSN6UN.js} +2 -2
- package/dist/{chunk-EWYLWBKS.js → chunk-YKICVMF7.js} +22 -5
- package/dist/{chunk-TJW4DP26.js → chunk-ZT75ACJ2.js} +2 -2
- package/dist/{cli-QDQYUHAP.js → cli-FVUHK2NB.js} +6 -6
- package/dist/{cli-5G2OYTIL.js → cli-ZOY2274X.js} +8 -8
- package/dist/cli.js +9 -14
- package/dist/{completion-3GVNPLZY.js → completion-O3KRUSJG.js} +5 -4
- package/dist/{diagnostics-2W7QDQNG.js → diagnostics-PB5TKIAL.js} +7 -7
- package/dist/{doctor-3TDO5LJ5.js → doctor-JVWINJT5.js} +31 -20
- package/dist/{entry-E62DZQJF.js → entry-CY74PLN3.js} +13 -13
- package/dist/{exec-mcp-4N7FLY52.js → exec-mcp-HAKUGQZM.js} +14 -12
- package/dist/{harness-E2AUZDLV.js → harness-N234LNM7.js} +3 -3
- package/dist/harness-launch-gate.js +5 -5
- package/dist/harness-worker.js +7 -7
- package/dist/{heavy-HZQVFI6P.js → heavy-X3KZ7WBU.js} +186 -99
- package/dist/hook-body.js +548 -116
- package/dist/{hook-spec-Bd24eo2L.d.ts → hook-spec-u7hnz571.d.ts} +10 -0
- package/dist/{hooks-VAEAK2FY.js → hooks-7K624JQC.js} +4 -4
- package/dist/{host-I2EMQ7UE.js → host-CCJFOCZJ.js} +16 -14
- package/dist/{host-4GJDGTLW.js → host-PT7NRWG6.js} +8 -8
- package/dist/{host-run-DDMKD3BU.js → host-run-RRBFTVYW.js} +6 -6
- package/dist/http.js +1 -1
- package/dist/{import-mcp-TNSAMJXI.js → import-mcp-GCNNSLWH.js} +13 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -15
- package/dist/{init-UA7MDNTZ.js → init-A4NLTERR.js} +2 -2
- package/dist/{invoke-HW7NBPGP.js → invoke-G4LNWPTL.js} +9 -9
- package/dist/{list-A7VQJXE5.js → list-EZYULVDW.js} +16 -14
- package/dist/{logout-HNPLUKJY.js → logout-BYO3UJUH.js} +14 -12
- package/dist/{logs-2JEMSNSG.js → logs-J4W6GFMK.js} +4 -4
- package/dist/{mailbox-MR6TPD3P.js → mailbox-6MHH6CUA.js} +4 -4
- package/dist/{mainline-MSLW3UFD.js → mainline-SWZPKA7U.js} +13 -9
- package/dist/{mcp-6C23GX2E.js → mcp-CZNYDYTJ.js} +2 -2
- package/dist/owners-MPI22SFU.js +63 -0
- package/dist/{pause-H6ZYZF7C.js → pause-3IMVYXQQ.js} +4 -4
- package/dist/project/hook-adapter.d.ts +1 -1
- package/dist/{project-BX6NCGKB.js → project-GLT3SO7Y.js} +4 -4
- package/dist/{report-43SFNNCF.js → report-MWXB5XKE.js} +4 -4
- package/dist/{resume-2BWGSTCN.js → resume-7LCSV4X3.js} +4 -4
- package/dist/{run-2UVAWBAF.js → run-J5O2V3MB.js} +13 -11
- package/dist/{run-7TRWZFEZ.js → run-OBQBKBPV.js} +4 -4
- package/dist/{serve-4XZ5SKJJ.js → serve-QCG4PCVS.js} +3 -3
- package/dist/{setup-GRWLDBVB.js → setup-7JHWLV7K.js} +6 -4
- package/dist/{smoke-6X6IXQIQ.js → smoke-GZECLXOJ.js} +3 -3
- package/dist/{start-login-AR7ITWNV.js → start-login-LRO3RTHD.js} +14 -12
- package/dist/{status-ZY6LDQSF.js → status-BQLT7JRE.js} +14 -12
- package/dist/{status-VQCMJFVE.js → status-EZTFSD5S.js} +18 -16
- package/dist/{status-2GDYLIR3.js → status-QFMN7IUG.js} +4 -4
- package/dist/stdio.js +2 -2
- package/dist/{sweep-76BUOGEI.js → sweep-BS7HVSNP.js} +4 -4
- package/dist/{test-VWGNFSH5.js → test-O7TN5SBA.js} +25 -15
- package/dist/{tui-TUMOQBE7.js → tui-ODLF6QWC.js} +4 -4
- package/dist/{unbroadcast-HJHYUHZL.js → unbroadcast-GRGX3F6T.js} +4 -4
- package/dist/{worker-NEEPJRVV.js → worker-AK4GLGPZ.js} +11 -11
- package/dist/{worktree-sync-MUVKK2CV.js → worktree-sync-BQZD4J73.js} +5 -2
- package/docs/commands.md +12 -3
- package/docs/git-workflow.md +40 -5
- package/docs/hooks.md +69 -14
- package/docs/project-configuration.md +63 -4
- package/docs/upgrading.md +13 -0
- package/gemini-extension.json +2 -2
- package/mcp.json +1 -1
- package/package.json +5 -5
- package/plugin.json +1 -1
- package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
- package/plugins/pmcp/.mcp.json +1 -1
- package/plugins/pmcp/gemini-extension.json +2 -2
- package/plugins/pmcp/mcp.json +1 -1
- package/plugins/pmcp/plugin.json +1 -1
- package/dist/chunk-7TD53M7L.js +0 -13
- package/dist/chunk-FQLCD4HU.js +0 -24
- package/dist/chunk-SMBU3QLE.js +0 -7
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
},
|
|
613
613
|
{
|
|
614
614
|
"name": "pmcp",
|
|
615
|
-
"version": "0.
|
|
615
|
+
"version": "0.26.1",
|
|
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
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import "./chunk-FLG7VRTC.js";
|
|
1
2
|
import {
|
|
2
3
|
globPattern
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-374AZ4J4.js";
|
|
4
5
|
import {
|
|
5
6
|
git,
|
|
6
7
|
gitBytes,
|
|
@@ -30,20 +31,21 @@ var DERIVE = ["tsconfig", "vitest"];
|
|
|
30
31
|
function stringMap(path, name, value) {
|
|
31
32
|
return table(path, name, value) ?? {};
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function memberLists(path, name, value) {
|
|
34
35
|
const out = {};
|
|
35
|
-
for (const [
|
|
36
|
-
stringMap(path, "git.affected.readers", source["readers"])
|
|
37
|
-
)) {
|
|
36
|
+
for (const [key, members] of Object.entries(stringMap(path, name, value))) {
|
|
38
37
|
if (!Array.isArray(members) || !members.every((m) => typeof m === "string"))
|
|
39
38
|
throw new ConfigError(
|
|
40
39
|
path,
|
|
41
|
-
`[
|
|
40
|
+
`[${name}] "${key}" must be a list of member directories`
|
|
42
41
|
);
|
|
43
|
-
out[
|
|
42
|
+
out[key] = members;
|
|
44
43
|
}
|
|
45
44
|
return out;
|
|
46
45
|
}
|
|
46
|
+
function readers(path, source) {
|
|
47
|
+
return memberLists(path, "git.affected.readers", source["readers"]);
|
|
48
|
+
}
|
|
47
49
|
function owners(path, source) {
|
|
48
50
|
const out = {};
|
|
49
51
|
for (const [glob, member] of Object.entries(
|
|
@@ -87,7 +89,8 @@ function readAffectedConfig(config) {
|
|
|
87
89
|
"derive",
|
|
88
90
|
"unmapped",
|
|
89
91
|
"consumers",
|
|
90
|
-
"lockfile"
|
|
92
|
+
"lockfile",
|
|
93
|
+
"root_dependencies"
|
|
91
94
|
]);
|
|
92
95
|
const derive = read.list("derive");
|
|
93
96
|
for (const name of derive)
|
|
@@ -97,6 +100,16 @@ function readAffectedConfig(config) {
|
|
|
97
100
|
`[git.affected] derive accepts ${DERIVE.join(", ")}, not ${name}`
|
|
98
101
|
);
|
|
99
102
|
const lockTable = child(path, source, "git.affected", "lockfile");
|
|
103
|
+
const rootDependencies = source["root_dependencies"] === void 0 ? void 0 : memberLists(
|
|
104
|
+
path,
|
|
105
|
+
"git.affected.root_dependencies",
|
|
106
|
+
source["root_dependencies"]
|
|
107
|
+
);
|
|
108
|
+
if (rootDependencies && !lockTable)
|
|
109
|
+
throw new ConfigError(
|
|
110
|
+
path,
|
|
111
|
+
"[git.affected.root_dependencies] needs [git.affected.lockfile]"
|
|
112
|
+
);
|
|
100
113
|
return {
|
|
101
114
|
members: read.oneOf("members", ["workspaces"], "workspaces"),
|
|
102
115
|
sharedInputs: read.list("shared_inputs"),
|
|
@@ -109,7 +122,8 @@ function readAffectedConfig(config) {
|
|
|
109
122
|
derive,
|
|
110
123
|
unmapped: read.oneOf("unmapped", ["all", "report"], "all"),
|
|
111
124
|
consumers: read.bool("consumers", false),
|
|
112
|
-
...lockTable ? { lockfile: lockfile(path, lockTable) } : {}
|
|
125
|
+
...lockTable ? { lockfile: lockfile(path, lockTable) } : {},
|
|
126
|
+
...rootDependencies ? { rootDependencies } : {}
|
|
113
127
|
};
|
|
114
128
|
}
|
|
115
129
|
|
|
@@ -464,7 +478,72 @@ function withConsumers(tree, members, selected) {
|
|
|
464
478
|
return [...seen].sort();
|
|
465
479
|
}
|
|
466
480
|
|
|
481
|
+
// src/git/affected/members.ts
|
|
482
|
+
import { posix as posix4 } from "path";
|
|
483
|
+
function skipped(dir) {
|
|
484
|
+
return dir.split("/").some((name) => name.startsWith(".") || name === "node_modules");
|
|
485
|
+
}
|
|
486
|
+
function workspacePatterns(manifest) {
|
|
487
|
+
const declared = manifest["workspaces"];
|
|
488
|
+
const list = Array.isArray(declared) ? declared : declared?.packages;
|
|
489
|
+
if (!Array.isArray(list) || !list.every((p) => typeof p === "string"))
|
|
490
|
+
throw new Error("root package.json declares no workspaces list");
|
|
491
|
+
return list;
|
|
492
|
+
}
|
|
493
|
+
function memberMatcher(patterns) {
|
|
494
|
+
const rules = patterns.map((pattern) => ({
|
|
495
|
+
exclude: pattern.startsWith("!"),
|
|
496
|
+
test: globPattern(pattern.replace(/^!/u, "").replace(/\/+$/u, ""), false)
|
|
497
|
+
}));
|
|
498
|
+
return (dir) => {
|
|
499
|
+
let included = false;
|
|
500
|
+
for (const rule of rules) if (rule.test.test(dir)) included = !rule.exclude;
|
|
501
|
+
return included;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function mayHold(patterns, dir) {
|
|
505
|
+
const parts = dir.split("/");
|
|
506
|
+
return patterns.some((pattern) => {
|
|
507
|
+
if (pattern.startsWith("!")) return false;
|
|
508
|
+
const segments = pattern.replace(/\/+$/u, "").split("/");
|
|
509
|
+
for (let at = 0; at < parts.length; at += 1) {
|
|
510
|
+
const segment = segments[at];
|
|
511
|
+
if (segment === void 0) return false;
|
|
512
|
+
if (segment.includes("**")) return true;
|
|
513
|
+
if (!globPattern(segment, false).test(parts[at])) return false;
|
|
514
|
+
}
|
|
515
|
+
return true;
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
function parseJson(text) {
|
|
519
|
+
if (text === null) return null;
|
|
520
|
+
try {
|
|
521
|
+
const value = JSON.parse(text);
|
|
522
|
+
return value !== null && typeof value === "object" ? value : null;
|
|
523
|
+
} catch {
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
function workspaceMembers(tree) {
|
|
528
|
+
const rootManifest = parseJson(tree.text("package.json"));
|
|
529
|
+
if (rootManifest === null) throw new Error("root package.json is unreadable");
|
|
530
|
+
const patterns = workspacePatterns(rootManifest);
|
|
531
|
+
const matches = memberMatcher(patterns);
|
|
532
|
+
const dirs = tree.files("", (link) => !skipped(link) && mayHold(patterns, link)).filter((path) => posix4.basename(path) === "package.json").map((path) => posix4.dirname(path)).filter((dir) => dir !== "." && !skipped(dir) && matches(dir)).sort();
|
|
533
|
+
tree.prefetch(dirs.map((dir) => `${dir}/package.json`));
|
|
534
|
+
return dirs.map((dir) => {
|
|
535
|
+
const manifest = parseJson(tree.text(`${dir}/package.json`)) ?? {};
|
|
536
|
+
const name = manifest["name"];
|
|
537
|
+
return { dir, manifest, ...typeof name === "string" ? { name } : {} };
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
|
|
467
541
|
// src/git/affected/lockfile/types.ts
|
|
542
|
+
function rootMapping(name, table2) {
|
|
543
|
+
const keys2 = Object.keys(table2);
|
|
544
|
+
const key = keys2.find((candidate) => candidate === name) ?? keys2.find((candidate) => isToolchain(name, [candidate]));
|
|
545
|
+
return key === void 0 ? null : { name, key, members: table2[key] };
|
|
546
|
+
}
|
|
468
547
|
function isToolchain(name, patterns) {
|
|
469
548
|
return patterns.some(
|
|
470
549
|
(pattern) => pattern.endsWith("*") ? name.startsWith(pattern.slice(0, -1)) : name === pattern
|
|
@@ -573,7 +652,15 @@ function addReverseEdges(lock, reverse) {
|
|
|
573
652
|
add(resolveFrom(lock.packages, key, dep), key);
|
|
574
653
|
}
|
|
575
654
|
}
|
|
576
|
-
function
|
|
655
|
+
function readable(manifest) {
|
|
656
|
+
try {
|
|
657
|
+
workspacePatterns(manifest ?? {});
|
|
658
|
+
return true;
|
|
659
|
+
} catch {
|
|
660
|
+
return false;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
function rootDelta(base, head, input, seeds, rootNames, moved) {
|
|
577
664
|
const fields = /* @__PURE__ */ new Set([
|
|
578
665
|
...Object.keys(base ?? {}),
|
|
579
666
|
...Object.keys(head ?? {})
|
|
@@ -581,6 +668,10 @@ function rootDelta(base, head, input, seeds) {
|
|
|
581
668
|
for (const field of fields) {
|
|
582
669
|
if (same(base?.[field], head?.[field])) continue;
|
|
583
670
|
if (input.config.inertRootFields.includes(field)) continue;
|
|
671
|
+
if (field === "workspaces" && readable(base) && readable(head)) {
|
|
672
|
+
moved.workspaces = true;
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
584
675
|
if (!DEP_FIELDS.includes(field))
|
|
585
676
|
return `root package.json ${field} changed`;
|
|
586
677
|
}
|
|
@@ -589,6 +680,7 @@ function rootDelta(base, head, input, seeds) {
|
|
|
589
680
|
if (isToolchain(name, input.config.toolchain))
|
|
590
681
|
return `root toolchain dependency ${name} changed`;
|
|
591
682
|
seeds.add(name);
|
|
683
|
+
rootNames.add(name);
|
|
592
684
|
}
|
|
593
685
|
return null;
|
|
594
686
|
}
|
|
@@ -601,8 +693,14 @@ function lockDelta(input) {
|
|
|
601
693
|
if (basePkg === null || headPkg === null)
|
|
602
694
|
return { all: "no root package.json at one revision", direct: [] };
|
|
603
695
|
const seeds = /* @__PURE__ */ new Set();
|
|
604
|
-
const
|
|
696
|
+
const rootNames = /* @__PURE__ */ new Set();
|
|
697
|
+
const moved = { workspaces: false };
|
|
698
|
+
const rootAll = rootDelta(basePkg, headPkg, input, seeds, rootNames, moved);
|
|
605
699
|
if (rootAll !== null) return { all: rootAll, direct: [] };
|
|
700
|
+
const answer = lockOnly(input, seeds, rootNames, read, lock);
|
|
701
|
+
return moved.workspaces && answer.all === null ? { ...answer, workspaces: true } : answer;
|
|
702
|
+
}
|
|
703
|
+
function lockOnly(input, seeds, rootNames, read, lock) {
|
|
606
704
|
const baseLock = lock(read(input.base, "bun.lock"));
|
|
607
705
|
const headLock = lock(read(input.head, "bun.lock"));
|
|
608
706
|
if (baseLock === null !== (headLock === null))
|
|
@@ -639,14 +737,35 @@ function lockDelta(input) {
|
|
|
639
737
|
const seen = new Set(seeds);
|
|
640
738
|
const queue = [...seeds];
|
|
641
739
|
while (queue.length > 0) {
|
|
642
|
-
|
|
740
|
+
const key = queue.pop();
|
|
741
|
+
for (const from of reverse.get(key) ?? []) {
|
|
742
|
+
if (from === "ws:") rootNames.add(lastName(key));
|
|
643
743
|
if (seen.has(from)) continue;
|
|
644
744
|
seen.add(from);
|
|
645
745
|
if (!from.startsWith("ws:")) queue.push(from);
|
|
646
746
|
else if (from !== "ws:") direct.add(from.slice(3));
|
|
647
747
|
}
|
|
648
748
|
}
|
|
649
|
-
return
|
|
749
|
+
return mapRoot(input, rootNames, [...direct].sort());
|
|
750
|
+
}
|
|
751
|
+
function lastName(key) {
|
|
752
|
+
const parent = parentKey(key);
|
|
753
|
+
return parent === null ? key : key.slice(parent.length + 1);
|
|
754
|
+
}
|
|
755
|
+
function mapRoot(input, names, direct) {
|
|
756
|
+
const table2 = input.rootDependencies;
|
|
757
|
+
if (table2 === void 0 || names.size === 0) return { all: null, direct };
|
|
758
|
+
const mapped = [];
|
|
759
|
+
for (const name of [...names].sort()) {
|
|
760
|
+
const hit = rootMapping(name, table2);
|
|
761
|
+
if (hit === null)
|
|
762
|
+
return {
|
|
763
|
+
all: `root dependency ${name} changed and [git.affected.root_dependencies] does not map it`,
|
|
764
|
+
direct: []
|
|
765
|
+
};
|
|
766
|
+
mapped.push(hit);
|
|
767
|
+
}
|
|
768
|
+
return { all: null, direct, mapped };
|
|
650
769
|
}
|
|
651
770
|
var bunLockfile = {
|
|
652
771
|
files: ["bun.lock", "package.json"],
|
|
@@ -660,66 +779,6 @@ var bunLockfile = {
|
|
|
660
779
|
}
|
|
661
780
|
};
|
|
662
781
|
|
|
663
|
-
// src/git/affected/members.ts
|
|
664
|
-
import { posix as posix4 } from "path";
|
|
665
|
-
function skipped(dir) {
|
|
666
|
-
return dir.split("/").some((name) => name.startsWith(".") || name === "node_modules");
|
|
667
|
-
}
|
|
668
|
-
function workspacePatterns(manifest) {
|
|
669
|
-
const declared = manifest["workspaces"];
|
|
670
|
-
const list = Array.isArray(declared) ? declared : declared?.packages;
|
|
671
|
-
if (!Array.isArray(list) || !list.every((p) => typeof p === "string"))
|
|
672
|
-
throw new Error("root package.json declares no workspaces list");
|
|
673
|
-
return list;
|
|
674
|
-
}
|
|
675
|
-
function memberMatcher(patterns) {
|
|
676
|
-
const rules = patterns.map((pattern) => ({
|
|
677
|
-
exclude: pattern.startsWith("!"),
|
|
678
|
-
test: globPattern(pattern.replace(/^!/u, "").replace(/\/+$/u, ""), false)
|
|
679
|
-
}));
|
|
680
|
-
return (dir) => {
|
|
681
|
-
let included = false;
|
|
682
|
-
for (const rule of rules) if (rule.test.test(dir)) included = !rule.exclude;
|
|
683
|
-
return included;
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
function mayHold(patterns, dir) {
|
|
687
|
-
const parts = dir.split("/");
|
|
688
|
-
return patterns.some((pattern) => {
|
|
689
|
-
if (pattern.startsWith("!")) return false;
|
|
690
|
-
const segments = pattern.replace(/\/+$/u, "").split("/");
|
|
691
|
-
for (let at = 0; at < parts.length; at += 1) {
|
|
692
|
-
const segment = segments[at];
|
|
693
|
-
if (segment === void 0) return false;
|
|
694
|
-
if (segment.includes("**")) return true;
|
|
695
|
-
if (!globPattern(segment, false).test(parts[at])) return false;
|
|
696
|
-
}
|
|
697
|
-
return true;
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
function parseJson(text) {
|
|
701
|
-
if (text === null) return null;
|
|
702
|
-
try {
|
|
703
|
-
const value = JSON.parse(text);
|
|
704
|
-
return value !== null && typeof value === "object" ? value : null;
|
|
705
|
-
} catch {
|
|
706
|
-
return null;
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
function workspaceMembers(tree) {
|
|
710
|
-
const rootManifest = parseJson(tree.text("package.json"));
|
|
711
|
-
if (rootManifest === null) throw new Error("root package.json is unreadable");
|
|
712
|
-
const patterns = workspacePatterns(rootManifest);
|
|
713
|
-
const matches = memberMatcher(patterns);
|
|
714
|
-
const dirs = tree.files("", (link) => !skipped(link) && mayHold(patterns, link)).filter((path) => posix4.basename(path) === "package.json").map((path) => posix4.dirname(path)).filter((dir) => dir !== "." && !skipped(dir) && matches(dir)).sort();
|
|
715
|
-
tree.prefetch(dirs.map((dir) => `${dir}/package.json`));
|
|
716
|
-
return dirs.map((dir) => {
|
|
717
|
-
const manifest = parseJson(tree.text(`${dir}/package.json`)) ?? {};
|
|
718
|
-
const name = manifest["name"];
|
|
719
|
-
return { dir, manifest, ...typeof name === "string" ? { name } : {} };
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
|
-
|
|
723
782
|
// src/git/affected/tree.ts
|
|
724
783
|
import { existsSync } from "fs";
|
|
725
784
|
import { join as join2, posix as posix5, resolve } from "path";
|
|
@@ -1022,7 +1081,8 @@ function lockfileMembers(root, config, changes, base, head) {
|
|
|
1022
1081
|
read: (rev, path) => showFile(root, rev, path),
|
|
1023
1082
|
base,
|
|
1024
1083
|
head,
|
|
1025
|
-
config: config.lockfile
|
|
1084
|
+
config: config.lockfile,
|
|
1085
|
+
...config.rootDependencies ? { rootDependencies: config.rootDependencies } : {}
|
|
1026
1086
|
});
|
|
1027
1087
|
}
|
|
1028
1088
|
function membersOf(root, head) {
|
|
@@ -1065,6 +1125,16 @@ function mapChanges(root, config, { base, head, changes }, { tree, members }, te
|
|
|
1065
1125
|
const direct = lock.direct.filter((dir) => dirs.has(dir));
|
|
1066
1126
|
if (direct.length > 0)
|
|
1067
1127
|
for (const dir of withConsumers(tree, members, direct)) changed.add(dir);
|
|
1128
|
+
for (const hit of lock.mapped ?? [])
|
|
1129
|
+
for (const dir of hit.members) changed.add(dir);
|
|
1130
|
+
const mapped = lock.mapped?.length ? { rootDependencies: lock.mapped } : {};
|
|
1131
|
+
const regrouped = lock.workspaces ? memberSetChange(root, base, dirs) : { added: [], removed: [] };
|
|
1132
|
+
if ("error" in regrouped)
|
|
1133
|
+
return ALL(`members at ${base} unreadable: ${regrouped.error}`, at);
|
|
1134
|
+
regrouped.added.forEach((dir) => changed.add(dir));
|
|
1135
|
+
const moved = regrouped.added.length + regrouped.removed.length > 0;
|
|
1136
|
+
if (moved) for (const dir of config.onMemberChange) changed.add(dir);
|
|
1137
|
+
const workspaceChange = moved ? { workspaceMembers: regrouped } : {};
|
|
1068
1138
|
const ignored = matcher(config.ignore);
|
|
1069
1139
|
const included = ordered(config.include);
|
|
1070
1140
|
const deletedIncluded = ordered(config.includeDeleted);
|
|
@@ -1103,9 +1173,36 @@ function mapChanges(root, config, { base, head, changes }, { tree, members }, te
|
|
|
1103
1173
|
}
|
|
1104
1174
|
const list = [...changed].filter((dir) => dirs.has(dir)).sort();
|
|
1105
1175
|
if (unmapped.length > 0 && config.unmapped === "all")
|
|
1106
|
-
return ALL(`unmapped ${unmapped[0]}`, {
|
|
1176
|
+
return ALL(`unmapped ${unmapped[0]}`, {
|
|
1177
|
+
...at,
|
|
1178
|
+
unmapped,
|
|
1179
|
+
...mapped,
|
|
1180
|
+
...workspaceChange
|
|
1181
|
+
});
|
|
1107
1182
|
const wide = config.consumers && !testsOnly ? withConsumers(tree, members, list) : list;
|
|
1108
|
-
return {
|
|
1183
|
+
return {
|
|
1184
|
+
all: false,
|
|
1185
|
+
...at,
|
|
1186
|
+
changed: list,
|
|
1187
|
+
members: wide,
|
|
1188
|
+
unmapped,
|
|
1189
|
+
...mapped,
|
|
1190
|
+
...workspaceChange
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
function memberSetChange(root, base, dirs) {
|
|
1194
|
+
let before;
|
|
1195
|
+
try {
|
|
1196
|
+
before = new Set(
|
|
1197
|
+
workspaceMembers(HeadTree.open(root, base)).map((member) => member.dir)
|
|
1198
|
+
);
|
|
1199
|
+
} catch (error) {
|
|
1200
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
1201
|
+
}
|
|
1202
|
+
return {
|
|
1203
|
+
added: [...dirs].filter((dir) => !before.has(dir)).sort(),
|
|
1204
|
+
removed: [...before].filter((dir) => !dirs.has(dir)).sort()
|
|
1205
|
+
};
|
|
1109
1206
|
}
|
|
1110
1207
|
|
|
1111
1208
|
// src/git/cli/affected.ts
|
|
@@ -1177,4 +1274,4 @@ export {
|
|
|
1177
1274
|
AFFECTED_SCHEMA,
|
|
1178
1275
|
gitAffected
|
|
1179
1276
|
};
|
|
1180
|
-
//# sourceMappingURL=affected-
|
|
1277
|
+
//# sourceMappingURL=affected-4FILH743.js.map
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-2MX5C7B2.js";
|
|
4
4
|
import {
|
|
5
5
|
specFrom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GIK4TROM.js";
|
|
7
7
|
import {
|
|
8
8
|
printSmoke,
|
|
9
9
|
runSmoke
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TQRLWO4F.js";
|
|
11
11
|
import {
|
|
12
12
|
configFrom
|
|
13
13
|
} from "./chunk-7CHUMF3E.js";
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
describeHookProblem,
|
|
16
16
|
project,
|
|
17
17
|
unmanagedHookProblems
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MFQAQ4IJ.js";
|
|
19
19
|
import "./chunk-ANJMLKBR.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-CJD2HFXF.js";
|
|
21
21
|
import {
|
|
22
22
|
checkBudget,
|
|
23
23
|
renderFrontmatter,
|
|
24
24
|
splitFrontmatter
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-JDVDA5HW.js";
|
|
26
|
+
import "./chunk-S2FUWBLO.js";
|
|
27
|
+
import "./chunk-FLG7VRTC.js";
|
|
28
28
|
import "./chunk-2GD7PQ7J.js";
|
|
29
29
|
import "./chunk-EATCUWGG.js";
|
|
30
30
|
import "./chunk-OFJIMBTL.js";
|
|
@@ -33,16 +33,18 @@ import "./chunk-LFFIQBNY.js";
|
|
|
33
33
|
import "./chunk-HQOB7OQS.js";
|
|
34
34
|
import "./chunk-73AKO4UL.js";
|
|
35
35
|
import "./chunk-VQBXWMLT.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-YKICVMF7.js";
|
|
37
|
+
import "./chunk-WUFNKK3U.js";
|
|
38
|
+
import "./chunk-374AZ4J4.js";
|
|
37
39
|
import "./chunk-SDFJJJB5.js";
|
|
38
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-PAY6HEEY.js";
|
|
39
41
|
import "./chunk-Z6WRFOFT.js";
|
|
40
42
|
import "./chunk-23PE3HZB.js";
|
|
41
43
|
import "./chunk-Q5H3L6Y4.js";
|
|
42
44
|
import {
|
|
43
45
|
RUNTIMES,
|
|
44
46
|
readTestTable
|
|
45
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-GQRDEIQA.js";
|
|
46
48
|
import "./chunk-5NDUWEMW.js";
|
|
47
49
|
import "./chunk-V4NPDK6X.js";
|
|
48
50
|
import {
|
|
@@ -55,18 +57,18 @@ import {
|
|
|
55
57
|
import "./chunk-YSAWTGNA.js";
|
|
56
58
|
import {
|
|
57
59
|
recordProjector
|
|
58
|
-
} from "./chunk-
|
|
59
|
-
import "./chunk-
|
|
60
|
+
} from "./chunk-2VL3C52Y.js";
|
|
61
|
+
import "./chunk-PZ6D3WKD.js";
|
|
60
62
|
import "./chunk-N7ANFMA5.js";
|
|
61
63
|
import {
|
|
62
64
|
ProjectError
|
|
63
65
|
} from "./chunk-TYY5TYHF.js";
|
|
64
66
|
import "./chunk-T6C3TSTO.js";
|
|
65
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-KLIYFD3W.js";
|
|
66
68
|
import "./chunk-GUHOEIHP.js";
|
|
67
69
|
import "./chunk-IJBSOWHK.js";
|
|
68
70
|
import "./chunk-XWLMZKH2.js";
|
|
69
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-EIBKHS74.js";
|
|
70
72
|
import "./chunk-GJXOFDJT.js";
|
|
71
73
|
import "./chunk-PMJG2CXF.js";
|
|
72
74
|
import "./chunk-J6KL3COD.js";
|
|
@@ -281,4 +283,4 @@ export {
|
|
|
281
283
|
projectOrCheck,
|
|
282
284
|
removeAndProject
|
|
283
285
|
};
|
|
284
|
-
//# sourceMappingURL=apply-
|
|
286
|
+
//# sourceMappingURL=apply-7HWNHSQB.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
change
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YJVSN6UN.js";
|
|
4
4
|
import "./chunk-65BW7Y6O.js";
|
|
5
5
|
import "./chunk-OIKT4SYO.js";
|
|
6
6
|
import "./chunk-NQCAKDRY.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-PAY6HEEY.js";
|
|
8
8
|
import "./chunk-Z6WRFOFT.js";
|
|
9
9
|
import "./chunk-Y6NFETNG.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-KLIYFD3W.js";
|
|
11
11
|
import "./chunk-GUHOEIHP.js";
|
|
12
12
|
import "./chunk-IJBSOWHK.js";
|
|
13
13
|
import "./chunk-GJXOFDJT.js";
|
|
@@ -18,4 +18,4 @@ var run = (context) => change(context, "broadcast");
|
|
|
18
18
|
export {
|
|
19
19
|
run
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=broadcast-
|
|
21
|
+
//# sourceMappingURL=broadcast-U7ZYOJWE.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readLeaseSettings
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PZ6D3WKD.js";
|
|
4
4
|
import {
|
|
5
5
|
ProjectError
|
|
6
6
|
} from "./chunk-TYY5TYHF.js";
|
|
7
7
|
import {
|
|
8
8
|
projectStateDir
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KLIYFD3W.js";
|
|
10
10
|
import {
|
|
11
11
|
lockProblem
|
|
12
12
|
} from "./chunk-XWLMZKH2.js";
|
|
13
13
|
import {
|
|
14
14
|
VERSION
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EIBKHS74.js";
|
|
16
16
|
import {
|
|
17
17
|
ConfigError
|
|
18
18
|
} from "./chunk-GJXOFDJT.js";
|
|
@@ -610,4 +610,4 @@ export {
|
|
|
610
610
|
hostEnvDoctor,
|
|
611
611
|
hostDoctor
|
|
612
612
|
};
|
|
613
|
-
//# sourceMappingURL=chunk-
|
|
613
|
+
//# sourceMappingURL=chunk-2VL3C52Y.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/glob.ts
|
|
1
|
+
// src/hooks/glob.ts
|
|
2
2
|
function globPattern(glob, below = true) {
|
|
3
3
|
let source = "";
|
|
4
4
|
for (let at = 0; at < glob.length; at += 1) {
|
|
@@ -17,4 +17,4 @@ function globPattern(glob, below = true) {
|
|
|
17
17
|
export {
|
|
18
18
|
globPattern
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-374AZ4J4.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-34DECPVC.js";
|
|
7
7
|
import {
|
|
8
8
|
ptyBinary
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2VL3C52Y.js";
|
|
10
10
|
|
|
11
11
|
// src/harness/adapters/systemd/admission.ts
|
|
12
12
|
var nativeHostTools = ["systemctl", "systemd-run"];
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
nativeHostTools,
|
|
37
37
|
assertNativeHost
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-3T7CJS4A.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
nativeBinary,
|
|
9
9
|
ptyBinary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2VL3C52Y.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-5ZP3ABPI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hostApprovalDoctor
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RGTWJWQ7.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-MFQAQ4IJ.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-JDVDA5HW.js";
|
|
27
27
|
import {
|
|
28
28
|
pathPmcp,
|
|
29
29
|
pmcpCommand
|
|
@@ -31,19 +31,19 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
createFilesStore,
|
|
33
33
|
inboxKey
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-PAY6HEEY.js";
|
|
35
35
|
import {
|
|
36
36
|
hostDoctor,
|
|
37
37
|
hostEnvDoctor,
|
|
38
38
|
ptyBinaryDoctor,
|
|
39
39
|
readLockFile
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-2VL3C52Y.js";
|
|
41
41
|
import {
|
|
42
42
|
ProjectError
|
|
43
43
|
} from "./chunk-TYY5TYHF.js";
|
|
44
44
|
import {
|
|
45
45
|
projectStateDir
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-KLIYFD3W.js";
|
|
47
47
|
|
|
48
48
|
// src/project/doctor/runner.ts
|
|
49
49
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
@@ -671,4 +671,4 @@ export {
|
|
|
671
671
|
spawnRunner,
|
|
672
672
|
doctor
|
|
673
673
|
};
|
|
674
|
-
//# sourceMappingURL=chunk-
|
|
674
|
+
//# sourceMappingURL=chunk-A7MF7RMO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
assertNativeHost
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3T7CJS4A.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-T52AGUO7.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-BSG74PTY.js.map
|