@modootoday/pmcp 0.20.0 → 0.22.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 (124) 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-QJ6MGLBX.js → apply-3PR4UOES.js} +58 -24
  6. package/dist/{available-HYSDAFYH.js → available-BFXLII4A.js} +7 -7
  7. package/dist/{broadcast-LYOA6BEW.js → broadcast-ZALGUJVR.js} +4 -4
  8. package/dist/chunk-2GI5RM3M.js +53 -0
  9. package/dist/chunk-2QJGUR23.js +274 -0
  10. package/dist/{chunk-FD6VGFYZ.js → chunk-3LADLKAI.js} +207 -15
  11. package/dist/{chunk-MZEMLFFD.js → chunk-3OBJVG5R.js} +2 -2
  12. package/dist/{chunk-IQD4W53M.js → chunk-57Q75MS4.js} +18 -18
  13. package/dist/chunk-5YCKFU5Q.js +1672 -0
  14. package/dist/{chunk-IZABPDAO.js → chunk-5ZUDBC3P.js} +2 -2
  15. package/dist/{chunk-EKPMVEIA.js → chunk-73IDLWRI.js} +7 -4
  16. package/dist/{chunk-QYH2NR6G.js → chunk-7FV2LORT.js} +2 -2
  17. package/dist/{chunk-4VK5G3SV.js → chunk-E6YP2PMO.js} +3 -5
  18. package/dist/{chunk-RMHZFWHF.js → chunk-EPNTYTDZ.js} +33 -33
  19. package/dist/{chunk-5JPD6VIH.js → chunk-GBKRDRMZ.js} +22 -7
  20. package/dist/{chunk-T6GOWHK6.js → chunk-GFOQDLPL.js} +6 -1
  21. package/dist/{chunk-RBNMNKNN.js → chunk-JQVSDPFL.js} +3 -3
  22. package/dist/{chunk-OG7QR2DP.js → chunk-KEHB4FZP.js} +17 -2
  23. package/dist/chunk-KUBHGVTD.js +126 -0
  24. package/dist/chunk-L42U5XKC.js +7 -0
  25. package/dist/chunk-LFFIQBNY.js +115 -0
  26. package/dist/{chunk-O2JWF7ZM.js → chunk-LVNGMGOM.js} +2 -2
  27. package/dist/{chunk-PQTM27GU.js → chunk-MR5IBS6L.js} +6 -7
  28. package/dist/{chunk-OAIQ7A3R.js → chunk-NDED2O5B.js} +5 -5
  29. package/dist/{chunk-M2RYXWX2.js → chunk-NHUMPEPV.js} +2 -2
  30. package/dist/{chunk-ONP6JRFZ.js → chunk-OFJIMBTL.js} +2 -2
  31. package/dist/{chunk-YN5GQCHN.js → chunk-RHJEGLYM.js} +6 -1
  32. package/dist/{chunk-JBHGJKSL.js → chunk-RNC7PGW2.js} +2 -2
  33. package/dist/{chunk-J6HNP6HA.js → chunk-RNE4WPBS.js} +2 -2
  34. package/dist/{chunk-YDICIB2A.js → chunk-S4Y44CCC.js} +2 -2
  35. package/dist/{chunk-K2C3KFGB.js → chunk-SEM6WD7J.js} +29 -17
  36. package/dist/{chunk-CQZYQAAV.js → chunk-SLCNCAWY.js} +3 -3
  37. package/dist/{chunk-L4MFGGSI.js → chunk-SPZ42EWE.js} +2 -2
  38. package/dist/{chunk-QOFSPFJ6.js → chunk-TCW2H47H.js} +3405 -3395
  39. package/dist/{chunk-FQAJSNNU.js → chunk-TPGJXENR.js} +3 -3
  40. package/dist/chunk-UKR64U7J.js +20 -0
  41. package/dist/{chunk-66F3HLW4.js → chunk-XB363ZXT.js} +122 -4
  42. package/dist/{chunk-UD3BEEBQ.js → chunk-XZ2TDH3J.js} +80 -3
  43. package/dist/{chunk-QSIADSMQ.js → chunk-Z6WRFOFT.js} +3 -3
  44. package/dist/{claude-GT2BPXEL.js → claude-XVLF4N4S.js} +3 -3
  45. package/dist/{cli-IV5DJCXU.js → cli-6FWRBCWM.js} +8 -8
  46. package/dist/{cli-6HTAJ54L.js → cli-BEEDAD4E.js} +7 -7
  47. package/dist/cli.js +11 -11
  48. package/dist/{completion-PPM7MEI2.js → completion-LHYNCQ3N.js} +7 -7
  49. package/dist/{diagnostics-EWU2ROTG.js → diagnostics-ABTJUYZQ.js} +5 -6
  50. package/dist/{doctor-ZWZQMDKZ.js → doctor-GPPO5L4F.js} +36 -36
  51. package/dist/{entry-NDICBQ2F.js → entry-ARGY5CKA.js} +14 -15
  52. package/dist/{exec-mcp-AG4G7SG7.js → exec-mcp-JEF74XVP.js} +16 -14
  53. package/dist/{harness-JABSZCAA.js → harness-OCXW6YE4.js} +6 -6
  54. package/dist/harness-launch-gate.js +3 -4
  55. package/dist/harness-worker.js +5 -6
  56. package/dist/hook-body.js +247 -86
  57. package/dist/{hook-spec-C7umArqw.d.ts → hook-spec-hZL4MSgi.d.ts} +8 -3
  58. package/dist/hooks-JHXUN5MD.js +24 -0
  59. package/dist/{host-2SZRMHZX.js → host-OBRHBDRE.js} +6 -7
  60. package/dist/{host-BWZ5LA4Q.js → host-VI4ZFCZP.js} +18 -16
  61. package/dist/{host-run-SXLV4LHI.js → host-run-H7AITG7C.js} +5 -7
  62. package/dist/http.js +1 -1
  63. package/dist/{import-mcp-2M7SZRVQ.js → import-mcp-3Y33CUHF.js} +15 -12
  64. package/dist/index.d.ts +11 -2
  65. package/dist/index.js +25 -25
  66. package/dist/{init-HOOIFBAD.js → init-WZJHMWNJ.js} +3 -3
  67. package/dist/{install-HF6CROQP.js → install-7V6NIA7W.js} +4 -4
  68. package/dist/{invoke-JP4MILYY.js → invoke-GWWTXQLO.js} +7 -8
  69. package/dist/{list-UBSBUZKS.js → list-Y6UPLGNF.js} +21 -18
  70. package/dist/{logout-OO3DERRK.js → logout-KAUW4JZZ.js} +16 -13
  71. package/dist/{logs-K3QXKRD4.js → logs-74JGLQG6.js} +4 -4
  72. package/dist/{mailbox-DAJV6VAI.js → mailbox-VK5AVTHI.js} +7 -7
  73. package/dist/{mainline-6K5BA3WX.js → mainline-Q42M2GJ2.js} +173 -34
  74. package/dist/{mcp-JXNTKRJG.js → mcp-IDEUIY2F.js} +2 -2
  75. package/dist/{pause-GRVTSKOK.js → pause-CZ2OZYLC.js} +4 -4
  76. package/dist/project/hook-adapter.d.ts +1 -1
  77. package/dist/{project-M672MKQH.js → project-GVVWLDOJ.js} +5 -5
  78. package/dist/{pty-LHKJKY2E.js → pty-CDLQ4NP2.js} +3 -3
  79. package/dist/report-Z3JV2PCT.js +105 -0
  80. package/dist/{resume-6DMPGG3N.js → resume-DFIHT2RO.js} +4 -4
  81. package/dist/{run-ORBIERI3.js → run-HVNKQHVU.js} +4 -4
  82. package/dist/{run-5W566T3V.js → run-RRWB7U2Q.js} +15 -12
  83. package/dist/{serve-73SRPAV4.js → serve-KJSOU3BR.js} +3 -3
  84. package/dist/{session-XM2CR425.js → session-YZVX4NGN.js} +4 -4
  85. package/dist/{setup-ULKDPF5B.js → setup-3GET6K3J.js} +4 -4
  86. package/dist/smoke-FQQJOQBD.js +16 -0
  87. package/dist/{start-login-BGFAMCZL.js → start-login-RNHSEX5P.js} +16 -13
  88. package/dist/{status-YHXEAJ7U.js → status-3RTGDN2K.js} +10 -10
  89. package/dist/{status-YCW6YJ3S.js → status-RR4VZARJ.js} +40 -23
  90. package/dist/{status-73FEFQUQ.js → status-Y25ONHA5.js} +16 -13
  91. package/dist/stdio.js +2 -2
  92. package/dist/{sweep-XF2HG3EO.js → sweep-EPJMEZR6.js} +4 -4
  93. package/dist/{test-IMNBXOYW.js → test-7NYPQ6YU.js} +30 -20
  94. package/dist/{tui-5GDA22TB.js → tui-H5RPSF4B.js} +4 -4
  95. package/dist/{unbroadcast-XP3OCVN3.js → unbroadcast-NTOC3PY3.js} +4 -4
  96. package/dist/{worker-RV6NGSXT.js → worker-YWFTWIBP.js} +9 -10
  97. package/dist/{worktree-list-4PLE7K6L.js → worktree-list-EMKUMCTQ.js} +2 -2
  98. package/dist/{worktree-sync-GQVYAXGJ.js → worktree-sync-A277AF4M.js} +4 -6
  99. package/docs/commands.md +14 -7
  100. package/docs/git-workflow.md +53 -13
  101. package/docs/hooks.md +138 -10
  102. package/docs/project-configuration.md +31 -1
  103. package/docs/upgrading.md +58 -0
  104. package/gemini-extension.json +2 -2
  105. package/mcp.json +1 -1
  106. package/package.json +5 -5
  107. package/plugin.json +1 -1
  108. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  109. package/plugins/pmcp/.mcp.json +1 -1
  110. package/plugins/pmcp/gemini-extension.json +2 -2
  111. package/plugins/pmcp/mcp.json +1 -1
  112. package/plugins/pmcp/mod/sessions/format.ts +2 -2
  113. package/plugins/pmcp/plugin.json +1 -1
  114. package/plugins/pmcp/skills/agent-assets-migrate/SKILL.md +11 -8
  115. package/plugins/pmcp/skills/pmcp-project-init/SKILL.md +11 -7
  116. package/skills/agent-assets-migrate/SKILL.md +11 -8
  117. package/skills/pmcp-project-init/SKILL.md +11 -7
  118. package/dist/chunk-7SDOSTW7.js +0 -130
  119. package/dist/chunk-AWZF72SH.js +0 -1025
  120. package/dist/chunk-FGYFA6JY.js +0 -7
  121. package/dist/chunk-ICF2JZSN.js +0 -92
  122. package/dist/chunk-ISNRDHSD.js +0 -74
  123. package/dist/chunk-QDY6BWE6.js +0 -396
  124. package/dist/hooks-YVQSDQV3.js +0 -21
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-5ZABTVSW.js";
4
4
  import {
5
5
  dependencies
6
- } from "./chunk-4VK5G3SV.js";
6
+ } from "./chunk-E6YP2PMO.js";
7
7
  import {
8
8
  interactiveEntry
9
9
  } from "./chunk-LMT3PPXJ.js";
