@wirecat/wordpress-cli 0.0.0-stage → 0.1.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 (256) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/LICENSE +204 -0
  3. package/README.md +248 -2
  4. package/contracts/wirecat.json +2535 -0
  5. package/dist/bin/wordpress.d.ts +3 -0
  6. package/dist/bin/wordpress.d.ts.map +1 -0
  7. package/dist/bin/wordpress.js +40 -0
  8. package/dist/bin/wordpress.js.map +1 -0
  9. package/dist/bundle/agent-LKBRYKNB.js +37 -0
  10. package/dist/bundle/all-profiles-OEV7VFQG.js +320 -0
  11. package/dist/bundle/anthropic-JKTZP2DW.js +91 -0
  12. package/dist/bundle/app-server-7LWLDDE2.js +249 -0
  13. package/dist/bundle/bun-2FLR4IV4.js +169 -0
  14. package/dist/bundle/bun-sqlite-GRSRX5P4.js +76 -0
  15. package/dist/bundle/chunk-2BI25SEE.js +259 -0
  16. package/dist/bundle/chunk-2UEGJ5AJ.js +52 -0
  17. package/dist/bundle/chunk-2XUV7HNE.js +58 -0
  18. package/dist/bundle/chunk-2Z7UOXFC.js +16 -0
  19. package/dist/bundle/chunk-3BM6KBWP.js +2788 -0
  20. package/dist/bundle/chunk-3BRAZVHR.js +1010 -0
  21. package/dist/bundle/chunk-3LMW7U7F.js +1233 -0
  22. package/dist/bundle/chunk-3LVTQFGB.js +2000 -0
  23. package/dist/bundle/chunk-3TKFFSFU.js +106 -0
  24. package/dist/bundle/chunk-3UX4VJWD.js +78 -0
  25. package/dist/bundle/chunk-4HEXAGKT.js +334 -0
  26. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  27. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  28. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  29. package/dist/bundle/chunk-5XPHFV7H.js +2333 -0
  30. package/dist/bundle/chunk-5Z3P543G.js +80 -0
  31. package/dist/bundle/chunk-6UYDKCV6.js +794 -0
  32. package/dist/bundle/chunk-7GNB4LBX.js +50 -0
  33. package/dist/bundle/chunk-7HJFBOAT.js +161 -0
  34. package/dist/bundle/chunk-7JVKQ6NM.js +206 -0
  35. package/dist/bundle/chunk-7QH5BZUG.js +142 -0
  36. package/dist/bundle/chunk-A474OVIW.js +1392 -0
  37. package/dist/bundle/chunk-AENEMQL3.js +1068 -0
  38. package/dist/bundle/chunk-AL7I4DT4.js +65718 -0
  39. package/dist/bundle/chunk-ARGRGTPX.js +108 -0
  40. package/dist/bundle/chunk-AV2ZJ4WX.js +7 -0
  41. package/dist/bundle/chunk-BAXNAOOL.js +76 -0
  42. package/dist/bundle/chunk-BH63B66W.js +407 -0
  43. package/dist/bundle/chunk-CCOSG3F2.js +24616 -0
  44. package/dist/bundle/chunk-CFQQTDSA.js +46 -0
  45. package/dist/bundle/chunk-CGCUOT67.js +388 -0
  46. package/dist/bundle/chunk-CHPWBQUK.js +39 -0
  47. package/dist/bundle/chunk-D72URWJE.js +532 -0
  48. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  49. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  50. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  51. package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
  52. package/dist/bundle/chunk-EHW45LLT.js +100 -0
  53. package/dist/bundle/chunk-F3AV5ZSL.js +338 -0
  54. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  55. package/dist/bundle/chunk-F5ZAN7OC.js +6848 -0
  56. package/dist/bundle/chunk-FMMYBVCH.js +38 -0
  57. package/dist/bundle/chunk-FNB4SWTY.js +66 -0
  58. package/dist/bundle/chunk-FQROWBKV.js +12660 -0
  59. package/dist/bundle/chunk-FV2HJOSC.js +771 -0
  60. package/dist/bundle/chunk-GCAJW4SR.js +53 -0
  61. package/dist/bundle/chunk-GPRJXJC7.js +102 -0
  62. package/dist/bundle/chunk-HCOZUOSN.js +54 -0
  63. package/dist/bundle/chunk-HM6AMYHR.js +72 -0
  64. package/dist/bundle/chunk-HVXOA4FO.js +23 -0
  65. package/dist/bundle/chunk-HWQ7572G.js +95 -0
  66. package/dist/bundle/chunk-IJVTN5L3.js +82 -0
  67. package/dist/bundle/chunk-IZDDBOHU.js +3610 -0
  68. package/dist/bundle/chunk-JAE5B4G7.js +388 -0
  69. package/dist/bundle/chunk-K2Y5K37O.js +218 -0
  70. package/dist/bundle/chunk-KCH224US.js +9581 -0
  71. package/dist/bundle/chunk-KZJQPJK5.js +230 -0
  72. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  73. package/dist/bundle/chunk-LECMHK2F.js +18 -0
  74. package/dist/bundle/chunk-LWEMZJLG.js +1332 -0
  75. package/dist/bundle/chunk-LWTETL2O.js +185 -0
  76. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  77. package/dist/bundle/chunk-MJ6LTG4L.js +170 -0
  78. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  79. package/dist/bundle/chunk-ODVGFCBE.js +557 -0
  80. package/dist/bundle/chunk-OEQNP56V.js +633 -0
  81. package/dist/bundle/chunk-OV6WQY3L.js +39 -0
  82. package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
  83. package/dist/bundle/chunk-PPNTY7LD.js +733 -0
  84. package/dist/bundle/chunk-PRZYRA66.js +358 -0
  85. package/dist/bundle/chunk-PV5UYGRJ.js +41594 -0
  86. package/dist/bundle/chunk-QYTOLPNI.js +52 -0
  87. package/dist/bundle/chunk-R7Y3XU66.js +362 -0
  88. package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
  89. package/dist/bundle/chunk-SD5CXGIG.js +188 -0
  90. package/dist/bundle/chunk-SXY5G62I.js +288 -0
  91. package/dist/bundle/chunk-T37TAXVL.js +29 -0
  92. package/dist/bundle/chunk-T5SOY3AE.js +1197 -0
  93. package/dist/bundle/chunk-TJ7OORSO.js +1876 -0
  94. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  95. package/dist/bundle/chunk-U6VLNYCO.js +73 -0
  96. package/dist/bundle/chunk-UC7JLE6J.js +58 -0
  97. package/dist/bundle/chunk-UUIOAZPH.js +156 -0
  98. package/dist/bundle/chunk-UXQ24OY6.js +4072 -0
  99. package/dist/bundle/chunk-VBRRMGON.js +1007 -0
  100. package/dist/bundle/chunk-VRIBES2C.js +319 -0
  101. package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
  102. package/dist/bundle/chunk-XT5XYQEZ.js +3414 -0
  103. package/dist/bundle/chunk-XTAS5Z3G.js +2231 -0
  104. package/dist/bundle/chunk-XYQVVW4R.js +24 -0
  105. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  106. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  107. package/dist/bundle/chunk-YUDVRFXN.js +63 -0
  108. package/dist/bundle/chunk-Z3I2MCUT.js +131 -0
  109. package/dist/bundle/chunk-ZDI3WC7V.js +353 -0
  110. package/dist/bundle/chunk-ZVQ7KFMT.js +274 -0
  111. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  112. package/dist/bundle/command-contract-P7YE4EKS.js +37 -0
  113. package/dist/bundle/command-server-entry-XIMCBWMV.js +166 -0
  114. package/dist/bundle/decode-6XK55WYV.js +297 -0
  115. package/dist/bundle/definitions-GIQCGYPR.js +7986 -0
  116. package/dist/bundle/dispatch-JQBAZWCL.js +411 -0
  117. package/dist/bundle/dist-2TV3NVE5.js +7577 -0
  118. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  119. package/dist/bundle/echarts-YRRVLEX3.js +42501 -0
  120. package/dist/bundle/embed-L3EEQSGX.js +38 -0
  121. package/dist/bundle/embedder-BIKLBV3J.js +111 -0
  122. package/dist/bundle/failure-I6AAF5R5.js +25 -0
  123. package/dist/bundle/first-run-W6G6TYZ2.js +29 -0
  124. package/dist/bundle/first-screen-ITIAJIBU.js +37 -0
  125. package/dist/bundle/hast-util-from-html-ZHU6HGIE.js +10531 -0
  126. package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
  127. package/dist/bundle/hast-util-to-mdast-D62XX3NR.js +2272 -0
  128. package/dist/bundle/instructions-AG7SRWTR.js +11 -0
  129. package/dist/bundle/mcp-YGOAUNC3.js +167 -0
  130. package/dist/bundle/mdast-util-from-markdown-WVUJDSUO.js +1900 -0
  131. package/dist/bundle/mdast-util-gfm-KN2D32QS.js +1040 -0
  132. package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
  133. package/dist/bundle/mdast-util-to-markdown-UCAJNHJO.js +18 -0
  134. package/dist/bundle/meeting-combined-CQJ3JHHU.js +24 -0
  135. package/dist/bundle/meeting-model-MZ7VVBNK.js +25 -0
  136. package/dist/bundle/meeting-semantic-DADWRRHP.js +22 -0
  137. package/dist/bundle/micromark-extension-gfm-EEJRRJ36.js +1771 -0
  138. package/dist/bundle/node-GJQYN4FT.js +176 -0
  139. package/dist/bundle/node-JJ3WDCNJ.js +2340 -0
  140. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  141. package/dist/bundle/node-sqlite-TPR62DT2.js +74 -0
  142. package/dist/bundle/oauth-WGY7JQVW.js +20 -0
  143. package/dist/bundle/open-DE7QZNAN.js +23 -0
  144. package/dist/bundle/openai-NHEFT3HS.js +238 -0
  145. package/dist/bundle/process-MEKCZMX3.js +91 -0
  146. package/dist/bundle/program-EP2S5BTM.js +38857 -0
  147. package/dist/bundle/prompt-PWY53BYH.js +17 -0
  148. package/dist/bundle/recognize-74TXHKMQ.js +26 -0
  149. package/dist/bundle/remote-F5TJZ5ER.js +31 -0
  150. package/dist/bundle/rerank-HWUO52UF.js +52 -0
  151. package/dist/bundle/schemas-4K6WWS5N.js +2157 -0
  152. package/dist/bundle/serve-I2USUY4X.js +199 -0
  153. package/dist/bundle/server-GDYDNO6K.js +79 -0
  154. package/dist/bundle/server-KYUW2AHB.js +212 -0
  155. package/dist/bundle/sqlite-runtime-N6VFGBJK.js +20 -0
  156. package/dist/bundle/state-L6JSCN77.js +36 -0
  157. package/dist/bundle/store-EPG2YPN3.js +291 -0
  158. package/dist/bundle/store-SQWQJE32.js +181 -0
  159. package/dist/bundle/store-maintenance-command-FTGSICVA.js +66 -0
  160. package/dist/bundle/surface-SNMHY6GP.js +65 -0
  161. package/dist/bundle/wordpress.js +183 -0
  162. package/dist/commands/api.d.ts +22 -0
  163. package/dist/commands/api.d.ts.map +1 -0
  164. package/dist/commands/api.js +37 -0
  165. package/dist/commands/api.js.map +1 -0
  166. package/dist/commands/content.d.ts +4 -0
  167. package/dist/commands/content.d.ts.map +1 -0
  168. package/dist/commands/content.js +94 -0
  169. package/dist/commands/content.js.map +1 -0
  170. package/dist/commands/session.d.ts +8 -0
  171. package/dist/commands/session.d.ts.map +1 -0
  172. package/dist/commands/session.js +28 -0
  173. package/dist/commands/session.js.map +1 -0
  174. package/dist/config.d.ts +13 -0
  175. package/dist/config.d.ts.map +1 -0
  176. package/dist/config.js +69 -0
  177. package/dist/config.js.map +1 -0
  178. package/dist/context.d.ts +37 -0
  179. package/dist/context.d.ts.map +1 -0
  180. package/dist/context.js +31 -0
  181. package/dist/context.js.map +1 -0
  182. package/dist/generated/definitions.d.ts +3 -0
  183. package/dist/generated/definitions.d.ts.map +1 -0
  184. package/dist/generated/definitions.js +7982 -0
  185. package/dist/generated/definitions.js.map +1 -0
  186. package/dist/generated/manifest.d.ts +6 -0
  187. package/dist/generated/manifest.d.ts.map +1 -0
  188. package/dist/generated/manifest.js +8830 -0
  189. package/dist/generated/manifest.js.map +1 -0
  190. package/dist/generated/schemas.d.ts +229 -0
  191. package/dist/generated/schemas.d.ts.map +1 -0
  192. package/dist/generated/schemas.js +2019 -0
  193. package/dist/generated/schemas.js.map +1 -0
  194. package/dist/generated/types.d.ts +3365 -0
  195. package/dist/generated/types.d.ts.map +1 -0
  196. package/dist/generated/types.js +5 -0
  197. package/dist/generated/types.js.map +1 -0
  198. package/dist/generated/wirecat-config.d.ts +11 -0
  199. package/dist/generated/wirecat-config.d.ts.map +1 -0
  200. package/dist/generated/wirecat-config.js +337 -0
  201. package/dist/generated/wirecat-config.js.map +1 -0
  202. package/dist/identity.d.ts +28 -0
  203. package/dist/identity.d.ts.map +1 -0
  204. package/dist/identity.js +29 -0
  205. package/dist/identity.js.map +1 -0
  206. package/dist/index.d.ts +3 -0
  207. package/dist/index.d.ts.map +1 -0
  208. package/dist/index.js +3 -0
  209. package/dist/index.js.map +1 -0
  210. package/dist/program.d.ts +6 -0
  211. package/dist/program.d.ts.map +1 -0
  212. package/dist/program.js +53 -0
  213. package/dist/program.js.map +1 -0
  214. package/dist/version.d.ts +2 -0
  215. package/dist/version.d.ts.map +1 -0
  216. package/dist/version.js +2 -0
  217. package/dist/version.js.map +1 -0
  218. package/dist/wcat.d.ts +3 -0
  219. package/dist/wcat.d.ts.map +1 -0
  220. package/dist/wcat.js +4 -0
  221. package/dist/wcat.js.map +1 -0
  222. package/package.json +87 -4
  223. package/skills/wordpress-cli/SKILL.md +88 -0
  224. package/skills/wordpress-cli/references/api/api-block-directory.md +17 -0
  225. package/skills/wordpress-cli/references/api/api-block-patterns.md +13 -0
  226. package/skills/wordpress-cli/references/api/api-block-types.md +34 -0
  227. package/skills/wordpress-cli/references/api/api-blocks.md +159 -0
  228. package/skills/wordpress-cli/references/api/api-categories.md +69 -0
  229. package/skills/wordpress-cli/references/api/api-comments.md +79 -0
  230. package/skills/wordpress-cli/references/api/api-font-collections.md +16 -0
  231. package/skills/wordpress-cli/references/api/api-font-families.md +122 -0
  232. package/skills/wordpress-cli/references/api/api-global-styles.md +29 -0
  233. package/skills/wordpress-cli/references/api/api-media.md +106 -0
  234. package/skills/wordpress-cli/references/api/api-menu-items.md +115 -0
  235. package/skills/wordpress-cli/references/api/api-menu-locations.md +22 -0
  236. package/skills/wordpress-cli/references/api/api-menus.md +69 -0
  237. package/skills/wordpress-cli/references/api/api-navigation.md +155 -0
  238. package/skills/wordpress-cli/references/api/api-pages.md +161 -0
  239. package/skills/wordpress-cli/references/api/api-pattern-directory.md +23 -0
  240. package/skills/wordpress-cli/references/api/api-plugins.md +25 -0
  241. package/skills/wordpress-cli/references/api/api-posts.md +166 -0
  242. package/skills/wordpress-cli/references/api/api-search.md +21 -0
  243. package/skills/wordpress-cli/references/api/api-settings.md +19 -0
  244. package/skills/wordpress-cli/references/api/api-sidebars.md +34 -0
  245. package/skills/wordpress-cli/references/api/api-statuses.md +22 -0
  246. package/skills/wordpress-cli/references/api/api-tags.md +69 -0
  247. package/skills/wordpress-cli/references/api/api-taxonomies.md +23 -0
  248. package/skills/wordpress-cli/references/api/api-template-parts.md +38 -0
  249. package/skills/wordpress-cli/references/api/api-templates.md +38 -0
  250. package/skills/wordpress-cli/references/api/api-themes.md +12 -0
  251. package/skills/wordpress-cli/references/api/api-types.md +22 -0
  252. package/skills/wordpress-cli/references/api/api-users.md +149 -0
  253. package/skills/wordpress-cli/references/api/api-widget-types.md +46 -0
  254. package/skills/wordpress-cli/references/api/api-widgets.md +57 -0
  255. package/skills/wordpress-cli/references/api/api-wp-pattern-category.md +69 -0
  256. package/skills/wordpress-cli/references/api.md +44 -0
