@modootoday/pmcp 0.19.9 → 0.21.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 (128) 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-TM6B2Y3G.js → apply-6FLMTJDV.js} +57 -23
  6. package/dist/{attachment-D84OGI6n.d.ts → attachment-ms6s8Aow.d.ts} +1 -1
  7. package/dist/{available-HYSDAFYH.js → available-BFXLII4A.js} +7 -7
  8. package/dist/{broadcast-DSCHWUMB.js → broadcast-ZALGUJVR.js} +4 -4
  9. package/dist/chunk-2GI5RM3M.js +53 -0
  10. package/dist/{chunk-ICF2JZSN.js → chunk-2MAD4WNZ.js} +2 -2
  11. package/dist/{chunk-QYQGPDBE.js → chunk-33KGCJB2.js} +2 -2
  12. package/dist/{chunk-XNPOHPMJ.js → chunk-3X5JQYKN.js} +3 -3
  13. package/dist/{chunk-4XNAKVSO.js → chunk-57Q75MS4.js} +18 -18
  14. package/dist/{chunk-2S44RDO4.js → chunk-5FW7A6TG.js} +7 -4
  15. package/dist/chunk-5YCKFU5Q.js +1672 -0
  16. package/dist/{chunk-MCYGYZVZ.js → chunk-7FV2LORT.js} +2 -2
  17. package/dist/{chunk-57FHYW74.js → chunk-DEY23WTH.js} +122 -4
  18. package/dist/chunk-DJZPPCJP.js +274 -0
  19. package/dist/{chunk-4XWVLC23.js → chunk-G6JXCUSK.js} +2 -2
  20. package/dist/{chunk-T6GOWHK6.js → chunk-GFOQDLPL.js} +6 -1
  21. package/dist/{chunk-PG42KALG.js → chunk-GQP4GWU4.js} +5 -5
  22. package/dist/chunk-H4ZOKIER.js +7 -0
  23. package/dist/{chunk-XPWIJOZT.js → chunk-JQVSDPFL.js} +3 -3
  24. package/dist/{chunk-OG7QR2DP.js → chunk-KEHB4FZP.js} +17 -2
  25. package/dist/chunk-KUBHGVTD.js +126 -0
  26. package/dist/{chunk-SPUCY4AG.js → chunk-KVNNVLJR.js} +2 -2
  27. package/dist/chunk-LFFIQBNY.js +115 -0
  28. package/dist/{chunk-V7HG3STC.js → chunk-MR5IBS6L.js} +31 -15
  29. package/dist/{chunk-W5RLIUNC.js → chunk-NHUMPEPV.js} +2 -2
  30. package/dist/{chunk-I4DLMIN5.js → chunk-OFJIMBTL.js} +2 -2
  31. package/dist/{chunk-A6TM4NTI.js → chunk-OFPNCLG7.js} +2 -2
  32. package/dist/{chunk-3UOFHLY4.js → chunk-OS5DF3LL.js} +207 -15
  33. package/dist/{chunk-BZ2RXI5I.js → chunk-POTI2RJ6.js} +2 -2
  34. package/dist/{chunk-QTKD7JEL.js → chunk-R3MVL67T.js} +34 -34
  35. package/dist/{chunk-YN5GQCHN.js → chunk-RHJEGLYM.js} +6 -1
  36. package/dist/{chunk-YKU7KHJO.js → chunk-TBKVC2TA.js} +3 -5
  37. package/dist/{chunk-YYG3GUQW.js → chunk-UFWQTZDX.js} +29 -17
  38. package/dist/{chunk-PBDPWE5J.js → chunk-VBDDFO2V.js} +2 -2
  39. package/dist/{chunk-BRSESCGX.js → chunk-VUM6LO77.js} +4717 -4694
  40. package/dist/{chunk-FR6JHNLC.js → chunk-YLITJLTR.js} +3 -3
  41. package/dist/{chunk-CJ6OFTS3.js → chunk-YOWIYFIV.js} +6 -37
  42. package/dist/{chunk-VDBUZKXC.js → chunk-Z4Q6RYJH.js} +2 -2
  43. package/dist/{chunk-RRKGSYQ4.js → chunk-Z6WRFOFT.js} +13 -2
  44. package/dist/{chunk-YXAPCHXJ.js → chunk-ZIJ5IUXH.js} +31 -5
  45. package/dist/{claude-2C5L2HQL.js → claude-XVLF4N4S.js} +3 -3
  46. package/dist/{cli-BVRPAI23.js → cli-6FWRBCWM.js} +8 -8
  47. package/dist/{cli-YV6SFE4D.js → cli-RVPR3MH3.js} +7 -7
  48. package/dist/cli.js +11 -11
  49. package/dist/{completion-B3UT3GVI.js → completion-YTPHEVEW.js} +7 -7
  50. package/dist/{diagnostics-ONIAKCA3.js → diagnostics-IW54MLFK.js} +5 -6
  51. package/dist/{doctor-MJFU5L6R.js → doctor-EN4JPSKV.js} +35 -35
  52. package/dist/{entry-DZGKCL4G.js → entry-TQWSDTJ4.js} +14 -15
  53. package/dist/{exec-mcp-QK2VC6RX.js → exec-mcp-KKQ75N5O.js} +15 -13
  54. package/dist/{harness-GTED4GLK.js → harness-EB76F6BG.js} +6 -6
  55. package/dist/harness-launch-gate.js +3 -4
  56. package/dist/harness-worker.js +5 -6
  57. package/dist/hook-body.js +281 -98
  58. package/dist/{hook-spec-C7umArqw.d.ts → hook-spec-hZL4MSgi.d.ts} +8 -3
  59. package/dist/hooks-YWSHUNLM.js +24 -0
  60. package/dist/{host-AGNF2AQH.js → host-LSVITS6M.js} +6 -7
  61. package/dist/{host-3HTCZNVJ.js → host-OGGADMBT.js} +17 -15
  62. package/dist/{host-run-2OQZVQID.js → host-run-XO2TS4JC.js} +5 -7
  63. package/dist/http.d.ts +1 -1
  64. package/dist/http.js +1 -1
  65. package/dist/{import-mcp-7KEPR2B6.js → import-mcp-BJDJTPVS.js} +14 -11
  66. package/dist/index.d.ts +12 -3
  67. package/dist/index.js +25 -25
  68. package/dist/{init-BHGCF7JL.js → init-773PTQM5.js} +3 -3
  69. package/dist/{install-HF6CROQP.js → install-7V6NIA7W.js} +4 -4
  70. package/dist/{invoke-CVHF6PEK.js → invoke-Y7XH5S2L.js} +7 -8
  71. package/dist/{list-6XGQ3FR3.js → list-5W65XVES.js} +20 -17
  72. package/dist/{logout-6RJLG2KG.js → logout-XO6ALD45.js} +15 -12
  73. package/dist/{logs-VTW7S2LR.js → logs-74JGLQG6.js} +4 -4
  74. package/dist/mailbox/index.d.ts +3 -3
  75. package/dist/{mailbox-CNAONXN7.js → mailbox-VK5AVTHI.js} +9 -9
  76. package/dist/{mainline-JSG4MUKH.js → mainline-M2NSTAGC.js} +105 -36
  77. package/dist/{mcp-P55VLQLR.js → mcp-R62ZNVGJ.js} +2 -2
  78. package/dist/{pause-V5VCNOSH.js → pause-CZ2OZYLC.js} +4 -4
  79. package/dist/project/hook-adapter.d.ts +1 -1
  80. package/dist/{project-B57IQPDK.js → project-W5DQIZA6.js} +5 -5
  81. package/dist/{pty-FD4JGBZL.js → pty-CDLQ4NP2.js} +3 -3
  82. package/dist/report-Z3JV2PCT.js +105 -0
  83. package/dist/{resume-7S4K3R4X.js → resume-DFIHT2RO.js} +4 -4
  84. package/dist/{run-MC2BPLOE.js → run-OZLGSRHF.js} +14 -11
  85. package/dist/{run-LFJXONLW.js → run-WYJMTLX7.js} +4 -4
  86. package/dist/{serve-TFAEVXX3.js → serve-DCQGAGB7.js} +3 -3
  87. package/dist/{session-XM2CR425.js → session-YZVX4NGN.js} +4 -4
  88. package/dist/{setup-FHFQZJY6.js → setup-D3KEJBGO.js} +4 -4
  89. package/dist/smoke-FQQJOQBD.js +16 -0
  90. package/dist/{start-login-KXOHCR5A.js → start-login-EKXM75XQ.js} +15 -12
  91. package/dist/{status-YXOIEVOJ.js → status-23UDIYYP.js} +39 -22
  92. package/dist/{status-OYRB3KL5.js → status-3RTGDN2K.js} +10 -10
  93. package/dist/{status-AW7DOW7A.js → status-EDSEG32U.js} +15 -12
  94. package/dist/stdio.d.ts +2 -2
  95. package/dist/stdio.js +2 -2
  96. package/dist/{sweep-ZSYG6FNR.js → sweep-EPJMEZR6.js} +4 -4
  97. package/dist/{test-2HTOY4PJ.js → test-TM6PIZTV.js} +26 -18
  98. package/dist/{tui-DQFXYQ4H.js → tui-EQNJIDN5.js} +4 -4
  99. package/dist/{unbroadcast-FONZJWEW.js → unbroadcast-NTOC3PY3.js} +4 -4
  100. package/dist/{validate-WOFI7TMT.js → validate-KFBCUFI4.js} +2 -2
  101. package/dist/{worker-UXPGXAV2.js → worker-7X6WBPEI.js} +9 -10
  102. package/dist/{worktree-list-4PLE7K6L.js → worktree-list-EMKUMCTQ.js} +2 -2
  103. package/dist/{worktree-sync-GQVYAXGJ.js → worktree-sync-T6C5YEYS.js} +3 -3
  104. package/docs/commands.md +13 -6
  105. package/docs/git-workflow.md +46 -10
  106. package/docs/hooks.md +139 -12
  107. package/docs/project-configuration.md +34 -6
  108. package/docs/upgrading.md +94 -0
  109. package/gemini-extension.json +2 -2
  110. package/mcp.json +1 -1
  111. package/package.json +5 -5
  112. package/plugin.json +1 -1
  113. package/plugins/pmcp/.claude-plugin/plugin.json +1 -1
  114. package/plugins/pmcp/.mcp.json +1 -1
  115. package/plugins/pmcp/gemini-extension.json +2 -2
  116. package/plugins/pmcp/mcp.json +1 -1
  117. package/plugins/pmcp/mod/reader/read.ts +14 -4
  118. package/plugins/pmcp/mod/sessions/format.ts +16 -1
  119. package/plugins/pmcp/mod/sessions/types.ts +1 -1
  120. package/plugins/pmcp/plugin.json +1 -1
  121. package/schema/catalog-v1.json +1 -7
  122. package/dist/chunk-EONAJAMJ.js +0 -130
  123. package/dist/chunk-IACJDHFQ.js +0 -1025
  124. package/dist/chunk-ISNRDHSD.js +0 -74
  125. package/dist/chunk-YGTJQVCK.js +0 -7
  126. package/dist/chunk-YLPXTJJM.js +0 -396
  127. package/dist/hooks-FRZ4SUNJ.js +0 -21
  128. package/dist/{core-C1LPjxK6.d.ts → core-Sug_rZrx.d.ts} +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assertNativeHost
