@wirecat/notion-cli 0.4.0 → 0.6.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 (229) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +5 -0
  3. package/contracts/wirecat.json +55 -2
  4. package/dist/bin/notion.js +2 -2
  5. package/dist/bundle/agent-ILG6AH7S.js +42 -0
  6. package/dist/bundle/{all-profiles-4IONYZB6.js → all-profiles-AELHUTFU.js} +64 -21
  7. package/dist/bundle/{anthropic-OXF74J4P.js → anthropic-3CCYAGO3.js} +6 -6
  8. package/dist/bundle/{app-server-M2VF6ABM.js → app-server-DJ6P4NY4.js} +86 -65
  9. package/dist/bundle/{bun-DLA6QRLL.js → bun-2FLR4IV4.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-F4BYLW3F.js → bun-sqlite-QB6CU6TH.js} +7 -7
  11. package/dist/bundle/chunk-2CMLY2X3.js +72 -0
  12. package/dist/bundle/{chunk-TZ2QJ53V.js → chunk-2XUV7HNE.js} +2 -2
  13. package/dist/bundle/{chunk-6JBLIQQN.js → chunk-2Z7UOXFC.js} +1 -1
  14. package/dist/bundle/{chunk-6GN7KU7X.js → chunk-3LMW7U7F.js} +22 -10
  15. package/dist/bundle/chunk-3MYN2RMG.js +398 -0
  16. package/dist/bundle/{chunk-YFWLHTNO.js → chunk-3UX4VJWD.js} +1 -1
  17. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  18. package/dist/bundle/{chunk-4KUJTSHG.js → chunk-4RFR4J2O.js} +2 -2
  19. package/dist/bundle/{chunk-OCDJ4FFA.js → chunk-4VXXOJ2F.js} +4 -4
  20. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  21. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  22. package/dist/bundle/{chunk-P3P6DA6K.js → chunk-5OJLUUOJ.js} +6 -6
  23. package/dist/bundle/{chunk-T5UNSFES.js → chunk-5XPHFV7H.js} +35 -12
  24. package/dist/bundle/{chunk-KL3P5TQK.js → chunk-6EJCI47L.js} +4 -4
  25. package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
  26. package/dist/bundle/{chunk-IJMFG7HB.js → chunk-6YOMPW7Y.js} +10 -8
  27. package/dist/bundle/{chunk-7NF3V5L2.js → chunk-7JVKQ6NM.js} +4 -4
  28. package/dist/bundle/chunk-7L2XOKDZ.js +353 -0
  29. package/dist/bundle/{chunk-TXONV3HW.js → chunk-A42T4YX7.js} +3 -3
  30. package/dist/bundle/chunk-AE4VW4NB.js +50 -0
  31. package/dist/bundle/chunk-AV2ZJ4WX.js +7 -0
  32. package/dist/bundle/{chunk-L6H7PY4X.js → chunk-AZLDR36U.js} +3 -3
  33. package/dist/bundle/{chunk-TFNRCCGR.js → chunk-BAXNAOOL.js} +4 -4
  34. package/dist/bundle/{chunk-QX3TPFEX.js → chunk-BEV5LO4D.js} +110 -862
  35. package/dist/bundle/{chunk-UROEWCOG.js → chunk-BQBC2WIG.js} +1 -65
  36. package/dist/bundle/{chunk-NO2LIHWA.js → chunk-CFQQTDSA.js} +1 -1
  37. package/dist/bundle/chunk-CHPWBQUK.js +39 -0
  38. package/dist/bundle/chunk-CL3YNUCC.js +388 -0
  39. package/dist/bundle/{chunk-WHJWURZB.js → chunk-DGMTSDKB.js} +6 -6
  40. package/dist/bundle/{chunk-HTKSCSJU.js → chunk-DHVVXQEL.js} +4 -4
  41. package/dist/bundle/chunk-DIU2QJJF.js +785 -0
  42. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  43. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  44. package/dist/bundle/{chunk-Z53LYX4M.js → chunk-EHW45LLT.js} +3 -3
  45. package/dist/bundle/{chunk-XCTOCVMW.js → chunk-ERN53B3Z.js} +32 -24
  46. package/dist/bundle/{chunk-CDGZZNGY.js → chunk-ESZHGC4Q.js} +38 -8
  47. package/dist/bundle/{chunk-RMJMID5D.js → chunk-EZMG5QXB.js} +8 -8
  48. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  49. package/dist/bundle/{chunk-Y5LAJWR5.js → chunk-F5ZAN7OC.js} +1 -1
  50. package/dist/bundle/{chunk-2MHMKNWD.js → chunk-FMMYBVCH.js} +1 -1
  51. package/dist/bundle/{chunk-WZEEEQGC.js → chunk-FRB2L7OE.js} +3 -3
  52. package/dist/bundle/chunk-FV4WTZCU.js +561 -0
  53. package/dist/bundle/{chunk-BEPFGITI.js → chunk-G4ZU73SD.js} +101 -80
  54. package/dist/bundle/{chunk-5XP4KQ2F.js → chunk-GCAJW4SR.js} +1 -1
  55. package/dist/bundle/{chunk-FEMHUSGO.js → chunk-GPRJXJC7.js} +15 -1
  56. package/dist/bundle/chunk-GUIQJUJV.js +340 -0
  57. package/dist/bundle/{chunk-M2EEIYBU.js → chunk-HHEWTLAT.js} +2 -2
  58. package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-HM6AMYHR.js} +2 -2
  59. package/dist/bundle/{chunk-TJCPTRYD.js → chunk-HOVHE3A3.js} +7 -7
  60. package/dist/bundle/{chunk-YAPDU3SV.js → chunk-HVXOA4FO.js} +1 -1
  61. package/dist/bundle/{chunk-D6RCRBDH.js → chunk-IJVTN5L3.js} +2 -2
  62. package/dist/bundle/{chunk-CIVXTBJY.js → chunk-IURYZSG3.js} +39 -52
  63. package/dist/bundle/chunk-JFSVAOA7.js +108 -0
  64. package/dist/bundle/{chunk-FSJHASRQ.js → chunk-JVESLS7B.js} +611 -572
  65. package/dist/bundle/chunk-K5IC4FZN.js +36 -0
  66. package/dist/bundle/chunk-KB35BVTG.js +30 -0
  67. package/dist/bundle/chunk-KGAUINBO.js +594 -0
  68. package/dist/bundle/{chunk-AYU5TFDU.js → chunk-KNCPBX5P.js} +85 -76
  69. package/dist/bundle/{chunk-GSNE7OB4.js → chunk-KZJQPJK5.js} +4 -4
  70. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  71. package/dist/bundle/{chunk-M6DGZ2O6.js → chunk-LC6WE6JS.js} +9 -9
  72. package/dist/bundle/{chunk-YGCI3DHS.js → chunk-LECMHK2F.js} +1 -1
  73. package/dist/bundle/chunk-LQVDFD65.js +72 -0
  74. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  75. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  76. package/dist/bundle/{chunk-K5I64ZVI.js → chunk-NSR43UEW.js} +7 -64
  77. package/dist/bundle/{chunk-GK4GLPG2.js → chunk-OEQNP56V.js} +2 -100
  78. package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
  79. package/dist/bundle/{chunk-MRA62W5K.js → chunk-P27NDZQR.js} +255 -563
  80. package/dist/bundle/{chunk-GBFEEHQC.js → chunk-PHKED7AG.js} +8 -225
  81. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  82. package/dist/bundle/{chunk-JODE2XED.js → chunk-Q7EIL6VU.js} +43 -33
  83. package/dist/bundle/{chunk-4TQVZXOV.js → chunk-QEJFBORC.js} +3 -3
  84. package/dist/bundle/{chunk-ZC6ZQQ55.js → chunk-QGGRFRMP.js} +65 -49
  85. package/dist/bundle/{chunk-JIRRF6BM.js → chunk-RD7BKTWV.js} +4 -4
  86. package/dist/bundle/chunk-RXU5T5NM.js +714 -0
  87. package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
  88. package/dist/bundle/{chunk-7NGFGFE5.js → chunk-SAPP2LEH.js} +10 -10
  89. package/dist/bundle/{chunk-COH7OEER.js → chunk-SEAGUFBX.js} +12 -12
  90. package/dist/bundle/{chunk-5LBJNTEJ.js → chunk-STTO2MSY.js} +43 -64
  91. package/dist/bundle/{chunk-5UA2TYMI.js → chunk-T37TAXVL.js} +2 -2
  92. package/dist/bundle/{chunk-R6SDRSZK.js → chunk-T6XIBULH.js} +139 -571
  93. package/dist/bundle/chunk-TFT4FVRU.js +67 -0
  94. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  95. package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
  96. package/dist/bundle/{chunk-SGBS5QCU.js → chunk-UOC52GCB.js} +4 -4
  97. package/dist/bundle/chunk-UPL474OW.js +94 -0
  98. package/dist/bundle/chunk-VH7526NL.js +80 -0
  99. package/dist/bundle/chunk-VNWF4I7E.js +34 -0
  100. package/dist/bundle/chunk-W2VQDIU5.js +221 -0
  101. package/dist/bundle/{chunk-EQPAZ33O.js → chunk-WAGADES3.js} +19 -19
  102. package/dist/bundle/{chunk-WU3XHGOB.js → chunk-WAU5LSHP.js} +81 -438
  103. package/dist/bundle/{chunk-FIHXADRF.js → chunk-WB2KSQIP.js} +4 -4
  104. package/dist/bundle/{chunk-OI5DWZJG.js → chunk-WGZH2M64.js} +3 -3
  105. package/dist/bundle/chunk-WVN2KTNS.js +52 -0
  106. package/dist/bundle/{chunk-UKE3CGHK.js → chunk-XYQVVW4R.js} +1 -1
  107. package/dist/bundle/{chunk-7NVPM55S.js → chunk-YDDI4QIT.js} +2203 -1808
  108. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  109. package/dist/bundle/{chunk-7YZPBAQX.js → chunk-YUDVRFXN.js} +1 -1
  110. package/dist/bundle/{chunk-EY6S7FV3.js → chunk-YXYZAWWW.js} +6 -6
  111. package/dist/bundle/{chunk-GCCPFKSU.js → chunk-YYQ5GKAI.js} +9532 -10735
  112. package/dist/bundle/chunk-ZDYEOE7L.js +2366 -0
  113. package/dist/bundle/command-contract-L2FASWD6.js +41 -0
  114. package/dist/bundle/{command-server-entry-2SORMVRM.js → command-server-entry-VUR6WL77.js} +30 -27
  115. package/dist/bundle/{decode-5O7IEFPN.js → decode-I64PF2RM.js} +6 -6
  116. package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
  117. package/dist/bundle/{dispatch-YHQX6FEJ.js → dispatch-JQBAZWCL.js} +8 -8
  118. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  119. package/dist/bundle/{echarts-ARLMVQC7.js → echarts-YRRVLEX3.js} +2 -2
  120. package/dist/bundle/{embed-FUDUKQ3K.js → embed-BLXLKMK2.js} +7 -7
  121. package/dist/bundle/{embedder-HDRV7GX3.js → embedder-JYGF6R7I.js} +10 -10
  122. package/dist/bundle/{failure-JHXICWIL.js → failure-I6AAF5R5.js} +3 -3
  123. package/dist/bundle/first-run-YLDOZGY6.js +29 -0
  124. package/dist/bundle/first-screen-GZH3LMLZ.js +41 -0
  125. package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
  126. package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
  127. package/dist/bundle/hast-util-to-mdast-3CSMIWK2.js +2272 -0
  128. package/dist/bundle/{instructions-MEFIKCDI.js → instructions-AG7SRWTR.js} +1 -1
  129. package/dist/bundle/{mcp-VMS6PBCU.js → mcp-YGOAUNC3.js} +2 -2
  130. package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js} +138 -195
  131. package/dist/bundle/{mdast-util-gfm-LN2ELINH.js → mdast-util-gfm-JO7PHUIB.js} +28 -357
  132. package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
  133. package/dist/bundle/mdast-util-to-markdown-DOXGHRI7.js +1854 -0
  134. package/dist/bundle/meeting-combined-OFQSGKBG.js +25 -0
  135. package/dist/bundle/meeting-model-K6NSX3O5.js +27 -0
  136. package/dist/bundle/{meeting-semantic-R4CSLVRG.js → meeting-semantic-3DZPHM7L.js} +7 -7
  137. package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
  138. package/dist/bundle/{node-MAQALPLA.js → node-GJQYN4FT.js} +2 -2
  139. package/dist/bundle/{node-sqlite-J7IJYNBO.js → node-sqlite-7VXIRQPH.js} +8 -8
  140. package/dist/bundle/notes-search-ACDOPTNH.js +64 -0
  141. package/dist/bundle/notion.js +14 -14
  142. package/dist/bundle/oauth-N67CH2TK.js +20 -0
  143. package/dist/bundle/{open-AB27MTGR.js → open-JGXVHIKO.js} +6 -6
  144. package/dist/bundle/{openai-D77MU5XV.js → openai-PFQJTF4H.js} +21 -18
  145. package/dist/bundle/{process-SIOWTRJ6.js → process-MEKCZMX3.js} +1 -1
  146. package/dist/bundle/{program-7K34KI27.js → program-DUJYLJH5.js} +6947 -6532
  147. package/dist/bundle/{prompt-W77YDHA6.js → prompt-FW44QDHD.js} +6 -6
  148. package/dist/bundle/{recognize-3JAXQQ36.js → recognize-62TDQ6A7.js} +5 -5
  149. package/dist/bundle/{remote-PSOJXCXO.js → remote-7ONFD7GG.js} +12 -11
  150. package/dist/bundle/{rerank-EE44ZTGL.js → rerank-YOHQQJS4.js} +8 -8
  151. package/dist/bundle/{schemas-LBYUMBC6.js → schemas-IIGJ7DOP.js} +39 -60
  152. package/dist/bundle/{serve-XJMGAMFW.js → serve-ZCXGT5RB.js} +11 -11
  153. package/dist/bundle/{server-ASU6CP5R.js → server-RQ74M637.js} +78 -56
  154. package/dist/bundle/server-XMZF57WM.js +90 -0
  155. package/dist/bundle/{services-PT4PA4J6.js → services-FWBRZ57M.js} +105 -90
  156. package/dist/bundle/{sqlite-runtime-YHXRTVXE.js → sqlite-runtime-ZZBNGV5L.js} +7 -7
  157. package/dist/bundle/{state-T6ZKFWGD.js → state-GDDFO62Y.js} +7 -7
  158. package/dist/bundle/{store-E5EE25FY.js → store-D2LRIWEI.js} +24 -20
  159. package/dist/bundle/{store-3MUCZEI3.js → store-KQCLR57N.js} +32 -18
  160. package/dist/bundle/store-maintenance-command-CK2MU5M6.js +77 -0
  161. package/dist/bundle/surface-K4TPIQW7.js +76 -0
  162. package/dist/commands/account.d.ts +3 -0
  163. package/dist/commands/account.d.ts.map +1 -0
  164. package/dist/commands/account.js +22 -0
  165. package/dist/commands/account.js.map +1 -0
  166. package/dist/commands/api.d.ts +7 -2
  167. package/dist/commands/api.d.ts.map +1 -1
  168. package/dist/commands/api.js +19 -119
  169. package/dist/commands/api.js.map +1 -1
  170. package/dist/commands/library.d.ts.map +1 -1
  171. package/dist/commands/library.js +16 -5
  172. package/dist/commands/library.js.map +1 -1
  173. package/dist/config.d.ts +11 -13
  174. package/dist/config.d.ts.map +1 -1
  175. package/dist/config.js +63 -54
  176. package/dist/config.js.map +1 -1
  177. package/dist/generated/definitions.d.ts.map +1 -1
  178. package/dist/generated/definitions.js +72 -18
  179. package/dist/generated/definitions.js.map +1 -1
  180. package/dist/generated/manifest.d.ts +4 -1
  181. package/dist/generated/manifest.d.ts.map +1 -1
  182. package/dist/generated/manifest.js +69 -0
  183. package/dist/generated/manifest.js.map +1 -1
  184. package/dist/generated/schemas.d.ts.map +1 -1
  185. package/dist/generated/schemas.js +32 -32
  186. package/dist/generated/schemas.js.map +1 -1
  187. package/dist/generated/types.d.ts +125 -25
  188. package/dist/generated/types.d.ts.map +1 -1
  189. package/dist/knowledge.d.ts +1 -0
  190. package/dist/knowledge.d.ts.map +1 -1
  191. package/dist/knowledge.js +68 -2
  192. package/dist/knowledge.js.map +1 -1
  193. package/dist/library.d.ts +12 -1
  194. package/dist/library.d.ts.map +1 -1
  195. package/dist/library.js +35 -1
  196. package/dist/library.js.map +1 -1
  197. package/dist/notion/port.d.ts.map +1 -1
  198. package/dist/notion/port.js +1 -0
  199. package/dist/notion/port.js.map +1 -1
  200. package/dist/notion/reads.d.ts +13 -1
  201. package/dist/notion/reads.d.ts.map +1 -1
  202. package/dist/notion/reads.js +1 -1
  203. package/dist/program.d.ts.map +1 -1
  204. package/dist/program.js +19 -2
  205. package/dist/program.js.map +1 -1
  206. package/dist/sync/files.d.ts +19 -0
  207. package/dist/sync/files.d.ts.map +1 -1
  208. package/dist/sync/files.js.map +1 -1
  209. package/dist/sync/source.d.ts +1 -1
  210. package/dist/sync/source.d.ts.map +1 -1
  211. package/dist/sync/source.js +60 -55
  212. package/dist/sync/source.js.map +1 -1
  213. package/dist/sync/users.d.ts +22 -0
  214. package/dist/sync/users.d.ts.map +1 -0
  215. package/dist/sync/users.js +111 -0
  216. package/dist/sync/users.js.map +1 -0
  217. package/dist/version.d.ts +1 -1
  218. package/dist/version.js +1 -1
  219. package/package.json +4 -4
  220. package/dist/bundle/chunk-L62XTC7N.js +0 -726
  221. package/dist/bundle/chunk-SHTHNBHG.js +0 -2
  222. package/dist/bundle/command-contract-UBXS6NHI.js +0 -38
  223. package/dist/bundle/first-run-BGEFTXOE.js +0 -29
  224. package/dist/bundle/first-screen-F5F3VS6Y.js +0 -38
  225. package/dist/bundle/meeting-combined-HNSS3FQY.js +0 -24
  226. package/dist/bundle/meeting-model-REZVYGQW.js +0 -26
  227. package/dist/bundle/oauth-AMV4YGJD.js +0 -20
  228. package/dist/bundle/server-WSPQ5EOA.js +0 -72
  229. package/dist/bundle/store-maintenance-command-ZZ55BBBG.js +0 -63
