@wirecat/tg-cli 0.126.0 → 0.128.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/tg.js +2 -2
- package/dist/bundle/{adapter-BXU3AVB7.js → adapter-JOI34QLS.js} +43 -43
- package/dist/bundle/{all-profiles-G5A6IROO.js → all-profiles-2BZEE7J2.js} +18 -28
- package/dist/bundle/{anthropic-SINVEVEM.js → anthropic-NW7DL3S3.js} +2 -2
- package/dist/bundle/{app-server-IHIQXPJF.js → app-server-RUTYKELF.js} +39 -54
- package/dist/bundle/{bot-api-LGAVVYRM.js → bot-api-DW6NAZAQ.js} +44 -44
- package/dist/bundle/{bot-history-5C35FGCD.js → bot-history-FAJ2W42U.js} +12 -12
- package/dist/bundle/{bun-2GK3YOP3.js → bun-IVP5LSVI.js} +2 -2
- package/dist/bundle/{bun-sqlite-7DGADK3E.js → bun-sqlite-ATPCJ4CT.js} +3 -3
- package/dist/bundle/{chunk-Y5DGB7GP.js → chunk-2A3TC52A.js} +7 -7
- package/dist/bundle/{chunk-Y4724JRR.js → chunk-2IL4YDGG.js} +2 -2
- package/dist/bundle/{chunk-2F2UMQMB.js → chunk-2QHIOPSA.js} +182 -399
- package/dist/bundle/{chunk-SXVB2CVR.js → chunk-3UGRMFWK.js} +2 -2
- package/dist/bundle/{chunk-QCLMP635.js → chunk-4DSIGS2E.js} +5 -5
- package/dist/bundle/{chunk-HPFB4Y7P.js → chunk-5AP25FMW.js} +1 -1
- package/dist/bundle/{chunk-CK7DSGIK.js → chunk-7D6LI2N7.js} +322 -11
- package/dist/bundle/{chunk-2LN6OJUB.js → chunk-7I5NMVX7.js} +1 -1
- package/dist/bundle/{chunk-JQ2RKLPU.js → chunk-AF2XVV5P.js} +648 -239
- package/dist/bundle/{chunk-MP47TE77.js → chunk-BVCRDHI2.js} +3 -3
- package/dist/bundle/{chunk-7UACPXDC.js → chunk-E56QE3UC.js} +987 -768
- package/dist/bundle/{chunk-ACLUVZ4I.js → chunk-EAUHYQUK.js} +40 -48
- package/dist/bundle/{chunk-L5PYWQDA.js → chunk-F4UIBEQK.js} +2 -2
- package/dist/bundle/{chunk-FYOHGIQP.js → chunk-FHGAJK4I.js} +16 -13
- package/dist/bundle/{chunk-AA2NZAUT.js → chunk-G3PL3R45.js} +1 -1
- package/dist/bundle/{chunk-W75SKUY4.js → chunk-GYO4WXLG.js} +2 -2
- package/dist/bundle/{chunk-GIY56MIB.js → chunk-IHLNXL2D.js} +1 -1
- package/dist/bundle/{chunk-MA2XHO4O.js → chunk-IIHCSJV2.js} +641 -389
- package/dist/bundle/{chunk-N2JSMP4N.js → chunk-IV2KJQ5F.js} +16 -15
- package/dist/bundle/{chunk-QGLB4D7J.js → chunk-J3SX36NE.js} +1 -1
- package/dist/bundle/{chunk-XGBXRDJP.js → chunk-JI2PFQFL.js} +5 -5
- package/dist/bundle/{chunk-RFDPU4NO.js → chunk-JJGPU24U.js} +4 -4
- package/dist/bundle/{chunk-5NLAGTWU.js → chunk-KF2Q776U.js} +7 -7
- package/dist/bundle/{chunk-F34EE5Y2.js → chunk-KKZQK6IK.js} +2 -2
- package/dist/bundle/{chunk-5GINYFD4.js → chunk-LTADKMP5.js} +1 -1
- package/dist/bundle/{chunk-J2BUWK5U.js → chunk-MC6FOTCV.js} +98 -6
- package/dist/bundle/{chunk-63DSHUNP.js → chunk-MDGLKMLD.js} +5 -5
- package/dist/bundle/{chunk-PJ6FZXUR.js → chunk-MGBVVQTU.js} +2 -2
- package/dist/bundle/{chunk-K4DXGJK4.js → chunk-MOUPWPNL.js} +10 -10
- package/dist/bundle/{chunk-G4VVBR6U.js → chunk-NXDQXDRN.js} +3 -3
- package/dist/bundle/{chunk-SL4S5GFR.js → chunk-ODBK56ZR.js} +1 -1
- package/dist/bundle/{chunk-QYLYMOXN.js → chunk-OX6574YV.js} +11 -11
- package/dist/bundle/{chunk-4GR5YYGA.js → chunk-PJA43HVE.js} +2 -2
- package/dist/bundle/{chunk-GI2ZUNOH.js → chunk-Q3ZO6Q3M.js} +4 -4
- package/dist/bundle/{chunk-OXB5P37M.js → chunk-QO4ON2X7.js} +1 -1
- package/dist/bundle/{chunk-NJ3FSKSU.js → chunk-QYN5RDTZ.js} +2 -2
- package/dist/bundle/{chunk-GOGGRLS6.js → chunk-R4QVV3LN.js} +27 -12
- package/dist/bundle/{chunk-AZ7DSHQO.js → chunk-RIGNCUZD.js} +1 -1
- package/dist/bundle/{chunk-QMEPKUG3.js → chunk-RZFIQMOA.js} +55 -52
- package/dist/bundle/{chunk-G4RCT5RH.js → chunk-SDLJJF7E.js} +12 -12
- package/dist/bundle/{chunk-JAKP5RWM.js → chunk-T2CWSFGY.js} +1558 -928
- package/dist/bundle/{chunk-W35POPPX.js → chunk-TGUXKG4B.js} +16 -16
- package/dist/bundle/{chunk-W725T2V7.js → chunk-TQFUAKU6.js} +1 -1
- package/dist/bundle/{chunk-UIFQEXVP.js → chunk-UURJO46N.js} +1 -1
- package/dist/bundle/{chunk-AKUBJHE5.js → chunk-WG3BF7SA.js} +1 -1
- package/dist/bundle/{chunk-7FL2N6DM.js → chunk-WMF6SL5D.js} +1 -1
- package/dist/bundle/{chunk-ZXCQF6XV.js → chunk-WMUPZ3IY.js} +10 -10
- package/dist/bundle/{chunk-KSLZEXRF.js → chunk-WPMJQIEU.js} +1 -1
- package/dist/bundle/{chunk-QOINWAQD.js → chunk-XYAH6QQO.js} +2 -2
- package/dist/bundle/{chunk-DGGAYHLN.js → chunk-YSXDCSBP.js} +33 -23
- package/dist/bundle/{chunk-AYEQMXRE.js → chunk-YVV5S2QA.js} +1 -1
- package/dist/bundle/{chunk-P2GNIWGG.js → chunk-ZVLYK6CZ.js} +6 -6
- package/dist/bundle/{command-contract-ZEYY3ZXK.js → command-contract-3BSXDYBC.js} +13 -13
- package/dist/bundle/{command-server-entry-UWY6PQIV.js → command-server-entry-BU3X4XNL.js} +20 -20
- package/dist/bundle/{decode-QGMFQ6XX.js → decode-NXB7E46F.js} +2 -2
- package/dist/bundle/{echarts-GHU3GEWV.js → echarts-NAXLKJLA.js} +2 -2
- package/dist/bundle/{embed-6DMEWQDO.js → embed-LB6ONWHX.js} +3 -3
- package/dist/bundle/{embedder-W2L7YZPW.js → embedder-WE7B2RU5.js} +6 -6
- package/dist/bundle/{entry-LPEXVFQC.js → entry-W6Y52ZRN.js} +6 -6
- package/dist/bundle/{first-run-3UJ6SJF5.js → first-run-NVYNZZA6.js} +5 -5
- package/dist/bundle/{first-screen-VCSY5QH5.js → first-screen-Z6TVHK6I.js} +14 -14
- package/dist/bundle/{instructions-RUVAH2IS.js → instructions-MRUC57NS.js} +1 -1
- package/dist/bundle/{node-RYSNHVBX.js → node-G7PMDYQV.js} +2 -2
- package/dist/bundle/{node-sqlite-J6ZL4LUY.js → node-sqlite-RXWQ3SES.js} +4 -4
- package/dist/bundle/{oauth-B2QNZNSC.js → oauth-6ZWOL6KX.js} +4 -4
- package/dist/bundle/{open-OMUP5P6V.js → open-V7LMZCFI.js} +2 -2
- package/dist/bundle/{openai-BT4BP4VQ.js → openai-P472V4ZM.js} +12 -12
- package/dist/bundle/{process-HG3QDD54.js → process-GSNPENHL.js} +1 -1
- package/dist/bundle/{program-P2VATMKJ.js → program-IELITPKT.js} +46 -46
- package/dist/bundle/{prompt-BTIHH3Z4.js → prompt-2CP6CQ5N.js} +2 -2
- package/dist/bundle/{recognize-CTSJXPIG.js → recognize-R2DEQ5TC.js} +1 -1
- package/dist/bundle/{remote-2FIGCMKL.js → remote-JG3POFES.js} +6 -6
- package/dist/bundle/{rerank-TI5SLEF4.js → rerank-TVMR3OLL.js} +4 -4
- package/dist/bundle/{serve-IO3IM5C7.js → serve-DBWSMLPH.js} +6 -6
- package/dist/bundle/{server-WEPFFTYA.js → server-EXJ2WNZY.js} +37 -35
- package/dist/bundle/server-SXNFFAIR.js +61 -0
- package/dist/bundle/{sqlite-runtime-CTEYXX7L.js → sqlite-runtime-AWMY7W4Q.js} +3 -3
- package/dist/bundle/{state-GFHVDGHM.js → state-HN44BWNQ.js} +3 -3
- package/dist/bundle/{store-RCK6HT4F.js → store-GIYS3LHV.js} +9 -9
- package/dist/bundle/{store-Y5XC4LEM.js → store-LOVKYQDC.js} +15 -11
- package/dist/bundle/store-maintenance-command-X3VOYNCG.js +52 -0
- package/dist/bundle/tg.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-BSKYPHLB.js +0 -76
- package/dist/bundle/server-RIGXUTKZ.js +0 -62
- package/dist/bundle/store-maintenance-command-XH6VMCDU.js +0 -52
|
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
isCliFailure,
|
|
5
5
|
isStoreDamage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MGBVVQTU.js";
|
|
7
7
|
import {
|
|
8
8
|
refuseOwnerStoreInTests
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TQFUAKU6.js";
|
|
10
10
|
import {
|
|
11
11
|
createRecordLog,
|
|
12
12
|
resolvePaths,
|
|
@@ -57,17 +57,17 @@ import {
|
|
|
57
57
|
__name
|
|
58
58
|
} from "./chunk-ZVVMGPBJ.js";
|
|
59
59
|
|
|
60
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
61
61
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
62
62
|
import { randomBytes } from "node:crypto";
|
|
63
63
|
|
|
64
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
65
65
|
import { randomUUID } from "node:crypto";
|
|
66
66
|
import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
67
67
|
import { userInfo } from "node:os";
|
|
68
68
|
import { join, sep } from "node:path";
|
|
69
69
|
|
|
70
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
70
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
71
71
|
var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
72
72
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
73
73
|
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -80,7 +80,7 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
80
80
|
error: /* @__PURE__ */ __name((event2, message) => logger.error(logAttributes(event2), message), "error")
|
|
81
81
|
}), "snakeLogger");
|
|
82
82
|
|
|
83
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
83
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
84
84
|
var diagnostic = {
|
|
85
85
|
event: true,
|
|
86
86
|
operation: true,
|
|
@@ -154,7 +154,7 @@ var LOG_ATTRIBUTES = [
|
|
|
154
154
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
155
155
|
].sort();
|
|
156
156
|
|
|
157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
158
158
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
159
159
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
160
160
|
var KEEP_STORE_RUNS_FOR_DAYS = 3;
|
|
@@ -212,10 +212,10 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
212
212
|
const codes = /* @__PURE__ */ new Set();
|
|
213
213
|
const tables = /* @__PURE__ */ new Set();
|
|
214
214
|
const noted = /* @__PURE__ */ __name((level) => (event2, message) => {
|
|
215
|
-
const { operation, errorCode, error_code, code, kind:
|
|
215
|
+
const { operation, errorCode, error_code, code, kind: kind3, table } = event2;
|
|
216
216
|
if (typeof operation === "string")
|
|
217
217
|
operations.add(operation);
|
|
218
|
-
if (
|
|
218
|
+
if (kind3 === "store" && typeof table === "string")
|
|
219
219
|
tables.add(table);
|
|
220
220
|
for (const value of [errorCode, error_code, code])
|
|
221
221
|
if (typeof value === "string")
|
|
@@ -521,7 +521,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
521
521
|
};
|
|
522
522
|
}, "metadataOf");
|
|
523
523
|
|
|
524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
525
525
|
var scopes = new AsyncLocalStorage();
|
|
526
526
|
var processScope;
|
|
527
527
|
var ownProcesses = new AsyncLocalStorage();
|
|
@@ -572,7 +572,7 @@ var attempts = new AsyncLocalStorage();
|
|
|
572
572
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
573
573
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
574
574
|
|
|
575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
576
576
|
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
577
577
|
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
578
578
|
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
@@ -1008,7 +1008,7 @@ var fieldsHelp = /* @__PURE__ */ __name((registry3, guide) => {
|
|
|
1008
1008
|
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
1009
1009
|
return [
|
|
1010
1010
|
"Fields:",
|
|
1011
|
-
...rows.map(([name = "",
|
|
1011
|
+
...rows.map(([name = "", kind3 = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind3.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
1012
1012
|
...registry3.defaults && registry3.defaults.length > 0 ? [`Defaults: ${registry3.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
1013
1013
|
...negatable.length > 0 ? [`Leave out: -${negatable[0]}:value or NOT ${negatable[0]}:value, for ${negatable.join(", ")}`] : [],
|
|
1014
1014
|
`Syntax: ${syntaxOf(shown, registry3.backend)}`,
|
|
@@ -1080,7 +1080,7 @@ var tokensOf = /* @__PURE__ */ __name((text6, fail3 = queryError) => {
|
|
|
1080
1080
|
at++;
|
|
1081
1081
|
continue;
|
|
1082
1082
|
}
|
|
1083
|
-
let
|
|
1083
|
+
let kind3 = c;
|
|
1084
1084
|
if (c === '"' || !range && c === "/") {
|
|
1085
1085
|
at++;
|
|
1086
1086
|
while (at < text6.length && text6[at] !== c) {
|
|
@@ -1093,22 +1093,22 @@ var tokensOf = /* @__PURE__ */ __name((text6, fail3 = queryError) => {
|
|
|
1093
1093
|
at++;
|
|
1094
1094
|
if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text6.slice(at)))
|
|
1095
1095
|
fail3("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
|
|
1096
|
-
|
|
1096
|
+
kind3 = c === '"' ? "quoted" : "regex";
|
|
1097
1097
|
} else if (range && c !== "]" && c !== "}") {
|
|
1098
1098
|
while (at < text6.length && !whitespace(text6[at] ?? "") && !["]", "}"].includes(text6[at] ?? ""))
|
|
1099
1099
|
at++;
|
|
1100
|
-
|
|
1100
|
+
kind3 = "rangeValue";
|
|
1101
1101
|
} else if (reserved.has(c)) {
|
|
1102
1102
|
if (c === "\\") {
|
|
1103
1103
|
at += 2;
|
|
1104
1104
|
while (at < text6.length && !whitespace(text6[at] ?? "") && (!reserved.has(text6[at] ?? "") || ["+", "-"].includes(text6[at] ?? "")))
|
|
1105
1105
|
at++;
|
|
1106
|
-
|
|
1106
|
+
kind3 = "term";
|
|
1107
1107
|
} else {
|
|
1108
1108
|
at++;
|
|
1109
1109
|
if ((c === "<" || c === ">") && text6[at] === "=") {
|
|
1110
1110
|
at++;
|
|
1111
|
-
|
|
1111
|
+
kind3 += "=";
|
|
1112
1112
|
}
|
|
1113
1113
|
if (c === "[" || c === "{")
|
|
1114
1114
|
range = true;
|
|
@@ -1138,9 +1138,9 @@ var tokensOf = /* @__PURE__ */ __name((text6, fail3 = queryError) => {
|
|
|
1138
1138
|
while (at < text6.length && !whitespace(text6[at] ?? "") && !["(", ")", '"'].includes(text6[at] ?? ""))
|
|
1139
1139
|
at++;
|
|
1140
1140
|
const raw = text6.slice(start, at);
|
|
1141
|
-
|
|
1141
|
+
kind3 = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
|
|
1142
1142
|
}
|
|
1143
|
-
tokens.push({ kind:
|
|
1143
|
+
tokens.push({ kind: kind3, raw: text6.slice(start, at), span: { start, end: at } });
|
|
1144
1144
|
}
|
|
1145
1145
|
tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
|
|
1146
1146
|
return tokens;
|
|
@@ -1168,8 +1168,8 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
|
|
|
1168
1168
|
let depth = 0;
|
|
1169
1169
|
const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
|
|
1170
1170
|
const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
|
|
1171
|
-
const expect = /* @__PURE__ */ __name((
|
|
1172
|
-
if (peek().kind !==
|
|
1171
|
+
const expect = /* @__PURE__ */ __name((kind3) => {
|
|
1172
|
+
if (peek().kind !== kind3)
|
|
1173
1173
|
fail3("query.invalid-syntax", peek().span);
|
|
1174
1174
|
return take();
|
|
1175
1175
|
}, "expect");
|
|
@@ -1241,14 +1241,14 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
|
|
|
1241
1241
|
const value = take();
|
|
1242
1242
|
if (!["term", "number", "quoted"].includes(value.kind))
|
|
1243
1243
|
fail3("query.invalid-syntax", value.span);
|
|
1244
|
-
const
|
|
1244
|
+
const decoded2 = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail3);
|
|
1245
1245
|
const lower = operator.kind.startsWith(">");
|
|
1246
1246
|
const node2 = built({
|
|
1247
1247
|
kind: "predicate",
|
|
1248
1248
|
field,
|
|
1249
1249
|
operator: "range",
|
|
1250
|
-
value: lower ?
|
|
1251
|
-
upper: lower ? "*" :
|
|
1250
|
+
value: lower ? decoded2 : "*",
|
|
1251
|
+
upper: lower ? "*" : decoded2,
|
|
1252
1252
|
lower_inclusive: !lower || operator.kind.endsWith("="),
|
|
1253
1253
|
upper_inclusive: lower || operator.kind.endsWith("="),
|
|
1254
1254
|
span: { start: token.span.start, end: value.span.end }
|
|
@@ -1330,7 +1330,7 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
|
|
|
1330
1330
|
}, "parseLucene");
|
|
1331
1331
|
var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
|
|
1332
1332
|
const tokens = tokensOf(text6);
|
|
1333
|
-
if (tokens.some(({ kind:
|
|
1333
|
+
if (tokens.some(({ kind: kind3 }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind3)))
|
|
1334
1334
|
return /* @__PURE__ */ new Set();
|
|
1335
1335
|
return new Set(tokens.flatMap((token, index) => (token.kind === "term" || token.kind === "number") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index - 1]?.kind ?? "") && ![":", "=", "<", ">", "<=", ">="].includes(tokens[index + 1]?.kind ?? "") ? [token.span.start] : []));
|
|
1336
1336
|
}, "implicitTextTerms");
|
|
@@ -1481,7 +1481,43 @@ var QUERY_REASONS = defineReasons([
|
|
|
1481
1481
|
details: [...SPAN, ...details]
|
|
1482
1482
|
})));
|
|
1483
1483
|
|
|
1484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/service-query.js
|
|
1485
|
+
var BACKENDS = ["archive", "server", "both"];
|
|
1486
|
+
var MAX_BRANCHES = 64;
|
|
1487
|
+
var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
|
|
1488
|
+
var readable = /* @__PURE__ */ __name((node, capability) => capability.fields[node.field]?.includes(node.operator) === true, "readable");
|
|
1489
|
+
var branchesOf = /* @__PURE__ */ __name((node, capability, cut) => {
|
|
1490
|
+
if (node.kind === "predicate")
|
|
1491
|
+
return readable(node, capability) ? some(capability.leaf(node, false)) : [capability.all];
|
|
1492
|
+
const must = node.clauses.filter(({ occur }) => occur === "must");
|
|
1493
|
+
const not = node.clauses.flatMap(({ occur, node: node2 }) => occur === "must_not" && node2.kind === "predicate" && capability.negatable?.includes(node2.field) && readable(node2, capability) ? some(capability.leaf(node2, true)) : []);
|
|
1494
|
+
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
1495
|
+
const base = must.length || !should.length ? must.reduce((product, { node: node2 }) => {
|
|
1496
|
+
const next = product.flatMap((one) => branchesOf(node2, capability, cut).flatMap((other) => some(capability.both(one, other))));
|
|
1497
|
+
return next.length > MAX_BRANCHES ? product : next;
|
|
1498
|
+
}, [capability.all]) : should.flatMap(({ node: node2 }) => branchesOf(node2, capability, cut));
|
|
1499
|
+
if (base.length > MAX_BRANCHES)
|
|
1500
|
+
cut.branches = true;
|
|
1501
|
+
return not.reduce((branches, negated) => branches.flatMap((one) => some(capability.both(one, negated))), base.slice(0, MAX_BRANCHES));
|
|
1502
|
+
}, "branchesOf");
|
|
1503
|
+
var serviceCallsOf = /* @__PURE__ */ __name((root, capability, scope2) => {
|
|
1504
|
+
const cut = { branches: false };
|
|
1505
|
+
const all = branchesOf(root, capability, cut).flatMap((branch) => scope2 === void 0 ? [branch] : some(capability.both(scope2, branch)));
|
|
1506
|
+
const sent = capability.sends ? all.filter((branch) => capability.sends?.(branch)) : all;
|
|
1507
|
+
const unique = [...new Map(sent.map((branch) => [JSON.stringify(branch), branch])).values()];
|
|
1508
|
+
const unsent = all.length - sent.length;
|
|
1509
|
+
if (capability.either && unique.length)
|
|
1510
|
+
return { calls: [capability.either(unique)], complete: !cut.branches, unsent };
|
|
1511
|
+
const max = Math.max(1, capability.maxCalls);
|
|
1512
|
+
return { calls: unique.slice(0, max), complete: !cut.branches && unique.length <= max, unsent };
|
|
1513
|
+
}, "serviceCallsOf");
|
|
1514
|
+
var rangeOf = /* @__PURE__ */ __name((node, zone, now) => dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.operator === "range" ? node.lower_inclusive === true : true, node.operator === "range" ? node.upper_inclusive === true : true, zone, node.span, now), "rangeOf");
|
|
1515
|
+
var windowOf = /* @__PURE__ */ __name(({ lower, upper, lower_inclusive, upper_inclusive }) => ({
|
|
1516
|
+
...lower === void 0 ? {} : { from: lower_inclusive ? lower : lower + 1 },
|
|
1517
|
+
...upper === void 0 ? {} : { to: upper_inclusive ? upper : upper - 1 }
|
|
1518
|
+
}), "windowOf");
|
|
1519
|
+
|
|
1520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
1485
1521
|
var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
1486
1522
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
1487
1523
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
@@ -1518,7 +1554,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
|
|
|
1518
1554
|
}, "parseMeetingReference");
|
|
1519
1555
|
var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
|
|
1520
1556
|
|
|
1521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
1522
1558
|
var text = string();
|
|
1523
1559
|
var count = pipe(number(), integer(), minValue(0));
|
|
1524
1560
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -1526,9 +1562,11 @@ var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
|
|
|
1526
1562
|
const listed2 = metadata?.issues;
|
|
1527
1563
|
return Array.isArray(listed2) ? MEETING_ISSUES.filter((issue) => listed2.includes(issue)) : [];
|
|
1528
1564
|
}, "meetingIssuesOf");
|
|
1529
|
-
var
|
|
1565
|
+
var meetingEntries = {
|
|
1530
1566
|
ref: reference,
|
|
1531
1567
|
id: pipe(string(), minLength(1)),
|
|
1568
|
+
/** The service's own id of this occurrence: what `meetings show` takes besides the store number. */
|
|
1569
|
+
provider_id: text,
|
|
1532
1570
|
provider: text,
|
|
1533
1571
|
account: text,
|
|
1534
1572
|
title: nullable(text),
|
|
@@ -1543,15 +1581,25 @@ var meeting = strictObject({
|
|
|
1543
1581
|
participants_count: nullable(count),
|
|
1544
1582
|
/** Present only when something about this meeting is doubtful. */
|
|
1545
1583
|
issues: optional(array(picklist(MEETING_ISSUES))),
|
|
1584
|
+
/**
|
|
1585
|
+
* Where a read that asked the service found it, as messages search says it: `archive` (only the store), `server`
|
|
1586
|
+
* (new from the service), `both`. Absent when the service was not asked.
|
|
1587
|
+
*/
|
|
1588
|
+
found_in: optional(picklist(["archive", "server", "both"])),
|
|
1589
|
+
/** The service's text, which a reader must not follow as instructions. */
|
|
1590
|
+
untrusted: optional(array(text)),
|
|
1546
1591
|
created_at: isoTime,
|
|
1547
1592
|
updated_at: isoTime
|
|
1548
|
-
}
|
|
1593
|
+
};
|
|
1594
|
+
var meeting = strictObject(meetingEntries);
|
|
1595
|
+
var MEETING_UNTRUSTED = ["title", "description", "location"];
|
|
1549
1596
|
var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
1550
1597
|
var meetingItem = /* @__PURE__ */ __name((row, owner) => {
|
|
1551
1598
|
const issues = meetingIssuesOf(row.metadata);
|
|
1552
1599
|
return {
|
|
1553
1600
|
ref: formatMeetingReference({ type: "meeting", accountId: row.accountId, meetingId: row.id }),
|
|
1554
1601
|
id: String(row.id),
|
|
1602
|
+
provider_id: row.externalId,
|
|
1555
1603
|
provider: owner.provider,
|
|
1556
1604
|
account: owner.account,
|
|
1557
1605
|
title: row.title,
|
|
@@ -1564,6 +1612,7 @@ var meetingItem = /* @__PURE__ */ __name((row, owner) => {
|
|
|
1564
1612
|
timezone: row.timezone,
|
|
1565
1613
|
participants_count: row.participantsCount,
|
|
1566
1614
|
...issues.length ? { issues } : {},
|
|
1615
|
+
untrusted: [...MEETING_UNTRUSTED],
|
|
1567
1616
|
created_at: new Date(row.createdAt).toISOString(),
|
|
1568
1617
|
updated_at: new Date(row.updatedAt).toISOString()
|
|
1569
1618
|
};
|
|
@@ -1572,9 +1621,21 @@ var MEETING_QUERY = {
|
|
|
1572
1621
|
entity: "meeting",
|
|
1573
1622
|
backend: "sql",
|
|
1574
1623
|
fields: queryFieldsOf(meeting, {
|
|
1575
|
-
exclude: [
|
|
1624
|
+
exclude: [
|
|
1625
|
+
"ref",
|
|
1626
|
+
"provider",
|
|
1627
|
+
"account",
|
|
1628
|
+
"description",
|
|
1629
|
+
"location",
|
|
1630
|
+
"url",
|
|
1631
|
+
"timezone",
|
|
1632
|
+
"issues",
|
|
1633
|
+
"found_in",
|
|
1634
|
+
"untrusted"
|
|
1635
|
+
],
|
|
1576
1636
|
examples: {
|
|
1577
1637
|
id: "id:12",
|
|
1638
|
+
provider_id: "provider_id:85746065432",
|
|
1578
1639
|
title: "title:*standup*",
|
|
1579
1640
|
started_at: "started_at:[2026-10-01 TO 2026-10-31]",
|
|
1580
1641
|
duration_ms: "duration_ms>=3600000",
|
|
@@ -1583,11 +1644,11 @@ var MEETING_QUERY = {
|
|
|
1583
1644
|
})
|
|
1584
1645
|
};
|
|
1585
1646
|
|
|
1586
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1647
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/store.js
|
|
1587
1648
|
var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
|
|
1588
1649
|
var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
|
|
1589
1650
|
|
|
1590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1651
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1591
1652
|
var text2 = string();
|
|
1592
1653
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1593
1654
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -1648,7 +1709,7 @@ var meetingSummary = strictObject({
|
|
|
1648
1709
|
created_at: isoTime,
|
|
1649
1710
|
updated_at: isoTime
|
|
1650
1711
|
});
|
|
1651
|
-
var
|
|
1712
|
+
var meetingDetailsEntries = {
|
|
1652
1713
|
...meeting.entries,
|
|
1653
1714
|
/** The stored event and series it belongs to, as `meetings_list` takes them. */
|
|
1654
1715
|
event_id: nullable(text2),
|
|
@@ -1685,7 +1746,8 @@ var meetingDetails = strictObject({
|
|
|
1685
1746
|
title: nullable(text2),
|
|
1686
1747
|
document: nullable(reference)
|
|
1687
1748
|
}))
|
|
1688
|
-
}
|
|
1749
|
+
};
|
|
1750
|
+
var meetingDetails = strictObject(meetingDetailsEntries);
|
|
1689
1751
|
var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
|
|
1690
1752
|
var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows) => ({
|
|
1691
1753
|
ref: formatMeetingReference({
|
|
@@ -1841,7 +1903,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1841
1903
|
};
|
|
1842
1904
|
}, "meetingHitsList");
|
|
1843
1905
|
|
|
1844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
1845
1907
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1846
1908
|
const parsed = urlOf(url);
|
|
1847
1909
|
if (!parsed)
|
|
@@ -1875,7 +1937,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
1875
1937
|
}
|
|
1876
1938
|
}, "urlOf");
|
|
1877
1939
|
|
|
1878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1879
1941
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1880
1942
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1881
1943
|
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");
|
|
@@ -1912,7 +1974,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1912
1974
|
return kept;
|
|
1913
1975
|
}, "entryMetadata");
|
|
1914
1976
|
|
|
1915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1916
1978
|
import { createHash } from "node:crypto";
|
|
1917
1979
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1918
1980
|
reference: cue2.reference,
|
|
@@ -1926,7 +1988,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
1926
1988
|
text: cue2.text
|
|
1927
1989
|
})).digest("hex"), "meetingCueFingerprint");
|
|
1928
1990
|
|
|
1929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1930
1992
|
var EVENT_QUERY = defineQuery({
|
|
1931
1993
|
entity: "event",
|
|
1932
1994
|
backend: "sql",
|
|
@@ -1942,7 +2004,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
1942
2004
|
]
|
|
1943
2005
|
});
|
|
1944
2006
|
|
|
1945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1946
2008
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1947
2009
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1948
2010
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -1965,7 +2027,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
1965
2027
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1966
2028
|
}, "entryInWindow");
|
|
1967
2029
|
|
|
1968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1969
2031
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
|
|
1970
2032
|
const current = await store.meeting(details.meeting.id);
|
|
1971
2033
|
if (!current)
|
|
@@ -2010,7 +2072,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
|
|
|
2010
2072
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
2011
2073
|
}, "linkEvent");
|
|
2012
2074
|
|
|
2013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
2014
2076
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
2015
2077
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
2016
2078
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -2034,7 +2096,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
2034
2096
|
};
|
|
2035
2097
|
}, "validateMeetingParticipantSearch");
|
|
2036
2098
|
|
|
2037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
2038
2100
|
var MeetingError = class extends CliError {
|
|
2039
2101
|
static {
|
|
2040
2102
|
__name(this, "MeetingError");
|
|
@@ -2153,10 +2215,9 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
|
|
|
2153
2215
|
throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
|
|
2154
2216
|
return owner;
|
|
2155
2217
|
}, "ownerOf");
|
|
2156
|
-
var
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
}, "meetingDetailsAnswer");
|
|
2218
|
+
var meetingDetailsBody = /* @__PURE__ */ __name(async (store, details) => ({
|
|
2219
|
+
item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId))
|
|
2220
|
+
}), "meetingDetailsBody");
|
|
2160
2221
|
var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id4, accountId, options = {}) => {
|
|
2161
2222
|
const details = await meetingShow(store, id4, accountId);
|
|
2162
2223
|
return wholeList(details.transcripts.filter((t) => (options.history || t.transcript.supersededAt === null) && t.transcript.deletedAt === null).map((t) => meetingTranscriptItem(details.meeting.accountId, t.transcript, t.rows)));
|
|
@@ -2166,7 +2227,7 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId)
|
|
|
2166
2227
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
2167
2228
|
}, "meetingSummaryAnswer");
|
|
2168
2229
|
|
|
2169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
2170
2231
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
2171
2232
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
2172
2233
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -2262,10 +2323,10 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
|
2262
2323
|
};
|
|
2263
2324
|
}, "exportMeeting");
|
|
2264
2325
|
|
|
2265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
2266
2327
|
import { createHash as createHash2 } from "node:crypto";
|
|
2267
2328
|
|
|
2268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
2269
2330
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
2270
2331
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
2271
2332
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
@@ -2276,7 +2337,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
2276
2337
|
return new Date(value).toISOString();
|
|
2277
2338
|
}, "meetingTimestamp");
|
|
2278
2339
|
|
|
2279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
2280
2341
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
2281
2342
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
2282
2343
|
throw new CliError("validation_error", message);
|
|
@@ -2290,10 +2351,10 @@ var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update
|
|
|
2290
2351
|
var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
|
|
2291
2352
|
var findingWhere = /* @__PURE__ */ __name((of) => {
|
|
2292
2353
|
const id4 = typeof of.id === "string" ? of.id : null;
|
|
2293
|
-
const
|
|
2354
|
+
const kind3 = typeof of.kind === "string" ? of.kind : null;
|
|
2294
2355
|
return {
|
|
2295
|
-
where: id4 ||
|
|
2296
|
-
named: { ...id4 ? { finding: id4 } : {}, ...
|
|
2356
|
+
where: id4 || kind3 ? ` in ${[id4, kind3 && `(${kind3})`].filter(Boolean).join(" ")}` : "",
|
|
2357
|
+
named: { ...id4 ? { finding: id4 } : {}, ...kind3 ? { kind: kind3 } : {} }
|
|
2297
2358
|
};
|
|
2298
2359
|
}, "findingWhere");
|
|
2299
2360
|
var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
|
|
@@ -2451,7 +2512,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
|
2451
2512
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
2452
2513
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
2453
2514
|
|
|
2454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
2455
2516
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
2456
2517
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
2457
2518
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -2462,7 +2523,7 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
2462
2523
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
2463
2524
|
var meetingFindingFingerprint = findingFingerprint;
|
|
2464
2525
|
|
|
2465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
2466
2527
|
var context = {
|
|
2467
2528
|
command: "search meetings",
|
|
2468
2529
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -2549,13 +2610,15 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
|
|
|
2549
2610
|
}, "once");
|
|
2550
2611
|
for (const { node } of lifted) {
|
|
2551
2612
|
if (node.field === "date") {
|
|
2552
|
-
once("since", "--since-time");
|
|
2553
|
-
once("until", "--until-time");
|
|
2554
2613
|
const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive !== false, node.upper_inclusive !== false, timezoneOf(timezone), node.span, now);
|
|
2555
|
-
if (range.lower !== void 0)
|
|
2614
|
+
if (range.lower !== void 0) {
|
|
2615
|
+
once("since", "--since-time");
|
|
2556
2616
|
next.since = range.lower + (range.lower_inclusive ? 0 : 1);
|
|
2557
|
-
|
|
2617
|
+
}
|
|
2618
|
+
if (range.upper !== void 0) {
|
|
2619
|
+
once("until", "--until-time");
|
|
2558
2620
|
next.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
2621
|
+
}
|
|
2559
2622
|
} else {
|
|
2560
2623
|
const field = node.field;
|
|
2561
2624
|
once(field, `--${field}`);
|
|
@@ -2565,14 +2628,14 @@ var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) =
|
|
|
2565
2628
|
let rest = query;
|
|
2566
2629
|
for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
|
|
2567
2630
|
rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
|
|
2568
|
-
rest = rest.replace(/^(?:\s*AND\b)+|(?:\bAND\s*)+$/g, "").replace(
|
|
2631
|
+
rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
|
|
2569
2632
|
if (!rest)
|
|
2570
2633
|
throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
|
|
2571
2634
|
return { query: rest, request: next };
|
|
2572
2635
|
}, "liftMeetingFields");
|
|
2573
2636
|
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
2574
2637
|
|
|
2575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2576
2639
|
var LATIN_WORDS = {
|
|
2577
2640
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2578
2641
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2621,7 +2684,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2621
2684
|
return null;
|
|
2622
2685
|
}, "transcriptLanguage");
|
|
2623
2686
|
|
|
2624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2625
2688
|
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
2626
2689
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
2627
2690
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -2658,7 +2721,7 @@ var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
|
2658
2721
|
return time2;
|
|
2659
2722
|
}, "timestamp");
|
|
2660
2723
|
|
|
2661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2724
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2662
2725
|
var TranscriptTextError = class extends Error {
|
|
2663
2726
|
static {
|
|
2664
2727
|
__name(this, "TranscriptTextError");
|
|
@@ -2713,7 +2776,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2713
2776
|
return { header, lines };
|
|
2714
2777
|
}, "parseTranscriptText");
|
|
2715
2778
|
|
|
2716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2717
2780
|
var VttError = class extends Error {
|
|
2718
2781
|
static {
|
|
2719
2782
|
__name(this, "VttError");
|
|
@@ -2765,7 +2828,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2765
2828
|
return cues;
|
|
2766
2829
|
}, "parseVtt");
|
|
2767
2830
|
|
|
2768
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2769
2832
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2770
2833
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2771
2834
|
for (const file of files) {
|
|
@@ -2798,10 +2861,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2798
2861
|
return report;
|
|
2799
2862
|
}, "importFiles");
|
|
2800
2863
|
|
|
2801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2802
2865
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2803
2866
|
|
|
2804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2805
2868
|
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
2806
2869
|
if (typeof value !== "string" || !value.trim())
|
|
2807
2870
|
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
@@ -2852,7 +2915,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
|
2852
2915
|
return Object.freeze(result);
|
|
2853
2916
|
}, "validateMeetingChange");
|
|
2854
2917
|
|
|
2855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2856
2919
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2857
2920
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2858
2921
|
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)))
|
|
@@ -2865,7 +2928,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
2865
2928
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2866
2929
|
}, "validateMeetingPassage");
|
|
2867
2930
|
|
|
2868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2869
2932
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2870
2933
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2871
2934
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2890,7 +2953,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2890
2953
|
return { ...input, limit, maxReadBytes };
|
|
2891
2954
|
}, "validateMeetingPreparationContext");
|
|
2892
2955
|
|
|
2893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2894
2957
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
2895
2958
|
var id = pipe(string(), minLength(1));
|
|
2896
2959
|
var meetingProjectEvidence = strictObject({
|
|
@@ -3011,7 +3074,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
3011
3074
|
};
|
|
3012
3075
|
}, "meetingProjectEvidenceAnswer");
|
|
3013
3076
|
|
|
3014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
3015
3078
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
3016
3079
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
3017
3080
|
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) || [
|
|
@@ -3031,7 +3094,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
3031
3094
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
3032
3095
|
}, "validateMeetingHitSearch");
|
|
3033
3096
|
|
|
3034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
3035
3098
|
var ids = {
|
|
3036
3099
|
meeting_id: "meetingId",
|
|
3037
3100
|
identity_id: "participantIdentityId",
|
|
@@ -3122,7 +3185,7 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request =
|
|
|
3122
3185
|
return { project: project2.trim(), options, query: frozen.join(" AND ") };
|
|
3123
3186
|
}, "prepareMeetingProjectEvidence");
|
|
3124
3187
|
|
|
3125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
3126
3189
|
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
|
|
3127
3190
|
const prepared = prepareMeetingProjectEvidence(project2, request, now);
|
|
3128
3191
|
const page = await read(prepared.project, prepared.options);
|
|
@@ -3130,7 +3193,7 @@ var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, r
|
|
|
3130
3193
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
3131
3194
|
}, "readMeetingProjectEvidence");
|
|
3132
3195
|
|
|
3133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
3134
3197
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
3135
3198
|
const { identityExternalId, phone, ...fields } = p;
|
|
3136
3199
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -3146,6 +3209,93 @@ var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, posit
|
|
|
3146
3209
|
}
|
|
3147
3210
|
};
|
|
3148
3211
|
}, "participantInput");
|
|
3212
|
+
var participantInputs = /* @__PURE__ */ __name((provider, occurrenceId2, list, accountId) => list.map((p, i) => participantInput(p, provider, occurrenceId2, i, accountId)), "participantInputs");
|
|
3213
|
+
var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount, kept) => {
|
|
3214
|
+
const startedAt = timestamp2(m.occurrence.startedAt);
|
|
3215
|
+
const given = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
3216
|
+
if (given !== null && given < startedAt)
|
|
3217
|
+
throw new Error("Meeting ends before it starts");
|
|
3218
|
+
const keptEnd = kept?.endedAt ?? null;
|
|
3219
|
+
const endedAt = given ?? (keptEnd !== null && keptEnd >= startedAt ? keptEnd : null);
|
|
3220
|
+
const count7 = participantsCount === null && kept ? kept.participantsCount : participantsCount;
|
|
3221
|
+
const metadata = kept?.metadata && m.metadata ? { ...kept.metadata, ...m.metadata } : m.metadata ?? kept?.metadata ?? null;
|
|
3222
|
+
const meeting2 = {
|
|
3223
|
+
accountId,
|
|
3224
|
+
externalId: m.occurrence.id,
|
|
3225
|
+
title: m.occurrence.title,
|
|
3226
|
+
description: m.description ?? kept?.description ?? null,
|
|
3227
|
+
location: m.location ?? kept?.location ?? null,
|
|
3228
|
+
joinUrl: m.joinUrl ?? m.series?.joinUrl ?? kept?.joinUrl ?? null,
|
|
3229
|
+
startedAt,
|
|
3230
|
+
endedAt,
|
|
3231
|
+
durationMs: endedAt === null ? null : endedAt - startedAt,
|
|
3232
|
+
timezone: m.timezone ?? kept?.timezone ?? null,
|
|
3233
|
+
hostIdentityId: kept?.hostIdentityId ?? null,
|
|
3234
|
+
...count7 === void 0 ? {} : { participantsCount: count7 },
|
|
3235
|
+
metadata,
|
|
3236
|
+
deletedAt: null
|
|
3237
|
+
};
|
|
3238
|
+
if (m.series)
|
|
3239
|
+
meeting2.series = {
|
|
3240
|
+
externalId: m.series.id,
|
|
3241
|
+
title: m.series.title,
|
|
3242
|
+
description: null,
|
|
3243
|
+
kind: m.series.kind ?? null,
|
|
3244
|
+
recurrence: m.series.recurrence ?? null,
|
|
3245
|
+
hostIdentityId: null,
|
|
3246
|
+
joinUrl: m.series.joinUrl ?? null,
|
|
3247
|
+
metadata: null,
|
|
3248
|
+
deletedAt: null
|
|
3249
|
+
};
|
|
3250
|
+
return meeting2;
|
|
3251
|
+
}, "sourceMeetingInput");
|
|
3252
|
+
var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2, { accountId, now, kept }) => {
|
|
3253
|
+
const id4 = m.occurrence.id;
|
|
3254
|
+
const { participants: sourceParticipants, transcript: lines, chat, summary } = parts2;
|
|
3255
|
+
const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], accountId);
|
|
3256
|
+
const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
|
|
3257
|
+
const linked = sourceParticipants !== void 0;
|
|
3258
|
+
const format = source.transcriptFormat ?? null;
|
|
3259
|
+
const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
|
|
3260
|
+
const details = await store.saveMeeting({
|
|
3261
|
+
meeting: meeting2,
|
|
3262
|
+
participants: sourceParticipants ? participants : void 0,
|
|
3263
|
+
transcripts,
|
|
3264
|
+
chat: chat?.map((line2) => ({
|
|
3265
|
+
externalId: null,
|
|
3266
|
+
sentAt: timestamp2(line2.sentAt),
|
|
3267
|
+
senderParticipantPosition: speakerPosition(line2.sender, participants),
|
|
3268
|
+
senderName: line2.sender,
|
|
3269
|
+
recipient: null,
|
|
3270
|
+
text: line2.text,
|
|
3271
|
+
normalizedText: null,
|
|
3272
|
+
metadata: null
|
|
3273
|
+
})),
|
|
3274
|
+
summaries: summary ? [
|
|
3275
|
+
{
|
|
3276
|
+
...summary,
|
|
3277
|
+
source: summary.source ?? source.name,
|
|
3278
|
+
content: summary.content ?? null,
|
|
3279
|
+
docUrl: summary.docUrl ?? null,
|
|
3280
|
+
externalCreatedAt: summary.externalCreatedAt ?? null,
|
|
3281
|
+
externalUpdatedAt: summary.externalUpdatedAt ?? null,
|
|
3282
|
+
metadata: summary.metadata ?? null
|
|
3283
|
+
}
|
|
3284
|
+
] : void 0,
|
|
3285
|
+
attachments: parts2.files ?? void 0,
|
|
3286
|
+
documents: parts2.documents ?? void 0,
|
|
3287
|
+
now
|
|
3288
|
+
});
|
|
3289
|
+
if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
|
|
3290
|
+
await store.saveMeeting({
|
|
3291
|
+
meeting: meeting2,
|
|
3292
|
+
transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
|
|
3293
|
+
unlinked`, format)],
|
|
3294
|
+
now
|
|
3295
|
+
});
|
|
3296
|
+
await linkEvent(store, details, now, { create: source.createsEvents !== false });
|
|
3297
|
+
return details;
|
|
3298
|
+
}, "saveSourceMeeting");
|
|
3149
3299
|
var startOf = /* @__PURE__ */ __name((m) => {
|
|
3150
3300
|
const at = Date.parse(m.occurrence.startedAt);
|
|
3151
3301
|
return Number.isFinite(at) ? at : Number.POSITIVE_INFINITY;
|
|
@@ -3208,7 +3358,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
3208
3358
|
}, "read");
|
|
3209
3359
|
try {
|
|
3210
3360
|
const sourceParticipants = await read("participants", () => source.participants(id4));
|
|
3211
|
-
const participants = (
|
|
3361
|
+
const participants = participantInputs(source.provider, id4, sourceParticipants ?? [], options.accountId);
|
|
3212
3362
|
const names = /* @__PURE__ */ new Map();
|
|
3213
3363
|
for (const p of participants)
|
|
3214
3364
|
if (p.displayName !== null) {
|
|
@@ -3224,78 +3374,7 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
3224
3374
|
const attachments = await read("files", () => source.files(id4));
|
|
3225
3375
|
const listDocuments = source.documents?.bind(source);
|
|
3226
3376
|
const documents = listDocuments ? await read("documents", () => listDocuments(id4)) : void 0;
|
|
3227
|
-
|
|
3228
|
-
const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
3229
|
-
if (endedAt !== null && endedAt < startedAt)
|
|
3230
|
-
throw new Error("Meeting ends before it starts");
|
|
3231
|
-
const meeting2 = {
|
|
3232
|
-
accountId: options.accountId,
|
|
3233
|
-
externalId: id4,
|
|
3234
|
-
title: m.occurrence.title,
|
|
3235
|
-
description: m.description ?? null,
|
|
3236
|
-
location: m.location ?? null,
|
|
3237
|
-
joinUrl: m.joinUrl ?? m.series?.joinUrl ?? null,
|
|
3238
|
-
startedAt,
|
|
3239
|
-
endedAt,
|
|
3240
|
-
durationMs: endedAt === null ? null : endedAt - startedAt,
|
|
3241
|
-
timezone: m.timezone ?? null,
|
|
3242
|
-
hostIdentityId: null,
|
|
3243
|
-
...sourceParticipants === void 0 ? {} : { participantsCount: sourceParticipants?.length ?? null },
|
|
3244
|
-
metadata: m.metadata ?? null,
|
|
3245
|
-
deletedAt: null
|
|
3246
|
-
};
|
|
3247
|
-
if (m.series)
|
|
3248
|
-
meeting2.series = {
|
|
3249
|
-
externalId: m.series.id,
|
|
3250
|
-
title: m.series.title,
|
|
3251
|
-
description: null,
|
|
3252
|
-
kind: m.series.kind ?? null,
|
|
3253
|
-
recurrence: m.series.recurrence ?? null,
|
|
3254
|
-
hostIdentityId: null,
|
|
3255
|
-
joinUrl: m.series.joinUrl ?? null,
|
|
3256
|
-
metadata: null,
|
|
3257
|
-
deletedAt: null
|
|
3258
|
-
};
|
|
3259
|
-
const linked = sourceParticipants !== void 0;
|
|
3260
|
-
const format = source.transcriptFormat ?? null;
|
|
3261
|
-
const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
|
|
3262
|
-
const details = await store.saveMeeting({
|
|
3263
|
-
meeting: meeting2,
|
|
3264
|
-
participants: sourceParticipants ? participants : void 0,
|
|
3265
|
-
transcripts,
|
|
3266
|
-
chat: chat?.map((line2) => ({
|
|
3267
|
-
externalId: null,
|
|
3268
|
-
sentAt: timestamp2(line2.sentAt),
|
|
3269
|
-
senderParticipantPosition: speakerPosition(line2.sender, participants),
|
|
3270
|
-
senderName: line2.sender,
|
|
3271
|
-
recipient: null,
|
|
3272
|
-
text: line2.text,
|
|
3273
|
-
normalizedText: null,
|
|
3274
|
-
metadata: null
|
|
3275
|
-
})),
|
|
3276
|
-
summaries: summary ? [
|
|
3277
|
-
{
|
|
3278
|
-
...summary,
|
|
3279
|
-
source: summary.source ?? source.name,
|
|
3280
|
-
content: summary.content ?? null,
|
|
3281
|
-
docUrl: summary.docUrl ?? null,
|
|
3282
|
-
externalCreatedAt: summary.externalCreatedAt ?? null,
|
|
3283
|
-
externalUpdatedAt: summary.externalUpdatedAt ?? null,
|
|
3284
|
-
metadata: summary.metadata ?? null
|
|
3285
|
-
}
|
|
3286
|
-
] : void 0,
|
|
3287
|
-
attachments: attachments ?? void 0,
|
|
3288
|
-
documents: documents ?? void 0,
|
|
3289
|
-
now
|
|
3290
|
-
});
|
|
3291
|
-
if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
|
|
3292
|
-
await store.saveMeeting({
|
|
3293
|
-
meeting: meeting2,
|
|
3294
|
-
transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
|
|
3295
|
-
unlinked`, format)],
|
|
3296
|
-
now
|
|
3297
|
-
});
|
|
3298
|
-
await linkEvent(store, details, now, { create: source.createsEvents !== false });
|
|
3377
|
+
await saveSourceMeeting(source, store, m, { participants: sourceParticipants, transcript: lines, chat, summary, files: attachments, documents }, { accountId: options.accountId, now });
|
|
3299
3378
|
for (const p of participants)
|
|
3300
3379
|
if (p.identity.phone)
|
|
3301
3380
|
callers.add(p.identity.externalId);
|
|
@@ -3314,7 +3393,7 @@ unlinked`, format)],
|
|
|
3314
3393
|
return report;
|
|
3315
3394
|
}, "pull");
|
|
3316
3395
|
|
|
3317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
3318
3397
|
var text3 = string();
|
|
3319
3398
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
3320
3399
|
var id2 = pipe(number(), integer(), minValue(1));
|
|
@@ -3509,10 +3588,291 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3509
3588
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3510
3589
|
}), "eventItem");
|
|
3511
3590
|
|
|
3512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
|
|
3592
|
+
var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
|
|
3593
|
+
var ISSUES = {
|
|
3594
|
+
offline: ["permission_error", "meetings.server-offline"],
|
|
3595
|
+
unreachable: ["network_error", "meetings.server-unreachable"],
|
|
3596
|
+
not_signed_in: ["authentication_error", "meetings.server-signed-out"],
|
|
3597
|
+
refused: ["permission_error", "meetings.server-refused"],
|
|
3598
|
+
failed: ["provider_error", "meetings.server-failed"]
|
|
3599
|
+
};
|
|
3600
|
+
var metaOf = /* @__PURE__ */ __name((reason, provider) => {
|
|
3601
|
+
const issue = ISSUES[reason];
|
|
3602
|
+
return issue && { complete: false, issues: [{ code: issue[0], reason: issue[1], source: provider }] };
|
|
3603
|
+
}, "metaOf");
|
|
3604
|
+
var WHY = {
|
|
3605
|
+
unsupported: /* @__PURE__ */ __name((provider) => `${provider} cannot be asked for meetings here \u2014 the answer is the store's`, "unsupported"),
|
|
3606
|
+
offline: /* @__PURE__ */ __name(() => "--offline: the service was not asked \u2014 the answer is the store's", "offline"),
|
|
3607
|
+
unreachable: /* @__PURE__ */ __name((provider) => `${provider} could not be reached \u2014 the answer is the store's`, "unreachable"),
|
|
3608
|
+
not_signed_in: /* @__PURE__ */ __name((provider) => `not signed in to ${provider} \u2014 the answer is the store's`, "not_signed_in"),
|
|
3609
|
+
refused: /* @__PURE__ */ __name((provider) => `${provider} refused the request \u2014 the answer is the store's`, "refused"),
|
|
3610
|
+
failed: /* @__PURE__ */ __name((provider) => `${provider} could not be read \u2014 the answer is the store's`, "failed"),
|
|
3611
|
+
no_upcoming: /* @__PURE__ */ __name((provider) => `${provider} lists no meeting before it starts \u2014 upcoming ones are not in the answer`, "no_upcoming")
|
|
3612
|
+
};
|
|
3613
|
+
var reasonOf = /* @__PURE__ */ __name((error) => {
|
|
3614
|
+
const code = error instanceof CliError ? error.code : void 0;
|
|
3615
|
+
if (code === "authentication_error")
|
|
3616
|
+
return "not_signed_in";
|
|
3617
|
+
if (code === "permission_error")
|
|
3618
|
+
return "refused";
|
|
3619
|
+
if (code === "network_error")
|
|
3620
|
+
return "unreachable";
|
|
3621
|
+
return "failed";
|
|
3622
|
+
}, "reasonOf");
|
|
3623
|
+
var refusal = /* @__PURE__ */ __name((reason, provider, error) => error ?? new CliError("validation_error", `--backend server: ${WHY[reason](provider).replace(/ — .*$/, "")}; use --backend archive or both`, { reason }), "refusal");
|
|
3624
|
+
var within = /* @__PURE__ */ __name((one, other) => {
|
|
3625
|
+
const from = Math.max(one.from ?? -Infinity, other.from ?? -Infinity);
|
|
3626
|
+
const to = Math.min(one.to ?? Infinity, other.to ?? Infinity);
|
|
3627
|
+
if (from > to)
|
|
3628
|
+
return void 0;
|
|
3629
|
+
return { ...Number.isFinite(from) ? { from } : {}, ...Number.isFinite(to) ? { to } : {} };
|
|
3630
|
+
}, "within");
|
|
3631
|
+
var findsOf = /* @__PURE__ */ __name((source, zone, now) => ({
|
|
3632
|
+
fields: { ...source.finds.fields, started_at: ["term", "range"] },
|
|
3633
|
+
negatable: source.finds.negatable?.filter((field) => field !== "started_at") ?? [],
|
|
3634
|
+
maxCalls: MEETING_SERVER_BOUNDS.calls,
|
|
3635
|
+
all: { window: {}, terms: [] },
|
|
3636
|
+
leaf: /* @__PURE__ */ __name((predicate, negated) => predicate.field === "started_at" ? { window: windowOf(rangeOf(predicate, zone, now)), terms: [] } : { window: {}, terms: [{ predicate, negated }] }, "leaf"),
|
|
3637
|
+
both: /* @__PURE__ */ __name((one, other) => {
|
|
3638
|
+
const window = within(one.window, other.window);
|
|
3639
|
+
return window && { window, terms: [...one.terms, ...other.terms] };
|
|
3640
|
+
}, "both")
|
|
3641
|
+
}), "findsOf");
|
|
3642
|
+
var reachesFuture = /* @__PURE__ */ __name(({ to }, now) => to === void 0 || to > now, "reachesFuture");
|
|
3643
|
+
var storedByExternalId = /* @__PURE__ */ __name(async (store, accountId, externalId) => {
|
|
3644
|
+
if (store.meetingByExternalId)
|
|
3645
|
+
return store.meetingByExternalId(accountId, externalId);
|
|
3646
|
+
const span = { start: 0, end: 0 };
|
|
3647
|
+
const query = {
|
|
3648
|
+
version: 1,
|
|
3649
|
+
language: "lucene-v1",
|
|
3650
|
+
root: { kind: "predicate", field: "provider_id", operator: "term", value: externalId, span }
|
|
3651
|
+
};
|
|
3652
|
+
const [row] = await store.meetings({ accountId, query, includeDeleted: true, limit: 1 });
|
|
3653
|
+
return row ? store.meeting(row.id) : null;
|
|
3654
|
+
}, "storedByExternalId");
|
|
3655
|
+
var peopleKey = /* @__PURE__ */ __name((people) => JSON.stringify(people.map(({ email, displayName }) => [email ?? "", displayName ?? ""]).sort()), "peopleKey");
|
|
3656
|
+
var unchanged = /* @__PURE__ */ __name((found, stored, accountId) => {
|
|
3657
|
+
const participants = found.participants;
|
|
3658
|
+
const input = sourceMeetingInput(found.meeting, accountId, participants === void 0 ? void 0 : participants?.length ?? null, stored.meeting);
|
|
3659
|
+
const row = stored.meeting;
|
|
3660
|
+
return row.deletedAt === null && input.title === row.title && input.description === row.description && input.location === row.location && input.joinUrl === row.joinUrl && input.startedAt === row.startedAt && input.endedAt === row.endedAt && input.timezone === row.timezone && JSON.stringify(input.metadata ?? null) === JSON.stringify(row.metadata ?? null) && (input.series === void 0 || input.series.externalId === stored.series?.externalId && input.series.title === stored.series.title) && (participants == null || row.participantsCount === participants.length && peopleKey(participants) === peopleKey(stored.participants));
|
|
3661
|
+
}, "unchanged");
|
|
3662
|
+
var stepFor = /* @__PURE__ */ __name((backend) => ({
|
|
3663
|
+
report: {
|
|
3664
|
+
backend: backend === "server" ? "server" : "both",
|
|
3665
|
+
skipped: null,
|
|
3666
|
+
calls: 0,
|
|
3667
|
+
returned: 0,
|
|
3668
|
+
new: 0,
|
|
3669
|
+
failed: 0,
|
|
3670
|
+
complete: true
|
|
3671
|
+
},
|
|
3672
|
+
found: /* @__PURE__ */ new Map(),
|
|
3673
|
+
missing: []
|
|
3674
|
+
}), "stepFor");
|
|
3675
|
+
var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found, parts2, fresh = false) => {
|
|
3676
|
+
const stored = await storedByExternalId(store, accountId, found.meeting.occurrence.id);
|
|
3677
|
+
const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting, parts2, {
|
|
3678
|
+
accountId,
|
|
3679
|
+
now,
|
|
3680
|
+
...stored ? { kept: stored.meeting } : {}
|
|
3681
|
+
});
|
|
3682
|
+
step.found.set(details.meeting.id, stored ? "both" : "server");
|
|
3683
|
+
step.report.returned += 1;
|
|
3684
|
+
if (!stored)
|
|
3685
|
+
step.report.new += 1;
|
|
3686
|
+
return details;
|
|
3687
|
+
}, "keep");
|
|
3688
|
+
var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, query, access) => {
|
|
3689
|
+
const backend = access.backend ?? "both";
|
|
3690
|
+
if (backend === "archive")
|
|
3691
|
+
return void 0;
|
|
3692
|
+
const step = stepFor(backend);
|
|
3693
|
+
const provider = source?.name ?? "the service";
|
|
3694
|
+
const skip = /* @__PURE__ */ __name((reason, error) => {
|
|
3695
|
+
if (backend === "server")
|
|
3696
|
+
throw refusal(reason, provider, error);
|
|
3697
|
+
step.report.skipped = reason;
|
|
3698
|
+
step.report.complete = false;
|
|
3699
|
+
step.missing.push({ field: "server", why: WHY[reason](provider) });
|
|
3700
|
+
const meta = metaOf(reason, provider);
|
|
3701
|
+
if (meta)
|
|
3702
|
+
step.meta = meta;
|
|
3703
|
+
return step;
|
|
3704
|
+
}, "skip");
|
|
3705
|
+
if (!source?.find || !source.finds)
|
|
3706
|
+
return skip("unsupported");
|
|
3707
|
+
if (access.offline)
|
|
3708
|
+
return skip("offline");
|
|
3709
|
+
const now = access.now ?? Date.now();
|
|
3710
|
+
const finds = source.finds;
|
|
3711
|
+
const capability = findsOf({ ...source, finds }, timezoneOf(access.timezone), now);
|
|
3712
|
+
const { calls, complete } = query ? serviceCallsOf(query.root, capability) : { calls: [capability.all], complete: true };
|
|
3713
|
+
let capped = !complete;
|
|
3714
|
+
let asked = calls;
|
|
3715
|
+
if (finds.upcoming === false) {
|
|
3716
|
+
if (calls.some(({ window }) => reachesFuture(window, now)))
|
|
3717
|
+
step.missing.push({ field: "upcoming", why: WHY.no_upcoming(provider) });
|
|
3718
|
+
asked = calls.flatMap((call) => {
|
|
3719
|
+
const window = within(call.window, { to: now });
|
|
3720
|
+
return window ? [{ ...call, window }] : [];
|
|
3721
|
+
});
|
|
3722
|
+
if (!asked.length)
|
|
3723
|
+
return skip("no_upcoming");
|
|
3724
|
+
}
|
|
3725
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3726
|
+
let failure;
|
|
3727
|
+
for (const call of asked) {
|
|
3728
|
+
let cursor = null;
|
|
3729
|
+
for (let page = 0; page < MEETING_SERVER_BOUNDS.pages; page++) {
|
|
3730
|
+
step.report.calls += 1;
|
|
3731
|
+
let answer;
|
|
3732
|
+
try {
|
|
3733
|
+
answer = await source.find(call.window, call.terms, cursor);
|
|
3734
|
+
} catch (error) {
|
|
3735
|
+
return skip(reasonOf(error), error);
|
|
3736
|
+
}
|
|
3737
|
+
for (const found of answer.meetings) {
|
|
3738
|
+
if (seen.has(found.meeting.occurrence.id))
|
|
3739
|
+
continue;
|
|
3740
|
+
seen.add(found.meeting.occurrence.id);
|
|
3741
|
+
try {
|
|
3742
|
+
await keep(source, store, accountId, now, step, found, { participants: found.participants });
|
|
3743
|
+
} catch (error) {
|
|
3744
|
+
step.report.failed += 1;
|
|
3745
|
+
failure ??= error;
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
cursor = answer.next;
|
|
3749
|
+
if (cursor === null)
|
|
3750
|
+
break;
|
|
3751
|
+
if (page === MEETING_SERVER_BOUNDS.pages - 1)
|
|
3752
|
+
capped = true;
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3755
|
+
const issues = [];
|
|
3756
|
+
if (step.report.failed) {
|
|
3757
|
+
issues.push({
|
|
3758
|
+
code: failure instanceof CliError ? failure.code : "provider_error",
|
|
3759
|
+
reason: "meetings.server-failed",
|
|
3760
|
+
source: provider
|
|
3761
|
+
});
|
|
3762
|
+
const why = failure instanceof Error ? `: ${failure.message}` : "";
|
|
3763
|
+
step.missing.push({
|
|
3764
|
+
field: "server",
|
|
3765
|
+
why: `${step.report.failed} meeting(s) ${provider} returned could not be kept${why} \u2014 the answer is without them`
|
|
3766
|
+
});
|
|
3767
|
+
}
|
|
3768
|
+
if (capped) {
|
|
3769
|
+
issues.push({ code: "outcome_unknown", reason: "meetings.server-capped", source: provider });
|
|
3770
|
+
const { calls: calls2, returned } = step.report;
|
|
3771
|
+
step.missing.push({
|
|
3772
|
+
field: "server",
|
|
3773
|
+
why: `${provider} was asked ${calls2} time(s) and returned ${returned} meeting(s), not every one that may match \u2014 narrow the query by started_at`
|
|
3774
|
+
});
|
|
3775
|
+
}
|
|
3776
|
+
if (issues.length) {
|
|
3777
|
+
step.report.complete = false;
|
|
3778
|
+
step.meta = { complete: false, issues };
|
|
3779
|
+
}
|
|
3780
|
+
return step;
|
|
3781
|
+
}, "askServerForList");
|
|
3782
|
+
var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
|
|
3783
|
+
const now = access.now ?? Date.now();
|
|
3784
|
+
const zoned = { ...filter, timezone: timezoneOf(access.timezone), now };
|
|
3785
|
+
const step = await askServerForList(source, store, filter.accountId, filter.query, { ...access, now });
|
|
3786
|
+
if (!step)
|
|
3787
|
+
return meetingsList(store, zoned);
|
|
3788
|
+
const extras = {
|
|
3789
|
+
server: step.report,
|
|
3790
|
+
...step.missing.length ? { missing: step.missing } : {},
|
|
3791
|
+
...step.meta ? { meta: step.meta } : {}
|
|
3792
|
+
};
|
|
3793
|
+
const ids2 = [...step.found.keys()];
|
|
3794
|
+
if (access.backend === "server" && !ids2.length)
|
|
3795
|
+
return { items: [], page: { mode: "page", limit: filter.limit ?? 100, has_more: false }, ...extras };
|
|
3796
|
+
const list = await meetingsList(store, access.backend === "server" ? { ...zoned, ids: ids2 } : zoned);
|
|
3797
|
+
return {
|
|
3798
|
+
...list,
|
|
3799
|
+
items: list.items.map((item) => ({ ...item, found_in: step.found.get(Number(item.id)) ?? "archive" })),
|
|
3800
|
+
...extras
|
|
3801
|
+
};
|
|
3802
|
+
}, "meetingsListThrough");
|
|
3803
|
+
var storedMeeting = /* @__PURE__ */ __name(async (store, accountId, meeting2) => {
|
|
3804
|
+
const text6 = meeting2.trim();
|
|
3805
|
+
const own = /* @__PURE__ */ __name((details) => details?.meeting.accountId === accountId ? details : null, "own");
|
|
3806
|
+
if (/^[1-9]\d*$/.test(text6) && Number.isSafeInteger(Number(text6))) {
|
|
3807
|
+
const byNumber = own(await store.meeting(Number(text6)));
|
|
3808
|
+
if (byNumber)
|
|
3809
|
+
return byNumber;
|
|
3810
|
+
}
|
|
3811
|
+
if (text6.startsWith("meeting:")) {
|
|
3812
|
+
const reference2 = parseMeetingReference(text6);
|
|
3813
|
+
if (reference2.accountId !== accountId)
|
|
3814
|
+
throw new MeetingError("not_found", "meeting not found");
|
|
3815
|
+
return own(await store.meeting(reference2.meetingId));
|
|
3816
|
+
}
|
|
3817
|
+
return store.meetingByExternalId ? own(await store.meetingByExternalId(accountId, text6)) : null;
|
|
3818
|
+
}, "storedMeeting");
|
|
3819
|
+
var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId, meeting2, access) => {
|
|
3820
|
+
if (!meeting2.trim())
|
|
3821
|
+
throw new MeetingError("validation_error", "name a meeting");
|
|
3822
|
+
const stored = await storedMeeting(store, accountId, meeting2);
|
|
3823
|
+
const backend = access.backend ?? "both";
|
|
3824
|
+
const notFound = /* @__PURE__ */ __name(() => new MeetingError("not_found", "meeting not found"), "notFound");
|
|
3825
|
+
if (backend === "archive") {
|
|
3826
|
+
if (!stored)
|
|
3827
|
+
throw notFound();
|
|
3828
|
+
return { details: stored };
|
|
3829
|
+
}
|
|
3830
|
+
const step = stepFor(backend);
|
|
3831
|
+
const provider = source?.name ?? "the service";
|
|
3832
|
+
const fromStore = /* @__PURE__ */ __name((reason, error) => {
|
|
3833
|
+
if (backend === "server")
|
|
3834
|
+
throw refusal(reason, provider, error);
|
|
3835
|
+
if (!stored)
|
|
3836
|
+
throw error instanceof CliError && reason !== "failed" ? error : notFound();
|
|
3837
|
+
step.report.skipped = reason;
|
|
3838
|
+
step.report.complete = false;
|
|
3839
|
+
const meta = metaOf(reason, provider);
|
|
3840
|
+
return {
|
|
3841
|
+
details: stored,
|
|
3842
|
+
foundIn: "archive",
|
|
3843
|
+
server: step.report,
|
|
3844
|
+
missing: [{ field: "server", why: WHY[reason](provider) }],
|
|
3845
|
+
...meta ? { meta } : {}
|
|
3846
|
+
};
|
|
3847
|
+
}, "fromStore");
|
|
3848
|
+
const providerId = stored?.meeting.externalId ?? (meeting2.trim().startsWith("meeting:") ? void 0 : meeting2.trim());
|
|
3849
|
+
if (providerId === void 0)
|
|
3850
|
+
throw notFound();
|
|
3851
|
+
if (!source?.get)
|
|
3852
|
+
return fromStore("unsupported");
|
|
3853
|
+
if (access.offline)
|
|
3854
|
+
return fromStore("offline");
|
|
3855
|
+
step.report.calls = 1;
|
|
3856
|
+
let full;
|
|
3857
|
+
try {
|
|
3858
|
+
full = await source.get(providerId);
|
|
3859
|
+
} catch (error) {
|
|
3860
|
+
return fromStore(reasonOf(error), error);
|
|
3861
|
+
}
|
|
3862
|
+
if (!full) {
|
|
3863
|
+
if (!stored || backend === "server")
|
|
3864
|
+
throw notFound();
|
|
3865
|
+
return { details: stored, foundIn: "archive", server: step.report };
|
|
3866
|
+
}
|
|
3867
|
+
const details = await keep(source, store, accountId, access.now ?? Date.now(), step, full, { participants: full.participants, transcript: full.transcript, documents: full.documents }, true);
|
|
3868
|
+
const fresh = await store.meeting(details.meeting.id) ?? details;
|
|
3869
|
+
return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
|
|
3870
|
+
}, "meetingShowThrough");
|
|
3871
|
+
|
|
3872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
3513
3873
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
3514
3874
|
|
|
3515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
3516
3876
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
3517
3877
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3518
3878
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -3542,7 +3902,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3542
3902
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
3543
3903
|
}, "validateMeetingRelatedHistory");
|
|
3544
3904
|
|
|
3545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
3546
3906
|
var text4 = string();
|
|
3547
3907
|
var identifier = pipe(text4, minLength(1));
|
|
3548
3908
|
var nullableText = nullable(text4);
|
|
@@ -3667,7 +4027,37 @@ var repair = strictObject({
|
|
|
3667
4027
|
transcripts: count5,
|
|
3668
4028
|
languages: array(strictObject({ language: nullableText, transcripts: count5 }))
|
|
3669
4029
|
});
|
|
4030
|
+
var kind = picklist(["instant", "scheduled"]);
|
|
4031
|
+
var managedChange = strictObject({
|
|
4032
|
+
action: picklist(["create", "update", "cancel"]),
|
|
4033
|
+
provider: text4,
|
|
4034
|
+
account: text4,
|
|
4035
|
+
id: optional(identifier),
|
|
4036
|
+
occurrence_id: optional(identifier),
|
|
4037
|
+
change: optional(strictObject({
|
|
4038
|
+
title: optional(text4),
|
|
4039
|
+
kind: optional(kind),
|
|
4040
|
+
start_time: optional(text4),
|
|
4041
|
+
duration_minutes: optional(count5),
|
|
4042
|
+
timezone: optional(text4),
|
|
4043
|
+
agenda: optional(text4)
|
|
4044
|
+
})),
|
|
4045
|
+
applied: flag,
|
|
4046
|
+
meeting: optional(strictObject({
|
|
4047
|
+
id: identifier,
|
|
4048
|
+
title: nullableText,
|
|
4049
|
+
kind: nullable(kind),
|
|
4050
|
+
start_time: nullableText,
|
|
4051
|
+
duration_minutes: nullable(count5),
|
|
4052
|
+
timezone: nullableText,
|
|
4053
|
+
agenda: nullableText,
|
|
4054
|
+
join_url: nullableText
|
|
4055
|
+
}))
|
|
4056
|
+
});
|
|
4057
|
+
var invitation = strictObject({ id: identifier, invitation: text4, untrusted: optional(array(text4)) });
|
|
3670
4058
|
var MEETING_RESULT_ENTITIES = {
|
|
4059
|
+
meeting_change: managedChange,
|
|
4060
|
+
meeting_invitation: invitation,
|
|
3671
4061
|
meeting_ingestion: run,
|
|
3672
4062
|
meeting_export: exported,
|
|
3673
4063
|
meeting_association: meetingChange,
|
|
@@ -3676,14 +4066,14 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
3676
4066
|
meeting_repair: repair
|
|
3677
4067
|
};
|
|
3678
4068
|
|
|
3679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
3680
4070
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
3681
4071
|
|
|
3682
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3683
4073
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3684
4074
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3685
4075
|
|
|
3686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3687
4077
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3688
4078
|
input.signal?.throwIfAborted();
|
|
3689
4079
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3704,10 +4094,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3704
4094
|
return { ...input, limit, maxReadBytes };
|
|
3705
4095
|
}, "validateMeetingSeriesHistory");
|
|
3706
4096
|
|
|
3707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3708
4098
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
3709
4099
|
|
|
3710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3711
4101
|
function invalid4(field, response = false) {
|
|
3712
4102
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3713
4103
|
}
|
|
@@ -3723,11 +4113,11 @@ var cursorDetails = /* @__PURE__ */ __name((value) => {
|
|
|
3723
4113
|
if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
|
|
3724
4114
|
invalid4("cursor");
|
|
3725
4115
|
try {
|
|
3726
|
-
const
|
|
3727
|
-
object2(
|
|
3728
|
-
if (
|
|
4116
|
+
const decoded2 = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
|
|
4117
|
+
object2(decoded2, ["version", "selection", "cursor"], "cursor");
|
|
4118
|
+
if (decoded2.version !== 1 || typeof decoded2.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded2.selection) || !occurrenceId(decoded2.cursor))
|
|
3729
4119
|
invalid4("cursor");
|
|
3730
|
-
return
|
|
4120
|
+
return decoded2;
|
|
3731
4121
|
} catch {
|
|
3732
4122
|
return invalid4("cursor");
|
|
3733
4123
|
}
|
|
@@ -3736,7 +4126,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3736
4126
|
cursorDetails(value);
|
|
3737
4127
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3738
4128
|
|
|
3739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
3740
4130
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
3741
4131
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3742
4132
|
const zone = timeZone ?? "UTC";
|
|
@@ -3871,14 +4261,14 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
3871
4261
|
};
|
|
3872
4262
|
}, "aggregateMeetingStats");
|
|
3873
4263
|
|
|
3874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
3875
4265
|
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
3876
4266
|
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
3877
4267
|
var ERASED_TEXT = "[source erased]";
|
|
3878
4268
|
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
3879
4269
|
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
3880
4270
|
|
|
3881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
3882
4272
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
3883
4273
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
3884
4274
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -3893,7 +4283,7 @@ function closeTask(task, state, by, at, reason) {
|
|
|
3893
4283
|
}
|
|
3894
4284
|
__name(closeTask, "closeTask");
|
|
3895
4285
|
|
|
3896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
3897
4287
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
3898
4288
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
3899
4289
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -3922,7 +4312,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
3922
4312
|
}, "priorityOf");
|
|
3923
4313
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
3924
4314
|
|
|
3925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
3926
4316
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
3927
4317
|
async function find(id4) {
|
|
3928
4318
|
const task = await store.get(id4);
|
|
@@ -3982,13 +4372,13 @@ function median(values) {
|
|
|
3982
4372
|
}
|
|
3983
4373
|
__name(median, "median");
|
|
3984
4374
|
|
|
3985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
3986
4376
|
function matches2(task, filter) {
|
|
3987
4377
|
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);
|
|
3988
4378
|
}
|
|
3989
4379
|
__name(matches2, "matches");
|
|
3990
4380
|
|
|
3991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
3992
4382
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
3993
4383
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
3994
4384
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -3996,7 +4386,7 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
3996
4386
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
3997
4387
|
var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
3998
4388
|
|
|
3999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
4000
4390
|
var text5 = string();
|
|
4001
4391
|
var id3 = pipe(string(), minLength(1));
|
|
4002
4392
|
var time = isoTime;
|
|
@@ -4021,7 +4411,7 @@ var author = strictObject({
|
|
|
4021
4411
|
name: nullable(text5)
|
|
4022
4412
|
});
|
|
4023
4413
|
|
|
4024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
4025
4415
|
var organization = strictObject({
|
|
4026
4416
|
id: id3,
|
|
4027
4417
|
ref: reference,
|
|
@@ -4051,7 +4441,7 @@ var reminder = strictObject({
|
|
|
4051
4441
|
receipt: nullable(text5)
|
|
4052
4442
|
});
|
|
4053
4443
|
|
|
4054
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
4055
4445
|
var CURRENCY_SCALES = {
|
|
4056
4446
|
AED: 2,
|
|
4057
4447
|
AMD: 2,
|
|
@@ -4145,7 +4535,7 @@ var quantityOf = /* @__PURE__ */ __name((text6) => {
|
|
|
4145
4535
|
}, "quantityOf");
|
|
4146
4536
|
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
4147
4537
|
|
|
4148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
4149
4539
|
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
4150
4540
|
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
4151
4541
|
var MONEY_DIRECTIONS = ["in", "out"];
|
|
@@ -4174,7 +4564,7 @@ var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
|
4174
4564
|
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
4175
4565
|
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
4176
4566
|
|
|
4177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/business.js
|
|
4178
4568
|
var CATALOG_KINDS = ["product", "service"];
|
|
4179
4569
|
var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
|
|
4180
4570
|
var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
|
|
@@ -4202,7 +4592,7 @@ var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.
|
|
|
4202
4592
|
var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
|
|
4203
4593
|
var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
|
|
4204
4594
|
|
|
4205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
4206
4596
|
import { readFileSync as readFileSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
4207
4597
|
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
4208
4598
|
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
@@ -4323,7 +4713,7 @@ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, sch
|
|
|
4323
4713
|
return { previous, cleared };
|
|
4324
4714
|
}, "recordDeepCheck");
|
|
4325
4715
|
|
|
4326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
4327
4717
|
var DEAL_KINDS = ["deal", "lead"];
|
|
4328
4718
|
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
4329
4719
|
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
@@ -4333,7 +4723,7 @@ var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
|
4333
4723
|
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
4334
4724
|
}, "dealLine");
|
|
4335
4725
|
|
|
4336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
4337
4727
|
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
4338
4728
|
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
4339
4729
|
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
@@ -4344,7 +4734,7 @@ var orderLine = /* @__PURE__ */ __name((order) => {
|
|
|
4344
4734
|
}, "orderLine");
|
|
4345
4735
|
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
4346
4736
|
|
|
4347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
4348
4738
|
var ORGANIZATION_ROLES = [
|
|
4349
4739
|
"employee",
|
|
4350
4740
|
"contractor",
|
|
@@ -4359,8 +4749,8 @@ var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
|
|
|
4359
4749
|
var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
|
|
4360
4750
|
var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
|
|
4361
4751
|
var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
|
|
4362
|
-
var checkEngagement = /* @__PURE__ */ __name((
|
|
4363
|
-
if (
|
|
4752
|
+
var checkEngagement = /* @__PURE__ */ __name((kind3, from, to, level) => {
|
|
4753
|
+
if (kind3 !== "member-of" || from !== "person" || to !== "project")
|
|
4364
4754
|
throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
|
|
4365
4755
|
reason: "relationship.engagement-ends"
|
|
4366
4756
|
});
|
|
@@ -4386,26 +4776,26 @@ var RELATIONS = {
|
|
|
4386
4776
|
}
|
|
4387
4777
|
};
|
|
4388
4778
|
var RELATION_KINDS = Object.keys(RELATIONS);
|
|
4389
|
-
var specOf = /* @__PURE__ */ __name((
|
|
4390
|
-
var isRelationKind = /* @__PURE__ */ __name((
|
|
4779
|
+
var specOf = /* @__PURE__ */ __name((kind3) => Object.hasOwn(RELATIONS, kind3) ? RELATIONS[kind3] : void 0, "specOf");
|
|
4780
|
+
var isRelationKind = /* @__PURE__ */ __name((kind3) => specOf(kind3) !== void 0, "isRelationKind");
|
|
4391
4781
|
var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
|
|
4392
4782
|
var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
|
|
4393
|
-
var checkEnds = /* @__PURE__ */ __name((
|
|
4394
|
-
const spec = specOf(
|
|
4783
|
+
var checkEnds = /* @__PURE__ */ __name((kind3, from, to) => {
|
|
4784
|
+
const spec = specOf(kind3);
|
|
4395
4785
|
if (!spec)
|
|
4396
4786
|
throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
|
|
4397
|
-
if (memberOnly(from) && (
|
|
4787
|
+
if (memberOnly(from) && (kind3 !== "member-of" || to !== "project"))
|
|
4398
4788
|
throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
|
|
4399
4789
|
if (partyOnly(from, to))
|
|
4400
4790
|
throw new CliError("validation_error", "a contract is related only to a person or an organization");
|
|
4401
4791
|
if (!spec.from.includes(from) || !spec.to.includes(to))
|
|
4402
|
-
throw new CliError("validation_error", `${
|
|
4792
|
+
throw new CliError("validation_error", `${kind3} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
|
|
4403
4793
|
return spec;
|
|
4404
4794
|
}, "checkEnds");
|
|
4405
4795
|
var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
|
|
4406
|
-
var rolesOf = /* @__PURE__ */ __name((
|
|
4407
|
-
const spec = specOf(
|
|
4408
|
-
if (
|
|
4796
|
+
var rolesOf = /* @__PURE__ */ __name((kind3, from, to) => {
|
|
4797
|
+
const spec = specOf(kind3);
|
|
4798
|
+
if (kind3 === "member-of" && from !== "person")
|
|
4409
4799
|
return void 0;
|
|
4410
4800
|
return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
|
|
4411
4801
|
}, "rolesOf");
|
|
@@ -4416,22 +4806,22 @@ var ROLE_LISTS = {
|
|
|
4416
4806
|
contract: CONTRACT_ROLES,
|
|
4417
4807
|
related: RELATED_ROLES
|
|
4418
4808
|
};
|
|
4419
|
-
var roleListOf = /* @__PURE__ */ __name((
|
|
4420
|
-
if (
|
|
4809
|
+
var roleListOf = /* @__PURE__ */ __name((kind3, from, to) => {
|
|
4810
|
+
if (kind3 === "related-to" && isParty(from) && isParty(to))
|
|
4421
4811
|
return "related";
|
|
4422
|
-
const roles = rolesOf(
|
|
4812
|
+
const roles = rolesOf(kind3, from, to);
|
|
4423
4813
|
return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
|
|
4424
4814
|
}, "roleListOf");
|
|
4425
|
-
var checkRole = /* @__PURE__ */ __name((
|
|
4426
|
-
const roles = rolesOf(
|
|
4815
|
+
var checkRole = /* @__PURE__ */ __name((kind3, from, to, role, extra = []) => {
|
|
4816
|
+
const roles = rolesOf(kind3, from, to)?.concat(extra);
|
|
4427
4817
|
if (roles && !roles.includes(role))
|
|
4428
|
-
throw new CliError("validation_error", `a ${from}'s role on ${
|
|
4818
|
+
throw new CliError("validation_error", `a ${from}'s role on ${kind3} ${to} is one of ${roles.join(", ")}`, {
|
|
4429
4819
|
reason: "relationship.role-unknown"
|
|
4430
4820
|
});
|
|
4431
4821
|
return role;
|
|
4432
4822
|
}, "checkRole");
|
|
4433
|
-
var isSymmetric = /* @__PURE__ */ __name((
|
|
4434
|
-
var inverseOf = /* @__PURE__ */ __name((
|
|
4823
|
+
var isSymmetric = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric === true, "isSymmetric");
|
|
4824
|
+
var inverseOf = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric ? kind3 : specOf(kind3)?.inverse ?? null, "inverseOf");
|
|
4435
4825
|
var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
|
|
4436
4826
|
var standingOf = /* @__PURE__ */ __name((link, now) => {
|
|
4437
4827
|
if (link.endsAt != null && link.endsAt <= now)
|
|
@@ -4447,16 +4837,16 @@ var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'p
|
|
|
4447
4837
|
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
|
|
4448
4838
|
var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
|
|
4449
4839
|
|
|
4450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
4451
4841
|
var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
|
|
4452
4842
|
var isCrmUserId = /* @__PURE__ */ __name((id4) => /^\d{1,20}$/.test(id4), "isCrmUserId");
|
|
4453
4843
|
var normalCrmUserId = /* @__PURE__ */ __name((id4) => {
|
|
4454
4844
|
const text6 = id4.trim();
|
|
4455
4845
|
return /^\d+$/.test(text6) ? text6.replace(/^0+(?=\d)/, "") : text6;
|
|
4456
4846
|
}, "normalCrmUserId");
|
|
4457
|
-
var isItemKind = /* @__PURE__ */ __name((
|
|
4847
|
+
var isItemKind = /* @__PURE__ */ __name((kind3) => kind3 === "deal" || kind3 === "lead", "isItemKind");
|
|
4458
4848
|
|
|
4459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
4460
4850
|
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
4461
4851
|
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
4462
4852
|
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
@@ -4470,7 +4860,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
|
4470
4860
|
return tag;
|
|
4471
4861
|
}, "normalizeTag");
|
|
4472
4862
|
|
|
4473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
|
|
4474
4864
|
var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
|
|
4475
4865
|
var sourceOf = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
4476
4866
|
const reporter = row.account_id == null ? void 0 : "reporter" in row ? row.reporter : database.prepare("SELECT provider || ':' || external_id AS key FROM accounts WHERE id = ?").get(Number(row.account_id))?.key;
|
|
@@ -4480,7 +4870,7 @@ var sourceOf = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
|
4480
4870
|
};
|
|
4481
4871
|
}, "sourceOf");
|
|
4482
4872
|
|
|
4483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
4484
4874
|
var LINK_KINDS = [
|
|
4485
4875
|
"links-to",
|
|
4486
4876
|
"blocked-by",
|
|
@@ -4501,24 +4891,31 @@ var LINK_KINDS = [
|
|
|
4501
4891
|
];
|
|
4502
4892
|
var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
|
|
4503
4893
|
var LINK_SOURCES = [...LINK_ORIGINS, "calendar", "meeting"];
|
|
4504
|
-
var linkKind = /* @__PURE__ */ __name((
|
|
4894
|
+
var linkKind = /* @__PURE__ */ __name((kind3) => `'${kind3}'`, "linkKind");
|
|
4505
4895
|
var COUNTERPART_ROLE = "counterpart";
|
|
4506
4896
|
|
|
4507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
4508
4898
|
var SCHEME = "msg:";
|
|
4509
4899
|
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
4510
4900
|
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
4511
4901
|
var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
4512
4902
|
const trimmed = reference2.trim();
|
|
4513
4903
|
const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
const
|
|
4904
|
+
const malformed2 = /* @__PURE__ */ __name(() => new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`), "malformed");
|
|
4905
|
+
if (parts2.length !== 4 || parts2.some((part) => part === ""))
|
|
4906
|
+
throw malformed2();
|
|
4907
|
+
const decoded2 = /* @__PURE__ */ __name((part) => {
|
|
4908
|
+
try {
|
|
4909
|
+
return decodeURIComponent(part);
|
|
4910
|
+
} catch {
|
|
4911
|
+
throw malformed2();
|
|
4912
|
+
}
|
|
4913
|
+
}, "decoded");
|
|
4914
|
+
const [provider, account, chat, message] = parts2.map(decoded2);
|
|
4518
4915
|
return { provider, account, chat, message };
|
|
4519
4916
|
}, "parseLocator");
|
|
4520
4917
|
|
|
4521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
4522
4919
|
var SIMPLE_REFERENCES = [
|
|
4523
4920
|
"note",
|
|
4524
4921
|
"document",
|
|
@@ -4546,11 +4943,18 @@ var SIMPLE_REFERENCES = [
|
|
|
4546
4943
|
var malformed = /* @__PURE__ */ __name((text6, shape) => new CliError("validation_error", `"${singleLine(text6)}" is not a reference \u2014 expected ${shape}`, {
|
|
4547
4944
|
reason: "ref.malformed"
|
|
4548
4945
|
}), "malformed");
|
|
4946
|
+
var decoded = /* @__PURE__ */ __name((part, text6, shape) => {
|
|
4947
|
+
try {
|
|
4948
|
+
return decodeURIComponent(part);
|
|
4949
|
+
} catch {
|
|
4950
|
+
throw malformed(text6, shape);
|
|
4951
|
+
}
|
|
4952
|
+
}, "decoded");
|
|
4549
4953
|
var parts = /* @__PURE__ */ __name((rest, count7, text6, shape) => {
|
|
4550
4954
|
const split = rest.split("/");
|
|
4551
4955
|
if (split.length !== count7 || split.some((part) => part === ""))
|
|
4552
4956
|
throw malformed(text6, shape);
|
|
4553
|
-
return split.map(
|
|
4957
|
+
return split.map((part) => decoded(part, text6, shape));
|
|
4554
4958
|
}, "parts");
|
|
4555
4959
|
var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
|
|
4556
4960
|
var folderPath = /* @__PURE__ */ __name((path) => {
|
|
@@ -4558,8 +4962,8 @@ var folderPath = /* @__PURE__ */ __name((path) => {
|
|
|
4558
4962
|
return clean === "" ? path.trim() === "" ? "" : null : clean;
|
|
4559
4963
|
}, "folderPath");
|
|
4560
4964
|
var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
|
|
4561
|
-
var
|
|
4562
|
-
var simple = /* @__PURE__ */ __name((prefix) =>
|
|
4965
|
+
var kind2 = /* @__PURE__ */ __name((spec) => spec, "kind");
|
|
4966
|
+
var simple = /* @__PURE__ */ __name((prefix) => kind2({
|
|
4563
4967
|
prefix,
|
|
4564
4968
|
type: prefix,
|
|
4565
4969
|
shape: `${prefix}:<id>`,
|
|
@@ -4573,7 +4977,7 @@ var simple = /* @__PURE__ */ __name((prefix) => kind({
|
|
|
4573
4977
|
format: /* @__PURE__ */ __name((reference2) => `${reference2.type}:${reference2.id}`, "format")
|
|
4574
4978
|
}), "simple");
|
|
4575
4979
|
var REF_KINDS = [
|
|
4576
|
-
|
|
4980
|
+
kind2({
|
|
4577
4981
|
prefix: "msg",
|
|
4578
4982
|
type: "message",
|
|
4579
4983
|
shape: "msg:<provider>/<account>/<chat>/<message>",
|
|
@@ -4586,7 +4990,7 @@ var REF_KINDS = [
|
|
|
4586
4990
|
}, "parse"),
|
|
4587
4991
|
format: formatLocator
|
|
4588
4992
|
}),
|
|
4589
|
-
|
|
4993
|
+
kind2({
|
|
4590
4994
|
prefix: "chat",
|
|
4591
4995
|
type: "chat",
|
|
4592
4996
|
shape: "chat:<provider>/<account>/<chat>",
|
|
@@ -4596,7 +5000,7 @@ var REF_KINDS = [
|
|
|
4596
5000
|
}, "parse"),
|
|
4597
5001
|
format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
|
|
4598
5002
|
}),
|
|
4599
|
-
|
|
5003
|
+
kind2({
|
|
4600
5004
|
prefix: "contact",
|
|
4601
5005
|
type: "contact",
|
|
4602
5006
|
shape: "contact:<provider>/<id>",
|
|
@@ -4606,21 +5010,21 @@ var REF_KINDS = [
|
|
|
4606
5010
|
}, "parse"),
|
|
4607
5011
|
format: /* @__PURE__ */ __name(({ provider, id: id4 }) => `contact:${encoded(provider, id4)}`, "format")
|
|
4608
5012
|
}),
|
|
4609
|
-
|
|
5013
|
+
kind2({
|
|
4610
5014
|
prefix: "folder",
|
|
4611
5015
|
type: "folder",
|
|
4612
5016
|
shape: "folder:<id>[/<path>]",
|
|
4613
5017
|
parse: /* @__PURE__ */ __name((rest, text6) => {
|
|
4614
5018
|
const slash = rest.indexOf("/");
|
|
4615
|
-
const id4 =
|
|
4616
|
-
const path = slash < 0 ? null : folderPath(
|
|
5019
|
+
const id4 = decoded(slash < 0 ? rest : rest.slice(0, slash), text6, "folder:<id>[/<path>]");
|
|
5020
|
+
const path = slash < 0 ? null : folderPath(decoded(rest.slice(slash + 1), text6, "folder:<id>[/<path>]"));
|
|
4617
5021
|
if (!id4.trim() || path === "")
|
|
4618
5022
|
throw malformed(text6, "folder:<id>[/<path>]");
|
|
4619
5023
|
return { type: "folder", id: id4, path };
|
|
4620
5024
|
}, "parse"),
|
|
4621
5025
|
format: /* @__PURE__ */ __name(({ id: id4, path }) => path === null ? `folder:${encodeURIComponent(id4)}` : `folder:${encoded(id4, path)}`, "format")
|
|
4622
5026
|
}),
|
|
4623
|
-
|
|
5027
|
+
kind2({
|
|
4624
5028
|
prefix: "meeting",
|
|
4625
5029
|
type: "meeting",
|
|
4626
5030
|
shape: MEETING_SHAPE,
|
|
@@ -4674,7 +5078,7 @@ var looksLikeReference = /* @__PURE__ */ __name((text6) => {
|
|
|
4674
5078
|
return match !== null && byPrefix.has(match[1]);
|
|
4675
5079
|
}, "looksLikeReference");
|
|
4676
5080
|
|
|
4677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
4678
5082
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
4679
5083
|
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
4680
5084
|
var PROVIDERS = [
|
|
@@ -4690,7 +5094,7 @@ var PROVIDERS = [
|
|
|
4690
5094
|
{ name: "obsidian", kind: "notes", aliases: [] },
|
|
4691
5095
|
{ name: "added", kind: "notes", aliases: [] },
|
|
4692
5096
|
{ name: "zoom", kind: "meetings", aliases: [] },
|
|
4693
|
-
{ name: "google-meet", kind: "meetings", aliases: [], command: "
|
|
5097
|
+
{ name: "google-meet", kind: "meetings", aliases: [], command: "gmeet" },
|
|
4694
5098
|
// Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
|
|
4695
5099
|
{ name: "telemost", kind: "meetings", aliases: [] },
|
|
4696
5100
|
// A phone export's records: its SMS and its calls in the one account the import names.
|
|
@@ -4734,24 +5138,24 @@ var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
|
|
|
4734
5138
|
var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
4735
5139
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
4736
5140
|
return invalid5(`provider ${named}'s opens maps a kind of reference to a command`);
|
|
4737
|
-
const known = Object.entries(value).filter(([
|
|
4738
|
-
for (const [
|
|
5141
|
+
const known = Object.entries(value).filter(([kind3]) => OPEN_KINDS.has(kind3));
|
|
5142
|
+
for (const [kind3, command] of known)
|
|
4739
5143
|
if (typeof command !== "string" || !COMMAND_WORDS.test(command))
|
|
4740
|
-
invalid5(`provider ${named} opens a ${
|
|
5144
|
+
invalid5(`provider ${named} opens a ${kind3} with command words, not ${JSON.stringify(command)}`);
|
|
4741
5145
|
return Object.fromEntries(known);
|
|
4742
5146
|
}, "opensOf");
|
|
4743
5147
|
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
4744
5148
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
4745
5149
|
return invalid5("a provider entry is an object");
|
|
4746
|
-
const { name, kind:
|
|
5150
|
+
const { name, kind: kind3, kinds, aliases = [], command, opens, imported } = value;
|
|
4747
5151
|
const named = wordOf(name, "a provider's name");
|
|
4748
5152
|
const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
|
|
4749
|
-
const given = kinds === void 0 ? [
|
|
5153
|
+
const given = kinds === void 0 ? [kind3] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
|
|
4750
5154
|
for (const one of given)
|
|
4751
5155
|
if (!isKindWord(one))
|
|
4752
5156
|
invalid5(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
|
|
4753
5157
|
const list = [...new Set(given)];
|
|
4754
|
-
if (
|
|
5158
|
+
if (kind3 !== void 0 && kind3 !== list[0])
|
|
4755
5159
|
invalid5(`provider ${named}'s kind is the first of its kinds`);
|
|
4756
5160
|
if (!Array.isArray(aliases))
|
|
4757
5161
|
invalid5(`provider ${named}'s aliases are a list`);
|
|
@@ -4842,11 +5246,11 @@ var importedOf = /* @__PURE__ */ __name((entry, held) => {
|
|
|
4842
5246
|
return held.imported === true;
|
|
4843
5247
|
}, "importedOf");
|
|
4844
5248
|
var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
|
|
4845
|
-
var holdsKind = /* @__PURE__ */ __name((provider,
|
|
4846
|
-
var holdsKindOf = /* @__PURE__ */ __name((provider,
|
|
5249
|
+
var holdsKind = /* @__PURE__ */ __name((provider, kind3) => kindsIn(provider).includes(kind3), "holdsKind");
|
|
5250
|
+
var holdsKindOf = /* @__PURE__ */ __name((provider, kind3) => kindIn(provider) === void 0 ? kind3 === "messages" : holdsKind(provider, kind3), "holdsKindOf");
|
|
4847
5251
|
var kindOf2 = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
4848
5252
|
|
|
4849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
4850
5254
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
4851
5255
|
var inSource = /* @__PURE__ */ __name((source, provider) => source === "all" || source === "bots" && isBotProvider(provider) || source === "personal" && !isBotProvider(provider) || source === provider || providerNamed(source)?.name === provider || isKind(source) && holdsKindOf(provider, source), "inSource");
|
|
4852
5256
|
var fail = /* @__PURE__ */ __name((message) => {
|
|
@@ -4869,7 +5273,7 @@ var sourceOf2 = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
4869
5273
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
4870
5274
|
}, "sourceOf");
|
|
4871
5275
|
|
|
4872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
4873
5277
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
4874
5278
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
4875
5279
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -4887,7 +5291,7 @@ var isGroupName = /* @__PURE__ */ __name((name) => GROUP_NAME.test(name), "isGro
|
|
|
4887
5291
|
var groupName = /* @__PURE__ */ __name((name) => isGroupName(name) ? name : fail2(`a group name is letters, digits, - and _ \u2014 not "${name}"`), "groupName");
|
|
4888
5292
|
var groupMembers = /* @__PURE__ */ __name((value) => itemsOf(value).map((item) => item.toLowerCase().startsWith("group:") ? fail2(`a group lists accounts, not other groups \u2014 "${item}"`) : item.includes(":") && item.split(":")[1] === "" ? fail2(`"${item}" names no account after the colon`) : item), "groupMembers");
|
|
4889
5293
|
var describe2 = /* @__PURE__ */ __name((accounts) => accounts.map(({ provider, account, name }) => `${provider}:${account}${name ? ` (${name})` : ""}`).join(", "), "describe");
|
|
4890
|
-
var listedHolds = /* @__PURE__ */ __name((account,
|
|
5294
|
+
var listedHolds = /* @__PURE__ */ __name((account, kind3) => (account.kinds ?? (account.kind === void 0 ? [] : [account.kind])).includes(kind3), "listedHolds");
|
|
4891
5295
|
var kindHere = /* @__PURE__ */ __name((provider, running) => provider === running.provider ? kindOf2(provider) : kindIn(provider), "kindHere");
|
|
4892
5296
|
var kindsOfHere = /* @__PURE__ */ __name((provider, running) => {
|
|
4893
5297
|
const kinds = kindsIn(provider);
|
|
@@ -5031,10 +5435,10 @@ var entriesOfList = /* @__PURE__ */ __name((value, context3) => {
|
|
|
5031
5435
|
const { only } = context3;
|
|
5032
5436
|
return entries.map(({ entry: entry2, accounts }) => ({
|
|
5033
5437
|
entry: entry2,
|
|
5034
|
-
accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind:
|
|
5438
|
+
accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind: kind3, kinds }) => ({
|
|
5035
5439
|
provider,
|
|
5036
5440
|
account,
|
|
5037
|
-
kind:
|
|
5441
|
+
kind: kind3,
|
|
5038
5442
|
...kinds === void 0 ? {} : { kinds }
|
|
5039
5443
|
}))
|
|
5040
5444
|
}));
|
|
@@ -5056,15 +5460,15 @@ var READS = {
|
|
|
5056
5460
|
events: "calendar events \u2014 no search reads them yet",
|
|
5057
5461
|
crm: "CRM deals and leads \u2014 search all reads them"
|
|
5058
5462
|
};
|
|
5059
|
-
var fitting = /* @__PURE__ */ __name((entries, kinds, what,
|
|
5463
|
+
var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf2 = (kind3) => READS[kind3], alsoFits = () => false) => {
|
|
5060
5464
|
const chosen = /* @__PURE__ */ new Map();
|
|
5061
5465
|
const skipped = [];
|
|
5062
5466
|
for (const { entry, accounts } of entries) {
|
|
5063
|
-
const fits = accounts.filter((one) => kinds.some((
|
|
5467
|
+
const fits = accounts.filter((one) => kinds.some((kind3) => listedHolds(one, kind3)) || alsoFits(one));
|
|
5064
5468
|
for (const { provider, account } of fits)
|
|
5065
5469
|
if (!chosen.has(keyOf({ provider, account })))
|
|
5066
5470
|
chosen.set(keyOf({ provider, account }), { provider, account });
|
|
5067
|
-
const known = accounts.filter(({ kind:
|
|
5471
|
+
const known = accounts.filter(({ kind: kind3 }) => kind3 !== void 0);
|
|
5068
5472
|
const unknown2 = accounts.filter((one) => one.kind === void 0 && !alsoFits(one));
|
|
5069
5473
|
if (known.length)
|
|
5070
5474
|
for (const { provider, account } of unknown2)
|
|
@@ -5072,14 +5476,14 @@ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind2) =
|
|
|
5072
5476
|
if (fits.length)
|
|
5073
5477
|
continue;
|
|
5074
5478
|
const other = known[0];
|
|
5075
|
-
skipped.push(other?.kind ? { source: entry, code: "validation_error", reason:
|
|
5479
|
+
skipped.push(other?.kind ? { source: entry, code: "validation_error", reason: reasonOf2(other.kind) } : unknown2.length ? { source: entry, code: "not_found", reason: UNKNOWN_PROVIDER } : { source: entry, code: "not_found", reason: "no account in the store" });
|
|
5076
5480
|
}
|
|
5077
5481
|
if (chosen.size === 0)
|
|
5078
5482
|
fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}`);
|
|
5079
5483
|
return { accounts: [...chosen.values()], skipped };
|
|
5080
5484
|
}, "fitting");
|
|
5081
5485
|
|
|
5082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/categories.js
|
|
5083
5487
|
var CATEGORIES = ["client", "supplier", "partner", "employer"];
|
|
5084
5488
|
|
|
5085
5489
|
export {
|
|
@@ -5131,6 +5535,10 @@ export {
|
|
|
5131
5535
|
evaluate,
|
|
5132
5536
|
fieldsHelp,
|
|
5133
5537
|
queryDescription,
|
|
5538
|
+
BACKENDS,
|
|
5539
|
+
serviceCallsOf,
|
|
5540
|
+
rangeOf,
|
|
5541
|
+
windowOf,
|
|
5134
5542
|
formatMeetingReference,
|
|
5135
5543
|
parseMeetingReference,
|
|
5136
5544
|
canonicalMeetingReference,
|
|
@@ -5155,10 +5563,9 @@ export {
|
|
|
5155
5563
|
MeetingError,
|
|
5156
5564
|
listed,
|
|
5157
5565
|
meetingPeople,
|
|
5158
|
-
meetingsList,
|
|
5159
5566
|
meetingsQuery,
|
|
5160
5567
|
MEETING_QUERY_GUIDE,
|
|
5161
|
-
|
|
5568
|
+
meetingDetailsBody,
|
|
5162
5569
|
meetingTranscriptAnswer,
|
|
5163
5570
|
meetingSummaryAnswer,
|
|
5164
5571
|
exportMeeting,
|
|
@@ -5206,6 +5613,8 @@ export {
|
|
|
5206
5613
|
meetingPassage,
|
|
5207
5614
|
event,
|
|
5208
5615
|
eventItem,
|
|
5616
|
+
meetingsListThrough,
|
|
5617
|
+
meetingShowThrough,
|
|
5209
5618
|
strongRecordingValidator,
|
|
5210
5619
|
validateMeetingRelatedHistory,
|
|
5211
5620
|
MEETING_RESULT_ENTITIES,
|