3
- } from "./chunk-BZ2RXI5I.js";
3
+ } from "./chunk-POTI2RJ6.js";
4
4
  import {
5
5
  locateExecutable
6
6
  } from "./chunk-R2GPCZUX.js";
@@ -33,7 +33,7 @@ import {
33
33
  resourceClaim,
34
34
  resourceRunning,
35
35
  runtimeUnit
36
- } from "./chunk-QYQGPDBE.js";
36
+ } from "./chunk-33KGCJB2.js";
37
37
  import {
38
38
  command
39
39
  } from "./chunk-34DECPVC.js";
@@ -1981,4 +1981,4 @@ export {
1981
1981
  isReadOnly,
1982
1982
  runOperation
1983
1983
  };
1984
- //# sourceMappingURL=chunk-FR6JHNLC.js.map
1984
+ //# sourceMappingURL=chunk-YLITJLTR.js.map
@@ -152,20 +152,14 @@ function skillDuplicationWarnings(metadata, pluginVersion) {
152
152
  }
153
153
 
154
154
  // src/metadata/profiles/catalog-v1/schema.ts
155
- var SERVER_TOOLS = [
156
- "job_estimate",
157
- "job_submit",
158
- "job_status",
159
- "job_result",
160
- "job_cancel"
161
- ];
162
155
  var catalogMetadata = z2.strictObject({
163
156
  ...skillMetadataCore.shape,
164
157
  level: skillMetadataCore.shape.level.unwrap(),
165
158
  domain: kebab,
166
159
  install: skillMetadataCore.shape.install.unwrap(),
167
160
  requires: requires.strict().optional(),
168
- "server-tools": z2.array(z2.enum(SERVER_TOOLS)).optional()
161
+ // Server-side tools the skill calls, named by the catalog that serves them.
162
+ "server-tools": z2.array(z2.string().min(1)).optional()
169
163
  });