@@ -0,0 +1,67 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-HM6AMYHR.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // 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/messenger/lacks.js
11
+ var COMMAND_NEEDS = {
12
+ "account update": ["updateProfile", "change the profile"],
13
+ "account sessions list": ["sessions", "list the account's sessions"],
14
+ "account sessions end": ["endOtherSessions", "end other sessions"],
15
+ "chats events": ["chatEvents", "read who joined or left"],
16
+ "chats inspect": ["inspect", "read a link"],
17
+ "chats folders list": ["folders", "list its folders"],
18
+ "chats folders show": ["folders", "list its folders"],
19
+ "chats folders create": ["createFolder", "create a folder"],
20
+ "chats folders update": ["updateFolder", "change a folder"],
21
+ "chats folders delete": ["deleteFolder", "delete a folder"],
22
+ "contacts add": ["addContact", "add a contact"],
23
+ "contacts remove": ["removeContact", "remove a contact"],
24
+ "contacts rename": ["renameContact", "rename a contact"],
25
+ "contacts import": ["importContacts", "import contacts"],
26
+ "messages comments": ["comments", "read comments on a channel post"],
27
+ "messages pin": ["pin", "pin a message"],
28
+ "messages unpin": ["unpin", "unpin a message"],
29
+ "messages scheduled cancel": ["cancelScheduled", "cancel a scheduled message"],
30
+ "messages scheduled edit": ["editScheduled", "edit a scheduled message"],
31
+ "messages scheduled send": ["sendScheduled", "send a scheduled message now"]
32
+ };
33
+ var STORE_ANSWERS = /* @__PURE__ */ new Set(["chats events"]);
34
+ var lackedNeed = /* @__PURE__ */ __name((messenger, path) => {
35
+ const need = COMMAND_NEEDS[path];
36
+ if (!need)
37
+ return void 0;
38
+ if (path === "messages comments" && (messenger?.readsComments ?? messenger?.channelComments) === false)
39
+ return need;
40
+ if (!messenger?.lacks?.includes(need[0]) && !messenger?.never?.includes(need[0]))
41
+ return void 0;
42
+ return messenger.history === "store" && STORE_ANSWERS.has(path) ? void 0 : need;
43
+ }, "lackedNeed");
44
+ var refuseLacking = /* @__PURE__ */ __name((messenger, path) => {
45
+ const need = lackedNeed(messenger, path.join(" "));
46
+ if (need)
47
+ throw new CliError("validation_error", `this messenger cannot ${need[1]}`);
48
+ }, "refuseLacking");
49
+ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
50
+ const walk = /* @__PURE__ */ __name((command, path) => {
51
+ for (const child of command.commands) {
52
+ const at = [...path, child.name()];
53
+ const need = COMMAND_NEEDS[at.join(" ")];
54
+ if (need && messenger.never?.includes(need[0]))
55
+ child._hidden = true;
56
+ walk(child, at);
57
+ }
58
+ }, "walk");
59
+ walk(group, [group.name()]);
60
+ return group;
61
+ }, "hideNever");
62
+
63
+ export {
64
+ lackedNeed,
65
+ refuseLacking,
66
+ hideNever
67
+ };
@@ -0,0 +1,291 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ __name
5
+ } from "./chunk-ZVVMGPBJ.js";
6
+
7
+ // node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.js
8
+ var convert = (
9
+ // Note: overloads in JSDoc can’t yet use different `@template`s.
10
+ /**
11
+ * @type {(
12
+ * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
13
+ * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
14
+ * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
15
+ * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
16
+ * ((test?: Test) => Check)
17
+ * )}
18
+ */
19
+ /**
20
+ * @param {Test} [test]
21
+ * @returns {Check}
22
+ */
23
+ /* @__PURE__ */ __name((function(test) {
24
+ if (test === null || test === void 0) {
25
+ return ok;
26
+ }
27
+ if (typeof test === "function") {
28
+ return castFactory(test);
29
+ }
30
+ if (typeof test === "object") {
31
+ return Array.isArray(test) ? anyFactory(test) : (
32
+ // Cast because `ReadonlyArray` goes into the above but `isArray`
33
+ // narrows to `Array`.
34
+ propertiesFactory(
35
+ /** @type {Props} */
36
+ test
37
+ )
38
+ );
39
+ }
40
+ if (typeof test === "string") {
41
+ return typeFactory(test);
42
+ }
43
+ throw new Error("Expected function, string, or object as test");
44
+ }), "convert")
45
+ );
46
+ function anyFactory(tests) {
47
+ const checks = [];
48
+ let index = -1;
49
+ while (++index < tests.length) {
50
+ checks[index] = convert(tests[index]);
51
+ }
52
+ return castFactory(any);
53
+ function any(...parameters) {
54
+ let index2 = -1;
55
+ while (++index2 < checks.length) {
56
+ if (checks[index2].apply(this, parameters)) return true;
57
+ }
58
+ return false;
59
+ }
60
+ __name(any, "any");
61
+ }
62
+ __name(anyFactory, "anyFactory");
63
+ function propertiesFactory(check) {
64
+ const checkAsRecord = (
65
+ /** @type {Record<string, unknown>} */
66
+ check
67
+ );
68
+ return castFactory(all);
69
+ function all(node) {
70
+ const nodeAsRecord = (
71
+ /** @type {Record<string, unknown>} */
72
+ /** @type {unknown} */
73
+ node
74
+ );
75
+ let key;
76
+ for (key in check) {
77
+ if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
78
+ }
79
+ return true;
80
+ }
81
+ __name(all, "all");
82
+ }
83
+ __name(propertiesFactory, "propertiesFactory");
84
+ function typeFactory(check) {
85
+ return castFactory(type);
86
+ function type(node) {
87
+ return node && node.type === check;
88
+ }
89
+ __name(type, "type");
90
+ }
91
+ __name(typeFactory, "typeFactory");
92
+ function castFactory(testFunction) {
93
+ return check;
94
+ function check(value, index, parent) {
95
+ return Boolean(
96
+ looksLikeANode(value) && testFunction.call(
97
+ this,
98
+ value,
99
+ typeof index === "number" ? index : void 0,
100
+ parent || void 0
101
+ )
102
+ );
103
+ }
104
+ __name(check, "check");
105
+ }
106
+ __name(castFactory, "castFactory");
107
+ function ok() {
108
+ return true;
109
+ }
110
+ __name(ok, "ok");
111
+ function looksLikeANode(value) {
112
+ return value !== null && typeof value === "object" && "type" in value;
113
+ }
114
+ __name(looksLikeANode, "looksLikeANode");
115
+
116
+ // node_modules/.pnpm/unist-util-visit-parents@6.1.0/node_modules/unist-util-visit-parents/lib/color.node.js
117
+ function color(d) {
118
+ return "\x1B[33m" + d + "\x1B[39m";
119
+ }
120
+ __name(color, "color");
121
+
122
+ // node_modules/.pnpm/unist-util-visit-parents@6.1.0/node_modules/unist-util-visit-parents/lib/index.js
123
+ var empty = [];
124
+ var CONTINUE = true;
125
+ var EXIT = false;
126
+ var SKIP = "skip";
127
+ function visitParents(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, reverse) {
128
+ if (!tree || typeof tree !== "object") {
129
+ throw new Error("Unexpected value `" + tree + "` for `tree`, expected node");
130
+ }
131
+ let preorder = true;
132
+ let check;
133
+ let visitors;
134
+ let enter;
135
+ let exit;
136
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
137
+ check = /** @type {Test} */
138
+ testOrEnterOrVisitors;
139
+ visitors = enterOrVisitorsOrReverse;
140
+ if (reverse) preorder = false;
141
+ } else {
142
+ visitors = /** @type {Visitors | Visitor} */
143
+ testOrEnterOrVisitors;
144
+ if (enterOrVisitorsOrReverse) preorder = false;
145
+ }
146
+ if (typeof visitors === "function") {
147
+ enter = visitors;
148
+ } else if (visitors && typeof visitors === "object") {
149
+ if (visitors.enter === null || visitors.enter === void 0) {
150
+ } else if (typeof visitors.enter === "function") {
151
+ enter = visitors.enter;
152
+ } else {
153
+ throw new Error(
154
+ "Unexpected value `" + visitors.enter + "` for `visitors.enter`, expected optional visitor"
155
+ );
156
+ }
157
+ if (typeof visitors.exit === "function") {
158
+ exit = visitors.exit;
159
+ } else {
160
+ throw new Error(
161
+ "Unexpected value `" + visitors.exit + "` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)"
162
+ );
163
+ }
164
+ } else {
165
+ throw new Error(
166
+ "Unexpected value `" + visitors + "` for `enter` or `visitors`, expected visitor or object with visitors"
167
+ );
168
+ }
169
+ const is2 = convert(check);
170
+ const step = preorder ? 1 : -1;
171
+ factory(tree, void 0, [])();
172
+ function factory(node, index, parents) {
173
+ const value = (
174
+ /** @type {Record<string, unknown>} */
175
+ node && typeof node === "object" ? node : {}
176
+ );
177
+ if (typeof value.type === "string") {
178
+ const name = (
179
+ // `hast`
180
+ typeof value.tagName === "string" ? value.tagName : (
181
+ // `xast`
182
+ typeof value.name === "string" ? value.name : void 0
183
+ )
184
+ );
185
+ Object.defineProperty(visit2, "name", {
186
+ value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
187
+ });
188
+ }
189
+ return visit2;
190
+ function visit2() {
191
+ const matches = !check || is2(node, index, parents[parents.length - 1] || void 0);
192
+ let result = empty;
193
+ if (enter && matches) {
194
+ result = toResult(enter(node, parents, index));
195
+ if (result[0] === EXIT) {
196
+ return result;
197
+ }
198
+ }
199
+ if ("children" in node && node.children) {
200
+ const nodeAsParent = (
201
+ /** @type {UnistParent} */
202
+ node
203
+ );
204
+ if (nodeAsParent.children && result[0] !== SKIP) {
205
+ let offset = (preorder ? -1 : nodeAsParent.children.length) + step;
206
+ const grandparents = [...parents, nodeAsParent];
207
+ while (offset > -1 && offset < nodeAsParent.children.length) {
208
+ const child = nodeAsParent.children[offset];
209
+ const subresult = factory(child, offset, grandparents)();
210
+ if (subresult[0] === EXIT) {
211
+ return subresult;
212
+ }
213
+ offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
214
+ }
215
+ }
216
+ }
217
+ if (exit && matches) {
218
+ const exitResult = toResult(exit(node, parents, index));
219
+ if (exitResult[0] === SKIP) {
220
+ throw new Error(
221
+ "Unexpected value `" + exitResult[0] + "` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing"
222
+ );
223
+ }
224
+ if (exitResult[0] === EXIT || typeof exitResult[1] === "number") {
225
+ return exitResult;
226
+ }
227
+ }
228
+ return result;
229
+ }
230
+ __name(visit2, "visit");
231
+ }
232
+ __name(factory, "factory");
233
+ }
234
+ __name(visitParents, "visitParents");
235
+ function toResult(value) {
236
+ if (Array.isArray(value)) {
237
+ return value;
238
+ }
239
+ if (typeof value === "number") {
240
+ return [CONTINUE, value];
241
+ }
242
+ return value === null || value === void 0 ? empty : [value];
243
+ }
244
+ __name(toResult, "toResult");
245
+
246
+ // node_modules/.pnpm/unist-util-visit@5.2.0/node_modules/unist-util-visit/lib/index.js
247
+ function visit(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, maybeReverse) {
248
+ let check;
249
+ let visitors;
250
+ let reverse;
251
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
252
+ check = /** @type {Test} */
253
+ testOrEnterOrVisitors;
254
+ visitors = enterOrVisitorsOrReverse;
255
+ reverse = maybeReverse;
256
+ } else {
257
+ visitors = /** @type {Visitor | Visitors} */
258
+ testOrEnterOrVisitors;
259
+ reverse = enterOrVisitorsOrReverse;
260
+ }
261
+ if (typeof visitors === "function") {
262
+ visitParents(tree, check, wrap(visitors), reverse);
263
+ } else {
264
+ visitParents(tree, check, wrapVisitors(visitors), reverse);
265
+ }
266
+ }
267
+ __name(visit, "visit");
268
+ function wrapVisitors(visitors) {
269
+ if (!visitors || typeof visitors !== "object") return visitors;
270
+ return {
271
+ enter: typeof visitors.enter === "function" ? wrap(visitors.enter) : visitors.enter,
272
+ exit: typeof visitors.exit === "function" ? wrap(visitors.exit) : visitors.exit
273
+ };
274
+ }
275
+ __name(wrapVisitors, "wrapVisitors");
276
+ function wrap(visitor) {
277
+ return overload;
278
+ function overload(node, parents, index) {
279
+ return visitor(node, index, parents[parents.length - 1]);
280
+ }
281
+ __name(overload, "overload");
282
+ }
283
+ __name(wrap, "wrap");
284
+
285
+ export {
286
+ convert,
287
+ EXIT,
288
+ SKIP,
289
+ visitParents,
290
+ visit
291
+ };
@@ -4,12 +4,6 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
8
- function normalizeIdentifier(value) {
9
- return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
10
- }
11
- __name(normalizeIdentifier, "normalizeIdentifier");
12
-
13
7
  // node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.js
