@modootoday/pmcp 0.25.0 → 0.26.0

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.
Files changed (110) hide show
  1. package/.agents/plugins/marketplace.json +1 -1
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +1 -1
  4. package/.mcp.json +1 -1
  5. package/dist/{affected-IPFJM2KD.js → affected-4FILH743.js} +174 -77
  6. package/dist/{apply-6XLLYLJT.js → apply-HJUCYQDQ.js} +17 -15
  7. package/dist/{broadcast-34CEG2NQ.js → broadcast-U7ZYOJWE.js} +4 -4
  8. package/dist/{chunk-BG6TONJO.js → chunk-2GL5L2G5.js} +2 -2
  9. package/dist/{chunk-PGZZI42O.js → chunk-2JUHFM4V.js} +2 -2
  10. package/dist/{chunk-UKR64U7J.js → chunk-374AZ4J4.js} +2 -2
  11. package/dist/{chunk-ISWR2XIU.js → chunk-3JOFDNL4.js} +2 -2
  12. package/dist/{chunk-2TXVOHRS.js → chunk-3KISMGVP.js} +4 -4
  13. package/dist/{chunk-SRSKCFFS.js → chunk-6XE3WW7S.js} +3 -3
  14. package/dist/{chunk-5MUD7FHP.js → chunk-7FHOSWNQ.js} +2 -2
  15. package/dist/{chunk-QYHM6554.js → chunk-7PBWLYCO.js} +3 -3
  16. package/dist/{chunk-PECS47OL.js → chunk-C7Y2MBCN.js} +3 -3
  17. package/dist/chunk-D7IDT7OA.js +21 -0
  18. package/dist/chunk-E272CFPS.js +14 -0
  19. package/dist/chunk-FLG7VRTC.js +1 -0
  20. package/dist/{chunk-3P6Y2BAO.js → chunk-FXDGW2IH.js} +3 -3
  21. package/dist/{chunk-RF6RDJYH.js → chunk-GIL3RBRX.js} +26 -19
  22. package/dist/{chunk-ARXCYFFZ.js → chunk-GQRDEIQA.js} +22 -2
  23. package/dist/chunk-J43Z4O3G.js +7 -0
  24. package/dist/chunk-KLIYFD3W.js +32 -0
  25. package/dist/{chunk-UQHJUTDW.js → chunk-KQV2EPAP.js} +2 -2
  26. package/dist/{chunk-DWHM5BAY.js → chunk-LCPCRZ7N.js} +2 -2
  27. package/dist/{chunk-MBHI2TKQ.js → chunk-NQZMGQFG.js} +5 -5
  28. package/dist/{chunk-SSQ6EWNA.js → chunk-OBCBCLS2.js} +7 -7
  29. package/dist/{chunk-LZVHFPN6.js → chunk-OG2ESRQP.js} +5 -5
  30. package/dist/{chunk-NAHAESFV.js → chunk-OHCUPXU4.js} +18 -5
  31. package/dist/{chunk-3V37OZQH.js → chunk-PAY6HEEY.js} +2 -2
  32. package/dist/{chunk-DITIXBFB.js → chunk-PZ6D3WKD.js} +65 -1
  33. package/dist/{chunk-TJW4DP26.js → chunk-Q5BQIRM3.js} +2 -2
  34. package/dist/{chunk-VYQJPT27.js → chunk-S2FUWBLO.js} +18 -4
  35. package/dist/{chunk-OGCJO6HQ.js → chunk-TQRLWO4F.js} +2 -2
  36. package/dist/{chunk-EC5QLEZD.js → chunk-UVPIVSZB.js} +14 -6
  37. package/dist/{chunk-MHKY6TNF.js → chunk-VN34GLGJ.js} +3 -3
  38. package/dist/chunk-WUFNKK3U.js +71 -0
  39. package/dist/{chunk-TOR6SKRB.js → chunk-Y7FYCVUK.js} +508 -48
  40. package/dist/{chunk-C3KRMTIZ.js → chunk-YJVSN6UN.js} +2 -2
  41. package/dist/{chunk-EWYLWBKS.js → chunk-YKICVMF7.js} +22 -5
  42. package/dist/{cli-QDQYUHAP.js → cli-FVUHK2NB.js} +6 -6
  43. package/dist/{cli-5G2OYTIL.js → cli-ZOY2274X.js} +8 -8
  44. package/dist/cli.js +6 -5
  45. package/dist/{completion-3GVNPLZY.js → completion-ZKWGPMEK.js} +5 -4
  46. package/dist/{diagnostics-2W7QDQNG.js → diagnostics-IM2OPAPL.js} +7 -7
  47. package/dist/{doctor-3TDO5LJ5.js → doctor-VZTHEPVC.js} +31 -20
  48. package/dist/{entry-E62DZQJF.js → entry-Q4EI4PNO.js} +13 -13
  49. package/dist/{exec-mcp-4N7FLY52.js → exec-mcp-AWGUQVT2.js} +14 -12
  50. package/dist/{harness-E2AUZDLV.js → harness-L4C5XWKR.js} +3 -3
  51. package/dist/harness-launch-gate.js +5 -5
  52. package/dist/harness-worker.js +7 -7
  53. package/dist/{heavy-HZQVFI6P.js → heavy-OG3UVZNY.js} +181 -99
  54. package/dist/hook-body.js +548 -116
  55. package/dist/{hook-spec-Bd24eo2L.d.ts → hook-spec-u7hnz571.d.ts} +10 -0
  56. package/dist/{hooks-VAEAK2FY.js → hooks-2E6PJJQK.js} +4 -4
  57. package/dist/{host-4GJDGTLW.js → host-OQDBQJB2.js} +8 -8
  58. package/dist/{host-I2EMQ7UE.js → host-RJJGTKWA.js} +16 -14
  59. package/dist/{host-run-DDMKD3BU.js → host-run-PWCIXJDN.js} +6 -6
  60. package/dist/http.js +1 -1
  61. package/dist/{import-mcp-TNSAMJXI.js → import-mcp-2H2NRUCL.js} +13 -11
  62. package/dist/index.d.ts +2 -2
  63. package/dist/index.js +17 -15
  64. package/dist/{init-UA7MDNTZ.js → init-O2UCU2WT.js} +2 -2
  65. package/dist/{invoke-HW7NBPGP.js → invoke-SJ3JHRJU.js} +9 -9
  66. package/dist/{list-A7VQJXE5.js → list-SJVXZGKK.js} +16 -14
  67. package/dist/{logout-HNPLUKJY.js → logout-ROKXWR3T.js} +14 -12
  68. package/dist/{logs-2JEMSNSG.js → logs-J4W6GFMK.js} +4 -4
  69. package/dist/{mailbox-MR6TPD3P.js → mailbox-6MHH6CUA.js} +4 -4
  70. package/dist/{mainline-MSLW3UFD.js → mainline-SWZPKA7U.js} +13 -9
  71. package/dist/{mcp-6C23GX2E.js → mcp-U7MVFAB4.js} +2 -2
  72. package/dist/owners-MPI22SFU.js +63 -0
  73. package/dist/{pause-H6ZYZF7C.js → pause-3IMVYXQQ.js} +4 -4
  74. package/dist/project/hook-adapter.d.ts +1 -1
  75. package/dist/{project-BX6NCGKB.js → project-MGUYHUF7.js} +4 -4
  76. package/dist/{report-43SFNNCF.js → report-MWXB5XKE.js} +4 -4
  77. package/dist/{resume-2BWGSTCN.js → resume-7LCSV4X3.js} +4 -4
  78. package/dist/{run-2UVAWBAF.js → run-DDWLS6FY.js} +13 -11
  79. package/dist/{run-7TRWZFEZ.js → run-TBO5JO4Y.js} +4 -4
  80. package/dist/{serve-4XZ5SKJJ.js → serve-RBQYB3FP.js} +3 -3
  81. package/dist/{setup-GRWLDBVB.js → setup-7JHWLV7K.js} +6 -4
  82. package/dist/{smoke-6X6IXQIQ.js → smoke-GZECLXOJ.js} +3 -3
  83. package/dist/{start-login-AR7ITWNV.js → start-login-SOTNDUP6.js} +14 -12
  84. package/dist/{status-VQCMJFVE.js → status-EBIUQIGY.js} +18 -16
  85. package/dist/{status-2GDYLIR3.js → status-QFMN7IUG.js} +4 -4
  86. package/dist/{status-ZY6LDQSF.js → status-TSTOFNZU.js} +14 -12
  87. package/dist/stdio.js +2 -2
  88. package/dist/{sweep-76BUOGEI.js → sweep-BS7HVSNP.js} +4 -4
  89. package/dist/{test-VWGNFSH5.js → test-4PZHHWOQ.js} +25 -15
  90. package/dist/{tui-TUMOQBE7.js → tui-QD2LMXHV.js} +4 -4
  91. package/dist/{unbroadcast-HJHYUHZL.js → unbroadcast-GRGX3F6T.js} +4 -4
  92. package/dist/{worker-NEEPJRVV.js → worker-SPJ4HFWV.js} +11 -11
  93. package/dist/{worktree-sync-MUVKK2CV.js → worktree-sync-BQZD4J73.js} +5 -2
  94. package/docs/commands.md +12 -3
  95. package/docs/git-workflow.md +40 -5
  96. package/docs/hooks.md +69 -14
  97. package/docs/project-configuration.md +63 -4
  98. package/docs/upgrading.md +13 -0
  99. package/gemini-extension.json +2 -2
  100. package/mcp.json +1 -1
  101. package/package.json +5 -5
  102. package/plugin.json +1 -1
  103. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  104. package/plugins/pmcp/.mcp.json +1 -1
  105. package/plugins/pmcp/gemini-extension.json +2 -2
  106. package/plugins/pmcp/mcp.json +1 -1
  107. package/plugins/pmcp/plugin.json +1 -1
  108. package/dist/chunk-7TD53M7L.js +0 -13
  109. package/dist/chunk-FQLCD4HU.js +0 -24
  110. package/dist/chunk-SMBU3QLE.js +0 -7
