@wirecat/zoom-cli 0.67.0 → 0.69.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 (180) hide show
  1. package/dist/answer-entities.d.ts +18 -0
  2. package/dist/answer-entities.d.ts.map +1 -1
  3. package/dist/answer-entities.js +12 -0
  4. package/dist/answer-entities.js.map +1 -1
  5. package/dist/answer-policy.d.ts.map +1 -1
  6. package/dist/answer-policy.js +2 -1
  7. package/dist/answer-policy.js.map +1 -1
  8. package/dist/bin/zm.js +2 -2
  9. package/dist/bundle/{all-profiles-SEW2VL76.js → all-profiles-ZQWPCJEK.js} +12 -12
  10. package/dist/bundle/answer-policy-VBDYLUXI.js +104 -0
  11. package/dist/bundle/{anthropic-FSNASJML.js → anthropic-7FUQ2HYJ.js} +7 -7
  12. package/dist/bundle/{app-server-EVSRYJ3H.js → app-server-DNPE2EQB.js} +61 -58
  13. package/dist/bundle/{bun-DACL5SVO.js → bun-ZVQFCFCC.js} +2 -2
  14. package/dist/bundle/{bun-sqlite-HQ2KOXSI.js → bun-sqlite-EB2UMUPJ.js} +6 -6
  15. package/dist/bundle/{chunk-4ZR5DJ26.js → chunk-2SYWVIQJ.js} +3 -3
  16. package/dist/bundle/chunk-37B7A4RP.js +66 -0
  17. package/dist/bundle/{chunk-WHQ4ZCJI.js → chunk-3TPRYZUW.js} +214 -86
  18. package/dist/bundle/{chunk-L6CAUVMU.js → chunk-4APZQYCH.js} +5 -5
  19. package/dist/bundle/{chunk-ASCHAVNW.js → chunk-52DCABMU.js} +27 -27
  20. package/dist/bundle/{chunk-LM26DJOK.js → chunk-5GOE6PQK.js} +6 -6
  21. package/dist/bundle/{chunk-QX2MAT6I.js → chunk-5H6VTEEC.js} +3 -3
  22. package/dist/bundle/{chunk-V33VGWT3.js → chunk-5ZF6QVMC.js} +16 -6
  23. package/dist/bundle/{chunk-GP4NSYDU.js → chunk-5ZJXKASF.js} +254 -13
  24. package/dist/bundle/chunk-6AMMTXEA.js +12473 -0
  25. package/dist/bundle/{chunk-Q65SDEFN.js → chunk-6KMTQX3D.js} +2 -2
  26. package/dist/bundle/{chunk-TBRG2DPE.js → chunk-6N2D6JGX.js} +2 -2
  27. package/dist/bundle/{chunk-X67YD3QI.js → chunk-6TICX3MN.js} +2 -2
  28. package/dist/bundle/{chunk-4GCKDO2H.js → chunk-7AUP2WT3.js} +3 -3
  29. package/dist/bundle/{chunk-JVCHGI7W.js → chunk-B5D7NZI7.js} +1 -1
  30. package/dist/bundle/{chunk-AAZFLJSH.js → chunk-B6JMVB6R.js} +10 -10
  31. package/dist/bundle/{chunk-CRLBTNC4.js → chunk-BL36NSV5.js} +3 -3
  32. package/dist/bundle/{chunk-4UVT2QCO.js → chunk-BOAMDYLY.js} +4 -4
  33. package/dist/bundle/{chunk-VQTAU4DV.js → chunk-C6TEYKXV.js} +8 -8
  34. package/dist/bundle/{chunk-6AJDVJVZ.js → chunk-CKK6JOC4.js} +2 -2
  35. package/dist/bundle/{chunk-4U2555EQ.js → chunk-CUZHKYC2.js} +30 -28
  36. package/dist/bundle/{chunk-7LLUUXJB.js → chunk-DHD25JII.js} +1 -1
  37. package/dist/bundle/{chunk-RYKG6AEH.js → chunk-EPPSMCEV.js} +4 -2
  38. package/dist/bundle/chunk-F5DYBWH7.js +299 -0
  39. package/dist/bundle/{chunk-KIJLM5UL.js → chunk-FBLUKCIR.js} +1 -1
  40. package/dist/bundle/{chunk-WZ5XK74U.js → chunk-FEM2JQN2.js} +1 -1
  41. package/dist/bundle/{chunk-SSXCOUP3.js → chunk-G6IX2MD2.js} +500 -227
  42. package/dist/bundle/{chunk-OTMGAKUM.js → chunk-GR3QDHBU.js} +7 -7
  43. package/dist/bundle/{chunk-QEI55M2F.js → chunk-GXDOTUUO.js} +10 -10
  44. package/dist/bundle/chunk-H3MFBYTQ.js +261 -0
  45. package/dist/bundle/{chunk-DFUPETW7.js → chunk-HC56J5LB.js} +135 -76
  46. package/dist/bundle/{chunk-D6OXI2NV.js → chunk-HSI7YOYK.js} +229 -67
  47. package/dist/bundle/{chunk-FGTPREAZ.js → chunk-HW5QTRFF.js} +35 -35
  48. package/dist/bundle/{chunk-VNIBTNV4.js → chunk-IEC4E65G.js} +2 -2
  49. package/dist/bundle/{chunk-EUPZSR2G.js → chunk-IPBZKUC3.js} +4 -4
  50. package/dist/bundle/{chunk-EQ7XRRKV.js → chunk-JHFP3Z5S.js} +11 -11
  51. package/dist/bundle/{chunk-3GO3KME7.js → chunk-JX5JJZC3.js} +3 -3
  52. package/dist/bundle/{chunk-7HAIM7GV.js → chunk-JZ4YOAHA.js} +963 -622
  53. package/dist/bundle/{chunk-B3KWAULD.js → chunk-KAPJQGHE.js} +2 -2
  54. package/dist/bundle/{chunk-T6CZWSHF.js → chunk-KNE6VFHZ.js} +21 -21
  55. package/dist/bundle/{chunk-I7SOXH64.js → chunk-KX5MZVPX.js} +66 -39
  56. package/dist/bundle/chunk-L62EJDNZ.js +64 -0
  57. package/dist/bundle/{chunk-EPDRF66S.js → chunk-LDRQ5NAP.js} +22 -14
  58. package/dist/bundle/{chunk-7VU5UGRR.js → chunk-LEA4BGK7.js} +16 -16
  59. package/dist/bundle/{chunk-ZMPTO2WB.js → chunk-LQX74VKG.js} +1 -1
  60. package/dist/bundle/{chunk-LKJXTACE.js → chunk-MJMVIFSC.js} +7 -7
  61. package/dist/bundle/{chunk-KWRSC6O6.js → chunk-MNOVYS43.js} +18 -4
  62. package/dist/bundle/{chunk-M43MBWJX.js → chunk-MOTKS7XG.js} +20741 -14882
  63. package/dist/bundle/{chunk-MWEOVTIF.js → chunk-MSDCZ6GT.js} +4 -4
  64. package/dist/bundle/{chunk-SOZVC3SV.js → chunk-MVDPZRFE.js} +1 -1
  65. package/dist/bundle/{chunk-NTZDM5SJ.js → chunk-NRRI37NJ.js} +9 -9
  66. package/dist/bundle/{chunk-BKY4XVB4.js → chunk-O7L44JK2.js} +2632 -1870
  67. package/dist/bundle/{chunk-6IBM4Z3V.js → chunk-OE7EIP5L.js} +1 -1
  68. package/dist/bundle/{chunk-RAMPYIO2.js → chunk-OSBHEM2A.js} +11 -11
  69. package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
  70. package/dist/bundle/{chunk-DG4DWAU7.js → chunk-QLGG7S6F.js} +3 -3
  71. package/dist/bundle/{chunk-6UFWFKFH.js → chunk-QW5VPZEH.js} +2 -2
  72. package/dist/bundle/{chunk-C6UKW7JO.js → chunk-QXM7S3Y3.js} +6 -6
  73. package/dist/bundle/{chunk-ESFMHBHH.js → chunk-R2ULMWB4.js} +62 -53
  74. package/dist/bundle/{chunk-L6WUAGPN.js → chunk-R3JYPY3J.js} +3 -3
  75. package/dist/bundle/{chunk-2UW533HQ.js → chunk-RGJ7OWHU.js} +4 -4
  76. package/dist/bundle/{chunk-7K5TDTZY.js → chunk-RPQ3JOD3.js} +7 -7
  77. package/dist/bundle/{chunk-L643D4RJ.js → chunk-S2EAGDS7.js} +12 -12
  78. package/dist/bundle/{chunk-4KDZ22RA.js → chunk-SQT47CFW.js} +1 -1
  79. package/dist/bundle/{chunk-CLEZE65P.js → chunk-SZ3Z4ZNO.js} +1 -1
  80. package/dist/bundle/chunk-T5X4LGXE.js +380 -0
  81. package/dist/bundle/{chunk-SMVO5R3T.js → chunk-TFFEFEG2.js} +39 -26
  82. package/dist/bundle/{chunk-LFQ73UFK.js → chunk-TKXLWFM2.js} +3 -3
  83. package/dist/bundle/{chunk-SCFFCIIP.js → chunk-TN77LX6W.js} +2 -2
  84. package/dist/bundle/{chunk-VFIEYRYD.js → chunk-TWIC6JJG.js} +8 -8
  85. package/dist/bundle/{chunk-FXQPK742.js → chunk-UEZ6URJR.js} +29 -15
  86. package/dist/bundle/{chunk-OZEYFJX2.js → chunk-V4MM6GST.js} +1 -1
  87. package/dist/bundle/chunk-V74QFMSL.js +31 -0
  88. package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
  89. package/dist/bundle/{chunk-6TZF2JP7.js → chunk-WY4NYPPS.js} +13 -13
  90. package/dist/bundle/{chunk-B5Z4XPVS.js → chunk-XITUFTON.js} +2 -2
  91. package/dist/bundle/{chunk-FWU3ZYHE.js → chunk-XJBYGMZ4.js} +776 -134
  92. package/dist/bundle/{chunk-KANH7GBB.js → chunk-XRZDYWF6.js} +2 -2
  93. package/dist/bundle/{chunk-ZRMZBMOF.js → chunk-Z6TTGTMU.js} +156 -9
  94. package/dist/bundle/{chunk-IFDO3YPJ.js → chunk-ZRHMB3LQ.js} +1 -1
  95. package/dist/bundle/{cli-YUATSOLA.js → cli-P3BZUE6S.js} +106 -64
  96. package/dist/bundle/command-contract-TOLB32NJ.js +41 -0
  97. package/dist/bundle/config-4KLLIADY.js +90 -0
  98. package/dist/bundle/{decode-IL44LNC3.js → decode-QWOQXM7M.js} +6 -6
  99. package/dist/bundle/{dispatch-3BGIXSJR.js → dispatch-5MGDLOK4.js} +9 -9
  100. package/dist/bundle/{dist-3W27UQ2S.js → dist-OUE4MF37.js} +108 -28
  101. package/dist/bundle/{echarts-CO4D26JF.js → echarts-65IMPY43.js} +2 -2
  102. package/dist/bundle/{embed-XH2X4DFM.js → embed-4IULBCKL.js} +7 -7
  103. package/dist/bundle/{embedder-WTFWDXBJ.js → embedder-JW4W6IZI.js} +10 -10
  104. package/dist/bundle/{failure-HTIS3NLS.js → failure-CR64C4XA.js} +3 -3
  105. package/dist/bundle/{first-run-5RBH7FDO.js → first-run-CH6C674R.js} +12 -12
  106. package/dist/bundle/first-screen-OCAW5ZN6.js +39 -0
  107. package/dist/bundle/{folders-F4DNQPIY.js → folders-VU4IN35Y.js} +5 -5
  108. package/dist/bundle/{instructions-EPPBL6TT.js → instructions-G5QIH2TM.js} +1 -1
  109. package/dist/bundle/{main-LVQTCDZS.js → main-O4ZJIEWP.js} +21 -23
  110. package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
  111. package/dist/bundle/{meetings-BMELXRTR.js → meetings-77CCAVYD.js} +13 -7
  112. package/dist/bundle/{node-CQVMWVIG.js → node-E6VQHU4Y.js} +2 -2
  113. package/dist/bundle/{node-sqlite-QQEX7LZT.js → node-sqlite-RJZ4PGLD.js} +7 -7
  114. package/dist/bundle/{oauth-AYGX7CQS.js → oauth-F4JKNRW4.js} +8 -8
  115. package/dist/bundle/{open-MIL2TOT6.js → open-NYOGMIAA.js} +6 -6
  116. package/dist/bundle/openai-5U6EQTFQ.js +25 -0
  117. package/dist/bundle/{output-file-4XADZPYH.js → output-file-6COFGPUL.js} +6 -6
  118. package/dist/bundle/{process-NJVQK6GB.js → process-OBWUKBMX.js} +1 -1
  119. package/dist/bundle/{program-WUYRS6H7.js → program-MU7DEJTO.js} +115 -187
  120. package/dist/bundle/{prompt-J4QPFLEA.js → prompt-2QWQTHWT.js} +6 -6
  121. package/dist/bundle/{recognize-OLJZVNWW.js → recognize-SNUNTUC3.js} +5 -5
  122. package/dist/bundle/{remote-JPUXNYLV.js → remote-2CTCIQGF.js} +8 -8
  123. package/dist/bundle/{rerank-XVV3X5TT.js → rerank-XDA7NJNH.js} +8 -8
  124. package/dist/bundle/{run-log-DJXBEVS5.js → run-log-NSG3DJVX.js} +59 -59
  125. package/dist/bundle/{serve-NYYUO3MR.js → serve-TWQFHOV2.js} +10 -10
  126. package/dist/bundle/{server-4Z5E4YTT.js → server-RIQ6HMH2.js} +47 -47
  127. package/dist/bundle/server-XO6XQQTJ.js +72 -0
  128. package/dist/bundle/{services-EKWM76HP.js → services-NKZQJQIV.js} +49 -33
  129. package/dist/bundle/{speech-WFJ44ACJ.js → speech-ZOB76SXA.js} +14 -14
  130. package/dist/bundle/{state-VIRCT4VW.js → state-7YYEIXQ5.js} +7 -7
  131. package/dist/bundle/{store-ZTDZ6UY5.js → store-E6RTSSNR.js} +29 -18
  132. package/dist/bundle/{store-2Q4GEZJS.js → store-OX4HRBLO.js} +80 -29
  133. package/dist/bundle/store-connection-55QPNUDS.js +83 -0
  134. package/dist/bundle/store-maintenance-command-Q5MSU6OK.js +62 -0
  135. package/dist/bundle/{streaming-7BPKIGAS.js → streaming-O53PIORL.js} +7 -7
  136. package/dist/bundle/{tokens-CQHMMKNX.js → tokens-QKNEP2GJ.js} +7 -7
  137. package/dist/bundle/zm.js +9 -10
  138. package/dist/bundle/zoom-app-TSI2MGVK.js +41 -0
  139. package/dist/commands.d.ts.map +1 -1
  140. package/dist/commands.js +1 -0
  141. package/dist/commands.js.map +1 -1
  142. package/dist/config.d.ts.map +1 -1
  143. package/dist/config.js +2 -3
  144. package/dist/config.js.map +1 -1
  145. package/dist/identity.d.ts +1 -0
  146. package/dist/identity.d.ts.map +1 -1
  147. package/dist/identity.js +11 -0
  148. package/dist/identity.js.map +1 -1
  149. package/dist/program-bindings.d.ts.map +1 -1
  150. package/dist/program-bindings.js +7 -2
  151. package/dist/program-bindings.js.map +1 -1
  152. package/dist/setup-commands.d.ts +6 -0
  153. package/dist/setup-commands.d.ts.map +1 -1
  154. package/dist/setup-commands.js +24 -9
  155. package/dist/setup-commands.js.map +1 -1
  156. package/dist/version.d.ts +1 -1
  157. package/dist/version.js +1 -1
  158. package/dist/zoom-app.d.ts +32 -0
  159. package/dist/zoom-app.d.ts.map +1 -1
  160. package/dist/zoom-app.js +61 -0
  161. package/dist/zoom-app.js.map +1 -1
  162. package/package.json +3 -3
  163. package/dist/bundle/answer-policy-5OYUL6UF.js +0 -103
  164. package/dist/bundle/chunk-3ZIHUSMM.js +0 -22
  165. package/dist/bundle/chunk-54RTMQL6.js +0 -132
  166. package/dist/bundle/chunk-6VFORXL3.js +0 -101
  167. package/dist/bundle/chunk-D4KBD63W.js +0 -19
  168. package/dist/bundle/chunk-J3ZBEWQY.js +0 -880
  169. package/dist/bundle/chunk-SXFODCYK.js +0 -9
  170. package/dist/bundle/chunk-YRNZT4GQ.js +0 -176
  171. package/dist/bundle/chunk-Z3WXI4DK.js +0 -31
  172. package/dist/bundle/command-contract-UWHY55UE.js +0 -41
  173. package/dist/bundle/config-TGF6E6ZD.js +0 -89
  174. package/dist/bundle/first-screen-PGFIXJAX.js +0 -39
  175. package/dist/bundle/openai-7QZZXQW5.js +0 -25
  176. package/dist/bundle/server-VW5UVCH7.js +0 -72
  177. package/dist/bundle/store-connection-FKVVQLEF.js +0 -83
  178. package/dist/bundle/store-maintenance-command-AU73UVUQ.js +0 -62
  179. package/dist/bundle/zoom-app-OEKFMJS6.js +0 -25
  180. /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
