@wirecat/tg-cli 0.133.0 → 0.134.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.
- package/README.md +2 -3
- package/contracts/wirecat.json +82 -2
- package/dist/bin/tg.js +2 -2
- package/dist/bot/generated/types.d.ts +188 -0
- package/dist/bot/generated/types.d.ts.map +1 -1
- package/dist/bundle/{adapter-GSGX3WBH.js → adapter-Y4IXTXAG.js} +104 -69
- package/dist/bundle/agent-G7VHOJMS.js +37 -0
- package/dist/bundle/{all-profiles-VOCJ55YH.js → all-profiles-SUGID6CX.js} +62 -20
- package/dist/bundle/{anthropic-J6CTLU3W.js → anthropic-4QKTXT4B.js} +5 -5
- package/dist/bundle/{app-server-GVFGA4TJ.js → app-server-TPOD6LIJ.js} +72 -62
- package/dist/bundle/{bot-api-LWONPIGK.js → bot-api-KBESP422.js} +73 -92
- package/dist/bundle/{bot-history-XOW7Y2GC.js → bot-history-3EORA23G.js} +23 -22
- package/dist/bundle/{bun-436CH6CP.js → bun-FL76M4M2.js} +2 -2
- package/dist/bundle/{bun-sqlite-ZLB5RK5Q.js → bun-sqlite-H37OSTAJ.js} +6 -6
- package/dist/bundle/{chunk-YY6FGKGD.js → chunk-2GT563YH.js} +2 -2
- package/dist/bundle/{chunk-5L44DSHV.js → chunk-2JWY7CXJ.js} +4 -4
- package/dist/bundle/{chunk-OX73ERZW.js → chunk-3O25FAPA.js} +3 -4
- package/dist/bundle/{chunk-TCI7I6YF.js → chunk-3PG6QVQZ.js} +11 -25
- package/dist/bundle/{chunk-NTWXL2QV.js → chunk-3QQWTP77.js} +2 -2
- package/dist/bundle/{chunk-TTDZVWDU.js → chunk-3ZNO27UE.js} +1 -1
- package/dist/bundle/{chunk-7NYP4RBO.js → chunk-4R2ZJGFF.js} +2125 -1179
- package/dist/bundle/{chunk-VGN5YXYI.js → chunk-4S2DHHJM.js} +2 -100
- package/dist/bundle/{chunk-H7ML7X3G.js → chunk-4X6BX3XP.js} +144 -10
- package/dist/bundle/{chunk-D2SJLZSH.js → chunk-6DGVK5KS.js} +2 -2
- package/dist/bundle/chunk-6DJJVFSG.js +388 -0
- package/dist/bundle/{chunk-M6QOM6SL.js → chunk-6MEHKUN6.js} +1 -1
- package/dist/bundle/{chunk-6CHIGUCY.js → chunk-6UNLEQA5.js} +31 -20
- package/dist/bundle/{chunk-WCYKVX3B.js → chunk-77E7Q4EQ.js} +7 -7
- package/dist/bundle/chunk-7GGDCQJ5.js +353 -0
- package/dist/bundle/{chunk-UIAKLELF.js → chunk-AHVWZDXO.js} +79 -64
- package/dist/bundle/{chunk-NO2LIHWA.js → chunk-ANBI3OXK.js} +1 -1
- package/dist/bundle/{chunk-LQQSDGQ6.js → chunk-AYWST6NA.js} +56 -46
- package/dist/bundle/{chunk-NAXOT35J.js → chunk-CA7DY2YU.js} +3 -3
- package/dist/bundle/{chunk-UKBK2VWZ.js → chunk-CDKXZLMP.js} +225 -175
- package/dist/bundle/{chunk-5HKPQPD4.js → chunk-CNGNR4CY.js} +6 -6
- package/dist/bundle/{chunk-KUA24HWG.js → chunk-CSXCCK6J.js} +2 -2
- package/dist/bundle/{chunk-VTQMR3XG.js → chunk-DG35TQ6P.js} +3 -3
- package/dist/bundle/{chunk-IPPCQ7IK.js → chunk-EXMAWEHC.js} +2 -2
- package/dist/bundle/{chunk-CEJYNB3I.js → chunk-FR3ATU5I.js} +4 -4
- package/dist/bundle/{chunk-XOX4BX5A.js → chunk-FR4Y5CGW.js} +4 -4
- package/dist/bundle/{chunk-JPNVEPS4.js → chunk-GIGZTI74.js} +2023 -1928
- package/dist/bundle/{chunk-UZ63ORMY.js → chunk-H3TLAYGY.js} +4 -4
- package/dist/bundle/{chunk-LBZEZO32.js → chunk-HD7DV5B2.js} +65 -43
- package/dist/bundle/{chunk-TPD37ECC.js → chunk-HETHFOHC.js} +3 -3
- package/dist/bundle/{chunk-JKSD43L7.js → chunk-HEZK4W3U.js} +6 -6
- package/dist/bundle/{chunk-SMU6NA7F.js → chunk-IJ7R2WMK.js} +4 -4
- package/dist/bundle/{chunk-7NF3V5L2.js → chunk-ITJ7DGNA.js} +4 -4
- package/dist/bundle/{chunk-JGMXBAGH.js → chunk-J5RB4ASI.js} +140 -433
- package/dist/bundle/{chunk-57KJ3TRS.js → chunk-JAL443BH.js} +9 -9
- package/dist/bundle/{chunk-IH4Z3KZU.js → chunk-JCDD5T3A.js} +2 -2
- package/dist/bundle/{chunk-BXVB42KJ.js → chunk-JHZJBNDO.js} +2 -2
- package/dist/bundle/chunk-JWLODUN3.js +555 -0
- package/dist/bundle/{chunk-54WLIPIQ.js → chunk-JWNSG5GI.js} +1 -1
- package/dist/bundle/{chunk-UGS57TT5.js → chunk-JXEO5EIN.js} +2 -2
- package/dist/bundle/{chunk-QYLZD4DS.js → chunk-K5FK6WWN.js} +1 -1
- package/dist/bundle/{chunk-QWO7L4UH.js → chunk-L47PFECD.js} +7 -7
- package/dist/bundle/{chunk-IYAXLLGR.js → chunk-L4PNDW4S.js} +6 -6
- package/dist/bundle/{chunk-ZHO3TPHM.js → chunk-M323L5SG.js} +30 -15
- package/dist/bundle/{chunk-6A44ZZFC.js → chunk-MMDFPBFZ.js} +43 -64
- package/dist/bundle/{chunk-OWY52JBO.js → chunk-MUV73B5A.js} +7 -7
- package/dist/bundle/{chunk-2KQDJHF3.js → chunk-MXA3FU2R.js} +29 -1
- package/dist/bundle/{chunk-6H2NW6HK.js → chunk-NUD4CBHK.js} +3 -3
- package/dist/bundle/{chunk-RABUG4KA.js → chunk-NYEVPAF2.js} +511 -472
- package/dist/bundle/{chunk-VWJTYAIQ.js → chunk-O3QBO6NW.js} +17 -17
- package/dist/bundle/{chunk-N7QREPZW.js → chunk-O4ZOQJ6W.js} +9 -9
- package/dist/bundle/{chunk-KEN4B57V.js → chunk-OJSPB4LA.js} +2 -2
- package/dist/bundle/{chunk-UQYL6TJ7.js → chunk-PCBVSHKD.js} +4 -4
- package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-PK5WEGPJ.js} +2 -2
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-O6JUVATT.js → chunk-PRI2XTM7.js} +35 -12
- package/dist/bundle/chunk-PRM7GKBV.js +340 -0
- package/dist/bundle/{chunk-YAPDU3SV.js → chunk-PZ2ZFPGO.js} +1 -1
- package/dist/bundle/chunk-QYRK4XXH.js +727 -0
- package/dist/bundle/{chunk-XDQU5HBO.js → chunk-RVA3CRSY.js} +12 -12
- package/dist/bundle/{chunk-QVGEL66U.js → chunk-SPXNI53Z.js} +38 -9
- package/dist/bundle/{chunk-QGWISM4W.js → chunk-TI5U6AUT.js} +34 -28
- package/dist/bundle/{chunk-THYGLTRB.js → chunk-TKWYXM7L.js} +7 -7
- package/dist/bundle/{chunk-XKOMP3HV.js → chunk-TZCFJJEU.js} +6 -6
- package/dist/bundle/chunk-UTTEAOJ3.js +7 -0
- package/dist/bundle/chunk-V6G4LTXU.js +50 -0
- package/dist/bundle/{chunk-KVFUH5IT.js → chunk-VH4J7IIS.js} +1 -1
- package/dist/bundle/{chunk-VCAOH45X.js → chunk-VNJRWFHP.js} +1 -1
- package/dist/bundle/chunk-W2QSDPG6.js +80 -0
- package/dist/bundle/{chunk-LOS4D6ZB.js → chunk-WGGUKQE7.js} +113 -567
- package/dist/bundle/{chunk-ZYAHZKYF.js → chunk-WPXVJGSL.js} +3 -3
- package/dist/bundle/{chunk-IBCXEVNY.js → chunk-XLNV3U6N.js} +3 -3
- package/dist/bundle/{chunk-6S77EKZU.js → chunk-XS4EE7MO.js} +17 -15
- package/dist/bundle/{chunk-6VCSOQFL.js → chunk-XVRLD3LN.js} +2 -2
- package/dist/bundle/{chunk-HB5DP6L5.js → chunk-XZ6XEAJP.js} +18 -18
- package/dist/bundle/{chunk-N3JUHGKM.js → chunk-YHTSJMZ5.js} +3706 -3372
- package/dist/bundle/chunk-YPJCURT6.js +108 -0
- package/dist/bundle/{chunk-SMI2EUH4.js → chunk-Z77R76S2.js} +1 -1
- package/dist/bundle/{chunk-KHUXDSXN.js → chunk-ZC7OEYDX.js} +1 -1
- package/dist/bundle/{chunk-5LRTYBZW.js → chunk-ZW2N2GI2.js} +12 -12
- package/dist/bundle/command-contract-LEFXJAA3.js +37 -0
- package/dist/bundle/{command-server-entry-AE27QXTE.js → command-server-entry-WQAE5UGU.js} +27 -27
- package/dist/bundle/{decode-RQPPZ72F.js → decode-2J2DOVGV.js} +5 -5
- package/dist/bundle/{dispatch-KQO2MCSH.js → dispatch-IZ2TP5GW.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FZRIACN4.js → echarts-GFIIHZ4U.js} +2 -2
- package/dist/bundle/{embed-TOSWWMDL.js → embed-AGOXADHW.js} +6 -6
- package/dist/bundle/{embedder-JHIQSBGD.js → embedder-PCIXGM2Y.js} +9 -9
- package/dist/bundle/{entry-DU4KRXTG.js → entry-HUQXUV52.js} +9 -9
- package/dist/bundle/{failure-3YC3YGYO.js → failure-JSRHZ2S6.js} +2 -2
- package/dist/bundle/{first-run-DQQT4FID.js → first-run-2LXN7B33.js} +12 -12
- package/dist/bundle/first-screen-VUE6RCSF.js +37 -0
- package/dist/bundle/{instructions-WI64CJQ6.js → instructions-RSLTJVFJ.js} +1 -1
- package/dist/bundle/{mcp-VMS6PBCU.js → mcp-MMENCB7I.js} +2 -2
- package/dist/bundle/meeting-combined-PBNPHOM3.js +23 -0
- package/dist/bundle/{meeting-model-XNRSREIK.js → meeting-model-SI77WMMK.js} +11 -11
- package/dist/bundle/{meeting-semantic-OOSCHQMB.js → meeting-semantic-WRXWUR4M.js} +6 -6
- package/dist/bundle/{node-JLKDNVKV.js → node-5XGMCUGQ.js} +2 -2
- package/dist/bundle/{node-sqlite-YOGH26O2.js → node-sqlite-ES7SQSIC.js} +7 -7
- package/dist/bundle/{oauth-FOMXM5HP.js → oauth-QFM4Y6N7.js} +8 -8
- package/dist/bundle/{open-SM2UXUKM.js → open-2MD2DKGQ.js} +5 -5
- package/dist/bundle/{openai-J2H7S6ZF.js → openai-6TMKJKYO.js} +15 -15
- package/dist/bundle/{process-HI7OZBOI.js → process-VA2DP7MY.js} +1 -1
- package/dist/bundle/{program-VY4HFU25.js → program-K3SLEA42.js} +70 -64
- package/dist/bundle/{prompt-NUUVFMOF.js → prompt-VZSPCE6E.js} +5 -5
- package/dist/bundle/{proxy-transport-AN4VMRRN.js → proxy-transport-OJU2EOOC.js} +5 -5
- package/dist/bundle/{recognize-MALJHPDI.js → recognize-LH3ZZEIL.js} +4 -4
- package/dist/bundle/{remote-QUDRSTS2.js → remote-JNW5HN2I.js} +9 -9
- package/dist/bundle/{rerank-2DSO3D3S.js → rerank-P23UJMII.js} +7 -7
- package/dist/bundle/{serve-NCJ52MY3.js → serve-VSLLMILH.js} +15 -15
- package/dist/bundle/{server-Y3M544AM.js → server-FBRRRKCS.js} +65 -54
- package/dist/bundle/server-TA4QP7PG.js +78 -0
- package/dist/bundle/{sqlite-runtime-NJUSXVKK.js → sqlite-runtime-LWATDAAU.js} +6 -6
- package/dist/bundle/{state-AVOWQVET.js → state-3AFJL2EL.js} +6 -6
- package/dist/bundle/{store-MMIYOL4H.js → store-6TLYL2VU.js} +28 -17
- package/dist/bundle/{store-BZ5ICDRP.js → store-PEXV5DNA.js} +20 -19
- package/dist/bundle/store-maintenance-command-IYJLUQ5X.js +65 -0
- package/dist/bundle/surface-L4VY4WFG.js +64 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/adapter.d.ts +9 -2
- package/dist/telegram/adapter.d.ts.map +1 -1
- package/dist/telegram/adapter.js +5 -6
- package/dist/telegram/adapter.js.map +1 -1
- package/dist/telegram/messages.d.ts +12 -0
- package/dist/telegram/messages.d.ts.map +1 -1
- package/dist/telegram/messages.js +40 -0
- package/dist/telegram/messages.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/tg-cli/SKILL.md +4 -2
- package/skills/tg-cli/references/messages.md +5 -1
- package/skills/tg-cli/references/search.md +2 -0
- package/dist/bundle/chunk-SHTHNBHG.js +0 -2
- package/dist/bundle/command-contract-TQIARAB4.js +0 -37
- package/dist/bundle/first-screen-7N4CTZSA.js +0 -37
- package/dist/bundle/meeting-combined-3RAOFQ7M.js +0 -23
- package/dist/bundle/server-CHGON5I2.js +0 -70
- package/dist/bundle/store-maintenance-command-VKZ4WHUB.js +0 -61
|
@@ -32,149 +32,55 @@ import {
|
|
|
32
32
|
string,
|
|
33
33
|
union,
|
|
34
34
|
variant
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-SPXNI53Z.js";
|
|
36
36
|
import {
|
|
37
37
|
CliError,
|
|
38
38
|
isCliError,
|
|
39
39
|
singleLine,
|
|
40
40
|
visibleControls
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PK5WEGPJ.js";
|
|
42
42
|
import {
|
|
43
43
|
__name
|
|
44
44
|
} from "./chunk-ZVVMGPBJ.js";
|
|
45
45
|
|
|
46
|
-
// node_modules/.pnpm/@wirecat+cli-
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
}, "
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.106.0_commander@15_8d845c31697914d824aa80d8eec93941/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
84
|
-
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
85
|
-
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
86
|
-
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
87
|
-
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
88
|
-
throw new CliError("validation_error", message);
|
|
89
|
-
}, "invalid");
|
|
90
|
-
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
91
|
-
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
92
|
-
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
93
|
-
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
94
|
-
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
95
|
-
if (!match)
|
|
96
|
-
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
97
|
-
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
98
|
-
if (amount === "0.00")
|
|
99
|
-
return invalid2("a payment's amount is more than 0");
|
|
100
|
-
return amount;
|
|
101
|
-
}, "amountOf");
|
|
102
|
-
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
103
|
-
const date = typeof value === "string" ? value.trim() : "";
|
|
104
|
-
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
105
|
-
return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
|
|
106
|
-
return date;
|
|
107
|
-
}, "dateOf");
|
|
108
|
-
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
109
|
-
if (value === void 0 || value === null)
|
|
110
|
-
return null;
|
|
111
|
-
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
112
|
-
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
113
|
-
return value.trim();
|
|
114
|
-
}, "optionalText");
|
|
115
|
-
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
116
|
-
if (typeof value !== "string" || !allowed.includes(value))
|
|
117
|
-
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
118
|
-
return value;
|
|
119
|
-
}, "oneOf");
|
|
120
|
-
var FIELDS = [
|
|
121
|
-
"amount",
|
|
122
|
-
"currency",
|
|
123
|
-
"direction",
|
|
124
|
-
"counterparty",
|
|
125
|
-
"counterparty_name",
|
|
126
|
-
"due_at",
|
|
127
|
-
"state",
|
|
128
|
-
"item",
|
|
129
|
-
"paid_at"
|
|
130
|
-
];
|
|
131
|
-
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
132
|
-
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
133
|
-
return invalid2("a payment is an object");
|
|
134
|
-
const raw = input;
|
|
135
|
-
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
136
|
-
if (unknown.length)
|
|
137
|
-
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
138
|
-
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
139
|
-
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
140
|
-
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
141
|
-
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
142
|
-
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
143
|
-
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
144
|
-
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
145
|
-
if (raw.paid_at != null && state !== "paid")
|
|
146
|
-
return invalid2("only a paid payment has paid_at");
|
|
147
|
-
return {
|
|
148
|
-
amount: amountOf(raw.amount),
|
|
149
|
-
currency,
|
|
150
|
-
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
151
|
-
counterparty,
|
|
152
|
-
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
153
|
-
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
154
|
-
state,
|
|
155
|
-
item: optionalText(raw.item, "item", 200),
|
|
156
|
-
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
157
|
-
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
158
|
-
};
|
|
159
|
-
}, "validatePayment");
|
|
160
|
-
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
161
|
-
const [whole = "0", cents = "00"] = amount.split(".");
|
|
162
|
-
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
163
|
-
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
164
|
-
}, "grouped");
|
|
165
|
-
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
166
|
-
const payment = fact.payment;
|
|
167
|
-
if (!payment)
|
|
168
|
-
return "";
|
|
169
|
-
const who = payment.counterparty_name ?? payment.counterparty;
|
|
170
|
-
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
171
|
-
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
172
|
-
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
173
|
-
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
174
|
-
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
175
|
-
}, "paymentTitle");
|
|
46
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
|
|
47
|
+
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
48
|
+
var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
49
|
+
var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
|
|
50
|
+
var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
|
|
51
|
+
"field:value",
|
|
52
|
+
...has(shown, "phrase") ? ['"a phrase"'] : [],
|
|
53
|
+
...has(shown, "wildcard") ? ["word*"] : [],
|
|
54
|
+
...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
|
|
55
|
+
...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
|
|
56
|
+
].join(" \xB7 "), "syntaxOf");
|
|
57
|
+
var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
|
|
58
|
+
var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
|
|
59
|
+
const shown = shownOf(registry);
|
|
60
|
+
const negatable = leftOut(shown);
|
|
61
|
+
const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
|
|
62
|
+
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
63
|
+
return [
|
|
64
|
+
"Fields:",
|
|
65
|
+
...rows.map(([name = "", kind2 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind2.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
66
|
+
...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
67
|
+
...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
|
|
68
|
+
`Syntax: ${syntaxOf(shown, registry.backend)}`,
|
|
69
|
+
...guide ? [`Guide: ${guide}`] : []
|
|
70
|
+
].join("\n");
|
|
71
|
+
}, "fieldsHelp");
|
|
72
|
+
var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
73
|
+
const shown = shownOf(registry);
|
|
74
|
+
if (shown.length === 0)
|
|
75
|
+
return "field:value terms; this list filters by none yet, so any term is refused";
|
|
76
|
+
const negatable = leftOut(shown);
|
|
77
|
+
const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
|
|
78
|
+
const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
|
|
79
|
+
const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
|
|
80
|
+
return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
81
|
+
}, "queryDescription");
|
|
176
82
|
|
|
177
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
83
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
178
84
|
var QUERY_LIMITS = {
|
|
179
85
|
bytes: 8192,
|
|
180
86
|
depth: 32,
|
|
@@ -218,7 +124,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
|
|
|
218
124
|
__name(queryError, "queryError");
|
|
219
125
|
var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
|
|
220
126
|
|
|
221
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
127
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
|
|
222
128
|
var timezoneOf = /* @__PURE__ */ __name((given) => {
|
|
223
129
|
const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
224
130
|
try {
|
|
@@ -368,7 +274,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
|
|
|
368
274
|
};
|
|
369
275
|
}, "dateRange");
|
|
370
276
|
|
|
371
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
277
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
|
|
372
278
|
var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
373
279
|
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
374
280
|
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
@@ -423,7 +329,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
|
423
329
|
}, "matches");
|
|
424
330
|
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
425
331
|
|
|
426
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
332
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
|
|
427
333
|
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
428
334
|
var OPERATORS_BY_TYPE = {
|
|
429
335
|
kw: ["term", "phrase", "wildcard"],
|
|
@@ -502,44 +408,7 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
|
502
408
|
return [...own, ...relations, ...states];
|
|
503
409
|
}, "queryFieldsOf");
|
|
504
410
|
|
|
505
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
506
|
-
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
507
|
-
var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
508
|
-
var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
|
|
509
|
-
var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
|
|
510
|
-
"field:value",
|
|
511
|
-
...has(shown, "phrase") ? ['"a phrase"'] : [],
|
|
512
|
-
...has(shown, "wildcard") ? ["word*"] : [],
|
|
513
|
-
...backend === "native" ? ["terms joined by AND"] : ["AND OR NOT", "( )"],
|
|
514
|
-
...has(shown, "range") ? ["[a TO b] \xB7 > >= < <="] : []
|
|
515
|
-
].join(" \xB7 "), "syntaxOf");
|
|
516
|
-
var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
|
|
517
|
-
var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
|
|
518
|
-
const shown = shownOf(registry);
|
|
519
|
-
const negatable = leftOut(shown);
|
|
520
|
-
const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
|
|
521
|
-
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
522
|
-
return [
|
|
523
|
-
"Fields:",
|
|
524
|
-
...rows.map(([name = "", kind2 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind2.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
525
|
-
...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
526
|
-
...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
|
|
527
|
-
`Syntax: ${syntaxOf(shown, registry.backend)}`,
|
|
528
|
-
...guide ? [`Guide: ${guide}`] : []
|
|
529
|
-
].join("\n");
|
|
530
|
-
}, "fieldsHelp");
|
|
531
|
-
var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
532
|
-
const shown = shownOf(registry);
|
|
533
|
-
if (shown.length === 0)
|
|
534
|
-
return "field:value terms; this list filters by none yet, so any term is refused";
|
|
535
|
-
const negatable = leftOut(shown);
|
|
536
|
-
const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
|
|
537
|
-
const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
|
|
538
|
-
const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
|
|
539
|
-
return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
540
|
-
}, "queryDescription");
|
|
541
|
-
|
|
542
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
411
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
543
412
|
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
544
413
|
var reserved = /* @__PURE__ */ new Set([
|
|
545
414
|
"+",
|
|
@@ -848,7 +717,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
|
|
|
848
717
|
return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
|
|
849
718
|
}, "implicitTextTerms");
|
|
850
719
|
|
|
851
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
720
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
|
|
852
721
|
var inContext = /* @__PURE__ */ __name((context3, run2) => {
|
|
853
722
|
try {
|
|
854
723
|
run2();
|
|
@@ -923,7 +792,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
|
923
792
|
}, "validateQuery");
|
|
924
793
|
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
925
794
|
|
|
926
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
795
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.122.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
|
|
927
796
|
var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
928
797
|
entity: registry.entity,
|
|
929
798
|
backend: registry.backend,
|
|
@@ -994,7 +863,138 @@ var QUERY_REASONS = defineReasons([
|
|
|
994
863
|
details: [...SPAN, ...details]
|
|
995
864
|
})));
|
|
996
865
|
|
|
997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
867
|
+
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
868
|
+
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
869
|
+
if (!Number.isSafeInteger(value) || value < minimum)
|
|
870
|
+
throw invalid();
|
|
871
|
+
return value;
|
|
872
|
+
}, "integer");
|
|
873
|
+
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
874
|
+
const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
|
|
875
|
+
if (reference2.transcriptId !== void 0)
|
|
876
|
+
parts.push(integer2(reference2.transcriptId));
|
|
877
|
+
if (reference2.cuePosition !== void 0) {
|
|
878
|
+
if (reference2.transcriptId === void 0)
|
|
879
|
+
throw invalid();
|
|
880
|
+
parts.push(integer2(reference2.cuePosition, 0));
|
|
881
|
+
}
|
|
882
|
+
return `meeting:${parts.join("/")}`;
|
|
883
|
+
}, "formatMeetingReference");
|
|
884
|
+
var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
|
|
885
|
+
const value = text6.trim();
|
|
886
|
+
if (!value.startsWith("meeting:"))
|
|
887
|
+
throw invalid();
|
|
888
|
+
const parts = value.slice(8).split("/");
|
|
889
|
+
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
890
|
+
throw invalid();
|
|
891
|
+
const ids2 = parts.map(Number);
|
|
892
|
+
const reference2 = {
|
|
893
|
+
type: "meeting",
|
|
894
|
+
accountId: integer2(ids2[0]),
|
|
895
|
+
meetingId: integer2(ids2[1]),
|
|
896
|
+
...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
|
|
897
|
+
...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
|
|
898
|
+
};
|
|
899
|
+
return reference2;
|
|
900
|
+
}, "parseMeetingReference");
|
|
901
|
+
var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
|
|
902
|
+
|
|
903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
904
|
+
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
905
|
+
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
906
|
+
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
907
|
+
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
908
|
+
throw new CliError("validation_error", message);
|
|
909
|
+
}, "invalid");
|
|
910
|
+
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
911
|
+
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
912
|
+
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
913
|
+
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
914
|
+
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
915
|
+
if (!match)
|
|
916
|
+
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
917
|
+
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
918
|
+
if (amount === "0.00")
|
|
919
|
+
return invalid2("a payment's amount is more than 0");
|
|
920
|
+
return amount;
|
|
921
|
+
}, "amountOf");
|
|
922
|
+
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
923
|
+
const date = typeof value === "string" ? value.trim() : "";
|
|
924
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
925
|
+
return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
|
|
926
|
+
return date;
|
|
927
|
+
}, "dateOf");
|
|
928
|
+
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
929
|
+
if (value === void 0 || value === null)
|
|
930
|
+
return null;
|
|
931
|
+
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
932
|
+
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
933
|
+
return value.trim();
|
|
934
|
+
}, "optionalText");
|
|
935
|
+
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
936
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
937
|
+
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
938
|
+
return value;
|
|
939
|
+
}, "oneOf");
|
|
940
|
+
var FIELDS = [
|
|
941
|
+
"amount",
|
|
942
|
+
"currency",
|
|
943
|
+
"direction",
|
|
944
|
+
"counterparty",
|
|
945
|
+
"counterparty_name",
|
|
946
|
+
"due_at",
|
|
947
|
+
"state",
|
|
948
|
+
"item",
|
|
949
|
+
"paid_at"
|
|
950
|
+
];
|
|
951
|
+
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
952
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
953
|
+
return invalid2("a payment is an object");
|
|
954
|
+
const raw = input;
|
|
955
|
+
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
956
|
+
if (unknown.length)
|
|
957
|
+
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
958
|
+
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
959
|
+
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
960
|
+
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
961
|
+
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
962
|
+
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
963
|
+
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
964
|
+
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
965
|
+
if (raw.paid_at != null && state !== "paid")
|
|
966
|
+
return invalid2("only a paid payment has paid_at");
|
|
967
|
+
return {
|
|
968
|
+
amount: amountOf(raw.amount),
|
|
969
|
+
currency,
|
|
970
|
+
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
971
|
+
counterparty,
|
|
972
|
+
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
973
|
+
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
974
|
+
state,
|
|
975
|
+
item: optionalText(raw.item, "item", 200),
|
|
976
|
+
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
977
|
+
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
978
|
+
};
|
|
979
|
+
}, "validatePayment");
|
|
980
|
+
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
981
|
+
const [whole = "0", cents = "00"] = amount.split(".");
|
|
982
|
+
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
983
|
+
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
984
|
+
}, "grouped");
|
|
985
|
+
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
986
|
+
const payment = fact.payment;
|
|
987
|
+
if (!payment)
|
|
988
|
+
return "";
|
|
989
|
+
const who = payment.counterparty_name ?? payment.counterparty;
|
|
990
|
+
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
991
|
+
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
992
|
+
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
993
|
+
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
994
|
+
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
995
|
+
}, "paymentTitle");
|
|
996
|
+
|
|
997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
998
998
|
var context = {
|
|
999
999
|
command: "search meetings",
|
|
1000
1000
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -1106,7 +1106,24 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
|
|
|
1106
1106
|
}, "liftMeetingFields");
|
|
1107
1107
|
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
1108
1108
|
|
|
1109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/search-store.js
|
|
1110
|
+
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
1111
|
+
let before = Number.POSITIVE_INFINITY;
|
|
1112
|
+
for (; ; ) {
|
|
1113
|
+
signal?.throwIfAborted();
|
|
1114
|
+
const { indexed, remaining } = await meetings.indexSearch({
|
|
1115
|
+
accountId,
|
|
1116
|
+
limit: 1e3,
|
|
1117
|
+
maxReadBytes: 64 * 1024 ** 2,
|
|
1118
|
+
signal
|
|
1119
|
+
});
|
|
1120
|
+
if (remaining === 0 || indexed === 0 || remaining >= before)
|
|
1121
|
+
return;
|
|
1122
|
+
before = remaining;
|
|
1123
|
+
}
|
|
1124
|
+
}, "refreshMeetingIndex");
|
|
1125
|
+
|
|
1126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/search/service-query.js
|
|
1110
1127
|
var BACKENDS = ["archive", "server", "both"];
|
|
1111
1128
|
var MAX_BRANCHES = 64;
|
|
1112
1129
|
var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
|
|
@@ -1145,10 +1162,10 @@ var RELATIVE_TIME = /^\d+[mhd]$/i;
|
|
|
1145
1162
|
var OFFSET = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
1146
1163
|
var readsZone = /* @__PURE__ */ __name((ast, times) => walkQuery(ast.root).some((term) => times.has(term.field) && [term.value, term.upper].some((value) => value !== void 0 && value !== "*" && !RELATIVE_TIME.test(value) && !OFFSET.test(value))), "readsZone");
|
|
1147
1164
|
|
|
1148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/model.js
|
|
1149
1166
|
var MEETING_CALL_DIRECTIONS = ["in", "out"];
|
|
1150
1167
|
|
|
1151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
1152
1169
|
var text = string();
|
|
1153
1170
|
var count = pipe(number(), integer(), minValue(0));
|
|
1154
1171
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -1248,7 +1265,7 @@ var MEETING_QUERY = {
|
|
|
1248
1265
|
})
|
|
1249
1266
|
};
|
|
1250
1267
|
|
|
1251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/store.js
|
|
1252
1269
|
var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
|
|
1253
1270
|
var TRANSCRIPT_WORDS = [
|
|
1254
1271
|
"Transcript",
|
|
@@ -1260,7 +1277,7 @@ var TRANSCRIPT_WORDS = [
|
|
|
1260
1277
|
];
|
|
1261
1278
|
var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
|
|
1262
1279
|
|
|
1263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1264
1281
|
var text2 = string();
|
|
1265
1282
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1266
1283
|
var iso2 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
|
|
@@ -1544,7 +1561,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1544
1561
|
};
|
|
1545
1562
|
}, "meetingHitsList");
|
|
1546
1563
|
|
|
1547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
1548
1565
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1549
1566
|
const parsed = urlOf(url);
|
|
1550
1567
|
if (!parsed)
|
|
@@ -1578,7 +1595,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
1578
1595
|
}
|
|
1579
1596
|
}, "urlOf");
|
|
1580
1597
|
|
|
1581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1582
1599
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1583
1600
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1584
1601
|
var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
|
|
@@ -1615,11 +1632,11 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1615
1632
|
return kept;
|
|
1616
1633
|
}, "entryMetadata");
|
|
1617
1634
|
|
|
1618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/calls.js
|
|
1619
1636
|
var CALL_DIRECTIONS = ["incoming", "outgoing", "internal"];
|
|
1620
1637
|
var CALL_OUTCOMES = ["answered", "voicemail", "busy", "no_answer", "failed"];
|
|
1621
1638
|
|
|
1622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
|
|
1623
1640
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
1624
1641
|
var ms = count3;
|
|
1625
1642
|
var id = pipe(number(), integer(), minValue(1));
|
|
@@ -1702,7 +1719,7 @@ var callStatsSchema = strictObject({
|
|
|
1702
1719
|
});
|
|
1703
1720
|
var callStats = callStatsSchema;
|
|
1704
1721
|
|
|
1705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
1706
1723
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
1707
1724
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
1708
1725
|
const zone = timeZone ?? "UTC";
|
|
@@ -1837,10 +1854,10 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
1837
1854
|
};
|
|
1838
1855
|
}, "aggregateMeetingStats");
|
|
1839
1856
|
|
|
1840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
|
|
1841
1858
|
var CALLBACK_WITHIN_MS = 24 * 60 * 60 * 1e3;
|
|
1842
1859
|
|
|
1843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1844
1861
|
import { createHash } from "node:crypto";
|
|
1845
1862
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1846
1863
|
reference: cue2.reference,
|
|
@@ -1854,7 +1871,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
1854
1871
|
text: cue2.text
|
|
1855
1872
|
})).digest("hex"), "meetingCueFingerprint");
|
|
1856
1873
|
|
|
1857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1858
1875
|
var EVENT_QUERY = defineQuery({
|
|
1859
1876
|
entity: "event",
|
|
1860
1877
|
backend: "sql",
|
|
@@ -1870,7 +1887,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
1870
1887
|
]
|
|
1871
1888
|
});
|
|
1872
1889
|
|
|
1873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1874
1891
|
var PARTICIPANT_RESPONSES = ["needs-action", "accepted", "tentative", "declined", "delegated"];
|
|
1875
1892
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1876
1893
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
@@ -1894,7 +1911,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
1894
1911
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1895
1912
|
}, "entryInWindow");
|
|
1896
1913
|
|
|
1897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1898
1915
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
|
|
1899
1916
|
const current = await store.meeting(details.meeting.id);
|
|
1900
1917
|
if (!current)
|
|
@@ -1939,7 +1956,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
|
|
|
1939
1956
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
1940
1957
|
}, "linkEvent");
|
|
1941
1958
|
|
|
1942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1943
1960
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1944
1961
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1945
1962
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -1963,7 +1980,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
1963
1980
|
};
|
|
1964
1981
|
}, "validateMeetingParticipantSearch");
|
|
1965
1982
|
|
|
1966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1967
1984
|
var MeetingError = class extends CliError {
|
|
1968
1985
|
static {
|
|
1969
1986
|
__name(this, "MeetingError");
|
|
@@ -2102,7 +2119,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
|
|
|
2102
2119
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
2103
2120
|
}, "meetingSummaryAnswer");
|
|
2104
2121
|
|
|
2105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
2106
2123
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
2107
2124
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
2108
2125
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -2199,10 +2216,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
|
2199
2216
|
};
|
|
2200
2217
|
}, "exportMeeting");
|
|
2201
2218
|
|
|
2202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
2203
2220
|
import { createHash as createHash2 } from "node:crypto";
|
|
2204
2221
|
|
|
2205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
2206
2223
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
2207
2224
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
2208
2225
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
@@ -2213,7 +2230,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
2213
2230
|
return new Date(value).toISOString();
|
|
2214
2231
|
}, "meetingTimestamp");
|
|
2215
2232
|
|
|
2216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
2217
2234
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
2218
2235
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
2219
2236
|
throw new CliError("validation_error", message);
|
|
@@ -2388,7 +2405,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
|
2388
2405
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
2389
2406
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
2390
2407
|
|
|
2391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
2392
2409
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
2393
2410
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
2394
2411
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -2399,7 +2416,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
2399
2416
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
2400
2417
|
var meetingFindingFingerprint = findingFingerprint;
|
|
2401
2418
|
|
|
2402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2403
2420
|
var LATIN_WORDS = {
|
|
2404
2421
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2405
2422
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2438,54 +2455,270 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2438
2455
|
latin += countOf(text6, LATIN);
|
|
2439
2456
|
ukrainian += countOf(text6, UKRAINIAN);
|
|
2440
2457
|
}
|
|
2441
|
-
const letters = cyrillic + latin;
|
|
2442
|
-
if (letters < MIN_LETTERS)
|
|
2443
|
-
return null;
|
|
2444
|
-
if (cyrillic / letters >= DOMINANT)
|
|
2445
|
-
return ukrainian / cyrillic >= 0.01 ? "uk" : "ru";
|
|
2446
|
-
if (latin / letters >= DOMINANT)
|
|
2447
|
-
return latinLanguage(all);
|
|
2448
|
-
return null;
|
|
2449
|
-
}, "transcriptLanguage");
|
|
2450
|
-
|
|
2451
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2452
|
-
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
2453
|
-
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
2454
|
-
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2455
|
-
}, "contentHash");
|
|
2456
|
-
var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
2457
|
-
if (name === null)
|
|
2458
|
-
return null;
|
|
2459
|
-
const matches2 = participants.flatMap((p, i) => p.displayName === name ? [i] : []);
|
|
2460
|
-
return matches2.length === 1 ? matches2[0] ?? null : null;
|
|
2461
|
-
}, "speakerPosition");
|
|
2462
|
-
var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
|
|
2463
|
-
source,
|
|
2464
|
-
format,
|
|
2465
|
-
language: transcriptLanguage(lines.map((line2) => line2.text)),
|
|
2466
|
-
contentHash: await contentHash(hashText),
|
|
2467
|
-
externalCreatedAt: null,
|
|
2468
|
-
metadata: null,
|
|
2469
|
-
deletedAt: null,
|
|
2470
|
-
rows: lines.map((line2, position) => ({
|
|
2471
|
-
position,
|
|
2472
|
-
startMs: line2.startMs,
|
|
2473
|
-
endMs: line2.endMs,
|
|
2474
|
-
speakerParticipantPosition: speakerPosition(line2.speaker, participants),
|
|
2475
|
-
speakerName: line2.speaker,
|
|
2476
|
-
text: line2.text,
|
|
2477
|
-
normalizedText: null,
|
|
2478
|
-
metadata: null
|
|
2479
|
-
}))
|
|
2480
|
-
}), "transcriptInput");
|
|
2481
|
-
var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
2482
|
-
const time = Date.parse(value);
|
|
2483
|
-
if (!Number.isFinite(time))
|
|
2484
|
-
throw new Error("Invalid meeting timestamp");
|
|
2485
|
-
return time;
|
|
2486
|
-
}, "timestamp");
|
|
2458
|
+
const letters = cyrillic + latin;
|
|
2459
|
+
if (letters < MIN_LETTERS)
|
|
2460
|
+
return null;
|
|
2461
|
+
if (cyrillic / letters >= DOMINANT)
|
|
2462
|
+
return ukrainian / cyrillic >= 0.01 ? "uk" : "ru";
|
|
2463
|
+
if (latin / letters >= DOMINANT)
|
|
2464
|
+
return latinLanguage(all);
|
|
2465
|
+
return null;
|
|
2466
|
+
}, "transcriptLanguage");
|
|
2467
|
+
|
|
2468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2469
|
+
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
2470
|
+
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
2471
|
+
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2472
|
+
}, "contentHash");
|
|
2473
|
+
var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
2474
|
+
if (name === null)
|
|
2475
|
+
return null;
|
|
2476
|
+
const matches2 = participants.flatMap((p, i) => p.displayName === name ? [i] : []);
|
|
2477
|
+
return matches2.length === 1 ? matches2[0] ?? null : null;
|
|
2478
|
+
}, "speakerPosition");
|
|
2479
|
+
var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
|
|
2480
|
+
source,
|
|
2481
|
+
format,
|
|
2482
|
+
language: transcriptLanguage(lines.map((line2) => line2.text)),
|
|
2483
|
+
contentHash: await contentHash(hashText),
|
|
2484
|
+
externalCreatedAt: null,
|
|
2485
|
+
metadata: null,
|
|
2486
|
+
deletedAt: null,
|
|
2487
|
+
rows: lines.map((line2, position) => ({
|
|
2488
|
+
position,
|
|
2489
|
+
startMs: line2.startMs,
|
|
2490
|
+
endMs: line2.endMs,
|
|
2491
|
+
speakerParticipantPosition: speakerPosition(line2.speaker, participants),
|
|
2492
|
+
speakerName: line2.speaker,
|
|
2493
|
+
text: line2.text,
|
|
2494
|
+
normalizedText: null,
|
|
2495
|
+
metadata: null
|
|
2496
|
+
}))
|
|
2497
|
+
}), "transcriptInput");
|
|
2498
|
+
var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
2499
|
+
const time = Date.parse(value);
|
|
2500
|
+
if (!Number.isFinite(time))
|
|
2501
|
+
throw new Error("Invalid meeting timestamp");
|
|
2502
|
+
return time;
|
|
2503
|
+
}, "timestamp");
|
|
2504
|
+
|
|
2505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2506
|
+
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2507
|
+
const { identityExternalId, phone, ...fields } = p;
|
|
2508
|
+
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
2509
|
+
return {
|
|
2510
|
+
...fields,
|
|
2511
|
+
identity: {
|
|
2512
|
+
provider,
|
|
2513
|
+
externalId,
|
|
2514
|
+
name: p.displayName,
|
|
2515
|
+
...phone?.trim() ? { phone } : {},
|
|
2516
|
+
metadata: p.metadata,
|
|
2517
|
+
associatePerson: Boolean(identityExternalId?.trim() || p.email?.trim() || p.externalId?.trim())
|
|
2518
|
+
}
|
|
2519
|
+
};
|
|
2520
|
+
}, "participantInput");
|
|
2521
|
+
var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
|
|
2522
|
+
var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
|
|
2523
|
+
const startedAt = timestamp2(m.occurrence.startedAt);
|
|
2524
|
+
const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
2525
|
+
if (given !== null && given < startedAt)
|
|
2526
|
+
throw new Error("Meeting ends before it starts");
|
|
2527
|
+
const keptEnd = kept?.endedAt ?? null;
|
|
2528
|
+
const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
|
|
2529
|
+
const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
|
|
2530
|
+
const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
|
|
2531
|
+
const meeting2 = {
|
|
2532
|
+
accountId,
|
|
2533
|
+
externalId: m.occurrence.id,
|
|
2534
|
+
title: m.occurrence.title,
|
|
2535
|
+
description: m.description ?? kept?.description ?? null,
|
|
2536
|
+
location: m.location ?? kept?.location ?? null,
|
|
2537
|
+
joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
|
|
2538
|
+
startedAt,
|
|
2539
|
+
endedAt,
|
|
2540
|
+
durationMs: endedAt === null ? null : endedAt - startedAt,
|
|
2541
|
+
timezone: m.timezone ?? kept?.timezone ?? null,
|
|
2542
|
+
hostIdentityId: kept?.hostIdentityId ?? null,
|
|
2543
|
+
...count7 === void 0 ? {} : { participantsCount: count7 },
|
|
2544
|
+
...m.call ? { direction: m.call.direction ?? null, clientPhone: m.call.clientPhone ?? null } : {},
|
|
2545
|
+
metadata,
|
|
2546
|
+
deletedAt: null
|
|
2547
|
+
};
|
|
2548
|
+
if (m.series)
|
|
2549
|
+
meeting2.series = {
|
|
2550
|
+
externalId: m.series.id,
|
|
2551
|
+
title: m.series.title,
|
|
2552
|
+
description: null,
|
|
2553
|
+
kind: m.series.kind ?? null,
|
|
2554
|
+
recurrence: m.series.recurrence ?? null,
|
|
2555
|
+
hostIdentityId: null,
|
|
2556
|
+
joinUrl: m.series.joinUrl ?? null,
|
|
2557
|
+
metadata: null,
|
|
2558
|
+
deletedAt: null
|
|
2559
|
+
};
|
|
2560
|
+
return meeting2;
|
|
2561
|
+
}, "sourceMeetingInput");
|
|
2562
|
+
var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts, { accountId, now, kept }) => {
|
|
2563
|
+
const id4 = m.occurrence.id;
|
|
2564
|
+
const { participants: sourceParticipants, transcript: lines, chat, summary } = parts;
|
|
2565
|
+
const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], accountId);
|
|
2566
|
+
const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
|
|
2567
|
+
const linked = sourceParticipants !== void 0;
|
|
2568
|
+
const format = source.transcriptFormat ?? null;
|
|
2569
|
+
const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
|
|
2570
|
+
const details = await store.saveMeeting({
|
|
2571
|
+
meeting: meeting2,
|
|
2572
|
+
participants: sourceParticipants ? participants : void 0,
|
|
2573
|
+
transcripts,
|
|
2574
|
+
chat: chat?.map((line2) => ({
|
|
2575
|
+
externalId: null,
|
|
2576
|
+
sentAt: timestamp2(line2.sentAt),
|
|
2577
|
+
senderParticipantPosition: speakerPosition(line2.sender, participants),
|
|
2578
|
+
senderName: line2.sender,
|
|
2579
|
+
recipient: null,
|
|
2580
|
+
text: line2.text,
|
|
2581
|
+
normalizedText: null,
|
|
2582
|
+
metadata: null
|
|
2583
|
+
})),
|
|
2584
|
+
summaries: summary ? [
|
|
2585
|
+
{
|
|
2586
|
+
...summary,
|
|
2587
|
+
source: summary.source ?? source.name,
|
|
2588
|
+
content: summary.content ?? null,
|
|
2589
|
+
docUrl: summary.docUrl ?? null,
|
|
2590
|
+
externalCreatedAt: summary.externalCreatedAt ?? null,
|
|
2591
|
+
externalUpdatedAt: summary.externalUpdatedAt ?? null,
|
|
2592
|
+
metadata: summary.metadata ?? null
|
|
2593
|
+
}
|
|
2594
|
+
] : void 0,
|
|
2595
|
+
attachments: parts.files ?? void 0,
|
|
2596
|
+
documents: parts.documents ?? void 0,
|
|
2597
|
+
now
|
|
2598
|
+
});
|
|
2599
|
+
if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
|
|
2600
|
+
await store.saveMeeting({
|
|
2601
|
+
meeting: meeting2,
|
|
2602
|
+
transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
|
|
2603
|
+
unlinked`, format)],
|
|
2604
|
+
now
|
|
2605
|
+
});
|
|
2606
|
+
await linkEvent(store, details, now, { create: source.createsEvents !== false });
|
|
2607
|
+
return details;
|
|
2608
|
+
}, "saveSourceMeeting");
|
|
2609
|
+
var startOf = /* @__PURE__ */ __name((m) => {
|
|
2610
|
+
const at = Date.parse(m.occurrence.startedAt);
|
|
2611
|
+
return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
|
|
2612
|
+
}, "startOf");
|
|
2613
|
+
var indexSaved = /* @__PURE__ */ __name(async (store, accountIds, report) => {
|
|
2614
|
+
const indexSearch = store.indexSearch?.bind(store);
|
|
2615
|
+
if (!indexSearch || report.meetings === 0)
|
|
2616
|
+
return;
|
|
2617
|
+
for (const accountId of new Set(accountIds))
|
|
2618
|
+
try {
|
|
2619
|
+
await refreshMeetingIndex({ indexSearch }, accountId);
|
|
2620
|
+
} catch (error) {
|
|
2621
|
+
report.warnings.push({
|
|
2622
|
+
externalId: String(accountId),
|
|
2623
|
+
message: `search index not updated: ${error instanceof Error ? error.message : "failed"}`
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
}, "indexSaved");
|
|
2627
|
+
var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
2628
|
+
const now = options.now ?? Date.now();
|
|
2629
|
+
for (const [name, ms2] of [
|
|
2630
|
+
["lookbackMs", options.lookbackMs ?? 0],
|
|
2631
|
+
["overlapMs", source.overlapMs ?? 0]
|
|
2632
|
+
])
|
|
2633
|
+
if (!Number.isSafeInteger(ms2) || ms2 < 0 || ms2 > 31 * 864e5)
|
|
2634
|
+
throw new Error(`${name} must be an integer from 0 through 31 days`);
|
|
2635
|
+
const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
|
|
2636
|
+
const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
|
|
2637
|
+
const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
|
|
2638
|
+
timestamp2(since);
|
|
2639
|
+
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2640
|
+
let failed = false;
|
|
2641
|
+
let firstFailed;
|
|
2642
|
+
const callers = /* @__PURE__ */ new Set();
|
|
2643
|
+
const linkCallers = /* @__PURE__ */ __name(async () => {
|
|
2644
|
+
if (callers.size === 0 || !store.linkCallers)
|
|
2645
|
+
return;
|
|
2646
|
+
try {
|
|
2647
|
+
await store.linkCallers(source.provider, [...callers]);
|
|
2648
|
+
} catch (error) {
|
|
2649
|
+
report.warnings.push({
|
|
2650
|
+
externalId: source.provider,
|
|
2651
|
+
message: `callers not linked to people: ${error instanceof Error ? error.message : "failed"}`
|
|
2652
|
+
});
|
|
2653
|
+
}
|
|
2654
|
+
}, "linkCallers");
|
|
2655
|
+
const from = timestamp2(since) - lookbackMs;
|
|
2656
|
+
const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
|
|
2657
|
+
for (const [index, m] of meetings.entries()) {
|
|
2658
|
+
const stop = options.budget?.take() ?? null;
|
|
2659
|
+
if (stop) {
|
|
2660
|
+
report.stopped = stop;
|
|
2661
|
+
report.remaining = meetings.length - index;
|
|
2662
|
+
const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
|
|
2663
|
+
if (Number.isFinite(reached) && reached > timestamp2(since))
|
|
2664
|
+
await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
|
|
2665
|
+
await linkCallers();
|
|
2666
|
+
return report;
|
|
2667
|
+
}
|
|
2668
|
+
const id4 = m.occurrence.id;
|
|
2669
|
+
const failedHere = /* @__PURE__ */ __name(() => {
|
|
2670
|
+
failed = true;
|
|
2671
|
+
firstFailed ??= startOf(m);
|
|
2672
|
+
}, "failedHere");
|
|
2673
|
+
const read = /* @__PURE__ */ __name(async (part, call) => {
|
|
2674
|
+
try {
|
|
2675
|
+
return await call();
|
|
2676
|
+
} catch (error) {
|
|
2677
|
+
failedHere();
|
|
2678
|
+
const message = error instanceof Error ? error.message : "could not be read";
|
|
2679
|
+
report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
|
|
2680
|
+
return void 0;
|
|
2681
|
+
}
|
|
2682
|
+
}, "read");
|
|
2683
|
+
try {
|
|
2684
|
+
const sourceParticipants = await read("participants", () => source.participants(id4));
|
|
2685
|
+
const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], options.accountId);
|
|
2686
|
+
const names = /* @__PURE__ */ new Map();
|
|
2687
|
+
for (const p of participants)
|
|
2688
|
+
if (p.displayName !== null) {
|
|
2689
|
+
const identities = names.get(p.displayName) ?? /* @__PURE__ */ new Set();
|
|
2690
|
+
identities.add(p.identity.externalId);
|
|
2691
|
+
names.set(p.displayName, identities);
|
|
2692
|
+
}
|
|
2693
|
+
if ([...names.values()].some((ids2) => ids2.size > 1))
|
|
2694
|
+
report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
|
|
2695
|
+
const lines = await read("transcript", () => source.transcript(id4));
|
|
2696
|
+
const chat = await read("chat", () => source.chat(id4));
|
|
2697
|
+
const summary = await read("summary", () => source.summary(id4));
|
|
2698
|
+
const attachments = await read("files", () => source.files(id4));
|
|
2699
|
+
const listDocuments = source.documents?.bind(source);
|
|
2700
|
+
const documents = listDocuments ? await read("documents", () => listDocuments(id4)) : void 0;
|
|
2701
|
+
await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
|
|
2702
|
+
for (const p of participants)
|
|
2703
|
+
if (p.identity.phone)
|
|
2704
|
+
callers.add(p.identity.externalId);
|
|
2705
|
+
report.meetings++;
|
|
2706
|
+
report.participants += participants.length;
|
|
2707
|
+
report.transcriptRows += lines?.length ?? 0;
|
|
2708
|
+
report.summaries += summary ? 1 : 0;
|
|
2709
|
+
} catch (error) {
|
|
2710
|
+
failedHere();
|
|
2711
|
+
report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
await linkCallers();
|
|
2715
|
+
await indexSaved(store, [options.accountId], report);
|
|
2716
|
+
if (!failed)
|
|
2717
|
+
await store.setCursor(options.accountId, new Date(now).toISOString(), now);
|
|
2718
|
+
return report;
|
|
2719
|
+
}, "pull");
|
|
2487
2720
|
|
|
2488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2489
2722
|
var TranscriptTextError = class extends Error {
|
|
2490
2723
|
static {
|
|
2491
2724
|
__name(this, "TranscriptTextError");
|
|
@@ -2540,7 +2773,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2540
2773
|
return { header, lines };
|
|
2541
2774
|
}, "parseTranscriptText");
|
|
2542
2775
|
|
|
2543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2544
2777
|
var VttError = class extends Error {
|
|
2545
2778
|
static {
|
|
2546
2779
|
__name(this, "VttError");
|
|
@@ -2592,7 +2825,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2592
2825
|
return cues;
|
|
2593
2826
|
}, "parseVtt");
|
|
2594
2827
|
|
|
2595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2596
2829
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2597
2830
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2598
2831
|
for (const file of files) {
|
|
@@ -2618,6 +2851,7 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2618
2851
|
});
|
|
2619
2852
|
}
|
|
2620
2853
|
}
|
|
2854
|
+
await indexSaved(store, files.map((file) => file.meeting.accountId), report);
|
|
2621
2855
|
const zones = new Set(files.map((file) => file.meeting.timezone).filter((zone2) => zone2 !== null && zone2 !== void 0));
|
|
2622
2856
|
const [zone] = zones;
|
|
2623
2857
|
if (zones.size === 1 && zone)
|
|
@@ -2625,10 +2859,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2625
2859
|
return report;
|
|
2626
2860
|
}, "importFiles");
|
|
2627
2861
|
|
|
2628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2629
2863
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2630
2864
|
|
|
2631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2632
2866
|
var MEETING_FIELD_KEYS = Object.freeze({
|
|
2633
2867
|
title: "title",
|
|
2634
2868
|
kind: "kind",
|
|
@@ -2641,7 +2875,7 @@ var MEETING_FIELDS2 = Object.freeze(Object.keys(MEETING_FIELD_KEYS));
|
|
|
2641
2875
|
var meetingFieldFlag = /* @__PURE__ */ __name((field) => `--${MEETING_FIELD_KEYS[field].replaceAll("_", "-")}`, "meetingFieldFlag");
|
|
2642
2876
|
var SNAKE_CASE2 = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
|
|
2643
2877
|
|
|
2644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2645
2879
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2646
2880
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2647
2881
|
if (![before, after].every((value) => Number.isSafeInteger(value) && value >= 0) || before + after > 999 || !Number.isSafeInteger(bytes) || bytes < 2 || bytes > 4194304 || !Number.isSafeInteger(max_read_bytes) || max_read_bytes < 1 || max_read_bytes > 67108864 || expected_fingerprint !== void 0 && (typeof expected_fingerprint !== "string" || !/^[a-f0-9]{64}$/.test(expected_fingerprint)))
|
|
@@ -2662,7 +2896,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
2662
2896
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2663
2897
|
}, "validateMeetingPassage");
|
|
2664
2898
|
|
|
2665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2666
2900
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2667
2901
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2668
2902
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2687,7 +2921,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2687
2921
|
return { ...input, limit, maxReadBytes };
|
|
2688
2922
|
}, "validateMeetingPreparationContext");
|
|
2689
2923
|
|
|
2690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2691
2925
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
2692
2926
|
var id2 = pipe(string(), minLength(1));
|
|
2693
2927
|
var meetingProjectEvidence = strictObject({
|
|
@@ -2808,7 +3042,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
2808
3042
|
};
|
|
2809
3043
|
}, "meetingProjectEvidenceAnswer");
|
|
2810
3044
|
|
|
2811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2812
3046
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2813
3047
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2814
3048
|
if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
|
|
@@ -2828,7 +3062,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
2828
3062
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2829
3063
|
}, "validateMeetingHitSearch");
|
|
2830
3064
|
|
|
2831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2832
3066
|
var ids = {
|
|
2833
3067
|
meeting_id: "meetingId",
|
|
2834
3068
|
identity_id: "participantIdentityId",
|
|
@@ -2919,7 +3153,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
2919
3153
|
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
2920
3154
|
}, "prepareMeetingProjectEvidence");
|
|
2921
3155
|
|
|
2922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2923
3157
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
2924
3158
|
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
2925
3159
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -2927,208 +3161,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
|
|
|
2927
3161
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2928
3162
|
}, "readMeetingProjectEvidence");
|
|
2929
3163
|
|
|
2930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2931
|
-
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2932
|
-
const { identityExternalId, phone, ...fields } = p;
|
|
2933
|
-
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
2934
|
-
return {
|
|
2935
|
-
...fields,
|
|
2936
|
-
identity: {
|
|
2937
|
-
provider,
|
|
2938
|
-
externalId,
|
|
2939
|
-
name: p.displayName,
|
|
2940
|
-
...phone?.trim() ? { phone } : {},
|
|
2941
|
-
metadata: p.metadata,
|
|
2942
|
-
associatePerson: Boolean(identityExternalId?.trim() || p.email?.trim() || p.externalId?.trim())
|
|
2943
|
-
}
|
|
2944
|
-
};
|
|
2945
|
-
}, "participantInput");
|
|
2946
|
-
var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
|
|
2947
|
-
var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
|
|
2948
|
-
const startedAt = timestamp2(m.occurrence.startedAt);
|
|
2949
|
-
const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
2950
|
-
if (given !== null && given < startedAt)
|
|
2951
|
-
throw new Error("Meeting ends before it starts");
|
|
2952
|
-
const keptEnd = kept?.endedAt ?? null;
|
|
2953
|
-
const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
|
|
2954
|
-
const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
|
|
2955
|
-
const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
|
|
2956
|
-
const meeting2 = {
|
|
2957
|
-
accountId,
|
|
2958
|
-
externalId: m.occurrence.id,
|
|
2959
|
-
title: m.occurrence.title,
|
|
2960
|
-
description: m.description ?? kept?.description ?? null,
|
|
2961
|
-
location: m.location ?? kept?.location ?? null,
|
|
2962
|
-
joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
|
|
2963
|
-
startedAt,
|
|
2964
|
-
endedAt,
|
|
2965
|
-
durationMs: endedAt === null ? null : endedAt - startedAt,
|
|
2966
|
-
timezone: m.timezone ?? kept?.timezone ?? null,
|
|
2967
|
-
hostIdentityId: kept?.hostIdentityId ?? null,
|
|
2968
|
-
...count7 === void 0 ? {} : { participantsCount: count7 },
|
|
2969
|
-
...m.call ? { direction: m.call.direction ?? null, clientPhone: m.call.clientPhone ?? null } : {},
|
|
2970
|
-
metadata,
|
|
2971
|
-
deletedAt: null
|
|
2972
|
-
};
|
|
2973
|
-
if (m.series)
|
|
2974
|
-
meeting2.series = {
|
|
2975
|
-
externalId: m.series.id,
|
|
2976
|
-
title: m.series.title,
|
|
2977
|
-
description: null,
|
|
2978
|
-
kind: m.series.kind ?? null,
|
|
2979
|
-
recurrence: m.series.recurrence ?? null,
|
|
2980
|
-
hostIdentityId: null,
|
|
2981
|
-
joinUrl: m.series.joinUrl ?? null,
|
|
2982
|
-
metadata: null,
|
|
2983
|
-
deletedAt: null
|
|
2984
|
-
};
|
|
2985
|
-
return meeting2;
|
|
2986
|
-
}, "sourceMeetingInput");
|
|
2987
|
-
var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts, { accountId, now, kept }) => {
|
|
2988
|
-
const id4 = m.occurrence.id;
|
|
2989
|
-
const { participants: sourceParticipants, transcript: lines, chat, summary } = parts;
|
|
2990
|
-
const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], accountId);
|
|
2991
|
-
const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
|
|
2992
|
-
const linked = sourceParticipants !== void 0;
|
|
2993
|
-
const format = source.transcriptFormat ?? null;
|
|
2994
|
-
const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
|
|
2995
|
-
const details = await store.saveMeeting({
|
|
2996
|
-
meeting: meeting2,
|
|
2997
|
-
participants: sourceParticipants ? participants : void 0,
|
|
2998
|
-
transcripts,
|
|
2999
|
-
chat: chat?.map((line2) => ({
|
|
3000
|
-
externalId: null,
|
|
3001
|
-
sentAt: timestamp2(line2.sentAt),
|
|
3002
|
-
senderParticipantPosition: speakerPosition(line2.sender, participants),
|
|
3003
|
-
senderName: line2.sender,
|
|
3004
|
-
recipient: null,
|
|
3005
|
-
text: line2.text,
|
|
3006
|
-
normalizedText: null,
|
|
3007
|
-
metadata: null
|
|
3008
|
-
})),
|
|
3009
|
-
summaries: summary ? [
|
|
3010
|
-
{
|
|
3011
|
-
...summary,
|
|
3012
|
-
source: summary.source ?? source.name,
|
|
3013
|
-
content: summary.content ?? null,
|
|
3014
|
-
docUrl: summary.docUrl ?? null,
|
|
3015
|
-
externalCreatedAt: summary.externalCreatedAt ?? null,
|
|
3016
|
-
externalUpdatedAt: summary.externalUpdatedAt ?? null,
|
|
3017
|
-
metadata: summary.metadata ?? null
|
|
3018
|
-
}
|
|
3019
|
-
] : void 0,
|
|
3020
|
-
attachments: parts.files ?? void 0,
|
|
3021
|
-
documents: parts.documents ?? void 0,
|
|
3022
|
-
now
|
|
3023
|
-
});
|
|
3024
|
-
if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
|
|
3025
|
-
await store.saveMeeting({
|
|
3026
|
-
meeting: meeting2,
|
|
3027
|
-
transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
|
|
3028
|
-
unlinked`, format)],
|
|
3029
|
-
now
|
|
3030
|
-
});
|
|
3031
|
-
await linkEvent(store, details, now, { create: source.createsEvents !== false });
|
|
3032
|
-
return details;
|
|
3033
|
-
}, "saveSourceMeeting");
|
|
3034
|
-
var startOf = /* @__PURE__ */ __name((m) => {
|
|
3035
|
-
const at = Date.parse(m.occurrence.startedAt);
|
|
3036
|
-
return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
|
|
3037
|
-
}, "startOf");
|
|
3038
|
-
var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
3039
|
-
const now = options.now ?? Date.now();
|
|
3040
|
-
for (const [name, ms2] of [
|
|
3041
|
-
["lookbackMs", options.lookbackMs ?? 0],
|
|
3042
|
-
["overlapMs", source.overlapMs ?? 0]
|
|
3043
|
-
])
|
|
3044
|
-
if (!Number.isSafeInteger(ms2) || ms2 < 0 || ms2 > 31 * 864e5)
|
|
3045
|
-
throw new Error(`${name} must be an integer from 0 through 31 days`);
|
|
3046
|
-
const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
|
|
3047
|
-
const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
|
|
3048
|
-
const since = options.since ?? cursor ?? new Date(now - 30 * 864e5).toISOString();
|
|
3049
|
-
timestamp2(since);
|
|
3050
|
-
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
3051
|
-
let failed = false;
|
|
3052
|
-
let firstFailed;
|
|
3053
|
-
const callers = /* @__PURE__ */ new Set();
|
|
3054
|
-
const linkCallers = /* @__PURE__ */ __name(async () => {
|
|
3055
|
-
if (callers.size === 0 || !store.linkCallers)
|
|
3056
|
-
return;
|
|
3057
|
-
try {
|
|
3058
|
-
await store.linkCallers(source.provider, [...callers]);
|
|
3059
|
-
} catch (error) {
|
|
3060
|
-
report.warnings.push({
|
|
3061
|
-
externalId: source.provider,
|
|
3062
|
-
message: `callers not linked to people: ${error instanceof Error ? error.message : "failed"}`
|
|
3063
|
-
});
|
|
3064
|
-
}
|
|
3065
|
-
}, "linkCallers");
|
|
3066
|
-
const from = timestamp2(since) - lookbackMs;
|
|
3067
|
-
const meetings = (await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString())).toSorted((a, b) => startOf(a) - startOf(b));
|
|
3068
|
-
for (const [index, m] of meetings.entries()) {
|
|
3069
|
-
const stop = options.budget?.take() ?? null;
|
|
3070
|
-
if (stop) {
|
|
3071
|
-
report.stopped = stop;
|
|
3072
|
-
report.remaining = meetings.length - index;
|
|
3073
|
-
const reached = Math.min(startOf(m), firstFailed ?? Number.POSITIVE_INFINITY);
|
|
3074
|
-
if (Number.isFinite(reached) && reached > timestamp2(since))
|
|
3075
|
-
await store.setCursor(options.accountId, new Date(reached).toISOString(), now);
|
|
3076
|
-
await linkCallers();
|
|
3077
|
-
return report;
|
|
3078
|
-
}
|
|
3079
|
-
const id4 = m.occurrence.id;
|
|
3080
|
-
const failedHere = /* @__PURE__ */ __name(() => {
|
|
3081
|
-
failed = true;
|
|
3082
|
-
firstFailed ??= startOf(m);
|
|
3083
|
-
}, "failedHere");
|
|
3084
|
-
const read = /* @__PURE__ */ __name(async (part, call) => {
|
|
3085
|
-
try {
|
|
3086
|
-
return await call();
|
|
3087
|
-
} catch (error) {
|
|
3088
|
-
failedHere();
|
|
3089
|
-
const message = error instanceof Error ? error.message : "could not be read";
|
|
3090
|
-
report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
|
|
3091
|
-
return void 0;
|
|
3092
|
-
}
|
|
3093
|
-
}, "read");
|
|
3094
|
-
try {
|
|
3095
|
-
const sourceParticipants = await read("participants", () => source.participants(id4));
|
|
3096
|
-
const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], options.accountId);
|
|
3097
|
-
const names = /* @__PURE__ */ new Map();
|
|
3098
|
-
for (const p of participants)
|
|
3099
|
-
if (p.displayName !== null) {
|
|
3100
|
-
const identities = names.get(p.displayName) ?? /* @__PURE__ */ new Set();
|
|
3101
|
-
identities.add(p.identity.externalId);
|
|
3102
|
-
names.set(p.displayName, identities);
|
|
3103
|
-
}
|
|
3104
|
-
if ([...names.values()].some((ids2) => ids2.size > 1))
|
|
3105
|
-
report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
|
|
3106
|
-
const lines = await read("transcript", () => source.transcript(id4));
|
|
3107
|
-
const chat = await read("chat", () => source.chat(id4));
|
|
3108
|
-
const summary = await read("summary", () => source.summary(id4));
|
|
3109
|
-
const attachments = await read("files", () => source.files(id4));
|
|
3110
|
-
const listDocuments = source.documents?.bind(source);
|
|
3111
|
-
const documents = listDocuments ? await read("documents", () => listDocuments(id4)) : void 0;
|
|
3112
|
-
await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
|
|
3113
|
-
for (const p of participants)
|
|
3114
|
-
if (p.identity.phone)
|
|
3115
|
-
callers.add(p.identity.externalId);
|
|
3116
|
-
report.meetings++;
|
|
3117
|
-
report.participants += participants.length;
|
|
3118
|
-
report.transcriptRows += lines?.length ?? 0;
|
|
3119
|
-
report.summaries += summary ? 1 : 0;
|
|
3120
|
-
} catch (error) {
|
|
3121
|
-
failedHere();
|
|
3122
|
-
report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
|
|
3123
|
-
}
|
|
3124
|
-
}
|
|
3125
|
-
await linkCallers();
|
|
3126
|
-
if (!failed)
|
|
3127
|
-
await store.setCursor(options.accountId, new Date(now).toISOString(), now);
|
|
3128
|
-
return report;
|
|
3129
|
-
}, "pull");
|
|
3130
|
-
|
|
3131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.106.0_commander@15_8d845c31697914d824aa80d8eec93941/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
3164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
3132
3165
|
var text3 = string();
|
|
3133
3166
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
3134
3167
|
var id3 = pipe(number(), integer(), minValue(1));
|
|
@@ -3326,7 +3359,7 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3326
3359
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3327
3360
|
}), "eventItem");
|
|
3328
3361
|
|
|
3329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
|
|
3330
3363
|
var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
|
|
3331
3364
|
var ISSUES = {
|
|
3332
3365
|
offline: ["permission_error", "meetings.server-offline"],
|
|
@@ -3469,14 +3502,17 @@ var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, q
|
|
|
3469
3502
|
for (const call of asked) {
|
|
3470
3503
|
let cursor = null;
|
|
3471
3504
|
for (let page = 0; page < MEETING_SERVER_BOUNDS.pages; page++) {
|
|
3505
|
+
access.signal?.throwIfAborted();
|
|
3472
3506
|
step.report.calls += 1;
|
|
3473
3507
|
let answer;
|
|
3474
3508
|
try {
|
|
3475
|
-
answer = await source.find(call.window, call.terms, cursor);
|
|
3509
|
+
answer = await source.find(call.window, call.terms, cursor, access.signal);
|
|
3476
3510
|
} catch (error) {
|
|
3511
|
+
access.signal?.throwIfAborted();
|
|
3477
3512
|
return skip(reasonOf(error), error);
|
|
3478
3513
|
}
|
|
3479
3514
|
for (const found of answer.meetings) {
|
|
3515
|
+
access.signal?.throwIfAborted();
|
|
3480
3516
|
if (seen.has(found.meeting.occurrence.id))
|
|
3481
3517
|
continue;
|
|
3482
3518
|
seen.add(found.meeting.occurrence.id);
|
|
@@ -3601,11 +3637,13 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
|
|
|
3601
3637
|
return fromStore("unsupported");
|
|
3602
3638
|
if (access.offline)
|
|
3603
3639
|
return fromStore("offline");
|
|
3640
|
+
access.signal?.throwIfAborted();
|
|
3604
3641
|
step.report.calls = 1;
|
|
3605
3642
|
let full;
|
|
3606
3643
|
try {
|
|
3607
|
-
full = await source.get(providerId);
|
|
3644
|
+
full = await source.get(providerId, access.signal);
|
|
3608
3645
|
} catch (error) {
|
|
3646
|
+
access.signal?.throwIfAborted();
|
|
3609
3647
|
return fromStore(reasonOf(error), error);
|
|
3610
3648
|
}
|
|
3611
3649
|
if (!full) {
|
|
@@ -3618,10 +3656,10 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
|
|
|
3618
3656
|
return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
|
|
3619
3657
|
}, "meetingShowThrough");
|
|
3620
3658
|
|
|
3621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
3622
3660
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
3623
3661
|
|
|
3624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3662
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
3625
3663
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
3626
3664
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3627
3665
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -3651,7 +3689,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3651
3689
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
3652
3690
|
}, "validateMeetingRelatedHistory");
|
|
3653
3691
|
|
|
3654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
3655
3693
|
var text4 = string();
|
|
3656
3694
|
var identifier = pipe(text4, minLength(1));
|
|
3657
3695
|
var nullableText = nullable(text4);
|
|
@@ -3823,14 +3861,14 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
3823
3861
|
meeting_repair: repair
|
|
3824
3862
|
};
|
|
3825
3863
|
|
|
3826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
3827
3865
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
3828
3866
|
|
|
3829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3830
3868
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3831
3869
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3832
3870
|
|
|
3833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3834
3872
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3835
3873
|
input.signal?.throwIfAborted();
|
|
3836
3874
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3851,10 +3889,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3851
3889
|
return { ...input, limit, maxReadBytes };
|
|
3852
3890
|
}, "validateMeetingSeriesHistory");
|
|
3853
3891
|
|
|
3854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3855
3893
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
3856
3894
|
|
|
3857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3858
3896
|
function invalid4(field, response = false) {
|
|
3859
3897
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3860
3898
|
}
|
|
@@ -3883,7 +3921,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3883
3921
|
cursorDetails(value);
|
|
3884
3922
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3885
3923
|
|
|
3886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/meetings/tag-answers.js
|
|
3887
3925
|
var text5 = string();
|
|
3888
3926
|
var storeId = pipe(number(), integer(), minValue(1));
|
|
3889
3927
|
var meetingTagChange = strictObject({
|
|
@@ -3992,6 +4030,8 @@ export {
|
|
|
3992
4030
|
liftMeetingFields,
|
|
3993
4031
|
parseMeetingQuery,
|
|
3994
4032
|
transcriptLanguage,
|
|
4033
|
+
refreshMeetingIndex,
|
|
4034
|
+
pull,
|
|
3995
4035
|
importFiles,
|
|
3996
4036
|
CHAT_MESSAGES_READ,
|
|
3997
4037
|
MEETING_FIELD_KEYS,
|
|
@@ -4007,7 +4047,6 @@ export {
|
|
|
4007
4047
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
4008
4048
|
prepareMeetingProjectEvidence,
|
|
4009
4049
|
readMeetingProjectEvidence,
|
|
4010
|
-
pull,
|
|
4011
4050
|
meetingReview,
|
|
4012
4051
|
meetingLink,
|
|
4013
4052
|
meetingSpeaker,
|