170
164
  var catalogV1 = skillFrontmatter.extend({
171
165
  name: kebab,
@@ -190,7 +184,7 @@ function skillFindings(skill) {
190
184
  return out;
191
185
  }
192
186
  const { name, description, metadata: m } = result.data;
193
- const { tier: tier2, body } = skill;
187
+ const { tier: tier2 } = skill;
194
188
  for (const message of skillDuplicationWarnings(m, skill.pluginVersion))
195
189
  out.push({ rule: "duplication", message, severity: "warning" });
196
190
  if (name !== skill.dirName)
@@ -200,37 +194,12 @@ function skillFindings(skill) {
200
194
  );
201
195
  if (m.tier !== void 0 && m.tier !== tier2)
202
196
  add("tier.mismatch", `metadata.tier ${m.tier} in a ${tier2} marketplace`);
203
- if (tier2 !== "internal") {
204
- if (/[^\x20-\x7E]/u.test(description))
205
- add("description.ascii", "description must be plain English ASCII");
206
- if (!/\bUse (?:when|whenever|before|after|for)\b/u.test(description))
207
- add(
208
- "description.trigger",
209
- 'description should say when to use it ("Use when ...")'
210
- );
211
- }
212
- if (tier2 === "open" && m.keywords?.some((k) => /[^\x20-\x7E]/u.test(k)))
213
- add("keywords.ascii", "metadata.keywords must be English in the open tier");
214
- if (!m["output-license"] && (tier2 === "paid" || (tier2 === "open" || tier2 === "free") && m.domain.startsWith("asset")))
215
- add("output-license.required", "metadata.output-license missing");
197
+ if (tier2 !== "internal" && /[^\x20-\x7E]/u.test(description))
198
+ add("description.ascii", "description must be plain English ASCII");
216
199
  if (!m.approval && (tier2 === "paid" || skill.hasScripts))
217
200
  add("approval.required", "metadata.approval missing");
218
201
  if (tier2 === "open" && m.pair !== void 0)
219
202
  add("pair.tier", "metadata.pair is not allowed in the open tier");
220
- if (tier2 !== "paid" && m["server-tools"] !== void 0)
221
- add(
222
- "server-tools.forbidden",
223
- `metadata.server-tools is not allowed in the ${tier2} tier`
224
- );
225
- if (tier2 === "paid") {
226
- if (!m["server-tools"]?.length)
227
- add("server-tools.required", "metadata.server-tools missing");
228
- if (body.includes("job_submit") && (!body.includes("job_estimate") || body.indexOf("job_estimate") > body.indexOf("job_submit")))
229
- add(
230
- "server-tools.order",
231
- "job_estimate must come before job_submit in the body"
232
- );
233
- }
234
203
  if (tier2 !== "open" && m.install === "default")
235
204
  add(
236
205
  "install.default",
@@ -363,4 +332,4 @@ export {
363
332
  validateSkillDir,
364
333
  validateCatalog
365
334
  };
366
- //# sourceMappingURL=chunk-CJ6OFTS3.js.map
335
+ //# sourceMappingURL=chunk-YOWIYFIV.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.19.9";
1193
+ var SERVER_VERSION = "0.21.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-VDBUZKXC.js.map
1250
+ //# sourceMappingURL=chunk-Z4Q6RYJH.js.map
@@ -5,12 +5,22 @@ import { basename } from "path";
5
5
 
6
6
  // src/sessions/format.ts
7
7
  var STATE_FILES = {
8
- records: "fleet",
8
+ records: "sessions",
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
+ legacyRecords: "fleet",
9
12
  pause: "pause.json",
10
13
  broadcast: "broadcast.json",
11
14
  history: "broadcast-history.jsonl"
12
15
  };
13
16
  var STALE_MS = 30 * 60 * 1e3;
17
+ function latestRecord(copies) {
18
+ const time = (record) => Date.parse(record.updatedAt ?? record.startedAt ?? "") || 0;
19
+ let latest = null;
20
+ for (const copy of copies)
21
+ if (copy && (!latest || time(copy) > time(latest))) latest = copy;
22
+ return latest;
23
+ }
14
24
  var LEASE_NAME = /^[a-z0-9][a-z0-9_-]*$/u;
15
25
  function leaseFile(name) {
16
26
  if (!LEASE_NAME.test(name)) throw new Error(`invalid lease name ${name}`);
@@ -128,6 +138,7 @@ function isLive(record, now, staleMs = STALE_MS) {
128
138
  export {
129
139
  STATE_FILES,
130
140
  STALE_MS,
141
+ latestRecord,
131
142
  leaseFile,
132
143
  fieldsOf,
133
144
  asPause,
@@ -139,4 +150,4 @@ export {
139
150
  runtimePid,
140
151
  isLive
141
152
  };
142
- //# sourceMappingURL=chunk-RRKGSYQ4.js.map
153
+ //# sourceMappingURL=chunk-Z6WRFOFT.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  readStoreSettings,
6
6
  resolveLeaseFiles
7
- } from "./chunk-V7HG3STC.js";
7
+ } from "./chunk-MR5IBS6L.js";
8
8
  import {
9
9
  expandPath,
10
10
  projectStateDir
@@ -85,6 +85,17 @@ var Reader = class {
85
85
  if (value.length === 0) return void 0;
86
86
  return value;
87
87
  }
88
+ // A table of environment variable names to string values.
89
+ envMap(key) {
90
+ const value = this.table[key] ?? {};
91
+ if (value === null || typeof value !== "object" || Array.isArray(value))
92
+ this.fail(key, "a table of variable names to strings");
93
+ for (const [name, text] of Object.entries(value)) {
94
+ if (!/^[A-Z_][A-Z0-9_]{0,127}$/u.test(name) || typeof text !== "string")
95
+ this.fail(key, "a table of variable names (A-Z, 0-9, _) to strings");
96
+ }
97
+ return value;
98
+ }
88
99
  };
89
100
  function table(path, name, value) {
90
101
  if (value === void 0) return void 0;
@@ -175,14 +186,18 @@ function deliver(path, source) {
175
186
  "refuse_direct_push",
176
187
  "during_pause",
177
188
  "lease_wait_seconds",
178
- "notify"
189
+ "notify",
190
+ "gate",
191
+ "push_env"
179
192
  ]);
180
193
  return {
181
194
  attempts: read.int("attempts", 3),
182
195
  refuseDirectPush: read.bool("refuse_direct_push", true),
183
196
  duringPause: read.oneOf("during_pause", ["refuse", "allow"], "refuse"),
184
197
  leaseWaitSeconds: read.int("lease_wait_seconds", 3600),
185
- notify: read.argv("notify")
198
+ notify: read.argv("notify"),
199
+ gate: read.oneOf("gate", ["command", "pre-push"], "command"),
200
+ pushEnv: read.envMap("push_env")
186
201
  };
187
202
  }
188
203
  function mainlineSync(path, source) {
@@ -192,7 +207,8 @@ function mainlineSync(path, source) {
192
207
  "keep_identical_files",
193
208
  "refuse_with_unlanded",
194
209
  "stamp",
195
- "stamp_hash"
210
+ "stamp_hash",
211
+ "after_deliver"
196
212
  ]);
197
213
  const installWhenChanged = read.list("install_when_changed");
198
214
  const stamp = read.string("stamp");
@@ -215,6 +231,11 @@ function mainlineSync(path, source) {
215
231
  installWhenChanged,
216
232
  keepIdenticalFiles: read.bool("keep_identical_files", true),
217
233
  refuseWithUnlanded: read.bool("refuse_with_unlanded", true),
234
+ afterDeliver: read.oneOf(
235
+ "after_deliver",
236
+ ["from_main", "always", "off"],
237
+ "from_main"
238
+ ),
218
239
  ...stamp !== void 0 ? {
219
240
  stamp: {
220
241
  path: stamp.startsWith("${git_dir}/") ? stamp : expandPath("/", stamp),
@@ -292,6 +313,11 @@ function readGitConfig(config) {
292
313
  const mainSyncTable = child(path, mainline, "git.mainline", "sync");
293
314
  const submoduleTable = child(path, root, "git", "submodules");
294
315
  const stateDir = sessions?.["state_dir"];
316
+ if (deliverTable?.["gate"] === "pre-push" && gateTable?.["command"] !== void 0)
317
+ throw new ConfigError(
318
+ path,
319
+ '[git.mainline.deliver] gate = "pre-push" leaves gating to the pre-push hook; remove [git.mainline.gate] command'
320
+ );
295
321
  return {
296
322
  enabled: on,
297
323
  remote: read.string("remote"),
@@ -345,4 +371,4 @@ export {
345
371
  gateTreePath,
346
372
  leaseSpecs
347
373
  };
348
- //# sourceMappingURL=chunk-YXAPCHXJ.js.map
374
+ //# sourceMappingURL=chunk-ZIJ5IUXH.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  claudeSocket
3
- } from "./chunk-W5RLIUNC.js";
4
- import "./chunk-RRKGSYQ4.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-2C5L2HQL.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-OYRB3KL5.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-CNAONXN7.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-V5VCNOSH.js")).run(context);
30
- if (verb === "resume") return (await import("./resume-7S4K3R4X.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-DSCHWUMB.js")).run(context);
32
+ return (await import("./broadcast-ZALGUJVR.js")).run(context);
33
33
  if (verb === "unbroadcast")
34
- return (await import("./unbroadcast-FONZJWEW.js")).run(context);
35
- return (await import("./sweep-ZSYG6FNR.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-BVRPAI23.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-JSG4MUKH.js")).mainlineDeliver;
15
- if (verb === "sync") return (await import("./mainline-JSG4MUKH.js")).mainlineSync;
14
+ return (await import("./mainline-M2NSTAGC.js")).mainlineDeliver;
15
+ if (verb === "sync") return (await import("./mainline-M2NSTAGC.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-T6C5YEYS.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-FHFQZJY6.js");
31
+ const { loadGit } = await import("./setup-D3KEJBGO.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-YV6SFE4D.js.map
48
+ //# sourceMappingURL=cli-RVPR3MH3.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-QTKD7JEL.js";
9
+ } from "./chunk-R3MVL67T.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-YGTJQVCK.js";
35
+ } from "./chunk-H4ZOKIER.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-AGNF2AQH.js");
188
+ const { terminalSupport } = await import("./host-LSVITS6M.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-QTKD7JEL.js";
4
+ } from "./chunk-R3MVL67T.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-B3UT3GVI.js.map
142
+ //# sourceMappingURL=completion-YTPHEVEW.js.map
@@ -1,22 +1,21 @@
1
1
  import {
2
2
  dependencies
3
- } from "./chunk-YKU7KHJO.js";
3
+ } from "./chunk-TBKVC2TA.js";
4
4
  import {
5
5
  assertNativeHost
6
- } from "./chunk-BZ2RXI5I.js";
6
+ } from "./chunk-POTI2RJ6.js";
7
7
  import {
8
8
  locateExecutable
9
9
  } from "./chunk-R2GPCZUX.js";
10
10
  import "./chunk-34DECPVC.js";
11
- import "./chunk-EONAJAMJ.js";
12
11
  import {
13
12
  missingBinary
14
- } from "./chunk-57FHYW74.js";
13
+ } from "./chunk-DEY23WTH.js";
15
14
  import "./chunk-OEH47H6A.js";
16
15
  import "./chunk-IJBSOWHK.js";
17
16
  import {
18
17
  VERSION
19
- } from "./chunk-YGTJQVCK.js";
18
+ } from "./chunk-H4ZOKIER.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-ONIAKCA3.js.map
93
+ //# sourceMappingURL=diagnostics-IW54MLFK.js.map
@@ -1,49 +1,51 @@
1
1
  import {
2
2
  specFrom
3
- } from "./chunk-PBDPWE5J.js";
3
+ } from "./chunk-VBDDFO2V.js";
4
4
  import "./chunk-RPCIROW7.js";