10
10
  import {
11
11
  assertNativeHost
12
- } from "./chunk-L4MFGGSI.js";
12
+ } from "./chunk-SPZ42EWE.js";
13
13
 
14
14
  // src/tui/startup/host.ts
15
15
  function terminalSupport() {
@@ -42,4 +42,4 @@ export {
42
42
  terminalSupport,
43
43
  requireTerminal
44
44
  };
45
- //# sourceMappingURL=chunk-FQAJSNNU.js.map
45
+ //# sourceMappingURL=chunk-TPGJXENR.js.map
@@ -0,0 +1,20 @@
1
+ // src/glob.ts
2
+ function globPattern(glob, below = true) {
3
+ let source = "";
4
+ for (let at = 0; at < glob.length; at += 1) {
5
+ const char = glob[at];
6
+ if (char === "*" && glob[at + 1] === "*") {
7
+ const slash = glob[at + 2] === "/";
8
+ source += slash ? "(?:.*/)?" : ".*";
9
+ at += slash ? 2 : 1;
10
+ } else if (char === "*") source += "[^/]*";
11
+ else if (char === "?") source += "[^/]";
12
+ else source += char.replace(/[.+^${}()|[\]\\]/gu, "\\$&");
13
+ }
14
+ return new RegExp(`^${source}${below ? "(?:/.*)?" : ""}$`, "u");
15
+ }
16
+
17
+ export {
18
+ globPattern
19
+ };
20
+ //# sourceMappingURL=chunk-UKR64U7J.js.map
@@ -3,12 +3,13 @@ import {
3
3
  } from "./chunk-OEH47H6A.js";
4
4
  import {
5
5
  VERSION
6
- } from "./chunk-FGYFA6JY.js";
6
+ } from "./chunk-L42U5XKC.js";
7
7
  import {
8
8
  ConfigError
9
9
  } from "./chunk-GJXOFDJT.js";
