@modootoday/pmcp 0.27.0 → 0.28.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.
Files changed (77) 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/{apply-YNBY2GPK.js → apply-6ORDPVZS.js} +9 -9
  6. package/dist/{chunk-ENFF7ZBC.js → chunk-2I54YKIV.js} +2 -2
  7. package/dist/{chunk-Y5WIIEG2.js → chunk-45EC3JVG.js} +4 -4
  8. package/dist/{chunk-GVKVMSWX.js → chunk-4G6LXAM4.js} +13 -13
  9. package/dist/{chunk-YKICVMF7.js → chunk-4ZB5NJZA.js} +8 -3
  10. package/dist/{chunk-OY7XYKVL.js → chunk-5KE3B5TO.js} +2 -2
  11. package/dist/{chunk-LKH57HLV.js → chunk-6FUUX5WO.js} +2 -2
  12. package/dist/{chunk-ZO5CRS2T.js → chunk-7J25NFM6.js} +2 -2
  13. package/dist/{chunk-OZTEMCCM.js → chunk-BLE3YNCU.js} +3 -3
  14. package/dist/{chunk-X2WDR3UK.js → chunk-C7VIQJLF.js} +2 -2
  15. package/dist/{chunk-PH3P5WEY.js → chunk-HUAPDSKW.js} +3 -3
  16. package/dist/{chunk-XCIFD7G5.js → chunk-IQYJWLGX.js} +2 -2
  17. package/dist/{chunk-X3LNF5KJ.js → chunk-IWDZYK6V.js} +5 -5
  18. package/dist/{chunk-S2FUWBLO.js → chunk-J3C46RXZ.js} +61 -8
  19. package/dist/{chunk-Q3XLIRIJ.js → chunk-MPH7BQON.js} +4 -4
  20. package/dist/{chunk-JTKGDT2K.js → chunk-N6Q2QB2H.js} +2 -2
  21. package/dist/{chunk-6U6MLIS2.js → chunk-OFYDBK44.js} +2 -2
  22. package/dist/{chunk-5TT7YAEP.js → chunk-Q2UBBZSD.js} +3 -3
  23. package/dist/{chunk-L5EJK24I.js → chunk-Q7HMO7JX.js} +2 -2
  24. package/dist/chunk-RS2ST3KT.js +7 -0
  25. package/dist/{chunk-M5GNZSOJ.js → chunk-SHTSGJBH.js} +2 -2
  26. package/dist/{chunk-TVA2IN6H.js → chunk-V42DHBXN.js} +5 -5
  27. package/dist/{cli-FVUHK2NB.js → cli-FXHKAXIV.js} +5 -5
  28. package/dist/cli.js +3 -3
  29. package/dist/{completion-WKIMMLNF.js → completion-OXAWXTUC.js} +2 -2
  30. package/dist/{diagnostics-LCNF5NRK.js → diagnostics-PTGOBBN7.js} +5 -5
  31. package/dist/{doctor-PSMPNQXS.js → doctor-IVKT4F44.js} +11 -11
  32. package/dist/{entry-LMAWTZM2.js → entry-7EWYX5XJ.js} +9 -9
  33. package/dist/{exec-mcp-VAP46MKO.js → exec-mcp-WWVMIQLV.js} +7 -7
  34. package/dist/{harness-ZCMU5MJD.js → harness-L5PBWKXS.js} +3 -3
  35. package/dist/harness-launch-gate.js +3 -3
  36. package/dist/harness-worker.js +5 -5
  37. package/dist/hook-body.js +86 -45
  38. package/dist/{hooks-AWAO7CQO.js → hooks-BKLDQQSN.js} +3 -3
  39. package/dist/{host-I4XIJTXR.js → host-3GP3BJKY.js} +6 -6
  40. package/dist/{host-OBTC2PGQ.js → host-TVWPNQV5.js} +2 -2
  41. package/dist/{host-4GFQQJUS.js → host-U7CA77BY.js} +9 -9
  42. package/dist/{host-run-T3FC7L6I.js → host-run-MHD72EGP.js} +4 -4
  43. package/dist/http.js +1 -1
  44. package/dist/{import-mcp-5JSGA5IS.js → import-mcp-7EV5RPWK.js} +6 -6
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +10 -10
  47. package/dist/{init-PZYWBDZS.js → init-SHHALJOG.js} +2 -2
  48. package/dist/{invoke-DCKJCMRB.js → invoke-W42C5POV.js} +7 -7
  49. package/dist/{list-ZEU7T3XK.js → list-GNNRY4NJ.js} +8 -8
  50. package/dist/{logout-CUSOVMKL.js → logout-DZVBFQYZ.js} +7 -7
  51. package/dist/{mainline-SWZPKA7U.js → mainline-D665V4Y3.js} +19 -3
  52. package/dist/{mcp-ZHOPOFXI.js → mcp-5A6WWV32.js} +2 -2
  53. package/dist/{measure-AUBPYT6L.js → measure-Z5HPT26L.js} +2 -2
  54. package/dist/{project-T36TRAWT.js → project-CKECETMB.js} +4 -4
  55. package/dist/{run-LMSHQJPQ.js → run-LWVKCXS4.js} +6 -6
  56. package/dist/{run-37PVE74I.js → run-YMER7XMR.js} +4 -4
  57. package/dist/{serve-E4FD6PAL.js → serve-GYMBJPNJ.js} +3 -3
  58. package/dist/{setup-7JHWLV7K.js → setup-ZYD5XBKU.js} +2 -2
  59. package/dist/{start-login-JSKFXSLY.js → start-login-NE5QMH2F.js} +7 -7
  60. package/dist/{status-ZSK3PNM2.js → status-HCZBWIC3.js} +8 -8
  61. package/dist/{status-ZNWF4362.js → status-WP6NM6VP.js} +7 -7
  62. package/dist/stdio.js +2 -2
  63. package/dist/{test-OCTC2DSZ.js → test-PLZ62G54.js} +7 -7
  64. package/dist/{tui-LE2KPUMI.js → tui-ZWLRAOCQ.js} +4 -4
  65. package/dist/{worker-6U67LWIP.js → worker-GMSWWVTS.js} +7 -7
  66. package/dist/{worktree-sync-BQZD4J73.js → worktree-sync-TQ75DK62.js} +4 -2
  67. package/docs/git-workflow.md +9 -0
  68. package/gemini-extension.json +2 -2
  69. package/mcp.json +1 -1
  70. package/package.json +5 -5
  71. package/plugin.json +1 -1
  72. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  73. package/plugins/pmcp/.mcp.json +1 -1
  74. package/plugins/pmcp/gemini-extension.json +2 -2
  75. package/plugins/pmcp/mcp.json +1 -1
  76. package/plugins/pmcp/plugin.json +1 -1
  77. package/dist/chunk-MXVP3ICV.js +0 -7