5
5
  import {
6
6
  doctor,
7
7
  spawnRunner
8
- } from "./chunk-YYG3GUQW.js";
9
- import "./chunk-SPUCY4AG.js";
10
- import "./chunk-3UOFHLY4.js";
11
- import "./chunk-P4N7DBD5.js";
12
- import "./chunk-XPWIJOZT.js";
13
- import "./chunk-W5RLIUNC.js";
14
- import "./chunk-TIA4SPU2.js";
8
+ } from "./chunk-UFWQTZDX.js";
9
+ import "./chunk-KVNNVLJR.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-IACJDHFQ.js";
22
- import "./chunk-YLPXTJJM.js";
23
- import "./chunk-73AKO4UL.js";
12
+ import "./chunk-NHUMPEPV.js";
13
+ import "./chunk-TIA4SPU2.js";
14
+ import "./chunk-OS5DF3LL.js";
15
+ import "./chunk-P4N7DBD5.js";
16
+ import "./chunk-DJZPPCJP.js";
24
17
  import {
25
18
  FEATURES,
26
19
  GUARDS,
27
- RUNTIMES,
28
- RUNTIME_IDS
29
- } from "./chunk-BRSESCGX.js";
30
- import "./chunk-HQOB7OQS.js";
31
- import "./chunk-ICF2JZSN.js";
20
+ customEvent
21
+ } from "./chunk-VUM6LO77.js";
22
+ import "./chunk-2MAD4WNZ.js";
32
23
  import "./chunk-UD3BEEBQ.js";