14
8
  var asciiAlpha = regexCheck(/[A-Za-z]/);
15
9
  var asciiAlphanumeric = regexCheck(/[\dA-Za-z]/);
@@ -48,86 +42,7 @@ function regexCheck(regex) {
48
42
  }
49
43
  __name(regexCheck, "regexCheck");
50
44
 
51
- // node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
52
- function classifyCharacter(code) {
53
- if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {
54
- return 1;
55
- }
56
- if (unicodePunctuation(code)) {
57
- return 2;
58
- }
59
- }
60
- __name(classifyCharacter, "classifyCharacter");
61
-
62
- // node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
63
- var htmlBlockNames = [
64
- "address",
65
- "article",
66
- "aside",
67
- "base",
68
- "basefont",
69
- "blockquote",
70
- "body",
71
- "caption",
72
- "center",
73
- "col",
74
- "colgroup",
75
- "dd",
76
- "details",
77
- "dialog",
78
- "dir",
79
- "div",
80
- "dl",
81
- "dt",
82
- "fieldset",
83
- "figcaption",
84
- "figure",
85
- "footer",
86
- "form",
87
- "frame",
88
- "frameset",
89
- "h1",
90
- "h2",
91
- "h3",
92
- "h4",
93
- "h5",
94
- "h6",
95
- "head",
96
- "header",
97
- "hr",
98
- "html",
99
- "iframe",
100
- "legend",
101
- "li",
102
- "link",
103
- "main",
104
- "menu",
105
- "menuitem",
106
- "nav",
107
- "noframes",
108
- "ol",
109
- "optgroup",
110
- "option",
111
- "p",
112
- "param",
113
- "search",
114
- "section",
115
- "summary",
116
- "table",
117
- "tbody",
118
- "td",
119
- "tfoot",
120
- "th",
121
- "thead",
122
- "title",
123
- "tr",
124
- "track",
125
- "ul"
126
- ];
127
- var htmlRawNames = ["pre", "script", "style", "textarea"];
128
-
129
45
  export {
130
- normalizeIdentifier,
131
46
  asciiAlpha,
132
47
  asciiAlphanumeric,
133
48
  asciiAtext,
@@ -139,8 +54,5 @@ export {
139
54
  markdownLineEndingOrSpace,
140
55
  markdownSpace,
141
56
  unicodePunctuation,
142
- unicodeWhitespace,
143
- classifyCharacter,
144
- htmlBlockNames,
145
- htmlRawNames
57
+ unicodeWhitespace
146
58
  };
@@ -5,15 +5,15 @@ import {
5
5
  readLock,
6
6
  releaseLock,
7
7
  takeLock
8
- } from "./chunk-OI5DWZJG.js";
8
+ } from "./chunk-WGZH2M64.js";
9
9
  import {
10
10
  __name
11
11
  } from "./chunk-ZVVMGPBJ.js";