@@ -612,7 +612,7 @@
612
612
  },
613
613
  {
614
614
  "name": "pmcp",
615
- "version": "0.25.0",
615
+ "version": "0.26.0",
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" },
@@ -445,7 +445,7 @@
445
445
  },
446
446
  {
447
447
  "name": "pmcp",
448
- "version": "0.25.0",
448
+ "version": "0.26.0",
449
449
  "description": "Find package skills and use native runtime project configuration.",
450
450
  "source": "./plugins/pmcp"
451
451
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcp",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "Find package skills and use native runtime project configuration.",
5
5
  "author": { "name": "modootoday" },
6
6
  "license": "Elastic-2.0",
package/.mcp.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "pmcp": {
4
4
  "type": "stdio",
5
5
  "command": "npx",
6
- "args": ["-y", "@modootoday/pmcp@0.25.0", "serve"]
6
+ "args": ["-y", "@modootoday/pmcp@0.26.0", "serve"]
7
7
  }
8
8
  }
9
9
  }
@@ -1,6 +1,7 @@
1
+ import "./chunk-FLG7VRTC.js";
1
2
  import {
2
3
  globPattern
3
- } from "./chunk-UKR64U7J.js";
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 readers(path, source) {
34
+ function memberLists(path, name, value) {
34
35
  const out = {};
35
- for (const [glob, members] of Object.entries(
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
- `[git.affected.readers] "${glob}" must be a list of member directories`
40
+ `[${name}] "${key}" must be a list of member directories`
42
41
  );
43
- out[glob] = members;
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 rootDelta(base, head, input, seeds) {
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 rootAll = rootDelta(basePkg, headPkg, input, seeds);
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
- for (const from of reverse.get(queue.pop()) ?? []) {
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 { all: null, direct: [...direct].sort() };
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]}`, { ...at, unmapped });
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 { all: false, ...at, changed: list, members: wide, unmapped };
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-IPFJM2KD.js.map
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-BG6TONJO.js";
6
+ } from "./chunk-2GL5L2G5.js";
7
7
  import {
8
8
  printSmoke,
9
9
  runSmoke
10
- } from "./chunk-OGCJO6HQ.js";
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-MBHI2TKQ.js";
18
+ } from "./chunk-NQZMGQFG.js";
19
19
  import "./chunk-ANJMLKBR.js";
20
- import "./chunk-SRSKCFFS.js";
20
+ import "./chunk-6XE3WW7S.js";
21
21
  import {
22
22
  checkBudget,
23
23
  renderFrontmatter,
24
24
  splitFrontmatter
25
- } from "./chunk-TOR6SKRB.js";
26
- import "./chunk-VYQJPT27.js";
27
- import "./chunk-UKR64U7J.js";
25
+ } from "./chunk-Y7FYCVUK.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-EWYLWBKS.js";
36
+ import "./chunk-YKICVMF7.js";
37
+ import "./chunk-WUFNKK3U.js";
38
+ import "./chunk-374AZ4J4.js";
37
39
  import "./chunk-SDFJJJB5.js";
38
- import "./chunk-3V37OZQH.js";
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-ARXCYFFZ.js";
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-2TXVOHRS.js";
59
- import "./chunk-DITIXBFB.js";
60
+ } from "./chunk-3KISMGVP.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-FQLCD4HU.js";
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-SMBU3QLE.js";
71
+ import "./chunk-J43Z4O3G.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-6XLLYLJT.js.map
286
+ //# sourceMappingURL=apply-HJUCYQDQ.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  change
3
- } from "./chunk-C3KRMTIZ.js";
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-3V37OZQH.js";
7
+ import "./chunk-PAY6HEEY.js";
8
8
  import "./chunk-Z6WRFOFT.js";
9
9
  import "./chunk-Y6NFETNG.js";
10
- import "./chunk-FQLCD4HU.js";
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-34CEG2NQ.js.map
21
+ //# sourceMappingURL=broadcast-U7ZYOJWE.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7CHUMF3E.js";
4
4
  import {
5
5
  readSpec
6
- } from "./chunk-TOR6SKRB.js";
6
+ } from "./chunk-Y7FYCVUK.js";
7
7
  import {
8
8
  ArgumentError,
9
9
  noConfig
@@ -27,4 +27,4 @@ function specFrom(context) {
27
27
  export {
28
28
  specFrom
29
29
  };
30
- //# sourceMappingURL=chunk-BG6TONJO.js.map
30
+ //# sourceMappingURL=chunk-2GL5L2G5.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  nativeBinary,
9
9
  ptyBinary
10
- } from "./chunk-2TXVOHRS.js";
10
+ } from "./chunk-3KISMGVP.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-PGZZI42O.js.map
65
+ //# sourceMappingURL=chunk-2JUHFM4V.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-UKR64U7J.js.map
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-2TXVOHRS.js";
9
+ } from "./chunk-3KISMGVP.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-ISWR2XIU.js.map
39
+ //# sourceMappingURL=chunk-3JOFDNL4.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  readLeaseSettings
3
- } from "./chunk-DITIXBFB.js";
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-FQLCD4HU.js";
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-SMBU3QLE.js";
15
+ } from "./chunk-J43Z4O3G.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-2TXVOHRS.js.map
613
+ //# sourceMappingURL=chunk-3KISMGVP.js.map
@@ -19,12 +19,12 @@ import {
19
19
  splitKeyed,
20
20
  versionMatches,
21
21
  withoutBlock
22
- } from "./chunk-TOR6SKRB.js";
22
+ } from "./chunk-Y7FYCVUK.js";
23
23
  import {
24
24
  lockVersionProblem,
25
25
  readLock,
26
26
  replaceFile
27
- } from "./chunk-2TXVOHRS.js";
27
+ } from "./chunk-3KISMGVP.js";
28
28
  import {
29
29
  ProjectError,
30
30
  RULES_DIR,
@@ -273,4 +273,4 @@ export {
273
273
  prepare,
274
274
  checkProject
275
275
  };
276
- //# sourceMappingURL=chunk-SRSKCFFS.js.map
276
+ //# sourceMappingURL=chunk-6XE3WW7S.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.25.0";
1193
+ var SERVER_VERSION = "0.26.0";
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-5MUD7FHP.js.map
1250
+ //# sourceMappingURL=chunk-7FHOSWNQ.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  HOST_MANIFEST,
3
3
  HOST_POLICY
4
- } from "./chunk-2TXVOHRS.js";
4
+ } from "./chunk-3KISMGVP.js";
5
5
  import {
6
6
  projectStateDir
7
- } from "./chunk-FQLCD4HU.js";
7
+ } from "./chunk-KLIYFD3W.js";
8
8
 
9
9
  // src/project/host-approval.ts
10
10
  import { createHash } from "crypto";
@@ -99,4 +99,4 @@ export {
99
99
  hostApprovalDoctor,
100
100
  writeApproval
101
101
  };
102
- //# sourceMappingURL=chunk-QYHM6554.js.map
102
+ //# sourceMappingURL=chunk-7PBWLYCO.js.map