33
- import "./chunk-ISNRDHSD.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-I4DLMIN5.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-YXAPCHXJ.js";
32
+ import "./chunk-ZIJ5IUXH.js";
39
33
  import "./chunk-2Q6MNGU5.js";
40
- import "./chunk-V7HG3STC.js";
41
- import "./chunk-RRKGSYQ4.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-EONAJAMJ.js";
57
- import "./chunk-57FHYW74.js";
58
+ import "./chunk-DEY23WTH.js";
58
59
  import "./chunk-OEH47H6A.js";
59
60
  import "./chunk-IJBSOWHK.js";
60
- import "./chunk-YGTJQVCK.js";
61
+ import "./chunk-H4ZOKIER.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-MJFU5L6R.js.map
540
+ //# sourceMappingURL=doctor-EN4JPSKV.js.map
@@ -1,6 +1,10 @@
1
1
  import {
2
- invoke
3
- } from "./chunk-PG42KALG.js";
2
+ requireTerminal
3
+ } from "./chunk-3X5JQYKN.js";
4
+ import "./chunk-5ZABTVSW.js";
5
+ import {
6
+ runTui
7
+ } from "./chunk-TBKVC2TA.js";
4
8
  import {
5
9
  ensureStartupDirectory,
6
10
  readStartup,
@@ -9,28 +13,23 @@ import {
9
13
  startupSettings
10
14
  } from "./chunk-C3G75JH7.js";
11
15
  import {
12
- requireTerminal
13
- } from "./chunk-XNPOHPMJ.js";
14
- import "./chunk-5ZABTVSW.js";
15
- import {
16
- runTui
17
- } from "./chunk-YKU7KHJO.js";
16
+ invoke
17
+ } from "./chunk-GQP4GWU4.js";
18
18
  import {
19
19
  lockFile
20
20
  } from "./chunk-DZ2MRTYT.js";