@@ -0,0 +1,733 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ Command,
5
+ InvalidArgumentError,
6
+ Option,
7
+ annotate,
8
+ annotateOption,
9
+ listOf,
10
+ sharedCommand
11
+ } from "./chunk-FQROWBKV.js";
12
+ import {
13
+ readMoment
14
+ } from "./chunk-5Z3P543G.js";
15
+ import {
16
+ BACKENDS,
17
+ EVENT_QUERY,
18
+ MEETING_FIELDS,
19
+ MEETING_FIELD_KEYS,
20
+ MEETING_PROJECT_EVIDENCE_QUERY,
21
+ MEETING_QUERY,
22
+ MEETING_QUERY_GUIDE,
23
+ MeetingError,
24
+ OPERATORS_BY_TYPE,
25
+ SAVE_HELP,
26
+ SNAKE_CASE,
27
+ dateRange,
28
+ defineQuery,
29
+ eventItem,
30
+ exportMeeting,
31
+ fieldsHelp,
32
+ fieldsNamed,
33
+ importFiles,
34
+ listed,
35
+ markedPassage,
36
+ meetingDetailsBody,
37
+ meetingFieldFlag,
38
+ meetingHitsList,
39
+ meetingPeople,
40
+ meetingShowThrough,
41
+ meetingSummaryAnswer,
42
+ meetingTranscriptAnswer,
43
+ meetingsListThrough,
44
+ meetingsQuery,
45
+ parseLucene,
46
+ pull,
47
+ queryError,
48
+ queryFieldsOf,
49
+ readMeetingProjectEvidence,
50
+ timezoneOf,
51
+ validateMeetingHitSearch,
52
+ validateMeetingPassage,
53
+ validateQuery
54
+ } from "./chunk-UXQ24OY6.js";
55
+ import {
56
+ CliError
57
+ } from "./chunk-HM6AMYHR.js";
58
+ import {
59
+ __name
60
+ } from "./chunk-ZVVMGPBJ.js";
61
+
62
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/services/moment.js
63
+ var read = /* @__PURE__ */ __name((reference, flag, now, at) => {
64
+ const found = readMoment(reference, flag, { ...at, now });
65
+ if (found === void 0)
66
+ throw new CliError("validation_error", `${flag} takes an ISO 8601 time, today, yesterday, or 30m, 2h, 1d ago \u2014 not "${reference.trim()}"`);
67
+ return found;
68
+ }, "read");
69
+ var momentOf = /* @__PURE__ */ __name((reference, flag = "--since", now = Date.now(), at = {}) => read(reference, flag, now, at).time, "momentOf");
70
+ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Date.now(), names = ["--since-time", "--until-time"] }) => {
71
+ const at = zone === void 0 ? {} : { zone };
72
+ const lower = sinceTime === void 0 ? void 0 : read(sinceTime, names[0], now, at);
73
+ const upper = untilTime === void 0 ? void 0 : read(untilTime, names[1], now, { ...at, end: true });
74
+ const since = lower?.time;
75
+ const until = upper?.time;
76
+ const readInZone = lower?.local === true || upper?.local === true;
77
+ const window = {
78
+ ...since === void 0 ? {} : { since: new Date(since).toISOString() },
79
+ ...until === void 0 ? {} : { until: new Date(until).toISOString() }
80
+ };
81
+ return {
82
+ ...since === void 0 ? {} : { since },
83
+ ...until === void 0 ? {} : { until },
84
+ meta: {
85
+ ...readInZone ? { timezone: timezoneOf(zone) } : {},
86
+ ...since === void 0 && until === void 0 ? {} : { window }
87
+ }
88
+ };
89
+ }, "dateWindow");
90
+
91
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cli/management.js
92
+ var REMOTE_READ = { remote: "read", local: "read" };
93
+ var REMOTE_WRITE = { remote: "write", local: "write" };
94
+ var minutes = /* @__PURE__ */ __name((text) => {
95
+ if (!/^[1-9]\d*$/.test(text))
96
+ throw new InvalidArgumentError("expected whole minutes");
97
+ return Number(text);
98
+ }, "minutes");
99
+ var setting = /* @__PURE__ */ __name((text, previous = []) => {
100
+ const at = text.indexOf("=");
101
+ const name = text.slice(0, at);
102
+ if (at < 1 || !SNAKE_CASE.test(name))
103
+ throw new InvalidArgumentError("expected name=value with a snake_case name, such as access_type=trusted");
104
+ return [...previous, [name, text.slice(at + 1)]];
105
+ }, "setting");
106
+ var valuesOf = /* @__PURE__ */ __name((one) => one.type === "choice" ? one.values.join("|") : one.type === "boolean" ? "true|false" : "<text>", "valuesOf");
107
+ var changeOptions = /* @__PURE__ */ __name((command, declared, create) => {
108
+ const settings = declared.settings.length ? declared.settings.map((one) => `${one.name}=${valuesOf(one)}`).join(", ") : "this service has none";
109
+ const takes = declared.fields.map(meetingFieldFlag).join(", ") || "none of the options above";
110
+ const schedules = declared.fields.includes("startTime");
111
+ const start = !create ? "" : !schedules ? "; this service takes none, its meetings start now" : declared.fields.includes("kind") ? "; for a meeting that starts now, give --kind instant instead" : "";
112
+ return command.option("--title <title>", "the meeting's title").addOption(new Option("--kind <kind>", "an instant or a scheduled meeting").choices(["instant", "scheduled"])).option("--start-time <time>", `when it starts: an ISO time with its offset, 2026-11-20T10:00:00+01:00${start}`).option("--duration-minutes <minutes>", "how long it lasts, 1\u20131440", minutes).option("--timezone <zone>", "its IANA time zone, Europe/Madrid").option("--agenda <text>", "its agenda").option("--setting <name=value>", `a setting of this service; repeat it for more: ${settings}`, setting).addHelpText("after", [
113
+ "",
114
+ `This service takes ${takes}.`,
115
+ ...declared.settings.length ? ["Its settings:", ...declared.settings.map((one) => ` ${one.name}=${valuesOf(one)} ${one.description}`)] : []
116
+ ].join("\n"));
117
+ }, "changeOptions");
118
+ var changeOf = /* @__PURE__ */ __name((flags) => {
119
+ const change = Object.fromEntries(MEETING_FIELDS.flatMap((key) => flags[key] === void 0 ? [] : [[key, flags[key]]]));
120
+ if (!flags.setting)
121
+ return change;
122
+ const settings = /* @__PURE__ */ new Map();
123
+ for (const [name, value] of flags.setting) {
124
+ if (settings.has(name))
125
+ throw new CliError("validation_error", `--setting ${name} is given twice`);
126
+ settings.set(name, value);
127
+ }
128
+ return { ...change, settings: Object.fromEntries(settings) };
129
+ }, "changeOf");
130
+ var meetingOf = /* @__PURE__ */ __name((one) => ({
131
+ id: one.id,
132
+ title: one.title,
133
+ kind: one.kind,
134
+ start_time: one.startTime,
135
+ duration_minutes: one.durationMinutes,
136
+ timezone: one.timezone,
137
+ agenda: one.agenda,
138
+ join_url: one.joinUrl
139
+ }), "meetingOf");
140
+ var receiptItem = /* @__PURE__ */ __name((receipt) => {
141
+ const { change } = receipt;
142
+ return {
143
+ action: receipt.action,
144
+ provider: receipt.scope.provider,
145
+ account: receipt.scope.account,
146
+ ...receipt.id === void 0 ? {} : { id: receipt.id },
147
+ ...receipt.occurrenceId === void 0 ? {} : { occurrence_id: receipt.occurrenceId },
148
+ ...change ? {
149
+ change: {
150
+ ...Object.fromEntries(MEETING_FIELDS.flatMap((key) => change[key] === void 0 ? [] : [[MEETING_FIELD_KEYS[key], change[key]]])),
151
+ ...change.settings === void 0 ? {} : { settings: { ...change.settings } }
152
+ }
153
+ } : {},
154
+ applied: receipt.applied,
155
+ ...receipt.meeting ? { meeting: meetingOf(receipt.meeting), untrusted: ["meeting.title", "meeting.agenda", "meeting.join_url"] } : {}
156
+ };
157
+ }, "receiptItem");
158
+ var addMeetingManagementCommands = /* @__PURE__ */ __name((group, deps) => {
159
+ const { management, print, output, inRun, askFirst } = deps;
160
+ const signalled = /* @__PURE__ */ __name(() => {
161
+ const signal = deps.signal?.();
162
+ return signal ? { signal } : {};
163
+ }, "signalled");
164
+ const has = /* @__PURE__ */ __name((name) => management.capabilities.includes(name), "has");
165
+ const mutation = /* @__PURE__ */ __name((command) => ({
166
+ apply: true,
167
+ dryRun: command.optsWithGlobals().dryRun === true,
168
+ ...signalled(),
169
+ confirm: /* @__PURE__ */ __name(async () => {
170
+ if (!askFirst)
171
+ throw new CliError("configuration_error", "this tool cannot ask before it changes a meeting on the service");
172
+ await askFirst(command);
173
+ }, "confirm")
174
+ }), "mutation");
175
+ const write = /* @__PURE__ */ __name((name) => annotate(group.command(name), { effects: REMOTE_WRITE, offline: false, output: { entity: "meeting_change" } }), "write");
176
+ const target = /* @__PURE__ */ __name((command) => command.argument("<meeting>", "the service's id of the meeting"), "target");
177
+ if (has("create"))
178
+ output(changeOptions(write("create").description("create a meeting on the service"), management.fields.create, true)).action(async (flags, command) => inRun(command, async () => print({ item: receiptItem(await management.create(changeOf(flags), mutation(command))) }, command)));
179
+ if (has("update"))
180
+ output(changeOptions(target(write("update").description("change a meeting on the service")), management.fields.update, false)).action(async (id, flags, command) => inRun(command, async () => print({ item: receiptItem(await management.update(id, changeOf(flags), mutation(command))) }, command)));
181
+ if (has("cancel"))
182
+ output(target(write("cancel").description("cancel a meeting on the service")).option("--occurrence-id <id>", "cancel only this occurrence of a repeating meeting")).action(async (id, flags, command) => inRun(command, async () => print({
183
+ item: receiptItem(await management.cancel(id, {
184
+ ...mutation(command),
185
+ ...flags.occurrenceId === void 0 ? {} : { occurrenceId: flags.occurrenceId }
186
+ }))
187
+ }, command)));
188
+ if (has("invitation"))
189
+ output(target(annotate(group.command("invitation"), {
190
+ effects: REMOTE_READ,
191
+ offline: false,
192
+ output: { entity: "meeting_invitation" }
193
+ }).description("the invitation text the service writes for a meeting"))).action(async (id, _flags, command) => inRun(command, async () => print({ item: { ...await management.invitation(id, signalled()), untrusted: ["invitation"] } }, command)));
194
+ }, "addMeetingManagementCommands");
195
+
196
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
197
+ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
198
+ command.allowUnknownOption();
199
+ const parse = command.parseOptions.bind(command);
200
+ command.parseOptions = (args) => {
201
+ const parsed = parse(args);
202
+ const end = parsed.unknown.indexOf("--");
203
+ const help = command._getHelpOption();
204
+ const typo = parsed.unknown.slice(0, end < 0 ? void 0 : end).find((word) => word.startsWith("--") && !help?.is(word));
205
+ if (typo !== void 0) {
206
+ command.allowUnknownOption(false);
207
+ command.unknownOption(typo);
208
+ }
209
+ if (end >= 0)
210
+ parsed.unknown.splice(end, 1);
211
+ return parsed;
212
+ };
213
+ return command;
214
+ }, "queryWordsAfterOptions");
215
+
216
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
217
+ var count = /* @__PURE__ */ __name((value) => {
218
+ if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
219
+ throw new CliError("validation_error", "expected a nonnegative safe integer");
220
+ return Number(value);
221
+ }, "count");
222
+ var meetingPassageRequest = /* @__PURE__ */ __name((reference, options, signal) => {
223
+ const input = {
224
+ before: options.beforeN,
225
+ after: options.afterN,
226
+ bytes: options.bytes,
227
+ max_read_bytes: options.maxReadBytes,
228
+ expected_fingerprint: options.expectedFingerprint,
229
+ format: options.format ?? "text",
230
+ signal
231
+ };
232
+ validateMeetingPassage(reference, input);
233
+ signal?.throwIfAborted();
234
+ return input;
235
+ }, "meetingPassageRequest");
236
+ var createMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program) => {
237
+ const meetings = program.commands.find((command) => command.name() === "meetings");
238
+ if (!meetings)
239
+ throw new CliError("configuration_error", "meeting command group is unavailable");
240
+ return annotate(meetings.command("passage").description("read a cited cue with bounded context before and after it").argument("<reference>", "retained transcript cue reference from a search hit").option("--before-n <n>", "preceding cues (default 3)", count).option("--after-n <n>", "following cues (default 3); at most 999 surrounding cues in total", count).option("--bytes <bytes>", "cue JSON byte budget (default 65536); the anchor must fit", count).option("--max-read-bytes <bytes>", "stored text byte budget (default 4194304); boundary probes read metadata only", count).option("--expected-fingerprint <hash>", "reject a changed anchor using its previously read cue fingerprint").addOption(new Option("--format <format>", "compact text, Markdown or structured JSON").choices(["text", "markdown", "json"]).default("text")), {
241
+ origin: "handwritten",
242
+ effects: { remote: "none", local: "read" },
243
+ output: { entity: "meeting_passage" },
244
+ examples: [`${program.name()} meetings passage meeting:1/1/1/0 --json`]
245
+ });
246
+ }, "createMeetingPassageCommandDefinition");
247
+ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps) => createMeetingPassageCommand(program).action(async (reference, options, command) => {
248
+ const globals = command.optsWithGlobals();
249
+ const format = globals.json || globals.jsonl ? "json" : options.format ?? "text";
250
+ const input = meetingPassageRequest(reference, { ...options, format }, deps.signal());
251
+ const result = markedPassage(await deps.read(reference, input));
252
+ input.signal?.throwIfAborted();
253
+ deps.output(result, format);
254
+ }), "addMeetingPassageCommandDefinition");
255
+ var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
256
+ var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
257
+
258
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
259
+ var integer = /* @__PURE__ */ __name((value) => {
260
+ if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
261
+ throw new CliError("validation_error", "expected a positive safe integer");
262
+ return Number(value);
263
+ }, "integer");
264
+ var addMeetingProjectEvidenceCommandDefinition = /* @__PURE__ */ __name((program, deps) => {
265
+ const group = program.commands.find((command) => command.name() === "meetings");
266
+ if (!group)
267
+ throw new CliError("configuration_error", "meeting command group is unavailable");
268
+ const projects = group.commands.find((command) => command.name() === "projects") ?? group.command("projects").description("project-name evidence in stored meetings");
269
+ return annotate(queryWordsAfterOptions(projects.command("evidence").description("find cited project-name and alias evidence in the local meeting index; does not refresh it or confirm membership")).argument("<project>", "existing project name, key or explicit alias").argument("[query...]", "exact ID fields and a UTC started_at range, joined by AND").addHelpText("after", `
270
+ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in one name page, 1 through 1000 (default 100)", integer).option("--cursor <cursor>", "continue with the same project and frozen selection from next").option("--max-read-bytes <bytes>", "word-read byte budget, at most 67108864 (default 4194304)", integer).action(async (project, words, options) => {
271
+ deps.output(await readMeetingProjectEvidence(deps.read, project, { ...options, query: words.join(" "), signal: deps.signal() }, deps.now?.()));
272
+ }), {
273
+ origin: "handwritten",
274
+ effects: { remote: "none", local: "read" },
275
+ query: MEETING_PROJECT_EVIDENCE_QUERY,
276
+ output: { entity: "meeting_project_evidence" }
277
+ });
278
+ }, "addMeetingProjectEvidenceCommandDefinition");
279
+ var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
280
+
281
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
282
+ var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
283
+ const { since, until, meta } = dateWindow(end ? { untilTime: value, names: [flag, flag] } : { sinceTime: value, names: [flag, flag] });
284
+ if (meta.timezone)
285
+ readIn(meta.timezone);
286
+ return end ? until : since;
287
+ }, "moment");
288
+ var integer2 = /* @__PURE__ */ __name((value) => {
289
+ if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
290
+ throw new CliError("validation_error", "expected a positive safe integer");
291
+ return Number(value);
292
+ }, "integer");
293
+ var createMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program) => {
294
+ let search = program.commands.find((command2) => command2.name() === "search");
295
+ if (!search) {
296
+ search = new Command("search").description("search the stored resources");
297
+ program.addCommand(search);
298
+ }
299
+ const readIn = /* @__PURE__ */ __name((zone) => command.setOptionValue("timesReadIn", zone), "readIn");
300
+ const command = search.command("meetings").description("find words in stored meetings, indexing new ones first").argument("<query>", 'words, OR, (groups), -word, "a phrase", "a b"~N (within N lines), exact:word, from:"Name" (who said the line); date>=30d, project:, tag:, topic: choose meetings; a word also matches its other forms and spellings speech recognition garbled').option("--meeting-id <id>", "only this stored meeting", integer2).option("--identity-id <id>", "meetings with this participant identity; does not say who spoke a hit", integer2).option("--person-id <id>", "meetings with a participant linked to this person", integer2).option("--event-id <id>", "only meetings linked to this stored event", integer2).option("--series-id <id>", "only meetings in this stored series", integer2).option("--project <project>", "meetings confirmed in this project, by name, key or alias").option("--tag <name>", "meetings with this tag, by name or alias").option("--topic-name <name>", "meetings with this topic, by name or alias").option("--since-time <time>", "meetings starting at or after this ISO 8601 date or time, or 30m, 2h, 7d ago", moment("--since-time", false, readIn)).option("--until-time <time>", "meetings starting at or before this ISO 8601 date or time; a date alone covers that whole local day", moment("--until-time", true, readIn)).option("--limit <n>", "how many hits, 1 through 1000; the profile's defaults.limit when absent", integer2).option("--cursor <cursor>", "continue from the previous page's page.next_cursor, with the same query and filters").option("--max-read-bytes <bytes>", "most stored bytes to read, 1 through 67108864 (default 4194304)", integer2);
301
+ annotate(command, {
302
+ origin: "handwritten",
303
+ effects: { remote: "none", local: "read" },
304
+ output: { entity: "meeting_hit" }
305
+ });
306
+ return command;
307
+ }, "createMeetingSearchCommandDefinition");
308
+ var meetingHitSearchRequest = /* @__PURE__ */ __name((query, options, limit, signal) => {
309
+ const request = {
310
+ meetingId: options.meetingId,
311
+ participantIdentityId: options.identityId,
312
+ personId: options.personId,
313
+ eventId: options.eventId,
314
+ meetingSeriesId: options.seriesId,
315
+ project: options.project,
316
+ tag: options.tag,
317
+ topic: options.topicName ?? options.topic,
318
+ since: options.sinceTime,
319
+ until: options.untilTime,
320
+ limit: options.limit ?? limit,
321
+ after: options.cursor,
322
+ maxReadBytes: options.maxReadBytes,
323
+ signal
324
+ };
325
+ validateMeetingHitSearch(query, request);
326
+ signal?.throwIfAborted();
327
+ return request;
328
+ }, "meetingHitSearchRequest");
329
+ var meetingSearchArguments = /* @__PURE__ */ __name((query, options) => Object.fromEntries(Object.entries({
330
+ query,
331
+ meeting_id: options.meetingId?.toString(),
332
+ identity_id: options.identityId?.toString(),
333
+ person_id: options.personId?.toString(),
334
+ event_id: options.eventId?.toString(),
335
+ series_id: options.seriesId?.toString(),
336
+ project: options.project,
337
+ tag: options.tag,
338
+ topic_name: options.topicName ?? options.topic,
339
+ since_time: options.sinceTime === void 0 ? void 0 : new Date(options.sinceTime).toISOString(),
340
+ until_time: options.untilTime === void 0 ? void 0 : new Date(options.untilTime).toISOString(),
341
+ max_read_bytes: options.maxReadBytes ?? 4194304
342
+ }).filter(([, value]) => value !== void 0)), "meetingSearchArguments");
343
+ var meetingSearchMeta = /* @__PURE__ */ __name((options) => {
344
+ const window = {
345
+ ...options.sinceTime === void 0 ? {} : { since: new Date(options.sinceTime).toISOString() },
346
+ ...options.untilTime === void 0 ? {} : { until: new Date(options.untilTime).toISOString() }
347
+ };
348
+ return {
349
+ ...options.timesReadIn === void 0 ? {} : { timezone: options.timesReadIn },
350
+ ...Object.keys(window).length === 0 ? {} : { window }
351
+ };
352
+ }, "meetingSearchMeta");
353
+ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) => createMeetingSearchCommand(program).action(async (query, options, command) => {
354
+ const request = meetingHitSearchRequest(query, options, deps.pagingOf(command).limit, deps.signal());
355
+ deps.output(meetingHitsList(await deps.search(query, request, options), request.limit, "search meetings", meetingSearchArguments(query, options), meetingSearchMeta(options)));
356
+ }), "addMeetingSearchCommandDefinition");
357
+ var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
358
+ var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
359
+
360
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
361
+ var EVENT_UNTRUSTED = ["title", "description", "location"];
362
+ var integer3 = /* @__PURE__ */ __name((text) => {
363
+ if (!/^[1-9]\d*$/.test(text) || !Number.isSafeInteger(Number(text)))
364
+ throw new InvalidArgumentError("expected a positive integer");
365
+ return Number(text);
366
+ }, "integer");
367
+ var lookbackDays = /* @__PURE__ */ __name((text) => {
368
+ if (!/^(0|[1-9]\d*)$/.test(text) || Number(text) > 31)
369
+ throw new InvalidArgumentError("expected an integer from 0 through 31 days");
370
+ return Number(text);
371
+ }, "lookbackDays");
372
+ var LOCAL_READ = { remote: "none", local: "read" };
373
+ var REMOTE_READ2 = { remote: "read", local: "read" };
374
+ var backendOf = /* @__PURE__ */ __name((value) => {
375
+ if (!BACKENDS.includes(value))
376
+ throw new InvalidArgumentError("expected archive, server or both");
377
+ return value;
378
+ }, "backendOf");
379
+ var backendOption = /* @__PURE__ */ __name((command) => command.option("--backend <archive|server|both>", "where to read: the store (archive), the service (server), or both, kept in the store (default: both)", backendOf), "backendOption");
380
+ var BACKEND_HELP = "--backend both asks the service with the part of the query it can filter, keeps what it returns, then runs the whole query over the store; each item says found_in archive, server or both. --offline reads the store only.";
381
+ var LOCAL_WRITE = { remote: "none", local: "write" };
382
+ var FETCH = { remote: "read", local: "write" };
383
+ var addMeetingCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
384
+ const group = annotate(program.command("meetings").description("stored meetings and their records"), {
385
+ effects: { remote: "none", local: "none" }
386
+ });
387
+ const output = /* @__PURE__ */ __name((command) => command, "output");
388
+ const print = /* @__PURE__ */ __name((value, command) => {
389
+ const opts = command.optsWithGlobals();
390
+ deps.write(value, opts.json ? "json" : opts.jsonl ? "jsonl" : "text", command);
391
+ }, "print");
392
+ const access = /* @__PURE__ */ __name((command, backend) => {
393
+ const signal = deps.signal?.();
394
+ return {
395
+ ...backend === void 0 ? {} : { backend },
396
+ offline: command.optsWithGlobals().offline === true,
397
+ timezone: timezoneOf(deps.timezone),
398
+ ...deps.now ? { now: deps.now() } : {},
399
+ ...signal ? { signal } : {}
400
+ };
401
+ }, "access");
402
+ const list = queryWordsAfterOptions(group.command("list").description("meetings, newest first: the service's and the stored ones, kept in the store")).argument("[query...]", "field:value terms that narrow the list \u2014 the fields are below").addHelpText("after", `
403
+ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}
404
+ ${BACKEND_HELP}`);
405
+ annotate(list, {
406
+ effects: REMOTE_READ2,
407
+ partial: true,
408
+ query: defineQuery(MEETING_QUERY),
409
+ output: { entity: "meeting" }
410
+ });
411
+ backendOption(output(list)).option("--limit <n>", "meetings per page; the profile's defaults.limit when absent", integer3).option("--page <n>", "which page, starting at 1", integer3).action(async (words, opts, command) => {
412
+ const query = meetingsQuery(words.join(" "));
413
+ const { limit, page } = deps.pagingOf(command);
414
+ await deps.inRun(command, async () => {
415
+ const { server: _server, ...answer } = await meetingsListThrough(deps.source, deps.store, {
416
+ accountId: deps.accountId,
417
+ limit,
418
+ offset: (page - 1) * limit,
419
+ ...query ? { query } : {}
420
+ }, access(command, opts.backend));
421
+ print(answer, command);
422
+ });
423
+ });
424
+ backendOption(output(annotate(group.command("show"), { effects: REMOTE_READ2, partial: true, output: { entity: "meeting_details" } }).description("show a meeting, read again from the service with its people, transcript and documents").argument("<meeting>", "the stored meeting's number, its meeting: ref, or the service's id (provider_id)").addHelpText("after", `${SAVE_HELP}
425
+ ${BACKEND_HELP}`))).action(async (meeting, opts, command) => {
426
+ await deps.inRun(command, async () => {
427
+ const shown = await meetingShowThrough(deps.source, deps.store, deps.accountId, meeting, access(command, opts.backend));
428
+ const { item } = await meetingDetailsBody(deps.store, shown.details);
429
+ print({
430
+ item: shown.foundIn ? { ...item, found_in: shown.foundIn } : item,
431
+ ...shown.missing ? { missing: shown.missing } : {},
432
+ ...shown.meta ? { meta: shown.meta } : {}
433
+ }, command);
434
+ });
435
+ });
436
+ output(annotate(group.command("transcript"), { effects: LOCAL_READ, output: { entity: "meeting_transcript" } }).description("show current meeting transcripts").argument("<meeting>", "stored meeting id", integer3).option("--history", "include superseded transcript versions").addHelpText("after", SAVE_HELP)).action(async (id, opts, command) => {
437
+ print(await meetingTranscriptAnswer(deps.store, id, deps.accountId, { history: opts.history }), command);
438
+ });
439
+ output(annotate(group.command("summary"), { effects: LOCAL_READ, output: { entity: "meeting_summary" } }).description("show stored meeting summaries").argument("<meeting>", "stored meeting id", integer3)).action(async (id, _opts, command) => {
440
+ print(await meetingSummaryAnswer(deps.store, id, deps.accountId), command);
441
+ });
442
+ const exporter = output(annotate(group.command("export"), { effects: LOCAL_WRITE, output: { entity: "meeting_export" } }).description("export a meeting as Markdown or one transcript as WebVTT").argument("<meeting>", "stored meeting id", integer3).addOption(new Option("--format <format>", "export format").choices(["markdown", "vtt"]).default("markdown")).option("--transcript-id <id>", "export a specific transcript version", integer3).addOption(
443
+ // Not over MCP: an agent would choose where on the owner's disk to write; it gets the content in the answer.
444
+ annotateOption(new Option("--output <file>", "write content to a new file through the host's writer"), {
445
+ mcp: false
446
+ })
447
+ ));
448
+ deps.newFileOutput?.(exporter, "output");
449
+ exporter.action(async (id, opts, command) => {
450
+ if (opts.output !== void 0 && !opts.output.trim())
451
+ throw new MeetingError("validation_error", "output path must not be empty");
452
+ if (opts.output !== void 0 && !deps.writeFile)
453
+ throw new MeetingError("configuration_error", "the host has no export file writer");
454
+ const result = await exportMeeting(deps.store, id, {
455
+ accountId: deps.accountId,
456
+ format: opts.format,
457
+ transcriptId: opts.transcriptId
458
+ });
459
+ if (opts.output !== void 0) {
460
+ await deps.writeFile?.(opts.output, result.content);
461
+ print({ meetingId: result.meetingId, format: result.format, output: opts.output }, command);
462
+ } else
463
+ print(result, command);
464
+ });
465
+ output(annotate(group.command("people"), { effects: LOCAL_READ, output: { entity: "meeting_participants" } }).description("find meeting participants by name or email").argument("<query>", "a name or an email address")).option("--limit <n>", "most matching observations per page, 1\u20131000 (default 50)", integer3).option("--scan-limit <n>", "most participant observations to inspect, 1\u201310000 (default 1000)", integer3).option("--max-read-bytes <bytes>", "most stored name and email bytes to read (default 1048576)", integer3).option("--cursor <cursor>", "continue with the same name query and selected account").action(async (query, opts, command) => {
466
+ const found = await meetingPeople(deps.store, query, deps.accountId, {
467
+ limit: opts.limit,
468
+ scanLimit: opts.scanLimit,
469
+ maxReadBytes: opts.maxReadBytes,
470
+ cursor: opts.cursor
471
+ });
472
+ print(found, command);
473
+ });
474
+ output(annotate(group.command("sync"), {
475
+ effects: FETCH,
476
+ offline: false,
477
+ output: { entity: "meeting_ingestion" },
478
+ // Only a sync that stops itself at its budget may outlive the one-shot deadline.
479
+ ...deps.budgetOf ? { cooperative: true, partial: true } : {}
480
+ }).description("bring the stored meetings up to date from the connected account, oldest first; a run that stops before its deadline keeps what it saved and the next one goes on from there")).option("--since-time <time>", "fetch meetings starting at or after this ISO 8601 date or time, or 30m, 2h, 7d ago", (text) => dateWindow({ sinceTime: text, ...deps.timezone ? { zone: deps.timezone } : {}, now: deps.now?.() }).since).option("--lookback-days <days>", "revisit recent occurrences for late transcripts (0\u201331)", lookbackDays).option("--rescan", "read the last 30 days again, not only what came after the last sync").action(async (opts, command) => {
481
+ const source = deps.source;
482
+ if (!source)
483
+ throw new MeetingError("configuration_error", "meeting source is unavailable");
484
+ await deps.inRun(command, async () => print(await pull(source, deps.store, {
485
+ accountId: deps.accountId,
486
+ since: opts.sinceTime === void 0 ? void 0 : new Date(opts.sinceTime).toISOString(),
487
+ now: deps.now?.(),
488
+ ...opts.lookbackDays === void 0 ? {} : { lookbackMs: opts.lookbackDays * 864e5 },
489
+ ...opts.rescan ? { rescan: true } : {},
490
+ ...deps.budgetOf ? { budget: deps.budgetOf(command) } : {}
491
+ }), command));
492
+ });
493
+ const importCommand = annotate(group.command("import"), {
494
+ effects: LOCAL_WRITE,
495
+ output: { entity: "meeting_ingestion" }
496
+ }).description("import downloaded meeting transcripts").argument("<folder>", "folder of transcripts downloaded from the provider");
497
+ if (deps.importHelp)
498
+ importCommand.addHelpText("after", `
499
+ ${deps.importHelp}`);
500
+ output(importCommand).action(async (folder, _opts, command) => {
501
+ if (!deps.readFiles)
502
+ throw new MeetingError("configuration_error", "file reader is unavailable");
503
+ const files = await deps.readFiles(folder);
504
+ if (files.some((file) => file.meeting.accountId !== deps.accountId))
505
+ throw new MeetingError("validation_error", "file account differs from selected account");
506
+ print(await importFiles(files, deps.store, deps.now?.()), command);
507
+ });
508
+ output(annotate(group.command("repair"), {
509
+ effects: LOCAL_WRITE,
510
+ output: { entity: "meeting_repair" }
511
+ }).description("preview filling in what older builds left out of stored transcripts (their language); --yes stores it")).option("--yes", "store the detected languages; otherwise only preview").action(async (opts, command) => {
512
+ if (!deps.store.fillTranscriptLanguages)
513
+ throw new MeetingError("configuration_error", "this store cannot fill transcript languages");
514
+ print(await deps.store.fillTranscriptLanguages({
515
+ accountId: deps.accountId,
516
+ apply: opts.yes === true,
517
+ now: deps.now?.() ?? Date.now()
518
+ }), command);
519
+ });
520
+ if (deps.management)
521
+ addMeetingManagementCommands(group, {
522
+ management: deps.management,
523
+ print,
524
+ output,
525
+ inRun: deps.inRun,
526
+ ...deps.askFirst ? { askFirst: deps.askFirst } : {},
527
+ ...deps.signal ? { signal: deps.signal } : {}
528
+ });
529
+ const eventList = queryWordsAfterOptions(annotate(program.command("events").description("the owner's stored events"), {
530
+ effects: { remote: "none", local: "none" }
531
+ }).command("list")).description("list stored events").argument("[query...]", "event id, origin or time fields that narrow the list").addHelpText("after", `
532
+ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
533
+ annotate(eventList, { effects: LOCAL_READ, output: { entity: "event" }, query: EVENT_QUERY });
534
+ output(eventList).action(async (words, _opts, command) => {
535
+ const query = words.length ? parseLucene(words.join(" "), { defaultField: "none", command: "events list" }) : void 0;
536
+ if (query)
537
+ validateQuery(query, EVENT_QUERY, { command: "events list" });
538
+ if (query && !deps.store.queryEvents)
539
+ throw new MeetingError("validation_error", "this store cannot filter events");
540
+ const events = query ? await deps.store.queryEvents?.(query) : await deps.store.events();
541
+ print(listed((events ?? []).map((one) => ({ ...eventItem(one), untrusted: [...EVENT_UNTRUSTED] }))), command);
542
+ });
543
+ }, "addMeetingCommandsDefinition");
544
+ var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
545
+
546
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/cli/list-query.js
547
+ var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
548
+ var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
549
+ var withQuery = /* @__PURE__ */ __name((command, registry) => {
550
+ const query = defineQuery(registry);
551
+ annotate(command, { query, output: { entity: registry.entity } });
552
+ const shown = askable(query);
553
+ queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ? QUERY_ARGUMENT : "field:value terms; this list filters by none yet");
554
+ if (shown.length > 0)
555
+ command.addHelpText("after", `
556
+ ${fieldsHelp({ ...query, fields: shown }, LIST_QUERY_GUIDE)}`);
557
+ return command;
558
+ }, "withQuery");
559
+ var unfilteredQuery = /* @__PURE__ */ __name((entity, schema) => ({
560
+ entity,
561
+ backend: "native",
562
+ fields: queryFieldsOf(schema, {})
563
+ }), "unfilteredQuery");
564
+ var commandPath = /* @__PURE__ */ __name((command) => {
565
+ const words = [];
566
+ for (let at = command; at?.parent; at = at.parent)
567
+ words.unshift(at.name());
568
+ return words.join(" ");
569
+ }, "commandPath");
570
+ var withTomorrow = /* @__PURE__ */ __name((query, registry, zone = timezoneOf(), now = Date.now()) => {
571
+ const times = new Set(registry.fields.filter(({ type }) => type === "time").map(({ name }) => name));
572
+ const date = /* @__PURE__ */ new Date(`${new Intl.DateTimeFormat("en-CA", { timeZone: zone }).format(now)}T00:00:00Z`);
573
+ date.setUTCDate(date.getUTCDate() + 1);
574
+ const tomorrow = date.toISOString().slice(0, 10);
575
+ const day = /* @__PURE__ */ __name((value) => value.toLowerCase() === "tomorrow" ? tomorrow : value, "day");
576
+ const map = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? times.has(node.field) ? { ...node, value: day(node.value), ...node.upper === void 0 ? {} : { upper: day(node.upper) } } : node : { ...node, clauses: node.clauses.map((clause) => ({ ...clause, node: map(clause.node) })) }, "map");
577
+ return { ...query, root: map(query.root) };
578
+ }, "withTomorrow");
579
+ var listQuery = /* @__PURE__ */ __name((text, registry, command, { defaultField = "none" } = {}) => {
580
+ const context = { command, guide: LIST_QUERY_GUIDE };
581
+ const signed = text.replace(/(^|[\s(])([\p{L}_][\p{L}\p{N}_.]*:)\+([^\s()"]+)/gu, '$1$2"+$3"');
582
+ const parsed = signed.trim() === "" ? void 0 : parseLucene(signed, { defaultField, ...context });
583
+ const typed = parsed && withTomorrow(parsed, registry);
584
+ if (typed)
585
+ validateQuery(typed, registry, context);
586
+ const named = typed ? fieldsNamed(typed) : /* @__PURE__ */ new Set();
587
+ const defaults = (registry.defaults ?? []).filter((term) => !named.has(term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "")).map((term) => parseLucene(term, { defaultField: "none", ...context }).root);
588
+ const roots = [...typed ? [typed.root] : [], ...defaults];
589
+ if (roots.length === 0)
590
+ return void 0;
591
+ if (roots.length === 1 && typed)
592
+ return typed;
593
+ return {
594
+ version: 1,
595
+ language: "lucene-v1",
596
+ root: {
597
+ kind: "boolean",
598
+ clauses: roots.map((node) => ({ occur: "must", node })),
599
+ span: { start: 0, end: text.length }
600
+ }
601
+ };
602
+ }, "listQuery");
603
+ var typedQuery = /* @__PURE__ */ __name((words) => typeof words === "string" ? words : (words ?? []).join(" "), "typedQuery");
604
+ var EVERY = Number.MAX_SAFE_INTEGER - 1;
605
+ var pageOf = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { limit: EVERY, offset: 0 } : { limit, offset: (page - 1) * limit }, "pageOf");
606
+ var pagedList = /* @__PURE__ */ __name((command, { limit, page, all }, { items, hasMore, ...rest }) => listOf(command, {
607
+ ...rest,
608
+ items,
609
+ limit: all ? Math.max(1, items.length) : limit,
610
+ has_more: all ? false : hasMore,
611
+ page
612
+ }), "pagedList");
613
+ var askable = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "askable");
614
+ var nativeTerms = /* @__PURE__ */ __name((ast, command) => new Map([...nativeTermLists(ast, command)].map(([field, [node]]) => [field, node])), "nativeTerms");
615
+ var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = [], negatable = []) => {
616
+ const terms = /* @__PURE__ */ new Map();
617
+ if (!ast)
618
+ return terms;
619
+ const context = { command, guide: LIST_QUERY_GUIDE };
620
+ const add = /* @__PURE__ */ __name((node) => {
621
+ if (node.kind === "boolean") {
622
+ for (const clause of node.clauses) {
623
+ const excluded = clause.occur === "must_not" && clause.node.kind === "predicate" && negatable.includes(clause.node.field);
624
+ if (excluded && clause.node.kind === "predicate") {
625
+ const key = `-${clause.node.field}`;
626
+ terms.set(key, [...terms.get(key) ?? [], clause.node]);
627
+ continue;
628
+ }
629
+ if (clause.occur !== "must")
630
+ queryError("query.unsupported-placement", clause.node.span, negatable.length ? `this list takes only field:value terms joined by AND, and -field:value for ${negatable.join(", ")}` : "this list takes only field:value terms joined by AND", context);
631
+ add(clause.node);
632
+ }
633
+ return;
634
+ }
635
+ const held = terms.get(node.field);
636
+ if (held && !repeatable.includes(node.field))
637
+ queryError("query.unsupported-placement", node.span, `${node.field} only once here`, context);
638
+ terms.set(node.field, [...held ?? [], node]);
639
+ }, "add");
640
+ add(ast.root);
641
+ return terms;
642
+ }, "nativeTermLists");
643
+ var queryTerms = /* @__PURE__ */ __name((words, registry, command, ranged = []) => {
644
+ const terms = /* @__PURE__ */ new Map();
645
+ for (const [field, node] of nativeTerms(listQuery(typedQuery(words), registry, command), command)) {
646
+ if (ranged.includes(field))
647
+ continue;
648
+ if (node.operator !== "term" && node.operator !== "phrase")
649
+ queryError("query.unsupported-placement", node.span, `${field} takes one whole value here`, {
650
+ command,
651
+ guide: LIST_QUERY_GUIDE
652
+ });
653
+ const enumerated = registry.fields.find(({ name }) => name === field)?.type === "enum";
654
+ terms.set(field, enumerated ? node.value.toLowerCase() : node.value);
655
+ }
656
+ return terms;
657
+ }, "queryTerms");
658
+ var timeBounds = /* @__PURE__ */ __name((term, zone = timezoneOf(), now) => {
659
+ if (!term)
660
+ return {};
661
+ const upper = term.operator === "range" ? term.upper ?? "*" : term.value;
662
+ const range = dateRange(term.value, upper, term.operator === "range" ? term.lower_inclusive !== false : true, term.operator === "range" ? term.upper_inclusive !== false : true, zone, term.span, now);
663
+ const until = range.upper === void 0 ? void 0 : range.upper - (range.upper_inclusive ? 0 : 1);
664
+ return {
665
+ ...range.lower === void 0 ? {} : { since: range.lower, from: range.lower_inclusive ? range.lower : range.lower + 1 },
666
+ ...until === void 0 ? {} : { until },
667
+ meta: {
668
+ timezone: zone,
669
+ window: {
670
+ ...range.lower === void 0 ? {} : { since: new Date(range.lower).toISOString() },
671
+ ...until === void 0 ? {} : { until: new Date(until).toISOString() }
672
+ }
673
+ }
674
+ };
675
+ }, "timeBounds");
676
+ var searchText = /* @__PURE__ */ __name((term) => term === void 0 ? void 0 : term.value.replace(/^\*+|\*+$/g, ""), "searchText");
677
+ var nativeField = /* @__PURE__ */ __name((field) => ({ ...field, native: true }), "nativeField");
678
+ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativeField({
679
+ name,
680
+ type,
681
+ operators: OPERATORS_BY_TYPE[type].filter((operator) => operator === "term" || operator === "phrase"),
682
+ example,
683
+ ...more
684
+ }), "termField");
685
+ var queryHelp = /* @__PURE__ */ __name((registry) => `
686
+ ${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
687
+
688
+ // node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/ports/messenger.js
689
+ var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
690
+ get: /* @__PURE__ */ __name((own, key) => {
691
+ if (key in own)
692
+ return own[key];
693
+ const value = inner[key];
694
+ return typeof value === "function" ? wrap(String(key), (...args) => value.apply(inner, args)) : value;
695
+ }, "get"),
696
+ has: /* @__PURE__ */ __name((own, key) => key in own || key in inner, "has")
697
+ }), "throughWrapper");
698
+ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
699
+ const found = adapter[method];
700
+ if (typeof found !== "function")
701
+ throw new CliError("validation_error", `this messenger cannot ${what}`);
702
+ return found.bind(adapter);
703
+ }, "capability");
704
+
705
+ export {
706
+ throughWrapper,
707
+ capability,
708
+ momentOf,
709
+ dateWindow,
710
+ meetingPassageRequest,
711
+ createMeetingPassageCommand,
712
+ meetingHitSearchRequest,
713
+ meetingSearchArguments,
714
+ meetingSearchMeta,
715
+ createMeetingSearchCommand,
716
+ LIST_QUERY_GUIDE,
717
+ QUERY_ARGUMENT,
718
+ withQuery,
719
+ unfilteredQuery,
720
+ commandPath,
721
+ listQuery,
722
+ typedQuery,
723
+ pageOf,
724
+ pagedList,
725
+ nativeTerms,
726
+ nativeTermLists,
727
+ queryTerms,
728
+ timeBounds,
729
+ searchText,
730
+ nativeField,
731
+ termField,
732
+ queryHelp
733
+ };