10
10
  import {
11
- envNames
11
+ envNames,
12
+ pickEnv
12
13
  } from "./chunk-J6KL3COD.js";
13
14
 
14
15
  // src/native/binary.ts
@@ -204,6 +205,11 @@ function writeLock(root, outputs) {
204
205
  );
205
206
  }
206
207
 
208
+ // src/project/host.ts
209
+ import { createHash as createHash2 } from "crypto";
210
+ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
211
+ import { join as join4 } from "path";
212
+
207
213
  // src/project/host-spec.ts
208
214
  import { isAbsolute, normalize } from "path";
209
215
 
@@ -447,6 +453,111 @@ function readHost(path, raw) {
447
453
  };
448
454
  }
449
455
 
456
+ // src/project/host.ts
457
+ var HOST_DIRECTORY = ".agents/pmcp-pty";
458
+ var HOST_MANIFEST = `${HOST_DIRECTORY}/host.json`;
459
+ var HOST_POLICY = `${HOST_DIRECTORY}/policy.json`;
460
+ function hostPolicy(host) {
461
+ const browser = host.browser.allowPrivate;
462
+ const launch = host.desktop.launch;
463
+ return {
464
+ version: 1,
465
+ mcp_write: host.mcpWrite,
466
+ roots: host.roots,
467
+ allow: host.answers.map((a) => ({
468
+ profile: a.runtime,
469
+ dialog: a.dialog,
470
+ options: a.options
471
+ })),
472
+ ...browser.length > 0 ? { browser: { allow_private: browser } } : {},
473
+ ...launch.length > 0 ? { desktop: { launch } } : {}
474
+ };
475
+ }
476
+ function hostManifest(host) {
477
+ return {
478
+ version: 1,
479
+ sessions: host.sessions.map((s) => ({
480
+ name: s.name,
481
+ profile: s.runtime,
482
+ cwd: s.cwd,
483
+ argv: s.argv,
484
+ labels: { ...s.labels, "pmcp.host": s.name },
485
+ restart: s.restart,
486
+ max_restarts: s.maxRestarts,
487
+ delivery_setup: true,
488
+ // Only when declared, so an approval made before env existed stays valid.
489
+ ...s.env.length > 0 ? { env: s.env } : {}
490
+ }))
491
+ };
492
+ }
493
+ var json = (value) => `${JSON.stringify(value, null, 2)}
494
+ `;
495
+ function hostOutputs(spec) {
496
+ if (!spec.host) return [];
497
+ return [
498
+ {
499
+ kind: "file",
500
+ path: HOST_MANIFEST,
501
+ content: json(hostManifest(spec.host))
502
+ },
503
+ { kind: "file", path: HOST_POLICY, content: json(hostPolicy(spec.host)) }
504
+ ];
505
+ }
506
+ function ptyBinary(env) {
507
+ return nativeBinary("pmcp-pty", "PMCP_PTY_BIN", env);
508
+ }
509
+ function ptyBinaryDoctor(env) {
510
+ const found = ptyBinary(env);
511
+ return found ? { tool: "project", check: "pmcp-pty binary", status: "ok", detail: found } : {
512
+ tool: "project",
513
+ check: "pmcp-pty binary",
514
+ status: "warn",
515
+ detail: missingBinary("pmcp-pty", "PMCP_PTY_BIN", VERSION)
516
+ };
517
+ }
518
+ function hostEnvDoctor(spec, env) {
519
+ return (spec.host?.sessions ?? []).filter((s) => s.env.length > 0).map((s) => {
520
+ const { missing } = pickEnv(s.env, env);
521
+ return missing.length === 0 ? {
522
+ tool: "project",
523
+ check: `host env (${s.name})`,
524
+ status: "ok",
525
+ detail: `set: ${s.env.join(", ")}`
526
+ } : {
527
+ tool: "project",
528
+ check: `host env (${s.name})`,
529
+ status: "warn",
530
+ detail: `not set: ${missing.join(", ")}; host up refuses ${s.name} until they are`
531
+ };
532
+ });
533
+ }
534
+ var sha256 = (text2) => createHash2("sha256").update(text2).digest("hex");
535
+ function hostDoctor(spec) {
536
+ if (!spec.host) return [];
537
+ const lock = new Map(readLock(spec.root).map((e) => [e.path, e]));
538
+ const bad = [HOST_MANIFEST, HOST_POLICY].filter((path) => {
539
+ const file = join4(spec.root, path);
540
+ if (!existsSync3(file)) return true;
541
+ const entry = lock.get(path);
542
+ return entry?.sha256 !== sha256(readFileSync3(file, "utf8"));
543
+ });
544
+ const { sessions, answers, mcpWrite } = spec.host;
545
+ const summary = `${sessions.length} session(s), ${answers.length} answer rule(s), mcp_write ${mcpWrite}`;
546
+ return [
547
+ bad.length === 0 ? {
548
+ tool: "project",
549
+ check: "pmcp-pty host projected",
550
+ status: "ok",
551
+ detail: summary
552
+ } : {
553
+ tool: "project",
554
+ check: "pmcp-pty host projected",
555
+ status: "fail",
556
+ detail: `run pmcp project: ${bad.join(", ")}`
557
+ }
558
+ ];
559
+ }
560
+
450
561
  export {
451
562
  packagedBinary,
452
563
  missingBinary,
@@ -458,6 +569,13 @@ export {
458
569
  LOCK_FILE,
459
570
  readLock,
460
571
  writeLock,
461
- readHost
572
+ readHost,
573
+ HOST_MANIFEST,
574
+ HOST_POLICY,
575
+ hostOutputs,
576
+ ptyBinary,
577
+ ptyBinaryDoctor,
578
+ hostEnvDoctor,
579
+ hostDoctor
462
580
  };
463
- //# sourceMappingURL=chunk-66F3HLW4.js.map
581
+ //# sourceMappingURL=chunk-XB363ZXT.js.map
@@ -1,3 +1,13 @@
1
+ import {
2
+ cherry,
3
+ distance
4
+ } from "./chunk-KUBHGVTD.js";
5
+ import {
6
+ reportModes,
7
+ restoreModes,
8
+ restoreSubmoduleModes,
9
+ withUmask
10
+ } from "./chunk-P6LNYYYH.js";
1
11
  import {
2
12
  git,
3
13
  gitOk,
@@ -166,13 +176,80 @@ function updateToPins(root, paths) {
166
176
  return lines;
167
177
  }
168
178
 
179
+ // src/git/worktrees/sync.ts
180
+ function heldBy(root, upstream, ahead) {
181
+ const dirty = gitText(root, [
182
+ "status",
183
+ "--porcelain",
184
+ "--untracked-files=no",
185
+ "--ignore-submodules=all"
186
+ ]);
187
+ if (dirty) return "uncommitted changes";
188
+ if (ahead === 0) return null;
189
+ const own = cherry(root, upstream).missing.length;
190
+ if (own > 0) return `${own} unlanded commit(s)`;
191
+ return null;
192
+ }
193
+ function syncWorktree(options) {
194
+ return withUmask(options.umask, () => syncOnce(options));
195
+ }
196
+ function syncOnce(options) {
197
+ const { ctx, report } = options;
198
+ if (!ctx.linked)
199
+ throw new Error(
200
+ "worktree sync moves a linked worktree; the main checkout uses pmcp git sync"
201
+ );
202
+ if (options.fetch !== false && git(ctx.root, ["fetch", "-q", ctx.remote, ctx.mainline]).status !== 0)
203
+ report.warn(
204
+ `fetch from ${ctx.remote} failed; judging against the last fetched ${ctx.upstream}`
205
+ );
206
+ const counted = distance(ctx.root, ctx.upstream);
207
+ if (counted === null)
208
+ throw new Error(`cannot compare HEAD with ${ctx.upstream}`);
209
+ if (counted.behind === 0) {
210
+ report.info(`already on ${ctx.upstream}`);
211
+ if (options.install !== void 0)
212
+ installIfStale(ctx.root, options.install, report);
213
+ return "current";
214
+ }
215
+ const holds = heldBy(ctx.root, ctx.upstream, counted.ahead);
216
+ if (holds !== null) {
217
+ report.warn(
218
+ `${counted.behind} commit(s) behind ${ctx.upstream} and holds ${holds}; left where it is`
219
+ );
220
+ return "held";
221
+ }
222
+ const submodules = options.followSubmodules ? movableSubmodules(ctx.root) : [];
223
+ const before = gitText(ctx.root, ["rev-parse", "HEAD"]);
224
+ const args = counted.ahead > 0 ? ["reset", "--keep", "-q", ctx.upstream] : ["merge", "--ff-only", "-q", ctx.upstream];
225
+ const moved = git(ctx.root, args);
226
+ if (moved.status !== 0) {
227
+ report.warn(
228
+ `could not move to ${ctx.upstream}: ${moved.stderr.trim().split("\n")[0] ?? ""}`
229
+ );
230
+ return "held";
231
+ }
232
+ const after = gitText(ctx.root, ["rev-parse", "HEAD"]);
233
+ report.info(
234
+ `moved ${before.slice(0, 10)} -> ${after.slice(0, 10)}, ${counted.behind} commit(s)`
235
+ );
236
+ for (const line of updateToPins(ctx.root, submodules)) report.info(line);
237
+ if (options.umask !== void 0)
238
+ reportModes(report, [
239
+ ...restoreModes(ctx.root, before, after),
240
+ ...restoreSubmoduleModes(ctx.root, before, after)
241
+ ]);
242
+ if (options.install !== void 0)
243
+ installIfStale(ctx.root, options.install, report);
244
+ return "moved";
245
+ }
246
+
169
247
  export {
170
248
  installSpec,
171
249
  lockHash,
172
250
  installState,
173
251
  installIfStale,
174
252
  followPins,
175
- movableSubmodules,
176
- updateToPins
253
+ syncWorktree
177
254
  };
178
- //# sourceMappingURL=chunk-UD3BEEBQ.js.map
255
+ //# sourceMappingURL=chunk-XZ2TDH3J.js.map
@@ -6,8 +6,8 @@ import { basename } from "path";
6
6
  // src/sessions/format.ts
7
7
  var STATE_FILES = {
8
8
  records: "sessions",
9
- // The records' former directory. Deprecated: 0.20 still writes every record there too and
10
- // reads it when sessions/ lacks one; 0.21 stops writing it.
9
+ // The records' former directory. Deprecated: read beside sessions/ but no longer written; a
10
+ // pmcp before 0.20 sharing the state directory still writes there.
11
11
  legacyRecords: "fleet",
12
12
  pause: "pause.json",
13
13
  broadcast: "broadcast.json",
@@ -150,4 +150,4 @@ export {
150
150
  runtimePid,
151
151
  isLive
152
152
  };
153
- //# sourceMappingURL=chunk-QSIADSMQ.js.map
153
+ //# sourceMappingURL=chunk-Z6WRFOFT.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  claudeSocket
3
- } from "./chunk-M2RYXWX2.js";
4
- import "./chunk-QSIADSMQ.js";
3
+ } from "./chunk-NHUMPEPV.js";
4
+ import "./chunk-Z6WRFOFT.js";
5
5
 
6
6
  // src/sessions/wake/claude.ts
7
7
  import { randomUUID } from "crypto";
@@ -74,4 +74,4 @@ export {
74
74
  claudeInbox,
75
75
  frames
76
76
  };
77
- //# sourceMappingURL=claude-GT2BPXEL.js.map
77
+ //# sourceMappingURL=claude-XVLF4N4S.js.map
@@ -16,26 +16,26 @@ async function run(context) {
16
16
  `unknown verb ${verb}; use ${SESSION_VERBS.join(", ")}`
17
17
  );
18
18
  if (verb === "status")
19
- return (await import("./status-YHXEAJ7U.js")).status(context);
19
+ return (await import("./status-3RTGDN2K.js")).status(context);
20
20
  if (context.args.flags.has("json") && !JSON_VERBS.includes(verb))
21
21
  throw new ArgumentError(`--json works with ${JSON_VERBS.join(", ")}`);
22
22
  if (["send", "inbox", "ack", "reply"].includes(verb)) {
23
- const mailbox = await import("./mailbox-DAJV6VAI.js");
23
+ const mailbox = await import("./mailbox-VK5AVTHI.js");
24
24
  if (verb === "send") return mailbox.send(context);
25
25
  if (verb === "inbox") return mailbox.inbox(context);
26
26
  if (verb === "ack") return mailbox.ack(context);
27
27
  return mailbox.reply(context);
28
28
  }
29
- if (verb === "pause") return (await import("./pause-GRVTSKOK.js")).run(context);
30
- if (verb === "resume") return (await import("./resume-6DMPGG3N.js")).run(context);
29
+ if (verb === "pause") return (await import("./pause-CZ2OZYLC.js")).run(context);
30
+ if (verb === "resume") return (await import("./resume-DFIHT2RO.js")).run(context);
31
31
  if (verb === "broadcast")
32
- return (await import("./broadcast-LYOA6BEW.js")).run(context);
32
+ return (await import("./broadcast-ZALGUJVR.js")).run(context);
33
33
  if (verb === "unbroadcast")
34
- return (await import("./unbroadcast-XP3OCVN3.js")).run(context);
35
- return (await import("./sweep-XF2HG3EO.js")).run(context);
34
+ return (await import("./unbroadcast-NTOC3PY3.js")).run(context);
35
+ return (await import("./sweep-EPJMEZR6.js")).run(context);
36
36
  }
