@wirecat/mail-cli 0.0.0-stage → 0.1.1
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/CHANGELOG.md +60 -0
- package/LICENSE +204 -0
- package/README.md +166 -2
- package/dist/bin/mail.d.ts +3 -0
- package/dist/bin/mail.d.ts.map +1 -0
- package/dist/bin/mail.js +36 -0
- package/dist/bin/mail.js.map +1 -0
- package/dist/bundle/all-profiles-TKMBELRZ.js +286 -0
- package/dist/bundle/anthropic-7LMUAEIZ.js +72 -0
- package/dist/bundle/app-server-JGMIJDD4.js +229 -0
- package/dist/bundle/bun-XRO6XJHQ.js +169 -0
- package/dist/bundle/bun-sqlite-Z54LEHVM.js +71 -0
- package/dist/bundle/chunk-2LLNPNMB.js +24 -0
- package/dist/bundle/chunk-3E3WA2L6.js +1932 -0
- package/dist/bundle/chunk-3KEVLSNN.js +138 -0
- package/dist/bundle/chunk-3KOA73LS.js +3416 -0
- package/dist/bundle/chunk-4E7BN3TC.js +122 -0
- package/dist/bundle/chunk-4FEMINO2.js +409 -0
- package/dist/bundle/chunk-52F5DWS5.js +27 -0
- package/dist/bundle/chunk-5BVIWP3S.js +71 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5NYMNSSO.js +264 -0
- package/dist/bundle/chunk-6MAZWSC3.js +132 -0
- package/dist/bundle/chunk-75CWWETH.js +379 -0
- package/dist/bundle/chunk-7SXGLT6T.js +444 -0
- package/dist/bundle/chunk-BTQX2ZSZ.js +288 -0
- package/dist/bundle/chunk-CEW6KIFA.js +1193 -0
- package/dist/bundle/chunk-CH6RXYAX.js +82 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-EOEDICIE.js +6848 -0
- package/dist/bundle/chunk-F6D6PJ34.js +100 -0
- package/dist/bundle/chunk-FDCGTODC.js +78 -0
- package/dist/bundle/chunk-FZ5FXIG6.js +18 -0
- package/dist/bundle/chunk-GAH7N7HO.js +8181 -0
- package/dist/bundle/chunk-GK4M2SUP.js +195 -0
- package/dist/bundle/chunk-GN62YOT5.js +161 -0
- package/dist/bundle/chunk-GQQJOH7A.js +7050 -0
- package/dist/bundle/chunk-GWDCKUBI.js +781 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-IK5TH3O7.js +217 -0
- package/dist/bundle/chunk-J3QXTBD2.js +2742 -0
- package/dist/bundle/chunk-J6MSJLIW.js +45 -0
- package/dist/bundle/chunk-JBBZCTTF.js +76 -0
- package/dist/bundle/chunk-JVMVLITS.js +260 -0
- package/dist/bundle/chunk-K4FVKPDQ.js +525 -0
- package/dist/bundle/chunk-KHTO2Q6E.js +886 -0
- package/dist/bundle/chunk-KM7Q67Z3.js +63 -0
- package/dist/bundle/chunk-LQ37ALDJ.js +2416 -0
- package/dist/bundle/chunk-MNOIRJEO.js +2315 -0
- package/dist/bundle/chunk-MS53RALV.js +168 -0
- package/dist/bundle/chunk-NK7EB63L.js +36225 -0
- package/dist/bundle/chunk-NPGVOZVK.js +2 -0
- package/dist/bundle/chunk-OTUOZ33L.js +82 -0
- package/dist/bundle/chunk-P7P5MNAU.js +46 -0
- package/dist/bundle/chunk-QLEUNU6G.js +537 -0
- package/dist/bundle/chunk-QQB7WT7R.js +216 -0
- package/dist/bundle/chunk-QX7RCLRS.js +23 -0
- package/dist/bundle/chunk-T6464KYA.js +35130 -0
- package/dist/bundle/chunk-TE5U5OAM.js +73 -0
- package/dist/bundle/chunk-TI6VBZKJ.js +166 -0
- package/dist/bundle/chunk-TQFCPUIM.js +53 -0
- package/dist/bundle/chunk-TVREDYX4.js +3574 -0
- package/dist/bundle/chunk-TWPDVUBR.js +106 -0
- package/dist/bundle/chunk-TWTATDM7.js +461 -0
- package/dist/bundle/chunk-UH4DDRHA.js +2989 -0
- package/dist/bundle/chunk-VEIZZRQ5.js +630 -0
- package/dist/bundle/chunk-WLFLBWNH.js +54 -0
- package/dist/bundle/chunk-WXAXYJJ7.js +486 -0
- package/dist/bundle/chunk-XQUUANA2.js +24600 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YO4CUH5E.js +33 -0
- package/dist/bundle/chunk-YPQQ5J4X.js +849 -0
- package/dist/bundle/chunk-Z34ICZA3.js +1028 -0
- package/dist/bundle/chunk-ZANYM66S.js +58 -0
- package/dist/bundle/chunk-ZD3WUGR2.js +142 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-WU434ZUL.js +34 -0
- package/dist/bundle/decode-YB3ZDTES.js +162 -0
- package/dist/bundle/dispatch-EUKKT3PD.js +411 -0
- package/dist/bundle/dist-A6GKSKFC.js +2072 -0
- package/dist/bundle/dist-HFUVURJG.js +7577 -0
- package/dist/bundle/echarts-YNGCOYHW.js +42501 -0
- package/dist/bundle/embed-LWNHIRBQ.js +37 -0
- package/dist/bundle/embedder-2LYD3U37.js +110 -0
- package/dist/bundle/failure-OAIC5VAP.js +24 -0
- package/dist/bundle/first-run-N3HJKGU7.js +27 -0
- package/dist/bundle/first-screen-4U2DMV3G.js +32 -0
- package/dist/bundle/instructions-GJHHFV64.js +11 -0
- package/dist/bundle/mail.js +166 -0
- package/dist/bundle/mcp-L7SRVDRN.js +167 -0
- package/dist/bundle/node-GFOH6FKP.js +176 -0
- package/dist/bundle/node-KM3CUABH.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-NBXQXBIU.js +63 -0
- package/dist/bundle/oauth-56EFO5AQ.js +19 -0
- package/dist/bundle/open-2V7QZQJP.js +21 -0
- package/dist/bundle/openai-V3SVACVL.js +251 -0
- package/dist/bundle/process-XVDX4SPD.js +91 -0
- package/dist/bundle/program-JTJB26P3.js +35542 -0
- package/dist/bundle/prompt-YKWAI222.js +14 -0
- package/dist/bundle/recognize-PAR66KVM.js +25 -0
- package/dist/bundle/remote-CE43TKXC.js +28 -0
- package/dist/bundle/rerank-M7S7P2TW.js +51 -0
- package/dist/bundle/serve-ENPMIV6J.js +197 -0
- package/dist/bundle/server-JRTHUCVY.js +63 -0
- package/dist/bundle/server-MBEZLVKZ.js +189 -0
- package/dist/bundle/sqlite-runtime-HVGDHBJJ.js +18 -0
- package/dist/bundle/state-QZSOSKBD.js +35 -0
- package/dist/bundle/store-2BUX6LVX.js +124 -0
- package/dist/bundle/store-UJ7SNKXI.js +141 -0
- package/dist/bundle/store-maintenance-command-I7V5C44K.js +52 -0
- package/dist/commands/account.d.ts +3 -0
- package/dist/commands/account.d.ts.map +1 -0
- package/dist/commands/account.js +47 -0
- package/dist/commands/account.js.map +1 -0
- package/dist/commands/context.d.ts +41 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +52 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/folders.d.ts +3 -0
- package/dist/commands/folders.d.ts.map +1 -0
- package/dist/commands/folders.js +36 -0
- package/dist/commands/folders.js.map +1 -0
- package/dist/commands/login.d.ts +5 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +21 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/mailbox.d.ts +16 -0
- package/dist/commands/mailbox.d.ts.map +1 -0
- package/dist/commands/mailbox.js +54 -0
- package/dist/commands/mailbox.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +211 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +89 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +3 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +190 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/config.d.ts +190 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +46 -0
- package/dist/config.js.map +1 -0
- package/dist/discovery.d.ts +42 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +179 -0
- package/dist/discovery.js.map +1 -0
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +16 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/mail/imap-errors.d.ts +4 -0
- package/dist/mail/imap-errors.d.ts.map +1 -0
- package/dist/mail/imap-errors.js +41 -0
- package/dist/mail/imap-errors.js.map +1 -0
- package/dist/mail/imap-messages.d.ts +18 -0
- package/dist/mail/imap-messages.d.ts.map +1 -0
- package/dist/mail/imap-messages.js +66 -0
- package/dist/mail/imap-messages.js.map +1 -0
- package/dist/mail/imap.d.ts +67 -0
- package/dist/mail/imap.d.ts.map +1 -0
- package/dist/mail/imap.js +348 -0
- package/dist/mail/imap.js.map +1 -0
- package/dist/profile.d.ts +16 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +31 -0
- package/dist/profile.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +52 -0
- package/dist/program.js.map +1 -0
- package/dist/providers.d.ts +53 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +106 -0
- package/dist/providers.js.map +1 -0
- package/dist/secret.d.ts +30 -0
- package/dist/secret.d.ts.map +1 -0
- package/dist/secret.js +68 -0
- package/dist/secret.js.map +1 -0
- package/dist/store.d.ts +12 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +25 -0
- package/dist/store.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +83 -4
- package/skills/mail-cli/SKILL.md +27 -0
|
@@ -0,0 +1,2989 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
RegistryError,
|
|
5
|
+
SNAKE_CASE,
|
|
6
|
+
STEPS,
|
|
7
|
+
array,
|
|
8
|
+
boolean,
|
|
9
|
+
defineReasons,
|
|
10
|
+
defineSteps,
|
|
11
|
+
duplicates,
|
|
12
|
+
integer,
|
|
13
|
+
isoTime,
|
|
14
|
+
lazy,
|
|
15
|
+
literal,
|
|
16
|
+
maxValue,
|
|
17
|
+
minLength,
|
|
18
|
+
minValue,
|
|
19
|
+
nullable,
|
|
20
|
+
number,
|
|
21
|
+
object,
|
|
22
|
+
optional,
|
|
23
|
+
pageSchema,
|
|
24
|
+
picklist,
|
|
25
|
+
pipe,
|
|
26
|
+
reference,
|
|
27
|
+
safeParse,
|
|
28
|
+
stepOf,
|
|
29
|
+
strictObject,
|
|
30
|
+
string,
|
|
31
|
+
union,
|
|
32
|
+
variant
|
|
33
|
+
} from "./chunk-LQ37ALDJ.js";
|
|
34
|
+
import {
|
|
35
|
+
CliError,
|
|
36
|
+
isCliError,
|
|
37
|
+
singleLine,
|
|
38
|
+
visibleControls
|
|
39
|
+
} from "./chunk-5BVIWP3S.js";
|
|
40
|
+
import {
|
|
41
|
+
__name
|
|
42
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
43
|
+
|
|
44
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
45
|
+
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
46
|
+
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
47
|
+
if (!Number.isSafeInteger(value) || value < minimum)
|
|
48
|
+
throw invalid();
|
|
49
|
+
return value;
|
|
50
|
+
}, "integer");
|
|
51
|
+
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
52
|
+
const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
|
|
53
|
+
if (reference2.transcriptId !== void 0)
|
|
54
|
+
parts.push(integer2(reference2.transcriptId));
|
|
55
|
+
if (reference2.cuePosition !== void 0) {
|
|
56
|
+
if (reference2.transcriptId === void 0)
|
|
57
|
+
throw invalid();
|
|
58
|
+
parts.push(integer2(reference2.cuePosition, 0));
|
|
59
|
+
}
|
|
60
|
+
return `meeting:${parts.join("/")}`;
|
|
61
|
+
}, "formatMeetingReference");
|
|
62
|
+
var parseMeetingReference = /* @__PURE__ */ __name((text6) => {
|
|
63
|
+
const value = text6.trim();
|
|
64
|
+
if (!value.startsWith("meeting:"))
|
|
65
|
+
throw invalid();
|
|
66
|
+
const parts = value.slice(8).split("/");
|
|
67
|
+
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
68
|
+
throw invalid();
|
|
69
|
+
const ids2 = parts.map(Number);
|
|
70
|
+
const reference2 = {
|
|
71
|
+
type: "meeting",
|
|
72
|
+
accountId: integer2(ids2[0]),
|
|
73
|
+
meetingId: integer2(ids2[1]),
|
|
74
|
+
...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
|
|
75
|
+
...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
|
|
76
|
+
};
|
|
77
|
+
return reference2;
|
|
78
|
+
}, "parseMeetingReference");
|
|
79
|
+
var canonicalMeetingReference = /* @__PURE__ */ __name((text6) => formatMeetingReference(parseMeetingReference(text6)), "canonicalMeetingReference");
|
|
80
|
+
|
|
81
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
82
|
+
var QUERY_LIMITS = {
|
|
83
|
+
bytes: 8192,
|
|
84
|
+
depth: 32,
|
|
85
|
+
nodes: 256
|
|
86
|
+
};
|
|
87
|
+
var spanSchema = object({ start: number(), end: number() });
|
|
88
|
+
var predicateSchema = object({
|
|
89
|
+
kind: literal("predicate"),
|
|
90
|
+
field: string(),
|
|
91
|
+
operator: picklist(["term", "phrase", "wildcard", "regex", "range"]),
|
|
92
|
+
value: string(),
|
|
93
|
+
upper: optional(string()),
|
|
94
|
+
lower_inclusive: optional(boolean()),
|
|
95
|
+
upper_inclusive: optional(boolean()),
|
|
96
|
+
span: spanSchema,
|
|
97
|
+
implicit: optional(literal(true)),
|
|
98
|
+
slop: optional(pipe(number(), integer(), minValue(0)))
|
|
99
|
+
});
|
|
100
|
+
var queryNodeSchema = variant("kind", [
|
|
101
|
+
predicateSchema,
|
|
102
|
+
object({
|
|
103
|
+
kind: literal("boolean"),
|
|
104
|
+
clauses: array(object({ occur: picklist(["must", "should", "must_not"]), node: lazy(() => queryNodeSchema) })),
|
|
105
|
+
span: spanSchema
|
|
106
|
+
})
|
|
107
|
+
]);
|
|
108
|
+
var queryAstSchema = object({
|
|
109
|
+
version: literal(1),
|
|
110
|
+
language: literal("lucene-v1"),
|
|
111
|
+
root: queryNodeSchema
|
|
112
|
+
});
|
|
113
|
+
function queryError(reason, span, alternative, context3 = {}, details = {}) {
|
|
114
|
+
throw new CliError("validation_error", `${context3.command ?? "query"}: ${reason} at position ${span.start + 1}${alternative ? ` \u2014 ${alternative}` : ""}`, {
|
|
115
|
+
reason,
|
|
116
|
+
span,
|
|
117
|
+
...alternative ? { alternative } : {},
|
|
118
|
+
...context3.guide ? { guide: context3.guide } : {},
|
|
119
|
+
...details
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
__name(queryError, "queryError");
|
|
123
|
+
var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
|
|
124
|
+
|
|
125
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
126
|
+
var timezoneOf = /* @__PURE__ */ __name((given) => {
|
|
127
|
+
const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
128
|
+
try {
|
|
129
|
+
new Intl.DateTimeFormat("en", { timeZone: zone }).format(0);
|
|
130
|
+
} catch {
|
|
131
|
+
queryError("query.invalid-timezone", { start: 0, end: 0 }, "use an IANA timezone such as Europe/Madrid");
|
|
132
|
+
}
|
|
133
|
+
return zone;
|
|
134
|
+
}, "timezoneOf");
|
|
135
|
+
var calendar = /* @__PURE__ */ __name((value, span) => {
|
|
136
|
+
if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
137
|
+
queryError("query.invalid-date", span, "use an ISO date or a quoted timestamp with offset");
|
|
138
|
+
const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
|
|
139
|
+
const date = /* @__PURE__ */ new Date(0);
|
|
140
|
+
date.setUTCFullYear(year, month - 1, day);
|
|
141
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
142
|
+
if (date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day)
|
|
143
|
+
queryError("query.invalid-date", span);
|
|
144
|
+
return date;
|
|
145
|
+
}, "calendar");
|
|
146
|
+
var dayBoundary = /* @__PURE__ */ __name((value, zone, next, span) => {
|
|
147
|
+
const date = calendar(value, span);
|
|
148
|
+
if (next)
|
|
149
|
+
date.setUTCDate(date.getUTCDate() + 1);
|
|
150
|
+
const wanted = date.getUTCFullYear() * 1e4 + (date.getUTCMonth() + 1) * 100 + date.getUTCDate();
|
|
151
|
+
const formatter = new Intl.DateTimeFormat("en-CA", {
|
|
152
|
+
timeZone: zone,
|
|
153
|
+
year: "numeric",
|
|
154
|
+
month: "2-digit",
|
|
155
|
+
day: "2-digit",
|
|
156
|
+
era: "short"
|
|
157
|
+
});
|
|
158
|
+
const dayAt = /* @__PURE__ */ __name((time) => {
|
|
159
|
+
const parts = formatter.formatToParts(time);
|
|
160
|
+
const value2 = /* @__PURE__ */ __name((name) => Number(parts.find((p) => p.type === name)?.value), "value");
|
|
161
|
+
const year = parts.find((p) => p.type === "era")?.value === "BC" ? 1 - value2("year") : value2("year");
|
|
162
|
+
return year * 1e4 + value2("month") * 100 + value2("day");
|
|
163
|
+
}, "dayAt");
|
|
164
|
+
let lo = date.getTime() - 2 * 864e5, hi = date.getTime() + 2 * 864e5;
|
|
165
|
+
while (lo < hi) {
|
|
166
|
+
const mid = Math.floor((lo + hi) / 2);
|
|
167
|
+
if (dayAt(mid) < wanted)
|
|
168
|
+
lo = mid + 1;
|
|
169
|
+
else
|
|
170
|
+
hi = mid;
|
|
171
|
+
}
|
|
172
|
+
if (dayAt(lo) !== wanted)
|
|
173
|
+
queryError("query.invalid-date", span, "this calendar day does not exist in the selected timezone");
|
|
174
|
+
return lo;
|
|
175
|
+
}, "dayBoundary");
|
|
176
|
+
var WALL = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/u;
|
|
177
|
+
var wallTime = /* @__PURE__ */ __name((value, zone, span) => {
|
|
178
|
+
const [, year, month, day, hour, minute, second = "0", fraction = "0"] = WALL.exec(value) ?? [];
|
|
179
|
+
if (year === void 0)
|
|
180
|
+
queryError("query.invalid-date", span, "use YYYY-MM-DDTHH:mm, with optional seconds");
|
|
181
|
+
const wanted = Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second), Number(fraction.padEnd(3, "0")));
|
|
182
|
+
const check = new Date(wanted);
|
|
183
|
+
if (check.getUTCDate() !== Number(day) || check.getUTCHours() !== Number(hour) || check.getUTCMinutes() !== Number(minute) || check.getUTCSeconds() !== Number(second))
|
|
184
|
+
queryError("query.invalid-date", span);
|
|
185
|
+
const formatter = new Intl.DateTimeFormat("en-CA", {
|
|
186
|
+
timeZone: zone,
|
|
187
|
+
year: "numeric",
|
|
188
|
+
month: "2-digit",
|
|
189
|
+
day: "2-digit",
|
|
190
|
+
hour: "2-digit",
|
|
191
|
+
minute: "2-digit",
|
|
192
|
+
second: "2-digit",
|
|
193
|
+
hourCycle: "h23"
|
|
194
|
+
});
|
|
195
|
+
const shown = /* @__PURE__ */ __name((instant) => {
|
|
196
|
+
const parts = Object.fromEntries(formatter.formatToParts(instant).map((part) => [part.type, Number(part.value)]));
|
|
197
|
+
return Date.UTC(parts.year ?? 0, (parts.month ?? 1) - 1, parts.day, parts.hour, parts.minute, parts.second) + (instant % 1e3 + 1e3) % 1e3;
|
|
198
|
+
}, "shown");
|
|
199
|
+
const found = /* @__PURE__ */ new Set();
|
|
200
|
+
for (const probe of [wanted - 864e5, wanted, wanted + 864e5]) {
|
|
201
|
+
const candidate = wanted - (shown(probe) - probe);
|
|
202
|
+
if (shown(candidate) === wanted)
|
|
203
|
+
found.add(candidate);
|
|
204
|
+
}
|
|
205
|
+
if (found.size !== 1)
|
|
206
|
+
queryError("query.invalid-date", span, "this local time is skipped or repeated by daylight saving; add an offset");
|
|
207
|
+
return [...found][0];
|
|
208
|
+
}, "wallTime");
|
|
209
|
+
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/iu;
|
|
210
|
+
var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {}) => {
|
|
211
|
+
if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
212
|
+
return dayBoundary(value, zone, end, span) - (end ? 1 : 0);
|
|
213
|
+
if (!ZONED.test(value))
|
|
214
|
+
return wallTime(value, zone, span);
|
|
215
|
+
const time = Date.parse(value);
|
|
216
|
+
if (!/^\d{4}-\d{2}-\d{2}T/u.test(value) || !Number.isFinite(time))
|
|
217
|
+
queryError("query.invalid-date", span);
|
|
218
|
+
calendar(value.slice(0, 10), span);
|
|
219
|
+
return time;
|
|
220
|
+
}, "zonedMoment");
|
|
221
|
+
var AGO = /^(\d+)(m|h|d)$/u;
|
|
222
|
+
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
223
|
+
var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
|
|
224
|
+
const today = new Intl.DateTimeFormat("en-CA", {
|
|
225
|
+
timeZone: zone,
|
|
226
|
+
year: "numeric",
|
|
227
|
+
month: "2-digit",
|
|
228
|
+
day: "2-digit"
|
|
229
|
+
}).format(now);
|
|
230
|
+
if (word === "today")
|
|
231
|
+
return today;
|
|
232
|
+
const date = calendar(today, span);
|
|
233
|
+
date.setUTCDate(date.getUTCDate() - 1);
|
|
234
|
+
return date.toISOString().slice(0, 10);
|
|
235
|
+
}, "dayOf");
|
|
236
|
+
var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, now = Date.now()) => {
|
|
237
|
+
if (value === "*")
|
|
238
|
+
return { inclusive };
|
|
239
|
+
const word = value.toLowerCase();
|
|
240
|
+
if (word === "today" || word === "yesterday")
|
|
241
|
+
return dateEndpoint(dayOf(word, zone, now, span), zone, side, inclusive, span);
|
|
242
|
+
const [, amount, unit] = AGO.exec(word) ?? [];
|
|
243
|
+
if (amount && unit)
|
|
244
|
+
return { time: now - Number(amount) * (AGO_MS[unit] ?? 0), inclusive };
|
|
245
|
+
if (/^\d{4}-\d{2}-\d{2}$/u.test(value))
|
|
246
|
+
return {
|
|
247
|
+
time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
|
|
248
|
+
inclusive: side === "lower"
|
|
249
|
+
};
|
|
250
|
+
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))
|
|
251
|
+
queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
|
|
252
|
+
calendar(value.slice(0, 10), span);
|
|
253
|
+
const time = Date.parse(value);
|
|
254
|
+
if (!Number.isFinite(time) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
|
|
255
|
+
queryError("query.invalid-date", span);
|
|
256
|
+
return { time, inclusive };
|
|
257
|
+
}, "dateEndpoint");
|
|
258
|
+
var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclusive, zone, span, now = Date.now()) => {
|
|
259
|
+
const since = lower === upper && AGO.test(lower.toLowerCase());
|
|
260
|
+
const lo = dateEndpoint(lower, zone, "lower", lowerInclusive, span, now);
|
|
261
|
+
const hi = dateEndpoint(since ? "*" : upper, zone, "upper", upperInclusive, span, now);
|
|
262
|
+
return {
|
|
263
|
+
...lo.time === void 0 ? {} : { lower: lo.time },
|
|
264
|
+
...hi.time === void 0 ? {} : { upper: hi.time },
|
|
265
|
+
lower_inclusive: lo.inclusive,
|
|
266
|
+
upper_inclusive: hi.inclusive
|
|
267
|
+
};
|
|
268
|
+
}, "dateRange");
|
|
269
|
+
|
|
270
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
271
|
+
var wordsOf = /* @__PURE__ */ __name((text6) => text6.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
|
|
272
|
+
var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
|
|
273
|
+
var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
|
|
274
|
+
var matchOne = /* @__PURE__ */ __name((field, node, value, options) => {
|
|
275
|
+
if (!present(value))
|
|
276
|
+
return false;
|
|
277
|
+
if (node.operator === "wildcard" && node.value === "*")
|
|
278
|
+
return true;
|
|
279
|
+
const text6 = String(value);
|
|
280
|
+
switch (field.type) {
|
|
281
|
+
case "txt": {
|
|
282
|
+
const words2 = wordsOf(text6);
|
|
283
|
+
if (node.operator === "wildcard")
|
|
284
|
+
return words2.some((word) => pattern(node.value).test(word));
|
|
285
|
+
const wanted = wordsOf(node.value);
|
|
286
|
+
return words2.some((_, at) => wanted.every((word, offset) => words2[at + offset] === word));
|
|
287
|
+
}
|
|
288
|
+
case "num": {
|
|
289
|
+
const number2 = Number(value);
|
|
290
|
+
if (node.operator !== "range")
|
|
291
|
+
return number2 === Number(node.value);
|
|
292
|
+
const { value: lower, upper = "*", lower_inclusive: lowerInclusive, upper_inclusive: upperInclusive } = node;
|
|
293
|
+
return (lower === "*" || (lowerInclusive ? number2 >= Number(lower) : number2 > Number(lower))) && (upper === "*" || (upperInclusive ? number2 <= Number(upper) : number2 < Number(upper)));
|
|
294
|
+
}
|
|
295
|
+
case "time": {
|
|
296
|
+
const time = Date.parse(text6);
|
|
297
|
+
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];
|
|
298
|
+
const range = dateRange(lower, upper, lowerInclusive, upperInclusive, options.zone ?? "UTC", node.span, options.now);
|
|
299
|
+
return (range.lower === void 0 || (range.lower_inclusive ? time >= range.lower : time > range.lower)) && (range.upper === void 0 || (range.upper_inclusive ? time <= range.upper : time < range.upper));
|
|
300
|
+
}
|
|
301
|
+
default:
|
|
302
|
+
return node.operator === "wildcard" ? pattern(node.value).test(text6) : text6.toLowerCase() === node.value.toLowerCase();
|
|
303
|
+
}
|
|
304
|
+
}, "matchOne");
|
|
305
|
+
var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
|
|
306
|
+
if (node.kind === "boolean") {
|
|
307
|
+
const by = /* @__PURE__ */ __name((occur) => node.clauses.filter((clause) => clause.occur === occur), "by");
|
|
308
|
+
const [must, should, mustNot] = [by("must"), by("should"), by("must_not")];
|
|
309
|
+
const holds = /* @__PURE__ */ __name((clause) => matches(clause.node, item, byName, options), "holds");
|
|
310
|
+
return must.every(holds) && !mustNot.some(holds) && (should.length === 0 || must.length > 0 || should.some(holds));
|
|
311
|
+
}
|
|
312
|
+
const field = byName.get(node.field);
|
|
313
|
+
if (!field)
|
|
314
|
+
throw new Error(`evaluate: no field "${node.field}"; validate the query first`);
|
|
315
|
+
if (field.relation !== void 0) {
|
|
316
|
+
if (!options.relation)
|
|
317
|
+
throw new Error(`evaluate: "${node.field}" is a relation; pass options.relation`);
|
|
318
|
+
return options.relation(node, item);
|
|
319
|
+
}
|
|
320
|
+
const value = item[node.field];
|
|
321
|
+
return Array.isArray(value) ? value.some((one) => matchOne(field, node, one, options)) : matchOne(field, node, value, options);
|
|
322
|
+
}, "matches");
|
|
323
|
+
var evaluate = /* @__PURE__ */ __name((ast, fields2, item, options = {}) => matches(ast.root, item, new Map(fields2.map((field) => [field.name, field])), options), "evaluate");
|
|
324
|
+
|
|
325
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
326
|
+
var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
|
|
327
|
+
var OPERATORS_BY_TYPE = {
|
|
328
|
+
kw: ["term", "phrase", "wildcard"],
|
|
329
|
+
txt: ["term", "phrase", "wildcard"],
|
|
330
|
+
enum: ["term"],
|
|
331
|
+
num: ["term", "range"],
|
|
332
|
+
time: ["term", "range"],
|
|
333
|
+
bool: ["term"],
|
|
334
|
+
ref: ["term", "phrase"]
|
|
335
|
+
};
|
|
336
|
+
var QUERY_BACKENDS = ["sql", "native"];
|
|
337
|
+
var unwrap = /* @__PURE__ */ __name((schema) => schema.wrapped ? unwrap(schema.wrapped) : schema, "unwrap");
|
|
338
|
+
var REFERENCE_SOURCE = reference.pipe[1].requirement.source;
|
|
339
|
+
var typeOf = /* @__PURE__ */ __name((schema) => {
|
|
340
|
+
const plain = unwrap(schema);
|
|
341
|
+
const actions = plain.pipe ?? [];
|
|
342
|
+
switch (plain.type) {
|
|
343
|
+
case "picklist":
|
|
344
|
+
return { type: "enum", values: (plain.options ?? []).map(String) };
|
|
345
|
+
case "number":
|
|
346
|
+
return { type: "num" };
|
|
347
|
+
case "boolean":
|
|
348
|
+
return { type: "bool" };
|
|
349
|
+
case "string":
|
|
350
|
+
if (actions.some((action) => action.type === "iso_timestamp"))
|
|
351
|
+
return { type: "time" };
|
|
352
|
+
if (actions.some((action) => action.requirement instanceof RegExp && action.requirement.source === REFERENCE_SOURCE))
|
|
353
|
+
return { type: "ref" };
|
|
354
|
+
return { type: "kw" };
|
|
355
|
+
case "array":
|
|
356
|
+
return plain.item ? typeOf(plain.item) : void 0;
|
|
357
|
+
default:
|
|
358
|
+
return void 0;
|
|
359
|
+
}
|
|
360
|
+
}, "typeOf");
|
|
361
|
+
var exampleOf = /* @__PURE__ */ __name((name, type, values) => ({
|
|
362
|
+
kw: `${name}:abc`,
|
|
363
|
+
txt: `${name}:word*`,
|
|
364
|
+
enum: `${name}:${values?.[0] ?? "x"}`,
|
|
365
|
+
num: `${name}>0`,
|
|
366
|
+
time: `${name}>=7d`,
|
|
367
|
+
bool: `${name}:true`,
|
|
368
|
+
ref: `${name}:"note:42"`
|
|
369
|
+
})[type], "exampleOf");
|
|
370
|
+
var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
|
|
371
|
+
const entries = unwrap(schema).entries ?? {};
|
|
372
|
+
const excluded = new Set(annotations.exclude ?? []);
|
|
373
|
+
const words2 = new Set(annotations.text ?? []);
|
|
374
|
+
const native = new Set(annotations.native ?? []);
|
|
375
|
+
const finish = /* @__PURE__ */ __name((field) => ({
|
|
376
|
+
...field,
|
|
377
|
+
operators: OPERATORS_BY_TYPE[field.type],
|
|
378
|
+
example: annotations.examples?.[field.name] ?? field.example ?? exampleOf(field.name, field.type, field.values),
|
|
379
|
+
...native.has(field.name) ? { native: true } : {},
|
|
380
|
+
...annotations.validate?.[field.name] ? { validate: annotations.validate[field.name] } : {}
|
|
381
|
+
}), "finish");
|
|
382
|
+
const own = Object.entries(entries).flatMap(([name, entry]) => {
|
|
383
|
+
if (excluded.has(name))
|
|
384
|
+
return [];
|
|
385
|
+
const found = typeOf(entry);
|
|
386
|
+
if (!found)
|
|
387
|
+
return [];
|
|
388
|
+
return [finish({ name, ...found, ...words2.has(name) && found.type === "kw" ? { type: "txt" } : {} })];
|
|
389
|
+
});
|
|
390
|
+
const relations = Object.entries(annotations.relations ?? {}).map(([name, relation]) => finish({ name, ...relation }));
|
|
391
|
+
const states = annotations.states ? [
|
|
392
|
+
finish({
|
|
393
|
+
name: "is",
|
|
394
|
+
type: "enum",
|
|
395
|
+
values: Object.keys(annotations.states),
|
|
396
|
+
relation: Object.entries(annotations.states).map(([state, meaning]) => `${state}: ${meaning}`).join("; ")
|
|
397
|
+
})
|
|
398
|
+
] : [];
|
|
399
|
+
return [...own, ...relations, ...states];
|
|
400
|
+
}, "queryFieldsOf");
|
|
401
|
+
|
|
402
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
403
|
+
var QUERY_SYNTAX = 'field:value \xB7 "a phrase" \xB7 word* \xB7 AND OR NOT \xB7 ( ) \xB7 [a TO b] \xB7 > >= < <=';
|
|
404
|
+
var kindOf = /* @__PURE__ */ __name((field) => field.values ? `${field.type}: ${field.values.join("|")}` : `${field.type}: ${field.operators.join(", ")}`, "kindOf");
|
|
405
|
+
var fieldsHelp = /* @__PURE__ */ __name((registry, guide) => {
|
|
406
|
+
const shown = registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields;
|
|
407
|
+
const rows = shown.map((field) => [field.name, kindOf(field), field.example]);
|
|
408
|
+
const widths = [0, 1].map((at) => Math.max(...rows.map((row) => (row[at] ?? "").length)));
|
|
409
|
+
return [
|
|
410
|
+
"Fields:",
|
|
411
|
+
...rows.map(([name = "", kind = "", example = ""]) => ` ${name.padEnd(widths[0] ?? 0)} ${kind.padEnd(widths[1] ?? 0)} ${example}`.trimEnd()),
|
|
412
|
+
...registry.defaults && registry.defaults.length > 0 ? [`Defaults: ${registry.defaults.join(" ")} \u2014 name the field to change it`] : [],
|
|
413
|
+
`Syntax: ${QUERY_SYNTAX}`,
|
|
414
|
+
...guide ? [`Guide: ${guide}`] : []
|
|
415
|
+
].join("\n");
|
|
416
|
+
}, "fieldsHelp");
|
|
417
|
+
|
|
418
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
419
|
+
var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
|
|
420
|
+
var reserved = /* @__PURE__ */ new Set([
|
|
421
|
+
"+",
|
|
422
|
+
"-",
|
|
423
|
+
"!",
|
|
424
|
+
"(",
|
|
425
|
+
")",
|
|
426
|
+
":",
|
|
427
|
+
"=",
|
|
428
|
+
"^",
|
|
429
|
+
"@",
|
|
430
|
+
"<",
|
|
431
|
+
">",
|
|
432
|
+
"[",
|
|
433
|
+
"]",
|
|
434
|
+
'"',
|
|
435
|
+
"{",
|
|
436
|
+
"}",
|
|
437
|
+
"~",
|
|
438
|
+
"\\",
|
|
439
|
+
"/"
|
|
440
|
+
]);
|
|
441
|
+
var decodeEscapes = /* @__PURE__ */ __name((raw, span, fail) => {
|
|
442
|
+
let out = "";
|
|
443
|
+
for (let at = 0; at < raw.length; at++) {
|
|
444
|
+
if (raw[at] !== "\\") {
|
|
445
|
+
out += raw[at];
|
|
446
|
+
continue;
|
|
447
|
+
}
|
|
448
|
+
if (++at >= raw.length)
|
|
449
|
+
fail("query.invalid-escape", span);
|
|
450
|
+
if (raw[at] === "u") {
|
|
451
|
+
const hex = raw.slice(at + 1, at + 5);
|
|
452
|
+
if (!/^[0-9a-fA-F]{4}$/.test(hex))
|
|
453
|
+
fail("query.invalid-escape", span);
|
|
454
|
+
out += String.fromCharCode(Number.parseInt(hex, 16));
|
|
455
|
+
at += 4;
|
|
456
|
+
} else
|
|
457
|
+
out += raw[at];
|
|
458
|
+
}
|
|
459
|
+
return out;
|
|
460
|
+
}, "decodeEscapes");
|
|
461
|
+
var tokensOf = /* @__PURE__ */ __name((text6, fail = queryError) => {
|
|
462
|
+
const tokens = [];
|
|
463
|
+
let at = 0;
|
|
464
|
+
let range = false;
|
|
465
|
+
while (at < text6.length) {
|
|
466
|
+
const start = at;
|
|
467
|
+
const c = text6[at] ?? "";
|
|
468
|
+
if (whitespace(c)) {
|
|
469
|
+
at++;
|
|
470
|
+
continue;
|
|
471
|
+
}
|
|
472
|
+
let kind = c;
|
|
473
|
+
if (c === '"' || !range && c === "/") {
|
|
474
|
+
at++;
|
|
475
|
+
while (at < text6.length && text6[at] !== c) {
|
|
476
|
+
if (text6[at] === "\\" && (c === '"' || text6[at + 1] === "/"))
|
|
477
|
+
at++;
|
|
478
|
+
at++;
|
|
479
|
+
}
|
|
480
|
+
if (at >= text6.length)
|
|
481
|
+
fail("query.unclosed-literal", { start, end: at }, c === "/" ? regexHint(text6, start) : void 0);
|
|
482
|
+
at++;
|
|
483
|
+
if (c === "/" && /^[dgimsuvy]+(?:$|[ \t\n\r)])/.test(text6.slice(at)))
|
|
484
|
+
fail("query.unsupported-regex-flags", { start: at, end: at + 1 }, "Lucene regex does not take JavaScript flags");
|
|
485
|
+
kind = c === '"' ? "quoted" : "regex";
|
|
486
|
+
} else if (range && c !== "]" && c !== "}") {
|
|
487
|
+
while (at < text6.length && !whitespace(text6[at] ?? "") && !["]", "}"].includes(text6[at] ?? ""))
|
|
488
|
+
at++;
|
|
489
|
+
kind = "rangeValue";
|
|
490
|
+
} else if (reserved.has(c)) {
|
|
491
|
+
if (c === "\\") {
|
|
492
|
+
at += 2;
|
|
493
|
+
while (at < text6.length && !whitespace(text6[at] ?? "") && (!reserved.has(text6[at] ?? "") || ["+", "-"].includes(text6[at] ?? "")))
|
|
494
|
+
at++;
|
|
495
|
+
kind = "term";
|
|
496
|
+
} else {
|
|
497
|
+
at++;
|
|
498
|
+
if ((c === "<" || c === ">") && text6[at] === "=") {
|
|
499
|
+
at++;
|
|
500
|
+
kind += "=";
|
|
501
|
+
}
|
|
502
|
+
if (c === "[" || c === "{")
|
|
503
|
+
range = true;
|
|
504
|
+
if (c === "]" || c === "}")
|
|
505
|
+
range = false;
|
|
506
|
+
}
|
|
507
|
+
} else {
|
|
508
|
+
at++;
|
|
509
|
+
while (at < text6.length) {
|
|
510
|
+
const next = text6[at] ?? "";
|
|
511
|
+
if (next === "\\") {
|
|
512
|
+
if (at + 1 >= text6.length)
|
|
513
|
+
fail("query.invalid-escape", { start: at, end: at + 1 });
|
|
514
|
+
at += 2;
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
if (next === "@" && new RegExp("^@(?:\\p{L}|[\\p{L}\\p{N}][^\\s@]*\\.[\\p{L}\\p{N}])", "u").test(text6.slice(at))) {
|
|
518
|
+
at++;
|
|
519
|
+
continue;
|
|
520
|
+
}
|
|
521
|
+
if (whitespace(next) || reserved.has(next) && next !== "+" && next !== "-")
|
|
522
|
+
break;
|
|
523
|
+
at++;
|
|
524
|
+
}
|
|
525
|
+
const raw = text6.slice(start, at);
|
|
526
|
+
kind = { AND: "AND", OR: "OR", NOT: "NOT", "&&": "AND", "||": "OR" }[raw] ?? (/^\d+(?:\.\d+)?$/u.test(raw) ? "number" : "term");
|
|
527
|
+
}
|
|
528
|
+
tokens.push({ kind, raw: text6.slice(start, at), span: { start, end: at } });
|
|
529
|
+
}
|
|
530
|
+
tokens.push({ kind: "EOF", raw: "", span: { start: at, end: at } });
|
|
531
|
+
return tokens;
|
|
532
|
+
}, "tokensOf");
|
|
533
|
+
var quoteHint = /* @__PURE__ */ __name((text6, at) => {
|
|
534
|
+
for (const match of text6.matchAll(/(?<=^|[\s(])([\p{L}\p{N}_.-]+):([^\s"()]+)/gu)) {
|
|
535
|
+
const [whole, field, value = ""] = match;
|
|
536
|
+
if (at < match.index || at > match.index + whole.length)
|
|
537
|
+
continue;
|
|
538
|
+
return /[:=/?*~^@<>![\]{}\\]/u.test(value) ? `put the value in quotes: ${field}:"${value}"` : void 0;
|
|
539
|
+
}
|
|
540
|
+
return void 0;
|
|
541
|
+
}, "quoteHint");
|
|
542
|
+
var regexHint = /* @__PURE__ */ __name((text6, at) => {
|
|
543
|
+
const word = `${/[^\s()"]*$/u.exec(text6.slice(0, at))?.[0] ?? ""}${/^[^\s()"]*/u.exec(text6.slice(at))?.[0] ?? ""}`;
|
|
544
|
+
return quoteHint(text6, at) ?? `/ starts a regular expression; put the value in quotes: "${word}"`;
|
|
545
|
+
}, "regexHint");
|
|
546
|
+
var parseLucene = /* @__PURE__ */ __name((text6, { defaultField = "text", proximity = false, ...context3 } = {}) => {
|
|
547
|
+
const fail = /* @__PURE__ */ __name((reason, span, alternative) => queryError(reason, span, alternative ?? quoteHint(text6, span.start), context3), "fail");
|
|
548
|
+
if (text6.length > QUERY_LIMITS.bytes || new TextEncoder().encode(text6).length > QUERY_LIMITS.bytes)
|
|
549
|
+
fail("query.too-large", { start: 0, end: text6.length });
|
|
550
|
+
const tokens = tokensOf(text6, fail);
|
|
551
|
+
let at = 0;
|
|
552
|
+
let count6 = 0;
|
|
553
|
+
let depth = 0;
|
|
554
|
+
const peek = /* @__PURE__ */ __name(() => tokens[at], "peek");
|
|
555
|
+
const take = /* @__PURE__ */ __name(() => tokens[at++], "take");
|
|
556
|
+
const expect = /* @__PURE__ */ __name((kind) => {
|
|
557
|
+
if (peek().kind !== kind)
|
|
558
|
+
fail("query.invalid-syntax", peek().span);
|
|
559
|
+
return take();
|
|
560
|
+
}, "expect");
|
|
561
|
+
const built = /* @__PURE__ */ __name((node) => {
|
|
562
|
+
if (++count6 > QUERY_LIMITS.nodes)
|
|
563
|
+
fail("query.too-large", node.span);
|
|
564
|
+
return node;
|
|
565
|
+
}, "built");
|
|
566
|
+
const combine = /* @__PURE__ */ __name((clauses, occur) => {
|
|
567
|
+
const first = clauses[0];
|
|
568
|
+
const last = clauses.at(-1);
|
|
569
|
+
if (!first || !last)
|
|
570
|
+
fail("query.invalid-syntax", peek().span);
|
|
571
|
+
if (clauses.length === 1)
|
|
572
|
+
return first;
|
|
573
|
+
return {
|
|
574
|
+
node: built({
|
|
575
|
+
kind: "boolean",
|
|
576
|
+
clauses: clauses.map(({ node, modifier }) => ({ node, occur: modifier ?? occur })),
|
|
577
|
+
span: { start: first.node.span.start, end: last.node.span.end }
|
|
578
|
+
})
|
|
579
|
+
};
|
|
580
|
+
}, "combine");
|
|
581
|
+
const query = /* @__PURE__ */ __name((field, implicit = false) => {
|
|
582
|
+
if (++depth > QUERY_LIMITS.depth)
|
|
583
|
+
fail("query.too-large", peek().span);
|
|
584
|
+
const clauses = [];
|
|
585
|
+
do {
|
|
586
|
+
clauses.push(disjunction(field, implicit));
|
|
587
|
+
} while (!["EOF", ")"].includes(peek().kind));
|
|
588
|
+
const result = combine(clauses, "must");
|
|
589
|
+
depth--;
|
|
590
|
+
if (result.modifier === "must_not")
|
|
591
|
+
return built({ kind: "boolean", clauses: [{ node: result.node, occur: "must_not" }], span: result.node.span });
|
|
592
|
+
return result.node;
|
|
593
|
+
}, "query");
|
|
594
|
+
const disjunction = /* @__PURE__ */ __name((field, implicit) => {
|
|
595
|
+
const clauses = [conjunction(field, implicit)];
|
|
596
|
+
while (peek().kind === "OR") {
|
|
597
|
+
take();
|
|
598
|
+
clauses.push(conjunction(field, implicit));
|
|
599
|
+
}
|
|
600
|
+
return combine(clauses, "should");
|
|
601
|
+
}, "disjunction");
|
|
602
|
+
const conjunction = /* @__PURE__ */ __name((field, implicit) => {
|
|
603
|
+
const clauses = [clause(field, implicit)];
|
|
604
|
+
while (peek().kind === "AND") {
|
|
605
|
+
take();
|
|
606
|
+
clauses.push(clause(field, implicit));
|
|
607
|
+
}
|
|
608
|
+
return combine(clauses, "must");
|
|
609
|
+
}, "conjunction");
|
|
610
|
+
const clause = /* @__PURE__ */ __name((inherited, inheritedImplicit) => {
|
|
611
|
+
let modifier;
|
|
612
|
+
if (["+", "-", "NOT", "!"].includes(peek().kind))
|
|
613
|
+
modifier = take().kind === "+" ? "must" : "must_not";
|
|
614
|
+
let field = inherited;
|
|
615
|
+
let start;
|
|
616
|
+
let implicit = inheritedImplicit;
|
|
617
|
+
if (peek().kind === "term" && [":", "=", "<", ">", "<=", ">="].includes(tokens[at + 1]?.kind ?? "")) {
|
|
618
|
+
const token = take();
|
|
619
|
+
field = decodeEscapes(token.raw, token.span, fail);
|
|
620
|
+
start = token.span.start;
|
|
621
|
+
implicit = false;
|
|
622
|
+
let operator = take();
|
|
623
|
+
if (operator.kind === ":" && ["<", ">", "<=", ">="].includes(peek().kind))
|
|
624
|
+
operator = take();
|
|
625
|
+
if (["<", ">", "<=", ">="].includes(operator.kind)) {
|
|
626
|
+
const value = take();
|
|
627
|
+
if (!["term", "number", "quoted"].includes(value.kind))
|
|
628
|
+
fail("query.invalid-syntax", value.span);
|
|
629
|
+
const decoded = decodeEscapes(value.kind === "quoted" ? value.raw.slice(1, -1) : value.raw, value.span, fail);
|
|
630
|
+
const lower = operator.kind.startsWith(">");
|
|
631
|
+
const node2 = built({
|
|
632
|
+
kind: "predicate",
|
|
633
|
+
field,
|
|
634
|
+
operator: "range",
|
|
635
|
+
value: lower ? decoded : "*",
|
|
636
|
+
upper: lower ? "*" : decoded,
|
|
637
|
+
lower_inclusive: !lower || operator.kind.endsWith("="),
|
|
638
|
+
upper_inclusive: lower || operator.kind.endsWith("="),
|
|
639
|
+
span: { start: token.span.start, end: value.span.end }
|
|
640
|
+
});
|
|
641
|
+
return { node: node2, ...modifier ? { modifier } : {} };
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
let node;
|
|
645
|
+
if (peek().kind === "(") {
|
|
646
|
+
const start2 = take().span.start;
|
|
647
|
+
node = query(field, implicit);
|
|
648
|
+
const end = expect(")").span.end;
|
|
649
|
+
node = { ...node, span: { start: start2, end } };
|
|
650
|
+
} else if (["[", "{"].includes(peek().kind)) {
|
|
651
|
+
const opening = take();
|
|
652
|
+
const lower = take();
|
|
653
|
+
if (!["rangeValue", "quoted"].includes(lower.kind))
|
|
654
|
+
fail("query.invalid-syntax", lower.span);
|
|
655
|
+
const separator = take();
|
|
656
|
+
if (separator.raw !== "TO")
|
|
657
|
+
fail("query.invalid-syntax", separator.span);
|
|
658
|
+
const upper = take();
|
|
659
|
+
if (!["rangeValue", "quoted"].includes(upper.kind))
|
|
660
|
+
fail("query.invalid-syntax", upper.span);
|
|
661
|
+
const closing = take();
|
|
662
|
+
if (!["]", "}"].includes(closing.kind))
|
|
663
|
+
fail("query.invalid-syntax", closing.span);
|
|
664
|
+
const decode = /* @__PURE__ */ __name((t) => decodeEscapes(t.kind === "quoted" ? t.raw.slice(1, -1) : t.raw, t.span, fail), "decode");
|
|
665
|
+
node = built({
|
|
666
|
+
kind: "predicate",
|
|
667
|
+
field,
|
|
668
|
+
operator: "range",
|
|
669
|
+
value: decode(lower),
|
|
670
|
+
upper: decode(upper),
|
|
671
|
+
lower_inclusive: opening.kind === "[",
|
|
672
|
+
upper_inclusive: closing.kind === "]",
|
|
673
|
+
span: { start: start ?? opening.span.start, end: closing.span.end }
|
|
674
|
+
});
|
|
675
|
+
} else {
|
|
676
|
+
const token = take();
|
|
677
|
+
if (!["term", "number", "quoted", "regex"].includes(token.kind))
|
|
678
|
+
fail("query.invalid-syntax", token.span);
|
|
679
|
+
const raw = ["term", "number"].includes(token.kind) ? token.raw : token.raw.slice(1, -1);
|
|
680
|
+
if (field === "fn")
|
|
681
|
+
fail("query.unsupported-operator", token.span, "interval functions are not supported");
|
|
682
|
+
const wildcard = ["term", "number"].includes(token.kind) && /(?<!\\)[*?]/u.test(raw);
|
|
683
|
+
node = built({
|
|
684
|
+
kind: "predicate",
|
|
685
|
+
field,
|
|
686
|
+
operator: token.kind === "regex" ? "regex" : token.kind === "quoted" ? "phrase" : wildcard ? "wildcard" : "term",
|
|
687
|
+
value: token.kind === "regex" || wildcard ? raw : decodeEscapes(raw, token.span, fail),
|
|
688
|
+
span: { start: start ?? token.span.start, end: token.span.end },
|
|
689
|
+
...implicit ? { implicit: true } : {}
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
if (proximity && peek().kind === "~" && node.kind === "predicate" && node.operator === "phrase") {
|
|
693
|
+
take();
|
|
694
|
+
const distance = take();
|
|
695
|
+
if (distance.kind !== "number" || !/^\d+$/u.test(distance.raw))
|
|
696
|
+
fail("query.invalid-syntax", distance.span, 'write the distance as a whole number: "a b"~3');
|
|
697
|
+
node = { ...node, slop: Number(distance.raw), span: { start: node.span.start, end: distance.span.end } };
|
|
698
|
+
}
|
|
699
|
+
if (peek().kind === "~")
|
|
700
|
+
fail("query.unsupported-operator", peek().span, node.kind === "predicate" && node.operator === "phrase" ? "proximity (~) is not supported \u2014 drop the ~ for the exact phrase, or join the words with AND" : "fuzzy matching (~) is not supported \u2014 use a prefix such as word* to catch word forms");
|
|
701
|
+
if (["^", "@"].includes(peek().kind))
|
|
702
|
+
fail("query.unsupported-operator", peek().span, "boost and minimum-should-match are not supported");
|
|
703
|
+
return { node, ...modifier ? { modifier } : {} };
|
|
704
|
+
}, "clause");
|
|
705
|
+
const root = query(defaultField, true);
|
|
706
|
+
expect("EOF");
|
|
707
|
+
if (defaultField === "none") {
|
|
708
|
+
const bare = walkQuery(root).find((node) => node.implicit);
|
|
709
|
+
if (bare)
|
|
710
|
+
queryError("query.bare-word", bare.span, `"${bare.value}" has no field; write field:value`, context3, {
|
|
711
|
+
word: bare.value
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
return { version: 1, language: "lucene-v1", root };
|
|
715
|
+
}, "parseLucene");
|
|
716
|
+
var implicitTextTerms = /* @__PURE__ */ __name((text6) => {
|
|
717
|
+
const tokens = tokensOf(text6);
|
|
718
|
+
if (tokens.some(({ kind }) => ["AND", "OR", "NOT", "+", "-", "!", "(", ")"].includes(kind)))
|
|
719
|
+
return /* @__PURE__ */ new Set();
|
|
720
|
+
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] : []));
|
|
721
|
+
}, "implicitTextTerms");
|
|
722
|
+
|
|
723
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
724
|
+
var inContext = /* @__PURE__ */ __name((context3, run2) => {
|
|
725
|
+
try {
|
|
726
|
+
run2();
|
|
727
|
+
} catch (failure) {
|
|
728
|
+
if (!isCliError(failure) || typeof failure.details.reason !== "string" || failure.details.span === void 0)
|
|
729
|
+
throw failure;
|
|
730
|
+
const { reason, span, alternative } = failure.details;
|
|
731
|
+
queryError(reason, span, alternative, context3);
|
|
732
|
+
}
|
|
733
|
+
}, "inContext");
|
|
734
|
+
var bounds = /* @__PURE__ */ __name((node) => node.operator === "range" ? [node.value, node.upper ?? "*"].filter((bound) => bound !== "*") : [node.value], "bounds");
|
|
735
|
+
var checkValue = /* @__PURE__ */ __name((field, node, options) => {
|
|
736
|
+
const fail = /* @__PURE__ */ __name((reason, alternative) => queryError(reason, node.span, alternative, options), "fail");
|
|
737
|
+
if (node.value === "" && field.type !== "txt")
|
|
738
|
+
fail("query.missing-value");
|
|
739
|
+
if (node.operator === "wildcard")
|
|
740
|
+
return;
|
|
741
|
+
switch (field.type) {
|
|
742
|
+
case "enum":
|
|
743
|
+
if (!field.values?.includes(node.value.toLowerCase()))
|
|
744
|
+
fail("query.unknown-value", `${field.name} takes ${field.values?.join(", ")}`);
|
|
745
|
+
return;
|
|
746
|
+
case "bool":
|
|
747
|
+
if (!["true", "false"].includes(node.value.toLowerCase()))
|
|
748
|
+
fail("query.unknown-value", `${field.name} takes true, false`);
|
|
749
|
+
return;
|
|
750
|
+
case "num":
|
|
751
|
+
for (const bound of bounds(node))
|
|
752
|
+
if (!Number.isFinite(Number(bound)) || bound.trim() === "")
|
|
753
|
+
fail("query.invalid-number", `${field.name} takes a number`);
|
|
754
|
+
return;
|
|
755
|
+
case "time":
|
|
756
|
+
inContext(options, () => {
|
|
757
|
+
for (const bound of bounds(node))
|
|
758
|
+
dateEndpoint(bound, options.zone ?? "UTC", "lower", true, node.span);
|
|
759
|
+
});
|
|
760
|
+
return;
|
|
761
|
+
default:
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
}, "checkValue");
|
|
765
|
+
var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
|
|
766
|
+
const byName = new Map(registry.fields.map((field) => [field.name, field]));
|
|
767
|
+
const visit = /* @__PURE__ */ __name((node, required) => {
|
|
768
|
+
if (node.kind === "boolean") {
|
|
769
|
+
for (const clause of node.clauses)
|
|
770
|
+
visit(clause.node, required && clause.occur === "must");
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
const field = byName.get(node.field);
|
|
774
|
+
if (!field)
|
|
775
|
+
queryError("query.unknown-field", node.span, `no field "${node.field}"`, options, {
|
|
776
|
+
fields: registry.fields.map((one) => one.name)
|
|
777
|
+
});
|
|
778
|
+
if (registry.backend === "native" && !field.native)
|
|
779
|
+
queryError("query.unsupported-field", node.span, `the source cannot filter by ${field.name}`, options, {
|
|
780
|
+
supported: registry.fields.filter((one) => one.native).map((one) => one.name)
|
|
781
|
+
});
|
|
782
|
+
const presence = node.operator === "wildcard" && node.value === "*";
|
|
783
|
+
if (!presence && !field.operators.includes(node.operator))
|
|
784
|
+
queryError("query.unsupported-operator", node.span, `${field.name} takes ${field.operators.join(", ")}`, options);
|
|
785
|
+
if (field.placement === "and" && !required)
|
|
786
|
+
queryError("query.unsupported-placement", node.span, `${field.name} only as a required term, not under OR or NOT`, options);
|
|
787
|
+
if (presence)
|
|
788
|
+
return;
|
|
789
|
+
checkValue(field, node, options);
|
|
790
|
+
if (field.validate)
|
|
791
|
+
inContext(options, () => field.validate?.(node));
|
|
792
|
+
}, "visit");
|
|
793
|
+
visit(ast.root, true);
|
|
794
|
+
return ast;
|
|
795
|
+
}, "validateQuery");
|
|
796
|
+
var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
|
|
797
|
+
|
|
798
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.68.1_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
|
|
799
|
+
var describeQuery = /* @__PURE__ */ __name((registry) => ({
|
|
800
|
+
entity: registry.entity,
|
|
801
|
+
backend: registry.backend,
|
|
802
|
+
fields: registry.fields.map(({ validate: _, ...field }) => field),
|
|
803
|
+
...registry.defaults && registry.defaults.length > 0 ? { defaults: [...registry.defaults] } : {}
|
|
804
|
+
}), "describeQuery");
|
|
805
|
+
var exampleProblems = /* @__PURE__ */ __name((registry) => {
|
|
806
|
+
const syntaxOnly = { ...registry, backend: "sql" };
|
|
807
|
+
const problem = /* @__PURE__ */ __name((text6, field) => {
|
|
808
|
+
try {
|
|
809
|
+
const named = walkQuery(validateQuery(parseLucene(text6, { defaultField: "none" }), syntaxOnly).root);
|
|
810
|
+
return named.every((node) => node.field === field) ? void 0 : `"${text6}" does not name ${field}`;
|
|
811
|
+
} catch (failure) {
|
|
812
|
+
if (!isCliError(failure))
|
|
813
|
+
throw failure;
|
|
814
|
+
return `"${text6}": ${failure.message}`;
|
|
815
|
+
}
|
|
816
|
+
}, "problem");
|
|
817
|
+
const defaults = (registry.defaults ?? []).map((term) => {
|
|
818
|
+
const field = term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "";
|
|
819
|
+
return { field, problem: problem(term.replace(/^-/, ""), field) };
|
|
820
|
+
});
|
|
821
|
+
return [
|
|
822
|
+
...registry.fields.map((field) => ({ field: field.name, problem: problem(field.example, field.name) })),
|
|
823
|
+
...defaults
|
|
824
|
+
].filter((entry) => entry.problem !== void 0);
|
|
825
|
+
}, "exampleProblems");
|
|
826
|
+
var checked = /* @__PURE__ */ new WeakSet();
|
|
827
|
+
var defineQuery = /* @__PURE__ */ __name((registry) => {
|
|
828
|
+
if (checked.has(registry))
|
|
829
|
+
return registry;
|
|
830
|
+
const names = registry.fields.map((field) => field.name);
|
|
831
|
+
const problems = [
|
|
832
|
+
...duplicates(names).map((name) => `"${name}" is listed twice`),
|
|
833
|
+
...names.filter((name) => !SNAKE_CASE.test(name)).map((name) => `"${name}" is not snake_case`),
|
|
834
|
+
...exampleProblems(registry).map(({ field, problem }) => `${field}: ${problem}`)
|
|
835
|
+
];
|
|
836
|
+
if (problems.length > 0)
|
|
837
|
+
throw new RegistryError(`${registry.entity} query`, problems);
|
|
838
|
+
checked.add(registry);
|
|
839
|
+
return registry;
|
|
840
|
+
}, "defineQuery");
|
|
841
|
+
var SPAN = ["span", "alternative", "guide"];
|
|
842
|
+
var QUERY_REASONS = defineReasons([
|
|
843
|
+
["query.bare-word", "a word in the query has no field", ["word"]],
|
|
844
|
+
["query.invalid-ast", "the query tree is not valid", []],
|
|
845
|
+
["query.invalid-date", "a date in the query cannot be read", []],
|
|
846
|
+
["query.invalid-escape", "an escape in the query is not valid", []],
|
|
847
|
+
["query.invalid-number", "a number in the query cannot be read", []],
|
|
848
|
+
["query.invalid-regex", "a regular expression in the query is not valid", []],
|
|
849
|
+
["query.invalid-syntax", "the query cannot be parsed", []],
|
|
850
|
+
["query.invalid-timezone", "the time zone is not known", []],
|
|
851
|
+
["query.missing-value", "a field in the query has no value", []],
|
|
852
|
+
["query.too-large", "the query is over one of its limits", []],
|
|
853
|
+
["query.unclosed-literal", "a quote or bracket in the query is not closed", []],
|
|
854
|
+
["query.unknown-field", "a field in the query is not known", ["fields"]],
|
|
855
|
+
["query.unknown-value", "a value in the query is not known", []],
|
|
856
|
+
["query.unsupported-field", "this list cannot filter by that field", ["supported"]],
|
|
857
|
+
["query.unsupported-operator", "this field does not take that operator", []],
|
|
858
|
+
["query.unsupported-placement", "this field works only as a required term", []],
|
|
859
|
+
["query.unsupported-regex", "that regular expression is not supported", []],
|
|
860
|
+
["query.unsupported-regex-flags", "regular expression flags are not supported", []],
|
|
861
|
+
["query.unsupported-version", "the query version is not supported", []]
|
|
862
|
+
].map(([reason, message, details]) => ({
|
|
863
|
+
reason,
|
|
864
|
+
code: "validation_error",
|
|
865
|
+
message,
|
|
866
|
+
details: [...SPAN, ...details]
|
|
867
|
+
})));
|
|
868
|
+
|
|
869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
870
|
+
var text = string();
|
|
871
|
+
var count = pipe(number(), integer(), minValue(0));
|
|
872
|
+
var MEETING_ISSUES = ["time_without_zone"];
|
|
873
|
+
var meetingIssuesOf = /* @__PURE__ */ __name((metadata) => {
|
|
874
|
+
const listed2 = metadata?.issues;
|
|
875
|
+
return Array.isArray(listed2) ? MEETING_ISSUES.filter((issue) => listed2.includes(issue)) : [];
|
|
876
|
+
}, "meetingIssuesOf");
|
|
877
|
+
var meeting = strictObject({
|
|
878
|
+
ref: reference,
|
|
879
|
+
id: pipe(string(), minLength(1)),
|
|
880
|
+
provider: text,
|
|
881
|
+
account: text,
|
|
882
|
+
title: nullable(text),
|
|
883
|
+
description: optional(nullable(text)),
|
|
884
|
+
location: optional(nullable(text)),
|
|
885
|
+
/** The link that joins it. */
|
|
886
|
+
url: nullable(text),
|
|
887
|
+
started_at: nullable(isoTime),
|
|
888
|
+
ended_at: nullable(isoTime),
|
|
889
|
+
duration_ms: nullable(count),
|
|
890
|
+
timezone: optional(nullable(text)),
|
|
891
|
+
participants_count: nullable(count),
|
|
892
|
+
/** Present only when something about this meeting is doubtful. */
|
|
893
|
+
issues: optional(array(picklist(MEETING_ISSUES))),
|
|
894
|
+
created_at: isoTime,
|
|
895
|
+
updated_at: isoTime
|
|
896
|
+
});
|
|
897
|
+
var iso = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
898
|
+
var meetingItem = /* @__PURE__ */ __name((row, owner) => {
|
|
899
|
+
const issues = meetingIssuesOf(row.metadata);
|
|
900
|
+
return {
|
|
901
|
+
ref: formatMeetingReference({ type: "meeting", accountId: row.accountId, meetingId: row.id }),
|
|
902
|
+
id: String(row.id),
|
|
903
|
+
provider: owner.provider,
|
|
904
|
+
account: owner.account,
|
|
905
|
+
title: row.title,
|
|
906
|
+
description: row.description,
|
|
907
|
+
location: row.location,
|
|
908
|
+
url: row.joinUrl,
|
|
909
|
+
started_at: iso(row.startedAt),
|
|
910
|
+
ended_at: iso(row.endedAt),
|
|
911
|
+
duration_ms: row.durationMs,
|
|
912
|
+
timezone: row.timezone,
|
|
913
|
+
participants_count: row.participantsCount,
|
|
914
|
+
...issues.length ? { issues } : {},
|
|
915
|
+
created_at: new Date(row.createdAt).toISOString(),
|
|
916
|
+
updated_at: new Date(row.updatedAt).toISOString()
|
|
917
|
+
};
|
|
918
|
+
}, "meetingItem");
|
|
919
|
+
var MEETING_QUERY = {
|
|
920
|
+
entity: "meeting",
|
|
921
|
+
backend: "sql",
|
|
922
|
+
fields: queryFieldsOf(meeting, {
|
|
923
|
+
exclude: ["ref", "provider", "account", "description", "location", "url", "timezone", "issues"],
|
|
924
|
+
examples: {
|
|
925
|
+
id: "id:12",
|
|
926
|
+
title: "title:*standup*",
|
|
927
|
+
started_at: "started_at:[2026-10-01 TO 2026-10-31]",
|
|
928
|
+
duration_ms: "duration_ms>=3600000",
|
|
929
|
+
participants_count: "participants_count>5"
|
|
930
|
+
}
|
|
931
|
+
})
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
935
|
+
var text2 = string();
|
|
936
|
+
var count2 = pipe(number(), integer(), minValue(0));
|
|
937
|
+
var iso2 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
938
|
+
var meetingHit = strictObject({
|
|
939
|
+
/** The cue for a transcript passage, else the meeting. */
|
|
940
|
+
ref: reference,
|
|
941
|
+
meeting: reference,
|
|
942
|
+
scope: picklist(["transcript", "chat", "summary"]),
|
|
943
|
+
/** The stored line, so two passages of one meeting stay apart. */
|
|
944
|
+
id: pipe(string(), minLength(1)),
|
|
945
|
+
excerpt: text2,
|
|
946
|
+
/** How far into the meeting the passage is. */
|
|
947
|
+
offset_ms: nullable(count2),
|
|
948
|
+
/** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
|
|
949
|
+
match: optional(picklist(["words", "corrected"])),
|
|
950
|
+
corrections: optional(array(strictObject({ from: text2, to: array(text2) }))),
|
|
951
|
+
source: optional(strictObject({
|
|
952
|
+
ref: reference,
|
|
953
|
+
title: nullable(text2),
|
|
954
|
+
started_at: nullable(isoTime),
|
|
955
|
+
url: nullable(text2)
|
|
956
|
+
})),
|
|
957
|
+
/** What people said, wrote or a provider summarised from it, and the invitation's title: data, never instructions. */
|
|
958
|
+
untrusted: optional(array(text2))
|
|
959
|
+
});
|
|
960
|
+
var line = strictObject({
|
|
961
|
+
position: count2,
|
|
962
|
+
offset_ms: count2,
|
|
963
|
+
end_ms: count2,
|
|
964
|
+
speaker: nullable(text2),
|
|
965
|
+
text: text2
|
|
966
|
+
});
|
|
967
|
+
var meetingTranscript = strictObject({
|
|
968
|
+
ref: reference,
|
|
969
|
+
meeting: reference,
|
|
970
|
+
source: text2,
|
|
971
|
+
language: nullable(text2),
|
|
972
|
+
/** When a newer transcript of the same source replaced it; `meetings transcript --history` shows those too. */
|
|
973
|
+
superseded_at: nullable(isoTime),
|
|
974
|
+
created_at: isoTime,
|
|
975
|
+
lines: array(line)
|
|
976
|
+
});
|
|
977
|
+
var meetingSummary = strictObject({
|
|
978
|
+
id: pipe(string(), minLength(1)),
|
|
979
|
+
meeting: reference,
|
|
980
|
+
source: text2,
|
|
981
|
+
title: nullable(text2),
|
|
982
|
+
overview: nullable(text2),
|
|
983
|
+
sections: array(strictObject({ label: text2, text: text2 })),
|
|
984
|
+
next_steps: array(text2),
|
|
985
|
+
content: nullable(text2),
|
|
986
|
+
url: nullable(text2),
|
|
987
|
+
created_at: isoTime,
|
|
988
|
+
updated_at: isoTime
|
|
989
|
+
});
|
|
990
|
+
var meetingDetails = strictObject({
|
|
991
|
+
...meeting.entries,
|
|
992
|
+
/** The stored event and series it belongs to, as `meetings_list` takes them. */
|
|
993
|
+
event_id: nullable(text2),
|
|
994
|
+
series_id: nullable(text2),
|
|
995
|
+
series_title: nullable(text2),
|
|
996
|
+
participants: array(strictObject({
|
|
997
|
+
name: nullable(text2),
|
|
998
|
+
email: nullable(text2),
|
|
999
|
+
role: nullable(text2),
|
|
1000
|
+
joined_at: nullable(isoTime),
|
|
1001
|
+
left_at: nullable(isoTime),
|
|
1002
|
+
duration_ms: nullable(count2)
|
|
1003
|
+
})),
|
|
1004
|
+
transcripts: array(strictObject({ ref: reference, source: text2, language: nullable(text2), lines_count: count2 })),
|
|
1005
|
+
chat: array(strictObject({ sent_at: isoTime, sender: nullable(text2), recipient: nullable(text2), text: text2 })),
|
|
1006
|
+
summaries: array(meetingSummary),
|
|
1007
|
+
attachments: array(strictObject({
|
|
1008
|
+
position: count2,
|
|
1009
|
+
kind: text2,
|
|
1010
|
+
name: nullable(text2),
|
|
1011
|
+
mime: nullable(text2),
|
|
1012
|
+
size: nullable(count2),
|
|
1013
|
+
url: nullable(text2)
|
|
1014
|
+
}))
|
|
1015
|
+
});
|
|
1016
|
+
var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
|
|
1017
|
+
var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows) => ({
|
|
1018
|
+
ref: formatMeetingReference({
|
|
1019
|
+
type: "meeting",
|
|
1020
|
+
accountId,
|
|
1021
|
+
meetingId: transcript.meetingId,
|
|
1022
|
+
transcriptId: transcript.id
|
|
1023
|
+
}),
|
|
1024
|
+
meeting: meetingRef(accountId, transcript.meetingId),
|
|
1025
|
+
source: transcript.source,
|
|
1026
|
+
language: transcript.language,
|
|
1027
|
+
superseded_at: iso2(transcript.supersededAt),
|
|
1028
|
+
created_at: new Date(transcript.externalCreatedAt ?? transcript.createdAt).toISOString(),
|
|
1029
|
+
lines: rows.map((row) => ({
|
|
1030
|
+
position: row.position,
|
|
1031
|
+
offset_ms: row.startMs,
|
|
1032
|
+
end_ms: row.endMs,
|
|
1033
|
+
speaker: row.speakerName,
|
|
1034
|
+
text: row.text
|
|
1035
|
+
}))
|
|
1036
|
+
}), "meetingTranscriptItem");
|
|
1037
|
+
var meetingSummaryItem = /* @__PURE__ */ __name((accountId, summary) => ({
|
|
1038
|
+
id: String(summary.id),
|
|
1039
|
+
meeting: meetingRef(accountId, summary.meetingId),
|
|
1040
|
+
source: summary.source,
|
|
1041
|
+
title: summary.title,
|
|
1042
|
+
overview: summary.overview,
|
|
1043
|
+
sections: summary.sections.map(({ label, text: text6 }) => ({ label, text: text6 })),
|
|
1044
|
+
next_steps: summary.nextSteps,
|
|
1045
|
+
content: summary.content,
|
|
1046
|
+
url: summary.docUrl,
|
|
1047
|
+
created_at: new Date(summary.externalCreatedAt ?? summary.createdAt).toISOString(),
|
|
1048
|
+
updated_at: new Date(summary.externalUpdatedAt ?? summary.updatedAt).toISOString()
|
|
1049
|
+
}), "meetingSummaryItem");
|
|
1050
|
+
var meetingDetailsItem = /* @__PURE__ */ __name((details, owner) => {
|
|
1051
|
+
const { accountId } = details.meeting;
|
|
1052
|
+
return {
|
|
1053
|
+
...meetingItem(details.meeting, owner),
|
|
1054
|
+
event_id: details.meeting.eventId === null ? null : String(details.meeting.eventId),
|
|
1055
|
+
series_id: details.meeting.meetingSeriesId === null ? null : String(details.meeting.meetingSeriesId),
|
|
1056
|
+
series_title: details.series?.title ?? null,
|
|
1057
|
+
participants: details.participants.map((one) => ({
|
|
1058
|
+
name: one.displayName,
|
|
1059
|
+
email: one.email,
|
|
1060
|
+
role: one.role,
|
|
1061
|
+
joined_at: iso2(one.joinedAt),
|
|
1062
|
+
left_at: iso2(one.leftAt),
|
|
1063
|
+
duration_ms: one.durationMs
|
|
1064
|
+
})),
|
|
1065
|
+
transcripts: details.transcripts.filter(({ transcript }) => transcript.supersededAt === null && transcript.deletedAt === null).map(({ transcript, rows }) => ({
|
|
1066
|
+
ref: formatMeetingReference({
|
|
1067
|
+
type: "meeting",
|
|
1068
|
+
accountId,
|
|
1069
|
+
meetingId: transcript.meetingId,
|
|
1070
|
+
transcriptId: transcript.id
|
|
1071
|
+
}),
|
|
1072
|
+
source: transcript.source,
|
|
1073
|
+
language: transcript.language,
|
|
1074
|
+
lines_count: rows.length
|
|
1075
|
+
})),
|
|
1076
|
+
chat: details.chat.map((one) => ({
|
|
1077
|
+
sent_at: new Date(one.sentAt).toISOString(),
|
|
1078
|
+
sender: one.senderName,
|
|
1079
|
+
recipient: one.recipient,
|
|
1080
|
+
text: one.text
|
|
1081
|
+
})),
|
|
1082
|
+
summaries: details.summaries.map((one) => meetingSummaryItem(accountId, one)),
|
|
1083
|
+
attachments: details.attachments.map((one) => ({
|
|
1084
|
+
position: one.position,
|
|
1085
|
+
kind: one.kind,
|
|
1086
|
+
name: one.name ?? one.title,
|
|
1087
|
+
mime: one.mime,
|
|
1088
|
+
size: one.size,
|
|
1089
|
+
url: one.url
|
|
1090
|
+
}))
|
|
1091
|
+
};
|
|
1092
|
+
}, "meetingDetailsItem");
|
|
1093
|
+
var wholeList = /* @__PURE__ */ __name((items) => ({
|
|
1094
|
+
items,
|
|
1095
|
+
page: { mode: "page", limit: Math.max(1, items.length), has_more: false }
|
|
1096
|
+
}), "wholeList");
|
|
1097
|
+
var PAGE_NEXT = STEPS.find((step) => step.id === "page.next");
|
|
1098
|
+
var MEETING_STEPS = defineSteps([
|
|
1099
|
+
{
|
|
1100
|
+
id: "meetings.search-again",
|
|
1101
|
+
command: "*",
|
|
1102
|
+
args: [],
|
|
1103
|
+
why: "passages that changed since they were indexed were left out; the next search indexes them first"
|
|
1104
|
+
}
|
|
1105
|
+
]);
|
|
1106
|
+
var SEARCH_AGAIN = MEETING_STEPS[0];
|
|
1107
|
+
var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
|
|
1108
|
+
ref: hit.ref,
|
|
1109
|
+
meeting: meetingRef(parseMeetingReference(hit.ref).accountId, hit.meetingId),
|
|
1110
|
+
scope: hit.scope,
|
|
1111
|
+
id: String(hit.id),
|
|
1112
|
+
excerpt: hit.text,
|
|
1113
|
+
offset_ms: hit.startMs,
|
|
1114
|
+
untrusted: hit.source === void 0 ? ["excerpt"] : ["excerpt", "source.title"],
|
|
1115
|
+
...hit.match === void 0 ? {} : { match: hit.match },
|
|
1116
|
+
...hit.corrections === void 0 ? {} : { corrections: hit.corrections },
|
|
1117
|
+
...hit.source === void 0 ? {} : {
|
|
1118
|
+
source: {
|
|
1119
|
+
ref: hit.ref,
|
|
1120
|
+
title: hit.source.title,
|
|
1121
|
+
started_at: iso2(hit.source.startedAt),
|
|
1122
|
+
url: hit.source.url
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}), "meetingHitItem");
|
|
1126
|
+
var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search meetings", args = {}, meta = {}) => {
|
|
1127
|
+
const items = found.items.map(meetingHitItem);
|
|
1128
|
+
const cursor = found.hasMore && found.nextCursor !== null ? found.nextCursor : void 0;
|
|
1129
|
+
const pending = found.coverage.indexing === "pending";
|
|
1130
|
+
const next = [
|
|
1131
|
+
...cursor === void 0 ? [] : [stepOf(PAGE_NEXT, { command, args: { ...args, cursor, limit }, values: { shown: items.length } })],
|
|
1132
|
+
...pending ? [
|
|
1133
|
+
stepOf(SEARCH_AGAIN, {
|
|
1134
|
+
command,
|
|
1135
|
+
args: Object.fromEntries(Object.entries(args).filter(([key]) => key !== "cursor"))
|
|
1136
|
+
})
|
|
1137
|
+
] : []
|
|
1138
|
+
];
|
|
1139
|
+
return {
|
|
1140
|
+
items,
|
|
1141
|
+
page: {
|
|
1142
|
+
mode: "cursor",
|
|
1143
|
+
limit,
|
|
1144
|
+
has_more: cursor !== void 0,
|
|
1145
|
+
...cursor === void 0 ? {} : { next_cursor: cursor }
|
|
1146
|
+
},
|
|
1147
|
+
...next.length > 0 ? { next } : {},
|
|
1148
|
+
...pending ? {
|
|
1149
|
+
missing: [
|
|
1150
|
+
{
|
|
1151
|
+
field: "excerpt",
|
|
1152
|
+
why: "passages that changed since they were indexed were left out",
|
|
1153
|
+
step: "meetings.search-again"
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
} : {},
|
|
1157
|
+
...Object.keys(meta).length === 0 ? {} : { meta }
|
|
1158
|
+
};
|
|
1159
|
+
}, "meetingHitsList");
|
|
1160
|
+
|
|
1161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
1162
|
+
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1163
|
+
const parsed = urlOf(url);
|
|
1164
|
+
if (!parsed)
|
|
1165
|
+
return null;
|
|
1166
|
+
const host = parsed.hostname.toLowerCase().replace(/^www\./u, "");
|
|
1167
|
+
const path = parsed.pathname.replace(/\/+$/u, "");
|
|
1168
|
+
if (host === "zoom.us" || host.endsWith(".zoom.us") || host === "zoomgov.com" || host.endsWith(".zoomgov.com")) {
|
|
1169
|
+
const number2 = /^\/(?:j|w|s|wc\/join|wc)\/(\d{9,12})(?:\/|$)/u.exec(path)?.[1];
|
|
1170
|
+
if (number2)
|
|
1171
|
+
return `zoom:${number2}`;
|
|
1172
|
+
}
|
|
1173
|
+
if (host === "meet.google.com") {
|
|
1174
|
+
const code = /^\/([a-z]{3}-[a-z]{4}-[a-z]{3})$/iu.exec(path)?.[1];
|
|
1175
|
+
if (code)
|
|
1176
|
+
return `meet:${code.toLowerCase()}`;
|
|
1177
|
+
}
|
|
1178
|
+
return `${host}${path}`;
|
|
1179
|
+
}, "joinKeyOf");
|
|
1180
|
+
var joinUrlWithoutQuery = /* @__PURE__ */ __name((url) => {
|
|
1181
|
+
const parsed = urlOf(url);
|
|
1182
|
+
return parsed ? `${parsed.origin}${parsed.pathname}` : null;
|
|
1183
|
+
}, "joinUrlWithoutQuery");
|
|
1184
|
+
var urlOf = /* @__PURE__ */ __name((url) => {
|
|
1185
|
+
if (!url?.trim())
|
|
1186
|
+
return null;
|
|
1187
|
+
try {
|
|
1188
|
+
const parsed = new URL(url.trim());
|
|
1189
|
+
return parsed.protocol === "https:" || parsed.protocol === "http:" ? parsed : null;
|
|
1190
|
+
} catch {
|
|
1191
|
+
return null;
|
|
1192
|
+
}
|
|
1193
|
+
}, "urlOf");
|
|
1194
|
+
|
|
1195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1196
|
+
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1197
|
+
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1198
|
+
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");
|
|
1199
|
+
var withoutLinkQueries = /* @__PURE__ */ __name((text6) => text6.replace(/https?:\/\/[^\s<>"')\]]+/giu, (url) => joinUrlWithoutQuery(url) ?? ""), "withoutLinkQueries");
|
|
1200
|
+
var calendarText = /* @__PURE__ */ __name((text6, { dropSecretLines = true } = {}) => {
|
|
1201
|
+
if (!text6)
|
|
1202
|
+
return null;
|
|
1203
|
+
const kept = htmlToText(text6).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
|
|
1204
|
+
const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
|
|
1205
|
+
return joined || null;
|
|
1206
|
+
}, "calendarText");
|
|
1207
|
+
var ENTRY_METADATA_KEYS = [
|
|
1208
|
+
"colorId",
|
|
1209
|
+
"guestsCanInviteOthers",
|
|
1210
|
+
"guestsCanModify",
|
|
1211
|
+
"guestsCanSeeOtherGuests",
|
|
1212
|
+
"hangoutLink",
|
|
1213
|
+
"locked",
|
|
1214
|
+
"privateCopy"
|
|
1215
|
+
];
|
|
1216
|
+
var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
1217
|
+
const kept = {};
|
|
1218
|
+
for (const key of ENTRY_METADATA_KEYS) {
|
|
1219
|
+
const value = metadata?.[key];
|
|
1220
|
+
if (typeof value === "string")
|
|
1221
|
+
kept[key] = withoutLinkQueries(value);
|
|
1222
|
+
else if (typeof value === "number" || typeof value === "boolean")
|
|
1223
|
+
kept[key] = value;
|
|
1224
|
+
}
|
|
1225
|
+
return kept;
|
|
1226
|
+
}, "entryMetadata");
|
|
1227
|
+
|
|
1228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1229
|
+
import { createHash } from "node:crypto";
|
|
1230
|
+
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1231
|
+
reference: cue2.reference,
|
|
1232
|
+
transcriptId: cue2.transcriptId,
|
|
1233
|
+
contentHash: cue2.contentHash,
|
|
1234
|
+
position: cue2.position,
|
|
1235
|
+
startMs: cue2.startMs,
|
|
1236
|
+
endMs: cue2.endMs,
|
|
1237
|
+
speakerParticipantId: cue2.speakerParticipantId,
|
|
1238
|
+
speakerName: cue2.speakerName,
|
|
1239
|
+
text: cue2.text
|
|
1240
|
+
})).digest("hex"), "meetingCueFingerprint");
|
|
1241
|
+
|
|
1242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1243
|
+
var EVENT_QUERY = defineQuery({
|
|
1244
|
+
entity: "event",
|
|
1245
|
+
backend: "sql",
|
|
1246
|
+
fields: [
|
|
1247
|
+
{ name: "id", type: "num", operators: ["term", "range"], example: "id:1" },
|
|
1248
|
+
{ name: "origin", type: "enum", operators: ["term"], values: ["auto", "owner"], example: "origin:owner" },
|
|
1249
|
+
...["starts_at", "ends_at", "created_at", "updated_at"].map((name) => ({
|
|
1250
|
+
name,
|
|
1251
|
+
type: "time",
|
|
1252
|
+
operators: ["term", "range"],
|
|
1253
|
+
example: `${name}>=2026-01-01`
|
|
1254
|
+
}))
|
|
1255
|
+
]
|
|
1256
|
+
});
|
|
1257
|
+
|
|
1258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1259
|
+
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1260
|
+
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1261
|
+
if (entry.recurrenceEndsAt !== null)
|
|
1262
|
+
return entry.recurrenceEndsAt;
|
|
1263
|
+
const rule = entry.recurrence?.find((line2) => /^RRULE:/iu.test(line2));
|
|
1264
|
+
const until = rule === void 0 ? null : UNTIL.exec(rule.slice("RRULE:".length));
|
|
1265
|
+
if (!until)
|
|
1266
|
+
return Number.POSITIVE_INFINITY;
|
|
1267
|
+
const [, year, month, day, hour = "23", minute = "59", second = "59"] = until;
|
|
1268
|
+
return Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second)) + 864e5;
|
|
1269
|
+
}, "seriesEnd");
|
|
1270
|
+
var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
1271
|
+
if (entry.kind === "occurrence" && !entry.exception)
|
|
1272
|
+
return entry.originalStartsAt !== null && entry.originalStartsAt >= window.from && entry.originalStartsAt < window.to;
|
|
1273
|
+
const start = entry.startsAt ?? (entry.kind === "occurrence" ? entry.originalStartsAt : null);
|
|
1274
|
+
if (start === null || start >= window.to)
|
|
1275
|
+
return false;
|
|
1276
|
+
if (entry.kind === "series")
|
|
1277
|
+
return seriesEnd(entry) >= window.from;
|
|
1278
|
+
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1279
|
+
}, "entryInWindow");
|
|
1280
|
+
|
|
1281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1282
|
+
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now()) => {
|
|
1283
|
+
const current = await store.meeting(details.meeting.id);
|
|
1284
|
+
if (!current)
|
|
1285
|
+
return null;
|
|
1286
|
+
const { meeting: meeting2, series } = current;
|
|
1287
|
+
if (meeting2.eventId !== null)
|
|
1288
|
+
return (await store.events()).find((e) => e.id === meeting2.eventId) ?? null;
|
|
1289
|
+
const candidates = meeting2.startedAt === null ? [] : await store.eventCandidates({
|
|
1290
|
+
meetingSeriesId: meeting2.meetingSeriesId,
|
|
1291
|
+
joinUrl: meeting2.joinUrl,
|
|
1292
|
+
startsAt: meeting2.startedAt,
|
|
1293
|
+
endsAt: meeting2.endedAt ?? meeting2.startedAt
|
|
1294
|
+
});
|
|
1295
|
+
if (candidates.length > 1) {
|
|
1296
|
+
await store.reviewMeetingLink?.(meeting2.id, candidates.map(({ id: id3 }) => id3), now);
|
|
1297
|
+
return null;
|
|
1298
|
+
}
|
|
1299
|
+
let event2 = candidates[0];
|
|
1300
|
+
if (!event2) {
|
|
1301
|
+
let eventSeriesId = series?.eventSeriesId ?? null;
|
|
1302
|
+
if (series?.kind === "recurring" && eventSeriesId === null) {
|
|
1303
|
+
const created = await store.createEventSeries({ title: series.title, recurrence: null, origin: "auto" }, now);
|
|
1304
|
+
eventSeriesId = created.id;
|
|
1305
|
+
await store.setEventSeries(series.id, eventSeriesId, now);
|
|
1306
|
+
}
|
|
1307
|
+
event2 = await store.createEvent({
|
|
1308
|
+
eventSeriesId,
|
|
1309
|
+
title: meeting2.title,
|
|
1310
|
+
description: meeting2.description,
|
|
1311
|
+
location: meeting2.location,
|
|
1312
|
+
startsAt: meeting2.startedAt,
|
|
1313
|
+
endsAt: meeting2.endedAt,
|
|
1314
|
+
timezone: meeting2.timezone,
|
|
1315
|
+
origin: "auto",
|
|
1316
|
+
deletedAt: null
|
|
1317
|
+
}, now);
|
|
1318
|
+
}
|
|
1319
|
+
await store.linkMeeting(meeting2.id, event2.id, now);
|
|
1320
|
+
const linked = await store.meeting(meeting2.id);
|
|
1321
|
+
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
1322
|
+
}, "linkEvent");
|
|
1323
|
+
|
|
1324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1325
|
+
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text6) => text6.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1326
|
+
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1327
|
+
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
1328
|
+
throw new CliError("validation_error", "participant query must contain 1\u2013500 characters without NUL");
|
|
1329
|
+
return normalizeMeetingParticipantQuery(query.trim());
|
|
1330
|
+
}, "validateMeetingParticipantQuery");
|
|
1331
|
+
var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) => {
|
|
1332
|
+
input.signal?.throwIfAborted();
|
|
1333
|
+
const normalized = validateMeetingParticipantQuery(query);
|
|
1334
|
+
const bounded = /* @__PURE__ */ __name((value, maximum, name) => {
|
|
1335
|
+
if (!Number.isSafeInteger(value) || value < 1 || value > maximum)
|
|
1336
|
+
throw new CliError("validation_error", `${name} must be an integer from 1 through ${maximum}`);
|
|
1337
|
+
return value;
|
|
1338
|
+
}, "bounded");
|
|
1339
|
+
return {
|
|
1340
|
+
query: normalized,
|
|
1341
|
+
accountId: bounded(input.accountId, Number.MAX_SAFE_INTEGER, "accountId"),
|
|
1342
|
+
limit: bounded(input.limit ?? 50, 1e3, "limit"),
|
|
1343
|
+
scanLimit: bounded(input.scanLimit ?? 1e3, 1e4, "scanLimit"),
|
|
1344
|
+
maxReadBytes: bounded(input.maxReadBytes ?? 1024 ** 2, 64 * 1024 ** 2, "maxReadBytes")
|
|
1345
|
+
};
|
|
1346
|
+
}, "validateMeetingParticipantSearch");
|
|
1347
|
+
|
|
1348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1349
|
+
var MeetingError = class extends CliError {
|
|
1350
|
+
static {
|
|
1351
|
+
__name(this, "MeetingError");
|
|
1352
|
+
}
|
|
1353
|
+
constructor(code, message) {
|
|
1354
|
+
super(code, message);
|
|
1355
|
+
}
|
|
1356
|
+
};
|
|
1357
|
+
var positiveInteger = /* @__PURE__ */ __name((value) => {
|
|
1358
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value <= 0)
|
|
1359
|
+
throw new MeetingError("validation_error", "expected a positive integer");
|
|
1360
|
+
return value;
|
|
1361
|
+
}, "positiveInteger");
|
|
1362
|
+
var validateFilter = /* @__PURE__ */ __name((filter) => {
|
|
1363
|
+
for (const value of [filter.accountId, filter.eventId, filter.meetingSeriesId])
|
|
1364
|
+
if (value !== void 0)
|
|
1365
|
+
positiveInteger(value);
|
|
1366
|
+
for (const value of [filter.since, filter.until])
|
|
1367
|
+
if (value !== void 0 && !Number.isFinite(value))
|
|
1368
|
+
throw new MeetingError("validation_error", "expected epoch milliseconds");
|
|
1369
|
+
if (filter.since !== void 0 && filter.until !== void 0 && filter.since > filter.until)
|
|
1370
|
+
throw new MeetingError("validation_error", "since must not exceed until");
|
|
1371
|
+
for (const value of [filter.limit, filter.offset])
|
|
1372
|
+
if (value !== void 0 && (!Number.isSafeInteger(value) || value < 0))
|
|
1373
|
+
throw new MeetingError("validation_error", "expected a nonnegative integer");
|
|
1374
|
+
}, "validateFilter");
|
|
1375
|
+
var meetingShow = /* @__PURE__ */ __name(async (store, id3, accountId) => {
|
|
1376
|
+
const details = await store.meeting(positiveInteger(id3));
|
|
1377
|
+
if (!details || accountId !== void 0 && details.meeting.accountId !== accountId)
|
|
1378
|
+
throw new MeetingError("not_found", "meeting not found");
|
|
1379
|
+
return details;
|
|
1380
|
+
}, "meetingShow");
|
|
1381
|
+
var listed = /* @__PURE__ */ __name((items, page = { limit: items.length, hasMore: false }) => ({
|
|
1382
|
+
items,
|
|
1383
|
+
page: 1,
|
|
1384
|
+
...page
|
|
1385
|
+
}), "listed");
|
|
1386
|
+
var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, options = {}) => {
|
|
1387
|
+
if (accountId === void 0)
|
|
1388
|
+
validateMeetingParticipantQuery(query);
|
|
1389
|
+
else
|
|
1390
|
+
validateMeetingParticipantSearch(query, { ...options, accountId });
|
|
1391
|
+
if (store.participantCandidates && accountId === void 0)
|
|
1392
|
+
throw new MeetingError("configuration_error", "select an account for bounded participant lookup");
|
|
1393
|
+
if (accountId !== void 0 && store.participantCandidates) {
|
|
1394
|
+
const { limit, has_more, next_cursor, ...packet } = await store.participantCandidates(query, {
|
|
1395
|
+
...options,
|
|
1396
|
+
accountId
|
|
1397
|
+
});
|
|
1398
|
+
return {
|
|
1399
|
+
...packet,
|
|
1400
|
+
page: { mode: "cursor", limit, has_more, ...next_cursor ? { next_cursor } : {} },
|
|
1401
|
+
...next_cursor ? {
|
|
1402
|
+
next: [
|
|
1403
|
+
stepOf(PAGE_NEXT2, {
|
|
1404
|
+
command: "meetings people",
|
|
1405
|
+
args: {
|
|
1406
|
+
query,
|
|
1407
|
+
limit,
|
|
1408
|
+
...options.scanLimit === void 0 ? {} : { scan_limit: options.scanLimit },
|
|
1409
|
+
...options.maxReadBytes === void 0 ? {} : { max_read_bytes: options.maxReadBytes },
|
|
1410
|
+
cursor: next_cursor
|
|
1411
|
+
},
|
|
1412
|
+
values: { shown: packet.items.length }
|
|
1413
|
+
})
|
|
1414
|
+
]
|
|
1415
|
+
} : {}
|
|
1416
|
+
};
|
|
1417
|
+
}
|
|
1418
|
+
if (Object.values(options).some((value) => value !== void 0))
|
|
1419
|
+
throw new MeetingError("configuration_error", "bounded participant lookup needs a selected account and capable store");
|
|
1420
|
+
return listed(await store.participants(query, accountId));
|
|
1421
|
+
}, "meetingPeople");
|
|
1422
|
+
var PAGE_NEXT2 = STEPS.find((step) => step.id === "page.next");
|
|
1423
|
+
var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}, page = 1) => {
|
|
1424
|
+
validateFilter(filter);
|
|
1425
|
+
positiveInteger(page);
|
|
1426
|
+
const limit = positiveInteger(filter.limit ?? 100);
|
|
1427
|
+
const offset = (page - 1) * limit;
|
|
1428
|
+
if (!Number.isSafeInteger(offset + limit + 1))
|
|
1429
|
+
throw new MeetingError("validation_error", "pagination exceeds safe integer range");
|
|
1430
|
+
const rows = await store.meetings({ ...filter, limit: limit + 1, offset });
|
|
1431
|
+
const shown = rows.slice(0, limit);
|
|
1432
|
+
const owners = /* @__PURE__ */ new Map();
|
|
1433
|
+
for (const { accountId } of shown) {
|
|
1434
|
+
if (owners.has(accountId))
|
|
1435
|
+
continue;
|
|
1436
|
+
const owner = await store.account(accountId);
|
|
1437
|
+
if (!owner)
|
|
1438
|
+
throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
|
|
1439
|
+
owners.set(accountId, owner);
|
|
1440
|
+
}
|
|
1441
|
+
const has_more = rows.length > limit;
|
|
1442
|
+
return {
|
|
1443
|
+
items: shown.map((row) => meetingItem(row, owners.get(row.accountId))),
|
|
1444
|
+
page: { mode: "page", limit, has_more, ...has_more ? { next_page: page + 1 } : {} },
|
|
1445
|
+
...has_more ? {
|
|
1446
|
+
next: [
|
|
1447
|
+
stepOf(PAGE_NEXT2, { command: "meetings list", args: { page: page + 1, limit }, values: { shown: limit } })
|
|
1448
|
+
]
|
|
1449
|
+
} : {}
|
|
1450
|
+
};
|
|
1451
|
+
}, "meetingsList");
|
|
1452
|
+
var meetingsQuery = /* @__PURE__ */ __name((text6) => {
|
|
1453
|
+
if (text6 === void 0 || text6.trim() === "")
|
|
1454
|
+
return void 0;
|
|
1455
|
+
const context3 = { command: "meetings list", guide: MEETING_QUERY_GUIDE };
|
|
1456
|
+
const query = parseLucene(text6, { defaultField: "none", ...context3 });
|
|
1457
|
+
validateQuery(query, MEETING_QUERY, context3);
|
|
1458
|
+
return query;
|
|
1459
|
+
}, "meetingsQuery");
|
|
1460
|
+
var MEETING_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
1461
|
+
var ownerOf = /* @__PURE__ */ __name(async (store, accountId) => {
|
|
1462
|
+
const owner = await store.account(accountId);
|
|
1463
|
+
if (!owner)
|
|
1464
|
+
throw new MeetingError("not_found", `meeting account ${accountId} is not in the store`);
|
|
1465
|
+
return owner;
|
|
1466
|
+
}, "ownerOf");
|
|
1467
|
+
var meetingDetailsAnswer = /* @__PURE__ */ __name(async (store, id3, accountId) => {
|
|
1468
|
+
const details = await meetingShow(store, id3, accountId);
|
|
1469
|
+
return { item: meetingDetailsItem(details, await ownerOf(store, details.meeting.accountId)) };
|
|
1470
|
+
}, "meetingDetailsAnswer");
|
|
1471
|
+
var meetingTranscriptAnswer = /* @__PURE__ */ __name(async (store, id3, accountId, options = {}) => {
|
|
1472
|
+
const details = await meetingShow(store, id3, accountId);
|
|
1473
|
+
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)));
|
|
1474
|
+
}, "meetingTranscriptAnswer");
|
|
1475
|
+
var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id3, accountId) => {
|
|
1476
|
+
const details = await meetingShow(store, id3, accountId);
|
|
1477
|
+
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
1478
|
+
}, "meetingSummaryAnswer");
|
|
1479
|
+
|
|
1480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
1481
|
+
var timestamp = /* @__PURE__ */ __name((milliseconds) => {
|
|
1482
|
+
if (!Number.isSafeInteger(milliseconds) || milliseconds < 0)
|
|
1483
|
+
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
1484
|
+
const hours = Math.floor(milliseconds / 36e5);
|
|
1485
|
+
const minutes = Math.floor(milliseconds % 36e5 / 6e4);
|
|
1486
|
+
const seconds = Math.floor(milliseconds % 6e4 / 1e3);
|
|
1487
|
+
return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${String(milliseconds % 1e3).padStart(3, "0")}`;
|
|
1488
|
+
}, "timestamp");
|
|
1489
|
+
var vttText = /* @__PURE__ */ __name((text6) => {
|
|
1490
|
+
if (visibleControls(text6) !== text6 || /\n\s*\n/.test(text6))
|
|
1491
|
+
throw new MeetingError("validation_error", "cue paragraphs or control characters require Markdown export");
|
|
1492
|
+
return text6.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
1493
|
+
}, "vttText");
|
|
1494
|
+
var serializeVtt = /* @__PURE__ */ __name((lines) => `WEBVTT
|
|
1495
|
+
|
|
1496
|
+
${lines.map((line2, index) => {
|
|
1497
|
+
if (index > 0 && line2.startMs < (lines[index - 1]?.startMs ?? 0))
|
|
1498
|
+
throw new MeetingError("validation_error", "WebVTT cues must have nondecreasing start times");
|
|
1499
|
+
if (line2.endMs <= line2.startMs)
|
|
1500
|
+
throw new MeetingError("validation_error", "a transcript cue ends before it starts");
|
|
1501
|
+
const speaker = line2.speaker === null ? "" : `${vttText(line2.speaker)}: `;
|
|
1502
|
+
if (line2.speaker?.includes("\n"))
|
|
1503
|
+
throw new MeetingError("validation_error", "a speaker must fit on one line");
|
|
1504
|
+
return `${index + 1}
|
|
1505
|
+
${timestamp(line2.startMs)} --> ${timestamp(line2.endMs)}
|
|
1506
|
+
${speaker}${vttText(line2.text)}
|
|
1507
|
+
|
|
1508
|
+
`;
|
|
1509
|
+
}).join("")}`, "serializeVtt");
|
|
1510
|
+
var markdown = /* @__PURE__ */ __name((text6) => visibleControls(text6).replace(/[\\`*_{}[\]()<>#+.!|~]/g, "\\$&"), "markdown");
|
|
1511
|
+
var heading = /* @__PURE__ */ __name((text6) => markdown(singleLine(text6)), "heading");
|
|
1512
|
+
var quote = /* @__PURE__ */ __name((text6) => markdown(text6).split(/\r\n|\r|\n/).map((line2) => `> ${line2}`).join("\n"), "quote");
|
|
1513
|
+
var transcriptsOf = /* @__PURE__ */ __name((details, transcriptId) => {
|
|
1514
|
+
if (transcriptId !== void 0) {
|
|
1515
|
+
positiveInteger(transcriptId);
|
|
1516
|
+
const transcript = details.transcripts.find((part) => part.transcript.id === transcriptId && part.transcript.deletedAt === null);
|
|
1517
|
+
if (!transcript)
|
|
1518
|
+
throw new MeetingError("not_found", "transcript not found in the selected meeting");
|
|
1519
|
+
return [transcript];
|
|
1520
|
+
}
|
|
1521
|
+
return details.transcripts.filter((part) => part.transcript.supersededAt === null && part.transcript.deletedAt === null);
|
|
1522
|
+
}, "transcriptsOf");
|
|
1523
|
+
var exportMeeting = /* @__PURE__ */ __name(async (store, id3, options) => {
|
|
1524
|
+
if (options.format !== "markdown" && options.format !== "vtt")
|
|
1525
|
+
throw new MeetingError("validation_error", "export format must be markdown or vtt");
|
|
1526
|
+
const details = await meetingShow(store, id3, options.accountId);
|
|
1527
|
+
const transcripts = transcriptsOf(details, options.transcriptId);
|
|
1528
|
+
let content;
|
|
1529
|
+
if (options.format === "vtt") {
|
|
1530
|
+
const [selected] = transcripts;
|
|
1531
|
+
if (!selected)
|
|
1532
|
+
throw new MeetingError("not_found", "meeting has no transcript to export");
|
|
1533
|
+
if (transcripts.length > 1)
|
|
1534
|
+
throw new MeetingError("validation_error", "choose a transcript id when exporting multiple transcripts as VTT");
|
|
1535
|
+
content = serializeVtt([...selected.rows].sort((a, b) => a.position - b.position).map((row) => ({
|
|
1536
|
+
startMs: row.startMs,
|
|
1537
|
+
endMs: row.endMs,
|
|
1538
|
+
speaker: row.speakerName,
|
|
1539
|
+
text: row.text
|
|
1540
|
+
})));
|
|
1541
|
+
} else {
|
|
1542
|
+
const parts = [`# ${heading(details.meeting.title ?? "Untitled meeting")}`, `Meeting ID: ${details.meeting.id}`];
|
|
1543
|
+
if (details.meeting.description !== null)
|
|
1544
|
+
parts.push("## Description", quote(details.meeting.description));
|
|
1545
|
+
for (const summary of details.summaries) {
|
|
1546
|
+
parts.push(`## ${heading(summary.title ?? "Summary")}`);
|
|
1547
|
+
if (summary.content !== null)
|
|
1548
|
+
parts.push(quote(summary.content));
|
|
1549
|
+
else {
|
|
1550
|
+
if (summary.overview !== null)
|
|
1551
|
+
parts.push(quote(summary.overview));
|
|
1552
|
+
for (const section of summary.sections)
|
|
1553
|
+
parts.push(`### ${heading(section.label)}`, quote(section.text));
|
|
1554
|
+
if (summary.nextSteps.length > 0)
|
|
1555
|
+
parts.push("### Next steps", summary.nextSteps.map((step) => `- ${markdown(step)}`).join("\n"));
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
for (const part of transcripts) {
|
|
1559
|
+
parts.push(`## Transcript ${part.transcript.id}`, `Source: ${heading(part.transcript.source)}`);
|
|
1560
|
+
if (part.transcript.supersededAt !== null)
|
|
1561
|
+
parts.push("Version: superseded");
|
|
1562
|
+
for (const row of [...part.rows].sort((a, b) => a.position - b.position))
|
|
1563
|
+
parts.push(`[${timestamp(row.startMs)} \u2013 ${timestamp(row.endMs)}]${row.speakerName === null ? "" : ` ${heading(row.speakerName)}`}`, quote(row.text));
|
|
1564
|
+
}
|
|
1565
|
+
content = `${parts.join("\n\n")}
|
|
1566
|
+
`;
|
|
1567
|
+
}
|
|
1568
|
+
return {
|
|
1569
|
+
meetingId: details.meeting.id,
|
|
1570
|
+
format: options.format,
|
|
1571
|
+
filename: `meeting-${details.meeting.id}${options.transcriptId === void 0 ? "" : `-transcript-${options.transcriptId}`}.${options.format === "markdown" ? "md" : "vtt"}`,
|
|
1572
|
+
content
|
|
1573
|
+
};
|
|
1574
|
+
}, "exportMeeting");
|
|
1575
|
+
|
|
1576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1577
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
1578
|
+
|
|
1579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
1580
|
+
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
1581
|
+
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
1582
|
+
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone`);
|
|
1583
|
+
const date = value.slice(0, 10);
|
|
1584
|
+
const instant = Date.parse(`${date}T00:00:00Z`);
|
|
1585
|
+
if (!Number.isFinite(instant) || new Date(instant).toISOString().slice(0, 10) !== date)
|
|
1586
|
+
throw new CliError("validation_error", `${name} contains an invalid calendar date`);
|
|
1587
|
+
return new Date(value).toISOString();
|
|
1588
|
+
}, "meetingTimestamp");
|
|
1589
|
+
|
|
1590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
1591
|
+
var nonempty = /* @__PURE__ */ __name((value, name) => {
|
|
1592
|
+
if (typeof value !== "string" || !value.trim())
|
|
1593
|
+
throw new CliError("validation_error", `${name} must be nonempty`);
|
|
1594
|
+
return value;
|
|
1595
|
+
}, "nonempty");
|
|
1596
|
+
var validateMeetingChange = /* @__PURE__ */ __name((change, create) => {
|
|
1597
|
+
if (!change || typeof change !== "object" || Array.isArray(change) || Object.keys(change).some((key) => !["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].includes(key)))
|
|
1598
|
+
throw new CliError("validation_error", "unsupported meeting change field");
|
|
1599
|
+
const result = {};
|
|
1600
|
+
if (change.title !== void 0)
|
|
1601
|
+
result.title = nonempty(change.title, "meeting title");
|
|
1602
|
+
if (create && result.title === void 0)
|
|
1603
|
+
throw new CliError("validation_error", "meeting title is required");
|
|
1604
|
+
if (change.kind !== void 0) {
|
|
1605
|
+
if (change.kind !== "instant" && change.kind !== "scheduled")
|
|
1606
|
+
throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
|
|
1607
|
+
result.kind = change.kind;
|
|
1608
|
+
}
|
|
1609
|
+
if (change.startTime !== void 0) {
|
|
1610
|
+
result.startTime = meetingTimestamp(change.startTime, "meeting start");
|
|
1611
|
+
}
|
|
1612
|
+
if (change.durationMinutes !== void 0) {
|
|
1613
|
+
if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
|
|
1614
|
+
throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
|
|
1615
|
+
result.durationMinutes = change.durationMinutes;
|
|
1616
|
+
}
|
|
1617
|
+
if (change.timezone !== void 0) {
|
|
1618
|
+
if (typeof change.timezone !== "string" || !change.timezone.trim())
|
|
1619
|
+
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
1620
|
+
try {
|
|
1621
|
+
new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
|
|
1622
|
+
} catch {
|
|
1623
|
+
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
1624
|
+
}
|
|
1625
|
+
result.timezone = change.timezone;
|
|
1626
|
+
}
|
|
1627
|
+
if (change.agenda !== void 0) {
|
|
1628
|
+
if (typeof change.agenda !== "string")
|
|
1629
|
+
throw new CliError("validation_error", "meeting agenda must be text");
|
|
1630
|
+
result.agenda = change.agenda;
|
|
1631
|
+
}
|
|
1632
|
+
if (create) {
|
|
1633
|
+
result.kind ??= "scheduled";
|
|
1634
|
+
if (result.kind === "scheduled" && result.startTime === void 0)
|
|
1635
|
+
throw new CliError("validation_error", "scheduled meeting start is required");
|
|
1636
|
+
} else if (!Object.keys(result).length)
|
|
1637
|
+
throw new CliError("validation_error", "at least one meeting change is required");
|
|
1638
|
+
return Object.freeze(result);
|
|
1639
|
+
}, "validateMeetingChange");
|
|
1640
|
+
|
|
1641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
1642
|
+
var MEETING_FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
1643
|
+
|
|
1644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1645
|
+
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1646
|
+
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
1647
|
+
throw new CliError("validation_error", message);
|
|
1648
|
+
}, "invalid");
|
|
1649
|
+
var text3 = /* @__PURE__ */ __name((value, limit) => {
|
|
1650
|
+
if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > limit)
|
|
1651
|
+
return invalid2(`finding text must contain 1\u2013${limit} characters without NUL`);
|
|
1652
|
+
return value.trim();
|
|
1653
|
+
}, "text");
|
|
1654
|
+
var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update(JSON.stringify(value)).digest("hex"), "findingHash");
|
|
1655
|
+
var fields = /* @__PURE__ */ __name((value, allowed, noun) => {
|
|
1656
|
+
if (Object.keys(value).some((key) => !allowed.includes(key)))
|
|
1657
|
+
invalid2(`unknown ${noun} field`);
|
|
1658
|
+
}, "fields");
|
|
1659
|
+
var validateFindings = /* @__PURE__ */ __name((input, rules) => {
|
|
1660
|
+
if (!input || typeof input !== "object" || Buffer.byteLength(JSON.stringify(input), "utf8") > 65536)
|
|
1661
|
+
return invalid2(`${rules.plural} take at most 65536 UTF-8 bytes`);
|
|
1662
|
+
fields(input, ["schemaVersion", "key", "extractor", "findings"], rules.singular);
|
|
1663
|
+
if (input.schemaVersion !== 1 || !Array.isArray(input.findings) || input.findings.length < 1 || input.findings.length > 16)
|
|
1664
|
+
return invalid2(`schemaVersion 1 takes 1\u201316 ${rules.plural}`);
|
|
1665
|
+
const key = text3(input.key, 64);
|
|
1666
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(key))
|
|
1667
|
+
return invalid2("a findings key uses letters, digits, dot, colon, underscore or hyphen");
|
|
1668
|
+
const ids2 = /* @__PURE__ */ new Set();
|
|
1669
|
+
const findings = input.findings.map((finding) => {
|
|
1670
|
+
if (!finding || typeof finding !== "object")
|
|
1671
|
+
return invalid2("a finding is an object");
|
|
1672
|
+
const id3 = text3(finding.id, 64);
|
|
1673
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.:-]*$/.test(id3) || ids2.has(id3))
|
|
1674
|
+
return invalid2("finding IDs must be unique simple keys");
|
|
1675
|
+
ids2.add(id3);
|
|
1676
|
+
const project = text3(finding.project, 64);
|
|
1677
|
+
if (!/^project:[1-9]\d*$/.test(project))
|
|
1678
|
+
return invalid2("a finding names a project reference");
|
|
1679
|
+
if (!Array.isArray(finding.evidence) || finding.evidence.length < 1 || finding.evidence.length > 8)
|
|
1680
|
+
return invalid2(`a finding requires 1\u20138 cited ${rules.cited}s`);
|
|
1681
|
+
const evidence = finding.evidence.map((item) => {
|
|
1682
|
+
if (!item || typeof item !== "object")
|
|
1683
|
+
return invalid2("finding evidence is a reference and fingerprint");
|
|
1684
|
+
fields(item, ["reference", "fingerprint"], rules.singular);
|
|
1685
|
+
if (typeof item.reference !== "string" || typeof item.fingerprint !== "string")
|
|
1686
|
+
return invalid2("evidence requires a reference and fingerprint");
|
|
1687
|
+
const reference2 = rules.reference(item.reference);
|
|
1688
|
+
if (!/^[a-f0-9]{64}$/.test(item.fingerprint))
|
|
1689
|
+
return invalid2(`finding evidence requires exact ${rules.cited} references and fingerprints`);
|
|
1690
|
+
return { reference: reference2, fingerprint: item.fingerprint };
|
|
1691
|
+
}).sort((a, b) => a.reference.localeCompare(b.reference));
|
|
1692
|
+
if (new Set(evidence.map((item) => item.reference)).size !== evidence.length)
|
|
1693
|
+
return invalid2(`duplicate evidence ${rules.cited}`);
|
|
1694
|
+
const base = { id: id3, project, evidence };
|
|
1695
|
+
if (finding.kind === "fact") {
|
|
1696
|
+
fields(finding, ["id", "project", "evidence", "kind", "type", "statement"], rules.singular);
|
|
1697
|
+
if (!MEETING_FACT_TYPES.includes(finding.type))
|
|
1698
|
+
return invalid2("unknown fact finding type");
|
|
1699
|
+
return { ...base, kind: "fact", type: finding.type, statement: text3(finding.statement, 2e3) };
|
|
1700
|
+
}
|
|
1701
|
+
if (finding.kind !== "task")
|
|
1702
|
+
return invalid2("a finding is a fact or task");
|
|
1703
|
+
fields(finding, [
|
|
1704
|
+
"id",
|
|
1705
|
+
"project",
|
|
1706
|
+
"evidence",
|
|
1707
|
+
"kind",
|
|
1708
|
+
"type",
|
|
1709
|
+
"title",
|
|
1710
|
+
"reason",
|
|
1711
|
+
"commitment",
|
|
1712
|
+
"dueAt",
|
|
1713
|
+
"dueEvidence",
|
|
1714
|
+
"assignee",
|
|
1715
|
+
"assigneeEvidence"
|
|
1716
|
+
], rules.singular);
|
|
1717
|
+
if (!TASK_TYPES.includes(finding.type))
|
|
1718
|
+
return invalid2("a task finding type is bug, chore or feature");
|
|
1719
|
+
if (!["explicit", "inferred"].includes(finding.commitment))
|
|
1720
|
+
return invalid2("task commitment must be explicit or inferred");
|
|
1721
|
+
const support = /* @__PURE__ */ __name((value) => {
|
|
1722
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref) => typeof ref !== "string" || !evidence.some((item) => item.reference === ref)))
|
|
1723
|
+
return invalid2("date and assignee support must cite the finding's evidence");
|
|
1724
|
+
return [...new Set(value)].sort();
|
|
1725
|
+
}, "support");
|
|
1726
|
+
if (finding.dueAt === void 0 !== (finding.dueEvidence === void 0) || finding.assignee === void 0 !== (finding.assigneeEvidence === void 0))
|
|
1727
|
+
return invalid2("optional dates and assignees require their supporting evidence");
|
|
1728
|
+
if (finding.assignee !== void 0 && (typeof finding.assignee !== "string" || !/^person:[1-9]\d*$/.test(finding.assignee)))
|
|
1729
|
+
return invalid2("an assignee must be a person reference");
|
|
1730
|
+
return {
|
|
1731
|
+
...base,
|
|
1732
|
+
kind: "task",
|
|
1733
|
+
type: finding.type,
|
|
1734
|
+
title: text3(finding.title, 300),
|
|
1735
|
+
reason: text3(finding.reason, 2e3),
|
|
1736
|
+
commitment: finding.commitment,
|
|
1737
|
+
...finding.dueAt === void 0 ? {} : { dueAt: meetingTimestamp(finding.dueAt, "finding due date"), dueEvidence: support(finding.dueEvidence) },
|
|
1738
|
+
...finding.assignee === void 0 ? {} : { assignee: finding.assignee, assigneeEvidence: support(finding.assigneeEvidence) }
|
|
1739
|
+
};
|
|
1740
|
+
});
|
|
1741
|
+
return { schemaVersion: 1, key, extractor: text3(input.extractor, 200), findings };
|
|
1742
|
+
}, "validateFindings");
|
|
1743
|
+
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1744
|
+
|
|
1745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1746
|
+
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1747
|
+
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1748
|
+
const reference2 = canonicalMeetingReference(raw);
|
|
1749
|
+
if (parseMeetingReference(reference2).cuePosition === void 0)
|
|
1750
|
+
throw new CliError("validation_error", "finding evidence requires exact cue references and fingerprints");
|
|
1751
|
+
return reference2;
|
|
1752
|
+
}, "cue");
|
|
1753
|
+
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1754
|
+
var meetingFindingFingerprint = findingFingerprint;
|
|
1755
|
+
|
|
1756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
1757
|
+
var context = {
|
|
1758
|
+
command: "search meetings",
|
|
1759
|
+
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
1760
|
+
};
|
|
1761
|
+
var words = ["term", "phrase"];
|
|
1762
|
+
var MOST_LINES_APART = 20;
|
|
1763
|
+
var near = /* @__PURE__ */ __name((node) => {
|
|
1764
|
+
if (node.slop !== void 0 && node.slop > MOST_LINES_APART)
|
|
1765
|
+
queryError("query.invalid-number", node.span, `words at most ${MOST_LINES_APART} lines apart: "a b"~${MOST_LINES_APART}`, context);
|
|
1766
|
+
}, "near");
|
|
1767
|
+
var MEETING_HIT_QUERY = defineQuery({
|
|
1768
|
+
entity: "meeting_hit",
|
|
1769
|
+
backend: "sql",
|
|
1770
|
+
fields: [
|
|
1771
|
+
{
|
|
1772
|
+
name: "text",
|
|
1773
|
+
type: "txt",
|
|
1774
|
+
operators: words,
|
|
1775
|
+
example: "text:budget",
|
|
1776
|
+
relation: "a passage with the word in any form, or a spelling speech recognition garbled",
|
|
1777
|
+
validate: near
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
name: "exact",
|
|
1781
|
+
type: "txt",
|
|
1782
|
+
operators: words,
|
|
1783
|
+
example: "exact:budget",
|
|
1784
|
+
relation: "a passage with the word as typed: no other forms, no garbled spellings",
|
|
1785
|
+
validate: near
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
name: "from",
|
|
1789
|
+
type: "kw",
|
|
1790
|
+
operators: words,
|
|
1791
|
+
example: 'from:"Alice Synthetic"',
|
|
1792
|
+
relation: "a line said or a chat message written by this person; attendance is --identity-id"
|
|
1793
|
+
}
|
|
1794
|
+
]
|
|
1795
|
+
});
|
|
1796
|
+
var MEETING_FIELDS = defineQuery({
|
|
1797
|
+
entity: "meeting_hit",
|
|
1798
|
+
backend: "sql",
|
|
1799
|
+
fields: [
|
|
1800
|
+
...MEETING_HIT_QUERY.fields,
|
|
1801
|
+
{
|
|
1802
|
+
name: "date",
|
|
1803
|
+
type: "time",
|
|
1804
|
+
operators: ["term", "range"],
|
|
1805
|
+
example: "date>=30d",
|
|
1806
|
+
relation: "meetings that started then; the same as --since-time and --until-time"
|
|
1807
|
+
},
|
|
1808
|
+
...["project", "tag", "topic"].map((name) => ({
|
|
1809
|
+
name,
|
|
1810
|
+
type: "kw",
|
|
1811
|
+
operators: words,
|
|
1812
|
+
example: `${name}:"Example name"`,
|
|
1813
|
+
relation: `meetings in this ${name}, by name or alias; the same as --${name}`
|
|
1814
|
+
}))
|
|
1815
|
+
]
|
|
1816
|
+
});
|
|
1817
|
+
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
1818
|
+
|
|
1819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
1820
|
+
var contentHash = /* @__PURE__ */ __name(async (text6) => {
|
|
1821
|
+
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text6));
|
|
1822
|
+
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
1823
|
+
}, "contentHash");
|
|
1824
|
+
var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
1825
|
+
if (name === null)
|
|
1826
|
+
return null;
|
|
1827
|
+
const matches2 = participants.flatMap((p, i) => p.displayName === name ? [i] : []);
|
|
1828
|
+
return matches2.length === 1 ? matches2[0] ?? null : null;
|
|
1829
|
+
}, "speakerPosition");
|
|
1830
|
+
var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
|
|
1831
|
+
source,
|
|
1832
|
+
format,
|
|
1833
|
+
language: null,
|
|
1834
|
+
contentHash: await contentHash(hashText),
|
|
1835
|
+
externalCreatedAt: null,
|
|
1836
|
+
metadata: null,
|
|
1837
|
+
deletedAt: null,
|
|
1838
|
+
rows: lines.map((line2, position) => ({
|
|
1839
|
+
position,
|
|
1840
|
+
startMs: line2.startMs,
|
|
1841
|
+
endMs: line2.endMs,
|
|
1842
|
+
speakerParticipantPosition: speakerPosition(line2.speaker, participants),
|
|
1843
|
+
speakerName: line2.speaker,
|
|
1844
|
+
text: line2.text,
|
|
1845
|
+
normalizedText: null,
|
|
1846
|
+
metadata: null
|
|
1847
|
+
}))
|
|
1848
|
+
}), "transcriptInput");
|
|
1849
|
+
var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
1850
|
+
const time = Date.parse(value);
|
|
1851
|
+
if (!Number.isFinite(time))
|
|
1852
|
+
throw new Error("Invalid meeting timestamp");
|
|
1853
|
+
return time;
|
|
1854
|
+
}, "timestamp");
|
|
1855
|
+
|
|
1856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
1857
|
+
var TranscriptTextError = class extends Error {
|
|
1858
|
+
static {
|
|
1859
|
+
__name(this, "TranscriptTextError");
|
|
1860
|
+
}
|
|
1861
|
+
name = "TranscriptTextError";
|
|
1862
|
+
};
|
|
1863
|
+
var HEADER = {
|
|
1864
|
+
"\u0412\u0441\u0442\u0440\u0435\u0447\u0430: ": "title",
|
|
1865
|
+
"\u0414\u0430\u0442\u0430: ": "date",
|
|
1866
|
+
"Zoom ID: ": "meetingId",
|
|
1867
|
+
"\u0413\u043E\u0432\u043E\u0440\u044F\u0442: ": "speakers"
|
|
1868
|
+
};
|
|
1869
|
+
var LINE = /^\[(\d{2,}):([0-5]\d):([0-5]\d)\]\s*(?:([^:\n]{1,60}):\s*)?([\s\S]*)$/;
|
|
1870
|
+
var RULE = /^[—–-]{10,}[^\n]*(?:\n|$)/;
|
|
1871
|
+
var EMPTY = /* @__PURE__ */ new Set(["", "\u2014", "-"]);
|
|
1872
|
+
var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
1873
|
+
const text6 = input.replace(/^/, "").replace(/\r\n?/g, "\n");
|
|
1874
|
+
const header = { title: null, date: null, meetingId: null, speakers: [] };
|
|
1875
|
+
let sawHeader = false;
|
|
1876
|
+
for (const line2 of text6.split("\n")) {
|
|
1877
|
+
if (!line2.trim())
|
|
1878
|
+
break;
|
|
1879
|
+
for (const [prefix, key] of Object.entries(HEADER)) {
|
|
1880
|
+
if (!line2.startsWith(prefix))
|
|
1881
|
+
continue;
|
|
1882
|
+
sawHeader = true;
|
|
1883
|
+
const value = line2.slice(prefix.length).trim();
|
|
1884
|
+
if (key === "speakers")
|
|
1885
|
+
header.speakers = value.split(",").map((name) => name.trim()).filter((name) => !EMPTY.has(name));
|
|
1886
|
+
else
|
|
1887
|
+
header[key] = EMPTY.has(value) ? null : value;
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
if (!sawHeader)
|
|
1891
|
+
throw new TranscriptTextError('a text transcript starts with a header such as "\u0412\u0441\u0442\u0440\u0435\u0447\u0430: \u2026"');
|
|
1892
|
+
const found = [];
|
|
1893
|
+
for (const block of text6.split(/\n\s*\n/)) {
|
|
1894
|
+
const match = LINE.exec(block.trim().replace(RULE, ""));
|
|
1895
|
+
if (!match)
|
|
1896
|
+
continue;
|
|
1897
|
+
const [, hours = "0", minutes = "0", seconds = "0", speaker, said = ""] = match;
|
|
1898
|
+
found.push({
|
|
1899
|
+
startMs: ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3,
|
|
1900
|
+
speaker: speaker?.trim() || null,
|
|
1901
|
+
text: said.trim()
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
const lines = found.map((line2, at) => ({
|
|
1905
|
+
...line2,
|
|
1906
|
+
endMs: Math.max(line2.startMs, found[at + 1]?.startMs ?? line2.startMs)
|
|
1907
|
+
}));
|
|
1908
|
+
return { header, lines };
|
|
1909
|
+
}, "parseTranscriptText");
|
|
1910
|
+
|
|
1911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
1912
|
+
var VttError = class extends Error {
|
|
1913
|
+
static {
|
|
1914
|
+
__name(this, "VttError");
|
|
1915
|
+
}
|
|
1916
|
+
name = "VttError";
|
|
1917
|
+
};
|
|
1918
|
+
var TIMESTAMP = /^(?:(\d+):)?([0-5]\d):([0-5]\d)\.(\d{3})$/;
|
|
1919
|
+
var SKIPPED = /^(NOTE|STYLE|REGION)(\s|$)/;
|
|
1920
|
+
var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
|
|
1921
|
+
const match = TIMESTAMP.exec(stamp);
|
|
1922
|
+
if (!match)
|
|
1923
|
+
throw new VttError(`line ${lineNo}: "${stamp}" is not a WebVTT timestamp`);
|
|
1924
|
+
const [, hours = "0", minutes = "0", seconds = "0", ms = "0"] = match;
|
|
1925
|
+
return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms);
|
|
1926
|
+
}, "millis");
|
|
1927
|
+
var splitSpeaker = /* @__PURE__ */ __name((text6) => {
|
|
1928
|
+
const firstLine = text6.split("\n", 1)[0] ?? "";
|
|
1929
|
+
const at = firstLine.indexOf(": ");
|
|
1930
|
+
if (at <= 0)
|
|
1931
|
+
return { speaker: null, text: text6 };
|
|
1932
|
+
return { speaker: firstLine.slice(0, at).trim(), text: text6.slice(at + 2) };
|
|
1933
|
+
}, "splitSpeaker");
|
|
1934
|
+
var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
1935
|
+
const lines = input.replace(/^/, "").split(/\r\n|\r|\n/);
|
|
1936
|
+
if (!/^WEBVTT([ \t].*)?$/.test(lines[0] ?? ""))
|
|
1937
|
+
throw new VttError('line 1: a WebVTT file starts with "WEBVTT"');
|
|
1938
|
+
const cues = [];
|
|
1939
|
+
let i = lines.findIndex((line2) => line2.trim() === "");
|
|
1940
|
+
if (i < 0)
|
|
1941
|
+
return [];
|
|
1942
|
+
while (i < lines.length) {
|
|
1943
|
+
while (i < lines.length && lines[i]?.trim() === "")
|
|
1944
|
+
i++;
|
|
1945
|
+
const start = i;
|
|
1946
|
+
while (i < lines.length && lines[i]?.trim() !== "")
|
|
1947
|
+
i++;
|
|
1948
|
+
const block = lines.slice(start, i);
|
|
1949
|
+
if (block.length === 0 || SKIPPED.test(block[0] ?? ""))
|
|
1950
|
+
continue;
|
|
1951
|
+
const timingAt = block.findIndex((line2) => line2.includes("-->"));
|
|
1952
|
+
if (timingAt < 0 || timingAt > 1)
|
|
1953
|
+
throw new VttError(`line ${start + 1}: a cue has no timing line`);
|
|
1954
|
+
const lineNo = start + timingAt + 1;
|
|
1955
|
+
const [from = "", rest = ""] = (block[timingAt] ?? "").split("-->");
|
|
1956
|
+
const to = rest.trim().split(/\s+/)[0] ?? "";
|
|
1957
|
+
const text6 = block.slice(timingAt + 1).join("\n").trim();
|
|
1958
|
+
cues.push({ startMs: millis(from.trim(), lineNo), endMs: millis(to, lineNo), ...splitSpeaker(text6) });
|
|
1959
|
+
}
|
|
1960
|
+
return cues;
|
|
1961
|
+
}, "parseVtt");
|
|
1962
|
+
|
|
1963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
1964
|
+
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
1965
|
+
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
1966
|
+
for (const file of files) {
|
|
1967
|
+
try {
|
|
1968
|
+
const format = file.format ?? "vtt";
|
|
1969
|
+
const lines = format === "text" ? parseTranscriptText(file.content).lines : parseVtt(file.content);
|
|
1970
|
+
const participants = file.participants ?? [];
|
|
1971
|
+
const details = await store.saveMeeting({
|
|
1972
|
+
meeting: file.meeting,
|
|
1973
|
+
participants: file.participants,
|
|
1974
|
+
transcripts: [await transcriptInput(lines, participants, file.source ?? "file", file.content, format)],
|
|
1975
|
+
now,
|
|
1976
|
+
fromFile: true
|
|
1977
|
+
});
|
|
1978
|
+
await linkEvent(store, details, now);
|
|
1979
|
+
report.meetings++;
|
|
1980
|
+
report.participants += participants.length;
|
|
1981
|
+
report.transcriptRows += lines.length;
|
|
1982
|
+
} catch (error) {
|
|
1983
|
+
report.warnings.push({
|
|
1984
|
+
externalId: file.meeting.externalId,
|
|
1985
|
+
message: error instanceof Error ? error.message : "Meeting import failed"
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
const zones = new Set(files.map((file) => file.meeting.timezone).filter((zone2) => zone2 !== null && zone2 !== void 0));
|
|
1990
|
+
const [zone] = zones;
|
|
1991
|
+
if (zones.size === 1 && zone)
|
|
1992
|
+
report.timezone = zone;
|
|
1993
|
+
return report;
|
|
1994
|
+
}, "importFiles");
|
|
1995
|
+
|
|
1996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
1997
|
+
var CHAT_MESSAGES_READ = 1e5;
|
|
1998
|
+
|
|
1999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
2000
|
+
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
2001
|
+
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
2002
|
+
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)))
|
|
2003
|
+
throw new CliError("validation_error", "context takes 0\u2013999 surrounding cues, 2\u20134194304 output bytes and a bounded read budget");
|
|
2004
|
+
return { before, after, bytes, max_read_bytes };
|
|
2005
|
+
}, "meetingHitContextLimits");
|
|
2006
|
+
var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
2007
|
+
meetingHitContextLimits(options);
|
|
2008
|
+
if (typeof reference2 !== "string" || !reference2.trim() || reference2.length > 200 || options.format !== void 0 && !["json", "text", "markdown"].includes(options.format))
|
|
2009
|
+
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
2010
|
+
}, "validateMeetingPassage");
|
|
2011
|
+
|
|
2012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2013
|
+
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2014
|
+
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2015
|
+
throw new CliError("validation_error", "meeting preparation context is required");
|
|
2016
|
+
const input = { ...original };
|
|
2017
|
+
for (const key of Object.keys(input))
|
|
2018
|
+
if (!["accountId", "meetingId", "seriesId", "updatedAt", "limit", "maxReadBytes", "signal"].includes(key))
|
|
2019
|
+
throw new CliError("validation_error", `unknown preparation context field: ${key}`);
|
|
2020
|
+
if (input.signal !== void 0 && !(input.signal instanceof AbortSignal))
|
|
2021
|
+
throw new CliError("validation_error", "signal must be an AbortSignal");
|
|
2022
|
+
input.signal?.throwIfAborted();
|
|
2023
|
+
for (const key of ["accountId", "meetingId", "seriesId"])
|
|
2024
|
+
if (!Number.isSafeInteger(input[key]) || input[key] <= 0)
|
|
2025
|
+
throw new CliError("validation_error", `${key} must be a positive safe integer`);
|
|
2026
|
+
if (!Number.isSafeInteger(input.updatedAt) || Math.abs(input.updatedAt) > 864e13)
|
|
2027
|
+
throw new CliError("validation_error", "updatedAt must be an absolute timestamp");
|
|
2028
|
+
const limit = input.limit === void 0 ? 20 : input.limit;
|
|
2029
|
+
const maxReadBytes = input.maxReadBytes === void 0 ? 262144 : input.maxReadBytes;
|
|
2030
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
2031
|
+
throw new CliError("validation_error", "limit must be an integer from 1 to 100");
|
|
2032
|
+
if (!Number.isSafeInteger(maxReadBytes) || maxReadBytes < 1 || maxReadBytes > 4194304)
|
|
2033
|
+
throw new CliError("validation_error", "maxReadBytes must be an integer from 1 to 4194304");
|
|
2034
|
+
return { ...input, limit, maxReadBytes };
|
|
2035
|
+
}, "validateMeetingPreparationContext");
|
|
2036
|
+
|
|
2037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2038
|
+
var count3 = pipe(number(), integer(), minValue(0));
|
|
2039
|
+
var id = pipe(string(), minLength(1));
|
|
2040
|
+
var meetingProjectEvidence = strictObject({
|
|
2041
|
+
schema_version: literal(1),
|
|
2042
|
+
kind: literal("meeting_project_evidence"),
|
|
2043
|
+
account_id: id,
|
|
2044
|
+
query: string(),
|
|
2045
|
+
project: strictObject({ id, name: string(), key: nullable(string()) }),
|
|
2046
|
+
term: strictObject({
|
|
2047
|
+
name: string(),
|
|
2048
|
+
kind: picklist(["canonical", "key", "alias"]),
|
|
2049
|
+
alias_id: optional(id)
|
|
2050
|
+
}),
|
|
2051
|
+
hits: array(meetingHit),
|
|
2052
|
+
association: literal("unconfirmed-word-evidence"),
|
|
2053
|
+
vocabulary_fingerprint: id,
|
|
2054
|
+
selection: strictObject({
|
|
2055
|
+
meeting_id: optional(id),
|
|
2056
|
+
identity_id: optional(id),
|
|
2057
|
+
person_id: optional(id),
|
|
2058
|
+
tag_id: optional(id),
|
|
2059
|
+
event_id: optional(id),
|
|
2060
|
+
series_id: optional(id),
|
|
2061
|
+
since: optional(isoTime),
|
|
2062
|
+
until: optional(isoTime)
|
|
2063
|
+
}),
|
|
2064
|
+
limits: strictObject({ limit: count3, max_read_bytes: count3, max_vocabulary_read_bytes: count3, max_terms: count3 }),
|
|
2065
|
+
page: pageSchema,
|
|
2066
|
+
coverage: strictObject({
|
|
2067
|
+
archive_completeness: literal("unknown"),
|
|
2068
|
+
current_revisions: literal(true),
|
|
2069
|
+
indexing: picklist(["ready", "pending"]),
|
|
2070
|
+
index_completeness: literal("unknown"),
|
|
2071
|
+
term_index: count3,
|
|
2072
|
+
terms_total: count3,
|
|
2073
|
+
remaining_terms: count3,
|
|
2074
|
+
duplicates: literal("may-repeat-between-terms")
|
|
2075
|
+
})
|
|
2076
|
+
});
|
|
2077
|
+
var PAGE_NEXT3 = STEPS.find((step) => step.id === "page.next");
|
|
2078
|
+
var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, command = "meetings projects evidence") => {
|
|
2079
|
+
const { options } = prepared;
|
|
2080
|
+
const selection = {};
|
|
2081
|
+
for (const [field, value] of [
|
|
2082
|
+
["meeting_id", options.meetingId],
|
|
2083
|
+
["identity_id", options.participantIdentityId],
|
|
2084
|
+
["person_id", options.personId],
|
|
2085
|
+
["tag_id", options.tagId],
|
|
2086
|
+
["event_id", options.eventId],
|
|
2087
|
+
["series_id", options.meetingSeriesId]
|
|
2088
|
+
])
|
|
2089
|
+
if (value !== void 0)
|
|
2090
|
+
selection[field] = String(value);
|
|
2091
|
+
if (options.since !== void 0)
|
|
2092
|
+
selection.since = new Date(options.since).toISOString();
|
|
2093
|
+
if (options.until !== void 0)
|
|
2094
|
+
selection.until = new Date(options.until).toISOString();
|
|
2095
|
+
const cursor = page.nextCursor ?? void 0;
|
|
2096
|
+
if (page.hasMore !== (cursor !== void 0))
|
|
2097
|
+
throw new CliError("invalid_response", "project evidence continuation is inconsistent");
|
|
2098
|
+
const item = {
|
|
2099
|
+
schema_version: 1,
|
|
2100
|
+
kind: "meeting_project_evidence",
|
|
2101
|
+
account_id: String(page.accountId),
|
|
2102
|
+
query: page.query,
|
|
2103
|
+
project: page.project,
|
|
2104
|
+
term: {
|
|
2105
|
+
name: page.term.name,
|
|
2106
|
+
kind: page.term.kind,
|
|
2107
|
+
...page.term.aliasId === void 0 ? {} : { alias_id: page.term.aliasId }
|
|
2108
|
+
},
|
|
2109
|
+
hits: page.hits.map(meetingHitItem),
|
|
2110
|
+
association: page.association,
|
|
2111
|
+
vocabulary_fingerprint: page.vocabularyFingerprint,
|
|
2112
|
+
selection,
|
|
2113
|
+
limits: {
|
|
2114
|
+
limit: page.limits.limit,
|
|
2115
|
+
max_read_bytes: page.limits.maxReadBytes,
|
|
2116
|
+
max_vocabulary_read_bytes: page.limits.maxVocabularyReadBytes,
|
|
2117
|
+
max_terms: page.limits.maxTerms
|
|
2118
|
+
},
|
|
2119
|
+
page: {
|
|
2120
|
+
mode: "cursor",
|
|
2121
|
+
limit: page.limits.limit,
|
|
2122
|
+
has_more: page.hasMore,
|
|
2123
|
+
...cursor === void 0 ? {} : { next_cursor: cursor }
|
|
2124
|
+
},
|
|
2125
|
+
coverage: {
|
|
2126
|
+
archive_completeness: page.coverage.archiveCompleteness,
|
|
2127
|
+
current_revisions: page.coverage.currentRevisions,
|
|
2128
|
+
indexing: page.coverage.indexing,
|
|
2129
|
+
index_completeness: page.coverage.indexCompleteness,
|
|
2130
|
+
term_index: page.coverage.termIndex,
|
|
2131
|
+
terms_total: page.coverage.termsTotal,
|
|
2132
|
+
remaining_terms: page.coverage.remainingTerms,
|
|
2133
|
+
duplicates: page.coverage.duplicates
|
|
2134
|
+
}
|
|
2135
|
+
};
|
|
2136
|
+
if (!safeParse(meetingProjectEvidence, item).success)
|
|
2137
|
+
throw new CliError("invalid_response", "project evidence does not match its answer contract");
|
|
2138
|
+
return {
|
|
2139
|
+
item,
|
|
2140
|
+
...cursor === void 0 ? {} : {
|
|
2141
|
+
next: [
|
|
2142
|
+
stepOf(PAGE_NEXT3, {
|
|
2143
|
+
command,
|
|
2144
|
+
args: {
|
|
2145
|
+
project: prepared.project,
|
|
2146
|
+
query: prepared.query,
|
|
2147
|
+
cursor,
|
|
2148
|
+
limit: page.limits.limit,
|
|
2149
|
+
max_read_bytes: page.limits.maxReadBytes
|
|
2150
|
+
},
|
|
2151
|
+
values: { shown: page.hits.length }
|
|
2152
|
+
})
|
|
2153
|
+
]
|
|
2154
|
+
}
|
|
2155
|
+
};
|
|
2156
|
+
}, "meetingProjectEvidenceAnswer");
|
|
2157
|
+
|
|
2158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2159
|
+
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2160
|
+
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2161
|
+
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) || [
|
|
2162
|
+
options.meetingId,
|
|
2163
|
+
options.participantIdentityId,
|
|
2164
|
+
options.personId,
|
|
2165
|
+
options.projectId,
|
|
2166
|
+
options.tagId,
|
|
2167
|
+
options.eventId,
|
|
2168
|
+
options.meetingSeriesId
|
|
2169
|
+
].some((value) => value !== void 0 && !integer3(value, 1, Number.MAX_SAFE_INTEGER)) || [options.since, options.until].some((value) => value !== void 0 && !integer3(value, -864e13, 864e13)) || options.since !== void 0 && options.until !== void 0 && options.since > options.until || options.after !== void 0 && (typeof options.after !== "string" || !/^[A-Za-z0-9_-]{1,1000}$/.test(options.after)))
|
|
2170
|
+
throw new CliError("validation_error", "invalid bounded meeting search query, cursor or limits");
|
|
2171
|
+
for (const name of [options.project, options.tag, options.topic])
|
|
2172
|
+
if (name !== void 0 && (typeof name !== "string" || !name.trim() || name.length > 200 || /[\p{Cc}\p{Cf}]/u.test(name)))
|
|
2173
|
+
throw new CliError("validation_error", "a meeting vocabulary name takes 1\u2013200 characters without control characters");
|
|
2174
|
+
if (options.project !== void 0 && options.projectId !== void 0 || [options.tag, options.topic, options.tagId].filter((value) => value !== void 0).length > 1)
|
|
2175
|
+
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2176
|
+
}, "validateMeetingHitSearch");
|
|
2177
|
+
|
|
2178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2179
|
+
var ids = {
|
|
2180
|
+
meeting_id: "meetingId",
|
|
2181
|
+
identity_id: "participantIdentityId",
|
|
2182
|
+
person_id: "personId",
|
|
2183
|
+
tag_id: "tagId",
|
|
2184
|
+
event_id: "eventId",
|
|
2185
|
+
series_id: "meetingSeriesId"
|
|
2186
|
+
};
|
|
2187
|
+
var context2 = {
|
|
2188
|
+
command: "meetings projects evidence",
|
|
2189
|
+
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md"
|
|
2190
|
+
};
|
|
2191
|
+
var MEETING_PROJECT_EVIDENCE_QUERY = defineQuery({
|
|
2192
|
+
entity: "meeting_project_evidence",
|
|
2193
|
+
backend: "sql",
|
|
2194
|
+
fields: [
|
|
2195
|
+
...Object.keys(ids).map((name) => ({
|
|
2196
|
+
name,
|
|
2197
|
+
type: "num",
|
|
2198
|
+
operators: ["term"],
|
|
2199
|
+
example: `${name}:12`,
|
|
2200
|
+
placement: "and",
|
|
2201
|
+
relation: "meetings selected by this stored ID; identity selects participants, not speakers"
|
|
2202
|
+
})),
|
|
2203
|
+
{
|
|
2204
|
+
name: "started_at",
|
|
2205
|
+
type: "time",
|
|
2206
|
+
operators: ["term", "phrase", "range"],
|
|
2207
|
+
example: "started_at:[2026-10-01 TO 2026-10-31]",
|
|
2208
|
+
placement: "and",
|
|
2209
|
+
relation: "the meeting start time in UTC"
|
|
2210
|
+
}
|
|
2211
|
+
]
|
|
2212
|
+
});
|
|
2213
|
+
var requestKeys = /* @__PURE__ */ new Set(["query", "limit", "cursor", "maxReadBytes", "signal"]);
|
|
2214
|
+
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {}, now = Date.now()) => {
|
|
2215
|
+
if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof project !== "string" || !project.trim() || project.length > 200 || /[\p{Cc}\p{Cf}]/u.test(project) || request.query !== void 0 && typeof request.query !== "string")
|
|
2216
|
+
throw new CliError("validation_error", "expected an existing project and bounded evidence arguments");
|
|
2217
|
+
if (request.query !== void 0 && new TextEncoder().encode(request.query).byteLength > 8192 || [request.limit, request.maxReadBytes].some((value) => value !== void 0 && typeof value !== "number"))
|
|
2218
|
+
throw new CliError("validation_error", "invalid project evidence query or budget");
|
|
2219
|
+
request.signal?.throwIfAborted();
|
|
2220
|
+
const options = {
|
|
2221
|
+
limit: request.limit ?? 100,
|
|
2222
|
+
maxReadBytes: request.maxReadBytes ?? 4194304,
|
|
2223
|
+
...request.cursor === void 0 ? {} : { cursor: request.cursor },
|
|
2224
|
+
...request.signal === void 0 ? {} : { signal: request.signal }
|
|
2225
|
+
};
|
|
2226
|
+
const terms = /* @__PURE__ */ new Map();
|
|
2227
|
+
if (request.query?.trim()) {
|
|
2228
|
+
const ast = parseLucene(request.query, { defaultField: "none", ...context2 });
|
|
2229
|
+
validateQuery(ast, MEETING_PROJECT_EVIDENCE_QUERY, context2);
|
|
2230
|
+
const add = /* @__PURE__ */ __name((node) => {
|
|
2231
|
+
if (terms.has(node.field))
|
|
2232
|
+
queryError("query.unsupported-placement", node.span, "each field only once", context2);
|
|
2233
|
+
terms.set(node.field, node);
|
|
2234
|
+
}, "add");
|
|
2235
|
+
if (ast.root.kind === "predicate")
|
|
2236
|
+
add(ast.root);
|
|
2237
|
+
else
|
|
2238
|
+
for (const clause of ast.root.clauses) {
|
|
2239
|
+
if (clause.occur !== "must" || clause.node.kind !== "predicate")
|
|
2240
|
+
queryError("query.unsupported-placement", clause.node.span, "field:value terms joined by AND", context2);
|
|
2241
|
+
add(clause.node);
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
const frozen = [];
|
|
2245
|
+
for (const [field, key] of Object.entries(ids)) {
|
|
2246
|
+
const term2 = terms.get(field);
|
|
2247
|
+
if (!term2)
|
|
2248
|
+
continue;
|
|
2249
|
+
if (term2.operator !== "term" || !/^[1-9]\d*$/.test(term2.value) || !Number.isSafeInteger(Number(term2.value)))
|
|
2250
|
+
queryError("query.unsupported-operator", term2.span, "one positive safe integer ID", context2);
|
|
2251
|
+
options[key] = Number(term2.value);
|
|
2252
|
+
frozen.push(`${field}:${term2.value}`);
|
|
2253
|
+
}
|
|
2254
|
+
const term = terms.get("started_at");
|
|
2255
|
+
if (term) {
|
|
2256
|
+
const range = dateRange(term.value, term.operator === "range" ? term.upper ?? "*" : term.value, term.lower_inclusive !== false, term.upper_inclusive !== false, "UTC", term.span, now);
|
|
2257
|
+
if (range.lower !== void 0)
|
|
2258
|
+
options.since = range.lower + (range.lower_inclusive ? 0 : 1);
|
|
2259
|
+
if (range.upper !== void 0)
|
|
2260
|
+
options.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
2261
|
+
frozen.push(`started_at:[${options.since === void 0 ? "*" : `"${new Date(options.since).toISOString()}"`} TO ${options.until === void 0 ? "*" : `"${new Date(options.until).toISOString()}"`}]`);
|
|
2262
|
+
}
|
|
2263
|
+
validateMeetingHitSearch(project, options);
|
|
2264
|
+
if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !/^[A-Za-z0-9_-]{1,4096}$/.test(options.cursor)))
|
|
2265
|
+
throw new CliError("validation_error", "invalid project evidence cursor");
|
|
2266
|
+
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
2267
|
+
}, "prepareMeetingProjectEvidence");
|
|
2268
|
+
|
|
2269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2270
|
+
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
2271
|
+
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
2272
|
+
const page = await read(prepared.project, prepared.options);
|
|
2273
|
+
prepared.options.signal?.throwIfAborted();
|
|
2274
|
+
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2275
|
+
}, "readMeetingProjectEvidence");
|
|
2276
|
+
|
|
2277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2278
|
+
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2279
|
+
const { identityExternalId, ...fields2 } = p;
|
|
2280
|
+
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
2281
|
+
return {
|
|
2282
|
+
...fields2,
|
|
2283
|
+
identity: {
|
|
2284
|
+
provider,
|
|
2285
|
+
externalId,
|
|
2286
|
+
name: p.displayName,
|
|
2287
|
+
metadata: p.metadata,
|
|
2288
|
+
associatePerson: Boolean(identityExternalId?.trim() || p.email?.trim() || p.externalId?.trim())
|
|
2289
|
+
}
|
|
2290
|
+
};
|
|
2291
|
+
}, "participantInput");
|
|
2292
|
+
var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
2293
|
+
const now = options.now ?? Date.now();
|
|
2294
|
+
const lookbackMs = options.lookbackMs ?? 0;
|
|
2295
|
+
if (!Number.isSafeInteger(lookbackMs) || lookbackMs < 0 || lookbackMs > 31 * 864e5)
|
|
2296
|
+
throw new Error("lookbackMs must be an integer from 0 through 31 days");
|
|
2297
|
+
const since = options.since ?? await store.cursor(options.accountId) ?? new Date(now - 30 * 864e5).toISOString();
|
|
2298
|
+
timestamp2(since);
|
|
2299
|
+
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2300
|
+
let failed = false;
|
|
2301
|
+
const from = timestamp2(since) - lookbackMs;
|
|
2302
|
+
const meetings = await source.meetings(lookbackMs === 0 ? since : new Date(from).toISOString());
|
|
2303
|
+
for (const m of meetings) {
|
|
2304
|
+
const id3 = m.occurrence.id;
|
|
2305
|
+
const read = /* @__PURE__ */ __name(async (part, call) => {
|
|
2306
|
+
try {
|
|
2307
|
+
return await call();
|
|
2308
|
+
} catch (error) {
|
|
2309
|
+
failed = true;
|
|
2310
|
+
const message = error instanceof Error ? error.message : "could not be read";
|
|
2311
|
+
report.warnings.push({ externalId: id3, message: `${part}: ${message}` });
|
|
2312
|
+
return void 0;
|
|
2313
|
+
}
|
|
2314
|
+
}, "read");
|
|
2315
|
+
try {
|
|
2316
|
+
const sourceParticipants = await read("participants", () => source.participants(id3));
|
|
2317
|
+
const participants = (sourceParticipants ?? []).map((p, i) => participantInput(p, source.provider, id3, i, options.accountId));
|
|
2318
|
+
const names = /* @__PURE__ */ new Map();
|
|
2319
|
+
for (const p of participants)
|
|
2320
|
+
if (p.displayName !== null) {
|
|
2321
|
+
const identities = names.get(p.displayName) ?? /* @__PURE__ */ new Set();
|
|
2322
|
+
identities.add(p.identity.externalId);
|
|
2323
|
+
names.set(p.displayName, identities);
|
|
2324
|
+
}
|
|
2325
|
+
if ([...names.values()].some((ids2) => ids2.size > 1))
|
|
2326
|
+
report.warnings.push({ externalId: id3, message: "Participant names are ambiguous" });
|
|
2327
|
+
const lines = await read("transcript", () => source.transcript(id3));
|
|
2328
|
+
const chat = await read("chat", () => source.chat(id3));
|
|
2329
|
+
const summary = await read("summary", () => source.summary(id3));
|
|
2330
|
+
const attachments = await read("files", () => source.files(id3));
|
|
2331
|
+
const startedAt = timestamp2(m.occurrence.startedAt);
|
|
2332
|
+
const endedAt = m.occurrence.endedAt === null ? null : timestamp2(m.occurrence.endedAt);
|
|
2333
|
+
if (endedAt !== null && endedAt < startedAt)
|
|
2334
|
+
throw new Error("Meeting ends before it starts");
|
|
2335
|
+
const meeting2 = {
|
|
2336
|
+
accountId: options.accountId,
|
|
2337
|
+
externalId: id3,
|
|
2338
|
+
title: m.occurrence.title,
|
|
2339
|
+
description: m.description ?? null,
|
|
2340
|
+
location: m.location ?? null,
|
|
2341
|
+
joinUrl: m.joinUrl ?? m.series?.joinUrl ?? null,
|
|
2342
|
+
startedAt,
|
|
2343
|
+
endedAt,
|
|
2344
|
+
durationMs: endedAt === null ? null : endedAt - startedAt,
|
|
2345
|
+
timezone: m.timezone ?? null,
|
|
2346
|
+
hostIdentityId: null,
|
|
2347
|
+
...sourceParticipants === void 0 ? {} : { participantsCount: sourceParticipants?.length ?? null },
|
|
2348
|
+
metadata: m.metadata ?? null,
|
|
2349
|
+
deletedAt: null
|
|
2350
|
+
};
|
|
2351
|
+
if (m.series)
|
|
2352
|
+
meeting2.series = {
|
|
2353
|
+
externalId: m.series.id,
|
|
2354
|
+
title: m.series.title,
|
|
2355
|
+
description: null,
|
|
2356
|
+
kind: m.series.kind ?? null,
|
|
2357
|
+
recurrence: m.series.recurrence ?? null,
|
|
2358
|
+
hostIdentityId: null,
|
|
2359
|
+
joinUrl: m.series.joinUrl ?? null,
|
|
2360
|
+
metadata: null,
|
|
2361
|
+
deletedAt: null
|
|
2362
|
+
};
|
|
2363
|
+
const linked = sourceParticipants !== void 0;
|
|
2364
|
+
const format = source.transcriptFormat ?? null;
|
|
2365
|
+
const transcripts = lines && linked ? [await transcriptInput(lines, participants, source.name, void 0, format)] : void 0;
|
|
2366
|
+
const details = await store.saveMeeting({
|
|
2367
|
+
meeting: meeting2,
|
|
2368
|
+
participants: sourceParticipants ? participants : void 0,
|
|
2369
|
+
transcripts,
|
|
2370
|
+
chat: chat?.map((line2) => ({
|
|
2371
|
+
externalId: null,
|
|
2372
|
+
sentAt: timestamp2(line2.sentAt),
|
|
2373
|
+
senderParticipantPosition: speakerPosition(line2.sender, participants),
|
|
2374
|
+
senderName: line2.sender,
|
|
2375
|
+
recipient: null,
|
|
2376
|
+
text: line2.text,
|
|
2377
|
+
normalizedText: null,
|
|
2378
|
+
metadata: null
|
|
2379
|
+
})),
|
|
2380
|
+
summaries: summary ? [
|
|
2381
|
+
{
|
|
2382
|
+
...summary,
|
|
2383
|
+
source: summary.source ?? source.name,
|
|
2384
|
+
content: summary.content ?? null,
|
|
2385
|
+
docUrl: summary.docUrl ?? null,
|
|
2386
|
+
externalCreatedAt: summary.externalCreatedAt ?? null,
|
|
2387
|
+
externalUpdatedAt: summary.externalUpdatedAt ?? null,
|
|
2388
|
+
metadata: summary.metadata ?? null
|
|
2389
|
+
}
|
|
2390
|
+
] : void 0,
|
|
2391
|
+
attachments: attachments ?? void 0,
|
|
2392
|
+
now
|
|
2393
|
+
});
|
|
2394
|
+
if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
|
|
2395
|
+
await store.saveMeeting({
|
|
2396
|
+
meeting: meeting2,
|
|
2397
|
+
transcripts: [await transcriptInput(lines, [], source.name, `${JSON.stringify(lines)}
|
|
2398
|
+
unlinked`, format)],
|
|
2399
|
+
now
|
|
2400
|
+
});
|
|
2401
|
+
await linkEvent(store, details, now);
|
|
2402
|
+
report.meetings++;
|
|
2403
|
+
report.participants += participants.length;
|
|
2404
|
+
report.transcriptRows += lines?.length ?? 0;
|
|
2405
|
+
report.summaries += summary ? 1 : 0;
|
|
2406
|
+
} catch (error) {
|
|
2407
|
+
failed = true;
|
|
2408
|
+
report.warnings.push({ externalId: id3, message: error instanceof Error ? error.message : "Meeting pull failed" });
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
if (!failed)
|
|
2412
|
+
await store.setCursor(options.accountId, new Date(now).toISOString(), now);
|
|
2413
|
+
return report;
|
|
2414
|
+
}, "pull");
|
|
2415
|
+
|
|
2416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
2417
|
+
var text4 = string();
|
|
2418
|
+
var count4 = pipe(number(), integer(), minValue(0));
|
|
2419
|
+
var id2 = pipe(number(), integer(), minValue(1));
|
|
2420
|
+
var iso3 = /* @__PURE__ */ __name((ms) => ms === null ? null : new Date(ms).toISOString(), "iso");
|
|
2421
|
+
var meetingReview = strictObject({
|
|
2422
|
+
ref: reference,
|
|
2423
|
+
id: pipe(string(), minLength(1)),
|
|
2424
|
+
title: nullable(text4),
|
|
2425
|
+
started_at: nullable(isoTime),
|
|
2426
|
+
duration_ms: nullable(count4),
|
|
2427
|
+
participants_count: nullable(count4),
|
|
2428
|
+
projects: array(text4),
|
|
2429
|
+
/** Null when the meeting has no current transcript. */
|
|
2430
|
+
transcript: nullable(strictObject({ lines: count4, words: count4 })),
|
|
2431
|
+
/** The three who talked longest. */
|
|
2432
|
+
speakers: array(strictObject({ name: nullable(text4), talk_ms: count4 })),
|
|
2433
|
+
/** The newest stored summary; null when there is none. */
|
|
2434
|
+
summary: nullable(strictObject({
|
|
2435
|
+
source: text4,
|
|
2436
|
+
title: nullable(text4),
|
|
2437
|
+
overview: nullable(text4),
|
|
2438
|
+
next_steps: array(text4),
|
|
2439
|
+
url: nullable(text4)
|
|
2440
|
+
}))
|
|
2441
|
+
});
|
|
2442
|
+
var meetingLink = strictObject({
|
|
2443
|
+
url: text4,
|
|
2444
|
+
domain: nullable(text4),
|
|
2445
|
+
/** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
|
|
2446
|
+
document_id: nullable(text4),
|
|
2447
|
+
count: count4,
|
|
2448
|
+
first_at: isoTime,
|
|
2449
|
+
last_at: isoTime,
|
|
2450
|
+
senders: array(text4),
|
|
2451
|
+
meetings: array(strictObject({ ref: reference, title: nullable(text4) }))
|
|
2452
|
+
});
|
|
2453
|
+
var meetingSpeaker = strictObject({
|
|
2454
|
+
/** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
|
|
2455
|
+
key: text4,
|
|
2456
|
+
name: nullable(text4),
|
|
2457
|
+
person_id: nullable(id2),
|
|
2458
|
+
identity_id: nullable(id2),
|
|
2459
|
+
meetings: count4,
|
|
2460
|
+
lines: count4,
|
|
2461
|
+
words: count4,
|
|
2462
|
+
talk_ms: count4,
|
|
2463
|
+
/** This speaker's part of all talk time, 0–1. */
|
|
2464
|
+
share: pipe(number(), minValue(0), maxValue(1))
|
|
2465
|
+
});
|
|
2466
|
+
var meetingStats = strictObject({
|
|
2467
|
+
time_zone: text4,
|
|
2468
|
+
meetings: count4,
|
|
2469
|
+
lines: count4,
|
|
2470
|
+
words: count4,
|
|
2471
|
+
talk_ms: count4,
|
|
2472
|
+
/** `week_start` is the Monday, as a date in `time_zone`. */
|
|
2473
|
+
weeks: array(strictObject({ week_start: text4, meetings: count4, talk_ms: count4 })),
|
|
2474
|
+
top_speakers: array(meetingSpeaker)
|
|
2475
|
+
});
|
|
2476
|
+
var truncated = /* @__PURE__ */ __name((...why) => nullable(picklist(why)), "truncated");
|
|
2477
|
+
var meetingParticipants = strictObject({
|
|
2478
|
+
schema_version: literal(1),
|
|
2479
|
+
kind: literal("meeting_participants"),
|
|
2480
|
+
account_id: id2,
|
|
2481
|
+
query: text4,
|
|
2482
|
+
items: array(strictObject({
|
|
2483
|
+
participant_id: id2,
|
|
2484
|
+
meeting_id: id2,
|
|
2485
|
+
identity_id: id2,
|
|
2486
|
+
display_name: nullable(text4),
|
|
2487
|
+
email: nullable(text4)
|
|
2488
|
+
})),
|
|
2489
|
+
/** Several identities on one page are observations, never speaker attribution or person links. */
|
|
2490
|
+
ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id2) }),
|
|
2491
|
+
coverage: strictObject({
|
|
2492
|
+
scanned: count4,
|
|
2493
|
+
read_bytes: count4,
|
|
2494
|
+
archive_completeness: literal("unknown"),
|
|
2495
|
+
truncated_by: truncated("limit", "scan_limit", "read_bytes")
|
|
2496
|
+
}),
|
|
2497
|
+
page: strictObject({
|
|
2498
|
+
mode: literal("cursor"),
|
|
2499
|
+
limit: count4,
|
|
2500
|
+
has_more: boolean(),
|
|
2501
|
+
next_cursor: optional(text4)
|
|
2502
|
+
})
|
|
2503
|
+
});
|
|
2504
|
+
var revision = picklist(["current", "superseded"]);
|
|
2505
|
+
var meetingPassage = strictObject({
|
|
2506
|
+
schema_version: literal(1),
|
|
2507
|
+
kind: literal("meeting_context"),
|
|
2508
|
+
source: reference,
|
|
2509
|
+
target_ref: reference,
|
|
2510
|
+
target_fingerprint: text4,
|
|
2511
|
+
fingerprint: text4,
|
|
2512
|
+
revision,
|
|
2513
|
+
limits: strictObject({ before: count4, after: count4, bytes: count4, max_read_bytes: count4 }),
|
|
2514
|
+
content_bytes: count4,
|
|
2515
|
+
coverage: strictObject({
|
|
2516
|
+
included: count4,
|
|
2517
|
+
before: count4,
|
|
2518
|
+
after: count4,
|
|
2519
|
+
has_before: boolean(),
|
|
2520
|
+
has_after: boolean(),
|
|
2521
|
+
truncated_by: truncated("bytes"),
|
|
2522
|
+
before_ref: nullable(reference),
|
|
2523
|
+
after_ref: nullable(reference),
|
|
2524
|
+
continuation: literal("anchor-inclusive"),
|
|
2525
|
+
archive_completeness: literal("unknown"),
|
|
2526
|
+
input: literal("bounded-meeting-context")
|
|
2527
|
+
}),
|
|
2528
|
+
items: array(strictObject({
|
|
2529
|
+
ref: reference,
|
|
2530
|
+
fingerprint: text4,
|
|
2531
|
+
transcript_id: id2,
|
|
2532
|
+
content_hash: nullable(text4),
|
|
2533
|
+
position: count4,
|
|
2534
|
+
start_ms: count4,
|
|
2535
|
+
end_ms: count4,
|
|
2536
|
+
speaker_participant_id: nullable(id2),
|
|
2537
|
+
speaker_name: nullable(text4),
|
|
2538
|
+
text: text4,
|
|
2539
|
+
revision
|
|
2540
|
+
}))
|
|
2541
|
+
});
|
|
2542
|
+
var event = strictObject({
|
|
2543
|
+
id: pipe(string(), minLength(1)),
|
|
2544
|
+
event_series_id: nullable(text4),
|
|
2545
|
+
title: nullable(text4),
|
|
2546
|
+
description: nullable(text4),
|
|
2547
|
+
location: nullable(text4),
|
|
2548
|
+
starts_at: nullable(isoTime),
|
|
2549
|
+
ends_at: nullable(isoTime),
|
|
2550
|
+
timezone: nullable(text4),
|
|
2551
|
+
/** `auto`: made from a meeting; `owner`: made by hand; `calendar`: from a calendar's entries. */
|
|
2552
|
+
origin: picklist(["auto", "owner", "calendar"]),
|
|
2553
|
+
status: nullable(text4),
|
|
2554
|
+
all_day: boolean(),
|
|
2555
|
+
/** When its calendar deleted it: shown as "deleted in Google", kept as history. */
|
|
2556
|
+
source_deleted_at: nullable(isoTime),
|
|
2557
|
+
deleted_at: nullable(isoTime),
|
|
2558
|
+
created_at: isoTime,
|
|
2559
|
+
updated_at: isoTime,
|
|
2560
|
+
/** The fields whoever sent the invitation wrote, on a calendar CLI's `events list`: an agent reads them as data. */
|
|
2561
|
+
untrusted: optional(array(text4)),
|
|
2562
|
+
/** On a calendar CLI's `events list changed:<date>`: what changed since then, and when the store saw it. */
|
|
2563
|
+
change: optional(picklist(["new", "moved", "cancelled"])),
|
|
2564
|
+
changed_at: optional(nullable(isoTime)),
|
|
2565
|
+
/** The times a moved event had at that date. */
|
|
2566
|
+
was: optional(strictObject({ starts_at: nullable(isoTime), ends_at: nullable(isoTime) })),
|
|
2567
|
+
/** On a calendar CLI's `events list overlapping`: the events it clashes with, as `event:<id>`. */
|
|
2568
|
+
overlaps: optional(array(text4))
|
|
2569
|
+
});
|
|
2570
|
+
var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
2571
|
+
id: String(one.id),
|
|
2572
|
+
event_series_id: one.eventSeriesId === null ? null : String(one.eventSeriesId),
|
|
2573
|
+
title: one.title,
|
|
2574
|
+
description: one.description,
|
|
2575
|
+
location: one.location,
|
|
2576
|
+
starts_at: iso3(one.startsAt),
|
|
2577
|
+
ends_at: iso3(one.endsAt),
|
|
2578
|
+
timezone: one.timezone,
|
|
2579
|
+
origin: one.origin,
|
|
2580
|
+
status: one.status ?? null,
|
|
2581
|
+
all_day: one.allDay === true,
|
|
2582
|
+
source_deleted_at: iso3(one.sourceDeletedAt ?? null),
|
|
2583
|
+
deleted_at: iso3(one.deletedAt),
|
|
2584
|
+
created_at: new Date(one.createdAt).toISOString(),
|
|
2585
|
+
updated_at: new Date(one.updatedAt).toISOString()
|
|
2586
|
+
}), "eventItem");
|
|
2587
|
+
|
|
2588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
2589
|
+
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
2590
|
+
|
|
2591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
2592
|
+
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
2593
|
+
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2594
|
+
throw new CliError("validation_error", "related history request is required");
|
|
2595
|
+
const input = { ...original };
|
|
2596
|
+
for (const field of Object.keys(input))
|
|
2597
|
+
if (!["accountId", "seriesId", "anchorIds", "after", "before", "limit", "maxReadBytes", "signal"].includes(field))
|
|
2598
|
+
throw new CliError("validation_error", `unknown related history field: ${field}`);
|
|
2599
|
+
const positive = /* @__PURE__ */ __name((value) => Number.isSafeInteger(value) && value > 0, "positive");
|
|
2600
|
+
if (!positive(input.accountId) || !positive(input.seriesId))
|
|
2601
|
+
throw new CliError("validation_error", "accountId and seriesId must be positive safe integers");
|
|
2602
|
+
if (!Array.isArray(input.anchorIds) || input.anchorIds.length > 20 || input.anchorIds.some((id3) => !positive(id3)))
|
|
2603
|
+
throw new CliError("validation_error", "anchorIds must contain at most 20 positive safe integers");
|
|
2604
|
+
for (const key of ["after", "before"])
|
|
2605
|
+
if (!Number.isSafeInteger(input[key]) || Math.abs(input[key]) > 864e13)
|
|
2606
|
+
throw new CliError("validation_error", `${key} must be an absolute timestamp`);
|
|
2607
|
+
if (input.after >= input.before)
|
|
2608
|
+
throw new CliError("validation_error", "after must precede before");
|
|
2609
|
+
const limit = input.limit === void 0 ? 5 : input.limit;
|
|
2610
|
+
const maxReadBytes = input.maxReadBytes === void 0 ? 262144 : input.maxReadBytes;
|
|
2611
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 20)
|
|
2612
|
+
throw new CliError("validation_error", "limit must be an integer from 1 to 20");
|
|
2613
|
+
if (!Number.isSafeInteger(maxReadBytes) || maxReadBytes < 1 || maxReadBytes > 4194304)
|
|
2614
|
+
throw new CliError("validation_error", "maxReadBytes must be an integer from 1 to 4194304");
|
|
2615
|
+
if (input.signal !== void 0 && !(input.signal instanceof AbortSignal))
|
|
2616
|
+
throw new CliError("validation_error", "signal must be an AbortSignal");
|
|
2617
|
+
input.signal?.throwIfAborted();
|
|
2618
|
+
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
2619
|
+
}, "validateMeetingRelatedHistory");
|
|
2620
|
+
|
|
2621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
2622
|
+
var text5 = string();
|
|
2623
|
+
var identifier = pipe(text5, minLength(1));
|
|
2624
|
+
var nullableText = nullable(text5);
|
|
2625
|
+
var count5 = pipe(number(), integer(), minValue(0));
|
|
2626
|
+
var flag = boolean();
|
|
2627
|
+
var scope = strictObject({ provider: text5, account: text5 });
|
|
2628
|
+
var run = strictObject({
|
|
2629
|
+
meetings: count5,
|
|
2630
|
+
participants: count5,
|
|
2631
|
+
transcript_rows: count5,
|
|
2632
|
+
summaries: count5,
|
|
2633
|
+
warnings: array(strictObject({ external_id: text5, message: text5 })),
|
|
2634
|
+
timezone: optional(text5)
|
|
2635
|
+
});
|
|
2636
|
+
var exported = union([
|
|
2637
|
+
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), filename: text5, content: text5 }),
|
|
2638
|
+
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text5 })
|
|
2639
|
+
]);
|
|
2640
|
+
var eventChange = strictObject({
|
|
2641
|
+
action: literal("event.link"),
|
|
2642
|
+
event_id: nullable(identifier),
|
|
2643
|
+
expected_event_id: optional(nullable(identifier))
|
|
2644
|
+
});
|
|
2645
|
+
var personChange = strictObject({
|
|
2646
|
+
action: literal("person.link"),
|
|
2647
|
+
participant_id: identifier,
|
|
2648
|
+
person_uid: text5,
|
|
2649
|
+
expected_person_uid: optional(nullableText),
|
|
2650
|
+
target_account_ids: optional(array(identifier))
|
|
2651
|
+
});
|
|
2652
|
+
var eventResult = strictObject({
|
|
2653
|
+
meeting_id: identifier,
|
|
2654
|
+
event_id: nullable(identifier),
|
|
2655
|
+
previous_event_id: nullable(identifier),
|
|
2656
|
+
changed: flag
|
|
2657
|
+
});
|
|
2658
|
+
var personResult = strictObject({
|
|
2659
|
+
meeting_id: identifier,
|
|
2660
|
+
participant_id: identifier,
|
|
2661
|
+
person_uid: text5,
|
|
2662
|
+
previous_person_uid: nullableText,
|
|
2663
|
+
changed: flag
|
|
2664
|
+
});
|
|
2665
|
+
var meetingChange = strictObject({
|
|
2666
|
+
scope,
|
|
2667
|
+
account_id: identifier,
|
|
2668
|
+
meeting_id: identifier,
|
|
2669
|
+
change: union([eventChange, personChange]),
|
|
2670
|
+
applied: flag,
|
|
2671
|
+
result: optional(union([eventResult, personResult]))
|
|
2672
|
+
});
|
|
2673
|
+
var recognition = strictObject({
|
|
2674
|
+
engine: text5,
|
|
2675
|
+
model: text5,
|
|
2676
|
+
version: optional(text5),
|
|
2677
|
+
timing: optional(picklist(["fixed-windows", "recognition-segments"]))
|
|
2678
|
+
});
|
|
2679
|
+
var transcription = union([
|
|
2680
|
+
strictObject({
|
|
2681
|
+
applied: literal(false),
|
|
2682
|
+
account_id: identifier,
|
|
2683
|
+
external_id: text5,
|
|
2684
|
+
segments: count5,
|
|
2685
|
+
media: strictObject({
|
|
2686
|
+
id: text5,
|
|
2687
|
+
content_hash: text5,
|
|
2688
|
+
size: count5,
|
|
2689
|
+
duration_ms: count5,
|
|
2690
|
+
format: text5,
|
|
2691
|
+
sample_rate: count5,
|
|
2692
|
+
channels: count5,
|
|
2693
|
+
recognition
|
|
2694
|
+
})
|
|
2695
|
+
}),
|
|
2696
|
+
strictObject({
|
|
2697
|
+
applied: literal(true),
|
|
2698
|
+
account_id: identifier,
|
|
2699
|
+
external_id: text5,
|
|
2700
|
+
meeting_id: identifier,
|
|
2701
|
+
created: flag,
|
|
2702
|
+
inserted_transcripts: count5,
|
|
2703
|
+
replayed_transcripts: count5,
|
|
2704
|
+
superseded_transcripts: count5,
|
|
2705
|
+
segments: count5,
|
|
2706
|
+
media_sha256: text5,
|
|
2707
|
+
engine: text5,
|
|
2708
|
+
model: text5,
|
|
2709
|
+
model_version: nullableText,
|
|
2710
|
+
timing: picklist(["fixed-windows", "recognition-segments"])
|
|
2711
|
+
})
|
|
2712
|
+
]);
|
|
2713
|
+
var embeddingModel = strictObject({ key: text5, dims: count5, kind: picklist(["local", "remote"]), model: text5 });
|
|
2714
|
+
var embedding = union([
|
|
2715
|
+
strictObject({
|
|
2716
|
+
account_id: identifier,
|
|
2717
|
+
model: embeddingModel,
|
|
2718
|
+
status: strictObject({ chunks: count5, embedded: count5 }),
|
|
2719
|
+
applied: literal(false),
|
|
2720
|
+
scope: literal("existing-current-chunks"),
|
|
2721
|
+
rebuild_required: literal("explicit")
|
|
2722
|
+
}),
|
|
2723
|
+
strictObject({
|
|
2724
|
+
account_id: identifier,
|
|
2725
|
+
model: embeddingModel,
|
|
2726
|
+
saved: count5,
|
|
2727
|
+
skipped: count5,
|
|
2728
|
+
has_more: flag,
|
|
2729
|
+
next_hash: optional(text5),
|
|
2730
|
+
applied: literal(true),
|
|
2731
|
+
rebuild: strictObject({
|
|
2732
|
+
transcripts: count5,
|
|
2733
|
+
chunks: count5,
|
|
2734
|
+
has_more: flag,
|
|
2735
|
+
next_transcript_id: optional(identifier)
|
|
2736
|
+
})
|
|
2737
|
+
})
|
|
2738
|
+
]);
|
|
2739
|
+
var MEETING_RESULT_ENTITIES = {
|
|
2740
|
+
meeting_ingestion: run,
|
|
2741
|
+
meeting_export: exported,
|
|
2742
|
+
meeting_association: meetingChange,
|
|
2743
|
+
meeting_transcription: transcription,
|
|
2744
|
+
meeting_embedding: embedding
|
|
2745
|
+
};
|
|
2746
|
+
|
|
2747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
2748
|
+
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
2749
|
+
|
|
2750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
2751
|
+
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
2752
|
+
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
2753
|
+
|
|
2754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
2755
|
+
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
2756
|
+
input.signal?.throwIfAborted();
|
|
2757
|
+
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
2758
|
+
throw new CliError("validation_error", "accountId must be a positive safe integer");
|
|
2759
|
+
if (typeof input.externalId !== "string" || !input.externalId.trim() || new TextEncoder().encode(input.externalId).length > 4096 || /[\0\r\n]/.test(input.externalId))
|
|
2760
|
+
throw new CliError("validation_error", "externalId must be a bounded nonempty series identifier");
|
|
2761
|
+
for (const name of ["after", "before"])
|
|
2762
|
+
if (!Number.isSafeInteger(input[name]) || Math.abs(input[name]) > 864e13)
|
|
2763
|
+
throw new CliError("validation_error", `${name} must be an absolute timestamp in milliseconds`);
|
|
2764
|
+
if (input.after >= input.before)
|
|
2765
|
+
throw new CliError("validation_error", "after must be earlier than before");
|
|
2766
|
+
const limit = input.limit === void 0 ? 20 : input.limit;
|
|
2767
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
2768
|
+
throw new CliError("validation_error", "limit must be an integer from 1 to 100");
|
|
2769
|
+
const maxReadBytes = input.maxReadBytes === void 0 ? 256 * 1024 : input.maxReadBytes;
|
|
2770
|
+
if (!Number.isSafeInteger(maxReadBytes) || maxReadBytes < 1 || maxReadBytes > 4 * 1024 * 1024)
|
|
2771
|
+
throw new CliError("validation_error", "maxReadBytes must be an integer from 1 to 4194304");
|
|
2772
|
+
return { ...input, limit, maxReadBytes };
|
|
2773
|
+
}, "validateMeetingSeriesHistory");
|
|
2774
|
+
|
|
2775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
2776
|
+
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
2777
|
+
|
|
2778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
2779
|
+
function invalid3(field, response = false) {
|
|
2780
|
+
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
2781
|
+
}
|
|
2782
|
+
__name(invalid3, "invalid");
|
|
2783
|
+
var object2 = /* @__PURE__ */ __name((value, fields2, field, response = false) => {
|
|
2784
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
2785
|
+
invalid3(field, response);
|
|
2786
|
+
for (const key of Object.keys(value))
|
|
2787
|
+
if (!fields2.includes(key))
|
|
2788
|
+
invalid3(`${field}.${key}`, response);
|
|
2789
|
+
}, "object");
|
|
2790
|
+
var cursorDetails = /* @__PURE__ */ __name((value) => {
|
|
2791
|
+
if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
|
|
2792
|
+
invalid3("cursor");
|
|
2793
|
+
try {
|
|
2794
|
+
const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
|
|
2795
|
+
object2(decoded, ["version", "selection", "cursor"], "cursor");
|
|
2796
|
+
if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
|
|
2797
|
+
invalid3("cursor");
|
|
2798
|
+
return decoded;
|
|
2799
|
+
} catch {
|
|
2800
|
+
return invalid3("cursor");
|
|
2801
|
+
}
|
|
2802
|
+
}, "cursorDetails");
|
|
2803
|
+
var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
2804
|
+
cursorDetails(value);
|
|
2805
|
+
}, "validateMeetingSeriesInventoryCursor");
|
|
2806
|
+
|
|
2807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
2808
|
+
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
2809
|
+
const zone = timeZone ?? "UTC";
|
|
2810
|
+
try {
|
|
2811
|
+
new Intl.DateTimeFormat("en", { timeZone: zone });
|
|
2812
|
+
} catch {
|
|
2813
|
+
throw new CliError("validation_error", "expected an IANA time zone such as Europe/Madrid");
|
|
2814
|
+
}
|
|
2815
|
+
return zone;
|
|
2816
|
+
}, "zoneOf");
|
|
2817
|
+
var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
2818
|
+
var weekStart = /* @__PURE__ */ __name((at, format) => {
|
|
2819
|
+
const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
2820
|
+
const day = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day));
|
|
2821
|
+
return new Date(day - DAYS.indexOf(parts.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
|
|
2822
|
+
}, "weekStart");
|
|
2823
|
+
var UNKNOWN_SPEAKER = "unknown";
|
|
2824
|
+
var speakerOf = /* @__PURE__ */ __name((row) => row.personId !== null ? { key: `person:${row.personId}`, name: row.personName ?? row.identityName ?? row.speakerName } : row.identityId !== null ? { key: `identity:${row.identityId}`, name: row.identityName ?? row.speakerName } : row.speakerName?.trim() ? { key: `name:${row.speakerName.trim().toLowerCase()}`, name: row.speakerName.trim() } : { key: UNKNOWN_SPEAKER, name: null }, "speakerOf");
|
|
2825
|
+
var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
2826
|
+
const zone = zoneOf(timeZone);
|
|
2827
|
+
const format = new Intl.DateTimeFormat("en-US", {
|
|
2828
|
+
timeZone: zone,
|
|
2829
|
+
year: "numeric",
|
|
2830
|
+
month: "2-digit",
|
|
2831
|
+
day: "2-digit",
|
|
2832
|
+
weekday: "short"
|
|
2833
|
+
});
|
|
2834
|
+
const speakers = /* @__PURE__ */ new Map();
|
|
2835
|
+
const weeks = /* @__PURE__ */ new Map();
|
|
2836
|
+
const meetings = /* @__PURE__ */ new Set();
|
|
2837
|
+
let lines = 0;
|
|
2838
|
+
let words2 = 0;
|
|
2839
|
+
let talkMs = 0;
|
|
2840
|
+
for (const row of rows) {
|
|
2841
|
+
const talk = Math.max(0, row.endMs - row.startMs);
|
|
2842
|
+
meetings.add(row.meetingId);
|
|
2843
|
+
lines += 1;
|
|
2844
|
+
words2 += row.words;
|
|
2845
|
+
talkMs += talk;
|
|
2846
|
+
const who = speakerOf(row);
|
|
2847
|
+
const held = speakers.get(who.key) ?? {
|
|
2848
|
+
key: who.key,
|
|
2849
|
+
name: who.name ?? null,
|
|
2850
|
+
personId: row.personId,
|
|
2851
|
+
identityId: row.personId === null ? row.identityId : null,
|
|
2852
|
+
meetings: 0,
|
|
2853
|
+
lines: 0,
|
|
2854
|
+
words: 0,
|
|
2855
|
+
talkMs: 0,
|
|
2856
|
+
share: 0,
|
|
2857
|
+
seen: /* @__PURE__ */ new Set()
|
|
2858
|
+
};
|
|
2859
|
+
held.seen.add(row.meetingId);
|
|
2860
|
+
held.lines += 1;
|
|
2861
|
+
held.words += row.words;
|
|
2862
|
+
held.talkMs += talk;
|
|
2863
|
+
speakers.set(who.key, held);
|
|
2864
|
+
if (row.startedAt !== null) {
|
|
2865
|
+
const week = weeks.get(weekStart(row.startedAt, format)) ?? { meetings: /* @__PURE__ */ new Set(), talkMs: 0 };
|
|
2866
|
+
week.meetings.add(row.meetingId);
|
|
2867
|
+
week.talkMs += talk;
|
|
2868
|
+
weeks.set(weekStart(row.startedAt, format), week);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
return {
|
|
2872
|
+
timeZone: zone,
|
|
2873
|
+
meetings: meetings.size,
|
|
2874
|
+
lines,
|
|
2875
|
+
words: words2,
|
|
2876
|
+
talkMs,
|
|
2877
|
+
speakers: [...speakers.values()].map(({ seen, ...speaker }) => ({
|
|
2878
|
+
...speaker,
|
|
2879
|
+
meetings: seen.size,
|
|
2880
|
+
share: talkMs === 0 ? 0 : Math.round(speaker.talkMs / talkMs * 1e3) / 1e3
|
|
2881
|
+
})).sort((a, b) => b.talkMs - a.talkMs || a.key.localeCompare(b.key)),
|
|
2882
|
+
weeks: [...weeks.entries()].map(([start, week]) => ({ weekStart: start, meetings: week.meetings.size, talkMs: week.talkMs })).sort((a, b) => a.weekStart.localeCompare(b.weekStart))
|
|
2883
|
+
};
|
|
2884
|
+
}, "aggregateMeetingStats");
|
|
2885
|
+
|
|
2886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_d5beb0101c7a90701cc33879a5be8d28/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
2887
|
+
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
2888
|
+
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
2889
|
+
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
2890
|
+
const tag = value.trim().toLowerCase();
|
|
2891
|
+
return TAG.test(tag) ? tag : void 0;
|
|
2892
|
+
}, "tagOf");
|
|
2893
|
+
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
2894
|
+
const tag = tagOf(value);
|
|
2895
|
+
if (tag === void 0)
|
|
2896
|
+
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
2897
|
+
return tag;
|
|
2898
|
+
}, "normalizeTag");
|
|
2899
|
+
|
|
2900
|
+
export {
|
|
2901
|
+
QUERY_LIMITS,
|
|
2902
|
+
queryAstSchema,
|
|
2903
|
+
queryError,
|
|
2904
|
+
walkQuery,
|
|
2905
|
+
timezoneOf,
|
|
2906
|
+
zonedMoment,
|
|
2907
|
+
dateEndpoint,
|
|
2908
|
+
dateRange,
|
|
2909
|
+
evaluate,
|
|
2910
|
+
FIELD_TYPES,
|
|
2911
|
+
OPERATORS_BY_TYPE,
|
|
2912
|
+
QUERY_BACKENDS,
|
|
2913
|
+
queryFieldsOf,
|
|
2914
|
+
fieldsHelp,
|
|
2915
|
+
parseLucene,
|
|
2916
|
+
implicitTextTerms,
|
|
2917
|
+
validateQuery,
|
|
2918
|
+
fieldsNamed,
|
|
2919
|
+
describeQuery,
|
|
2920
|
+
defineQuery,
|
|
2921
|
+
QUERY_REASONS,
|
|
2922
|
+
formatMeetingReference,
|
|
2923
|
+
parseMeetingReference,
|
|
2924
|
+
canonicalMeetingReference,
|
|
2925
|
+
meeting,
|
|
2926
|
+
MEETING_QUERY,
|
|
2927
|
+
meetingHit,
|
|
2928
|
+
meetingTranscript,
|
|
2929
|
+
meetingSummary,
|
|
2930
|
+
meetingDetails,
|
|
2931
|
+
meetingHitsList,
|
|
2932
|
+
joinKeyOf,
|
|
2933
|
+
joinUrlWithoutQuery,
|
|
2934
|
+
calendarText,
|
|
2935
|
+
entryMetadata,
|
|
2936
|
+
meetingCueFingerprint,
|
|
2937
|
+
EVENT_QUERY,
|
|
2938
|
+
entryInWindow,
|
|
2939
|
+
normalizeMeetingParticipantQuery,
|
|
2940
|
+
validateMeetingParticipantSearch,
|
|
2941
|
+
MeetingError,
|
|
2942
|
+
listed,
|
|
2943
|
+
meetingPeople,
|
|
2944
|
+
meetingsList,
|
|
2945
|
+
meetingsQuery,
|
|
2946
|
+
MEETING_QUERY_GUIDE,
|
|
2947
|
+
meetingDetailsAnswer,
|
|
2948
|
+
meetingTranscriptAnswer,
|
|
2949
|
+
meetingSummaryAnswer,
|
|
2950
|
+
exportMeeting,
|
|
2951
|
+
validateMeetingChange,
|
|
2952
|
+
findingHash,
|
|
2953
|
+
validateFindings,
|
|
2954
|
+
findingFingerprint,
|
|
2955
|
+
MEETING_FINDINGS_KIND,
|
|
2956
|
+
validateMeetingFindings,
|
|
2957
|
+
meetingFindingFingerprint,
|
|
2958
|
+
parseMeetingQuery,
|
|
2959
|
+
importFiles,
|
|
2960
|
+
CHAT_MESSAGES_READ,
|
|
2961
|
+
validateMeetingPassage,
|
|
2962
|
+
validateMeetingPreparationContext,
|
|
2963
|
+
meetingProjectEvidence,
|
|
2964
|
+
meetingProjectEvidenceAnswer,
|
|
2965
|
+
validateMeetingHitSearch,
|
|
2966
|
+
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
2967
|
+
prepareMeetingProjectEvidence,
|
|
2968
|
+
readMeetingProjectEvidence,
|
|
2969
|
+
pull,
|
|
2970
|
+
meetingReview,
|
|
2971
|
+
meetingLink,
|
|
2972
|
+
meetingSpeaker,
|
|
2973
|
+
meetingStats,
|
|
2974
|
+
meetingParticipants,
|
|
2975
|
+
meetingPassage,
|
|
2976
|
+
event,
|
|
2977
|
+
eventItem,
|
|
2978
|
+
strongRecordingValidator,
|
|
2979
|
+
validateMeetingRelatedHistory,
|
|
2980
|
+
MEETING_RESULT_ENTITIES,
|
|
2981
|
+
REVIEW_LIMIT,
|
|
2982
|
+
SAVE_HELP,
|
|
2983
|
+
validateMeetingSeriesHistory,
|
|
2984
|
+
validateMeetingSeriesInventoryCursor,
|
|
2985
|
+
aggregateMeetingStats,
|
|
2986
|
+
TAG_TYPES,
|
|
2987
|
+
tagOf,
|
|
2988
|
+
normalizeTag
|
|
2989
|
+
};
|