@wirecat/cli-memo 0.131.38 → 0.131.40
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/dist/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-W26PFZ2J.js → all-profiles-QFW2NKJY.js} +5 -5
- package/dist/bundle/{anthropic-SY6QPTQW.js → anthropic-IARLHPYJ.js} +3 -3
- package/dist/bundle/{app-server-WUXDTYU4.js → app-server-L4N5IWJF.js} +35 -35
- package/dist/bundle/auto-24I3FBUW.js +86 -0
- package/dist/bundle/{bun-O3KE32D7.js → bun-NWKIEX53.js} +2 -2
- package/dist/bundle/{bun-sqlite-5X2NBSLA.js → bun-sqlite-HORFVNNY.js} +2 -2
- package/dist/bundle/{chunk-5EBYGKZB.js → chunk-2SZEKYBN.js} +1 -1
- package/dist/bundle/{chunk-5J5RTJUJ.js → chunk-2YJBI3NK.js} +1 -1
- package/dist/bundle/{chunk-32WLB6I3.js → chunk-4EZK5PGX.js} +1 -1
- package/dist/bundle/{chunk-SDIKN2OR.js → chunk-5G3NNIJQ.js} +10 -10
- package/dist/bundle/{chunk-ZP7F76D3.js → chunk-5HSR6U4Z.js} +1 -1
- package/dist/bundle/{chunk-TJNW4L7P.js → chunk-5HXLRQ4Q.js} +43 -43
- package/dist/bundle/{chunk-UUD4QHAN.js → chunk-6E4DCMJ5.js} +4 -4
- package/dist/bundle/{chunk-LV6FBPUQ.js → chunk-6RAU7FD2.js} +11 -11
- package/dist/bundle/{chunk-2Q4DYGNU.js → chunk-756VKGKO.js} +2 -2
- package/dist/bundle/{chunk-XCAGVFRC.js → chunk-A7M74RZH.js} +560 -500
- package/dist/bundle/{chunk-UWJ3RJF4.js → chunk-A7MXWBIX.js} +2 -2
- package/dist/bundle/{chunk-GSVNF5TX.js → chunk-ADMB7OK5.js} +4 -4
- package/dist/bundle/{chunk-2EDP7PDR.js → chunk-AKSNCK5L.js} +279 -303
- package/dist/bundle/{chunk-QTLYWZXB.js → chunk-ASVVDNAS.js} +3 -3
- package/dist/bundle/{chunk-75QQ7MLH.js → chunk-ATR65D7K.js} +8 -8
- package/dist/bundle/{chunk-3G63U4VK.js → chunk-B4XRE67Q.js} +10 -9
- package/dist/bundle/{chunk-L2M3LTQQ.js → chunk-BWNNUEHG.js} +1 -1
- package/dist/bundle/{chunk-WRZP6DJT.js → chunk-CB34NXQP.js} +309 -225
- package/dist/bundle/{chunk-RS5WAI7D.js → chunk-DNZH53VQ.js} +3 -3
- package/dist/bundle/{chunk-K3GMQLFM.js → chunk-EGQCBZVM.js} +2 -2
- package/dist/bundle/{chunk-DVHDIQBI.js → chunk-EGRI2NUT.js} +4 -4
- package/dist/bundle/{chunk-4AXSD77N.js → chunk-EIFPQD57.js} +1 -1
- package/dist/bundle/{chunk-374FSLTB.js → chunk-EQQWJM6B.js} +5 -5
- package/dist/bundle/{chunk-O762IE2F.js → chunk-FBREYLY5.js} +1 -1
- package/dist/bundle/{chunk-S5KSC4B3.js → chunk-FTX3OPWV.js} +27 -27
- package/dist/bundle/{chunk-M3TUIVRK.js → chunk-G3IO2TLK.js} +5 -5
- package/dist/bundle/{chunk-CXWKBOKQ.js → chunk-JGDZ3G4P.js} +3 -3
- package/dist/bundle/{chunk-J7FP7PRV.js → chunk-KAU67PDK.js} +580 -599
- package/dist/bundle/{chunk-4CD37FZU.js → chunk-KGXVJO2V.js} +5 -5
- package/dist/bundle/{chunk-7P3PM3OL.js → chunk-KWGNPUIV.js} +7 -7
- package/dist/bundle/{chunk-JT36R23P.js → chunk-LL5HPYW5.js} +7 -7
- package/dist/bundle/{chunk-2IST54UV.js → chunk-LXQQ7Q34.js} +9 -9
- package/dist/bundle/{chunk-43CMY3YD.js → chunk-M7UHHXSH.js} +1 -1
- package/dist/bundle/{chunk-ZMZVRVCK.js → chunk-MLHRER2H.js} +2 -2
- package/dist/bundle/{chunk-XLUOKHFN.js → chunk-NCC3RXUX.js} +3 -3
- package/dist/bundle/{chunk-TXJYVD5U.js → chunk-OGHWLR5E.js} +1 -1
- package/dist/bundle/{chunk-AJ4SVCBD.js → chunk-OSDA5EZW.js} +286 -274
- package/dist/bundle/{chunk-AOFYLQK2.js → chunk-OZF7QBTS.js} +2 -2
- package/dist/bundle/{chunk-QM5CNTGT.js → chunk-PAE2NZ7S.js} +20 -20
- package/dist/bundle/{chunk-SSQDA7X6.js → chunk-QR5KWOZ2.js} +4 -4
- package/dist/bundle/{chunk-L2CXODLV.js → chunk-RZ3UQFLE.js} +1 -1
- package/dist/bundle/{chunk-FOQBIEL5.js → chunk-SRYOICSG.js} +1 -1
- package/dist/bundle/{chunk-QP7BTVMT.js → chunk-THIXDXP3.js} +2 -2
- package/dist/bundle/{chunk-S2K3FWLA.js → chunk-TWC6UJD2.js} +12 -12
- package/dist/bundle/{chunk-CEENCS5P.js → chunk-U5WIWLWM.js} +6 -6
- package/dist/bundle/{chunk-B4LT2DHH.js → chunk-UEG3BDCX.js} +4 -4
- package/dist/bundle/{chunk-4NJQJZRO.js → chunk-UGHYNVWQ.js} +1 -1
- package/dist/bundle/{chunk-4OF64T67.js → chunk-W3SMUCMB.js} +1 -1
- package/dist/bundle/{chunk-GXCXOITM.js → chunk-WAZWM4KZ.js} +20 -20
- package/dist/bundle/{chunk-F4BXYTIW.js → chunk-WHWACGZX.js} +7 -7
- package/dist/bundle/{chunk-HJTDA7AE.js → chunk-WU6PDHXY.js} +5 -5
- package/dist/bundle/{chunk-4CADISNA.js → chunk-XAWB4WEC.js} +1 -1
- package/dist/bundle/{chunk-5ZKNRR6O.js → chunk-XF7TG5VK.js} +43 -40
- package/dist/bundle/{chunk-CVCL77DZ.js → chunk-XV7M6VWX.js} +4 -4
- package/dist/bundle/{chunk-TJXVMLK4.js → chunk-YWWTEWX3.js} +1 -1
- package/dist/bundle/{chunk-WVXTZWH3.js → chunk-Z6OKSDP3.js} +1 -1
- package/dist/bundle/{chunk-CEOXSWU3.js → chunk-ZH43Q2JO.js} +2 -2
- package/dist/bundle/{command-contract-FRRW2Z4S.js → command-contract-ZRJPMWWI.js} +11 -11
- package/dist/bundle/{decode-RVPTVZ3W.js → decode-MDCEP64X.js} +2 -2
- package/dist/bundle/{echarts-CW6DTALT.js → echarts-RFIQAWMT.js} +2 -2
- package/dist/bundle/{embed-VXWYSZ7X.js → embed-443F7XR4.js} +3 -3
- package/dist/bundle/{embedder-QX3GSPBN.js → embedder-VRDPZFWC.js} +6 -6
- package/dist/bundle/{entry-LBDVYMDG.js → entry-36KBOBA4.js} +4 -4
- package/dist/bundle/failure-QKFNHYKC.js +66 -0
- package/dist/bundle/{first-run-VPR5YFMD.js → first-run-CYZSGJTG.js} +5 -5
- package/dist/bundle/{first-screen-WRKQ4GAM.js → first-screen-UY54KNVU.js} +12 -12
- package/dist/bundle/{instructions-2XLUHPQH.js → instructions-RI2WFMBA.js} +1 -1
- package/dist/bundle/{mcp-RD54TNKO.js → mcp-DHX4GF3A.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-AQ7O3PGH.js → node-H7LWGE5H.js} +2 -2
- package/dist/bundle/{node-sqlite-RKDBK624.js → node-sqlite-N4POELFM.js} +3 -3
- package/dist/bundle/{oauth-ZQCL2HPA.js → oauth-OOUASPSL.js} +4 -4
- package/dist/bundle/{open-ME6M3BWL.js → open-2T52CQDG.js} +2 -2
- package/dist/bundle/{openai-PHW5QKNC.js → openai-76CJYDRJ.js} +7 -7
- package/dist/bundle/{process-4HJLMEHS.js → process-7YATIAKW.js} +1 -1
- package/dist/bundle/{program-EVPU3PMC.js → program-O4I2BGM2.js} +81 -60
- package/dist/bundle/{prompt-U5JMQJPC.js → prompt-MHD5EI75.js} +2 -2
- package/dist/bundle/{recognize-OYKFXOLL.js → recognize-ARCD7XPJ.js} +1 -1
- package/dist/bundle/{remote-IXABNXVH.js → remote-OQ7TUXN3.js} +4 -4
- package/dist/bundle/{rerank-6ASLHI5I.js → rerank-422D4DZR.js} +4 -4
- package/dist/bundle/{serve-ZYQO2Z23.js → serve-ZOT62JRM.js} +6 -6
- package/dist/bundle/server-EISBI6O6.js +61 -0
- package/dist/bundle/{server-5XHYKDVY.js → server-HAZC3T7X.js} +50 -50
- package/dist/bundle/server-NNQ3YRBV.js +48 -0
- package/dist/bundle/{state-5W7BQVQO.js → state-KBW7BI2G.js} +3 -3
- package/dist/bundle/{store-6WW7XV2O.js → store-KZY5FZPD.js} +9 -9
- package/dist/bundle/store-maintenance-command-ZFQOMCLZ.js +48 -0
- package/dist/bundle/update-SAX5XN2C.js +69 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +5 -1
- package/dist/examples.js.map +1 -1
- package/dist/knowledge/command.d.ts.map +1 -1
- package/dist/knowledge/command.js +23 -1
- package/dist/knowledge/command.js.map +1 -1
- package/dist/knowledge/project-status-command.js +1 -1
- package/dist/knowledge/project-status-command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/mail-triage/SKILL.md +2 -2
- package/dist/bundle/auto-2TNLCAEM.js +0 -86
- package/dist/bundle/failure-NBJBRA6G.js +0 -66
- package/dist/bundle/server-BMXFJO2T.js +0 -61
- package/dist/bundle/server-V7JU6YLA.js +0 -48
- package/dist/bundle/store-maintenance-command-YPNP663U.js +0 -48
- package/dist/bundle/update-CVHXLX72.js +0 -69
- /package/dist/bundle/{chunk-FEJOKQPV.js → chunk-5VKETWNU.js} +0 -0
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
duplicates,
|
|
12
12
|
integer,
|
|
13
13
|
isoTime,
|
|
14
|
+
isoTimestamp,
|
|
14
15
|
lazy,
|
|
15
16
|
literal,
|
|
16
17
|
maxValue,
|
|
@@ -23,12 +24,14 @@ import {
|
|
|
23
24
|
pageSchema,
|
|
24
25
|
picklist,
|
|
25
26
|
pipe,
|
|
27
|
+
record,
|
|
26
28
|
reference,
|
|
27
29
|
safeParse,
|
|
28
30
|
stepOf,
|
|
29
31
|
strictObject,
|
|
30
32
|
string,
|
|
31
33
|
union,
|
|
34
|
+
unknown,
|
|
32
35
|
variant
|
|
33
36
|
} from "./chunk-SN63VOE6.js";
|
|
34
37
|
import {
|
|
@@ -118,8 +121,8 @@ var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
|
|
|
118
121
|
day: "2-digit",
|
|
119
122
|
era: "short"
|
|
120
123
|
});
|
|
121
|
-
const dayAt = /* @__PURE__ */ __name((
|
|
122
|
-
const parts = formatter.formatToParts(
|
|
124
|
+
const dayAt = /* @__PURE__ */ __name((time2) => {
|
|
125
|
+
const parts = formatter.formatToParts(time2);
|
|
123
126
|
const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
|
|
124
127
|
const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
|
|
125
128
|
return year * 1e4 + value2("month") * 100 + value2("day");
|
|
@@ -175,11 +178,11 @@ var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {
|
|
|
175
178
|
return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
|
|
176
179
|
if (!ZONED.test(value))
|
|
177
180
|
return wallTime(value, zone, span);
|
|
178
|
-
const
|
|
179
|
-
if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(
|
|
181
|
+
const time2 = Date.parse(value);
|
|
182
|
+
if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time2))
|
|
180
183
|
queryError("query.invalid-date", span);
|
|
181
184
|
calendar(value.slice(0, 10), span);
|
|
182
|
-
return
|
|
185
|
+
return time2;
|
|
183
186
|
}, "zonedMoment");
|
|
184
187
|
var AGO = /^(\d+)(m|h|d)$/u;
|
|
185
188
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
@@ -213,10 +216,10 @@ var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, n
|
|
|
213
216
|
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
|
|
214
217
|
queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
|
|
215
218
|
calendar(value.slice(0, 10), span);
|
|
216
|
-
const
|
|
217
|
-
if (!Number.isFinite(
|
|
219
|
+
const time2 = Date.parse(value);
|
|
220
|
+
if (!Number.isFinite(time2) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
|
|
218
221
|
queryError("query.invalid-date", span);
|
|
219
|
-
return { time, inclusive };
|
|
222
|
+
return { time: time2, inclusive };
|
|
220
223
|
}, "dateEndpoint");
|
|
221
224
|
var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
|
|
222
225
|
const since = lower === upper && AGO.test(lower.toLowerCase());
|
|
@@ -389,13 +392,13 @@ var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
|
|
|
389
392
|
}
|
|
390
393
|
return out;
|
|
391
394
|
}, "decodeEscapes");
|
|
392
|
-
var tokensOf = /* @__PURE__ */ __name((
|
|
395
|
+
var tokensOf = /* @__PURE__ */ __name((text6, fail = queryError) => {
|
|
393
396
|
const tokens = [];
|
|
394
397
|
let at = 0;
|
|
395
398
|
let range = false;
|
|
396
|
-
while (at <
|
|
399
|
+
while (at < text6.length) {
|
|
397
400
|
const start = at;
|
|
398
|
-
const c =
|
|
401
|
+
const c = text6[at] ?? "";
|
|
399
402
|
if (whitespace(c)) {
|
|
400
403
|
at++;
|
|
401
404
|
continue;
|
|
@@ -403,30 +406,30 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
|
|
|
403
406
|
let kind = c;
|
|
404
407
|
if (c === '"' || !range && c === "/") {
|
|
405
408
|
at++;
|
|
406
|
-
while (at <
|
|
407
|
-
if (
|
|
409
|
+
while (at < text6.length && text6[at] !== c) {
|
|
410
|
+
if (text6[at] === "\\" && (c === '"' || text6[at + 1] === "/"))
|
|
408
411
|
at++;
|
|
409
412
|
at++;
|
|
410
413
|
}
|
|
411
|
-
if (at >=
|
|
412
|
-
fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(
|
|
414
|
+
if (at >= text6.length)
|
|
415
|
+
fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(text6, start) : void 0);
|
|
413
416
|
at++;
|
|
414
|
-
if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(
|
|
417
|
+
if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text6.slice(at)))
|
|
415
418
|
fail("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
|
|
416
419
|
kind = c === '"' ? "quoted" : "regex";
|
|
417
420
|
} else if (range && c !== "]" && c !== "}") {
|
|
418
|
-
while (at <
|
|
421
|
+
while (at < text6.length && !whitespace(text6[at] ?? "") && !["]", "}"].includes(text6[at] ?? ""))
|
|
419
422
|
at++;
|
|
420
423
|
kind = "rangeValue";
|
|
421
424
|
} else if (reserved.has(c)) {
|
|
422
425
|
if (c === "\\") {
|
|
423
426
|
at += 2;
|
|
424
|
-
while (at <
|
|
427
|
+
while (at < text6.length && !whitespace(text6[at] ?? "") && (!reserved.has(text6[at] ?? "") || ["+", "-"].includes(text6[at] ?? "")))
|
|
425
428
|
at++;
|
|
426
429
|
kind = "term";
|
|
427
430
|
} else {
|
|
428
431
|
at++;
|
|
429
|
-
if ((c === "<" || c === ">") &&
|
|
432
|
+
if ((c === "<" || c === ">") && text6[at] === "=") {
|
|
430
433
|
at++;
|
|
431
434
|
kind += "=";
|
|
432
435
|
}
|
|
@@ -437,15 +440,15 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
|
|
|
437
440
|
}
|
|
438
441
|
} else {
|
|
439
442
|
at++;
|
|
440
|
-
while (at <
|
|
441
|
-
const next =
|
|
443
|
+
while (at < text6.length) {
|
|
444
|
+
const next = text6[at] ?? "";
|
|
442
445
|
if (next === "\\") {
|
|
443
|
-
if (at + 1 >=
|
|
446
|
+
if (at + 1 >= text6.length)
|
|
444
447
|
fail("query.invalid-escape", { start: at, end: at + 1 });
|
|
445
448
|
at += 2;
|
|
446
449
|
continue;
|
|
447
450
|
}
|
|
448
|
-
if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(
|
|
451
|
+
if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(text6.slice(at))) {
|
|
449
452
|
at++;
|
|
450
453
|
continue;
|
|
451
454
|
}
|
|
@@ -454,19 +457,19 @@ var tokensOf = /* @__PURE__ */ __name((text5, fail = queryError) => {
|
|
|
454
457
|
at++;
|
|
455
458
|
}
|
|
456
459
|
const [field, colon] = tokens.slice(-2);
|
|
457
|
-
if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start &&
|
|
458
|
-
while (at <
|
|
460
|
+
if (field?.kind === "term" && colon?.kind === ":" && colon.span.end === start && text6[at] === ":" && /^[a-z][a-z_-]*$/u.test(text6.slice(start, at)) && /^:[^\s()"]/u.test(text6.slice(at)))
|
|
461
|
+
while (at < text6.length && !whitespace(text6[at] ?? "") && !["(", ")", '"'].includes(text6[at] ?? ""))
|
|
459
462
|
at++;
|
|
460
|
-
const raw =
|
|
463
|
+
const raw = text6.slice(start, at);
|
|
461
464
|
kind = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
|
|
462
465
|
}
|
|
463
|
-
tokens.push({ kind, raw:
|
|
466
|
+
tokens.push({ kind, raw: text6.slice(start, at), span: { start, end: at } });
|
|
464
467
|
}
|
|
465
468
|
tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
|
|
466
469
|
return tokens;
|
|
467
470
|
}, "tokensOf");
|
|
468
|
-
var quoteHint = /* @__PURE__ */ __name((
|
|
469
|
-
for (const match of
|
|
471
|
+
var quoteHint = /* @__PURE__ */ __name((text6, at) => {
|
|
472
|
+
for (const match of text6.matchAll(/(?<=^|[\s(])([\p{L}\p{N}_.-]+):([^\s"()]+)/gu)) {
|
|
470
473
|
const [whole, field, value = ""] = match;
|
|
471
474
|
if (at < match.index || at > match.index + whole.length)
|
|
472
475
|
continue;
|
|
@@ -474,17 +477,17 @@ var quoteHint = /* @__PURE__ */ __name((text5, at) => {
|
|
|
474
477
|
}
|
|
475
478
|
return void 0;
|
|
476
479
|
}, "quoteHint");
|
|
477
|
-
var regexHint = /* @__PURE__ */ __name((
|
|
478
|
-
const word = `${/[^\s()"]*$/u.exec(
|
|
479
|
-
return quoteHint(
|
|
480
|
+
var regexHint = /* @__PURE__ */ __name((text6, at) => {
|
|
481
|
+
const word = `${/[^\s()"]*$/u.exec(text6.slice(0, at))?.[0] ?? ""}${/^[^\s()"]*/u.exec(text6.slice(at))?.[0] ?? ""}`;
|
|
482
|
+
return quoteHint(text6, at) ?? `/ starts a regular expression; put the value in quotes: "${word}"`;
|
|
480
483
|
}, "regexHint");
|
|
481
|
-
var parseLucene = /* @__PURE__ */ __name((
|
|
482
|
-
const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(
|
|
483
|
-
if (
|
|
484
|
-
fail("query.too-large", { start: 0, end:
|
|
485
|
-
const tokens = tokensOf(
|
|
484
|
+
var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proximity = false, ...context3 } = {}) => {
|
|
485
|
+
const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(text6, span.start), context3), "fail");
|
|
486
|
+
if (text6.length > QUERY_LIMITS.bytes || new TextEncoder().encode(text6).length > QUERY_LIMITS.bytes)
|
|
487
|
+
fail("query.too-large", { start: 0, end: text6.length });
|
|
488
|
+
const tokens = tokensOf(text6, fail);
|
|
486
489
|
let at = 0;
|
|
487
|
-
let
|
|
490
|
+
let count7 = 0;
|
|
488
491
|
let depth = 0;
|
|
489
492
|
const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
|
|
490
493
|
const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
|
|
@@ -494,7 +497,7 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
|
|
|
494
497
|
return take();
|
|
495
498
|
}, "expect");
|
|
496
499
|
const built = /* @__PURE__ */ __name((node) => {
|
|
497
|
-
if (++
|
|
500
|
+
if (++count7 > QUERY_LIMITS.nodes)
|
|
498
501
|
fail("query.too-large", node.span);
|
|
499
502
|
return node;
|
|
500
503
|
}, "built");
|
|
@@ -648,8 +651,8 @@ var parseLucene = /* @__PURE__ */ __name((text5, { defaultField = "text", proxim
|
|
|
648
651
|
}
|
|
649
652
|
return { version: 1, language: "lucene-v1", root };
|
|
650
653
|
}, "parseLucene");
|
|
651
|
-
var implicitTextTerms = /* @__PURE__ */ __name((
|
|
652
|
-
const tokens = tokensOf(
|
|
654
|
+
var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
|
|
655
|
+
const tokens = tokensOf(text6);
|
|
653
656
|
if (tokens.some(({ kind }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind)))
|
|
654
657
|
return /* @__PURE__ */ new Set();
|
|
655
658
|
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] : []));
|
|
@@ -739,14 +742,14 @@ var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
|
739
742
|
}), "describeQuery");
|
|
740
743
|
var exampleProblems = /* @__PURE__ */ __name((registry) => {
|
|
741
744
|
const syntaxOnly = { ...registry, backend: "sql" };
|
|
742
|
-
const problem = /* @__PURE__ */ __name((
|
|
745
|
+
const problem = /* @__PURE__ */ __name((text6, field) => {
|
|
743
746
|
try {
|
|
744
|
-
const named = walkQuery(validateQuery(parseLucene(
|
|
745
|
-
return named.every((node) => node.field === field) ? void 0 : `"${
|
|
747
|
+
const named = walkQuery(validateQuery(parseLucene(text6, { defaultField: "none" }), syntaxOnly).root);
|
|
748
|
+
return named.every((node) => node.field === field) ? void 0 : `"${text6}" does not name ${field}`;
|
|
746
749
|
} catch (failure) {
|
|
747
750
|
if (!isCliError(failure))
|
|
748
751
|
throw failure;
|
|
749
|
-
return `"${
|
|
752
|
+
return `"${text6}": ${failure.message}`;
|
|
750
753
|
}
|
|
751
754
|
}, "problem");
|
|
752
755
|
const defaults = (registry.defaults ?? []).map((term) => {
|
|
@@ -802,7 +805,7 @@ var QUERY_REASONS = defineReasons([
|
|
|
802
805
|
})));
|
|
803
806
|
|
|
804
807
|
// node_modules/.pnpm/@wirecat+cli-base@0.78.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
|
|
805
|
-
var wordsOf = /* @__PURE__ */ __name((
|
|
808
|
+
var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
806
809
|
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
807
810
|
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
808
811
|
var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
@@ -810,10 +813,10 @@ var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
|
810
813
|
return false;
|
|
811
814
|
if (node.operator === "wildcard" && node.value === "*")
|
|
812
815
|
return true;
|
|
813
|
-
const
|
|
816
|
+
const text6 = String(value);
|
|
814
817
|
switch (field.type) {
|
|
815
818
|
case "txt": {
|
|
816
|
-
const words2 = wordsOf(
|
|
819
|
+
const words2 = wordsOf(text6);
|
|
817
820
|
if (node.operator === "wildcard")
|
|
818
821
|
return words2.some((word) => pattern(node.value).test(word));
|
|
819
822
|
const wanted = wordsOf(node.value);
|
|
@@ -827,13 +830,13 @@ var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
|
827
830
|
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
828
831
|
}
|
|
829
832
|
case "time": {
|
|
830
|
-
const
|
|
833
|
+
const time2 = Date.parse(text6);
|
|
831
834
|
const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
832
835
|
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
833
|
-
return (range.lower === void 0 || (range.lower_inclusive ?
|
|
836
|
+
return (range.lower === void 0 || (range.lower_inclusive ? time2 >= range.lower : time2 > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time2 <= range.upper : time2 < range.upper));
|
|
834
837
|
}
|
|
835
838
|
default:
|
|
836
|
-
return node.operator === "wildcard" ? pattern(node.value).test(
|
|
839
|
+
return node.operator === "wildcard" ? pattern(node.value).test(text6) : text6.toLowerCase() === node.value.toLowerCase();
|
|
837
840
|
}
|
|
838
841
|
}, "matchOne");
|
|
839
842
|
var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
@@ -856,7 +859,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
|
856
859
|
}, "matches");
|
|
857
860
|
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
858
861
|
|
|
859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
860
863
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
861
864
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
862
865
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
@@ -874,8 +877,8 @@ var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
|
874
877
|
}
|
|
875
878
|
return `meeting:${parts.join("/")}`;
|
|
876
879
|
}, "formatMeetingReference");
|
|
877
|
-
var parseMeetingReference = /* @__PURE__ */ __name((
|
|
878
|
-
const value =
|
|
880
|
+
var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
|
|
881
|
+
const value = text6.trim();
|
|
879
882
|
if (!value.startsWith("meeting:"))
|
|
880
883
|
throw invalid();
|
|
881
884
|
const parts = value.slice(8).split("/");
|
|
@@ -891,9 +894,9 @@ var parseMeetingReference = /* @__PURE__ */ __name((text5) => {
|
|
|
891
894
|
};
|
|
892
895
|
return reference2;
|
|
893
896
|
}, "parseMeetingReference");
|
|
894
|
-
var canonicalMeetingReference = /* @__PURE__ */ __name((
|
|
897
|
+
var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
|
|
895
898
|
|
|
896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
897
900
|
var text = string();
|
|
898
901
|
var count = pipe(number(), integer(), minValue(0));
|
|
899
902
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -958,7 +961,7 @@ var MEETING_QUERY = {
|
|
|
958
961
|
})
|
|
959
962
|
};
|
|
960
963
|
|
|
961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
962
965
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
963
966
|
const parsed = urlOf(url);
|
|
964
967
|
if (!parsed)
|
|
@@ -992,15 +995,15 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
992
995
|
}
|
|
993
996
|
}, "urlOf");
|
|
994
997
|
|
|
995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
996
999
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
997
1000
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
998
1001
|
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");
|
|
999
|
-
var withoutLinkQueries = /* @__PURE__ */ __name((
|
|
1000
|
-
var calendarText = /* @__PURE__ */ __name((
|
|
1001
|
-
if (!
|
|
1002
|
+
var withoutLinkQueries = /* @__PURE__ */ __name((text6) => text6.replace(/https?:\/\/[^\s<>"')\]]+/giu, (url) => joinUrlWithoutQuery(url) ?? ""), "withoutLinkQueries");
|
|
1003
|
+
var calendarText = /* @__PURE__ */ __name((text6, { dropSecretLines = true } = {}) => {
|
|
1004
|
+
if (!text6)
|
|
1002
1005
|
return null;
|
|
1003
|
-
const kept = htmlToText(
|
|
1006
|
+
const kept = htmlToText(text6).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
|
|
1004
1007
|
const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
|
|
1005
1008
|
return joined || null;
|
|
1006
1009
|
}, "calendarText");
|
|
@@ -1025,7 +1028,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1025
1028
|
return kept;
|
|
1026
1029
|
}, "entryMetadata");
|
|
1027
1030
|
|
|
1028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1029
1032
|
import { createHash } from "node:crypto";
|
|
1030
1033
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1031
1034
|
reference: cue2.reference,
|
|
@@ -1039,7 +1042,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
1039
1042
|
text: cue2.text
|
|
1040
1043
|
})).digest("hex"), "meetingCueFingerprint");
|
|
1041
1044
|
|
|
1042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1043
1046
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1044
1047
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1045
1048
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -1062,7 +1065,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
1062
1065
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1063
1066
|
}, "entryInWindow");
|
|
1064
1067
|
|
|
1065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1066
1069
|
var text2 = string();
|
|
1067
1070
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1068
1071
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -1176,7 +1179,7 @@ var meetingSummaryItem = /* @__PURE__ */ __name((accountId, summary) => ({
|
|
|
1176
1179
|
source: summary.source,
|
|
1177
1180
|
title: summary.title,
|
|
1178
1181
|
overview: summary.overview,
|
|
1179
|
-
sections: summary.sections.map(({ label, text:
|
|
1182
|
+
sections: summary.sections.map(({ label, text: text6 }) => ({ label, text: text6 })),
|
|
1180
1183
|
next_steps: summary.nextSteps,
|
|
1181
1184
|
content: summary.content,
|
|
1182
1185
|
url: summary.docUrl,
|
|
@@ -1297,8 +1300,8 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1297
1300
|
};
|
|
1298
1301
|
}, "meetingHitsList");
|
|
1299
1302
|
|
|
1300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1301
|
-
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((
|
|
1303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1304
|
+
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1302
1305
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1303
1306
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
1304
1307
|
throw new CliError("validation_error", "participant query must contain 1\u2013500 characters without NUL");
|
|
@@ -1321,7 +1324,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
1321
1324
|
};
|
|
1322
1325
|
}, "validateMeetingParticipantSearch");
|
|
1323
1326
|
|
|
1324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1325
1328
|
var MeetingError = class extends CliError {
|
|
1326
1329
|
static {
|
|
1327
1330
|
__name(this, "MeetingError");
|
|
@@ -1348,8 +1351,8 @@ var validateFilter = /* @__PURE__ */ __name((filter) => {
|
|
|
1348
1351
|
if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0))
|
|
1349
1352
|
throw new MeetingError("validation_error", "expected a nonnegative integer");
|
|
1350
1353
|
}, "validateFilter");
|
|
1351
|
-
var meetingShow = /* @__PURE__ */ __name(async (store,
|
|
1352
|
-
const details = await store.meeting(positiveInteger(
|
|
1354
|
+
var meetingShow = /* @__PURE__ */ __name(async (store, id4, accountId) => {
|
|
1355
|
+
const details = await store.meeting(positiveInteger(id4));
|
|
1353
1356
|
if (!details || accountId !== void 0 && details.meeting.accountId !== accountId)
|
|
1354
1357
|
throw new MeetingError("not_found", "meeting not found");
|
|
1355
1358
|
return details;
|
|
@@ -1425,11 +1428,11 @@ var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}, page = 1) =
|
|
|
1425
1428
|
} : {}
|
|
1426
1429
|
};
|
|
1427
1430
|
}, "meetingsList");
|
|
1428
|
-
var meetingsQuery = /* @__PURE__ */ __name((
|
|
1429
|
-
if (
|
|
1431
|
+
var meetingsQuery = /* @__PURE__ */ __name((text6) => {
|
|
1432
|
+
if (text6 === void 0 || text6.trim() === "")
|
|
1430
1433
|
return void 0;
|
|
1431
1434
|
const context3 = { command: "meetings list", guide: MEETING_QUERY_GUIDE };
|
|
1432
|
-
const query = parseLucene(
|
|
1435
|
+
const query = parseLucene(text6, { defaultField: "none", ...context3 });
|
|
1433
1436
|
validateQuery(query, MEETING_QUERY, context3);
|
|
1434
1437
|
return query;
|
|
1435
1438
|
}, "meetingsQuery");
|
|
@@ -1440,20 +1443,20 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
|
|
|
1440
1443
|
throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
|
|
1441
1444
|
return owner;
|
|
1442
1445
|
}, "ownerOf");
|
|
1443
|
-
var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store,
|
|
1444
|
-
const details = await meetingShow(store,
|
|
1446
|
+
var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
|
|
1447
|
+
const details = await meetingShow(store, id4, accountId);
|
|
1445
1448
|
return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
|
|
1446
1449
|
}, "meetingDetailsAnswer");
|
|
1447
|
-
var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store,
|
|
1448
|
-
const details = await meetingShow(store,
|
|
1450
|
+
var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id4, accountId, options = {}) => {
|
|
1451
|
+
const details = await meetingShow(store, id4, accountId);
|
|
1449
1452
|
return wholeList(details.transcripts.filter((t) => (options.history || t.transcript.supersededAt === null) && t.transcript.deletedAt === null).map((t) => meetingTranscriptItem(details.meeting.accountId, t.transcript, t.rows)));
|
|
1450
1453
|
}, "meetingTranscriptAnswer");
|
|
1451
|
-
var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store,
|
|
1452
|
-
const details = await meetingShow(store,
|
|
1454
|
+
var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
|
|
1455
|
+
const details = await meetingShow(store, id4, accountId);
|
|
1453
1456
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
1454
1457
|
}, "meetingSummaryAnswer");
|
|
1455
1458
|
|
|
1456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
1457
1460
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
1458
1461
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
1459
1462
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -1462,10 +1465,10 @@ var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
1462
1465
|
const seconds = Math.floor(milliseconds % 6e4 / 1e3);
|
|
1463
1466
|
return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${String(milliseconds % 1e3).padStart(3, "0")}`;
|
|
1464
1467
|
}, "timestamp");
|
|
1465
|
-
var vttText = /* @__PURE__ */ __name((
|
|
1466
|
-
if (visibleControls(
|
|
1468
|
+
var vttText = /* @__PURE__ */ __name((text6) => {
|
|
1469
|
+
if (visibleControls(text6) !== text6 || /\n\s*\n/.test(text6))
|
|
1467
1470
|
throw new MeetingError("validation_error", "cue paragraphs or control characters require Markdown export");
|
|
1468
|
-
return
|
|
1471
|
+
return text6.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
1469
1472
|
}, "vttText");
|
|
1470
1473
|
var serializeVtt = /* @__PURE__ */ __name((lines) => `WEBVTT
|
|
1471
1474
|
|
|
@@ -1483,9 +1486,9 @@ ${speaker}${vttText(line2.text)}
|
|
|
1483
1486
|
|
|
1484
1487
|
`;
|
|
1485
1488
|
}).join("")}`, "serializeVtt");
|
|
1486
|
-
var markdown = /* @__PURE__ */ __name((
|
|
1487
|
-
var heading = /* @__PURE__ */ __name((
|
|
1488
|
-
var quote = /* @__PURE__ */ __name((
|
|
1489
|
+
var markdown = /* @__PURE__ */ __name((text6) => visibleControls(text6).replace(/[\\`*_{}[\]()<>#+.!|~]/g, "\\$&"), "markdown");
|
|
1490
|
+
var heading = /* @__PURE__ */ __name((text6) => markdown(singleLine(text6)), "heading");
|
|
1491
|
+
var quote = /* @__PURE__ */ __name((text6) => markdown(text6).split(/\r\n|\r|\n/).map((line2) => `> ${line2}`).join("\n"), "quote");
|
|
1489
1492
|
var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
|
|
1490
1493
|
if (transcriptId !== void 0) {
|
|
1491
1494
|
positiveInteger(transcriptId);
|
|
@@ -1496,10 +1499,10 @@ var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
|
|
|
1496
1499
|
}
|
|
1497
1500
|
return details.transcripts.filter((part) => part.transcript.supersededAt === null && part.transcript.deletedAt === null);
|
|
1498
1501
|
}, "transcriptsOf");
|
|
1499
|
-
var exportMeeting = /* @__PURE__ */ __name(async (store,
|
|
1502
|
+
var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
1500
1503
|
if (options.format !== "markdown" && options.format !== "vtt")
|
|
1501
1504
|
throw new MeetingError("validation_error", "export format must be markdown or vtt");
|
|
1502
|
-
const details = await meetingShow(store,
|
|
1505
|
+
const details = await meetingShow(store, id4, options.accountId);
|
|
1503
1506
|
const transcripts = transcriptsOf(details, options.transcriptId);
|
|
1504
1507
|
let content;
|
|
1505
1508
|
if (options.format === "vtt") {
|
|
@@ -1549,7 +1552,7 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
|
|
|
1549
1552
|
};
|
|
1550
1553
|
}, "exportMeeting");
|
|
1551
1554
|
|
|
1552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
1553
1556
|
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
1554
1557
|
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
1555
1558
|
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
@@ -1601,9 +1604,9 @@ var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
|
1601
1604
|
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
1602
1605
|
return invalid2("a payment is an object");
|
|
1603
1606
|
const raw = input;
|
|
1604
|
-
const
|
|
1605
|
-
if (
|
|
1606
|
-
return invalid2(`a payment has no field ${
|
|
1607
|
+
const unknown2 = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
1608
|
+
if (unknown2.length)
|
|
1609
|
+
return invalid2(`a payment has no field ${unknown2.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
1607
1610
|
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
1608
1611
|
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
1609
1612
|
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
@@ -1643,13 +1646,13 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
|
1643
1646
|
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
1644
1647
|
}, "paymentTitle");
|
|
1645
1648
|
|
|
1646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1647
1650
|
import { createHash as createHash2 } from "node:crypto";
|
|
1648
1651
|
|
|
1649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
1650
1653
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
1651
1654
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
1652
|
-
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
|
|
1655
|
+
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
1653
1656
|
const date = value.slice(0, 10);
|
|
1654
1657
|
const instant = Date.parse(`${date}T00:00:00Z`);
|
|
1655
1658
|
if (!Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
|
|
@@ -1657,7 +1660,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
1657
1660
|
return new Date(value).toISOString();
|
|
1658
1661
|
}, "meetingTimestamp");
|
|
1659
1662
|
|
|
1660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1661
1664
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1662
1665
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1663
1666
|
throw new CliError("validation_error", message);
|
|
@@ -1669,23 +1672,32 @@ var findingText = /* @__PURE__ */ __name((value, limit) => {
|
|
|
1669
1672
|
}, "findingText");
|
|
1670
1673
|
var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
|
|
1671
1674
|
var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
|
|
1675
|
+
var findingWhere = /* @__PURE__ */ __name((of) => {
|
|
1676
|
+
const id4 = typeof of.id === "string" ? of.id : null;
|
|
1677
|
+
const kind = typeof of.kind === "string" ? of.kind : null;
|
|
1678
|
+
return {
|
|
1679
|
+
where: id4 || kind ? ` in ${[id4, kind && `(${kind})`].filter(Boolean).join(" ")}` : "",
|
|
1680
|
+
named: { ...id4 ? { finding: id4 } : {}, ...kind ? { kind } : {} }
|
|
1681
|
+
};
|
|
1682
|
+
}, "findingWhere");
|
|
1672
1683
|
var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
|
|
1673
|
-
const
|
|
1674
|
-
if (!
|
|
1684
|
+
const unknown2 = Object.keys(value).filter((key) => !allowed.includes(key));
|
|
1685
|
+
if (!unknown2.length)
|
|
1675
1686
|
return;
|
|
1676
|
-
const fields =
|
|
1687
|
+
const fields = unknown2.map(snakeCase);
|
|
1677
1688
|
const takes = allowed.map(snakeCase);
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
const where = id3 || kind ? ` in ${[id3, kind && `(${kind})`].filter(Boolean).join(" ")}` : "";
|
|
1681
|
-
throw new CliError("validation_error", `unknown ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it takes ${takes.join(", ")}`, {
|
|
1682
|
-
reason: "finding.unknown-field",
|
|
1683
|
-
fields,
|
|
1684
|
-
allowed: takes,
|
|
1685
|
-
...id3 ? { finding: id3 } : {},
|
|
1686
|
-
...kind ? { kind } : {}
|
|
1687
|
-
});
|
|
1689
|
+
const { where, named } = findingWhere(of);
|
|
1690
|
+
throw new CliError("validation_error", `unknown ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it takes ${takes.join(", ")}`, { reason: "finding.unknown-field", fields, allowed: takes, ...named });
|
|
1688
1691
|
}, "findingFields");
|
|
1692
|
+
var findingNeeds = /* @__PURE__ */ __name((value, needed, noun) => {
|
|
1693
|
+
const missing = needed.filter((key) => value[key] === void 0);
|
|
1694
|
+
if (!missing.length)
|
|
1695
|
+
return;
|
|
1696
|
+
const fields = missing.map(snakeCase);
|
|
1697
|
+
const needs = needed.map(snakeCase);
|
|
1698
|
+
const { where, named } = findingWhere(value);
|
|
1699
|
+
throw new CliError("validation_error", `missing ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it needs ${needs.join(", ")}`, { reason: "finding.missing-field", fields, needs, ...named });
|
|
1700
|
+
}, "findingNeeds");
|
|
1689
1701
|
var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
|
|
1690
1702
|
var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
|
|
1691
1703
|
if (!Array.isArray(raw) || raw.length < 1 || raw.length > 8)
|
|
@@ -1706,27 +1718,27 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
|
|
|
1706
1718
|
return evidence;
|
|
1707
1719
|
}, "validEvidence");
|
|
1708
1720
|
var findingId = /* @__PURE__ */ __name((raw, ids2) => {
|
|
1709
|
-
const
|
|
1710
|
-
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(
|
|
1721
|
+
const id4 = findingText(raw, 64);
|
|
1722
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
|
|
1711
1723
|
return invalid3("finding IDs must be unique simple keys");
|
|
1712
|
-
ids2.add(
|
|
1713
|
-
return
|
|
1724
|
+
ids2.add(id4);
|
|
1725
|
+
return id4;
|
|
1714
1726
|
}, "findingId");
|
|
1715
1727
|
var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
1716
1728
|
if (!finding || typeof finding !== "object")
|
|
1717
1729
|
return invalid3("a finding is an object");
|
|
1718
|
-
const
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1730
|
+
const id4 = findingId(finding.id, ids2);
|
|
1731
|
+
const project2 = finding.project === void 0 && rules.anySubject ? void 0 : findingText(finding.project, 64);
|
|
1732
|
+
if (project2 !== void 0 && !/^project:[1-9]\d*$/.test(project2))
|
|
1721
1733
|
return invalid3("a finding names a project reference");
|
|
1722
1734
|
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(findingText(finding.subject, 80))))
|
|
1723
1735
|
return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
|
|
1724
|
-
if (finding.kind === "task" &&
|
|
1736
|
+
if (finding.kind === "task" && project2 === void 0 && !rules.inboxTasks)
|
|
1725
1737
|
return invalid3("a task finding names the project the task goes in");
|
|
1726
1738
|
const evidence = validEvidence(finding.evidence, rules);
|
|
1727
1739
|
const base = {
|
|
1728
|
-
id:
|
|
1729
|
-
...
|
|
1740
|
+
id: id4,
|
|
1741
|
+
...project2 === void 0 ? {} : { project: project2 },
|
|
1730
1742
|
...finding.subject === void 0 ? {} : { subject: finding.subject },
|
|
1731
1743
|
evidence
|
|
1732
1744
|
};
|
|
@@ -1777,8 +1789,10 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1777
1789
|
return invalid3("a task finding type is bug, chore or feature");
|
|
1778
1790
|
if (!["explicit", "inferred"].includes(finding.commitment))
|
|
1779
1791
|
return invalid3("task commitment must be explicit or inferred");
|
|
1780
|
-
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0)
|
|
1781
|
-
return invalid3(
|
|
1792
|
+
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0))
|
|
1793
|
+
return invalid3(`due_at comes with due_evidence: the ${rules.cited} references of this finding's evidence that give the date, as a list of strings such as ["<reference>"]`);
|
|
1794
|
+
if (finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1795
|
+
return invalid3(`assignee comes with assignee_evidence: the ${rules.cited} references of this finding's evidence that name them, as a list of strings such as ["<reference>"]`);
|
|
1782
1796
|
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1783
1797
|
return invalid3("an assignee must be a person reference");
|
|
1784
1798
|
return {
|
|
@@ -1789,15 +1803,18 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1789
1803
|
reason: findingText(finding.reason, 2e3),
|
|
1790
1804
|
commitment: finding.commitment,
|
|
1791
1805
|
...finding.dueAt === void 0 ? {} : {
|
|
1792
|
-
dueAt: meetingTimestamp(finding.dueAt, "
|
|
1793
|
-
dueEvidence: support(finding.dueEvidence, evidence)
|
|
1806
|
+
dueAt: meetingTimestamp(finding.dueAt, "a task's due_at"),
|
|
1807
|
+
dueEvidence: support(finding.dueEvidence, evidence, "due_evidence")
|
|
1794
1808
|
},
|
|
1795
|
-
...finding.assignee === void 0 ? {} : {
|
|
1809
|
+
...finding.assignee === void 0 ? {} : {
|
|
1810
|
+
assignee: finding.assignee,
|
|
1811
|
+
assigneeEvidence: support(finding.assigneeEvidence, evidence, "assignee_evidence")
|
|
1812
|
+
}
|
|
1796
1813
|
};
|
|
1797
1814
|
}, "validateFinding");
|
|
1798
|
-
var support = /* @__PURE__ */ __name((value, evidence) => {
|
|
1815
|
+
var support = /* @__PURE__ */ __name((value, evidence, field) => {
|
|
1799
1816
|
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1800
|
-
return invalid3(
|
|
1817
|
+
return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
|
|
1801
1818
|
return [...new Set(value)].sort();
|
|
1802
1819
|
}, "support");
|
|
1803
1820
|
var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
@@ -1816,7 +1833,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
|
1816
1833
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1817
1834
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1818
1835
|
|
|
1819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1820
1837
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1821
1838
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1822
1839
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -1827,7 +1844,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
1827
1844
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1828
1845
|
var meetingFindingFingerprint = findingFingerprint;
|
|
1829
1846
|
|
|
1830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
1831
1848
|
var text3 = string();
|
|
1832
1849
|
var identifier = pipe(text3, minLength(1));
|
|
1833
1850
|
var nullableText = nullable(text3);
|
|
@@ -1960,7 +1977,7 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
1960
1977
|
meeting_repair: repair
|
|
1961
1978
|
};
|
|
1962
1979
|
|
|
1963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1964
1981
|
var EVENT_QUERY = defineQuery({
|
|
1965
1982
|
entity: "event",
|
|
1966
1983
|
backend: "sql",
|
|
@@ -1976,7 +1993,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
1976
1993
|
]
|
|
1977
1994
|
});
|
|
1978
1995
|
|
|
1979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1980
1997
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
1981
1998
|
const current = await store.meeting(details.meeting.id);
|
|
1982
1999
|
if (!current)
|
|
@@ -1991,7 +2008,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
1991
2008
|
endsAt: meeting2.endedAt ?? meeting2.startedAt
|
|
1992
2009
|
});
|
|
1993
2010
|
if (candidates.length > 1) {
|
|
1994
|
-
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id:
|
|
2011
|
+
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id4 }) => id4), now);
|
|
1995
2012
|
return null;
|
|
1996
2013
|
}
|
|
1997
2014
|
let event2 = candidates[0];
|
|
@@ -2019,7 +2036,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
2019
2036
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
2020
2037
|
}, "linkEvent");
|
|
2021
2038
|
|
|
2022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
2023
2040
|
var context = {
|
|
2024
2041
|
command: "search meetings",
|
|
2025
2042
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -2127,9 +2144,9 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now) => {
|
|
|
2127
2144
|
return { query: rest, request: next };
|
|
2128
2145
|
}, "liftMeetingFields");
|
|
2129
2146
|
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
2130
|
-
var meetingWordsQuery = /* @__PURE__ */ __name((
|
|
2131
|
-
const found =
|
|
2132
|
-
const span = { start: 0, end:
|
|
2147
|
+
var meetingWordsQuery = /* @__PURE__ */ __name((text6) => {
|
|
2148
|
+
const found = text6.match(/[\p{L}\p{N}\p{M}]+/gu) ?? [];
|
|
2149
|
+
const span = { start: 0, end: text6.length };
|
|
2133
2150
|
const clauses = found.map((value) => ({
|
|
2134
2151
|
occur: "must",
|
|
2135
2152
|
node: { kind: "predicate", field: "text", operator: "term", value, span }
|
|
@@ -2138,7 +2155,7 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text5) => {
|
|
|
2138
2155
|
return { version: 1, language: "lucene-v1", root };
|
|
2139
2156
|
}, "meetingWordsQuery");
|
|
2140
2157
|
|
|
2141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2142
2159
|
var LATIN_WORDS = {
|
|
2143
2160
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2144
2161
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2153,11 +2170,11 @@ var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
|
|
|
2153
2170
|
var LATIN = new RegExp("\\p{Script=Latin}", "gu");
|
|
2154
2171
|
var MIN_LETTERS = 20;
|
|
2155
2172
|
var DOMINANT = 0.75;
|
|
2156
|
-
var countOf = /* @__PURE__ */ __name((
|
|
2173
|
+
var countOf = /* @__PURE__ */ __name((text6, pattern2) => text6.match(pattern2)?.length ?? 0, "countOf");
|
|
2157
2174
|
var latinLanguage = /* @__PURE__ */ __name((texts) => {
|
|
2158
2175
|
const votes = /* @__PURE__ */ new Map();
|
|
2159
|
-
for (const
|
|
2160
|
-
for (const word of
|
|
2176
|
+
for (const text6 of texts)
|
|
2177
|
+
for (const word of text6.toLowerCase().split(/[^\p{L}]+/u)) {
|
|
2161
2178
|
const language = LATIN_LANGUAGE.get(word);
|
|
2162
2179
|
if (language)
|
|
2163
2180
|
votes.set(language, (votes.get(language) ?? 0) + 1);
|
|
@@ -2172,10 +2189,10 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2172
2189
|
let cyrillic = 0;
|
|
2173
2190
|
let latin = 0;
|
|
2174
2191
|
let ukrainian = 0;
|
|
2175
|
-
for (const
|
|
2176
|
-
cyrillic += countOf(
|
|
2177
|
-
latin += countOf(
|
|
2178
|
-
ukrainian += countOf(
|
|
2192
|
+
for (const text6 of all) {
|
|
2193
|
+
cyrillic += countOf(text6, CYRILLIC);
|
|
2194
|
+
latin += countOf(text6, LATIN);
|
|
2195
|
+
ukrainian += countOf(text6, UKRAINIAN);
|
|
2179
2196
|
}
|
|
2180
2197
|
const letters = cyrillic + latin;
|
|
2181
2198
|
if (letters < MIN_LETTERS)
|
|
@@ -2187,9 +2204,9 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2187
2204
|
return null;
|
|
2188
2205
|
}, "transcriptLanguage");
|
|
2189
2206
|
|
|
2190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2191
|
-
var contentHash = /* @__PURE__ */ __name(async (
|
|
2192
|
-
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(
|
|
2207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2208
|
+
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
2209
|
+
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
2193
2210
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
2194
2211
|
}, "contentHash");
|
|
2195
2212
|
var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
@@ -2218,13 +2235,13 @@ var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source,
|
|
|
2218
2235
|
}))
|
|
2219
2236
|
}), "transcriptInput");
|
|
2220
2237
|
var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
2221
|
-
const
|
|
2222
|
-
if (!Number.isFinite(
|
|
2238
|
+
const time2 = Date.parse(value);
|
|
2239
|
+
if (!Number.isFinite(time2))
|
|
2223
2240
|
throw new Error("Invalid meeting timestamp");
|
|
2224
|
-
return
|
|
2241
|
+
return time2;
|
|
2225
2242
|
}, "timestamp");
|
|
2226
2243
|
|
|
2227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2228
2245
|
var TranscriptTextError = class extends Error {
|
|
2229
2246
|
static {
|
|
2230
2247
|
__name(this, "TranscriptTextError");
|
|
@@ -2241,10 +2258,10 @@ var LINE = /^\[(\d{2,}):([0-5]\d):([0-5]\d)\]\s*(?:([^:\n]{1,60}):\s*)?([\s\S]*)
|
|
|
2241
2258
|
var RULE = /^[—–-]{10,}[^\n]*(?:\n|$)/;
|
|
2242
2259
|
var EMPTY = /* @__PURE__ */ new Set(["", "\u2014", "-"]);
|
|
2243
2260
|
var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
2244
|
-
const
|
|
2261
|
+
const text6 = input.replace(/^/, "").replace(/\r\n?/g, "\n");
|
|
2245
2262
|
const header = { title: null, date: null, meetingId: null, speakers: [] };
|
|
2246
2263
|
let sawHeader = false;
|
|
2247
|
-
for (const line2 of
|
|
2264
|
+
for (const line2 of text6.split("\n")) {
|
|
2248
2265
|
if (!line2.trim())
|
|
2249
2266
|
break;
|
|
2250
2267
|
for (const [prefix, key] of Object.entries(HEADER)) {
|
|
@@ -2261,7 +2278,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2261
2278
|
if (!sawHeader)
|
|
2262
2279
|
throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
|
|
2263
2280
|
const found = [];
|
|
2264
|
-
for (const block of
|
|
2281
|
+
for (const block of text6.split(/\n\s*\n/)) {
|
|
2265
2282
|
const match = LINE.exec(block.trim().replace(RULE, ""));
|
|
2266
2283
|
if (!match)
|
|
2267
2284
|
continue;
|
|
@@ -2279,7 +2296,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2279
2296
|
return { header, lines };
|
|
2280
2297
|
}, "parseTranscriptText");
|
|
2281
2298
|
|
|
2282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2283
2300
|
var VttError = class extends Error {
|
|
2284
2301
|
static {
|
|
2285
2302
|
__name(this, "VttError");
|
|
@@ -2295,12 +2312,12 @@ var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
|
|
|
2295
2312
|
const [, hours = "0", minutes = "0", seconds = "0", ms = "0"] = match;
|
|
2296
2313
|
return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms);
|
|
2297
2314
|
}, "millis");
|
|
2298
|
-
var splitSpeaker = /* @__PURE__ */ __name((
|
|
2299
|
-
const firstLine =
|
|
2315
|
+
var splitSpeaker = /* @__PURE__ */ __name((text6) => {
|
|
2316
|
+
const firstLine = text6.split("\n", 1)[0] ?? "";
|
|
2300
2317
|
const at = firstLine.indexOf(": ");
|
|
2301
2318
|
if (at <= 0)
|
|
2302
|
-
return { speaker: null, text:
|
|
2303
|
-
return { speaker: firstLine.slice(0, at).trim(), text:
|
|
2319
|
+
return { speaker: null, text: text6 };
|
|
2320
|
+
return { speaker: firstLine.slice(0, at).trim(), text: text6.slice(at + 2) };
|
|
2304
2321
|
}, "splitSpeaker");
|
|
2305
2322
|
var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
2306
2323
|
const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
|
|
@@ -2325,13 +2342,13 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2325
2342
|
const lineNo = start + timingAt + 1;
|
|
2326
2343
|
const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
|
|
2327
2344
|
const to = rest.trim().split(/\s+/)[0] ?? "";
|
|
2328
|
-
const
|
|
2329
|
-
cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(
|
|
2345
|
+
const text6 = block.slice(timingAt + 1).join("\n").trim();
|
|
2346
|
+
cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text6) });
|
|
2330
2347
|
}
|
|
2331
2348
|
return cues;
|
|
2332
2349
|
}, "parseVtt");
|
|
2333
2350
|
|
|
2334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2335
2352
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2336
2353
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2337
2354
|
for (const file of files) {
|
|
@@ -2364,10 +2381,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2364
2381
|
return report;
|
|
2365
2382
|
}, "importFiles");
|
|
2366
2383
|
|
|
2367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2368
2385
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2369
2386
|
|
|
2370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/provider.js
|
|
2371
2388
|
var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
2372
2389
|
const provider = scope2?.provider;
|
|
2373
2390
|
const account = scope2?.account;
|
|
@@ -2376,7 +2393,7 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
|
2376
2393
|
return Object.freeze({ provider, account });
|
|
2377
2394
|
}, "snapshotMeetingScope");
|
|
2378
2395
|
|
|
2379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2380
2397
|
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
2381
2398
|
if (typeof value !== "string" || !value.trim())
|
|
2382
2399
|
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
@@ -2427,7 +2444,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
|
2427
2444
|
return Object.freeze(result);
|
|
2428
2445
|
}, "validateMeetingChange");
|
|
2429
2446
|
|
|
2430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2431
2448
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2432
2449
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2433
2450
|
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)))
|
|
@@ -2440,7 +2457,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
2440
2457
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2441
2458
|
}, "validateMeetingPassage");
|
|
2442
2459
|
|
|
2443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2444
2461
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2445
2462
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2446
2463
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2465,7 +2482,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2465
2482
|
return { ...input, limit, maxReadBytes };
|
|
2466
2483
|
}, "validateMeetingPreparationContext");
|
|
2467
2484
|
|
|
2468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2469
2486
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
2470
2487
|
var id = pipe(string(), minLength(1));
|
|
2471
2488
|
var meetingProjectEvidence = strictObject({
|
|
@@ -2586,7 +2603,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
2586
2603
|
};
|
|
2587
2604
|
}, "meetingProjectEvidenceAnswer");
|
|
2588
2605
|
|
|
2589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2590
2607
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2591
2608
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2592
2609
|
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) || [
|
|
@@ -2606,7 +2623,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
2606
2623
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2607
2624
|
}, "validateMeetingHitSearch");
|
|
2608
2625
|
|
|
2609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2610
2627
|
var ids = {
|
|
2611
2628
|
meeting_id: "meetingId",
|
|
2612
2629
|
identity_id: "participantIdentityId",
|
|
@@ -2642,8 +2659,8 @@ var MEETING_PROJECT_EVIDENCE_QUERY = defineQuery({
|
|
|
2642
2659
|
]
|
|
2643
2660
|
});
|
|
2644
2661
|
var requestKeys = /* @__PURE__ */ new Set(["query", "limit", "cursor", "maxReadBytes", "signal"]);
|
|
2645
|
-
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((
|
|
2646
|
-
if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof
|
|
2662
|
+
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request = {}, now = Date.now()) => {
|
|
2663
|
+
if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof project2 !== "string" || !project2.trim() || project2.length > 200 || /[\p{Cc}\p{Cf}]/u.test(project2) || request.query !== void 0 && typeof request.query !== "string")
|
|
2647
2664
|
throw new CliError("validation_error", "expected an existing project and bounded evidence arguments");
|
|
2648
2665
|
if (request.query !== void 0 && new TextEncoder().encode(request.query).byteLength > 8192 || [request.limit, request.maxReadBytes].some((value) => value !== void 0 && typeof value !== "number"))
|
|
2649
2666
|
throw new CliError("validation_error", "invalid project evidence query or budget");
|
|
@@ -2691,21 +2708,21 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
2691
2708
|
options.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
2692
2709
|
frozen.push(`started_at:[${options.since === void 0 ? "*" : `"${new Date(options.since).toISOString()}"`} TO ${options.until === void 0 ? "*" : `"${new Date(options.until).toISOString()}"`}]`);
|
|
2693
2710
|
}
|
|
2694
|
-
validateMeetingHitSearch(
|
|
2711
|
+
validateMeetingHitSearch(project2, options);
|
|
2695
2712
|
if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !/^[A-Za-z0-9_-]{1,4096}$/.test(options.cursor)))
|
|
2696
2713
|
throw new CliError("validation_error", "invalid project evidence cursor");
|
|
2697
|
-
return { project:
|
|
2714
|
+
return { project: project2.trim(), options, query: frozen.join(" AND ") };
|
|
2698
2715
|
}, "prepareMeetingProjectEvidence");
|
|
2699
2716
|
|
|
2700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2701
|
-
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read,
|
|
2702
|
-
const prepared = prepareMeetingProjectEvidence(
|
|
2717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2718
|
+
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
|
|
2719
|
+
const prepared = prepareMeetingProjectEvidence(project2, request, now);
|
|
2703
2720
|
const page = await read(prepared.project, prepared.options);
|
|
2704
2721
|
prepared.options.signal?.throwIfAborted();
|
|
2705
2722
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2706
2723
|
}, "readMeetingProjectEvidence");
|
|
2707
2724
|
|
|
2708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2709
2726
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2710
2727
|
const { identityExternalId, ...fields } = p;
|
|
2711
2728
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -2732,20 +2749,20 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
2732
2749
|
const from = timestamp2(since) - lookbackMs;
|
|
2733
2750
|
const meetings = await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString());
|
|
2734
2751
|
for (const m of meetings) {
|
|
2735
|
-
const
|
|
2752
|
+
const id4 = m.occurrence.id;
|
|
2736
2753
|
const read = /* @__PURE__ */ __name(async (part, call) => {
|
|
2737
2754
|
try {
|
|
2738
2755
|
return await call();
|
|
2739
2756
|
} catch (error) {
|
|
2740
2757
|
failed = true;
|
|
2741
2758
|
const message = error instanceof Error ? error.message : "could not be read";
|
|
2742
|
-
report.warnings.push({ externalId:
|
|
2759
|
+
report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
|
|
2743
2760
|
return void 0;
|
|
2744
2761
|
}
|
|
2745
2762
|
}, "read");
|
|
2746
2763
|
try {
|
|
2747
|
-
const sourceParticipants = await read("participants", () => source.participants(
|
|
2748
|
-
const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider,
|
|
2764
|
+
const sourceParticipants = await read("participants", () => source.participants(id4));
|
|
2765
|
+
const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id4, i, options.accountId));
|
|
2749
2766
|
const names = /* @__PURE__ */ new Map();
|
|
2750
2767
|
for (const p of participants)
|
|
2751
2768
|
if (p.displayName !== null) {
|
|
@@ -2754,18 +2771,18 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
2754
2771
|
names.set(p.displayName, identities);
|
|
2755
2772
|
}
|
|
2756
2773
|
if ([...names.values()].some((ids2) => ids2.size > 1))
|
|
2757
|
-
report.warnings.push({ externalId:
|
|
2758
|
-
const lines = await read("transcript", () => source.transcript(
|
|
2759
|
-
const chat = await read("chat", () => source.chat(
|
|
2760
|
-
const summary = await read("summary", () => source.summary(
|
|
2761
|
-
const attachments = await read("files", () => source.files(
|
|
2774
|
+
report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
|
|
2775
|
+
const lines = await read("transcript", () => source.transcript(id4));
|
|
2776
|
+
const chat = await read("chat", () => source.chat(id4));
|
|
2777
|
+
const summary = await read("summary", () => source.summary(id4));
|
|
2778
|
+
const attachments = await read("files", () => source.files(id4));
|
|
2762
2779
|
const startedAt = timestamp2(m.occurrence.startedAt);
|
|
2763
2780
|
const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
2764
2781
|
if (endedAt !== null && endedAt < startedAt)
|
|
2765
2782
|
throw new Error("Meeting ends before it starts");
|
|
2766
2783
|
const meeting2 = {
|
|
2767
2784
|
accountId: options.accountId,
|
|
2768
|
-
externalId:
|
|
2785
|
+
externalId: id4,
|
|
2769
2786
|
title: m.occurrence.title,
|
|
2770
2787
|
description: m.description ?? null,
|
|
2771
2788
|
location: m.location ?? null,
|
|
@@ -2836,7 +2853,7 @@ unlinked`, format)],
|
|
|
2836
2853
|
report.summaries += summary ? 1 : 0;
|
|
2837
2854
|
} catch (error) {
|
|
2838
2855
|
failed = true;
|
|
2839
|
-
report.warnings.push({ externalId:
|
|
2856
|
+
report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
|
|
2840
2857
|
}
|
|
2841
2858
|
}
|
|
2842
2859
|
if (!failed)
|
|
@@ -2844,7 +2861,7 @@ unlinked`, format)],
|
|
|
2844
2861
|
return report;
|
|
2845
2862
|
}, "pull");
|
|
2846
2863
|
|
|
2847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
2848
2865
|
var text4 = string();
|
|
2849
2866
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
2850
2867
|
var id2 = pipe(number(), integer(), minValue(1));
|
|
@@ -3038,10 +3055,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3038
3055
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3039
3056
|
}), "eventItem");
|
|
3040
3057
|
|
|
3041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
3042
3059
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
3043
3060
|
|
|
3044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
3045
3062
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
3046
3063
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3047
3064
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -3052,7 +3069,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3052
3069
|
const positive = /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value > 0, "positive");
|
|
3053
3070
|
if (!positive(input.accountId) || !positive(input.seriesId))
|
|
3054
3071
|
throw new CliError("validation_error", "accountId and seriesId must be positive safe integers");
|
|
3055
|
-
if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((
|
|
3072
|
+
if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id4) => !positive(id4)))
|
|
3056
3073
|
throw new CliError("validation_error", "anchorIds must contain at most 20 positive safe integers");
|
|
3057
3074
|
for (const key of ["after", "before"])
|
|
3058
3075
|
if (!Number.isSafeInteger(input[key]) || Math.abs(input[key]) > 864e13)
|
|
@@ -3071,14 +3088,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3071
3088
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
3072
3089
|
}, "validateMeetingRelatedHistory");
|
|
3073
3090
|
|
|
3074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
3075
3092
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
3076
3093
|
|
|
3077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3078
3095
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3079
3096
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3080
3097
|
|
|
3081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3082
3099
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3083
3100
|
input.signal?.throwIfAborted();
|
|
3084
3101
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3099,7 +3116,7 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3099
3116
|
return { ...input, limit, maxReadBytes };
|
|
3100
3117
|
}, "validateMeetingSeriesHistory");
|
|
3101
3118
|
|
|
3102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3103
3120
|
var invalid4 = /* @__PURE__ */ __name((field) => {
|
|
3104
3121
|
throw new CliError("invalid_response", `meeting occurrence ${field} is invalid`);
|
|
3105
3122
|
}, "invalid");
|
|
@@ -3168,7 +3185,7 @@ var readOccurrenceSchedule = /* @__PURE__ */ __name((input, meetingId, limit, ma
|
|
|
3168
3185
|
return result;
|
|
3169
3186
|
}, "readOccurrenceSchedule");
|
|
3170
3187
|
|
|
3171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3172
3189
|
function invalid5(field, response = false) {
|
|
3173
3190
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3174
3191
|
}
|
|
@@ -3197,7 +3214,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3197
3214
|
cursorDetails(value);
|
|
3198
3215
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3199
3216
|
|
|
3200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
3201
3218
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
3202
3219
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3203
3220
|
const zone = timeZone ?? "UTC";
|
|
@@ -3261,8 +3278,8 @@ var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, lim
|
|
|
3261
3278
|
const kept = ordered.slice(0, limit);
|
|
3262
3279
|
if (by !== "series")
|
|
3263
3280
|
kept.reverse();
|
|
3264
|
-
const counted = /* @__PURE__ */ __name(({ meetings:
|
|
3265
|
-
meetings:
|
|
3281
|
+
const counted = /* @__PURE__ */ __name(({ meetings: count7, ms, timed, transcripts }) => ({
|
|
3282
|
+
meetings: count7,
|
|
3266
3283
|
minutes: minutesOf(ms),
|
|
3267
3284
|
meanMinutes: meanOf(ms, timed),
|
|
3268
3285
|
transcripts
|
|
@@ -3332,7 +3349,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
3332
3349
|
};
|
|
3333
3350
|
}, "aggregateMeetingStats");
|
|
3334
3351
|
|
|
3335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/meetings/upcoming.js
|
|
3336
3353
|
var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
3337
3354
|
if (!signal?.aborted)
|
|
3338
3355
|
return;
|
|
@@ -3402,7 +3419,7 @@ var createUpcomingMeetingReader = /* @__PURE__ */ __name((scope2, port) => {
|
|
|
3402
3419
|
};
|
|
3403
3420
|
}, "createUpcomingMeetingReader");
|
|
3404
3421
|
|
|
3405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
3406
3423
|
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
3407
3424
|
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
3408
3425
|
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
@@ -3416,7 +3433,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
|
3416
3433
|
return tag;
|
|
3417
3434
|
}, "normalizeTag");
|
|
3418
3435
|
|
|
3419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
3420
3437
|
var LINK_KINDS = [
|
|
3421
3438
|
"links-to",
|
|
3422
3439
|
"blocked-by",
|
|
@@ -3437,7 +3454,7 @@ var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
|
|
|
3437
3454
|
var RELATION_KINDS = ["member-of", "related-to"];
|
|
3438
3455
|
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
3439
3456
|
|
|
3440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
3441
3458
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
3442
3459
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
3443
3460
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -3452,7 +3469,7 @@ function closeTask(task, state, by, at, reason) {
|
|
|
3452
3469
|
}
|
|
3453
3470
|
__name(closeTask, "closeTask");
|
|
3454
3471
|
|
|
3455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
3456
3473
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
3457
3474
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
3458
3475
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -3481,18 +3498,18 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
3481
3498
|
}, "priorityOf");
|
|
3482
3499
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
3483
3500
|
|
|
3484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
3485
3502
|
function matches2(task, filter) {
|
|
3486
3503
|
return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
|
|
3487
3504
|
}
|
|
3488
3505
|
__name(matches2, "matches");
|
|
3489
3506
|
|
|
3490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
3491
3508
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
3492
|
-
async function find(
|
|
3493
|
-
const task = await store.get(
|
|
3509
|
+
async function find(id4) {
|
|
3510
|
+
const task = await store.get(id4);
|
|
3494
3511
|
if (!task)
|
|
3495
|
-
throw new CliError("not_found", `no task ${
|
|
3512
|
+
throw new CliError("not_found", `no task ${id4}`);
|
|
3496
3513
|
return task;
|
|
3497
3514
|
}
|
|
3498
3515
|
__name(find, "find");
|
|
@@ -3514,8 +3531,8 @@ function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PUR
|
|
|
3514
3531
|
return { task, created: true };
|
|
3515
3532
|
return { task, created: true, review: await store.reviewDuplicates(task.id) };
|
|
3516
3533
|
},
|
|
3517
|
-
async close(
|
|
3518
|
-
const task = closeTask(await find(
|
|
3534
|
+
async close(id4, { as, by, reason }) {
|
|
3535
|
+
const task = closeTask(await find(id4), as, by, now(), reason);
|
|
3519
3536
|
await store.update(task);
|
|
3520
3537
|
return task;
|
|
3521
3538
|
},
|
|
@@ -3547,7 +3564,7 @@ function median(values) {
|
|
|
3547
3564
|
}
|
|
3548
3565
|
__name(median, "median");
|
|
3549
3566
|
|
|
3550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
3551
3568
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
3552
3569
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
3553
3570
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -3555,7 +3572,7 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
3555
3572
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
3556
3573
|
var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
3557
3574
|
|
|
3558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
3559
3576
|
var CURRENCY_SCALES = {
|
|
3560
3577
|
AED: 2,
|
|
3561
3578
|
AMD: 2,
|
|
@@ -3596,8 +3613,8 @@ var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
|
3596
3613
|
throw new CliError("validation_error", message, { reason });
|
|
3597
3614
|
}, "refuse");
|
|
3598
3615
|
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
3599
|
-
var parseDecimal = /* @__PURE__ */ __name((
|
|
3600
|
-
const match = DECIMAL.exec(
|
|
3616
|
+
var parseDecimal = /* @__PURE__ */ __name((text6, scale) => {
|
|
3617
|
+
const match = DECIMAL.exec(text6.trim());
|
|
3601
3618
|
if (!match || (match[2] ?? "").length > scale)
|
|
3602
3619
|
return void 0;
|
|
3603
3620
|
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
@@ -3611,10 +3628,10 @@ var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
|
3611
3628
|
const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
3612
3629
|
return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
|
|
3613
3630
|
}, "groupDigits");
|
|
3614
|
-
var currencyOf = /* @__PURE__ */ __name((
|
|
3615
|
-
const code = typeof
|
|
3631
|
+
var currencyOf = /* @__PURE__ */ __name((text6) => {
|
|
3632
|
+
const code = typeof text6 === "string" ? text6.trim().toUpperCase() : "";
|
|
3616
3633
|
if (CURRENCY_SCALES[code] === void 0)
|
|
3617
|
-
return refuse(`${typeof
|
|
3634
|
+
return refuse(`${typeof text6 === "string" && text6.trim() ? text6.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
3618
3635
|
return code;
|
|
3619
3636
|
}, "currencyOf");
|
|
3620
3637
|
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
@@ -3631,8 +3648,8 @@ var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
|
3631
3648
|
}), "moneyOf");
|
|
3632
3649
|
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
3633
3650
|
var QUANTITY_SCALE = 3;
|
|
3634
|
-
var quantityOf = /* @__PURE__ */ __name((
|
|
3635
|
-
const thousandths = typeof
|
|
3651
|
+
var quantityOf = /* @__PURE__ */ __name((text6) => {
|
|
3652
|
+
const thousandths = typeof text6 === "string" ? parseDecimal(text6, QUANTITY_SCALE) : void 0;
|
|
3636
3653
|
if (thousandths === void 0 || thousandths === 0n)
|
|
3637
3654
|
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
3638
3655
|
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
@@ -3640,7 +3657,7 @@ var quantityOf = /* @__PURE__ */ __name((text5) => {
|
|
|
3640
3657
|
}, "quantityOf");
|
|
3641
3658
|
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
3642
3659
|
|
|
3643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
3644
3661
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
3645
3662
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
3646
3663
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -3669,7 +3686,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
3669
3686
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
3670
3687
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
3671
3688
|
|
|
3672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
3673
3690
|
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
3674
3691
|
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
3675
3692
|
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
@@ -3679,6 +3696,60 @@ var orderLine = /* @__PURE__ */ __name((order) => {
|
|
|
3679
3696
|
}, "orderLine");
|
|
3680
3697
|
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
3681
3698
|
|
|
3699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
3700
|
+
var text5 = string();
|
|
3701
|
+
var id3 = pipe(string(), minLength(1));
|
|
3702
|
+
var time = isoTime;
|
|
3703
|
+
var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
|
|
3704
|
+
var count6 = pipe(number(), integer(), minValue(0));
|
|
3705
|
+
var untrusted = optional(array(text5));
|
|
3706
|
+
var providerMetadata = optional(record(string(), unknown()));
|
|
3707
|
+
var evidenceSource = strictObject({
|
|
3708
|
+
ref: nullable(reference),
|
|
3709
|
+
kind: text5,
|
|
3710
|
+
title: nullable(text5),
|
|
3711
|
+
sender: nullable(text5),
|
|
3712
|
+
at: nullable(time),
|
|
3713
|
+
excerpt: nullable(text5),
|
|
3714
|
+
tool: nullable(text5),
|
|
3715
|
+
missing: boolean()
|
|
3716
|
+
});
|
|
3717
|
+
var author = strictObject({
|
|
3718
|
+
type: picklist(["person", "bot"]),
|
|
3719
|
+
id: id3,
|
|
3720
|
+
name: nullable(text5)
|
|
3721
|
+
});
|
|
3722
|
+
|
|
3723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.583.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_8615f98b0983d1fbb51a11cdebd6e805/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
3724
|
+
var organization = strictObject({
|
|
3725
|
+
id: id3,
|
|
3726
|
+
ref: reference,
|
|
3727
|
+
kind: picklist(["company", "team", "family", "community"]),
|
|
3728
|
+
name: text5,
|
|
3729
|
+
scope: picklist(["personal", "work"]),
|
|
3730
|
+
created_at: time
|
|
3731
|
+
});
|
|
3732
|
+
var project = strictObject({
|
|
3733
|
+
id: id3,
|
|
3734
|
+
ref: reference,
|
|
3735
|
+
key: text5,
|
|
3736
|
+
name: text5,
|
|
3737
|
+
kind: picklist(["project", "inbox"]),
|
|
3738
|
+
type: picklist(["work", "client", "personal", "oss", "other"]),
|
|
3739
|
+
organization_id: nullable(id3),
|
|
3740
|
+
scope: picklist(["personal", "work"]),
|
|
3741
|
+
created_at: time
|
|
3742
|
+
});
|
|
3743
|
+
var reminder = strictObject({
|
|
3744
|
+
id: id3,
|
|
3745
|
+
task: text5,
|
|
3746
|
+
due_at: time,
|
|
3747
|
+
timezone: text5,
|
|
3748
|
+
state: picklist(["pending", "leased", "delivered", "cancelled"]),
|
|
3749
|
+
revision: number(),
|
|
3750
|
+
receipt: nullable(text5)
|
|
3751
|
+
});
|
|
3752
|
+
|
|
3682
3753
|
export {
|
|
3683
3754
|
QUERY_LIMITS,
|
|
3684
3755
|
queryAstSchema,
|
|
@@ -3738,6 +3809,7 @@ export {
|
|
|
3738
3809
|
findingText,
|
|
3739
3810
|
findingHash,
|
|
3740
3811
|
findingFields,
|
|
3812
|
+
findingNeeds,
|
|
3741
3813
|
validEvidence,
|
|
3742
3814
|
findingId,
|
|
3743
3815
|
validateFinding,
|
|
@@ -3833,5 +3905,17 @@ export {
|
|
|
3833
3905
|
ORDER_STATUSES,
|
|
3834
3906
|
ORDER_PURPOSES,
|
|
3835
3907
|
orderLine,
|
|
3836
|
-
orderTitle
|
|
3908
|
+
orderTitle,
|
|
3909
|
+
text5 as text,
|
|
3910
|
+
id3 as id,
|
|
3911
|
+
time,
|
|
3912
|
+
zonedTime,
|
|
3913
|
+
count6 as count,
|
|
3914
|
+
untrusted,
|
|
3915
|
+
providerMetadata,
|
|
3916
|
+
evidenceSource,
|
|
3917
|
+
author,
|
|
3918
|
+
organization,
|
|
3919
|
+
project,
|
|
3920
|
+
reminder
|
|
3837
3921
|
};
|