37
37
  var sessionsCommand = { ...sessionsSpec, run };
38
38
  export {
39
39
  sessionsCommand
40
40
  };
41
- //# sourceMappingURL=cli-IV5DJCXU.js.map
41
+ //# sourceMappingURL=cli-6FWRBCWM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  gitSpec
3
- } from "./chunk-T6GOWHK6.js";
3
+ } from "./chunk-GFOQDLPL.js";
4
4
  import "./chunk-XNML2KIC.js";
5
5
  import {
6
6
  ArgumentError,
@@ -11,16 +11,16 @@ import {
11
11
  async function action(positional) {
12
12
  const [verb, sub] = positional;
13
13
  if (verb === "deliver")
14
- return (await import("./mainline-6K5BA3WX.js")).mainlineDeliver;
15
- if (verb === "sync") return (await import("./mainline-6K5BA3WX.js")).mainlineSync;
14
+ return (await import("./mainline-Q42M2GJ2.js")).mainlineDeliver;
15
+ if (verb === "sync") return (await import("./mainline-Q42M2GJ2.js")).mainlineSync;
16
16
  if (verb !== "worktree")
17
17
  throw new ArgumentError("Use worktree, deliver or sync");
18
18
  if (sub === "create")
19
19
  return (await import("./worktree-create-NO4UOOEP.js")).worktreeCreate;
20
20
  if (sub === "list")
21
- return (await import("./worktree-list-4PLE7K6L.js")).worktreeList;
21
+ return (await import("./worktree-list-EMKUMCTQ.js")).worktreeList;
22
22
  if (sub === "sync")
23
- return (await import("./worktree-sync-GQVYAXGJ.js")).worktreeSync;
23
+ return (await import("./worktree-sync-A277AF4M.js")).worktreeSync;
24
24
  throw new ArgumentError("Use worktree create, list or sync");
25
25
  }
26
26
  async function run(context) {
@@ -28,7 +28,7 @@ async function run(context) {
28
28
  if (context.args.flags.has("json") && !(verb === "worktree" && sub === "list") && verb !== "deliver")
29
29
  throw new ArgumentError("--json requires git worktree list or git deliver");
30
30
  const act = await action(context.args.positional);
31
- const { loadGit } = await import("./setup-ULKDPF5B.js");
31
+ const { loadGit } = await import("./setup-3GET6K3J.js");
32
32
  const setup = loadGit(context.cwd, one(context.args, "config"), context.env);
33
33
  if (setup instanceof Error) {
34
34
  context.ui.error(setup.message);
@@ -45,4 +45,4 @@ var gitCommand = { ...gitSpec, run };
45
45
  export {
46
46
  gitCommand
47
47
  };
48
- //# sourceMappingURL=cli-6HTAJ54L.js.map
48
+ //# sourceMappingURL=cli-BEEDAD4E.js.map
package/dist/cli.js CHANGED
@@ -1,26 +1,26 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ entryMode
4
+ } from "./chunk-LMT3PPXJ.js";
2
5
  import {
3
6
  COMMANDS,
4
7
  PLANNED,
5
8
  commandNamed
6
- } from "./chunk-RMHZFWHF.js";
9
+ } from "./chunk-EPNTYTDZ.js";
7
10
  import "./chunk-2P4Z2NUX.js";
11
+ import "./chunk-JWRZDYB5.js";
8
12
  import "./chunk-3Y3HDMHA.js";
9
- import {
10
- entryMode
11
- } from "./chunk-LMT3PPXJ.js";
13
+ import "./chunk-GFOQDLPL.js";
12
14
  import "./chunk-E3DQB5LS.js";
13
- import "./chunk-JWRZDYB5.js";
14
15
  import "./chunk-LMUBBIE2.js";
15
16
  import "./chunk-YGOWIJPE.js";
16
- import "./chunk-T6GOWHK6.js";
17
- import "./chunk-YN5GQCHN.js";
17
+ import "./chunk-ABTJQ4QV.js";
18
+ import "./chunk-RHJEGLYM.js";
18
19
  import "./chunk-LLT5FQBE.js";
19
20
  import "./chunk-INT7QLEU.js";
20
21
  import "./chunk-JEL35P7S.js";
21
22
  import "./chunk-EIDIVIAD.js";
22
- import "./chunk-ABTJQ4QV.js";
23
- import "./chunk-OG7QR2DP.js";
23
+ import "./chunk-KEHB4FZP.js";
24
24
  import "./chunk-XNML2KIC.js";
25
25
  import {
26
26
  ArgumentError,
@@ -32,7 +32,7 @@ import {
32
32
  import "./chunk-V4NPDK6X.js";
33
33
  import {
34
34
  VERSION
35
- } from "./chunk-FGYFA6JY.js";
35
+ } from "./chunk-L42U5XKC.js";
36
36
 
37
37
  // src/cli/ui.ts
38
38
  var ESC = String.fromCharCode(27);
@@ -185,7 +185,7 @@ async function defaultEntry(options, context) {
185
185
  });
186
186
  if (mode === "server") return run(required("serve"), [], context);
187
187
  if (mode === "terminal") {
188
- const { terminalSupport } = await import("./host-2SZRMHZX.js");
188
+ const { terminalSupport } = await import("./host-OBRHBDRE.js");
189
189
  const support = terminalSupport();
190
190
  if (support.supported) return run(required("tui"), [], context);
191
191
  context.ui.info(`Terminal workspace unavailable: ${support.reason}`);
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  COMMANDS,
3
3
  completionSpec
4
- } from "./chunk-RMHZFWHF.js";
4
+ } from "./chunk-EPNTYTDZ.js";
5
5
  import "./chunk-2P4Z2NUX.js";
6
+ import "./chunk-JWRZDYB5.js";
6
7
  import "./chunk-3Y3HDMHA.js";
8
+ import "./chunk-GFOQDLPL.js";
7
9
  import "./chunk-E3DQB5LS.js";
8
- import "./chunk-JWRZDYB5.js";
9
10
  import "./chunk-LMUBBIE2.js";
10
11
  import "./chunk-YGOWIJPE.js";
11
- import "./chunk-T6GOWHK6.js";
12
- import "./chunk-YN5GQCHN.js";
12
+ import "./chunk-ABTJQ4QV.js";
13
+ import "./chunk-RHJEGLYM.js";
13
14
  import "./chunk-LLT5FQBE.js";
14
15
  import "./chunk-INT7QLEU.js";
15
16
  import "./chunk-JEL35P7S.js";
16
17
  import "./chunk-EIDIVIAD.js";
17
- import "./chunk-ABTJQ4QV.js";
18
- import "./chunk-OG7QR2DP.js";
18
+ import "./chunk-KEHB4FZP.js";
19
19
  import "./chunk-XNML2KIC.js";
20
20
  import {
21
21
  ArgumentError,
@@ -139,4 +139,4 @@ var completionCommand = {
139
139
  export {
140
140
  completionCommand
141
141
  };
142
- //# sourceMappingURL=completion-PPM7MEI2.js.map
142
+ //# sourceMappingURL=completion-LHYNCQ3N.js.map
@@ -1,22 +1,21 @@
1
1
  import {
2
2
  dependencies
3
- } from "./chunk-4VK5G3SV.js";
3
+ } from "./chunk-E6YP2PMO.js";
4
4
  import {
5
5
  assertNativeHost
6
- } from "./chunk-L4MFGGSI.js";
6
+ } from "./chunk-SPZ42EWE.js";
7
7
  import {
8
8
  locateExecutable
9
9
  } from "./chunk-R2GPCZUX.js";
10
10
  import "./chunk-34DECPVC.js";
11
- import "./chunk-7SDOSTW7.js";
12
11
  import {
13
12
  missingBinary
14
- } from "./chunk-66F3HLW4.js";
13
+ } from "./chunk-XB363ZXT.js";
15
14
  import "./chunk-OEH47H6A.js";
16
15
  import "./chunk-IJBSOWHK.js";
17
16
  import {
18
17
  VERSION
19
- } from "./chunk-FGYFA6JY.js";
18
+ } from "./chunk-L42U5XKC.js";
20
19
  import "./chunk-GJXOFDJT.js";