21
21
  import "./chunk-LMT3PPXJ.js";
22
- import "./chunk-FR6JHNLC.js";
23
- import "./chunk-BZ2RXI5I.js";
22
+ import "./chunk-YLITJLTR.js";
23
+ import "./chunk-POTI2RJ6.js";
24
24
  import {
25
25
  locateExecutable
26
26
  } from "./chunk-R2GPCZUX.js";
27
- import "./chunk-QYQGPDBE.js";
27
+ import "./chunk-33KGCJB2.js";
28
28
  import "./chunk-34DECPVC.js";
29
- import "./chunk-EONAJAMJ.js";
30
- import "./chunk-57FHYW74.js";
29
+ import "./chunk-DEY23WTH.js";
31
30
  import "./chunk-OEH47H6A.js";
32
31
  import "./chunk-IJBSOWHK.js";
33
- import "./chunk-YGTJQVCK.js";
32
+ import "./chunk-H4ZOKIER.js";
34
33
  import "./chunk-GJXOFDJT.js";
35
34
  import "./chunk-PMJG2CXF.js";
36
35
  import {
@@ -303,4 +302,4 @@ export {
303
302
  launchStartup,
304
303
  planStartup
305
304
  };
306
- //# sourceMappingURL=entry-DZGKCL4G.js.map
305
+ //# sourceMappingURL=entry-TQWSDTJ4.js.map