@wirecat/drive-cli 0.69.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/contracts/wirecat.json +14 -13
- package/dist/age.d.ts +0 -36
- package/dist/age.d.ts.map +1 -1
- package/dist/age.js +0 -22
- package/dist/age.js.map +1 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-B4A737YW.js → all-profiles-3QJG2NAN.js} +13 -13
- package/dist/bundle/{anthropic-RZGPDESM.js → anthropic-PSWTEU6G.js} +8 -8
- package/dist/bundle/{app-server-OWEW7DY5.js → app-server-PVTA6ABR.js} +66 -58
- package/dist/bundle/{bun-V5QLYBZU.js → bun-LU5LP3JI.js} +2 -2
- package/dist/bundle/{bun-sqlite-KHLHXXGH.js → bun-sqlite-PYMKLBRU.js} +9 -9
- package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-22QQUKWA.js} +1 -1
- package/dist/bundle/{chunk-3YKAFLXY.js → chunk-26DHFMGZ.js} +2 -2
- package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-2BVVU7GG.js} +1 -1
- package/dist/bundle/{chunk-7JKECODO.js → chunk-2LHAVY4U.js} +1 -11
- package/dist/bundle/{chunk-HEBZCKMU.js → chunk-2PUNKUYJ.js} +4389 -4709
- package/dist/bundle/chunk-2UUWXPOB.js +31 -0
- package/dist/bundle/{chunk-KUQDBWPU.js → chunk-35SCQ4VI.js} +31 -32
- package/dist/bundle/{chunk-O6PD7RZY.js → chunk-3EBBLKIT.js} +4 -4
- package/dist/bundle/{chunk-PV3AWPHR.js → chunk-3N2OFXB5.js} +5 -5
- package/dist/bundle/{chunk-SY2HLH5R.js → chunk-3UGYFXH6.js} +82 -25
- package/dist/bundle/{chunk-OUM4ZO53.js → chunk-4HWJOU7N.js} +1 -1
- package/dist/bundle/{chunk-6D44YQ5X.js → chunk-4PA4DHYV.js} +6 -6
- package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
- package/dist/bundle/{chunk-GK6KXBL6.js → chunk-6SJOTNHF.js} +4 -4
- package/dist/bundle/{chunk-NVDR72GP.js → chunk-6TNNT2MQ.js} +250 -174
- package/dist/bundle/{chunk-4YECZ6CN.js → chunk-6W763DZN.js} +12 -12
- package/dist/bundle/{chunk-IQ2QU2X6.js → chunk-6XFIITOG.js} +1024 -598
- package/dist/bundle/{chunk-AD7VI3XU.js → chunk-72C4YOCH.js} +7 -7
- package/dist/bundle/{chunk-6EL5AVXX.js → chunk-7PDHGZN4.js} +4 -4
- package/dist/bundle/{chunk-22SH77TG.js → chunk-ACUAV6VX.js} +64 -64
- package/dist/bundle/{chunk-BBJVV4E2.js → chunk-ASMMG72J.js} +68 -38
- package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-B5KSXHJ7.js} +1 -1
- package/dist/bundle/{chunk-BVVXYZSU.js → chunk-BKSQBBYG.js} +9 -9
- package/dist/bundle/{chunk-5SJZDEIO.js → chunk-CJLVYIOP.js} +21 -21
- package/dist/bundle/chunk-COJSWDNU.js +170 -0
- package/dist/bundle/{chunk-GTDCP5OG.js → chunk-COOOO5B3.js} +4 -4
- package/dist/bundle/{chunk-LUZRVBQR.js → chunk-D5TGYUVU.js} +6 -6
- package/dist/bundle/{chunk-CZ4UEXCE.js → chunk-EOEU3AZN.js} +6 -6
- package/dist/bundle/{chunk-CU6RATZH.js → chunk-FCS26CYQ.js} +4 -4
- package/dist/bundle/{chunk-LRCSDAYK.js → chunk-FJH7DJWK.js} +4 -4
- package/dist/bundle/{chunk-U3RXH6RY.js → chunk-FP54WSIR.js} +4 -4
- package/dist/bundle/{chunk-3URYKAJP.js → chunk-FT3LN3HP.js} +1 -1
- package/dist/bundle/{chunk-CDSB7WVG.js → chunk-GBKNJWOZ.js} +8 -8
- package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-GOWXXYEF.js} +2 -2
- package/dist/bundle/{chunk-PB6NWKH3.js → chunk-GPQ44Y2R.js} +2 -2
- package/dist/bundle/{chunk-E7URRFBB.js → chunk-GZ2D4KXG.js} +10 -15
- package/dist/bundle/{chunk-376ZGVUZ.js → chunk-HKY7X6NY.js} +4 -4
- package/dist/bundle/{chunk-6XNTELM5.js → chunk-HL52XXZX.js} +1 -1
- package/dist/bundle/{chunk-533XOW74.js → chunk-HMS6EEQL.js} +3 -3
- package/dist/bundle/{chunk-F5UUJU6R.js → chunk-I4RWW3UD.js} +49 -4
- package/dist/bundle/{chunk-TZ75K6R7.js → chunk-ICDCAQ6K.js} +8 -8
- package/dist/bundle/{chunk-WOUIHZRI.js → chunk-J5Q5FS2N.js} +18 -75
- package/dist/bundle/{chunk-EL2E3ABX.js → chunk-JDV7HNNQ.js} +13 -13
- package/dist/bundle/{chunk-ZUG67442.js → chunk-JZHBZOJR.js} +3 -3
- package/dist/bundle/{chunk-SEJBS7SI.js → chunk-KGERXYTV.js} +1 -1
- package/dist/bundle/{chunk-5TK2YQCO.js → chunk-KGYVHPGE.js} +2 -2
- package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
- package/dist/bundle/{chunk-RLGQMMYE.js → chunk-L46C6HQ7.js} +35 -13
- package/dist/bundle/chunk-LXKYKRHD.js +387 -0
- package/dist/bundle/{chunk-N4ACIIQB.js → chunk-MIA7P6FZ.js} +2 -2
- package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-MNLL5YLM.js} +2 -2
- package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-OF422U5D.js} +21 -16
- package/dist/bundle/{chunk-JRFKCYMW.js → chunk-OJSBWP3F.js} +23 -6
- package/dist/bundle/{chunk-MHXZ62CU.js → chunk-P7CUM5IB.js} +1 -1
- package/dist/bundle/{chunk-I55XYREN.js → chunk-PRW6SYA3.js} +1094 -2526
- package/dist/bundle/chunk-Q7DOMFJ4.js +259 -0
- package/dist/bundle/{chunk-3RLRJHAI.js → chunk-QETR5HIZ.js} +12081 -12607
- package/dist/bundle/{chunk-QJGFQRTL.js → chunk-QFR2PNJN.js} +12 -12
- package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-QNRRK3CN.js} +2 -2
- package/dist/bundle/{chunk-5B5NOAIA.js → chunk-QXC6IEH6.js} +45 -45
- package/dist/bundle/{chunk-T6X6EZ5N.js → chunk-RESDD3Q4.js} +3 -3
- package/dist/bundle/chunk-RJOQH5YY.js +1979 -0
- package/dist/bundle/{chunk-AMQGKMLZ.js → chunk-RWDKMU74.js} +3 -3
- package/dist/bundle/{chunk-VUPWDCYV.js → chunk-SAKO3P4H.js} +1 -1
- package/dist/bundle/{chunk-GHFBT2ZM.js → chunk-SDKQNOL5.js} +6 -6
- package/dist/bundle/{chunk-25FT44S3.js → chunk-SERXSCN3.js} +287 -569
- package/dist/bundle/{chunk-2DS2TDGW.js → chunk-TAFHYHKA.js} +20 -118
- package/dist/bundle/{chunk-XVH3WZSZ.js → chunk-TAUBRNC5.js} +53 -53
- package/dist/bundle/{chunk-2VFAXC6O.js → chunk-UDMNY63V.js} +22 -19
- package/dist/bundle/{chunk-EWUQIUTB.js → chunk-UTO2GO4P.js} +5 -5
- package/dist/bundle/{chunk-V4FMN5A6.js → chunk-WVDCCYS3.js} +17 -17
- package/dist/bundle/chunk-X4TIMMKJ.js +16 -0
- package/dist/bundle/chunk-XF4EXO2C.js +335 -0
- package/dist/bundle/{chunk-OOIAJRKQ.js → chunk-XMMFBPGC.js} +2 -2
- package/dist/bundle/{chunk-4ZFO2CVH.js → chunk-Y2NWGNUB.js} +5 -5
- package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
- package/dist/bundle/{chunk-L342KHIZ.js → chunk-YMJ6IDGT.js} +6 -6
- package/dist/bundle/{chunk-WNMPIRRF.js → chunk-YPFWNVHV.js} +3 -3
- package/dist/bundle/{chunk-T4FMXDDV.js → chunk-YPNWIB6H.js} +3 -3
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
- package/dist/bundle/{chunk-RWQ7T4Y5.js → chunk-Z3KUSRCF.js} +2 -2
- package/dist/bundle/{chunk-WQOGHND4.js → chunk-Z56QFOBR.js} +1 -1
- package/dist/bundle/chunk-ZCR3IRZ2.js +823 -0
- package/dist/bundle/{chunk-SYUXKV2E.js → chunk-ZM63SUHG.js} +2 -2
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
- package/dist/bundle/{cli-BS4L3HAP.js → cli-556DERZL.js} +88 -69
- package/dist/bundle/command-contract-VRTOAV6W.js +43 -0
- package/dist/bundle/{command-server-entry-CJ2CV7ZV.js → command-server-entry-AYLGNZWD.js} +33 -30
- package/dist/bundle/decode-QU24MWMN.js +299 -0
- package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-4KODNOXV.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-QIXLXS3G.js → echarts-BXX4OQWC.js} +2 -2
- package/dist/bundle/{embed-YNZW5X6M.js → embed-KG27KG3D.js} +9 -9
- package/dist/bundle/{embedder-LRC2PKTS.js → embedder-IPAVUQUV.js} +12 -12
- package/dist/bundle/entry-MVXQETWS.js +25 -0
- package/dist/bundle/{failure-X6PSLVSO.js → failure-ESL7ETL4.js} +4 -4
- package/dist/bundle/first-run-4UVLW2WR.js +31 -0
- package/dist/bundle/first-screen-JAKAIINI.js +41 -0
- package/dist/bundle/google-22NXXJX5.js +45 -0
- package/dist/bundle/{google-api-7JDZDCWE.js → google-api-VCDBSNOW.js} +70 -62
- package/dist/bundle/grants-MQMTVCRQ.js +118 -0
- package/dist/bundle/{identity-E43WKN5F.js → identity-LOWMVGZY.js} +6 -6
- package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-2VECIDXF.js} +1 -1
- package/dist/bundle/{login-RBDJPQAG.js → login-7GBONT7V.js} +78 -70
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
- package/dist/bundle/meeting-combined-LVP4AZKA.js +27 -0
- package/dist/bundle/meeting-model-RAY5XDXZ.js +29 -0
- package/dist/bundle/meeting-semantic-G7PFOKU7.js +25 -0
- package/dist/bundle/{node-IEVT2FSJ.js → node-MPEQSFI3.js} +2 -2
- package/dist/bundle/{node-sqlite-IENH4TRX.js → node-sqlite-OLQMAYB4.js} +10 -10
- package/dist/bundle/oauth-SGH2I2BY.js +22 -0
- package/dist/bundle/{open-TZ5H7NYM.js → open-OXTE672W.js} +8 -8
- package/dist/bundle/{openai-XF2KB7W2.js → openai-EB3TPIZY.js} +32 -30
- package/dist/bundle/{process-6Q23D3TO.js → process-F6TKXWWA.js} +1 -1
- package/dist/bundle/{program-D5XWOHV5.js → program-4IFDZ7FM.js} +1356 -1338
- package/dist/bundle/{prompt-KUC5D4GX.js → prompt-F5RRHPN2.js} +8 -8
- package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-UORHJDHK.js} +5 -5
- package/dist/bundle/{recognize-DPFW7HO3.js → recognize-DAVNZND3.js} +7 -7
- package/dist/bundle/{remote-MODTSUNH.js → remote-D5EYYIAU.js} +13 -13
- package/dist/bundle/{rerank-JK7SERLE.js → rerank-CND2GVLZ.js} +10 -10
- package/dist/bundle/{serve-BV2WHZLW.js → serve-ZHSPUIGX.js} +12 -12
- package/dist/bundle/server-DUVJWP3Q.js +80 -0
- package/dist/bundle/{server-N3WPEU7Z.js → server-YMAK4LHC.js} +54 -46
- package/dist/bundle/{services-SV6CFUCS.js → services-ZILSFJ6E.js} +79 -54
- package/dist/bundle/{sqlite-runtime-RZ5PLZVQ.js → sqlite-runtime-S5VPMZQH.js} +9 -9
- package/dist/bundle/{start-C6EXYXAL.js → start-CR6X25RT.js} +7 -7
- package/dist/bundle/{state-RAZIREVG.js → state-YFPHVIIJ.js} +9 -9
- package/dist/bundle/{store-DQKJKX2G.js → store-CL4ZJZRI.js} +23 -19
- package/dist/bundle/{store-2DLGLYS6.js → store-UODRT6X4.js} +31 -26
- package/dist/bundle/store-maintenance-command-DY5XIBWR.js +72 -0
- package/dist/bundle/tokens-AF7QOFOF.js +118 -0
- package/dist/catalog.d.ts +0 -28
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +0 -82
- package/dist/catalog.js.map +1 -1
- package/dist/commands/catalog.d.ts +3 -8
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +36 -109
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +20 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +30 -72
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/folders.d.ts +1 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +45 -48
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -21
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +3 -241
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/mirrors.d.ts +2 -2
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +46 -202
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/search.d.ts +1 -3
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +20 -42
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +36 -53
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -2
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -317
- package/dist/contract-overrides.js.map +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +4 -3
- package/dist/knowledge.js.map +1 -1
- package/dist/list-queries.d.ts +0 -31
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +0 -36
- package/dist/list-queries.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -3
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +5 -5
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -10
- package/dist/reasons.js.map +1 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +1 -2
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +0 -6
- package/dist/transcripts.d.ts.map +1 -1
- package/dist/transcripts.js +0 -13
- package/dist/transcripts.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-HYURWSD6.js +0 -40
- package/dist/bundle/decode-E2NM5SSM.js +0 -165
- package/dist/bundle/entry-2IMSWRJU.js +0 -25
- package/dist/bundle/first-run-7CPHQDM5.js +0 -30
- package/dist/bundle/first-screen-OKZ7GMFR.js +0 -38
- package/dist/bundle/google-WDKDBDD4.js +0 -45
- package/dist/bundle/grants-AU25GWKF.js +0 -110
- package/dist/bundle/oauth-3JGSN47Z.js +0 -22
- package/dist/bundle/server-6YDI4Y36.js +0 -72
- package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +0 -64
- package/dist/bundle/tokens-LY3WML55.js +0 -110
- package/dist/knowledge-query.d.ts +0 -77
- package/dist/knowledge-query.d.ts.map +0 -1
- package/dist/knowledge-query.js +0 -104
- package/dist/knowledge-query.js.map +0 -1
- package/dist/bundle/{chunk-XWBPP2HX.js → chunk-VKE77B3F.js} +0 -0
- package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -3
|
@@ -7,35 +7,21 @@ import {
|
|
|
7
7
|
queryError,
|
|
8
8
|
queryFieldsOf,
|
|
9
9
|
timezoneOf,
|
|
10
|
-
validateQuery
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isCliFailure,
|
|
14
|
-
isStoreDamage
|
|
15
|
-
} from "./chunk-3YKAFLXY.js";
|
|
16
|
-
import {
|
|
17
|
-
refuseOwnerStoreInTests
|
|
18
|
-
} from "./chunk-RWQ7T4Y5.js";
|
|
19
|
-
import {
|
|
20
|
-
createRecordLog,
|
|
21
|
-
resolvePaths,
|
|
22
|
-
writeSecurely
|
|
23
|
-
} from "./chunk-5SJZDEIO.js";
|
|
10
|
+
validateQuery,
|
|
11
|
+
walkQuery
|
|
12
|
+
} from "./chunk-OF422U5D.js";
|
|
24
13
|
import {
|
|
25
14
|
singleLine,
|
|
26
15
|
visibleControls
|
|
27
|
-
} from "./chunk-
|
|
28
|
-
import {
|
|
29
|
-
traceIdOf
|
|
30
|
-
} from "./chunk-5TK2YQCO.js";
|
|
16
|
+
} from "./chunk-KYKW2W6X.js";
|
|
31
17
|
import {
|
|
32
18
|
STEPS,
|
|
33
19
|
array,
|
|
34
20
|
boolean,
|
|
35
21
|
defineSteps,
|
|
22
|
+
exactOptional,
|
|
36
23
|
integer,
|
|
37
24
|
isoTime,
|
|
38
|
-
isoTimestamp,
|
|
39
25
|
literal,
|
|
40
26
|
maxValue,
|
|
41
27
|
minLength,
|
|
@@ -52,534 +38,57 @@ import {
|
|
|
52
38
|
stepOf,
|
|
53
39
|
strictObject,
|
|
54
40
|
string,
|
|
55
|
-
union
|
|
56
|
-
|
|
57
|
-
} from "./chunk-JRFKCYMW.js";
|
|
41
|
+
union
|
|
42
|
+
} from "./chunk-OJSBWP3F.js";
|
|
58
43
|
import {
|
|
59
44
|
CliError
|
|
60
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-4QNW4NK6.js";
|
|
61
46
|
import {
|
|
62
47
|
__name
|
|
63
48
|
} from "./chunk-ZVVMGPBJ.js";
|
|
64
49
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
warn: /* @__PURE__ */ __name((event2, message) => logger.warn(logAttributes(event2), message), "warn"),
|
|
81
|
-
error: /* @__PURE__ */ __name((event2, message) => logger.error(logAttributes(event2), message), "error")
|
|
82
|
-
}), "snakeLogger");
|
|
83
|
-
|
|
84
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
85
|
-
var diagnostic = {
|
|
86
|
-
event: true,
|
|
87
|
-
operation: true,
|
|
88
|
-
opcode: true,
|
|
89
|
-
seq: true,
|
|
90
|
-
status: true,
|
|
91
|
-
method: true,
|
|
92
|
-
endpointTemplate: true,
|
|
93
|
-
bytes: true,
|
|
94
|
-
ids: true,
|
|
95
|
-
counts: true,
|
|
96
|
-
durationMs: true,
|
|
97
|
-
outcome: true,
|
|
98
|
-
errorCode: true,
|
|
99
|
-
providerError: true,
|
|
100
|
-
level: true,
|
|
101
|
-
transport: true,
|
|
102
|
-
attempt: true,
|
|
103
|
-
waitMs: true,
|
|
104
|
-
code: true,
|
|
105
|
-
detail: true,
|
|
106
|
-
reason: true,
|
|
107
|
-
ageMs: true,
|
|
108
|
-
kind: true,
|
|
109
|
-
table: true,
|
|
110
|
-
op: true,
|
|
111
|
-
n: true
|
|
112
|
-
};
|
|
113
|
-
var send = {
|
|
114
|
-
profile: true,
|
|
115
|
-
chatId: true,
|
|
116
|
-
outcome: true,
|
|
117
|
-
kind: true,
|
|
118
|
-
action: true,
|
|
119
|
-
people: true,
|
|
120
|
-
messageId: true,
|
|
121
|
-
key: true,
|
|
122
|
-
count: true,
|
|
123
|
-
forEveryone: true,
|
|
124
|
-
sendId: true,
|
|
125
|
-
operationId: true,
|
|
126
|
-
parentOperationId: true,
|
|
127
|
-
replyTo: true,
|
|
128
|
-
threadId: true,
|
|
129
|
-
sendAs: true,
|
|
130
|
-
resultChatId: true,
|
|
131
|
-
length: true,
|
|
132
|
-
attachments: true,
|
|
133
|
-
scheduledFor: true,
|
|
134
|
-
notify: true,
|
|
135
|
-
origin: true,
|
|
136
|
-
reservation: true,
|
|
137
|
-
errorCode: true
|
|
138
|
-
};
|
|
139
|
-
var background = [
|
|
140
|
-
"job",
|
|
141
|
-
"pid",
|
|
142
|
-
"schedule",
|
|
143
|
-
"exitCode",
|
|
144
|
-
"tool",
|
|
145
|
-
"tier",
|
|
146
|
-
"actorType",
|
|
147
|
-
"actorId",
|
|
148
|
-
"agent",
|
|
149
|
-
"targetType",
|
|
150
|
-
"targetId"
|
|
151
|
-
];
|
|
152
|
-
var crash = ["errorClass", "frames"];
|
|
153
|
-
var dropped = ["dropped"];
|
|
154
|
-
var LOG_ATTRIBUTES = [
|
|
155
|
-
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
156
|
-
].sort();
|
|
157
|
-
|
|
158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
159
|
-
var KEEP_RUNS_FOR_DAYS = 30;
|
|
160
|
-
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
161
|
-
var KEEP_STORE_RUNS_FOR_DAYS = 3;
|
|
162
|
-
var RUNS_SIZE_LIMIT_MB = 200;
|
|
163
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
164
|
-
var startRun = /* @__PURE__ */ __name((options) => {
|
|
165
|
-
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
166
|
-
const startedAt = options.startedAt ?? now();
|
|
167
|
-
const id5 = options.runId ?? newRunId(startedAt, options.command);
|
|
168
|
-
const dir = join(options.runsDir, day(startedAt), id5);
|
|
169
|
-
pruneRuns(options.runsDir, {
|
|
170
|
-
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
171
|
-
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
172
|
-
keepStoreDays: options.keepStoreDays ?? KEEP_STORE_RUNS_FOR_DAYS,
|
|
173
|
-
maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
|
|
174
|
-
now: startedAt
|
|
175
|
-
});
|
|
176
|
-
refuseRealStateInTests(dir);
|
|
177
|
-
const metadata = {
|
|
178
|
-
runId: id5,
|
|
179
|
-
command: options.command,
|
|
180
|
-
...options.profile === void 0 ? {} : { profile: options.profile },
|
|
181
|
-
startedAt: startedAt.toISOString(),
|
|
182
|
-
status: "running",
|
|
183
|
-
cliVersion: options.cliVersion,
|
|
184
|
-
runtime: runtime(),
|
|
185
|
-
platform: process.platform,
|
|
186
|
-
arch: process.arch,
|
|
187
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
188
|
-
...options.context
|
|
189
|
-
};
|
|
190
|
-
let file;
|
|
191
|
-
const opened = /* @__PURE__ */ __name(() => {
|
|
192
|
-
if (file)
|
|
193
|
-
return file;
|
|
194
|
-
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
195
|
-
const events = join(dir, "events.jsonl");
|
|
196
|
-
writeFileSync(events, "", { flag: "a", mode: 384 });
|
|
197
|
-
file = snakeLogger(createRecordLog({
|
|
198
|
-
to: events,
|
|
199
|
-
runId: id5,
|
|
200
|
-
command: options.command,
|
|
201
|
-
resource: { service: options.service, version: options.cliVersion },
|
|
202
|
-
allow: LOG_ATTRIBUTES,
|
|
203
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
204
|
-
...options.onError === void 0 ? {} : { onError: options.onError }
|
|
205
|
-
}));
|
|
206
|
-
writeRunFile(dir, metadata);
|
|
207
|
-
return file;
|
|
208
|
-
}, "opened");
|
|
209
|
-
if (!options.lazy)
|
|
210
|
-
opened();
|
|
211
|
-
let finished = false;
|
|
212
|
-
const operations = /* @__PURE__ */ new Set();
|
|
213
|
-
const codes = /* @__PURE__ */ new Set();
|
|
214
|
-
const tables = /* @__PURE__ */ new Set();
|
|
215
|
-
const noted = /* @__PURE__ */ __name((level) => (event2, message) => {
|
|
216
|
-
const { operation, errorCode, error_code, code, kind: kind3, table } = event2;
|
|
217
|
-
if (typeof operation === "string")
|
|
218
|
-
operations.add(operation);
|
|
219
|
-
if (kind3 === "store" && typeof table === "string")
|
|
220
|
-
tables.add(table);
|
|
221
|
-
for (const value of [errorCode, error_code, code])
|
|
222
|
-
if (typeof value === "string")
|
|
223
|
-
codes.add(value);
|
|
224
|
-
if (finished)
|
|
225
|
-
return;
|
|
226
|
-
opened()[level](event2, message);
|
|
227
|
-
}, "noted");
|
|
228
|
-
const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
|
|
229
|
-
return {
|
|
230
|
-
id: id5,
|
|
231
|
-
dir,
|
|
232
|
-
logger,
|
|
233
|
-
finish: /* @__PURE__ */ __name(async (status, extra = {}) => {
|
|
234
|
-
if (finished)
|
|
235
|
-
return;
|
|
236
|
-
finished = true;
|
|
237
|
-
const completedAt = now();
|
|
238
|
-
const final = {
|
|
239
|
-
...metadata,
|
|
240
|
-
...extra,
|
|
241
|
-
status,
|
|
242
|
-
completedAt: completedAt.toISOString(),
|
|
243
|
-
durationMs: completedAt.getTime() - startedAt.getTime(),
|
|
244
|
-
operations: [...operations].sort(),
|
|
245
|
-
codes: [...codes].sort(),
|
|
246
|
-
...tables.size > 0 ? { tables: [...tables].sort() } : {}
|
|
247
|
-
};
|
|
248
|
-
if (file || status !== "success") {
|
|
249
|
-
opened();
|
|
250
|
-
writeRunFile(dir, final);
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
try {
|
|
254
|
-
mkdirSync(join(dir, ".."), { recursive: true, mode: 448 });
|
|
255
|
-
appendIndex(join(dir, ".."), runFileOf(final));
|
|
256
|
-
} catch (error) {
|
|
257
|
-
options.onError?.(error);
|
|
258
|
-
}
|
|
259
|
-
}, "finish")
|
|
260
|
-
};
|
|
261
|
-
}, "startRun");
|
|
262
|
-
var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
|
|
263
|
-
if (env.VITEST === void 0)
|
|
264
|
-
return;
|
|
265
|
-
let home;
|
|
266
|
-
try {
|
|
267
|
-
home = userInfo().homedir;
|
|
268
|
-
} catch {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
if (dir.startsWith(join(home, ".local", "share") + sep))
|
|
272
|
-
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
273
|
-
}, "refuseRealStateInTests");
|
|
274
|
-
var runtime = /* @__PURE__ */ __name(() => {
|
|
275
|
-
const bun = process.versions.bun;
|
|
276
|
-
return bun ? `bun ${bun}` : `node ${process.versions.node}`;
|
|
277
|
-
}, "runtime");
|
|
278
|
-
var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
279
|
-
const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
|
|
280
|
-
const slug = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
|
|
281
|
-
return `${stamp}-${slug}-${randomUUID().slice(0, 6)}`;
|
|
282
|
-
}, "newRunId");
|
|
283
|
-
var INDEX = "index.jsonl";
|
|
284
|
-
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
285
|
-
appendFileSync(join(dayDir, INDEX), `${JSON.stringify(written)}
|
|
286
|
-
`, { mode: 384 });
|
|
287
|
-
}, "appendIndex");
|
|
288
|
-
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
289
|
-
const written = runFileOf(metadata);
|
|
290
|
-
writeSecurely(join(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
291
|
-
`, 384);
|
|
292
|
-
try {
|
|
293
|
-
appendIndex(join(dir, ".."), written);
|
|
294
|
-
} catch {
|
|
295
|
-
}
|
|
296
|
-
}, "writeRunFile");
|
|
297
|
-
var matchesListFilter = /* @__PURE__ */ __name((run2, filter) => (filter.runId === void 0 || run2.runId === filter.runId) && (filter.command === void 0 || run2.command === filter.command) && (filter.profile === void 0 || run2.profile === filter.profile) && (filter.status === void 0 || run2.status === filter.status) && (filter.errorCode === void 0 || run2.errorCode === filter.errorCode), "matchesListFilter");
|
|
298
|
-
var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
|
|
299
|
-
const first = since === void 0 ? void 0 : day(new Date(since));
|
|
300
|
-
const runs = [];
|
|
301
|
-
for (const date of days(runsDir).sort().reverse()) {
|
|
302
|
-
if (first !== void 0 && date < first || runs.length >= atLeast)
|
|
303
|
-
break;
|
|
304
|
-
for (const metadata of runsOfDay(join(runsDir, date))) {
|
|
305
|
-
if (matchesListFilter(metadata, filter))
|
|
306
|
-
runs.push(metadata);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return runs;
|
|
310
|
-
}, "listRuns");
|
|
311
|
-
var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
312
|
-
const latest = /* @__PURE__ */ new Map();
|
|
313
|
-
let raw = "";
|
|
314
|
-
try {
|
|
315
|
-
raw = readFileSync(join(dayDir, INDEX), "utf8");
|
|
316
|
-
} catch {
|
|
317
|
-
}
|
|
318
|
-
for (const line2 of raw.split("\n")) {
|
|
319
|
-
if (line2.trim() === "")
|
|
320
|
-
continue;
|
|
321
|
-
try {
|
|
322
|
-
const metadata = metadataOf(JSON.parse(line2));
|
|
323
|
-
if (typeof metadata.runId === "string")
|
|
324
|
-
latest.set(metadata.runId, metadata);
|
|
325
|
-
} catch {
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
return latest;
|
|
329
|
-
}, "indexedRuns");
|
|
330
|
-
var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
331
|
-
const latest = indexedRuns(dayDir);
|
|
332
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
333
|
-
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
334
|
-
continue;
|
|
335
|
-
const metadata = readRun(join(dayDir, entry));
|
|
336
|
-
if (metadata)
|
|
337
|
-
latest.set(metadata.runId, metadata);
|
|
338
|
-
}
|
|
339
|
-
return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
|
|
340
|
-
}, "runsOfDay");
|
|
341
|
-
var findRun = /* @__PURE__ */ __name((runsDir, id5) => {
|
|
342
|
-
const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id5);
|
|
343
|
-
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
344
|
-
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
345
|
-
for (const date of dates) {
|
|
346
|
-
const dir = join(runsDir, date, id5);
|
|
347
|
-
const metadata = readRun(dir);
|
|
348
|
-
if (metadata)
|
|
349
|
-
return { dir, metadata };
|
|
350
|
-
}
|
|
351
|
-
for (const date of dates) {
|
|
352
|
-
const metadata = indexedRuns(join(runsDir, date)).get(id5);
|
|
353
|
-
if (metadata)
|
|
354
|
-
return { dir: join(runsDir, date, id5), metadata };
|
|
355
|
-
}
|
|
356
|
-
return void 0;
|
|
357
|
-
}, "findRun");
|
|
358
|
-
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
359
|
-
let raw;
|
|
360
|
-
try {
|
|
361
|
-
raw = readFileSync(join(dir, "events.jsonl"), "utf8");
|
|
362
|
-
} catch {
|
|
363
|
-
return [];
|
|
364
|
-
}
|
|
365
|
-
const events = [];
|
|
366
|
-
for (const line2 of raw.split("\n")) {
|
|
367
|
-
if (line2.trim() === "")
|
|
368
|
-
continue;
|
|
369
|
-
try {
|
|
370
|
-
const parsed = JSON.parse(line2);
|
|
371
|
-
if (parsed !== null && typeof parsed === "object")
|
|
372
|
-
events.push(eventOf(parsed));
|
|
373
|
-
} catch {
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
return events;
|
|
377
|
-
}, "readEvents");
|
|
378
|
-
var eventOf = /* @__PURE__ */ __name((line2) => {
|
|
379
|
-
const { attributes, time: time2, severity: severity2 } = line2;
|
|
380
|
-
if (attributes === null || typeof attributes !== "object")
|
|
381
|
-
return logAttributes(line2);
|
|
382
|
-
return { time: time2, severity: severity2, ...logAttributes(attributes) };
|
|
383
|
-
}, "eventOf");
|
|
384
|
-
var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, keepStoreDays = KEEP_STORE_RUNS_FOR_DAYS, maxBytes, now }) => {
|
|
385
|
-
const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
|
|
386
|
-
const before = /* @__PURE__ */ __name((days2) => day(new Date(now.getTime() - Math.min(days2, keepDays) * DAY_MS)), "before");
|
|
387
|
-
const successCutoff = before(keepSuccessDays);
|
|
388
|
-
const storeCutoff = before(keepStoreDays);
|
|
389
|
-
const keptFor = /* @__PURE__ */ __name((metadata) => metadata.keptBecauseStore ? keepStoreDays : metadata.operations?.includes(STORE_WRITE) ? Math.max(keepSuccessDays, keepStoreDays) : keepSuccessDays, "keptFor");
|
|
390
|
-
let removed = 0;
|
|
391
|
-
for (const date of days(runsDir)) {
|
|
392
|
-
if (date >= cutoff) {
|
|
393
|
-
if (date < storeCutoff)
|
|
394
|
-
dropSuccesses(join(runsDir, date), STORE_RUNS_DROPPED, (metadata) => keptFor(metadata) <= keepStoreDays);
|
|
395
|
-
if (date < successCutoff)
|
|
396
|
-
dropSuccesses(join(runsDir, date), SUCCESSES_DROPPED, (metadata) => keptFor(metadata) <= keepSuccessDays);
|
|
397
|
-
continue;
|
|
398
|
-
}
|
|
399
|
-
try {
|
|
400
|
-
rmSync(join(runsDir, date), { recursive: true, force: true });
|
|
401
|
-
removed += 1;
|
|
402
|
-
} catch {
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
if (maxBytes !== void 0)
|
|
406
|
-
removed += fitSize(runsDir, maxBytes, now);
|
|
407
|
-
return removed;
|
|
408
|
-
}, "pruneRuns");
|
|
409
|
-
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
410
|
-
var STORE_WRITE = "store.write";
|
|
411
|
-
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
412
|
-
var STORE_RUNS_DROPPED = ".store-runs-dropped";
|
|
413
|
-
var SIZE_CHECKED = ".size-checked";
|
|
414
|
-
var dropSuccesses = /* @__PURE__ */ __name((dayDir, marker = SUCCESSES_DROPPED, drops = () => true) => {
|
|
415
|
-
const done = join(dayDir, marker);
|
|
416
|
-
try {
|
|
417
|
-
statSync(done);
|
|
418
|
-
return;
|
|
419
|
-
} catch {
|
|
420
|
-
}
|
|
421
|
-
const dropped2 = /* @__PURE__ */ __name((metadata) => metadata?.status === "success" && drops(metadata), "dropped");
|
|
422
|
-
try {
|
|
423
|
-
const kept = [];
|
|
424
|
-
for (const [id5, metadata] of indexedRuns(dayDir)) {
|
|
425
|
-
if (dropped2(metadata))
|
|
426
|
-
rmSync(join(dayDir, id5), { recursive: true, force: true });
|
|
427
|
-
else
|
|
428
|
-
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
429
|
-
}
|
|
430
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
431
|
-
if (entry === INDEX || entry.startsWith("."))
|
|
432
|
-
continue;
|
|
433
|
-
if (dropped2(readRun(join(dayDir, entry))))
|
|
434
|
-
rmSync(join(dayDir, entry), { recursive: true, force: true });
|
|
435
|
-
}
|
|
436
|
-
writeSecurely(join(dayDir, INDEX), kept.map((line2) => `${line2}
|
|
437
|
-
`).join(""), 384);
|
|
438
|
-
writeFileSync(done, "", { mode: 384 });
|
|
439
|
-
} catch {
|
|
440
|
-
}
|
|
441
|
-
}, "dropSuccesses");
|
|
442
|
-
var sizeOf = /* @__PURE__ */ __name((path) => {
|
|
443
|
-
let total = 0;
|
|
444
|
-
for (const entry of safeReaddir(path)) {
|
|
445
|
-
const full = join(path, entry);
|
|
446
|
-
try {
|
|
447
|
-
const stat = statSync(full);
|
|
448
|
-
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
449
|
-
} catch {
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
return total;
|
|
453
|
-
}, "sizeOf");
|
|
454
|
-
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
455
|
-
const stamp = join(runsDir, SIZE_CHECKED);
|
|
456
|
-
const today = day(now);
|
|
457
|
-
try {
|
|
458
|
-
if (readFileSync(stamp, "utf8").trim() === today)
|
|
459
|
-
return 0;
|
|
460
|
-
} catch {
|
|
461
|
-
}
|
|
462
|
-
const dates = days(runsDir).sort();
|
|
463
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(join(runsDir, date))]));
|
|
464
|
-
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
465
|
-
let removed = 0;
|
|
466
|
-
for (const date of dates) {
|
|
467
|
-
if (total <= maxBytes || date === today)
|
|
468
|
-
break;
|
|
469
|
-
dropSuccesses(join(runsDir, date));
|
|
470
|
-
const after = sizeOf(join(runsDir, date));
|
|
471
|
-
total -= (sizes.get(date) ?? 0) - after;
|
|
472
|
-
sizes.set(date, after);
|
|
473
|
-
}
|
|
474
|
-
for (const date of dates) {
|
|
475
|
-
if (total <= maxBytes || date === today)
|
|
476
|
-
break;
|
|
477
|
-
try {
|
|
478
|
-
rmSync(join(runsDir, date), { recursive: true, force: true });
|
|
479
|
-
total -= sizes.get(date) ?? 0;
|
|
480
|
-
removed += 1;
|
|
481
|
-
} catch {
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
try {
|
|
485
|
-
mkdirSync(runsDir, { recursive: true, mode: 448 });
|
|
486
|
-
writeFileSync(stamp, today, { mode: 384 });
|
|
487
|
-
} catch {
|
|
488
|
-
}
|
|
489
|
-
return removed;
|
|
490
|
-
}, "fitSize");
|
|
491
|
-
var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
|
|
492
|
-
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
493
|
-
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
494
|
-
try {
|
|
495
|
-
return metadataOf(JSON.parse(readFileSync(join(dir, "run.json"), "utf8")));
|
|
496
|
-
} catch {
|
|
497
|
-
return void 0;
|
|
498
|
-
}
|
|
499
|
-
}, "readRun");
|
|
500
|
-
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
501
|
-
try {
|
|
502
|
-
return readdirSync(dir);
|
|
503
|
-
} catch {
|
|
504
|
-
return [];
|
|
50
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/reference.js
|
|
51
|
+
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
52
|
+
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
53
|
+
if (!Number.isSafeInteger(value) || value < minimum)
|
|
54
|
+
throw invalid();
|
|
55
|
+
return value;
|
|
56
|
+
}, "integer");
|
|
57
|
+
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
58
|
+
const parts = [integer2(reference2.accountId), integer2(reference2.meetingId)];
|
|
59
|
+
if (reference2.transcriptId !== void 0)
|
|
60
|
+
parts.push(integer2(reference2.transcriptId));
|
|
61
|
+
if (reference2.cuePosition !== void 0) {
|
|
62
|
+
if (reference2.transcriptId === void 0)
|
|
63
|
+
throw invalid();
|
|
64
|
+
parts.push(integer2(reference2.cuePosition, 0));
|
|
505
65
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
const
|
|
513
|
-
if (
|
|
514
|
-
|
|
515
|
-
const
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
}
|
|
66
|
+
return `meeting:${parts.join("/")}`;
|
|
67
|
+
}, "formatMeetingReference");
|
|
68
|
+
var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
|
|
69
|
+
const value = text7.trim();
|
|
70
|
+
if (!value.startsWith("meeting:"))
|
|
71
|
+
throw invalid();
|
|
72
|
+
const parts = value.slice(8).split("/");
|
|
73
|
+
if (parts.length < 2 || parts.length > 4 || parts.some((part) => !/^\d+$/.test(part)))
|
|
74
|
+
throw invalid();
|
|
75
|
+
const ids2 = parts.map(Number);
|
|
76
|
+
const reference2 = {
|
|
77
|
+
type: "meeting",
|
|
78
|
+
accountId: integer2(ids2[0]),
|
|
79
|
+
meetingId: integer2(ids2[1]),
|
|
80
|
+
...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
|
|
81
|
+
...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
|
|
522
82
|
};
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
527
|
-
import { randomBytes } from "node:crypto";
|
|
528
|
-
var scopes = new AsyncLocalStorage();
|
|
529
|
-
var processScope;
|
|
530
|
-
var ownProcesses = new AsyncLocalStorage();
|
|
531
|
-
var asOwnProcess = /* @__PURE__ */ __name((body) => ownProcesses.run({}, body), "asOwnProcess");
|
|
532
|
-
var currentRun = /* @__PURE__ */ __name(() => {
|
|
533
|
-
const scope2 = scopes.getStore();
|
|
534
|
-
if (scope2)
|
|
535
|
-
return scope2;
|
|
536
|
-
const own = ownProcesses.getStore();
|
|
537
|
-
const fresh = /* @__PURE__ */ __name(() => ({
|
|
538
|
-
runId: newRunId(/* @__PURE__ */ new Date(), "process"),
|
|
539
|
-
command: "",
|
|
540
|
-
startedAt: Date.now(),
|
|
541
|
-
...traceOf(process.env)
|
|
542
|
-
}), "fresh");
|
|
543
|
-
if (own) {
|
|
544
|
-
own.scope ??= fresh();
|
|
545
|
-
return own.scope;
|
|
546
|
-
}
|
|
547
|
-
processScope ??= fresh();
|
|
548
|
-
return processScope;
|
|
549
|
-
}, "currentRun");
|
|
550
|
-
var inRun = /* @__PURE__ */ __name((scope2, body) => scopes.run(scope2, body), "inRun");
|
|
551
|
-
var runEvent = /* @__PURE__ */ __name((event2) => scopes.getStore()?.events?.(event2), "runEvent");
|
|
552
|
-
var typedCommand = /* @__PURE__ */ __name((tool, words2, profile = currentRun().profile) => [tool, profile, words2].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
|
|
553
|
-
var useAsProcessRun = /* @__PURE__ */ __name((scope2) => {
|
|
554
|
-
const own = ownProcesses.getStore();
|
|
555
|
-
if (own)
|
|
556
|
-
own.scope = scope2;
|
|
557
|
-
else
|
|
558
|
-
processScope = scope2;
|
|
559
|
-
}, "useAsProcessRun");
|
|
560
|
-
var processRun = /* @__PURE__ */ __name(() => {
|
|
561
|
-
const own = ownProcesses.getStore();
|
|
562
|
-
return own ? own.scope : processScope;
|
|
563
|
-
}, "processRun");
|
|
564
|
-
var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
|
|
565
|
-
var traceOf = /* @__PURE__ */ __name((env) => {
|
|
566
|
-
const traceId = traceIdOf(env.TRACEPARENT);
|
|
567
|
-
return traceId === void 0 ? {} : { traceId };
|
|
568
|
-
}, "traceOf");
|
|
569
|
-
var childTrace = /* @__PURE__ */ __name(() => {
|
|
570
|
-
const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
|
|
571
|
-
const traceId = hex(16);
|
|
572
|
-
return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
|
|
573
|
-
}, "childTrace");
|
|
574
|
-
var attempts = new AsyncLocalStorage();
|
|
575
|
-
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
576
|
-
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
83
|
+
return reference2;
|
|
84
|
+
}, "parseMeetingReference");
|
|
85
|
+
var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
|
|
577
86
|
|
|
578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
87
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/payment.js
|
|
579
88
|
var FACT_TYPES = ["fact", "statement", "question", "decision", "promise"];
|
|
580
89
|
var PAYMENT_DIRECTIONS = ["to_us", "from_us"];
|
|
581
90
|
var PAYMENT_STATES = ["expected", "paid", "cancelled"];
|
|
582
|
-
var
|
|
91
|
+
var invalid2 = /* @__PURE__ */ __name((message) => {
|
|
583
92
|
throw new CliError("validation_error", message);
|
|
584
93
|
}, "invalid");
|
|
585
94
|
var CURRENCIES = new Set(Intl.supportedValuesOf("currency"));
|
|
@@ -588,28 +97,28 @@ var COUNTERPARTY = /^(person|organization|project):[1-9]\d*$/;
|
|
|
588
97
|
var amountOf = /* @__PURE__ */ __name((value) => {
|
|
589
98
|
const match = AMOUNT.exec(typeof value === "number" ? String(value) : typeof value === "string" ? value.trim() : "");
|
|
590
99
|
if (!match)
|
|
591
|
-
return
|
|
100
|
+
return invalid2("a payment's amount is a positive number with at most 2 decimals, such as 1200.50");
|
|
592
101
|
const amount = `${BigInt(match[1] ?? "0")}.${(match[2] ?? "").padEnd(2, "0")}`;
|
|
593
102
|
if (amount === "0.00")
|
|
594
|
-
return
|
|
103
|
+
return invalid2("a payment's amount is more than 0");
|
|
595
104
|
return amount;
|
|
596
105
|
}, "amountOf");
|
|
597
106
|
var dateOf = /* @__PURE__ */ __name((value) => {
|
|
598
107
|
const date = typeof value === "string" ? value.trim() : "";
|
|
599
108
|
if (!/^\d{4}-\d{2}-\d{2}$/.test(date) || (/* @__PURE__ */ new Date(`${date}T00:00:00Z`)).toISOString().slice(0, 10) !== date)
|
|
600
|
-
return
|
|
109
|
+
return invalid2("a payment's dates are ISO dates, such as 2026-10-31");
|
|
601
110
|
return date;
|
|
602
111
|
}, "dateOf");
|
|
603
112
|
var optionalText = /* @__PURE__ */ __name((value, what, limit) => {
|
|
604
113
|
if (value === void 0 || value === null)
|
|
605
114
|
return null;
|
|
606
115
|
if (typeof value !== "string" || !value.trim() || value.length > limit || value.includes("\0"))
|
|
607
|
-
return
|
|
116
|
+
return invalid2(`a payment's ${what} takes 1\u2013${limit} characters`);
|
|
608
117
|
return value.trim();
|
|
609
118
|
}, "optionalText");
|
|
610
119
|
var oneOf = /* @__PURE__ */ __name((value, allowed, what) => {
|
|
611
120
|
if (typeof value !== "string" || !allowed.includes(value))
|
|
612
|
-
return
|
|
121
|
+
return invalid2(`a payment's ${what} is one of ${allowed.join(", ")}`);
|
|
613
122
|
return value;
|
|
614
123
|
}, "oneOf");
|
|
615
124
|
var FIELDS = [
|
|
@@ -625,20 +134,20 @@ var FIELDS = [
|
|
|
625
134
|
];
|
|
626
135
|
var validatePayment = /* @__PURE__ */ __name((input) => {
|
|
627
136
|
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
628
|
-
return
|
|
137
|
+
return invalid2("a payment is an object");
|
|
629
138
|
const raw = input;
|
|
630
|
-
const
|
|
631
|
-
if (
|
|
632
|
-
return
|
|
139
|
+
const unknown = Object.keys(raw).filter((key) => !FIELDS.includes(key));
|
|
140
|
+
if (unknown.length)
|
|
141
|
+
return invalid2(`a payment has no field ${unknown.join(", ")}; its fields are ${FIELDS.join(", ")}`);
|
|
633
142
|
const currency = typeof raw.currency === "string" ? raw.currency.trim().toUpperCase() : "";
|
|
634
143
|
if (!/^[A-Z]{3}$/.test(currency) || !CURRENCIES.has(currency))
|
|
635
|
-
return
|
|
144
|
+
return invalid2("a payment's currency is an ISO 4217 code, such as EUR or RUB");
|
|
636
145
|
const counterparty = optionalText(raw.counterparty, "counterparty", 80);
|
|
637
146
|
if (counterparty !== null && !COUNTERPARTY.test(counterparty))
|
|
638
|
-
return
|
|
147
|
+
return invalid2("a payment's counterparty is a person:, organization: or project: reference");
|
|
639
148
|
const state = oneOf(raw.state, PAYMENT_STATES, "state");
|
|
640
149
|
if (raw.paid_at != null && state !== "paid")
|
|
641
|
-
return
|
|
150
|
+
return invalid2("only a paid payment has paid_at");
|
|
642
151
|
return {
|
|
643
152
|
amount: amountOf(raw.amount),
|
|
644
153
|
currency,
|
|
@@ -669,20 +178,150 @@ var paymentTitle = /* @__PURE__ */ __name((fact) => {
|
|
|
669
178
|
return `${grouped(payment.amount)} ${payment.currency} ${way}${party}${item}${due} (${payment.state})`;
|
|
670
179
|
}, "paymentTitle");
|
|
671
180
|
|
|
672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/hit-query.js
|
|
182
|
+
var context = {
|
|
183
|
+
command: "search meetings",
|
|
184
|
+
guide: "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md#\u0432\u0441\u0442\u0440\u0435\u0447\u0438"
|
|
185
|
+
};
|
|
186
|
+
var words = ["term", "phrase"];
|
|
187
|
+
var MOST_LINES_APART = 20;
|
|
188
|
+
var near = /* @__PURE__ */ __name((node) => {
|
|
189
|
+
if (node.slop !== void 0 && node.slop > MOST_LINES_APART)
|
|
190
|
+
queryError("query.invalid-number", node.span, `words at most ${MOST_LINES_APART} lines apart: "a b"~${MOST_LINES_APART}`, context);
|
|
191
|
+
}, "near");
|
|
192
|
+
var MEETING_HIT_QUERY = defineQuery({
|
|
193
|
+
entity: "meeting_hit",
|
|
194
|
+
backend: "sql",
|
|
195
|
+
fields: [
|
|
196
|
+
{
|
|
197
|
+
name: "text",
|
|
198
|
+
type: "txt",
|
|
199
|
+
operators: words,
|
|
200
|
+
example: "text:budget",
|
|
201
|
+
relation: "a passage with the word in any form, or a spelling speech recognition garbled",
|
|
202
|
+
validate: near
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "exact",
|
|
206
|
+
type: "txt",
|
|
207
|
+
operators: words,
|
|
208
|
+
example: "exact:budget",
|
|
209
|
+
relation: "a passage with the word as typed: no other forms, no garbled spellings",
|
|
210
|
+
validate: near
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: "from",
|
|
214
|
+
type: "kw",
|
|
215
|
+
operators: words,
|
|
216
|
+
example: 'from:"Alice Synthetic"',
|
|
217
|
+
relation: "a line said or a chat message written by this person; attendance is --identity-id"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
});
|
|
221
|
+
var MEETING_FIELDS = defineQuery({
|
|
222
|
+
entity: "meeting_hit",
|
|
223
|
+
backend: "sql",
|
|
224
|
+
fields: [
|
|
225
|
+
...MEETING_HIT_QUERY.fields,
|
|
226
|
+
{
|
|
227
|
+
name: "date",
|
|
228
|
+
type: "time",
|
|
229
|
+
operators: ["term", "range"],
|
|
230
|
+
example: "date>=30d",
|
|
231
|
+
relation: "meetings that started then; the same as --since-time and --until-time"
|
|
232
|
+
},
|
|
233
|
+
...["project", "tag", "topic"].map((name) => ({
|
|
234
|
+
name,
|
|
235
|
+
type: "kw",
|
|
236
|
+
operators: words,
|
|
237
|
+
example: `${name}:"Example name"`,
|
|
238
|
+
relation: `meetings in this ${name}, by name or alias; the same as --${name}`
|
|
239
|
+
}))
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
var LIFTED = /* @__PURE__ */ new Set(["date", "project", "tag", "topic"]);
|
|
243
|
+
var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
|
|
244
|
+
var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) => {
|
|
245
|
+
let ast;
|
|
246
|
+
try {
|
|
247
|
+
ast = validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_FIELDS, context);
|
|
248
|
+
} catch (error) {
|
|
249
|
+
if (error instanceof CliError)
|
|
250
|
+
return { query, request };
|
|
251
|
+
throw error;
|
|
252
|
+
}
|
|
253
|
+
const top = ast.root.kind === "boolean" ? ast.root.clauses : [{ occur: "must", node: ast.root }];
|
|
254
|
+
const lifted = top.filter((clause) => clause.node.kind === "predicate" && LIFTED.has(clause.node.field));
|
|
255
|
+
const misplaced = /* @__PURE__ */ __name((node, nested) => node.kind === "predicate" ? nested && LIFTED.has(node.field) ? node : void 0 : node.clauses.map((clause) => misplaced(clause.node, true)).find(Boolean), "misplaced");
|
|
256
|
+
const wrong = lifted.find((clause) => clause.occur !== "must")?.node ?? top.map((clause) => clause.node.kind === "boolean" ? misplaced(clause.node, true) : void 0).find(Boolean);
|
|
257
|
+
if (wrong)
|
|
258
|
+
queryError("query.unsupported-field", wrong.span, `${wrong.field}: chooses meetings; join it to the words with AND, outside OR, NOT and groups`, context);
|
|
259
|
+
if (!lifted.length)
|
|
260
|
+
return { query, request };
|
|
261
|
+
const next = { ...request };
|
|
262
|
+
const once = /* @__PURE__ */ __name((name, flag2) => {
|
|
263
|
+
if (next[name] !== void 0)
|
|
264
|
+
throw new CliError("validation_error", `give ${flag2.replace(/^--/, "")} once: as ${flag2} or in the query`);
|
|
265
|
+
}, "once");
|
|
266
|
+
for (const { node } of lifted) {
|
|
267
|
+
if (node.field === "date") {
|
|
268
|
+
const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive !== false, node.upper_inclusive !== false, timezoneOf(timezone), node.span, now);
|
|
269
|
+
if (range.lower !== void 0) {
|
|
270
|
+
once("since", "--since-time");
|
|
271
|
+
next.since = range.lower + (range.lower_inclusive ? 0 : 1);
|
|
272
|
+
}
|
|
273
|
+
if (range.upper !== void 0) {
|
|
274
|
+
once("until", "--until-time");
|
|
275
|
+
next.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
276
|
+
}
|
|
277
|
+
} else {
|
|
278
|
+
const field = node.field;
|
|
279
|
+
once(field, `--${field}`);
|
|
280
|
+
next[field] = node.value;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
let rest = query;
|
|
284
|
+
for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
|
|
285
|
+
rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
|
|
286
|
+
rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
|
|
287
|
+
if (!rest)
|
|
288
|
+
throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
|
|
289
|
+
return { query: rest, request: next };
|
|
290
|
+
}, "liftMeetingFields");
|
|
291
|
+
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
292
|
+
var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
|
|
293
|
+
const found = text7.match(/[\p{L}\p{N}\p{M}]+/gu) ?? [];
|
|
294
|
+
const span = { start: 0, end: text7.length };
|
|
295
|
+
const clauses = found.map((value) => ({
|
|
296
|
+
occur: "must",
|
|
297
|
+
node: { kind: "predicate", field: "text", operator: "term", value, span }
|
|
298
|
+
}));
|
|
299
|
+
const root = clauses.length === 1 && clauses[0] ? clauses[0].node : { kind: "boolean", clauses, span };
|
|
300
|
+
return { version: 1, language: "lucene-v1", root };
|
|
301
|
+
}, "meetingWordsQuery");
|
|
302
|
+
|
|
303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/passage.js
|
|
673
304
|
var meetingHitContextLimits = /* @__PURE__ */ __name((options = {}) => {
|
|
674
305
|
const { before = 3, after = 3, bytes = 65536, max_read_bytes = 4194304, expected_fingerprint } = options;
|
|
675
306
|
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)))
|
|
676
307
|
throw new CliError("validation_error", "context takes 0\u2013999 surrounding cues, 2\u20134194304 output bytes and a bounded read budget");
|
|
677
308
|
return { before, after, bytes, max_read_bytes };
|
|
678
309
|
}, "meetingHitContextLimits");
|
|
310
|
+
var MEETING_CUE_UNTRUSTED = ["speaker_name", "text"];
|
|
311
|
+
var markedPassage = /* @__PURE__ */ __name((result) => ({
|
|
312
|
+
...result,
|
|
313
|
+
packet: {
|
|
314
|
+
...result.packet,
|
|
315
|
+
items: result.packet.items.map((cue2) => ({ ...cue2, untrusted: [...MEETING_CUE_UNTRUSTED] }))
|
|
316
|
+
}
|
|
317
|
+
}), "markedPassage");
|
|
679
318
|
var validateMeetingPassage = /* @__PURE__ */ __name((reference2, options) => {
|
|
680
319
|
meetingHitContextLimits(options);
|
|
681
320
|
if (typeof reference2 !== "string" || !reference2.trim() || reference2.length > 200 || options.format !== void 0 && !["json", "text", "markdown"].includes(options.format))
|
|
682
321
|
throw new CliError("validation_error", "choose a cue reference and json, text or markdown output");
|
|
683
322
|
}, "validateMeetingPassage");
|
|
684
323
|
|
|
685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/result-items.js
|
|
686
325
|
var text = string();
|
|
687
326
|
var identifier = pipe(text, minLength(1));
|
|
688
327
|
var nullableText = nullable(text);
|
|
@@ -698,7 +337,13 @@ var run = strictObject({
|
|
|
698
337
|
timezone: optional(text)
|
|
699
338
|
});
|
|
700
339
|
var exported = union([
|
|
701
|
-
strictObject({
|
|
340
|
+
strictObject({
|
|
341
|
+
meeting_id: identifier,
|
|
342
|
+
format: picklist(["markdown", "vtt"]),
|
|
343
|
+
filename: text,
|
|
344
|
+
content: text,
|
|
345
|
+
untrusted: optional(array(text))
|
|
346
|
+
}),
|
|
702
347
|
strictObject({ meeting_id: identifier, format: picklist(["markdown", "vtt"]), output: text })
|
|
703
348
|
]);
|
|
704
349
|
var eventChange = strictObject({
|
|
@@ -820,7 +465,8 @@ var managedChange = strictObject({
|
|
|
820
465
|
start_time: optional(text),
|
|
821
466
|
duration_minutes: optional(count),
|
|
822
467
|
timezone: optional(text),
|
|
823
|
-
agenda: optional(text)
|
|
468
|
+
agenda: optional(text),
|
|
469
|
+
settings: optional(record(text, union([text, flag])))
|
|
824
470
|
})),
|
|
825
471
|
applied: flag,
|
|
826
472
|
meeting: optional(strictObject({
|
|
@@ -832,7 +478,8 @@ var managedChange = strictObject({
|
|
|
832
478
|
timezone: nullableText,
|
|
833
479
|
agenda: nullableText,
|
|
834
480
|
join_url: nullableText
|
|
835
|
-
}))
|
|
481
|
+
})),
|
|
482
|
+
untrusted: optional(array(text))
|
|
836
483
|
});
|
|
837
484
|
var invitation = strictObject({ id: identifier, invitation: text, untrusted: optional(array(text)) });
|
|
838
485
|
var MEETING_RESULT_ENTITIES = {
|
|
@@ -846,7 +493,7 @@ var MEETING_RESULT_ENTITIES = {
|
|
|
846
493
|
meeting_repair: repair
|
|
847
494
|
};
|
|
848
495
|
|
|
849
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/service-query.js
|
|
850
497
|
var BACKENDS = ["archive", "server", "both"];
|
|
851
498
|
var MAX_BRANCHES = 64;
|
|
852
499
|
var some = /* @__PURE__ */ __name((value) => value === void 0 ? [] : [value], "some");
|
|
@@ -881,45 +528,11 @@ var windowOf = /* @__PURE__ */ __name(({ lower, upper, lower_inclusive, upper_in
|
|
|
881
528
|
...lower === void 0 ? {} : { from: lower_inclusive ? lower : lower + 1 },
|
|
882
529
|
...upper === void 0 ? {} : { to: upper_inclusive ? upper : upper - 1 }
|
|
883
530
|
}), "windowOf");
|
|
531
|
+
var RELATIVE_TIME = /^\d+[mhd]$/i;
|
|
532
|
+
var OFFSET = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
533
|
+
var readsZone = /* @__PURE__ */ __name((ast, times) => walkQuery(ast.root).some((term) => times.has(term.field) && [term.value, term.upper].some((value) => value !== void 0 && value !== "*" && !RELATIVE_TIME.test(value) && !OFFSET.test(value))), "readsZone");
|
|
884
534
|
|
|
885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
886
|
-
var invalid2 = /* @__PURE__ */ __name(() => new CliError("validation_error", "expected meeting:<accountId>/<meetingId>[/<transcriptId>[/<cuePosition>]] with safe integer IDs"), "invalid");
|
|
887
|
-
var integer2 = /* @__PURE__ */ __name((value, minimum = 1) => {
|
|
888
|
-
if (!Number.isSafeInteger(value) || value < minimum)
|
|
889
|
-
throw invalid2();
|
|
890
|
-
return value;
|
|
891
|
-
}, "integer");
|
|
892
|
-
var formatMeetingReference = /* @__PURE__ */ __name((reference2) => {
|
|
893
|
-
const parts2 = [integer2(reference2.accountId), integer2(reference2.meetingId)];
|
|
894
|
-
if (reference2.transcriptId !== void 0)
|
|
895
|
-
parts2.push(integer2(reference2.transcriptId));
|
|
896
|
-
if (reference2.cuePosition !== void 0) {
|
|
897
|
-
if (reference2.transcriptId === void 0)
|
|
898
|
-
throw invalid2();
|
|
899
|
-
parts2.push(integer2(reference2.cuePosition, 0));
|
|
900
|
-
}
|
|
901
|
-
return `meeting:${parts2.join("/")}`;
|
|
902
|
-
}, "formatMeetingReference");
|
|
903
|
-
var parseMeetingReference = /* @__PURE__ */ __name((text7) => {
|
|
904
|
-
const value = text7.trim();
|
|
905
|
-
if (!value.startsWith("meeting:"))
|
|
906
|
-
throw invalid2();
|
|
907
|
-
const parts2 = value.slice(8).split("/");
|
|
908
|
-
if (parts2.length < 2 || parts2.length > 4 || parts2.some((part) => !/^\d+$/.test(part)))
|
|
909
|
-
throw invalid2();
|
|
910
|
-
const ids2 = parts2.map(Number);
|
|
911
|
-
const reference2 = {
|
|
912
|
-
type: "meeting",
|
|
913
|
-
accountId: integer2(ids2[0]),
|
|
914
|
-
meetingId: integer2(ids2[1]),
|
|
915
|
-
...ids2.length > 2 ? { transcriptId: integer2(ids2[2]) } : {},
|
|
916
|
-
...ids2.length > 3 ? { cuePosition: integer2(ids2[3], 0) } : {}
|
|
917
|
-
};
|
|
918
|
-
return reference2;
|
|
919
|
-
}, "parseMeetingReference");
|
|
920
|
-
var canonicalMeetingReference = /* @__PURE__ */ __name((text7) => formatMeetingReference(parseMeetingReference(text7)), "canonicalMeetingReference");
|
|
921
|
-
|
|
922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/item.js
|
|
923
536
|
var text2 = string();
|
|
924
537
|
var count2 = pipe(number(), integer(), minValue(0));
|
|
925
538
|
var MEETING_ISSUES = ["time_without_zone"];
|
|
@@ -958,7 +571,7 @@ var meetingEntries = {
|
|
|
958
571
|
};
|
|
959
572
|
var meeting = strictObject(meetingEntries);
|
|
960
573
|
var MEETING_UNTRUSTED = ["title", "description", "location"];
|
|
961
|
-
var iso = /* @__PURE__ */ __name((
|
|
574
|
+
var iso = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
|
|
962
575
|
var meetingItem = /* @__PURE__ */ __name((row, owner) => {
|
|
963
576
|
const issues = meetingIssuesOf(row.metadata);
|
|
964
577
|
return {
|
|
@@ -1009,14 +622,22 @@ var MEETING_QUERY = {
|
|
|
1009
622
|
})
|
|
1010
623
|
};
|
|
1011
624
|
|
|
1012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/store.js
|
|
1013
626
|
var MEETING_DOCUMENT_ROLES = ["transcript", "recording", "notes"];
|
|
627
|
+
var TRANSCRIPT_WORDS = [
|
|
628
|
+
"Transcript",
|
|
629
|
+
"Notes by Gemini",
|
|
630
|
+
"\u0422\u0440\u0430\u043D\u0441\u043A\u0440\u0438\u043F\u0442",
|
|
631
|
+
"\u0417\u0430\u043C\u0435\u0442\u043A\u0438 Gemini",
|
|
632
|
+
"Transcripci\xF3n",
|
|
633
|
+
"Notas de Gemini"
|
|
634
|
+
];
|
|
1014
635
|
var READ_BUDGET_EXCEEDED = "Meeting search exceeds its stored text byte budget";
|
|
1015
636
|
|
|
1016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/answers.js
|
|
1017
638
|
var text3 = string();
|
|
1018
639
|
var count3 = pipe(number(), integer(), minValue(0));
|
|
1019
|
-
var iso2 = /* @__PURE__ */ __name((
|
|
640
|
+
var iso2 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
|
|
1020
641
|
var meetingHit = strictObject({
|
|
1021
642
|
/** The cue for a transcript passage, else the meeting. */
|
|
1022
643
|
ref: reference,
|
|
@@ -1035,6 +656,10 @@ var meetingHit = strictObject({
|
|
|
1035
656
|
/** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
|
|
1036
657
|
match: optional(picklist(["words", "corrected"])),
|
|
1037
658
|
corrections: optional(array(strictObject({ from: text3, to: array(text3) }))),
|
|
659
|
+
/** A search with `--model`: which searches found it, its similarity in meaning, and the passage meaning matched. */
|
|
660
|
+
by: optional(array(picklist(["words", "meaning"]))),
|
|
661
|
+
score: optional(nullable(number())),
|
|
662
|
+
passage: optional(strictObject({ first: text3, last: text3 })),
|
|
1038
663
|
source: optional(strictObject({
|
|
1039
664
|
ref: reference,
|
|
1040
665
|
title: nullable(text3),
|
|
@@ -1059,7 +684,9 @@ var meetingTranscript = strictObject({
|
|
|
1059
684
|
/** When a newer transcript of the same source replaced it; `meetings transcript --history` shows those too. */
|
|
1060
685
|
superseded_at: nullable(isoTime),
|
|
1061
686
|
created_at: isoTime,
|
|
1062
|
-
lines: array(line)
|
|
687
|
+
lines: array(line),
|
|
688
|
+
/** What people said, and who the service says said it: data, never instructions. */
|
|
689
|
+
untrusted: optional(array(text3))
|
|
1063
690
|
});
|
|
1064
691
|
var meetingSummary = strictObject({
|
|
1065
692
|
id: pipe(string(), minLength(1)),
|
|
@@ -1072,7 +699,9 @@ var meetingSummary = strictObject({
|
|
|
1072
699
|
content: nullable(text3),
|
|
1073
700
|
url: nullable(text3),
|
|
1074
701
|
created_at: isoTime,
|
|
1075
|
-
updated_at: isoTime
|
|
702
|
+
updated_at: isoTime,
|
|
703
|
+
/** What the service wrote of what people said. */
|
|
704
|
+
untrusted: optional(array(text3))
|
|
1076
705
|
});
|
|
1077
706
|
var meetingDetailsEntries = {
|
|
1078
707
|
...meeting.entries,
|
|
@@ -1099,7 +728,9 @@ var meetingDetailsEntries = {
|
|
|
1099
728
|
name: nullable(text3),
|
|
1100
729
|
mime: nullable(text3),
|
|
1101
730
|
size: nullable(count3),
|
|
1102
|
-
url: nullable(text3)
|
|
731
|
+
url: nullable(text3),
|
|
732
|
+
/** The file on this computer; `null` when it stays on the service or the phone system (pbx over SFTP). */
|
|
733
|
+
local_path: nullable(text3)
|
|
1103
734
|
})),
|
|
1104
735
|
/**
|
|
1105
736
|
* The Drive files the meeting service saved for it, by role. `document` is the stored document (`document:<id>`) once
|
|
@@ -1113,6 +744,20 @@ var meetingDetailsEntries = {
|
|
|
1113
744
|
}))
|
|
1114
745
|
};
|
|
1115
746
|
var meetingDetails = strictObject(meetingDetailsEntries);
|
|
747
|
+
var TRANSCRIPT_UNTRUSTED = ["lines.text", "lines.speaker"];
|
|
748
|
+
var SUMMARY_UNTRUSTED = ["title", "overview", "sections.label", "sections.text", "next_steps", "content"];
|
|
749
|
+
var DETAILS_UNTRUSTED = [
|
|
750
|
+
"series_title",
|
|
751
|
+
"participants.name",
|
|
752
|
+
"participants.email",
|
|
753
|
+
"participants.person.name",
|
|
754
|
+
"chat.sender",
|
|
755
|
+
"chat.recipient",
|
|
756
|
+
"chat.text",
|
|
757
|
+
"attachments.name",
|
|
758
|
+
"documents.title"
|
|
759
|
+
];
|
|
760
|
+
var PARTICIPANT_UNTRUSTED = ["display_name", "email", "person.name"];
|
|
1116
761
|
var meetingRef = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "meetingRef");
|
|
1117
762
|
var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows) => ({
|
|
1118
763
|
ref: formatMeetingReference({
|
|
@@ -1132,7 +777,8 @@ var meetingTranscriptItem = /* @__PURE__ */ __name((accountId, transcript, rows)
|
|
|
1132
777
|
end_ms: row.endMs,
|
|
1133
778
|
speaker: row.speakerName,
|
|
1134
779
|
text: row.text
|
|
1135
|
-
}))
|
|
780
|
+
})),
|
|
781
|
+
untrusted: [...TRANSCRIPT_UNTRUSTED]
|
|
1136
782
|
}), "meetingTranscriptItem");
|
|
1137
783
|
var meetingSummaryItem = /* @__PURE__ */ __name((accountId, summary) => ({
|
|
1138
784
|
id: String(summary.id),
|
|
@@ -1145,12 +791,15 @@ var meetingSummaryItem = /* @__PURE__ */ __name((accountId, summary) => ({
|
|
|
1145
791
|
content: summary.content,
|
|
1146
792
|
url: summary.docUrl,
|
|
1147
793
|
created_at: new Date(summary.externalCreatedAt ?? summary.createdAt).toISOString(),
|
|
1148
|
-
updated_at: new Date(summary.externalUpdatedAt ?? summary.updatedAt).toISOString()
|
|
794
|
+
updated_at: new Date(summary.externalUpdatedAt ?? summary.updatedAt).toISOString(),
|
|
795
|
+
untrusted: [...SUMMARY_UNTRUSTED]
|
|
1149
796
|
}), "meetingSummaryItem");
|
|
1150
797
|
var meetingDetailsItem = /* @__PURE__ */ __name((details, owner) => {
|
|
1151
798
|
const { accountId } = details.meeting;
|
|
799
|
+
const item = meetingItem(details.meeting, owner);
|
|
1152
800
|
return {
|
|
1153
|
-
...
|
|
801
|
+
...item,
|
|
802
|
+
untrusted: [...item.untrusted ?? [], ...DETAILS_UNTRUSTED],
|
|
1154
803
|
event_id: details.meeting.eventId === null ? null : String(details.meeting.eventId),
|
|
1155
804
|
series_id: details.meeting.meetingSeriesId === null ? null : String(details.meeting.meetingSeriesId),
|
|
1156
805
|
series_title: details.series?.title ?? null,
|
|
@@ -1187,7 +836,8 @@ var meetingDetailsItem = /* @__PURE__ */ __name((details, owner) => {
|
|
|
1187
836
|
name: one.name ?? one.title,
|
|
1188
837
|
mime: one.mime,
|
|
1189
838
|
size: one.size,
|
|
1190
|
-
url: one.url
|
|
839
|
+
url: one.url,
|
|
840
|
+
local_path: one.localPath
|
|
1191
841
|
})),
|
|
1192
842
|
documents: (details.documents ?? []).map((one) => ({
|
|
1193
843
|
file_id: one.fileId,
|
|
@@ -1236,10 +886,10 @@ var meetingHitItem = /* @__PURE__ */ __name((hit) => ({
|
|
|
1236
886
|
var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search meetings", args = {}, meta = {}) => {
|
|
1237
887
|
const items = found.items.map(meetingHitItem);
|
|
1238
888
|
const cursor = found.hasMore && found.nextCursor !== null ? found.nextCursor : void 0;
|
|
1239
|
-
const
|
|
889
|
+
const pending = found.coverage.indexing === "pending";
|
|
1240
890
|
const next = [
|
|
1241
891
|
...cursor === void 0 ? [] : [stepOf(PAGE_NEXT, { command, args: { ...args, cursor, limit }, values: { shown: items.length } })],
|
|
1242
|
-
...
|
|
892
|
+
...pending ? [
|
|
1243
893
|
stepOf(SEARCH_AGAIN, {
|
|
1244
894
|
command,
|
|
1245
895
|
args: Object.fromEntries(Object.entries(args).filter(([key]) => key !== "cursor"))
|
|
@@ -1255,7 +905,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1255
905
|
...cursor === void 0 ? {} : { next_cursor: cursor }
|
|
1256
906
|
},
|
|
1257
907
|
...next.length > 0 ? { next } : {},
|
|
1258
|
-
...
|
|
908
|
+
...pending ? {
|
|
1259
909
|
missing: [
|
|
1260
910
|
{
|
|
1261
911
|
field: "excerpt",
|
|
@@ -1268,7 +918,7 @@ var meetingHitsList = /* @__PURE__ */ __name((found, limit, command = "search me
|
|
|
1268
918
|
};
|
|
1269
919
|
}, "meetingHitsList");
|
|
1270
920
|
|
|
1271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/join-key.js
|
|
1272
922
|
var joinKeyOf = /* @__PURE__ */ __name((url) => {
|
|
1273
923
|
const parsed = urlOf(url);
|
|
1274
924
|
if (!parsed)
|
|
@@ -1302,7 +952,7 @@ var urlOf = /* @__PURE__ */ __name((url) => {
|
|
|
1302
952
|
}
|
|
1303
953
|
}, "urlOf");
|
|
1304
954
|
|
|
1305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/calendar-text.js
|
|
1306
956
|
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', "#39": "'", apos: "'", nbsp: " " };
|
|
1307
957
|
var SECRET_LINE = /(?<![\p{L}\p{N}])(pass ?codes?|passwords?|pwd|pins?|access ?codes?|meeting ?codes?|kennwort|пароль|пин-?код|код доступа)(?![\p{L}\p{N}])|pwd=/iu;
|
|
1308
958
|
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");
|
|
@@ -1311,8 +961,8 @@ var calendarText = /* @__PURE__ */ __name((text7, { dropSecretLines = true } = {
|
|
|
1311
961
|
if (!text7)
|
|
1312
962
|
return null;
|
|
1313
963
|
const kept = htmlToText(text7).split(/\r?\n/u).map((line2) => withoutLinkQueries(line2).replace(/[ \t]+/gu, " ").trim()).filter((line2) => !dropSecretLines || !SECRET_LINE.test(line2));
|
|
1314
|
-
const
|
|
1315
|
-
return
|
|
964
|
+
const joined = kept.join("\n").replace(/\n{3,}/gu, "\n\n").trim();
|
|
965
|
+
return joined || null;
|
|
1316
966
|
}, "calendarText");
|
|
1317
967
|
var ENTRY_METADATA_KEYS = [
|
|
1318
968
|
"colorId",
|
|
@@ -1339,7 +989,564 @@ var entryMetadata = /* @__PURE__ */ __name((metadata) => {
|
|
|
1339
989
|
return kept;
|
|
1340
990
|
}, "entryMetadata");
|
|
1341
991
|
|
|
1342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/calls.js
|
|
993
|
+
var CALL_DIRECTIONS = ["incoming", "outgoing", "internal"];
|
|
994
|
+
var CALL_OUTCOMES = ["answered", "voicemail", "busy", "no_answer", "failed"];
|
|
995
|
+
var MISSED_OUTCOMES = ["voicemail", "busy", "no_answer"];
|
|
996
|
+
var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isRecord");
|
|
997
|
+
var milliseconds = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.round(value) : null, "milliseconds");
|
|
998
|
+
var word = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() ? value.trim() : null, "word");
|
|
999
|
+
var DIRECTION_WORDS = {
|
|
1000
|
+
incoming: "incoming",
|
|
1001
|
+
inbound: "incoming",
|
|
1002
|
+
outgoing: "outgoing",
|
|
1003
|
+
outbound: "outgoing",
|
|
1004
|
+
internal: "internal"
|
|
1005
|
+
};
|
|
1006
|
+
var directionOf = /* @__PURE__ */ __name((value) => {
|
|
1007
|
+
const found = word(value)?.toLowerCase();
|
|
1008
|
+
return found === void 0 ? null : DIRECTION_WORDS[found] ?? null;
|
|
1009
|
+
}, "directionOf");
|
|
1010
|
+
var outcomeOf = /* @__PURE__ */ __name((value) => {
|
|
1011
|
+
const found = word(value);
|
|
1012
|
+
return found && CALL_OUTCOMES.includes(found) ? found : null;
|
|
1013
|
+
}, "outcomeOf");
|
|
1014
|
+
var numbers = /* @__PURE__ */ __name((value) => Array.isArray(value) ? value.map(word).filter((one) => one !== null) : [], "numbers");
|
|
1015
|
+
var callOf = /* @__PURE__ */ __name((stored) => {
|
|
1016
|
+
const metadata = isRecord(stored.metadata) ? stored.metadata : {};
|
|
1017
|
+
const direction = directionOf(metadata.direction);
|
|
1018
|
+
const outcome = outcomeOf(metadata.outcome);
|
|
1019
|
+
const clientParticipant = stored.participants.find((one) => one.role === "client");
|
|
1020
|
+
if (direction === null && outcome === null && !clientParticipant)
|
|
1021
|
+
return null;
|
|
1022
|
+
const managers = stored.participants.filter((one) => one.role === "manager");
|
|
1023
|
+
const byExtension = /* @__PURE__ */ __name((number2) => {
|
|
1024
|
+
const found = managers.find((one) => one.externalId === number2);
|
|
1025
|
+
return {
|
|
1026
|
+
key: `extension:${number2}`,
|
|
1027
|
+
name: found?.name ?? null,
|
|
1028
|
+
identityId: found?.identityId ?? null,
|
|
1029
|
+
extension: number2
|
|
1030
|
+
};
|
|
1031
|
+
}, "byExtension");
|
|
1032
|
+
const placed = word(metadata.placedBy);
|
|
1033
|
+
const answeredBy = numbers(metadata.answeredBy).map(byExtension);
|
|
1034
|
+
const rang = numbers(metadata.rang).map(byExtension);
|
|
1035
|
+
const placedBy = placed === null ? null : byExtension(placed);
|
|
1036
|
+
const named = [placedBy, ...answeredBy, ...rang].filter((one) => one !== null);
|
|
1037
|
+
const listed2 = managers.filter((one) => !named.some((employee2) => employee2.identityId === one.identityId)).map((one) => ({
|
|
1038
|
+
key: `identity:${one.identityId}`,
|
|
1039
|
+
name: one.name,
|
|
1040
|
+
identityId: one.identityId,
|
|
1041
|
+
extension: one.externalId
|
|
1042
|
+
}));
|
|
1043
|
+
const employees = [...new Map([...named, ...listed2].map((one) => [one.key, one])).values()];
|
|
1044
|
+
return {
|
|
1045
|
+
meetingId: stored.meetingId,
|
|
1046
|
+
startedAt: stored.startedAt,
|
|
1047
|
+
direction,
|
|
1048
|
+
outcome,
|
|
1049
|
+
waitMs: milliseconds(metadata.waitMs),
|
|
1050
|
+
talkMs: milliseconds(metadata.talkMs),
|
|
1051
|
+
durationMs: milliseconds(metadata.durationMs) ?? milliseconds(stored.durationMs),
|
|
1052
|
+
client: clientParticipant ? { key: clientParticipant.identityKey, name: clientParticipant.name, identityId: clientParticipant.identityId } : null,
|
|
1053
|
+
placedBy,
|
|
1054
|
+
roles: ["placedBy", "answeredBy", "rang"].some((key) => key in metadata),
|
|
1055
|
+
answeredBy,
|
|
1056
|
+
rang,
|
|
1057
|
+
employees
|
|
1058
|
+
};
|
|
1059
|
+
}, "callOf");
|
|
1060
|
+
|
|
1061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/call-answers.js
|
|
1062
|
+
var count4 = pipe(number(), integer(), minValue(0));
|
|
1063
|
+
var ms = count4;
|
|
1064
|
+
var id = pipe(number(), integer(), minValue(1));
|
|
1065
|
+
var counts = /* @__PURE__ */ __name((keys) => strictObject(Object.fromEntries([...keys, "unknown"].map((key) => [key, count4]))), "counts");
|
|
1066
|
+
var maybe = exactOptional;
|
|
1067
|
+
var employee = strictObject({
|
|
1068
|
+
/** `extension:<number>`, or `identity:<id>` where the provider names no extension. */
|
|
1069
|
+
key: string(),
|
|
1070
|
+
name: nullable(string()),
|
|
1071
|
+
identity_id: nullable(id),
|
|
1072
|
+
extension: nullable(string()),
|
|
1073
|
+
calls: count4,
|
|
1074
|
+
incoming: count4,
|
|
1075
|
+
outgoing: count4,
|
|
1076
|
+
internal: count4,
|
|
1077
|
+
placed: maybe(count4),
|
|
1078
|
+
answered: maybe(count4),
|
|
1079
|
+
rang_not_answered: maybe(count4),
|
|
1080
|
+
talk_ms: maybe(ms),
|
|
1081
|
+
mean_talk_ms: maybe(nullable(ms)),
|
|
1082
|
+
mean_wait_ms: maybe(nullable(ms)),
|
|
1083
|
+
max_wait_ms: maybe(nullable(ms))
|
|
1084
|
+
});
|
|
1085
|
+
var periodFields = {
|
|
1086
|
+
calls: count4,
|
|
1087
|
+
incoming: count4,
|
|
1088
|
+
outgoing: count4,
|
|
1089
|
+
internal: count4,
|
|
1090
|
+
answered: maybe(count4),
|
|
1091
|
+
missed: maybe(count4),
|
|
1092
|
+
talk_ms: maybe(ms)
|
|
1093
|
+
};
|
|
1094
|
+
var callRef = strictObject({ ref: reference, meeting_id: id, started_at: nullable(isoTime) });
|
|
1095
|
+
var callStatsSchema = strictObject({
|
|
1096
|
+
time_zone: string(),
|
|
1097
|
+
callback_within_ms: ms,
|
|
1098
|
+
short_call_under_ms: ms,
|
|
1099
|
+
calls: count4,
|
|
1100
|
+
/** Selected meetings that are not calls. */
|
|
1101
|
+
not_calls: count4,
|
|
1102
|
+
/** How many calls give each field; `roles` says who placed, answered and rang. */
|
|
1103
|
+
known: strictObject({
|
|
1104
|
+
direction: count4,
|
|
1105
|
+
outcome: count4,
|
|
1106
|
+
wait_ms: count4,
|
|
1107
|
+
talk_ms: count4,
|
|
1108
|
+
duration_ms: count4,
|
|
1109
|
+
roles: count4
|
|
1110
|
+
}),
|
|
1111
|
+
by_direction: maybe(counts(CALL_DIRECTIONS)),
|
|
1112
|
+
by_outcome: maybe(counts(CALL_OUTCOMES)),
|
|
1113
|
+
talk_ms: maybe(ms),
|
|
1114
|
+
mean_talk_ms: maybe(ms),
|
|
1115
|
+
duration_ms: maybe(ms),
|
|
1116
|
+
mean_wait_ms: maybe(nullable(ms)),
|
|
1117
|
+
max_wait_ms: maybe(nullable(ms)),
|
|
1118
|
+
short_calls: maybe(count4),
|
|
1119
|
+
employees: array(employee),
|
|
1120
|
+
/** Hours 0–23 in `time_zone`. */
|
|
1121
|
+
hours: array(strictObject({ hour: pipe(count4, maxValue(23)), ...periodFields })),
|
|
1122
|
+
/** `YYYY-MM-DD` in `time_zone`, the days with a call. */
|
|
1123
|
+
days: array(strictObject({ date: string(), ...periodFields })),
|
|
1124
|
+
missed: maybe(strictObject({
|
|
1125
|
+
calls: count4,
|
|
1126
|
+
called_back: count4,
|
|
1127
|
+
not_called_back: count4,
|
|
1128
|
+
unknown_callback: count4,
|
|
1129
|
+
unknown_outcome: count4,
|
|
1130
|
+
/** Newest first. */
|
|
1131
|
+
items: array(strictObject({
|
|
1132
|
+
...callRef.entries,
|
|
1133
|
+
outcome: picklist(["voicemail", "busy", "no_answer"]),
|
|
1134
|
+
client: nullable(strictObject({ key: string(), name: nullable(string()) })),
|
|
1135
|
+
rang: array(string()),
|
|
1136
|
+
called_back: maybe(boolean()),
|
|
1137
|
+
callback: maybe(nullable(strictObject({ ...callRef.entries, after_ms: ms, direction: picklist(["outgoing", "incoming"]) })))
|
|
1138
|
+
})),
|
|
1139
|
+
has_more: boolean()
|
|
1140
|
+
}))
|
|
1141
|
+
});
|
|
1142
|
+
var callStats = callStatsSchema;
|
|
1143
|
+
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
1144
|
+
var has = /* @__PURE__ */ __name((key, value) => value === void 0 ? {} : { [key]: value }, "has");
|
|
1145
|
+
var periodItem = /* @__PURE__ */ __name((row) => ({
|
|
1146
|
+
calls: row.calls,
|
|
1147
|
+
incoming: row.incoming,
|
|
1148
|
+
outgoing: row.outgoing,
|
|
1149
|
+
internal: row.internal,
|
|
1150
|
+
...has("answered", row.answered),
|
|
1151
|
+
...has("missed", row.missed),
|
|
1152
|
+
...has("talk_ms", row.talkMs)
|
|
1153
|
+
}), "periodItem");
|
|
1154
|
+
var callStatsItem = /* @__PURE__ */ __name((found) => {
|
|
1155
|
+
const refOf = /* @__PURE__ */ __name((meetingId, startedAt) => ({
|
|
1156
|
+
ref: formatMeetingReference({ type: "meeting", accountId: found.accountId, meetingId }),
|
|
1157
|
+
meeting_id: meetingId,
|
|
1158
|
+
started_at: iso3(startedAt)
|
|
1159
|
+
}), "refOf");
|
|
1160
|
+
return {
|
|
1161
|
+
time_zone: found.timeZone,
|
|
1162
|
+
callback_within_ms: found.callbackWithinMs,
|
|
1163
|
+
short_call_under_ms: found.shortCallUnderMs,
|
|
1164
|
+
calls: found.calls,
|
|
1165
|
+
not_calls: found.notCalls,
|
|
1166
|
+
known: {
|
|
1167
|
+
direction: found.known.direction,
|
|
1168
|
+
outcome: found.known.outcome,
|
|
1169
|
+
wait_ms: found.known.waitMs,
|
|
1170
|
+
talk_ms: found.known.talkMs,
|
|
1171
|
+
duration_ms: found.known.durationMs,
|
|
1172
|
+
roles: found.known.roles
|
|
1173
|
+
},
|
|
1174
|
+
...has("by_direction", found.byDirection),
|
|
1175
|
+
...has("by_outcome", found.byOutcome),
|
|
1176
|
+
...has("talk_ms", found.talkMs),
|
|
1177
|
+
...has("mean_talk_ms", found.meanTalkMs),
|
|
1178
|
+
...has("duration_ms", found.durationMs),
|
|
1179
|
+
...has("mean_wait_ms", found.meanWaitMs),
|
|
1180
|
+
...has("max_wait_ms", found.maxWaitMs),
|
|
1181
|
+
...has("short_calls", found.shortCalls),
|
|
1182
|
+
employees: found.employees.map((one) => ({
|
|
1183
|
+
key: one.key,
|
|
1184
|
+
name: one.name,
|
|
1185
|
+
identity_id: one.identityId,
|
|
1186
|
+
extension: one.extension,
|
|
1187
|
+
calls: one.calls,
|
|
1188
|
+
incoming: one.incoming,
|
|
1189
|
+
outgoing: one.outgoing,
|
|
1190
|
+
internal: one.internal,
|
|
1191
|
+
...has("placed", one.placed),
|
|
1192
|
+
...has("answered", one.answered),
|
|
1193
|
+
...has("rang_not_answered", one.rangNotAnswered),
|
|
1194
|
+
...has("talk_ms", one.talkMs),
|
|
1195
|
+
...has("mean_talk_ms", one.meanTalkMs),
|
|
1196
|
+
...has("mean_wait_ms", one.meanWaitMs),
|
|
1197
|
+
...has("max_wait_ms", one.maxWaitMs)
|
|
1198
|
+
})),
|
|
1199
|
+
hours: found.hours.map((row) => ({ hour: row.hour, ...periodItem(row) })),
|
|
1200
|
+
days: found.days.map((row) => ({ date: row.date, ...periodItem(row) })),
|
|
1201
|
+
...has("missed", found.missed && {
|
|
1202
|
+
calls: found.missed.calls,
|
|
1203
|
+
called_back: found.missed.calledBack,
|
|
1204
|
+
not_called_back: found.missed.notCalledBack,
|
|
1205
|
+
unknown_callback: found.missed.unknownCallback,
|
|
1206
|
+
unknown_outcome: found.missed.unknownOutcome,
|
|
1207
|
+
items: found.missed.items.map((one) => ({
|
|
1208
|
+
...refOf(one.meetingId, one.startedAt),
|
|
1209
|
+
outcome: one.outcome,
|
|
1210
|
+
client: one.client,
|
|
1211
|
+
rang: one.rang,
|
|
1212
|
+
...has("called_back", one.calledBack),
|
|
1213
|
+
...has("callback", one.callback === void 0 ? void 0 : one.callback && {
|
|
1214
|
+
...refOf(one.callback.meetingId, one.callback.startedAt),
|
|
1215
|
+
after_ms: one.callback.afterMs,
|
|
1216
|
+
direction: one.callback.direction
|
|
1217
|
+
})
|
|
1218
|
+
})),
|
|
1219
|
+
has_more: found.missed.hasMore
|
|
1220
|
+
})
|
|
1221
|
+
};
|
|
1222
|
+
}, "callStatsItem");
|
|
1223
|
+
|
|
1224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/stats.js
|
|
1225
|
+
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
1226
|
+
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
1227
|
+
const zone = timeZone ?? "UTC";
|
|
1228
|
+
try {
|
|
1229
|
+
new Intl.DateTimeFormat("en", { timeZone: zone });
|
|
1230
|
+
} catch {
|
|
1231
|
+
throw new CliError("validation_error", "expected an IANA time zone such as Europe/Madrid");
|
|
1232
|
+
}
|
|
1233
|
+
return zone;
|
|
1234
|
+
}, "zoneOf");
|
|
1235
|
+
var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
1236
|
+
var weekStart = /* @__PURE__ */ __name((at, format) => {
|
|
1237
|
+
const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
1238
|
+
const day = Date.UTC(Number(parts.year), Number(parts.month) - 1, Number(parts.day));
|
|
1239
|
+
return new Date(day - DAYS.indexOf(parts.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
|
|
1240
|
+
}, "weekStart");
|
|
1241
|
+
var dayKey = /* @__PURE__ */ __name((at, format) => {
|
|
1242
|
+
const parts = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
1243
|
+
return `${parts.year}-${parts.month}-${parts.day}`;
|
|
1244
|
+
}, "dayKey");
|
|
1245
|
+
var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
|
|
1246
|
+
timeZone: zone,
|
|
1247
|
+
year: "numeric",
|
|
1248
|
+
month: "2-digit",
|
|
1249
|
+
day: "2-digit",
|
|
1250
|
+
weekday: "short"
|
|
1251
|
+
}), "zoneFormat");
|
|
1252
|
+
var NO_SERIES = "no-series";
|
|
1253
|
+
var MOST_COUNT_ROWS = 100;
|
|
1254
|
+
var minutesOf = /* @__PURE__ */ __name((ms2) => Math.round(ms2 / 6e4), "minutesOf");
|
|
1255
|
+
var meanOf = /* @__PURE__ */ __name((ms2, timed) => timed === 0 ? null : Math.round(ms2 / timed / 6e3) / 10, "meanOf");
|
|
1256
|
+
var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, limit = MOST_COUNT_ROWS) => {
|
|
1257
|
+
if (!MEETING_COUNTS_GROUPINGS.includes(by))
|
|
1258
|
+
throw new CliError("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
|
|
1259
|
+
if (!Number.isSafeInteger(limit) || limit < 1)
|
|
1260
|
+
throw new CliError("validation_error", "--limit is a positive number");
|
|
1261
|
+
const zone = zoneOf(timeZone);
|
|
1262
|
+
const format = zoneFormat(zone);
|
|
1263
|
+
const sum = /* @__PURE__ */ __name(() => ({ meetings: 0, ms: 0, timed: 0, transcripts: 0 }), "sum");
|
|
1264
|
+
const add = /* @__PURE__ */ __name((into, meeting2) => {
|
|
1265
|
+
into.meetings += 1;
|
|
1266
|
+
if (meeting2.durationMs !== null) {
|
|
1267
|
+
into.ms += Math.max(0, meeting2.durationMs);
|
|
1268
|
+
into.timed += 1;
|
|
1269
|
+
}
|
|
1270
|
+
if (meeting2.transcribed)
|
|
1271
|
+
into.transcripts += 1;
|
|
1272
|
+
}, "add");
|
|
1273
|
+
const total = { ...sum(), name: null };
|
|
1274
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1275
|
+
for (const meeting2 of meetings) {
|
|
1276
|
+
add(total, meeting2);
|
|
1277
|
+
const key = by === "series" ? meeting2.seriesKey === null ? NO_SERIES : `series:${meeting2.seriesKey}` : meeting2.startedAt === null ? null : by === "day" ? dayKey(meeting2.startedAt, format) : weekStart(meeting2.startedAt, format);
|
|
1278
|
+
if (key === null)
|
|
1279
|
+
continue;
|
|
1280
|
+
const group = groups.get(key) ?? { ...sum(), name: by === "series" ? meeting2.seriesTitle : null };
|
|
1281
|
+
add(group, meeting2);
|
|
1282
|
+
groups.set(key, group);
|
|
1283
|
+
}
|
|
1284
|
+
const ordered = [...groups.entries()].sort(([a, one], [b, other]) => by === "series" ? other.ms - one.ms || other.meetings - one.meetings || a.localeCompare(b) : b.localeCompare(a));
|
|
1285
|
+
const kept = ordered.slice(0, limit);
|
|
1286
|
+
if (by !== "series")
|
|
1287
|
+
kept.reverse();
|
|
1288
|
+
const counted = /* @__PURE__ */ __name(({ meetings: count7, ms: ms2, timed, transcripts }) => ({
|
|
1289
|
+
meetings: count7,
|
|
1290
|
+
minutes: minutesOf(ms2),
|
|
1291
|
+
meanMinutes: meanOf(ms2, timed),
|
|
1292
|
+
transcripts
|
|
1293
|
+
}), "counted");
|
|
1294
|
+
return {
|
|
1295
|
+
by,
|
|
1296
|
+
timeZone: zone,
|
|
1297
|
+
...counted(total),
|
|
1298
|
+
rows: kept.map(([key, group]) => ({ key, name: group.name, ...counted(group) })),
|
|
1299
|
+
hasMore: ordered.length > limit
|
|
1300
|
+
};
|
|
1301
|
+
}, "aggregateMeetingCounts");
|
|
1302
|
+
var UNKNOWN_SPEAKER = "unknown";
|
|
1303
|
+
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");
|
|
1304
|
+
var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
1305
|
+
const zone = zoneOf(timeZone);
|
|
1306
|
+
const format = zoneFormat(zone);
|
|
1307
|
+
const speakers = /* @__PURE__ */ new Map();
|
|
1308
|
+
const weeks = /* @__PURE__ */ new Map();
|
|
1309
|
+
const meetings = /* @__PURE__ */ new Set();
|
|
1310
|
+
let lines = 0;
|
|
1311
|
+
let words2 = 0;
|
|
1312
|
+
let talkMs = 0;
|
|
1313
|
+
for (const row of rows) {
|
|
1314
|
+
const talk = Math.max(0, row.endMs - row.startMs);
|
|
1315
|
+
meetings.add(row.meetingId);
|
|
1316
|
+
lines += 1;
|
|
1317
|
+
words2 += row.words;
|
|
1318
|
+
talkMs += talk;
|
|
1319
|
+
const who = speakerOf(row);
|
|
1320
|
+
const held = speakers.get(who.key) ?? {
|
|
1321
|
+
key: who.key,
|
|
1322
|
+
name: who.name ?? null,
|
|
1323
|
+
personId: row.personId,
|
|
1324
|
+
identityId: row.personId === null ? row.identityId : null,
|
|
1325
|
+
meetings: 0,
|
|
1326
|
+
lines: 0,
|
|
1327
|
+
words: 0,
|
|
1328
|
+
talkMs: 0,
|
|
1329
|
+
share: 0,
|
|
1330
|
+
seen: /* @__PURE__ */ new Set()
|
|
1331
|
+
};
|
|
1332
|
+
held.seen.add(row.meetingId);
|
|
1333
|
+
held.lines += 1;
|
|
1334
|
+
held.words += row.words;
|
|
1335
|
+
held.talkMs += talk;
|
|
1336
|
+
speakers.set(who.key, held);
|
|
1337
|
+
if (row.startedAt !== null) {
|
|
1338
|
+
const week = weeks.get(weekStart(row.startedAt, format)) ?? { meetings: /* @__PURE__ */ new Set(), talkMs: 0 };
|
|
1339
|
+
week.meetings.add(row.meetingId);
|
|
1340
|
+
week.talkMs += talk;
|
|
1341
|
+
weeks.set(weekStart(row.startedAt, format), week);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
return {
|
|
1345
|
+
timeZone: zone,
|
|
1346
|
+
meetings: meetings.size,
|
|
1347
|
+
lines,
|
|
1348
|
+
words: words2,
|
|
1349
|
+
talkMs,
|
|
1350
|
+
speakers: [...speakers.values()].map(({ seen, ...speaker }) => ({
|
|
1351
|
+
...speaker,
|
|
1352
|
+
meetings: seen.size,
|
|
1353
|
+
share: talkMs === 0 ? 0 : Math.round(speaker.talkMs / talkMs * 1e3) / 1e3
|
|
1354
|
+
})).sort((a, b) => b.talkMs - a.talkMs || a.key.localeCompare(b.key)),
|
|
1355
|
+
weeks: [...weeks.entries()].map(([start, week]) => ({ weekStart: start, meetings: week.meetings.size, talkMs: week.talkMs })).sort((a, b) => a.weekStart.localeCompare(b.weekStart))
|
|
1356
|
+
};
|
|
1357
|
+
}, "aggregateMeetingStats");
|
|
1358
|
+
|
|
1359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/call-stats.js
|
|
1360
|
+
var CALLBACK_WITHIN_MS = 24 * 60 * 60 * 1e3;
|
|
1361
|
+
var SHORT_CALL_UNDER_MS = 3e4;
|
|
1362
|
+
var MOST_MISSED = 100;
|
|
1363
|
+
var countsOf = /* @__PURE__ */ __name((keys) => Object.fromEntries([...keys, "unknown"].map((key) => [key, 0])), "countsOf");
|
|
1364
|
+
var isMissed = /* @__PURE__ */ __name((call) => call.direction === "incoming" && call.outcome !== null && MISSED_OUTCOMES.includes(call.outcome), "isMissed");
|
|
1365
|
+
var mean = /* @__PURE__ */ __name((sum, count7) => count7 === 0 ? null : Math.round(sum / count7), "mean");
|
|
1366
|
+
var positiveMs = /* @__PURE__ */ __name((value, fallback, name) => {
|
|
1367
|
+
const ms2 = value ?? fallback;
|
|
1368
|
+
if (!Number.isSafeInteger(ms2) || ms2 < 1)
|
|
1369
|
+
throw new CliError("validation_error", `${name} is a positive duration`);
|
|
1370
|
+
return ms2;
|
|
1371
|
+
}, "positiveMs");
|
|
1372
|
+
var hourFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", { timeZone: zone, hour: "2-digit", hourCycle: "h23" }), "hourFormat");
|
|
1373
|
+
var answersMissed = /* @__PURE__ */ __name((missed, later, within2) => missed.startedAt !== null && later.startedAt !== null && later.startedAt > missed.startedAt && later.startedAt - missed.startedAt <= within2 && (later.direction === "outgoing" || later.direction === "incoming" && later.outcome === "answered"), "answersMissed");
|
|
1374
|
+
var when = /* @__PURE__ */ __name((present, value) => present ? value : {}, "when");
|
|
1375
|
+
var period = /* @__PURE__ */ __name(() => ({ calls: 0, incoming: 0, outgoing: 0, internal: 0, answered: 0, missed: 0, talkMs: 0 }), "period");
|
|
1376
|
+
var aggregateCallStats = /* @__PURE__ */ __name((calls, options = {}) => {
|
|
1377
|
+
const zone = zoneOf(options.timeZone);
|
|
1378
|
+
const within2 = positiveMs(options.callbackWithinMs, CALLBACK_WITHIN_MS, "--within");
|
|
1379
|
+
const short = positiveMs(options.shortCallUnderMs, SHORT_CALL_UNDER_MS, "the short-call threshold");
|
|
1380
|
+
const limit = options.missedLimit ?? MOST_MISSED;
|
|
1381
|
+
if (!Number.isSafeInteger(limit) || limit < 0)
|
|
1382
|
+
throw new CliError("validation_error", "--limit is a positive number");
|
|
1383
|
+
const known = {
|
|
1384
|
+
direction: calls.filter((call) => call.direction !== null).length,
|
|
1385
|
+
outcome: calls.filter((call) => call.outcome !== null).length,
|
|
1386
|
+
waitMs: calls.filter((call) => call.waitMs !== null).length,
|
|
1387
|
+
talkMs: calls.filter((call) => call.talkMs !== null).length,
|
|
1388
|
+
durationMs: calls.filter((call) => call.durationMs !== null).length,
|
|
1389
|
+
roles: calls.filter((call) => call.roles).length
|
|
1390
|
+
};
|
|
1391
|
+
const has2 = { outcome: known.outcome > 0, talk: known.talkMs > 0, wait: known.waitMs > 0, roles: known.roles > 0 };
|
|
1392
|
+
const days = zoneFormat(zone);
|
|
1393
|
+
const hourOf = hourFormat(zone);
|
|
1394
|
+
const byDirection = countsOf(CALL_DIRECTIONS);
|
|
1395
|
+
const byOutcome = countsOf(CALL_OUTCOMES);
|
|
1396
|
+
let talk = 0;
|
|
1397
|
+
let duration = 0;
|
|
1398
|
+
let wait = { sum: 0, count: 0, max: null };
|
|
1399
|
+
let shortCalls = 0;
|
|
1400
|
+
const employees = /* @__PURE__ */ new Map();
|
|
1401
|
+
const hours = Array.from({ length: 24 }, period);
|
|
1402
|
+
const dayRows = /* @__PURE__ */ new Map();
|
|
1403
|
+
const employee2 = /* @__PURE__ */ __name((one) => {
|
|
1404
|
+
const held = employees.get(one.key) ?? {
|
|
1405
|
+
...one,
|
|
1406
|
+
...period(),
|
|
1407
|
+
placed: 0,
|
|
1408
|
+
rangNotAnswered: 0,
|
|
1409
|
+
talks: 0,
|
|
1410
|
+
waits: 0,
|
|
1411
|
+
waitSum: 0,
|
|
1412
|
+
maxWaitMs: null
|
|
1413
|
+
};
|
|
1414
|
+
held.name ??= one.name;
|
|
1415
|
+
held.identityId ??= one.identityId;
|
|
1416
|
+
employees.set(one.key, held);
|
|
1417
|
+
return held;
|
|
1418
|
+
}, "employee");
|
|
1419
|
+
const addTo = /* @__PURE__ */ __name((row, call) => {
|
|
1420
|
+
row.calls += 1;
|
|
1421
|
+
if (call.direction)
|
|
1422
|
+
row[call.direction] += 1;
|
|
1423
|
+
if (call.outcome === "answered")
|
|
1424
|
+
row.answered += 1;
|
|
1425
|
+
if (isMissed(call))
|
|
1426
|
+
row.missed += 1;
|
|
1427
|
+
row.talkMs += call.talkMs ?? 0;
|
|
1428
|
+
}, "addTo");
|
|
1429
|
+
for (const call of calls) {
|
|
1430
|
+
byDirection[call.direction ?? "unknown"] += 1;
|
|
1431
|
+
byOutcome[call.outcome ?? "unknown"] += 1;
|
|
1432
|
+
talk += call.talkMs ?? 0;
|
|
1433
|
+
duration += call.durationMs ?? 0;
|
|
1434
|
+
if (call.outcome === "answered" && call.talkMs !== null && call.talkMs < short)
|
|
1435
|
+
shortCalls += 1;
|
|
1436
|
+
if (call.direction === "incoming" && call.outcome === "answered" && call.waitMs !== null)
|
|
1437
|
+
wait = { sum: wait.sum + call.waitMs, count: wait.count + 1, max: Math.max(wait.max ?? 0, call.waitMs) };
|
|
1438
|
+
const talkers = /* @__PURE__ */ new Set([
|
|
1439
|
+
...call.answeredBy.map(({ key }) => key),
|
|
1440
|
+
...call.placedBy && call.outcome === "answered" ? [call.placedBy.key] : []
|
|
1441
|
+
]);
|
|
1442
|
+
for (const one of call.employees) {
|
|
1443
|
+
const held = employee2(one);
|
|
1444
|
+
held.calls += 1;
|
|
1445
|
+
if (call.direction)
|
|
1446
|
+
held[call.direction] += 1;
|
|
1447
|
+
if (call.placedBy?.key === one.key)
|
|
1448
|
+
held.placed += 1;
|
|
1449
|
+
if (call.answeredBy.some(({ key }) => key === one.key))
|
|
1450
|
+
held.answered += 1;
|
|
1451
|
+
if (call.rang.some(({ key }) => key === one.key))
|
|
1452
|
+
held.rangNotAnswered += 1;
|
|
1453
|
+
if (talkers.has(one.key) && call.talkMs !== null) {
|
|
1454
|
+
held.talkMs += call.talkMs;
|
|
1455
|
+
held.talks += 1;
|
|
1456
|
+
}
|
|
1457
|
+
if (call.direction === "incoming" && call.answeredBy[0]?.key === one.key && call.waitMs !== null) {
|
|
1458
|
+
held.waits += 1;
|
|
1459
|
+
held.waitSum += call.waitMs;
|
|
1460
|
+
held.maxWaitMs = Math.max(held.maxWaitMs ?? 0, call.waitMs);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
if (call.startedAt !== null) {
|
|
1464
|
+
const hour = hours[Number(hourOf.format(new Date(call.startedAt))) % 24];
|
|
1465
|
+
if (hour)
|
|
1466
|
+
addTo(hour, call);
|
|
1467
|
+
const date = dayKey(call.startedAt, days);
|
|
1468
|
+
const row = dayRows.get(date) ?? period();
|
|
1469
|
+
addTo(row, call);
|
|
1470
|
+
dayRows.set(date, row);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
const periodOf = /* @__PURE__ */ __name(({ answered, missed, talkMs, ...row }) => ({
|
|
1474
|
+
...row,
|
|
1475
|
+
...when(has2.outcome, { answered, missed }),
|
|
1476
|
+
...when(has2.talk, { talkMs })
|
|
1477
|
+
}), "periodOf");
|
|
1478
|
+
const byClient = /* @__PURE__ */ new Map();
|
|
1479
|
+
for (const call of [...calls, ...options.later ?? []]) {
|
|
1480
|
+
if (!call.client)
|
|
1481
|
+
continue;
|
|
1482
|
+
const list = byClient.get(call.client.key) ?? [];
|
|
1483
|
+
list.push(call);
|
|
1484
|
+
byClient.set(call.client.key, list);
|
|
1485
|
+
}
|
|
1486
|
+
for (const list of byClient.values())
|
|
1487
|
+
list.sort((a, b) => (a.startedAt ?? 0) - (b.startedAt ?? 0));
|
|
1488
|
+
const missedCalls = calls.filter(isMissed).sort((a, b) => (b.startedAt ?? 0) - (a.startedAt ?? 0)).map((call) => {
|
|
1489
|
+
const { client, startedAt } = call;
|
|
1490
|
+
const found = client ? byClient.get(client.key)?.find((one) => answersMissed(call, one, within2)) : void 0;
|
|
1491
|
+
return {
|
|
1492
|
+
meetingId: call.meetingId,
|
|
1493
|
+
startedAt,
|
|
1494
|
+
outcome: call.outcome,
|
|
1495
|
+
client: client ? { key: client.key, name: client.name } : null,
|
|
1496
|
+
rang: call.rang.map(({ key }) => key),
|
|
1497
|
+
...when(client !== null && startedAt !== null, {
|
|
1498
|
+
calledBack: found !== void 0,
|
|
1499
|
+
callback: found && found.startedAt !== null && startedAt !== null ? {
|
|
1500
|
+
meetingId: found.meetingId,
|
|
1501
|
+
startedAt: found.startedAt,
|
|
1502
|
+
afterMs: found.startedAt - startedAt,
|
|
1503
|
+
direction: found.direction
|
|
1504
|
+
} : null
|
|
1505
|
+
})
|
|
1506
|
+
};
|
|
1507
|
+
});
|
|
1508
|
+
return {
|
|
1509
|
+
timeZone: zone,
|
|
1510
|
+
callbackWithinMs: within2,
|
|
1511
|
+
shortCallUnderMs: short,
|
|
1512
|
+
calls: calls.length,
|
|
1513
|
+
known,
|
|
1514
|
+
...when(known.direction > 0, { byDirection }),
|
|
1515
|
+
...when(has2.outcome, { byOutcome }),
|
|
1516
|
+
...when(has2.talk, { talkMs: talk, meanTalkMs: Math.round(talk / known.talkMs) }),
|
|
1517
|
+
...when(known.durationMs > 0, { durationMs: duration }),
|
|
1518
|
+
...when(has2.wait, { meanWaitMs: mean(wait.sum, wait.count), maxWaitMs: wait.max }),
|
|
1519
|
+
...when(has2.outcome && has2.talk, { shortCalls }),
|
|
1520
|
+
employees: [...employees.values()].map(({ talks, waits, waitSum, placed, answered, rangNotAnswered, talkMs, maxWaitMs, missed: _, ...one }) => ({
|
|
1521
|
+
key: one.key,
|
|
1522
|
+
name: one.name,
|
|
1523
|
+
identityId: one.identityId,
|
|
1524
|
+
extension: one.extension,
|
|
1525
|
+
calls: one.calls,
|
|
1526
|
+
incoming: one.incoming,
|
|
1527
|
+
outgoing: one.outgoing,
|
|
1528
|
+
internal: one.internal,
|
|
1529
|
+
...when(has2.roles, { placed, answered, rangNotAnswered }),
|
|
1530
|
+
...when(has2.roles && has2.talk, { talkMs, meanTalkMs: mean(talkMs, talks) }),
|
|
1531
|
+
...when(has2.roles && has2.wait, { meanWaitMs: mean(waitSum, waits), maxWaitMs })
|
|
1532
|
+
})).sort((a, b) => b.calls - a.calls || a.key.localeCompare(b.key)),
|
|
1533
|
+
hours: hours.map((row, hour) => ({ hour, ...periodOf(row) })),
|
|
1534
|
+
days: [...dayRows.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([date, row]) => ({ date, ...periodOf(row) })),
|
|
1535
|
+
...when(has2.outcome, {
|
|
1536
|
+
missed: {
|
|
1537
|
+
calls: missedCalls.length,
|
|
1538
|
+
calledBack: missedCalls.filter((one) => one.calledBack === true).length,
|
|
1539
|
+
notCalledBack: missedCalls.filter((one) => one.calledBack === false).length,
|
|
1540
|
+
unknownCallback: missedCalls.filter((one) => one.calledBack === void 0).length,
|
|
1541
|
+
unknownOutcome: calls.filter((call) => call.direction === "incoming" && call.outcome === null).length,
|
|
1542
|
+
items: missedCalls.slice(0, limit),
|
|
1543
|
+
hasMore: missedCalls.length > limit
|
|
1544
|
+
}
|
|
1545
|
+
})
|
|
1546
|
+
};
|
|
1547
|
+
}, "aggregateCallStats");
|
|
1548
|
+
|
|
1549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/cue-fingerprint.js
|
|
1343
1550
|
import { createHash } from "node:crypto";
|
|
1344
1551
|
var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256").update(JSON.stringify({
|
|
1345
1552
|
reference: cue2.reference,
|
|
@@ -1353,7 +1560,7 @@ var meetingCueFingerprint = /* @__PURE__ */ __name((cue2) => createHash("sha256"
|
|
|
1353
1560
|
text: cue2.text
|
|
1354
1561
|
})).digest("hex"), "meetingCueFingerprint");
|
|
1355
1562
|
|
|
1356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/event-query.js
|
|
1357
1564
|
var EVENT_QUERY = defineQuery({
|
|
1358
1565
|
entity: "event",
|
|
1359
1566
|
backend: "sql",
|
|
@@ -1369,7 +1576,8 @@ var EVENT_QUERY = defineQuery({
|
|
|
1369
1576
|
]
|
|
1370
1577
|
});
|
|
1371
1578
|
|
|
1372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/event-store.js
|
|
1580
|
+
var PARTICIPANT_RESPONSES = ["needs-action", "accepted", "tentative", "declined", "delegated"];
|
|
1373
1581
|
var UNTIL = /(?:^|;)UNTIL=(\d{4})(\d{2})(\d{2})(?:T(\d{2})(\d{2})(\d{2})Z?)?(?:;|$)/iu;
|
|
1374
1582
|
var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
1375
1583
|
if (entry.recurrenceEndsAt !== null)
|
|
@@ -1378,8 +1586,8 @@ var seriesEnd = /* @__PURE__ */ __name((entry) => {
|
|
|
1378
1586
|
const until = rule === void 0 ? null : UNTIL.exec(rule.slice("RRULE:".length));
|
|
1379
1587
|
if (!until)
|
|
1380
1588
|
return Number.POSITIVE_INFINITY;
|
|
1381
|
-
const [, year, month,
|
|
1382
|
-
return Date.UTC(Number(year), Number(month) - 1, Number(
|
|
1589
|
+
const [, year, month, day, hour = "23", minute = "59", second = "59"] = until;
|
|
1590
|
+
return Date.UTC(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second)) + 864e5;
|
|
1383
1591
|
}, "seriesEnd");
|
|
1384
1592
|
var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
1385
1593
|
if (entry.kind === "occurrence" && !entry.exception)
|
|
@@ -1392,7 +1600,7 @@ var entryInWindow = /* @__PURE__ */ __name((entry, window) => {
|
|
|
1392
1600
|
return Math.max(entry.endsAt ?? start, start + 1) > window.from;
|
|
1393
1601
|
}, "entryInWindow");
|
|
1394
1602
|
|
|
1395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/events.js
|
|
1396
1604
|
var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(), { create = true } = {}) => {
|
|
1397
1605
|
const current = await store.meeting(details.meeting.id);
|
|
1398
1606
|
if (!current)
|
|
@@ -1437,7 +1645,7 @@ var linkEvent = /* @__PURE__ */ __name(async (store, details, now = Date.now(),
|
|
|
1437
1645
|
return (await store.events()).find((e) => e.id === linked?.meeting.eventId) ?? null;
|
|
1438
1646
|
}, "linkEvent");
|
|
1439
1647
|
|
|
1440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/participant-search.js
|
|
1441
1649
|
var normalizeMeetingParticipantQuery = /* @__PURE__ */ __name((text7) => text7.normalize("NFKC").toLowerCase(), "normalizeMeetingParticipantQuery");
|
|
1442
1650
|
var validateMeetingParticipantQuery = /* @__PURE__ */ __name((query) => {
|
|
1443
1651
|
if (typeof query !== "string" || !query.trim() || query.length > 500 || query.includes("\0"))
|
|
@@ -1461,7 +1669,7 @@ var validateMeetingParticipantSearch = /* @__PURE__ */ __name((query, input) =>
|
|
|
1461
1669
|
};
|
|
1462
1670
|
}, "validateMeetingParticipantSearch");
|
|
1463
1671
|
|
|
1464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/reads.js
|
|
1465
1673
|
var MeetingError = class extends CliError {
|
|
1466
1674
|
static {
|
|
1467
1675
|
__name(this, "MeetingError");
|
|
@@ -1513,6 +1721,7 @@ var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, optio
|
|
|
1513
1721
|
});
|
|
1514
1722
|
return {
|
|
1515
1723
|
...packet,
|
|
1724
|
+
items: packet.items.map((one) => ({ ...one, untrusted: [...PARTICIPANT_UNTRUSTED] })),
|
|
1516
1725
|
page: { mode: "cursor", limit, has_more, ...next_cursor ? { next_cursor } : {} },
|
|
1517
1726
|
...next_cursor ? {
|
|
1518
1727
|
next: [
|
|
@@ -1533,7 +1742,14 @@ var meetingPeople = /* @__PURE__ */ __name(async (store, query, accountId, optio
|
|
|
1533
1742
|
}
|
|
1534
1743
|
if (Object.values(options).some((value) => value !== void 0))
|
|
1535
1744
|
throw new MeetingError("configuration_error", "bounded participant lookup needs a selected account and capable store");
|
|
1536
|
-
return listed(await store.participants(query, accountId))
|
|
1745
|
+
return listed((await store.participants(query, accountId)).map((one) => ({
|
|
1746
|
+
participant_id: one.id,
|
|
1747
|
+
meeting_id: one.meetingId,
|
|
1748
|
+
identity_id: one.identityId,
|
|
1749
|
+
display_name: one.displayName,
|
|
1750
|
+
email: one.email,
|
|
1751
|
+
untrusted: [...PARTICIPANT_UNTRUSTED]
|
|
1752
|
+
})));
|
|
1537
1753
|
}, "meetingPeople");
|
|
1538
1754
|
var PAGE_NEXT2 = STEPS.find((step) => step.id === "page.next");
|
|
1539
1755
|
var meetingsList = /* @__PURE__ */ __name(async (store, filter = {}) => {
|
|
@@ -1592,14 +1808,14 @@ var meetingSummaryAnswer = /* @__PURE__ */ __name(async (store, id5, accountId)
|
|
|
1592
1808
|
return wholeList(details.summaries.map((one) => meetingSummaryItem(details.meeting.accountId, one)));
|
|
1593
1809
|
}, "meetingSummaryAnswer");
|
|
1594
1810
|
|
|
1595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1596
|
-
var timestamp = /* @__PURE__ */ __name((
|
|
1597
|
-
if (!Number.isSafeInteger(
|
|
1811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/export.js
|
|
1812
|
+
var timestamp = /* @__PURE__ */ __name((milliseconds2) => {
|
|
1813
|
+
if (!Number.isSafeInteger(milliseconds2) || milliseconds2 < 0)
|
|
1598
1814
|
throw new MeetingError("validation_error", "transcript times must be nonnegative integer milliseconds");
|
|
1599
|
-
const hours = Math.floor(
|
|
1600
|
-
const minutes = Math.floor(
|
|
1601
|
-
const seconds = Math.floor(
|
|
1602
|
-
return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${String(
|
|
1815
|
+
const hours = Math.floor(milliseconds2 / 36e5);
|
|
1816
|
+
const minutes = Math.floor(milliseconds2 % 36e5 / 6e4);
|
|
1817
|
+
const seconds = Math.floor(milliseconds2 % 6e4 / 1e3);
|
|
1818
|
+
return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}:${String(seconds).padStart(2, "0")}.${String(milliseconds2 % 1e3).padStart(3, "0")}`;
|
|
1603
1819
|
}, "timestamp");
|
|
1604
1820
|
var vttText = /* @__PURE__ */ __name((text7) => {
|
|
1605
1821
|
if (visibleControls(text7) !== text7 || /\n\s*\n/.test(text7))
|
|
@@ -1654,44 +1870,45 @@ var exportMeeting = /* @__PURE__ */ __name(async (store, id5, options) => {
|
|
|
1654
1870
|
text: row.text
|
|
1655
1871
|
})));
|
|
1656
1872
|
} else {
|
|
1657
|
-
const
|
|
1873
|
+
const parts = [`# ${heading(details.meeting.title ?? "Untitled meeting")}`, `Meeting ID: ${details.meeting.id}`];
|
|
1658
1874
|
if (details.meeting.description !== null)
|
|
1659
|
-
|
|
1875
|
+
parts.push("## Description", quote(details.meeting.description));
|
|
1660
1876
|
for (const summary of details.summaries) {
|
|
1661
|
-
|
|
1877
|
+
parts.push(`## ${heading(summary.title ?? "Summary")}`);
|
|
1662
1878
|
if (summary.content !== null)
|
|
1663
|
-
|
|
1879
|
+
parts.push(quote(summary.content));
|
|
1664
1880
|
else {
|
|
1665
1881
|
if (summary.overview !== null)
|
|
1666
|
-
|
|
1882
|
+
parts.push(quote(summary.overview));
|
|
1667
1883
|
for (const section of summary.sections)
|
|
1668
|
-
|
|
1884
|
+
parts.push(`### ${heading(section.label)}`, quote(section.text));
|
|
1669
1885
|
if (summary.nextSteps.length > 0)
|
|
1670
|
-
|
|
1886
|
+
parts.push("### Next steps", summary.nextSteps.map((step) => `- ${markdown(step)}`).join("\n"));
|
|
1671
1887
|
}
|
|
1672
1888
|
}
|
|
1673
1889
|
for (const part of transcripts) {
|
|
1674
|
-
|
|
1890
|
+
parts.push(`## Transcript ${part.transcript.id}`, `Source: ${heading(part.transcript.source)}`);
|
|
1675
1891
|
if (part.transcript.supersededAt !== null)
|
|
1676
|
-
|
|
1892
|
+
parts.push("Version: superseded");
|
|
1677
1893
|
for (const row of [...part.rows].sort((a, b) => a.position - b.position))
|
|
1678
|
-
|
|
1894
|
+
parts.push(`[${timestamp(row.startMs)} \u2013 ${timestamp(row.endMs)}]${row.speakerName === null ? "" : ` ${heading(row.speakerName)}`}`, quote(row.text));
|
|
1679
1895
|
}
|
|
1680
|
-
content = `${
|
|
1896
|
+
content = `${parts.join("\n\n")}
|
|
1681
1897
|
`;
|
|
1682
1898
|
}
|
|
1683
1899
|
return {
|
|
1684
1900
|
meetingId: details.meeting.id,
|
|
1685
1901
|
format: options.format,
|
|
1686
1902
|
filename: `meeting-${details.meeting.id}${options.transcriptId === void 0 ? "" : `-transcript-${options.transcriptId}`}.${options.format === "markdown" ? "md" : "vtt"}`,
|
|
1687
|
-
content
|
|
1903
|
+
content,
|
|
1904
|
+
untrusted: ["content"]
|
|
1688
1905
|
};
|
|
1689
1906
|
}, "exportMeeting");
|
|
1690
1907
|
|
|
1691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1692
1909
|
import { createHash as createHash2 } from "node:crypto";
|
|
1693
1910
|
|
|
1694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/timestamp.js
|
|
1695
1912
|
var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
1696
1913
|
if (typeof value !== "string" || !/^\d{4}-\d{2}-\d{2}T.+(?:Z|[+-]\d{2}:\d{2})$/i.test(value) || !Number.isFinite(Date.parse(value)))
|
|
1697
1914
|
throw new CliError("validation_error", `${name} must be an ISO timestamp with a timezone, such as 2026-11-09T09:00:00Z`);
|
|
@@ -1702,7 +1919,7 @@ var meetingTimestamp = /* @__PURE__ */ __name((value, name) => {
|
|
|
1702
1919
|
return new Date(value).toISOString();
|
|
1703
1920
|
}, "meetingTimestamp");
|
|
1704
1921
|
|
|
1705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/findings-rules.js
|
|
1706
1923
|
var TASK_TYPES = ["bug", "feature", "chore"];
|
|
1707
1924
|
var invalid3 = /* @__PURE__ */ __name((message) => {
|
|
1708
1925
|
throw new CliError("validation_error", message);
|
|
@@ -1716,17 +1933,17 @@ var findingHash = /* @__PURE__ */ __name((value) => createHash2("sha256").update
|
|
|
1716
1933
|
var snakeCase = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snakeCase");
|
|
1717
1934
|
var findingWhere = /* @__PURE__ */ __name((of) => {
|
|
1718
1935
|
const id5 = typeof of.id === "string" ? of.id : null;
|
|
1719
|
-
const
|
|
1936
|
+
const kind2 = typeof of.kind === "string" ? of.kind : null;
|
|
1720
1937
|
return {
|
|
1721
|
-
where: id5 ||
|
|
1722
|
-
named: { ...id5 ? { finding: id5 } : {}, ...
|
|
1938
|
+
where: id5 || kind2 ? ` in ${[id5, kind2 && `(${kind2})`].filter(Boolean).join(" ")}` : "",
|
|
1939
|
+
named: { ...id5 ? { finding: id5 } : {}, ...kind2 ? { kind: kind2 } : {} }
|
|
1723
1940
|
};
|
|
1724
1941
|
}, "findingWhere");
|
|
1725
1942
|
var findingFields = /* @__PURE__ */ __name((value, allowed, noun, of = value) => {
|
|
1726
|
-
const
|
|
1727
|
-
if (!
|
|
1943
|
+
const unknown = Object.keys(value).filter((key) => !allowed.includes(key));
|
|
1944
|
+
if (!unknown.length)
|
|
1728
1945
|
return;
|
|
1729
|
-
const fields2 =
|
|
1946
|
+
const fields2 = unknown.map(snakeCase);
|
|
1730
1947
|
const takes = allowed.map(snakeCase);
|
|
1731
1948
|
const { where, named } = findingWhere(of);
|
|
1732
1949
|
throw new CliError("validation_error", `unknown ${noun} field${fields2.length > 1 ? "s" : ""} ${fields2.join(", ")}${where}; it takes ${takes.join(", ")}`, { reason: "finding.unknown-field", fields: fields2, allowed: takes, ...named });
|
|
@@ -1772,17 +1989,17 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1772
1989
|
if (!finding || typeof finding !== "object")
|
|
1773
1990
|
return invalid3("a finding is an object");
|
|
1774
1991
|
const id5 = findingId(finding.id, ids2);
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1992
|
+
const project = finding.project === void 0 && rules.anySubject ? void 0 : findingText(finding.project, 64);
|
|
1993
|
+
if (project !== void 0 && !/^project:[1-9]\d*$/.test(project))
|
|
1777
1994
|
return invalid3("a finding names a project reference");
|
|
1778
1995
|
if (finding.subject !== void 0 && (!rules.anySubject || !SUBJECT.test(findingText(finding.subject, 80))))
|
|
1779
1996
|
return invalid3("a finding's subject is a person:, organization:, task: or project: reference");
|
|
1780
|
-
if (finding.kind === "task" &&
|
|
1997
|
+
if (finding.kind === "task" && project === void 0 && !rules.inboxTasks)
|
|
1781
1998
|
return invalid3("a task finding names the project the task goes in");
|
|
1782
1999
|
const evidence = validEvidence(finding.evidence, rules);
|
|
1783
2000
|
const base = {
|
|
1784
2001
|
id: id5,
|
|
1785
|
-
...
|
|
2002
|
+
...project === void 0 ? {} : { project },
|
|
1786
2003
|
...finding.subject === void 0 ? {} : { subject: finding.subject },
|
|
1787
2004
|
evidence
|
|
1788
2005
|
};
|
|
@@ -1857,7 +2074,7 @@ var validateFinding = /* @__PURE__ */ __name((finding, rules, ids2) => {
|
|
|
1857
2074
|
};
|
|
1858
2075
|
}, "validateFinding");
|
|
1859
2076
|
var support = /* @__PURE__ */ __name((value, evidence, field) => {
|
|
1860
|
-
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((
|
|
2077
|
+
if (!Array.isArray(value) || value.length < 1 || value.length > 8 || value.some((ref2) => typeof ref2 !== "string" || !evidence.some((item) => item.reference === ref2)))
|
|
1861
2078
|
return invalid3(`${field} lists 1\u20138 references this finding's evidence cites, as plain strings such as ["<reference>"], not evidence objects`);
|
|
1862
2079
|
return [...new Set(value)].sort();
|
|
1863
2080
|
}, "support");
|
|
@@ -1877,7 +2094,7 @@ var validateBatch = /* @__PURE__ */ __name((input, rules, most, one) => {
|
|
|
1877
2094
|
var validateFindings = /* @__PURE__ */ __name((input, rules) => validateBatch(input, rules, 16, (finding, ids2) => validateFinding(finding, rules, ids2)), "validateFindings");
|
|
1878
2095
|
var findingFingerprint = /* @__PURE__ */ __name(({ id: _id, ...finding }) => findingHash(finding), "findingFingerprint");
|
|
1879
2096
|
|
|
1880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/findings.js
|
|
1881
2098
|
var MEETING_FINDINGS_KIND = "meeting_findings";
|
|
1882
2099
|
var cue = /* @__PURE__ */ __name((raw) => {
|
|
1883
2100
|
const reference2 = canonicalMeetingReference(raw);
|
|
@@ -1888,151 +2105,29 @@ var cue = /* @__PURE__ */ __name((raw) => {
|
|
|
1888
2105
|
var validateMeetingFindings = /* @__PURE__ */ __name((input) => validateFindings(input, { plural: "meeting findings", singular: "meeting finding", cited: "cue", reference: cue }), "validateMeetingFindings");
|
|
1889
2106
|
var meetingFindingFingerprint = findingFingerprint;
|
|
1890
2107
|
|
|
1891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1892
|
-
var
|
|
1893
|
-
|
|
1894
|
-
|
|
2108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2109
|
+
var LATIN_WORDS = {
|
|
2110
|
+
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2111
|
+
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
2112
|
+
de: ["der", "und", "ist", "nicht", "das", "ich", "wir", "mit", "auch", "ein"],
|
|
2113
|
+
fr: ["le", "les", "est", "une", "pas", "je", "vous", "nous", "avec", "mais"],
|
|
2114
|
+
it: ["gli", "della", "sono", "perch\xE9", "anche", "questo", "molto", "che", "di", "\xE8"],
|
|
2115
|
+
pt: ["n\xE3o", "voc\xEA", "isso", "muito", "ent\xE3o", "com", "uma", "tamb\xE9m", "mas", "eu"]
|
|
1895
2116
|
};
|
|
1896
|
-
var
|
|
1897
|
-
var
|
|
1898
|
-
var
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
var
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
{
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
example: "text:budget",
|
|
1911
|
-
relation: "a passage with the word in any form, or a spelling speech recognition garbled",
|
|
1912
|
-
validate: near
|
|
1913
|
-
},
|
|
1914
|
-
{
|
|
1915
|
-
name: "exact",
|
|
1916
|
-
type: "txt",
|
|
1917
|
-
operators: words,
|
|
1918
|
-
example: "exact:budget",
|
|
1919
|
-
relation: "a passage with the word as typed: no other forms, no garbled spellings",
|
|
1920
|
-
validate: near
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
name: "from",
|
|
1924
|
-
type: "kw",
|
|
1925
|
-
operators: words,
|
|
1926
|
-
example: 'from:"Alice Synthetic"',
|
|
1927
|
-
relation: "a line said or a chat message written by this person; attendance is --identity-id"
|
|
1928
|
-
}
|
|
1929
|
-
]
|
|
1930
|
-
});
|
|
1931
|
-
var MEETING_FIELDS = defineQuery({
|
|
1932
|
-
entity: "meeting_hit",
|
|
1933
|
-
backend: "sql",
|
|
1934
|
-
fields: [
|
|
1935
|
-
...MEETING_HIT_QUERY.fields,
|
|
1936
|
-
{
|
|
1937
|
-
name: "date",
|
|
1938
|
-
type: "time",
|
|
1939
|
-
operators: ["term", "range"],
|
|
1940
|
-
example: "date>=30d",
|
|
1941
|
-
relation: "meetings that started then; the same as --since-time and --until-time"
|
|
1942
|
-
},
|
|
1943
|
-
...["project", "tag", "topic"].map((name) => ({
|
|
1944
|
-
name,
|
|
1945
|
-
type: "kw",
|
|
1946
|
-
operators: words,
|
|
1947
|
-
example: `${name}:"Example name"`,
|
|
1948
|
-
relation: `meetings in this ${name}, by name or alias; the same as --${name}`
|
|
1949
|
-
}))
|
|
1950
|
-
]
|
|
1951
|
-
});
|
|
1952
|
-
var LIFTED = /* @__PURE__ */ new Set(["date", "project", "tag", "topic"]);
|
|
1953
|
-
var MEETING_FIELD_NAMES = new Set(MEETING_FIELDS.fields.map(({ name }) => name));
|
|
1954
|
-
var liftMeetingFields = /* @__PURE__ */ __name((query, request, now, timezone) => {
|
|
1955
|
-
let ast;
|
|
1956
|
-
try {
|
|
1957
|
-
ast = validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_FIELDS, context);
|
|
1958
|
-
} catch (error) {
|
|
1959
|
-
if (error instanceof CliError)
|
|
1960
|
-
return { query, request };
|
|
1961
|
-
throw error;
|
|
1962
|
-
}
|
|
1963
|
-
const top = ast.root.kind === "boolean" ? ast.root.clauses : [{ occur: "must", node: ast.root }];
|
|
1964
|
-
const lifted = top.filter((clause) => clause.node.kind === "predicate" && LIFTED.has(clause.node.field));
|
|
1965
|
-
const misplaced = /* @__PURE__ */ __name((node, nested) => node.kind === "predicate" ? nested && LIFTED.has(node.field) ? node : void 0 : node.clauses.map((clause) => misplaced(clause.node, true)).find(Boolean), "misplaced");
|
|
1966
|
-
const wrong = lifted.find((clause) => clause.occur !== "must")?.node ?? top.map((clause) => clause.node.kind === "boolean" ? misplaced(clause.node, true) : void 0).find(Boolean);
|
|
1967
|
-
if (wrong)
|
|
1968
|
-
queryError("query.unsupported-field", wrong.span, `${wrong.field}: chooses meetings; join it to the words with AND, outside OR, NOT and groups`, context);
|
|
1969
|
-
if (!lifted.length)
|
|
1970
|
-
return { query, request };
|
|
1971
|
-
const next = { ...request };
|
|
1972
|
-
const once = /* @__PURE__ */ __name((name, flag2) => {
|
|
1973
|
-
if (next[name] !== void 0)
|
|
1974
|
-
throw new CliError("validation_error", `give ${flag2.replace(/^--/, "")} once: as ${flag2} or in the query`);
|
|
1975
|
-
}, "once");
|
|
1976
|
-
for (const { node } of lifted) {
|
|
1977
|
-
if (node.field === "date") {
|
|
1978
|
-
const range = dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.lower_inclusive !== false, node.upper_inclusive !== false, timezoneOf(timezone), node.span, now);
|
|
1979
|
-
if (range.lower !== void 0) {
|
|
1980
|
-
once("since", "--since-time");
|
|
1981
|
-
next.since = range.lower + (range.lower_inclusive ? 0 : 1);
|
|
1982
|
-
}
|
|
1983
|
-
if (range.upper !== void 0) {
|
|
1984
|
-
once("until", "--until-time");
|
|
1985
|
-
next.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
1986
|
-
}
|
|
1987
|
-
} else {
|
|
1988
|
-
const field = node.field;
|
|
1989
|
-
once(field, `--${field}`);
|
|
1990
|
-
next[field] = node.value;
|
|
1991
|
-
}
|
|
1992
|
-
}
|
|
1993
|
-
let rest = query;
|
|
1994
|
-
for (const { node } of [...lifted].sort((a, b) => b.node.span.start - a.node.span.start))
|
|
1995
|
-
rest = `${rest.slice(0, node.span.start)}${rest.slice(node.span.end)}`;
|
|
1996
|
-
rest = rest.replace(/(^|\s)\+(?=\s|$)/g, "$1").replace(/^(?:\s*(?:AND\b|&&))+|(?:(?:\bAND|&&)\s*)+$/g, "").replace(/(?:\bAND|&&)(\s+(?:AND\b|&&))+/g, "AND").trim();
|
|
1997
|
-
if (!rest)
|
|
1998
|
-
throw new CliError("validation_error", "give words to find besides date:, project:, tag: and topic:");
|
|
1999
|
-
return { query: rest, request: next };
|
|
2000
|
-
}, "liftMeetingFields");
|
|
2001
|
-
var parseMeetingQuery = /* @__PURE__ */ __name((query) => validateQuery(parseLucene(query, { defaultField: "text", proximity: true, ...context }), MEETING_HIT_QUERY, context), "parseMeetingQuery");
|
|
2002
|
-
var meetingWordsQuery = /* @__PURE__ */ __name((text7) => {
|
|
2003
|
-
const found = text7.match(/[\p{L}\p{N}\p{M}]+/gu) ?? [];
|
|
2004
|
-
const span = { start: 0, end: text7.length };
|
|
2005
|
-
const clauses = found.map((value) => ({
|
|
2006
|
-
occur: "must",
|
|
2007
|
-
node: { kind: "predicate", field: "text", operator: "term", value, span }
|
|
2008
|
-
}));
|
|
2009
|
-
const root = clauses.length === 1 && clauses[0] ? clauses[0].node : { kind: "boolean", clauses, span };
|
|
2010
|
-
return { version: 1, language: "lucene-v1", root };
|
|
2011
|
-
}, "meetingWordsQuery");
|
|
2012
|
-
|
|
2013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/meetings/language.js
|
|
2014
|
-
var LATIN_WORDS = {
|
|
2015
|
-
en: ["the", "and", "is", "that", "you", "this", "what", "have", "with", "are"],
|
|
2016
|
-
es: ["el", "los", "las", "por", "pero", "para", "est\xE1", "muy", "tambi\xE9n", "hay"],
|
|
2017
|
-
de: ["der", "und", "ist", "nicht", "das", "ich", "wir", "mit", "auch", "ein"],
|
|
2018
|
-
fr: ["le", "les", "est", "une", "pas", "je", "vous", "nous", "avec", "mais"],
|
|
2019
|
-
it: ["gli", "della", "sono", "perch\xE9", "anche", "questo", "molto", "che", "di", "\xE8"],
|
|
2020
|
-
pt: ["n\xE3o", "voc\xEA", "isso", "muito", "ent\xE3o", "com", "uma", "tamb\xE9m", "mas", "eu"]
|
|
2021
|
-
};
|
|
2022
|
-
var LATIN_LANGUAGE = new Map(Object.entries(LATIN_WORDS).flatMap(([language, words2]) => words2.map((word) => [word, language])));
|
|
2023
|
-
var UKRAINIAN = /[іїєґ]/giu;
|
|
2024
|
-
var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
|
|
2025
|
-
var LATIN = new RegExp("\\p{Script=Latin}", "gu");
|
|
2026
|
-
var MIN_LETTERS = 20;
|
|
2027
|
-
var DOMINANT = 0.75;
|
|
2028
|
-
var countOf = /* @__PURE__ */ __name((text7, pattern) => text7.match(pattern)?.length ?? 0, "countOf");
|
|
2029
|
-
var latinLanguage = /* @__PURE__ */ __name((texts) => {
|
|
2030
|
-
const votes = /* @__PURE__ */ new Map();
|
|
2031
|
-
for (const text7 of texts)
|
|
2032
|
-
for (const word of text7.toLowerCase().split(/[^\p{L}]+/u)) {
|
|
2033
|
-
const language = LATIN_LANGUAGE.get(word);
|
|
2034
|
-
if (language)
|
|
2035
|
-
votes.set(language, (votes.get(language) ?? 0) + 1);
|
|
2117
|
+
var LATIN_LANGUAGE = new Map(Object.entries(LATIN_WORDS).flatMap(([language, words2]) => words2.map((word2) => [word2, language])));
|
|
2118
|
+
var UKRAINIAN = /[іїєґ]/giu;
|
|
2119
|
+
var CYRILLIC = new RegExp("\\p{Script=Cyrillic}", "gu");
|
|
2120
|
+
var LATIN = new RegExp("\\p{Script=Latin}", "gu");
|
|
2121
|
+
var MIN_LETTERS = 20;
|
|
2122
|
+
var DOMINANT = 0.75;
|
|
2123
|
+
var countOf = /* @__PURE__ */ __name((text7, pattern) => text7.match(pattern)?.length ?? 0, "countOf");
|
|
2124
|
+
var latinLanguage = /* @__PURE__ */ __name((texts) => {
|
|
2125
|
+
const votes = /* @__PURE__ */ new Map();
|
|
2126
|
+
for (const text7 of texts)
|
|
2127
|
+
for (const word2 of text7.toLowerCase().split(/[^\p{L}]+/u)) {
|
|
2128
|
+
const language = LATIN_LANGUAGE.get(word2);
|
|
2129
|
+
if (language)
|
|
2130
|
+
votes.set(language, (votes.get(language) ?? 0) + 1);
|
|
2036
2131
|
}
|
|
2037
2132
|
const [first, second] = [...votes].sort((a, b) => b[1] - a[1]);
|
|
2038
2133
|
if (!first || first[1] < 3 || second && first[1] < 2 * second[1])
|
|
@@ -2059,7 +2154,7 @@ var transcriptLanguage = /* @__PURE__ */ __name((texts) => {
|
|
|
2059
2154
|
return null;
|
|
2060
2155
|
}, "transcriptLanguage");
|
|
2061
2156
|
|
|
2062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/ingest.js
|
|
2063
2158
|
var contentHash = /* @__PURE__ */ __name(async (text7) => {
|
|
2064
2159
|
const bytes = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text7));
|
|
2065
2160
|
return Array.from(new Uint8Array(bytes), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
@@ -2067,8 +2162,8 @@ var contentHash = /* @__PURE__ */ __name(async (text7) => {
|
|
|
2067
2162
|
var speakerPosition = /* @__PURE__ */ __name((name, participants) => {
|
|
2068
2163
|
if (name === null)
|
|
2069
2164
|
return null;
|
|
2070
|
-
const
|
|
2071
|
-
return
|
|
2165
|
+
const matches = participants.flatMap((p, i) => p.displayName === name ? [i] : []);
|
|
2166
|
+
return matches.length === 1 ? matches[0] ?? null : null;
|
|
2072
2167
|
}, "speakerPosition");
|
|
2073
2168
|
var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source, hashText = JSON.stringify(lines), format = null) => ({
|
|
2074
2169
|
source,
|
|
@@ -2090,13 +2185,13 @@ var transcriptInput = /* @__PURE__ */ __name(async (lines, participants, source,
|
|
|
2090
2185
|
}))
|
|
2091
2186
|
}), "transcriptInput");
|
|
2092
2187
|
var timestamp2 = /* @__PURE__ */ __name((value) => {
|
|
2093
|
-
const
|
|
2094
|
-
if (!Number.isFinite(
|
|
2188
|
+
const time = Date.parse(value);
|
|
2189
|
+
if (!Number.isFinite(time))
|
|
2095
2190
|
throw new Error("Invalid meeting timestamp");
|
|
2096
|
-
return
|
|
2191
|
+
return time;
|
|
2097
2192
|
}, "timestamp");
|
|
2098
2193
|
|
|
2099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/transcript-text.js
|
|
2100
2195
|
var TranscriptTextError = class extends Error {
|
|
2101
2196
|
static {
|
|
2102
2197
|
__name(this, "TranscriptTextError");
|
|
@@ -2151,7 +2246,7 @@ var parseTranscriptText = /* @__PURE__ */ __name((input) => {
|
|
|
2151
2246
|
return { header, lines };
|
|
2152
2247
|
}, "parseTranscriptText");
|
|
2153
2248
|
|
|
2154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/vtt.js
|
|
2155
2250
|
var VttError = class extends Error {
|
|
2156
2251
|
static {
|
|
2157
2252
|
__name(this, "VttError");
|
|
@@ -2164,8 +2259,8 @@ var millis = /* @__PURE__ */ __name((stamp, lineNo) => {
|
|
|
2164
2259
|
const match = TIMESTAMP.exec(stamp);
|
|
2165
2260
|
if (!match)
|
|
2166
2261
|
throw new VttError(`line ${lineNo}: "${stamp}" is not a WebVTT timestamp`);
|
|
2167
|
-
const [, hours = "0", minutes = "0", seconds = "0",
|
|
2168
|
-
return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(
|
|
2262
|
+
const [, hours = "0", minutes = "0", seconds = "0", ms2 = "0"] = match;
|
|
2263
|
+
return ((Number(hours) * 60 + Number(minutes)) * 60 + Number(seconds)) * 1e3 + Number(ms2);
|
|
2169
2264
|
}, "millis");
|
|
2170
2265
|
var splitSpeaker = /* @__PURE__ */ __name((text7) => {
|
|
2171
2266
|
const firstLine = text7.split("\n", 1)[0] ?? "";
|
|
@@ -2203,7 +2298,7 @@ var parseVtt = /* @__PURE__ */ __name((input) => {
|
|
|
2203
2298
|
return cues;
|
|
2204
2299
|
}, "parseVtt");
|
|
2205
2300
|
|
|
2206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/import.js
|
|
2207
2302
|
var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now()) => {
|
|
2208
2303
|
const report = { meetings: 0, participants: 0, transcriptRows: 0, summaries: 0, warnings: [] };
|
|
2209
2304
|
for (const file of files) {
|
|
@@ -2236,10 +2331,10 @@ var importFiles = /* @__PURE__ */ __name(async (files, store, now = Date.now())
|
|
|
2236
2331
|
return report;
|
|
2237
2332
|
}, "importFiles");
|
|
2238
2333
|
|
|
2239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/links.js
|
|
2240
2335
|
var CHAT_MESSAGES_READ = 1e5;
|
|
2241
2336
|
|
|
2242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/provider.js
|
|
2243
2338
|
var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
2244
2339
|
const provider = scope2?.provider;
|
|
2245
2340
|
const account = scope2?.account;
|
|
@@ -2248,56 +2343,18 @@ var snapshotMeetingScope = /* @__PURE__ */ __name((scope2) => {
|
|
|
2248
2343
|
return Object.freeze({ provider, account });
|
|
2249
2344
|
}, "snapshotMeetingScope");
|
|
2250
2345
|
|
|
2251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2252
|
-
var
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
if (create && result.title === void 0)
|
|
2264
|
-
throw new CliError("validation_error", "meeting title is required");
|
|
2265
|
-
if (change.kind !== void 0) {
|
|
2266
|
-
if (change.kind !== "instant" && change.kind !== "scheduled")
|
|
2267
|
-
throw new CliError("validation_error", "only instant or scheduled meeting kinds are supported");
|
|
2268
|
-
result.kind = change.kind;
|
|
2269
|
-
}
|
|
2270
|
-
if (change.startTime !== void 0) {
|
|
2271
|
-
result.startTime = meetingTimestamp(change.startTime, "meeting start");
|
|
2272
|
-
}
|
|
2273
|
-
if (change.durationMinutes !== void 0) {
|
|
2274
|
-
if (!Number.isSafeInteger(change.durationMinutes) || change.durationMinutes <= 0 || change.durationMinutes > 1440)
|
|
2275
|
-
throw new CliError("validation_error", "meeting duration must be an integer from 1 to 1440 minutes");
|
|
2276
|
-
result.durationMinutes = change.durationMinutes;
|
|
2277
|
-
}
|
|
2278
|
-
if (change.timezone !== void 0) {
|
|
2279
|
-
if (typeof change.timezone !== "string" || !change.timezone.trim())
|
|
2280
|
-
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
2281
|
-
try {
|
|
2282
|
-
new Intl.DateTimeFormat("en", { timeZone: change.timezone }).format();
|
|
2283
|
-
} catch {
|
|
2284
|
-
throw new CliError("validation_error", "meeting timezone must be a valid IANA timezone");
|
|
2285
|
-
}
|
|
2286
|
-
result.timezone = change.timezone;
|
|
2287
|
-
}
|
|
2288
|
-
if (change.agenda !== void 0) {
|
|
2289
|
-
if (typeof change.agenda !== "string")
|
|
2290
|
-
throw new CliError("validation_error", "meeting agenda must be text");
|
|
2291
|
-
result.agenda = change.agenda;
|
|
2292
|
-
}
|
|
2293
|
-
if (create) {
|
|
2294
|
-
result.kind ??= "scheduled";
|
|
2295
|
-
if (result.kind === "scheduled" && result.startTime === void 0)
|
|
2296
|
-
throw new CliError("validation_error", "scheduled meeting start is required");
|
|
2297
|
-
} else if (!Object.keys(result).length)
|
|
2298
|
-
throw new CliError("validation_error", "at least one meeting change is required");
|
|
2299
|
-
return Object.freeze(result);
|
|
2300
|
-
}, "validateMeetingChange");
|
|
2346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/meeting-management.js
|
|
2347
|
+
var MEETING_FIELD_KEYS = Object.freeze({
|
|
2348
|
+
title: "title",
|
|
2349
|
+
kind: "kind",
|
|
2350
|
+
startTime: "start_time",
|
|
2351
|
+
durationMinutes: "duration_minutes",
|
|
2352
|
+
timezone: "timezone",
|
|
2353
|
+
agenda: "agenda"
|
|
2354
|
+
});
|
|
2355
|
+
var MEETING_FIELDS2 = Object.freeze(Object.keys(MEETING_FIELD_KEYS));
|
|
2356
|
+
var meetingFieldFlag = /* @__PURE__ */ __name((field) => `--${MEETING_FIELD_KEYS[field].replaceAll("_", "-")}`, "meetingFieldFlag");
|
|
2357
|
+
var SNAKE_CASE = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/;
|
|
2301
2358
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
2302
2359
|
if (!signal?.aborted)
|
|
2303
2360
|
return;
|
|
@@ -2307,15 +2364,19 @@ var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
2307
2364
|
throw new CliError(timeout ? "timeout" : "cancelled", timeout ? "meeting operation timed out" : "meeting operation cancelled");
|
|
2308
2365
|
}, "checkCancelled");
|
|
2309
2366
|
var dispatchMeetingMutation = /* @__PURE__ */ __name(async (options, dispatch) => {
|
|
2310
|
-
const { apply, dryRun, signal } = options;
|
|
2367
|
+
const { apply, dryRun, signal, confirm } = options;
|
|
2311
2368
|
checkCancelled(signal);
|
|
2312
2369
|
if (apply !== true || dryRun)
|
|
2313
2370
|
return { applied: false };
|
|
2371
|
+
if (confirm) {
|
|
2372
|
+
await confirm();
|
|
2373
|
+
checkCancelled(signal);
|
|
2374
|
+
}
|
|
2314
2375
|
return { applied: true, value: await dispatch(signal) };
|
|
2315
2376
|
}, "dispatchMeetingMutation");
|
|
2316
2377
|
|
|
2317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2318
|
-
var
|
|
2378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/meeting-context.js
|
|
2379
|
+
var id2 = /* @__PURE__ */ __name((value) => {
|
|
2319
2380
|
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1)
|
|
2320
2381
|
throw new CliError("validation_error", "meeting context identifiers must be positive integers");
|
|
2321
2382
|
return value;
|
|
@@ -2385,8 +2446,8 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
|
2385
2446
|
case "event.link":
|
|
2386
2447
|
return Object.freeze({
|
|
2387
2448
|
action: change.action,
|
|
2388
|
-
eventId: change.eventId === null ? null :
|
|
2389
|
-
...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null :
|
|
2449
|
+
eventId: change.eventId === null ? null : id2(change.eventId),
|
|
2450
|
+
...change.expectedEventId === void 0 ? {} : { expectedEventId: change.expectedEventId === null ? null : id2(change.expectedEventId) }
|
|
2390
2451
|
});
|
|
2391
2452
|
case "person.link": {
|
|
2392
2453
|
const targets = change.targetAccountIds;
|
|
@@ -2394,9 +2455,9 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
|
2394
2455
|
throw new CliError("validation_error", "target accounts must contain 1\u20131000 identifiers");
|
|
2395
2456
|
return Object.freeze({
|
|
2396
2457
|
action: change.action,
|
|
2397
|
-
participantId:
|
|
2458
|
+
participantId: id2(change.participantId),
|
|
2398
2459
|
personUid: uid(change.personUid),
|
|
2399
|
-
...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(
|
|
2460
|
+
...targets === void 0 ? {} : { targetAccountIds: Object.freeze([...new Set(targets.map(id2))]) },
|
|
2400
2461
|
...change.expectedPersonUid === void 0 ? {} : { expectedPersonUid: change.expectedPersonUid === null ? null : uid(change.expectedPersonUid) }
|
|
2401
2462
|
});
|
|
2402
2463
|
}
|
|
@@ -2404,7 +2465,7 @@ var validateMeetingContextChange = /* @__PURE__ */ __name((change) => {
|
|
|
2404
2465
|
}, "validateMeetingContextChange");
|
|
2405
2466
|
var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) => {
|
|
2406
2467
|
const fixed = snapshotMeetingScope(scope2);
|
|
2407
|
-
const account =
|
|
2468
|
+
const account = id2(accountId);
|
|
2408
2469
|
const actions = Object.freeze([...new Set(ports.actions)]);
|
|
2409
2470
|
if (actions.some((action) => !Object.hasOwn(fields, action)))
|
|
2410
2471
|
throw new CliError("validation_error", "unsupported meeting context capability");
|
|
@@ -2414,7 +2475,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
|
|
|
2414
2475
|
accountId: account,
|
|
2415
2476
|
actions,
|
|
2416
2477
|
async change(meetingId, input, options = {}) {
|
|
2417
|
-
const target =
|
|
2478
|
+
const target = id2(meetingId);
|
|
2418
2479
|
const change = validateMeetingContextChange(input);
|
|
2419
2480
|
if (!actions.includes(change.action))
|
|
2420
2481
|
throw new CliError("provider_unavailable", `meeting context does not support ${change.action}`);
|
|
@@ -2436,7 +2497,7 @@ var createMeetingContext = /* @__PURE__ */ __name((scope2, accountId, ports) =>
|
|
|
2436
2497
|
};
|
|
2437
2498
|
}, "createMeetingContext");
|
|
2438
2499
|
|
|
2439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/preparation-context.js
|
|
2440
2501
|
var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
2441
2502
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
2442
2503
|
throw new CliError("validation_error", "meeting preparation context is required");
|
|
@@ -2461,43 +2522,43 @@ var validateMeetingPreparationContext = /* @__PURE__ */ __name((original) => {
|
|
|
2461
2522
|
return { ...input, limit, maxReadBytes };
|
|
2462
2523
|
}, "validateMeetingPreparationContext");
|
|
2463
2524
|
|
|
2464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2465
|
-
var
|
|
2466
|
-
var
|
|
2525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-answer.js
|
|
2526
|
+
var count5 = pipe(number(), integer(), minValue(0));
|
|
2527
|
+
var id3 = pipe(string(), minLength(1));
|
|
2467
2528
|
var meetingProjectEvidence = strictObject({
|
|
2468
2529
|
schema_version: literal(1),
|
|
2469
2530
|
kind: literal("meeting_project_evidence"),
|
|
2470
|
-
account_id:
|
|
2531
|
+
account_id: id3,
|
|
2471
2532
|
query: string(),
|
|
2472
|
-
project: strictObject({ id:
|
|
2533
|
+
project: strictObject({ id: id3, name: string(), key: nullable(string()) }),
|
|
2473
2534
|
term: strictObject({
|
|
2474
2535
|
name: string(),
|
|
2475
2536
|
kind: picklist(["canonical", "key", "alias"]),
|
|
2476
|
-
alias_id: optional(
|
|
2537
|
+
alias_id: optional(id3)
|
|
2477
2538
|
}),
|
|
2478
2539
|
hits: array(meetingHit),
|
|
2479
2540
|
association: literal("unconfirmed-word-evidence"),
|
|
2480
|
-
vocabulary_fingerprint:
|
|
2541
|
+
vocabulary_fingerprint: id3,
|
|
2481
2542
|
selection: strictObject({
|
|
2482
|
-
meeting_id: optional(
|
|
2483
|
-
identity_id: optional(
|
|
2484
|
-
person_id: optional(
|
|
2485
|
-
tag_id: optional(
|
|
2486
|
-
event_id: optional(
|
|
2487
|
-
series_id: optional(
|
|
2543
|
+
meeting_id: optional(id3),
|
|
2544
|
+
identity_id: optional(id3),
|
|
2545
|
+
person_id: optional(id3),
|
|
2546
|
+
tag_id: optional(id3),
|
|
2547
|
+
event_id: optional(id3),
|
|
2548
|
+
series_id: optional(id3),
|
|
2488
2549
|
since: optional(isoTime),
|
|
2489
2550
|
until: optional(isoTime)
|
|
2490
2551
|
}),
|
|
2491
|
-
limits: strictObject({ limit:
|
|
2552
|
+
limits: strictObject({ limit: count5, max_read_bytes: count5, max_vocabulary_read_bytes: count5, max_terms: count5 }),
|
|
2492
2553
|
page: pageSchema,
|
|
2493
2554
|
coverage: strictObject({
|
|
2494
2555
|
archive_completeness: literal("unknown"),
|
|
2495
2556
|
current_revisions: literal(true),
|
|
2496
2557
|
indexing: picklist(["ready", "pending"]),
|
|
2497
2558
|
index_completeness: literal("unknown"),
|
|
2498
|
-
term_index:
|
|
2499
|
-
terms_total:
|
|
2500
|
-
remaining_terms:
|
|
2559
|
+
term_index: count5,
|
|
2560
|
+
terms_total: count5,
|
|
2561
|
+
remaining_terms: count5,
|
|
2501
2562
|
duplicates: literal("may-repeat-between-terms")
|
|
2502
2563
|
})
|
|
2503
2564
|
});
|
|
@@ -2582,7 +2643,7 @@ var meetingProjectEvidenceAnswer = /* @__PURE__ */ __name((page, prepared, comma
|
|
|
2582
2643
|
};
|
|
2583
2644
|
}, "meetingProjectEvidenceAnswer");
|
|
2584
2645
|
|
|
2585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/search-validation.js
|
|
2586
2647
|
var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
2587
2648
|
const integer3 = /* @__PURE__ */ __name((value, low, high) => Number.isSafeInteger(value) && value >= low && value <= high, "integer");
|
|
2588
2649
|
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) || [
|
|
@@ -2602,7 +2663,7 @@ var validateMeetingHitSearch = /* @__PURE__ */ __name((query, options = {}) => {
|
|
|
2602
2663
|
throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
|
|
2603
2664
|
}, "validateMeetingHitSearch");
|
|
2604
2665
|
|
|
2605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/project-evidence-query.js
|
|
2606
2667
|
var ids = {
|
|
2607
2668
|
meeting_id: "meetingId",
|
|
2608
2669
|
identity_id: "participantIdentityId",
|
|
@@ -2638,8 +2699,8 @@ var MEETING_PROJECT_EVIDENCE_QUERY = defineQuery({
|
|
|
2638
2699
|
]
|
|
2639
2700
|
});
|
|
2640
2701
|
var requestKeys = /* @__PURE__ */ new Set(["query", "limit", "cursor", "maxReadBytes", "signal"]);
|
|
2641
|
-
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((
|
|
2642
|
-
if (!request || typeof request !== "object" || Array.isArray(request) || Object.keys(request).some((key) => !requestKeys.has(key)) || typeof
|
|
2702
|
+
var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project, request = {}, now = Date.now()) => {
|
|
2703
|
+
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")
|
|
2643
2704
|
throw new CliError("validation_error", "expected an existing project and bounded evidence arguments");
|
|
2644
2705
|
if (request.query !== void 0 && new TextEncoder().encode(request.query).byteLength > 8192 || [request.limit, request.maxReadBytes].some((value) => value !== void 0 && typeof value !== "number"))
|
|
2645
2706
|
throw new CliError("validation_error", "invalid project evidence query or budget");
|
|
@@ -2687,21 +2748,21 @@ var prepareMeetingProjectEvidence = /* @__PURE__ */ __name((project2, request =
|
|
|
2687
2748
|
options.until = range.upper - (range.upper_inclusive ? 0 : 1);
|
|
2688
2749
|
frozen.push(`started_at:[${options.since === void 0 ? "*" : `"${new Date(options.since).toISOString()}"`} TO ${options.until === void 0 ? "*" : `"${new Date(options.until).toISOString()}"`}]`);
|
|
2689
2750
|
}
|
|
2690
|
-
validateMeetingHitSearch(
|
|
2751
|
+
validateMeetingHitSearch(project, options);
|
|
2691
2752
|
if (options.cursor !== void 0 && (typeof options.cursor !== "string" || !/^[A-Za-z0-9_-]{1,4096}$/.test(options.cursor)))
|
|
2692
2753
|
throw new CliError("validation_error", "invalid project evidence cursor");
|
|
2693
|
-
return { project:
|
|
2754
|
+
return { project: project.trim(), options, query: frozen.join(" AND ") };
|
|
2694
2755
|
}, "prepareMeetingProjectEvidence");
|
|
2695
2756
|
|
|
2696
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2697
|
-
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read,
|
|
2698
|
-
const prepared = prepareMeetingProjectEvidence(
|
|
2757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/project-evidence.js
|
|
2758
|
+
var readMeetingProjectEvidence = /* @__PURE__ */ __name(async (read, project, request = {}, now = Date.now()) => {
|
|
2759
|
+
const prepared = prepareMeetingProjectEvidence(project, request, now);
|
|
2699
2760
|
const page = await read(prepared.project, prepared.options);
|
|
2700
2761
|
prepared.options.signal?.throwIfAborted();
|
|
2701
2762
|
return meetingProjectEvidenceAnswer(page, prepared);
|
|
2702
2763
|
}, "readMeetingProjectEvidence");
|
|
2703
2764
|
|
|
2704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/pull.js
|
|
2705
2766
|
var participantInput = /* @__PURE__ */ __name((p, provider, occurrenceId2, position, accountId) => {
|
|
2706
2767
|
const { identityExternalId, phone, ...fields2 } = p;
|
|
2707
2768
|
const externalId = identityExternalId ?? (p.email ? `email:${p.email.toLowerCase()}` : p.externalId) ?? `name:${p.displayName ?? "unknown"}@${accountId}/${occurrenceId2}:${position}`;
|
|
@@ -2757,9 +2818,9 @@ var sourceMeetingInput = /* @__PURE__ */ __name((m, accountId, participantsCount
|
|
|
2757
2818
|
};
|
|
2758
2819
|
return meeting2;
|
|
2759
2820
|
}, "sourceMeetingInput");
|
|
2760
|
-
var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m,
|
|
2821
|
+
var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts, { accountId, now, kept }) => {
|
|
2761
2822
|
const id5 = m.occurrence.id;
|
|
2762
|
-
const { participants: sourceParticipants, transcript: lines, chat, summary } =
|
|
2823
|
+
const { participants: sourceParticipants, transcript: lines, chat, summary } = parts;
|
|
2763
2824
|
const participants = participantInputs(source.provider, id5, sourceParticipants ?? [], accountId);
|
|
2764
2825
|
const meeting2 = sourceMeetingInput(m, accountId, sourceParticipants === void 0 ? void 0 : sourceParticipants?.length ?? null, kept);
|
|
2765
2826
|
const linked = sourceParticipants !== void 0;
|
|
@@ -2790,8 +2851,8 @@ var saveSourceMeeting = /* @__PURE__ */ __name(async (source, store, m, parts2,
|
|
|
2790
2851
|
metadata: summary.metadata ?? null
|
|
2791
2852
|
}
|
|
2792
2853
|
] : void 0,
|
|
2793
|
-
attachments:
|
|
2794
|
-
documents:
|
|
2854
|
+
attachments: parts.files ?? void 0,
|
|
2855
|
+
documents: parts.documents ?? void 0,
|
|
2795
2856
|
now
|
|
2796
2857
|
});
|
|
2797
2858
|
if (lines && !linked && !details.transcripts.some((t) => t.transcript.source === source.name && t.transcript.supersededAt === null))
|
|
@@ -2810,11 +2871,11 @@ var startOf = /* @__PURE__ */ __name((m) => {
|
|
|
2810
2871
|
}, "startOf");
|
|
2811
2872
|
var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
2812
2873
|
const now = options.now ?? Date.now();
|
|
2813
|
-
for (const [name,
|
|
2874
|
+
for (const [name, ms2] of [
|
|
2814
2875
|
["lookbackMs", options.lookbackMs ?? 0],
|
|
2815
2876
|
["overlapMs", source.overlapMs ?? 0]
|
|
2816
2877
|
])
|
|
2817
|
-
if (!Number.isSafeInteger(
|
|
2878
|
+
if (!Number.isSafeInteger(ms2) || ms2 < 0 || ms2 > 31 * 864e5)
|
|
2818
2879
|
throw new Error(`${name} must be an integer from 0 through 31 days`);
|
|
2819
2880
|
const lookbackMs = Math.max(options.lookbackMs ?? 0, source.overlapMs ?? 0);
|
|
2820
2881
|
const cursor = options.rescan ? void 0 : await store.cursor(options.accountId);
|
|
@@ -2901,23 +2962,23 @@ var pull = /* @__PURE__ */ __name(async (source, store, options) => {
|
|
|
2901
2962
|
return report;
|
|
2902
2963
|
}, "pull");
|
|
2903
2964
|
|
|
2904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/read-answers.js
|
|
2905
2966
|
var text5 = string();
|
|
2906
|
-
var
|
|
2907
|
-
var
|
|
2908
|
-
var
|
|
2967
|
+
var count6 = pipe(number(), integer(), minValue(0));
|
|
2968
|
+
var id4 = pipe(number(), integer(), minValue(1));
|
|
2969
|
+
var iso4 = /* @__PURE__ */ __name((ms2) => ms2 === null ? null : new Date(ms2).toISOString(), "iso");
|
|
2909
2970
|
var meetingReview = strictObject({
|
|
2910
2971
|
ref: reference,
|
|
2911
2972
|
id: pipe(string(), minLength(1)),
|
|
2912
2973
|
title: nullable(text5),
|
|
2913
2974
|
started_at: nullable(isoTime),
|
|
2914
|
-
duration_ms: nullable(
|
|
2915
|
-
participants_count: nullable(
|
|
2975
|
+
duration_ms: nullable(count6),
|
|
2976
|
+
participants_count: nullable(count6),
|
|
2916
2977
|
projects: array(text5),
|
|
2917
2978
|
/** Null when the meeting has no current transcript. */
|
|
2918
|
-
transcript: nullable(strictObject({ lines:
|
|
2979
|
+
transcript: nullable(strictObject({ lines: count6, words: count6 })),
|
|
2919
2980
|
/** The three who talked longest. */
|
|
2920
|
-
speakers: array(strictObject({ name: nullable(text5), talk_ms:
|
|
2981
|
+
speakers: array(strictObject({ name: nullable(text5), talk_ms: count6 })),
|
|
2921
2982
|
/** The newest stored summary; null when there is none. */
|
|
2922
2983
|
summary: nullable(strictObject({
|
|
2923
2984
|
source: text5,
|
|
@@ -2932,7 +2993,7 @@ var meetingLink = strictObject({
|
|
|
2932
2993
|
domain: nullable(text5),
|
|
2933
2994
|
/** The Google Docs, Sheets, Slides, Forms or Drive file it names. */
|
|
2934
2995
|
document_id: nullable(text5),
|
|
2935
|
-
count:
|
|
2996
|
+
count: count6,
|
|
2936
2997
|
first_at: isoTime,
|
|
2937
2998
|
last_at: isoTime,
|
|
2938
2999
|
senders: array(text5),
|
|
@@ -2942,39 +3003,39 @@ var meetingSpeaker = strictObject({
|
|
|
2942
3003
|
/** `person:<id>`, `identity:<id>`, `name:<lowercased name>` or `unknown`. */
|
|
2943
3004
|
key: text5,
|
|
2944
3005
|
name: nullable(text5),
|
|
2945
|
-
person_id: nullable(
|
|
2946
|
-
identity_id: nullable(
|
|
2947
|
-
meetings:
|
|
2948
|
-
lines:
|
|
2949
|
-
words:
|
|
2950
|
-
talk_ms:
|
|
3006
|
+
person_id: nullable(id4),
|
|
3007
|
+
identity_id: nullable(id4),
|
|
3008
|
+
meetings: count6,
|
|
3009
|
+
lines: count6,
|
|
3010
|
+
words: count6,
|
|
3011
|
+
talk_ms: count6,
|
|
2951
3012
|
/** This speaker's part of all talk time, 0–1. */
|
|
2952
3013
|
share: pipe(number(), minValue(0), maxValue(1))
|
|
2953
3014
|
});
|
|
2954
3015
|
var meetingStats = strictObject({
|
|
2955
3016
|
time_zone: text5,
|
|
2956
|
-
meetings:
|
|
2957
|
-
lines:
|
|
2958
|
-
words:
|
|
2959
|
-
talk_ms:
|
|
3017
|
+
meetings: count6,
|
|
3018
|
+
lines: count6,
|
|
3019
|
+
words: count6,
|
|
3020
|
+
talk_ms: count6,
|
|
2960
3021
|
/** `week_start` is the Monday, as a date in `time_zone`. */
|
|
2961
|
-
weeks: array(strictObject({ week_start: text5, meetings:
|
|
3022
|
+
weeks: array(strictObject({ week_start: text5, meetings: count6, talk_ms: count6 })),
|
|
2962
3023
|
top_speakers: array(meetingSpeaker)
|
|
2963
3024
|
});
|
|
2964
3025
|
var meetingCountsRow = strictObject({
|
|
2965
3026
|
key: text5,
|
|
2966
3027
|
name: nullable(text5),
|
|
2967
|
-
meetings:
|
|
2968
|
-
minutes:
|
|
3028
|
+
meetings: count6,
|
|
3029
|
+
minutes: count6,
|
|
2969
3030
|
mean_minutes: nullable(number()),
|
|
2970
|
-
transcripts:
|
|
3031
|
+
transcripts: count6
|
|
2971
3032
|
});
|
|
2972
3033
|
var meetingCounts = strictObject({
|
|
2973
3034
|
by: picklist(["day", "week", "series"]),
|
|
2974
|
-
meetings:
|
|
2975
|
-
minutes:
|
|
3035
|
+
meetings: count6,
|
|
3036
|
+
minutes: count6,
|
|
2976
3037
|
mean_minutes: nullable(number()),
|
|
2977
|
-
transcripts:
|
|
3038
|
+
transcripts: count6,
|
|
2978
3039
|
rows: array(meetingCountsRow),
|
|
2979
3040
|
has_more: boolean()
|
|
2980
3041
|
});
|
|
@@ -2982,27 +3043,28 @@ var truncated = /* @__PURE__ */ __name((...why) => nullable(picklist(why)), "tru
|
|
|
2982
3043
|
var meetingParticipants = strictObject({
|
|
2983
3044
|
schema_version: literal(1),
|
|
2984
3045
|
kind: literal("meeting_participants"),
|
|
2985
|
-
account_id:
|
|
3046
|
+
account_id: id4,
|
|
2986
3047
|
query: text5,
|
|
2987
3048
|
items: array(strictObject({
|
|
2988
|
-
participant_id:
|
|
2989
|
-
meeting_id:
|
|
2990
|
-
identity_id:
|
|
3049
|
+
participant_id: id4,
|
|
3050
|
+
meeting_id: id4,
|
|
3051
|
+
identity_id: id4,
|
|
2991
3052
|
display_name: nullable(text5),
|
|
2992
3053
|
email: nullable(text5),
|
|
2993
|
-
person: nullable(strictObject({ ref: text5, name: nullable(text5) }))
|
|
3054
|
+
person: nullable(strictObject({ ref: text5, name: nullable(text5) })),
|
|
3055
|
+
untrusted: optional(array(text5))
|
|
2994
3056
|
})),
|
|
2995
3057
|
/** Several identities on one page are observations, never speaker attribution or person links. */
|
|
2996
|
-
ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(
|
|
3058
|
+
ambiguity: strictObject({ scope: literal("page"), multiple_identities: boolean(), identity_ids: array(id4) }),
|
|
2997
3059
|
coverage: strictObject({
|
|
2998
|
-
scanned:
|
|
2999
|
-
read_bytes:
|
|
3060
|
+
scanned: count6,
|
|
3061
|
+
read_bytes: count6,
|
|
3000
3062
|
archive_completeness: literal("unknown"),
|
|
3001
3063
|
truncated_by: truncated("limit", "scan_limit", "read_bytes")
|
|
3002
3064
|
}),
|
|
3003
3065
|
page: strictObject({
|
|
3004
3066
|
mode: literal("cursor"),
|
|
3005
|
-
limit:
|
|
3067
|
+
limit: count6,
|
|
3006
3068
|
has_more: boolean(),
|
|
3007
3069
|
next_cursor: optional(text5)
|
|
3008
3070
|
})
|
|
@@ -3016,12 +3078,12 @@ var meetingPassage = strictObject({
|
|
|
3016
3078
|
target_fingerprint: text5,
|
|
3017
3079
|
fingerprint: text5,
|
|
3018
3080
|
revision,
|
|
3019
|
-
limits: strictObject({ before:
|
|
3020
|
-
content_bytes:
|
|
3081
|
+
limits: strictObject({ before: count6, after: count6, bytes: count6, max_read_bytes: count6 }),
|
|
3082
|
+
content_bytes: count6,
|
|
3021
3083
|
coverage: strictObject({
|
|
3022
|
-
included:
|
|
3023
|
-
before:
|
|
3024
|
-
after:
|
|
3084
|
+
included: count6,
|
|
3085
|
+
before: count6,
|
|
3086
|
+
after: count6,
|
|
3025
3087
|
has_before: boolean(),
|
|
3026
3088
|
has_after: boolean(),
|
|
3027
3089
|
truncated_by: truncated("bytes"),
|
|
@@ -3034,15 +3096,17 @@ var meetingPassage = strictObject({
|
|
|
3034
3096
|
items: array(strictObject({
|
|
3035
3097
|
ref: reference,
|
|
3036
3098
|
fingerprint: text5,
|
|
3037
|
-
transcript_id:
|
|
3099
|
+
transcript_id: id4,
|
|
3038
3100
|
content_hash: nullable(text5),
|
|
3039
|
-
position:
|
|
3040
|
-
start_ms:
|
|
3041
|
-
end_ms:
|
|
3042
|
-
speaker_participant_id: nullable(
|
|
3101
|
+
position: count6,
|
|
3102
|
+
start_ms: count6,
|
|
3103
|
+
end_ms: count6,
|
|
3104
|
+
speaker_participant_id: nullable(id4),
|
|
3043
3105
|
speaker_name: nullable(text5),
|
|
3044
3106
|
text: text5,
|
|
3045
|
-
revision
|
|
3107
|
+
revision,
|
|
3108
|
+
/** What people said: `speaker_name` and `text`. */
|
|
3109
|
+
untrusted: optional(array(text5))
|
|
3046
3110
|
}))
|
|
3047
3111
|
});
|
|
3048
3112
|
var event = strictObject({
|
|
@@ -3084,25 +3148,26 @@ var eventItem = /* @__PURE__ */ __name((one) => ({
|
|
|
3084
3148
|
title: one.title,
|
|
3085
3149
|
description: one.description,
|
|
3086
3150
|
location: one.location,
|
|
3087
|
-
starts_at:
|
|
3088
|
-
ends_at:
|
|
3151
|
+
starts_at: iso4(one.startsAt),
|
|
3152
|
+
ends_at: iso4(one.endsAt),
|
|
3089
3153
|
timezone: one.timezone,
|
|
3090
3154
|
origin: one.origin,
|
|
3091
3155
|
status: one.status ?? null,
|
|
3092
3156
|
all_day: one.allDay === true,
|
|
3093
|
-
source_deleted_at:
|
|
3094
|
-
deleted_at:
|
|
3157
|
+
source_deleted_at: iso4(one.sourceDeletedAt ?? null),
|
|
3158
|
+
deleted_at: iso4(one.deletedAt),
|
|
3095
3159
|
created_at: new Date(one.createdAt).toISOString(),
|
|
3096
3160
|
updated_at: new Date(one.updatedAt).toISOString()
|
|
3097
3161
|
}), "eventItem");
|
|
3098
3162
|
|
|
3099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/read-through.js
|
|
3100
3164
|
var MEETING_SERVER_BOUNDS = { calls: 3, pages: 2 };
|
|
3101
3165
|
var ISSUES = {
|
|
3102
3166
|
offline: ["permission_error", "meetings.server-offline"],
|
|
3103
3167
|
unreachable: ["network_error", "meetings.server-unreachable"],
|
|
3104
3168
|
not_signed_in: ["authentication_error", "meetings.server-signed-out"],
|
|
3105
3169
|
refused: ["permission_error", "meetings.server-refused"],
|
|
3170
|
+
rate_limited: ["rate_limited", "meetings.server-rate-limited"],
|
|
3106
3171
|
failed: ["provider_error", "meetings.server-failed"]
|
|
3107
3172
|
};
|
|
3108
3173
|
var metaOf = /* @__PURE__ */ __name((reason, provider) => {
|
|
@@ -3115,6 +3180,7 @@ var WHY = {
|
|
|
3115
3180
|
unreachable: /* @__PURE__ */ __name((provider) => `${provider} could not be reached \u2014 the answer is the store's`, "unreachable"),
|
|
3116
3181
|
not_signed_in: /* @__PURE__ */ __name((provider) => `not signed in to ${provider} \u2014 the answer is the store's`, "not_signed_in"),
|
|
3117
3182
|
refused: /* @__PURE__ */ __name((provider) => `${provider} refused the request \u2014 the answer is the store's`, "refused"),
|
|
3183
|
+
rate_limited: /* @__PURE__ */ __name((provider) => `${provider} asked to wait before more requests \u2014 the answer is the store's`, "rate_limited"),
|
|
3118
3184
|
failed: /* @__PURE__ */ __name((provider) => `${provider} could not be read \u2014 the answer is the store's`, "failed"),
|
|
3119
3185
|
no_upcoming: /* @__PURE__ */ __name((provider) => `${provider} lists no meeting before it starts \u2014 upcoming ones are not in the answer`, "no_upcoming")
|
|
3120
3186
|
};
|
|
@@ -3126,6 +3192,8 @@ var reasonOf = /* @__PURE__ */ __name((error) => {
|
|
|
3126
3192
|
return "refused";
|
|
3127
3193
|
if (code === "network_error")
|
|
3128
3194
|
return "unreachable";
|
|
3195
|
+
if (code === "rate_limited")
|
|
3196
|
+
return "rate_limited";
|
|
3129
3197
|
return "failed";
|
|
3130
3198
|
}, "reasonOf");
|
|
3131
3199
|
var refusal = /* @__PURE__ */ __name((reason, provider, error) => error ?? new CliError("validation_error", `--backend server: ${WHY[reason](provider).replace(/ — .*$/, "")}; use --backend archive or both`, { reason }), "refusal");
|
|
@@ -3180,9 +3248,9 @@ var stepFor = /* @__PURE__ */ __name((backend) => ({
|
|
|
3180
3248
|
found: /* @__PURE__ */ new Map(),
|
|
3181
3249
|
missing: []
|
|
3182
3250
|
}), "stepFor");
|
|
3183
|
-
var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found,
|
|
3251
|
+
var keep = /* @__PURE__ */ __name(async (source, store, accountId, now, step, found, parts, fresh = false) => {
|
|
3184
3252
|
const stored = await storedByExternalId(store, accountId, found.meeting.occurrence.id);
|
|
3185
|
-
const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting,
|
|
3253
|
+
const details = stored && !fresh && unchanged(found, stored, accountId) ? stored : await saveSourceMeeting(source, store, found.meeting, parts, {
|
|
3186
3254
|
accountId,
|
|
3187
3255
|
now,
|
|
3188
3256
|
...stored ? { kept: stored.meeting } : {}
|
|
@@ -3288,6 +3356,13 @@ var askServerForList = /* @__PURE__ */ __name(async (source, store, accountId, q
|
|
|
3288
3356
|
return step;
|
|
3289
3357
|
}, "askServerForList");
|
|
3290
3358
|
var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
|
|
3359
|
+
const listed2 = await listThrough(source, store, filter, access);
|
|
3360
|
+
if (!filter.query || !readsZone(filter.query, MEETING_TIMES))
|
|
3361
|
+
return listed2;
|
|
3362
|
+
return { ...listed2, meta: { ...listed2.meta, timezone: timezoneOf(access.timezone) } };
|
|
3363
|
+
}, "meetingsListThrough");
|
|
3364
|
+
var MEETING_TIMES = new Set(MEETING_QUERY.fields.filter(({ type }) => type === "time").map(({ name }) => name));
|
|
3365
|
+
var listThrough = /* @__PURE__ */ __name(async (source, store, filter, access) => {
|
|
3291
3366
|
const now = access.now ?? Date.now();
|
|
3292
3367
|
const zoned = { ...filter, timezone: timezoneOf(access.timezone), now };
|
|
3293
3368
|
const step = await askServerForList(source, store, filter.accountId, filter.query, { ...access, now });
|
|
@@ -3307,7 +3382,7 @@ var meetingsListThrough = /* @__PURE__ */ __name(async (source, store, filter, a
|
|
|
3307
3382
|
items: list.items.map((item) => ({ ...item, found_in: step.found.get(Number(item.id)) ?? "archive" })),
|
|
3308
3383
|
...extras
|
|
3309
3384
|
};
|
|
3310
|
-
}, "
|
|
3385
|
+
}, "listThrough");
|
|
3311
3386
|
var storedMeeting = /* @__PURE__ */ __name(async (store, accountId, meeting2) => {
|
|
3312
3387
|
const text7 = meeting2.trim();
|
|
3313
3388
|
const own = /* @__PURE__ */ __name((details) => details?.meeting.accountId === accountId ? details : null, "own");
|
|
@@ -3377,10 +3452,10 @@ var meetingShowThrough = /* @__PURE__ */ __name(async (source, store, accountId,
|
|
|
3377
3452
|
return { details: fresh, foundIn: step.found.get(details.meeting.id) ?? "server", server: step.report };
|
|
3378
3453
|
}, "meetingShowThrough");
|
|
3379
3454
|
|
|
3380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/recording-transfer.js
|
|
3381
3456
|
var strongRecordingValidator = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length <= 1024 && /^"[\x21\x23-\x7e\x80-\xff]*"$/.test(value), "strongRecordingValidator");
|
|
3382
3457
|
|
|
3383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/related-history.js
|
|
3384
3459
|
var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
3385
3460
|
if (!original || typeof original !== "object" || Array.isArray(original))
|
|
3386
3461
|
throw new CliError("validation_error", "related history request is required");
|
|
@@ -3410,14 +3485,14 @@ var validateMeetingRelatedHistory = /* @__PURE__ */ __name((original) => {
|
|
|
3410
3485
|
return { ...input, anchorIds: [...new Set(input.anchorIds)], limit, maxReadBytes };
|
|
3411
3486
|
}, "validateMeetingRelatedHistory");
|
|
3412
3487
|
|
|
3413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/review.js
|
|
3414
3489
|
var REVIEW_LIMIT = { default: 50, most: 200 };
|
|
3415
3490
|
|
|
3416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/save-hints.js
|
|
3417
3492
|
var SAVE_HELP = `Worth keeping \u2014 a decision, a promise, a preference? Record it with \`memo facts add\` or
|
|
3418
3493
|
\`memo memories add\`, citing the msg: locator or meeting: reference as --evidence.`;
|
|
3419
3494
|
|
|
3420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/series-history.js
|
|
3421
3496
|
var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
3422
3497
|
input.signal?.throwIfAborted();
|
|
3423
3498
|
if (!Number.isSafeInteger(input.accountId) || input.accountId <= 0)
|
|
@@ -3438,10 +3513,10 @@ var validateMeetingSeriesHistory = /* @__PURE__ */ __name((input) => {
|
|
|
3438
3513
|
return { ...input, limit, maxReadBytes };
|
|
3439
3514
|
}, "validateMeetingSeriesHistory");
|
|
3440
3515
|
|
|
3441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/upcoming-validation.js
|
|
3442
3517
|
var occurrenceId = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim().length > 0 && value.length <= 1e3 && !/[\0\r\n]/.test(value), "occurrenceId");
|
|
3443
3518
|
|
|
3444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/series-inventory-validation.js
|
|
3445
3520
|
function invalid4(field, response = false) {
|
|
3446
3521
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid meeting inventory ${field}`);
|
|
3447
3522
|
}
|
|
@@ -3457,11 +3532,11 @@ var cursorDetails = /* @__PURE__ */ __name((value) => {
|
|
|
3457
3532
|
if (typeof value !== "string" || value.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(value))
|
|
3458
3533
|
invalid4("cursor");
|
|
3459
3534
|
try {
|
|
3460
|
-
const
|
|
3461
|
-
object(
|
|
3462
|
-
if (
|
|
3535
|
+
const decoded = JSON.parse(new TextDecoder("utf8", { fatal: true }).decode(Buffer.from(value, "base64url")));
|
|
3536
|
+
object(decoded, ["version", "selection", "cursor"], "cursor");
|
|
3537
|
+
if (decoded.version !== 1 || typeof decoded.selection !== "string" || !/^[a-f0-9]{64}$/.test(decoded.selection) || !occurrenceId(decoded.cursor))
|
|
3463
3538
|
invalid4("cursor");
|
|
3464
|
-
return
|
|
3539
|
+
return decoded;
|
|
3465
3540
|
} catch {
|
|
3466
3541
|
return invalid4("cursor");
|
|
3467
3542
|
}
|
|
@@ -3470,1405 +3545,57 @@ var validateMeetingSeriesInventoryCursor = /* @__PURE__ */ __name((value) => {
|
|
|
3470
3545
|
cursorDetails(value);
|
|
3471
3546
|
}, "validateMeetingSeriesInventoryCursor");
|
|
3472
3547
|
|
|
3473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3474
|
-
var MEETING_COUNTS_GROUPINGS = ["day", "week", "series"];
|
|
3475
|
-
var zoneOf = /* @__PURE__ */ __name((timeZone) => {
|
|
3476
|
-
const zone = timeZone ?? "UTC";
|
|
3477
|
-
try {
|
|
3478
|
-
new Intl.DateTimeFormat("en", { timeZone: zone });
|
|
3479
|
-
} catch {
|
|
3480
|
-
throw new CliError("validation_error", "expected an IANA time zone such as Europe/Madrid");
|
|
3481
|
-
}
|
|
3482
|
-
return zone;
|
|
3483
|
-
}, "zoneOf");
|
|
3484
|
-
var DAYS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
3485
|
-
var weekStart = /* @__PURE__ */ __name((at, format) => {
|
|
3486
|
-
const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
3487
|
-
const day2 = Date.UTC(Number(parts2.year), Number(parts2.month) - 1, Number(parts2.day));
|
|
3488
|
-
return new Date(day2 - DAYS.indexOf(parts2.weekday ?? "Mon") * 864e5).toISOString().slice(0, 10);
|
|
3489
|
-
}, "weekStart");
|
|
3490
|
-
var dayKey = /* @__PURE__ */ __name((at, format) => {
|
|
3491
|
-
const parts2 = Object.fromEntries(format.formatToParts(new Date(at)).map((part) => [part.type, part.value]));
|
|
3492
|
-
return `${parts2.year}-${parts2.month}-${parts2.day}`;
|
|
3493
|
-
}, "dayKey");
|
|
3494
|
-
var zoneFormat = /* @__PURE__ */ __name((zone) => new Intl.DateTimeFormat("en-US", {
|
|
3495
|
-
timeZone: zone,
|
|
3496
|
-
year: "numeric",
|
|
3497
|
-
month: "2-digit",
|
|
3498
|
-
day: "2-digit",
|
|
3499
|
-
weekday: "short"
|
|
3500
|
-
}), "zoneFormat");
|
|
3501
|
-
var NO_SERIES = "no-series";
|
|
3502
|
-
var MOST_COUNT_ROWS = 100;
|
|
3503
|
-
var minutesOf = /* @__PURE__ */ __name((ms) => Math.round(ms / 6e4), "minutesOf");
|
|
3504
|
-
var meanOf = /* @__PURE__ */ __name((ms, timed) => timed === 0 ? null : Math.round(ms / timed / 6e3) / 10, "meanOf");
|
|
3505
|
-
var aggregateMeetingCounts = /* @__PURE__ */ __name((meetings, by, timeZone, limit = MOST_COUNT_ROWS) => {
|
|
3506
|
-
if (!MEETING_COUNTS_GROUPINGS.includes(by))
|
|
3507
|
-
throw new CliError("validation_error", `--by takes ${MEETING_COUNTS_GROUPINGS.join(", ")}`);
|
|
3508
|
-
if (!Number.isSafeInteger(limit) || limit < 1)
|
|
3509
|
-
throw new CliError("validation_error", "--limit is a positive number");
|
|
3510
|
-
const zone = zoneOf(timeZone);
|
|
3511
|
-
const format = zoneFormat(zone);
|
|
3512
|
-
const sum = /* @__PURE__ */ __name(() => ({ meetings: 0, ms: 0, timed: 0, transcripts: 0 }), "sum");
|
|
3513
|
-
const add = /* @__PURE__ */ __name((into, meeting2) => {
|
|
3514
|
-
into.meetings += 1;
|
|
3515
|
-
if (meeting2.durationMs !== null) {
|
|
3516
|
-
into.ms += Math.max(0, meeting2.durationMs);
|
|
3517
|
-
into.timed += 1;
|
|
3518
|
-
}
|
|
3519
|
-
if (meeting2.transcribed)
|
|
3520
|
-
into.transcripts += 1;
|
|
3521
|
-
}, "add");
|
|
3522
|
-
const total = { ...sum(), name: null };
|
|
3523
|
-
const groups = /* @__PURE__ */ new Map();
|
|
3524
|
-
for (const meeting2 of meetings) {
|
|
3525
|
-
add(total, meeting2);
|
|
3526
|
-
const key = by === "series" ? meeting2.seriesKey === null ? NO_SERIES : `series:${meeting2.seriesKey}` : meeting2.startedAt === null ? null : by === "day" ? dayKey(meeting2.startedAt, format) : weekStart(meeting2.startedAt, format);
|
|
3527
|
-
if (key === null)
|
|
3528
|
-
continue;
|
|
3529
|
-
const group = groups.get(key) ?? { ...sum(), name: by === "series" ? meeting2.seriesTitle : null };
|
|
3530
|
-
add(group, meeting2);
|
|
3531
|
-
groups.set(key, group);
|
|
3532
|
-
}
|
|
3533
|
-
const ordered = [...groups.entries()].sort(([a, one], [b, other]) => by === "series" ? other.ms - one.ms || other.meetings - one.meetings || a.localeCompare(b) : b.localeCompare(a));
|
|
3534
|
-
const kept = ordered.slice(0, limit);
|
|
3535
|
-
if (by !== "series")
|
|
3536
|
-
kept.reverse();
|
|
3537
|
-
const counted = /* @__PURE__ */ __name(({ meetings: count7, ms, timed, transcripts }) => ({
|
|
3538
|
-
meetings: count7,
|
|
3539
|
-
minutes: minutesOf(ms),
|
|
3540
|
-
meanMinutes: meanOf(ms, timed),
|
|
3541
|
-
transcripts
|
|
3542
|
-
}), "counted");
|
|
3543
|
-
return {
|
|
3544
|
-
by,
|
|
3545
|
-
timeZone: zone,
|
|
3546
|
-
...counted(total),
|
|
3547
|
-
rows: kept.map(([key, group]) => ({ key, name: group.name, ...counted(group) })),
|
|
3548
|
-
hasMore: ordered.length > limit
|
|
3549
|
-
};
|
|
3550
|
-
}, "aggregateMeetingCounts");
|
|
3551
|
-
var UNKNOWN_SPEAKER = "unknown";
|
|
3552
|
-
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");
|
|
3553
|
-
var aggregateMeetingStats = /* @__PURE__ */ __name((rows, timeZone) => {
|
|
3554
|
-
const zone = zoneOf(timeZone);
|
|
3555
|
-
const format = zoneFormat(zone);
|
|
3556
|
-
const speakers = /* @__PURE__ */ new Map();
|
|
3557
|
-
const weeks = /* @__PURE__ */ new Map();
|
|
3558
|
-
const meetings = /* @__PURE__ */ new Set();
|
|
3559
|
-
let lines = 0;
|
|
3560
|
-
let words2 = 0;
|
|
3561
|
-
let talkMs = 0;
|
|
3562
|
-
for (const row of rows) {
|
|
3563
|
-
const talk = Math.max(0, row.endMs - row.startMs);
|
|
3564
|
-
meetings.add(row.meetingId);
|
|
3565
|
-
lines += 1;
|
|
3566
|
-
words2 += row.words;
|
|
3567
|
-
talkMs += talk;
|
|
3568
|
-
const who = speakerOf(row);
|
|
3569
|
-
const held = speakers.get(who.key) ?? {
|
|
3570
|
-
key: who.key,
|
|
3571
|
-
name: who.name ?? null,
|
|
3572
|
-
personId: row.personId,
|
|
3573
|
-
identityId: row.personId === null ? row.identityId : null,
|
|
3574
|
-
meetings: 0,
|
|
3575
|
-
lines: 0,
|
|
3576
|
-
words: 0,
|
|
3577
|
-
talkMs: 0,
|
|
3578
|
-
share: 0,
|
|
3579
|
-
seen: /* @__PURE__ */ new Set()
|
|
3580
|
-
};
|
|
3581
|
-
held.seen.add(row.meetingId);
|
|
3582
|
-
held.lines += 1;
|
|
3583
|
-
held.words += row.words;
|
|
3584
|
-
held.talkMs += talk;
|
|
3585
|
-
speakers.set(who.key, held);
|
|
3586
|
-
if (row.startedAt !== null) {
|
|
3587
|
-
const week = weeks.get(weekStart(row.startedAt, format)) ?? { meetings: /* @__PURE__ */ new Set(), talkMs: 0 };
|
|
3588
|
-
week.meetings.add(row.meetingId);
|
|
3589
|
-
week.talkMs += talk;
|
|
3590
|
-
weeks.set(weekStart(row.startedAt, format), week);
|
|
3591
|
-
}
|
|
3592
|
-
}
|
|
3593
|
-
return {
|
|
3594
|
-
timeZone: zone,
|
|
3595
|
-
meetings: meetings.size,
|
|
3596
|
-
lines,
|
|
3597
|
-
words: words2,
|
|
3598
|
-
talkMs,
|
|
3599
|
-
speakers: [...speakers.values()].map(({ seen, ...speaker }) => ({
|
|
3600
|
-
...speaker,
|
|
3601
|
-
meetings: seen.size,
|
|
3602
|
-
share: talkMs === 0 ? 0 : Math.round(speaker.talkMs / talkMs * 1e3) / 1e3
|
|
3603
|
-
})).sort((a, b) => b.talkMs - a.talkMs || a.key.localeCompare(b.key)),
|
|
3604
|
-
weeks: [...weeks.entries()].map(([start, week]) => ({ weekStart: start, meetings: week.meetings.size, talkMs: week.talkMs })).sort((a, b) => a.weekStart.localeCompare(b.weekStart))
|
|
3605
|
-
};
|
|
3606
|
-
}, "aggregateMeetingStats");
|
|
3607
|
-
|
|
3608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
3609
|
-
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
3610
|
-
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
3611
|
-
var ERASED_TEXT = "[source erased]";
|
|
3612
|
-
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
3613
|
-
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
3614
|
-
|
|
3615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
3616
|
-
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
3617
|
-
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
3618
|
-
var CLOSED_STATES = ["done", "dismissed"];
|
|
3619
|
-
var TASK_ORIGINS = ["rule", "agent", "owner"];
|
|
3620
|
-
var TASK_VERDICTS = ["useful", "not_useful"];
|
|
3621
|
-
var isClosedState = /* @__PURE__ */ __name((state) => CLOSED_STATES.includes(state), "isClosedState");
|
|
3622
|
-
function closeTask(task, state, by, at, reason) {
|
|
3623
|
-
if (isClosedState(task.state))
|
|
3624
|
-
throw new CliError("validation_error", `task ${task.id} is already ${task.state}`, { reason: "task.closed" });
|
|
3625
|
-
const { claimedBy: _by, claimedUntil: _until, ...unclaimed } = task;
|
|
3626
|
-
return { ...unclaimed, state, closedAt: at, closedBy: by, ...reason === void 0 ? {} : { reason } };
|
|
3627
|
-
}
|
|
3628
|
-
__name(closeTask, "closeTask");
|
|
3629
|
-
|
|
3630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
3631
|
-
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
3632
|
-
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
3633
|
-
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
3634
|
-
var priorityLabel = /* @__PURE__ */ __name((score) => score === null ? null : PRIORITY_LABELS[Math.min(3, Math.max(0, Math.floor(score * 4)))], "priorityLabel");
|
|
3635
|
-
var priorityBand = /* @__PURE__ */ __name((label) => {
|
|
3636
|
-
const at = PRIORITY_LABELS.indexOf(label);
|
|
3637
|
-
return { from: at / 4, to: (at + 1) / 4 };
|
|
3638
|
-
}, "priorityBand");
|
|
3639
|
-
var legacyPriority = /* @__PURE__ */ __name((score) => score === null ? null : score < 0.125 ? 4 : 3 - PRIORITY_LABELS.indexOf(priorityLabel(score)), "legacyPriority");
|
|
3640
|
-
var checkedScore = /* @__PURE__ */ __name((score) => {
|
|
3641
|
-
if (!Number.isFinite(score) || score < 0 || score > 1)
|
|
3642
|
-
throw new CliError("validation_error", "a priority score is 0 to 1");
|
|
3643
|
-
return score;
|
|
3644
|
-
}, "checkedScore");
|
|
3645
|
-
var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
3646
|
-
const word = value.trim().toLowerCase();
|
|
3647
|
-
if (word === "none")
|
|
3648
|
-
return null;
|
|
3649
|
-
if (PRIORITY_LABELS.includes(word))
|
|
3650
|
-
return MIDDLE[word];
|
|
3651
|
-
if (/^[0-4]$/.test(word))
|
|
3652
|
-
return LEGACY_PRIORITY_SCORES[Number(word)];
|
|
3653
|
-
if (/^(0?\.\d+|[01]\.\d*)$/.test(word) && Number(word) <= 1)
|
|
3654
|
-
return Number(word);
|
|
3655
|
-
throw new CliError("validation_error", `a priority is ${PRIORITY_LABELS.join(", ")}, none, or a score from 0.0 to 1.0 with its decimal point; 0 (urgent) \u2026 4 (low) still work as critical, high, medium, low, low`);
|
|
3656
|
-
}, "priorityOf");
|
|
3657
|
-
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
3658
|
-
|
|
3659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
3660
|
-
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
3661
|
-
async function find(id5) {
|
|
3662
|
-
const task = await store.get(id5);
|
|
3663
|
-
if (!task)
|
|
3664
|
-
throw new CliError("not_found", `no task ${id5}`);
|
|
3665
|
-
return task;
|
|
3666
|
-
}
|
|
3667
|
-
__name(find, "find");
|
|
3668
|
-
return {
|
|
3669
|
-
/**
|
|
3670
|
-
* A rule never makes a second task from a source it has seen, whatever that task's state, so a
|
|
3671
|
-
* dismissed one stays dismissed — nor from a message attached or merged into a task. A person or an agent may
|
|
3672
|
-
* add a task of another kind to it. A task a rule opens goes through the host's duplicate check.
|
|
3673
|
-
*/
|
|
3674
|
-
async add(input) {
|
|
3675
|
-
const rule = input.origin === "rule";
|
|
3676
|
-
const existing = await store.findBySource(input.account, input.source, rule ? { linked: true } : void 0);
|
|
3677
|
-
const same = rule ? existing[0] : existing.find((task2) => task2.kind === input.kind);
|
|
3678
|
-
if (same)
|
|
3679
|
-
return { task: same, created: false };
|
|
3680
|
-
const task = { ...input, id: newId(), state: "open", createdAt: now() };
|
|
3681
|
-
await store.insert(task);
|
|
3682
|
-
if (!rule || !store.reviewDuplicates)
|
|
3683
|
-
return { task, created: true };
|
|
3684
|
-
return { task, created: true, review: await store.reviewDuplicates(task.id) };
|
|
3685
|
-
},
|
|
3686
|
-
async close(id5, { as, by, reason }) {
|
|
3687
|
-
const task = closeTask(await find(id5), as, by, now(), reason);
|
|
3688
|
-
await store.update(task);
|
|
3689
|
-
return task;
|
|
3690
|
-
},
|
|
3691
|
-
list: /* @__PURE__ */ __name((filter = {}) => store.list(filter), "list"),
|
|
3692
|
-
async stats(filter = {}) {
|
|
3693
|
-
const byGroup = /* @__PURE__ */ new Map();
|
|
3694
|
-
for (const task of await store.list(filter))
|
|
3695
|
-
byGroup.set(task.group, [...byGroup.get(task.group) ?? [], task]);
|
|
3696
|
-
return [...byGroup].map(([group, tasks]) => {
|
|
3697
|
-
const open = tasks.filter((task) => !isClosedState(task.state));
|
|
3698
|
-
const closeMs = tasks.flatMap((task) => task.closedAt ? [task.closedAt.getTime() - task.createdAt.getTime()] : []);
|
|
3699
|
-
const oldestOpenAt = open.map((task) => task.createdAt).sort((a, b) => a.getTime() - b.getTime())[0];
|
|
3700
|
-
return {
|
|
3701
|
-
group,
|
|
3702
|
-
open: open.length,
|
|
3703
|
-
...oldestOpenAt ? { oldestOpenAt } : {},
|
|
3704
|
-
...closeMs.length > 0 ? { medianCloseMs: median(closeMs) } : {}
|
|
3705
|
-
};
|
|
3706
|
-
});
|
|
3707
|
-
}
|
|
3708
|
-
};
|
|
3709
|
-
}
|
|
3710
|
-
__name(createTaskService, "createTaskService");
|
|
3711
|
-
function median(values) {
|
|
3712
|
-
const sorted = [...values].sort((a, b) => a - b);
|
|
3713
|
-
const middle = Math.floor(sorted.length / 2);
|
|
3714
|
-
const upper = sorted[middle] ?? 0;
|
|
3715
|
-
return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
|
|
3716
|
-
}
|
|
3717
|
-
__name(median, "median");
|
|
3718
|
-
|
|
3719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
3720
|
-
function matches(task, filter) {
|
|
3721
|
-
return (filter.account === void 0 || task.account === filter.account) && (filter.state === void 0 || task.state === filter.state) && (filter.group === void 0 || task.group === filter.group) && (filter.kind === void 0 || task.kind === filter.kind) && (filter.createdBefore === void 0 || task.createdAt < filter.createdBefore);
|
|
3722
|
-
}
|
|
3723
|
-
__name(matches, "matches");
|
|
3724
|
-
|
|
3725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
3726
|
-
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
3727
|
-
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
3728
|
-
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
3729
|
-
var MEMORY_SCOPES = ["personal", "work"];
|
|
3730
|
-
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
3731
|
-
var TASK_TYPES2 = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
3732
|
-
|
|
3733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/categories.js
|
|
3734
|
-
var CATEGORIES = ["client", "supplier", "partner", "employer"];
|
|
3735
|
-
|
|
3736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
3548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/meetings/tag-answers.js
|
|
3737
3549
|
var text6 = string();
|
|
3738
|
-
var
|
|
3739
|
-
var
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
ref: nullable(reference),
|
|
3746
|
-
kind: text6,
|
|
3747
|
-
title: nullable(text6),
|
|
3748
|
-
sender: nullable(text6),
|
|
3749
|
-
at: nullable(time),
|
|
3750
|
-
excerpt: nullable(text6),
|
|
3751
|
-
tool: nullable(text6),
|
|
3752
|
-
missing: boolean()
|
|
3753
|
-
});
|
|
3754
|
-
var sourceReview = nullable(strictObject({ id: id4, cause: picklist(SOURCE_REVIEW_CAUSES) }));
|
|
3755
|
-
var author = strictObject({
|
|
3756
|
-
type: picklist(["person", "bot"]),
|
|
3757
|
-
id: id4,
|
|
3758
|
-
name: nullable(text6)
|
|
3759
|
-
});
|
|
3760
|
-
|
|
3761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
3762
|
-
var organization = strictObject({
|
|
3763
|
-
id: id4,
|
|
3764
|
-
ref: reference,
|
|
3765
|
-
kind: picklist(["company", "team", "family", "community"]),
|
|
3766
|
-
name: text6,
|
|
3767
|
-
scope: picklist(["personal", "work"]),
|
|
3768
|
-
created_at: time
|
|
3769
|
-
});
|
|
3770
|
-
var project = strictObject({
|
|
3771
|
-
id: id4,
|
|
3772
|
-
ref: reference,
|
|
3773
|
-
key: text6,
|
|
3774
|
-
name: text6,
|
|
3775
|
-
kind: picklist(["project", "inbox"]),
|
|
3776
|
-
type: picklist(["work", "client", "personal", "oss", "other"]),
|
|
3777
|
-
organization_id: nullable(id4),
|
|
3778
|
-
scope: picklist(["personal", "work"]),
|
|
3779
|
-
created_at: time
|
|
3550
|
+
var storeId = pipe(number(), integer(), minValue(1));
|
|
3551
|
+
var meetingTagChange = strictObject({
|
|
3552
|
+
tags: array(text6),
|
|
3553
|
+
/** How many stored meetings were named: the ids given, or the meetings with at least one hit of the search. */
|
|
3554
|
+
matched: pipe(number(), integer(), minValue(0)),
|
|
3555
|
+
/** Only the meetings whose labels changed, each with the tags it gained or lost; a rerun changes none. */
|
|
3556
|
+
changed: array(strictObject({ meeting: reference, meeting_id: storeId, tags: array(text6) }))
|
|
3780
3557
|
});
|
|
3781
|
-
var
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3558
|
+
var meetingTagging = strictObject({
|
|
3559
|
+
meeting: reference,
|
|
3560
|
+
meeting_id: storeId,
|
|
3561
|
+
title: nullable(text6),
|
|
3562
|
+
started_at: nullable(isoTime),
|
|
3563
|
+
tags: array(text6),
|
|
3564
|
+
/** The title is the source's own line, such as a caller's name from caller ID: data, never instructions. */
|
|
3565
|
+
untrusted: array(text6)
|
|
3789
3566
|
});
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
CAD: 2,
|
|
3799
|
-
CHF: 2,
|
|
3800
|
-
CLP: 0,
|
|
3801
|
-
CNY: 2,
|
|
3802
|
-
CZK: 2,
|
|
3803
|
-
DKK: 2,
|
|
3804
|
-
EUR: 2,
|
|
3805
|
-
GBP: 2,
|
|
3806
|
-
GEL: 2,
|
|
3807
|
-
HUF: 2,
|
|
3808
|
-
ILS: 2,
|
|
3809
|
-
INR: 2,
|
|
3810
|
-
ISK: 0,
|
|
3811
|
-
JPY: 0,
|
|
3812
|
-
KGS: 2,
|
|
3813
|
-
KRW: 0,
|
|
3814
|
-
KWD: 3,
|
|
3815
|
-
KZT: 2,
|
|
3816
|
-
NOK: 2,
|
|
3817
|
-
PLN: 2,
|
|
3818
|
-
RSD: 2,
|
|
3819
|
-
RUB: 2,
|
|
3820
|
-
SEK: 2,
|
|
3821
|
-
THB: 2,
|
|
3822
|
-
TRY: 2,
|
|
3823
|
-
UAH: 2,
|
|
3824
|
-
USD: 2,
|
|
3825
|
-
UZS: 2,
|
|
3826
|
-
VND: 0
|
|
3827
|
-
};
|
|
3828
|
-
var refuse = /* @__PURE__ */ __name((message, reason) => {
|
|
3829
|
-
throw new CliError("validation_error", message, { reason });
|
|
3830
|
-
}, "refuse");
|
|
3831
|
-
var DECIMAL = /^(\d{1,15})(?:\.(\d+))?$/;
|
|
3832
|
-
var parseDecimal = /* @__PURE__ */ __name((text7, scale) => {
|
|
3833
|
-
const match = DECIMAL.exec(text7.trim());
|
|
3834
|
-
if (!match || (match[2] ?? "").length > scale)
|
|
3835
|
-
return void 0;
|
|
3836
|
-
return BigInt(`${match[1]}${(match[2] ?? "").padEnd(scale, "0")}`);
|
|
3837
|
-
}, "parseDecimal");
|
|
3838
|
-
var formatDecimal = /* @__PURE__ */ __name((units, scale) => {
|
|
3839
|
-
const value = BigInt(units);
|
|
3840
|
-
if (value < 0n)
|
|
3841
|
-
return `-${formatDecimal(-value, scale)}`;
|
|
3842
|
-
const digits = value.toString().padStart(scale + 1, "0");
|
|
3843
|
-
return scale === 0 ? digits : `${digits.slice(0, -scale)}.${digits.slice(-scale)}`;
|
|
3844
|
-
}, "formatDecimal");
|
|
3845
|
-
var groupDigits = /* @__PURE__ */ __name((decimal) => {
|
|
3846
|
-
const [whole = "0", fraction] = decimal.split(".");
|
|
3847
|
-
const grouped2 = whole.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
|
3848
|
-
return fraction === void 0 ? grouped2 : `${grouped2}.${fraction}`;
|
|
3849
|
-
}, "groupDigits");
|
|
3850
|
-
var currencyOf = /* @__PURE__ */ __name((text7) => {
|
|
3851
|
-
const code = typeof text7 === "string" ? text7.trim().toUpperCase() : "";
|
|
3852
|
-
if (CURRENCY_SCALES[code] === void 0)
|
|
3853
|
-
return refuse(`${typeof text7 === "string" && text7.trim() ? text7.trim() : "an empty currency"} is not a currency the store keeps; use one of ${Object.keys(CURRENCY_SCALES).join(", ")}`, "money.currency");
|
|
3854
|
-
return code;
|
|
3855
|
-
}, "currencyOf");
|
|
3856
|
-
var scaleOf = /* @__PURE__ */ __name((currency) => CURRENCY_SCALES[currencyOf(currency)], "scaleOf");
|
|
3857
|
-
var minorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
3858
|
-
const scale = scaleOf(currency);
|
|
3859
|
-
const units = typeof amount === "string" ? parseDecimal(amount, scale) : void 0;
|
|
3860
|
-
if (units === void 0 || units > BigInt(Number.MAX_SAFE_INTEGER))
|
|
3861
|
-
return refuse(`${what} is a decimal string with at most ${scale} decimal${scale === 1 ? "" : "s"} for ${currency}, such as "${formatDecimal(5e3 * 10 ** scale, scale)}"`, "money.amount");
|
|
3862
|
-
return Number(units);
|
|
3863
|
-
}, "minorUnits");
|
|
3864
|
-
var signedMinorUnits = /* @__PURE__ */ __name((amount, currency, what = "an amount") => {
|
|
3865
|
-
if (typeof amount !== "string" || !amount.trim().startsWith("-"))
|
|
3866
|
-
return minorUnits(amount, currency, what);
|
|
3867
|
-
const units = minorUnits(amount.trim().slice(1), currency, what);
|
|
3868
|
-
return units === 0 ? 0 : -units;
|
|
3869
|
-
}, "signedMinorUnits");
|
|
3870
|
-
var moneyOf = /* @__PURE__ */ __name((units, currency) => ({
|
|
3871
|
-
amount: formatDecimal(units, scaleOf(currency)),
|
|
3872
|
-
currency
|
|
3873
|
-
}), "moneyOf");
|
|
3874
|
-
var moneyLabel = /* @__PURE__ */ __name((units, currency) => `${groupDigits(formatDecimal(units, scaleOf(currency)))} ${currency}`, "moneyLabel");
|
|
3875
|
-
var QUANTITY_SCALE = 3;
|
|
3876
|
-
var quantityOf = /* @__PURE__ */ __name((text7) => {
|
|
3877
|
-
const thousandths = typeof text7 === "string" ? parseDecimal(text7, QUANTITY_SCALE) : void 0;
|
|
3878
|
-
if (thousandths === void 0 || thousandths === 0n)
|
|
3879
|
-
return refuse('a quantity is a decimal string above 0 with at most 3 decimals, such as "1.5"', "money.quantity");
|
|
3880
|
-
const plain = formatDecimal(thousandths, QUANTITY_SCALE).replace(/\.?0+$/, "");
|
|
3881
|
-
return { text: plain, thousandths };
|
|
3882
|
-
}, "quantityOf");
|
|
3883
|
-
var lineUnits = /* @__PURE__ */ __name((thousandths, unitPrice) => Number((thousandths * BigInt(unitPrice) + 500n) / 1000n), "lineUnits");
|
|
3884
|
-
|
|
3885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/finance.js
|
|
3886
|
-
var INVOICE_DIRECTIONS = ["receivable", "payable"];
|
|
3887
|
-
var INVOICE_STATUSES = ["draft", "issued", "partly_paid", "paid", "void"];
|
|
3888
|
-
var MONEY_DIRECTIONS = ["in", "out"];
|
|
3889
|
-
var FINANCE_REVIEWS = ["proposed", "confirmed", "rejected"];
|
|
3890
|
-
var settledStatus = /* @__PURE__ */ __name((current, total, paid) => {
|
|
3891
|
-
if (current === "draft" || current === "void")
|
|
3892
|
-
return current;
|
|
3893
|
-
if (paid <= 0)
|
|
3894
|
-
return "issued";
|
|
3895
|
-
return paid < total ? "partly_paid" : "paid";
|
|
3896
|
-
}, "settledStatus");
|
|
3897
|
-
var dayMonth = /* @__PURE__ */ __name((date) => date === null ? null : `${date.slice(8, 10)}.${date.slice(5, 7)}`, "dayMonth");
|
|
3898
|
-
var notes = /* @__PURE__ */ __name((...words2) => {
|
|
3899
|
-
const kept = words2.filter((word) => word !== null);
|
|
3900
|
-
return kept.length === 0 ? "" : ` (${kept.join(", ")})`;
|
|
3901
|
-
}, "notes");
|
|
3902
|
-
var invoiceLine = /* @__PURE__ */ __name((invoice) => {
|
|
3903
|
-
const party = invoice.counterpartyName === null ? "" : `${invoice.direction === "receivable" ? " to" : " from"} ${invoice.counterpartyName}`;
|
|
3904
|
-
const due = invoice.dueDate === null ? "" : `, due ${dayMonth(invoice.dueDate)}`;
|
|
3905
|
-
return `${invoice.number ?? `#${invoice.id}`} \xB7 ${moneyLabel(invoice.total, invoice.currency)}${party}${due}` + notes(invoice.status.replace("_", " "), invoice.review === "confirmed" ? null : invoice.review);
|
|
3906
|
-
}, "invoiceLine");
|
|
3907
|
-
var paymentLine = /* @__PURE__ */ __name((payment) => {
|
|
3908
|
-
const party = payment.partyName === null ? "" : `${payment.direction === "in" ? " from" : " to"} ${payment.partyName}`;
|
|
3909
|
-
return `${moneyLabel(payment.amount, payment.currency)}${party}, ${dayMonth(payment.date)}` + notes(payment.review === "confirmed" ? null : payment.review);
|
|
3910
|
-
}, "paymentLine");
|
|
3911
|
-
var invoiceTitle = /* @__PURE__ */ __name((invoice) => `Invoice ${invoiceLine(invoice)}`, "invoiceTitle");
|
|
3912
|
-
var paymentEntryTitle = /* @__PURE__ */ __name((payment) => `Payment \xB7 ${paymentLine(payment)}`, "paymentEntryTitle");
|
|
3913
|
-
|
|
3914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/business.js
|
|
3915
|
-
var CATALOG_KINDS = ["product", "service"];
|
|
3916
|
-
var BUSINESS_KINDS = ["invoice", "payment", "order", "contract", "subscription", "product", "wallet"];
|
|
3917
|
-
var CONTRACT_KINDS = ["sale", "purchase", "service", "lease", "employment", "nda", "license", "other"];
|
|
3918
|
-
var CONTRACT_STATUSES = ["draft", "active", "ended", "terminated"];
|
|
3919
|
-
var SUBSCRIPTION_STATUSES = ["trial", "active", "paused", "cancelled", "ended"];
|
|
3920
|
-
var WALLET_KINDS = ["bank", "card", "cash", "wallet", "other"];
|
|
3921
|
-
var TRANSACTION_STATUSES = ["pending", "booked"];
|
|
3922
|
-
var ORDER_DIRECTIONS = ["purchase", "sale"];
|
|
3923
|
-
var intervalOf = /* @__PURE__ */ __name((text7, reason = "subscription.interval") => {
|
|
3924
|
-
const match = typeof text7 === "string" ? /^(?:([1-9]\d{0,2})-)?(day|week|month|year)$/.exec(text7.trim()) : null;
|
|
3925
|
-
if (!match)
|
|
3926
|
-
throw new CliError("validation_error", "an interval is a count and a unit, such as 1-month or 2-week", { reason });
|
|
3927
|
-
return { count: match[1] === void 0 ? 1 : Number(match[1]), unit: match[2] };
|
|
3928
|
-
}, "intervalOf");
|
|
3929
|
-
var intervalText = /* @__PURE__ */ __name(({ count: count7, unit }) => `${count7}-${unit}`, "intervalText");
|
|
3930
|
-
var priced = /* @__PURE__ */ __name((units, currency) => units === null || currency === null ? "" : `, ${moneyLabel(units, currency)}`, "priced");
|
|
3931
|
-
var pending = /* @__PURE__ */ __name((review) => review === "confirmed" ? null : review, "pending");
|
|
3932
|
-
var productLine = /* @__PURE__ */ __name((product) => {
|
|
3933
|
-
const price = product.unitPrice === null || product.currency === null ? "" : moneyLabel(product.unitPrice, product.currency);
|
|
3934
|
-
const per = price && product.unit !== null ? ` per ${product.unit}` : "";
|
|
3935
|
-
return `${product.name}${price ? ` \xB7 ${price}${per}` : ""}${notes(product.kind, product.archived ? "archived" : null)}`;
|
|
3936
|
-
}, "productLine");
|
|
3937
|
-
var contractLine = /* @__PURE__ */ __name((contract) => `${contract.number ?? `#${contract.id}`} \xB7 ${contract.name}${priced(contract.value, contract.currency)}` + notes(contract.status, pending(contract.review)), "contractLine");
|
|
3938
|
-
var subscriptionLine = /* @__PURE__ */ __name((subscription) => `${subscription.name}${priced(subscription.price, subscription.currency)} every ${intervalText(subscription.interval)}` + notes(subscription.status, pending(subscription.review)), "subscriptionLine");
|
|
3939
|
-
var walletLine = /* @__PURE__ */ __name((wallet) => `${wallet.name} \xB7 ${wallet.kind}, ${wallet.currency}${wallet.numberHint === null ? "" : `, \u2026${wallet.numberHint}`}` + notes(wallet.closed ? "closed" : null), "walletLine");
|
|
3940
|
-
var transactionLine = /* @__PURE__ */ __name((transaction) => `${moneyLabel(transaction.amount, transaction.currency)} ${transaction.direction}${transaction.label === null ? "" : ` \xB7 ${transaction.label}`}, ${dayMonth(transaction.date)}` + notes(transaction.status === "pending" ? "pending" : null, pending(transaction.review)), "transactionLine");
|
|
3941
|
-
|
|
3942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
3943
|
-
import { readFileSync as readFileSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
3944
|
-
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
3945
|
-
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
3946
|
-
var journalMarkPath = /* @__PURE__ */ __name((store) => `${store}.journal.json`, "journalMarkPath");
|
|
3947
|
-
var inodeOf = /* @__PURE__ */ __name((store) => statSync2(store, { throwIfNoEntry: false })?.ino, "inodeOf");
|
|
3948
|
-
var readJson = /* @__PURE__ */ __name((path) => {
|
|
3949
|
-
try {
|
|
3950
|
-
return JSON.parse(readFileSync2(path, "utf8"));
|
|
3951
|
-
} catch (error) {
|
|
3952
|
-
if (error.code === "ENOENT")
|
|
3953
|
-
return null;
|
|
3954
|
-
throw error;
|
|
3955
|
-
}
|
|
3956
|
-
}, "readJson");
|
|
3957
|
-
var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
|
|
3958
|
-
try {
|
|
3959
|
-
refuseOwnerStoreInTests(store);
|
|
3960
|
-
return false;
|
|
3961
|
-
} catch {
|
|
3962
|
-
return true;
|
|
3963
|
-
}
|
|
3964
|
-
}, "ownerStoreInTests");
|
|
3965
|
-
var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
|
|
3966
|
-
var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
|
|
3967
|
-
const failure = sqliteFailure(error);
|
|
3968
|
-
if (!isStoreDamage(failure) || ownerStoreInTests(store))
|
|
3969
|
-
return false;
|
|
3970
|
-
const inode = inodeOf(store);
|
|
3971
|
-
if (inode === void 0)
|
|
3972
|
-
return false;
|
|
3973
|
-
const mark = {
|
|
3974
|
-
at: new Date(now()).toISOString(),
|
|
3975
|
-
command,
|
|
3976
|
-
...version ? { cli_version: version } : {},
|
|
3977
|
-
...runId ? { run_id: runId } : {},
|
|
3978
|
-
error: failure.message.slice(0, 500),
|
|
3979
|
-
inode
|
|
3980
|
-
};
|
|
3981
|
-
try {
|
|
3982
|
-
writeFileSync2(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
3983
|
-
`, { flag: "wx", mode: 384 });
|
|
3984
|
-
return true;
|
|
3985
|
-
} catch {
|
|
3986
|
-
return false;
|
|
3987
|
-
}
|
|
3988
|
-
}, "markStoreDamaged");
|
|
3989
|
-
var readDamageMark = /* @__PURE__ */ __name((store) => {
|
|
3990
|
-
const path = damageMarkPath(store);
|
|
3991
|
-
let mark;
|
|
3992
|
-
try {
|
|
3993
|
-
mark = readJson(path);
|
|
3994
|
-
} catch {
|
|
3995
|
-
return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
|
|
3996
|
-
}
|
|
3997
|
-
if (mark === null)
|
|
3998
|
-
return null;
|
|
3999
|
-
if (mark.inode !== inodeOf(store)) {
|
|
4000
|
-
clearDamageMark(store);
|
|
4001
|
-
return null;
|
|
4002
|
-
}
|
|
4003
|
-
return mark;
|
|
4004
|
-
}, "readDamageMark");
|
|
4005
|
-
var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync2(damageMarkPath(store), { force: true }), "clearDamageMark");
|
|
4006
|
-
var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
|
|
4007
|
-
const mark = readDamageMark(store);
|
|
4008
|
-
if (!mark)
|
|
4009
|
-
return;
|
|
4010
|
-
throw new CliError("configuration_error", `the store was found damaged at ${mark.at} by \`${mark.command}\` (${mark.error}), so nothing writes to it until it is recovered; \`${cli ?? "<cli>"} store recover\` says what is damaged and what to do`, { reason: "store.damaged" });
|
|
4011
|
-
}, "refuseDamagedStore");
|
|
4012
|
-
var markJournalLost = /* @__PURE__ */ __name((store, { seen, command, now = Date.now }) => {
|
|
4013
|
-
if (ownerStoreInTests(store))
|
|
4014
|
-
return;
|
|
4015
|
-
const mark = { at: new Date(now()).toISOString(), command, seen };
|
|
4016
|
-
try {
|
|
4017
|
-
writeFileSync2(journalMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
4018
|
-
`, { flag: "wx", mode: 384 });
|
|
4019
|
-
} catch {
|
|
4020
|
-
}
|
|
4021
|
-
}, "markJournalLost");
|
|
4022
|
-
var readJournalMark = /* @__PURE__ */ __name((store) => {
|
|
4023
|
-
try {
|
|
4024
|
-
return readJson(journalMarkPath(store));
|
|
4025
|
-
} catch {
|
|
4026
|
-
return null;
|
|
4027
|
-
}
|
|
4028
|
-
}, "readJournalMark");
|
|
4029
|
-
var readHealthMark = /* @__PURE__ */ __name((store) => {
|
|
4030
|
-
try {
|
|
4031
|
-
return readJson(healthMarkPath(store));
|
|
4032
|
-
} catch {
|
|
4033
|
-
return null;
|
|
4034
|
-
}
|
|
4035
|
-
}, "readHealthMark");
|
|
4036
|
-
var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
|
|
4037
|
-
const previous = readHealthMark(store);
|
|
4038
|
-
if (ownerStoreInTests(store))
|
|
4039
|
-
return { previous, cleared: null };
|
|
4040
|
-
const checkedAt = new Date(now()).toISOString();
|
|
4041
|
-
const mark = {
|
|
4042
|
-
checked_at: checkedAt,
|
|
4043
|
-
ok: health.ok,
|
|
4044
|
-
problems: health.problems ?? 0,
|
|
4045
|
-
schema,
|
|
4046
|
-
cli,
|
|
4047
|
-
...version ? { cli_version: version } : {},
|
|
4048
|
-
last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
|
|
4049
|
-
};
|
|
4050
|
-
const cleared = health.ok ? readDamageMark(store) : null;
|
|
4051
|
-
try {
|
|
4052
|
-
writeFileSync2(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
4053
|
-
`, { mode: 384 });
|
|
4054
|
-
} catch {
|
|
4055
|
-
}
|
|
4056
|
-
if (cleared)
|
|
4057
|
-
clearDamageMark(store);
|
|
4058
|
-
if (health.ok)
|
|
4059
|
-
rmSync2(journalMarkPath(store), { force: true });
|
|
4060
|
-
return { previous, cleared };
|
|
4061
|
-
}, "recordDeepCheck");
|
|
4062
|
-
|
|
4063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
4064
|
-
var SCHEME = "msg:";
|
|
4065
|
-
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
4066
|
-
var isLocator = /* @__PURE__ */ __name((reference2) => reference2.trim().startsWith(SCHEME), "isLocator");
|
|
4067
|
-
var parseLocator = /* @__PURE__ */ __name((reference2) => {
|
|
4068
|
-
const trimmed = reference2.trim();
|
|
4069
|
-
const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
|
|
4070
|
-
const malformed2 = /* @__PURE__ */ __name(() => new CliError("validation_error", `"${singleLine(reference2)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`), "malformed");
|
|
4071
|
-
if (parts2.length !== 4 || parts2.some((part) => part === ""))
|
|
4072
|
-
throw malformed2();
|
|
4073
|
-
const decoded2 = /* @__PURE__ */ __name((part) => {
|
|
4074
|
-
try {
|
|
4075
|
-
return decodeURIComponent(part);
|
|
4076
|
-
} catch {
|
|
4077
|
-
throw malformed2();
|
|
4078
|
-
}
|
|
4079
|
-
}, "decoded");
|
|
4080
|
-
const [provider, account, chat, message] = parts2.map(decoded2);
|
|
4081
|
-
return { provider, account, chat, message };
|
|
4082
|
-
}, "parseLocator");
|
|
4083
|
-
|
|
4084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
4085
|
-
var SIMPLE_REFERENCES = [
|
|
4086
|
-
"note",
|
|
4087
|
-
"document",
|
|
4088
|
-
"person",
|
|
4089
|
-
"organization",
|
|
4090
|
-
"project",
|
|
4091
|
-
"task",
|
|
4092
|
-
"memory",
|
|
4093
|
-
"fact",
|
|
4094
|
-
"bot",
|
|
4095
|
-
"event",
|
|
4096
|
-
"invoice",
|
|
4097
|
-
"payment",
|
|
4098
|
-
"order",
|
|
4099
|
-
"deal",
|
|
4100
|
-
"lead",
|
|
4101
|
-
"pipeline",
|
|
4102
|
-
"product",
|
|
4103
|
-
"contract",
|
|
4104
|
-
"subscription",
|
|
4105
|
-
"wallet",
|
|
4106
|
-
"transaction",
|
|
4107
|
-
"entity"
|
|
4108
|
-
];
|
|
4109
|
-
var malformed = /* @__PURE__ */ __name((text7, shape) => new CliError("validation_error", `"${singleLine(text7)}" is not a reference \u2014 expected ${shape}`, {
|
|
4110
|
-
reason: "ref.malformed"
|
|
4111
|
-
}), "malformed");
|
|
4112
|
-
var decoded = /* @__PURE__ */ __name((part, text7, shape) => {
|
|
4113
|
-
try {
|
|
4114
|
-
return decodeURIComponent(part);
|
|
4115
|
-
} catch {
|
|
4116
|
-
throw malformed(text7, shape);
|
|
4117
|
-
}
|
|
4118
|
-
}, "decoded");
|
|
4119
|
-
var parts = /* @__PURE__ */ __name((rest, count7, text7, shape) => {
|
|
4120
|
-
const split = rest.split("/");
|
|
4121
|
-
if (split.length !== count7 || split.some((part) => part === ""))
|
|
4122
|
-
throw malformed(text7, shape);
|
|
4123
|
-
return split.map((part) => decoded(part, text7, shape));
|
|
4124
|
-
}, "parts");
|
|
4125
|
-
var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
|
|
4126
|
-
var folderPath = /* @__PURE__ */ __name((path) => {
|
|
4127
|
-
const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
|
|
4128
|
-
return clean === "" ? path.trim() === "" ? "" : null : clean;
|
|
4129
|
-
}, "folderPath");
|
|
4130
|
-
var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
|
|
4131
|
-
var kind2 = /* @__PURE__ */ __name((spec) => spec, "kind");
|
|
4132
|
-
var simple = /* @__PURE__ */ __name((prefix) => kind2({
|
|
4133
|
-
prefix,
|
|
4134
|
-
type: prefix,
|
|
4135
|
-
shape: `${prefix}:<id>`,
|
|
4136
|
-
parse: /* @__PURE__ */ __name((rest, text7) => {
|
|
4137
|
-
if (!rest.trim())
|
|
4138
|
-
throw new CliError("validation_error", `"${singleLine(text7)}" names no ${prefix}`, {
|
|
4139
|
-
reason: "ref.malformed"
|
|
4140
|
-
});
|
|
4141
|
-
return { type: prefix, id: rest };
|
|
4142
|
-
}, "parse"),
|
|
4143
|
-
format: /* @__PURE__ */ __name((reference2) => `${reference2.type}:${reference2.id}`, "format")
|
|
4144
|
-
}), "simple");
|
|
4145
|
-
var REF_KINDS = [
|
|
4146
|
-
kind2({
|
|
4147
|
-
prefix: "msg",
|
|
4148
|
-
type: "message",
|
|
4149
|
-
shape: "msg:<provider>/<account>/<chat>/<message>",
|
|
4150
|
-
parse: /* @__PURE__ */ __name((_, text7) => {
|
|
4151
|
-
try {
|
|
4152
|
-
return { type: "message", ...parseLocator(text7) };
|
|
4153
|
-
} catch {
|
|
4154
|
-
throw malformed(text7, "msg:<provider>/<account>/<chat>/<message>");
|
|
4155
|
-
}
|
|
4156
|
-
}, "parse"),
|
|
4157
|
-
format: formatLocator
|
|
4158
|
-
}),
|
|
4159
|
-
kind2({
|
|
4160
|
-
prefix: "chat",
|
|
4161
|
-
type: "chat",
|
|
4162
|
-
shape: "chat:<provider>/<account>/<chat>",
|
|
4163
|
-
parse: /* @__PURE__ */ __name((rest, text7) => {
|
|
4164
|
-
const [provider, account, chat] = parts(rest, 3, text7, "chat:<provider>/<account>/<chat>");
|
|
4165
|
-
return { type: "chat", provider, account, chat };
|
|
4166
|
-
}, "parse"),
|
|
4167
|
-
format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
|
|
4168
|
-
}),
|
|
4169
|
-
kind2({
|
|
4170
|
-
prefix: "contact",
|
|
4171
|
-
type: "contact",
|
|
4172
|
-
shape: "contact:<provider>/<id>",
|
|
4173
|
-
parse: /* @__PURE__ */ __name((rest, text7) => {
|
|
4174
|
-
const [provider, id5] = parts(rest, 2, text7, "contact:<provider>/<id>");
|
|
4175
|
-
return { type: "contact", provider, id: id5 };
|
|
4176
|
-
}, "parse"),
|
|
4177
|
-
format: /* @__PURE__ */ __name(({ provider, id: id5 }) => `contact:${encoded(provider, id5)}`, "format")
|
|
4178
|
-
}),
|
|
4179
|
-
kind2({
|
|
4180
|
-
prefix: "folder",
|
|
4181
|
-
type: "folder",
|
|
4182
|
-
shape: "folder:<id>[/<path>]",
|
|
4183
|
-
parse: /* @__PURE__ */ __name((rest, text7) => {
|
|
4184
|
-
const slash = rest.indexOf("/");
|
|
4185
|
-
const id5 = decoded(slash < 0 ? rest : rest.slice(0, slash), text7, "folder:<id>[/<path>]");
|
|
4186
|
-
const path = slash < 0 ? null : folderPath(decoded(rest.slice(slash + 1), text7, "folder:<id>[/<path>]"));
|
|
4187
|
-
if (!id5.trim() || path === "")
|
|
4188
|
-
throw malformed(text7, "folder:<id>[/<path>]");
|
|
4189
|
-
return { type: "folder", id: id5, path };
|
|
4190
|
-
}, "parse"),
|
|
4191
|
-
format: /* @__PURE__ */ __name(({ id: id5, path }) => path === null ? `folder:${encodeURIComponent(id5)}` : `folder:${encoded(id5, path)}`, "format")
|
|
4192
|
-
}),
|
|
4193
|
-
kind2({
|
|
4194
|
-
prefix: "meeting",
|
|
4195
|
-
type: "meeting",
|
|
4196
|
-
shape: MEETING_SHAPE,
|
|
4197
|
-
parse: /* @__PURE__ */ __name((_, text7) => {
|
|
4198
|
-
try {
|
|
4199
|
-
return parseMeetingReference(text7);
|
|
4200
|
-
} catch {
|
|
4201
|
-
throw malformed(text7, MEETING_SHAPE);
|
|
4202
|
-
}
|
|
4203
|
-
}, "parse"),
|
|
4204
|
-
format: formatMeetingReference
|
|
4205
|
-
}),
|
|
4206
|
-
...SIMPLE_REFERENCES.map(simple)
|
|
4207
|
-
];
|
|
4208
|
-
var byPrefix = new Map(REF_KINDS.map((spec) => [spec.prefix, spec]));
|
|
4209
|
-
var byType = new Map(REF_KINDS.map((spec) => [spec.type, spec]));
|
|
4210
|
-
var offered = REF_KINDS.map(({ prefix }) => prefix).filter((prefix) => prefix !== "entity");
|
|
4211
|
-
var distance = /* @__PURE__ */ __name((a, b) => {
|
|
4212
|
-
let row = Array.from({ length: b.length + 1 }, (_, at) => at);
|
|
4213
|
-
for (const [i, x] of [...a].entries()) {
|
|
4214
|
-
const next = [i + 1];
|
|
4215
|
-
for (const [j, y] of [...b].entries())
|
|
4216
|
-
next.push(Math.min(row[j + 1] + 1, next[j] + 1, row[j] + (x === y ? 0 : 1)));
|
|
4217
|
-
row = next;
|
|
4218
|
-
}
|
|
4219
|
-
return row[b.length];
|
|
4220
|
-
}, "distance");
|
|
4221
|
-
var nearest = /* @__PURE__ */ __name((typed) => offered.find((prefix) => typed.length >= 2 && prefix.startsWith(typed)) ?? offered.map((prefix) => ({ prefix, far: distance(typed, prefix) })).filter(({ far }) => far <= 2).sort((a, b) => a.far - b.far)[0]?.prefix, "nearest");
|
|
4222
|
-
var unknownKind = /* @__PURE__ */ __name((text7, prefix, rest) => {
|
|
4223
|
-
const near2 = prefix === "" ? void 0 : nearest(prefix);
|
|
4224
|
-
const kinds = offered.map((one) => `${one}:`).join(", ");
|
|
4225
|
-
const hint = near2 === void 0 ? `; kinds: ${kinds}` : `; did you mean ${near2}:${singleLine(rest)}? Kinds: ${kinds}`;
|
|
4226
|
-
return new CliError("validation_error", `"${singleLine(text7)}" is no kind of reference${hint}`, {
|
|
4227
|
-
reason: "ref.unknown-kind"
|
|
4228
|
-
});
|
|
4229
|
-
}, "unknownKind");
|
|
4230
|
-
var formatReference = /* @__PURE__ */ __name((reference2) => byType.get(reference2.type).format(reference2), "formatReference");
|
|
4231
|
-
var parseReference = /* @__PURE__ */ __name((text7) => {
|
|
4232
|
-
const reference2 = text7.trim();
|
|
4233
|
-
const colon = reference2.indexOf(":");
|
|
4234
|
-
const prefix = colon < 0 ? "" : reference2.slice(0, colon);
|
|
4235
|
-
const rest = reference2.slice(colon + 1);
|
|
4236
|
-
const spec = byPrefix.get(prefix);
|
|
4237
|
-
if (!spec)
|
|
4238
|
-
throw unknownKind(reference2, prefix, rest);
|
|
4239
|
-
return spec.parse(rest, reference2);
|
|
4240
|
-
}, "parseReference");
|
|
4241
|
-
var canonicalReference = /* @__PURE__ */ __name((text7) => formatReference(parseReference(text7)), "canonicalReference");
|
|
4242
|
-
var looksLikeReference = /* @__PURE__ */ __name((text7) => {
|
|
4243
|
-
const match = /^([a-z]+):\S+$/.exec(text7.trim());
|
|
4244
|
-
return match !== null && byPrefix.has(match[1]);
|
|
4245
|
-
}, "looksLikeReference");
|
|
4246
|
-
|
|
4247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
4248
|
-
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events", "crm"];
|
|
4249
|
-
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
4250
|
-
var PROVIDERS = [
|
|
4251
|
-
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
4252
|
-
{ name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
|
|
4253
|
-
{ name: "max", kind: "messages", aliases: [], command: "max", opens: MESSENGER_OPENS },
|
|
4254
|
-
{ name: "max-bot", kind: "messages", aliases: [] },
|
|
4255
|
-
{ name: "whatsapp", kind: "messages", aliases: ["wa"], command: "wa", opens: MESSENGER_OPENS },
|
|
4256
|
-
{ name: "whatsapp-bot", kind: "messages", aliases: ["wa-bot"] },
|
|
4257
|
-
{ name: "email", kind: "mail", aliases: [] },
|
|
4258
|
-
{ name: "notes", kind: "notes", aliases: [] },
|
|
4259
|
-
{ name: "local", kind: "notes", aliases: [] },
|
|
4260
|
-
{ name: "obsidian", kind: "notes", aliases: [] },
|
|
4261
|
-
{ name: "added", kind: "notes", aliases: [] },
|
|
4262
|
-
{ name: "zoom", kind: "meetings", aliases: [] },
|
|
4263
|
-
{ name: "google-meet", kind: "meetings", aliases: [], command: "gmeet" },
|
|
4264
|
-
// Its meetings come from the notes Telemost mails (`keeper@telemost.yandex.ru`), read by a mail rule.
|
|
4265
|
-
{ name: "telemost", kind: "meetings", aliases: [] },
|
|
4266
|
-
// A phone export's records: its SMS and its calls in the one account the import names.
|
|
4267
|
-
{ name: "phone", kind: "messages", kinds: ["messages", "events"], aliases: [], imported: true },
|
|
4268
|
-
// Any other import: a folder of notes, a CRM's export, a script's records, under `import:<what it is>`.
|
|
4269
|
-
{ name: "import", kind: "documents", kinds: ["documents", "messages", "events"], aliases: [], imported: true }
|
|
4270
|
-
];
|
|
4271
|
-
var LABELS = {
|
|
4272
|
-
telegram: "Telegram",
|
|
4273
|
-
"telegram-bot": "Telegram bot",
|
|
4274
|
-
max: "MAX",
|
|
4275
|
-
"max-bot": "MAX bot",
|
|
4276
|
-
whatsapp: "WhatsApp",
|
|
4277
|
-
"whatsapp-bot": "WhatsApp bot",
|
|
4278
|
-
"google-drive": "Google Drive",
|
|
4279
|
-
"google-meet": "Google Meet",
|
|
4280
|
-
added: "added by hand",
|
|
4281
|
-
email: "mail",
|
|
4282
|
-
telemost: "Telemost"
|
|
4283
|
-
};
|
|
4284
|
-
var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
|
|
4285
|
-
var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
|
|
4286
|
-
var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
|
|
4287
|
-
var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
|
|
4288
|
-
var folderProviderOf = /* @__PURE__ */ __name((format) => format === "markdown" ? "local" : "obsidian", "folderProviderOf");
|
|
4289
|
-
var DOCUMENT_ACCOUNT_PROVIDERS = ["google-drive"];
|
|
4290
|
-
var isDocumentAccountProvider = /* @__PURE__ */ __name((provider) => DOCUMENT_ACCOUNT_PROVIDERS.includes(provider), "isDocumentAccountProvider");
|
|
4291
|
-
var ADDED_PROVIDER = "added";
|
|
4292
|
-
var ADDED_ACCOUNT = "owner";
|
|
4293
|
-
var notAdded = `d.account_id NOT IN (SELECT id FROM accounts WHERE provider = '${ADDED_PROVIDER}')`;
|
|
4294
|
-
var filesAccountSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${[...FOLDER_PROVIDERS, ...DOCUMENT_ACCOUNT_PROVIDERS, ADDED_PROVIDER].map((name) => `'${name}'`).join(", ")})`, "filesAccountSql");
|
|
4295
|
-
var INTERNAL_NOTES = "internal";
|
|
4296
|
-
var UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
|
|
4297
|
-
var WORD = /^[a-z0-9][a-z0-9_-]*$/;
|
|
4298
|
-
var invalid5 = /* @__PURE__ */ __name((message) => {
|
|
4299
|
-
throw new CliError("validation_error", message);
|
|
4300
|
-
}, "invalid");
|
|
4301
|
-
var wordOf = /* @__PURE__ */ __name((value, what) => typeof value === "string" && WORD.test(value) ? value : invalid5(`${what} is lowercase letters, digits, - and _ \u2014 not ${JSON.stringify(value)}`), "wordOf");
|
|
4302
|
-
var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
|
|
4303
|
-
var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
|
|
4304
|
-
var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
4305
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
4306
|
-
return invalid5(`provider ${named}'s opens maps a kind of reference to a command`);
|
|
4307
|
-
const known = Object.entries(value).filter(([kind3]) => OPEN_KINDS.has(kind3));
|
|
4308
|
-
for (const [kind3, command] of known)
|
|
4309
|
-
if (typeof command !== "string" || !COMMAND_WORDS.test(command))
|
|
4310
|
-
invalid5(`provider ${named} opens a ${kind3} with command words, not ${JSON.stringify(command)}`);
|
|
4311
|
-
return Object.fromEntries(known);
|
|
4312
|
-
}, "opensOf");
|
|
4313
|
-
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
4314
|
-
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
4315
|
-
return invalid5("a provider entry is an object");
|
|
4316
|
-
const { name, kind: kind3, kinds, aliases = [], command, opens, imported } = value;
|
|
4317
|
-
const named = wordOf(name, "a provider's name");
|
|
4318
|
-
const isKindWord = /* @__PURE__ */ __name((one) => typeof one === "string" && KINDS.includes(one), "isKindWord");
|
|
4319
|
-
const given = kinds === void 0 ? [kind3] : Array.isArray(kinds) && kinds.length > 0 ? kinds : [void 0];
|
|
4320
|
-
for (const one of given)
|
|
4321
|
-
if (!isKindWord(one))
|
|
4322
|
-
invalid5(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(one)}`);
|
|
4323
|
-
const list = [...new Set(given)];
|
|
4324
|
-
if (kind3 !== void 0 && kind3 !== list[0])
|
|
4325
|
-
invalid5(`provider ${named}'s kind is the first of its kinds`);
|
|
4326
|
-
if (!Array.isArray(aliases))
|
|
4327
|
-
invalid5(`provider ${named}'s aliases are a list`);
|
|
4328
|
-
if (imported !== void 0 && typeof imported !== "boolean")
|
|
4329
|
-
invalid5(`provider ${named}'s imported is true or false`);
|
|
4330
|
-
return {
|
|
4331
|
-
name: named,
|
|
4332
|
-
kind: list[0],
|
|
4333
|
-
...list.length > 1 ? { kinds: list } : {},
|
|
4334
|
-
...imported === true ? { imported: true } : {},
|
|
4335
|
-
aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
|
|
4336
|
-
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
|
|
4337
|
-
...opens === void 0 ? {} : { opens: opensOf(opens, named) }
|
|
4338
|
-
};
|
|
4339
|
-
}, "providerEntryOf");
|
|
4340
|
-
var kindsOfEntry = /* @__PURE__ */ __name((entry) => entry.kinds ?? [entry.kind], "kindsOfEntry");
|
|
4341
|
-
var describe = /* @__PURE__ */ __name((entry) => `${entry.name} (${kindsOfEntry(entry).join(", ")}${entry.command ? `, from ${entry.command}` : ""})`, "describe");
|
|
4342
|
-
var unitedKinds = /* @__PURE__ */ __name((known, entry) => [
|
|
4343
|
-
.../* @__PURE__ */ new Set([...known, ...entry])
|
|
4344
|
-
], "unitedKinds");
|
|
4345
|
-
var wordsOf = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
|
|
4346
|
-
var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
4347
|
-
const same = known.find(({ name }) => name === entry.name);
|
|
4348
|
-
const kinds = same ? unitedKinds(kindsOfEntry(same), kindsOfEntry(entry)) : kindsOfEntry(entry);
|
|
4349
|
-
if (same && same.kind !== entry.kind)
|
|
4350
|
-
invalid5(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
|
|
4351
|
-
if (same && entry.imported === true && same.imported !== true)
|
|
4352
|
-
invalid5(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
4353
|
-
const merged = same ? {
|
|
4354
|
-
...same,
|
|
4355
|
-
...kinds.length > 1 ? { kinds } : {},
|
|
4356
|
-
aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
|
|
4357
|
-
...entry.command ? { command: entry.command } : {},
|
|
4358
|
-
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
|
|
4359
|
-
} : entry;
|
|
4360
|
-
const others = known.filter((one) => one !== same);
|
|
4361
|
-
for (const word of wordsOf(merged)) {
|
|
4362
|
-
const owner = others.find((one) => wordsOf(one).includes(word));
|
|
4363
|
-
if (owner)
|
|
4364
|
-
invalid5(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
|
|
4365
|
-
}
|
|
4366
|
-
return same ? known.map((one) => one === same ? merged : one) : [...known, merged];
|
|
4367
|
-
}, "joined");
|
|
4368
|
-
var registry = PROVIDERS;
|
|
4369
|
-
var providers = /* @__PURE__ */ __name(() => registry, "providers");
|
|
4370
|
-
var useStoredProviders = /* @__PURE__ */ __name((entries) => {
|
|
4371
|
-
const left = [];
|
|
4372
|
-
registry = entries.reduce((known, entry) => {
|
|
4373
|
-
try {
|
|
4374
|
-
return joined(known, providerEntryOf(entry));
|
|
4375
|
-
} catch (error) {
|
|
4376
|
-
if (!(error instanceof CliError))
|
|
4377
|
-
throw error;
|
|
4378
|
-
left.push(entry);
|
|
4379
|
-
return known;
|
|
4380
|
-
}
|
|
4381
|
-
}, PROVIDERS);
|
|
4382
|
-
return left;
|
|
4383
|
-
}, "useStoredProviders");
|
|
4384
|
-
var addProvider = /* @__PURE__ */ __name((entry) => {
|
|
4385
|
-
registry = joined(registry, providerEntryOf(entry));
|
|
4386
|
-
}, "addProvider");
|
|
4387
|
-
var isKind = /* @__PURE__ */ __name((word) => KINDS.includes(word.toLowerCase()), "isKind");
|
|
4388
|
-
var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
4389
|
-
const wanted = word.toLowerCase();
|
|
4390
|
-
return registry.find((entry) => wordsOf(entry).includes(wanted));
|
|
4391
|
-
}, "providerNamed");
|
|
4392
|
-
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
4393
|
-
var kindsIn = /* @__PURE__ */ __name((provider) => {
|
|
4394
|
-
if (isFolderProvider(provider))
|
|
4395
|
-
return ["notes"];
|
|
4396
|
-
const entry = registry.find(({ name }) => name === provider);
|
|
4397
|
-
if (!entry)
|
|
4398
|
-
return [];
|
|
4399
|
-
return entry.imported ? unitedKinds(kindsOfEntry(entry), ["documents"]) : kindsOfEntry(entry);
|
|
4400
|
-
}, "kindsIn");
|
|
4401
|
-
var importedOf = /* @__PURE__ */ __name((entry, held) => {
|
|
4402
|
-
const builtIn = PROVIDERS.find(({ name }) => name === entry.name);
|
|
4403
|
-
if (builtIn) {
|
|
4404
|
-
if (entry.imported === true && builtIn.imported !== true)
|
|
4405
|
-
invalid5(`provider ${entry.name} is synced, so an entry cannot make it import-only`);
|
|
4406
|
-
return builtIn.imported === true;
|
|
4407
|
-
}
|
|
4408
|
-
if (held === void 0)
|
|
4409
|
-
return entry.imported === true;
|
|
4410
|
-
if (entry.imported === true && held.imported !== true)
|
|
4411
|
-
invalid5(`provider ${entry.name} was registered without imported: an entry cannot make it import-only later`);
|
|
4412
|
-
return held.imported === true;
|
|
4413
|
-
}, "importedOf");
|
|
4414
|
-
var isImportedProvider = /* @__PURE__ */ __name((provider) => registry.find(({ name }) => name === provider)?.imported === true, "isImportedProvider");
|
|
4415
|
-
var holdsKind = /* @__PURE__ */ __name((provider, kind3) => kindsIn(provider).includes(kind3), "holdsKind");
|
|
4416
|
-
var holdsKindOf = /* @__PURE__ */ __name((provider, kind3) => kindIn(provider) === void 0 ? kind3 === "messages" : holdsKind(provider, kind3), "holdsKindOf");
|
|
4417
|
-
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
4418
|
-
|
|
4419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
4420
|
-
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
4421
|
-
var inSource = /* @__PURE__ */ __name((source, provider) => source === "all" || source === "bots" && isBotProvider(provider) || source === "personal" && !isBotProvider(provider) || source === provider || providerNamed(source)?.name === provider || isKind(source) && holdsKindOf(provider, source), "inSource");
|
|
4422
|
-
var fail = /* @__PURE__ */ __name((message) => {
|
|
4423
|
-
throw new CliError("validation_error", message);
|
|
4424
|
-
}, "fail");
|
|
4425
|
-
var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
4426
|
-
const sources = [...providers2, "personal", "bots", "all"];
|
|
4427
|
-
const source = value.toLowerCase();
|
|
4428
|
-
if (sources.includes(source))
|
|
4429
|
-
return source;
|
|
4430
|
-
if (source === "mail")
|
|
4431
|
-
return "email";
|
|
4432
|
-
if (source === "messages")
|
|
4433
|
-
return source;
|
|
4434
|
-
if (isKind(source))
|
|
4435
|
-
fail(`${name}${source} names ${source}, which a message search does not read \u2014 search ${source === "meetings" || source === "events" ? `all --source ${source}` : "notes"} does`);
|
|
4436
|
-
const named = providerNamed(source);
|
|
4437
|
-
if (named && providers2.includes(named.name))
|
|
4438
|
-
return named.name;
|
|
4439
|
-
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
4440
|
-
}, "sourceOf");
|
|
4441
|
-
|
|
4442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
4443
|
-
var ACCOUNT_GROUPS = "accountGroups";
|
|
4444
|
-
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
4445
|
-
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
4446
|
-
var fail2 = /* @__PURE__ */ __name((message) => {
|
|
4447
|
-
throw new CliError("validation_error", message);
|
|
4448
|
-
}, "fail");
|
|
4449
|
-
var isAccountList = /* @__PURE__ */ __name((value) => value.includes(",") || value.includes(":"), "isAccountList");
|
|
4450
|
-
var itemsOf = /* @__PURE__ */ __name((value) => {
|
|
4451
|
-
const items = value.split(",").map((item) => item.trim());
|
|
4452
|
-
if (items.some((item) => item === ""))
|
|
4453
|
-
fail2(`"${value}" has an empty entry \u2014 separate accounts with one comma`);
|
|
4454
|
-
return items;
|
|
4455
|
-
}, "itemsOf");
|
|
4456
|
-
var isGroupName = /* @__PURE__ */ __name((name) => GROUP_NAME.test(name), "isGroupName");
|
|
4457
|
-
var groupName = /* @__PURE__ */ __name((name) => isGroupName(name) ? name : fail2(`a group name is letters, digits, - and _ \u2014 not "${name}"`), "groupName");
|
|
4458
|
-
var groupMembers = /* @__PURE__ */ __name((value) => itemsOf(value).map((item) => item.toLowerCase().startsWith("group:") ? fail2(`a group lists accounts, not other groups \u2014 "${item}"`) : item.includes(":") && item.split(":")[1] === "" ? fail2(`"${item}" names no account after the colon`) : item), "groupMembers");
|
|
4459
|
-
var describe2 = /* @__PURE__ */ __name((accounts) => accounts.map(({ provider, account, name }) => `${provider}:${account}${name ? ` (${name})` : ""}`).join(", "), "describe");
|
|
4460
|
-
var listedHolds = /* @__PURE__ */ __name((account, kind3) => (account.kinds ?? (account.kind === void 0 ? [] : [account.kind])).includes(kind3), "listedHolds");
|
|
4461
|
-
var kindHere = /* @__PURE__ */ __name((provider, running) => provider === running.provider ? kindOf(provider) : kindIn(provider), "kindHere");
|
|
4462
|
-
var kindsOfHere = /* @__PURE__ */ __name((provider, running) => {
|
|
4463
|
-
const kinds = kindsIn(provider);
|
|
4464
|
-
return { kind: kindHere(provider, running), ...kinds.length > 1 ? { kinds } : {} };
|
|
4465
|
-
}, "kindsOfHere");
|
|
4466
|
-
var heldOf = /* @__PURE__ */ __name((stored, running) => [
|
|
4467
|
-
...stored.filter(({ provider }) => kindIn(provider) !== "notes" && !isDocumentAccountProvider(provider)).map(({ provider, account, name }) => ({ provider, account, name, ...kindsOfHere(provider, running) })),
|
|
4468
|
-
{ provider: "notes", account: INTERNAL_NOTES, name: null, kind: "notes" },
|
|
4469
|
-
...stored.filter(({ provider }) => isFolderProvider(provider)).map(({ id: id5, name, provider, account }) => ({
|
|
4470
|
-
provider: "notes",
|
|
4471
|
-
account: String(id5),
|
|
4472
|
-
name,
|
|
4473
|
-
kind: "notes",
|
|
4474
|
-
stored: { provider, account }
|
|
4475
|
-
})),
|
|
4476
|
-
...stored.filter(({ provider }) => isDocumentAccountProvider(provider) || provider === ADDED_PROVIDER).map(({ id: id5, provider, account, name }) => ({
|
|
4477
|
-
provider: "notes",
|
|
4478
|
-
account: String(id5),
|
|
4479
|
-
name,
|
|
4480
|
-
kind: "notes",
|
|
4481
|
-
stored: { provider, account }
|
|
3567
|
+
var ref = /* @__PURE__ */ __name((accountId, meetingId) => formatMeetingReference({ type: "meeting", accountId, meetingId }), "ref");
|
|
3568
|
+
var meetingTagChangeItem = /* @__PURE__ */ __name((change) => ({
|
|
3569
|
+
tags: change.tags,
|
|
3570
|
+
matched: change.matched,
|
|
3571
|
+
changed: change.changed.map(({ meetingId, tags }) => ({
|
|
3572
|
+
meeting: ref(change.accountId, meetingId),
|
|
3573
|
+
meeting_id: meetingId,
|
|
3574
|
+
tags
|
|
4482
3575
|
}))
|
|
4483
|
-
|
|
4484
|
-
var
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
return wanted;
|
|
4493
|
-
const named = providerNamed(wanted);
|
|
4494
|
-
if (named)
|
|
4495
|
-
return named.name;
|
|
4496
|
-
const recorded = Object.values(profiles[wanted] ?? {})[0];
|
|
4497
|
-
if (recorded)
|
|
4498
|
-
return recorded.provider;
|
|
4499
|
-
return fail2(`${prefix} is not a provider \u2014 they are ${registry2()}; the store holds ${providers2.join(", ")}`);
|
|
4500
|
-
}, "providerOf");
|
|
4501
|
-
var profilesOf = /* @__PURE__ */ __name((provider, profiles) => Object.values(profiles).flatMap((named) => Object.entries(named).filter(([, key]) => key.provider === provider)), "profilesOf");
|
|
4502
|
-
var accountOf = /* @__PURE__ */ __name((prefix, ref, held, context3) => {
|
|
4503
|
-
const provider = providerOf(prefix, held, context3);
|
|
4504
|
-
if (isDocumentAccountProvider(provider) && !context3.profiles[prefix.toLowerCase()]?.[ref]) {
|
|
4505
|
-
const stored = storedAs(held, { provider, account: ref })[0];
|
|
4506
|
-
if (stored)
|
|
4507
|
-
return stored;
|
|
4508
|
-
}
|
|
4509
|
-
const folder = isFolderProvider(provider);
|
|
4510
|
-
const ofProvider = folder ? storedAs(held, { provider, account: "" }) : held.filter((one) => one.provider === provider);
|
|
4511
|
-
const byId = ofProvider.find(({ account, stored }) => account === ref || account === ref.toLowerCase() || folder && stored?.account === ref.toUpperCase());
|
|
4512
|
-
if (byId)
|
|
4513
|
-
return byId;
|
|
4514
|
-
const keyed = /* @__PURE__ */ __name((key) => ofProvider.find(({ account }) => account === key.account) ?? {
|
|
4515
|
-
...key,
|
|
4516
|
-
name: null,
|
|
4517
|
-
...kindsOfHere(key.provider, context3.running)
|
|
4518
|
-
}, "keyed");
|
|
4519
|
-
const recorded = context3.profiles[prefix.toLowerCase()]?.[ref];
|
|
4520
|
-
if (recorded && isFolderProvider(recorded.provider)) {
|
|
4521
|
-
const folder2 = held.find((one) => one.provider === "notes" && one.name === recorded.account);
|
|
4522
|
-
if (folder2)
|
|
4523
|
-
return folder2;
|
|
4524
|
-
return fail2(`no stored folder for ${prefix}:${ref}; sync that profile first`);
|
|
4525
|
-
}
|
|
4526
|
-
if (recorded && isDocumentAccountProvider(recorded.provider)) {
|
|
4527
|
-
const account = storedAs(held, recorded)[0];
|
|
4528
|
-
if (account)
|
|
4529
|
-
return account;
|
|
4530
|
-
return fail2(`no stored documents for ${prefix}:${ref}; sync that profile first`);
|
|
4531
|
-
}
|
|
4532
|
-
if (recorded)
|
|
4533
|
-
return keyed(recorded);
|
|
4534
|
-
const byProfile = [
|
|
4535
|
-
...new Map(profilesOf(provider, context3.profiles).filter(([name]) => name === ref).map(([, key]) => [key.account, key])).values()
|
|
4536
|
-
];
|
|
4537
|
-
if (byProfile.length === 1)
|
|
4538
|
-
return keyed(byProfile[0]);
|
|
4539
|
-
const byName = ofProvider.filter(({ name }) => name?.toLowerCase() === ref.toLowerCase());
|
|
4540
|
-
if (byName.length === 1)
|
|
4541
|
-
return byName[0];
|
|
4542
|
-
if (byName.length > 1 || byProfile.length > 1)
|
|
4543
|
-
fail2(`${provider}:${ref} names more than one account \u2014 use the id: ${describe2(ofProvider)}`);
|
|
4544
|
-
const names = profilesOf(provider, context3.profiles).map(([name]) => name);
|
|
4545
|
-
return fail2(`no ${provider} account "${ref}" \u2014 the store holds ${describe2(ofProvider) || "none"}` + (names.length ? `; profiles: ${[...new Set(names)].join(", ")}` : ""));
|
|
4546
|
-
}, "accountOf");
|
|
4547
|
-
var accountsOfWord = /* @__PURE__ */ __name((word, held, context3) => {
|
|
4548
|
-
const wanted = word.toLowerCase();
|
|
4549
|
-
if (wanted === "all")
|
|
4550
|
-
return [...held];
|
|
4551
|
-
if (wanted === "personal" || wanted === "bots")
|
|
4552
|
-
return held.filter((one) => listedHolds(one, "messages") && isBotProvider(one.provider) === (wanted === "bots"));
|
|
4553
|
-
if (isKind(wanted))
|
|
4554
|
-
return held.filter((one) => listedHolds(one, wanted));
|
|
4555
|
-
const recorded = context3.profiles[wanted];
|
|
4556
|
-
if (recorded && Object.values(recorded).every((key) => isFolderProvider(key.provider) || isDocumentAccountProvider(key.provider)))
|
|
4557
|
-
return Object.keys(recorded).map((profile) => accountOf(word, profile, held, context3));
|
|
4558
|
-
const provider = providerOf(word, held, context3);
|
|
4559
|
-
if (isDocumentAccountProvider(provider) || isFolderProvider(provider))
|
|
4560
|
-
return storedAs(held, { provider, account: "" });
|
|
4561
|
-
return held.filter((one) => one.provider === provider);
|
|
4562
|
-
}, "accountsOfWord");
|
|
4563
|
-
var keyOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "keyOf");
|
|
4564
|
-
var sourceOf2 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "sourceOf");
|
|
4565
|
-
var sameAs = /* @__PURE__ */ __name((key) => (one) => one.provider === key.provider && one.account === key.account, "sameAs");
|
|
4566
|
-
var entriesOfList = /* @__PURE__ */ __name((value, context3) => {
|
|
4567
|
-
const held = heldOf(context3.held, context3.running);
|
|
4568
|
-
const entries = [];
|
|
4569
|
-
const entry = /* @__PURE__ */ __name((item, group) => {
|
|
4570
|
-
const colon = item.indexOf(":");
|
|
4571
|
-
if (colon === -1) {
|
|
4572
|
-
try {
|
|
4573
|
-
entries.push({ entry: item, accounts: accountsOfWord(item, held, context3) });
|
|
4574
|
-
} catch (error) {
|
|
4575
|
-
if (!group || !(error instanceof CliError))
|
|
4576
|
-
throw error;
|
|
4577
|
-
fail2(`"${item}" in group ${group}: ${error.message}`);
|
|
4578
|
-
}
|
|
4579
|
-
return;
|
|
4580
|
-
}
|
|
4581
|
-
const prefix = item.slice(0, colon);
|
|
4582
|
-
const ref = item.slice(colon + 1).trim();
|
|
4583
|
-
if (ref === "")
|
|
4584
|
-
fail2(`"${item}" names no account after the colon`);
|
|
4585
|
-
if (prefix.toLowerCase() === "group") {
|
|
4586
|
-
if (group)
|
|
4587
|
-
fail2(`group ${group} lists another group \u2014 a group lists accounts`);
|
|
4588
|
-
const members = context3.groups[ref];
|
|
4589
|
-
if (!members) {
|
|
4590
|
-
const known = Object.keys(context3.groups);
|
|
4591
|
-
fail2(`no account group "${ref}" \u2014 ${known.length ? `there are ${known.join(", ")}` : "none saved yet"}; \`config set ${ACCOUNT_GROUPS_SETTING}.${ref} <accounts>\` saves one`);
|
|
4592
|
-
}
|
|
4593
|
-
for (const member of members)
|
|
4594
|
-
entry(member, ref);
|
|
4595
|
-
return;
|
|
4596
|
-
}
|
|
4597
|
-
entries.push({ entry: item, accounts: [accountOf(prefix, ref, held, context3)] });
|
|
4598
|
-
}, "entry");
|
|
4599
|
-
for (const item of itemsOf(value))
|
|
4600
|
-
entry(item);
|
|
4601
|
-
const { only } = context3;
|
|
4602
|
-
return entries.map(({ entry: entry2, accounts }) => ({
|
|
4603
|
-
entry: entry2,
|
|
4604
|
-
accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind: kind3, kinds }) => ({
|
|
4605
|
-
provider,
|
|
4606
|
-
account,
|
|
4607
|
-
kind: kind3,
|
|
4608
|
-
...kinds === void 0 ? {} : { kinds }
|
|
4609
|
-
}))
|
|
4610
|
-
}));
|
|
4611
|
-
}, "entriesOfList");
|
|
4612
|
-
var accountsOfList = /* @__PURE__ */ __name((value, context3) => {
|
|
4613
|
-
const chosen = /* @__PURE__ */ new Map();
|
|
4614
|
-
for (const { accounts } of entriesOfList(value, context3))
|
|
4615
|
-
for (const one of accounts)
|
|
4616
|
-
if (!chosen.has(keyOf(one)))
|
|
4617
|
-
chosen.set(keyOf(one), one);
|
|
4618
|
-
return [...chosen.values()];
|
|
4619
|
-
}, "accountsOfList");
|
|
4620
|
-
var READS = {
|
|
4621
|
-
messages: "messenger messages \u2014 search messages reads them",
|
|
4622
|
-
mail: "a mailbox \u2014 memo search mail reads it",
|
|
4623
|
-
notes: "notes \u2014 search notes reads them",
|
|
4624
|
-
documents: "documents \u2014 search notes reads them",
|
|
4625
|
-
meetings: "meetings \u2014 search all reads them",
|
|
4626
|
-
events: "calendar events \u2014 no search reads them yet",
|
|
4627
|
-
crm: "CRM deals and leads \u2014 search all reads them"
|
|
4628
|
-
};
|
|
4629
|
-
var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf2 = (kind3) => READS[kind3], alsoFits = () => false) => {
|
|
4630
|
-
const chosen = /* @__PURE__ */ new Map();
|
|
4631
|
-
const skipped = [];
|
|
4632
|
-
for (const { entry, accounts } of entries) {
|
|
4633
|
-
const fits = accounts.filter((one) => kinds.some((kind3) => listedHolds(one, kind3)) || alsoFits(one));
|
|
4634
|
-
for (const { provider, account } of fits)
|
|
4635
|
-
if (!chosen.has(keyOf({ provider, account })))
|
|
4636
|
-
chosen.set(keyOf({ provider, account }), { provider, account });
|
|
4637
|
-
const known = accounts.filter(({ kind: kind3 }) => kind3 !== void 0);
|
|
4638
|
-
const unknown2 = accounts.filter((one) => one.kind === void 0 && !alsoFits(one));
|
|
4639
|
-
if (known.length)
|
|
4640
|
-
for (const { provider, account } of unknown2)
|
|
4641
|
-
skipped.push({ source: `${provider}:${account}`, code: "not_found", reason: UNKNOWN_PROVIDER });
|
|
4642
|
-
if (fits.length)
|
|
4643
|
-
continue;
|
|
4644
|
-
const other = known[0];
|
|
4645
|
-
skipped.push(other?.kind ? { source: entry, code: "validation_error", reason: reasonOf2(other.kind) } : unknown2.length ? { source: entry, code: "not_found", reason: UNKNOWN_PROVIDER } : { source: entry, code: "not_found", reason: "no account in the store" });
|
|
4646
|
-
}
|
|
4647
|
-
if (chosen.size === 0)
|
|
4648
|
-
fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}`);
|
|
4649
|
-
return { accounts: [...chosen.values()], skipped };
|
|
4650
|
-
}, "fitting");
|
|
4651
|
-
|
|
4652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/deals.js
|
|
4653
|
-
var DEAL_KINDS = ["deal", "lead"];
|
|
4654
|
-
var DEAL_STATUSES = ["open", "won", "lost"];
|
|
4655
|
-
var STAGE_OUTCOMES = DEAL_STATUSES;
|
|
4656
|
-
var DEAL_ROLES = ["owner", "contact", "decision-maker", "influencer"];
|
|
4657
|
-
var dealLine = /* @__PURE__ */ __name((deal) => {
|
|
4658
|
-
const money = deal.amount === null || deal.currency === null ? "" : `, ${moneyLabel(deal.amount, deal.currency)}`;
|
|
4659
|
-
return `${deal.title} \xB7 ${deal.stage}${money}${deal.status === "open" ? "" : ` (${deal.status})`}`;
|
|
4660
|
-
}, "dealLine");
|
|
4661
|
-
|
|
4662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/orders.js
|
|
4663
|
-
var ORDER_STATUSES = ["placed", "shipped", "delivered", "cancelled", "returned"];
|
|
4664
|
-
var ORDER_PURPOSES = ["personal", "business", "client", "other"];
|
|
4665
|
-
var orderLine = /* @__PURE__ */ __name((order) => {
|
|
4666
|
-
const party = order.direction === "sale" && order.customerName !== null ? `to ${order.customerName}` : order.supplierName;
|
|
4667
|
-
const money = order.total === null || order.currency === null ? "" : `, ${moneyLabel(order.total, order.currency)}`;
|
|
4668
|
-
const notes2 = [order.status, order.review === "confirmed" ? null : order.review].filter(Boolean).join(", ");
|
|
4669
|
-
return `${order.number ?? `#${order.id}`} \xB7 ${party}${money} (${notes2})`;
|
|
4670
|
-
}, "orderLine");
|
|
4671
|
-
var orderTitle = /* @__PURE__ */ __name((order) => `Order ${orderLine(order)}`, "orderTitle");
|
|
4672
|
-
|
|
4673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/relations.js
|
|
4674
|
-
var ORGANIZATION_ROLES = [
|
|
4675
|
-
"employee",
|
|
4676
|
-
"contractor",
|
|
4677
|
-
"founder",
|
|
4678
|
-
"owner",
|
|
4679
|
-
"manager",
|
|
4680
|
-
"adviser",
|
|
4681
|
-
"contact"
|
|
4682
|
-
];
|
|
4683
|
-
var PROJECT_ROLES = ["owner", "manager", "contributor", "client-contact", "approver"];
|
|
4684
|
-
var CONTRACT_ROLES = ["customer", "supplier", "signatory", "guarantor"];
|
|
4685
|
-
var RELATED_ROLES = ["colleague", "adviser", "investor", "mentor", "family", "friend"];
|
|
4686
|
-
var ENGAGEMENT_LEVELS = ["none", "low", "medium", "high"];
|
|
4687
|
-
var isEngagement = /* @__PURE__ */ __name((value) => typeof value === "string" && ENGAGEMENT_LEVELS.includes(value), "isEngagement");
|
|
4688
|
-
var checkEngagement = /* @__PURE__ */ __name((kind3, from, to, level) => {
|
|
4689
|
-
if (kind3 !== "member-of" || from !== "person" || to !== "project")
|
|
4690
|
-
throw new CliError("validation_error", "an engagement level is set only on a person's member-of a project", {
|
|
4691
|
-
reason: "relationship.engagement-ends"
|
|
4692
|
-
});
|
|
4693
|
-
if (!isEngagement(level))
|
|
4694
|
-
throw new CliError("validation_error", `an engagement level is one of ${ENGAGEMENT_LEVELS.join(", ")}`, {
|
|
4695
|
-
reason: "relationship.engagement-unknown"
|
|
4696
|
-
});
|
|
4697
|
-
return level;
|
|
4698
|
-
}, "checkEngagement");
|
|
4699
|
-
var RELATIONS = {
|
|
4700
|
-
"member-of": {
|
|
4701
|
-
from: ["person", "organization", "project", "chat", "email_thread"],
|
|
4702
|
-
to: ["organization", "project"],
|
|
4703
|
-
roles: { to: { organization: ORGANIZATION_ROLES, project: PROJECT_ROLES } }
|
|
4704
|
-
},
|
|
4705
|
-
"reports-to": { from: ["person"], to: ["person"], inverse: "manages" },
|
|
4706
|
-
"customer-of": { from: ["person", "organization"], to: ["organization"], inverse: "supplier of" },
|
|
4707
|
-
"partner-of": { from: ["organization"], to: ["organization"], symmetric: true },
|
|
4708
|
-
"related-to": {
|
|
4709
|
-
from: ["person", "organization", "project", "task", "deal", "lead", "contract"],
|
|
4710
|
-
to: ["person", "organization", "project", "task"],
|
|
4711
|
-
roles: { from: { deal: DEAL_ROLES, lead: DEAL_ROLES, contract: CONTRACT_ROLES } }
|
|
4712
|
-
}
|
|
4713
|
-
};
|
|
4714
|
-
var RELATION_KINDS = Object.keys(RELATIONS);
|
|
4715
|
-
var specOf = /* @__PURE__ */ __name((kind3) => Object.hasOwn(RELATIONS, kind3) ? RELATIONS[kind3] : void 0, "specOf");
|
|
4716
|
-
var isRelationKind = /* @__PURE__ */ __name((kind3) => specOf(kind3) !== void 0, "isRelationKind");
|
|
4717
|
-
var memberOnly = /* @__PURE__ */ __name((type) => type === "chat" || type === "email_thread", "memberOnly");
|
|
4718
|
-
var partyOnly = /* @__PURE__ */ __name((from, to) => from === "contract" && to !== "person" && to !== "organization", "partyOnly");
|
|
4719
|
-
var checkEnds = /* @__PURE__ */ __name((kind3, from, to) => {
|
|
4720
|
-
const spec = specOf(kind3);
|
|
4721
|
-
if (!spec)
|
|
4722
|
-
throw new CliError("validation_error", `a relationship's kind is one of ${RELATION_KINDS.join(", ")}`);
|
|
4723
|
-
if (memberOnly(from) && (kind3 !== "member-of" || to !== "project"))
|
|
4724
|
-
throw new CliError("validation_error", `a ${from === "chat" ? "chat" : "mail thread"} is related only as member-of a project`);
|
|
4725
|
-
if (partyOnly(from, to))
|
|
4726
|
-
throw new CliError("validation_error", "a contract is related only to a person or an organization");
|
|
4727
|
-
if (!spec.from.includes(from) || !spec.to.includes(to))
|
|
4728
|
-
throw new CliError("validation_error", `${kind3} joins ${spec.from.join(", ")} to ${spec.to.join(", ")}, not ${from} to ${to}`);
|
|
4729
|
-
return spec;
|
|
4730
|
-
}, "checkEnds");
|
|
4731
|
-
var isParty = /* @__PURE__ */ __name((type) => type === "person" || type === "organization", "isParty");
|
|
4732
|
-
var rolesOf = /* @__PURE__ */ __name((kind3, from, to) => {
|
|
4733
|
-
const spec = specOf(kind3);
|
|
4734
|
-
if (kind3 === "member-of" && from !== "person")
|
|
4735
|
-
return void 0;
|
|
4736
|
-
return spec?.roles?.from?.[from] ?? spec?.roles?.to?.[to];
|
|
4737
|
-
}, "rolesOf");
|
|
4738
|
-
var ROLE_LISTS = {
|
|
4739
|
-
organization: ORGANIZATION_ROLES,
|
|
4740
|
-
project: PROJECT_ROLES,
|
|
4741
|
-
deal: DEAL_ROLES,
|
|
4742
|
-
contract: CONTRACT_ROLES,
|
|
4743
|
-
related: RELATED_ROLES
|
|
4744
|
-
};
|
|
4745
|
-
var roleListOf = /* @__PURE__ */ __name((kind3, from, to) => {
|
|
4746
|
-
if (kind3 === "related-to" && isParty(from) && isParty(to))
|
|
4747
|
-
return "related";
|
|
4748
|
-
const roles = rolesOf(kind3, from, to);
|
|
4749
|
-
return Object.keys(ROLE_LISTS).find((list) => ROLE_LISTS[list] === roles);
|
|
4750
|
-
}, "roleListOf");
|
|
4751
|
-
var checkRole = /* @__PURE__ */ __name((kind3, from, to, role, extra = []) => {
|
|
4752
|
-
const roles = rolesOf(kind3, from, to)?.concat(extra);
|
|
4753
|
-
if (roles && !roles.includes(role))
|
|
4754
|
-
throw new CliError("validation_error", `a ${from}'s role on ${kind3} ${to} is one of ${roles.join(", ")}`, {
|
|
4755
|
-
reason: "relationship.role-unknown"
|
|
4756
|
-
});
|
|
4757
|
-
return role;
|
|
4758
|
-
}, "checkRole");
|
|
4759
|
-
var isSymmetric = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric === true, "isSymmetric");
|
|
4760
|
-
var inverseOf = /* @__PURE__ */ __name((kind3) => specOf(kind3)?.symmetric ? kind3 : specOf(kind3)?.inverse ?? null, "inverseOf");
|
|
4761
|
-
var STANDINGS = ["confirmed", "reported", "proposed", "ended"];
|
|
4762
|
-
var standingOf = /* @__PURE__ */ __name((link, now) => {
|
|
4763
|
-
if (link.endsAt != null && link.endsAt <= now)
|
|
4764
|
-
return "ended";
|
|
4765
|
-
if (link.confirmed)
|
|
4766
|
-
return "confirmed";
|
|
4767
|
-
if (link.deletedAt != null)
|
|
4768
|
-
return "ended";
|
|
4769
|
-
return link.accountId != null ? "reported" : "proposed";
|
|
4770
|
-
}, "standingOf");
|
|
4771
|
-
var isUsable = /* @__PURE__ */ __name((standing) => standing === "confirmed" || standing === "reported", "isUsable");
|
|
4772
|
-
var KEYED = "kind IN ('member-of', 'related-to', 'reports-to', 'customer-of', 'partner-of') AND to_id IS NOT NULL";
|
|
4773
|
-
var notOverriddenSql = /* @__PURE__ */ __name((alias) => `NOT EXISTS (SELECT 1 FROM links override WHERE ${KEYED} AND override.kind = ${alias}.kind AND override.from_type = ${alias}.from_type AND override.from_id = ${alias}.from_id AND override.to_type = ${alias}.to_type AND override.to_id = ${alias}.to_id AND json_extract(override.metadata, '$.overrides') = ${alias}.id)`, "notOverriddenSql");
|
|
4774
|
-
var usableLinkSql = /* @__PURE__ */ __name((alias, now) => `(${alias}.confirmed = 1 OR (${alias}.account_id IS NOT NULL AND ${alias}.deleted_at IS NULL))` + (now === void 0 ? "" : ` AND (${alias}.ends_at IS NULL OR ${alias}.ends_at > ${Math.trunc(now)})`), "usableLinkSql");
|
|
4775
|
-
|
|
4776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/crm.js
|
|
4777
|
-
var CRM_ACTIVITY_KINDS = ["call", "email", "meeting", "todo", "task", "comment", "other"];
|
|
4778
|
-
var isCrmUserId = /* @__PURE__ */ __name((id5) => /^\d{1,20}$/.test(id5), "isCrmUserId");
|
|
4779
|
-
var normalCrmUserId = /* @__PURE__ */ __name((id5) => {
|
|
4780
|
-
const text7 = id5.trim();
|
|
4781
|
-
return /^\d+$/.test(text7) ? text7.replace(/^0+(?=\d)/, "") : text7;
|
|
4782
|
-
}, "normalCrmUserId");
|
|
4783
|
-
var isItemKind = /* @__PURE__ */ __name((kind3) => kind3 === "deal" || kind3 === "lead", "isItemKind");
|
|
4784
|
-
|
|
4785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
4786
|
-
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
4787
|
-
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
4788
|
-
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
4789
|
-
const tag = value.trim().toLowerCase();
|
|
4790
|
-
return TAG.test(tag) ? tag : void 0;
|
|
4791
|
-
}, "tagOf");
|
|
4792
|
-
var normalizeTag = /* @__PURE__ */ __name((value) => {
|
|
4793
|
-
const tag = tagOf(value);
|
|
4794
|
-
if (tag === void 0)
|
|
4795
|
-
throw new CliError("validation_error", `"${singleLine(value)}" is not a tag \u2014 use 1\u201332 letters a\u2013z, digits and hyphens`, { reason: "tag.invalid" });
|
|
4796
|
-
return tag;
|
|
4797
|
-
}, "normalizeTag");
|
|
4798
|
-
|
|
4799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
|
|
4800
|
-
var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
|
|
4801
|
-
var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
4802
|
-
const reporter = row.account_id == null ? void 0 : "reporter" in row ? row.reporter : database.prepare("SELECT provider || ':' || external_id AS key FROM accounts WHERE id = ?").get(Number(row.account_id))?.key;
|
|
4803
|
-
return {
|
|
4804
|
-
...typeof reporter === "string" ? { account: reporter } : {},
|
|
4805
|
-
...typeof metadata.derived === "string" ? { derived: metadata.derived } : {}
|
|
4806
|
-
};
|
|
4807
|
-
}, "sourceOf");
|
|
4808
|
-
|
|
4809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
4810
|
-
var LINK_KINDS = [
|
|
4811
|
-
"links-to",
|
|
4812
|
-
"blocked-by",
|
|
4813
|
-
"follow-up-of",
|
|
4814
|
-
"about",
|
|
4815
|
-
"member-of",
|
|
4816
|
-
"labelled",
|
|
4817
|
-
"answered-by",
|
|
4818
|
-
"evidence",
|
|
4819
|
-
"created-from",
|
|
4820
|
-
"duplicate-of",
|
|
4821
|
-
"related-to",
|
|
4822
|
-
"reports-to",
|
|
4823
|
-
"customer-of",
|
|
4824
|
-
"partner-of",
|
|
4825
|
-
"assigned-to",
|
|
4826
|
-
"attached"
|
|
4827
|
-
];
|
|
4828
|
-
var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
|
|
4829
|
-
var LINK_SOURCES = [...LINK_ORIGINS, "calendar", "meeting"];
|
|
4830
|
-
var linkKind = /* @__PURE__ */ __name((kind3) => `'${kind3}'`, "linkKind");
|
|
4831
|
-
var COUNTERPART_ROLE = "counterpart";
|
|
3576
|
+
}), "meetingTagChangeItem");
|
|
3577
|
+
var meetingTaggingItem = /* @__PURE__ */ __name((one) => ({
|
|
3578
|
+
meeting: ref(one.accountId, one.meetingId),
|
|
3579
|
+
meeting_id: one.meetingId,
|
|
3580
|
+
title: one.title,
|
|
3581
|
+
started_at: one.startedAt === null ? null : new Date(one.startedAt).toISOString(),
|
|
3582
|
+
tags: one.tags,
|
|
3583
|
+
untrusted: ["title"]
|
|
3584
|
+
}), "meetingTaggingItem");
|
|
4832
3585
|
|
|
4833
3586
|
export {
|
|
4834
|
-
logAttributes,
|
|
4835
|
-
fromLogAttributes,
|
|
4836
|
-
snakeLogger,
|
|
4837
|
-
LOG_ATTRIBUTES,
|
|
4838
|
-
KEEP_RUNS_FOR_DAYS,
|
|
4839
|
-
KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
4840
|
-
KEEP_STORE_RUNS_FOR_DAYS,
|
|
4841
|
-
RUNS_SIZE_LIMIT_MB,
|
|
4842
|
-
runsDirFor,
|
|
4843
|
-
startRun,
|
|
4844
|
-
runtime,
|
|
4845
|
-
newRunId,
|
|
4846
|
-
listRuns,
|
|
4847
|
-
findRun,
|
|
4848
|
-
readEvents,
|
|
4849
|
-
pruneRuns,
|
|
4850
|
-
asOwnProcess,
|
|
4851
|
-
currentRun,
|
|
4852
|
-
inRun,
|
|
4853
|
-
runEvent,
|
|
4854
|
-
typedCommand,
|
|
4855
|
-
useAsProcessRun,
|
|
4856
|
-
processRun,
|
|
4857
|
-
enclosingTraceId,
|
|
4858
|
-
traceOf,
|
|
4859
|
-
childTrace,
|
|
4860
|
-
withAttempt,
|
|
4861
|
-
currentAttempt,
|
|
4862
3587
|
BACKENDS,
|
|
4863
3588
|
serviceCallsOf,
|
|
4864
3589
|
rangeOf,
|
|
4865
3590
|
windowOf,
|
|
3591
|
+
readsZone,
|
|
4866
3592
|
formatMeetingReference,
|
|
4867
3593
|
parseMeetingReference,
|
|
4868
3594
|
canonicalMeetingReference,
|
|
4869
3595
|
meeting,
|
|
4870
3596
|
MEETING_QUERY,
|
|
4871
3597
|
MEETING_DOCUMENT_ROLES,
|
|
3598
|
+
TRANSCRIPT_WORDS,
|
|
4872
3599
|
READ_BUDGET_EXCEEDED,
|
|
4873
3600
|
meetingHit,
|
|
4874
3601
|
meetingTranscript,
|
|
@@ -4879,8 +3606,16 @@ export {
|
|
|
4879
3606
|
joinUrlWithoutQuery,
|
|
4880
3607
|
calendarText,
|
|
4881
3608
|
entryMetadata,
|
|
3609
|
+
callOf,
|
|
3610
|
+
callStats,
|
|
3611
|
+
callStatsItem,
|
|
3612
|
+
aggregateMeetingCounts,
|
|
3613
|
+
aggregateMeetingStats,
|
|
3614
|
+
CALLBACK_WITHIN_MS,
|
|
3615
|
+
aggregateCallStats,
|
|
4882
3616
|
meetingCueFingerprint,
|
|
4883
3617
|
EVENT_QUERY,
|
|
3618
|
+
PARTICIPANT_RESPONSES,
|
|
4884
3619
|
entryInWindow,
|
|
4885
3620
|
normalizeMeetingParticipantQuery,
|
|
4886
3621
|
validateMeetingParticipantSearch,
|
|
@@ -4921,10 +3656,14 @@ export {
|
|
|
4921
3656
|
importFiles,
|
|
4922
3657
|
CHAT_MESSAGES_READ,
|
|
4923
3658
|
snapshotMeetingScope,
|
|
4924
|
-
|
|
3659
|
+
MEETING_FIELD_KEYS,
|
|
3660
|
+
MEETING_FIELDS2 as MEETING_FIELDS,
|
|
3661
|
+
meetingFieldFlag,
|
|
3662
|
+
SNAKE_CASE,
|
|
4925
3663
|
validateMeetingContextChange,
|
|
4926
3664
|
createMeetingContext,
|
|
4927
3665
|
meetingHitContextLimits,
|
|
3666
|
+
markedPassage,
|
|
4928
3667
|
validateMeetingPassage,
|
|
4929
3668
|
validateMeetingPreparationContext,
|
|
4930
3669
|
meetingProjectEvidence,
|
|
@@ -4952,179 +3691,8 @@ export {
|
|
|
4952
3691
|
SAVE_HELP,
|
|
4953
3692
|
validateMeetingSeriesHistory,
|
|
4954
3693
|
validateMeetingSeriesInventoryCursor,
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
ERASED_TEXT,
|
|
4960
|
-
severity,
|
|
4961
|
-
graver,
|
|
4962
|
-
text6 as text,
|
|
4963
|
-
id4 as id,
|
|
4964
|
-
time,
|
|
4965
|
-
zonedTime,
|
|
4966
|
-
count6 as count,
|
|
4967
|
-
untrusted,
|
|
4968
|
-
providerMetadata,
|
|
4969
|
-
evidenceSource,
|
|
4970
|
-
sourceReview,
|
|
4971
|
-
author,
|
|
4972
|
-
TASK_KINDS,
|
|
4973
|
-
TASK_STATES,
|
|
4974
|
-
CLOSED_STATES,
|
|
4975
|
-
TASK_ORIGINS,
|
|
4976
|
-
TASK_VERDICTS,
|
|
4977
|
-
isClosedState,
|
|
4978
|
-
PRIORITY_LABELS,
|
|
4979
|
-
priorityLabel,
|
|
4980
|
-
priorityBand,
|
|
4981
|
-
legacyPriority,
|
|
4982
|
-
checkedScore,
|
|
4983
|
-
priorityOf,
|
|
4984
|
-
priorityOption,
|
|
4985
|
-
createTaskService,
|
|
4986
|
-
matches,
|
|
4987
|
-
FACT_STATUSES,
|
|
4988
|
-
MEMORY_KINDS,
|
|
4989
|
-
MEMORY_STATUSES,
|
|
4990
|
-
MEMORY_SCOPES,
|
|
4991
|
-
WORK_TASK_TYPES,
|
|
4992
|
-
TASK_TYPES2 as TASK_TYPES,
|
|
4993
|
-
CATEGORIES,
|
|
4994
|
-
parseDecimal,
|
|
4995
|
-
formatDecimal,
|
|
4996
|
-
currencyOf,
|
|
4997
|
-
scaleOf,
|
|
4998
|
-
minorUnits,
|
|
4999
|
-
signedMinorUnits,
|
|
5000
|
-
moneyOf,
|
|
5001
|
-
moneyLabel,
|
|
5002
|
-
quantityOf,
|
|
5003
|
-
lineUnits,
|
|
5004
|
-
DEAL_KINDS,
|
|
5005
|
-
DEAL_STATUSES,
|
|
5006
|
-
STAGE_OUTCOMES,
|
|
5007
|
-
DEAL_ROLES,
|
|
5008
|
-
dealLine,
|
|
5009
|
-
INVOICE_DIRECTIONS,
|
|
5010
|
-
INVOICE_STATUSES,
|
|
5011
|
-
MONEY_DIRECTIONS,
|
|
5012
|
-
FINANCE_REVIEWS,
|
|
5013
|
-
settledStatus,
|
|
5014
|
-
invoiceLine,
|
|
5015
|
-
paymentLine,
|
|
5016
|
-
invoiceTitle,
|
|
5017
|
-
paymentEntryTitle,
|
|
5018
|
-
ORDER_STATUSES,
|
|
5019
|
-
ORDER_PURPOSES,
|
|
5020
|
-
orderLine,
|
|
5021
|
-
orderTitle,
|
|
5022
|
-
isEngagement,
|
|
5023
|
-
checkEngagement,
|
|
5024
|
-
RELATION_KINDS,
|
|
5025
|
-
isRelationKind,
|
|
5026
|
-
checkEnds,
|
|
5027
|
-
rolesOf,
|
|
5028
|
-
ROLE_LISTS,
|
|
5029
|
-
roleListOf,
|
|
5030
|
-
checkRole,
|
|
5031
|
-
isSymmetric,
|
|
5032
|
-
inverseOf,
|
|
5033
|
-
STANDINGS,
|
|
5034
|
-
standingOf,
|
|
5035
|
-
isUsable,
|
|
5036
|
-
KEYED,
|
|
5037
|
-
notOverriddenSql,
|
|
5038
|
-
usableLinkSql,
|
|
5039
|
-
CRM_ACTIVITY_KINDS,
|
|
5040
|
-
isCrmUserId,
|
|
5041
|
-
normalCrmUserId,
|
|
5042
|
-
isItemKind,
|
|
5043
|
-
organization,
|
|
5044
|
-
project,
|
|
5045
|
-
reminder,
|
|
5046
|
-
CATALOG_KINDS,
|
|
5047
|
-
BUSINESS_KINDS,
|
|
5048
|
-
CONTRACT_KINDS,
|
|
5049
|
-
CONTRACT_STATUSES,
|
|
5050
|
-
SUBSCRIPTION_STATUSES,
|
|
5051
|
-
WALLET_KINDS,
|
|
5052
|
-
TRANSACTION_STATUSES,
|
|
5053
|
-
ORDER_DIRECTIONS,
|
|
5054
|
-
intervalOf,
|
|
5055
|
-
productLine,
|
|
5056
|
-
contractLine,
|
|
5057
|
-
subscriptionLine,
|
|
5058
|
-
walletLine,
|
|
5059
|
-
transactionLine,
|
|
5060
|
-
TAG_TYPES,
|
|
5061
|
-
tagOf,
|
|
5062
|
-
normalizeTag,
|
|
5063
|
-
REPORTER_SQL,
|
|
5064
|
-
sourceOf3 as sourceOf,
|
|
5065
|
-
LINK_KINDS,
|
|
5066
|
-
LINK_ORIGINS,
|
|
5067
|
-
LINK_SOURCES,
|
|
5068
|
-
linkKind,
|
|
5069
|
-
COUNTERPART_ROLE,
|
|
5070
|
-
damageMarkPath,
|
|
5071
|
-
healthMarkPath,
|
|
5072
|
-
journalMarkPath,
|
|
5073
|
-
markStoreDamaged,
|
|
5074
|
-
readDamageMark,
|
|
5075
|
-
clearDamageMark,
|
|
5076
|
-
refuseDamagedStore,
|
|
5077
|
-
markJournalLost,
|
|
5078
|
-
readJournalMark,
|
|
5079
|
-
readHealthMark,
|
|
5080
|
-
recordDeepCheck,
|
|
5081
|
-
formatLocator,
|
|
5082
|
-
isLocator,
|
|
5083
|
-
parseLocator,
|
|
5084
|
-
SIMPLE_REFERENCES,
|
|
5085
|
-
formatReference,
|
|
5086
|
-
parseReference,
|
|
5087
|
-
canonicalReference,
|
|
5088
|
-
looksLikeReference,
|
|
5089
|
-
providerLabel,
|
|
5090
|
-
isFolderProvider,
|
|
5091
|
-
folderProviderSql,
|
|
5092
|
-
folderProviderOf,
|
|
5093
|
-
DOCUMENT_ACCOUNT_PROVIDERS,
|
|
5094
|
-
isDocumentAccountProvider,
|
|
5095
|
-
ADDED_PROVIDER,
|
|
5096
|
-
ADDED_ACCOUNT,
|
|
5097
|
-
notAdded,
|
|
5098
|
-
filesAccountSql,
|
|
5099
|
-
INTERNAL_NOTES,
|
|
5100
|
-
UNKNOWN_PROVIDER,
|
|
5101
|
-
providerEntryOf,
|
|
5102
|
-
kindsOfEntry,
|
|
5103
|
-
unitedKinds,
|
|
5104
|
-
providers,
|
|
5105
|
-
useStoredProviders,
|
|
5106
|
-
addProvider,
|
|
5107
|
-
isKind,
|
|
5108
|
-
providerNamed,
|
|
5109
|
-
kindIn,
|
|
5110
|
-
importedOf,
|
|
5111
|
-
isImportedProvider,
|
|
5112
|
-
holdsKind,
|
|
5113
|
-
holdsKindOf,
|
|
5114
|
-
isBotProvider,
|
|
5115
|
-
inSource,
|
|
5116
|
-
sourceOf as sourceOf2,
|
|
5117
|
-
ACCOUNT_GROUPS,
|
|
5118
|
-
ACCOUNT_GROUPS_SETTING,
|
|
5119
|
-
isAccountList,
|
|
5120
|
-
isGroupName,
|
|
5121
|
-
groupName,
|
|
5122
|
-
groupMembers,
|
|
5123
|
-
listedHolds,
|
|
5124
|
-
keyOf,
|
|
5125
|
-
sourceOf2 as sourceOf3,
|
|
5126
|
-
sameAs,
|
|
5127
|
-
entriesOfList,
|
|
5128
|
-
accountsOfList,
|
|
5129
|
-
fitting
|
|
3694
|
+
meetingTagChange,
|
|
3695
|
+
meetingTagging,
|
|
3696
|
+
meetingTagChangeItem,
|
|
3697
|
+
meetingTaggingItem
|
|
5130
3698
|
};
|