21
20
  import "./chunk-PMJG2CXF.js";
22
21
  import {
@@ -91,4 +90,4 @@ function inspectTerminalHost() {
91
90
  export {
92
91
  inspectTerminalHost
93
92
  };
94
- //# sourceMappingURL=diagnostics-EWU2ROTG.js.map
93
+ //# sourceMappingURL=diagnostics-ABTJUYZQ.js.map
@@ -1,49 +1,51 @@
1
1
  import {
2
2
  specFrom
3
- } from "./chunk-JBHGJKSL.js";
3
+ } from "./chunk-RNC7PGW2.js";
4
4
  import "./chunk-RPCIROW7.js";
5
5
  import {
6
6
  doctor,
7
7
  spawnRunner
8
- } from "./chunk-K2C3KFGB.js";
9
- import "./chunk-IZABPDAO.js";
10
- import "./chunk-FD6VGFYZ.js";
11
- import "./chunk-P4N7DBD5.js";
12
- import "./chunk-RBNMNKNN.js";
13
- import "./chunk-M2RYXWX2.js";
14
- import "./chunk-TIA4SPU2.js";
8
+ } from "./chunk-SEM6WD7J.js";
9
+ import "./chunk-5ZUDBC3P.js";
10
+ import "./chunk-JQVSDPFL.js";
15
11
  import "./chunk-VJFEN6DJ.js";
