@wirecat/drive-cli 0.58.0 → 0.60.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/bin/drive.js +6 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{all-profiles-ANDWOJDL.js → all-profiles-537I27Z4.js} +14 -13
- package/dist/bundle/{anthropic-EZPZUWGS.js → anthropic-X4NWVHDF.js} +9 -9
- package/dist/bundle/{app-server-67WL423B.js → app-server-KSHJKKS7.js} +53 -51
- package/dist/bundle/{bun-NIIYUR5F.js → bun-WTBGGCUC.js} +2 -2
- package/dist/bundle/{bun-sqlite-A5ZKTIYC.js → bun-sqlite-T7Y3JFFD.js} +8 -8
- package/dist/bundle/{chunk-5NPFHWLP.js → chunk-22ATLSNK.js} +5 -5
- package/dist/bundle/{chunk-ALTG7BZQ.js → chunk-246P2DCT.js} +19 -19
- package/dist/bundle/{chunk-NYINLKWT.js → chunk-2AXA5SKP.js} +1 -1
- package/dist/bundle/{chunk-BAEIAQWH.js → chunk-3TQHIHZI.js} +2 -2
- package/dist/bundle/{chunk-MBNKNWOG.js → chunk-4CBZEAQ7.js} +35 -34
- package/dist/bundle/{chunk-SWFA36F3.js → chunk-4VHBDVY2.js} +20 -14
- package/dist/bundle/{chunk-Z5GDNCTJ.js → chunk-4XZXH2NM.js} +2 -2
- package/dist/bundle/{chunk-A4DHPOFQ.js → chunk-57QVQGBE.js} +53 -39
- package/dist/bundle/{chunk-SPVPKHBQ.js → chunk-5AMRCBMP.js} +78 -40
- package/dist/bundle/{chunk-ED5JNYN5.js → chunk-5XHLQZAG.js} +30 -28
- package/dist/bundle/{chunk-BLJVCJZU.js → chunk-67QXMO2G.js} +26 -26
- package/dist/bundle/{chunk-EFEI724Z.js → chunk-6HTKB4WC.js} +1 -1
- package/dist/bundle/{chunk-U2RSVKR5.js → chunk-73MNUSP3.js} +1 -1
- package/dist/bundle/{chunk-4UU4ONKY.js → chunk-73TTP6ET.js} +5326 -636
- package/dist/bundle/{chunk-4ICWGMHN.js → chunk-77C5XRH3.js} +7 -7
- package/dist/bundle/{chunk-W6KMNO3C.js → chunk-77YTRBL6.js} +11 -11
- package/dist/bundle/{chunk-YHRJUZ3O.js → chunk-ALWTUDZF.js} +6 -4
- package/dist/bundle/{chunk-ESF2B22R.js → chunk-AXWXQNTC.js} +14 -11
- package/dist/bundle/{chunk-FD7A6745.js → chunk-CKGHRWVR.js} +4 -4
- package/dist/bundle/{chunk-X4F3M6L6.js → chunk-D6WIWOQC.js} +4 -4
- package/dist/bundle/{chunk-TCJRJ3TE.js → chunk-DMHGWL5D.js} +13 -13
- package/dist/bundle/{chunk-AFZ33AC7.js → chunk-DQDKLZAK.js} +179 -50
- package/dist/bundle/{chunk-ITD7WI23.js → chunk-EBLA7GXY.js} +1 -1
- package/dist/bundle/{chunk-UTDL7MKT.js → chunk-EHAI773E.js} +2 -2
- package/dist/bundle/{chunk-RRHC5SBB.js → chunk-FO4TCH6P.js} +2 -2
- package/dist/bundle/{chunk-7VFD3UJQ.js → chunk-FTZNUZO7.js} +3 -3
- package/dist/bundle/{chunk-JEMKSWVI.js → chunk-FZOCQQ66.js} +12 -12
- package/dist/bundle/{chunk-P5MCZ635.js → chunk-GD6TQ6U4.js} +11 -88
- package/dist/bundle/{chunk-PYPLD7JO.js → chunk-GVRS5AIH.js} +2 -2
- package/dist/bundle/{chunk-2TASMYGM.js → chunk-HCJG7ENG.js} +3 -3
- package/dist/bundle/{chunk-TIXIB32T.js → chunk-HFGR33KD.js} +153 -101
- package/dist/bundle/{chunk-ASPIEEXN.js → chunk-HIP43OGZ.js} +1 -1
- package/dist/bundle/{chunk-IBJOO5FG.js → chunk-HQVIK6PM.js} +37 -19
- package/dist/bundle/{chunk-AL7MY7MW.js → chunk-IRZ7OF3F.js} +1 -1
- package/dist/bundle/{chunk-OOR6PEHV.js → chunk-IXN7Y6JA.js} +1 -1
- package/dist/bundle/{chunk-4EEOJ54H.js → chunk-JGUJJNGZ.js} +5930 -3061
- package/dist/bundle/{chunk-6THTUYPT.js → chunk-JQLIM6BH.js} +5 -5
- package/dist/bundle/{chunk-LSSIVBQI.js → chunk-K6XVRA6U.js} +1 -1
- package/dist/bundle/chunk-KEXTTZJM.js +35 -0
- package/dist/bundle/{chunk-3RG27IWA.js → chunk-LJ77Y3TK.js} +5 -5
- package/dist/bundle/{chunk-I4VUHZSD.js → chunk-LQSRVQ3V.js} +4 -3
- package/dist/bundle/{chunk-NKL5XXOM.js → chunk-MVNPE5FZ.js} +8 -8
- package/dist/bundle/{chunk-6SARLV3Z.js → chunk-MXP35VPO.js} +4 -4
- package/dist/bundle/{chunk-J36Z6BDZ.js → chunk-N7S2UPF3.js} +652 -373
- package/dist/bundle/{chunk-4GZLX2ME.js → chunk-O37ESNAP.js} +40 -33
- package/dist/bundle/{chunk-OZEJA67C.js → chunk-OMKUBCNN.js} +8 -8
- package/dist/bundle/{chunk-XQMMB6ST.js → chunk-OYNUBWD2.js} +2 -22
- package/dist/bundle/{chunk-OUQVZTF5.js → chunk-PDYHEWKG.js} +7 -42
- package/dist/bundle/{chunk-QVIJMV22.js → chunk-PETFPXLU.js} +3 -3
- package/dist/bundle/{chunk-TNX77VPM.js → chunk-PPL5ASW2.js} +4908 -1588
- package/dist/bundle/{chunk-GDRO4YMH.js → chunk-QIJWSKZL.js} +4 -4
- package/dist/bundle/{chunk-EFX6FIDM.js → chunk-S36HRPNS.js} +1 -1
- package/dist/bundle/{chunk-WICYDOVL.js → chunk-SBHSNOU4.js} +91 -23
- package/dist/bundle/{chunk-7YUZAEBG.js → chunk-SZXI4OXX.js} +2 -2
- package/dist/bundle/{chunk-O3K46QRL.js → chunk-TKW4QWCY.js} +20 -6
- package/dist/bundle/{chunk-UBZ2LH7N.js → chunk-TVQDMP2F.js} +1533 -602
- package/dist/bundle/{chunk-7AL57FCK.js → chunk-TXMTMEHW.js} +4 -4
- package/dist/bundle/{chunk-X5XWUQNU.js → chunk-UNJE63JK.js} +2 -2
- package/dist/bundle/chunk-UTFATA4K.js +93 -0
- package/dist/bundle/{chunk-34XHR5FL.js → chunk-UVLSWLPZ.js} +16 -16
- package/dist/bundle/chunk-UVYVIHEA.js +34 -0
- package/dist/bundle/{chunk-IH4UCM5K.js → chunk-V2VMBM7O.js} +2 -2
- package/dist/bundle/{chunk-KCBHOYNZ.js → chunk-V7QMHMR3.js} +8 -13
- package/dist/bundle/{chunk-IXXQZCNK.js → chunk-VRW6ZDTH.js} +32 -19
- package/dist/bundle/{chunk-VXI67T7U.js → chunk-VVCZS42A.js} +1 -1
- package/dist/bundle/{chunk-A7FMNTCK.js → chunk-W62CON5K.js} +4 -4
- package/dist/bundle/{chunk-BKM2CGG2.js → chunk-XDIEQ2CE.js} +3 -3
- package/dist/bundle/{chunk-OG5ERX4S.js → chunk-XFXRGQXJ.js} +2 -2
- package/dist/bundle/{chunk-UMJLXAJI.js → chunk-YDN2RH5S.js} +2 -2
- package/dist/bundle/{chunk-TMW526H3.js → chunk-YGG7UA3C.js} +5 -5
- package/dist/bundle/{chunk-D72FL3L3.js → chunk-YYHKVOVK.js} +35 -35
- package/dist/bundle/{chunk-3GXNODTB.js → chunk-ZPQS7XJA.js} +4 -4
- package/dist/bundle/{chunk-JZ67M3HR.js → chunk-ZYCLPJ7U.js} +1 -1
- package/dist/bundle/command-contract-NUIWUVYB.js +39 -0
- package/dist/bundle/{decode-2R6DTGRX.js → decode-35N57AFW.js} +8 -8
- package/dist/bundle/{dispatch-DEXAEMIN.js → dispatch-CWXZW3PL.js} +9 -9
- package/dist/bundle/drive.js +12 -12
- package/dist/bundle/{echarts-CLB22SZS.js → echarts-3P3QZWMU.js} +2 -2
- package/dist/bundle/{embed-RJJWOLKN.js → embed-Q6Q5IOJQ.js} +9 -9
- package/dist/bundle/{embedder-DWYS5JYJ.js → embedder-D44JDTAA.js} +12 -12
- package/dist/bundle/entry-ZHCNI7XO.js +22 -0
- package/dist/bundle/{failure-GBZ4L5QO.js → failure-GRMMSDCZ.js} +4 -4
- package/dist/bundle/first-run-3DC2SDWM.js +30 -0
- package/dist/bundle/first-screen-YJF4YODC.js +37 -0
- package/dist/bundle/{google-L776ETP4.js → google-6ZZDKFBN.js} +13 -13
- package/dist/bundle/{google-api-AI5ZJJ2M.js → google-api-E6MOJ4ZD.js} +57 -56
- package/dist/bundle/grants-GWXDH5GM.js +105 -0
- package/dist/bundle/{identity-MDLWK2TX.js → identity-TID7S5NE.js} +6 -6
- package/dist/bundle/{instructions-BXZZNAMS.js → instructions-ANJN4HV3.js} +1 -1
- package/dist/bundle/{login-6HHQLRHY.js → login-BGMK2ABH.js} +65 -66
- package/dist/bundle/{mcp-ZZUYI44D.js → mcp-WBHKX5E3.js} +2 -2
- package/dist/bundle/{node-R6ZNQ3NT.js → node-VOB45ES2.js} +2 -2
- package/dist/bundle/{node-sqlite-AVNHGMVL.js → node-sqlite-TSX6XQY2.js} +14 -8
- package/dist/bundle/oauth-CEOYXW6C.js +22 -0
- package/dist/bundle/{open-BXPLXJC2.js → open-3USWHGNR.js} +8 -7
- package/dist/bundle/{openai-CRO5GDBY.js → openai-YZ5VGPIP.js} +17 -17
- package/dist/bundle/{process-P36JP33R.js → process-44JS2W7L.js} +1 -1
- package/dist/bundle/{program-4DWVWSGQ.js → program-TZLAFKJV.js} +158 -103
- package/dist/bundle/prompt-SG7LAOXW.js +17 -0
- package/dist/bundle/{reasons-IHPNUP5W.js → reasons-ZK3U3CIN.js} +5 -5
- package/dist/bundle/{recognize-NAISVA56.js → recognize-OFW7HWTM.js} +7 -7
- package/dist/bundle/{remote-KCUHG5HV.js → remote-YBDRZQZ5.js} +10 -10
- package/dist/bundle/{rerank-Q3POCDSK.js → rerank-TQQNS5FJ.js} +10 -10
- package/dist/bundle/{serve-5CUOYLSG.js → serve-OPZXMVLH.js} +14 -13
- package/dist/bundle/{server-FXW3GARV.js → server-2D6DDIK5.js} +44 -43
- package/dist/bundle/server-R6G2O772.js +70 -0
- package/dist/bundle/{services-PEYBXZ3R.js → services-34WKT3NN.js} +101 -31
- package/dist/bundle/{sqlite-runtime-YMPWN5PM.js → sqlite-runtime-WPUMKLUV.js} +9 -8
- package/dist/bundle/{start-PFWEF44R.js → start-ZXUJZ4JV.js} +7 -7
- package/dist/bundle/{state-5TQ7IOJH.js → state-AV2RB3AQ.js} +9 -9
- package/dist/bundle/{store-P4OYYFW5.js → store-3M7N2Q5T.js} +20 -16
- package/dist/bundle/{store-E2VWY4O6.js → store-YKV4GAMS.js} +49 -22
- package/dist/bundle/store-maintenance-command-WDXNY4ZF.js +60 -0
- package/dist/bundle/tokens-F63RXXEF.js +103 -0
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +14 -5
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/context.d.ts +4 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts +1 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +14 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -0
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +8 -7
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +5 -2
- package/dist/commands/session.js.map +1 -1
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +22 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.js +5 -5
- package/dist/contract-overrides.js.map +1 -1
- package/dist/errors.js +4 -4
- package/dist/errors.js.map +1 -1
- package/dist/knowledge-query.d.ts +2 -0
- package/dist/knowledge-query.d.ts.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +3 -5
- package/dist/login.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +13 -4
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts +2 -0
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +13 -0
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +2 -22
- package/dist/reasons.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +2 -1
- package/dist/registry.js.map +1 -1
- package/dist/store.d.ts +2 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +9 -0
- package/dist/store.js.map +1 -1
- package/dist/tokens.js +5 -5
- package/dist/tokens.js.map +1 -1
- package/dist/upload.js +1 -1
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/drive-cli/SKILL.md +2 -1
- package/dist/bundle/chunk-7VUHY5LP.js +0 -18
- package/dist/bundle/chunk-Y6M2G7JK.js +0 -3609
- package/dist/bundle/command-contract-ZCXFT764.js +0 -39
- package/dist/bundle/entry-E6H7IUPV.js +0 -21
- package/dist/bundle/first-run-DI2JIG44.js +0 -30
- package/dist/bundle/first-screen-X5N4TCKD.js +0 -37
- package/dist/bundle/grants-HKGYAWL6.js +0 -104
- package/dist/bundle/oauth-UVU52X57.js +0 -22
- package/dist/bundle/prompt-AFWVGRDG.js +0 -17
- package/dist/bundle/server-FTLPSLRU.js +0 -69
- package/dist/bundle/store-maintenance-command-MWVERNK7.js +0 -58
- package/dist/bundle/tokens-OVG4CJO4.js +0 -102
- /package/dist/bundle/{chunk-HPXYN7F3.js → chunk-LK2E2ELG.js} +0 -0
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
queryFieldsOf,
|
|
9
9
|
timezoneOf,
|
|
10
10
|
validateQuery
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4VHBDVY2.js";
|
|
12
12
|
import {
|
|
13
13
|
singleLine,
|
|
14
14
|
visibleControls
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HIP43OGZ.js";
|
|
16
16
|
import {
|
|
17
17
|
STEPS,
|
|
18
18
|
array,
|
|
@@ -36,15 +36,109 @@ import {
|
|
|
36
36
|
strictObject,
|
|
37
37
|
string,
|
|
38
38
|
union
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TKW4QWCY.js";
|
|
40
40
|
import {
|
|
41
41
|
CliError
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-EBLA7GXY.js";
|
|
43
43
|
import {
|
|
44
44
|
__name
|
|
45
45
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
46
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
47
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
48
|
+
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
49
|
+
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
50
|
+
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
51
|
+
var invalid = /* @__PURE__ */ __name((message) => {
|
|
52
|
+
throw new CliError("validation_error", message);
|
|
53
|
+
}, "invalid");
|
|
54
|
+
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
55
|
+
var AMOUNT = /^(\d{1,15})(?:\.(\d{1,2}))?$/;
|
|
56
|
+
var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
57
|
+
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
58
|
+
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
59
|
+
if (!match)
|
|
60
|
+
return invalid("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
61
|
+
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
62
|
+
if (amount === "0.00")
|
|
63
|
+
return invalid("a payment's amount is more than 0");
|
|
64
|
+
return amount;
|
|
65
|
+
}, "amountOf");
|
|
66
|
+
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
67
|
+
const date = typeof value === "string" ? value.trim() : "";
|
|
68
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
69
|
+
return invalid("a payment's dates are ISO dates, such as 2026-10-31");
|
|
70
|
+
return date;
|
|
71
|
+
}, "dateOf");
|
|
72
|
+
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
73
|
+
if (value === void 0 || value === null)
|
|
74
|
+
return null;
|
|
75
|
+
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
76
|
+
return invalid(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
77
|
+
return value.trim();
|
|
78
|
+
}, "optionalText");
|
|
79
|
+
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
80
|
+
if (typeof value !== "string" || !allowed.includes(value))
|
|
81
|
+
return invalid(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
82
|
+
return value;
|
|
83
|
+
}, "oneOf");
|
|
84
|
+
var FIELDS = [
|
|
85
|
+
"amount",
|
|
86
|
+
"currency",
|
|
87
|
+
"direction",
|
|
88
|
+
"counterparty",
|
|
89
|
+
"counterparty_name",
|
|
90
|
+
"due_at",
|
|
91
|
+
"state",
|
|
92
|
+
"item",
|
|
93
|
+
"paid_at"
|
|
94
|
+
];
|
|
95
|
+
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
96
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
97
|
+
return invalid("a payment is an object");
|
|
98
|
+
const raw = input;
|
|
99
|
+
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
100
|
+
if (unknown.length)
|
|
101
|
+
return invalid(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
102
|
+
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
103
|
+
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
104
|
+
return invalid("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
105
|
+
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
106
|
+
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
107
|
+
return invalid("a payment's counterparty is a person:, organization: or project: reference");
|
|
108
|
+
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
109
|
+
if (raw.paid_at != null && state !== "paid")
|
|
110
|
+
return invalid("only a paid payment has paid_at");
|
|
111
|
+
return {
|
|
112
|
+
amount: amountOf(raw.amount),
|
|
113
|
+
currency,
|
|
114
|
+
direction: oneOf(raw.direction, PAYMENT_DIRECTIONS, "direction"),
|
|
115
|
+
counterparty,
|
|
116
|
+
counterparty_name: optionalText(raw.counterparty_name, "counterparty name", 200),
|
|
117
|
+
due_at: raw.due_at === void 0 || raw.due_at === null ? null : dateOf(raw.due_at),
|
|
118
|
+
state,
|
|
119
|
+
item: optionalText(raw.item, "item", 200),
|
|
120
|
+
// Left out when absent, so a finding staged before the field keeps its fingerprint.
|
|
121
|
+
...raw.paid_at == null ? {} : { paid_at: dateOf(raw.paid_at) }
|
|
122
|
+
};
|
|
123
|
+
}, "validatePayment");
|
|
124
|
+
var grouped = /* @__PURE__ */ __name((amount) => {
|
|
125
|
+
const [whole = "0", cents = "00"] = amount.split(".");
|
|
126
|
+
const digits = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
127
|
+
return cents === "00" ? digits : `${digits}.${cents}`;
|
|
128
|
+
}, "grouped");
|
|
129
|
+
var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
130
|
+
const payment = fact.payment;
|
|
131
|
+
if (!payment)
|
|
132
|
+
return "";
|
|
133
|
+
const who = payment.counterparty_name ?? payment.counterparty;
|
|
134
|
+
const way = payment.direction === "to_us" ? "to us" : "from us";
|
|
135
|
+
const party = who === null ? "" : payment.direction === "to_us" ? ` from ${who}` : ` to ${who}`;
|
|
136
|
+
const due = payment.due_at === null ? "" : `, due ${payment.due_at.slice(8, 10)}.${payment.due_at.slice(5, 7)}`;
|
|
137
|
+
const item = payment.item === null ? "" : ` for ${payment.item}`;
|
|
138
|
+
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
139
|
+
}, "paymentTitle");
|
|
140
|
+
|
|
141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
48
142
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
49
143
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
50
144
|
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)))
|
|
@@ -57,11 +151,11 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
57
151
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
58
152
|
}, "validateMeetingPassage");
|
|
59
153
|
|
|
60
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61
|
-
var
|
|
154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
155
|
+
var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
62
156
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
63
157
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
64
|
-
throw
|
|
158
|
+
throw invalid2();
|
|
65
159
|
return value;
|
|
66
160
|
}, "integer");
|
|
67
161
|
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
@@ -70,7 +164,7 @@ var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
|
70
164
|
parts.push(integer2(reference2.transcriptId));
|
|
71
165
|
if (reference2.cuePosition !== void 0) {
|
|
72
166
|
if (reference2.transcriptId === void 0)
|
|
73
|
-
throw
|
|
167
|
+
throw invalid2();
|
|
74
168
|
parts.push(integer2(reference2.cuePosition, 0));
|
|
75
169
|
}
|
|
76
170
|
return `meeting:${parts.join("/")}`;
|
|
@@ -78,10 +172,10 @@ var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
|
78
172
|
var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
|
|
79
173
|
const value = text7.trim();
|
|
80
174
|
if (!value.startsWith("meeting:"))
|
|
81
|
-
throw
|
|
175
|
+
throw invalid2();
|
|
82
176
|
const parts = value.slice(8).split("/");
|
|
83
177
|
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
84
|
-
throw
|
|
178
|
+
throw invalid2();
|
|
85
179
|
const ids2 = parts.map(Number);
|
|
86
180
|
const reference2 = {
|
|
87
181
|
type: "meeting",
|
|
@@ -94,7 +188,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
|
|
|
94
188
|
}, "parseMeetingReference");
|
|
95
189
|
var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
|
|
96
190
|
|
|
97
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
98
192
|
var text = string();
|
|
99
193
|
var count = pipe(number(), integer(), minValue(0));
|
|
100
194
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -159,7 +253,7 @@ var MEETING_QUERY = {
|
|
|
159
253
|
})
|
|
160
254
|
};
|
|
161
255
|
|
|
162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
163
257
|
var text2 = string();
|
|
164
258
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
165
259
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -173,6 +267,11 @@ var meetingHit = strictObject({
|
|
|
173
267
|
excerpt: text2,
|
|
174
268
|
/** How far into the meeting the passage is. */
|
|
175
269
|
offset_ms: nullable(count2),
|
|
270
|
+
/** A transcript passage's transcript language (`ru`, `en`…), `null` when unknown. */
|
|
271
|
+
language: optional(nullable(text2)),
|
|
272
|
+
/** A transcript passage's line, from 1, of `lines_total`. */
|
|
273
|
+
line: optional(pipe(count2, minValue(1))),
|
|
274
|
+
lines_total: optional(count2),
|
|
176
275
|
/** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
|
|
177
276
|
match: optional(picklist(["words", "corrected"])),
|
|
178
277
|
corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
|
|
@@ -339,6 +438,9 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
|
|
|
339
438
|
id: String(hit.id),
|
|
340
439
|
excerpt: hit.text,
|
|
341
440
|
offset_ms: hit.startMs,
|
|
441
|
+
...hit.language === void 0 ? {} : { language: hit.language },
|
|
442
|
+
...hit.line === void 0 ? {} : { line: hit.line },
|
|
443
|
+
...hit.linesTotal === void 0 ? {} : { lines_total: hit.linesTotal },
|
|
342
444
|
untrusted: hit.source === void 0 ? ["excerpt"] : ["excerpt", "source.title"],
|
|
343
445
|
...hit.match === void 0 ? {} : { match: hit.match },
|
|
344
446
|
...hit.corrections === void 0 ? {} : { corrections: hit.corrections },
|
|
@@ -386,7 +488,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
386
488
|
};
|
|
387
489
|
}, "meetingHitsList");
|
|
388
490
|
|
|
389
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
390
492
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
391
493
|
const parsed = urlOf(url);
|
|
392
494
|
if (!parsed)
|
|
@@ -420,7 +522,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
420
522
|
}
|
|
421
523
|
}, "urlOf");
|
|
422
524
|
|
|
423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
424
526
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
425
527
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
426
528
|
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");
|
|
@@ -453,7 +555,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
453
555
|
return kept;
|
|
454
556
|
}, "entryMetadata");
|
|
455
557
|
|
|
456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
457
559
|
import { createHash } from "node:crypto";
|
|
458
560
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
459
561
|
reference: cue2.reference,
|
|
@@ -467,7 +569,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
467
569
|
text: cue2.text
|
|
468
570
|
})).digest("hex"), "meetingCueFingerprint");
|
|
469
571
|
|
|
470
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
471
573
|
var EVENT_QUERY = defineQuery({
|
|
472
574
|
entity: "event",
|
|
473
575
|
backend: "sql",
|
|
@@ -483,7 +585,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
483
585
|
]
|
|
484
586
|
});
|
|
485
587
|
|
|
486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
487
589
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
488
590
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
489
591
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -506,7 +608,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
506
608
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
507
609
|
}, "entryInWindow");
|
|
508
610
|
|
|
509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
510
612
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
511
613
|
const current = await store.meeting(details.meeting.id);
|
|
512
614
|
if (!current)
|
|
@@ -549,7 +651,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
549
651
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
550
652
|
}, "linkEvent");
|
|
551
653
|
|
|
552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
553
655
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
554
656
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
555
657
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -573,7 +675,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
573
675
|
};
|
|
574
676
|
}, "validateMeetingParticipantSearch");
|
|
575
677
|
|
|
576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
577
679
|
var MeetingError = class extends CliError {
|
|
578
680
|
static {
|
|
579
681
|
__name(this, "MeetingError");
|
|
@@ -705,7 +807,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
|
|
|
705
807
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
706
808
|
}, "meetingSummaryAnswer");
|
|
707
809
|
|
|
708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
709
811
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
710
812
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
711
813
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -801,19 +903,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
|
801
903
|
};
|
|
802
904
|
}, "exportMeeting");
|
|
803
905
|
|
|
804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
805
907
|
import { createHash as createHash2 } from "node:crypto";
|
|
806
908
|
|
|
807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
808
|
-
var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
809
|
-
const provider = scope2?.provider;
|
|
810
|
-
const account = scope2?.account;
|
|
811
|
-
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))
|
|
812
|
-
throw new CliError("validation_error", "meeting provider and account must be bounded nonempty identifiers");
|
|
813
|
-
return Object.freeze({ provider, account });
|
|
814
|
-
}, "snapshotMeetingScope");
|
|
815
|
-
|
|
816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
817
910
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
818
911
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
819
912
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
|
|
@@ -824,307 +917,154 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
824
917
|
return new Date(value).toISOString();
|
|
825
918
|
}, "meetingTimestamp");
|
|
826
919
|
|
|
827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
828
|
-
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
829
|
-
if (typeof value !== "string" || !value.trim())
|
|
830
|
-
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
831
|
-
return value;
|
|
832
|
-
}, "nonempty");
|
|
833
|
-
var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
834
|
-
if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
|
|
835
|
-
throw new CliError("validation_error", "unsupported meeting change field");
|
|
836
|
-
const result = {};
|
|
837
|
-
if (change.title !== void 0)
|
|
838
|
-
result.title = nonempty(change.title, "meeting title");
|
|
839
|
-
if (create && result.title === void 0)
|
|
840
|
-
throw new CliError("validation_error", "meeting title is required");
|
|
841
|
-
if (change.kind !== void 0) {
|
|
842
|
-
if (change.kind !== "instant" && change.kind !== "scheduled")
|
|
843
|
-
throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
|
|
844
|
-
result.kind = change.kind;
|
|
845
|
-
}
|
|
846
|
-
if (change.startTime !== void 0) {
|
|
847
|
-
result.startTime = meetingTimestamp(change.startTime, "meeting start");
|
|
848
|
-
}
|
|
849
|
-
if (change.durationMinutes !== void 0) {
|
|
850
|
-
if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
|
|
851
|
-
throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
|
|
852
|
-
result.durationMinutes = change.durationMinutes;
|
|
853
|
-
}
|
|
854
|
-
if (change.timezone !== void 0) {
|
|
855
|
-
if (typeof change.timezone !== "string" || !change.timezone.trim())
|
|
856
|
-
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
857
|
-
try {
|
|
858
|
-
new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
|
|
859
|
-
} catch {
|
|
860
|
-
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
861
|
-
}
|
|
862
|
-
result.timezone = change.timezone;
|
|
863
|
-
}
|
|
864
|
-
if (change.agenda !== void 0) {
|
|
865
|
-
if (typeof change.agenda !== "string")
|
|
866
|
-
throw new CliError("validation_error", "meeting agenda must be text");
|
|
867
|
-
result.agenda = change.agenda;
|
|
868
|
-
}
|
|
869
|
-
if (create) {
|
|
870
|
-
result.kind ??= "scheduled";
|
|
871
|
-
if (result.kind === "scheduled" && result.startTime === void 0)
|
|
872
|
-
throw new CliError("validation_error", "scheduled meeting start is required");
|
|
873
|
-
} else if (!Object.keys(result).length)
|
|
874
|
-
throw new CliError("validation_error", "at least one meeting change is required");
|
|
875
|
-
return Object.freeze(result);
|
|
876
|
-
}, "validateMeetingChange");
|
|
877
|
-
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
878
|
-
if (!signal?.aborted)
|
|
879
|
-
return;
|
|
880
|
-
if (signal.reason instanceof CliError)
|
|
881
|
-
throw signal.reason;
|
|
882
|
-
const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
|
|
883
|
-
throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
|
|
884
|
-
}, "checkCancelled");
|
|
885
|
-
var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
|
|
886
|
-
const { apply, dryRun, signal } = options;
|
|
887
|
-
checkCancelled(signal);
|
|
888
|
-
if (apply !== true || dryRun)
|
|
889
|
-
return { applied: false };
|
|
890
|
-
return { applied: true, value: await dispatch(signal) };
|
|
891
|
-
}, "dispatchMeetingMutation");
|
|
892
|
-
|
|
893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
894
|
-
var MEETING_FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
895
|
-
var id = /* @__PURE__ */ __name((value) => {
|
|
896
|
-
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
|
|
897
|
-
throw new CliError("validation_error", "meeting context identifiers must be positive integers");
|
|
898
|
-
return value;
|
|
899
|
-
}, "id");
|
|
900
|
-
var text3 = /* @__PURE__ */ __name((value, max) => {
|
|
901
|
-
if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
|
|
902
|
-
throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
|
|
903
|
-
return value.trim();
|
|
904
|
-
}, "text");
|
|
905
|
-
var uid = /* @__PURE__ */ __name((value) => {
|
|
906
|
-
const result = text3(value, 100);
|
|
907
|
-
if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
|
|
908
|
-
throw new CliError("validation_error", "person UID must be a positive integer");
|
|
909
|
-
return result;
|
|
910
|
-
}, "uid");
|
|
911
|
-
var strings = /* @__PURE__ */ __name((value, count6, length) => {
|
|
912
|
-
if (!Array.isArray(value) || value.length < 1 || value.length > count6)
|
|
913
|
-
throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
|
|
914
|
-
return Object.freeze([...new Set(value.map((entry) => text3(entry, length)))]);
|
|
915
|
-
}, "strings");
|
|
916
|
-
var fields = {
|
|
917
|
-
"note.add": ["text", "title"],
|
|
918
|
-
"tags.add": ["tags"],
|
|
919
|
-
"tags.remove": ["tags"],
|
|
920
|
-
"memory.add": ["body", "kind", "scope", "evidence", "subject"],
|
|
921
|
-
"fact.add": ["statement", "type", "scope", "evidence", "subject"],
|
|
922
|
-
"event.link": ["eventId", "expectedEventId"],
|
|
923
|
-
"person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
|
|
924
|
-
};
|
|
925
|
-
var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
926
|
-
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)))
|
|
927
|
-
throw new CliError("validation_error", "unsupported meeting context change");
|
|
928
|
-
switch (change.action) {
|
|
929
|
-
case "note.add":
|
|
930
|
-
return Object.freeze({
|
|
931
|
-
action: change.action,
|
|
932
|
-
text: text3(change.text, 1e5),
|
|
933
|
-
...change.title === void 0 ? {} : { title: text3(change.title, 500) }
|
|
934
|
-
});
|
|
935
|
-
case "tags.add":
|
|
936
|
-
case "tags.remove":
|
|
937
|
-
return Object.freeze({ action: change.action, tags: strings(change.tags, 100, 200) });
|
|
938
|
-
case "memory.add": {
|
|
939
|
-
if (!["summary", "digest", "preference"].includes(change.kind) || !["personal", "work"].includes(change.scope))
|
|
940
|
-
throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
|
|
941
|
-
return Object.freeze({
|
|
942
|
-
action: change.action,
|
|
943
|
-
body: text3(change.body, 2e4),
|
|
944
|
-
kind: change.kind,
|
|
945
|
-
scope: change.scope,
|
|
946
|
-
evidence: strings(change.evidence, 100, 4e3),
|
|
947
|
-
...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
|
|
948
|
-
});
|
|
949
|
-
}
|
|
950
|
-
case "fact.add": {
|
|
951
|
-
if (!MEETING_FACT_TYPES.includes(change.type) || !["personal", "work"].includes(change.scope))
|
|
952
|
-
throw new CliError("validation_error", `fact type (${MEETING_FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
|
|
953
|
-
return Object.freeze({
|
|
954
|
-
action: change.action,
|
|
955
|
-
statement: text3(change.statement, 2e4),
|
|
956
|
-
type: change.type,
|
|
957
|
-
scope: change.scope,
|
|
958
|
-
evidence: strings(change.evidence, 100, 4e3),
|
|
959
|
-
...change.subject === void 0 ? {} : { subject: text3(change.subject, 4e3) }
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
case "event.link":
|
|
963
|
-
return Object.freeze({
|
|
964
|
-
action: change.action,
|
|
965
|
-
eventId: change.eventId === null ? null : id(change.eventId),
|
|
966
|
-
...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id(change.expectedEventId) }
|
|
967
|
-
});
|
|
968
|
-
case "person.link": {
|
|
969
|
-
const targets = change.targetAccountIds;
|
|
970
|
-
if (targets !== void 0 && (!Array.isArray(targets) || targets.length < 1 || targets.length > 1e3))
|
|
971
|
-
throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
|
|
972
|
-
return Object.freeze({
|
|
973
|
-
action: change.action,
|
|
974
|
-
participantId: id(change.participantId),
|
|
975
|
-
personUid: uid(change.personUid),
|
|
976
|
-
...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id))]) },
|
|
977
|
-
...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
}, "validateMeetingContextChange");
|
|
982
|
-
var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) => {
|
|
983
|
-
const fixed = snapshotMeetingScope(scope2);
|
|
984
|
-
const account = id(accountId);
|
|
985
|
-
const actions = Object.freeze([...new Set(ports.actions)]);
|
|
986
|
-
if (actions.some((action) => !Object.hasOwn(fields, action)))
|
|
987
|
-
throw new CliError("validation_error", "unsupported meeting context capability");
|
|
988
|
-
const apply = ports.apply.bind(ports);
|
|
989
|
-
return {
|
|
990
|
-
scope: fixed,
|
|
991
|
-
accountId: account,
|
|
992
|
-
actions,
|
|
993
|
-
async change(meetingId, input, options = {}) {
|
|
994
|
-
const target = id(meetingId);
|
|
995
|
-
const change = validateMeetingContextChange(input);
|
|
996
|
-
if (!actions.includes(change.action))
|
|
997
|
-
throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
|
|
998
|
-
const context3 = Object.freeze({
|
|
999
|
-
scope: fixed,
|
|
1000
|
-
accountId: account,
|
|
1001
|
-
...options.signal ? { signal: options.signal } : {}
|
|
1002
|
-
});
|
|
1003
|
-
const outcome = await dispatchMeetingMutation(options, () => apply(target, change, context3));
|
|
1004
|
-
return {
|
|
1005
|
-
scope: fixed,
|
|
1006
|
-
accountId: account,
|
|
1007
|
-
meetingId: target,
|
|
1008
|
-
change,
|
|
1009
|
-
applied: outcome.applied,
|
|
1010
|
-
...outcome.applied ? { result: outcome.value } : {}
|
|
1011
|
-
};
|
|
1012
|
-
}
|
|
1013
|
-
};
|
|
1014
|
-
}, "createMeetingContext");
|
|
1015
|
-
|
|
1016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.546.0_@wirecat+cli-base@0.73.0_commander@15.0.0_esbuild@0.28.2_type_6245070bff0a7c29971e74a96fde145c/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1017
921
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1018
|
-
var
|
|
922
|
+
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1019
923
|
throw new CliError("validation_error", message);
|
|
1020
924
|
}, "invalid");
|
|
1021
|
-
var
|
|
925
|
+
var text3 = /* @__PURE__ */ __name((value, limit) => {
|
|
1022
926
|
if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
|
|
1023
|
-
return
|
|
927
|
+
return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
|
|
1024
928
|
return value.trim();
|
|
1025
929
|
}, "text");
|
|
1026
930
|
var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
|
|
1027
|
-
var
|
|
931
|
+
var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
|
|
1028
932
|
if (Object.keys(value).some((key) => !allowed.includes(key)))
|
|
1029
|
-
|
|
933
|
+
invalid3(`unknown ${noun} field`);
|
|
1030
934
|
}, "fields");
|
|
1031
935
|
var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
|
|
1032
|
-
var
|
|
1033
|
-
if (!
|
|
1034
|
-
return
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
if (finding.
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
"
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
"
|
|
1090
|
-
|
|
1091
|
-
"
|
|
1092
|
-
|
|
1093
|
-
"
|
|
1094
|
-
"dueAt",
|
|
1095
|
-
"dueEvidence",
|
|
1096
|
-
"assignee",
|
|
1097
|
-
"assigneeEvidence"
|
|
1098
|
-
], rules.singular);
|
|
1099
|
-
if (!TASK_TYPES.includes(finding.type))
|
|
1100
|
-
return invalid2("a task finding type is bug, chore or feature");
|
|
1101
|
-
if (!["explicit", "inferred"].includes(finding.commitment))
|
|
1102
|
-
return invalid2("task commitment must be explicit or inferred");
|
|
1103
|
-
const support = /* @__PURE__ */ __name((value) => {
|
|
1104
|
-
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1105
|
-
return invalid2("date and assignee support must cite the finding's evidence");
|
|
1106
|
-
return [...new Set(value)].sort();
|
|
1107
|
-
}, "support");
|
|
1108
|
-
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1109
|
-
return invalid2("optional dates and assignees require their supporting evidence");
|
|
1110
|
-
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1111
|
-
return invalid2("an assignee must be a person reference");
|
|
936
|
+
var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
|
|
937
|
+
if (!Array.isArray(raw) || raw.length < 1 || raw.length > 8)
|
|
938
|
+
return invalid3(`a finding requires 1\u20138 cited ${rules.cited}s`);
|
|
939
|
+
const evidence = raw.map((item) => {
|
|
940
|
+
if (!item || typeof item !== "object")
|
|
941
|
+
return invalid3("finding evidence is a reference and fingerprint");
|
|
942
|
+
fields(item, ["reference", "fingerprint"], rules.singular);
|
|
943
|
+
if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
|
|
944
|
+
return invalid3("evidence requires a reference and fingerprint");
|
|
945
|
+
const reference2 = rules.reference(item.reference);
|
|
946
|
+
if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
|
|
947
|
+
return invalid3(`finding evidence requires exact ${rules.cited} references and fingerprints`);
|
|
948
|
+
return { reference: reference2, fingerprint: item.fingerprint };
|
|
949
|
+
}).sort((a, b) => a.reference.localeCompare(b.reference));
|
|
950
|
+
if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
|
|
951
|
+
return invalid3(`duplicate evidence ${rules.cited}`);
|
|
952
|
+
return evidence;
|
|
953
|
+
}, "validEvidence");
|
|
954
|
+
var findingId = /* @__PURE__ */ __name((raw, ids2) => {
|
|
955
|
+
const id4 = findingText(raw, 64);
|
|
956
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
|
|
957
|
+
return invalid3("finding IDs must be unique simple keys");
|
|
958
|
+
ids2.add(id4);
|
|
959
|
+
return id4;
|
|
960
|
+
}, "findingId");
|
|
961
|
+
var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
962
|
+
if (!finding || typeof finding !== "object")
|
|
963
|
+
return invalid3("a finding is an object");
|
|
964
|
+
const id4 = findingId(finding.id, ids2);
|
|
965
|
+
const project = finding.project === void 0 && rules.anySubject ? void 0 : text3(finding.project, 64);
|
|
966
|
+
if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
|
|
967
|
+
return invalid3("a finding names a project reference");
|
|
968
|
+
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(text3(finding.subject, 80))))
|
|
969
|
+
return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
|
|
970
|
+
if (finding.kind === "task" && project === void 0 && !rules.inboxTasks)
|
|
971
|
+
return invalid3("a task finding names the project the task goes in");
|
|
972
|
+
const evidence = validEvidence(finding.evidence, rules);
|
|
973
|
+
const base = {
|
|
974
|
+
id: id4,
|
|
975
|
+
...project === void 0 ? {} : { project },
|
|
976
|
+
...finding.subject === void 0 ? {} : { subject: finding.subject },
|
|
977
|
+
evidence
|
|
978
|
+
};
|
|
979
|
+
if (finding.kind === "fact") {
|
|
980
|
+
fields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
|
|
981
|
+
if (finding.type === "payment")
|
|
982
|
+
return invalid3("a payment is a finding of kind payment; money is a payments row, not a fact");
|
|
983
|
+
if (!FACT_TYPES.includes(finding.type))
|
|
984
|
+
return invalid3("unknown fact finding type");
|
|
985
|
+
return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
|
|
986
|
+
}
|
|
987
|
+
if (finding.kind === "payment" && rules.payments) {
|
|
988
|
+
fields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
|
|
989
|
+
if (finding.supersedes !== void 0 && !/^invoice:[1-9]\d*$/.test(String(finding.supersedes)))
|
|
990
|
+
return invalid3("a payment finding supersedes an invoice: reference, the expected payment it settles or voids");
|
|
991
|
+
const payment = validatePayment(finding.payment);
|
|
992
|
+
if (payment.state === "expected" && finding.supersedes !== void 0)
|
|
993
|
+
return invalid3("an expected payment supersedes nothing; a paid or cancelled one supersedes its invoice");
|
|
994
|
+
if (payment.state === "cancelled" && finding.supersedes === void 0)
|
|
995
|
+
return invalid3("a cancelled payment names the invoice: it cancels in supersedes");
|
|
996
|
+
if (payment.state === "expected" && !/^(person|organization):/.test(payment.counterparty ?? ""))
|
|
997
|
+
return invalid3("an expected payment becomes an invoice, which names its counterparty as a person: or organization:");
|
|
1112
998
|
return {
|
|
1113
999
|
...base,
|
|
1114
|
-
kind: "
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
commitment: finding.commitment,
|
|
1119
|
-
...finding.dueAt === void 0 ? {} : { dueAt: meetingTimestamp(finding.dueAt, "finding due date"), dueEvidence: support(finding.dueEvidence) },
|
|
1120
|
-
...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence) }
|
|
1000
|
+
kind: "payment",
|
|
1001
|
+
...finding.statement === void 0 ? {} : { statement: text3(finding.statement, 2e3) },
|
|
1002
|
+
payment,
|
|
1003
|
+
...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
|
|
1121
1004
|
};
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1005
|
+
}
|
|
1006
|
+
if (finding.kind !== "task")
|
|
1007
|
+
return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
|
|
1008
|
+
fields(finding, [
|
|
1009
|
+
"id",
|
|
1010
|
+
"project",
|
|
1011
|
+
"evidence",
|
|
1012
|
+
"kind",
|
|
1013
|
+
"type",
|
|
1014
|
+
"title",
|
|
1015
|
+
"reason",
|
|
1016
|
+
"commitment",
|
|
1017
|
+
"dueAt",
|
|
1018
|
+
"dueEvidence",
|
|
1019
|
+
"assignee",
|
|
1020
|
+
"assigneeEvidence"
|
|
1021
|
+
], rules.singular);
|
|
1022
|
+
if (!TASK_TYPES.includes(finding.type))
|
|
1023
|
+
return invalid3("a task finding type is bug, chore or feature");
|
|
1024
|
+
if (!["explicit", "inferred"].includes(finding.commitment))
|
|
1025
|
+
return invalid3("task commitment must be explicit or inferred");
|
|
1026
|
+
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1027
|
+
return invalid3("optional dates and assignees require their supporting evidence");
|
|
1028
|
+
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1029
|
+
return invalid3("an assignee must be a person reference");
|
|
1030
|
+
return {
|
|
1031
|
+
...base,
|
|
1032
|
+
kind: "task",
|
|
1033
|
+
type: finding.type,
|
|
1034
|
+
title: text3(finding.title, 300),
|
|
1035
|
+
reason: text3(finding.reason, 2e3),
|
|
1036
|
+
commitment: finding.commitment,
|
|
1037
|
+
...finding.dueAt === void 0 ? {} : {
|
|
1038
|
+
dueAt: meetingTimestamp(finding.dueAt, "finding due date"),
|
|
1039
|
+
dueEvidence: support(finding.dueEvidence, evidence)
|
|
1040
|
+
},
|
|
1041
|
+
...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence, evidence) }
|
|
1042
|
+
};
|
|
1043
|
+
}, "validateFinding");
|
|
1044
|
+
var support = /* @__PURE__ */ __name((value, evidence) => {
|
|
1045
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1046
|
+
return invalid3("date and assignee support must cite the finding's evidence");
|
|
1047
|
+
return [...new Set(value)].sort();
|
|
1048
|
+
}, "support");
|
|
1049
|
+
var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
1050
|
+
if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
|
|
1051
|
+
return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
|
|
1052
|
+
fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
|
|
1053
|
+
if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
|
|
1054
|
+
return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
|
|
1055
|
+
const key = text3(input.key, 64);
|
|
1056
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
|
|
1057
|
+
return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
|
|
1058
|
+
const ids2 = /* @__PURE__ */ new Set();
|
|
1059
|
+
const findings = input.findings.map((finding) => one(finding, ids2));
|
|
1060
|
+
return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
|
|
1061
|
+
}, "validateBatch");
|
|
1062
|
+
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1063
|
+
var findingText = /* @__PURE__ */ __name((value, limit) => text3(value, limit), "findingText");
|
|
1064
|
+
var findingFields = /* @__PURE__ */ __name((value, allowed, noun) => fields(value, allowed, noun), "findingFields");
|
|
1125
1065
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1126
1066
|
|
|
1127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1128
1068
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1129
1069
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1130
1070
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -1135,7 +1075,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
1135
1075
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1136
1076
|
var meetingFindingFingerprint = findingFingerprint;
|
|
1137
1077
|
|
|
1138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
1139
1079
|
var context = {
|
|
1140
1080
|
command: "search meetings",
|
|
1141
1081
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -1254,7 +1194,56 @@ var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
|
|
|
1254
1194
|
return { version: 1, language: "lucene-v1", root };
|
|
1255
1195
|
}, "meetingWordsQuery");
|
|
1256
1196
|
|
|
1257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
1198
|
+
var LATIN_WORDS = {
|
|
1199
|
+
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
1200
|
+
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
1201
|
+
de: ["der", "und", "ist", "nicht", "das", "ich", "wir", "mit", "auch", "ein"],
|
|
1202
|
+
fr: ["le", "les", "est", "une", "pas", "je", "vous", "nous", "avec", "mais"],
|
|
1203
|
+
it: ["gli", "della", "sono", "perch\xE9", "anche", "questo", "molto", "che", "di", "\xE8"],
|
|
1204
|
+
pt: ["n\xE3o", "voc\xEA", "isso", "muito", "ent\xE3o", "com", "uma", "tamb\xE9m", "mas", "eu"]
|
|
1205
|
+
};
|
|
1206
|
+
var LATIN_LANGUAGE = new Map(Object.entries(LATIN_WORDS).flatMap(([language, words2]) => words2.map((word) => [word, language])));
|
|
1207
|
+
var UKRAINIAN = /[іїєґ]/giu;
|
|
1208
|
+
var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
|
|
1209
|
+
var LATIN = new RegExp("\\p{Script=Latin}", "gu");
|
|
1210
|
+
var MIN_LETTERS = 20;
|
|
1211
|
+
var DOMINANT = 0.75;
|
|
1212
|
+
var countOf = /* @__PURE__ */ __name((text7, pattern) => text7.match(pattern)?.length ?? 0, "countOf");
|
|
1213
|
+
var latinLanguage = /* @__PURE__ */ __name((texts) => {
|
|
1214
|
+
const votes = /* @__PURE__ */ new Map();
|
|
1215
|
+
for (const text7 of texts)
|
|
1216
|
+
for (const word of text7.toLowerCase().split(/[^\p{L}]+/u)) {
|
|
1217
|
+
const language = LATIN_LANGUAGE.get(word);
|
|
1218
|
+
if (language)
|
|
1219
|
+
votes.set(language, (votes.get(language) ?? 0) + 1);
|
|
1220
|
+
}
|
|
1221
|
+
const [first, second] = [...votes].sort((a, b) => b[1] - a[1]);
|
|
1222
|
+
if (!first || first[1] < 3 || second && first[1] < 2 * second[1])
|
|
1223
|
+
return null;
|
|
1224
|
+
return first[0];
|
|
1225
|
+
}, "latinLanguage");
|
|
1226
|
+
var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
1227
|
+
const all = [...texts];
|
|
1228
|
+
let cyrillic = 0;
|
|
1229
|
+
let latin = 0;
|
|
1230
|
+
let ukrainian = 0;
|
|
1231
|
+
for (const text7 of all) {
|
|
1232
|
+
cyrillic += countOf(text7, CYRILLIC);
|
|
1233
|
+
latin += countOf(text7, LATIN);
|
|
1234
|
+
ukrainian += countOf(text7, UKRAINIAN);
|
|
1235
|
+
}
|
|
1236
|
+
const letters = cyrillic + latin;
|
|
1237
|
+
if (letters < MIN_LETTERS)
|
|
1238
|
+
return null;
|
|
1239
|
+
if (cyrillic / letters >= DOMINANT)
|
|
1240
|
+
return ukrainian / cyrillic >= 0.01 ? "uk" : "ru";
|
|
1241
|
+
if (latin / letters >= DOMINANT)
|
|
1242
|
+
return latinLanguage(all);
|
|
1243
|
+
return null;
|
|
1244
|
+
}, "transcriptLanguage");
|
|
1245
|
+
|
|
1246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
1258
1247
|
var contentHash = /* @__PURE__ */ __name(async (text7) => {
|
|
1259
1248
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
|
|
1260
1249
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -1268,7 +1257,7 @@ var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
|
1268
1257
|
var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
|
|
1269
1258
|
source,
|
|
1270
1259
|
format,
|
|
1271
|
-
language:
|
|
1260
|
+
language: transcriptLanguage(lines.map((line2) => line2.text)),
|
|
1272
1261
|
contentHash: await contentHash(hashText),
|
|
1273
1262
|
externalCreatedAt: null,
|
|
1274
1263
|
metadata: null,
|
|
@@ -1291,7 +1280,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
|
1291
1280
|
return time;
|
|
1292
1281
|
}, "timestamp");
|
|
1293
1282
|
|
|
1294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
1295
1284
|
var TranscriptTextError = class extends Error {
|
|
1296
1285
|
static {
|
|
1297
1286
|
__name(this, "TranscriptTextError");
|
|
@@ -1346,7 +1335,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
1346
1335
|
return { header, lines };
|
|
1347
1336
|
}, "parseTranscriptText");
|
|
1348
1337
|
|
|
1349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
1350
1339
|
var VttError = class extends Error {
|
|
1351
1340
|
static {
|
|
1352
1341
|
__name(this, "VttError");
|
|
@@ -1398,7 +1387,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
1398
1387
|
return cues;
|
|
1399
1388
|
}, "parseVtt");
|
|
1400
1389
|
|
|
1401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
1402
1391
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
1403
1392
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
1404
1393
|
for (const file of files) {
|
|
@@ -1431,10 +1420,207 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
1431
1420
|
return report;
|
|
1432
1421
|
}, "importFiles");
|
|
1433
1422
|
|
|
1434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
1435
1424
|
var CHAT_MESSAGES_READ = 1e5;
|
|
1436
1425
|
|
|
1437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/provider.js
|
|
1427
|
+
var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
1428
|
+
const provider = scope2?.provider;
|
|
1429
|
+
const account = scope2?.account;
|
|
1430
|
+
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))
|
|
1431
|
+
throw new CliError("validation_error", "meeting provider and account must be bounded nonempty identifiers");
|
|
1432
|
+
return Object.freeze({ provider, account });
|
|
1433
|
+
}, "snapshotMeetingScope");
|
|
1434
|
+
|
|
1435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
1436
|
+
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
1437
|
+
if (typeof value !== "string" || !value.trim())
|
|
1438
|
+
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
1439
|
+
return value;
|
|
1440
|
+
}, "nonempty");
|
|
1441
|
+
var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
1442
|
+
if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
|
|
1443
|
+
throw new CliError("validation_error", "unsupported meeting change field");
|
|
1444
|
+
const result = {};
|
|
1445
|
+
if (change.title !== void 0)
|
|
1446
|
+
result.title = nonempty(change.title, "meeting title");
|
|
1447
|
+
if (create && result.title === void 0)
|
|
1448
|
+
throw new CliError("validation_error", "meeting title is required");
|
|
1449
|
+
if (change.kind !== void 0) {
|
|
1450
|
+
if (change.kind !== "instant" && change.kind !== "scheduled")
|
|
1451
|
+
throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
|
|
1452
|
+
result.kind = change.kind;
|
|
1453
|
+
}
|
|
1454
|
+
if (change.startTime !== void 0) {
|
|
1455
|
+
result.startTime = meetingTimestamp(change.startTime, "meeting start");
|
|
1456
|
+
}
|
|
1457
|
+
if (change.durationMinutes !== void 0) {
|
|
1458
|
+
if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
|
|
1459
|
+
throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
|
|
1460
|
+
result.durationMinutes = change.durationMinutes;
|
|
1461
|
+
}
|
|
1462
|
+
if (change.timezone !== void 0) {
|
|
1463
|
+
if (typeof change.timezone !== "string" || !change.timezone.trim())
|
|
1464
|
+
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
1465
|
+
try {
|
|
1466
|
+
new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
|
|
1467
|
+
} catch {
|
|
1468
|
+
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
1469
|
+
}
|
|
1470
|
+
result.timezone = change.timezone;
|
|
1471
|
+
}
|
|
1472
|
+
if (change.agenda !== void 0) {
|
|
1473
|
+
if (typeof change.agenda !== "string")
|
|
1474
|
+
throw new CliError("validation_error", "meeting agenda must be text");
|
|
1475
|
+
result.agenda = change.agenda;
|
|
1476
|
+
}
|
|
1477
|
+
if (create) {
|
|
1478
|
+
result.kind ??= "scheduled";
|
|
1479
|
+
if (result.kind === "scheduled" && result.startTime === void 0)
|
|
1480
|
+
throw new CliError("validation_error", "scheduled meeting start is required");
|
|
1481
|
+
} else if (!Object.keys(result).length)
|
|
1482
|
+
throw new CliError("validation_error", "at least one meeting change is required");
|
|
1483
|
+
return Object.freeze(result);
|
|
1484
|
+
}, "validateMeetingChange");
|
|
1485
|
+
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
1486
|
+
if (!signal?.aborted)
|
|
1487
|
+
return;
|
|
1488
|
+
if (signal.reason instanceof CliError)
|
|
1489
|
+
throw signal.reason;
|
|
1490
|
+
const timeout = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
|
|
1491
|
+
throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
|
|
1492
|
+
}, "checkCancelled");
|
|
1493
|
+
var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
|
|
1494
|
+
const { apply, dryRun, signal } = options;
|
|
1495
|
+
checkCancelled(signal);
|
|
1496
|
+
if (apply !== true || dryRun)
|
|
1497
|
+
return { applied: false };
|
|
1498
|
+
return { applied: true, value: await dispatch(signal) };
|
|
1499
|
+
}, "dispatchMeetingMutation");
|
|
1500
|
+
|
|
1501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
1502
|
+
var id = /* @__PURE__ */ __name((value) => {
|
|
1503
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
|
|
1504
|
+
throw new CliError("validation_error", "meeting context identifiers must be positive integers");
|
|
1505
|
+
return value;
|
|
1506
|
+
}, "id");
|
|
1507
|
+
var text4 = /* @__PURE__ */ __name((value, max) => {
|
|
1508
|
+
if (typeof value !== "string" || !value.trim() || value.length > max || value.includes("\0"))
|
|
1509
|
+
throw new CliError("validation_error", `meeting context text must contain 1\u2013${max} characters without NUL`);
|
|
1510
|
+
return value.trim();
|
|
1511
|
+
}, "text");
|
|
1512
|
+
var uid = /* @__PURE__ */ __name((value) => {
|
|
1513
|
+
const result = text4(value, 100);
|
|
1514
|
+
if (!/^[1-9]\d*$/.test(result) || !Number.isSafeInteger(Number(result)))
|
|
1515
|
+
throw new CliError("validation_error", "person UID must be a positive integer");
|
|
1516
|
+
return result;
|
|
1517
|
+
}, "uid");
|
|
1518
|
+
var strings = /* @__PURE__ */ __name((value, count6, length) => {
|
|
1519
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > count6)
|
|
1520
|
+
throw new CliError("validation_error", `meeting context list must contain 1\u2013${count6} entries`);
|
|
1521
|
+
return Object.freeze([...new Set(value.map((entry) => text4(entry, length)))]);
|
|
1522
|
+
}, "strings");
|
|
1523
|
+
var fields2 = {
|
|
1524
|
+
"note.add": ["text", "title"],
|
|
1525
|
+
"tags.add": ["tags"],
|
|
1526
|
+
"tags.remove": ["tags"],
|
|
1527
|
+
"memory.add": ["body", "kind", "scope", "evidence", "subject"],
|
|
1528
|
+
"fact.add": ["statement", "type", "scope", "evidence", "subject"],
|
|
1529
|
+
"event.link": ["eventId", "expectedEventId"],
|
|
1530
|
+
"person.link": ["participantId", "personUid", "targetAccountIds", "expectedPersonUid"]
|
|
1531
|
+
};
|
|
1532
|
+
var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
1533
|
+
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)))
|
|
1534
|
+
throw new CliError("validation_error", "unsupported meeting context change");
|
|
1535
|
+
switch (change.action) {
|
|
1536
|
+
case "note.add":
|
|
1537
|
+
return Object.freeze({
|
|
1538
|
+
action: change.action,
|
|
1539
|
+
text: text4(change.text, 1e5),
|
|
1540
|
+
...change.title === void 0 ? {} : { title: text4(change.title, 500) }
|
|
1541
|
+
});
|
|
1542
|
+
case "tags.add":
|
|
1543
|
+
case "tags.remove":
|
|
1544
|
+
return Object.freeze({ action: change.action, tags: strings(change.tags, 100, 200) });
|
|
1545
|
+
case "memory.add": {
|
|
1546
|
+
if (!["summary", "digest", "preference"].includes(change.kind) || !["personal", "work"].includes(change.scope))
|
|
1547
|
+
throw new CliError("validation_error", "memory kind and explicit personal/work scope are required");
|
|
1548
|
+
return Object.freeze({
|
|
1549
|
+
action: change.action,
|
|
1550
|
+
body: text4(change.body, 2e4),
|
|
1551
|
+
kind: change.kind,
|
|
1552
|
+
scope: change.scope,
|
|
1553
|
+
evidence: strings(change.evidence, 100, 4e3),
|
|
1554
|
+
...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
case "fact.add": {
|
|
1558
|
+
if (!FACT_TYPES.includes(change.type) || !["personal", "work"].includes(change.scope))
|
|
1559
|
+
throw new CliError("validation_error", `fact type (${FACT_TYPES.join(", ")}) and explicit personal/work scope are required`);
|
|
1560
|
+
return Object.freeze({
|
|
1561
|
+
action: change.action,
|
|
1562
|
+
statement: text4(change.statement, 2e4),
|
|
1563
|
+
type: change.type,
|
|
1564
|
+
scope: change.scope,
|
|
1565
|
+
evidence: strings(change.evidence, 100, 4e3),
|
|
1566
|
+
...change.subject === void 0 ? {} : { subject: text4(change.subject, 4e3) }
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
case "event.link":
|
|
1570
|
+
return Object.freeze({
|
|
1571
|
+
action: change.action,
|
|
1572
|
+
eventId: change.eventId === null ? null : id(change.eventId),
|
|
1573
|
+
...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id(change.expectedEventId) }
|
|
1574
|
+
});
|
|
1575
|
+
case "person.link": {
|
|
1576
|
+
const targets = change.targetAccountIds;
|
|
1577
|
+
if (targets !== void 0 && (!Array.isArray(targets) || targets.length < 1 || targets.length > 1e3))
|
|
1578
|
+
throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
|
|
1579
|
+
return Object.freeze({
|
|
1580
|
+
action: change.action,
|
|
1581
|
+
participantId: id(change.participantId),
|
|
1582
|
+
personUid: uid(change.personUid),
|
|
1583
|
+
...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id))]) },
|
|
1584
|
+
...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}, "validateMeetingContextChange");
|
|
1589
|
+
var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) => {
|
|
1590
|
+
const fixed = snapshotMeetingScope(scope2);
|
|
1591
|
+
const account = id(accountId);
|
|
1592
|
+
const actions = Object.freeze([...new Set(ports.actions)]);
|
|
1593
|
+
if (actions.some((action) => !Object.hasOwn(fields2, action)))
|
|
1594
|
+
throw new CliError("validation_error", "unsupported meeting context capability");
|
|
1595
|
+
const apply = ports.apply.bind(ports);
|
|
1596
|
+
return {
|
|
1597
|
+
scope: fixed,
|
|
1598
|
+
accountId: account,
|
|
1599
|
+
actions,
|
|
1600
|
+
async change(meetingId, input, options = {}) {
|
|
1601
|
+
const target = id(meetingId);
|
|
1602
|
+
const change = validateMeetingContextChange(input);
|
|
1603
|
+
if (!actions.includes(change.action))
|
|
1604
|
+
throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
|
|
1605
|
+
const context3 = Object.freeze({
|
|
1606
|
+
scope: fixed,
|
|
1607
|
+
accountId: account,
|
|
1608
|
+
...options.signal ? { signal: options.signal } : {}
|
|
1609
|
+
});
|
|
1610
|
+
const outcome = await dispatchMeetingMutation(options, () => apply(target, change, context3));
|
|
1611
|
+
return {
|
|
1612
|
+
scope: fixed,
|
|
1613
|
+
accountId: account,
|
|
1614
|
+
meetingId: target,
|
|
1615
|
+
change,
|
|
1616
|
+
applied: outcome.applied,
|
|
1617
|
+
...outcome.applied ? { result: outcome.value } : {}
|
|
1618
|
+
};
|
|
1619
|
+
}
|
|
1620
|
+
};
|
|
1621
|
+
}, "createMeetingContext");
|
|
1622
|
+
|
|
1623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
1438
1624
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
1439
1625
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
1440
1626
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -1459,7 +1645,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
1459
1645
|
return { ...input, limit, maxReadBytes };
|
|
1460
1646
|
}, "validateMeetingPreparationContext");
|
|
1461
1647
|
|
|
1462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
1463
1649
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
1464
1650
|
var id2 = pipe(string(), minLength(1));
|
|
1465
1651
|
var meetingProjectEvidence = strictObject({
|
|
@@ -1580,7 +1766,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
1580
1766
|
};
|
|
1581
1767
|
}, "meetingProjectEvidenceAnswer");
|
|
1582
1768
|
|
|
1583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
1584
1770
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
1585
1771
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
1586
1772
|
if (typeof query !== "string" || !query.trim() || query.includes("\0") || new TextEncoder().encode(query).byteLength > 65536 || !integer3(options.limit ?? 100, 1, 1e3) || !integer3(options.maxReadBytes ?? 4194304, 1, 67108864) || [
|
|
@@ -1600,7 +1786,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
1600
1786
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
1601
1787
|
}, "validateMeetingHitSearch");
|
|
1602
1788
|
|
|
1603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
1604
1790
|
var ids = {
|
|
1605
1791
|
meeting_id: "meetingId",
|
|
1606
1792
|
identity_id: "participantIdentityId",
|
|
@@ -1691,7 +1877,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
1691
1877
|
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
1692
1878
|
}, "prepareMeetingProjectEvidence");
|
|
1693
1879
|
|
|
1694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
1695
1881
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
1696
1882
|
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
1697
1883
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -1699,7 +1885,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, re
|
|
|
1699
1885
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
1700
1886
|
}, "readMeetingProjectEvidence");
|
|
1701
1887
|
|
|
1702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
1703
1889
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
1704
1890
|
const { identityExternalId, ...fields3 } = p;
|
|
1705
1891
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -1838,7 +2024,7 @@ unlinked`, format)],
|
|
|
1838
2024
|
return report;
|
|
1839
2025
|
}, "pull");
|
|
1840
2026
|
|
|
1841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2027
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
1842
2028
|
var text5 = string();
|
|
1843
2029
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
1844
2030
|
var id3 = pipe(number(), integer(), minValue(1));
|
|
@@ -1898,6 +2084,23 @@ var meetingStats = strictObject({
|
|
|
1898
2084
|
weeks: array(strictObject({ week_start: text5, meetings: count4, talk_ms: count4 })),
|
|
1899
2085
|
top_speakers: array(meetingSpeaker)
|
|
1900
2086
|
});
|
|
2087
|
+
var meetingCountsRow = strictObject({
|
|
2088
|
+
key: text5,
|
|
2089
|
+
name: nullable(text5),
|
|
2090
|
+
meetings: count4,
|
|
2091
|
+
minutes: count4,
|
|
2092
|
+
mean_minutes: nullable(number()),
|
|
2093
|
+
transcripts: count4
|
|
2094
|
+
});
|
|
2095
|
+
var meetingCounts = strictObject({
|
|
2096
|
+
by: picklist(["day", "week", "series"]),
|
|
2097
|
+
meetings: count4,
|
|
2098
|
+
minutes: count4,
|
|
2099
|
+
mean_minutes: nullable(number()),
|
|
2100
|
+
transcripts: count4,
|
|
2101
|
+
rows: array(meetingCountsRow),
|
|
2102
|
+
has_more: boolean()
|
|
2103
|
+
});
|
|
1901
2104
|
var truncated = /* @__PURE__ */ __name((...why) => nullable(picklist(why)), "truncated");
|
|
1902
2105
|
var meetingParticipants = strictObject({
|
|
1903
2106
|
schema_version: literal(1),
|
|
@@ -2015,10 +2218,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
2015
2218
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
2016
2219
|
}), "eventItem");
|
|
2017
2220
|
|
|
2018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
2019
2222
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
2020
2223
|
|
|
2021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
2022
2225
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
2023
2226
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2024
2227
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -2048,7 +2251,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
2048
2251
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
2049
2252
|
}, "validateMeetingRelatedHistory");
|
|
2050
2253
|
|
|
2051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
2052
2255
|
var text6 = string();
|
|
2053
2256
|
var identifier = pipe(text6, minLength(1));
|
|
2054
2257
|
var nullableText = nullable(text6);
|
|
@@ -2166,22 +2369,29 @@ var embedding = union([
|
|
|
2166
2369
|
})
|
|
2167
2370
|
})
|
|
2168
2371
|
]);
|
|
2372
|
+
var repair = strictObject({
|
|
2373
|
+
account_id: identifier,
|
|
2374
|
+
applied: flag,
|
|
2375
|
+
transcripts: count5,
|
|
2376
|
+
languages: array(strictObject({ language: nullableText, transcripts: count5 }))
|
|
2377
|
+
});
|
|
2169
2378
|
var MEETING_RESULT_ENTITIES = {
|
|
2170
2379
|
meeting_ingestion: run,
|
|
2171
2380
|
meeting_export: exported,
|
|
2172
2381
|
meeting_association: meetingChange,
|
|
2173
2382
|
meeting_transcription: transcription,
|
|
2174
|
-
meeting_embedding: embedding
|
|
2383
|
+
meeting_embedding: embedding,
|
|
2384
|
+
meeting_repair: repair
|
|
2175
2385
|
};
|
|
2176
2386
|
|
|
2177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
2178
2388
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
2179
2389
|
|
|
2180
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
2181
2391
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
2182
2392
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
2183
2393
|
|
|
2184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
2185
2395
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
2186
2396
|
input.signal?.throwIfAborted();
|
|
2187
2397
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -2202,39 +2412,40 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
2202
2412
|
return { ...input, limit, maxReadBytes };
|
|
2203
2413
|
}, "validateMeetingSeriesHistory");
|
|
2204
2414
|
|
|
2205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2415
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
2206
2416
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
2207
2417
|
|
|
2208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2209
|
-
function
|
|
2418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
2419
|
+
function invalid4(field, response = false) {
|
|
2210
2420
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
2211
2421
|
}
|
|
2212
|
-
__name(
|
|
2422
|
+
__name(invalid4, "invalid");
|
|
2213
2423
|
var object = /* @__PURE__ */ __name((value, fields3, field, response = false) => {
|
|
2214
2424
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
2215
|
-
|
|
2425
|
+
invalid4(field, response);
|
|
2216
2426
|
for (const key of Object.keys(value))
|
|
2217
2427
|
if (!fields3.includes(key))
|
|
2218
|
-
|
|
2428
|
+
invalid4(`${field}.${key}`, response);
|
|
2219
2429
|
}, "object");
|
|
2220
2430
|
var cursorDetails = /* @__PURE__ */ __name((value) => {
|
|
2221
2431
|
if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
|
|
2222
|
-
|
|
2432
|
+
invalid4("cursor");
|
|
2223
2433
|
try {
|
|
2224
2434
|
const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
|
|
2225
2435
|
object(decoded, ["version", "selection", "cursor"], "cursor");
|
|
2226
2436
|
if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
|
|
2227
|
-
|
|
2437
|
+
invalid4("cursor");
|
|
2228
2438
|
return decoded;
|
|
2229
2439
|
} catch {
|
|
2230
|
-
return
|
|
2440
|
+
return invalid4("cursor");
|
|
2231
2441
|
}
|
|
2232
2442
|
}, "cursorDetails");
|
|
2233
2443
|
var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
2234
2444
|
cursorDetails(value);
|
|
2235
2445
|
}, "validateMeetingSeriesInventoryCursor");
|
|
2236
2446
|
|
|
2237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
2448
|
+
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
2238
2449
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
2239
2450
|
const zone = timeZone ?? "UTC";
|
|
2240
2451
|
try {
|
|
@@ -2250,17 +2461,72 @@ var weekStart = /* @__PURE__ */ __name((at, format) => {
|
|
|
2250
2461
|
const day = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day));
|
|
2251
2462
|
return new Date(day - DAYS.indexOf(parts.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
|
|
2252
2463
|
}, "weekStart");
|
|
2464
|
+
var dayKey = /* @__PURE__ */ __name((at, format) => {
|
|
2465
|
+
const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
2466
|
+
return `${parts.year}-${parts.month}-${parts.day}`;
|
|
2467
|
+
}, "dayKey");
|
|
2468
|
+
var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
|
|
2469
|
+
timeZone: zone,
|
|
2470
|
+
year: "numeric",
|
|
2471
|
+
month: "2-digit",
|
|
2472
|
+
day: "2-digit",
|
|
2473
|
+
weekday: "short"
|
|
2474
|
+
}), "zoneFormat");
|
|
2475
|
+
var NO_SERIES = "no-series";
|
|
2476
|
+
var MOST_COUNT_ROWS = 100;
|
|
2477
|
+
var minutesOf = /* @__PURE__ */ __name((ms) => Math.round(ms / 6e4), "minutesOf");
|
|
2478
|
+
var meanOf = /* @__PURE__ */ __name((ms, timed) => timed === 0 ? null : Math.round(ms / timed / 6e3) / 10, "meanOf");
|
|
2479
|
+
var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, limit = MOST_COUNT_ROWS) => {
|
|
2480
|
+
if (!MEETING_COUNTS_GROUPINGS.includes(by))
|
|
2481
|
+
throw new CliError("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
|
|
2482
|
+
if (!Number.isSafeInteger(limit) || limit < 1)
|
|
2483
|
+
throw new CliError("validation_error", "--limit is a positive number");
|
|
2484
|
+
const zone = zoneOf(timeZone);
|
|
2485
|
+
const format = zoneFormat(zone);
|
|
2486
|
+
const sum = /* @__PURE__ */ __name(() => ({ meetings: 0, ms: 0, timed: 0, transcripts: 0 }), "sum");
|
|
2487
|
+
const add = /* @__PURE__ */ __name((into, meeting2) => {
|
|
2488
|
+
into.meetings += 1;
|
|
2489
|
+
if (meeting2.durationMs !== null) {
|
|
2490
|
+
into.ms += Math.max(0, meeting2.durationMs);
|
|
2491
|
+
into.timed += 1;
|
|
2492
|
+
}
|
|
2493
|
+
if (meeting2.transcribed)
|
|
2494
|
+
into.transcripts += 1;
|
|
2495
|
+
}, "add");
|
|
2496
|
+
const total = { ...sum(), name: null };
|
|
2497
|
+
const groups = /* @__PURE__ */ new Map();
|
|
2498
|
+
for (const meeting2 of meetings) {
|
|
2499
|
+
add(total, meeting2);
|
|
2500
|
+
const key = by === "series" ? meeting2.seriesKey === null ? NO_SERIES : `series:${meeting2.seriesKey}` : meeting2.startedAt === null ? null : by === "day" ? dayKey(meeting2.startedAt, format) : weekStart(meeting2.startedAt, format);
|
|
2501
|
+
if (key === null)
|
|
2502
|
+
continue;
|
|
2503
|
+
const group = groups.get(key) ?? { ...sum(), name: by === "series" ? meeting2.seriesTitle : null };
|
|
2504
|
+
add(group, meeting2);
|
|
2505
|
+
groups.set(key, group);
|
|
2506
|
+
}
|
|
2507
|
+
const ordered = [...groups.entries()].sort(([a, one], [b, other]) => by === "series" ? other.ms - one.ms || other.meetings - one.meetings || a.localeCompare(b) : b.localeCompare(a));
|
|
2508
|
+
const kept = ordered.slice(0, limit);
|
|
2509
|
+
if (by !== "series")
|
|
2510
|
+
kept.reverse();
|
|
2511
|
+
const counted = /* @__PURE__ */ __name(({ meetings: count6, ms, timed, transcripts }) => ({
|
|
2512
|
+
meetings: count6,
|
|
2513
|
+
minutes: minutesOf(ms),
|
|
2514
|
+
meanMinutes: meanOf(ms, timed),
|
|
2515
|
+
transcripts
|
|
2516
|
+
}), "counted");
|
|
2517
|
+
return {
|
|
2518
|
+
by,
|
|
2519
|
+
timeZone: zone,
|
|
2520
|
+
...counted(total),
|
|
2521
|
+
rows: kept.map(([key, group]) => ({ key, name: group.name, ...counted(group) })),
|
|
2522
|
+
hasMore: ordered.length > limit
|
|
2523
|
+
};
|
|
2524
|
+
}, "aggregateMeetingCounts");
|
|
2253
2525
|
var UNKNOWN_SPEAKER = "unknown";
|
|
2254
2526
|
var speakerOf = /* @__PURE__ */ __name((row) => row.personId !== null ? { key: `person:${row.personId}`, name: row.personName ?? row.identityName ?? row.speakerName } : row.identityId !== null ? { key: `identity:${row.identityId}`, name: row.identityName ?? row.speakerName } : row.speakerName?.trim() ? { key: `name:${row.speakerName.trim().toLowerCase()}`, name: row.speakerName.trim() } : { key: UNKNOWN_SPEAKER, name: null }, "speakerOf");
|
|
2255
2527
|
var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
2256
2528
|
const zone = zoneOf(timeZone);
|
|
2257
|
-
const format =
|
|
2258
|
-
timeZone: zone,
|
|
2259
|
-
year: "numeric",
|
|
2260
|
-
month: "2-digit",
|
|
2261
|
-
day: "2-digit",
|
|
2262
|
-
weekday: "short"
|
|
2263
|
-
});
|
|
2529
|
+
const format = zoneFormat(zone);
|
|
2264
2530
|
const speakers = /* @__PURE__ */ new Map();
|
|
2265
2531
|
const weeks = /* @__PURE__ */ new Map();
|
|
2266
2532
|
const meetings = /* @__PURE__ */ new Set();
|
|
@@ -2313,7 +2579,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
2313
2579
|
};
|
|
2314
2580
|
}, "aggregateMeetingStats");
|
|
2315
2581
|
|
|
2316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
2317
2583
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
2318
2584
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
2319
2585
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -2328,7 +2594,7 @@ function closeTask(task, state, by, at, reason) {
|
|
|
2328
2594
|
}
|
|
2329
2595
|
__name(closeTask, "closeTask");
|
|
2330
2596
|
|
|
2331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
2332
2598
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
2333
2599
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
2334
2600
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -2357,7 +2623,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
2357
2623
|
}, "priorityOf");
|
|
2358
2624
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
2359
2625
|
|
|
2360
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
2361
2627
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
2362
2628
|
async function find(id4) {
|
|
2363
2629
|
const task = await store.get(id4);
|
|
@@ -2417,14 +2683,13 @@ function median(values) {
|
|
|
2417
2683
|
}
|
|
2418
2684
|
__name(median, "median");
|
|
2419
2685
|
|
|
2420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
2421
2687
|
function matches(task, filter) {
|
|
2422
2688
|
return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
|
|
2423
2689
|
}
|
|
2424
2690
|
__name(matches, "matches");
|
|
2425
2691
|
|
|
2426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2427
|
-
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
2692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
2428
2693
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
2429
2694
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
2430
2695
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -2432,7 +2697,7 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
2432
2697
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
2433
2698
|
var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
2434
2699
|
|
|
2435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
2436
2701
|
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
2437
2702
|
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
2438
2703
|
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
@@ -2446,7 +2711,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
|
2446
2711
|
return tag;
|
|
2447
2712
|
}, "normalizeTag");
|
|
2448
2713
|
|
|
2449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.565.0_@wirecat+cli-base@0.75.2_commander@15.0.0_esbuild@0.28.2_type_ff8e334310c9524b6cc272472a342b2f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
2450
2715
|
var LINK_KINDS = [
|
|
2451
2716
|
"links-to",
|
|
2452
2717
|
"blocked-by",
|
|
@@ -2468,9 +2733,6 @@ var RELATION_KINDS = ["member-of", "related-to"];
|
|
|
2468
2733
|
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
2469
2734
|
|
|
2470
2735
|
export {
|
|
2471
|
-
TAG_TYPES,
|
|
2472
|
-
tagOf,
|
|
2473
|
-
normalizeTag,
|
|
2474
2736
|
formatMeetingReference,
|
|
2475
2737
|
parseMeetingReference,
|
|
2476
2738
|
canonicalMeetingReference,
|
|
@@ -2500,12 +2762,20 @@ export {
|
|
|
2500
2762
|
meetingTranscriptAnswer,
|
|
2501
2763
|
meetingSummaryAnswer,
|
|
2502
2764
|
exportMeeting,
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2765
|
+
FACT_TYPES,
|
|
2766
|
+
PAYMENT_DIRECTIONS,
|
|
2767
|
+
PAYMENT_STATES,
|
|
2768
|
+
validatePayment,
|
|
2769
|
+
paymentTitle,
|
|
2770
|
+
meetingTimestamp,
|
|
2507
2771
|
findingHash,
|
|
2772
|
+
validEvidence,
|
|
2773
|
+
findingId,
|
|
2774
|
+
validateFinding,
|
|
2775
|
+
validateBatch,
|
|
2508
2776
|
validateFindings,
|
|
2777
|
+
findingText,
|
|
2778
|
+
findingFields,
|
|
2509
2779
|
findingFingerprint,
|
|
2510
2780
|
MEETING_FINDINGS_KIND,
|
|
2511
2781
|
validateMeetingFindings,
|
|
@@ -2513,8 +2783,13 @@ export {
|
|
|
2513
2783
|
liftMeetingFields,
|
|
2514
2784
|
parseMeetingQuery,
|
|
2515
2785
|
meetingWordsQuery,
|
|
2786
|
+
transcriptLanguage,
|
|
2516
2787
|
importFiles,
|
|
2517
2788
|
CHAT_MESSAGES_READ,
|
|
2789
|
+
snapshotMeetingScope,
|
|
2790
|
+
validateMeetingChange,
|
|
2791
|
+
validateMeetingContextChange,
|
|
2792
|
+
createMeetingContext,
|
|
2518
2793
|
meetingHitContextLimits,
|
|
2519
2794
|
validateMeetingPassage,
|
|
2520
2795
|
validateMeetingPreparationContext,
|
|
@@ -2529,6 +2804,7 @@ export {
|
|
|
2529
2804
|
meetingLink,
|
|
2530
2805
|
meetingSpeaker,
|
|
2531
2806
|
meetingStats,
|
|
2807
|
+
meetingCounts,
|
|
2532
2808
|
meetingParticipants,
|
|
2533
2809
|
meetingPassage,
|
|
2534
2810
|
event,
|
|
@@ -2540,7 +2816,11 @@ export {
|
|
|
2540
2816
|
SAVE_HELP,
|
|
2541
2817
|
validateMeetingSeriesHistory,
|
|
2542
2818
|
validateMeetingSeriesInventoryCursor,
|
|
2819
|
+
aggregateMeetingCounts,
|
|
2543
2820
|
aggregateMeetingStats,
|
|
2821
|
+
TAG_TYPES,
|
|
2822
|
+
tagOf,
|
|
2823
|
+
normalizeTag,
|
|
2544
2824
|
LINK_KINDS,
|
|
2545
2825
|
LINK_ORIGINS,
|
|
2546
2826
|
LINK_SOURCES,
|
|
@@ -2561,7 +2841,6 @@ export {
|
|
|
2561
2841
|
priorityOption,
|
|
2562
2842
|
createTaskService,
|
|
2563
2843
|
matches,
|
|
2564
|
-
FACT_TYPES,
|
|
2565
2844
|
FACT_STATUSES,
|
|
2566
2845
|
MEMORY_KINDS,
|
|
2567
2846
|
MEMORY_STATUSES,
|