@wirecat/zoom-cli 0.76.0 → 0.78.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 +12 -11
- package/contracts/wirecat.json +53 -105
- package/dist/answer-entities.d.ts +1 -141
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +0 -31
- package/dist/answer-entities.js.map +1 -1
- package/dist/api.d.ts +18 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +179 -54
- package/dist/api.js.map +1 -1
- package/dist/archive-commands.d.ts +0 -3
- package/dist/archive-commands.d.ts.map +1 -1
- package/dist/archive-commands.js +1 -54
- package/dist/archive-commands.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-AAMFP7IN.js → all-profiles-7JN3N3E6.js} +11 -11
- package/dist/bundle/answer-policy-G2BNMPEX.js +122 -0
- package/dist/bundle/{anthropic-6KIS53QB.js → anthropic-U6O7UYGZ.js} +6 -6
- package/dist/bundle/{app-server-6QYNNYEU.js → app-server-G7BTC6CE.js} +78 -68
- package/dist/bundle/{bun-QVVCH4MJ.js → bun-VLROVUFK.js} +2 -2
- package/dist/bundle/{bun-sqlite-Y2ZFMNQ3.js → bun-sqlite-C5JLANDE.js} +7 -7
- package/dist/bundle/{chunk-25GMFXPF.js → chunk-2AWWMROP.js} +3244 -3674
- package/dist/bundle/{chunk-YESHGC3M.js → chunk-2LMD3JUD.js} +2 -2
- package/dist/bundle/{chunk-LGBLYFKI.js → chunk-2O66KMOR.js} +6 -2
- package/dist/bundle/{chunk-JADBHKBP.js → chunk-2USGT7LE.js} +1 -1
- package/dist/bundle/{chunk-M7WYBGQT.js → chunk-3A3B3JX4.js} +8 -8
- package/dist/bundle/{chunk-RJK5ADMH.js → chunk-3NZJKY7A.js} +103 -42
- package/dist/bundle/chunk-3QWYRZME.js +773 -0
- package/dist/bundle/{chunk-D2TGXSHQ.js → chunk-4QCLPSJ7.js} +5 -5
- package/dist/bundle/{chunk-XC4V6YCS.js → chunk-4XPVRZXE.js} +1 -1
- package/dist/bundle/{chunk-EZJSAYWZ.js → chunk-532FNLON.js} +31 -87
- package/dist/bundle/{chunk-QLUU3BV2.js → chunk-53TV72JG.js} +6 -6
- package/dist/bundle/{chunk-VJANMYEC.js → chunk-5DLK4OXF.js} +3 -3
- package/dist/bundle/chunk-5SM2IOAS.js +389 -0
- package/dist/bundle/{chunk-65VRWNDP.js → chunk-6MFEWAK4.js} +4 -4
- package/dist/bundle/{chunk-IUSY4ZJK.js → chunk-6NTNAEZF.js} +2379 -2114
- package/dist/bundle/{chunk-DQHS336B.js → chunk-7AMKSXMB.js} +7 -6
- package/dist/bundle/{chunk-IXPBSDKB.js → chunk-7EVB4UV7.js} +4 -4
- package/dist/bundle/chunk-7HEZQCHL.js +555 -0
- package/dist/bundle/{chunk-TYAFL66K.js → chunk-7IIQU5RA.js} +15 -31
- package/dist/bundle/{chunk-TK77DCE5.js → chunk-7K5O2VWO.js} +1 -1
- package/dist/bundle/{chunk-VG63EXRC.js → chunk-AEVSVVTP.js} +2 -2
- package/dist/bundle/chunk-B4V4DRVO.js +229 -0
- package/dist/bundle/{chunk-2HKUQ7DR.js → chunk-B6TUEQ4O.js} +3 -3
- package/dist/bundle/chunk-BAHXR4PA.js +259 -0
- package/dist/bundle/{chunk-ZFYNJERV.js → chunk-BGO7IEHY.js} +6 -6
- package/dist/bundle/{chunk-PFLJJQWW.js → chunk-BIUHLXL2.js} +54 -55
- package/dist/bundle/{chunk-5T7TBK5Y.js → chunk-C26V2XNV.js} +1 -1
- package/dist/bundle/chunk-C56OYYFG.js +170 -0
- package/dist/bundle/{chunk-MDTEAKA5.js → chunk-DLJPN47R.js} +8 -6
- package/dist/bundle/{chunk-FBVJGJDM.js → chunk-EV7QCFQR.js} +27 -574
- package/dist/bundle/{chunk-ORM73DZO.js → chunk-F2KZNAFF.js} +2 -2
- package/dist/bundle/{chunk-QY6GE7CL.js → chunk-F7IDYQLM.js} +2 -2
- package/dist/bundle/{chunk-WNXC42IU.js → chunk-FCGRXUAU.js} +9 -9
- package/dist/bundle/{chunk-ELW3LMJZ.js → chunk-FHOQWPQ6.js} +397 -157
- package/dist/bundle/{chunk-NQ356ERO.js → chunk-FMMCGQNT.js} +77 -10
- package/dist/bundle/{chunk-K3K3WKDB.js → chunk-FNLXFQN6.js} +1 -1
- package/dist/bundle/{chunk-YGKM2ZWF.js → chunk-FURKMNC2.js} +3 -3
- package/dist/bundle/{chunk-XRH2NKW4.js → chunk-FXHZHQKU.js} +6 -6
- package/dist/bundle/{chunk-GZYICXO4.js → chunk-GQ6EJDMV.js} +1 -1
- package/dist/bundle/{chunk-VABYJQYE.js → chunk-H34KEXTN.js} +24 -22
- package/dist/bundle/{chunk-HWYSJ4SL.js → chunk-H74NENWA.js} +3 -3
- package/dist/bundle/{chunk-Y2BGABXP.js → chunk-H7SRM26V.js} +3 -3
- package/dist/bundle/{chunk-VRA4RVQU.js → chunk-HGBZBQAE.js} +3 -3
- package/dist/bundle/{chunk-EZXW3ZCR.js → chunk-HI4QICF7.js} +12 -12
- package/dist/bundle/{chunk-LEVOI6Z3.js → chunk-HOJOVUO6.js} +14 -13
- package/dist/bundle/{chunk-XWQKRKMT.js → chunk-HUSIS3XO.js} +71 -252
- package/dist/bundle/chunk-IBINGDYF.js +335 -0
- package/dist/bundle/{chunk-55SWKR6Y.js → chunk-INJK7FNM.js} +337 -597
- package/dist/bundle/{chunk-CXHUOPN5.js → chunk-JOIAE3NO.js} +7 -7
- package/dist/bundle/{chunk-OFODCJ2A.js → chunk-KBTINKQF.js} +3 -3
- package/dist/bundle/{chunk-VCFSUGPE.js → chunk-KEAKNNXU.js} +4 -4
- package/dist/bundle/{chunk-XHVFX74L.js → chunk-LBTANUUH.js} +2 -2
- package/dist/bundle/chunk-LBV4673S.js +72 -0
- package/dist/bundle/chunk-LERF2FIK.js +295 -0
- package/dist/bundle/{chunk-UYZDH5LK.js → chunk-LX532BXO.js} +1 -1
- package/dist/bundle/{chunk-IVFNHIU4.js → chunk-M2M3U4UU.js} +81 -5
- package/dist/bundle/{chunk-JWMOHEDL.js → chunk-M5R2DURM.js} +10 -10
- package/dist/bundle/{chunk-4ERYXY4Y.js → chunk-MJMHUU3J.js} +1 -1
- package/dist/bundle/{chunk-GYTAHH5Y.js → chunk-MSMFYW6N.js} +2 -2
- package/dist/bundle/{chunk-X73YEFQE.js → chunk-MVLLWSV7.js} +20 -118
- package/dist/bundle/{chunk-RXUVXAMM.js → chunk-NO2LIHWA.js} +1 -1
- package/dist/bundle/{chunk-Y4WEAWU7.js → chunk-NS5XSCHC.js} +1 -1
- package/dist/bundle/{chunk-ZETM63M6.js → chunk-OAE6XR7E.js} +9 -60
- package/dist/bundle/{chunk-CS62FET6.js → chunk-OAYAGQ7C.js} +22 -22
- package/dist/bundle/{chunk-T2QVWRJF.js → chunk-OI4563JI.js} +39 -67
- package/dist/bundle/{chunk-WKT5RPSY.js → chunk-OOLNK3Y5.js} +8 -8
- package/dist/bundle/{chunk-EBIK5Q73.js → chunk-ORSTSBWU.js} +1 -1
- package/dist/bundle/{chunk-GB5LI5RM.js → chunk-P5QO7Y3H.js} +6 -6
- package/dist/bundle/{chunk-3D5PETD2.js → chunk-PJMQE4PW.js} +29 -9
- package/dist/bundle/{chunk-KEFDP6NL.js → chunk-Q4AKIAIA.js} +12 -12
- package/dist/bundle/{chunk-CPOFLYPU.js → chunk-Q4CNLEAY.js} +29 -29
- package/dist/bundle/{chunk-UAV74EY4.js → chunk-RJIJR6KH.js} +1 -1
- package/dist/bundle/{chunk-GPIQY4YB.js → chunk-TEFHNXXX.js} +14 -14
- package/dist/bundle/{chunk-FMJ4QSSU.js → chunk-TFDD4Q5Z.js} +10 -10
- package/dist/bundle/{chunk-HUHH25AG.js → chunk-TXDCIM5D.js} +3017 -1599
- package/dist/bundle/{chunk-FGRFIXG2.js → chunk-U2Z35B3W.js} +2 -2
- package/dist/bundle/{chunk-WZJ7ZYR4.js → chunk-UHBQM54J.js} +4 -4
- package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-UIBKGH5P.js} +1 -1
- package/dist/bundle/{chunk-5EII5RIL.js → chunk-UKYO3HNO.js} +1 -1
- package/dist/bundle/{chunk-7RORMNKP.js → chunk-V53TIJLY.js} +2 -2
- package/dist/bundle/{chunk-OOYIPK4F.js → chunk-VMA7SILL.js} +1 -1
- package/dist/bundle/chunk-VW36ZSAE.js +88 -0
- package/dist/bundle/chunk-WEAMGNST.js +31 -0
- package/dist/bundle/{chunk-EPPE6ZTS.js → chunk-WJTXO2EI.js} +1 -1
- package/dist/bundle/{chunk-4JPOELCT.js → chunk-WOYPWXZK.js} +4 -4
- package/dist/bundle/{chunk-OINDAHXC.js → chunk-XCOGI4JE.js} +4 -4
- package/dist/bundle/{chunk-CE5Y7PQU.js → chunk-XOG7B7K5.js} +4 -4
- package/dist/bundle/chunk-XSF5OBVZ.js +224 -0
- package/dist/bundle/{chunk-B7ZREOBD.js → chunk-XXD4YPHQ.js} +12 -12
- package/dist/bundle/{chunk-35AH33VJ.js → chunk-YAPDU3SV.js} +1 -1
- package/dist/bundle/{chunk-R47GYLNN.js → chunk-YHQ3TEGB.js} +29 -27
- package/dist/bundle/{chunk-LOEK6IFQ.js → chunk-YLNUKNGD.js} +87 -35
- package/dist/bundle/{chunk-6SXCGS3A.js → chunk-YNYQGZUW.js} +7 -7
- package/dist/bundle/{chunk-OWZETMRE.js → chunk-YZKVCTZI.js} +8 -8
- package/dist/bundle/{chunk-UG2QDGAH.js → chunk-ZCVO6GAT.js} +1 -1
- package/dist/bundle/{chunk-YEBWRWE3.js → chunk-ZDZASHSQ.js} +17 -17
- package/dist/bundle/chunk-ZZJ5IWNT.js +101 -0
- package/dist/bundle/{cli-FHMLYHUZ.js → cli-YALONJ4V.js} +135 -84
- package/dist/bundle/command-contract-DMR5EOIN.js +45 -0
- package/dist/bundle/{command-server-entry-YEZM52R5.js → command-server-entry-W4XTBUZE.js} +35 -31
- package/dist/bundle/config-4TLDRXRL.js +109 -0
- package/dist/bundle/{decode-SIYRMJOK.js → decode-IFQHVCFX.js} +16 -8
- package/dist/bundle/{dispatch-SMER3WDX.js → dispatch-GOJB4TDK.js} +9 -9
- package/dist/bundle/{dist-BSJETSFE.js → dist-H7XFUMRX.js} +25 -22
- package/dist/bundle/{echarts-UZJ6AREV.js → echarts-HPUHPJCO.js} +2 -2
- package/dist/bundle/{embed-A7DSHVI7.js → embed-ESU3WZYW.js} +7 -7
- package/dist/bundle/{embedder-WQBR4UGS.js → embedder-BV6O76B3.js} +10 -10
- package/dist/bundle/{failure-73UQXQTW.js → failure-SWVCYFQX.js} +3 -3
- package/dist/bundle/first-run-OEJGAQAE.js +29 -0
- package/dist/bundle/first-screen-QLM4IABL.js +45 -0
- package/dist/bundle/{folders-BH4SV6SI.js → folders-VQGKBM3P.js} +5 -5
- package/dist/bundle/{instructions-SDDUBGH4.js → instructions-UUX57I3V.js} +1 -1
- package/dist/bundle/{main-KL4FN5F3.js → main-UIKADOFB.js} +24 -24
- package/dist/bundle/{mcp-GN4FTJX5.js → mcp-VMS6PBCU.js} +2 -2
- package/dist/bundle/meeting-combined-SKJISCC7.js +26 -0
- package/dist/bundle/meeting-model-YG3Z5KCB.js +26 -0
- package/dist/bundle/meeting-semantic-F6GUICB7.js +23 -0
- package/dist/bundle/{meetings-URPXBHV7.js → meetings-KIBUPLPW.js} +37 -7
- package/dist/bundle/{node-ELCNUOCE.js → node-AM3JCAWB.js} +2 -2
- package/dist/bundle/{node-sqlite-QLSNHZBM.js → node-sqlite-VM6VS3RU.js} +8 -8
- package/dist/bundle/{oauth-LZ64S7Y3.js → oauth-AX5Z32H6.js} +8 -8
- package/dist/bundle/{open-WB4HUPQT.js → open-SSGOOOZG.js} +6 -6
- package/dist/bundle/openai-YIP73X2B.js +28 -0
- package/dist/bundle/{output-file-AHPQA5LR.js → output-file-FR226A64.js} +6 -6
- package/dist/bundle/{process-67DAKAAQ.js → process-5ZEK2VFY.js} +1 -1
- package/dist/bundle/{program-CIMACIBE.js → program-ROJAJHCB.js} +424 -251
- package/dist/bundle/{prompt-GG53UBDJ.js → prompt-6Y7A4453.js} +6 -6
- package/dist/bundle/{recognize-CFJ3CAEH.js → recognize-R5W25WKH.js} +5 -5
- package/dist/bundle/{remote-BLEM7C3Q.js → remote-PA4FQUZK.js} +11 -11
- package/dist/bundle/{rerank-ERN6PC66.js → rerank-CYX3UFTM.js} +8 -8
- package/dist/bundle/run-log-FHERL3H6.js +136 -0
- package/dist/bundle/{serve-FJPPTJXH.js → serve-MM5QEZJW.js} +15 -15
- package/dist/bundle/{server-FLUSDUGM.js → server-JQQAH7E5.js} +64 -54
- package/dist/bundle/server-W2BBONCQ.js +85 -0
- package/dist/bundle/{services-LXC6DVUQ.js → services-Y2DOQONM.js} +85 -54
- package/dist/bundle/{speech-WFEZTKXA.js → speech-O6WLX34V.js} +34 -18
- package/dist/bundle/{sqlite-runtime-KN33VSP7.js → sqlite-runtime-LQTBZMFH.js} +7 -7
- package/dist/bundle/{state-TXS4ZHIT.js → state-AIDPZLVH.js} +7 -7
- package/dist/bundle/{store-ZUREZYZB.js → store-BA4FQS5V.js} +26 -20
- package/dist/bundle/{store-MUOXLVL4.js → store-UNDS2TBG.js} +30 -22
- package/dist/bundle/store-connection-ADBJ36T4.js +102 -0
- package/dist/bundle/store-maintenance-command-IB6ML4UI.js +77 -0
- package/dist/bundle/{streaming-ZSCHRC5S.js → streaming-UFHT5MR2.js} +7 -7
- package/dist/bundle/{tokens-YVDOY4EV.js → tokens-Z32UKGQB.js} +10 -10
- package/dist/bundle/zm.js +9 -9
- package/dist/bundle/{zoom-app-O6GIMB7Y.js → zoom-app-6U46XBTG.js} +8 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -0
- package/dist/commands.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +3 -5
- package/dist/first-screen.js.map +1 -1
- package/dist/meeting-integration-commands.d.ts.map +1 -1
- package/dist/meeting-integration-commands.js +46 -28
- package/dist/meeting-integration-commands.js.map +1 -1
- package/dist/meeting-source.d.ts.map +1 -1
- package/dist/meeting-source.js +15 -1
- package/dist/meeting-source.js.map +1 -1
- package/dist/permissions.d.ts +8 -4
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +25 -24
- package/dist/permissions.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +8 -5
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +2 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js.map +1 -1
- package/dist/remote-meetings.d.ts +38 -8
- package/dist/remote-meetings.d.ts.map +1 -1
- package/dist/remote-meetings.js +52 -29
- package/dist/remote-meetings.js.map +1 -1
- package/dist/run.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +1 -0
- package/dist/zoom-app.js.map +1 -1
- package/package.json +5 -4
- package/skills/zoom-cli/SKILL.md +88 -236
- package/skills/zoom-cli/references/archive.md +59 -0
- package/skills/zoom-cli/references/people-and-projects.md +51 -0
- package/skills/zoom-cli/references/prepare.md +78 -0
- package/skills/zoom-cli/references/search.md +71 -0
- package/skills/zoom-cli/references/setup.md +31 -0
- package/skills/zoom-cli/references/zoom-live.md +27 -0
- package/dist/bundle/answer-policy-ETAELI4A.js +0 -110
- package/dist/bundle/chunk-64N7MY3I.js +0 -161
- package/dist/bundle/command-contract-HUZ4I23S.js +0 -41
- package/dist/bundle/config-KVTWN7QZ.js +0 -97
- package/dist/bundle/first-run-SY6XSUZ3.js +0 -29
- package/dist/bundle/first-screen-ZDMODGWS.js +0 -39
- package/dist/bundle/openai-KN6JE4QU.js +0 -28
- package/dist/bundle/run-log-S67YPJF6.js +0 -124
- package/dist/bundle/server-UNJY3TSJ.js +0 -74
- package/dist/bundle/store-connection-NRNEBUPU.js +0 -90
- package/dist/bundle/store-maintenance-command-OBOPYFZ5.js +0 -65
- /package/dist/bundle/{chunk-BDCC2J2Z.js → chunk-SHTHNBHG.js} +0 -0
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
isCliFailure,
|
|
5
5
|
isStoreDamage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AEVSVVTP.js";
|
|
7
7
|
import {
|
|
8
8
|
ADDED_PROVIDER,
|
|
9
9
|
INTERNAL_NOTES,
|
|
@@ -17,16 +17,10 @@ import {
|
|
|
17
17
|
kindsIn,
|
|
18
18
|
providerNamed,
|
|
19
19
|
providers
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7IIQU5RA.js";
|
|
21
21
|
import {
|
|
22
22
|
refuseOwnerStoreInTests
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
createRecordLog,
|
|
26
|
-
resolvePaths,
|
|
27
|
-
traceIdOf,
|
|
28
|
-
writeSecurely
|
|
29
|
-
} from "./chunk-CS62FET6.js";
|
|
23
|
+
} from "./chunk-LBTANUUH.js";
|
|
30
24
|
import {
|
|
31
25
|
array,
|
|
32
26
|
boolean,
|
|
@@ -46,535 +40,22 @@ import {
|
|
|
46
40
|
strictObject,
|
|
47
41
|
string,
|
|
48
42
|
unknown
|
|
49
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PJMQE4PW.js";
|
|
50
44
|
import {
|
|
51
45
|
CliError
|
|
52
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-FNLXFQN6.js";
|
|
53
47
|
import {
|
|
54
48
|
__name
|
|
55
49
|
} from "./chunk-ZVVMGPBJ.js";
|
|
56
50
|
|
|
57
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58
|
-
import { randomUUID } from "node:crypto";
|
|
59
|
-
import { appendFileSync, mkdirSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
60
|
-
import { userInfo } from "node:os";
|
|
61
|
-
import { join, sep } from "node:path";
|
|
62
|
-
|
|
63
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
64
|
-
var snake = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
65
|
-
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
66
|
-
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
67
|
-
var logAttributes = /* @__PURE__ */ __name((event) => renamed(event, snake), "logAttributes");
|
|
68
|
-
var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
|
|
69
|
-
var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
70
|
-
debug: /* @__PURE__ */ __name((event, message) => logger.debug(logAttributes(event), message), "debug"),
|
|
71
|
-
info: /* @__PURE__ */ __name((event, message) => logger.info(logAttributes(event), message), "info"),
|
|
72
|
-
warn: /* @__PURE__ */ __name((event, message) => logger.warn(logAttributes(event), message), "warn"),
|
|
73
|
-
error: /* @__PURE__ */ __name((event, message) => logger.error(logAttributes(event), message), "error")
|
|
74
|
-
}), "snakeLogger");
|
|
75
|
-
|
|
76
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
77
|
-
var diagnostic = {
|
|
78
|
-
event: true,
|
|
79
|
-
operation: true,
|
|
80
|
-
opcode: true,
|
|
81
|
-
seq: true,
|
|
82
|
-
status: true,
|
|
83
|
-
method: true,
|
|
84
|
-
endpointTemplate: true,
|
|
85
|
-
bytes: true,
|
|
86
|
-
ids: true,
|
|
87
|
-
counts: true,
|
|
88
|
-
durationMs: true,
|
|
89
|
-
outcome: true,
|
|
90
|
-
errorCode: true,
|
|
91
|
-
providerError: true,
|
|
92
|
-
level: true,
|
|
93
|
-
transport: true,
|
|
94
|
-
attempt: true,
|
|
95
|
-
waitMs: true,
|
|
96
|
-
code: true,
|
|
97
|
-
detail: true,
|
|
98
|
-
reason: true,
|
|
99
|
-
ageMs: true,
|
|
100
|
-
kind: true,
|
|
101
|
-
table: true,
|
|
102
|
-
op: true,
|
|
103
|
-
n: true
|
|
104
|
-
};
|
|
105
|
-
var send = {
|
|
106
|
-
profile: true,
|
|
107
|
-
chatId: true,
|
|
108
|
-
outcome: true,
|
|
109
|
-
kind: true,
|
|
110
|
-
action: true,
|
|
111
|
-
people: true,
|
|
112
|
-
messageId: true,
|
|
113
|
-
key: true,
|
|
114
|
-
count: true,
|
|
115
|
-
forEveryone: true,
|
|
116
|
-
sendId: true,
|
|
117
|
-
operationId: true,
|
|
118
|
-
parentOperationId: true,
|
|
119
|
-
replyTo: true,
|
|
120
|
-
threadId: true,
|
|
121
|
-
sendAs: true,
|
|
122
|
-
resultChatId: true,
|
|
123
|
-
length: true,
|
|
124
|
-
attachments: true,
|
|
125
|
-
scheduledFor: true,
|
|
126
|
-
notify: true,
|
|
127
|
-
origin: true,
|
|
128
|
-
reservation: true,
|
|
129
|
-
errorCode: true
|
|
130
|
-
};
|
|
131
|
-
var background = [
|
|
132
|
-
"job",
|
|
133
|
-
"pid",
|
|
134
|
-
"schedule",
|
|
135
|
-
"exitCode",
|
|
136
|
-
"tool",
|
|
137
|
-
"tier",
|
|
138
|
-
"actorType",
|
|
139
|
-
"actorId",
|
|
140
|
-
"agent",
|
|
141
|
-
"targetType",
|
|
142
|
-
"targetId"
|
|
143
|
-
];
|
|
144
|
-
var crash = ["errorClass", "frames"];
|
|
145
|
-
var dropped = ["dropped"];
|
|
146
|
-
var LOG_ATTRIBUTES = [
|
|
147
|
-
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
148
|
-
].sort();
|
|
149
|
-
|
|
150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
151
|
-
var KEEP_RUNS_FOR_DAYS = 30;
|
|
152
|
-
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
153
|
-
var KEEP_STORE_RUNS_FOR_DAYS = 3;
|
|
154
|
-
var RUNS_SIZE_LIMIT_MB = 200;
|
|
155
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
156
|
-
var startRun = /* @__PURE__ */ __name((options) => {
|
|
157
|
-
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
158
|
-
const startedAt = options.startedAt ?? now();
|
|
159
|
-
const id2 = options.runId ?? newRunId(startedAt, options.command);
|
|
160
|
-
const dir = join(options.runsDir, day(startedAt), id2);
|
|
161
|
-
pruneRuns(options.runsDir, {
|
|
162
|
-
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
163
|
-
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
164
|
-
keepStoreDays: options.keepStoreDays ?? KEEP_STORE_RUNS_FOR_DAYS,
|
|
165
|
-
maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
|
|
166
|
-
now: startedAt
|
|
167
|
-
});
|
|
168
|
-
refuseRealStateInTests(dir);
|
|
169
|
-
const metadata = {
|
|
170
|
-
runId: id2,
|
|
171
|
-
command: options.command,
|
|
172
|
-
...options.profile === void 0 ? {} : { profile: options.profile },
|
|
173
|
-
startedAt: startedAt.toISOString(),
|
|
174
|
-
status: "running",
|
|
175
|
-
cliVersion: options.cliVersion,
|
|
176
|
-
runtime: runtime(),
|
|
177
|
-
platform: process.platform,
|
|
178
|
-
arch: process.arch,
|
|
179
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
180
|
-
...options.context
|
|
181
|
-
};
|
|
182
|
-
let file;
|
|
183
|
-
const opened = /* @__PURE__ */ __name(() => {
|
|
184
|
-
if (file)
|
|
185
|
-
return file;
|
|
186
|
-
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
187
|
-
const events = join(dir, "events.jsonl");
|
|
188
|
-
writeFileSync(events, "", { flag: "a", mode: 384 });
|
|
189
|
-
file = snakeLogger(createRecordLog({
|
|
190
|
-
to: events,
|
|
191
|
-
runId: id2,
|
|
192
|
-
command: options.command,
|
|
193
|
-
resource: { service: options.service, version: options.cliVersion },
|
|
194
|
-
allow: LOG_ATTRIBUTES,
|
|
195
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
196
|
-
...options.onError === void 0 ? {} : { onError: options.onError }
|
|
197
|
-
}));
|
|
198
|
-
writeRunFile(dir, metadata);
|
|
199
|
-
return file;
|
|
200
|
-
}, "opened");
|
|
201
|
-
if (!options.lazy)
|
|
202
|
-
opened();
|
|
203
|
-
let finished = false;
|
|
204
|
-
const operations = /* @__PURE__ */ new Set();
|
|
205
|
-
const codes = /* @__PURE__ */ new Set();
|
|
206
|
-
const tables = /* @__PURE__ */ new Set();
|
|
207
|
-
const noted = /* @__PURE__ */ __name((level) => (event, message) => {
|
|
208
|
-
const { operation, errorCode, error_code, code, kind, table } = event;
|
|
209
|
-
if (typeof operation === "string")
|
|
210
|
-
operations.add(operation);
|
|
211
|
-
if (kind === "store" && typeof table === "string")
|
|
212
|
-
tables.add(table);
|
|
213
|
-
for (const value of [errorCode, error_code, code])
|
|
214
|
-
if (typeof value === "string")
|
|
215
|
-
codes.add(value);
|
|
216
|
-
if (finished)
|
|
217
|
-
return;
|
|
218
|
-
opened()[level](event, message);
|
|
219
|
-
}, "noted");
|
|
220
|
-
const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
|
|
221
|
-
return {
|
|
222
|
-
id: id2,
|
|
223
|
-
dir,
|
|
224
|
-
logger,
|
|
225
|
-
finish: /* @__PURE__ */ __name(async (status, extra = {}) => {
|
|
226
|
-
if (finished)
|
|
227
|
-
return;
|
|
228
|
-
finished = true;
|
|
229
|
-
const completedAt = now();
|
|
230
|
-
const final = {
|
|
231
|
-
...metadata,
|
|
232
|
-
...extra,
|
|
233
|
-
status,
|
|
234
|
-
completedAt: completedAt.toISOString(),
|
|
235
|
-
durationMs: completedAt.getTime() - startedAt.getTime(),
|
|
236
|
-
operations: [...operations].sort(),
|
|
237
|
-
codes: [...codes].sort(),
|
|
238
|
-
...tables.size > 0 ? { tables: [...tables].sort() } : {}
|
|
239
|
-
};
|
|
240
|
-
if (file || status !== "success") {
|
|
241
|
-
opened();
|
|
242
|
-
writeRunFile(dir, final);
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
try {
|
|
246
|
-
mkdirSync(join(dir, ".."), { recursive: true, mode: 448 });
|
|
247
|
-
appendIndex(join(dir, ".."), runFileOf(final));
|
|
248
|
-
} catch (error) {
|
|
249
|
-
options.onError?.(error);
|
|
250
|
-
}
|
|
251
|
-
}, "finish")
|
|
252
|
-
};
|
|
253
|
-
}, "startRun");
|
|
254
|
-
var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
|
|
255
|
-
if (env.VITEST === void 0)
|
|
256
|
-
return;
|
|
257
|
-
let home;
|
|
258
|
-
try {
|
|
259
|
-
home = userInfo().homedir;
|
|
260
|
-
} catch {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
if (dir.startsWith(join(home, ".local", "share") + sep))
|
|
264
|
-
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
265
|
-
}, "refuseRealStateInTests");
|
|
266
|
-
var runtime = /* @__PURE__ */ __name(() => {
|
|
267
|
-
const bun = process.versions.bun;
|
|
268
|
-
return bun ? `bun ${bun}` : `node ${process.versions.node}`;
|
|
269
|
-
}, "runtime");
|
|
270
|
-
var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
271
|
-
const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
|
|
272
|
-
const slug = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
|
|
273
|
-
return `${stamp}-${slug}-${randomUUID().slice(0, 6)}`;
|
|
274
|
-
}, "newRunId");
|
|
275
|
-
var INDEX = "index.jsonl";
|
|
276
|
-
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
277
|
-
appendFileSync(join(dayDir, INDEX), `${JSON.stringify(written)}
|
|
278
|
-
`, { mode: 384 });
|
|
279
|
-
}, "appendIndex");
|
|
280
|
-
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
281
|
-
const written = runFileOf(metadata);
|
|
282
|
-
writeSecurely(join(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
283
|
-
`, 384);
|
|
284
|
-
try {
|
|
285
|
-
appendIndex(join(dir, ".."), written);
|
|
286
|
-
} catch {
|
|
287
|
-
}
|
|
288
|
-
}, "writeRunFile");
|
|
289
|
-
var matchesListFilter = /* @__PURE__ */ __name((run, filter) => (filter.runId === void 0 || run.runId === filter.runId) && (filter.command === void 0 || run.command === filter.command) && (filter.profile === void 0 || run.profile === filter.profile) && (filter.status === void 0 || run.status === filter.status) && (filter.errorCode === void 0 || run.errorCode === filter.errorCode), "matchesListFilter");
|
|
290
|
-
var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
|
|
291
|
-
const first = since === void 0 ? void 0 : day(new Date(since));
|
|
292
|
-
const runs = [];
|
|
293
|
-
for (const date of days(runsDir).sort().reverse()) {
|
|
294
|
-
if (first !== void 0 && date < first || runs.length >= atLeast)
|
|
295
|
-
break;
|
|
296
|
-
for (const metadata of runsOfDay(join(runsDir, date))) {
|
|
297
|
-
if (matchesListFilter(metadata, filter))
|
|
298
|
-
runs.push(metadata);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
return runs;
|
|
302
|
-
}, "listRuns");
|
|
303
|
-
var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
304
|
-
const latest = /* @__PURE__ */ new Map();
|
|
305
|
-
let raw = "";
|
|
306
|
-
try {
|
|
307
|
-
raw = readFileSync(join(dayDir, INDEX), "utf8");
|
|
308
|
-
} catch {
|
|
309
|
-
}
|
|
310
|
-
for (const line of raw.split("\n")) {
|
|
311
|
-
if (line.trim() === "")
|
|
312
|
-
continue;
|
|
313
|
-
try {
|
|
314
|
-
const metadata = metadataOf(JSON.parse(line));
|
|
315
|
-
if (typeof metadata.runId === "string")
|
|
316
|
-
latest.set(metadata.runId, metadata);
|
|
317
|
-
} catch {
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
return latest;
|
|
321
|
-
}, "indexedRuns");
|
|
322
|
-
var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
323
|
-
const latest = indexedRuns(dayDir);
|
|
324
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
325
|
-
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
326
|
-
continue;
|
|
327
|
-
const metadata = readRun(join(dayDir, entry));
|
|
328
|
-
if (metadata)
|
|
329
|
-
latest.set(metadata.runId, metadata);
|
|
330
|
-
}
|
|
331
|
-
return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
|
|
332
|
-
}, "runsOfDay");
|
|
333
|
-
var findRun = /* @__PURE__ */ __name((runsDir, id2) => {
|
|
334
|
-
const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id2);
|
|
335
|
-
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
336
|
-
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
337
|
-
for (const date of dates) {
|
|
338
|
-
const dir = join(runsDir, date, id2);
|
|
339
|
-
const metadata = readRun(dir);
|
|
340
|
-
if (metadata)
|
|
341
|
-
return { dir, metadata };
|
|
342
|
-
}
|
|
343
|
-
for (const date of dates) {
|
|
344
|
-
const metadata = indexedRuns(join(runsDir, date)).get(id2);
|
|
345
|
-
if (metadata)
|
|
346
|
-
return { dir: join(runsDir, date, id2), metadata };
|
|
347
|
-
}
|
|
348
|
-
return void 0;
|
|
349
|
-
}, "findRun");
|
|
350
|
-
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
351
|
-
let raw;
|
|
352
|
-
try {
|
|
353
|
-
raw = readFileSync(join(dir, "events.jsonl"), "utf8");
|
|
354
|
-
} catch {
|
|
355
|
-
return [];
|
|
356
|
-
}
|
|
357
|
-
const events = [];
|
|
358
|
-
for (const line of raw.split("\n")) {
|
|
359
|
-
if (line.trim() === "")
|
|
360
|
-
continue;
|
|
361
|
-
try {
|
|
362
|
-
const parsed = JSON.parse(line);
|
|
363
|
-
if (parsed !== null && typeof parsed === "object")
|
|
364
|
-
events.push(eventOf(parsed));
|
|
365
|
-
} catch {
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
return events;
|
|
369
|
-
}, "readEvents");
|
|
370
|
-
var eventOf = /* @__PURE__ */ __name((line) => {
|
|
371
|
-
const { attributes, time: time2, severity: severity2 } = line;
|
|
372
|
-
if (attributes === null || typeof attributes !== "object")
|
|
373
|
-
return logAttributes(line);
|
|
374
|
-
return { time: time2, severity: severity2, ...logAttributes(attributes) };
|
|
375
|
-
}, "eventOf");
|
|
376
|
-
var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, keepStoreDays = KEEP_STORE_RUNS_FOR_DAYS, maxBytes, now }) => {
|
|
377
|
-
const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
|
|
378
|
-
const before = /* @__PURE__ */ __name((days2) => day(new Date(now.getTime() - Math.min(days2, keepDays) * DAY_MS)), "before");
|
|
379
|
-
const successCutoff = before(keepSuccessDays);
|
|
380
|
-
const storeCutoff = before(keepStoreDays);
|
|
381
|
-
const keptFor = /* @__PURE__ */ __name((metadata) => metadata.keptBecauseStore ? keepStoreDays : metadata.operations?.includes(STORE_WRITE) ? Math.max(keepSuccessDays, keepStoreDays) : keepSuccessDays, "keptFor");
|
|
382
|
-
let removed = 0;
|
|
383
|
-
for (const date of days(runsDir)) {
|
|
384
|
-
if (date >= cutoff) {
|
|
385
|
-
if (date < storeCutoff)
|
|
386
|
-
dropSuccesses(join(runsDir, date), STORE_RUNS_DROPPED, (metadata) => keptFor(metadata) <= keepStoreDays);
|
|
387
|
-
if (date < successCutoff)
|
|
388
|
-
dropSuccesses(join(runsDir, date), SUCCESSES_DROPPED, (metadata) => keptFor(metadata) <= keepSuccessDays);
|
|
389
|
-
continue;
|
|
390
|
-
}
|
|
391
|
-
try {
|
|
392
|
-
rmSync(join(runsDir, date), { recursive: true, force: true });
|
|
393
|
-
removed += 1;
|
|
394
|
-
} catch {
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
if (maxBytes !== void 0)
|
|
398
|
-
removed += fitSize(runsDir, maxBytes, now);
|
|
399
|
-
return removed;
|
|
400
|
-
}, "pruneRuns");
|
|
401
|
-
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
402
|
-
var STORE_WRITE = "store.write";
|
|
403
|
-
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
404
|
-
var STORE_RUNS_DROPPED = ".store-runs-dropped";
|
|
405
|
-
var SIZE_CHECKED = ".size-checked";
|
|
406
|
-
var dropSuccesses = /* @__PURE__ */ __name((dayDir, marker = SUCCESSES_DROPPED, drops = () => true) => {
|
|
407
|
-
const done = join(dayDir, marker);
|
|
408
|
-
try {
|
|
409
|
-
statSync(done);
|
|
410
|
-
return;
|
|
411
|
-
} catch {
|
|
412
|
-
}
|
|
413
|
-
const dropped2 = /* @__PURE__ */ __name((metadata) => metadata?.status === "success" && drops(metadata), "dropped");
|
|
414
|
-
try {
|
|
415
|
-
const kept = [];
|
|
416
|
-
for (const [id2, metadata] of indexedRuns(dayDir)) {
|
|
417
|
-
if (dropped2(metadata))
|
|
418
|
-
rmSync(join(dayDir, id2), { recursive: true, force: true });
|
|
419
|
-
else
|
|
420
|
-
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
421
|
-
}
|
|
422
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
423
|
-
if (entry === INDEX || entry.startsWith("."))
|
|
424
|
-
continue;
|
|
425
|
-
if (dropped2(readRun(join(dayDir, entry))))
|
|
426
|
-
rmSync(join(dayDir, entry), { recursive: true, force: true });
|
|
427
|
-
}
|
|
428
|
-
writeSecurely(join(dayDir, INDEX), kept.map((line) => `${line}
|
|
429
|
-
`).join(""), 384);
|
|
430
|
-
writeFileSync(done, "", { mode: 384 });
|
|
431
|
-
} catch {
|
|
432
|
-
}
|
|
433
|
-
}, "dropSuccesses");
|
|
434
|
-
var sizeOf = /* @__PURE__ */ __name((path) => {
|
|
435
|
-
let total = 0;
|
|
436
|
-
for (const entry of safeReaddir(path)) {
|
|
437
|
-
const full = join(path, entry);
|
|
438
|
-
try {
|
|
439
|
-
const stat = statSync(full);
|
|
440
|
-
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
441
|
-
} catch {
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
return total;
|
|
445
|
-
}, "sizeOf");
|
|
446
|
-
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
447
|
-
const stamp = join(runsDir, SIZE_CHECKED);
|
|
448
|
-
const today = day(now);
|
|
449
|
-
try {
|
|
450
|
-
if (readFileSync(stamp, "utf8").trim() === today)
|
|
451
|
-
return 0;
|
|
452
|
-
} catch {
|
|
453
|
-
}
|
|
454
|
-
const dates = days(runsDir).sort();
|
|
455
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(join(runsDir, date))]));
|
|
456
|
-
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
457
|
-
let removed = 0;
|
|
458
|
-
for (const date of dates) {
|
|
459
|
-
if (total <= maxBytes || date === today)
|
|
460
|
-
break;
|
|
461
|
-
dropSuccesses(join(runsDir, date));
|
|
462
|
-
const after = sizeOf(join(runsDir, date));
|
|
463
|
-
total -= (sizes.get(date) ?? 0) - after;
|
|
464
|
-
sizes.set(date, after);
|
|
465
|
-
}
|
|
466
|
-
for (const date of dates) {
|
|
467
|
-
if (total <= maxBytes || date === today)
|
|
468
|
-
break;
|
|
469
|
-
try {
|
|
470
|
-
rmSync(join(runsDir, date), { recursive: true, force: true });
|
|
471
|
-
total -= sizes.get(date) ?? 0;
|
|
472
|
-
removed += 1;
|
|
473
|
-
} catch {
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
try {
|
|
477
|
-
mkdirSync(runsDir, { recursive: true, mode: 448 });
|
|
478
|
-
writeFileSync(stamp, today, { mode: 384 });
|
|
479
|
-
} catch {
|
|
480
|
-
}
|
|
481
|
-
return removed;
|
|
482
|
-
}, "fitSize");
|
|
483
|
-
var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
|
|
484
|
-
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
485
|
-
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
486
|
-
try {
|
|
487
|
-
return metadataOf(JSON.parse(readFileSync(join(dir, "run.json"), "utf8")));
|
|
488
|
-
} catch {
|
|
489
|
-
return void 0;
|
|
490
|
-
}
|
|
491
|
-
}, "readRun");
|
|
492
|
-
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
493
|
-
try {
|
|
494
|
-
return readdirSync(dir);
|
|
495
|
-
} catch {
|
|
496
|
-
return [];
|
|
497
|
-
}
|
|
498
|
-
}, "safeReaddir");
|
|
499
|
-
var runFileOf = /* @__PURE__ */ __name(({ partial, ...metadata }) => ({
|
|
500
|
-
...logAttributes(metadata),
|
|
501
|
-
...partial ? { partial: { ...logAttributes(partial), failures: partial.failures.map((failure) => logAttributes(failure)) } } : {}
|
|
502
|
-
}), "runFileOf");
|
|
503
|
-
var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
504
|
-
const { partial, ...metadata } = fromLogAttributes(parsed);
|
|
505
|
-
if (partial === null || typeof partial !== "object")
|
|
506
|
-
return metadata;
|
|
507
|
-
const { failures, ...rest } = fromLogAttributes(partial);
|
|
508
|
-
return {
|
|
509
|
-
...metadata,
|
|
510
|
-
partial: {
|
|
511
|
-
...rest,
|
|
512
|
-
failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
}, "metadataOf");
|
|
516
|
-
|
|
517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
518
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
519
|
-
import { randomBytes } from "node:crypto";
|
|
520
|
-
var scopes = new AsyncLocalStorage();
|
|
521
|
-
var processScope;
|
|
522
|
-
var ownProcesses = new AsyncLocalStorage();
|
|
523
|
-
var asOwnProcess = /* @__PURE__ */ __name((body) => ownProcesses.run({}, body), "asOwnProcess");
|
|
524
|
-
var currentRun = /* @__PURE__ */ __name(() => {
|
|
525
|
-
const scope = scopes.getStore();
|
|
526
|
-
if (scope)
|
|
527
|
-
return scope;
|
|
528
|
-
const own = ownProcesses.getStore();
|
|
529
|
-
const fresh = /* @__PURE__ */ __name(() => ({
|
|
530
|
-
runId: newRunId(/* @__PURE__ */ new Date(), "process"),
|
|
531
|
-
command: "",
|
|
532
|
-
startedAt: Date.now(),
|
|
533
|
-
...traceOf(process.env)
|
|
534
|
-
}), "fresh");
|
|
535
|
-
if (own) {
|
|
536
|
-
own.scope ??= fresh();
|
|
537
|
-
return own.scope;
|
|
538
|
-
}
|
|
539
|
-
processScope ??= fresh();
|
|
540
|
-
return processScope;
|
|
541
|
-
}, "currentRun");
|
|
542
|
-
var inRun = /* @__PURE__ */ __name((scope, body) => scopes.run(scope, body), "inRun");
|
|
543
|
-
var runEvent = /* @__PURE__ */ __name((event) => scopes.getStore()?.events?.(event), "runEvent");
|
|
544
|
-
var typedCommand = /* @__PURE__ */ __name((tool, words, profile = currentRun().profile) => [tool, profile, words].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
|
|
545
|
-
var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
|
|
546
|
-
const own = ownProcesses.getStore();
|
|
547
|
-
if (own)
|
|
548
|
-
own.scope = scope;
|
|
549
|
-
else
|
|
550
|
-
processScope = scope;
|
|
551
|
-
}, "useAsProcessRun");
|
|
552
|
-
var processRun = /* @__PURE__ */ __name(() => {
|
|
553
|
-
const own = ownProcesses.getStore();
|
|
554
|
-
return own ? own.scope : processScope;
|
|
555
|
-
}, "processRun");
|
|
556
|
-
var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
|
|
557
|
-
var traceOf = /* @__PURE__ */ __name((env) => {
|
|
558
|
-
const traceId = traceIdOf(env.TRACEPARENT);
|
|
559
|
-
return traceId === void 0 ? {} : { traceId };
|
|
560
|
-
}, "traceOf");
|
|
561
|
-
var childTrace = /* @__PURE__ */ __name(() => {
|
|
562
|
-
const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
|
|
563
|
-
const traceId = hex(16);
|
|
564
|
-
return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
|
|
565
|
-
}, "childTrace");
|
|
566
|
-
var attempts = new AsyncLocalStorage();
|
|
567
|
-
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
568
|
-
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
569
|
-
|
|
570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.663.0_@wirecat+cli-base@0.100.0_commander@15.0.0_esbuild@0.28.2_typ_3651938dd4032f987ce713acb104c9b9/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
51
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/store/source-review.js
|
|
571
52
|
var SOURCE_REVIEW_KIND = "memory_source_review";
|
|
572
53
|
var SOURCE_REVIEW_CAUSES = ["changed", "outdated", "deleted", "contradicted"];
|
|
573
54
|
var ERASED_TEXT = "[source erased]";
|
|
574
55
|
var severity = /* @__PURE__ */ __name((cause) => SOURCE_REVIEW_CAUSES.indexOf(cause), "severity");
|
|
575
56
|
var graver = /* @__PURE__ */ __name((a, b) => severity(b) > severity(a) ? b : a, "graver");
|
|
576
57
|
|
|
577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
58
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/tasks/model.js
|
|
578
59
|
var TASK_KINDS = ["question", "request", "mention", "promise"];
|
|
579
60
|
var TASK_STATES = ["open", "todo", "in_progress", "done", "dismissed"];
|
|
580
61
|
var CLOSED_STATES = ["done", "dismissed"];
|
|
@@ -589,7 +70,7 @@ function closeTask(task, state, by, at, reason) {
|
|
|
589
70
|
}
|
|
590
71
|
__name(closeTask, "closeTask");
|
|
591
72
|
|
|
592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/tasks/priority.js
|
|
593
74
|
var PRIORITY_LABELS = ["low", "medium", "high", "critical"];
|
|
594
75
|
var MIDDLE = { low: 0.125, medium: 0.375, high: 0.625, critical: 0.875 };
|
|
595
76
|
var LEGACY_PRIORITY_SCORES = [0.875, 0.625, 0.375, 0.1875, 0.0625];
|
|
@@ -618,7 +99,7 @@ var priorityOf = /* @__PURE__ */ __name((value) => {
|
|
|
618
99
|
}, "priorityOf");
|
|
619
100
|
var priorityOption = /* @__PURE__ */ __name((value) => priorityOf(value) ?? "none", "priorityOption");
|
|
620
101
|
|
|
621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/tasks/service.js
|
|
622
103
|
function createTaskService({ store, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now"), newId = /* @__PURE__ */ __name(() => crypto.randomUUID(), "newId") }) {
|
|
623
104
|
async function find(id2) {
|
|
624
105
|
const task = await store.get(id2);
|
|
@@ -678,13 +159,13 @@ function median(values) {
|
|
|
678
159
|
}
|
|
679
160
|
__name(median, "median");
|
|
680
161
|
|
|
681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/tasks/store.js
|
|
682
163
|
function matches(task, filter) {
|
|
683
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);
|
|
684
165
|
}
|
|
685
166
|
__name(matches, "matches");
|
|
686
167
|
|
|
687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/knowledge.js
|
|
688
169
|
var FACT_STATUSES = ["proposed", "accepted", "superseded", "reversed", "rejected"];
|
|
689
170
|
var MEMORY_KINDS = ["summary", "digest", "preference"];
|
|
690
171
|
var MEMORY_STATUSES = ["proposed", "confirmed", "stale", "superseded"];
|
|
@@ -692,10 +173,10 @@ var MEMORY_SCOPES = ["personal", "work"];
|
|
|
692
173
|
var WORK_TASK_TYPES = ["bug", "feature", "chore"];
|
|
693
174
|
var TASK_TYPES = [...WORK_TASK_TYPES, ...TASK_KINDS];
|
|
694
175
|
|
|
695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/domain/categories.js
|
|
696
177
|
var CATEGORIES = ["client", "supplier", "partner", "employer"];
|
|
697
178
|
|
|
698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/entities/fields.js
|
|
699
180
|
var text = string();
|
|
700
181
|
var id = pipe(string(), minLength(1));
|
|
701
182
|
var time = isoTime;
|
|
@@ -720,7 +201,7 @@ var author = strictObject({
|
|
|
720
201
|
name: nullable(text)
|
|
721
202
|
});
|
|
722
203
|
|
|
723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/entities/knowledge-lists.js
|
|
724
205
|
var organization = strictObject({
|
|
725
206
|
id,
|
|
726
207
|
ref: reference,
|
|
@@ -750,15 +231,15 @@ var reminder = strictObject({
|
|
|
750
231
|
receipt: nullable(text)
|
|
751
232
|
});
|
|
752
233
|
|
|
753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
754
|
-
import { readFileSync
|
|
234
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/store/marks.js
|
|
235
|
+
import { readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
755
236
|
var damageMarkPath = /* @__PURE__ */ __name((store) => `${store}.damaged.json`, "damageMarkPath");
|
|
756
237
|
var healthMarkPath = /* @__PURE__ */ __name((store) => `${store}.health.json`, "healthMarkPath");
|
|
757
238
|
var journalMarkPath = /* @__PURE__ */ __name((store) => `${store}.journal.json`, "journalMarkPath");
|
|
758
|
-
var inodeOf = /* @__PURE__ */ __name((store) =>
|
|
239
|
+
var inodeOf = /* @__PURE__ */ __name((store) => statSync(store, { throwIfNoEntry: false })?.ino, "inodeOf");
|
|
759
240
|
var readJson = /* @__PURE__ */ __name((path) => {
|
|
760
241
|
try {
|
|
761
|
-
return JSON.parse(
|
|
242
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
762
243
|
} catch (error) {
|
|
763
244
|
if (error.code === "ENOENT")
|
|
764
245
|
return null;
|
|
@@ -790,7 +271,7 @@ var markStoreDamaged = /* @__PURE__ */ __name((error, { store, command, version,
|
|
|
790
271
|
inode
|
|
791
272
|
};
|
|
792
273
|
try {
|
|
793
|
-
|
|
274
|
+
writeFileSync(damageMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
794
275
|
`, { flag: "wx", mode: 384 });
|
|
795
276
|
return true;
|
|
796
277
|
} catch {
|
|
@@ -813,7 +294,7 @@ var readDamageMark = /* @__PURE__ */ __name((store) => {
|
|
|
813
294
|
}
|
|
814
295
|
return mark;
|
|
815
296
|
}, "readDamageMark");
|
|
816
|
-
var clearDamageMark = /* @__PURE__ */ __name((store) =>
|
|
297
|
+
var clearDamageMark = /* @__PURE__ */ __name((store) => rmSync(damageMarkPath(store), { force: true }), "clearDamageMark");
|
|
817
298
|
var refuseDamagedStore = /* @__PURE__ */ __name((store, cli) => {
|
|
818
299
|
const mark = readDamageMark(store);
|
|
819
300
|
if (!mark)
|
|
@@ -825,7 +306,7 @@ var markJournalLost = /* @__PURE__ */ __name((store, { seen, command, now = Date
|
|
|
825
306
|
return;
|
|
826
307
|
const mark = { at: new Date(now()).toISOString(), command, seen };
|
|
827
308
|
try {
|
|
828
|
-
|
|
309
|
+
writeFileSync(journalMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
829
310
|
`, { flag: "wx", mode: 384 });
|
|
830
311
|
} catch {
|
|
831
312
|
}
|
|
@@ -860,18 +341,18 @@ var recordDeepCheck = /* @__PURE__ */ __name((store, health, { cli, version, sch
|
|
|
860
341
|
};
|
|
861
342
|
const cleared = health.ok ? readDamageMark(store) : null;
|
|
862
343
|
try {
|
|
863
|
-
|
|
344
|
+
writeFileSync(healthMarkPath(store), `${JSON.stringify(mark, null, 2)}
|
|
864
345
|
`, { mode: 384 });
|
|
865
346
|
} catch {
|
|
866
347
|
}
|
|
867
348
|
if (cleared)
|
|
868
349
|
clearDamageMark(store);
|
|
869
350
|
if (health.ok)
|
|
870
|
-
|
|
351
|
+
rmSync(journalMarkPath(store), { force: true });
|
|
871
352
|
return { previous, cleared };
|
|
872
353
|
}, "recordDeepCheck");
|
|
873
354
|
|
|
874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/search/query.js
|
|
875
356
|
var isBotProvider = /* @__PURE__ */ __name((provider) => provider.endsWith("-bot"), "isBotProvider");
|
|
876
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");
|
|
877
358
|
var fail = /* @__PURE__ */ __name((message) => {
|
|
@@ -894,7 +375,7 @@ var sourceOf = /* @__PURE__ */ __name((name, value, providers2) => {
|
|
|
894
375
|
return fail(`${name} takes ${[...sources, "messages", "mail"].join(", ")} \u2014 not "${value}"`);
|
|
895
376
|
}, "sourceOf");
|
|
896
377
|
|
|
897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/search/account-list.js
|
|
898
379
|
var ACCOUNT_GROUPS = "accountGroups";
|
|
899
380
|
var ACCOUNT_GROUPS_SETTING = "account_groups";
|
|
900
381
|
var GROUP_NAME = /^[a-z0-9][a-z0-9_-]*$/i;
|
|
@@ -1104,7 +585,7 @@ var fitting = /* @__PURE__ */ __name((entries, kinds, what, reasonOf = (kind) =>
|
|
|
1104
585
|
return { accounts: [...chosen.values()], skipped };
|
|
1105
586
|
}, "fitting");
|
|
1106
587
|
|
|
1107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/store/sqlite/link-source.js
|
|
1108
589
|
var REPORTER_SQL = "(SELECT provider || ':' || external_id FROM accounts r WHERE r.id = links.account_id) AS reporter";
|
|
1109
590
|
var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
1110
591
|
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;
|
|
@@ -1114,7 +595,7 @@ var sourceOf3 = /* @__PURE__ */ __name((database, row, metadata) => {
|
|
|
1114
595
|
};
|
|
1115
596
|
}, "sourceOf");
|
|
1116
597
|
|
|
1117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.681.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_3bf07d813b3b8f6ae0583ce017092c7c/node_modules/@wirecat/cli-core/dist/store/sqlite/link-kinds.js
|
|
1118
599
|
var LINK_KINDS = [
|
|
1119
600
|
"links-to",
|
|
1120
601
|
"blocked-by",
|
|
@@ -1139,34 +620,6 @@ var linkKind = /* @__PURE__ */ __name((kind) => `'${kind}'`, "linkKind");
|
|
|
1139
620
|
var COUNTERPART_ROLE = "counterpart";
|
|
1140
621
|
|
|
1141
622
|
export {
|
|
1142
|
-
logAttributes,
|
|
1143
|
-
fromLogAttributes,
|
|
1144
|
-
snakeLogger,
|
|
1145
|
-
LOG_ATTRIBUTES,
|
|
1146
|
-
KEEP_RUNS_FOR_DAYS,
|
|
1147
|
-
KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
1148
|
-
KEEP_STORE_RUNS_FOR_DAYS,
|
|
1149
|
-
RUNS_SIZE_LIMIT_MB,
|
|
1150
|
-
runsDirFor,
|
|
1151
|
-
startRun,
|
|
1152
|
-
runtime,
|
|
1153
|
-
newRunId,
|
|
1154
|
-
listRuns,
|
|
1155
|
-
findRun,
|
|
1156
|
-
readEvents,
|
|
1157
|
-
pruneRuns,
|
|
1158
|
-
asOwnProcess,
|
|
1159
|
-
currentRun,
|
|
1160
|
-
inRun,
|
|
1161
|
-
runEvent,
|
|
1162
|
-
typedCommand,
|
|
1163
|
-
useAsProcessRun,
|
|
1164
|
-
processRun,
|
|
1165
|
-
enclosingTraceId,
|
|
1166
|
-
traceOf,
|
|
1167
|
-
childTrace,
|
|
1168
|
-
withAttempt,
|
|
1169
|
-
currentAttempt,
|
|
1170
623
|
SOURCE_REVIEW_KIND,
|
|
1171
624
|
SOURCE_REVIEW_CAUSES,
|
|
1172
625
|
ERASED_TEXT,
|