16
- import {
17
- HOOK_FILE,
18
- LOCK_FILE,
19
- POLICY_FILE,
20
- sha256
21
- } from "./chunk-AWZF72SH.js";
22
- import "./chunk-QDY6BWE6.js";
23
- import "./chunk-73AKO4UL.js";
12
+ import "./chunk-NHUMPEPV.js";
13
+ import "./chunk-TIA4SPU2.js";
14
+ import "./chunk-3LADLKAI.js";
15
+ import "./chunk-P4N7DBD5.js";
16
+ import "./chunk-2QJGUR23.js";
24
17
  import {
25
18
  FEATURES,
26
19
  GUARDS,
27
- RUNTIMES,
28
- RUNTIME_IDS
29
- } from "./chunk-QOFSPFJ6.js";
30
- import "./chunk-HQOB7OQS.js";
31
- import "./chunk-ICF2JZSN.js";
32
- import "./chunk-UD3BEEBQ.js";
33
- import "./chunk-ISNRDHSD.js";
20
+ customEvent
21
+ } from "./chunk-TCW2H47H.js";
22
+ import "./chunk-UKR64U7J.js";
23
+ import "./chunk-XZ2TDH3J.js";
24
+ import "./chunk-KUBHGVTD.js";
34
25
  import "./chunk-EATCUWGG.js";