package/dist/hook-body.js CHANGED
@@ -4335,8 +4335,39 @@ function displace(root, path) {
4335
4335
  return target;
4336
4336
  }
4337
4337
 
4338
- // src/git/submodules.ts
4338
+ // src/git/dir-to-gitlink.ts
4339
4339
  import { join as join12 } from "node:path";
4340
+ function dirsBecomingGitlinks(root, from, to) {
4341
+ const raw = gitText(root, [
4342
+ "diff",
4343
+ "--raw",
4344
+ "--abbrev=40",
4345
+ "--no-renames",
4346
+ from,
4347
+ to
4348
+ ]);
4349
+ const paths = [];
4350
+ for (const entry of raw.split("\n")) {
4351
+ const added = ADDED_GITLINK.exec(entry);
4352
+ if (!added) continue;
4353
+ const path = added[2] ?? "";
4354
+ const kind = git(root, ["cat-file", "-t", `${from}:${path}`]);
4355
+ if (kind.status !== 0 || kind.stdout.trim() !== "tree") continue;
4356
+ const dir = join12(root, path);
4357
+ if (existsSync(dir) && readdirSync(dir).length > 0) paths.push(path);
4358
+ }
4359
+ return paths;
4360
+ }
4361
+ function dirToGitlinkRefusal(root, from, to, policy) {
4362
+ if (policy?.mode !== "refuse") return null;
4363
+ const paths = dirsBecomingGitlinks(root, from, to);
4364
+ if (paths.length === 0) return null;
4365
+ const hint = policy.hint === void 0 ? "" : `; ${policy.hint}`;
4366
+ return `the move turns ${paths.join(", ")} from a directory with files into a gitlink ([git.submodules] dir_to_gitlink = "refuse"); left where it is${hint}`;
4367
+ }
4368
+
4369
+ // src/git/submodules.ts
4370
+ import { join as join13 } from "node:path";
4340
4371
  function clean(dir) {
4341
4372
  return git(dir, ["status", "--porcelain"]).stdout.trim() === "";
4342
4373
  }
