@wirecat/zoom-cli 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/answer-entities.d.ts +13 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +5 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answers.d.ts +8 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/archive-import.d.ts +1 -1
- package/dist/archive-import.d.ts.map +1 -1
- package/dist/archive-import.js +2 -1
- package/dist/archive-import.js.map +1 -1
- package/dist/bin/zm.js +6 -2
- package/dist/bundle/{all-profiles-W2OVBZ7S.js → all-profiles-SKMLZJSY.js} +8 -8
- package/dist/bundle/answer-policy-BHDNSJWX.js +96 -0
- package/dist/bundle/{anthropic-P4BKQNBO.js → anthropic-TVHK7CY2.js} +4 -4
- package/dist/bundle/{app-server-AYUW45ND.js → app-server-44ASFH47.js} +53 -52
- package/dist/bundle/{bun-MNGPTYDQ.js → bun-O4WHGL2F.js} +2 -2
- package/dist/bundle/{bun-sqlite-PTPUSXAO.js → bun-sqlite-NS32GMM4.js} +3 -3
- package/dist/bundle/{chunk-CZKV4USJ.js → chunk-24F7JBLY.js} +59 -4
- package/dist/bundle/{chunk-A2FOW3ZC.js → chunk-25IDWPEN.js} +148 -97
- package/dist/bundle/{chunk-BMYZWBAX.js → chunk-266WOOB3.js} +4 -4
- package/dist/bundle/{chunk-23LOMA2I.js → chunk-2H5SXK7K.js} +45 -25
- package/dist/bundle/{chunk-24WCZURP.js → chunk-37PHGASE.js} +2 -2
- package/dist/bundle/{chunk-WFIJOFS5.js → chunk-3CZIWGZ6.js} +1 -1
- package/dist/bundle/{chunk-BO5YVG3X.js → chunk-5NGOP4EZ.js} +125 -35
- package/dist/bundle/{chunk-BWPKSUXW.js → chunk-6CS7ETBK.js} +4496 -386
- package/dist/bundle/{chunk-LEQCRVPD.js → chunk-7SQJCKR6.js} +1 -1
- package/dist/bundle/{chunk-RK3JBC4U.js → chunk-A6OA2EH2.js} +2 -2
- package/dist/bundle/{chunk-QK54GOGE.js → chunk-AMMD6YCJ.js} +7 -9
- package/dist/bundle/chunk-BLT3LR3U.js +34 -0
- package/dist/bundle/{chunk-X6M5DK66.js → chunk-BNXH73OU.js} +10 -10
- package/dist/bundle/{chunk-RJLNVHIU.js → chunk-BWRBALXG.js} +3 -3
- package/dist/bundle/{chunk-UFI5SX3F.js → chunk-C6BG57FA.js} +11 -11
- package/dist/bundle/{chunk-IIGXCYEL.js → chunk-CNEE6TPE.js} +13 -13
- package/dist/bundle/{chunk-TYKZCJD7.js → chunk-CVCRQW3A.js} +35 -35
- package/dist/bundle/{chunk-UCPL55YP.js → chunk-DNCKH7CO.js} +17 -17
- package/dist/bundle/{chunk-L4JGVSBN.js → chunk-DYJXAY7Q.js} +26 -25
- package/dist/bundle/{chunk-UABUBDYB.js → chunk-EA63UGWE.js} +2 -2
- package/dist/bundle/{chunk-UNO4G5NX.js → chunk-ERPRAYA7.js} +5 -5
- package/dist/bundle/{chunk-CZFV6XTW.js → chunk-FYJL276J.js} +3 -3
- package/dist/bundle/{chunk-YNYMWXXH.js → chunk-FYM27FCG.js} +32 -9
- package/dist/bundle/{chunk-H65B6A7Y.js → chunk-GBZF4IIP.js} +8 -8
- package/dist/bundle/{chunk-JRPYHDCO.js → chunk-GEX4V5TM.js} +4 -4
- package/dist/bundle/{chunk-5BCNJB2A.js → chunk-GMTXCFI7.js} +668 -504
- package/dist/bundle/{chunk-JM43EKTY.js → chunk-GXCNCMUY.js} +1896 -651
- package/dist/bundle/{chunk-FSYO3PUW.js → chunk-H7762LDA.js} +2 -2
- package/dist/bundle/{chunk-C3RRIJ5C.js → chunk-IPTI3Y2E.js} +6 -41
- package/dist/bundle/{chunk-7NDSBTKR.js → chunk-JF7ZEUXU.js} +34 -26
- package/dist/bundle/{chunk-5YLR24D5.js → chunk-K6ATTKQR.js} +13 -6
- package/dist/bundle/{chunk-R4NTPYXZ.js → chunk-KYLS5QGC.js} +2 -2
- package/dist/bundle/{chunk-OPP5CWAX.js → chunk-KZE3G4ZT.js} +34 -33
- package/dist/bundle/{chunk-I5QX2HAT.js → chunk-LOL6JYYN.js} +211 -106
- package/dist/bundle/{chunk-COTC7HF3.js → chunk-LPUFOWL3.js} +1 -1
- package/dist/bundle/{chunk-AF4HONAZ.js → chunk-M6IDHQ7N.js} +6402 -4395
- package/dist/bundle/{chunk-Y7TWNMTW.js → chunk-MH7AWCB4.js} +178 -49
- package/dist/bundle/{chunk-ZW4N73FO.js → chunk-MIB5X2XW.js} +3 -3
- package/dist/bundle/{chunk-Q3EDUZ5R.js → chunk-MPKKIL3U.js} +15 -12
- package/dist/bundle/{chunk-JMSKDW5G.js → chunk-MRWIXUYT.js} +2 -2
- package/dist/bundle/{chunk-HIGFBTEI.js → chunk-MZ6U6HNJ.js} +2 -2
- package/dist/bundle/{chunk-7SWNZ44U.js → chunk-NJSIHMAE.js} +2 -2
- package/dist/bundle/{chunk-HQHYPKSU.js → chunk-NNNEVWFF.js} +44 -31
- package/dist/bundle/{chunk-TJH5IQVZ.js → chunk-NO24PJNW.js} +1 -1
- package/dist/bundle/{chunk-7D56BQZL.js → chunk-OXUHTKO2.js} +2 -2
- package/dist/bundle/{chunk-IIP4J3PD.js → chunk-PV3UDPCI.js} +82 -6
- package/dist/bundle/{chunk-5FN4Q5H5.js → chunk-QI7BZS2G.js} +8 -13
- package/dist/bundle/{chunk-SMT6SFBK.js → chunk-QLCYAQ66.js} +2 -2
- package/dist/bundle/{chunk-PBJY5VR6.js → chunk-R5BAF5XE.js} +1 -1
- package/dist/bundle/{chunk-7VJIKJNW.js → chunk-RZLNHNSS.js} +8 -8
- package/dist/bundle/{chunk-3DGQJASQ.js → chunk-S4GDDO5S.js} +1 -1
- package/dist/bundle/{chunk-AAC6VNSL.js → chunk-SQWRZZOQ.js} +3 -3
- package/dist/bundle/{chunk-63MRRNDL.js → chunk-T3KICUOK.js} +6 -6
- package/dist/bundle/{chunk-7EOW47PV.js → chunk-TC7PD3LH.js} +4 -4
- package/dist/bundle/{chunk-XZSQLVED.js → chunk-TUIEDVI6.js} +2 -2
- package/dist/bundle/{chunk-H5LLZ5XA.js → chunk-U3ZUT557.js} +1 -1
- package/dist/bundle/{chunk-4XVRA6P5.js → chunk-U4RVOSX3.js} +1 -1
- package/dist/bundle/{chunk-EQYPTGCT.js → chunk-U5ASRBBF.js} +6 -4
- package/dist/bundle/{chunk-3IMEAZIM.js → chunk-UKU6MYUI.js} +4 -4
- package/dist/bundle/{chunk-J25UNZIL.js → chunk-UMHJZWZU.js} +9 -9
- package/dist/bundle/{chunk-HQHUPTZR.js → chunk-UPJXN2CO.js} +1308 -635
- package/dist/bundle/{chunk-OWXMQVVN.js → chunk-VH4F2EK4.js} +1 -1
- package/dist/bundle/{chunk-TJODNJKE.js → chunk-VJTGYBJJ.js} +18 -13
- package/dist/bundle/{chunk-54UEJGYB.js → chunk-VW2SW7ME.js} +3 -3
- package/dist/bundle/{chunk-2UONVSJQ.js → chunk-WLSF3GCC.js} +2 -2
- package/dist/bundle/{chunk-H3DMYF3W.js → chunk-XJQB47IL.js} +4 -4
- package/dist/bundle/{chunk-JZKNHA44.js → chunk-Y3EIK4XW.js} +1 -1
- package/dist/bundle/{chunk-3AAO5N4L.js → chunk-Z5424QL6.js} +2 -2
- package/dist/bundle/{chunk-K6OSD6DG.js → chunk-ZFNM3FNI.js} +75 -33
- package/dist/bundle/{chunk-SJIBJQJN.js → chunk-ZH743WNV.js} +40 -12
- package/dist/bundle/{chunk-JJZAGKUK.js → chunk-ZOGYTDHG.js} +2 -2
- package/dist/bundle/{chunk-6NBQJJT6.js → chunk-ZREFYKUB.js} +7 -7
- package/dist/bundle/{chunk-KJCCT3QY.js → chunk-ZXGRK44F.js} +14 -13
- package/dist/bundle/{cli-Y2ZO3D5U.js → cli-FDO6CP6R.js} +105 -59
- package/dist/bundle/command-contract-O4FDXM4U.js +37 -0
- package/dist/bundle/config-UBHKZG3J.js +78 -0
- package/dist/bundle/{decode-GO6GAYH2.js → decode-7SZI3TGZ.js} +3 -3
- package/dist/bundle/{dist-MIJKAGXW.js → dist-5GWUXW27.js} +18 -14
- package/dist/bundle/{echarts-NWK7LALR.js → echarts-FMACRZQC.js} +2 -2
- package/dist/bundle/{embed-2DOSN4DV.js → embed-24YSXHLP.js} +4 -4
- package/dist/bundle/{embedder-3Q3C2WKC.js → embedder-MEXN2TFB.js} +7 -7
- package/dist/bundle/{first-run-S75VKIT3.js → first-run-OCVEJH63.js} +8 -8
- package/dist/bundle/first-screen-KJIU25MH.js +35 -0
- package/dist/bundle/{folders-RSWEBHDZ.js → folders-DBAAMU26.js} +2 -2
- package/dist/bundle/{instructions-M3FZPQVI.js → instructions-E5FXYCWF.js} +1 -1
- package/dist/bundle/{main-R77BPRRS.js → main-EIUCXXDW.js} +17 -16
- package/dist/bundle/{mcp-YJEQYYTR.js → mcp-FUSDPAOL.js} +2 -2
- package/dist/bundle/{meetings-IV4Y4WRH.js → meetings-JDTRGXZJ.js} +16 -6
- package/dist/bundle/{node-I3GEHYGL.js → node-4SNKUPXT.js} +2 -2
- package/dist/bundle/{node-sqlite-W6MR2TVQ.js → node-sqlite-O4BAODFR.js} +9 -3
- package/dist/bundle/{oauth-M6YL4QXP.js → oauth-3YLHXGUW.js} +5 -5
- package/dist/bundle/{open-2VITLJAN.js → open-QGRMSNM2.js} +3 -2
- package/dist/bundle/{openai-OG6B3JCU.js → openai-7PSCSTH7.js} +9 -9
- package/dist/bundle/{output-file-XJJ3XMLQ.js → output-file-J26UQKRA.js} +3 -3
- package/dist/bundle/{process-UBA4L4B2.js → process-HQZOTT6U.js} +1 -1
- package/dist/bundle/{program-5R5MRXUM.js → program-47DT7SHE.js} +75 -75
- package/dist/bundle/{prompt-AVIXIM7Z.js → prompt-IUD7HCDC.js} +3 -3
- package/dist/bundle/{recognize-DJKTJOYU.js → recognize-DMJJHHXF.js} +2 -2
- package/dist/bundle/{remote-S3DTNYRP.js → remote-5WFSOVVB.js} +5 -5
- package/dist/bundle/{rerank-FMCDP6VF.js → rerank-UKQ65ECH.js} +5 -5
- package/dist/bundle/{run-log-T4MV2VEH.js → run-log-UGYL6NW2.js} +53 -53
- package/dist/bundle/{serve-5SGFJFMC.js → serve-WAOSED3I.js} +9 -8
- package/dist/bundle/server-HAXN772R.js +66 -0
- package/dist/bundle/{server-PCMCY7WK.js → server-NWZFNXC5.js} +42 -42
- package/dist/bundle/{services-SKRQ2POT.js → services-VPANRE72.js} +101 -28
- package/dist/bundle/{speech-FSDICIKO.js → speech-O6UNUDRW.js} +11 -11
- package/dist/bundle/{state-KPUSPWO6.js → state-BNE7I65A.js} +4 -4
- package/dist/bundle/{store-7MP2ZGQ7.js → store-4IIVSCJ4.js} +37 -18
- package/dist/bundle/{store-W7LFPKG2.js → store-QQH4FJXJ.js} +14 -13
- package/dist/bundle/store-connection-PPEQK2K3.js +76 -0
- package/dist/bundle/store-maintenance-command-JZXCT6NY.js +56 -0
- package/dist/bundle/{streaming-Q44ESD3E.js → streaming-S4EZB6P2.js} +4 -4
- package/dist/bundle/{tokens-TAFCHANI.js → tokens-VCXIH7WZ.js} +4 -4
- package/dist/bundle/zm.js +1 -1
- package/dist/local-transcription.d.ts.map +1 -1
- package/dist/local-transcription.js +1 -0
- package/dist/local-transcription.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/answer-policy-HOA43GNA.js +0 -96
- package/dist/bundle/chunk-JRPAZ2WD.js +0 -3635
- package/dist/bundle/command-contract-DGTZIH2F.js +0 -38
- package/dist/bundle/config-N2UHDKGG.js +0 -78
- package/dist/bundle/first-screen-DQNRT6GH.js +0 -36
- package/dist/bundle/server-EYGZLKKQ.js +0 -66
- package/dist/bundle/store-connection-3HNZFJC4.js +0 -76
- package/dist/bundle/store-maintenance-command-6WBLTUZP.js +0 -55
- /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-NUN6OGOV.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
queryFieldsOf,
|
|
9
9
|
timezoneOf,
|
|
10
10
|
validateQuery
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZH743WNV.js";
|
|
12
12
|
import {
|
|
13
13
|
CliError,
|
|
14
14
|
STEPS,
|
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
string,
|
|
36
36
|
union,
|
|
37
37
|
visibleControls
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JF7ZEUXU.js";
|
|
39
39
|
import {
|
|
40
40
|
__name
|
|
41
41
|
} from "./chunk-ZVVMGPBJ.js";
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
44
44
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
45
45
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
46
46
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
@@ -77,7 +77,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text9) => {
|
|
|
77
77
|
}, "parseMeetingReference");
|
|
78
78
|
var canonicalMeetingReference = /* @__PURE__ */ __name((text9) => formatMeetingReference(parseMeetingReference(text9)), "canonicalMeetingReference");
|
|
79
79
|
|
|
80
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
80
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
81
81
|
var text = string();
|
|
82
82
|
var count = pipe(number(), integer(), minValue(0));
|
|
83
83
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -142,7 +142,7 @@ var MEETING_QUERY = {
|
|
|
142
142
|
})
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
146
146
|
var text2 = string();
|
|
147
147
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
148
148
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -156,6 +156,11 @@ var meetingHit = strictObject({
|
|
|
156
156
|
excerpt: text2,
|
|
157
157
|
/** How far into the meeting the passage is. */
|
|
158
158
|
offset_ms: nullable(count2),
|
|
159
|
+
/** A transcript passage's transcript language (`ru`, `en`…), `null` when unknown. */
|
|
160
|
+
language: optional(nullable(text2)),
|
|
161
|
+
/** A transcript passage's line, from 1, of `lines_total`. */
|
|
162
|
+
line: optional(pipe(count2, minValue(1))),
|
|
163
|
+
lines_total: optional(count2),
|
|
159
164
|
/** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
|
|
160
165
|
match: optional(picklist(["words", "corrected"])),
|
|
161
166
|
corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
|
|
@@ -322,6 +327,9 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
|
|
|
322
327
|
id: String(hit.id),
|
|
323
328
|
excerpt: hit.text,
|
|
324
329
|
offset_ms: hit.startMs,
|
|
330
|
+
...hit.language === void 0 ? {} : { language: hit.language },
|
|
331
|
+
...hit.line === void 0 ? {} : { line: hit.line },
|
|
332
|
+
...hit.linesTotal === void 0 ? {} : { lines_total: hit.linesTotal },
|
|
325
333
|
untrusted: hit.source === void 0 ? ["excerpt"] : ["excerpt", "source.title"],
|
|
326
334
|
...hit.match === void 0 ? {} : { match: hit.match },
|
|
327
335
|
...hit.corrections === void 0 ? {} : { corrections: hit.corrections },
|
|
@@ -369,7 +377,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
369
377
|
};
|
|
370
378
|
}, "meetingHitsList");
|
|
371
379
|
|
|
372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
373
381
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
374
382
|
const parsed = urlOf(url);
|
|
375
383
|
if (!parsed)
|
|
@@ -403,7 +411,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
403
411
|
}
|
|
404
412
|
}, "urlOf");
|
|
405
413
|
|
|
406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
407
415
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
408
416
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
409
417
|
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");
|
|
@@ -436,7 +444,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
436
444
|
return kept;
|
|
437
445
|
}, "entryMetadata");
|
|
438
446
|
|
|
439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
440
448
|
import { createHash } from "node:crypto";
|
|
441
449
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
442
450
|
reference: cue2.reference,
|
|
@@ -450,7 +458,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
450
458
|
text: cue2.text
|
|
451
459
|
})).digest("hex"), "meetingCueFingerprint");
|
|
452
460
|
|
|
453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
454
462
|
var EVENT_QUERY = defineQuery({
|
|
455
463
|
entity: "event",
|
|
456
464
|
backend: "sql",
|
|
@@ -466,7 +474,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
466
474
|
]
|
|
467
475
|
});
|
|
468
476
|
|
|
469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
470
478
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
471
479
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
472
480
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -516,7 +524,7 @@ var eventChange = /* @__PURE__ */ __name((event2, entries, revisions, since) =>
|
|
|
516
524
|
return null;
|
|
517
525
|
}, "eventChange");
|
|
518
526
|
|
|
519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
520
528
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
521
529
|
const current = await store.meeting(details.meeting.id);
|
|
522
530
|
if (!current)
|
|
@@ -559,7 +567,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
559
567
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
560
568
|
}, "linkEvent");
|
|
561
569
|
|
|
562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
563
571
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text9) => text9.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
564
572
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
565
573
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -583,7 +591,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
583
591
|
};
|
|
584
592
|
}, "validateMeetingParticipantSearch");
|
|
585
593
|
|
|
586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
587
595
|
var MeetingError = class extends CliError {
|
|
588
596
|
static {
|
|
589
597
|
__name(this, "MeetingError");
|
|
@@ -715,7 +723,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
|
|
|
715
723
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
716
724
|
}, "meetingSummaryAnswer");
|
|
717
725
|
|
|
718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
719
727
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
720
728
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
721
729
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -811,19 +819,89 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
|
811
819
|
};
|
|
812
820
|
}, "exportMeeting");
|
|
813
821
|
|
|
814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
815
823
|
import { createHash as createHash2 } from "node:crypto";
|
|
816
824
|
|
|
817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
818
|
-
var
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
826
|
+
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise", "payment"];
|
|
827
|
+
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
828
|
+
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
829
|
+
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
830
|
+
throw new CliError("validation_error", message);
|
|
831
|
+
}, "invalid");
|
|
832
|
+
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
833
|
+
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
834
|
+
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
835
|
+
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
836
|
+
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
837
|
+
if (!match)
|
|
838
|
+
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
839
|
+
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
840
|
+
if (amount === "0.00")
|
|
841
|
+
return invalid2("a payment's amount is more than 0");
|
|
842
|
+
return amount;
|
|
843
|
+
}, "amountOf");
|
|
844
|
+
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
845
|
+
const date2 = typeof value === "string" ? value.trim() : "";
|
|
846
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(date2) || (/* @__PURE__ */ new Date(`${date2}T00:00:00Z`)).toISOString().slice(0, 10) !== date2)
|
|
847
|
+
return invalid2("a payment's due date is an ISO date, such as 2026-10-31");
|
|
848
|
+
return date2;
|
|
849
|
+
}, "dateOf");
|
|
850
|
+
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
851
|
+
if (value === void 0 || value === null)
|
|
852
|
+
return null;
|
|
853
|
+
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
854
|
+
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
855
|
+
return value.trim();
|
|
856
|
+
}, "optionalText");
|
|
857
|
+
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
858
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
859
|
+
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
860
|
+
return value;
|
|
861
|
+
}, "oneOf");
|
|
862
|
+
var FIELDS = ["amount", "currency", "direction", "counterparty", "counterparty_name", "due_at", "state", "item"];
|
|
863
|
+
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
864
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
865
|
+
return invalid2("a payment is an object");
|
|
866
|
+
const raw = input;
|
|
867
|
+
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
868
|
+
if (unknown.length)
|
|
869
|
+
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
870
|
+
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
871
|
+
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
872
|
+
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
873
|
+
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
874
|
+
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
875
|
+
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
876
|
+
return {
|
|
877
|
+
amount: amountOf(raw.amount),
|
|
878
|
+
currency,
|
|
879
|
+
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
880
|
+
counterparty,
|
|
881
|
+
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
882
|
+
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
883
|
+
state: oneOf(raw.state, PAYMENT_STATES, "state"),
|
|
884
|
+
item: optionalText(raw.item, "item", 200)
|
|
885
|
+
};
|
|
886
|
+
}, "validatePayment");
|
|
887
|
+
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
888
|
+
const [whole = "0", cents = "00"] = amount.split(".");
|
|
889
|
+
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
890
|
+
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
891
|
+
}, "grouped");
|
|
892
|
+
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
893
|
+
const payment = fact.payment;
|
|
894
|
+
if (!payment)
|
|
895
|
+
return "";
|
|
896
|
+
const who = payment.counterparty_name ?? payment.counterparty;
|
|
897
|
+
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
898
|
+
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
899
|
+
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
900
|
+
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
901
|
+
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
902
|
+
}, "paymentTitle");
|
|
825
903
|
|
|
826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
827
905
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
828
906
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
829
907
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
|
|
@@ -834,319 +912,61 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
834
912
|
return new Date(value).toISOString();
|
|
835
913
|
}, "meetingTimestamp");
|
|
836
914
|
|
|
837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
838
|
-
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
839
|
-
if (typeof value !== "string" || !value.trim())
|
|
840
|
-
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
841
|
-
return value;
|
|
842
|
-
}, "nonempty");
|
|
843
|
-
var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
844
|
-
if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
|
|
845
|
-
throw new CliError("validation_error", "unsupported meeting change field");
|
|
846
|
-
const result = {};
|
|
847
|
-
if (change.title !== void 0)
|
|
848
|
-
result.title = nonempty(change.title, "meeting title");
|
|
849
|
-
if (create && result.title === void 0)
|
|
850
|
-
throw new CliError("validation_error", "meeting title is required");
|
|
851
|
-
if (change.kind !== void 0) {
|
|
852
|
-
if (change.kind !== "instant" && change.kind !== "scheduled")
|
|
853
|
-
throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
|
|
854
|
-
result.kind = change.kind;
|
|
855
|
-
}
|
|
856
|
-
if (change.startTime !== void 0) {
|
|
857
|
-
result.startTime = meetingTimestamp(change.startTime, "meeting start");
|
|
858
|
-
}
|
|
859
|
-
if (change.durationMinutes !== void 0) {
|
|
860
|
-
if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
|
|
861
|
-
throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
|
|
862
|
-
result.durationMinutes = change.durationMinutes;
|
|
863
|
-
}
|
|
864
|
-
if (change.timezone !== void 0) {
|
|
865
|
-
if (typeof change.timezone !== "string" || !change.timezone.trim())
|
|
866
|
-
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
867
|
-
try {
|
|
868
|
-
new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
|
|
869
|
-
} catch {
|
|
870
|
-
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
871
|
-
}
|
|
872
|
-
result.timezone = change.timezone;
|
|
873
|
-
}
|
|
874
|
-
if (change.agenda !== void 0) {
|
|
875
|
-
if (typeof change.agenda !== "string")
|
|
876
|
-
throw new CliError("validation_error", "meeting agenda must be text");
|
|
877
|
-
result.agenda = change.agenda;
|
|
878
|
-
}
|
|
879
|
-
if (create) {
|
|
880
|
-
result.kind ??= "scheduled";
|
|
881
|
-
if (result.kind === "scheduled" && result.startTime === void 0)
|
|
882
|
-
throw new CliError("validation_error", "scheduled meeting start is required");
|
|
883
|
-
} else if (!Object.keys(result).length)
|
|
884
|
-
throw new CliError("validation_error", "at least one meeting change is required");
|
|
885
|
-
return Object.freeze(result);
|
|
886
|
-
}, "validateMeetingChange");
|
|
887
|
-
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
888
|
-
if (!signal?.aborted)
|
|
889
|
-
return;
|
|
890
|
-
if (signal.reason instanceof CliError)
|
|
891
|
-
throw signal.reason;
|
|
892
|
-
const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
|
|
893
|
-
throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
|
|
894
|
-
}, "checkCancelled");
|
|
895
|
-
var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
|
|
896
|
-
const { apply, dryRun, signal } = options;
|
|
897
|
-
checkCancelled(signal);
|
|
898
|
-
if (apply !== true || dryRun)
|
|
899
|
-
return { applied: false };
|
|
900
|
-
return { applied: true, value: await dispatch(signal) };
|
|
901
|
-
}, "dispatchMeetingMutation");
|
|
902
|
-
var createMeetingManagement = /* @__PURE__ */ __name((scope3, ports) => {
|
|
903
|
-
const fixed = snapshotMeetingScope(scope3);
|
|
904
|
-
const capabilities = {};
|
|
905
|
-
for (const name of ["list", "get", "invitation", "create", "update", "cancel"]) {
|
|
906
|
-
const port = ports[name];
|
|
907
|
-
if (typeof port === "function")
|
|
908
|
-
Object.defineProperty(capabilities, name, { value: port.bind(ports), enumerable: true });
|
|
909
|
-
}
|
|
910
|
-
Object.freeze(capabilities);
|
|
911
|
-
const context3 = /* @__PURE__ */ __name((options) => {
|
|
912
|
-
const signal = options.signal;
|
|
913
|
-
checkCancelled(signal);
|
|
914
|
-
return Object.freeze({ scope: fixed, ...signal ? { signal } : {} });
|
|
915
|
-
}, "context");
|
|
916
|
-
const capability = /* @__PURE__ */ __name((name) => {
|
|
917
|
-
const port = capabilities[name];
|
|
918
|
-
if (!port)
|
|
919
|
-
throw new CliError("provider_unavailable", `meeting provider does not support ${name}`);
|
|
920
|
-
return port;
|
|
921
|
-
}, "capability");
|
|
922
|
-
return {
|
|
923
|
-
scope: fixed,
|
|
924
|
-
capabilities: Object.freeze(Object.keys(capabilities).filter((name) => typeof capabilities[name] === "function")),
|
|
925
|
-
list(options = {}) {
|
|
926
|
-
return capability("list")(context3(options));
|
|
927
|
-
},
|
|
928
|
-
get(id4, options = {}) {
|
|
929
|
-
return capability("get")(nonempty(id4, "meeting id"), context3(options));
|
|
930
|
-
},
|
|
931
|
-
invitation(id4, options = {}) {
|
|
932
|
-
return capability("invitation")(nonempty(id4, "meeting id"), context3(options));
|
|
933
|
-
},
|
|
934
|
-
async create(change, options = {}) {
|
|
935
|
-
const port = capability("create");
|
|
936
|
-
const validated = validateMeetingChange(change, true);
|
|
937
|
-
const ctx = context3(options);
|
|
938
|
-
const outcome = await dispatchMeetingMutation(options, () => port(validated, ctx));
|
|
939
|
-
return {
|
|
940
|
-
action: "create",
|
|
941
|
-
scope: fixed,
|
|
942
|
-
change: validated,
|
|
943
|
-
applied: outcome.applied,
|
|
944
|
-
...outcome.value ? { meeting: outcome.value } : {}
|
|
945
|
-
};
|
|
946
|
-
},
|
|
947
|
-
async update(id4, change, options = {}) {
|
|
948
|
-
const port = capability("update");
|
|
949
|
-
const validatedId = nonempty(id4, "meeting id");
|
|
950
|
-
const validated = validateMeetingChange(change, false);
|
|
951
|
-
const ctx = context3(options);
|
|
952
|
-
const outcome = await dispatchMeetingMutation(options, () => port(validatedId, validated, ctx));
|
|
953
|
-
return { action: "update", scope: fixed, id: validatedId, change: validated, applied: outcome.applied };
|
|
954
|
-
},
|
|
955
|
-
async cancel(id4, options = {}) {
|
|
956
|
-
const port = capability("cancel");
|
|
957
|
-
const validatedId = nonempty(id4, "meeting id");
|
|
958
|
-
const occurrenceId2 = options.occurrenceId === void 0 ? void 0 : nonempty(options.occurrenceId, "occurrence id");
|
|
959
|
-
const ctx = { ...context3(options), ...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 } };
|
|
960
|
-
const outcome = await dispatchMeetingMutation(options, () => port(validatedId, ctx));
|
|
961
|
-
return {
|
|
962
|
-
action: "cancel",
|
|
963
|
-
scope: fixed,
|
|
964
|
-
id: validatedId,
|
|
965
|
-
applied: outcome.applied,
|
|
966
|
-
...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 }
|
|
967
|
-
};
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
}, "createMeetingManagement");
|
|
971
|
-
|
|
972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
973
|
-
var MEETING_FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
974
|
-
var id = /* @__PURE__ */ __name((value) => {
|
|
975
|
-
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
|
|
976
|
-
throw new CliError("validation_error", "meeting context identifiers must be positive integers");
|
|
977
|
-
return value;
|
|
978
|
-
}, "id");
|
|
979
|
-
var text3 = /* @__PURE__ */ __name((value, max) => {
|
|
980
|
-
if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
|
|
981
|
-
throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
|
|
982
|
-
return value.trim();
|
|
983
|
-
}, "text");
|
|
984
|
-
var uid = /* @__PURE__ */ __name((value) => {
|
|
985
|
-
const result = text3(value, 100);
|
|
986
|
-
if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
|
|
987
|
-
throw new CliError("validation_error", "person UID must be a positive integer");
|
|
988
|
-
return result;
|
|
989
|
-
}, "uid");
|
|
990
|
-
var strings = /* @__PURE__ */ __name((value, count6, length) => {
|
|
991
|
-
if (!Array.isArray(value) || value.length < 1 || value.length > count6)
|
|
992
|
-
throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
|
|
993
|
-
return Object.freeze([...new Set(value.map((entry) => text3(entry, length)))]);
|
|
994
|
-
}, "strings");
|
|
995
|
-
var fields = {
|
|
996
|
-
"note.add": ["text", "title"],
|
|
997
|
-
"tags.add": ["tags"],
|
|
998
|
-
"tags.remove": ["tags"],
|
|
999
|
-
"memory.add": ["body", "kind", "scope", "evidence", "subject"],
|
|
1000
|
-
"fact.add": ["statement", "type", "scope", "evidence", "subject"],
|
|
1001
|
-
"event.link": ["eventId", "expectedEventId"],
|
|
1002
|
-
"person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
|
|
1003
|
-
};
|
|
1004
|
-
var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
1005
|
-
if (!change || typeof change !== "object" || Array.isArray(change) || !Object.hasOwn(fields, change.action) || Object.keys(change).some((key) => key !== "action" && !fields[change.action].includes(key)))
|
|
1006
|
-
throw new CliError("validation_error", "unsupported meeting context change");
|
|
1007
|
-
switch (change.action) {
|
|
1008
|
-
case "note.add":
|
|
1009
|
-
return Object.freeze({
|
|
1010
|
-
action: change.action,
|
|
1011
|
-
text: text3(change.text, 1e5),
|
|
1012
|
-
...change.title === void 0 ? {} : { title: text3(change.title, 500) }
|
|
1013
|
-
});
|
|
1014
|
-
case "tags.add":
|
|
1015
|
-
case "tags.remove":
|
|
1016
|
-
return Object.freeze({ action: change.action, tags: strings(change.tags, 100, 200) });
|
|
1017
|
-
case "memory.add": {
|
|
1018
|
-
if (!["summary", "digest", "preference"].includes(change.kind) || !["personal", "work"].includes(change.scope))
|
|
1019
|
-
throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
|
|
1020
|
-
return Object.freeze({
|
|
1021
|
-
action: change.action,
|
|
1022
|
-
body: text3(change.body, 2e4),
|
|
1023
|
-
kind: change.kind,
|
|
1024
|
-
scope: change.scope,
|
|
1025
|
-
evidence: strings(change.evidence, 100, 4e3),
|
|
1026
|
-
...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
case "fact.add": {
|
|
1030
|
-
if (!MEETING_FACT_TYPES.includes(change.type) || !["personal", "work"].includes(change.scope))
|
|
1031
|
-
throw new CliError("validation_error", `fact type (${MEETING_FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
|
|
1032
|
-
return Object.freeze({
|
|
1033
|
-
action: change.action,
|
|
1034
|
-
statement: text3(change.statement, 2e4),
|
|
1035
|
-
type: change.type,
|
|
1036
|
-
scope: change.scope,
|
|
1037
|
-
evidence: strings(change.evidence, 100, 4e3),
|
|
1038
|
-
...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
|
|
1039
|
-
});
|
|
1040
|
-
}
|
|
1041
|
-
case "event.link":
|
|
1042
|
-
return Object.freeze({
|
|
1043
|
-
action: change.action,
|
|
1044
|
-
eventId: change.eventId === null ? null : id(change.eventId),
|
|
1045
|
-
...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id(change.expectedEventId) }
|
|
1046
|
-
});
|
|
1047
|
-
case "person.link": {
|
|
1048
|
-
const targets = change.targetAccountIds;
|
|
1049
|
-
if (targets !== void 0 && (!Array.isArray(targets) || targets.length < 1 || targets.length > 1e3))
|
|
1050
|
-
throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
|
|
1051
|
-
return Object.freeze({
|
|
1052
|
-
action: change.action,
|
|
1053
|
-
participantId: id(change.participantId),
|
|
1054
|
-
personUid: uid(change.personUid),
|
|
1055
|
-
...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id))]) },
|
|
1056
|
-
...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
}, "validateMeetingContextChange");
|
|
1061
|
-
var createMeetingContext = /* @__PURE__ */ __name((scope3, accountId, ports) => {
|
|
1062
|
-
const fixed = snapshotMeetingScope(scope3);
|
|
1063
|
-
const account = id(accountId);
|
|
1064
|
-
const actions = Object.freeze([...new Set(ports.actions)]);
|
|
1065
|
-
if (actions.some((action) => !Object.hasOwn(fields, action)))
|
|
1066
|
-
throw new CliError("validation_error", "unsupported meeting context capability");
|
|
1067
|
-
const apply = ports.apply.bind(ports);
|
|
1068
|
-
return {
|
|
1069
|
-
scope: fixed,
|
|
1070
|
-
accountId: account,
|
|
1071
|
-
actions,
|
|
1072
|
-
async change(meetingId, input, options = {}) {
|
|
1073
|
-
const target = id(meetingId);
|
|
1074
|
-
const change = validateMeetingContextChange(input);
|
|
1075
|
-
if (!actions.includes(change.action))
|
|
1076
|
-
throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
|
|
1077
|
-
const context3 = Object.freeze({
|
|
1078
|
-
scope: fixed,
|
|
1079
|
-
accountId: account,
|
|
1080
|
-
...options.signal ? { signal: options.signal } : {}
|
|
1081
|
-
});
|
|
1082
|
-
const outcome = await dispatchMeetingMutation(options, () => apply(target, change, context3));
|
|
1083
|
-
return {
|
|
1084
|
-
scope: fixed,
|
|
1085
|
-
accountId: account,
|
|
1086
|
-
meetingId: target,
|
|
1087
|
-
change,
|
|
1088
|
-
applied: outcome.applied,
|
|
1089
|
-
...outcome.applied ? { result: outcome.value } : {}
|
|
1090
|
-
};
|
|
1091
|
-
}
|
|
1092
|
-
};
|
|
1093
|
-
}, "createMeetingContext");
|
|
1094
|
-
|
|
1095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1096
916
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1097
|
-
var
|
|
917
|
+
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1098
918
|
throw new CliError("validation_error", message);
|
|
1099
919
|
}, "invalid");
|
|
1100
|
-
var
|
|
920
|
+
var text3 = /* @__PURE__ */ __name((value, limit) => {
|
|
1101
921
|
if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
|
|
1102
|
-
return
|
|
922
|
+
return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
|
|
1103
923
|
return value.trim();
|
|
1104
924
|
}, "text");
|
|
1105
925
|
var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
|
|
1106
|
-
var
|
|
926
|
+
var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
|
|
1107
927
|
if (Object.keys(value).some((key) => !allowed.includes(key)))
|
|
1108
|
-
|
|
928
|
+
invalid3(`unknown ${noun} field`);
|
|
1109
929
|
}, "fields");
|
|
1110
930
|
var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
|
|
1111
931
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => {
|
|
1112
932
|
if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
|
|
1113
|
-
return
|
|
1114
|
-
|
|
933
|
+
return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
|
|
934
|
+
fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
|
|
1115
935
|
if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > 16)
|
|
1116
|
-
return
|
|
1117
|
-
const key =
|
|
936
|
+
return invalid3(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
|
|
937
|
+
const key = text3(input.key, 64);
|
|
1118
938
|
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
|
|
1119
|
-
return
|
|
939
|
+
return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
|
|
1120
940
|
const ids2 = /* @__PURE__ */ new Set();
|
|
1121
941
|
const findings = input.findings.map((finding) => {
|
|
1122
942
|
if (!finding || typeof finding !== "object")
|
|
1123
|
-
return
|
|
1124
|
-
const id4 =
|
|
943
|
+
return invalid3("a finding is an object");
|
|
944
|
+
const id4 = text3(finding.id, 64);
|
|
1125
945
|
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
|
|
1126
|
-
return
|
|
946
|
+
return invalid3("finding IDs must be unique simple keys");
|
|
1127
947
|
ids2.add(id4);
|
|
1128
|
-
const project = finding.project === void 0 && rules.anySubject ? void 0 :
|
|
948
|
+
const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
|
|
1129
949
|
if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
|
|
1130
|
-
return
|
|
1131
|
-
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(
|
|
1132
|
-
return
|
|
950
|
+
return invalid3("a finding names a project reference");
|
|
951
|
+
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
|
|
952
|
+
return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
|
|
1133
953
|
if (finding.kind === "task" && project === void 0)
|
|
1134
|
-
return
|
|
954
|
+
return invalid3("a task finding names the project the task goes in");
|
|
1135
955
|
if (!Array.isArray(finding.evidence) || finding.evidence.length < 1 || finding.evidence.length > 8)
|
|
1136
|
-
return
|
|
956
|
+
return invalid3(`a finding requires 1\u20138 cited ${rules.cited}s`);
|
|
1137
957
|
const evidence = finding.evidence.map((item) => {
|
|
1138
958
|
if (!item || typeof item !== "object")
|
|
1139
|
-
return
|
|
1140
|
-
|
|
959
|
+
return invalid3("finding evidence is a reference and fingerprint");
|
|
960
|
+
fields(item, ["reference", "fingerprint"], rules.singular);
|
|
1141
961
|
if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
|
|
1142
|
-
return
|
|
962
|
+
return invalid3("evidence requires a reference and fingerprint");
|
|
1143
963
|
const reference2 = rules.reference(item.reference);
|
|
1144
964
|
if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
|
|
1145
|
-
return
|
|
965
|
+
return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
|
|
1146
966
|
return { reference: reference2, fingerprint: item.fingerprint };
|
|
1147
967
|
}).sort((a, b) => a.reference.localeCompare(b.reference));
|
|
1148
968
|
if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
|
|
1149
|
-
return
|
|
969
|
+
return invalid3(`duplicate evidence ${rules.cited}`);
|
|
1150
970
|
const base = {
|
|
1151
971
|
id: id4,
|
|
1152
972
|
...project === void 0 ? {} : { project },
|
|
@@ -1154,14 +974,28 @@ var validateFindings = /* @__PURE__ */ __name((input, rules) => {
|
|
|
1154
974
|
evidence
|
|
1155
975
|
};
|
|
1156
976
|
if (finding.kind === "fact") {
|
|
1157
|
-
|
|
1158
|
-
if (
|
|
1159
|
-
return
|
|
1160
|
-
|
|
977
|
+
fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
|
|
978
|
+
if (finding.type === "payment")
|
|
979
|
+
return invalid3("a payment is a finding of kind payment");
|
|
980
|
+
if (!FACT_TYPES.includes(finding.type))
|
|
981
|
+
return invalid3("unknown fact finding type");
|
|
982
|
+
return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
|
|
983
|
+
}
|
|
984
|
+
if (finding.kind === "payment" && rules.payments) {
|
|
985
|
+
fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
|
|
986
|
+
if (finding.supersedes !== void 0 && !/^fact:[1-9]\d*$/.test(String(finding.supersedes)))
|
|
987
|
+
return invalid3("a payment finding supersedes a fact: reference");
|
|
988
|
+
return {
|
|
989
|
+
...base,
|
|
990
|
+
kind: "payment",
|
|
991
|
+
...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
|
|
992
|
+
payment: validatePayment(finding.payment),
|
|
993
|
+
...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
|
|
994
|
+
};
|
|
1161
995
|
}
|
|
1162
996
|
if (finding.kind !== "task")
|
|
1163
|
-
return
|
|
1164
|
-
|
|
997
|
+
return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
|
|
998
|
+
fields(finding, [
|
|
1165
999
|
"id",
|
|
1166
1000
|
"project",
|
|
1167
1001
|
"evidence",
|
|
@@ -1176,34 +1010,34 @@ var validateFindings = /* @__PURE__ */ __name((input, rules) => {
|
|
|
1176
1010
|
"assigneeEvidence"
|
|
1177
1011
|
], rules.singular);
|
|
1178
1012
|
if (!TASK_TYPES.includes(finding.type))
|
|
1179
|
-
return
|
|
1013
|
+
return invalid3("a task finding type is bug, chore or feature");
|
|
1180
1014
|
if (!["explicit", "inferred"].includes(finding.commitment))
|
|
1181
|
-
return
|
|
1015
|
+
return invalid3("task commitment must be explicit or inferred");
|
|
1182
1016
|
const support = /* @__PURE__ */ __name((value) => {
|
|
1183
1017
|
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1184
|
-
return
|
|
1018
|
+
return invalid3("date and assignee support must cite the finding's evidence");
|
|
1185
1019
|
return [...new Set(value)].sort();
|
|
1186
1020
|
}, "support");
|
|
1187
1021
|
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1188
|
-
return
|
|
1022
|
+
return invalid3("optional dates and assignees require their supporting evidence");
|
|
1189
1023
|
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1190
|
-
return
|
|
1024
|
+
return invalid3("an assignee must be a person reference");
|
|
1191
1025
|
return {
|
|
1192
1026
|
...base,
|
|
1193
1027
|
kind: "task",
|
|
1194
1028
|
type: finding.type,
|
|
1195
|
-
title:
|
|
1196
|
-
reason:
|
|
1029
|
+
title: text3(finding.title, 300),
|
|
1030
|
+
reason: text3(finding.reason, 2e3),
|
|
1197
1031
|
commitment: finding.commitment,
|
|
1198
1032
|
...finding.dueAt === void 0 ? {} : { dueAt: meetingTimestamp(finding.dueAt, "finding due date"), dueEvidence: support(finding.dueEvidence) },
|
|
1199
1033
|
...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence) }
|
|
1200
1034
|
};
|
|
1201
1035
|
});
|
|
1202
|
-
return { schemaVersion: 1, key, extractor:
|
|
1036
|
+
return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
|
|
1203
1037
|
}, "validateFindings");
|
|
1204
1038
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1205
1039
|
|
|
1206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1207
1041
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1208
1042
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1209
1043
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -1214,7 +1048,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
1214
1048
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1215
1049
|
var meetingFindingFingerprint = findingFingerprint;
|
|
1216
1050
|
|
|
1217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
1218
1052
|
var context = {
|
|
1219
1053
|
command: "search meetings",
|
|
1220
1054
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -1333,7 +1167,56 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text9) => {
|
|
|
1333
1167
|
return { version: 1, language: "lucene-v1", root };
|
|
1334
1168
|
}, "meetingWordsQuery");
|
|
1335
1169
|
|
|
1336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
1171
|
+
var LATIN_WORDS = {
|
|
1172
|
+
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
1173
|
+
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
1174
|
+
de: ["der", "und", "ist", "nicht", "das", "ich", "wir", "mit", "auch", "ein"],
|
|
1175
|
+
fr: ["le", "les", "est", "une", "pas", "je", "vous", "nous", "avec", "mais"],
|
|
1176
|
+
it: ["gli", "della", "sono", "perch\xE9", "anche", "questo", "molto", "che", "di", "\xE8"],
|
|
1177
|
+
pt: ["n\xE3o", "voc\xEA", "isso", "muito", "ent\xE3o", "com", "uma", "tamb\xE9m", "mas", "eu"]
|
|
1178
|
+
};
|
|
1179
|
+
var LATIN_LANGUAGE = new Map(Object.entries(LATIN_WORDS).flatMap(([language, words2]) => words2.map((word) => [word, language])));
|
|
1180
|
+
var UKRAINIAN = /[іїєґ]/giu;
|
|
1181
|
+
var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
|
|
1182
|
+
var LATIN = new RegExp("\\p{Script=Latin}", "gu");
|
|
1183
|
+
var MIN_LETTERS = 20;
|
|
1184
|
+
var DOMINANT = 0.75;
|
|
1185
|
+
var countOf = /* @__PURE__ */ __name((text9, pattern) => text9.match(pattern)?.length ?? 0, "countOf");
|
|
1186
|
+
var latinLanguage = /* @__PURE__ */ __name((texts) => {
|
|
1187
|
+
const votes = /* @__PURE__ */ new Map();
|
|
1188
|
+
for (const text9 of texts)
|
|
1189
|
+
for (const word of text9.toLowerCase().split(/[^\p{L}]+/u)) {
|
|
1190
|
+
const language = LATIN_LANGUAGE.get(word);
|
|
1191
|
+
if (language)
|
|
1192
|
+
votes.set(language, (votes.get(language) ?? 0) + 1);
|
|
1193
|
+
}
|
|
1194
|
+
const [first, second] = [...votes].sort((a, b) => b[1] - a[1]);
|
|
1195
|
+
if (!first || first[1] < 3 || second && first[1] < 2 * second[1])
|
|
1196
|
+
return null;
|
|
1197
|
+
return first[0];
|
|
1198
|
+
}, "latinLanguage");
|
|
1199
|
+
var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
1200
|
+
const all = [...texts];
|
|
1201
|
+
let cyrillic = 0;
|
|
1202
|
+
let latin = 0;
|
|
1203
|
+
let ukrainian = 0;
|
|
1204
|
+
for (const text9 of all) {
|
|
1205
|
+
cyrillic += countOf(text9, CYRILLIC);
|
|
1206
|
+
latin += countOf(text9, LATIN);
|
|
1207
|
+
ukrainian += countOf(text9, UKRAINIAN);
|
|
1208
|
+
}
|
|
1209
|
+
const letters = cyrillic + latin;
|
|
1210
|
+
if (letters < MIN_LETTERS)
|
|
1211
|
+
return null;
|
|
1212
|
+
if (cyrillic / letters >= DOMINANT)
|
|
1213
|
+
return ukrainian / cyrillic >= 0.01 ? "uk" : "ru";
|
|
1214
|
+
if (latin / letters >= DOMINANT)
|
|
1215
|
+
return latinLanguage(all);
|
|
1216
|
+
return null;
|
|
1217
|
+
}, "transcriptLanguage");
|
|
1218
|
+
|
|
1219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
1337
1220
|
var contentHash = /* @__PURE__ */ __name(async (text9) => {
|
|
1338
1221
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text9));
|
|
1339
1222
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -1347,7 +1230,7 @@ var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
|
1347
1230
|
var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
|
|
1348
1231
|
source,
|
|
1349
1232
|
format,
|
|
1350
|
-
language:
|
|
1233
|
+
language: transcriptLanguage(lines.map((line2) => line2.text)),
|
|
1351
1234
|
contentHash: await contentHash(hashText),
|
|
1352
1235
|
externalCreatedAt: null,
|
|
1353
1236
|
metadata: null,
|
|
@@ -1370,7 +1253,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
|
1370
1253
|
return time;
|
|
1371
1254
|
}, "timestamp");
|
|
1372
1255
|
|
|
1373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
1374
1257
|
var TranscriptTextError = class extends Error {
|
|
1375
1258
|
static {
|
|
1376
1259
|
__name(this, "TranscriptTextError");
|
|
@@ -1403,117 +1286,383 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
1403
1286
|
else
|
|
1404
1287
|
header[key] = EMPTY.has(value) ? null : value;
|
|
1405
1288
|
}
|
|
1406
|
-
}
|
|
1407
|
-
if (!sawHeader)
|
|
1408
|
-
throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
|
|
1409
|
-
const found = [];
|
|
1410
|
-
for (const block of text9.split(/\n\s*\n/)) {
|
|
1411
|
-
const match = LINE.exec(block.trim().replace(RULE, ""));
|
|
1412
|
-
if (!match)
|
|
1413
|
-
continue;
|
|
1414
|
-
const [, hours = "0", minutes = "0", seconds = "0", speaker, said = ""] = match;
|
|
1415
|
-
found.push({
|
|
1416
|
-
startMs: ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3,
|
|
1417
|
-
speaker: speaker?.trim() || null,
|
|
1418
|
-
text: said.trim()
|
|
1419
|
-
});
|
|
1420
|
-
}
|
|
1421
|
-
const lines = found.map((line2, at) => ({
|
|
1422
|
-
...line2,
|
|
1423
|
-
endMs: Math.max(line2.startMs, found[at + 1]?.startMs ?? line2.startMs)
|
|
1424
|
-
}));
|
|
1425
|
-
return { header, lines };
|
|
1426
|
-
}, "parseTranscriptText");
|
|
1289
|
+
}
|
|
1290
|
+
if (!sawHeader)
|
|
1291
|
+
throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
|
|
1292
|
+
const found = [];
|
|
1293
|
+
for (const block of text9.split(/\n\s*\n/)) {
|
|
1294
|
+
const match = LINE.exec(block.trim().replace(RULE, ""));
|
|
1295
|
+
if (!match)
|
|
1296
|
+
continue;
|
|
1297
|
+
const [, hours = "0", minutes = "0", seconds = "0", speaker, said = ""] = match;
|
|
1298
|
+
found.push({
|
|
1299
|
+
startMs: ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3,
|
|
1300
|
+
speaker: speaker?.trim() || null,
|
|
1301
|
+
text: said.trim()
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
const lines = found.map((line2, at) => ({
|
|
1305
|
+
...line2,
|
|
1306
|
+
endMs: Math.max(line2.startMs, found[at + 1]?.startMs ?? line2.startMs)
|
|
1307
|
+
}));
|
|
1308
|
+
return { header, lines };
|
|
1309
|
+
}, "parseTranscriptText");
|
|
1310
|
+
|
|
1311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
1312
|
+
var VttError = class extends Error {
|
|
1313
|
+
static {
|
|
1314
|
+
__name(this, "VttError");
|
|
1315
|
+
}
|
|
1316
|
+
name = "VttError";
|
|
1317
|
+
};
|
|
1318
|
+
var TIMESTAMP = /^(?:(\d+):)?([0-5]\d):([0-5]\d)\.(\d{3})$/;
|
|
1319
|
+
var SKIPPED = /^(NOTE|STYLE|REGION)(\s|$)/;
|
|
1320
|
+
var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
|
|
1321
|
+
const match = TIMESTAMP.exec(stamp);
|
|
1322
|
+
if (!match)
|
|
1323
|
+
throw new VttError(`line ${lineNo}: "${stamp}" is not a WebVTT timestamp`);
|
|
1324
|
+
const [, hours = "0", minutes = "0", seconds = "0", ms = "0"] = match;
|
|
1325
|
+
return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms);
|
|
1326
|
+
}, "millis");
|
|
1327
|
+
var splitSpeaker = /* @__PURE__ */ __name((text9) => {
|
|
1328
|
+
const firstLine = text9.split("\n", 1)[0] ?? "";
|
|
1329
|
+
const at = firstLine.indexOf(": ");
|
|
1330
|
+
if (at <= 0)
|
|
1331
|
+
return { speaker: null, text: text9 };
|
|
1332
|
+
return { speaker: firstLine.slice(0, at).trim(), text: text9.slice(at + 2) };
|
|
1333
|
+
}, "splitSpeaker");
|
|
1334
|
+
var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
1335
|
+
const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
|
|
1336
|
+
if (!/^WEBVTT([ \t].*)?$/.test(lines[0] ?? ""))
|
|
1337
|
+
throw new VttError('line 1: a WebVTT file starts with "WEBVTT"');
|
|
1338
|
+
const cues = [];
|
|
1339
|
+
let i = lines.findIndex((line2) => line2.trim() === "");
|
|
1340
|
+
if (i < 0)
|
|
1341
|
+
return [];
|
|
1342
|
+
while (i < lines.length) {
|
|
1343
|
+
while (i < lines.length && lines[i]?.trim() === "")
|
|
1344
|
+
i++;
|
|
1345
|
+
const start = i;
|
|
1346
|
+
while (i < lines.length && lines[i]?.trim() !== "")
|
|
1347
|
+
i++;
|
|
1348
|
+
const block = lines.slice(start, i);
|
|
1349
|
+
if (block.length === 0 || SKIPPED.test(block[0] ?? ""))
|
|
1350
|
+
continue;
|
|
1351
|
+
const timingAt = block.findIndex((line2) => line2.includes("-->"));
|
|
1352
|
+
if (timingAt < 0 || timingAt > 1)
|
|
1353
|
+
throw new VttError(`line ${start + 1}: a cue has no timing line`);
|
|
1354
|
+
const lineNo = start + timingAt + 1;
|
|
1355
|
+
const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
|
|
1356
|
+
const to = rest.trim().split(/\s+/)[0] ?? "";
|
|
1357
|
+
const text9 = block.slice(timingAt + 1).join("\n").trim();
|
|
1358
|
+
cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text9) });
|
|
1359
|
+
}
|
|
1360
|
+
return cues;
|
|
1361
|
+
}, "parseVtt");
|
|
1362
|
+
|
|
1363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
1364
|
+
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
1365
|
+
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
1366
|
+
for (const file of files) {
|
|
1367
|
+
try {
|
|
1368
|
+
const format = file.format ?? "vtt";
|
|
1369
|
+
const lines = format === "text" ? parseTranscriptText(file.content).lines : parseVtt(file.content);
|
|
1370
|
+
const participants = file.participants ?? [];
|
|
1371
|
+
const details = await store.saveMeeting({
|
|
1372
|
+
meeting: file.meeting,
|
|
1373
|
+
participants: file.participants,
|
|
1374
|
+
transcripts: [await transcriptInput(lines, participants, file.source ?? "file", file.content, format)],
|
|
1375
|
+
now,
|
|
1376
|
+
fromFile: true
|
|
1377
|
+
});
|
|
1378
|
+
await linkEvent(store, details, now);
|
|
1379
|
+
report.meetings++;
|
|
1380
|
+
report.participants += participants.length;
|
|
1381
|
+
report.transcriptRows += lines.length;
|
|
1382
|
+
} catch (error) {
|
|
1383
|
+
report.warnings.push({
|
|
1384
|
+
externalId: file.meeting.externalId,
|
|
1385
|
+
message: error instanceof Error ? error.message : "Meeting import failed"
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
const zones = new Set(files.map((file) => file.meeting.timezone).filter((zone2) => zone2 !== null && zone2 !== void 0));
|
|
1390
|
+
const [zone] = zones;
|
|
1391
|
+
if (zones.size === 1 && zone)
|
|
1392
|
+
report.timezone = zone;
|
|
1393
|
+
return report;
|
|
1394
|
+
}, "importFiles");
|
|
1395
|
+
|
|
1396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
1397
|
+
var CHAT_MESSAGES_READ = 1e5;
|
|
1398
|
+
|
|
1399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/provider.js
|
|
1400
|
+
var snapshotMeetingScope = /* @__PURE__ */ __name((scope3) => {
|
|
1401
|
+
const provider = scope3?.provider;
|
|
1402
|
+
const account = scope3?.account;
|
|
1403
|
+
if (typeof provider !== "string" || !provider.trim() || provider.length > 200 || /[\0\r\n]/.test(provider) || typeof account !== "string" || !account.trim() || account.length > 1e3 || /[\0\r\n]/.test(account))
|
|
1404
|
+
throw new CliError("validation_error", "meeting provider and account must be bounded nonempty identifiers");
|
|
1405
|
+
return Object.freeze({ provider, account });
|
|
1406
|
+
}, "snapshotMeetingScope");
|
|
1407
|
+
|
|
1408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
1409
|
+
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
1410
|
+
if (typeof value !== "string" || !value.trim())
|
|
1411
|
+
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
1412
|
+
return value;
|
|
1413
|
+
}, "nonempty");
|
|
1414
|
+
var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
1415
|
+
if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
|
|
1416
|
+
throw new CliError("validation_error", "unsupported meeting change field");
|
|
1417
|
+
const result = {};
|
|
1418
|
+
if (change.title !== void 0)
|
|
1419
|
+
result.title = nonempty(change.title, "meeting title");
|
|
1420
|
+
if (create && result.title === void 0)
|
|
1421
|
+
throw new CliError("validation_error", "meeting title is required");
|
|
1422
|
+
if (change.kind !== void 0) {
|
|
1423
|
+
if (change.kind !== "instant" && change.kind !== "scheduled")
|
|
1424
|
+
throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
|
|
1425
|
+
result.kind = change.kind;
|
|
1426
|
+
}
|
|
1427
|
+
if (change.startTime !== void 0) {
|
|
1428
|
+
result.startTime = meetingTimestamp(change.startTime, "meeting start");
|
|
1429
|
+
}
|
|
1430
|
+
if (change.durationMinutes !== void 0) {
|
|
1431
|
+
if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
|
|
1432
|
+
throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
|
|
1433
|
+
result.durationMinutes = change.durationMinutes;
|
|
1434
|
+
}
|
|
1435
|
+
if (change.timezone !== void 0) {
|
|
1436
|
+
if (typeof change.timezone !== "string" || !change.timezone.trim())
|
|
1437
|
+
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
1438
|
+
try {
|
|
1439
|
+
new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
|
|
1440
|
+
} catch {
|
|
1441
|
+
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
1442
|
+
}
|
|
1443
|
+
result.timezone = change.timezone;
|
|
1444
|
+
}
|
|
1445
|
+
if (change.agenda !== void 0) {
|
|
1446
|
+
if (typeof change.agenda !== "string")
|
|
1447
|
+
throw new CliError("validation_error", "meeting agenda must be text");
|
|
1448
|
+
result.agenda = change.agenda;
|
|
1449
|
+
}
|
|
1450
|
+
if (create) {
|
|
1451
|
+
result.kind ??= "scheduled";
|
|
1452
|
+
if (result.kind === "scheduled" && result.startTime === void 0)
|
|
1453
|
+
throw new CliError("validation_error", "scheduled meeting start is required");
|
|
1454
|
+
} else if (!Object.keys(result).length)
|
|
1455
|
+
throw new CliError("validation_error", "at least one meeting change is required");
|
|
1456
|
+
return Object.freeze(result);
|
|
1457
|
+
}, "validateMeetingChange");
|
|
1458
|
+
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
1459
|
+
if (!signal?.aborted)
|
|
1460
|
+
return;
|
|
1461
|
+
if (signal.reason instanceof CliError)
|
|
1462
|
+
throw signal.reason;
|
|
1463
|
+
const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
|
|
1464
|
+
throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
|
|
1465
|
+
}, "checkCancelled");
|
|
1466
|
+
var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
|
|
1467
|
+
const { apply, dryRun, signal } = options;
|
|
1468
|
+
checkCancelled(signal);
|
|
1469
|
+
if (apply !== true || dryRun)
|
|
1470
|
+
return { applied: false };
|
|
1471
|
+
return { applied: true, value: await dispatch(signal) };
|
|
1472
|
+
}, "dispatchMeetingMutation");
|
|
1473
|
+
var createMeetingManagement = /* @__PURE__ */ __name((scope3, ports) => {
|
|
1474
|
+
const fixed = snapshotMeetingScope(scope3);
|
|
1475
|
+
const capabilities = {};
|
|
1476
|
+
for (const name of ["list", "get", "invitation", "create", "update", "cancel"]) {
|
|
1477
|
+
const port = ports[name];
|
|
1478
|
+
if (typeof port === "function")
|
|
1479
|
+
Object.defineProperty(capabilities, name, { value: port.bind(ports), enumerable: true });
|
|
1480
|
+
}
|
|
1481
|
+
Object.freeze(capabilities);
|
|
1482
|
+
const context3 = /* @__PURE__ */ __name((options) => {
|
|
1483
|
+
const signal = options.signal;
|
|
1484
|
+
checkCancelled(signal);
|
|
1485
|
+
return Object.freeze({ scope: fixed, ...signal ? { signal } : {} });
|
|
1486
|
+
}, "context");
|
|
1487
|
+
const capability = /* @__PURE__ */ __name((name) => {
|
|
1488
|
+
const port = capabilities[name];
|
|
1489
|
+
if (!port)
|
|
1490
|
+
throw new CliError("provider_unavailable", `meeting provider does not support ${name}`);
|
|
1491
|
+
return port;
|
|
1492
|
+
}, "capability");
|
|
1493
|
+
return {
|
|
1494
|
+
scope: fixed,
|
|
1495
|
+
capabilities: Object.freeze(Object.keys(capabilities).filter((name) => typeof capabilities[name] === "function")),
|
|
1496
|
+
list(options = {}) {
|
|
1497
|
+
return capability("list")(context3(options));
|
|
1498
|
+
},
|
|
1499
|
+
get(id4, options = {}) {
|
|
1500
|
+
return capability("get")(nonempty(id4, "meeting id"), context3(options));
|
|
1501
|
+
},
|
|
1502
|
+
invitation(id4, options = {}) {
|
|
1503
|
+
return capability("invitation")(nonempty(id4, "meeting id"), context3(options));
|
|
1504
|
+
},
|
|
1505
|
+
async create(change, options = {}) {
|
|
1506
|
+
const port = capability("create");
|
|
1507
|
+
const validated = validateMeetingChange(change, true);
|
|
1508
|
+
const ctx = context3(options);
|
|
1509
|
+
const outcome = await dispatchMeetingMutation(options, () => port(validated, ctx));
|
|
1510
|
+
return {
|
|
1511
|
+
action: "create",
|
|
1512
|
+
scope: fixed,
|
|
1513
|
+
change: validated,
|
|
1514
|
+
applied: outcome.applied,
|
|
1515
|
+
...outcome.value ? { meeting: outcome.value } : {}
|
|
1516
|
+
};
|
|
1517
|
+
},
|
|
1518
|
+
async update(id4, change, options = {}) {
|
|
1519
|
+
const port = capability("update");
|
|
1520
|
+
const validatedId = nonempty(id4, "meeting id");
|
|
1521
|
+
const validated = validateMeetingChange(change, false);
|
|
1522
|
+
const ctx = context3(options);
|
|
1523
|
+
const outcome = await dispatchMeetingMutation(options, () => port(validatedId, validated, ctx));
|
|
1524
|
+
return { action: "update", scope: fixed, id: validatedId, change: validated, applied: outcome.applied };
|
|
1525
|
+
},
|
|
1526
|
+
async cancel(id4, options = {}) {
|
|
1527
|
+
const port = capability("cancel");
|
|
1528
|
+
const validatedId = nonempty(id4, "meeting id");
|
|
1529
|
+
const occurrenceId2 = options.occurrenceId === void 0 ? void 0 : nonempty(options.occurrenceId, "occurrence id");
|
|
1530
|
+
const ctx = { ...context3(options), ...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 } };
|
|
1531
|
+
const outcome = await dispatchMeetingMutation(options, () => port(validatedId, ctx));
|
|
1532
|
+
return {
|
|
1533
|
+
action: "cancel",
|
|
1534
|
+
scope: fixed,
|
|
1535
|
+
id: validatedId,
|
|
1536
|
+
applied: outcome.applied,
|
|
1537
|
+
...occurrenceId2 === void 0 ? {} : { occurrenceId: occurrenceId2 }
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
}, "createMeetingManagement");
|
|
1427
1542
|
|
|
1428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1429
|
-
var
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
1544
|
+
var id = /* @__PURE__ */ __name((value) => {
|
|
1545
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
|
|
1546
|
+
throw new CliError("validation_error", "meeting context identifiers must be positive integers");
|
|
1547
|
+
return value;
|
|
1548
|
+
}, "id");
|
|
1549
|
+
var text4 = /* @__PURE__ */ __name((value, max) => {
|
|
1550
|
+
if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
|
|
1551
|
+
throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
|
|
1552
|
+
return value.trim();
|
|
1553
|
+
}, "text");
|
|
1554
|
+
var uid = /* @__PURE__ */ __name((value) => {
|
|
1555
|
+
const result = text4(value, 100);
|
|
1556
|
+
if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
|
|
1557
|
+
throw new CliError("validation_error", "person UID must be a positive integer");
|
|
1558
|
+
return result;
|
|
1559
|
+
}, "uid");
|
|
1560
|
+
var strings = /* @__PURE__ */ __name((value, count6, length) => {
|
|
1561
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > count6)
|
|
1562
|
+
throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
|
|
1563
|
+
return Object.freeze([...new Set(value.map((entry) => text4(entry, length)))]);
|
|
1564
|
+
}, "strings");
|
|
1565
|
+
var fields2 = {
|
|
1566
|
+
"note.add": ["text", "title"],
|
|
1567
|
+
"tags.add": ["tags"],
|
|
1568
|
+
"tags.remove": ["tags"],
|
|
1569
|
+
"memory.add": ["body", "kind", "scope", "evidence", "subject"],
|
|
1570
|
+
"fact.add": ["statement", "type", "scope", "evidence", "subject"],
|
|
1571
|
+
"event.link": ["eventId", "expectedEventId"],
|
|
1572
|
+
"person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
|
|
1434
1573
|
};
|
|
1435
|
-
var
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
},
|
|
1444
|
-
var splitSpeaker = /* @__PURE__ */ __name((text9) => {
|
|
1445
|
-
const firstLine = text9.split("\n", 1)[0] ?? "";
|
|
1446
|
-
const at = firstLine.indexOf(": ");
|
|
1447
|
-
if (at <= 0)
|
|
1448
|
-
return { speaker: null, text: text9 };
|
|
1449
|
-
return { speaker: firstLine.slice(0, at).trim(), text: text9.slice(at + 2) };
|
|
1450
|
-
}, "splitSpeaker");
|
|
1451
|
-
var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
1452
|
-
const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
|
|
1453
|
-
if (!/^WEBVTT([ \t].*)?$/.test(lines[0] ?? ""))
|
|
1454
|
-
throw new VttError('line 1: a WebVTT file starts with "WEBVTT"');
|
|
1455
|
-
const cues = [];
|
|
1456
|
-
let i = lines.findIndex((line2) => line2.trim() === "");
|
|
1457
|
-
if (i < 0)
|
|
1458
|
-
return [];
|
|
1459
|
-
while (i < lines.length) {
|
|
1460
|
-
while (i < lines.length && lines[i]?.trim() === "")
|
|
1461
|
-
i++;
|
|
1462
|
-
const start = i;
|
|
1463
|
-
while (i < lines.length && lines[i]?.trim() !== "")
|
|
1464
|
-
i++;
|
|
1465
|
-
const block = lines.slice(start, i);
|
|
1466
|
-
if (block.length === 0 || SKIPPED.test(block[0] ?? ""))
|
|
1467
|
-
continue;
|
|
1468
|
-
const timingAt = block.findIndex((line2) => line2.includes("-->"));
|
|
1469
|
-
if (timingAt < 0 || timingAt > 1)
|
|
1470
|
-
throw new VttError(`line ${start + 1}: a cue has no timing line`);
|
|
1471
|
-
const lineNo = start + timingAt + 1;
|
|
1472
|
-
const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
|
|
1473
|
-
const to = rest.trim().split(/\s+/)[0] ?? "";
|
|
1474
|
-
const text9 = block.slice(timingAt + 1).join("\n").trim();
|
|
1475
|
-
cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text9) });
|
|
1476
|
-
}
|
|
1477
|
-
return cues;
|
|
1478
|
-
}, "parseVtt");
|
|
1479
|
-
|
|
1480
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
1481
|
-
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
1482
|
-
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
1483
|
-
for (const file of files) {
|
|
1484
|
-
try {
|
|
1485
|
-
const format = file.format ?? "vtt";
|
|
1486
|
-
const lines = format === "text" ? parseTranscriptText(file.content).lines : parseVtt(file.content);
|
|
1487
|
-
const participants = file.participants ?? [];
|
|
1488
|
-
const details = await store.saveMeeting({
|
|
1489
|
-
meeting: file.meeting,
|
|
1490
|
-
participants: file.participants,
|
|
1491
|
-
transcripts: [await transcriptInput(lines, participants, file.source ?? "file", file.content, format)],
|
|
1492
|
-
now,
|
|
1493
|
-
fromFile: true
|
|
1574
|
+
var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
1575
|
+
if (!change || typeof change !== "object" || Array.isArray(change) || !Object.hasOwn(fields2, change.action) || Object.keys(change).some((key) => key !== "action" && !fields2[change.action].includes(key)))
|
|
1576
|
+
throw new CliError("validation_error", "unsupported meeting context change");
|
|
1577
|
+
switch (change.action) {
|
|
1578
|
+
case "note.add":
|
|
1579
|
+
return Object.freeze({
|
|
1580
|
+
action: change.action,
|
|
1581
|
+
text: text4(change.text, 1e5),
|
|
1582
|
+
...change.title === void 0 ? {} : { title: text4(change.title, 500) }
|
|
1494
1583
|
});
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1584
|
+
case "tags.add":
|
|
1585
|
+
case "tags.remove":
|
|
1586
|
+
return Object.freeze({ action: change.action, tags: strings(change.tags, 100, 200) });
|
|
1587
|
+
case "memory.add": {
|
|
1588
|
+
if (!["summary", "digest", "preference"].includes(change.kind) || !["personal", "work"].includes(change.scope))
|
|
1589
|
+
throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
|
|
1590
|
+
return Object.freeze({
|
|
1591
|
+
action: change.action,
|
|
1592
|
+
body: text4(change.body, 2e4),
|
|
1593
|
+
kind: change.kind,
|
|
1594
|
+
scope: change.scope,
|
|
1595
|
+
evidence: strings(change.evidence, 100, 4e3),
|
|
1596
|
+
...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
case "fact.add": {
|
|
1600
|
+
if (!FACT_TYPES.includes(change.type) || !["personal", "work"].includes(change.scope))
|
|
1601
|
+
throw new CliError("validation_error", `fact type (${FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
|
|
1602
|
+
return Object.freeze({
|
|
1603
|
+
action: change.action,
|
|
1604
|
+
statement: text4(change.statement, 2e4),
|
|
1605
|
+
type: change.type,
|
|
1606
|
+
scope: change.scope,
|
|
1607
|
+
evidence: strings(change.evidence, 100, 4e3),
|
|
1608
|
+
...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
|
|
1609
|
+
});
|
|
1610
|
+
}
|
|
1611
|
+
case "event.link":
|
|
1612
|
+
return Object.freeze({
|
|
1613
|
+
action: change.action,
|
|
1614
|
+
eventId: change.eventId === null ? null : id(change.eventId),
|
|
1615
|
+
...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id(change.expectedEventId) }
|
|
1616
|
+
});
|
|
1617
|
+
case "person.link": {
|
|
1618
|
+
const targets = change.targetAccountIds;
|
|
1619
|
+
if (targets !== void 0 && (!Array.isArray(targets) || targets.length < 1 || targets.length > 1e3))
|
|
1620
|
+
throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
|
|
1621
|
+
return Object.freeze({
|
|
1622
|
+
action: change.action,
|
|
1623
|
+
participantId: id(change.participantId),
|
|
1624
|
+
personUid: uid(change.personUid),
|
|
1625
|
+
...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id))]) },
|
|
1626
|
+
...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
|
|
1503
1627
|
});
|
|
1504
1628
|
}
|
|
1505
1629
|
}
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1630
|
+
}, "validateMeetingContextChange");
|
|
1631
|
+
var createMeetingContext = /* @__PURE__ */ __name((scope3, accountId, ports) => {
|
|
1632
|
+
const fixed = snapshotMeetingScope(scope3);
|
|
1633
|
+
const account = id(accountId);
|
|
1634
|
+
const actions = Object.freeze([...new Set(ports.actions)]);
|
|
1635
|
+
if (actions.some((action) => !Object.hasOwn(fields2, action)))
|
|
1636
|
+
throw new CliError("validation_error", "unsupported meeting context capability");
|
|
1637
|
+
const apply = ports.apply.bind(ports);
|
|
1638
|
+
return {
|
|
1639
|
+
scope: fixed,
|
|
1640
|
+
accountId: account,
|
|
1641
|
+
actions,
|
|
1642
|
+
async change(meetingId, input, options = {}) {
|
|
1643
|
+
const target = id(meetingId);
|
|
1644
|
+
const change = validateMeetingContextChange(input);
|
|
1645
|
+
if (!actions.includes(change.action))
|
|
1646
|
+
throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
|
|
1647
|
+
const context3 = Object.freeze({
|
|
1648
|
+
scope: fixed,
|
|
1649
|
+
accountId: account,
|
|
1650
|
+
...options.signal ? { signal: options.signal } : {}
|
|
1651
|
+
});
|
|
1652
|
+
const outcome = await dispatchMeetingMutation(options, () => apply(target, change, context3));
|
|
1653
|
+
return {
|
|
1654
|
+
scope: fixed,
|
|
1655
|
+
accountId: account,
|
|
1656
|
+
meetingId: target,
|
|
1657
|
+
change,
|
|
1658
|
+
applied: outcome.applied,
|
|
1659
|
+
...outcome.applied ? { result: outcome.value } : {}
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
};
|
|
1663
|
+
}, "createMeetingContext");
|
|
1515
1664
|
|
|
1516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
1517
1666
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
1518
1667
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
1519
1668
|
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)))
|
|
@@ -1526,7 +1675,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
1526
1675
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
1527
1676
|
}, "validateMeetingPassage");
|
|
1528
1677
|
|
|
1529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
1530
1679
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
1531
1680
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
1532
1681
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -1551,7 +1700,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
1551
1700
|
return { ...input, limit, maxReadBytes };
|
|
1552
1701
|
}, "validateMeetingPreparationContext");
|
|
1553
1702
|
|
|
1554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
1555
1704
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
1556
1705
|
var id2 = pipe(string(), minLength(1));
|
|
1557
1706
|
var meetingProjectEvidence = strictObject({
|
|
@@ -1672,7 +1821,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
1672
1821
|
};
|
|
1673
1822
|
}, "meetingProjectEvidenceAnswer");
|
|
1674
1823
|
|
|
1675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
1676
1825
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
1677
1826
|
const integer5 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
1678
1827
|
if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer5(options.limit ?? 100, 1, 1e3) || !integer5(options.maxReadBytes ?? 4194304, 1, 67108864) || [
|
|
@@ -1692,7 +1841,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
1692
1841
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
1693
1842
|
}, "validateMeetingHitSearch");
|
|
1694
1843
|
|
|
1695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
1696
1845
|
var ids = {
|
|
1697
1846
|
meeting_id: "meetingId",
|
|
1698
1847
|
identity_id: "participantIdentityId",
|
|
@@ -1783,7 +1932,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
1783
1932
|
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
1784
1933
|
}, "prepareMeetingProjectEvidence");
|
|
1785
1934
|
|
|
1786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
1787
1936
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
1788
1937
|
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
1789
1938
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -1791,7 +1940,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
|
|
|
1791
1940
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
1792
1941
|
}, "readMeetingProjectEvidence");
|
|
1793
1942
|
|
|
1794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
1795
1944
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
1796
1945
|
const { identityExternalId, ...fields3 } = p;
|
|
1797
1946
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -1930,7 +2079,7 @@ unlinked`, format)],
|
|
|
1930
2079
|
return report;
|
|
1931
2080
|
}, "pull");
|
|
1932
2081
|
|
|
1933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
1934
2083
|
var text5 = string();
|
|
1935
2084
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
1936
2085
|
var id3 = pipe(number(), integer(), minValue(1));
|
|
@@ -2156,10 +2305,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
2156
2305
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
2157
2306
|
}), "eventItem");
|
|
2158
2307
|
|
|
2159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-schedule.js
|
|
2160
2309
|
import { createHash as createHash3 } from "node:crypto";
|
|
2161
2310
|
|
|
2162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-sync.js
|
|
2163
2312
|
var RecordingSyncError = class extends CliError {
|
|
2164
2313
|
static {
|
|
2165
2314
|
__name(this, "RecordingSyncError");
|
|
@@ -2480,7 +2629,7 @@ async function* syncRecordingArchive(catalog, input) {
|
|
|
2480
2629
|
}
|
|
2481
2630
|
__name(syncRecordingArchive, "syncRecordingArchive");
|
|
2482
2631
|
|
|
2483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-schedule.js
|
|
2484
2633
|
var fail2 = /* @__PURE__ */ __name((message) => {
|
|
2485
2634
|
throw new CliError("validation_error", message);
|
|
2486
2635
|
}, "fail");
|
|
@@ -2587,7 +2736,7 @@ var installRecordingArchiveSchedule = /* @__PURE__ */ __name(async (scheduler, v
|
|
|
2587
2736
|
return { applied: true, backend, schedule };
|
|
2588
2737
|
}, "installRecordingArchiveSchedule");
|
|
2589
2738
|
|
|
2590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
2591
2740
|
var RecordingTransferError = class extends CliError {
|
|
2592
2741
|
static {
|
|
2593
2742
|
__name(this, "RecordingTransferError");
|
|
@@ -2752,7 +2901,7 @@ var transferRecording = /* @__PURE__ */ __name(async (source, storage, options)
|
|
|
2752
2901
|
}
|
|
2753
2902
|
}, "transferRecording");
|
|
2754
2903
|
|
|
2755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
2756
2905
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
2757
2906
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2758
2907
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -2782,7 +2931,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
2782
2931
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
2783
2932
|
}, "validateMeetingRelatedHistory");
|
|
2784
2933
|
|
|
2785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
2786
2935
|
var text8 = string();
|
|
2787
2936
|
var identifier = pipe(text8, minLength(1));
|
|
2788
2937
|
var nullableText2 = nullable(text8);
|
|
@@ -2900,23 +3049,30 @@ var embedding = union([
|
|
|
2900
3049
|
})
|
|
2901
3050
|
})
|
|
2902
3051
|
]);
|
|
3052
|
+
var repair = strictObject({
|
|
3053
|
+
account_id: identifier,
|
|
3054
|
+
applied: flag,
|
|
3055
|
+
transcripts: count5,
|
|
3056
|
+
languages: array(strictObject({ language: nullableText2, transcripts: count5 }))
|
|
3057
|
+
});
|
|
2903
3058
|
var MEETING_RESULT_ENTITIES = {
|
|
2904
3059
|
meeting_ingestion: run,
|
|
2905
3060
|
meeting_export: exported,
|
|
2906
3061
|
meeting_association: meetingChange,
|
|
2907
3062
|
meeting_transcription: transcription,
|
|
2908
|
-
meeting_embedding: embedding
|
|
3063
|
+
meeting_embedding: embedding,
|
|
3064
|
+
meeting_repair: repair
|
|
2909
3065
|
};
|
|
2910
3066
|
|
|
2911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
2912
3068
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
2913
3069
|
|
|
2914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
2915
3071
|
var SAVE_INSTRUCTION = "If this shows something worth keeping \u2014 a decision, a promise, a preference \u2014 and memo's server is connected, propose it with facts_add or memories_add, citing the msg: locator or meeting: reference. Otherwise skip this.";
|
|
2916
3072
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
2917
3073
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
2918
3074
|
|
|
2919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
2920
3076
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
2921
3077
|
input.signal?.throwIfAborted();
|
|
2922
3078
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -2937,62 +3093,62 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
2937
3093
|
return { ...input, limit, maxReadBytes };
|
|
2938
3094
|
}, "validateMeetingSeriesHistory");
|
|
2939
3095
|
|
|
2940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
2941
3097
|
import { createHash as createHash4 } from "node:crypto";
|
|
2942
3098
|
|
|
2943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2944
|
-
var
|
|
3099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3100
|
+
var invalid4 = /* @__PURE__ */ __name((field) => {
|
|
2945
3101
|
throw new CliError("invalid_response", `meeting occurrence ${field} is invalid`);
|
|
2946
3102
|
}, "invalid");
|
|
2947
3103
|
var occurrenceTime = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isSafeInteger(value) && Math.abs(value) <= 864e13, "occurrenceTime");
|
|
2948
3104
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
2949
3105
|
var readOccurrenceSchedule = /* @__PURE__ */ __name((input, meetingId, limit, maxReadBytes) => {
|
|
2950
3106
|
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
2951
|
-
|
|
3107
|
+
invalid4("schedule");
|
|
2952
3108
|
for (const key of Object.keys(input))
|
|
2953
3109
|
if (!["meetingId", "kind", "timezone", "occurrences", "complete", "missing"].includes(key))
|
|
2954
|
-
|
|
3110
|
+
invalid4(key);
|
|
2955
3111
|
if (input.meetingId !== meetingId)
|
|
2956
|
-
|
|
3112
|
+
invalid4("meetingId");
|
|
2957
3113
|
if (!["single", "recurring", "unscheduled", "unknown"].includes(input.kind))
|
|
2958
|
-
|
|
3114
|
+
invalid4("kind");
|
|
2959
3115
|
if (input.timezone !== null) {
|
|
2960
3116
|
if (typeof input.timezone !== "string" || input.timezone.length > 100)
|
|
2961
|
-
|
|
3117
|
+
invalid4("timezone");
|
|
2962
3118
|
try {
|
|
2963
3119
|
new Intl.DateTimeFormat("en", { timeZone: input.timezone }).format(0);
|
|
2964
3120
|
} catch {
|
|
2965
|
-
|
|
3121
|
+
invalid4("timezone");
|
|
2966
3122
|
}
|
|
2967
3123
|
}
|
|
2968
3124
|
if (typeof input.complete !== "boolean")
|
|
2969
|
-
|
|
3125
|
+
invalid4("complete");
|
|
2970
3126
|
if (!Array.isArray(input.missing) || input.missing.length > 2 || new Set(input.missing).size !== input.missing.length || input.missing.some((value) => !["schedule-details", "occurrence-details"].includes(value)) || input.complete && input.missing.length > 0)
|
|
2971
|
-
|
|
3127
|
+
invalid4("missing");
|
|
2972
3128
|
if (!Array.isArray(input.occurrences) || input.occurrences.length > limit)
|
|
2973
|
-
|
|
3129
|
+
invalid4("occurrences");
|
|
2974
3130
|
if (input.kind === "single" && input.occurrences.length > 1)
|
|
2975
|
-
|
|
3131
|
+
invalid4("single occurrence count");
|
|
2976
3132
|
const seen = /* @__PURE__ */ new Set();
|
|
2977
3133
|
const occurrences = input.occurrences.map((entry) => {
|
|
2978
3134
|
if (!entry || typeof entry !== "object" || Array.isArray(entry))
|
|
2979
|
-
|
|
3135
|
+
invalid4("entry");
|
|
2980
3136
|
for (const key2 of Object.keys(entry))
|
|
2981
3137
|
if (!["id", "startAt", "endAt", "status", "verified"].includes(key2))
|
|
2982
|
-
|
|
3138
|
+
invalid4(key2);
|
|
2983
3139
|
if (entry.id !== null && !occurrenceId(entry.id))
|
|
2984
|
-
|
|
3140
|
+
invalid4("id");
|
|
2985
3141
|
if (entry.startAt !== null && !occurrenceTime(entry.startAt))
|
|
2986
|
-
|
|
3142
|
+
invalid4("startAt");
|
|
2987
3143
|
if (entry.endAt !== null && (!occurrenceTime(entry.endAt) || entry.startAt === null || entry.endAt <= entry.startAt))
|
|
2988
|
-
|
|
3144
|
+
invalid4("endAt");
|
|
2989
3145
|
if (!["scheduled", "cancelled"].includes(entry.status) || typeof entry.verified !== "boolean")
|
|
2990
|
-
|
|
3146
|
+
invalid4("status");
|
|
2991
3147
|
if (entry.verified && (entry.startAt === null || !["single", "recurring"].includes(input.kind) || input.kind === "recurring" && entry.id === null))
|
|
2992
|
-
|
|
3148
|
+
invalid4("verification");
|
|
2993
3149
|
const key = entry.id ?? "single";
|
|
2994
3150
|
if (seen.has(key))
|
|
2995
|
-
|
|
3151
|
+
invalid4("duplicate id");
|
|
2996
3152
|
seen.add(key);
|
|
2997
3153
|
return { id: entry.id, startAt: entry.startAt, endAt: entry.endAt, status: entry.status, verified: entry.verified };
|
|
2998
3154
|
});
|
|
@@ -3005,35 +3161,35 @@ var readOccurrenceSchedule = /* @__PURE__ */ __name((input, meetingId, limit, ma
|
|
|
3005
3161
|
missing: [...input.missing]
|
|
3006
3162
|
};
|
|
3007
3163
|
if (new TextEncoder().encode(JSON.stringify(result)).byteLength > maxReadBytes)
|
|
3008
|
-
|
|
3164
|
+
invalid4("maxReadBytes budget");
|
|
3009
3165
|
return result;
|
|
3010
3166
|
}, "readOccurrenceSchedule");
|
|
3011
3167
|
|
|
3012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3013
3169
|
var inventoryHash = /* @__PURE__ */ __name((value) => createHash4("sha256").update(JSON.stringify(value)).digest("hex"), "inventoryHash");
|
|
3014
3170
|
var inventorySize = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "inventorySize");
|
|
3015
|
-
function
|
|
3171
|
+
function invalid5(field, response = false) {
|
|
3016
3172
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3017
3173
|
}
|
|
3018
|
-
__name(
|
|
3174
|
+
__name(invalid5, "invalid");
|
|
3019
3175
|
var object2 = /* @__PURE__ */ __name((value, fields3, field, response = false) => {
|
|
3020
3176
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
3021
|
-
|
|
3177
|
+
invalid5(field, response);
|
|
3022
3178
|
for (const key of Object.keys(value))
|
|
3023
3179
|
if (!fields3.includes(key))
|
|
3024
|
-
|
|
3180
|
+
invalid5(`${field}.${key}`, response);
|
|
3025
3181
|
}, "object");
|
|
3026
3182
|
var cursorDetails = /* @__PURE__ */ __name((value) => {
|
|
3027
3183
|
if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
|
|
3028
|
-
|
|
3184
|
+
invalid5("cursor");
|
|
3029
3185
|
try {
|
|
3030
3186
|
const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
|
|
3031
3187
|
object2(decoded, ["version", "selection", "cursor"], "cursor");
|
|
3032
3188
|
if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
|
|
3033
|
-
|
|
3189
|
+
invalid5("cursor");
|
|
3034
3190
|
return decoded;
|
|
3035
3191
|
} catch {
|
|
3036
|
-
return
|
|
3192
|
+
return invalid5("cursor");
|
|
3037
3193
|
}
|
|
3038
3194
|
}, "cursorDetails");
|
|
3039
3195
|
var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
@@ -3043,19 +3199,19 @@ var inventoryRequest = /* @__PURE__ */ __name((scope3, input) => {
|
|
|
3043
3199
|
object2(input, ["after", "until", "limit", "maxReadBytes", "bytes", "cursor", "signal"], "request");
|
|
3044
3200
|
const { after, until, signal } = input;
|
|
3045
3201
|
if (!occurrenceTime(after) || !occurrenceTime(until) || after >= until || until - after > 366 * 864e5)
|
|
3046
|
-
|
|
3202
|
+
invalid5("after/until");
|
|
3047
3203
|
const limits = { limit: input.limit ?? 100, maxReadBytes: input.maxReadBytes ?? 65536, bytes: input.bytes ?? 65536 };
|
|
3048
3204
|
for (const [key, value] of Object.entries(limits))
|
|
3049
3205
|
if (!Number.isSafeInteger(value) || value < (key === "bytes" ? 2048 : 1) || value > (key === "limit" ? 100 : 1048576))
|
|
3050
|
-
|
|
3206
|
+
invalid5(key);
|
|
3051
3207
|
if (signal !== void 0 && !(signal instanceof AbortSignal))
|
|
3052
|
-
|
|
3208
|
+
invalid5("signal");
|
|
3053
3209
|
const selection = inventoryHash({ scope: scope3, after, until });
|
|
3054
3210
|
let cursor;
|
|
3055
3211
|
if (input.cursor !== void 0) {
|
|
3056
3212
|
const decoded = cursorDetails(input.cursor);
|
|
3057
3213
|
if (decoded.selection !== selection)
|
|
3058
|
-
|
|
3214
|
+
invalid5("cursor");
|
|
3059
3215
|
cursor = decoded.cursor;
|
|
3060
3216
|
}
|
|
3061
3217
|
return { after, until, limits, signal, selection, cursor };
|
|
@@ -3063,41 +3219,41 @@ var inventoryRequest = /* @__PURE__ */ __name((scope3, input) => {
|
|
|
3063
3219
|
var inventoryCursor = /* @__PURE__ */ __name((selection, cursor) => {
|
|
3064
3220
|
const encoded = Buffer.from(JSON.stringify({ version: 1, selection, cursor }), "utf8").toString("base64url");
|
|
3065
3221
|
if (encoded.length > 4096)
|
|
3066
|
-
|
|
3222
|
+
invalid5("nextCursor budget", true);
|
|
3067
3223
|
return encoded;
|
|
3068
3224
|
}, "inventoryCursor");
|
|
3069
3225
|
var inventoryPage = /* @__PURE__ */ __name((scope3, request, page) => {
|
|
3070
3226
|
object2(page, ["scope", "after", "until", "items", "nextCursor", "coverage"], "page", true);
|
|
3071
3227
|
object2(page.scope, ["provider", "account"], "scope", true);
|
|
3072
3228
|
if (page.scope.provider !== scope3.provider || page.scope.account !== scope3.account || page.after !== request.after || page.until !== request.until)
|
|
3073
|
-
|
|
3229
|
+
invalid5("selection", true);
|
|
3074
3230
|
object2(page.coverage, ["selection", "partial"], "coverage", true);
|
|
3075
3231
|
if (!["provider-window", "provider-inventory"].includes(page.coverage.selection) || typeof page.coverage.partial !== "boolean")
|
|
3076
|
-
|
|
3232
|
+
invalid5("coverage", true);
|
|
3077
3233
|
if (page.nextCursor !== null && (!occurrenceId(page.nextCursor) || page.nextCursor === request.cursor))
|
|
3078
|
-
|
|
3234
|
+
invalid5("nextCursor", true);
|
|
3079
3235
|
if (!Array.isArray(page.items) || page.items.length > request.limits.limit)
|
|
3080
|
-
|
|
3236
|
+
invalid5("items", true);
|
|
3081
3237
|
const seen = /* @__PURE__ */ new Set();
|
|
3082
3238
|
const items = page.items.map((item) => {
|
|
3083
3239
|
object2(item, ["meetingId", "title", "kind", "scheduledStartAt"], "item", true);
|
|
3084
3240
|
if (!occurrenceId(item.meetingId) || seen.has(item.meetingId))
|
|
3085
|
-
|
|
3241
|
+
invalid5("meetingId", true);
|
|
3086
3242
|
seen.add(item.meetingId);
|
|
3087
3243
|
if (item.title !== null && (typeof item.title !== "string" || item.title.length > 8192))
|
|
3088
|
-
|
|
3244
|
+
invalid5("title", true);
|
|
3089
3245
|
if (!["single", "recurring", "unscheduled", "unknown"].includes(item.kind))
|
|
3090
|
-
|
|
3246
|
+
invalid5("kind", true);
|
|
3091
3247
|
if (item.scheduledStartAt !== null && !occurrenceTime(item.scheduledStartAt))
|
|
3092
|
-
|
|
3248
|
+
invalid5("scheduledStartAt", true);
|
|
3093
3249
|
return { meetingId: item.meetingId, title: item.title, kind: item.kind, scheduledStartAt: item.scheduledStartAt };
|
|
3094
3250
|
});
|
|
3095
3251
|
if (inventorySize(page) > request.limits.maxReadBytes)
|
|
3096
|
-
|
|
3252
|
+
invalid5("maxReadBytes budget", true);
|
|
3097
3253
|
return { items, selection: page.coverage.selection, partial: page.coverage.partial, nextCursor: page.nextCursor };
|
|
3098
3254
|
}, "inventoryPage");
|
|
3099
3255
|
|
|
3100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/series-inventory.js
|
|
3101
3257
|
var cancelled3 = /* @__PURE__ */ __name((signal) => {
|
|
3102
3258
|
if (signal?.aborted)
|
|
3103
3259
|
throw new CliError("cancelled", "meeting inventory reading was cancelled");
|
|
@@ -3153,7 +3309,7 @@ var createMeetingSeriesInventoryReader = /* @__PURE__ */ __name((scope3, port) =
|
|
|
3153
3309
|
};
|
|
3154
3310
|
}, "createMeetingSeriesInventoryReader");
|
|
3155
3311
|
|
|
3156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
3157
3313
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3158
3314
|
const zone = timeZone ?? "UTC";
|
|
3159
3315
|
try {
|
|
@@ -3232,7 +3388,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
3232
3388
|
};
|
|
3233
3389
|
}, "aggregateMeetingStats");
|
|
3234
3390
|
|
|
3235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/transcription.js
|
|
3236
3392
|
var bounded = /* @__PURE__ */ __name((value, max, name) => {
|
|
3237
3393
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
3238
3394
|
throw new CliError("validation_error", `${name} must be an integer from 1 to ${max}`);
|
|
@@ -3276,6 +3432,9 @@ var transcribeMeeting = /* @__PURE__ */ __name(async (source, store, target, opt
|
|
|
3276
3432
|
const timing = recognition2.timing ?? "recognition-segments";
|
|
3277
3433
|
if (timing !== "fixed-windows" && timing !== "recognition-segments")
|
|
3278
3434
|
throw new CliError("invalid_response", "unsupported recognition timing");
|
|
3435
|
+
const modelLanguage = recognition2.language;
|
|
3436
|
+
if (modelLanguage !== void 0 && (typeof modelLanguage !== "string" || !/^[a-z]{2,3}$/.test(modelLanguage)))
|
|
3437
|
+
throw new CliError("invalid_response", "recognition language must be a two- or three-letter code");
|
|
3279
3438
|
const media = Object.freeze({
|
|
3280
3439
|
id: identifier2(raw.id),
|
|
3281
3440
|
contentHash: raw.contentHash,
|
|
@@ -3353,7 +3512,7 @@ var transcribeMeeting = /* @__PURE__ */ __name(async (source, store, target, opt
|
|
|
3353
3512
|
source: `local/${encodeURIComponent(media.recognition.engine)}/${encodeURIComponent(media.recognition.model)}`,
|
|
3354
3513
|
format: "local-transcription"
|
|
3355
3514
|
},
|
|
3356
|
-
language:
|
|
3515
|
+
language: modelLanguage ?? transcriptLanguage(rows.map((row) => row.text)),
|
|
3357
3516
|
contentHash: hash,
|
|
3358
3517
|
externalCreatedAt: null,
|
|
3359
3518
|
metadata: provenance,
|
|
@@ -3383,7 +3542,7 @@ var transcribeMeeting = /* @__PURE__ */ __name(async (source, store, target, opt
|
|
|
3383
3542
|
};
|
|
3384
3543
|
}, "transcribeMeeting");
|
|
3385
3544
|
|
|
3386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/upcoming.js
|
|
3387
3546
|
var cancelled5 = /* @__PURE__ */ __name((signal) => {
|
|
3388
3547
|
if (!signal?.aborted)
|
|
3389
3548
|
return;
|
|
@@ -3453,7 +3612,7 @@ var createUpcomingMeetingReader = /* @__PURE__ */ __name((scope3, port) => {
|
|
|
3453
3612
|
};
|
|
3454
3613
|
}, "createUpcomingMeetingReader");
|
|
3455
3614
|
|
|
3456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/meetings/watch.js
|
|
3457
3616
|
var sleep = /* @__PURE__ */ __name((milliseconds, signal) => new Promise((resolve) => {
|
|
3458
3617
|
const finish = /* @__PURE__ */ __name(() => {
|
|
3459
3618
|
clearTimeout(timer);
|
|
@@ -3536,13 +3695,11 @@ export {
|
|
|
3536
3695
|
meetingSummaryAnswer,
|
|
3537
3696
|
serializeVtt,
|
|
3538
3697
|
exportMeeting,
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
validateMeetingContextChange,
|
|
3545
|
-
createMeetingContext,
|
|
3698
|
+
FACT_TYPES,
|
|
3699
|
+
PAYMENT_DIRECTIONS,
|
|
3700
|
+
PAYMENT_STATES,
|
|
3701
|
+
validatePayment,
|
|
3702
|
+
paymentTitle,
|
|
3546
3703
|
findingHash,
|
|
3547
3704
|
validateFindings,
|
|
3548
3705
|
findingFingerprint,
|
|
@@ -3553,12 +3710,19 @@ export {
|
|
|
3553
3710
|
liftMeetingFields,
|
|
3554
3711
|
parseMeetingQuery,
|
|
3555
3712
|
meetingWordsQuery,
|
|
3713
|
+
transcriptLanguage,
|
|
3556
3714
|
TranscriptTextError,
|
|
3557
3715
|
parseTranscriptText,
|
|
3558
3716
|
VttError,
|
|
3559
3717
|
parseVtt,
|
|
3560
3718
|
importFiles,
|
|
3561
3719
|
CHAT_MESSAGES_READ,
|
|
3720
|
+
snapshotMeetingScope,
|
|
3721
|
+
validateMeetingChange,
|
|
3722
|
+
dispatchMeetingMutation,
|
|
3723
|
+
createMeetingManagement,
|
|
3724
|
+
validateMeetingContextChange,
|
|
3725
|
+
createMeetingContext,
|
|
3562
3726
|
meetingHitContextLimits,
|
|
3563
3727
|
validateMeetingPassage,
|
|
3564
3728
|
validateMeetingPreparationContext,
|