26
+ import "./chunk-OFJIMBTL.js";
35
27
  import "./chunk-NRBQK6UX.js";
36
- import "./chunk-ONP6JRFZ.js";
28
+ import "./chunk-LFFIQBNY.js";
29
+ import "./chunk-HQOB7OQS.js";
30
+ import "./chunk-73AKO4UL.js";
37
31
  import "./chunk-P6LNYYYH.js";
38
- import "./chunk-5JPD6VIH.js";
32
+ import "./chunk-GBKRDRMZ.js";
39
33
  import "./chunk-2Q6MNGU5.js";
40
- import "./chunk-PQTM27GU.js";
41
- import "./chunk-QSIADSMQ.js";
34
+ import "./chunk-MR5IBS6L.js";
35
+ import "./chunk-Z6WRFOFT.js";
42
36
  import "./chunk-G7JONWL4.js";
43
37
  import "./chunk-Q5H3L6Y4.js";
38
+ import {
39
+ HOOK_FILE,
40
+ LOCK_FILE,
41
+ POLICY_FILE,
42
+ RUNTIMES,
43
+ RUNTIME_IDS,
44
+ sha256
45
+ } from "./chunk-5YCKFU5Q.js";
44
46
  import {
45
47
  doctorSpec
46
- } from "./chunk-YN5GQCHN.js";
48
+ } from "./chunk-RHJEGLYM.js";
47
49
  import "./chunk-JEL35P7S.js";