12
12
 
13
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
13
+ // 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/mcp/http/state.js
14
14
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
16
+ // 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/mcp/http/activity.js
17
17
  import { randomBytes } from "node:crypto";
18
18
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
86
86
  };
87
87
  }, "activityRecorder");
88
88
 
89
- // node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
89
+ // 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/mcp/http/state.js
90
90
  var ACCESS_SECONDS = 60 * 60;
91
91
  var REFRESH_SECONDS = 30 * 24 * 60 * 60;
92
92
  var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
@@ -0,0 +1,94 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ markdownLineEndingOrSpace,
5
+ unicodePunctuation,
6
+ unicodeWhitespace
7
+ } from "./chunk-UC7JLE6J.js";
8
+ import {
9
+ __name
10
+ } from "./chunk-ZVVMGPBJ.js";
11
+
12
+ // node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.js
13
+ function classifyCharacter(code) {
14
+ if (code === null || markdownLineEndingOrSpace(code) || unicodeWhitespace(code)) {
15
+ return 1;
16
+ }
17
+ if (unicodePunctuation(code)) {
18
+ return 2;
19
+ }
20
+ }
21
+ __name(classifyCharacter, "classifyCharacter");
22
+
23
+ // node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
24
+ var htmlBlockNames = [
25
+ "address",
26
+ "article",
27
+ "aside",
28
+ "base",
29
+ "basefont",
30
+ "blockquote",
31
+ "body",
32
+ "caption",
33
+ "center",
34
+ "col",
35
+ "colgroup",
36
+ "dd",
37
+ "details",
38
+ "dialog",
39
+ "dir",
40
+ "div",
41
+ "dl",
42
+ "dt",
43
+ "fieldset",
44
+ "figcaption",
45
+ "figure",
46
+ "footer",
47
+ "form",
48
+ "frame",
49
+ "frameset",
50
+ "h1",
51
+ "h2",
52
+ "h3",
53
+ "h4",
54
+ "h5",
55
+ "h6",
56
+ "head",
57
+ "header",
58
+ "hr",
59
+ "html",
60
+ "iframe",
61
+ "legend",
62
+ "li",
63
+ "link",
64
+ "main",
65
+ "menu",
66
+ "menuitem",
67
+ "nav",
68
+ "noframes",
69
+ "ol",
70
+ "optgroup",
71
+ "option",
72
+ "p",
73
+ "param",
74
+ "search",
75
+ "section",
76
+ "summary",
77
+ "table",
78
+ "tbody",
79
+ "td",
80
+ "tfoot",
81
+ "th",
82
+ "thead",
83
+ "title",
84
+ "tr",
85
+ "track",
86
+ "ul"
87
+ ];
88
+ var htmlRawNames = ["pre", "script", "style", "textarea"];
89
+
90
+ export {
91
+ classifyCharacter,
92
+ htmlBlockNames,
93
+ htmlRawNames
94
+ };
@@ -0,0 +1,80 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ timezoneOf,
5
+ zonedMoment
6
+ } from "./chunk-JVESLS7B.js";
7
+ import {
8
+ CliError
9
+ } from "./chunk-HM6AMYHR.js";
10
+ import {
11
+ __name
12
+ } from "./chunk-ZVVMGPBJ.js";
13
+
14
+ // 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/domain/moment.js
15
+ var calendarMoment = /* @__PURE__ */ __name((wanted, flag, { zone, end = false } = {}) => {
16
+ try {
17
+ return zonedMoment(wanted, timezoneOf(zone), { start: 0, end: wanted.length }, { end });
18
+ } catch (error) {
19
+ if (!(error instanceof CliError))
20
+ throw error;
21
+ const alternative = error.details?.alternative;
22
+ throw new CliError("validation_error", `${flag}: "${wanted}" is not a time${alternative ? ` \u2014 ${alternative}` : ""}`);
23
+ }
24
+ }, "calendarMoment");
25
+ var dayIn = /* @__PURE__ */ __name((at, zone) => new Intl.DateTimeFormat("en-CA", { timeZone: zone, year: "numeric", month: "2-digit", day: "2-digit" }).format(at), "dayIn");
26
+ var MINUTE = 6e4;
27
+ var YEAR = 365 * 24 * 60 * MINUTE;
28
+ var RELATIVE = /^(\d+)(m|h|d)$/;
29
+ var RELATIVE_MS = { m: MINUTE, h: 60 * MINUTE, d: 24 * 60 * MINUTE };
30
+ var DATE_ALONE = /^\d{4}-\d{2}-\d{2}$/;
31
+ var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
32
+ var dayWord = /* @__PURE__ */ __name((word, zone, now) => {
33
+ const today = new Intl.DateTimeFormat("en-CA", { timeZone: zone }).format(now);
34
+ if (word === "today")
35
+ return today;
36
+ const date = /* @__PURE__ */ new Date(`${today}T00:00:00Z`);
37
+ date.setUTCDate(date.getUTCDate() - 1);
38
+ return date.toISOString().slice(0, 10);
39
+ }, "dayWord");
40
+ var readMoment = /* @__PURE__ */ __name((typed, flag, { zone, end = false, now = Date.now(), direction = -1 } = {}) => {
41
+ const wanted = typed.trim();
42
+ const [, amount, unit] = RELATIVE.exec(wanted) ?? [];
43
+ if (amount && unit)
44
+ return { time: now + direction * Number(amount) * (RELATIVE_MS[unit] ?? 0), local: false, dateAlone: false };
45
+ const word = wanted.toLowerCase();
46
+ const date = word === "today" || word === "yesterday" ? dayWord(word, timezoneOf(zone), now) : wanted;
47
+ if (!/^\d{4}-\d{2}-\d{2}/.test(date))
48
+ return void 0;
49
+ const iso = date.replace(/^(\d{4}-\d{2}-\d{2}) +(?=\d)/, "$1T");
50
+ return {
51
+ time: calendarMoment(iso, flag, { ...zone === void 0 ? {} : { zone }, end }),
52
+ local: !ZONED.test(iso),
53
+ dateAlone: DATE_ALONE.test(iso)
54
+ };
55
+ }, "readMoment");
56
+ var lead = /* @__PURE__ */ __name((ms) => ms === MINUTE ? "a minute" : ms === YEAR ? "a year" : `${Math.ceil(ms / MINUTE)} minutes`, "lead");
57
+ var aheadOf = /* @__PURE__ */ __name((reference, flag, now = Date.now(), options = {}) => {
58
+ const { refuseDate = false, soonest, latest, ...at } = options;
59
+ const read = readMoment(reference, flag, { ...at, now, direction: 1 });
60
+ if (read === void 0)
61
+ throw new CliError("validation_error", `${flag} takes an ISO 8601 time, today, or 30m, 2h, 3d from now \u2014 not "${reference.trim()}"`);
62
+ if (refuseDate && read.dateAlone)
63
+ throw new CliError("validation_error", DATE_ALONE.test(reference.trim()) ? `${flag} needs a time of day as well: ${reference.trim()}T09:00` : `${flag} needs a time of day as well, like 2026-11-20T09:00`);
64
+ if (soonest === 0 && read.time <= now)
65
+ throw new CliError("validation_error", `${flag} is in the past`);
66
+ if (soonest !== void 0 && soonest > 0 && read.time < now + soonest)
67
+ throw new CliError("validation_error", `${flag} has to be at least ${lead(soonest)} from now`);
68
+ if (latest !== void 0 && read.time > now + latest)
69
+ throw new CliError("validation_error", `${flag} can be at most ${lead(latest)} from now`);
70
+ return read.time;
71
+ }, "aheadOf");
72
+
73
+ export {
74
+ calendarMoment,
75
+ dayIn,
76
+ MINUTE,
77
+ YEAR,
78
+ readMoment,
79
+ aheadOf
80
+ };