@wirecat/zoom-cli 0.81.0 → 0.83.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 +2 -2
- package/contracts/wirecat.json +54 -54
- package/dist/answers.d.ts +56 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/bin/main.js +2 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/agent-3HDWEZ5M.js +47 -0
- package/dist/bundle/{all-profiles-3ASMN35R.js → all-profiles-RY2OMSDL.js} +12 -12
- package/dist/bundle/answer-policy-IFVXPPGW.js +131 -0
- package/dist/bundle/{anthropic-XXI53VNI.js → anthropic-36VPSF7B.js} +6 -6
- package/dist/bundle/{app-server-B7WLNZNQ.js → app-server-ZVJVUGB7.js} +79 -76
- package/dist/bundle/{bun-2FLR4IV4.js → bun-F4M4KCNA.js} +2 -2
- package/dist/bundle/{bun-sqlite-3NNHTOGM.js → bun-sqlite-IOPYIUA7.js} +7 -7
- package/dist/bundle/{chunk-L54I45OX.js → chunk-26TW5RZ6.js} +33 -317
- package/dist/bundle/{chunk-JK24A3RP.js → chunk-2DK5BBFF.js} +3 -3
- package/dist/bundle/{chunk-4VOCXLMJ.js → chunk-2IBKKVVZ.js} +6 -6
- package/dist/bundle/{chunk-WKNYNK7W.js → chunk-2S54TM4N.js} +4 -4
- package/dist/bundle/{chunk-WHXYPLUE.js → chunk-3AQHKXVR.js} +4 -4
- package/dist/bundle/{chunk-YISJJNXT.js → chunk-3CW2C7ZA.js} +3 -3
- package/dist/bundle/{chunk-77TJ3AJH.js → chunk-3KUEZK5Z.js} +3 -3
- package/dist/bundle/{chunk-NQGGTO3B.js → chunk-3PXUQFHX.js} +8 -8
- package/dist/bundle/{chunk-N5ROXGY4.js → chunk-3QN5KDFZ.js} +167 -167
- package/dist/bundle/{chunk-AWJQ6FAX.js → chunk-434YFJAE.js} +2 -2
- package/dist/bundle/{chunk-4BU3LRTB.js → chunk-575JMTDR.js} +19 -18
- package/dist/bundle/{chunk-NM5XMKWO.js → chunk-5B2LV4MS.js} +2 -1
- package/dist/bundle/{chunk-3M436OO2.js → chunk-5WL5RHOO.js} +7 -102
- package/dist/bundle/{chunk-PS7HQ5LQ.js → chunk-6C7ESL5N.js} +3 -3
- package/dist/bundle/{chunk-SRUAUMBL.js → chunk-6E4KLYNP.js} +12 -12
- package/dist/bundle/chunk-7JDXR75Q.js +465 -0
- package/dist/bundle/{chunk-L2ERFXB7.js → chunk-AK3H2C65.js} +40 -31
- package/dist/bundle/{chunk-OEQNP56V.js → chunk-AQ5RIOUE.js} +1 -1
- package/dist/bundle/{chunk-35FVYRH5.js → chunk-AQLUAQXJ.js} +37 -180
- package/dist/bundle/{chunk-EPASOAEI.js → chunk-ASTLGFTR.js} +284 -184
- package/dist/bundle/{chunk-YNWBRDBX.js → chunk-ATHBB7OU.js} +2 -2
- package/dist/bundle/{chunk-ZFRYFDZN.js → chunk-B2NM65RD.js} +14 -6
- package/dist/bundle/{chunk-VQTYJ6XH.js → chunk-B4KHDXJE.js} +3 -3
- package/dist/bundle/{chunk-G3DWMG7Y.js → chunk-BAFC7WNI.js} +4 -4
- package/dist/bundle/{chunk-2GNGR265.js → chunk-BBGJQMRI.js} +1 -1
- package/dist/bundle/{chunk-C4BBCSGK.js → chunk-BTLZYRIW.js} +6 -6
- package/dist/bundle/{chunk-T2BHIC37.js → chunk-BZDS2X6Y.js} +65 -65
- package/dist/bundle/{chunk-3UX4VJWD.js → chunk-C7JPYWYQ.js} +3 -4
- package/dist/bundle/{chunk-R4CXFYQN.js → chunk-CDQUW25G.js} +180 -38
- package/dist/bundle/{chunk-YJKXCINQ.js → chunk-CJWGJBHW.js} +274 -60
- package/dist/bundle/{chunk-F2J2FQUB.js → chunk-D7RCUODT.js} +9 -9
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-DNCLQPOM.js} +1 -1
- package/dist/bundle/{chunk-LGESUPKO.js → chunk-DQJECJUE.js} +25 -90
- package/dist/bundle/{chunk-MA4UJNUI.js → chunk-E4JQ3MCW.js} +12 -12
- package/dist/bundle/{chunk-GW2A2FJH.js → chunk-E4ODYLEK.js} +8 -8
- package/dist/bundle/{chunk-Q26UFIH4.js → chunk-EE45N67Q.js} +16 -3
- package/dist/bundle/{chunk-5SEBLX6B.js → chunk-EEEU4MKK.js} +12 -12
- package/dist/bundle/{chunk-YRDQ54G5.js → chunk-ESN3W2MZ.js} +24 -11
- package/dist/bundle/{chunk-M7OYEMLI.js → chunk-ETIZGA4P.js} +7 -7
- package/dist/bundle/{chunk-IVZACJ6X.js → chunk-F44QK6CK.js} +4 -4
- package/dist/bundle/{chunk-JKEMW6E4.js → chunk-FH2UFNH6.js} +2 -2
- package/dist/bundle/{chunk-XYQVVW4R.js → chunk-FTH6WGYO.js} +1 -1
- package/dist/bundle/chunk-FWACRG4X.js +160 -0
- package/dist/bundle/chunk-G5SZL7G2.js +150 -0
- package/dist/bundle/{chunk-GDRFVBCB.js → chunk-G6CHEFAG.js} +2 -2
- package/dist/bundle/{chunk-2ELGSNX3.js → chunk-GHJD7PE6.js} +170 -170
- package/dist/bundle/{chunk-LECMHK2F.js → chunk-GZ7WBU5Y.js} +1 -1
- package/dist/bundle/{chunk-4ZXJ4AZW.js → chunk-H6A4NWYJ.js} +322 -45
- package/dist/bundle/{chunk-D26K6756.js → chunk-HKLRI2LB.js} +6 -6
- package/dist/bundle/{chunk-R6HP2XKD.js → chunk-HMD4FZYY.js} +5 -5
- package/dist/bundle/{chunk-2Z7UOXFC.js → chunk-HO4JGD4Q.js} +1 -1
- package/dist/bundle/chunk-HUAHLO6N.js +29 -0
- package/dist/bundle/{chunk-UHMJSSQO.js → chunk-IANKXHSE.js} +1 -1
- package/dist/bundle/{chunk-QFK52FG6.js → chunk-IQZXFWFI.js} +3 -3
- package/dist/bundle/{chunk-GPRJXJC7.js → chunk-ISQ23VKV.js} +22 -1
- package/dist/bundle/{chunk-ZLYICF6A.js → chunk-JEH33ZCD.js} +4 -4
- package/dist/bundle/{chunk-IDUKCXL7.js → chunk-JUNQYWQ2.js} +13 -9
- package/dist/bundle/{chunk-337ALCXQ.js → chunk-JUXMVQWJ.js} +312 -153
- package/dist/bundle/{chunk-5EWYDHBH.js → chunk-KHQDWYCG.js} +2 -2
- package/dist/bundle/{chunk-FMMYBVCH.js → chunk-KYRYD4CR.js} +1 -1
- package/dist/bundle/chunk-LBGT6W4R.js +377 -0
- package/dist/bundle/{chunk-UUVWAVKN.js → chunk-LN7HRYTH.js} +3 -3
- package/dist/bundle/{chunk-NS3JWBDR.js → chunk-MEB7HBTM.js} +6 -6
- package/dist/bundle/{chunk-K7CTCDYX.js → chunk-MEEFWYX3.js} +6 -6
- package/dist/bundle/{chunk-BQBC2WIG.js → chunk-MNOAMJ6H.js} +1 -1
- package/dist/bundle/{chunk-Y7XJA4EW.js → chunk-MYHPXJDG.js} +4 -4
- package/dist/bundle/{chunk-7JWVPJIP.js → chunk-NGI37RFW.js} +10 -10
- package/dist/bundle/{chunk-437DLSB3.js → chunk-NZMWD7Y3.js} +17227 -13055
- package/dist/bundle/chunk-O6IECJRM.js +54 -0
- package/dist/bundle/{chunk-LVCCZI5A.js → chunk-OBWL3BUV.js} +39 -39
- package/dist/bundle/{chunk-GCAJW4SR.js → chunk-OEEWVKJX.js} +1 -1
- package/dist/bundle/chunk-OGTN2KVG.js +147 -0
- package/dist/bundle/{chunk-B2WBWKYN.js → chunk-OQYZ3W4K.js} +12 -12
- package/dist/bundle/{chunk-IFM4G4MT.js → chunk-P3ZCTYGW.js} +4 -4
- package/dist/bundle/{chunk-VAW7QGJA.js → chunk-PVEBAHFU.js} +3 -3
- package/dist/bundle/{chunk-IYNICUCC.js → chunk-R2B6PUVI.js} +4 -4
- package/dist/bundle/{chunk-D7CDHBDX.js → chunk-R6IA5UQB.js} +1 -1
- package/dist/bundle/{chunk-T7QPZYRZ.js → chunk-RLOH7RDN.js} +7 -7
- package/dist/bundle/{chunk-V3ZTAAJ6.js → chunk-RQ4AXSCJ.js} +8 -8
- package/dist/bundle/{chunk-4BXLHSXY.js → chunk-RYGTCRFZ.js} +2 -2
- package/dist/bundle/{chunk-XWKUGAG6.js → chunk-S4PXWIE4.js} +85 -87
- package/dist/bundle/{chunk-ZMAPXIGC.js → chunk-SDZZYZLL.js} +2 -2
- package/dist/bundle/{chunk-ZNAX7GUV.js → chunk-SHQAYUK6.js} +8 -8
- package/dist/bundle/{chunk-YUDVRFXN.js → chunk-T3W4V4A6.js} +1 -1
- package/dist/bundle/{chunk-F5ZAN7OC.js → chunk-TCT5D2X2.js} +1 -1
- package/dist/bundle/{chunk-EEBSKMEA.js → chunk-TDWPOSPR.js} +12 -12
- package/dist/bundle/{chunk-WIX6BFRF.js → chunk-TER3N27H.js} +8 -8
- package/dist/bundle/{chunk-UMPUY77T.js → chunk-TMTNP7QN.js} +10 -10
- package/dist/bundle/{chunk-BZXHJKKI.js → chunk-TO5UEWXR.js} +2 -2
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-TXDR6YSF.js} +1 -1
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-TY7NDMFY.js} +1 -1
- package/dist/bundle/{chunk-YIIGF643.js → chunk-UAWSINMC.js} +10 -10
- package/dist/bundle/{chunk-RQFRXUI4.js → chunk-UBH7YF3C.js} +200 -112
- package/dist/bundle/{chunk-MBBR7QHI.js → chunk-UEAE3JUU.js} +2641 -1150
- package/dist/bundle/{chunk-2RFWRJFK.js → chunk-UHR363OD.js} +14 -10
- package/dist/bundle/{chunk-RRYHLP3A.js → chunk-UM52A76S.js} +6 -6
- package/dist/bundle/chunk-URP6BTHN.js +624 -0
- package/dist/bundle/{chunk-HHQROAJQ.js → chunk-UWQEAA6S.js} +1 -1
- package/dist/bundle/{chunk-DMJLJVD3.js → chunk-VR7QZGRU.js} +7 -7
- package/dist/bundle/{chunk-QNG27PGH.js → chunk-VRH5PBSL.js} +21 -17
- package/dist/bundle/chunk-VTLQTQKY.js +1756 -0
- package/dist/bundle/{chunk-NX3BLISW.js → chunk-VTYNLTDW.js} +6 -6
- package/dist/bundle/{chunk-HIFPHARA.js → chunk-WY7XG6TE.js} +4 -4
- package/dist/bundle/{chunk-IBYGNUO7.js → chunk-XEOZTA3H.js} +1 -1
- package/dist/bundle/{chunk-4FSH7K6N.js → chunk-XH23ML2V.js} +2 -2
- package/dist/bundle/{chunk-VXD65V67.js → chunk-XYF76A26.js} +2224 -2288
- package/dist/bundle/{chunk-J5EHZBO5.js → chunk-ZDYJAEVB.js} +19 -3
- package/dist/bundle/{chunk-FXZPAGHT.js → chunk-ZJ63HDBT.js} +2 -2
- package/dist/bundle/{chunk-N62P5FY4.js → chunk-ZT4ZPUIO.js} +12 -12
- package/dist/bundle/{cli-WTGAGSXV.js → cli-JK6PQSSN.js} +133 -116
- package/dist/bundle/command-contract-F3QNBKPX.js +46 -0
- package/dist/bundle/{command-server-entry-47CAYN3E.js → command-server-entry-DJLGN62J.js} +36 -35
- package/dist/bundle/config-TYYMV3HV.js +118 -0
- package/dist/bundle/{decode-2G7QS5IQ.js → decode-ZZICNNFF.js} +6 -6
- package/dist/bundle/{dispatch-ZAP3KBVJ.js → dispatch-FKMIPCPQ.js} +9 -9
- package/dist/bundle/{dist-WY6R3WH7.js → dist-NQPF25XI.js} +52 -49
- package/dist/bundle/{echarts-YRRVLEX3.js → echarts-QMAA7HH5.js} +2 -2
- package/dist/bundle/{embed-B5H3OW2O.js → embed-T64EUKUI.js} +7 -7
- package/dist/bundle/{embedder-3O73SP6Y.js → embedder-ZEKISZXI.js} +10 -10
- package/dist/bundle/{failure-EYGW7JMC.js → failure-XTWBYI2A.js} +3 -3
- package/dist/bundle/first-run-ZFNY4RRH.js +29 -0
- package/dist/bundle/first-screen-LPGCHRHZ.js +47 -0
- package/dist/bundle/{folders-4CGFWM6H.js → folders-ROKVKSCT.js} +5 -5
- package/dist/bundle/{instructions-AG7SRWTR.js → instructions-4H7UREH2.js} +1 -1
- package/dist/bundle/{main-DOGY6FJP.js → main-GCK3VYAA.js} +27 -37
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-5HFPWC3W.js} +2 -2
- package/dist/bundle/meeting-combined-7HDPOUPB.js +28 -0
- package/dist/bundle/meeting-model-MVUW7UPQ.js +26 -0
- package/dist/bundle/{meeting-semantic-FOEBWV3P.js → meeting-semantic-IF633WGX.js} +8 -8
- package/dist/bundle/{meetings-PVE4C2NF.js → meetings-RY2AAPHV.js} +7 -7
- package/dist/bundle/{node-GJQYN4FT.js → node-P3PUHKYH.js} +2 -2
- package/dist/bundle/{node-sqlite-MLRYKVCQ.js → node-sqlite-ASAZJNHE.js} +8 -8
- package/dist/bundle/{oauth-AC55C6SG.js → oauth-4U3OCK3W.js} +8 -8
- package/dist/bundle/oauth-AJARLPSY.js +46 -0
- package/dist/bundle/{open-3LGTYP6M.js → open-SEJRY2ZI.js} +6 -6
- package/dist/bundle/openai-FZDSC2AA.js +28 -0
- package/dist/bundle/{output-file-FXMTTLOI.js → output-file-RYIOIXMD.js} +6 -6
- package/dist/bundle/{process-MEKCZMX3.js → process-AFIXYXWL.js} +1 -1
- package/dist/bundle/{program-E5BSSIGY.js → program-OYLVYA4Z.js} +186 -247
- package/dist/bundle/{prompt-AIA6QSZK.js → prompt-BCRD64F4.js} +6 -6
- package/dist/bundle/public-SVJILCNI.js +206 -0
- package/dist/bundle/{recognize-M57VNTEV.js → recognize-25ITJWGX.js} +5 -5
- package/dist/bundle/{remote-3OTENZ7Z.js → remote-5FBAJX7O.js} +11 -11
- package/dist/bundle/{rerank-P5WHDFDU.js → rerank-2HGWWORY.js} +8 -8
- package/dist/bundle/run-log-7HRF4Y47.js +145 -0
- package/dist/bundle/{serve-BRLC2QVV.js → serve-RL35MSJD.js} +10 -10
- package/dist/bundle/{server-25NF7DMS.js → server-QUSBWACP.js} +71 -68
- package/dist/bundle/server-SCK2SRDK.js +96 -0
- package/dist/bundle/{services-MJE43OGD.js → services-BGRIQNDC.js} +66 -60
- package/dist/bundle/{speech-4AVCWTQH.js → speech-4W3ZMTFK.js} +25 -25
- package/dist/bundle/{sqlite-runtime-U4TQXWMC.js → sqlite-runtime-K3KLRZCV.js} +7 -7
- package/dist/bundle/{state-GNUGVMY7.js → state-GYL4C74G.js} +7 -7
- package/dist/bundle/{store-KBFZVQWF.js → store-27UQMNEO.js} +28 -26
- package/dist/bundle/{store-MHVBFUBB.js → store-NLYH5SQX.js} +64 -46
- package/dist/bundle/store-connection-CZILWRSR.js +112 -0
- package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +84 -0
- package/dist/bundle/{streaming-6F7AFEHD.js → streaming-73EKEGPF.js} +7 -7
- package/dist/bundle/surface-CV3C4RV2.js +82 -0
- package/dist/bundle/tokens-PY3S22LY.js +27 -0
- package/dist/bundle/zm.js +9 -9
- package/dist/bundle/{zoom-app-YTGOZ2FS.js → zoom-app-4F4YY4OI.js} +11 -9
- package/dist/commands.d.ts +1 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -33
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +2 -12
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +3 -5
- package/dist/program.d.ts.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +6 -1
- package/dist/run.js.map +1 -1
- package/dist/setup-commands.d.ts +5 -14
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +7 -142
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +20 -44
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +95 -308
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.js +1 -1
- package/dist/zoom-app.js.map +1 -1
- package/dist/zoom-session.d.ts +6 -0
- package/dist/zoom-session.d.ts.map +1 -0
- package/dist/zoom-session.js +72 -0
- package/dist/zoom-session.js.map +1 -0
- package/package.json +3 -3
- package/skills/zoom-cli/references/setup.md +2 -2
- package/dist/bundle/agent-VYAJCJLE.js +0 -45
- package/dist/bundle/answer-policy-PTH4F2DW.js +0 -129
- package/dist/bundle/chunk-46EF6P2J.js +0 -72
- package/dist/bundle/chunk-4B335BCJ.js +0 -330
- package/dist/bundle/chunk-EWEQ7AXL.js +0 -719
- package/dist/bundle/chunk-FXCR4DGU.js +0 -37
- package/dist/bundle/chunk-KZ3B6HW5.js +0 -31
- package/dist/bundle/chunk-TI4WJOEX.js +0 -789
- package/dist/bundle/chunk-UPR2S5IE.js +0 -773
- package/dist/bundle/command-contract-3IKVWPDL.js +0 -45
- package/dist/bundle/config-ZOGOKGTU.js +0 -116
- package/dist/bundle/first-run-MPKMDEMA.js +0 -29
- package/dist/bundle/first-screen-AIAAC3KF.js +0 -45
- package/dist/bundle/meeting-combined-YKPKTKGA.js +0 -26
- package/dist/bundle/meeting-model-HTXSGHNM.js +0 -26
- package/dist/bundle/openai-E2MSLVIX.js +0 -28
- package/dist/bundle/run-log-EOQ4EQDS.js +0 -143
- package/dist/bundle/server-EW2RL2EL.js +0 -93
- package/dist/bundle/store-connection-SKRUAI4L.js +0 -109
- package/dist/bundle/store-maintenance-command-G6EXJSHJ.js +0 -81
- package/dist/bundle/surface-DWEWB5RG.js +0 -79
- package/dist/bundle/tokens-BB4MQBLH.js +0 -25
- package/dist/login.d.ts +0 -16
- package/dist/login.d.ts.map +0 -1
- package/dist/login.js +0 -98
- package/dist/login.js.map +0 -1
- /package/dist/bundle/{chunk-7O7XM37N.js → chunk-7ECP5ZQR.js} +0 -0
|
@@ -1,719 +0,0 @@
|
|
|
1
|
-
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
-
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
isCliFailure,
|
|
5
|
-
isStoreDamage
|
|
6
|
-
} from "./chunk-ZFRYFDZN.js";
|
|
7
|
-
import {
|
|
8
|
-
ADDED_PROVIDER,
|
|
9
|
-
INTERNAL_NOTES,
|
|
10
|
-
UNKNOWN_PROVIDER,
|
|
11
|
-
holdsKindOf,
|
|
12
|
-
isDocumentAccountProvider,
|
|
13
|
-
isFolderProvider,
|
|
14
|
-
isKind,
|
|
15
|
-
kindIn,
|
|
16
|
-
kindOf,
|
|
17
|
-
kindsIn,
|
|
18
|
-
providerNamed,
|
|
19
|
-
providers
|
|
20
|
-
} from "./chunk-TI4WJOEX.js";
|
|
21
|
-
import {
|
|
22
|
-
refuseOwnerStoreInTests
|
|
23
|
-
} from "./chunk-JKEMW6E4.js";
|
|
24
|
-
import {
|
|
25
|
-
array,
|
|
26
|
-
boolean,
|
|
27
|
-
description,
|
|
28
|
-
integer,
|
|
29
|
-
isoTime,
|
|
30
|
-
maxLength,
|
|
31
|
-
minLength,
|
|
32
|
-
minValue,
|
|
33
|
-
nullable,
|
|
34
|
-
number,
|
|
35
|
-
optional,
|
|
36
|
-
picklist,
|
|
37
|
-
pipe,
|
|
38
|
-
record,
|
|
39
|
-
reference,
|
|
40
|
-
strictObject,
|
|
41
|
-
string,
|
|
42
|
-
unknown
|
|
43
|
-
} from "./chunk-YRDQ54G5.js";
|
|
44
|
-
import {
|
|
45
|
-
CliError
|
|
46
|
-
} from "./chunk-UHMJSSQO.js";
|
|
47
|
-
import {
|
|
48
|
-
__name
|
|
49
|
-
} from "./chunk-ZVVMGPBJ.js";
|
|
50
|
-
|
|
51
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
52
|
-
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
53
|
-
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
54
|
-
var ERASED_TEXT = "[source erased]";
|
|
55
|
-
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
56
|
-
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
57
|
-
|
|
58
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
59
|
-
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
60
|
-
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
61
|
-
var CLOSED_STATES = ["done", "dismissed"];
|
|
62
|
-
var TASK_ORIGINS = ["rule", "agent", "owner"];
|
|
63
|
-
var TASK_VERDICTS = ["useful", "not_useful"];
|
|
64
|
-
var isClosedState = /* @__PURE__ */ __name((state) => CLOSED_STATES.includes(state), "isClosedState");
|
|
65
|
-
function closeTask(task, state, by, at, reason) {
|
|
66
|
-
if (isClosedState(task.state))
|
|
67
|
-
throw new CliError("validation_error", `task ${task.id} is already ${task.state}`, { reason: "task.closed" });
|
|
68
|
-
const { claimedBy: _by, claimedUntil: _until, ...unclaimed } = task;
|
|
69
|
-
return { ...unclaimed, state, closedAt: at, closedBy: by, ...reason === void 0 ? {} : { reason } };
|
|
70
|
-
}
|
|
71
|
-
__name(closeTask, "closeTask");
|
|
72
|
-
|
|
73
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
74
|
-
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
75
|
-
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
76
|
-
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
77
|
-
var priorityLabel = /* @__PURE__ */ __name((score) => score === null ? null : PRIORITY_LABELS[Math.min(3, Math.max(0, Math.floor(score * 4)))], "priorityLabel");
|
|
78
|
-
var priorityBand = /* @__PURE__ */ __name((label) => {
|
|
79
|
-
const at = PRIORITY_LABELS.indexOf(label);
|
|
80
|
-
return { from: at / 4, to: (at + 1) / 4 };
|
|
81
|
-
}, "priorityBand");
|
|
82
|
-
var legacyPriority = /* @__PURE__ */ __name((score) => score === null ? null : score < 0.125 ? 4 : 3 - PRIORITY_LABELS.indexOf(priorityLabel(score)), "legacyPriority");
|
|
83
|
-
var checkedScore = /* @__PURE__ */ __name((score) => {
|
|
84
|
-
if (!Number.isFinite(score) || score < 0 || score > 1)
|
|
85
|
-
throw new CliError("validation_error", "a priority score is 0 to 1");
|
|
86
|
-
return score;
|
|
87
|
-
}, "checkedScore");
|
|
88
|
-
var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
89
|
-
const word = value.trim().toLowerCase();
|
|
90
|
-
if (word === "none")
|
|
91
|
-
return null;
|
|
92
|
-
if (PRIORITY_LABELS.includes(word))
|
|
93
|
-
return MIDDLE[word];
|
|
94
|
-
if (/^[0-4]$/.test(word))
|
|
95
|
-
return LEGACY_PRIORITY_SCORES[Number(word)];
|
|
96
|
-
if (/^(0?\.\d+|[01]\.\d*)$/.test(word) && Number(word) <= 1)
|
|
97
|
-
return Number(word);
|
|
98
|
-
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`);
|
|
99
|
-
}, "priorityOf");
|
|
100
|
-
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
101
|
-
|
|
102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
103
|
-
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
104
|
-
async function find(id2) {
|
|
105
|
-
const task = await store.get(id2);
|
|
106
|
-
if (!task)
|
|
107
|
-
throw new CliError("not_found", `no task ${id2}`);
|
|
108
|
-
return task;
|
|
109
|
-
}
|
|
110
|
-
__name(find, "find");
|
|
111
|
-
return {
|
|
112
|
-
/**
|
|
113
|
-
* A rule never makes a second task from a source it has seen, whatever that task's state, so a
|
|
114
|
-
* dismissed one stays dismissed — nor from a message attached or merged into a task. A person or an agent may
|
|
115
|
-
* add a task of another kind to it. A task a rule opens goes through the host's duplicate check.
|
|
116
|
-
*/
|
|
117
|
-
async add(input) {
|
|
118
|
-
const rule = input.origin === "rule";
|
|
119
|
-
const existing = await store.findBySource(input.account, input.source, rule ? { linked: true } : void 0);
|
|
120
|
-
const same = rule ? existing[0] : existing.find((task2) => task2.kind === input.kind);
|
|
121
|
-
if (same)
|
|
122
|
-
return { task: same, created: false };
|
|
123
|
-
const task = { ...input, id: newId(), state: "open", createdAt: now() };
|
|
124
|
-
await store.insert(task);
|
|
125
|
-
if (!rule || !store.reviewDuplicates)
|
|
126
|
-
return { task, created: true };
|
|
127
|
-
return { task, created: true, review: await store.reviewDuplicates(task.id) };
|
|
128
|
-
},
|
|
129
|
-
async close(id2, { as, by, reason }) {
|
|
130
|
-
const task = closeTask(await find(id2), as, by, now(), reason);
|
|
131
|
-
await store.update(task);
|
|
132
|
-
return task;
|
|
133
|
-
},
|
|
134
|
-
list: /* @__PURE__ */ __name((filter = {}) => store.list(filter), "list"),
|
|
135
|
-
async stats(filter = {}) {
|
|
136
|
-
const byGroup = /* @__PURE__ */ new Map();
|
|
137
|
-
for (const task of await store.list(filter))
|
|
138
|
-
byGroup.set(task.group, [...byGroup.get(task.group) ?? [], task]);
|
|
139
|
-
return [...byGroup].map(([group, tasks]) => {
|
|
140
|
-
const open = tasks.filter((task) => !isClosedState(task.state));
|
|
141
|
-
const closeMs = tasks.flatMap((task) => task.closedAt ? [task.closedAt.getTime() - task.createdAt.getTime()] : []);
|
|
142
|
-
const oldestOpenAt = open.map((task) => task.createdAt).sort((a, b) => a.getTime() - b.getTime())[0];
|
|
143
|
-
return {
|
|
144
|
-
group,
|
|
145
|
-
open: open.length,
|
|
146
|
-
...oldestOpenAt ? { oldestOpenAt } : {},
|
|
147
|
-
...closeMs.length > 0 ? { medianCloseMs: median(closeMs) } : {}
|
|
148
|
-
};
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
__name(createTaskService, "createTaskService");
|
|
154
|
-
function median(values) {
|
|
155
|
-
const sorted = [...values].sort((a, b) => a - b);
|
|
156
|
-
const middle = Math.floor(sorted.length / 2);
|
|
157
|
-
const upper = sorted[middle] ?? 0;
|
|
158
|
-
return sorted.length % 2 === 1 ? upper : ((sorted[middle - 1] ?? 0) + upper) / 2;
|
|
159
|
-
}
|
|
160
|
-
__name(median, "median");
|
|
161
|
-
|
|
162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
163
|
-
function matches(task, filter) {
|
|
164
|
-
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);
|
|
165
|
-
}
|
|
166
|
-
__name(matches, "matches");
|
|
167
|
-
|
|
168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
169
|
-
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
170
|
-
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
171
|
-
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
172
|
-
var MEMORY_SCOPES = ["personal", "work"];
|
|
173
|
-
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
174
|
-
var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
175
|
-
|
|
176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/domain/categories.js
|
|
177
|
-
var CATEGORIES = ["client", "supplier", "partner", "employer"];
|
|
178
|
-
|
|
179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
180
|
-
var text = string();
|
|
181
|
-
var id = pipe(string(), minLength(1));
|
|
182
|
-
var time = isoTime;
|
|
183
|
-
var typedTime = pipe(string(), minLength(1), maxLength(64), description("an ISO 8601 date or time, in the computer's zone without one; or 30m, 2h, 7d ago"));
|
|
184
|
-
var count = pipe(number(), integer(), minValue(0));
|
|
185
|
-
var untrusted = optional(array(text));
|
|
186
|
-
var providerMetadata = optional(record(string(), unknown()));
|
|
187
|
-
var evidenceSource = strictObject({
|
|
188
|
-
ref: nullable(reference),
|
|
189
|
-
kind: text,
|
|
190
|
-
title: nullable(text),
|
|
191
|
-
sender: nullable(text),
|
|
192
|
-
at: nullable(time),
|
|
193
|
-
excerpt: nullable(text),
|
|
194
|
-
tool: nullable(text),
|
|
195
|
-
missing: boolean()
|
|
196
|
-
});
|
|
197
|
-
var sourceReview = nullable(strictObject({ id, cause: picklist(SOURCE_REVIEW_CAUSES) }));
|
|
198
|
-
var author = strictObject({
|
|
199
|
-
type: picklist(["person", "bot"]),
|
|
200
|
-
id,
|
|
201
|
-
name: nullable(text)
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
205
|
-
var organization = strictObject({
|
|
206
|
-
id,
|
|
207
|
-
ref: reference,
|
|
208
|
-
kind: picklist(["company", "team", "family", "community"]),
|
|
209
|
-
name: text,
|
|
210
|
-
scope: picklist(["personal", "work"]),
|
|
211
|
-
created_at: time
|
|
212
|
-
});
|
|
213
|
-
var project = strictObject({
|
|
214
|
-
id,
|
|
215
|
-
ref: reference,
|
|
216
|
-
key: text,
|
|
217
|
-
name: text,
|
|
218
|
-
kind: picklist(["project", "inbox"]),
|
|
219
|
-
type: picklist(["work", "client", "personal", "oss", "other"]),
|
|
220
|
-
organization_id: nullable(id),
|
|
221
|
-
scope: picklist(["personal", "work"]),
|
|
222
|
-
created_at: time
|
|
223
|
-
});
|
|
224
|
-
var reminder = strictObject({
|
|
225
|
-
id,
|
|
226
|
-
task: text,
|
|
227
|
-
due_at: time,
|
|
228
|
-
timezone: text,
|
|
229
|
-
state: picklist(["pending", "leased", "delivered", "cancelled"]),
|
|
230
|
-
revision: number(),
|
|
231
|
-
receipt: nullable(text)
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
235
|
-
import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
236
|
-
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
237
|
-
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
238
|
-
var journalMarkPath = /* @__PURE__ */ __name((store) => `${store}.journal.json`, "journalMarkPath");
|
|
239
|
-
var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
|
|
240
|
-
var readJson = /* @__PURE__ */ __name((path) => {
|
|
241
|
-
try {
|
|
242
|
-
return JSON.parse(readFileSync(path, "utf8"));
|
|
243
|
-
} catch (error) {
|
|
244
|
-
if (error.code === "ENOENT")
|
|
245
|
-
return null;
|
|
246
|
-
throw error;
|
|
247
|
-
}
|
|
248
|
-
}, "readJson");
|
|
249
|
-
var ownerStoreInTests = /* @__PURE__ */ __name((store) => {
|
|
250
|
-
try {
|
|
251
|
-
refuseOwnerStoreInTests(store);
|
|
252
|
-
return false;
|
|
253
|
-
} catch {
|
|
254
|
-
return true;
|
|
255
|
-
}
|
|
256
|
-
}, "ownerStoreInTests");
|
|
257
|
-
var sqliteFailure = /* @__PURE__ */ __name((error) => isCliFailure(error) && error.details?.reason === "store.damaged" ? error.cause : error, "sqliteFailure");
|
|
258
|
-
var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version, runId, now = Date.now }) => {
|
|
259
|
-
const failure = sqliteFailure(error);
|
|
260
|
-
if (!isStoreDamage(failure) || ownerStoreInTests(store))
|
|
261
|
-
return false;
|
|
262
|
-
const inode = inodeOf(store);
|
|
263
|
-
if (inode === void 0)
|
|
264
|
-
return false;
|
|
265
|
-
const mark = {
|
|
266
|
-
at: new Date(now()).toISOString(),
|
|
267
|
-
command,
|
|
268
|
-
...version ? { cli_version: version } : {},
|
|
269
|
-
...runId ? { run_id: runId } : {},
|
|
270
|
-
error: failure.message.slice(0, 500),
|
|
271
|
-
inode
|
|
272
|
-
};
|
|
273
|
-
try {
|
|
274
|
-
writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
275
|
-
`, { flag: "wx", mode: 384 });
|
|
276
|
-
return true;
|
|
277
|
-
} catch {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
}, "markStoreDamaged");
|
|
281
|
-
var readDamageMark = /* @__PURE__ */ __name((store) => {
|
|
282
|
-
const path = damageMarkPath(store);
|
|
283
|
-
let mark;
|
|
284
|
-
try {
|
|
285
|
-
mark = readJson(path);
|
|
286
|
-
} catch {
|
|
287
|
-
return { at: "unknown", command: "unknown", error: `${path} cannot be read`, inode: inodeOf(store) ?? 0 };
|
|
288
|
-
}
|
|
289
|
-
if (mark === null)
|
|
290
|
-
return null;
|
|
291
|
-
if (mark.inode !== inodeOf(store)) {
|
|
292
|
-
clearDamageMark(store);
|
|
293
|
-
return null;
|
|
294
|
-
}
|
|
295
|
-
return mark;
|
|
296
|
-
}, "readDamageMark");
|
|
297
|
-
var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
|
|
298
|
-
var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
|
|
299
|
-
const mark = readDamageMark(store);
|
|
300
|
-
if (!mark)
|
|
301
|
-
return;
|
|
302
|
-
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" });
|
|
303
|
-
}, "refuseDamagedStore");
|
|
304
|
-
var markJournalLost = /* @__PURE__ */ __name((store, { seen, command, now = Date.now }) => {
|
|
305
|
-
if (ownerStoreInTests(store))
|
|
306
|
-
return;
|
|
307
|
-
const mark = { at: new Date(now()).toISOString(), command, seen };
|
|
308
|
-
try {
|
|
309
|
-
writeFileSync(journalMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
310
|
-
`, { flag: "wx", mode: 384 });
|
|
311
|
-
} catch {
|
|
312
|
-
}
|
|
313
|
-
}, "markJournalLost");
|
|
314
|
-
var readJournalMark = /* @__PURE__ */ __name((store) => {
|
|
315
|
-
try {
|
|
316
|
-
return readJson(journalMarkPath(store));
|
|
317
|
-
} catch {
|
|
318
|
-
return null;
|
|
319
|
-
}
|
|
320
|
-
}, "readJournalMark");
|
|
321
|
-
var readHealthMark = /* @__PURE__ */ __name((store) => {
|
|
322
|
-
try {
|
|
323
|
-
return readJson(healthMarkPath(store));
|
|
324
|
-
} catch {
|
|
325
|
-
return null;
|
|
326
|
-
}
|
|
327
|
-
}, "readHealthMark");
|
|
328
|
-
var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, schema, now = Date.now }) => {
|
|
329
|
-
const previous = readHealthMark(store);
|
|
330
|
-
if (ownerStoreInTests(store))
|
|
331
|
-
return { previous, cleared: null };
|
|
332
|
-
const checkedAt = new Date(now()).toISOString();
|
|
333
|
-
const mark = {
|
|
334
|
-
checked_at: checkedAt,
|
|
335
|
-
ok: health.ok,
|
|
336
|
-
problems: health.problems ?? 0,
|
|
337
|
-
schema,
|
|
338
|
-
cli,
|
|
339
|
-
...version ? { cli_version: version } : {},
|
|
340
|
-
last_ok_at: health.ok ? checkedAt : previous?.last_ok_at ?? null
|
|
341
|
-
};
|
|
342
|
-
const cleared = health.ok ? readDamageMark(store) : null;
|
|
343
|
-
try {
|
|
344
|
-
writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
345
|
-
`, { mode: 384 });
|
|
346
|
-
} catch {
|
|
347
|
-
}
|
|
348
|
-
if (cleared)
|
|
349
|
-
clearDamageMark(store);
|
|
350
|
-
if (health.ok)
|
|
351
|
-
rmSync(journalMarkPath(store), { force: true });
|
|
352
|
-
return { previous, cleared };
|
|
353
|
-
}, "recordDeepCheck");
|
|
354
|
-
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
356
|
-
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
357
|
-
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");
|
|
358
|
-
var fail = /* @__PURE__ */ __name((message) => {
|
|
359
|
-
throw new CliError("validation_error", message);
|
|
360
|
-
}, "fail");
|
|
361
|
-
var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
362
|
-
const sources = [...providers2, "personal", "bots", "all"];
|
|
363
|
-
const source = value.toLowerCase();
|
|
364
|
-
if (sources.includes(source))
|
|
365
|
-
return source;
|
|
366
|
-
if (source === "mail")
|
|
367
|
-
return "email";
|
|
368
|
-
if (source === "messages")
|
|
369
|
-
return source;
|
|
370
|
-
if (isKind(source))
|
|
371
|
-
fail(`${name}${source} names ${source}, which a message search does not read \u2014 search ${source === "meetings" || source === "events" ? `all --source ${source}` : "notes"} does`);
|
|
372
|
-
const named = providerNamed(source);
|
|
373
|
-
if (named && providers2.includes(named.name))
|
|
374
|
-
return named.name;
|
|
375
|
-
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
376
|
-
}, "sourceOf");
|
|
377
|
-
|
|
378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
379
|
-
var ACCOUNT_GROUPS = "accountGroups";
|
|
380
|
-
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
381
|
-
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
382
|
-
var fail2 = /* @__PURE__ */ __name((message) => {
|
|
383
|
-
throw new CliError("validation_error", message);
|
|
384
|
-
}, "fail");
|
|
385
|
-
var isAccountList = /* @__PURE__ */ __name((value) => value.includes(",") || value.includes(":"), "isAccountList");
|
|
386
|
-
var itemsOf = /* @__PURE__ */ __name((value) => {
|
|
387
|
-
const items = value.split(",").map((item) => item.trim());
|
|
388
|
-
if (items.some((item) => item === ""))
|
|
389
|
-
fail2(`"${value}" has an empty entry \u2014 separate accounts with one comma`);
|
|
390
|
-
return items;
|
|
391
|
-
}, "itemsOf");
|
|
392
|
-
var isGroupName = /* @__PURE__ */ __name((name) => GROUP_NAME.test(name), "isGroupName");
|
|
393
|
-
var groupName = /* @__PURE__ */ __name((name) => isGroupName(name) ? name : fail2(`a group name is letters, digits, - and _ \u2014 not "${name}"`), "groupName");
|
|
394
|
-
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");
|
|
395
|
-
var describe = /* @__PURE__ */ __name((accounts) => accounts.map(({ provider, account, name }) => `${provider}:${account}${name ? ` (${name})` : ""}`).join(", "), "describe");
|
|
396
|
-
var listedHolds = /* @__PURE__ */ __name((account, kind) => (account.kinds ?? (account.kind === void 0 ? [] : [account.kind])).includes(kind), "listedHolds");
|
|
397
|
-
var kindHere = /* @__PURE__ */ __name((provider, running) => provider === running.provider ? kindOf(provider) : kindIn(provider), "kindHere");
|
|
398
|
-
var kindsOfHere = /* @__PURE__ */ __name((provider, running) => {
|
|
399
|
-
const kinds = kindsIn(provider);
|
|
400
|
-
return { kind: kindHere(provider, running), ...kinds.length > 1 ? { kinds } : {} };
|
|
401
|
-
}, "kindsOfHere");
|
|
402
|
-
var heldOf = /* @__PURE__ */ __name((stored, running) => [
|
|
403
|
-
...stored.filter(({ provider }) => kindIn(provider) !== "notes" && !isDocumentAccountProvider(provider)).map(({ provider, account, name }) => ({ provider, account, name, ...kindsOfHere(provider, running) })),
|
|
404
|
-
{ provider: "notes", account: INTERNAL_NOTES, name: null, kind: "notes" },
|
|
405
|
-
...stored.filter(({ provider }) => isFolderProvider(provider)).map(({ id: id2, name, provider, account }) => ({
|
|
406
|
-
provider: "notes",
|
|
407
|
-
account: String(id2),
|
|
408
|
-
name,
|
|
409
|
-
kind: "notes",
|
|
410
|
-
stored: { provider, account }
|
|
411
|
-
})),
|
|
412
|
-
...stored.filter(({ provider }) => isDocumentAccountProvider(provider) || provider === ADDED_PROVIDER).map(({ id: id2, provider, account, name }) => ({
|
|
413
|
-
provider: "notes",
|
|
414
|
-
account: String(id2),
|
|
415
|
-
name,
|
|
416
|
-
kind: "notes",
|
|
417
|
-
stored: { provider, account }
|
|
418
|
-
}))
|
|
419
|
-
], "heldOf");
|
|
420
|
-
var storedAs = /* @__PURE__ */ __name((held, key) => held.filter(({ stored }) => stored?.provider === key.provider && (key.account === "" || stored.account === key.account)), "storedAs");
|
|
421
|
-
var registry = /* @__PURE__ */ __name(() => providers().map(({ name, aliases }) => aliases.length ? `${name} (${aliases.join(", ")})` : name).join(", "), "registry");
|
|
422
|
-
var providerOf = /* @__PURE__ */ __name((prefix, held, { running, profiles }) => {
|
|
423
|
-
const wanted = prefix.toLowerCase();
|
|
424
|
-
if (wanted === running.command?.toLowerCase())
|
|
425
|
-
return running.provider;
|
|
426
|
-
const providers2 = [...new Set(held.map(({ provider }) => provider))];
|
|
427
|
-
if (providers2.includes(wanted) || isDocumentAccountProvider(wanted))
|
|
428
|
-
return wanted;
|
|
429
|
-
const named = providerNamed(wanted);
|
|
430
|
-
if (named)
|
|
431
|
-
return named.name;
|
|
432
|
-
const recorded = Object.values(profiles[wanted] ?? {})[0];
|
|
433
|
-
if (recorded)
|
|
434
|
-
return recorded.provider;
|
|
435
|
-
return fail2(`${prefix} is not a provider \u2014 they are ${registry()}; the store holds ${providers2.join(", ")}`);
|
|
436
|
-
}, "providerOf");
|
|
437
|
-
var profilesOf = /* @__PURE__ */ __name((provider, profiles) => Object.values(profiles).flatMap((named) => Object.entries(named).filter(([, key]) => key.provider === provider)), "profilesOf");
|
|
438
|
-
var accountOf = /* @__PURE__ */ __name((prefix, ref, held, context) => {
|
|
439
|
-
const provider = providerOf(prefix, held, context);
|
|
440
|
-
if (isDocumentAccountProvider(provider) && !context.profiles[prefix.toLowerCase()]?.[ref]) {
|
|
441
|
-
const stored = storedAs(held, { provider, account: ref })[0];
|
|
442
|
-
if (stored)
|
|
443
|
-
return stored;
|
|
444
|
-
}
|
|
445
|
-
const folder = isFolderProvider(provider);
|
|
446
|
-
const ofProvider = folder ? storedAs(held, { provider, account: "" }) : held.filter((one) => one.provider === provider);
|
|
447
|
-
const byId = ofProvider.find(({ account, stored }) => account === ref || account === ref.toLowerCase() || folder && stored?.account === ref.toUpperCase());
|
|
448
|
-
if (byId)
|
|
449
|
-
return byId;
|
|
450
|
-
const keyed = /* @__PURE__ */ __name((key) => ofProvider.find(({ account }) => account === key.account) ?? {
|
|
451
|
-
...key,
|
|
452
|
-
name: null,
|
|
453
|
-
...kindsOfHere(key.provider, context.running)
|
|
454
|
-
}, "keyed");
|
|
455
|
-
const recorded = context.profiles[prefix.toLowerCase()]?.[ref];
|
|
456
|
-
if (recorded && isFolderProvider(recorded.provider)) {
|
|
457
|
-
const folder2 = held.find((one) => one.provider === "notes" && one.name === recorded.account);
|
|
458
|
-
if (folder2)
|
|
459
|
-
return folder2;
|
|
460
|
-
return fail2(`no stored folder for ${prefix}:${ref}; sync that profile first`);
|
|
461
|
-
}
|
|
462
|
-
if (recorded && isDocumentAccountProvider(recorded.provider)) {
|
|
463
|
-
const account = storedAs(held, recorded)[0];
|
|
464
|
-
if (account)
|
|
465
|
-
return account;
|
|
466
|
-
return fail2(`no stored documents for ${prefix}:${ref}; sync that profile first`);
|
|
467
|
-
}
|
|
468
|
-
if (recorded)
|
|
469
|
-
return keyed(recorded);
|
|
470
|
-
const byProfile = [
|
|
471
|
-
...new Map(profilesOf(provider, context.profiles).filter(([name]) => name === ref).map(([, key]) => [key.account, key])).values()
|
|
472
|
-
];
|
|
473
|
-
if (byProfile.length === 1)
|
|
474
|
-
return keyed(byProfile[0]);
|
|
475
|
-
const byName = ofProvider.filter(({ name }) => name?.toLowerCase() === ref.toLowerCase());
|
|
476
|
-
if (byName.length === 1)
|
|
477
|
-
return byName[0];
|
|
478
|
-
if (byName.length > 1 || byProfile.length > 1)
|
|
479
|
-
fail2(`${provider}:${ref} names more than one account \u2014 use the id: ${describe(ofProvider)}`);
|
|
480
|
-
const names = profilesOf(provider, context.profiles).map(([name]) => name);
|
|
481
|
-
return fail2(`no ${provider} account "${ref}" \u2014 the store holds ${describe(ofProvider) || "none"}` + (names.length ? `; profiles: ${[...new Set(names)].join(", ")}` : ""));
|
|
482
|
-
}, "accountOf");
|
|
483
|
-
var accountsOfWord = /* @__PURE__ */ __name((word, held, context) => {
|
|
484
|
-
const wanted = word.toLowerCase();
|
|
485
|
-
if (wanted === "all")
|
|
486
|
-
return [...held];
|
|
487
|
-
if (wanted === "personal" || wanted === "bots")
|
|
488
|
-
return held.filter((one) => listedHolds(one, "messages") && isBotProvider(one.provider) === (wanted === "bots"));
|
|
489
|
-
if (wanted === "documents")
|
|
490
|
-
return held.filter((one) => listedHolds(one, "documents") || isDocumentAccount(one));
|
|
491
|
-
if (isKind(wanted))
|
|
492
|
-
return held.filter((one) => listedHolds(one, wanted));
|
|
493
|
-
const recorded = context.profiles[wanted];
|
|
494
|
-
if (recorded && Object.values(recorded).every((key) => isFolderProvider(key.provider) || isDocumentAccountProvider(key.provider)))
|
|
495
|
-
return Object.keys(recorded).map((profile) => accountOf(word, profile, held, context));
|
|
496
|
-
const provider = providerOf(word, held, context);
|
|
497
|
-
if (isDocumentAccountProvider(provider) || isFolderProvider(provider))
|
|
498
|
-
return storedAs(held, { provider, account: "" });
|
|
499
|
-
return held.filter((one) => one.provider === provider);
|
|
500
|
-
}, "accountsOfWord");
|
|
501
|
-
var isDocumentAccount = /* @__PURE__ */ __name(({ stored }) => stored !== void 0 && isDocumentAccountProvider(stored.provider), "isDocumentAccount");
|
|
502
|
-
var choices = /* @__PURE__ */ __name((held) => {
|
|
503
|
-
const kinds = held.flatMap((one) => one.kinds ?? (one.kind ? [one.kind] : []));
|
|
504
|
-
const messengers = held.filter((one) => listedHolds(one, "messages"));
|
|
505
|
-
const providers2 = held.flatMap(({ stored, provider }) => stored?.provider === ADDED_PROVIDER ? [] : [stored?.provider ?? provider]);
|
|
506
|
-
return [
|
|
507
|
-
.../* @__PURE__ */ new Set([
|
|
508
|
-
"all",
|
|
509
|
-
...messengers.some((one) => !isBotProvider(one.provider)) ? ["personal"] : [],
|
|
510
|
-
...messengers.some((one) => isBotProvider(one.provider)) ? ["bots"] : [],
|
|
511
|
-
...kinds,
|
|
512
|
-
...held.some(isDocumentAccount) ? ["documents"] : [],
|
|
513
|
-
...providers2
|
|
514
|
-
])
|
|
515
|
-
].join(", ");
|
|
516
|
-
}, "choices");
|
|
517
|
-
var keyOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "keyOf");
|
|
518
|
-
var sourceOf2 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "sourceOf");
|
|
519
|
-
var sameAs = /* @__PURE__ */ __name((key) => (one) => one.provider === key.provider && one.account === key.account, "sameAs");
|
|
520
|
-
var entriesOfList = /* @__PURE__ */ __name((value, context) => {
|
|
521
|
-
const held = heldOf(context.held, context.running);
|
|
522
|
-
const entries = [];
|
|
523
|
-
const entry = /* @__PURE__ */ __name((item, group) => {
|
|
524
|
-
const colon = item.indexOf(":");
|
|
525
|
-
if (colon === -1) {
|
|
526
|
-
try {
|
|
527
|
-
const accounts = accountsOfWord(item, held, context);
|
|
528
|
-
entries.push({ entry: item, accounts, ...accounts.length === 0 && !group ? { holds: choices(held) } : {} });
|
|
529
|
-
} catch (error) {
|
|
530
|
-
if (!group || !(error instanceof CliError))
|
|
531
|
-
throw error;
|
|
532
|
-
fail2(`"${item}" in group ${group}: ${error.message}`);
|
|
533
|
-
}
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
const prefix = item.slice(0, colon);
|
|
537
|
-
const ref = item.slice(colon + 1).trim();
|
|
538
|
-
if (ref === "")
|
|
539
|
-
fail2(`"${item}" names no account after the colon`);
|
|
540
|
-
if (prefix.toLowerCase() === "group") {
|
|
541
|
-
if (group)
|
|
542
|
-
fail2(`group ${group} lists another group \u2014 a group lists accounts`);
|
|
543
|
-
const members = context.groups[ref];
|
|
544
|
-
if (!members) {
|
|
545
|
-
const known = Object.keys(context.groups);
|
|
546
|
-
fail2(`no account group "${ref}" \u2014 ${known.length ? `there are ${known.join(", ")}` : "none saved yet"}; \`config set ${ACCOUNT_GROUPS_SETTING}.${ref} <accounts>\` saves one`);
|
|
547
|
-
}
|
|
548
|
-
for (const member of members)
|
|
549
|
-
entry(member, ref);
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
entries.push({ entry: item, accounts: [accountOf(prefix, ref, held, context)] });
|
|
553
|
-
}, "entry");
|
|
554
|
-
for (const item of itemsOf(value))
|
|
555
|
-
entry(item);
|
|
556
|
-
const { only } = context;
|
|
557
|
-
return entries.map(({ entry: entry2, accounts, holds }) => ({
|
|
558
|
-
entry: entry2,
|
|
559
|
-
...holds === void 0 ? {} : { holds },
|
|
560
|
-
accounts: accounts.filter((one) => only === void 0 || only.has(keyOf(one))).map(({ provider, account, kind, kinds }) => ({
|
|
561
|
-
provider,
|
|
562
|
-
account,
|
|
563
|
-
kind,
|
|
564
|
-
...kinds === void 0 ? {} : { kinds }
|
|
565
|
-
}))
|
|
566
|
-
}));
|
|
567
|
-
}, "entriesOfList");
|
|
568
|
-
var accountsOfList = /* @__PURE__ */ __name((value, context) => {
|
|
569
|
-
const chosen = /* @__PURE__ */ new Map();
|
|
570
|
-
for (const { accounts } of entriesOfList(value, context))
|
|
571
|
-
for (const one of accounts)
|
|
572
|
-
if (!chosen.has(keyOf(one)))
|
|
573
|
-
chosen.set(keyOf(one), one);
|
|
574
|
-
return [...chosen.values()];
|
|
575
|
-
}, "accountsOfList");
|
|
576
|
-
var READS = {
|
|
577
|
-
messages: "messenger messages \u2014 search messages reads them",
|
|
578
|
-
mail: "a mailbox \u2014 memo search mail reads it",
|
|
579
|
-
notes: "notes \u2014 search notes reads them",
|
|
580
|
-
documents: "documents \u2014 search notes reads them",
|
|
581
|
-
meetings: "meetings \u2014 search all reads them",
|
|
582
|
-
events: "calendar events \u2014 no search reads them yet",
|
|
583
|
-
crm: "CRM deals and leads \u2014 search all reads them"
|
|
584
|
-
};
|
|
585
|
-
var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind) => READS[kind], alsoFits = () => false) => {
|
|
586
|
-
const chosen = /* @__PURE__ */ new Map();
|
|
587
|
-
const skipped = [];
|
|
588
|
-
for (const { entry, accounts } of entries) {
|
|
589
|
-
const fits = accounts.filter((one) => kinds.some((kind) => listedHolds(one, kind)) || alsoFits(one));
|
|
590
|
-
for (const { provider, account } of fits)
|
|
591
|
-
if (!chosen.has(keyOf({ provider, account })))
|
|
592
|
-
chosen.set(keyOf({ provider, account }), { provider, account });
|
|
593
|
-
const known = accounts.filter(({ kind }) => kind !== void 0);
|
|
594
|
-
const unknown2 = accounts.filter((one) => one.kind === void 0 && !alsoFits(one));
|
|
595
|
-
if (known.length)
|
|
596
|
-
for (const { provider, account } of unknown2)
|
|
597
|
-
skipped.push({ source: `${provider}:${account}`, code: "not_found", reason: UNKNOWN_PROVIDER });
|
|
598
|
-
if (fits.length)
|
|
599
|
-
continue;
|
|
600
|
-
const other = known[0];
|
|
601
|
-
skipped.push(other?.kind ? { source: entry, code: "validation_error", reason: reasonOf(other.kind) } : unknown2.length ? { source: entry, code: "not_found", reason: UNKNOWN_PROVIDER } : { source: entry, code: "not_found", reason: "no account in the store" });
|
|
602
|
-
}
|
|
603
|
-
if (chosen.size === 0) {
|
|
604
|
-
const words = entries.length === 1 ? entries[0]?.holds : void 0;
|
|
605
|
-
fail2(`--source names nothing ${what} reads: ${skipped.map(({ source, reason }) => `${source} (${reason})`).join(", ")}` + (words === void 0 ? "" : ` \u2014 the store holds ${words}`));
|
|
606
|
-
}
|
|
607
|
-
return { accounts: [...chosen.values()], skipped };
|
|
608
|
-
}, "fitting");
|
|
609
|
-
|
|
610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
|
|
611
|
-
var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
|
|
612
|
-
var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
613
|
-
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;
|
|
614
|
-
return {
|
|
615
|
-
...typeof reporter === "string" ? { account: reporter } : {},
|
|
616
|
-
...typeof metadata.derived === "string" ? { derived: metadata.derived } : {}
|
|
617
|
-
};
|
|
618
|
-
}, "sourceOf");
|
|
619
|
-
|
|
620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.707.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_1ab7200af0919d16d129ae0ece32d37f/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
621
|
-
var LINK_KINDS = [
|
|
622
|
-
"links-to",
|
|
623
|
-
"blocked-by",
|
|
624
|
-
"follow-up-of",
|
|
625
|
-
"about",
|
|
626
|
-
"member-of",
|
|
627
|
-
"labelled",
|
|
628
|
-
"answered-by",
|
|
629
|
-
"evidence",
|
|
630
|
-
"created-from",
|
|
631
|
-
"duplicate-of",
|
|
632
|
-
"related-to",
|
|
633
|
-
"reports-to",
|
|
634
|
-
"customer-of",
|
|
635
|
-
"partner-of",
|
|
636
|
-
"assigned-to",
|
|
637
|
-
"attached"
|
|
638
|
-
];
|
|
639
|
-
var LINK_ORIGINS = ["file", "owner", "suggested", "message"];
|
|
640
|
-
var LINK_SOURCES = [...LINK_ORIGINS, "calendar", "meeting"];
|
|
641
|
-
var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
642
|
-
var COUNTERPART_ROLE = "counterpart";
|
|
643
|
-
|
|
644
|
-
export {
|
|
645
|
-
SOURCE_REVIEW_KIND,
|
|
646
|
-
SOURCE_REVIEW_CAUSES,
|
|
647
|
-
ERASED_TEXT,
|
|
648
|
-
severity,
|
|
649
|
-
graver,
|
|
650
|
-
text,
|
|
651
|
-
id,
|
|
652
|
-
time,
|
|
653
|
-
typedTime,
|
|
654
|
-
count,
|
|
655
|
-
untrusted,
|
|
656
|
-
providerMetadata,
|
|
657
|
-
evidenceSource,
|
|
658
|
-
sourceReview,
|
|
659
|
-
author,
|
|
660
|
-
TASK_KINDS,
|
|
661
|
-
TASK_STATES,
|
|
662
|
-
CLOSED_STATES,
|
|
663
|
-
TASK_ORIGINS,
|
|
664
|
-
TASK_VERDICTS,
|
|
665
|
-
isClosedState,
|
|
666
|
-
PRIORITY_LABELS,
|
|
667
|
-
priorityLabel,
|
|
668
|
-
priorityBand,
|
|
669
|
-
legacyPriority,
|
|
670
|
-
checkedScore,
|
|
671
|
-
priorityOf,
|
|
672
|
-
priorityOption,
|
|
673
|
-
createTaskService,
|
|
674
|
-
matches,
|
|
675
|
-
FACT_STATUSES,
|
|
676
|
-
MEMORY_KINDS,
|
|
677
|
-
MEMORY_STATUSES,
|
|
678
|
-
MEMORY_SCOPES,
|
|
679
|
-
WORK_TASK_TYPES,
|
|
680
|
-
TASK_TYPES,
|
|
681
|
-
CATEGORIES,
|
|
682
|
-
organization,
|
|
683
|
-
project,
|
|
684
|
-
reminder,
|
|
685
|
-
REPORTER_SQL,
|
|
686
|
-
sourceOf3 as sourceOf,
|
|
687
|
-
LINK_KINDS,
|
|
688
|
-
LINK_ORIGINS,
|
|
689
|
-
LINK_SOURCES,
|
|
690
|
-
linkKind,
|
|
691
|
-
COUNTERPART_ROLE,
|
|
692
|
-
damageMarkPath,
|
|
693
|
-
healthMarkPath,
|
|
694
|
-
journalMarkPath,
|
|
695
|
-
markStoreDamaged,
|
|
696
|
-
readDamageMark,
|
|
697
|
-
clearDamageMark,
|
|
698
|
-
refuseDamagedStore,
|
|
699
|
-
markJournalLost,
|
|
700
|
-
readJournalMark,
|
|
701
|
-
readHealthMark,
|
|
702
|
-
recordDeepCheck,
|
|
703
|
-
isBotProvider,
|
|
704
|
-
inSource,
|
|
705
|
-
sourceOf as sourceOf2,
|
|
706
|
-
ACCOUNT_GROUPS,
|
|
707
|
-
ACCOUNT_GROUPS_SETTING,
|
|
708
|
-
isAccountList,
|
|
709
|
-
isGroupName,
|
|
710
|
-
groupName,
|
|
711
|
-
groupMembers,
|
|
712
|
-
listedHolds,
|
|
713
|
-
keyOf,
|
|
714
|
-
sourceOf2 as sourceOf3,
|
|
715
|
-
sameAs,
|
|
716
|
-
entriesOfList,
|
|
717
|
-
accountsOfList,
|
|
718
|
-
fitting
|
|
719
|
-
};
|