48
50
  import "./chunk-XNML2KIC.js";
49
51
  import {
@@ -53,11 +55,10 @@ import {
53
55
  import {
54
56
  TOOLS
55
57
  } from "./chunk-V4NPDK6X.js";
56
- import "./chunk-7SDOSTW7.js";
57
- import "./chunk-66F3HLW4.js";
58
+ import "./chunk-XB363ZXT.js";
58
59
  import "./chunk-OEH47H6A.js";
59
60
  import "./chunk-IJBSOWHK.js";
60
- import "./chunk-FGYFA6JY.js";
61
+ import "./chunk-L42U5XKC.js";
61
62
  import "./chunk-GJXOFDJT.js";
62
63
  import "./chunk-PMJG2CXF.js";
63
64
  import "./chunk-J6KL3COD.js";
@@ -124,12 +125,11 @@ function featureCatalog(policy) {
124
125
  fields: []
125
126
  }
126
127
  ];
128
+ const outputFor = (event) => event === "before_shell" ? "deny" : event === "after_edit" ? "feedback" : "context";
127
129
  const custom = (policy?.custom ?? []).map((entry) => ({
128
130
  id: `custom.${entry.name}`,
129
- events: [
130
- entry.event === "after_edit" ? "after_tool" : "before_tool"
131
- ],
132
- outputs: [entry.event === "after_edit" ? "feedback" : "deny"],
131
+ events: [customEvent(entry.event)],
132
+ outputs: [outputFor(entry.event)],
133
133
  fields: []
134
134
  }));
135
135
  return [...features, ...guards, ...checks, ...custom];
@@ -537,4 +537,4 @@ var doctorCommand = {
537
537
  export {
538
538
  doctorCommand
539
539
  };
540
- //# sourceMappingURL=doctor-ZWZQMDKZ.js.map
540
+ //# sourceMappingURL=doctor-GPPO5L4F.js.map