@wirecat/tg-cli 0.116.0 → 0.117.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/bot/transport.d.ts +1 -1
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +42 -30
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-6CLMTQOV.js → adapter-VNQ72MBK.js} +70 -61
- package/dist/bundle/{all-profiles-R2UZMH24.js → all-profiles-3W2UQTCK.js} +10 -10
- package/dist/bundle/{anthropic-QKIPHV2Z.js → anthropic-DFUW2KTG.js} +6 -6
- package/dist/bundle/{app-server-AZB2MFK6.js → app-server-5XJIMLHB.js} +49 -46
- package/dist/bundle/{bot-api-2IM243J4.js → bot-api-HRRBF3W6.js} +49 -49
- package/dist/bundle/{bot-history-G6CRVCL2.js → bot-history-GBH5XE4N.js} +18 -18
- package/dist/bundle/{bun-JDKPISPX.js → bun-ZMOYGG6F.js} +2 -2
- package/dist/bundle/{bun-sqlite-X5PY5IQT.js → bun-sqlite-6FZFMA7K.js} +5 -5
- package/dist/bundle/{chunk-577MFPCP.js → chunk-2452HCIV.js} +3 -3
- package/dist/bundle/{chunk-H72UEHNG.js → chunk-2XLKZL6K.js} +34 -28
- package/dist/bundle/{chunk-RSDIPQXP.js → chunk-3GRX7WP6.js} +2 -2
- package/dist/bundle/{chunk-PPLFOIYX.js → chunk-3MQOLYAN.js} +4 -4
- package/dist/bundle/{chunk-JFTCOV37.js → chunk-3RJYLN5V.js} +73 -21
- package/dist/bundle/{chunk-BGMV66FC.js → chunk-4JDGN6OD.js} +1 -1
- package/dist/bundle/{chunk-MQ7MCVZV.js → chunk-56Q5JV3Z.js} +2 -2
- package/dist/bundle/{chunk-4IQZRW4O.js → chunk-66FZBLRJ.js} +13 -13
- package/dist/bundle/{chunk-QHBVGKC3.js → chunk-6GFUL4OU.js} +206 -81
- package/dist/bundle/{chunk-5FCONCJO.js → chunk-6HRN7BW6.js} +1 -1
- package/dist/bundle/{chunk-I6JF43YP.js → chunk-7NBUT62O.js} +3 -3
- package/dist/bundle/{chunk-VQPLHOVQ.js → chunk-7Y3RUEVY.js} +6 -6
- package/dist/bundle/chunk-AG6HWPQP.js +64 -0
- package/dist/bundle/{chunk-HK6SIIGG.js → chunk-AUBRELCM.js} +3 -3
- package/dist/bundle/{chunk-4D5AUWAY.js → chunk-B2YPB5AE.js} +43 -25
- package/dist/bundle/{chunk-EB2IULWB.js → chunk-BXTDAGM4.js} +2 -2
- package/dist/bundle/{chunk-QGL2UGML.js → chunk-C6TUVV7E.js} +466 -224
- package/dist/bundle/{chunk-42GK3XRS.js → chunk-EA2PGDER.js} +2 -2
- package/dist/bundle/{chunk-N6TIFJHW.js → chunk-EL6I4WTB.js} +1 -1
- package/dist/bundle/{chunk-76CX2YPT.js → chunk-EPCFXKTX.js} +8 -8
- package/dist/bundle/{chunk-Y6VWGJ4Q.js → chunk-EZTYJ43A.js} +4 -2
- package/dist/bundle/{chunk-T7CDLV33.js → chunk-F6KBVIJP.js} +4 -4
- package/dist/bundle/{chunk-PXMHBTK3.js → chunk-FAHHERJ7.js} +4 -4
- package/dist/bundle/{chunk-DP5LRU7K.js → chunk-FEKXHILZ.js} +1 -1
- package/dist/bundle/chunk-G7B5UIE7.js +182 -0
- package/dist/bundle/{chunk-YLRTLZF6.js → chunk-GFHNQBD2.js} +1 -1
- package/dist/bundle/{chunk-SD5PUYKF.js → chunk-HORGORHK.js} +12 -12
- package/dist/bundle/{chunk-N42VUNTO.js → chunk-HWYSRB64.js} +2 -2
- package/dist/bundle/{chunk-5VFPUOJO.js → chunk-HZZGOLGP.js} +11 -11
- package/dist/bundle/{chunk-B4UOCWM4.js → chunk-JWIUK3SK.js} +2 -2
- package/dist/bundle/{chunk-NL3PAFAE.js → chunk-KVTLT4V7.js} +6 -6
- package/dist/bundle/{chunk-KA6EGOJY.js → chunk-L5WNE4WS.js} +2 -2
- package/dist/bundle/{chunk-PPSUA3IZ.js → chunk-M7V5XRM6.js} +3 -3
- package/dist/bundle/{chunk-XQUTJITP.js → chunk-MLHKQDUN.js} +647 -129
- package/dist/bundle/{chunk-RSNGMNU5.js → chunk-MP7M6FFU.js} +6 -6
- package/dist/bundle/{chunk-5ZIBAYIZ.js → chunk-NUCDEOFC.js} +2 -2
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-QAKL3GXB.js → chunk-PTIB7NEE.js} +1 -1
- package/dist/bundle/{chunk-TZVL4U7U.js → chunk-Q7O4CQDO.js} +4 -2
- package/dist/bundle/{chunk-XBIPSSKI.js → chunk-QOGYHU3Q.js} +4 -4
- package/dist/bundle/{chunk-R52RMHWF.js → chunk-RDH2QBUE.js} +3 -3
- package/dist/bundle/{chunk-NUYRMU56.js → chunk-RDSLSV4M.js} +2 -2
- package/dist/bundle/{chunk-UCSFO5GW.js → chunk-SQXB5ZUZ.js} +3 -3
- package/dist/bundle/{chunk-K62YATVD.js → chunk-TFBHDIGY.js} +4 -4
- package/dist/bundle/{chunk-IR4S7POE.js → chunk-TG6ZYL4B.js} +8 -8
- package/dist/bundle/{chunk-FDI4GOIP.js → chunk-UGPZCNYC.js} +329 -291
- package/dist/bundle/{chunk-GV7ZJ33M.js → chunk-UYK5AXSW.js} +4 -4
- package/dist/bundle/{chunk-HUOXUI2M.js → chunk-V2T7NYNU.js} +55 -46
- package/dist/bundle/{chunk-HBUJNNZD.js → chunk-V47NPSSV.js} +28 -28
- package/dist/bundle/{chunk-YYKJN6H5.js → chunk-VMCQGZIA.js} +1390 -690
- package/dist/bundle/{chunk-LXH3SKY3.js → chunk-VRDVXXXD.js} +8 -8
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-LFKEKSI5.js → chunk-X3CD475M.js} +470 -234
- package/dist/bundle/{chunk-SKZ2E3WC.js → chunk-XW5C4TI7.js} +1 -1
- package/dist/bundle/{chunk-OX6EWGSG.js → chunk-YHZFGUAP.js} +19 -19
- package/dist/bundle/{chunk-HLNYJPAB.js → chunk-YIXXH74F.js} +2 -2
- package/dist/bundle/{chunk-LSKGCJWD.js → chunk-Z4QKLHJW.js} +13617 -1795
- package/dist/bundle/{chunk-JJMQA272.js → chunk-ZPILMEFY.js} +9 -9
- package/dist/bundle/command-contract-KMMHARMR.js +33 -0
- package/dist/bundle/{decode-W6YPTGJA.js → decode-YMSOY2AY.js} +5 -5
- package/dist/bundle/{dispatch-H7EFNBEH.js → dispatch-OP27MWX5.js} +8 -8
- package/dist/bundle/{echarts-YAWDIC5D.js → echarts-7XS55TQY.js} +2 -2
- package/dist/bundle/{embed-EN4UTLV5.js → embed-QTOE7NN3.js} +6 -6
- package/dist/bundle/{embedder-HEKHRL7E.js → embedder-KBBRYSNH.js} +9 -9
- package/dist/bundle/{entry-2KB6MTCG.js → entry-HGEUYYMX.js} +7 -7
- package/dist/bundle/{failure-3DU3HLBQ.js → failure-4JUQFXJT.js} +2 -2
- package/dist/bundle/{first-run-LBG26WWO.js → first-run-CSGMEJXY.js} +11 -11
- package/dist/bundle/first-screen-K2PBNJNE.js +31 -0
- package/dist/bundle/{instructions-HA62QNPR.js → instructions-S6ZXCTFH.js} +1 -1
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{node-MZ2VWSQQ.js → node-LCIUWXXG.js} +2 -2
- package/dist/bundle/{node-sqlite-KNNS6DCM.js → node-sqlite-HL4WY4N2.js} +6 -6
- package/dist/bundle/{oauth-KWUABBSQ.js → oauth-U4KIMDKG.js} +7 -7
- package/dist/bundle/{open-JXMCYCIV.js → open-EH7OS7M7.js} +5 -5
- package/dist/bundle/{openai-HL3IR4VT.js → openai-W5TB3NA5.js} +14 -14
- package/dist/bundle/{process-K2FICLWY.js → process-3CVLTCTA.js} +1 -1
- package/dist/bundle/{program-IFOMT4JS.js → program-LOIZTK2P.js} +51 -51
- package/dist/bundle/{prompt-HVD3Q77P.js → prompt-IDNH7N3W.js} +5 -5
- package/dist/bundle/{proxy-transport-PA5SGMRY.js → proxy-transport-4DPZB2W2.js} +5 -5
- package/dist/bundle/{recognize-HHLVETKI.js → recognize-G5EWYXIF.js} +4 -4
- package/dist/bundle/{remote-HUAKXJCS.js → remote-4XTBZVZD.js} +7 -7
- package/dist/bundle/{rerank-NWFIV7OF.js → rerank-OWSTDLZN.js} +7 -7
- package/dist/bundle/{serve-ANUKAJJN.js → serve-YCPSEWP3.js} +9 -9
- package/dist/bundle/server-KELKX6S3.js +60 -0
- package/dist/bundle/{server-7Q7WAOHO.js → server-ODG4A2KK.js} +35 -35
- package/dist/bundle/{state-Y2AJ5XTP.js → state-OL2235G5.js} +6 -6
- package/dist/bundle/{store-S3IG5KWL.js → store-5AACYNDM.js} +15 -13
- package/dist/bundle/store-maintenance-command-3J7WZYVN.js +50 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/account.d.ts.map +1 -1
- package/dist/telegram/account.js +4 -1
- package/dist/telegram/account.js.map +1 -1
- package/dist/telegram/errors.d.ts.map +1 -1
- package/dist/telegram/errors.js +2 -1
- package/dist/telegram/errors.js.map +1 -1
- package/dist/telegram/feature.d.ts +4 -1
- package/dist/telegram/feature.d.ts.map +1 -1
- package/dist/telegram/feature.js +5 -2
- package/dist/telegram/feature.js.map +1 -1
- package/dist/telegram/sending.d.ts.map +1 -1
- package/dist/telegram/sending.js +24 -10
- package/dist/telegram/sending.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-K2RYCCTP.js +0 -48
- package/dist/bundle/chunk-ZDIAPICE.js +0 -132
- package/dist/bundle/command-contract-DPXM4SZT.js +0 -33
- package/dist/bundle/first-screen-TGTSLUI6.js +0 -31
- package/dist/bundle/server-HCQS4YDQ.js +0 -60
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +0 -50
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
duplicates,
|
|
12
12
|
integer,
|
|
13
13
|
isoTime,
|
|
14
|
+
isoTimestamp,
|
|
14
15
|
lazy,
|
|
15
16
|
literal,
|
|
16
17
|
maxValue,
|
|
@@ -23,25 +24,27 @@ import {
|
|
|
23
24
|
pageSchema,
|
|
24
25
|
picklist,
|
|
25
26
|
pipe,
|
|
27
|
+
record,
|
|
26
28
|
reference,
|
|
27
29
|
safeParse,
|
|
28
30
|
stepOf,
|
|
29
31
|
strictObject,
|
|
30
32
|
string,
|
|
31
33
|
union,
|
|
34
|
+
unknown,
|
|
32
35
|
variant
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-EPCFXKTX.js";
|
|
34
37
|
import {
|
|
35
38
|
CliError,
|
|
36
39
|
isCliError,
|
|
37
40
|
singleLine,
|
|
38
41
|
visibleControls
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-BXTDAGM4.js";
|
|
40
43
|
import {
|
|
41
44
|
__name
|
|
42
45
|
} from "./chunk-ZVVMGPBJ.js";
|
|
43
46
|
|
|
44
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
47
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/types.js
|
|
45
48
|
var QUERY_LIMITS = {
|
|
46
49
|
bytes: 8192,
|
|
47
50
|
depth: 32,
|
|
@@ -85,7 +88,7 @@ function queryError(reason, span, alternative, context3 = {}, details = {}) {
|
|
|
85
88
|
__name(queryError, "queryError");
|
|
86
89
|
var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
|
|
87
90
|
|
|
88
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
91
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/dates.js
|
|
89
92
|
var timezoneOf = /* @__PURE__ */ __name((given) => {
|
|
90
93
|
const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
91
94
|
try {
|
|
@@ -118,8 +121,8 @@ var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
|
|
|
118
121
|
day: "2-digit",
|
|
119
122
|
era: "short"
|
|
120
123
|
});
|
|
121
|
-
const dayAt = /* @__PURE__ */ __name((
|
|
122
|
-
const parts = formatter.formatToParts(
|
|
124
|
+
const dayAt = /* @__PURE__ */ __name((time2) => {
|
|
125
|
+
const parts = formatter.formatToParts(time2);
|
|
123
126
|
const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
|
|
124
127
|
const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
|
|
125
128
|
return year * 1e4 + value2("month") * 100 + value2("day");
|
|
@@ -175,11 +178,11 @@ var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {
|
|
|
175
178
|
return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
|
|
176
179
|
if (!ZONED.test(value))
|
|
177
180
|
return wallTime(value, zone, span);
|
|
178
|
-
const
|
|
179
|
-
if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(
|
|
181
|
+
const time2 = Date.parse(value);
|
|
182
|
+
if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time2))
|
|
180
183
|
queryError("query.invalid-date", span);
|
|
181
184
|
calendar(value.slice(0, 10), span);
|
|
182
|
-
return
|
|
185
|
+
return time2;
|
|
183
186
|
}, "zonedMoment");
|
|
184
187
|
var AGO = /^(\d+)(m|h|d)$/u;
|
|
185
188
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
@@ -213,10 +216,10 @@ var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, n
|
|
|
213
216
|
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
|
|
214
217
|
queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
|
|
215
218
|
calendar(value.slice(0, 10), span);
|
|
216
|
-
const
|
|
217
|
-
if (!Number.isFinite(
|
|
219
|
+
const time2 = Date.parse(value);
|
|
220
|
+
if (!Number.isFinite(time2) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
|
|
218
221
|
queryError("query.invalid-date", span);
|
|
219
|
-
return { time, inclusive };
|
|
222
|
+
return { time: time2, inclusive };
|
|
220
223
|
}, "dateEndpoint");
|
|
221
224
|
var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
|
|
222
225
|
const since = lower === upper && AGO.test(lower.toLowerCase());
|
|
@@ -230,7 +233,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
|
|
|
230
233
|
};
|
|
231
234
|
}, "dateRange");
|
|
232
235
|
|
|
233
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
236
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/fields.js
|
|
234
237
|
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
235
238
|
var OPERATORS_BY_TYPE = {
|
|
236
239
|
kw: ["term", "phrase", "wildcard"],
|
|
@@ -309,10 +312,10 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
|
309
312
|
return [...own, ...relations, ...states];
|
|
310
313
|
}, "queryFieldsOf");
|
|
311
314
|
|
|
312
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
315
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/help.js
|
|
313
316
|
var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
|
|
314
|
-
var leftOut = /* @__PURE__ */ __name((
|
|
315
|
-
var has = /* @__PURE__ */ __name((
|
|
317
|
+
var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
|
|
318
|
+
var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
|
|
316
319
|
var syntaxOf = /* @__PURE__ */ __name((shown, backend) => [
|
|
317
320
|
"field:value",
|
|
318
321
|
...has(shown, "phrase") ? ['"a phrase"'] : [],
|
|
@@ -341,12 +344,12 @@ var queryDescription = /* @__PURE__ */ __name((registry) => {
|
|
|
341
344
|
return "field:value terms; this list filters by none yet, so any term is refused";
|
|
342
345
|
const negatable = leftOut(shown);
|
|
343
346
|
const terms = registry.backend === "native" ? `field:value terms joined by AND that narrow the list${negatable.length > 0 ? `; -field:value or NOT field:value leaves out what matches, for ${negatable.join(", ")} only` : ""}` : `field:value terms that narrow the list (Lucene: AND OR NOT, -field:value${has(shown, "range") ? ", [a TO b], > <" : ""})`;
|
|
344
|
-
const
|
|
347
|
+
const fields = shown.map((field) => field.values ? `${field.name} (${field.values.join("|")})` : field.name);
|
|
345
348
|
const defaults = registry.defaults?.length ? `; unless named: ${registry.defaults.join(" ")}` : "";
|
|
346
|
-
return `${terms}; fields: ${
|
|
349
|
+
return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
|
|
347
350
|
}, "queryDescription");
|
|
348
351
|
|
|
349
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
352
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/validate.js
|
|
350
353
|
var inContext = /* @__PURE__ */ __name((context3, run2) => {
|
|
351
354
|
try {
|
|
352
355
|
run2();
|
|
@@ -421,7 +424,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
|
421
424
|
}, "validateQuery");
|
|
422
425
|
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
423
426
|
|
|
424
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
427
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/parser.js
|
|
425
428
|
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
426
429
|
var reserved = /* @__PURE__ */ new Set([
|
|
427
430
|
"+",
|
|
@@ -559,7 +562,7 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
|
|
|
559
562
|
fail("query.too-large", { start: 0, end: text6.length });
|
|
560
563
|
const tokens = tokensOf(text6, fail);
|
|
561
564
|
let at = 0;
|
|
562
|
-
let
|
|
565
|
+
let count7 = 0;
|
|
563
566
|
let depth = 0;
|
|
564
567
|
const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
|
|
565
568
|
const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
|
|
@@ -569,7 +572,7 @@ var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proxim
|
|
|
569
572
|
return take();
|
|
570
573
|
}, "expect");
|
|
571
574
|
const built = /* @__PURE__ */ __name((node) => {
|
|
572
|
-
if (++
|
|
575
|
+
if (++count7 > QUERY_LIMITS.nodes)
|
|
573
576
|
fail("query.too-large", node.span);
|
|
574
577
|
return node;
|
|
575
578
|
}, "built");
|
|
@@ -730,7 +733,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
|
|
|
730
733
|
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] : []));
|
|
731
734
|
}, "implicitTextTerms");
|
|
732
735
|
|
|
733
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
736
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/registry.js
|
|
734
737
|
var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
735
738
|
entity: registry.entity,
|
|
736
739
|
backend: registry.backend,
|
|
@@ -801,7 +804,7 @@ var QUERY_REASONS = defineReasons([
|
|
|
801
804
|
details: [...SPAN, ...details]
|
|
802
805
|
})));
|
|
803
806
|
|
|
804
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
807
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/query/evaluate.js
|
|
805
808
|
var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
806
809
|
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
807
810
|
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
@@ -827,10 +830,10 @@ var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
|
827
830
|
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
828
831
|
}
|
|
829
832
|
case "time": {
|
|
830
|
-
const
|
|
833
|
+
const time2 = Date.parse(text6);
|
|
831
834
|
const [lower, upper, lowerInclusive, upperInclusive] = node.operator === "range" ? [node.value, node.upper ?? "*", node.lower_inclusive ?? true, node.upper_inclusive ?? true] : [node.value, node.value, true, true];
|
|
832
835
|
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
833
|
-
return (range.lower === void 0 || (range.lower_inclusive ?
|
|
836
|
+
return (range.lower === void 0 || (range.lower_inclusive ? time2 >= range.lower : time2 > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time2 <= range.upper : time2 < range.upper));
|
|
834
837
|
}
|
|
835
838
|
default:
|
|
836
839
|
return node.operator === "wildcard" ? pattern(node.value).test(text6) : text6.toLowerCase() === node.value.toLowerCase();
|
|
@@ -854,9 +857,9 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
|
854
857
|
const value = item[node.field];
|
|
855
858
|
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
856
859
|
}, "matches");
|
|
857
|
-
var evaluate = /* @__PURE__ */ __name((ast,
|
|
860
|
+
var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
|
|
858
861
|
|
|
859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
860
863
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
861
864
|
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
862
865
|
if (!Number.isSafeInteger(value) || value < minimum)
|
|
@@ -893,7 +896,7 @@ var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
|
|
|
893
896
|
}, "parseMeetingReference");
|
|
894
897
|
var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
|
|
895
898
|
|
|
896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
897
900
|
var text = string();
|
|
898
901
|
var count = pipe(number(), integer(), minValue(0));
|
|
899
902
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -958,7 +961,7 @@ var MEETING_QUERY = {
|
|
|
958
961
|
})
|
|
959
962
|
};
|
|
960
963
|
|
|
961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
962
965
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
963
966
|
const parsed = urlOf(url);
|
|
964
967
|
if (!parsed)
|
|
@@ -992,7 +995,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
992
995
|
}
|
|
993
996
|
}, "urlOf");
|
|
994
997
|
|
|
995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
996
999
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
997
1000
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
998
1001
|
var htmlToText = /* @__PURE__ */ __name((html) => html.replace(/<\s*br\s*\/?>/giu, "\n").replace(/<\/\s*(p|div|li|tr|h[1-6])\s*>/giu, "\n").replace(/<a\s[^>]*href\s*=\s*"([^"]*)"[^>]*>/giu, " $1 ").replace(/<[^>]+>/gu, "").replace(/&(amp|lt|gt|quot|#39|apos|nbsp);/gu, (_, name) => ENTITIES[name] ?? ""), "htmlToText");
|
|
@@ -1025,7 +1028,7 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1025
1028
|
return kept;
|
|
1026
1029
|
}, "entryMetadata");
|
|
1027
1030
|
|
|
1028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1029
1032
|
import { createHash } from "node:crypto";
|
|
1030
1033
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1031
1034
|
reference: cue2.reference,
|
|
@@ -1039,7 +1042,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
1039
1042
|
text: cue2.text
|
|
1040
1043
|
})).digest("hex"), "meetingCueFingerprint");
|
|
1041
1044
|
|
|
1042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1043
1046
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1044
1047
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1045
1048
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -1062,7 +1065,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
1062
1065
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1063
1066
|
}, "entryInWindow");
|
|
1064
1067
|
|
|
1065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1066
1069
|
var text2 = string();
|
|
1067
1070
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
1068
1071
|
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
@@ -1297,7 +1300,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1297
1300
|
};
|
|
1298
1301
|
}, "meetingHitsList");
|
|
1299
1302
|
|
|
1300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1301
1304
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1302
1305
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1303
1306
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -1321,7 +1324,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
1321
1324
|
};
|
|
1322
1325
|
}, "validateMeetingParticipantSearch");
|
|
1323
1326
|
|
|
1324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1325
1328
|
var MeetingError = class extends CliError {
|
|
1326
1329
|
static {
|
|
1327
1330
|
__name(this, "MeetingError");
|
|
@@ -1348,8 +1351,8 @@ var validateFilter = /* @__PURE__ */ __name((filter) => {
|
|
|
1348
1351
|
if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0))
|
|
1349
1352
|
throw new MeetingError("validation_error", "expected a nonnegative integer");
|
|
1350
1353
|
}, "validateFilter");
|
|
1351
|
-
var meetingShow = /* @__PURE__ */ __name(async (store,
|
|
1352
|
-
const details = await store.meeting(positiveInteger(
|
|
1354
|
+
var meetingShow = /* @__PURE__ */ __name(async (store, id4, accountId) => {
|
|
1355
|
+
const details = await store.meeting(positiveInteger(id4));
|
|
1353
1356
|
if (!details || accountId !== void 0 && details.meeting.accountId !== accountId)
|
|
1354
1357
|
throw new MeetingError("not_found", "meeting not found");
|
|
1355
1358
|
return details;
|
|
@@ -1440,20 +1443,20 @@ var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
|
|
|
1440
1443
|
throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
|
|
1441
1444
|
return owner;
|
|
1442
1445
|
}, "ownerOf");
|
|
1443
|
-
var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store,
|
|
1444
|
-
const details = await meetingShow(store,
|
|
1446
|
+
var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
|
|
1447
|
+
const details = await meetingShow(store, id4, accountId);
|
|
1445
1448
|
return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
|
|
1446
1449
|
}, "meetingDetailsAnswer");
|
|
1447
|
-
var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store,
|
|
1448
|
-
const details = await meetingShow(store,
|
|
1450
|
+
var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id4, accountId, options = {}) => {
|
|
1451
|
+
const details = await meetingShow(store, id4, accountId);
|
|
1449
1452
|
return wholeList(details.transcripts.filter((t) => (options.history || t.transcript.supersededAt === null) && t.transcript.deletedAt === null).map((t) => meetingTranscriptItem(details.meeting.accountId, t.transcript, t.rows)));
|
|
1450
1453
|
}, "meetingTranscriptAnswer");
|
|
1451
|
-
var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store,
|
|
1452
|
-
const details = await meetingShow(store,
|
|
1454
|
+
var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id4, accountId) => {
|
|
1455
|
+
const details = await meetingShow(store, id4, accountId);
|
|
1453
1456
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
1454
1457
|
}, "meetingSummaryAnswer");
|
|
1455
1458
|
|
|
1456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
1457
1460
|
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
1458
1461
|
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
1459
1462
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
@@ -1496,10 +1499,10 @@ var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
|
|
|
1496
1499
|
}
|
|
1497
1500
|
return details.transcripts.filter((part) => part.transcript.supersededAt === null && part.transcript.deletedAt === null);
|
|
1498
1501
|
}, "transcriptsOf");
|
|
1499
|
-
var exportMeeting = /* @__PURE__ */ __name(async (store,
|
|
1502
|
+
var exportMeeting = /* @__PURE__ */ __name(async (store, id4, options) => {
|
|
1500
1503
|
if (options.format !== "markdown" && options.format !== "vtt")
|
|
1501
1504
|
throw new MeetingError("validation_error", "export format must be markdown or vtt");
|
|
1502
|
-
const details = await meetingShow(store,
|
|
1505
|
+
const details = await meetingShow(store, id4, options.accountId);
|
|
1503
1506
|
const transcripts = transcriptsOf(details, options.transcriptId);
|
|
1504
1507
|
let content;
|
|
1505
1508
|
if (options.format === "vtt") {
|
|
@@ -1549,7 +1552,7 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
|
|
|
1549
1552
|
};
|
|
1550
1553
|
}, "exportMeeting");
|
|
1551
1554
|
|
|
1552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
1553
1556
|
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
1554
1557
|
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
1555
1558
|
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
@@ -1601,9 +1604,9 @@ var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
|
1601
1604
|
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
1602
1605
|
return invalid2("a payment is an object");
|
|
1603
1606
|
const raw = input;
|
|
1604
|
-
const
|
|
1605
|
-
if (
|
|
1606
|
-
return invalid2(`a payment has no field ${
|
|
1607
|
+
const unknown2 = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
1608
|
+
if (unknown2.length)
|
|
1609
|
+
return invalid2(`a payment has no field ${unknown2.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
1607
1610
|
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
1608
1611
|
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
1609
1612
|
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
@@ -1643,13 +1646,13 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
|
1643
1646
|
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
1644
1647
|
}, "paymentTitle");
|
|
1645
1648
|
|
|
1646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1647
1650
|
import { createHash as createHash2 } from "node:crypto";
|
|
1648
1651
|
|
|
1649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
1650
1653
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
1651
1654
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
1652
|
-
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
|
|
1655
|
+
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
1653
1656
|
const date = value.slice(0, 10);
|
|
1654
1657
|
const instant = Date.parse(`${date}T00:00:00Z`);
|
|
1655
1658
|
if (!Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
|
|
@@ -1657,21 +1660,44 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
1657
1660
|
return new Date(value).toISOString();
|
|
1658
1661
|
}, "meetingTimestamp");
|
|
1659
1662
|
|
|
1660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1661
1664
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1662
1665
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1663
1666
|
throw new CliError("validation_error", message);
|
|
1664
1667
|
}, "invalid");
|
|
1665
|
-
var
|
|
1668
|
+
var findingText = /* @__PURE__ */ __name((value, limit) => {
|
|
1666
1669
|
if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
|
|
1667
1670
|
return invalid3(`finding text must contain 1\u2013${limit} characters without NUL`);
|
|
1668
1671
|
return value.trim();
|
|
1669
|
-
}, "
|
|
1672
|
+
}, "findingText");
|
|
1670
1673
|
var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
|
|
1671
|
-
var
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1674
|
+
var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
|
|
1675
|
+
var findingWhere = /* @__PURE__ */ __name((of) => {
|
|
1676
|
+
const id4 = typeof of.id === "string" ? of.id : null;
|
|
1677
|
+
const kind = typeof of.kind === "string" ? of.kind : null;
|
|
1678
|
+
return {
|
|
1679
|
+
where: id4 || kind ? ` in ${[id4, kind && `(${kind})`].filter(Boolean).join(" ")}` : "",
|
|
1680
|
+
named: { ...id4 ? { finding: id4 } : {}, ...kind ? { kind } : {} }
|
|
1681
|
+
};
|
|
1682
|
+
}, "findingWhere");
|
|
1683
|
+
var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
|
|
1684
|
+
const unknown2 = Object.keys(value).filter((key) => !allowed.includes(key));
|
|
1685
|
+
if (!unknown2.length)
|
|
1686
|
+
return;
|
|
1687
|
+
const fields = unknown2.map(snakeCase);
|
|
1688
|
+
const takes = allowed.map(snakeCase);
|
|
1689
|
+
const { where, named } = findingWhere(of);
|
|
1690
|
+
throw new CliError("validation_error", `unknown ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it takes ${takes.join(", ")}`, { reason: "finding.unknown-field", fields, allowed: takes, ...named });
|
|
1691
|
+
}, "findingFields");
|
|
1692
|
+
var findingNeeds = /* @__PURE__ */ __name((value, needed, noun) => {
|
|
1693
|
+
const missing = needed.filter((key) => value[key] === void 0);
|
|
1694
|
+
if (!missing.length)
|
|
1695
|
+
return;
|
|
1696
|
+
const fields = missing.map(snakeCase);
|
|
1697
|
+
const needs = needed.map(snakeCase);
|
|
1698
|
+
const { where, named } = findingWhere(value);
|
|
1699
|
+
throw new CliError("validation_error", `missing ${noun} field${fields.length > 1 ? "s" : ""} ${fields.join(", ")}${where}; it needs ${needs.join(", ")}`, { reason: "finding.missing-field", fields, needs, ...named });
|
|
1700
|
+
}, "findingNeeds");
|
|
1675
1701
|
var SUBJECT = /^(person|organization|project):[1-9]\d*$|^task:[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$/;
|
|
1676
1702
|
var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
|
|
1677
1703
|
if (!Array.isArray(raw) || raw.length < 1 || raw.length > 8)
|
|
@@ -1679,7 +1705,7 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
|
|
|
1679
1705
|
const evidence = raw.map((item) => {
|
|
1680
1706
|
if (!item || typeof item !== "object")
|
|
1681
1707
|
return invalid3("finding evidence is a reference and fingerprint");
|
|
1682
|
-
|
|
1708
|
+
findingFields(item, ["reference", "fingerprint"], rules.singular);
|
|
1683
1709
|
if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
|
|
1684
1710
|
return invalid3("evidence requires a reference and fingerprint");
|
|
1685
1711
|
const reference2 = rules.reference(item.reference);
|
|
@@ -1692,40 +1718,40 @@ var validEvidence = /* @__PURE__ */ __name((raw, rules) => {
|
|
|
1692
1718
|
return evidence;
|
|
1693
1719
|
}, "validEvidence");
|
|
1694
1720
|
var findingId = /* @__PURE__ */ __name((raw, ids2) => {
|
|
1695
|
-
const
|
|
1696
|
-
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(
|
|
1721
|
+
const id4 = findingText(raw, 64);
|
|
1722
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id4) || ids2.has(id4))
|
|
1697
1723
|
return invalid3("finding IDs must be unique simple keys");
|
|
1698
|
-
ids2.add(
|
|
1699
|
-
return
|
|
1724
|
+
ids2.add(id4);
|
|
1725
|
+
return id4;
|
|
1700
1726
|
}, "findingId");
|
|
1701
1727
|
var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
1702
1728
|
if (!finding || typeof finding !== "object")
|
|
1703
1729
|
return invalid3("a finding is an object");
|
|
1704
|
-
const
|
|
1705
|
-
const
|
|
1706
|
-
if (
|
|
1730
|
+
const id4 = findingId(finding.id, ids2);
|
|
1731
|
+
const project2 = finding.project === void 0 && rules.anySubject ? void 0 : findingText(finding.project, 64);
|
|
1732
|
+
if (project2 !== void 0 && !/^project:[1-9]\d*$/.test(project2))
|
|
1707
1733
|
return invalid3("a finding names a project reference");
|
|
1708
|
-
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(
|
|
1734
|
+
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(findingText(finding.subject, 80))))
|
|
1709
1735
|
return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
|
|
1710
|
-
if (finding.kind === "task" &&
|
|
1736
|
+
if (finding.kind === "task" && project2 === void 0 && !rules.inboxTasks)
|
|
1711
1737
|
return invalid3("a task finding names the project the task goes in");
|
|
1712
1738
|
const evidence = validEvidence(finding.evidence, rules);
|
|
1713
1739
|
const base = {
|
|
1714
|
-
id:
|
|
1715
|
-
...
|
|
1740
|
+
id: id4,
|
|
1741
|
+
...project2 === void 0 ? {} : { project: project2 },
|
|
1716
1742
|
...finding.subject === void 0 ? {} : { subject: finding.subject },
|
|
1717
1743
|
evidence
|
|
1718
1744
|
};
|
|
1719
1745
|
if (finding.kind === "fact") {
|
|
1720
|
-
|
|
1746
|
+
findingFields(finding, ["id", "project", "subject", "evidence", "kind", "type", "statement"], rules.singular);
|
|
1721
1747
|
if (finding.type === "payment")
|
|
1722
1748
|
return invalid3("a payment is a finding of kind payment; money is a payments row, not a fact");
|
|
1723
1749
|
if (!FACT_TYPES.includes(finding.type))
|
|
1724
1750
|
return invalid3("unknown fact finding type");
|
|
1725
|
-
return { ...base, kind: "fact", type: finding.type, statement:
|
|
1751
|
+
return { ...base, kind: "fact", type: finding.type, statement: findingText(finding.statement, 2e3) };
|
|
1726
1752
|
}
|
|
1727
1753
|
if (finding.kind === "payment" && rules.payments) {
|
|
1728
|
-
|
|
1754
|
+
findingFields(finding, ["id", "project", "subject", "evidence", "kind", "statement", "payment", "supersedes"], rules.singular);
|
|
1729
1755
|
if (finding.supersedes !== void 0 && !/^invoice:[1-9]\d*$/.test(String(finding.supersedes)))
|
|
1730
1756
|
return invalid3("a payment finding supersedes an invoice: reference, the expected payment it settles or voids");
|
|
1731
1757
|
const payment = validatePayment(finding.payment);
|
|
@@ -1738,14 +1764,14 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1738
1764
|
return {
|
|
1739
1765
|
...base,
|
|
1740
1766
|
kind: "payment",
|
|
1741
|
-
...finding.statement === void 0 ? {} : { statement:
|
|
1767
|
+
...finding.statement === void 0 ? {} : { statement: findingText(finding.statement, 2e3) },
|
|
1742
1768
|
payment,
|
|
1743
1769
|
...finding.supersedes === void 0 ? {} : { supersedes: finding.supersedes }
|
|
1744
1770
|
};
|
|
1745
1771
|
}
|
|
1746
1772
|
if (finding.kind !== "task")
|
|
1747
1773
|
return invalid3(`a finding is a fact${rules.payments ? ", payment" : ""} or task`);
|
|
1748
|
-
|
|
1774
|
+
findingFields(finding, [
|
|
1749
1775
|
"id",
|
|
1750
1776
|
"project",
|
|
1751
1777
|
"evidence",
|
|
@@ -1763,48 +1789,51 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1763
1789
|
return invalid3("a task finding type is bug, chore or feature");
|
|
1764
1790
|
if (!["explicit", "inferred"].includes(finding.commitment))
|
|
1765
1791
|
return invalid3("task commitment must be explicit or inferred");
|
|
1766
|
-
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0)
|
|
1767
|
-
return invalid3(
|
|
1792
|
+
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0))
|
|
1793
|
+
return invalid3(`due_at comes with due_evidence: the ${rules.cited} references of this finding's evidence that give the date, as a list of strings such as ["<reference>"]`);
|
|
1794
|
+
if (finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1795
|
+
return invalid3(`assignee comes with assignee_evidence: the ${rules.cited} references of this finding's evidence that name them, as a list of strings such as ["<reference>"]`);
|
|
1768
1796
|
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1769
1797
|
return invalid3("an assignee must be a person reference");
|
|
1770
1798
|
return {
|
|
1771
1799
|
...base,
|
|
1772
1800
|
kind: "task",
|
|
1773
1801
|
type: finding.type,
|
|
1774
|
-
title:
|
|
1775
|
-
reason:
|
|
1802
|
+
title: findingText(finding.title, 300),
|
|
1803
|
+
reason: findingText(finding.reason, 2e3),
|
|
1776
1804
|
commitment: finding.commitment,
|
|
1777
1805
|
...finding.dueAt === void 0 ? {} : {
|
|
1778
|
-
dueAt: meetingTimestamp(finding.dueAt, "
|
|
1779
|
-
dueEvidence: support(finding.dueEvidence, evidence)
|
|
1806
|
+
dueAt: meetingTimestamp(finding.dueAt, "a task's due_at"),
|
|
1807
|
+
dueEvidence: support(finding.dueEvidence, evidence, "due_evidence")
|
|
1780
1808
|
},
|
|
1781
|
-
...finding.assignee === void 0 ? {} : {
|
|
1809
|
+
...finding.assignee === void 0 ? {} : {
|
|
1810
|
+
assignee: finding.assignee,
|
|
1811
|
+
assigneeEvidence: support(finding.assigneeEvidence, evidence, "assignee_evidence")
|
|
1812
|
+
}
|
|
1782
1813
|
};
|
|
1783
1814
|
}, "validateFinding");
|
|
1784
|
-
var support = /* @__PURE__ */ __name((value, evidence) => {
|
|
1815
|
+
var support = /* @__PURE__ */ __name((value, evidence, field) => {
|
|
1785
1816
|
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1786
|
-
return invalid3(
|
|
1817
|
+
return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
|
|
1787
1818
|
return [...new Set(value)].sort();
|
|
1788
1819
|
}, "support");
|
|
1789
1820
|
var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
1790
1821
|
if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
|
|
1791
1822
|
return invalid3(`${rules.plural} take at most 65536 UTF-8 bytes`);
|
|
1792
|
-
|
|
1823
|
+
findingFields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
|
|
1793
1824
|
if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > most)
|
|
1794
1825
|
return invalid3(`schemaVersion 1 takes 1\u2013${most} ${rules.plural}`);
|
|
1795
|
-
const key =
|
|
1826
|
+
const key = findingText(input.key, 64);
|
|
1796
1827
|
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
|
|
1797
1828
|
return invalid3("a findings key uses letters, digits, dot, colon, underscore or hyphen");
|
|
1798
1829
|
const ids2 = /* @__PURE__ */ new Set();
|
|
1799
1830
|
const findings = input.findings.map((finding) => one(finding, ids2));
|
|
1800
|
-
return { schemaVersion: 1, key, extractor:
|
|
1831
|
+
return { schemaVersion: 1, key, extractor: findingText(input.extractor, 200), findings };
|
|
1801
1832
|
}, "validateBatch");
|
|
1802
1833
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1803
|
-
var findingText = /* @__PURE__ */ __name((value, limit) => text3(value, limit), "findingText");
|
|
1804
|
-
var findingFields = /* @__PURE__ */ __name((value, allowed, noun) => fields(value, allowed, noun), "findingFields");
|
|
1805
1834
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1806
1835
|
|
|
1807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1808
1837
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1809
1838
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1810
1839
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -1815,24 +1844,24 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
1815
1844
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1816
1845
|
var meetingFindingFingerprint = findingFingerprint;
|
|
1817
1846
|
|
|
1818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1819
|
-
var
|
|
1820
|
-
var identifier = pipe(
|
|
1821
|
-
var nullableText = nullable(
|
|
1847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
1848
|
+
var text3 = string();
|
|
1849
|
+
var identifier = pipe(text3, minLength(1));
|
|
1850
|
+
var nullableText = nullable(text3);
|
|
1822
1851
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
1823
1852
|
var flag = boolean();
|
|
1824
|
-
var scope = strictObject({ provider:
|
|
1853
|
+
var scope = strictObject({ provider: text3, account: text3 });
|
|
1825
1854
|
var run = strictObject({
|
|
1826
1855
|
meetings: count3,
|
|
1827
1856
|
participants: count3,
|
|
1828
1857
|
transcript_rows: count3,
|
|
1829
1858
|
summaries: count3,
|
|
1830
|
-
warnings: array(strictObject({ external_id:
|
|
1831
|
-
timezone: optional(
|
|
1859
|
+
warnings: array(strictObject({ external_id: text3, message: text3 })),
|
|
1860
|
+
timezone: optional(text3)
|
|
1832
1861
|
});
|
|
1833
1862
|
var exported = union([
|
|
1834
|
-
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename:
|
|
1835
|
-
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output:
|
|
1863
|
+
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text3, content: text3 }),
|
|
1864
|
+
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text3 })
|
|
1836
1865
|
]);
|
|
1837
1866
|
var eventChange = strictObject({
|
|
1838
1867
|
action: literal("event.link"),
|
|
@@ -1842,7 +1871,7 @@ var eventChange = strictObject({
|
|
|
1842
1871
|
var personChange = strictObject({
|
|
1843
1872
|
action: literal("person.link"),
|
|
1844
1873
|
participant_id: identifier,
|
|
1845
|
-
person_uid:
|
|
1874
|
+
person_uid: text3,
|
|
1846
1875
|
expected_person_uid: optional(nullableText),
|
|
1847
1876
|
target_account_ids: optional(array(identifier))
|
|
1848
1877
|
});
|
|
@@ -1855,7 +1884,7 @@ var eventResult = strictObject({
|
|
|
1855
1884
|
var personResult = strictObject({
|
|
1856
1885
|
meeting_id: identifier,
|
|
1857
1886
|
participant_id: identifier,
|
|
1858
|
-
person_uid:
|
|
1887
|
+
person_uid: text3,
|
|
1859
1888
|
previous_person_uid: nullableText,
|
|
1860
1889
|
changed: flag
|
|
1861
1890
|
});
|
|
@@ -1868,23 +1897,23 @@ var meetingChange = strictObject({
|
|
|
1868
1897
|
result: optional(union([eventResult, personResult]))
|
|
1869
1898
|
});
|
|
1870
1899
|
var recognition = strictObject({
|
|
1871
|
-
engine:
|
|
1872
|
-
model:
|
|
1873
|
-
version: optional(
|
|
1900
|
+
engine: text3,
|
|
1901
|
+
model: text3,
|
|
1902
|
+
version: optional(text3),
|
|
1874
1903
|
timing: optional(picklist(["fixed-windows", "recognition-segments"]))
|
|
1875
1904
|
});
|
|
1876
1905
|
var transcription = union([
|
|
1877
1906
|
strictObject({
|
|
1878
1907
|
applied: literal(false),
|
|
1879
1908
|
account_id: identifier,
|
|
1880
|
-
external_id:
|
|
1909
|
+
external_id: text3,
|
|
1881
1910
|
segments: count3,
|
|
1882
1911
|
media: strictObject({
|
|
1883
|
-
id:
|
|
1884
|
-
content_hash:
|
|
1912
|
+
id: text3,
|
|
1913
|
+
content_hash: text3,
|
|
1885
1914
|
size: count3,
|
|
1886
1915
|
duration_ms: count3,
|
|
1887
|
-
format:
|
|
1916
|
+
format: text3,
|
|
1888
1917
|
sample_rate: count3,
|
|
1889
1918
|
channels: count3,
|
|
1890
1919
|
recognition
|
|
@@ -1893,21 +1922,21 @@ var transcription = union([
|
|
|
1893
1922
|
strictObject({
|
|
1894
1923
|
applied: literal(true),
|
|
1895
1924
|
account_id: identifier,
|
|
1896
|
-
external_id:
|
|
1925
|
+
external_id: text3,
|
|
1897
1926
|
meeting_id: identifier,
|
|
1898
1927
|
created: flag,
|
|
1899
1928
|
inserted_transcripts: count3,
|
|
1900
1929
|
replayed_transcripts: count3,
|
|
1901
1930
|
superseded_transcripts: count3,
|
|
1902
1931
|
segments: count3,
|
|
1903
|
-
media_sha256:
|
|
1904
|
-
engine:
|
|
1905
|
-
model:
|
|
1932
|
+
media_sha256: text3,
|
|
1933
|
+
engine: text3,
|
|
1934
|
+
model: text3,
|
|
1906
1935
|
model_version: nullableText,
|
|
1907
1936
|
timing: picklist(["fixed-windows", "recognition-segments"])
|
|
1908
1937
|
})
|
|
1909
1938
|
]);
|
|
1910
|
-
var embeddingModel = strictObject({ key:
|
|
1939
|
+
var embeddingModel = strictObject({ key: text3, dims: count3, kind: picklist(["local", "remote"]), model: text3 });
|
|
1911
1940
|
var embedding = union([
|
|
1912
1941
|
strictObject({
|
|
1913
1942
|
account_id: identifier,
|
|
@@ -1923,7 +1952,7 @@ var embedding = union([
|
|
|
1923
1952
|
saved: count3,
|
|
1924
1953
|
skipped: count3,
|
|
1925
1954
|
has_more: flag,
|
|
1926
|
-
next_hash: optional(
|
|
1955
|
+
next_hash: optional(text3),
|
|
1927
1956
|
applied: literal(true),
|
|
1928
1957
|
rebuild: strictObject({
|
|
1929
1958
|
transcripts: count3,
|
|
@@ -1948,7 +1977,7 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
1948
1977
|
meeting_repair: repair
|
|
1949
1978
|
};
|
|
1950
1979
|
|
|
1951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1952
1981
|
var EVENT_QUERY = defineQuery({
|
|
1953
1982
|
entity: "event",
|
|
1954
1983
|
backend: "sql",
|
|
@@ -1964,7 +1993,7 @@ var EVENT_QUERY = defineQuery({
|
|
|
1964
1993
|
]
|
|
1965
1994
|
});
|
|
1966
1995
|
|
|
1967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1968
1997
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
1969
1998
|
const current = await store.meeting(details.meeting.id);
|
|
1970
1999
|
if (!current)
|
|
@@ -1979,7 +2008,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
1979
2008
|
endsAt: meeting2.endedAt ?? meeting2.startedAt
|
|
1980
2009
|
});
|
|
1981
2010
|
if (candidates.length > 1) {
|
|
1982
|
-
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id:
|
|
2011
|
+
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id4 }) => id4), now);
|
|
1983
2012
|
return null;
|
|
1984
2013
|
}
|
|
1985
2014
|
let event2 = candidates[0];
|
|
@@ -2007,7 +2036,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now())
|
|
|
2007
2036
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
2008
2037
|
}, "linkEvent");
|
|
2009
2038
|
|
|
2010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
2011
2040
|
var context = {
|
|
2012
2041
|
command: "search meetings",
|
|
2013
2042
|
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
@@ -2070,7 +2099,7 @@ var MEETING_FIELDS = defineQuery({
|
|
|
2070
2099
|
});
|
|
2071
2100
|
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
2072
2101
|
|
|
2073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2074
2103
|
var LATIN_WORDS = {
|
|
2075
2104
|
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2076
2105
|
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
@@ -2119,7 +2148,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2119
2148
|
return null;
|
|
2120
2149
|
}, "transcriptLanguage");
|
|
2121
2150
|
|
|
2122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2123
2152
|
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
2124
2153
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
2125
2154
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -2150,13 +2179,13 @@ var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source,
|
|
|
2150
2179
|
}))
|
|
2151
2180
|
}), "transcriptInput");
|
|
2152
2181
|
var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
2153
|
-
const
|
|
2154
|
-
if (!Number.isFinite(
|
|
2182
|
+
const time2 = Date.parse(value);
|
|
2183
|
+
if (!Number.isFinite(time2))
|
|
2155
2184
|
throw new Error("Invalid meeting timestamp");
|
|
2156
|
-
return
|
|
2185
|
+
return time2;
|
|
2157
2186
|
}, "timestamp");
|
|
2158
2187
|
|
|
2159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2160
2189
|
var TranscriptTextError = class extends Error {
|
|
2161
2190
|
static {
|
|
2162
2191
|
__name(this, "TranscriptTextError");
|
|
@@ -2211,7 +2240,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2211
2240
|
return { header, lines };
|
|
2212
2241
|
}, "parseTranscriptText");
|
|
2213
2242
|
|
|
2214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2215
2244
|
var VttError = class extends Error {
|
|
2216
2245
|
static {
|
|
2217
2246
|
__name(this, "VttError");
|
|
@@ -2263,7 +2292,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2263
2292
|
return cues;
|
|
2264
2293
|
}, "parseVtt");
|
|
2265
2294
|
|
|
2266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2267
2296
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2268
2297
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2269
2298
|
for (const file of files) {
|
|
@@ -2296,10 +2325,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2296
2325
|
return report;
|
|
2297
2326
|
}, "importFiles");
|
|
2298
2327
|
|
|
2299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2300
2329
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2301
2330
|
|
|
2302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2303
2332
|
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
2304
2333
|
if (typeof value !== "string" || !value.trim())
|
|
2305
2334
|
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
@@ -2350,7 +2379,7 @@ var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
|
2350
2379
|
return Object.freeze(result);
|
|
2351
2380
|
}, "validateMeetingChange");
|
|
2352
2381
|
|
|
2353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2354
2383
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2355
2384
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2356
2385
|
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)))
|
|
@@ -2363,7 +2392,7 @@ var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
|
2363
2392
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2364
2393
|
}, "validateMeetingPassage");
|
|
2365
2394
|
|
|
2366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2367
2396
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2368
2397
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2369
2398
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2388,7 +2417,7 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2388
2417
|
return { ...input, limit, maxReadBytes };
|
|
2389
2418
|
}, "validateMeetingPreparationContext");
|
|
2390
2419
|
|
|
2391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2392
2421
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
2393
2422
|
var id = pipe(string(), minLength(1));
|
|
2394
2423
|
var meetingProjectEvidence = strictObject({
|
|
@@ -2509,7 +2538,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
2509
2538
|
};
|
|
2510
2539
|
}, "meetingProjectEvidenceAnswer");
|
|
2511
2540
|
|
|
2512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2513
2542
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2514
2543
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2515
2544
|
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) || [
|
|
@@ -2529,7 +2558,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
2529
2558
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2530
2559
|
}, "validateMeetingHitSearch");
|
|
2531
2560
|
|
|
2532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2533
2562
|
var ids = {
|
|
2534
2563
|
meeting_id: "meetingId",
|
|
2535
2564
|
identity_id: "participantIdentityId",
|
|
@@ -2565,8 +2594,8 @@ var MEETING_PROJECT_EVIDENCE_QUERY = defineQuery({
|
|
|
2565
2594
|
]
|
|
2566
2595
|
});
|
|
2567
2596
|
var requestKeys = /* @__PURE__ */ new Set(["query", "limit", "cursor", "maxReadBytes", "signal"]);
|
|
2568
|
-
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((
|
|
2569
|
-
if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof
|
|
2597
|
+
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request = {}, now = Date.now()) => {
|
|
2598
|
+
if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof project2 !== "string" || !project2.trim() || project2.length > 200 || /[\p{Cc}\p{Cf}]/u.test(project2) || request.query !== void 0 && typeof request.query !== "string")
|
|
2570
2599
|
throw new CliError("validation_error", "expected an existing project and bounded evidence arguments");
|
|
2571
2600
|
if (request.query !== void 0 && new TextEncoder().encode(request.query).byteLength > 8192 || [request.limit, request.maxReadBytes].some((value) => value !== void 0 && typeof value !== "number"))
|
|
2572
2601
|
throw new CliError("validation_error", "invalid project evidence query or budget");
|
|
@@ -2614,26 +2643,26 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {
|
|
|
2614
2643
|
options.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
2615
2644
|
frozen.push(`started_at:[${options.since === void 0 ? "*" : `"${new Date(options.since).toISOString()}"`} TO ${options.until === void 0 ? "*" : `"${new Date(options.until).toISOString()}"`}]`);
|
|
2616
2645
|
}
|
|
2617
|
-
validateMeetingHitSearch(
|
|
2646
|
+
validateMeetingHitSearch(project2, options);
|
|
2618
2647
|
if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !/^[A-Za-z0-9_-]{1,4096}$/.test(options.cursor)))
|
|
2619
2648
|
throw new CliError("validation_error", "invalid project evidence cursor");
|
|
2620
|
-
return { project:
|
|
2649
|
+
return { project: project2.trim(), options, query: frozen.join(" AND ") };
|
|
2621
2650
|
}, "prepareMeetingProjectEvidence");
|
|
2622
2651
|
|
|
2623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2624
|
-
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read,
|
|
2625
|
-
const prepared = prepareMeetingProjectEvidence(
|
|
2652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2653
|
+
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project2, request = {}, now = Date.now()) => {
|
|
2654
|
+
const prepared = prepareMeetingProjectEvidence(project2, request, now);
|
|
2626
2655
|
const page = await read(prepared.project, prepared.options);
|
|
2627
2656
|
prepared.options.signal?.throwIfAborted();
|
|
2628
2657
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2629
2658
|
}, "readMeetingProjectEvidence");
|
|
2630
2659
|
|
|
2631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2632
2661
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2633
|
-
const { identityExternalId, ...
|
|
2662
|
+
const { identityExternalId, ...fields } = p;
|
|
2634
2663
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
2635
2664
|
return {
|
|
2636
|
-
...
|
|
2665
|
+
...fields,
|
|
2637
2666
|
identity: {
|
|
2638
2667
|
provider,
|
|
2639
2668
|
externalId,
|
|
@@ -2655,20 +2684,20 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
2655
2684
|
const from = timestamp2(since) - lookbackMs;
|
|
2656
2685
|
const meetings = await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString());
|
|
2657
2686
|
for (const m of meetings) {
|
|
2658
|
-
const
|
|
2687
|
+
const id4 = m.occurrence.id;
|
|
2659
2688
|
const read = /* @__PURE__ */ __name(async (part, call) => {
|
|
2660
2689
|
try {
|
|
2661
2690
|
return await call();
|
|
2662
2691
|
} catch (error) {
|
|
2663
2692
|
failed = true;
|
|
2664
2693
|
const message = error instanceof Error ? error.message : "could not be read";
|
|
2665
|
-
report.warnings.push({ externalId:
|
|
2694
|
+
report.warnings.push({ externalId: id4, message: `${part}: ${message}` });
|
|
2666
2695
|
return void 0;
|
|
2667
2696
|
}
|
|
2668
2697
|
}, "read");
|
|
2669
2698
|
try {
|
|
2670
|
-
const sourceParticipants = await read("participants", () => source.participants(
|
|
2671
|
-
const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider,
|
|
2699
|
+
const sourceParticipants = await read("participants", () => source.participants(id4));
|
|
2700
|
+
const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id4, i, options.accountId));
|
|
2672
2701
|
const names = /* @__PURE__ */ new Map();
|
|
2673
2702
|
for (const p of participants)
|
|
2674
2703
|
if (p.displayName !== null) {
|
|
@@ -2677,18 +2706,18 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
2677
2706
|
names.set(p.displayName, identities);
|
|
2678
2707
|
}
|
|
2679
2708
|
if ([...names.values()].some((ids2) => ids2.size > 1))
|
|
2680
|
-
report.warnings.push({ externalId:
|
|
2681
|
-
const lines = await read("transcript", () => source.transcript(
|
|
2682
|
-
const chat = await read("chat", () => source.chat(
|
|
2683
|
-
const summary = await read("summary", () => source.summary(
|
|
2684
|
-
const attachments = await read("files", () => source.files(
|
|
2709
|
+
report.warnings.push({ externalId: id4, message: "Participant names are ambiguous" });
|
|
2710
|
+
const lines = await read("transcript", () => source.transcript(id4));
|
|
2711
|
+
const chat = await read("chat", () => source.chat(id4));
|
|
2712
|
+
const summary = await read("summary", () => source.summary(id4));
|
|
2713
|
+
const attachments = await read("files", () => source.files(id4));
|
|
2685
2714
|
const startedAt = timestamp2(m.occurrence.startedAt);
|
|
2686
2715
|
const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
2687
2716
|
if (endedAt !== null && endedAt < startedAt)
|
|
2688
2717
|
throw new Error("Meeting ends before it starts");
|
|
2689
2718
|
const meeting2 = {
|
|
2690
2719
|
accountId: options.accountId,
|
|
2691
|
-
externalId:
|
|
2720
|
+
externalId: id4,
|
|
2692
2721
|
title: m.occurrence.title,
|
|
2693
2722
|
description: m.description ?? null,
|
|
2694
2723
|
location: m.location ?? null,
|
|
@@ -2759,7 +2788,7 @@ unlinked`, format)],
|
|
|
2759
2788
|
report.summaries += summary ? 1 : 0;
|
|
2760
2789
|
} catch (error) {
|
|
2761
2790
|
failed = true;
|
|
2762
|
-
report.warnings.push({ externalId:
|
|
2791
|
+
report.warnings.push({ externalId: id4, message: error instanceof Error ? error.message : "Meeting pull failed" });
|
|
2763
2792
|
}
|
|
2764
2793
|
}
|
|
2765
2794
|
if (!failed)
|
|
@@ -2767,47 +2796,47 @@ unlinked`, format)],
|
|
|
2767
2796
|
return report;
|
|
2768
2797
|
}, "pull");
|
|
2769
2798
|
|
|
2770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2771
|
-
var
|
|
2799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
2800
|
+
var text4 = string();
|
|
2772
2801
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
2773
2802
|
var id2 = pipe(number(), integer(), minValue(1));
|
|
2774
2803
|
var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
2775
2804
|
var meetingReview = strictObject({
|
|
2776
2805
|
ref: reference,
|
|
2777
2806
|
id: pipe(string(), minLength(1)),
|
|
2778
|
-
title: nullable(
|
|
2807
|
+
title: nullable(text4),
|
|
2779
2808
|
started_at: nullable(isoTime),
|
|
2780
2809
|
duration_ms: nullable(count5),
|
|
2781
2810
|
participants_count: nullable(count5),
|
|
2782
|
-
projects: array(
|
|
2811
|
+
projects: array(text4),
|
|
2783
2812
|
/** Null when the meeting has no current transcript. */
|
|
2784
2813
|
transcript: nullable(strictObject({ lines: count5, words: count5 })),
|
|
2785
2814
|
/** The three who talked longest. */
|
|
2786
|
-
speakers: array(strictObject({ name: nullable(
|
|
2815
|
+
speakers: array(strictObject({ name: nullable(text4), talk_ms: count5 })),
|
|
2787
2816
|
/** The newest stored summary; null when there is none. */
|
|
2788
2817
|
summary: nullable(strictObject({
|
|
2789
|
-
source:
|
|
2790
|
-
title: nullable(
|
|
2791
|
-
overview: nullable(
|
|
2792
|
-
next_steps: array(
|
|
2793
|
-
url: nullable(
|
|
2818
|
+
source: text4,
|
|
2819
|
+
title: nullable(text4),
|
|
2820
|
+
overview: nullable(text4),
|
|
2821
|
+
next_steps: array(text4),
|
|
2822
|
+
url: nullable(text4)
|
|
2794
2823
|
}))
|
|
2795
2824
|
});
|
|
2796
2825
|
var meetingLink = strictObject({
|
|
2797
|
-
url:
|
|
2798
|
-
domain: nullable(
|
|
2826
|
+
url: text4,
|
|
2827
|
+
domain: nullable(text4),
|
|
2799
2828
|
/** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
|
|
2800
|
-
document_id: nullable(
|
|
2829
|
+
document_id: nullable(text4),
|
|
2801
2830
|
count: count5,
|
|
2802
2831
|
first_at: isoTime,
|
|
2803
2832
|
last_at: isoTime,
|
|
2804
|
-
senders: array(
|
|
2805
|
-
meetings: array(strictObject({ ref: reference, title: nullable(
|
|
2833
|
+
senders: array(text4),
|
|
2834
|
+
meetings: array(strictObject({ ref: reference, title: nullable(text4) }))
|
|
2806
2835
|
});
|
|
2807
2836
|
var meetingSpeaker = strictObject({
|
|
2808
2837
|
/** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
|
|
2809
|
-
key:
|
|
2810
|
-
name: nullable(
|
|
2838
|
+
key: text4,
|
|
2839
|
+
name: nullable(text4),
|
|
2811
2840
|
person_id: nullable(id2),
|
|
2812
2841
|
identity_id: nullable(id2),
|
|
2813
2842
|
meetings: count5,
|
|
@@ -2818,18 +2847,18 @@ var meetingSpeaker = strictObject({
|
|
|
2818
2847
|
share: pipe(number(), minValue(0), maxValue(1))
|
|
2819
2848
|
});
|
|
2820
2849
|
var meetingStats = strictObject({
|
|
2821
|
-
time_zone:
|
|
2850
|
+
time_zone: text4,
|
|
2822
2851
|
meetings: count5,
|
|
2823
2852
|
lines: count5,
|
|
2824
2853
|
words: count5,
|
|
2825
2854
|
talk_ms: count5,
|
|
2826
2855
|
/** `week_start` is the Monday, as a date in `time_zone`. */
|
|
2827
|
-
weeks: array(strictObject({ week_start:
|
|
2856
|
+
weeks: array(strictObject({ week_start: text4, meetings: count5, talk_ms: count5 })),
|
|
2828
2857
|
top_speakers: array(meetingSpeaker)
|
|
2829
2858
|
});
|
|
2830
2859
|
var meetingCountsRow = strictObject({
|
|
2831
|
-
key:
|
|
2832
|
-
name: nullable(
|
|
2860
|
+
key: text4,
|
|
2861
|
+
name: nullable(text4),
|
|
2833
2862
|
meetings: count5,
|
|
2834
2863
|
minutes: count5,
|
|
2835
2864
|
mean_minutes: nullable(number()),
|
|
@@ -2849,13 +2878,13 @@ var meetingParticipants = strictObject({
|
|
|
2849
2878
|
schema_version: literal(1),
|
|
2850
2879
|
kind: literal("meeting_participants"),
|
|
2851
2880
|
account_id: id2,
|
|
2852
|
-
query:
|
|
2881
|
+
query: text4,
|
|
2853
2882
|
items: array(strictObject({
|
|
2854
2883
|
participant_id: id2,
|
|
2855
2884
|
meeting_id: id2,
|
|
2856
2885
|
identity_id: id2,
|
|
2857
|
-
display_name: nullable(
|
|
2858
|
-
email: nullable(
|
|
2886
|
+
display_name: nullable(text4),
|
|
2887
|
+
email: nullable(text4)
|
|
2859
2888
|
})),
|
|
2860
2889
|
/** Several identities on one page are observations, never speaker attribution or person links. */
|
|
2861
2890
|
ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id2) }),
|
|
@@ -2869,7 +2898,7 @@ var meetingParticipants = strictObject({
|
|
|
2869
2898
|
mode: literal("cursor"),
|
|
2870
2899
|
limit: count5,
|
|
2871
2900
|
has_more: boolean(),
|
|
2872
|
-
next_cursor: optional(
|
|
2901
|
+
next_cursor: optional(text4)
|
|
2873
2902
|
})
|
|
2874
2903
|
});
|
|
2875
2904
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -2878,8 +2907,8 @@ var meetingPassage = strictObject({
|
|
|
2878
2907
|
kind: literal("meeting_context"),
|
|
2879
2908
|
source: reference,
|
|
2880
2909
|
target_ref: reference,
|
|
2881
|
-
target_fingerprint:
|
|
2882
|
-
fingerprint:
|
|
2910
|
+
target_fingerprint: text4,
|
|
2911
|
+
fingerprint: text4,
|
|
2883
2912
|
revision,
|
|
2884
2913
|
limits: strictObject({ before: count5, after: count5, bytes: count5, max_read_bytes: count5 }),
|
|
2885
2914
|
content_bytes: count5,
|
|
@@ -2898,30 +2927,30 @@ var meetingPassage = strictObject({
|
|
|
2898
2927
|
}),
|
|
2899
2928
|
items: array(strictObject({
|
|
2900
2929
|
ref: reference,
|
|
2901
|
-
fingerprint:
|
|
2930
|
+
fingerprint: text4,
|
|
2902
2931
|
transcript_id: id2,
|
|
2903
|
-
content_hash: nullable(
|
|
2932
|
+
content_hash: nullable(text4),
|
|
2904
2933
|
position: count5,
|
|
2905
2934
|
start_ms: count5,
|
|
2906
2935
|
end_ms: count5,
|
|
2907
2936
|
speaker_participant_id: nullable(id2),
|
|
2908
|
-
speaker_name: nullable(
|
|
2909
|
-
text:
|
|
2937
|
+
speaker_name: nullable(text4),
|
|
2938
|
+
text: text4,
|
|
2910
2939
|
revision
|
|
2911
2940
|
}))
|
|
2912
2941
|
});
|
|
2913
2942
|
var event = strictObject({
|
|
2914
2943
|
id: pipe(string(), minLength(1)),
|
|
2915
|
-
event_series_id: nullable(
|
|
2916
|
-
title: nullable(
|
|
2917
|
-
description: nullable(
|
|
2918
|
-
location: nullable(
|
|
2944
|
+
event_series_id: nullable(text4),
|
|
2945
|
+
title: nullable(text4),
|
|
2946
|
+
description: nullable(text4),
|
|
2947
|
+
location: nullable(text4),
|
|
2919
2948
|
starts_at: nullable(isoTime),
|
|
2920
2949
|
ends_at: nullable(isoTime),
|
|
2921
|
-
timezone: nullable(
|
|
2950
|
+
timezone: nullable(text4),
|
|
2922
2951
|
/** `auto`: made from a meeting; `owner`: made by hand; `calendar`: from a calendar's entries. */
|
|
2923
2952
|
origin: picklist(["auto", "owner", "calendar"]),
|
|
2924
|
-
status: nullable(
|
|
2953
|
+
status: nullable(text4),
|
|
2925
2954
|
all_day: boolean(),
|
|
2926
2955
|
/** When its calendar deleted it: shown as "deleted in Google", kept as history. */
|
|
2927
2956
|
source_deleted_at: nullable(isoTime),
|
|
@@ -2929,7 +2958,7 @@ var event = strictObject({
|
|
|
2929
2958
|
created_at: isoTime,
|
|
2930
2959
|
updated_at: isoTime,
|
|
2931
2960
|
/** The fields whoever sent the invitation wrote, on a calendar CLI's `events list`: an agent reads them as data. */
|
|
2932
|
-
untrusted: optional(array(
|
|
2961
|
+
untrusted: optional(array(text4)),
|
|
2933
2962
|
/** On a calendar CLI's `events list changed:<date>`: what changed since then, and when the store saw it. */
|
|
2934
2963
|
change: optional(picklist(["new", "moved", "cancelled"])),
|
|
2935
2964
|
changed_at: optional(nullable(isoTime)),
|
|
@@ -2941,7 +2970,7 @@ var event = strictObject({
|
|
|
2941
2970
|
*/
|
|
2942
2971
|
overlapping: optional(boolean()),
|
|
2943
2972
|
/** With `overlapping:true`: the events it overlaps, as `event:<id>`. */
|
|
2944
|
-
overlaps: optional(array(
|
|
2973
|
+
overlaps: optional(array(text4))
|
|
2945
2974
|
});
|
|
2946
2975
|
var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
2947
2976
|
id: String(one.id),
|
|
@@ -2961,10 +2990,10 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
2961
2990
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
2962
2991
|
}), "eventItem");
|
|
2963
2992
|
|
|
2964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
2965
2994
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
2966
2995
|
|
|
2967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
2968
2997
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
2969
2998
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2970
2999
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -2975,7 +3004,7 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
2975
3004
|
const positive = /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value > 0, "positive");
|
|
2976
3005
|
if (!positive(input.accountId) || !positive(input.seriesId))
|
|
2977
3006
|
throw new CliError("validation_error", "accountId and seriesId must be positive safe integers");
|
|
2978
|
-
if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((
|
|
3007
|
+
if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id4) => !positive(id4)))
|
|
2979
3008
|
throw new CliError("validation_error", "anchorIds must contain at most 20 positive safe integers");
|
|
2980
3009
|
for (const key of ["after", "before"])
|
|
2981
3010
|
if (!Number.isSafeInteger(input[key]) || Math.abs(input[key]) > 864e13)
|
|
@@ -2994,14 +3023,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
2994
3023
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
2995
3024
|
}, "validateMeetingRelatedHistory");
|
|
2996
3025
|
|
|
2997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
2998
3027
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
2999
3028
|
|
|
3000
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3001
3030
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3002
3031
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3003
3032
|
|
|
3004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3005
3034
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3006
3035
|
input.signal?.throwIfAborted();
|
|
3007
3036
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3022,19 +3051,19 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3022
3051
|
return { ...input, limit, maxReadBytes };
|
|
3023
3052
|
}, "validateMeetingSeriesHistory");
|
|
3024
3053
|
|
|
3025
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3026
3055
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
3027
3056
|
|
|
3028
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3029
3058
|
function invalid4(field, response = false) {
|
|
3030
3059
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3031
3060
|
}
|
|
3032
3061
|
__name(invalid4, "invalid");
|
|
3033
|
-
var object2 = /* @__PURE__ */ __name((value,
|
|
3062
|
+
var object2 = /* @__PURE__ */ __name((value, fields, field, response = false) => {
|
|
3034
3063
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
3035
3064
|
invalid4(field, response);
|
|
3036
3065
|
for (const key of Object.keys(value))
|
|
3037
|
-
if (!
|
|
3066
|
+
if (!fields.includes(key))
|
|
3038
3067
|
invalid4(`${field}.${key}`, response);
|
|
3039
3068
|
}, "object");
|
|
3040
3069
|
var cursorDetails = /* @__PURE__ */ __name((value) => {
|
|
@@ -3054,7 +3083,7 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3054
3083
|
cursorDetails(value);
|
|
3055
3084
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3056
3085
|
|
|
3057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
3058
3087
|
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
3059
3088
|
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3060
3089
|
const zone = timeZone ?? "UTC";
|
|
@@ -3118,8 +3147,8 @@ var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, lim
|
|
|
3118
3147
|
const kept = ordered.slice(0, limit);
|
|
3119
3148
|
if (by !== "series")
|
|
3120
3149
|
kept.reverse();
|
|
3121
|
-
const counted = /* @__PURE__ */ __name(({ meetings:
|
|
3122
|
-
meetings:
|
|
3150
|
+
const counted = /* @__PURE__ */ __name(({ meetings: count7, ms, timed, transcripts }) => ({
|
|
3151
|
+
meetings: count7,
|
|
3123
3152
|
minutes: minutesOf(ms),
|
|
3124
3153
|
meanMinutes: meanOf(ms, timed),
|
|
3125
3154
|
transcripts
|
|
@@ -3189,7 +3218,7 @@ var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
|
3189
3218
|
};
|
|
3190
3219
|
}, "aggregateMeetingStats");
|
|
3191
3220
|
|
|
3192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
3193
3222
|
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
3194
3223
|
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
3195
3224
|
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
@@ -3203,7 +3232,7 @@ var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
|
3203
3232
|
return tag;
|
|
3204
3233
|
}, "normalizeTag");
|
|
3205
3234
|
|
|
3206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
3207
3236
|
var LINK_KINDS = [
|
|
3208
3237
|
"links-to",
|
|
3209
3238
|
"blocked-by",
|
|
@@ -3224,7 +3253,7 @@ var LINK_SOURCES = [...LINK_ORIGINS, "calendar"];
|
|
|
3224
3253
|
var RELATION_KINDS = ["member-of", "related-to"];
|
|
3225
3254
|
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
3226
3255
|
|
|
3227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
3228
3257
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
3229
3258
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
3230
3259
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -3239,13 +3268,13 @@ function closeTask(task, state, by, at, reason) {
|
|
|
3239
3268
|
}
|
|
3240
3269
|
__name(closeTask, "closeTask");
|
|
3241
3270
|
|
|
3242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
3243
3272
|
function matches2(task, filter) {
|
|
3244
3273
|
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);
|
|
3245
3274
|
}
|
|
3246
3275
|
__name(matches2, "matches");
|
|
3247
3276
|
|
|
3248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
3249
3278
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
3250
3279
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
3251
3280
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -3274,12 +3303,12 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
3274
3303
|
}, "priorityOf");
|
|
3275
3304
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
3276
3305
|
|
|
3277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
3278
3307
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
3279
|
-
async function find(
|
|
3280
|
-
const task = await store.get(
|
|
3308
|
+
async function find(id4) {
|
|
3309
|
+
const task = await store.get(id4);
|
|
3281
3310
|
if (!task)
|
|
3282
|
-
throw new CliError("not_found", `no task ${
|
|
3311
|
+
throw new CliError("not_found", `no task ${id4}`);
|
|
3283
3312
|
return task;
|
|
3284
3313
|
}
|
|
3285
3314
|
__name(find, "find");
|
|
@@ -3301,8 +3330,8 @@ function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PUR
|
|
|
3301
3330
|
return { task, created: true };
|
|
3302
3331
|
return { task, created: true, review: await store.reviewDuplicates(task.id) };
|
|
3303
3332
|
},
|
|
3304
|
-
async close(
|
|
3305
|
-
const task = closeTask(await find(
|
|
3333
|
+
async close(id4, { as, by, reason }) {
|
|
3334
|
+
const task = closeTask(await find(id4), as, by, now(), reason);
|
|
3306
3335
|
await store.update(task);
|
|
3307
3336
|
return task;
|
|
3308
3337
|
},
|
|
@@ -3334,7 +3363,7 @@ function median(values) {
|
|
|
3334
3363
|
}
|
|
3335
3364
|
__name(median, "median");
|
|
3336
3365
|
|
|
3337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
3338
3367
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
3339
3368
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
3340
3369
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -3342,6 +3371,184 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
3342
3371
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
3343
3372
|
var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
3344
3373
|
|
|
3374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/money.js
|
|
3375
|
+
var CURRENCY_SCALES = {
|
|
3376
|
+
AED: 2,
|
|
3377
|
+
AMD: 2,
|
|
3378
|
+
AUD: 2,
|
|
3379
|
+
BHD: 3,
|
|
3380
|
+
BYN: 2,
|
|
3381
|
+
CAD: 2,
|
|
3382
|
+
CHF: 2,
|
|
3383
|
+
CLP: 0,
|
|
3384
|
+
CNY: 2,
|
|
3385
|
+
CZK: 2,
|
|
3386
|
+
DKK: 2,
|
|
3387
|
+
EUR: 2,
|
|
3388
|
+
GBP: 2,
|
|
3389
|
+
GEL: 2,
|
|
3390
|
+
HUF: 2,
|
|
3391
|
+
ILS: 2,
|
|
3392
|
+
INR: 2,
|
|
3393
|
+
ISK: 0,
|
|
3394
|
+
JPY: 0,
|
|
3395
|
+
KGS: 2,
|
|
3396
|
+
KRW: 0,
|
|
3397
|
+
KWD: 3,
|
|
3398
|
+
KZT: 2,
|
|
3399
|
+
NOK: 2,
|
|
3400
|
+
PLN: 2,
|
|
3401
|
+
RSD: 2,
|
|
3402
|
+
RUB: 2,
|
|
3403
|
+
SEK: 2,
|
|
3404
|
+
THB: 2,
|
|
3405
|
+
TRY: 2,
|
|
3406
|
+
UAH: 2,
|
|
3407
|
+
USD: 2,
|
|
3408
|
+
UZS: 2,
|
|
3409
|
+
VND: 0
|
|
3410
|
+
};
|
|
3411
|
+
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
3412
|
+
throw new CliError("validation_error", message, { reason });
|
|
3413
|
+
}, "refuse");
|
|
3414
|
+
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
3415
|
+
var parseDecimal = /* @__PURE__ */ __name((text6, scale) => {
|
|
3416
|
+
const match = DECIMAL.exec(text6.trim());
|
|
3417
|
+
if (!match || (match[2] ?? "").length > scale)
|
|
3418
|
+
return void 0;
|
|
3419
|
+
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
3420
|
+
}, "parseDecimal");
|
|
3421
|
+
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
3422
|
+
const digits = BigInt(units).toString().padStart(scale + 1, "0");
|
|
3423
|
+
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
3424
|
+
}, "formatDecimal");
|
|
3425
|
+
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
3426
|
+
const [whole = "0", fraction] = decimal.split(".");
|
|
3427
|
+
const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
3428
|
+
return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
|
|
3429
|
+
}, "groupDigits");
|
|
3430
|
+
var currencyOf = /* @__PURE__ */ __name((text6) => {
|
|
3431
|
+
const code = typeof text6 === "string" ? text6.trim().toUpperCase() : "";
|
|
3432
|
+
if (CURRENCY_SCALES[code] === void 0)
|
|
3433
|
+
return refuse(`${typeof text6 === "string" && text6.trim() ? text6.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
3434
|
+
return code;
|
|
3435
|
+
}, "currencyOf");
|
|
3436
|
+
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
3437
|
+
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
3438
|
+
const scale = scaleOf(currency);
|
|
3439
|
+
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
3440
|
+
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
3441
|
+
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
3442
|
+
return Number(units);
|
|
3443
|
+
}, "minorUnits");
|
|
3444
|
+
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
3445
|
+
amount: formatDecimal(units, scaleOf(currency)),
|
|
3446
|
+
currency
|
|
3447
|
+
}), "moneyOf");
|
|
3448
|
+
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
3449
|
+
var QUANTITY_SCALE = 3;
|
|
3450
|
+
var quantityOf = /* @__PURE__ */ __name((text6) => {
|
|
3451
|
+
const thousandths = typeof text6 === "string" ? parseDecimal(text6, QUANTITY_SCALE) : void 0;
|
|
3452
|
+
if (thousandths === void 0 || thousandths === 0n)
|
|
3453
|
+
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
3454
|
+
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
3455
|
+
return { text: plain, thousandths };
|
|
3456
|
+
}, "quantityOf");
|
|
3457
|
+
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
3458
|
+
|
|
3459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
3460
|
+
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
3461
|
+
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
3462
|
+
var MONEY_DIRECTIONS = ["in", "out"];
|
|
3463
|
+
var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
|
|
3464
|
+
var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
|
|
3465
|
+
if (current === "draft" || current === "void")
|
|
3466
|
+
return current;
|
|
3467
|
+
if (paid <= 0)
|
|
3468
|
+
return "issued";
|
|
3469
|
+
return paid < total ? "partly_paid" : "paid";
|
|
3470
|
+
}, "settledStatus");
|
|
3471
|
+
var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
|
|
3472
|
+
var notes = /* @__PURE__ */ __name((...words2) => {
|
|
3473
|
+
const kept = words2.filter((word) => word !== null);
|
|
3474
|
+
return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
|
|
3475
|
+
}, "notes");
|
|
3476
|
+
var invoiceLine = /* @__PURE__ */ __name((invoice) => {
|
|
3477
|
+
const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
|
|
3478
|
+
const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
|
|
3479
|
+
return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
|
|
3480
|
+
}, "invoiceLine");
|
|
3481
|
+
var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
3482
|
+
const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
|
|
3483
|
+
return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
|
|
3484
|
+
}, "paymentLine");
|
|
3485
|
+
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
3486
|
+
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
3487
|
+
|
|
3488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
3489
|
+
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
3490
|
+
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
3491
|
+
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
3492
|
+
const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
|
|
3493
|
+
const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
|
|
3494
|
+
return `${order.number ?? `#${order.id}`} \xB7 ${order.supplierName}${money} (${notes2})`;
|
|
3495
|
+
}, "orderLine");
|
|
3496
|
+
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
3497
|
+
|
|
3498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
3499
|
+
var text5 = string();
|
|
3500
|
+
var id3 = pipe(string(), minLength(1));
|
|
3501
|
+
var time = isoTime;
|
|
3502
|
+
var zonedTime = pipe(string(), isoTimestamp("an ISO 8601 time with a zone"));
|
|
3503
|
+
var count6 = pipe(number(), integer(), minValue(0));
|
|
3504
|
+
var untrusted = optional(array(text5));
|
|
3505
|
+
var providerMetadata = optional(record(string(), unknown()));
|
|
3506
|
+
var evidenceSource = strictObject({
|
|
3507
|
+
ref: nullable(reference),
|
|
3508
|
+
kind: text5,
|
|
3509
|
+
title: nullable(text5),
|
|
3510
|
+
sender: nullable(text5),
|
|
3511
|
+
at: nullable(time),
|
|
3512
|
+
excerpt: nullable(text5),
|
|
3513
|
+
tool: nullable(text5),
|
|
3514
|
+
missing: boolean()
|
|
3515
|
+
});
|
|
3516
|
+
var author = strictObject({
|
|
3517
|
+
type: picklist(["person", "bot"]),
|
|
3518
|
+
id: id3,
|
|
3519
|
+
name: nullable(text5)
|
|
3520
|
+
});
|
|
3521
|
+
|
|
3522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
3523
|
+
var organization = strictObject({
|
|
3524
|
+
id: id3,
|
|
3525
|
+
ref: reference,
|
|
3526
|
+
kind: picklist(["company", "team", "family", "community"]),
|
|
3527
|
+
name: text5,
|
|
3528
|
+
scope: picklist(["personal", "work"]),
|
|
3529
|
+
created_at: time
|
|
3530
|
+
});
|
|
3531
|
+
var project = strictObject({
|
|
3532
|
+
id: id3,
|
|
3533
|
+
ref: reference,
|
|
3534
|
+
key: text5,
|
|
3535
|
+
name: text5,
|
|
3536
|
+
kind: picklist(["project", "inbox"]),
|
|
3537
|
+
type: picklist(["work", "client", "personal", "oss", "other"]),
|
|
3538
|
+
organization_id: nullable(id3),
|
|
3539
|
+
scope: picklist(["personal", "work"]),
|
|
3540
|
+
created_at: time
|
|
3541
|
+
});
|
|
3542
|
+
var reminder = strictObject({
|
|
3543
|
+
id: id3,
|
|
3544
|
+
task: text5,
|
|
3545
|
+
due_at: time,
|
|
3546
|
+
timezone: text5,
|
|
3547
|
+
state: picklist(["pending", "leased", "delivered", "cancelled"]),
|
|
3548
|
+
revision: number(),
|
|
3549
|
+
receipt: nullable(text5)
|
|
3550
|
+
});
|
|
3551
|
+
|
|
3345
3552
|
export {
|
|
3346
3553
|
QUERY_LIMITS,
|
|
3347
3554
|
queryAstSchema,
|
|
@@ -3398,14 +3605,15 @@ export {
|
|
|
3398
3605
|
validatePayment,
|
|
3399
3606
|
paymentTitle,
|
|
3400
3607
|
meetingTimestamp,
|
|
3608
|
+
findingText,
|
|
3401
3609
|
findingHash,
|
|
3610
|
+
findingFields,
|
|
3611
|
+
findingNeeds,
|
|
3402
3612
|
validEvidence,
|
|
3403
3613
|
findingId,
|
|
3404
3614
|
validateFinding,
|
|
3405
3615
|
validateBatch,
|
|
3406
3616
|
validateFindings,
|
|
3407
|
-
findingText,
|
|
3408
|
-
findingFields,
|
|
3409
3617
|
findingFingerprint,
|
|
3410
3618
|
MEETING_FINDINGS_KIND,
|
|
3411
3619
|
validateMeetingFindings,
|
|
@@ -3468,5 +3676,39 @@ export {
|
|
|
3468
3676
|
MEMORY_STATUSES,
|
|
3469
3677
|
MEMORY_SCOPES,
|
|
3470
3678
|
WORK_TASK_TYPES,
|
|
3471
|
-
TASK_TYPES2 as TASK_TYPES
|
|
3679
|
+
TASK_TYPES2 as TASK_TYPES,
|
|
3680
|
+
parseDecimal,
|
|
3681
|
+
formatDecimal,
|
|
3682
|
+
currencyOf,
|
|
3683
|
+
scaleOf,
|
|
3684
|
+
minorUnits,
|
|
3685
|
+
moneyOf,
|
|
3686
|
+
moneyLabel,
|
|
3687
|
+
quantityOf,
|
|
3688
|
+
lineUnits,
|
|
3689
|
+
INVOICE_DIRECTIONS,
|
|
3690
|
+
INVOICE_STATUSES,
|
|
3691
|
+
MONEY_DIRECTIONS,
|
|
3692
|
+
FINANCE_REVIEWS,
|
|
3693
|
+
settledStatus,
|
|
3694
|
+
invoiceLine,
|
|
3695
|
+
paymentLine,
|
|
3696
|
+
invoiceTitle,
|
|
3697
|
+
paymentEntryTitle,
|
|
3698
|
+
ORDER_STATUSES,
|
|
3699
|
+
ORDER_PURPOSES,
|
|
3700
|
+
orderLine,
|
|
3701
|
+
orderTitle,
|
|
3702
|
+
text5 as text,
|
|
3703
|
+
id3 as id,
|
|
3704
|
+
time,
|
|
3705
|
+
zonedTime,
|
|
3706
|
+
count6 as count,
|
|
3707
|
+
untrusted,
|
|
3708
|
+
providerMetadata,
|
|
3709
|
+
evidenceSource,
|
|
3710
|
+
author,
|
|
3711
|
+
organization,
|
|
3712
|
+
project,
|
|
3713
|
+
reminder
|
|
3472
3714
|
};
|