@@ -4346,8 +4377,8 @@ function hasCommit(dir, sha) {
4346
4377
  function movableSubmodules(root) {
4347
4378
  const listed = git(root, ["submodule", "status"]).stdout;
4348
4379
  return listed.split("\n").filter((line) => /^[ +]/u.test(line)).map((line) => line.trim().split(/\s+/u)[1] ?? "").filter((path) => {
4349
- const dir = join12(root, path);
4350
- if (!path || !existsSync(join12(dir, ".git"))) return false;
4380
+ const dir = join13(root, path);
4381
+ if (!path || !existsSync(join13(dir, ".git"))) return false;
4351
4382
  const local = gitText(dir, [
4352
4383
  "rev-list",
4353
4384
  "--count",
@@ -4362,7 +4393,7 @@ function updateToPins(root, paths) {
4362
4393
  const lines = [];
4363
4394
  for (const path of paths) {
4364
4395
  const pin = gitText(root, ["rev-parse", `HEAD:${path}`]);
4365
- const dir = join12(root, path);
4396
+ const dir = join13(root, path);
4366
4397
  if (!pin || !hasCommit(dir, pin)) {
4367
4398
  lines.push(
4368
4399
  `${path}: left alone, ${pin.slice(0, 10) || "its pin"} is not in its checkout`
@@ -4431,6 +4462,16 @@ function syncOnce(options2) {
4431
4462
  }
4432
4463
  const submodules = options2.followSubmodules ? movableSubmodules(ctx.root) : [];
4433
4464
  const before2 = gitText(ctx.root, ["rev-parse", "HEAD"]);
4465
+ const replaced = dirToGitlinkRefusal(
4466
+ ctx.root,
4467
+ before2,
4468
+ gitText(ctx.root, ["rev-parse", ctx.upstream]),
4469
+ options2.dirToGitlink
4470
+ );
4471
+ if (replaced !== null) {
4472
+ report2.warn(replaced);
4473
+ return "held";
4474
+ }
4434
4475
  const args = counted.ahead > 0 ? ["reset", "--keep", "-q", ctx.upstream] : ["merge", "--ff-only", "-q", ctx.upstream];
4435
4476
  const moved = git(ctx.root, args);
4436
4477
  if (moved.status !== 0) {
@@ -6656,18 +6697,18 @@ async function dispatch(raw, compiled, deps) {
6656
6697
  }
6657
6698
 
6658
6699
  // src/hooks/entry/fail-closed.ts
6659
- import { join as join15 } from "node:path";
6700
+ import { join as join16 } from "node:path";
6660
6701
 
6661
6702
  // src/hooks/compiled.ts
6662
- import { join as join14 } from "node:path";
6703
+ import { join as join15 } from "node:path";
6663
6704
 
6664
6705
  // src/hooks/integrity-cache.ts
6665
6706
  import { homedir as homedir4 } from "node:os";
6666
- import { dirname as dirname8, join as join13 } from "node:path";
6707
+ import { dirname as dirname8, join as join14 } from "node:path";
6667
6708
  var LIMIT = 64;
6668
6709
  function cacheFile() {
6669
- const base = process.env["XDG_CACHE_HOME"] || join13(homedir4(), ".cache");
6670
- return join13(base, "pmcp", "hook-verified.json");
6710
+ const base = process.env["XDG_CACHE_HOME"] || join14(homedir4(), ".cache");
6711
+ return join14(base, "pmcp", "hook-verified.json");
6671
6712
  }
6672
6713
  function readCache() {
6673
6714
  try {
@@ -6737,8 +6778,8 @@ function readLockFile(path) {
6737
6778
  }
6738
6779
  }
6739
6780
  function readCompiled(root) {
6740
- const policyPath = join14(root, POLICY_FILE);
6741
- const files2 = [policyPath, join14(root, LOCK_FILE)];
6781
+ const policyPath = join15(root, POLICY_FILE);
6782
+ const files2 = [policyPath, join15(root, LOCK_FILE)];
6742
6783
  const before2 = stampOf(files2);
6743
6784
  const text9 = readFileSync(policyPath, "utf8");
6744
6785
  const lock = readLockFile(files2[1]);
@@ -6761,7 +6802,7 @@ function readCompiled(root) {
6761
6802
  var FAILED_CLOSED = "pmcp hook could not evaluate this call and refused it";
6762
6803
  function rawFailure(root) {
6763
6804
  try {
6764
- const raw = JSON.parse(readFileSync(join15(root, POLICY_FILE), "utf8"))["failure"];
6805
+ const raw = JSON.parse(readFileSync(join16(root, POLICY_FILE), "utf8"))["failure"];
6765
6806
  if (!raw || typeof raw.timeoutMs !== "number" || typeof raw.retry !== "number" || !Array.isArray(raw.pass) || !raw.pass.every(
6766
6807
  (kind) => PASS_KINDS.includes(kind)
6767
6808
  ))
@@ -6796,7 +6837,7 @@ function failClosed(adapter, event, root, error, stated = false) {
6796
6837
  }
6797
6838
 
6798
6839
  // src/hooks/entry/lock-repair.ts
6799
- import { join as join16, resolve as resolve21 } from "node:path";
6840
+ import { join as join17, resolve as resolve21 } from "node:path";
6800
6841
  var REV = /^[\w./~^@{}][\w./~^@{}-]*$/u;
6801
6842
  var LOCK_PATHS = /* @__PURE__ */ new Set([LOCK_FILE, `./${LOCK_FILE}`]);
6802
6843
  var RESTORE_OPTIONS = /* @__PURE__ */ new Set([
@@ -6840,7 +6881,7 @@ function repairsLock(input, root) {
6840
6881
  if (!tool) return false;
6841
6882
  if (tool.kind === "read") return true;
6842
6883
  if (tool.kind === "edit") {
6843
- const lock = join16(root, LOCK_FILE);
6884
+ const lock = join17(root, LOCK_FILE);
6844
6885
  return tool.paths.length > 0 && tool.paths.every((path) => resolve21(input.cwd, path) === lock);
6845
6886
  }
6846
6887
  if (tool.kind === "shell") return restoresLock(tool.command ?? "");
@@ -6858,7 +6899,7 @@ function lockRepair(adapter, event, root, input, error) {
6858
6899
  }
6859
6900
 
6860
6901
  // src/hooks/entry/logger.ts
6861
- import { dirname as dirname9, join as join18 } from "node:path";
6902
+ import { dirname as dirname9, join as join19 } from "node:path";
6862
6903
 
6863
6904
  // src/logging/levels.ts
6864
6905
  var LEVEL_RANK = {
@@ -6982,11 +7023,11 @@ var silentLogger = createLogger(() => {
6982
7023
  });
6983
7024
 
6984
7025
  // src/logging/sinks/file.ts
6985
- import { join as join17 } from "node:path";
7026
+ import { join as join18 } from "node:path";
6986
7027
  var FILE = /^pmcp-(\d{8})(?:\.\d+)?\.jsonl$/u;
6987
7028
  function dailyLogFile(dir, now = /* @__PURE__ */ new Date()) {
6988
7029
  const day = now.toISOString().slice(0, 10).replaceAll("-", "");
6989
- return join17(dir, `pmcp-${day}.jsonl`);
7030
+ return join18(dir, `pmcp-${day}.jsonl`);
6990
7031
  }
6991
7032
  function roll(file2) {
6992
7033
  let index = 1;
@@ -7017,7 +7058,7 @@ function logFiles(dir) {
7017
7058
  const part = (name) => Number(/\.(\d+)\.jsonl$/u.exec(name)?.[1] ?? Number.MAX_SAFE_INTEGER);
7018
7059
  return names4.sort(
7019
7060
  (a, b) => a.slice(5, 13).localeCompare(b.slice(5, 13)) || part(a) - part(b)
7020
- ).map((name) => join17(dir, name));
7061
+ ).map((name) => join18(dir, name));
7021
7062
  }
7022
7063
  function pruneLogs(dir, keepDays, now = /* @__PURE__ */ new Date()) {
7023
7064
  const cutoff = new Date(now.getTime() - keepDays * 864e5).toISOString().slice(0, 10).replaceAll("-", "");
@@ -7043,7 +7084,7 @@ function hookLogger(root, compiled, runtime2, event) {
7043
7084
  process.env["PMCP_LOG"]
7044
7085
  );
7045
7086
  const file2 = compiled?.logFile ? expandPath(root, compiled.logFile) : void 0;
7046
- const dir = file2 ? dirname9(file2) : join18(projectStateDir(root, compiled?.stateDir), "logs");
7087
+ const dir = file2 ? dirname9(file2) : join19(projectStateDir(root, compiled?.stateDir), "logs");
7047
7088
  const sink = fileSink({
7048
7089
  dir,
7049
7090
  ...file2 ? { file: file2 } : {},
@@ -7059,18 +7100,18 @@ function hookLogger(root, compiled, runtime2, event) {
7059
7100
  }
7060
7101
 
7061
7102
  // src/hooks/entry/state-dir.ts
7062
- import { join as join20 } from "node:path";
7103
+ import { join as join21 } from "node:path";
7063
7104
 
7064
7105
  // src/sessions/lease-files.ts
7065
- import { dirname as dirname10, isAbsolute as isAbsolute16, join as join19 } from "node:path";
7106
+ import { dirname as dirname10, isAbsolute as isAbsolute16, join as join20 } from "node:path";
7066
7107
  var GATE_DIR = "${gate_dir}/";
7067
7108
  function gateTree(root, stateDir, gate, env) {
7068
7109
  const override = gate.treeEnv ? env[gate.treeEnv] : void 0;
7069
7110
  if (override) return override;
7070
- return gate.tree ? expandPath(root, gate.tree) : join19(stateDir, "gate", "tree");
7111
+ return gate.tree ? expandPath(root, gate.tree) : join20(stateDir, "gate", "tree");
7071
7112
  }
7072
7113
  function atGateDir(path, gateDir) {
7073
- return path.startsWith(GATE_DIR) ? join19(gateDir, path.slice(GATE_DIR.length)) : path;
7114
+ return path.startsWith(GATE_DIR) ? join20(gateDir, path.slice(GATE_DIR.length)) : path;
7074
7115
  }
7075
7116
  function resolvePauseFile(file2, gateDir) {
7076
7117
  return file2 === void 0 ? void 0 : atGateDir(file2, gateDir);
@@ -7125,7 +7166,7 @@ function pauseFileAnswer(root) {
7125
7166
  compiled?.sessions.gate,
7126
7167
  process.env
7127
7168
  );
7128
- return `${file2 ?? join20(stateDir, STATE_FILES.pause)}
7169
+ return `${file2 ?? join21(stateDir, STATE_FILES.pause)}
7129
7170
  `;
7130
7171
  }
7131
7172
 
@@ -7163,7 +7204,7 @@ var gitProbe = {
7163
7204
  };
7164
7205
 
7165
7206
  // src/sessions/files/broadcast.ts
7166
- import { join as join21 } from "node:path";
7207
+ import { join as join22 } from "node:path";
7167
7208
 
7168
7209
  // src/sessions/files/json.ts
7169
7210
  import { dirname as dirname11 } from "node:path";
@@ -7210,8 +7251,8 @@ function writeLines(path, values) {
7210
7251
 
7211
7252
  // src/sessions/files/broadcast.ts
7212
7253
  function filesBroadcast(dir, keep, registry2) {
7213
- const latestPath = join21(dir, STATE_FILES.broadcast);
7214
- const historyPath = join21(dir, STATE_FILES.history);
7254
+ const latestPath = join22(dir, STATE_FILES.broadcast);
7255
+ const historyPath = join22(dir, STATE_FILES.history);
7215
7256
  const list = () => {
7216
7257
  const latest = asBroadcast(readJson3(latestPath));
7217
7258
  if (!latest) return [];
@@ -7255,9 +7296,9 @@ function filesBroadcast(dir, keep, registry2) {
7255
7296
  }
7256
7297
 
7257
7298
  // src/sessions/files/leases.ts
7258
- import { dirname as dirname12, join as join22 } from "node:path";
7299
+ import { dirname as dirname12, join as join23 } from "node:path";
7259
7300
  function filesLeases(dir, files2 = {}) {
7260
- const leasePath = (name) => files2[name]?.file ?? join22(dir, leaseFile(name));
7301
+ const leasePath = (name) => files2[name]?.file ?? join23(dir, leaseFile(name));
7261
7302
  const read4 = (name) => {
7262
7303
  const lease = asLease(readJson3(leasePath(name)));
7263
7304
  if (!lease || !alive(lease.pid)) return null;
@@ -7307,28 +7348,28 @@ function filesLeases(dir, files2 = {}) {
7307
7348
  }
7308
7349
 
7309
7350
  // src/sessions/files/mailbox.ts
7310
- import { join as join23 } from "node:path";
7351
+ import { join as join24 } from "node:path";
7311
7352
  var ID = /^\d{13}-[0-9a-f]{8}$/u;
7312
7353
  var SAFE_KEY = /^@?[\w.-]+$/u;
7313
7354
  function filesMailbox(dir, settings) {
7314
- const messages = join23(dir, "messages");
7315
- const inbox = join23(dir, "inbox");
7316
- const pathOf = (id) => join23(messages, `${id}.json`);
7355
+ const messages = join24(dir, "messages");
7356
+ const inbox = join24(dir, "inbox");
7357
+ const pathOf = (id) => join24(messages, `${id}.json`);
7317
7358
  const marker = (key, id, kind) => {
7318
7359
  if (!SAFE_KEY.test(key) || !ID.test(id))
7319
7360
  throw new Error(`invalid mailbox key ${key} or id ${id}`);
7320
- return join23(inbox, key, `${id}.${kind}`);
7361
+ return join24(inbox, key, `${id}.${kind}`);
7321
7362
  };
7322
7363
  const audit = (event, fields2) => {
7323
7364
  if (!settings.audit) return;
7324
7365
  const line = { at: (/* @__PURE__ */ new Date()).toISOString(), event, ...fields2 };
7325
- appendFileSync(join23(dir, "messages.jsonl"), `${JSON.stringify(line)}
7366
+ appendFileSync(join24(dir, "messages.jsonl"), `${JSON.stringify(line)}
7326
7367
  `, {
7327
7368
  mode: 384
7328
7369
  });
7329
7370
  };
7330
7371
  const touch = (path) => {
7331
- mkdirSync(join23(path, ".."), { recursive: true, mode: 448 });
7372
+ mkdirSync(join24(path, ".."), { recursive: true, mode: 448 });
7332
7373
  try {
7333
7374
  writeFileSync(path, "", { flag: "wx", mode: 384 });
7334
7375
  return true;
@@ -7345,7 +7386,7 @@ function filesMailbox(dir, settings) {
7345
7386
  if (existsSync(inbox))
7346
7387
  for (const key of readdirSync(inbox))
7347
7388
  for (const kind of ["ack", "delivered"])
7348
- rmSync(join23(inbox, key, `${message.id}.${kind}`), { force: true });
7389
+ rmSync(join24(inbox, key, `${message.id}.${kind}`), { force: true });
7349
7390
  audit(event, { id: message.id });
7350
7391
  };
7351
7392
  return {
@@ -7421,9 +7462,9 @@ function filesMailbox(dir, settings) {
7421
7462
  }
7422
7463
 
7423
7464
  // src/sessions/files/pause.ts
7424
- import { join as join24 } from "node:path";
7465
+ import { join as join25 } from "node:path";
7425
7466
  function filesPause(dir, file2) {
7426
- const path = file2 ?? join24(dir, STATE_FILES.pause);
7467
+ const path = file2 ?? join25(dir, STATE_FILES.pause);
7427
7468
  return {
7428
7469
  read: () => asPause(readJson3(path)),
7429
7470
  write(pause2) {
@@ -7441,12 +7482,12 @@ function filesPause(dir, file2) {
7441
7482
  }
7442
7483
 
7443
7484
  // src/sessions/files/registry.ts
7444
- import { join as join25 } from "node:path";
7485
+ import { join as join26 } from "node:path";
7445
7486
  var SESSION_ID = /^[A-Za-z0-9_-]{8,64}$/u;
7446
7487
  function filesRegistry(dir, staleMs) {
7447
- const records = join25(dir, STATE_FILES.records);
7448
- const dirs = [records, join25(dir, STATE_FILES.legacyRecords)];
7449
- const pathsOf = (session) => dirs.map((records2) => join25(records2, `${session}.json`));
7488
+ const records = join26(dir, STATE_FILES.records);
7489
+ const dirs = [records, join26(dir, STATE_FILES.legacyRecords)];
7490
+ const pathsOf = (session) => dirs.map((records2) => join26(records2, `${session}.json`));
7450
7491
  const get = (session) => {
7451
7492
  if (!SESSION_ID.test(session)) return null;
7452
7493
  return latestRecord(
@@ -7465,7 +7506,7 @@ function filesRegistry(dir, staleMs) {
7465
7506
  for (const name of names4)
7466
7507
  found2.set(name, [
7467
7508
  ...found2.get(name) ?? [],
7468
- asRecord(readJson3(join25(folder, name)))
7509
+ asRecord(readJson3(join26(folder, name)))
7469
7510
  ]);
7470
7511
  }
7471
7512
  return [...found2.values()].map(latestRecord).filter((record) => record !== null).map((record) => ({ ...record, live: isLive(record, now, staleMs) }));
@@ -7492,7 +7533,7 @@ function filesRegistry(dir, staleMs) {
7492
7533
  next["worktree"] = checkout?.root ?? "";
7493
7534
  next["branch"] = checkout?.branch ?? "";
7494
7535
  }
7495
- writeJson(join25(records, `${session}.json`), next);
7536
+ writeJson(join26(records, `${session}.json`), next);
7496
7537
  return next;
7497
7538
  },
7498
7539
  sweep(now = Date.now()) {
@@ -13,12 +13,12 @@ async function run(context) {
13
13
  const [verb = "list", ...extra] = context.args.positional;
14
14
  if (!VERBS.includes(verb)) throw unknownSubcommand("hooks", verb, VERBS);
15
15
  if (extra.length) throw new ArgumentError(`unexpected ${extra.join(" ")}`);
16
- if (verb === "list") return (await import("./list-ZEU7T3XK.js")).run(context);
17
- if (verb === "test") return (await import("./test-OCTC2DSZ.js")).run(context);
16
+ if (verb === "list") return (await import("./list-GNNRY4NJ.js")).run(context);
17
+ if (verb === "test") return (await import("./test-PLZ62G54.js")).run(context);
18
18
  return (await import("./report-MWXB5XKE.js")).run(context);
19
19
  }
20
20
  var hooksCommand = { ...hooksSpec, run };
21
21
  export {
22
22
  hooksCommand
23
23
  };
24
- //# sourceMappingURL=hooks-AWAO7CQO.js.map
24
+ //# sourceMappingURL=hooks-BKLDQQSN.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  requireTerminal,
3
3
  terminalSupport
4
- } from "./chunk-OZTEMCCM.js";
4
+ } from "./chunk-BLE3YNCU.js";
5
5
  import "./chunk-5ZABTVSW.js";
6
- import "./chunk-6U6MLIS2.js";
6
+ import "./chunk-OFYDBK44.js";
7
7
  import "./chunk-LMT3PPXJ.js";
8
- import "./chunk-LKH57HLV.js";
8
+ import "./chunk-6FUUX5WO.js";
9
9
  import "./chunk-R2GPCZUX.js";
10
10
  import "./chunk-34DECPVC.js";
11
- import "./chunk-OY7XYKVL.js";
11
+ import "./chunk-5KE3B5TO.js";
12
12
  import "./chunk-PZ6D3WKD.js";
13
13
  import "./chunk-N7ANFMA5.js";
14
14
  import "./chunk-TYY5TYHF.js";
@@ -17,7 +17,7 @@ import "./chunk-KLIYFD3W.js";
17
17
  import "./chunk-GUHOEIHP.js";
18
18
  import "./chunk-IJBSOWHK.js";
19
19
  import "./chunk-XWLMZKH2.js";
20
- import "./chunk-MXVP3ICV.js";
20
+ import "./chunk-RS2ST3KT.js";
21
21
  import "./chunk-GJXOFDJT.js";
22
22
  import "./chunk-PMJG2CXF.js";
23
23
  import "./chunk-J6KL3COD.js";
@@ -25,4 +25,4 @@ export {
25
25
  requireTerminal,
26
26
  terminalSupport
27
27
  };
28
- //# sourceMappingURL=host-I4XIJTXR.js.map
28
+ //# sourceMappingURL=host-3GP3BJKY.js.map
@@ -20,7 +20,7 @@ async function run(context) {
20
20
  throw unknownSubcommand("host io", verb, verbs);
21
21
  if (extra !== void 0) throw new ArgumentError(`unexpected ${extra}`);
22
22
  if (verb === "measure")
23
- return (await import("./measure-AUBPYT6L.js")).ioMeasure(context);
23
+ return (await import("./measure-Z5HPT26L.js")).ioMeasure(context);
24
24
  if (verb === "plan")
25
25
  return (await import("./plan-46BTJQIV.js")).ioPlanCommand(context);
26
26
  return (await import("./doctor-NKFZNSRD.js")).ioDoctor(context);
@@ -29,4 +29,4 @@ var hostCommand = { ...hostSpec, run };
29
29
  export {
30
30
  hostCommand
31
31
  };
32
- //# sourceMappingURL=host-OBTC2PGQ.js.map
32
+ //# sourceMappingURL=host-TVWPNQV5.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-F5XMGOOX.js";
5
5
  import {
6
6
  specFrom
7
- } from "./chunk-X2WDR3UK.js";
7
+ } from "./chunk-C7VIQJLF.js";
8
8
  import "./chunk-7CHUMF3E.js";
9
9
  import {
10
10
  approvalDir,
@@ -12,9 +12,9 @@ import {
12
12
  hostDigest,
13
13
  projectedFiles,
14
14
  writeApproval
15
- } from "./chunk-ZO5CRS2T.js";
16
- import "./chunk-Y5WIIEG2.js";
17
- import "./chunk-S2FUWBLO.js";
15
+ } from "./chunk-7J25NFM6.js";
16
+ import "./chunk-45EC3JVG.js";
17
+ import "./chunk-J3C46RXZ.js";
18
18
  import "./chunk-FLG7VRTC.js";
19
19
  import "./chunk-2GD7PQ7J.js";
20
20
  import "./chunk-EATCUWGG.js";
@@ -26,7 +26,7 @@ import "./chunk-LFFIQBNY.js";
26
26
  import "./chunk-HQOB7OQS.js";
27
27
  import "./chunk-73AKO4UL.js";
28
28
  import "./chunk-VQBXWMLT.js";
29
- import "./chunk-YKICVMF7.js";
29
+ import "./chunk-4ZB5NJZA.js";
30
30
  import "./chunk-WUFNKK3U.js";
31
31
  import "./chunk-374AZ4J4.js";
32
32
  import "./chunk-SDFJJJB5.js";
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-Y6NFETNG.js";
43
43
  import {
44
44
  hostDoctor
45
- } from "./chunk-OY7XYKVL.js";
45
+ } from "./chunk-5KE3B5TO.js";
46
46
  import "./chunk-PZ6D3WKD.js";
47
47
  import "./chunk-N7ANFMA5.js";
48
48
  import "./chunk-TYY5TYHF.js";
@@ -51,7 +51,7 @@ import "./chunk-KLIYFD3W.js";
51
51
  import "./chunk-GUHOEIHP.js";
52
52
  import "./chunk-IJBSOWHK.js";
53
53
  import "./chunk-XWLMZKH2.js";
54
- import "./chunk-MXVP3ICV.js";
54
+ import "./chunk-RS2ST3KT.js";
55
55
  import "./chunk-GJXOFDJT.js";
56
56
  import "./chunk-PMJG2CXF.js";
57
57
  import "./chunk-J6KL3COD.js";
@@ -145,7 +145,7 @@ async function runHost(context) {
145
145
  return 1;
146
146
  }
147
147
  if (verb === "up" || verb === "down" || verb === "unit") {
148
- const { runHostVerb } = await import("./host-run-T3FC7L6I.js");
148
+ const { runHostVerb } = await import("./host-run-MHD72EGP.js");
149
149
  return runHostVerb(verb, spec, context);
150
150
  }
151
151
  if (verb === "status") {
@@ -173,4 +173,4 @@ async function runHost(context) {
173
173
  export {
174
174
  runHost
175
175
  };
176
- //# sourceMappingURL=host-4GFQQJUS.js.map
176
+ //# sourceMappingURL=host-U7CA77BY.js.map
@@ -5,14 +5,14 @@ import {
5
5
  import {
6
6
  approvalDir,
7
7
  approvalState
8
- } from "./chunk-ZO5CRS2T.js";
8
+ } from "./chunk-7J25NFM6.js";
9
9
  import {
10
10
  ArgumentError
11
11
  } from "./chunk-Y6NFETNG.js";
12
12
  import {
13
13
  missingBinary,
14
14
  ptyBinary
15
- } from "./chunk-OY7XYKVL.js";
15
+ } from "./chunk-5KE3B5TO.js";
16
16
  import "./chunk-PZ6D3WKD.js";
17
17
  import "./chunk-N7ANFMA5.js";
18
18
  import "./chunk-TYY5TYHF.js";
@@ -25,7 +25,7 @@ import "./chunk-IJBSOWHK.js";
25
25
  import "./chunk-XWLMZKH2.js";
26
26
  import {
27
27
  VERSION
28
- } from "./chunk-MXVP3ICV.js";
28
+ } from "./chunk-RS2ST3KT.js";
29
29
  import "./chunk-GJXOFDJT.js";
30
30
  import "./chunk-PMJG2CXF.js";
31
31
  import {
@@ -333,4 +333,4 @@ async function runHostVerb(verb, spec, context) {
333
333
  export {
334
334
  runHostVerb
335
335
  };
336
- //# sourceMappingURL=host-run-T3FC7L6I.js.map
336
+ //# sourceMappingURL=host-run-MHD72EGP.js.map
package/dist/http.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ISZOLR3D.js";
5
5
  import {
6
6
  createSkillServer
7
- } from "./chunk-XCIFD7G5.js";
7
+ } from "./chunk-IQYJWLGX.js";
8
8
  import "./chunk-6WXMJOMI.js";
9
9
  import {
10
10
  readCatalog
@@ -6,8 +6,8 @@ import {
6
6
  } from "./chunk-ANJMLKBR.js";
7
7
  import {
8
8
  readMcp
9
- } from "./chunk-Y5WIIEG2.js";
10
- import "./chunk-S2FUWBLO.js";
9
+ } from "./chunk-45EC3JVG.js";
10
+ import "./chunk-J3C46RXZ.js";
11
11
  import "./chunk-FLG7VRTC.js";
12
12
  import "./chunk-2GD7PQ7J.js";
13
13
  import "./chunk-EATCUWGG.js";
@@ -17,7 +17,7 @@ import "./chunk-LFFIQBNY.js";
17
17
  import "./chunk-HQOB7OQS.js";
18
18
  import "./chunk-73AKO4UL.js";
19
19
  import "./chunk-VQBXWMLT.js";
20
- import "./chunk-YKICVMF7.js";
20
+ import "./chunk-4ZB5NJZA.js";
21
21
  import "./chunk-WUFNKK3U.js";
22
22
  import "./chunk-374AZ4J4.js";
23
23
  import "./chunk-SDFJJJB5.js";
@@ -33,7 +33,7 @@ import {
33
33
  ArgumentError,
34
34
  many
35
35
  } from "./chunk-Y6NFETNG.js";
36
- import "./chunk-OY7XYKVL.js";
36
+ import "./chunk-5KE3B5TO.js";
37
37
  import "./chunk-PZ6D3WKD.js";
38
38
  import "./chunk-N7ANFMA5.js";
39
39
  import {
@@ -44,7 +44,7 @@ import "./chunk-KLIYFD3W.js";
44
44
  import "./chunk-GUHOEIHP.js";
45
45
  import "./chunk-IJBSOWHK.js";
46
46
  import "./chunk-XWLMZKH2.js";
47
- import "./chunk-MXVP3ICV.js";
47
+ import "./chunk-RS2ST3KT.js";
48
48
  import "./chunk-GJXOFDJT.js";
49
49
  import "./chunk-PMJG2CXF.js";
50
50
  import "./chunk-J6KL3COD.js";
@@ -409,4 +409,4 @@ function importMcp(context) {
409
409
  export {
410
410
  importMcp
411
411
  };
412
- //# sourceMappingURL=import-mcp-5JSGA5IS.js.map
412
+ //# sourceMappingURL=import-mcp-7EV5RPWK.js.map
package/dist/index.d.ts CHANGED
@@ -304,7 +304,7 @@ declare function resolveSkillFileUri(uri: string, entries: readonly SkillEntry[]
304
304
  } | null;
305
305
 
306
306
  declare const SERVER_NAME = "pmcp";
307
- declare const SERVER_VERSION = "0.27.0";
307
+ declare const SERVER_VERSION = "0.28.1";
308
308
  declare function registerSkillTools(server: McpServer, tools: SkillTools): McpServer;
309
309
  interface SkillMcpOptions extends SkillServerOptions {
310
310
  readonly mailbox?: MailboxService;
package/dist/index.js CHANGED
@@ -4,27 +4,27 @@ import {
4
4
  } from "./chunk-YOWIYFIV.js";
5
5
  import {
6
6
  doctor
7
- } from "./chunk-X3LNF5KJ.js";
8
- import "./chunk-ZO5CRS2T.js";
7
+ } from "./chunk-IWDZYK6V.js";
8
+ import "./chunk-7J25NFM6.js";
9
9
  import "./chunk-JQVSDPFL.js";
10
10
  import "./chunk-VJFEN6DJ.js";
11
11
  import "./chunk-NHUMPEPV.js";
12
12
  import "./chunk-TIA4SPU2.js";
13
13
  import {
14
14
  project
15
- } from "./chunk-Q3XLIRIJ.js";
15
+ } from "./chunk-MPH7BQON.js";
16
16
  import "./chunk-ANJMLKBR.js";
17
17
  import {
18
18
  prepareSearch
19
19
  } from "./chunk-NLHLA2N5.js";
20
20
  import {
21
21
  deadGlobs
22
- } from "./chunk-PH3P5WEY.js";
22
+ } from "./chunk-HUAPDSKW.js";
23
23
  import {
24
24
  plan,
25
25
  readSpec
26
- } from "./chunk-Y5WIIEG2.js";
27
- import "./chunk-S2FUWBLO.js";
26
+ } from "./chunk-45EC3JVG.js";
27
+ import "./chunk-J3C46RXZ.js";
28
28
  import "./chunk-FLG7VRTC.js";
29
29
  import "./chunk-2GD7PQ7J.js";
30
30
  import "./chunk-EATCUWGG.js";
@@ -34,7 +34,7 @@ import "./chunk-LFFIQBNY.js";
34
34
  import "./chunk-HQOB7OQS.js";
35
35
  import "./chunk-73AKO4UL.js";
36
36
  import "./chunk-VQBXWMLT.js";
37
- import "./chunk-YKICVMF7.js";
37
+ import "./chunk-4ZB5NJZA.js";
38
38
  import "./chunk-WUFNKK3U.js";
39
39
  import "./chunk-374AZ4J4.js";
40
40
  import "./chunk-SDFJJJB5.js";
@@ -86,7 +86,7 @@ import {
86
86
  registerSkillsExtension,
87
87
  resolveSkillFileUri,
88
88
  skillFileUri
89
- } from "./chunk-XCIFD7G5.js";
89
+ } from "./chunk-IQYJWLGX.js";
90
90
  import {
91
91
  normaliseIntent
92
92
  } from "./chunk-6WXMJOMI.js";
@@ -121,7 +121,7 @@ import {
121
121
  import "./chunk-6STKGOCW.js";
122
122
  import {
123
123
  LOCK_FILE
124
- } from "./chunk-OY7XYKVL.js";
124
+ } from "./chunk-5KE3B5TO.js";
125
125
  import "./chunk-PZ6D3WKD.js";
126
126
  import "./chunk-N7ANFMA5.js";
127
127
  import {
@@ -133,7 +133,7 @@ import "./chunk-KLIYFD3W.js";
133
133
  import "./chunk-GUHOEIHP.js";
134
134
  import "./chunk-IJBSOWHK.js";
135
135
  import "./chunk-XWLMZKH2.js";
136
- import "./chunk-MXVP3ICV.js";
136
+ import "./chunk-RS2ST3KT.js";
137
137
  import {
138
138
  CONFIG_FILE,
139
139
  ConfigError,
@@ -6,9 +6,9 @@ import "./chunk-JPYQDOEW.js";
6
6
  // src/commands/init.ts
7
7
  var initCommand = {
8
8
  ...initSpec,
9
- run: async (context) => (await import("./run-LMSHQJPQ.js")).run(context)
9
+ run: async (context) => (await import("./run-LWVKCXS4.js")).run(context)
10
10
  };
11
11
  export {
12
12
  initCommand
13
13
  };
14
- //# sourceMappingURL=init-PZYWBDZS.js.map
14
+ //# sourceMappingURL=init-SHHALJOG.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  invoke
3
- } from "./chunk-TVA2IN6H.js";
3
+ } from "./chunk-V42DHBXN.js";
4
4
  import "./chunk-DZ2MRTYT.js";
5
- import "./chunk-5TT7YAEP.js";
6
- import "./chunk-LKH57HLV.js";
5
+ import "./chunk-Q2UBBZSD.js";
6
+ import "./chunk-6FUUX5WO.js";
7
7
  import "./chunk-R2GPCZUX.js";
8
- import "./chunk-JTKGDT2K.js";
8
+ import "./chunk-N6Q2QB2H.js";
9
9
  import "./chunk-34DECPVC.js";
10
- import "./chunk-OY7XYKVL.js";
10
+ import "./chunk-5KE3B5TO.js";
11
11
  import "./chunk-PZ6D3WKD.js";
12
12
  import "./chunk-N7ANFMA5.js";
13
13
  import "./chunk-TYY5TYHF.js";
@@ -16,7 +16,7 @@ import "./chunk-KLIYFD3W.js";
16
16
  import "./chunk-GUHOEIHP.js";
17
17
  import "./chunk-IJBSOWHK.js";
18
18
  import "./chunk-XWLMZKH2.js";
19
- import "./chunk-MXVP3ICV.js";
19
+ import "./chunk-RS2ST3KT.js";
20
20
  import "./chunk-GJXOFDJT.js";
21
21
  import "./chunk-PMJG2CXF.js";
22
22
  import "./chunk-ITDJ2EXN.js";
@@ -26,4 +26,4 @@ import "./chunk-J6KL3COD.js";
26
26
  export {
27
27
  invoke
28
28
  };
29
- //# sourceMappingURL=invoke-DCKJCMRB.js.map
29
+ //# sourceMappingURL=invoke-W42C5POV.js.map