@@ -0,0 +1,299 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-FEM2JQN2.js";
6
+ import {
7
+ singleLine
8
+ } from "./chunk-OE7EIP5L.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/money.js
14
+ var CURRENCY_SCALES = {
15
+ AED: 2,
16
+ AMD: 2,
17
+ AUD: 2,
18
+ BHD: 3,
19
+ BYN: 2,
20
+ CAD: 2,
21
+ CHF: 2,
22
+ CLP: 0,
23
+ CNY: 2,
24
+ CZK: 2,
25
+ DKK: 2,
26
+ EUR: 2,
27
+ GBP: 2,
28
+ GEL: 2,
29
+ HUF: 2,
30
+ ILS: 2,
31
+ INR: 2,
32
+ ISK: 0,
33
+ JPY: 0,
34
+ KGS: 2,
35
+ KRW: 0,
36
+ KWD: 3,
37
+ KZT: 2,
38
+ NOK: 2,
39
+ PLN: 2,
40
+ RSD: 2,
41
+ RUB: 2,
42
+ SEK: 2,
43
+ THB: 2,
44
+ TRY: 2,
45
+ UAH: 2,
46
+ USD: 2,
47
+ UZS: 2,
48
+ VND: 0
49
+ };
50
+ var refuse = /* @__PURE__ */ __name((message, reason) => {
51
+ throw new CliError("validation_error", message, { reason });
52
+ }, "refuse");
53
+ var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
54
+ var parseDecimal = /* @__PURE__ */ __name((text, scale) => {
55
+ const match = DECIMAL.exec(text.trim());
56
+ if (!match || (match[2] ?? "").length > scale)
57
+ return void 0;
58
+ return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
59
+ }, "parseDecimal");
60
+ var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
61
+ const value = BigInt(units);
62
+ if (value < 0n)
63
+ return `-${formatDecimal(-value, scale)}`;
64
+ const digits = value.toString().padStart(scale + 1, "0");
65
+ return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
66
+ }, "formatDecimal");
67
+ var groupDigits = /* @__PURE__ */ __name((decimal) => {
68
+ const [whole = "0", fraction] = decimal.split(".");
69
+ const grouped = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
70
+ return fraction === void 0 ? grouped : `${grouped}.${fraction}`;
71
+ }, "groupDigits");
72
+ var currencyOf = /* @__PURE__ */ __name((text) => {
73
+ const code = typeof text === "string" ? text.trim().toUpperCase() : "";
74
+ if (CURRENCY_SCALES[code] === void 0)
75
+ return refuse(`${typeof text === "string" && text.trim() ? text.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
76
+ return code;
77
+ }, "currencyOf");
78
+ var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
79
+ var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
80
+ const scale = scaleOf(currency);
81
+ const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
82
+ if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
83
+ return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
84
+ return Number(units);
85
+ }, "minorUnits");
86
+ var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
87
+ if (typeof amount !== "string" || !amount.trim().startsWith("-"))
88
+ return minorUnits(amount, currency, what);
89
+ const units = minorUnits(amount.trim().slice(1), currency, what);
90
+ return units === 0 ? 0 : -units;
91
+ }, "signedMinorUnits");
92
+ var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
93
+ amount: formatDecimal(units, scaleOf(currency)),
94
+ currency
95
+ }), "moneyOf");
96
+ var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
97
+ var QUANTITY_SCALE = 3;
98
+ var quantityOf = /* @__PURE__ */ __name((text) => {
99
+ const thousandths = typeof text === "string" ? parseDecimal(text, QUANTITY_SCALE) : void 0;
100
+ if (thousandths === void 0 || thousandths === 0n)
101
+ return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
102
+ const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
103
+ return { text: plain, thousandths };
104
+ }, "quantityOf");
105
+ var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
106
+
107
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/finance.js
108
+ var INVOICE_DIRECTIONS = ["receivable", "payable"];
109
+ var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
110
+ var MONEY_DIRECTIONS = ["in", "out"];
111
+ var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
112
+ var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
113
+ if (current === "draft" || current === "void")
114
+ return current;
115
+ if (paid <= 0)
116
+ return "issued";
117
+ return paid < total ? "partly_paid" : "paid";
118
+ }, "settledStatus");
119
+ var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
120
+ var notes = /* @__PURE__ */ __name((...words) => {
121
+ const kept = words.filter((word) => word !== null);
122
+ return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
123
+ }, "notes");
124
+ var invoiceLine = /* @__PURE__ */ __name((invoice) => {
125
+ const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
126
+ const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
127
+ return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
128
+ }, "invoiceLine");
129
+ var paymentLine = /* @__PURE__ */ __name((payment) => {
130
+ const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
131
+ return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
132
+ }, "paymentLine");
133
+ var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
134
+ var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
135
+
136
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/deals.js
137
+ var DEAL_KINDS = ["deal", "lead"];
138
+ var DEAL_STATUSES = ["open", "won", "lost"];
139
+ var STAGE_OUTCOMES = DEAL_STATUSES;
140
+ var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
141
+ var dealLine = /* @__PURE__ */ __name((deal) => {
142
+ const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
143
+ return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
144
+ }, "dealLine");
145
+
146
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/orders.js
147
+ var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
148
+ var ORDER_PURPOSES = ["personal", "business", "client", "other"];
149
+ var orderLine = /* @__PURE__ */ __name((order) => {
150
+ const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
151
+ const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
152
+ return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
153
+ }, "orderLine");
154
+ var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
155
+
156
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/relations.js
157
+ var ORGANIZATION_ROLES = [
158
+ "employee",
159
+ "contractor",
160
+ "founder",
161
+ "owner",
162
+ "manager",
163
+ "adviser",
164
+ "contact"
165
+ ];
166
+ var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
167
+ var RELATIONS = {
168
+ "member-of": {
169
+ from: ["person", "organization", "project", "chat", "email_thread"],
170
+ to: ["organization", "project"],
171
+ roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
172
+ },
173
+ "reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
174
+ "customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
175
+ "partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
176
+ "related-to": {
177
+ from: ["person", "organization", "project", "task", "deal", "lead"],
178
+ to: ["person", "organization", "project", "task"],
179
+ roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES } }
180
+ }
181
+ };
182
+ var RELATION_KINDS = Object.keys(RELATIONS);
183
+ var specOf = /* @__PURE__ */ __name((kind) => Object.hasOwn(RELATIONS, kind) ? RELATIONS[kind] : void 0, "specOf");
184
+ var isRelationKind = /* @__PURE__ */ __name((kind) => specOf(kind) !== void 0, "isRelationKind");
185
+ var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
186
+ var checkEnds = /* @__PURE__ */ __name((kind, from, to) => {
187
+ const spec = specOf(kind);
188
+ if (!spec)
189
+ throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
190
+ if (memberOnly(from) && (kind !== "member-of" || to !== "project"))
191
+ throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
192
+ if (!spec.from.includes(from) || !spec.to.includes(to))
193
+ throw new CliError("validation_error", `${kind} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
194
+ return spec;
195
+ }, "checkEnds");
196
+ var rolesOf = /* @__PURE__ */ __name((kind, from, to) => {
197
+ const spec = specOf(kind);
198
+ if (kind === "member-of" && from !== "person")
199
+ return void 0;
200
+ return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
201
+ }, "rolesOf");
202
+ var ROLE_LISTS = { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES, deal: DEAL_ROLES };
203
+ var roleListOf = /* @__PURE__ */ __name((kind, from, to) => {
204
+ const roles = rolesOf(kind, from, to);
205
+ return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
206
+ }, "roleListOf");
207
+ var checkRole = /* @__PURE__ */ __name((kind, from, to, role, extra = []) => {
208
+ const roles = rolesOf(kind, from, to)?.concat(extra);
209
+ if (roles && !roles.includes(role))
210
+ throw new CliError("validation_error", `a ${from}'s role on ${kind} ${to} is one of ${roles.join(", ")}`, {
211
+ reason: "relationship.role-unknown"
212
+ });
213
+ return role;
214
+ }, "checkRole");
215
+ var isSymmetric = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric === true, "isSymmetric");
216
+ var inverseOf = /* @__PURE__ */ __name((kind) => specOf(kind)?.symmetric ? kind : specOf(kind)?.inverse ?? null, "inverseOf");
217
+ var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
218
+ var standingOf = /* @__PURE__ */ __name((link, now) => {
219
+ if (link.endsAt != null && link.endsAt <= now)
220
+ return "ended";
221
+ if (link.confirmed)
222
+ return "confirmed";
223
+ if (link.deletedAt != null)
224
+ return "ended";
225
+ return link.accountId != null ? "reported" : "proposed";
226
+ }, "standingOf");
227
+ var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
228
+ var usableLink = /* @__PURE__ */ __name((link, now) => isUsable(standingOf(link, now)), "usableLink");
229
+ var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
230
+ var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
231
+
232
+ // node_modules/.pnpm/@wirecat+cli-core@0.608.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_3e7ac84c094d466aed903c683c124ab5/node_modules/@wirecat/cli-core/dist/domain/tags.js
233
+ var TAG_TYPES = ["chat", "contact", "message", "task"];
234
+ var TAG = /^[a-z0-9-]{1,32}$/;
235
+ var tagOf = /* @__PURE__ */ __name((value) => {
236
+ const tag = value.trim().toLowerCase();
237
+ return TAG.test(tag) ? tag : void 0;
238
+ }, "tagOf");
239
+ var normalizeTag = /* @__PURE__ */ __name((value) => {
240
+ const tag = tagOf(value);
241
+ if (tag === void 0)
242
+ throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
243
+ return tag;
244
+ }, "normalizeTag");
245
+
246
+ export {
247
+ CURRENCY_SCALES,
248
+ parseDecimal,
249
+ formatDecimal,
250
+ currencyOf,
251
+ scaleOf,
252
+ minorUnits,
253
+ signedMinorUnits,
254
+ moneyOf,
255
+ moneyLabel,
256
+ quantityOf,
257
+ lineUnits,
258
+ INVOICE_DIRECTIONS,
259
+ INVOICE_STATUSES,
260
+ MONEY_DIRECTIONS,
261
+ FINANCE_REVIEWS,
262
+ settledStatus,
263
+ dayMonth,
264
+ notes,
265
+ invoiceLine,
266
+ paymentLine,
267
+ invoiceTitle,
268
+ paymentEntryTitle,
269
+ DEAL_KINDS,
270
+ DEAL_STATUSES,
271
+ STAGE_OUTCOMES,
272
+ DEAL_ROLES,
273
+ dealLine,
274
+ ORDER_STATUSES,
275
+ ORDER_PURPOSES,
276
+ orderLine,
277
+ orderTitle,
278
+ ORGANIZATION_ROLES,
279
+ PROJECT_ROLES,
280
+ RELATIONS,
281
+ RELATION_KINDS,
282
+ isRelationKind,
283
+ checkEnds,
284
+ rolesOf,
285
+ ROLE_LISTS,
286
+ roleListOf,
287
+ checkRole,
288
+ isSymmetric,
289
+ inverseOf,
290
+ STANDINGS,
291
+ standingOf,
292
+ isUsable,
293
+ usableLink,
294
+ notOverriddenSql,
295
+ usableLinkSql,
296
+ TAG_TYPES,
297
+ tagOf,
298
+ normalizeTag
299
+ };
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  resolvePaths
5
- } from "./chunk-T6CZWSHF.js";
5
+ } from "./chunk-KNE6VFHZ.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
7
+ // node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
8
8
  var errorCodes = [
9
9
  "validation_error",
10
10
  "configuration_error",