@wirecat/mail-cli 0.23.0 → 0.24.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/CHANGELOG.md +29 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-CI32WFEV.js → all-profiles-VS7P6DJY.js} +11 -11
- package/dist/bundle/{anthropic-ICSOMJIN.js → anthropic-C5JXKGBS.js} +16 -7
- package/dist/bundle/{app-server-3F4ZB7DH.js → app-server-HU3LVU42.js} +51 -50
- package/dist/bundle/{bun-7AHNFZMZ.js → bun-QLFX47WZ.js} +2 -2
- package/dist/bundle/{bun-sqlite-UIWRS4HI.js → bun-sqlite-W4PGAKVY.js} +5 -5
- package/dist/bundle/{chunk-ETIUB2DF.js → chunk-3FD3IATT.js} +6 -6
- package/dist/bundle/{chunk-6FSLEARF.js → chunk-3KSK5BBB.js} +2 -2
- package/dist/bundle/{chunk-I3YNNSGB.js → chunk-4QNHAM3J.js} +2 -2
- package/dist/bundle/{chunk-7SWWVDEZ.js → chunk-4W4EVVL4.js} +61 -21
- package/dist/bundle/{chunk-JDKC7EXM.js → chunk-5NLHDK7P.js} +50 -46
- package/dist/bundle/{chunk-AHRHP2H2.js → chunk-5X3GU5LI.js} +6 -6
- package/dist/bundle/{chunk-KNRONMVG.js → chunk-64ZG5ERD.js} +2 -2
- package/dist/bundle/{chunk-RIAZTS6C.js → chunk-6PWCQKMD.js} +12 -12
- package/dist/bundle/{chunk-4PNIZUEC.js → chunk-6VV7J2TN.js} +36 -57
- package/dist/bundle/{chunk-5AS5N7V5.js → chunk-A6J4MPTI.js} +3 -1
- package/dist/bundle/{chunk-ZYHBMDNU.js → chunk-AUTX2MLF.js} +11 -9
- package/dist/bundle/{chunk-5Y2WRUYP.js → chunk-B72343TK.js} +2 -2
- package/dist/bundle/{chunk-7SIWMF77.js → chunk-BFQQV22T.js} +1 -1
- package/dist/bundle/chunk-C3NYJW6B.js +1542 -0
- package/dist/bundle/{chunk-7ZDH2XEY.js → chunk-C5BMCLCQ.js} +4 -4
- package/dist/bundle/{chunk-JO4BJYVE.js → chunk-DW3F6DUW.js} +1 -1
- package/dist/bundle/chunk-EKGRNFYQ.js +18 -0
- package/dist/bundle/{chunk-4YTX5YAU.js → chunk-FKWUUCX2.js} +1361 -1539
- package/dist/bundle/{chunk-LLYVBO3R.js → chunk-FNLUKODV.js} +19 -19
- package/dist/bundle/{chunk-HGV7DSSA.js → chunk-H5FJTHVA.js} +2 -2
- package/dist/bundle/{chunk-3QVGB2CI.js → chunk-HBZAJINU.js} +4 -4
- package/dist/bundle/{chunk-BT7UUI6E.js → chunk-IRUN4XOV.js} +2 -2
- package/dist/bundle/{chunk-4TKQIXND.js → chunk-JMLIKXFO.js} +2 -2
- package/dist/bundle/{chunk-XV3M3NAN.js → chunk-JOQGJUFT.js} +1 -1
- package/dist/bundle/{chunk-NEDYKKJJ.js → chunk-JWMLMAHP.js} +4 -4
- package/dist/bundle/{chunk-5QQOUYNA.js → chunk-KGOVFEWZ.js} +3 -3
- package/dist/bundle/{chunk-NKDYHAHP.js → chunk-KV4VTKF3.js} +3 -3
- package/dist/bundle/chunk-LVGX7VTD.js +138 -0
- package/dist/bundle/{chunk-3DQYO7FB.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-SCH3NC5X.js → chunk-MTO6YVMN.js} +3 -3
- package/dist/bundle/{chunk-R4RAWEMV.js → chunk-NCRSE647.js} +286 -48
- package/dist/bundle/{chunk-UTLJQG6Q.js → chunk-NSIN5IM4.js} +8 -8
- package/dist/bundle/{chunk-IMIY7HQB.js → chunk-NWKKPDZV.js} +2 -2
- package/dist/bundle/chunk-O373QEAJ.js +1243 -0
- package/dist/bundle/{chunk-OMW37FXK.js → chunk-OQW6GHUA.js} +1 -1
- package/dist/bundle/{chunk-D6WTKSRA.js → chunk-PRQ2U7HF.js} +2 -2
- package/dist/bundle/{chunk-HRIYU2HJ.js → chunk-PT6MF2VU.js} +469 -120
- package/dist/bundle/{chunk-B6GITVDX.js → chunk-Q4OKEN3B.js} +7 -7
- package/dist/bundle/{chunk-ELGEHZK2.js → chunk-Q6K2XUGU.js} +1 -1
- package/dist/bundle/{chunk-CNYQ3TTZ.js → chunk-QI3PXUOJ.js} +43 -595
- package/dist/bundle/{chunk-SGMENSI6.js → chunk-QVMOEB3I.js} +391 -16
- package/dist/bundle/{chunk-S2U5BXWS.js → chunk-RLQZFZLK.js} +80 -5
- package/dist/bundle/{chunk-SETCGPFG.js → chunk-RN7OI5KL.js} +9 -8
- package/dist/bundle/{chunk-5J4WNTTM.js → chunk-RNZKQMFY.js} +14 -14
- package/dist/bundle/{chunk-WQRX4RQS.js → chunk-RUASZW3M.js} +5 -5
- package/dist/bundle/{chunk-UHC5I3JV.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-FHCOGR7S.js → chunk-SWKQ6IAR.js} +3 -3
- package/dist/bundle/{chunk-KJQZXCNK.js → chunk-TI7ZIPA2.js} +4 -4
- package/dist/bundle/{chunk-7DFWXIY5.js → chunk-TLEBSMC7.js} +1997 -768
- package/dist/bundle/{chunk-5Z7LZAVP.js → chunk-U6MMQNNK.js} +6 -6
- package/dist/bundle/{chunk-HN6PB7F5.js → chunk-VNKWSCN7.js} +99 -42
- package/dist/bundle/{chunk-DALBYUPC.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-XP5FBDIG.js → chunk-VVL4MKYH.js} +1 -1
- package/dist/bundle/{chunk-TEL2OMS5.js → chunk-WOX7FZJP.js} +686 -220
- package/dist/bundle/{chunk-2BAO4T4Z.js → chunk-X47BL4M5.js} +13 -13
- package/dist/bundle/{chunk-GOMJNH56.js → chunk-X7J3TTDO.js} +8 -8
- package/dist/bundle/{chunk-FVKZ55I2.js → chunk-XBEO472U.js} +29976 -16640
- package/dist/bundle/{chunk-UA4BOLIY.js → chunk-YA45XV6G.js} +4 -4
- package/dist/bundle/{chunk-FIZWQTUC.js → chunk-YBQ5AYLZ.js} +3 -3
- package/dist/bundle/{chunk-AFPETMXZ.js → chunk-YI544LHI.js} +13 -136
- package/dist/bundle/chunk-ZO4MQWIK.js +188 -0
- package/dist/bundle/{chunk-7OVVX4F4.js → chunk-ZR2BDNGG.js} +1 -1
- package/dist/bundle/command-contract-ERYYPAD2.js +35 -0
- package/dist/bundle/command-server-entry-5E3PPDE5.js +164 -0
- package/dist/bundle/{decode-BJXABRAN.js → decode-AVWV7SVZ.js} +5 -5
- package/dist/bundle/{dispatch-G4CYFWQ2.js → dispatch-BXPHSNK5.js} +10 -10
- package/dist/bundle/{dist-LLEA6R4V.js → dist-PIOOKBWT.js} +78 -44
- package/dist/bundle/{echarts-YPTKBOZV.js → echarts-7K6YQV52.js} +2 -2
- package/dist/bundle/{embed-DMROTI5M.js → embed-4NT76GJK.js} +6 -6
- package/dist/bundle/{embedder-DWMHXCHJ.js → embedder-ITQFF7EN.js} +9 -9
- package/dist/bundle/{failure-FFPK2WYB.js → failure-3Q65JOPD.js} +2 -2
- package/dist/bundle/{first-run-FQOEF2IO.js → first-run-PM74YU4X.js} +11 -11
- package/dist/bundle/first-screen-WBVGVSMY.js +33 -0
- package/dist/bundle/{instructions-OGKMROLD.js → instructions-JDSITYHV.js} +1 -1
- package/dist/bundle/mail.js +37 -13
- package/dist/bundle/{mcp-CFVG2OUS.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-HIKYE546.js → node-D6YIJOJI.js} +2 -2
- package/dist/bundle/{node-sqlite-3GJAG7VO.js → node-sqlite-PJOHHB4X.js} +6 -6
- package/dist/bundle/{oauth-H3DB6IHI.js → oauth-BOWJ3IBT.js} +7 -7
- package/dist/bundle/{open-DJ2PRG74.js → open-FIAKKZMW.js} +5 -5
- package/dist/bundle/{openai-MDBRYB55.js → openai-QL54VVLC.js} +16 -37
- package/dist/bundle/{process-4LBD72JH.js → process-AYHK7WRC.js} +1 -1
- package/dist/bundle/{program-F6WK6RX4.js → program-6FKWOTBK.js} +3206 -1603
- package/dist/bundle/{prompt-UNPUG6SO.js → prompt-XJZCBELC.js} +5 -5
- package/dist/bundle/{recognize-DMIO4PDB.js → recognize-OQKWAHBY.js} +4 -4
- package/dist/bundle/{remote-24HJA72D.js → remote-NLVUZ5WK.js} +7 -7
- package/dist/bundle/{rerank-PTNCHHIU.js → rerank-NRPZDTJ7.js} +7 -7
- package/dist/bundle/{serve-T6JHM2YD.js → serve-O4YUI7F6.js} +9 -9
- package/dist/bundle/server-6OT5ZEWL.js +66 -0
- package/dist/bundle/{server-BWEYRUR3.js → server-WAL3M4OO.js} +40 -40
- package/dist/bundle/{sqlite-runtime-ZJ4EH5ZM.js → sqlite-runtime-5YHGI4D4.js} +6 -6
- package/dist/bundle/{state-KSN4OFYW.js → state-WYYOJ7KK.js} +6 -6
- package/dist/bundle/{store-OIEZJEA7.js → store-6BJO3F2J.js} +22 -16
- package/dist/bundle/{store-GVBW2ZFK.js → store-X72GOJHD.js} +50 -22
- package/dist/bundle/store-maintenance-command-ASS7RBYC.js +54 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +29 -7
- package/dist/commands/rules.js.map +1 -1
- package/dist/commands/sync.d.ts +0 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +8 -2
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/bundle/chunk-5AQ4S4TZ.js +0 -12172
- package/dist/bundle/chunk-B4MWHI2V.js +0 -380
- package/dist/bundle/command-contract-UIRWJVEY.js +0 -35
- package/dist/bundle/first-screen-B6LF5464.js +0 -33
- package/dist/bundle/server-VUQNR5ZD.js +0 -65
- package/dist/bundle/store-maintenance-command-KJ54HLUQ.js +0 -54
- /package/dist/bundle/{chunk-QZLK2ISN.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
permissionOverrides,
|
|
14
14
|
projectFields,
|
|
15
15
|
resolveOutput
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-Q4OKEN3B.js";
|
|
17
17
|
import {
|
|
18
18
|
currentCaller,
|
|
19
19
|
endpointTemplate,
|
|
@@ -23,24 +23,29 @@ import {
|
|
|
23
23
|
providerErrorKey,
|
|
24
24
|
renderEvent,
|
|
25
25
|
runContextOf
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-AUTX2MLF.js";
|
|
27
27
|
import {
|
|
28
28
|
carries
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-DW3F6DUW.js";
|
|
30
30
|
import {
|
|
31
31
|
permissionCeiling
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SWKQ6IAR.js";
|
|
33
33
|
import {
|
|
34
34
|
note
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MTO6YVMN.js";
|
|
36
36
|
import {
|
|
37
|
+
CATEGORIES,
|
|
37
38
|
FACT_STATUSES,
|
|
39
|
+
KEEP_STORE_RUNS_FOR_DAYS,
|
|
40
|
+
KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
38
41
|
LINK_KINDS,
|
|
39
42
|
LINK_SOURCES,
|
|
43
|
+
LOG_ATTRIBUTES,
|
|
40
44
|
MEMORY_KINDS,
|
|
41
45
|
MEMORY_SCOPES,
|
|
42
46
|
MEMORY_STATUSES,
|
|
43
47
|
PRIORITY_LABELS,
|
|
48
|
+
RUNS_SIZE_LIMIT_MB,
|
|
44
49
|
TASK_KINDS,
|
|
45
50
|
TASK_ORIGINS,
|
|
46
51
|
TASK_STATES,
|
|
@@ -48,24 +53,41 @@ import {
|
|
|
48
53
|
TASK_VERDICTS,
|
|
49
54
|
WORK_TASK_TYPES,
|
|
50
55
|
author,
|
|
56
|
+
childTrace,
|
|
51
57
|
count,
|
|
58
|
+
currentRun,
|
|
59
|
+
enclosingTraceId,
|
|
52
60
|
evidenceSource,
|
|
53
61
|
id,
|
|
62
|
+
inRun,
|
|
63
|
+
logAttributes,
|
|
54
64
|
markStoreDamaged,
|
|
65
|
+
newRunId,
|
|
55
66
|
organization,
|
|
56
67
|
project,
|
|
57
68
|
providerMetadata,
|
|
58
69
|
reminder,
|
|
70
|
+
runsDirFor,
|
|
71
|
+
snakeLogger,
|
|
72
|
+
sourceReview,
|
|
73
|
+
startRun,
|
|
59
74
|
text,
|
|
60
75
|
time,
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
traceOf,
|
|
77
|
+
typedCommand,
|
|
78
|
+
untrusted,
|
|
79
|
+
useAsProcessRun
|
|
80
|
+
} from "./chunk-O373QEAJ.js";
|
|
63
81
|
import {
|
|
64
82
|
BUSINESS_KINDS,
|
|
83
|
+
DEAL_KINDS,
|
|
65
84
|
DEAL_ROLES,
|
|
85
|
+
DEAL_STATUSES,
|
|
66
86
|
FACT_TYPES,
|
|
67
87
|
FIELD_TYPES,
|
|
88
|
+
FINANCE_REVIEWS,
|
|
68
89
|
INVOICE_DIRECTIONS,
|
|
90
|
+
INVOICE_STATUSES,
|
|
69
91
|
MEETING_RESULT_ENTITIES,
|
|
70
92
|
MONEY_DIRECTIONS,
|
|
71
93
|
ORDER_PURPOSES,
|
|
@@ -89,23 +111,23 @@ import {
|
|
|
89
111
|
meetingStats,
|
|
90
112
|
meetingSummary,
|
|
91
113
|
meetingTranscript
|
|
92
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-WOX7FZJP.js";
|
|
93
115
|
import {
|
|
94
116
|
isCliFailure,
|
|
95
117
|
storeDamaged
|
|
96
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-3KSK5BBB.js";
|
|
97
119
|
import {
|
|
98
120
|
readSharedSection,
|
|
99
121
|
sharedConfigPath,
|
|
100
122
|
writeSharedSection
|
|
101
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-3FD3IATT.js";
|
|
102
124
|
import {
|
|
103
125
|
filesPresent,
|
|
104
126
|
sharedModelsDirectory
|
|
105
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-TI7ZIPA2.js";
|
|
106
128
|
import {
|
|
107
129
|
storePath
|
|
108
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-B72343TK.js";
|
|
109
131
|
import {
|
|
110
132
|
configFilePath,
|
|
111
133
|
createRecordLog,
|
|
@@ -113,9 +135,8 @@ import {
|
|
|
113
135
|
processStreams,
|
|
114
136
|
resolvePaths,
|
|
115
137
|
saveConfigFile,
|
|
116
|
-
traceIdOf,
|
|
117
138
|
writeSecurely
|
|
118
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-FNLUKODV.js";
|
|
119
140
|
import {
|
|
120
141
|
COMPACT_FLAG,
|
|
121
142
|
MAX_NEXT_STEPS,
|
|
@@ -169,17 +190,17 @@ import {
|
|
|
169
190
|
url,
|
|
170
191
|
variant,
|
|
171
192
|
writes
|
|
172
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-X7J3TTDO.js";
|
|
173
194
|
import {
|
|
174
195
|
CliError,
|
|
175
196
|
isCliError,
|
|
176
197
|
visibleControls
|
|
177
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-VUBZFMGP.js";
|
|
178
199
|
import {
|
|
179
200
|
__name
|
|
180
201
|
} from "./chunk-ZVVMGPBJ.js";
|
|
181
202
|
|
|
182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/ports/app.js
|
|
183
204
|
var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
|
|
184
205
|
var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
|
|
185
206
|
const name = envName(app, "READ_ONLY");
|
|
@@ -190,7 +211,7 @@ var mailHolderVariable = /* @__PURE__ */ __name((app) => envName(app, "MAIL_HOLD
|
|
|
190
211
|
var MESSENGER_CHANGE_REFUSAL = "send, react, change chats or change the account";
|
|
191
212
|
var readOnlyRefusal = /* @__PURE__ */ __name((lock, what) => new CliError("permission_error", `this process is read-only (${lock}) \u2014 it cannot ${what}`), "readOnlyRefusal");
|
|
192
213
|
|
|
193
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
214
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/registry.js
|
|
194
215
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
195
216
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
196
217
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3691,7 +3712,7 @@ __name(useColor, "useColor");
|
|
|
3691
3712
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3692
3713
|
var program = new Command();
|
|
3693
3714
|
|
|
3694
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3715
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/document.js
|
|
3695
3716
|
var argumentInfoSchema = object({
|
|
3696
3717
|
name: string(),
|
|
3697
3718
|
required: boolean(),
|
|
@@ -3765,14 +3786,14 @@ var commandsDocumentSchema = strictObject({
|
|
|
3765
3786
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3766
3787
|
});
|
|
3767
3788
|
|
|
3768
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3789
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/contracts.js
|
|
3769
3790
|
import { isDeepStrictEqual } from "node:util";
|
|
3770
3791
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3771
3792
|
var hidden = /* @__PURE__ */ __name((command) => Boolean(command._hidden), "hidden");
|
|
3772
3793
|
var snapshot = /* @__PURE__ */ __name((command, known = /* @__PURE__ */ new Map(), children) => {
|
|
3773
3794
|
if (hidden(command))
|
|
3774
3795
|
throw new Error("a hidden command cannot own a shared contract");
|
|
3775
|
-
const { commands:
|
|
3796
|
+
const { commands: _2, usage: __, path: ___, ...contract } = describeAlone(command, known);
|
|
3776
3797
|
return {
|
|
3777
3798
|
...contract,
|
|
3778
3799
|
aliases: [...command.aliases()],
|
|
@@ -3874,7 +3895,7 @@ var sharedCommand = /* @__PURE__ */ __name((factory) => (...args) => {
|
|
|
3874
3895
|
return result;
|
|
3875
3896
|
}, "sharedCommand");
|
|
3876
3897
|
|
|
3877
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3898
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/commands/index.js
|
|
3878
3899
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3879
3900
|
let command = root;
|
|
3880
3901
|
const path2 = [];
|
|
@@ -3892,14 +3913,29 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3892
3913
|
}
|
|
3893
3914
|
}, "refuseJoinedPath");
|
|
3894
3915
|
|
|
3895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/command-server-request.js
|
|
3896
3917
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3918
|
+
var requests = new AsyncLocalStorage();
|
|
3919
|
+
var inCommandServerRequest = /* @__PURE__ */ __name((request, work) => requests.run(request, work), "inCommandServerRequest");
|
|
3920
|
+
var commandServerRequest = /* @__PURE__ */ __name(() => requests.getStore(), "commandServerRequest");
|
|
3921
|
+
var exitCodeSet = /* @__PURE__ */ __name(() => {
|
|
3922
|
+
const request = requests.getStore();
|
|
3923
|
+
if (request?.exitCode !== void 0)
|
|
3924
|
+
return request.exitCode;
|
|
3925
|
+
const direct = process.exitCode === void 0 ? void 0 : Number(process.exitCode);
|
|
3926
|
+
if (request)
|
|
3927
|
+
process.exitCode = void 0;
|
|
3928
|
+
return direct;
|
|
3929
|
+
}, "exitCodeSet");
|
|
3930
|
+
|
|
3931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/sends/guarded.js
|
|
3932
|
+
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
3897
3933
|
var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
|
|
3898
3934
|
messageId: message2.id,
|
|
3899
3935
|
...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
|
|
3900
3936
|
}), "sentIds");
|
|
3901
|
-
var current = new
|
|
3902
|
-
var writesInFlight = new
|
|
3937
|
+
var current = new AsyncLocalStorage2();
|
|
3938
|
+
var writesInFlight = new AsyncLocalStorage2();
|
|
3903
3939
|
var parents = /* @__PURE__ */ new WeakMap();
|
|
3904
3940
|
var stopped = /* @__PURE__ */ new WeakMap();
|
|
3905
3941
|
var scopesFor = /* @__PURE__ */ __name((scope = writesInFlight.getStore()) => {
|
|
@@ -3998,7 +4034,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
3998
4034
|
}, "guardedWrite");
|
|
3999
4035
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4000
4036
|
|
|
4001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/execution.js
|
|
4002
4038
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4003
4039
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4004
4040
|
var DEFAULT_SYNC_MS = 15 * 6e4;
|
|
@@ -4023,7 +4059,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
|
|
|
4023
4059
|
let interrupted;
|
|
4024
4060
|
let reject = /* @__PURE__ */ __name(() => {
|
|
4025
4061
|
}, "reject");
|
|
4026
|
-
const interruption = new Promise((
|
|
4062
|
+
const interruption = new Promise((_2, fail) => {
|
|
4027
4063
|
reject = fail;
|
|
4028
4064
|
});
|
|
4029
4065
|
void interruption.catch(() => {
|
|
@@ -4170,7 +4206,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4170
4206
|
throw signal.reason;
|
|
4171
4207
|
let abort = /* @__PURE__ */ __name(() => {
|
|
4172
4208
|
}, "abort");
|
|
4173
|
-
const interrupted = new Promise((
|
|
4209
|
+
const interrupted = new Promise((_2, reject) => {
|
|
4174
4210
|
abort = /* @__PURE__ */ __name(() => reject(signal.reason), "abort");
|
|
4175
4211
|
signal.addEventListener("abort", abort, { once: true });
|
|
4176
4212
|
});
|
|
@@ -4181,7 +4217,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4181
4217
|
}
|
|
4182
4218
|
}, "withAbort");
|
|
4183
4219
|
|
|
4184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
|
|
4185
4221
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4186
4222
|
import { join } from "node:path";
|
|
4187
4223
|
var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
|
|
@@ -4203,15 +4239,15 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
|
4203
4239
|
}, "profilesWithAccounts");
|
|
4204
4240
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4205
4241
|
|
|
4206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/background/budget.js
|
|
4207
4243
|
var DEADLINE_MARGIN_MS = 5e3;
|
|
4208
4244
|
var DEADLINE_MARGIN_SHARE = 0.15;
|
|
4209
4245
|
var DEFAULT_REQUEST_MS = 2e3;
|
|
4210
4246
|
var deadlineMargin = /* @__PURE__ */ __name((deadline) => Math.max(DEADLINE_MARGIN_MS, deadline.ms * DEADLINE_MARGIN_SHARE), "deadlineMargin");
|
|
4211
4247
|
var requestsFor = /* @__PURE__ */ __name((deadline, requestMs = DEFAULT_REQUEST_MS) => deadline === void 0 ? null : Math.max(1, Math.floor((deadline.ms - deadlineMargin(deadline)) / requestMs)), "requestsFor");
|
|
4212
|
-
var runBudget = /* @__PURE__ */ __name(({ requests, deadline, requestMs, signal, now = Date.now } = {}) => {
|
|
4248
|
+
var runBudget = /* @__PURE__ */ __name(({ requests: requests2, deadline, requestMs, signal, now = Date.now } = {}) => {
|
|
4213
4249
|
const fits = requestsFor(deadline, requestMs);
|
|
4214
|
-
const limit = fits === null ?
|
|
4250
|
+
const limit = fits === null ? requests2 ?? null : Math.min(fits, requests2 ?? fits);
|
|
4215
4251
|
const margin = deadline ? deadlineMargin(deadline) : 0;
|
|
4216
4252
|
let used = 0;
|
|
4217
4253
|
let stopped2 = null;
|
|
@@ -4246,7 +4282,7 @@ var runBudget = /* @__PURE__ */ __name(({ requests, deadline, requestMs, signal,
|
|
|
4246
4282
|
};
|
|
4247
4283
|
}, "runBudget");
|
|
4248
4284
|
|
|
4249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/log-events.js
|
|
4250
4286
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4251
4287
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4252
4288
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4256,6 +4292,7 @@ var CORE_LOG_EVENTS = defineLogEvents([
|
|
|
4256
4292
|
meaning: "a read was answered from what was kept, without asking the messenger",
|
|
4257
4293
|
keys: ["operation", "reason"]
|
|
4258
4294
|
},
|
|
4295
|
+
{ id: "store.write", meaning: "a committed write changed rows of one store table", keys: ["table", "op", "n"] },
|
|
4259
4296
|
{ id: "command.crashed", meaning: "a command failed on a bug; where, never what", keys: ["error_class", "frames"] },
|
|
4260
4297
|
{
|
|
4261
4298
|
id: "events.dropped",
|
|
@@ -4277,490 +4314,11 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4277
4314
|
request: "provider.request",
|
|
4278
4315
|
response: "provider.response",
|
|
4279
4316
|
warning: "client.warning",
|
|
4280
|
-
cache: "cache.answered"
|
|
4317
|
+
cache: "cache.answered",
|
|
4318
|
+
store: "store.write"
|
|
4281
4319
|
};
|
|
4282
4320
|
|
|
4283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4284
|
-
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4285
|
-
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4286
|
-
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
4287
|
-
var logAttributes = /* @__PURE__ */ __name((event2) => renamed(event2, snake2), "logAttributes");
|
|
4288
|
-
var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
|
|
4289
|
-
var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
4290
|
-
debug: /* @__PURE__ */ __name((event2, message2) => logger.debug(logAttributes(event2), message2), "debug"),
|
|
4291
|
-
info: /* @__PURE__ */ __name((event2, message2) => logger.info(logAttributes(event2), message2), "info"),
|
|
4292
|
-
warn: /* @__PURE__ */ __name((event2, message2) => logger.warn(logAttributes(event2), message2), "warn"),
|
|
4293
|
-
error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
|
|
4294
|
-
}), "snakeLogger");
|
|
4295
|
-
|
|
4296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4297
|
-
import { randomUUID } from "node:crypto";
|
|
4298
|
-
import { appendFileSync, mkdirSync, readdirSync as readdirSync2, readFileSync as readFileSync2, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4299
|
-
import { userInfo } from "node:os";
|
|
4300
|
-
import { join as join2, sep } from "node:path";
|
|
4301
|
-
|
|
4302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
4303
|
-
var diagnostic = {
|
|
4304
|
-
event: true,
|
|
4305
|
-
operation: true,
|
|
4306
|
-
opcode: true,
|
|
4307
|
-
seq: true,
|
|
4308
|
-
status: true,
|
|
4309
|
-
method: true,
|
|
4310
|
-
endpointTemplate: true,
|
|
4311
|
-
bytes: true,
|
|
4312
|
-
ids: true,
|
|
4313
|
-
counts: true,
|
|
4314
|
-
durationMs: true,
|
|
4315
|
-
outcome: true,
|
|
4316
|
-
errorCode: true,
|
|
4317
|
-
providerError: true,
|
|
4318
|
-
level: true,
|
|
4319
|
-
transport: true,
|
|
4320
|
-
attempt: true,
|
|
4321
|
-
waitMs: true,
|
|
4322
|
-
code: true,
|
|
4323
|
-
detail: true,
|
|
4324
|
-
reason: true,
|
|
4325
|
-
ageMs: true
|
|
4326
|
-
};
|
|
4327
|
-
var send = {
|
|
4328
|
-
profile: true,
|
|
4329
|
-
chatId: true,
|
|
4330
|
-
outcome: true,
|
|
4331
|
-
kind: true,
|
|
4332
|
-
action: true,
|
|
4333
|
-
people: true,
|
|
4334
|
-
messageId: true,
|
|
4335
|
-
key: true,
|
|
4336
|
-
count: true,
|
|
4337
|
-
forEveryone: true,
|
|
4338
|
-
sendId: true,
|
|
4339
|
-
operationId: true,
|
|
4340
|
-
parentOperationId: true,
|
|
4341
|
-
replyTo: true,
|
|
4342
|
-
threadId: true,
|
|
4343
|
-
sendAs: true,
|
|
4344
|
-
resultChatId: true,
|
|
4345
|
-
length: true,
|
|
4346
|
-
attachments: true,
|
|
4347
|
-
scheduledFor: true,
|
|
4348
|
-
notify: true,
|
|
4349
|
-
origin: true,
|
|
4350
|
-
reservation: true,
|
|
4351
|
-
errorCode: true
|
|
4352
|
-
};
|
|
4353
|
-
var background = [
|
|
4354
|
-
"job",
|
|
4355
|
-
"pid",
|
|
4356
|
-
"schedule",
|
|
4357
|
-
"exitCode",
|
|
4358
|
-
"tool",
|
|
4359
|
-
"tier",
|
|
4360
|
-
"actorType",
|
|
4361
|
-
"actorId",
|
|
4362
|
-
"agent",
|
|
4363
|
-
"targetType",
|
|
4364
|
-
"targetId"
|
|
4365
|
-
];
|
|
4366
|
-
var crash = ["errorClass", "frames"];
|
|
4367
|
-
var dropped = ["dropped"];
|
|
4368
|
-
var LOG_ATTRIBUTES = [
|
|
4369
|
-
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
4370
|
-
].sort();
|
|
4371
|
-
|
|
4372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4373
|
-
var KEEP_RUNS_FOR_DAYS = 30;
|
|
4374
|
-
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
4375
|
-
var RUNS_SIZE_LIMIT_MB = 200;
|
|
4376
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
4377
|
-
var startRun = /* @__PURE__ */ __name((options) => {
|
|
4378
|
-
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
4379
|
-
const startedAt = options.startedAt ?? now();
|
|
4380
|
-
const id6 = options.runId ?? newRunId(startedAt, options.command);
|
|
4381
|
-
const dir = join2(options.runsDir, day(startedAt), id6);
|
|
4382
|
-
pruneRuns(options.runsDir, {
|
|
4383
|
-
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
4384
|
-
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
4385
|
-
maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
|
|
4386
|
-
now: startedAt
|
|
4387
|
-
});
|
|
4388
|
-
refuseRealStateInTests(dir);
|
|
4389
|
-
const metadata = {
|
|
4390
|
-
runId: id6,
|
|
4391
|
-
command: options.command,
|
|
4392
|
-
...options.profile === void 0 ? {} : { profile: options.profile },
|
|
4393
|
-
startedAt: startedAt.toISOString(),
|
|
4394
|
-
status: "running",
|
|
4395
|
-
cliVersion: options.cliVersion,
|
|
4396
|
-
runtime: runtime(),
|
|
4397
|
-
platform: process.platform,
|
|
4398
|
-
arch: process.arch,
|
|
4399
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
4400
|
-
...options.context
|
|
4401
|
-
};
|
|
4402
|
-
let file;
|
|
4403
|
-
const opened = /* @__PURE__ */ __name(() => {
|
|
4404
|
-
if (file)
|
|
4405
|
-
return file;
|
|
4406
|
-
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
4407
|
-
const events2 = join2(dir, "events.jsonl");
|
|
4408
|
-
writeFileSync(events2, "", { flag: "a", mode: 384 });
|
|
4409
|
-
file = snakeLogger(createRecordLog({
|
|
4410
|
-
to: events2,
|
|
4411
|
-
runId: id6,
|
|
4412
|
-
command: options.command,
|
|
4413
|
-
resource: { service: options.service, version: options.cliVersion },
|
|
4414
|
-
allow: LOG_ATTRIBUTES,
|
|
4415
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
4416
|
-
...options.onError === void 0 ? {} : { onError: options.onError }
|
|
4417
|
-
}));
|
|
4418
|
-
writeRunFile(dir, metadata);
|
|
4419
|
-
return file;
|
|
4420
|
-
}, "opened");
|
|
4421
|
-
if (!options.lazy)
|
|
4422
|
-
opened();
|
|
4423
|
-
let finished = false;
|
|
4424
|
-
const operations = /* @__PURE__ */ new Set();
|
|
4425
|
-
const codes = /* @__PURE__ */ new Set();
|
|
4426
|
-
const noted = /* @__PURE__ */ __name((level2) => (event2, message2) => {
|
|
4427
|
-
const { operation, errorCode, error_code, code } = event2;
|
|
4428
|
-
if (typeof operation === "string")
|
|
4429
|
-
operations.add(operation);
|
|
4430
|
-
for (const value of [errorCode, error_code, code])
|
|
4431
|
-
if (typeof value === "string")
|
|
4432
|
-
codes.add(value);
|
|
4433
|
-
if (finished)
|
|
4434
|
-
return;
|
|
4435
|
-
opened()[level2](event2, message2);
|
|
4436
|
-
}, "noted");
|
|
4437
|
-
const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
|
|
4438
|
-
return {
|
|
4439
|
-
id: id6,
|
|
4440
|
-
dir,
|
|
4441
|
-
logger,
|
|
4442
|
-
finish: /* @__PURE__ */ __name(async (status2, extra = {}) => {
|
|
4443
|
-
if (finished)
|
|
4444
|
-
return;
|
|
4445
|
-
finished = true;
|
|
4446
|
-
const completedAt = now();
|
|
4447
|
-
const final = {
|
|
4448
|
-
...metadata,
|
|
4449
|
-
...extra,
|
|
4450
|
-
status: status2,
|
|
4451
|
-
completedAt: completedAt.toISOString(),
|
|
4452
|
-
durationMs: completedAt.getTime() - startedAt.getTime(),
|
|
4453
|
-
operations: [...operations].sort(),
|
|
4454
|
-
codes: [...codes].sort()
|
|
4455
|
-
};
|
|
4456
|
-
if (file || status2 !== "success") {
|
|
4457
|
-
opened();
|
|
4458
|
-
writeRunFile(dir, final);
|
|
4459
|
-
return;
|
|
4460
|
-
}
|
|
4461
|
-
try {
|
|
4462
|
-
mkdirSync(join2(dir, ".."), { recursive: true, mode: 448 });
|
|
4463
|
-
appendIndex(join2(dir, ".."), runFileOf(final));
|
|
4464
|
-
} catch (error) {
|
|
4465
|
-
options.onError?.(error);
|
|
4466
|
-
}
|
|
4467
|
-
}, "finish")
|
|
4468
|
-
};
|
|
4469
|
-
}, "startRun");
|
|
4470
|
-
var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
|
|
4471
|
-
if (env.VITEST === void 0)
|
|
4472
|
-
return;
|
|
4473
|
-
let home;
|
|
4474
|
-
try {
|
|
4475
|
-
home = userInfo().homedir;
|
|
4476
|
-
} catch {
|
|
4477
|
-
return;
|
|
4478
|
-
}
|
|
4479
|
-
if (dir.startsWith(join2(home, ".local", "share") + sep))
|
|
4480
|
-
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
4481
|
-
}, "refuseRealStateInTests");
|
|
4482
|
-
var runtime = /* @__PURE__ */ __name(() => {
|
|
4483
|
-
const bun = process.versions.bun;
|
|
4484
|
-
return bun ? `bun ${bun}` : `node ${process.versions.node}`;
|
|
4485
|
-
}, "runtime");
|
|
4486
|
-
var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
4487
|
-
const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
|
|
4488
|
-
const slug2 = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
|
|
4489
|
-
return `${stamp}-${slug2}-${randomUUID().slice(0, 6)}`;
|
|
4490
|
-
}, "newRunId");
|
|
4491
|
-
var INDEX = "index.jsonl";
|
|
4492
|
-
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
4493
|
-
appendFileSync(join2(dayDir, INDEX), `${JSON.stringify(written)}
|
|
4494
|
-
`, { mode: 384 });
|
|
4495
|
-
}, "appendIndex");
|
|
4496
|
-
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
4497
|
-
const written = runFileOf(metadata);
|
|
4498
|
-
writeSecurely(join2(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
4499
|
-
`, 384);
|
|
4500
|
-
try {
|
|
4501
|
-
appendIndex(join2(dir, ".."), written);
|
|
4502
|
-
} catch {
|
|
4503
|
-
}
|
|
4504
|
-
}, "writeRunFile");
|
|
4505
|
-
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");
|
|
4506
|
-
var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
|
|
4507
|
-
const first2 = since === void 0 ? void 0 : day(new Date(since));
|
|
4508
|
-
const runs = [];
|
|
4509
|
-
for (const date of days(runsDir).sort().reverse()) {
|
|
4510
|
-
if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
|
|
4511
|
-
break;
|
|
4512
|
-
for (const metadata of runsOfDay(join2(runsDir, date))) {
|
|
4513
|
-
if (matchesListFilter(metadata, filter))
|
|
4514
|
-
runs.push(metadata);
|
|
4515
|
-
}
|
|
4516
|
-
}
|
|
4517
|
-
return runs;
|
|
4518
|
-
}, "listRuns");
|
|
4519
|
-
var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
4520
|
-
const latest = /* @__PURE__ */ new Map();
|
|
4521
|
-
let raw = "";
|
|
4522
|
-
try {
|
|
4523
|
-
raw = readFileSync2(join2(dayDir, INDEX), "utf8");
|
|
4524
|
-
} catch {
|
|
4525
|
-
}
|
|
4526
|
-
for (const line of raw.split("\n")) {
|
|
4527
|
-
if (line.trim() === "")
|
|
4528
|
-
continue;
|
|
4529
|
-
try {
|
|
4530
|
-
const metadata = metadataOf(JSON.parse(line));
|
|
4531
|
-
if (typeof metadata.runId === "string")
|
|
4532
|
-
latest.set(metadata.runId, metadata);
|
|
4533
|
-
} catch {
|
|
4534
|
-
}
|
|
4535
|
-
}
|
|
4536
|
-
return latest;
|
|
4537
|
-
}, "indexedRuns");
|
|
4538
|
-
var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
4539
|
-
const latest = indexedRuns(dayDir);
|
|
4540
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
4541
|
-
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
4542
|
-
continue;
|
|
4543
|
-
const metadata = readRun(join2(dayDir, entry));
|
|
4544
|
-
if (metadata)
|
|
4545
|
-
latest.set(metadata.runId, metadata);
|
|
4546
|
-
}
|
|
4547
|
-
return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
|
|
4548
|
-
}, "runsOfDay");
|
|
4549
|
-
var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
|
|
4550
|
-
const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id6);
|
|
4551
|
-
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
4552
|
-
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
4553
|
-
for (const date of dates) {
|
|
4554
|
-
const dir = join2(runsDir, date, id6);
|
|
4555
|
-
const metadata = readRun(dir);
|
|
4556
|
-
if (metadata)
|
|
4557
|
-
return { dir, metadata };
|
|
4558
|
-
}
|
|
4559
|
-
for (const date of dates) {
|
|
4560
|
-
const metadata = indexedRuns(join2(runsDir, date)).get(id6);
|
|
4561
|
-
if (metadata)
|
|
4562
|
-
return { dir: join2(runsDir, date, id6), metadata };
|
|
4563
|
-
}
|
|
4564
|
-
return void 0;
|
|
4565
|
-
}, "findRun");
|
|
4566
|
-
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
4567
|
-
let raw;
|
|
4568
|
-
try {
|
|
4569
|
-
raw = readFileSync2(join2(dir, "events.jsonl"), "utf8");
|
|
4570
|
-
} catch {
|
|
4571
|
-
return [];
|
|
4572
|
-
}
|
|
4573
|
-
const events2 = [];
|
|
4574
|
-
for (const line of raw.split("\n")) {
|
|
4575
|
-
if (line.trim() === "")
|
|
4576
|
-
continue;
|
|
4577
|
-
try {
|
|
4578
|
-
const parsed = JSON.parse(line);
|
|
4579
|
-
if (parsed !== null && typeof parsed === "object")
|
|
4580
|
-
events2.push(eventOf(parsed));
|
|
4581
|
-
} catch {
|
|
4582
|
-
}
|
|
4583
|
-
}
|
|
4584
|
-
return events2;
|
|
4585
|
-
}, "readEvents");
|
|
4586
|
-
var eventOf = /* @__PURE__ */ __name((line) => {
|
|
4587
|
-
const { attributes, time: time2, severity } = line;
|
|
4588
|
-
if (attributes === null || typeof attributes !== "object")
|
|
4589
|
-
return logAttributes(line);
|
|
4590
|
-
return { time: time2, severity, ...logAttributes(attributes) };
|
|
4591
|
-
}, "eventOf");
|
|
4592
|
-
var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, maxBytes, now }) => {
|
|
4593
|
-
const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
|
|
4594
|
-
const successCutoff = day(new Date(now.getTime() - Math.min(keepSuccessDays, keepDays) * DAY_MS));
|
|
4595
|
-
let removed = 0;
|
|
4596
|
-
for (const date of days(runsDir)) {
|
|
4597
|
-
if (date >= cutoff) {
|
|
4598
|
-
if (date < successCutoff)
|
|
4599
|
-
dropSuccesses(join2(runsDir, date));
|
|
4600
|
-
continue;
|
|
4601
|
-
}
|
|
4602
|
-
try {
|
|
4603
|
-
rmSync(join2(runsDir, date), { recursive: true, force: true });
|
|
4604
|
-
removed += 1;
|
|
4605
|
-
} catch {
|
|
4606
|
-
}
|
|
4607
|
-
}
|
|
4608
|
-
if (maxBytes !== void 0)
|
|
4609
|
-
removed += fitSize(runsDir, maxBytes, now);
|
|
4610
|
-
return removed;
|
|
4611
|
-
}, "pruneRuns");
|
|
4612
|
-
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
4613
|
-
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
4614
|
-
var SIZE_CHECKED = ".size-checked";
|
|
4615
|
-
var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
4616
|
-
const marker = join2(dayDir, SUCCESSES_DROPPED);
|
|
4617
|
-
try {
|
|
4618
|
-
statSync(marker);
|
|
4619
|
-
return;
|
|
4620
|
-
} catch {
|
|
4621
|
-
}
|
|
4622
|
-
try {
|
|
4623
|
-
const kept = [];
|
|
4624
|
-
for (const [id6, metadata] of indexedRuns(dayDir)) {
|
|
4625
|
-
if (metadata.status === "success")
|
|
4626
|
-
rmSync(join2(dayDir, id6), { recursive: true, force: true });
|
|
4627
|
-
else
|
|
4628
|
-
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
4629
|
-
}
|
|
4630
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
4631
|
-
if (entry === INDEX || entry.startsWith("."))
|
|
4632
|
-
continue;
|
|
4633
|
-
if (readRun(join2(dayDir, entry))?.status === "success")
|
|
4634
|
-
rmSync(join2(dayDir, entry), { recursive: true, force: true });
|
|
4635
|
-
}
|
|
4636
|
-
writeSecurely(join2(dayDir, INDEX), kept.map((line) => `${line}
|
|
4637
|
-
`).join(""), 384);
|
|
4638
|
-
writeFileSync(marker, "", { mode: 384 });
|
|
4639
|
-
} catch {
|
|
4640
|
-
}
|
|
4641
|
-
}, "dropSuccesses");
|
|
4642
|
-
var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
4643
|
-
let total = 0;
|
|
4644
|
-
for (const entry of safeReaddir(path2)) {
|
|
4645
|
-
const full = join2(path2, entry);
|
|
4646
|
-
try {
|
|
4647
|
-
const stat = statSync(full);
|
|
4648
|
-
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
4649
|
-
} catch {
|
|
4650
|
-
}
|
|
4651
|
-
}
|
|
4652
|
-
return total;
|
|
4653
|
-
}, "sizeOf");
|
|
4654
|
-
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
4655
|
-
const stamp = join2(runsDir, SIZE_CHECKED);
|
|
4656
|
-
const today = day(now);
|
|
4657
|
-
try {
|
|
4658
|
-
if (readFileSync2(stamp, "utf8").trim() === today)
|
|
4659
|
-
return 0;
|
|
4660
|
-
} catch {
|
|
4661
|
-
}
|
|
4662
|
-
const dates = days(runsDir).sort();
|
|
4663
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(join2(runsDir, date))]));
|
|
4664
|
-
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
4665
|
-
let removed = 0;
|
|
4666
|
-
for (const date of dates) {
|
|
4667
|
-
if (total <= maxBytes || date === today)
|
|
4668
|
-
break;
|
|
4669
|
-
dropSuccesses(join2(runsDir, date));
|
|
4670
|
-
const after = sizeOf(join2(runsDir, date));
|
|
4671
|
-
total -= (sizes.get(date) ?? 0) - after;
|
|
4672
|
-
sizes.set(date, after);
|
|
4673
|
-
}
|
|
4674
|
-
for (const date of dates) {
|
|
4675
|
-
if (total <= maxBytes || date === today)
|
|
4676
|
-
break;
|
|
4677
|
-
try {
|
|
4678
|
-
rmSync(join2(runsDir, date), { recursive: true, force: true });
|
|
4679
|
-
total -= sizes.get(date) ?? 0;
|
|
4680
|
-
removed += 1;
|
|
4681
|
-
} catch {
|
|
4682
|
-
}
|
|
4683
|
-
}
|
|
4684
|
-
try {
|
|
4685
|
-
mkdirSync(runsDir, { recursive: true, mode: 448 });
|
|
4686
|
-
writeFileSync(stamp, today, { mode: 384 });
|
|
4687
|
-
} catch {
|
|
4688
|
-
}
|
|
4689
|
-
return removed;
|
|
4690
|
-
}, "fitSize");
|
|
4691
|
-
var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
|
|
4692
|
-
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
4693
|
-
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
4694
|
-
try {
|
|
4695
|
-
return metadataOf(JSON.parse(readFileSync2(join2(dir, "run.json"), "utf8")));
|
|
4696
|
-
} catch {
|
|
4697
|
-
return void 0;
|
|
4698
|
-
}
|
|
4699
|
-
}, "readRun");
|
|
4700
|
-
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
4701
|
-
try {
|
|
4702
|
-
return readdirSync2(dir);
|
|
4703
|
-
} catch {
|
|
4704
|
-
return [];
|
|
4705
|
-
}
|
|
4706
|
-
}, "safeReaddir");
|
|
4707
|
-
var runFileOf = /* @__PURE__ */ __name(({ partial: partial2, ...metadata }) => ({
|
|
4708
|
-
...logAttributes(metadata),
|
|
4709
|
-
...partial2 ? { partial: { ...logAttributes(partial2), failures: partial2.failures.map((failure) => logAttributes(failure)) } } : {}
|
|
4710
|
-
}), "runFileOf");
|
|
4711
|
-
var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
4712
|
-
const { partial: partial2, ...metadata } = fromLogAttributes(parsed);
|
|
4713
|
-
if (partial2 === null || typeof partial2 !== "object")
|
|
4714
|
-
return metadata;
|
|
4715
|
-
const { failures, ...rest } = fromLogAttributes(partial2);
|
|
4716
|
-
return {
|
|
4717
|
-
...metadata,
|
|
4718
|
-
partial: {
|
|
4719
|
-
...rest,
|
|
4720
|
-
failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
|
|
4721
|
-
}
|
|
4722
|
-
};
|
|
4723
|
-
}, "metadataOf");
|
|
4724
|
-
|
|
4725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
4726
|
-
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
4727
|
-
import { randomBytes } from "node:crypto";
|
|
4728
|
-
var scopes = new AsyncLocalStorage2();
|
|
4729
|
-
var processScope;
|
|
4730
|
-
var currentRun = /* @__PURE__ */ __name(() => {
|
|
4731
|
-
const scope = scopes.getStore();
|
|
4732
|
-
if (scope)
|
|
4733
|
-
return scope;
|
|
4734
|
-
processScope ??= {
|
|
4735
|
-
runId: newRunId(/* @__PURE__ */ new Date(), "process"),
|
|
4736
|
-
command: "",
|
|
4737
|
-
startedAt: Date.now(),
|
|
4738
|
-
...traceOf(process.env)
|
|
4739
|
-
};
|
|
4740
|
-
return processScope;
|
|
4741
|
-
}, "currentRun");
|
|
4742
|
-
var inRun = /* @__PURE__ */ __name((scope, body) => scopes.run(scope, body), "inRun");
|
|
4743
|
-
var runEvent = /* @__PURE__ */ __name((event2) => scopes.getStore()?.events?.(event2), "runEvent");
|
|
4744
|
-
var typedCommand = /* @__PURE__ */ __name((tool, words2, profile = currentRun().profile) => [tool, profile, words2].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
|
|
4745
|
-
var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
|
|
4746
|
-
processScope = scope;
|
|
4747
|
-
}, "useAsProcessRun");
|
|
4748
|
-
var processRun = /* @__PURE__ */ __name(() => processScope, "processRun");
|
|
4749
|
-
var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
|
|
4750
|
-
var traceOf = /* @__PURE__ */ __name((env) => {
|
|
4751
|
-
const traceId = traceIdOf(env.TRACEPARENT);
|
|
4752
|
-
return traceId === void 0 ? {} : { traceId };
|
|
4753
|
-
}, "traceOf");
|
|
4754
|
-
var childTrace = /* @__PURE__ */ __name(() => {
|
|
4755
|
-
const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
|
|
4756
|
-
const traceId = hex(16);
|
|
4757
|
-
return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
|
|
4758
|
-
}, "childTrace");
|
|
4759
|
-
var attempts = new AsyncLocalStorage2();
|
|
4760
|
-
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
4761
|
-
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
4762
|
-
|
|
4763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
4321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
4764
4322
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
4765
4323
|
const recording = startRecording(options);
|
|
4766
4324
|
try {
|
|
@@ -4806,6 +4364,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
4806
4364
|
}, "onError"),
|
|
4807
4365
|
...options.keepDays === void 0 ? {} : { keepDays: options.keepDays },
|
|
4808
4366
|
...options.keepSuccessDays === void 0 ? {} : { keepSuccessDays: options.keepSuccessDays },
|
|
4367
|
+
...options.keepStoreDays === void 0 ? {} : { keepStoreDays: options.keepStoreDays },
|
|
4809
4368
|
...options.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes },
|
|
4810
4369
|
now,
|
|
4811
4370
|
...extra
|
|
@@ -4814,13 +4373,16 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
4814
4373
|
const held = !run && options.keepFailed ? [] : void 0;
|
|
4815
4374
|
const counted = { wire: 0, operation: 0 };
|
|
4816
4375
|
let refused;
|
|
4376
|
+
let wroteStore = false;
|
|
4817
4377
|
const cap = capped();
|
|
4818
|
-
const
|
|
4378
|
+
const requests2 = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
|
|
4819
4379
|
const events2 = /* @__PURE__ */ __name((event2) => {
|
|
4820
4380
|
if (event2.event === "request")
|
|
4821
4381
|
counted[event2.level === "wire" ? "wire" : "operation"] += 1;
|
|
4822
4382
|
if (event2.event === "response" && event2.outcome === "error")
|
|
4823
4383
|
refused = event2;
|
|
4384
|
+
if (event2.event === "store")
|
|
4385
|
+
wroteStore = true;
|
|
4824
4386
|
if (options.trace)
|
|
4825
4387
|
streams.diagnostic(options.format === "pretty" ? renderEvent(event2) : JSON.stringify(logAttributes(event2)));
|
|
4826
4388
|
if (run)
|
|
@@ -4842,13 +4404,14 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
4842
4404
|
events: events2,
|
|
4843
4405
|
succeed: /* @__PURE__ */ __name(async (answer) => {
|
|
4844
4406
|
const partial2 = partialOutcome(answer);
|
|
4845
|
-
const kept = run ?? (partial2 && held ? keep(open({ startedAt })) : void 0);
|
|
4407
|
+
const kept = run ?? ((partial2 || wroteStore) && held ? keep(open({ startedAt })) : void 0);
|
|
4846
4408
|
if (kept)
|
|
4847
4409
|
cap.close(kept);
|
|
4848
4410
|
await kept?.finish(partial2 ? "partial" : "success", {
|
|
4849
|
-
requests:
|
|
4411
|
+
requests: requests2(),
|
|
4850
4412
|
...cap.dropped(),
|
|
4851
|
-
...partial2 ? { partial: partial2 } : {}
|
|
4413
|
+
...partial2 ? { partial: partial2 } : {},
|
|
4414
|
+
...!run && !partial2 && wroteStore ? { keptBecauseStore: true } : {}
|
|
4852
4415
|
});
|
|
4853
4416
|
}, "succeed"),
|
|
4854
4417
|
fail: /* @__PURE__ */ __name(async (thrown) => {
|
|
@@ -4865,7 +4428,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
4865
4428
|
failed.logger.error(crashOf(error));
|
|
4866
4429
|
cap.close(failed);
|
|
4867
4430
|
await failed.finish("failed", {
|
|
4868
|
-
requests:
|
|
4431
|
+
requests: requests2(),
|
|
4869
4432
|
...cap.dropped(),
|
|
4870
4433
|
...outcomeOf(error),
|
|
4871
4434
|
error: errorDetailOf(error, refused),
|
|
@@ -4883,29 +4446,47 @@ var wasSettled = /* @__PURE__ */ __name((error) => typeof error === "object" &&
|
|
|
4883
4446
|
var HELD_AT_MOST = 500;
|
|
4884
4447
|
var EVENTS_AT_MOST = 2e3;
|
|
4885
4448
|
var EVENT_BYTES_AT_MOST = 1024 * 1024;
|
|
4449
|
+
var STORE_EVENTS_AT_MOST = 100;
|
|
4886
4450
|
var capped = /* @__PURE__ */ __name(() => {
|
|
4887
4451
|
let lines = 0;
|
|
4888
4452
|
let bytes = 0;
|
|
4889
|
-
let
|
|
4453
|
+
let dropped = 0;
|
|
4454
|
+
let stores = 0;
|
|
4890
4455
|
const byOperation = {};
|
|
4456
|
+
const summed = /* @__PURE__ */ new Map();
|
|
4457
|
+
const write = /* @__PURE__ */ __name((run, event2) => {
|
|
4458
|
+
const size = JSON.stringify(logAttributes(event2)).length + 200;
|
|
4459
|
+
if (lines >= EVENTS_AT_MOST || bytes + size > EVENT_BYTES_AT_MOST) {
|
|
4460
|
+
dropped += 1;
|
|
4461
|
+
const operation = "operation" in event2 && event2.operation ? event2.operation : event2.event;
|
|
4462
|
+
byOperation[operation] = (byOperation[operation] ?? 0) + 1;
|
|
4463
|
+
return;
|
|
4464
|
+
}
|
|
4465
|
+
lines += 1;
|
|
4466
|
+
bytes += size;
|
|
4467
|
+
logEvent(run, event2);
|
|
4468
|
+
}, "write");
|
|
4891
4469
|
return {
|
|
4892
4470
|
log: /* @__PURE__ */ __name((run, event2) => {
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4471
|
+
if (event2.event === "store" && ++stores > STORE_EVENTS_AT_MOST) {
|
|
4472
|
+
const key = `${event2.table} ${event2.op}`;
|
|
4473
|
+
const sum = summed.get(key);
|
|
4474
|
+
if (sum)
|
|
4475
|
+
sum.n += event2.n;
|
|
4476
|
+
else
|
|
4477
|
+
summed.set(key, { ...event2 });
|
|
4898
4478
|
return;
|
|
4899
4479
|
}
|
|
4900
|
-
|
|
4901
|
-
bytes += size;
|
|
4902
|
-
logEvent(run, event2);
|
|
4480
|
+
write(run, event2);
|
|
4903
4481
|
}, "log"),
|
|
4904
4482
|
close: /* @__PURE__ */ __name((run) => {
|
|
4905
|
-
|
|
4906
|
-
run
|
|
4483
|
+
for (const sum of summed.values())
|
|
4484
|
+
write(run, sum);
|
|
4485
|
+
summed.clear();
|
|
4486
|
+
if (dropped > 0)
|
|
4487
|
+
run.logger.warn({ event: "events.dropped", dropped, counts: byOperation });
|
|
4907
4488
|
}, "close"),
|
|
4908
|
-
dropped: /* @__PURE__ */ __name(() =>
|
|
4489
|
+
dropped: /* @__PURE__ */ __name(() => dropped > 0 ? { eventsDropped: dropped } : {}, "dropped")
|
|
4909
4490
|
};
|
|
4910
4491
|
}, "capped");
|
|
4911
4492
|
var logEvent = /* @__PURE__ */ __name((run, event2) => {
|
|
@@ -4916,7 +4497,7 @@ var logEvent = /* @__PURE__ */ __name((run, event2) => {
|
|
|
4916
4497
|
};
|
|
4917
4498
|
if (event2.event === "warning")
|
|
4918
4499
|
run.logger.warn(record2);
|
|
4919
|
-
else if (event2.event
|
|
4500
|
+
else if ((event2.event === "request" || event2.event === "response") && event2.outcome === "error")
|
|
4920
4501
|
run.logger.error(record2);
|
|
4921
4502
|
else
|
|
4922
4503
|
run.logger.info(record2);
|
|
@@ -4952,14 +4533,14 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
4952
4533
|
return void 0;
|
|
4953
4534
|
}, "partialOutcome");
|
|
4954
4535
|
|
|
4955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/deadline.js
|
|
4956
4537
|
var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
4957
4538
|
if (ms2 === void 0)
|
|
4958
4539
|
return body();
|
|
4959
4540
|
let timer2;
|
|
4960
4541
|
let timedOut;
|
|
4961
4542
|
const writes2 = /* @__PURE__ */ new Set();
|
|
4962
|
-
const expired = new Promise((
|
|
4543
|
+
const expired = new Promise((_2, reject) => {
|
|
4963
4544
|
timer2 = setTimeout(() => {
|
|
4964
4545
|
const pending = [...writes2];
|
|
4965
4546
|
const cut2 = pending.filter((write) => !write.preparing);
|
|
@@ -4978,7 +4559,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
|
4978
4559
|
}
|
|
4979
4560
|
}, "withDeadline");
|
|
4980
4561
|
|
|
4981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/profile.js
|
|
4982
4563
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
4983
4564
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
4984
4565
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5047,10 +4628,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5047
4628
|
return void 0;
|
|
5048
4629
|
}, "sampleCommand");
|
|
5049
4630
|
|
|
5050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5051
|
-
import { existsSync as
|
|
4631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
4632
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
5052
4633
|
|
|
5053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
5054
4635
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5055
4636
|
try {
|
|
5056
4637
|
const url3 = new URL(value);
|
|
@@ -5060,7 +4641,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
|
|
|
5060
4641
|
}
|
|
5061
4642
|
}, "endpoint");
|
|
5062
4643
|
|
|
5063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/models/settings.js
|
|
5064
4645
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5065
4646
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5066
4647
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5129,7 +4710,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5129
4710
|
};
|
|
5130
4711
|
}, "modelTarget");
|
|
5131
4712
|
|
|
5132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/analysis/settings.js
|
|
5133
4714
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5134
4715
|
var url2 = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5135
4716
|
var AI_FIELDS = {
|
|
@@ -5173,7 +4754,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5173
4754
|
};
|
|
5174
4755
|
}, "resolveAISettings");
|
|
5175
4756
|
|
|
5176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/domain/duration.js
|
|
5177
4758
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5178
4759
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5179
4760
|
var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
@@ -5187,7 +4768,9 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
|
5187
4768
|
return ms2;
|
|
5188
4769
|
}, "parseDuration");
|
|
5189
4770
|
|
|
5190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
4772
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
4773
|
+
import { join as join2 } from "node:path";
|
|
5191
4774
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5192
4775
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5193
4776
|
var e5Large = huggingFace("Xenova/multilingual-e5-large", "00fc3aeb3dbb95842de2ac1961d33c6319acf57b");
|
|
@@ -5234,9 +4817,13 @@ var TEXT_MODELS = [
|
|
|
5234
4817
|
languages: "over 100 languages \u2014 the best of the two on chat, about seven times slower",
|
|
5235
4818
|
licence: "Gemma Terms of Use",
|
|
5236
4819
|
terms: "https://ai.google.dev/gemma/terms",
|
|
4820
|
+
// Gemma Terms of Use §3.1: every copy carries this notice and the use restrictions of §3.2.
|
|
4821
|
+
notice: "Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms. Its use is restricted by the Gemma Prohibited Use Policy: https://ai.google.dev/gemma/prohibited_use_policy",
|
|
5237
4822
|
dims: 768,
|
|
5238
4823
|
maxTokens: 2048,
|
|
5239
|
-
|
|
4824
|
+
// 2026-11-08, 1,200-character chunks, 8 threads on the Ryzen AI 9 HX 470: 8.3 chunks/s against e5-small's 52.7, so
|
|
4825
|
+
// 5 on the scale e5-small's 31 sets. It was 2, which held a memo sync to 39 chunks.
|
|
4826
|
+
chunksPerSecond: 5,
|
|
5240
4827
|
pooling: "sentence_embedding",
|
|
5241
4828
|
prefix: { query: "task: search result | query: ", passage: "title: none | text: " },
|
|
5242
4829
|
onnx: "onnx/model_q4.onnx",
|
|
@@ -5303,7 +4890,8 @@ var TEXT_MODELS = [
|
|
|
5303
4890
|
]
|
|
5304
4891
|
}
|
|
5305
4892
|
];
|
|
5306
|
-
var DEFAULT_TEXT_MODEL = "
|
|
4893
|
+
var DEFAULT_TEXT_MODEL = "embeddinggemma";
|
|
4894
|
+
var PREVIOUS_DEFAULT_TEXT_MODEL = "e5-small";
|
|
5307
4895
|
var SECTION = "text_models";
|
|
5308
4896
|
var slug = pipe(string(), regex(/^[a-z0-9][a-z0-9._-]{0,62}$/, "is not a model id: a-z, 0-9, . _ -"));
|
|
5309
4897
|
var words = pipe(string(), trim(), minLength(1), maxLength(300));
|
|
@@ -5342,10 +4930,10 @@ var TextModelsSection = strictObject({
|
|
|
5342
4930
|
var textModelsFile = /* @__PURE__ */ __name((env = process.env) => sharedConfigPath(storePath(env), env), "textModelsFile");
|
|
5343
4931
|
var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
|
|
5344
4932
|
const path2 = textModelsFile(env);
|
|
5345
|
-
const
|
|
5346
|
-
if (
|
|
4933
|
+
const section2 = readSharedSection(path2, SECTION);
|
|
4934
|
+
if (section2 === void 0)
|
|
5347
4935
|
return {};
|
|
5348
|
-
const checked = safeParse(TextModelsSection,
|
|
4936
|
+
const checked = safeParse(TextModelsSection, section2);
|
|
5349
4937
|
if (!checked.success) {
|
|
5350
4938
|
const issue = checked.issues[0];
|
|
5351
4939
|
const at2 = issue ? getDotPath(issue) : null;
|
|
@@ -5357,7 +4945,7 @@ var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
5357
4945
|
throw new CliError("configuration_error", `${path2}: ${SECTION}.custom names ${twice} twice`);
|
|
5358
4946
|
return checked.output;
|
|
5359
4947
|
}, "readTextModelsSection");
|
|
5360
|
-
var writeTextModelsSection = /* @__PURE__ */ __name((
|
|
4948
|
+
var writeTextModelsSection = /* @__PURE__ */ __name((section2, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section2.use === void 0 && !section2.custom?.length ? void 0 : section2), "writeTextModelsSection");
|
|
5361
4949
|
var textModels = /* @__PURE__ */ __name((env = process.env) => [
|
|
5362
4950
|
...TEXT_MODELS,
|
|
5363
4951
|
...(readTextModelsSection(env).custom ?? []).map((model3) => ({ ...model3, custom: true }))
|
|
@@ -5370,9 +4958,17 @@ var textModel = /* @__PURE__ */ __name((id6, env = process.env) => {
|
|
|
5370
4958
|
}
|
|
5371
4959
|
return found;
|
|
5372
4960
|
}, "textModel");
|
|
4961
|
+
var downloaded = /* @__PURE__ */ __name((id6, env) => {
|
|
4962
|
+
const model3 = TEXT_MODELS.find((one) => one.id === id6);
|
|
4963
|
+
const directory = sharedModelsDirectory("text", env);
|
|
4964
|
+
return model3 !== void 0 && filesPresent(model3.files.map((file) => [file, join2(directory, model3.id, file.name)]));
|
|
4965
|
+
}, "downloaded");
|
|
5373
4966
|
var chosenTextModel = /* @__PURE__ */ __name((env = process.env) => {
|
|
5374
4967
|
const use = readTextModelsSection(env).use;
|
|
5375
|
-
|
|
4968
|
+
if (use !== void 0)
|
|
4969
|
+
return { id: use, from: "chosen" };
|
|
4970
|
+
const kept = !downloaded(DEFAULT_TEXT_MODEL, env) && existsSync2(join2(sharedModelsDirectory("text", env), PREVIOUS_DEFAULT_TEXT_MODEL));
|
|
4971
|
+
return { id: kept ? PREVIOUS_DEFAULT_TEXT_MODEL : DEFAULT_TEXT_MODEL, from: "default" };
|
|
5376
4972
|
}, "chosenTextModel");
|
|
5377
4973
|
var mmarco = huggingFace("cross-encoder/mmarco-mMiniLMv2-L12-H384-v1", "1427fd652930e4ba29e8149678df786c240d8825");
|
|
5378
4974
|
var bge = huggingFace("onnx-community/bge-reranker-v2-m3-ONNX", "6f5ff65298512715a1e669753bc754d2bc8f367b");
|
|
@@ -5449,16 +5045,16 @@ var vectorModelKey = /* @__PURE__ */ __name((model3) => {
|
|
|
5449
5045
|
}, "vectorModelKey");
|
|
5450
5046
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
5451
5047
|
|
|
5452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/services/history-limits.js
|
|
5453
5049
|
var HISTORY_MAX_DAYS = 1095;
|
|
5454
5050
|
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
5455
|
-
var
|
|
5051
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
5456
5052
|
var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
|
|
5457
5053
|
const group2 = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
|
|
5458
5054
|
if (group2 && (shape.participantsCount ?? 0) > limits.groupMembersMax)
|
|
5459
5055
|
return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
|
|
5460
|
-
const
|
|
5461
|
-
return { keepFrom: now - Math.min(
|
|
5056
|
+
const days = group2 ? limits.groupDays : limits.dialogDays;
|
|
5057
|
+
return { keepFrom: now - Math.min(days, HISTORY_MAX_DAYS) * DAY_MS };
|
|
5462
5058
|
}, "historyWindow");
|
|
5463
5059
|
var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
|
|
5464
5060
|
const skipped = /* @__PURE__ */ new Map();
|
|
@@ -5496,8 +5092,8 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
|
|
|
5496
5092
|
return { batch: { ...batch, messages }, skipped };
|
|
5497
5093
|
}, "limitBatch");
|
|
5498
5094
|
|
|
5499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5500
|
-
import { existsSync as
|
|
5095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
|
|
5096
|
+
import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
5501
5097
|
import { join as join3 } from "node:path";
|
|
5502
5098
|
var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
|
|
5503
5099
|
var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
|
|
@@ -5535,7 +5131,7 @@ var ChatRegistry = class {
|
|
|
5535
5131
|
}
|
|
5536
5132
|
/** Makes this bot known to `bot list` before it has seen any chat. */
|
|
5537
5133
|
touch() {
|
|
5538
|
-
if (!
|
|
5134
|
+
if (!existsSync3(this.#path))
|
|
5539
5135
|
writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
|
|
5540
5136
|
`, 384);
|
|
5541
5137
|
}
|
|
@@ -5564,10 +5160,10 @@ var ChatRegistry = class {
|
|
|
5564
5160
|
this.#write({ ...this.#read(), chats: [...byId.values()] });
|
|
5565
5161
|
}
|
|
5566
5162
|
#read() {
|
|
5567
|
-
if (!
|
|
5163
|
+
if (!existsSync3(this.#path))
|
|
5568
5164
|
return {};
|
|
5569
5165
|
try {
|
|
5570
|
-
const parsed = JSON.parse(
|
|
5166
|
+
const parsed = JSON.parse(readFileSync2(this.#path, "utf8"));
|
|
5571
5167
|
return parsed && typeof parsed === "object" ? parsed : {};
|
|
5572
5168
|
} catch {
|
|
5573
5169
|
return {};
|
|
@@ -5580,15 +5176,15 @@ var ChatRegistry = class {
|
|
|
5580
5176
|
};
|
|
5581
5177
|
var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
|
|
5582
5178
|
const directory = botsDirectory(app, env);
|
|
5583
|
-
if (!
|
|
5179
|
+
if (!existsSync3(directory))
|
|
5584
5180
|
return [];
|
|
5585
|
-
return
|
|
5181
|
+
return readdirSync2(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
|
|
5586
5182
|
}, "registryProfiles");
|
|
5587
5183
|
|
|
5588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5589
|
-
import { readFileSync as
|
|
5184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
5185
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
5590
5186
|
|
|
5591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
|
|
5592
5188
|
var REPAIR_WORDS = {
|
|
5593
5189
|
byte_order_mark: "an invisible byte-order mark at the start",
|
|
5594
5190
|
comment: "a comment, which JSON does not allow",
|
|
@@ -5829,7 +5425,7 @@ ${parts.join(",\n")}
|
|
|
5829
5425
|
${indent}${close}`;
|
|
5830
5426
|
}, "serialise");
|
|
5831
5427
|
|
|
5832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
5833
5429
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
5834
5430
|
var SECTIONS = ["personal", "bot"];
|
|
5835
5431
|
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
@@ -6008,7 +5604,7 @@ var schemaIssues = /* @__PURE__ */ __name((raw, schema2, context2) => {
|
|
|
6008
5604
|
return [...found.values()];
|
|
6009
5605
|
}
|
|
6010
5606
|
}, "schemaIssues");
|
|
6011
|
-
var
|
|
5607
|
+
var scopes = /* @__PURE__ */ __name((raw) => {
|
|
6012
5608
|
if (!isNode(raw))
|
|
6013
5609
|
return [];
|
|
6014
5610
|
const out = [];
|
|
@@ -6016,12 +5612,12 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
|
|
|
6016
5612
|
if (isNode(node))
|
|
6017
5613
|
out.push([path2, node]);
|
|
6018
5614
|
}, "add");
|
|
6019
|
-
const addSection = /* @__PURE__ */ __name((path2,
|
|
6020
|
-
if (!isNode(
|
|
5615
|
+
const addSection = /* @__PURE__ */ __name((path2, section2) => {
|
|
5616
|
+
if (!isNode(section2))
|
|
6021
5617
|
return;
|
|
6022
|
-
add([...path2, "defaults"],
|
|
6023
|
-
if (isNode(
|
|
6024
|
-
for (const [name, scope] of Object.entries(
|
|
5618
|
+
add([...path2, "defaults"], section2.defaults);
|
|
5619
|
+
if (isNode(section2.profiles))
|
|
5620
|
+
for (const [name, scope] of Object.entries(section2.profiles))
|
|
6025
5621
|
add([...path2, "profiles", name], scope);
|
|
6026
5622
|
}, "addSection");
|
|
6027
5623
|
add([], raw);
|
|
@@ -6030,7 +5626,7 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
|
|
|
6030
5626
|
addSection([name], raw[name]);
|
|
6031
5627
|
return out;
|
|
6032
5628
|
}, "scopes");
|
|
6033
|
-
var savedPermissionKeys = /* @__PURE__ */ __name((raw) =>
|
|
5629
|
+
var savedPermissionKeys = /* @__PURE__ */ __name((raw) => scopes(raw).flatMap(([path2, scope]) => isNode(scope.permissions) ? Object.keys(scope.permissions).map((key) => ({ key, at: [...path2, "permissions", key] })) : []), "savedPermissionKeys");
|
|
6034
5630
|
var permissionIssues = /* @__PURE__ */ __name((saved, known, context2) => saved.filter(({ key }) => !known.has(key)).map(({ at: at2 }) => locate("unknown_permission", at2, context2, (key) => `${key} names no command`)), "permissionIssues");
|
|
6035
5631
|
var pathId = /* @__PURE__ */ __name((path2) => path2.join("\0"), "pathId");
|
|
6036
5632
|
var prune = /* @__PURE__ */ __name((raw, paths) => {
|
|
@@ -6038,7 +5634,7 @@ var prune = /* @__PURE__ */ __name((raw, paths) => {
|
|
|
6038
5634
|
const kept = /* @__PURE__ */ new Map();
|
|
6039
5635
|
const walk = /* @__PURE__ */ __name((node, at2) => {
|
|
6040
5636
|
if (Array.isArray(node)) {
|
|
6041
|
-
const indices = node.flatMap((
|
|
5637
|
+
const indices = node.flatMap((_2, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
|
|
6042
5638
|
kept.set(pathId(at2), indices);
|
|
6043
5639
|
return indices.map((index) => walk(node[index], [...at2, String(index)]));
|
|
6044
5640
|
}
|
|
@@ -6074,7 +5670,7 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
|
|
|
6074
5670
|
}
|
|
6075
5671
|
return { config: prune(raw, [gone]).pruned, removed: true };
|
|
6076
5672
|
}, "withoutPath");
|
|
6077
|
-
var publicIssue = /* @__PURE__ */ __name(({ at:
|
|
5673
|
+
var publicIssue = /* @__PURE__ */ __name(({ at: _2, ...issue }) => issue, "publicIssue");
|
|
6078
5674
|
var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
|
|
6079
5675
|
var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
|
|
6080
5676
|
const [first2] = issues;
|
|
@@ -6103,7 +5699,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
|
|
|
6103
5699
|
var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
|
|
6104
5700
|
var readConfigText = /* @__PURE__ */ __name((path2) => {
|
|
6105
5701
|
try {
|
|
6106
|
-
return { text:
|
|
5702
|
+
return { text: readFileSync3(path2, "utf8") };
|
|
6107
5703
|
} catch (error) {
|
|
6108
5704
|
const code = error.code;
|
|
6109
5705
|
if (code === "ENOENT")
|
|
@@ -6123,22 +5719,22 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6123
5719
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6124
5720
|
}, "readConfigFile");
|
|
6125
5721
|
|
|
6126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6127
|
-
import { existsSync as
|
|
5722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/default-config.js
|
|
5723
|
+
import { existsSync as existsSync4, linkSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
6128
5724
|
import { dirname, join as join4 } from "node:path";
|
|
6129
5725
|
var DEFAULT_CONFIG = {
|
|
6130
5726
|
defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
|
|
6131
5727
|
profiles: {}
|
|
6132
5728
|
};
|
|
6133
5729
|
function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
6134
|
-
if (
|
|
5730
|
+
if (existsSync4(path2))
|
|
6135
5731
|
return;
|
|
6136
5732
|
const directory = dirname(path2);
|
|
6137
|
-
|
|
5733
|
+
mkdirSync(directory, { recursive: true, mode: 448 });
|
|
6138
5734
|
const temporary = mkdtempSync(join4(directory, ".config-"));
|
|
6139
5735
|
const candidate = join4(temporary, "config.json");
|
|
6140
5736
|
try {
|
|
6141
|
-
|
|
5737
|
+
writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
|
|
6142
5738
|
`, { flag: "wx", mode: 384 });
|
|
6143
5739
|
try {
|
|
6144
5740
|
linkSync(candidate, path2);
|
|
@@ -6147,12 +5743,12 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6147
5743
|
throw error;
|
|
6148
5744
|
}
|
|
6149
5745
|
} finally {
|
|
6150
|
-
|
|
5746
|
+
rmSync(temporary, { recursive: true, force: true });
|
|
6151
5747
|
}
|
|
6152
5748
|
}
|
|
6153
5749
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6154
5750
|
|
|
6155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
|
|
6156
5752
|
var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6157
5753
|
var parentOf = /* @__PURE__ */ __name((config, key) => {
|
|
6158
5754
|
const path2 = key.split(".");
|
|
@@ -6174,7 +5770,7 @@ var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
|
|
|
6174
5770
|
return { config, added };
|
|
6175
5771
|
}, "withSettingDefaults");
|
|
6176
5772
|
|
|
6177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
6178
5774
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6179
5775
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6180
5776
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6213,6 +5809,7 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6213
5809
|
record_input: optional(recordInputSetting),
|
|
6214
5810
|
keep_runs_for_days: optional(count2),
|
|
6215
5811
|
keep_successful_runs_for_days: optional(count2),
|
|
5812
|
+
keep_store_runs_for_days: optional(count2),
|
|
6216
5813
|
runs_size_limit_mb: optional(count2),
|
|
6217
5814
|
permissions: optional(permissionLevels),
|
|
6218
5815
|
sends_per_hour: optional(count2),
|
|
@@ -6223,6 +5820,7 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6223
5820
|
history_dialog_days: optional(historyDays),
|
|
6224
5821
|
history_group_days: optional(historyDays),
|
|
6225
5822
|
history_group_members_max: optional(count2),
|
|
5823
|
+
history_muted: optional(flag),
|
|
6226
5824
|
picture_search: optional(flag),
|
|
6227
5825
|
search_reranker: optional(picklist([...RERANK_MODELS.map((model3) => model3.id), "off"], plain(`has to be off or a reranker id: ${RERANK_MODELS.map((model3) => model3.id).join(", ")}`))),
|
|
6228
5826
|
...AI_ENTRIES
|
|
@@ -6238,6 +5836,7 @@ var MESSENGER_ONLY_SETTINGS = [
|
|
|
6238
5836
|
"history_dialog_days",
|
|
6239
5837
|
"history_group_days",
|
|
6240
5838
|
"history_group_members_max",
|
|
5839
|
+
"history_muted",
|
|
6241
5840
|
"read_other_bots",
|
|
6242
5841
|
"speech_model",
|
|
6243
5842
|
"picture_search"
|
|
@@ -6271,6 +5870,11 @@ var SHARED_SETTINGS = [
|
|
|
6271
5870
|
default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
6272
5871
|
description: "days a successful run is kept"
|
|
6273
5872
|
},
|
|
5873
|
+
{
|
|
5874
|
+
key: "keep_store_runs_for_days",
|
|
5875
|
+
default: KEEP_STORE_RUNS_FOR_DAYS,
|
|
5876
|
+
description: "days a successful run that wrote the store is kept, even unrecorded"
|
|
5877
|
+
},
|
|
6274
5878
|
{ key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
|
|
6275
5879
|
{ key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
|
|
6276
5880
|
{ key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
|
|
@@ -6289,6 +5893,7 @@ var SHARED_SETTINGS = [
|
|
|
6289
5893
|
default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
|
|
6290
5894
|
description: "a group with more people than this keeps no pushed history"
|
|
6291
5895
|
},
|
|
5896
|
+
{ key: "history_muted", default: false, description: "messages sync --all reads muted chats too" },
|
|
6292
5897
|
{
|
|
6293
5898
|
key: "picture_search",
|
|
6294
5899
|
default: false,
|
|
@@ -6413,7 +6018,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6413
6018
|
const env = options.env ?? process.env;
|
|
6414
6019
|
const configPath = configPathFor(options);
|
|
6415
6020
|
try {
|
|
6416
|
-
if (!options.readOnly)
|
|
6021
|
+
if (!options.readOnly && !readOnlyLockOf(app, env))
|
|
6417
6022
|
ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
|
|
6418
6023
|
} catch (error) {
|
|
6419
6024
|
throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
|
|
@@ -6434,11 +6039,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6434
6039
|
const name = usableProfileName(profile.value);
|
|
6435
6040
|
const configured = config.profiles[name] ?? {};
|
|
6436
6041
|
const shared = config.defaults ?? {};
|
|
6437
|
-
const
|
|
6042
|
+
const section2 = config[kind2];
|
|
6438
6043
|
const layers = [
|
|
6439
|
-
[`config file: ${kind2}.profiles.${name}`,
|
|
6044
|
+
[`config file: ${kind2}.profiles.${name}`, section2?.profiles?.[name]],
|
|
6440
6045
|
[extension.sourcePaths ? `config file: profiles.${name}` : "config file", configured],
|
|
6441
|
-
[`config file: ${kind2}.defaults`,
|
|
6046
|
+
[`config file: ${kind2}.defaults`, section2?.defaults],
|
|
6442
6047
|
[extension.sourcePaths ? "config file: defaults" : "config defaults", shared]
|
|
6443
6048
|
];
|
|
6444
6049
|
const fromLayers = /* @__PURE__ */ __name((key, fallback, only = layers) => first(only.map(([from, scope]) => [from, scope?.[key]]), fallback), "fromLayers");
|
|
@@ -6452,11 +6057,13 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6452
6057
|
const historyDialogDays = fromLayers("history_dialog_days", DEFAULT_HISTORY_LIMITS.dialogDays);
|
|
6453
6058
|
const historyGroupDays = fromLayers("history_group_days", DEFAULT_HISTORY_LIMITS.groupDays);
|
|
6454
6059
|
const historyGroupMembersMax = fromLayers("history_group_members_max", DEFAULT_HISTORY_LIMITS.groupMembersMax);
|
|
6060
|
+
const historyMuted = fromLayers("history_muted", false);
|
|
6455
6061
|
const pictureSearch = fromLayers("picture_search", false);
|
|
6456
6062
|
const searchReranker = fromLayers("search_reranker", DEFAULT_RERANK_MODEL);
|
|
6457
6063
|
const recordInput = fromLayers("record_input", true);
|
|
6458
6064
|
const keepRunsForDays = fromLayers("keep_runs_for_days", DEFAULT_KEEP_RUNS_FOR_DAYS);
|
|
6459
6065
|
const keepSuccessfulRunsForDays = fromLayers("keep_successful_runs_for_days", KEEP_SUCCESSFUL_RUNS_FOR_DAYS);
|
|
6066
|
+
const keepStoreRunsForDays = fromLayers("keep_store_runs_for_days", KEEP_STORE_RUNS_FOR_DAYS);
|
|
6460
6067
|
const runsSizeLimitMb = fromLayers("runs_size_limit_mb", RUNS_SIZE_LIMIT_MB);
|
|
6461
6068
|
const readOnlyLock = readOnlyLockOf(app, env);
|
|
6462
6069
|
const sendsPerHour = kind2 === "bot" ? fromLayers("sends_per_hour", Number.POSITIVE_INFINITY, kindLayers) : fromLayers("sends_per_hour", DEFAULT_SENDS_PER_HOUR);
|
|
@@ -6499,6 +6106,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6499
6106
|
groupDays: historyGroupDays.value,
|
|
6500
6107
|
groupMembersMax: historyGroupMembersMax.value
|
|
6501
6108
|
},
|
|
6109
|
+
historyMuted: historyMuted.value,
|
|
6502
6110
|
pictureSearch: pictureSearch.value,
|
|
6503
6111
|
searchReranker: searchReranker.value,
|
|
6504
6112
|
limit: limit.value,
|
|
@@ -6511,6 +6119,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6511
6119
|
keepFailedRuns: record2.value || record2.from !== "flag",
|
|
6512
6120
|
keepRunsForDays: keepRunsForDays.value,
|
|
6513
6121
|
keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.value,
|
|
6122
|
+
keepStoreRunsForDays: keepStoreRunsForDays.value,
|
|
6514
6123
|
runsSizeLimitMb: runsSizeLimitMb.value,
|
|
6515
6124
|
...readOnlyLock ? { readOnlyLock } : {},
|
|
6516
6125
|
permissions: permissions.levels,
|
|
@@ -6522,7 +6131,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6522
6131
|
updateCheck: updateCheck.value,
|
|
6523
6132
|
skillHint: skillHint.value,
|
|
6524
6133
|
configPath,
|
|
6525
|
-
configFound:
|
|
6134
|
+
configFound: existsSync5(configPath),
|
|
6526
6135
|
configuredProfiles: namedProfiles(config),
|
|
6527
6136
|
profilesHere: profilesOf(config, env),
|
|
6528
6137
|
accountProfiles: accountsOf(config, env, bots),
|
|
@@ -6539,12 +6148,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6539
6148
|
historyDialogDays: historyDialogDays.from,
|
|
6540
6149
|
historyGroupDays: historyGroupDays.from,
|
|
6541
6150
|
historyGroupMembersMax: historyGroupMembersMax.from,
|
|
6151
|
+
historyMuted: historyMuted.from,
|
|
6542
6152
|
pictureSearch: pictureSearch.from,
|
|
6543
6153
|
searchReranker: searchReranker.from,
|
|
6544
6154
|
record: record2.from,
|
|
6545
6155
|
recordInput: recordInput.from,
|
|
6546
6156
|
keepRunsForDays: keepRunsForDays.from,
|
|
6547
6157
|
keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.from,
|
|
6158
|
+
keepStoreRunsForDays: keepStoreRunsForDays.from,
|
|
6548
6159
|
runsSizeLimitMb: runsSizeLimitMb.from,
|
|
6549
6160
|
sendsPerHour: sendsPerHour.from,
|
|
6550
6161
|
requestsPerMinute: requestsPerMinute.from,
|
|
@@ -6684,12 +6295,12 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
6684
6295
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
6685
6296
|
}, "given");
|
|
6686
6297
|
|
|
6687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6688
|
-
var runBudgetOf = /* @__PURE__ */ __name((command,
|
|
6298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/context.js
|
|
6299
|
+
var runBudgetOf = /* @__PURE__ */ __name((command, requests2) => {
|
|
6689
6300
|
const { deadline, signal, app } = environmentOf(command);
|
|
6690
6301
|
const now = deadline?.();
|
|
6691
6302
|
return runBudget({
|
|
6692
|
-
...
|
|
6303
|
+
...requests2 === void 0 ? {} : { requests: requests2 },
|
|
6693
6304
|
...app?.requestMs === void 0 ? {} : { requestMs: app.requestMs },
|
|
6694
6305
|
...now ? { deadline: now } : {},
|
|
6695
6306
|
...signal ? { signal } : {}
|
|
@@ -6697,8 +6308,11 @@ var runBudgetOf = /* @__PURE__ */ __name((command, requests) => {
|
|
|
6697
6308
|
}, "runBudgetOf");
|
|
6698
6309
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
6699
6310
|
const slot = environmentOf(command).exit;
|
|
6311
|
+
const request = commandServerRequest();
|
|
6700
6312
|
if (slot)
|
|
6701
6313
|
slot.code = code;
|
|
6314
|
+
else if (request)
|
|
6315
|
+
request.exitCode = code;
|
|
6702
6316
|
else
|
|
6703
6317
|
process.exitCode = code;
|
|
6704
6318
|
}, "setExitCode");
|
|
@@ -6789,6 +6403,7 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
|
|
|
6789
6403
|
trace: settings.trace,
|
|
6790
6404
|
keepDays: settings.keepRunsForDays,
|
|
6791
6405
|
...settings.keepSuccessfulRunsForDays === void 0 ? {} : { keepSuccessDays: settings.keepSuccessfulRunsForDays },
|
|
6406
|
+
...settings.keepStoreRunsForDays === void 0 ? {} : { keepStoreDays: settings.keepStoreRunsForDays },
|
|
6792
6407
|
...settings.runsSizeLimitMb === void 0 ? {} : { maxBytes: settings.runsSizeLimitMb * 1024 * 1024 },
|
|
6793
6408
|
processRun: !environment.agent,
|
|
6794
6409
|
format,
|
|
@@ -6816,7 +6431,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
|
|
|
6816
6431
|
return words2.join(" ");
|
|
6817
6432
|
}, "commandPath");
|
|
6818
6433
|
|
|
6819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/effects.js
|
|
6820
6435
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
6821
6436
|
var FETCH = { remote: "read", local: "write" };
|
|
6822
6437
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -6866,6 +6481,10 @@ var isProposal = /* @__PURE__ */ __name((command) => {
|
|
|
6866
6481
|
}, "isProposal");
|
|
6867
6482
|
var LOCKED_AUTHORITY_COMMANDS = ["rules add"];
|
|
6868
6483
|
var NARROWS = /* @__PURE__ */ new WeakSet();
|
|
6484
|
+
var narrowsUnderLock = /* @__PURE__ */ __name((command) => {
|
|
6485
|
+
NARROWS.add(command);
|
|
6486
|
+
return command;
|
|
6487
|
+
}, "narrowsUnderLock");
|
|
6869
6488
|
var admittedUnderLock = /* @__PURE__ */ __name((command) => {
|
|
6870
6489
|
if (!NARROWS.has(command))
|
|
6871
6490
|
return false;
|
|
@@ -6944,7 +6563,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
6944
6563
|
throw readOnlyRefusal(lock, what);
|
|
6945
6564
|
}, "refuseUnderReadOnly");
|
|
6946
6565
|
|
|
6947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account.js
|
|
6948
6567
|
var account = strictObject({
|
|
6949
6568
|
provider: text,
|
|
6950
6569
|
id,
|
|
@@ -6954,7 +6573,7 @@ var account = strictObject({
|
|
|
6954
6573
|
scope: optional(picklist(["personal", "work"]))
|
|
6955
6574
|
});
|
|
6956
6575
|
|
|
6957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account-session.js
|
|
6958
6577
|
var accountSession = strictObject({
|
|
6959
6578
|
current: boolean(),
|
|
6960
6579
|
client: nullable(text),
|
|
@@ -6964,7 +6583,7 @@ var accountSession = strictObject({
|
|
|
6964
6583
|
created_at: optional(nullable(time))
|
|
6965
6584
|
});
|
|
6966
6585
|
|
|
6967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account-change.js
|
|
6968
6587
|
var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
|
|
6969
6588
|
var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
|
|
6970
6589
|
var audience = picklist(["everyone", "contacts", "nobody"]);
|
|
@@ -6993,7 +6612,7 @@ var accountRemoval = strictObject({
|
|
|
6993
6612
|
kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
|
|
6994
6613
|
});
|
|
6995
6614
|
|
|
6996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
|
|
6997
6616
|
var accountProfile = strictObject({
|
|
6998
6617
|
profile: id,
|
|
6999
6618
|
current: boolean(),
|
|
@@ -7005,7 +6624,7 @@ var accountProfile = strictObject({
|
|
|
7005
6624
|
bot: optional(literal(true))
|
|
7006
6625
|
});
|
|
7007
6626
|
|
|
7008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
|
|
7009
6628
|
var milliseconds = pipe(number(), minValue(0));
|
|
7010
6629
|
var counterReading = strictObject({
|
|
7011
6630
|
counter: picklist(["views", "reactions", "comments"]),
|
|
@@ -7017,7 +6636,7 @@ var counterReading = strictObject({
|
|
|
7017
6636
|
});
|
|
7018
6637
|
var selection = record(string(), unknown());
|
|
7019
6638
|
|
|
7020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
|
|
7021
6640
|
var adminRow = strictObject({
|
|
7022
6641
|
ref: reference,
|
|
7023
6642
|
/** What `stats * evidence` takes: a person id, a stay or a message locator. */
|
|
@@ -7070,7 +6689,7 @@ var adminReport = strictObject({
|
|
|
7070
6689
|
rows: array(adminRow)
|
|
7071
6690
|
});
|
|
7072
6691
|
|
|
7073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/task.js
|
|
7074
6693
|
var closeSuggestion = strictObject({
|
|
7075
6694
|
as: picklist(["done", "dismissed"]),
|
|
7076
6695
|
/** The agent's name. */
|
|
@@ -7132,7 +6751,7 @@ var task = strictObject({
|
|
|
7132
6751
|
updated_at: optional(time)
|
|
7133
6752
|
});
|
|
7134
6753
|
|
|
7135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/agenda.js
|
|
7136
6755
|
var agendaChat = strictObject({
|
|
7137
6756
|
chat: reference,
|
|
7138
6757
|
title: nullable(text),
|
|
@@ -7202,11 +6821,11 @@ var agenda = strictObject({
|
|
|
7202
6821
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7203
6822
|
});
|
|
7204
6823
|
|
|
7205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
|
|
7206
6825
|
var analysisConsent = strictObject({ chat: id, provider: text, at: time });
|
|
7207
6826
|
var analysisConsentRevocation = strictObject({ revoked: boolean() });
|
|
7208
6827
|
|
|
7209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
7210
6829
|
var attachment = strictObject({
|
|
7211
6830
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7212
6831
|
message: optional(reference),
|
|
@@ -7244,7 +6863,7 @@ var attachment = strictObject({
|
|
|
7244
6863
|
});
|
|
7245
6864
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
7246
6865
|
|
|
7247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
|
|
7248
6867
|
var actionableError = objectWithRest({
|
|
7249
6868
|
code: text,
|
|
7250
6869
|
message: text,
|
|
@@ -7261,7 +6880,7 @@ var batchResult = strictObject({
|
|
|
7261
6880
|
max_error_percent: count
|
|
7262
6881
|
});
|
|
7263
6882
|
|
|
7264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
|
|
7265
6884
|
var extractionItem = strictObject({
|
|
7266
6885
|
ref: reference,
|
|
7267
6886
|
attachment: count,
|
|
@@ -7294,7 +6913,7 @@ var extractionReport = strictObject({
|
|
|
7294
6913
|
cursor: optional(text)
|
|
7295
6914
|
});
|
|
7296
6915
|
|
|
7297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
|
|
7298
6917
|
var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
|
|
7299
6918
|
var attachmentBytes = strictObject({
|
|
7300
6919
|
ref: reference,
|
|
@@ -7322,22 +6941,82 @@ var attachmentTextChange = strictObject({
|
|
|
7322
6941
|
replaced: nullable(picklist(["extracted", "agent"]))
|
|
7323
6942
|
});
|
|
7324
6943
|
|
|
7325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7326
|
-
var
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
6944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
6945
|
+
var WEIGHTS = {
|
|
6946
|
+
bot: 3,
|
|
6947
|
+
scam: 3,
|
|
6948
|
+
fake: 3,
|
|
6949
|
+
deleted: 1,
|
|
6950
|
+
no_photo: 1,
|
|
6951
|
+
no_username: 1,
|
|
6952
|
+
odd_name: 1,
|
|
6953
|
+
never_wrote: 1,
|
|
6954
|
+
link_first: 2,
|
|
6955
|
+
burst_join: 1,
|
|
6956
|
+
mass_invited: 1,
|
|
6957
|
+
new_account: 2,
|
|
6958
|
+
no_bio: 1,
|
|
6959
|
+
same_text: 2,
|
|
6960
|
+
photo_recent: 1,
|
|
6961
|
+
cas_banned: 3,
|
|
6962
|
+
lols_banned: 3,
|
|
6963
|
+
lols_scammer: 3
|
|
6964
|
+
};
|
|
6965
|
+
var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
6966
|
+
var DIGITS = /\d{5,}/;
|
|
6967
|
+
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
6968
|
+
|
|
6969
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
6970
|
+
var linkedIdentity = strictObject({
|
|
6971
|
+
provider: text,
|
|
6972
|
+
id,
|
|
6973
|
+
name: nullable(text),
|
|
6974
|
+
username: nullable(text),
|
|
6975
|
+
phone: optional(nullable(text)),
|
|
6976
|
+
email: optional(nullable(text)),
|
|
6977
|
+
is_bot: nullable(boolean()),
|
|
6978
|
+
accounts: array(id),
|
|
6979
|
+
seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
|
|
6980
|
+
method: text,
|
|
6981
|
+
linked_by: text,
|
|
6982
|
+
linked_at: time
|
|
6983
|
+
});
|
|
6984
|
+
var linkedPerson = strictObject({
|
|
6985
|
+
uid: id,
|
|
6986
|
+
name: nullable(text),
|
|
6987
|
+
identities: array(linkedIdentity),
|
|
6988
|
+
/** An agent's link: the `identity_link` proposal the owner decides; the person is still as it was. */
|
|
6989
|
+
proposal: optional(text)
|
|
6990
|
+
});
|
|
6991
|
+
var contactActivity = strictObject({
|
|
6992
|
+
at: time,
|
|
6993
|
+
subject: text,
|
|
6994
|
+
subject_id: count,
|
|
6995
|
+
role: text,
|
|
6996
|
+
scope: text,
|
|
6997
|
+
provider: nullable(text),
|
|
6998
|
+
account: nullable(text),
|
|
6999
|
+
chat_id: nullable(text),
|
|
7000
|
+
locator: nullable(text),
|
|
7001
|
+
project_id: nullable(count)
|
|
7002
|
+
});
|
|
7003
|
+
var botReason = picklist(Object.keys(WEIGHTS));
|
|
7004
|
+
var contactCheck = strictObject({
|
|
7005
|
+
person: strictObject({ id, name: nullable(text), username: nullable(text), provider: text }),
|
|
7006
|
+
score: count,
|
|
7007
|
+
reasons: array(strictObject({ reason: botReason, weight: count, source: text, detail: optional(text) })),
|
|
7008
|
+
registries: array(strictObject({
|
|
7009
|
+
name: picklist(["cas", "lols"]),
|
|
7010
|
+
answer: picklist(["listed", "clean", "unknown"]),
|
|
7011
|
+
checked_at: time,
|
|
7012
|
+
detail: optional(text),
|
|
7013
|
+
reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
|
|
7014
|
+
})),
|
|
7015
|
+
unknown: array(botReason),
|
|
7016
|
+
checked_at: time
|
|
7338
7017
|
});
|
|
7339
7018
|
|
|
7340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/member.js
|
|
7341
7020
|
var member = strictObject({
|
|
7342
7021
|
id,
|
|
7343
7022
|
name: nullable(text),
|
|
@@ -7360,7 +7039,7 @@ var member = strictObject({
|
|
|
7360
7039
|
check: optional(record(string(), unknown()))
|
|
7361
7040
|
});
|
|
7362
7041
|
|
|
7363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat.js
|
|
7364
7043
|
var setting = optional(nullable(boolean()));
|
|
7365
7044
|
var chat = strictObject({
|
|
7366
7045
|
ref: reference,
|
|
@@ -7401,758 +7080,976 @@ var chat = strictObject({
|
|
|
7401
7080
|
members: optional(array(member))
|
|
7402
7081
|
});
|
|
7403
7082
|
|
|
7404
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7405
|
-
var
|
|
7083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message.js
|
|
7084
|
+
var quoted = strictObject({
|
|
7406
7085
|
id,
|
|
7407
|
-
|
|
7408
|
-
|
|
7086
|
+
sender_id: nullable(id),
|
|
7087
|
+
sender_name: nullable(text),
|
|
7088
|
+
timestamp: nullable(time),
|
|
7089
|
+
text,
|
|
7090
|
+
attachments: array(attachment),
|
|
7091
|
+
outgoing: nullable(boolean())
|
|
7409
7092
|
});
|
|
7410
|
-
var
|
|
7093
|
+
var mailPerson = strictObject({ name: nullable(text), address: text, ref: nullable(reference) });
|
|
7094
|
+
var message = strictObject({
|
|
7095
|
+
/** The message's locator. */
|
|
7096
|
+
ref: reference,
|
|
7411
7097
|
id,
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
|
|
7429
|
-
|
|
7430
|
-
/**
|
|
7431
|
-
|
|
7432
|
-
/** `
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7436
|
-
|
|
7437
|
-
|
|
7438
|
-
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7098
|
+
provider: optional(text),
|
|
7099
|
+
account: optional(text),
|
|
7100
|
+
chat_id: id,
|
|
7101
|
+
chat_title: optional(nullable(text)),
|
|
7102
|
+
sender_id: nullable(id),
|
|
7103
|
+
sender_name: nullable(text),
|
|
7104
|
+
sender_username: optional(text),
|
|
7105
|
+
sender_is_chat: optional(boolean()),
|
|
7106
|
+
sender_is_me: boolean(),
|
|
7107
|
+
mentions: optional(array(id)),
|
|
7108
|
+
/** When it was sent. */
|
|
7109
|
+
timestamp: time,
|
|
7110
|
+
edited_at: nullable(time),
|
|
7111
|
+
text,
|
|
7112
|
+
/** What a voice message says, once heard. */
|
|
7113
|
+
transcript: optional(text),
|
|
7114
|
+
/** In a window of messages around one, the one asked for. */
|
|
7115
|
+
anchor: optional(boolean()),
|
|
7116
|
+
/** A stretch of the text, transcript, file name or file text around what a search matched. */
|
|
7117
|
+
excerpt: optional(text),
|
|
7118
|
+
/** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
|
|
7119
|
+
matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
|
|
7120
|
+
score: optional(number()),
|
|
7121
|
+
/**
|
|
7122
|
+
* `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
|
|
7123
|
+
* listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
|
|
7124
|
+
*/
|
|
7125
|
+
match: optional(picklist(["words", "beginnings", "corrected"])),
|
|
7126
|
+
corrections: optional(array(strictObject({ from: text, to: array(text) }))),
|
|
7127
|
+
/** Where a search found it: the local archive, the messenger's server, or both. */
|
|
7128
|
+
found_in: optional(picklist(["archive", "server", "both"])),
|
|
7129
|
+
/** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
|
|
7130
|
+
discovery: optional(strictObject({
|
|
7131
|
+
coverage: number(),
|
|
7132
|
+
matched_terms: array(text),
|
|
7133
|
+
missing_terms: array(text),
|
|
7134
|
+
parent: optional(reference),
|
|
7135
|
+
/** Present when meaning was searched too: which of the two lists found it. */
|
|
7136
|
+
found_by: optional(array(picklist(["words", "meaning"]))),
|
|
7137
|
+
/** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
|
|
7138
|
+
reranker_score: optional(number())
|
|
7139
|
+
})),
|
|
7140
|
+
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
7141
|
+
context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
|
|
7142
|
+
/**
|
|
7143
|
+
* A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
|
|
7144
|
+
* one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
|
|
7145
|
+
*/
|
|
7146
|
+
follow_ups: optional(array(strictObject({
|
|
7147
|
+
ref: reference,
|
|
7148
|
+
chat_title: nullable(text),
|
|
7149
|
+
timestamp: time,
|
|
7150
|
+
sender_name: nullable(text),
|
|
7151
|
+
excerpt: text
|
|
7152
|
+
}))),
|
|
7153
|
+
outgoing: nullable(boolean()),
|
|
7154
|
+
attachments: array(attachment),
|
|
7155
|
+
reply_to: nullable(quoted),
|
|
7156
|
+
/** The id a reply answers, also when the provider sent no copy of that message. */
|
|
7157
|
+
reply_to_id: optional(id),
|
|
7158
|
+
forwarded_from: nullable(quoted),
|
|
7159
|
+
thread_id: optional(id),
|
|
7160
|
+
thread_root_id: optional(id),
|
|
7161
|
+
reactions: optional(nullable(strictObject({
|
|
7162
|
+
counts: array(strictObject({ reaction: text, count })),
|
|
7163
|
+
mine: nullable(text),
|
|
7164
|
+
total: count
|
|
7165
|
+
}))),
|
|
7166
|
+
scheduled_for: optional(time),
|
|
7167
|
+
/** The owner starred it; only where the messenger has stars, and only when set. */
|
|
7168
|
+
starred: optional(literal(true)),
|
|
7169
|
+
/** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
|
|
7170
|
+
delivery: optional(picklist(["delivered", "read"])),
|
|
7171
|
+
email: optional(strictObject({
|
|
7172
|
+
subject: nullable(text),
|
|
7173
|
+
from: nullable(mailPerson),
|
|
7174
|
+
to: array(mailPerson),
|
|
7175
|
+
cc: array(mailPerson),
|
|
7176
|
+
bcc: array(mailPerson),
|
|
7177
|
+
/** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
|
|
7178
|
+
reply_addresses: array(mailPerson),
|
|
7179
|
+
labels: array(text),
|
|
7180
|
+
/** The thread as a `chat:` reference. */
|
|
7181
|
+
thread: reference,
|
|
7182
|
+
read: nullable(boolean()),
|
|
7183
|
+
flagged: nullable(boolean()),
|
|
7184
|
+
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
7185
|
+
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
7186
|
+
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
7187
|
+
bulk: optional(boolean()),
|
|
7188
|
+
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
7189
|
+
list_id: optional(nullable(text)),
|
|
7190
|
+
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
7191
|
+
rule_id: optional(nullable(number())),
|
|
7192
|
+
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
7193
|
+
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
7194
|
+
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
7195
|
+
new_sender: optional(boolean()),
|
|
7196
|
+
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
7197
|
+
sender_identities: optional(number())
|
|
7198
|
+
})),
|
|
7199
|
+
provider_metadata: providerMetadata
|
|
7473
7200
|
});
|
|
7474
|
-
|
|
7201
|
+
|
|
7202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
|
|
7203
|
+
var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7204
|
+
var contextMessage = strictObject({
|
|
7205
|
+
locator: reference,
|
|
7206
|
+
provider: text,
|
|
7207
|
+
account: id,
|
|
7208
|
+
chat_id: id,
|
|
7209
|
+
chat_title: nullable(text),
|
|
7475
7210
|
id,
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7211
|
+
timestamp: time,
|
|
7212
|
+
sender_id: nullable(id),
|
|
7213
|
+
sender_name: nullable(text),
|
|
7214
|
+
outgoing: nullable(boolean()),
|
|
7215
|
+
text
|
|
7480
7216
|
});
|
|
7481
|
-
var
|
|
7482
|
-
|
|
7217
|
+
var sharedChat = strictObject({
|
|
7218
|
+
provider: text,
|
|
7219
|
+
account: id,
|
|
7483
7220
|
chat_id: id,
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7221
|
+
title: nullable(text),
|
|
7222
|
+
kind: chat.entries.kind,
|
|
7223
|
+
last_message_at: nullable(time)
|
|
7224
|
+
});
|
|
7225
|
+
var contextEvent = strictObject({
|
|
7226
|
+
ref: reference,
|
|
7227
|
+
title: nullable(text),
|
|
7228
|
+
starts_at: nullable(time),
|
|
7229
|
+
ends_at: nullable(time),
|
|
7230
|
+
all_day: boolean(),
|
|
7231
|
+
location: nullable(text),
|
|
7232
|
+
status: nullable(text)
|
|
7233
|
+
});
|
|
7234
|
+
var context = strictObject({
|
|
7235
|
+
person: contextPerson,
|
|
7236
|
+
/** The accounts read: only those of the scopes the caller may read. */
|
|
7237
|
+
accounts: array(strictObject({ provider: text, account: id, scope: picklist(["personal", "work"]) })),
|
|
7238
|
+
shared: array(sharedChat),
|
|
7239
|
+
last: strictObject({
|
|
7240
|
+
from_them: nullable(contextMessage),
|
|
7241
|
+
from_me: nullable(contextMessage),
|
|
7242
|
+
from_them_anywhere: nullable(contextMessage)
|
|
7243
|
+
}),
|
|
7244
|
+
recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
|
|
7245
|
+
mentions: array(contextMessage),
|
|
7246
|
+
/** Calendar events they are invited to, one occurrence per series. */
|
|
7247
|
+
events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
|
|
7248
|
+
limits: strictObject({ messages: count, bytes: count }),
|
|
7489
7249
|
complete: boolean(),
|
|
7490
|
-
|
|
7491
|
-
|
|
7250
|
+
not_read: array(strictObject({
|
|
7251
|
+
provider: text,
|
|
7252
|
+
account: id,
|
|
7253
|
+
chat_id: id,
|
|
7254
|
+
title: nullable(text),
|
|
7255
|
+
reason: picklist(["not_fetched", "partial"])
|
|
7256
|
+
}))
|
|
7492
7257
|
});
|
|
7493
|
-
var
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
...omit(inviteLink, ["pending_count", "joined_count"]).entries,
|
|
7501
|
-
pending: optional(count),
|
|
7502
|
-
joined: optional(count)
|
|
7258
|
+
var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
|
|
7259
|
+
var identifiedMessage = strictObject({
|
|
7260
|
+
...shortMessage.entries,
|
|
7261
|
+
id,
|
|
7262
|
+
locator: reference,
|
|
7263
|
+
sender_id: nullable(id),
|
|
7264
|
+
reply_to: nullable(id)
|
|
7503
7265
|
});
|
|
7504
|
-
var
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
])
|
|
7508
|
-
|
|
7509
|
-
...operated,
|
|
7510
|
-
person_id: id,
|
|
7511
|
-
rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
|
|
7266
|
+
var counterObservation = strictObject({
|
|
7267
|
+
value: number(),
|
|
7268
|
+
observed_at: time,
|
|
7269
|
+
source: picklist(["remote_fetch", "remote_update"]),
|
|
7270
|
+
reactions: optional(message.entries.reactions.wrapped.wrapped)
|
|
7512
7271
|
});
|
|
7513
|
-
var
|
|
7514
|
-
|
|
7515
|
-
|
|
7272
|
+
var { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
|
|
7273
|
+
var fullMessage = strictObject({
|
|
7274
|
+
...pick(message, [
|
|
7275
|
+
"id",
|
|
7276
|
+
"chat_id",
|
|
7277
|
+
"chat_title",
|
|
7278
|
+
"excerpt",
|
|
7279
|
+
"sender_id",
|
|
7280
|
+
"sender_name",
|
|
7281
|
+
"sender_username",
|
|
7282
|
+
"mentions",
|
|
7283
|
+
"sender_is_chat",
|
|
7284
|
+
"timestamp",
|
|
7285
|
+
"edited_at",
|
|
7286
|
+
"text",
|
|
7287
|
+
"outgoing",
|
|
7288
|
+
"attachments",
|
|
7289
|
+
"reply_to",
|
|
7290
|
+
"reply_to_id",
|
|
7291
|
+
"forwarded_from",
|
|
7292
|
+
"thread_id",
|
|
7293
|
+
"thread_root_id",
|
|
7294
|
+
"scheduled_for",
|
|
7295
|
+
"provider_metadata",
|
|
7296
|
+
"delivery"
|
|
7297
|
+
]).entries,
|
|
7298
|
+
reactions: nullable(message.entries.reactions.wrapped.wrapped),
|
|
7299
|
+
starred: optional(boolean()),
|
|
7300
|
+
email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
|
|
7301
|
+
counter_observations: optional(partial(strictObject({
|
|
7302
|
+
views: counterObservation,
|
|
7303
|
+
reactions: counterObservation,
|
|
7304
|
+
comments: counterObservation
|
|
7305
|
+
}))),
|
|
7306
|
+
...shortMessage.entries,
|
|
7307
|
+
locator: reference
|
|
7516
7308
|
});
|
|
7517
|
-
var
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7309
|
+
var contactMessages = strictObject({
|
|
7310
|
+
person: strictObject({ uid: id, provider: text, id, name: nullable(text) }),
|
|
7311
|
+
chats: array(strictObject({
|
|
7312
|
+
chat: pick(chat, ["id", "title", "kind"]),
|
|
7313
|
+
messages: array(union([shortMessage, identifiedMessage, fullMessage])),
|
|
7314
|
+
complete: boolean(),
|
|
7315
|
+
more: boolean()
|
|
7316
|
+
})),
|
|
7317
|
+
limits: strictObject({ messages: count })
|
|
7521
7318
|
});
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
...operated2,
|
|
7528
|
-
muted_until: nullable(union([time, literal("forever")]))
|
|
7319
|
+
var contactContext = union([context, contactMessages]);
|
|
7320
|
+
var coverage = strictObject({
|
|
7321
|
+
included: count,
|
|
7322
|
+
has_more: boolean(),
|
|
7323
|
+
cut_by: nullable(picklist(["limit", "bytes"]))
|
|
7529
7324
|
});
|
|
7530
|
-
var
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7325
|
+
var meetingCue = strictObject({
|
|
7326
|
+
reference,
|
|
7327
|
+
fingerprint: text,
|
|
7328
|
+
transcript_id: count,
|
|
7329
|
+
content_hash: nullable(text),
|
|
7330
|
+
position: count,
|
|
7331
|
+
start_ms: count,
|
|
7332
|
+
end_ms: count,
|
|
7333
|
+
speaker_participant_id: nullable(count),
|
|
7334
|
+
speaker_name: nullable(text),
|
|
7335
|
+
text,
|
|
7336
|
+
revision: picklist(["current", "superseded"])
|
|
7337
|
+
});
|
|
7338
|
+
var scopes2 = array(picklist(["personal", "work"]));
|
|
7339
|
+
var contactPreparation = strictObject({
|
|
7340
|
+
...context.entries,
|
|
7341
|
+
prepare: strictObject({
|
|
7342
|
+
waiting: array(strictObject({
|
|
7343
|
+
provider: text,
|
|
7344
|
+
account: id,
|
|
7345
|
+
chat_id: id,
|
|
7346
|
+
title: nullable(text),
|
|
7347
|
+
message: contextMessage,
|
|
7348
|
+
partial: boolean()
|
|
7349
|
+
})),
|
|
7350
|
+
tasks: array(strictObject({
|
|
7351
|
+
ref: reference,
|
|
7352
|
+
title: text,
|
|
7353
|
+
role: text,
|
|
7354
|
+
due_at: nullable(time),
|
|
7355
|
+
project: reference,
|
|
7356
|
+
source: nullable(reference),
|
|
7357
|
+
created_at: time
|
|
7358
|
+
})),
|
|
7359
|
+
facts: array(strictObject({
|
|
7360
|
+
ref: reference,
|
|
7361
|
+
type: text,
|
|
7362
|
+
statement: text,
|
|
7363
|
+
subject: nullable(reference),
|
|
7364
|
+
project: nullable(reference),
|
|
7365
|
+
updated_at: time
|
|
7366
|
+
})),
|
|
7367
|
+
notes: array(strictObject({ ref: reference, title: nullable(text), text, revision: count, updated_at: time })),
|
|
7368
|
+
meetings: array(strictObject({
|
|
7369
|
+
reference,
|
|
7370
|
+
cues: array(meetingCue),
|
|
7371
|
+
cue_coverage: strictObject({ included: count, omitted: nullable(count), has_more: boolean() })
|
|
7372
|
+
})),
|
|
7373
|
+
limits: strictObject({ items: count, bytes: count }),
|
|
7374
|
+
coverage: strictObject({
|
|
7375
|
+
waiting: strictObject({
|
|
7376
|
+
...coverage.entries,
|
|
7377
|
+
rule: literal("their message is the newest the store holds in a one-to-one chat")
|
|
7378
|
+
}),
|
|
7379
|
+
tasks: strictObject({
|
|
7380
|
+
...coverage.entries,
|
|
7381
|
+
selection: literal("open, assigned to them in any role"),
|
|
7382
|
+
accounts: array(text),
|
|
7383
|
+
scopes: scopes2
|
|
7384
|
+
}),
|
|
7385
|
+
facts: strictObject({
|
|
7386
|
+
...coverage.entries,
|
|
7387
|
+
selection: literal("accepted, about them or a project they are a member of"),
|
|
7388
|
+
scopes: scopes2
|
|
7389
|
+
}),
|
|
7390
|
+
notes: strictObject({
|
|
7391
|
+
...coverage.entries,
|
|
7392
|
+
selection: literal("written by you, about them"),
|
|
7393
|
+
scopes: scopes2,
|
|
7394
|
+
withheld: optional(literal("contacts.notes.list"))
|
|
7395
|
+
}),
|
|
7396
|
+
meetings: strictObject({
|
|
7397
|
+
...coverage.entries,
|
|
7398
|
+
read: literal("every account of the store that saw them"),
|
|
7399
|
+
accounts: array(text),
|
|
7400
|
+
pending: count
|
|
7401
|
+
})
|
|
7402
|
+
})
|
|
7403
|
+
})
|
|
7549
7404
|
});
|
|
7550
7405
|
|
|
7551
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7552
|
-
var
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/deal.js
|
|
7407
|
+
var nullableText = nullable(text);
|
|
7408
|
+
var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
|
|
7409
|
+
var outcome = picklist(["open", "won", "lost"]);
|
|
7410
|
+
var crmAccount = nullable(strictObject({ provider: text, account: text }));
|
|
7411
|
+
var day = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
7412
|
+
var deal = strictObject({
|
|
7413
|
+
id,
|
|
7414
|
+
ref: reference,
|
|
7415
|
+
kind: picklist(["deal", "lead"]),
|
|
7416
|
+
title: text,
|
|
7417
|
+
/** One line with the stage, amount and status. */
|
|
7418
|
+
summary: text,
|
|
7419
|
+
pipeline: reference,
|
|
7420
|
+
pipeline_name: text,
|
|
7421
|
+
stage: text,
|
|
7422
|
+
/** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
|
|
7423
|
+
base_stage: nullable(strictObject({ ref: reference, name: text })),
|
|
7424
|
+
status: outcome,
|
|
7425
|
+
organization: nullable(party),
|
|
7426
|
+
currency: nullableText,
|
|
7427
|
+
amount: nullableText,
|
|
7428
|
+
close_date: day,
|
|
7429
|
+
closed_date: day,
|
|
7430
|
+
closed_reason: nullableText,
|
|
7431
|
+
rank: nullable(number()),
|
|
7432
|
+
/** A lead's deal, once it became one. */
|
|
7433
|
+
deal: nullable(reference),
|
|
7434
|
+
/** The CRM account it is a copy from; `null` for the owner's own. */
|
|
7435
|
+
account: crmAccount,
|
|
7436
|
+
external_id: nullableText,
|
|
7437
|
+
/** A CRM copy's assignee, the identity `<account>/user/<id>`. */
|
|
7438
|
+
assignee: nullableText,
|
|
7439
|
+
/** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
|
|
7440
|
+
provider_metadata: record(string(), strictObject({
|
|
7441
|
+
label: nullable(string()),
|
|
7442
|
+
value: unknown(),
|
|
7443
|
+
option_id: optional(union([string(), array(string())]))
|
|
7444
|
+
})),
|
|
7445
|
+
people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
|
|
7446
|
+
author: strictObject({
|
|
7447
|
+
type: picklist(["person", "bot"]),
|
|
7448
|
+
id,
|
|
7449
|
+
name: nullableText,
|
|
7450
|
+
kind: nullable(picklist(["agent", "rule"]))
|
|
7451
|
+
}),
|
|
7452
|
+
model: nullableText,
|
|
7453
|
+
source: text,
|
|
7454
|
+
reason: nullableText,
|
|
7455
|
+
evidence: array(reference),
|
|
7456
|
+
project: nullable(reference),
|
|
7457
|
+
project_name: nullableText,
|
|
7458
|
+
created_at: time,
|
|
7459
|
+
updated_at: time,
|
|
7460
|
+
untrusted
|
|
7558
7461
|
});
|
|
7559
|
-
var
|
|
7560
|
-
var
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7462
|
+
var lead = deal;
|
|
7463
|
+
var pipelineStage = strictObject({
|
|
7464
|
+
name: text,
|
|
7465
|
+
position: count,
|
|
7466
|
+
outcome,
|
|
7467
|
+
external_id: nullableText,
|
|
7468
|
+
/** Open deals or leads in it now. */
|
|
7469
|
+
open: count,
|
|
7470
|
+
/** With a funnel: rows that got this far, and the share of them that reached the next stage. */
|
|
7471
|
+
reached: optional(count),
|
|
7472
|
+
conversion: optional(nullable(number())),
|
|
7473
|
+
/** With a funnel: rows standing in it now, and their sum per currency, never converted. */
|
|
7474
|
+
items: optional(count),
|
|
7475
|
+
amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
|
|
7564
7476
|
});
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
blocked: array(id),
|
|
7578
|
-
blocked_names: array(text),
|
|
7579
|
-
links: action,
|
|
7580
|
-
invites: action,
|
|
7581
|
-
forwards: action,
|
|
7582
|
-
blocked_people: action,
|
|
7583
|
-
flood: strictObject({ messages: count, minutes: count, action }),
|
|
7584
|
-
new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
|
|
7585
|
-
consent: strictObject({ delete: level, remove: level })
|
|
7586
|
-
})
|
|
7477
|
+
var pipeline = strictObject({
|
|
7478
|
+
id,
|
|
7479
|
+
ref: reference,
|
|
7480
|
+
name: text,
|
|
7481
|
+
kind: picklist(["deal", "lead"]),
|
|
7482
|
+
account: crmAccount,
|
|
7483
|
+
external_id: nullableText,
|
|
7484
|
+
stages: array(pipelineStage),
|
|
7485
|
+
created_at: time,
|
|
7486
|
+
totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
|
|
7487
|
+
since: optional(day),
|
|
7488
|
+
untrusted
|
|
7587
7489
|
});
|
|
7588
|
-
var
|
|
7589
|
-
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
person_name: nullable(text),
|
|
7595
|
-
message_id: optional(id),
|
|
7596
|
-
action,
|
|
7597
|
-
outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
|
|
7598
|
-
reason: optional(text),
|
|
7599
|
-
command: optional(text)
|
|
7600
|
-
}))
|
|
7490
|
+
var stage = strictObject({
|
|
7491
|
+
...pipelineStage.entries,
|
|
7492
|
+
pipeline: reference,
|
|
7493
|
+
pipeline_name: text,
|
|
7494
|
+
kind: picklist(["deal", "lead"]),
|
|
7495
|
+
untrusted
|
|
7601
7496
|
});
|
|
7602
7497
|
|
|
7603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7604
|
-
var
|
|
7605
|
-
var
|
|
7606
|
-
var
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
/**
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/business-context.js
|
|
7499
|
+
var nullableText2 = nullable(text);
|
|
7500
|
+
var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
7501
|
+
var standing = picklist(STANDINGS);
|
|
7502
|
+
var categories = array(picklist(CATEGORIES));
|
|
7503
|
+
var section = /* @__PURE__ */ __name((item) => strictObject({ items: array(item), total: count, has_more: boolean(), next: nullableText2 }), "section");
|
|
7504
|
+
var relationRole = strictObject({
|
|
7505
|
+
/** `link:<id>`; absent for a proposal. */
|
|
7506
|
+
link: optional(reference),
|
|
7507
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
7508
|
+
proposal: optional(text),
|
|
7509
|
+
kind: picklist(RELATION_KINDS),
|
|
7510
|
+
role: nullableText2,
|
|
7511
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
7512
|
+
standing,
|
|
7513
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
7514
|
+
account: optional(text),
|
|
7515
|
+
/** A job title the source gave; never a role. */
|
|
7516
|
+
position: optional(text),
|
|
7517
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
7518
|
+
derived: optional(text),
|
|
7519
|
+
starts_at: optional(time),
|
|
7520
|
+
ends_at: optional(time)
|
|
7521
|
+
});
|
|
7522
|
+
var related = strictObject({ ref: reference, name: nullableText2, roles: array(relationRole) });
|
|
7523
|
+
var coverage2 = strictObject({
|
|
7524
|
+
/** `<provider>:<account>` of every account read. */
|
|
7525
|
+
accounts: array(text),
|
|
7526
|
+
not_read: array(strictObject({ source: text, reason: text }))
|
|
7527
|
+
});
|
|
7528
|
+
var linkedBy = array(picklist(["project", "counterparty"]));
|
|
7529
|
+
var financeTotal = strictObject({
|
|
7530
|
+
status: text,
|
|
7531
|
+
currency: text,
|
|
7532
|
+
rows: count,
|
|
7533
|
+
total: text,
|
|
7534
|
+
open: optional(text)
|
|
7535
|
+
});
|
|
7536
|
+
var money = strictObject({
|
|
7537
|
+
invoices: section(strictObject({
|
|
7628
7538
|
ref: reference,
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7539
|
+
title: text,
|
|
7540
|
+
direction: picklist(INVOICE_DIRECTIONS),
|
|
7541
|
+
status: picklist(INVOICE_STATUSES),
|
|
7542
|
+
review: picklist(FINANCE_REVIEWS),
|
|
7543
|
+
currency: text,
|
|
7544
|
+
total: text,
|
|
7545
|
+
open: text,
|
|
7546
|
+
due_date: day2,
|
|
7547
|
+
linked_by: linkedBy
|
|
7634
7548
|
})),
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
joined: count,
|
|
7645
|
-
left: count,
|
|
7646
|
-
net: number(),
|
|
7647
|
-
wrote: count,
|
|
7648
|
-
median_minutes_to_first_message: minutes,
|
|
7649
|
-
/** The messenger stopped reading its history before `since`: the counts are lower bounds. */
|
|
7650
|
-
more: boolean()
|
|
7549
|
+
payments: section(strictObject({
|
|
7550
|
+
ref: reference,
|
|
7551
|
+
title: text,
|
|
7552
|
+
direction: picklist(MONEY_DIRECTIONS),
|
|
7553
|
+
review: picklist(FINANCE_REVIEWS),
|
|
7554
|
+
currency: text,
|
|
7555
|
+
amount: text,
|
|
7556
|
+
date: day2,
|
|
7557
|
+
linked_by: linkedBy
|
|
7651
7558
|
})),
|
|
7652
|
-
|
|
7559
|
+
orders: optional(section(strictObject({
|
|
7560
|
+
ref: reference,
|
|
7561
|
+
title: text,
|
|
7562
|
+
status: picklist(ORDER_STATUSES),
|
|
7563
|
+
review: picklist(FINANCE_REVIEWS),
|
|
7564
|
+
currency: nullableText2,
|
|
7565
|
+
total: nullableText2,
|
|
7566
|
+
side: picklist(["customer", "supplier"])
|
|
7567
|
+
}))),
|
|
7568
|
+
/** Confirmed rows only, per status (payments: direction) and currency; nothing converted. */
|
|
7569
|
+
totals: strictObject({ invoices: array(financeTotal), payments: array(financeTotal) }),
|
|
7570
|
+
/** Invoices and payments still proposed, of every row read. */
|
|
7571
|
+
unconfirmed: count,
|
|
7572
|
+
/** `false` when a read stopped at the store's page: the totals may leave rows out. */
|
|
7573
|
+
complete: boolean()
|
|
7653
7574
|
});
|
|
7654
|
-
var
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7575
|
+
var taskLine = strictObject({
|
|
7576
|
+
ref: reference,
|
|
7577
|
+
key: text,
|
|
7578
|
+
title: text,
|
|
7579
|
+
status: picklist(TASK_STATES),
|
|
7580
|
+
project: reference,
|
|
7581
|
+
due_at: nullable(time)
|
|
7582
|
+
});
|
|
7583
|
+
var counts = { messages: count, mail: count, meetings: count };
|
|
7584
|
+
var personBusiness = strictObject({
|
|
7585
|
+
organizations: section(strictObject({ ...related.entries, categories })),
|
|
7586
|
+
reports_to: section(related),
|
|
7587
|
+
direct_reports: section(related),
|
|
7588
|
+
deals: section(related),
|
|
7589
|
+
projects: section(related),
|
|
7590
|
+
categories
|
|
7591
|
+
});
|
|
7592
|
+
var personContext = strictObject({
|
|
7593
|
+
...context.entries,
|
|
7594
|
+
person: linkedPerson,
|
|
7595
|
+
has_more: boolean(),
|
|
7596
|
+
business: personBusiness,
|
|
7597
|
+
coverage: coverage2
|
|
7598
|
+
});
|
|
7599
|
+
var organizationContext = strictObject({
|
|
7600
|
+
organization: strictObject({ ...organization.entries, own: boolean() }),
|
|
7601
|
+
categories,
|
|
7602
|
+
people: section(related),
|
|
7603
|
+
customers: section(related),
|
|
7604
|
+
/** Whom it is a customer of: "supplier of", read backwards. */
|
|
7605
|
+
suppliers: section(related),
|
|
7606
|
+
partners: section(related),
|
|
7607
|
+
projects: section(strictObject({ ref: reference, name: text, via: array(picklist(["organization", "deal"])) })),
|
|
7608
|
+
deals: section(strictObject({
|
|
7609
|
+
ref: reference,
|
|
7610
|
+
kind: picklist(DEAL_KINDS),
|
|
7611
|
+
title: text,
|
|
7612
|
+
summary: text,
|
|
7613
|
+
stage: text,
|
|
7614
|
+
status: picklist(DEAL_STATUSES),
|
|
7615
|
+
currency: nullableText2,
|
|
7616
|
+
amount: nullableText2,
|
|
7617
|
+
close_date: day2,
|
|
7618
|
+
project: nullable(reference)
|
|
7619
|
+
})),
|
|
7620
|
+
money,
|
|
7621
|
+
/** Counts only, through its own people, in the accounts read. */
|
|
7622
|
+
communications: strictObject({ ...counts, has_more: boolean() }),
|
|
7623
|
+
tasks: section(taskLine),
|
|
7624
|
+
coverage: coverage2
|
|
7625
|
+
});
|
|
7626
|
+
var { untrusted: _, ...dealRow } = deal.entries;
|
|
7627
|
+
var dealContext = strictObject({
|
|
7628
|
+
deal: strictObject(dealRow),
|
|
7629
|
+
stages: section(strictObject({ from: nullableText2, to: text, pipeline: reference, at: time })),
|
|
7630
|
+
organization: nullable(strictObject({ ref: reference, name: nullableText2, categories })),
|
|
7631
|
+
participants: section(related),
|
|
7632
|
+
owner: nullable(related),
|
|
7633
|
+
project: nullable(strictObject({ ref: reference, name: nullableText2 })),
|
|
7634
|
+
money,
|
|
7635
|
+
window: strictObject({ since: time, until: time }),
|
|
7636
|
+
/** Shared people within its lifetime: `proposed`, an overlap of people, never a link. */
|
|
7637
|
+
communications: strictObject({
|
|
7638
|
+
...section(strictObject({
|
|
7639
|
+
kind: picklist(["message", "mail", "meeting"]),
|
|
7640
|
+
ref: reference,
|
|
7641
|
+
title: nullableText2,
|
|
7642
|
+
at: nullable(time),
|
|
7643
|
+
people: array(reference),
|
|
7644
|
+
standing: literal("proposed")
|
|
7645
|
+
})).entries,
|
|
7646
|
+
counts: strictObject(counts)
|
|
7647
|
+
}),
|
|
7648
|
+
tasks: section(taskLine),
|
|
7649
|
+
coverage: coverage2
|
|
7675
7650
|
});
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7651
|
+
var dealBrief = strictObject({
|
|
7652
|
+
ref: reference,
|
|
7653
|
+
kind: picklist(DEAL_KINDS),
|
|
7654
|
+
title: text,
|
|
7655
|
+
pipeline: text,
|
|
7656
|
+
stage: text,
|
|
7657
|
+
status: picklist(DEAL_STATUSES),
|
|
7658
|
+
amount: nullableText2,
|
|
7659
|
+
currency: nullableText2,
|
|
7660
|
+
close_date: day2,
|
|
7661
|
+
organization: nullableText2,
|
|
7662
|
+
owner: nullableText2,
|
|
7663
|
+
people: array(strictObject({ ref: reference, name: nullableText2, roles: array(text), standing })),
|
|
7664
|
+
project: nullableText2,
|
|
7665
|
+
stages: array(text),
|
|
7666
|
+
money: strictObject({ ...money.entries.totals.entries, unconfirmed: count, complete: boolean() }),
|
|
7667
|
+
communications: strictObject({ ...counts, standing: literal("proposed") }),
|
|
7668
|
+
open_tasks: count,
|
|
7669
|
+
not_read: coverage2.entries.not_read
|
|
7670
|
+
});
|
|
7671
|
+
|
|
7672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chart.js
|
|
7673
|
+
var chart = strictObject({
|
|
7674
|
+
version: literal(1),
|
|
7675
|
+
kind: picklist(["bar", "line", "grouped-bar"]),
|
|
7676
|
+
title: text,
|
|
7677
|
+
x: strictObject({ type: picklist(["day", "week"]), values: array(text) }),
|
|
7678
|
+
series: array(strictObject({ name: text, values: array(nullable(number())) })),
|
|
7679
|
+
unit: picklist(["messages", "people"]),
|
|
7680
|
+
timezone: text,
|
|
7681
|
+
/** Lower bounds: the store or the events did not hold the whole period. */
|
|
7682
|
+
partial: boolean(),
|
|
7683
|
+
reasons: array(picklist(["store-incomplete", "events-incomplete"])),
|
|
7684
|
+
file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
|
|
7683
7685
|
});
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
+
|
|
7687
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/folder.js
|
|
7688
|
+
var named = strictObject({
|
|
7689
|
+
id,
|
|
7686
7690
|
title: nullable(text),
|
|
7687
|
-
|
|
7688
|
-
last_count: nullable(memberCount)
|
|
7689
|
-
});
|
|
7690
|
-
var trackedChatHistory = strictObject({
|
|
7691
|
-
chat_id: id,
|
|
7692
|
-
tracked_at: nullable(time),
|
|
7693
|
-
counts: array(memberCount)
|
|
7691
|
+
kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
|
|
7694
7692
|
});
|
|
7695
|
-
var
|
|
7696
|
-
|
|
7697
|
-
|
|
7693
|
+
var folder = strictObject({
|
|
7694
|
+
id,
|
|
7695
|
+
title: text,
|
|
7696
|
+
/** Chats added by hand; a folder that selects chats by a rule of its own lists none. */
|
|
7697
|
+
chat_ids: array(id),
|
|
7698
|
+
emoji: optional(text),
|
|
7699
|
+
/** Kinds of chat it takes by itself. */
|
|
7700
|
+
include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
|
|
7701
|
+
skip: optional(array(picklist(["muted", "read", "archived"]))),
|
|
7702
|
+
excluded_chat_ids: optional(array(id)),
|
|
7703
|
+
pinned_chat_ids: optional(array(id)),
|
|
7704
|
+
/** `chats folders show`: the chats in it, pinned and left out, by name. */
|
|
7705
|
+
chats: optional(array(named)),
|
|
7706
|
+
pinned_chats: optional(array(named)),
|
|
7707
|
+
excluded_chats: optional(array(named))
|
|
7698
7708
|
});
|
|
7699
7709
|
|
|
7700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7701
|
-
var
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
support: boolean()
|
|
7716
|
-
})),
|
|
7717
|
-
seen: optional(text),
|
|
7718
|
-
contact: optional(boolean()),
|
|
7719
|
-
mutual_contact: optional(boolean()),
|
|
7720
|
-
common_chats_count: optional(nullable(count)),
|
|
7721
|
-
registered: optional(nullable(strictObject({
|
|
7722
|
-
at: text,
|
|
7723
|
-
source: picklist(["telegram", "max", "estimate"]),
|
|
7724
|
-
precision: picklist(["day", "month"])
|
|
7725
|
-
}))),
|
|
7726
|
-
has_photo: optional(boolean()),
|
|
7727
|
-
/** Earlier names and usernames, oldest first; the current ones are not repeated. */
|
|
7728
|
-
aliases: array(strictObject({
|
|
7729
|
-
name: optional(text),
|
|
7730
|
-
username: optional(text),
|
|
7731
|
-
link: optional(text),
|
|
7732
|
-
first_seen_at: time,
|
|
7733
|
-
last_seen_at: time,
|
|
7734
|
-
source: picklist(["profile", "messages"])
|
|
7735
|
-
}))
|
|
7736
|
-
};
|
|
7710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
|
|
7711
|
+
var inviteLink = strictObject({
|
|
7712
|
+
link: text,
|
|
7713
|
+
/** Who joins by it asks first, and an admin lets them in. */
|
|
7714
|
+
approval: boolean(),
|
|
7715
|
+
/** `null` when it never expires. */
|
|
7716
|
+
expires_at: nullable(time),
|
|
7717
|
+
/** `null` for no limit. */
|
|
7718
|
+
max_uses: nullable(count),
|
|
7719
|
+
/** The group's own link; revoking it makes the messenger issue a new one. */
|
|
7720
|
+
primary: optional(boolean()),
|
|
7721
|
+
revoked: optional(boolean()),
|
|
7722
|
+
pending_count: optional(count),
|
|
7723
|
+
joined_count: optional(count)
|
|
7724
|
+
});
|
|
7737
7725
|
|
|
7738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7739
|
-
var
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
|
|
7727
|
+
var operated = { operation_id: id, chat_id: id };
|
|
7728
|
+
var group = strictObject({
|
|
7729
|
+
...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
|
|
7730
|
+
parent_chat_id: optional(nullable(id)),
|
|
7731
|
+
muted_until: optional(nullable(time)),
|
|
7732
|
+
description: nullable(text),
|
|
7733
|
+
link: nullable(text),
|
|
7734
|
+
settings: strictObject({
|
|
7735
|
+
...unwrap(chat.entries.settings).entries,
|
|
7736
|
+
all_can_pin: nullable(boolean()),
|
|
7737
|
+
only_admins_add: nullable(boolean()),
|
|
7738
|
+
only_admins_call: nullable(boolean()),
|
|
7739
|
+
only_owner_edits_info: nullable(boolean()),
|
|
7740
|
+
members_see_link: nullable(boolean())
|
|
7741
|
+
})
|
|
7742
|
+
});
|
|
7743
|
+
var chatGroupChange = union([
|
|
7744
|
+
strictObject({ operation_id: id, chat: group }),
|
|
7745
|
+
strictObject({ operation_id: id, requested: literal(true) })
|
|
7746
|
+
]);
|
|
7747
|
+
var chatInspection = strictObject({
|
|
7748
|
+
kind: chat.entries.kind,
|
|
7749
|
+
title: nullable(text),
|
|
7750
|
+
id: nullable(id),
|
|
7743
7751
|
username: nullable(text),
|
|
7744
|
-
|
|
7745
|
-
display_name: optional(nullable(text)),
|
|
7746
|
-
/** Whatever they wrote about themselves. */
|
|
7752
|
+
participants_count: nullable(count),
|
|
7747
7753
|
description: nullable(text),
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
/** For a source that knows it, such as a Zoom contact. */
|
|
7751
|
-
email: optional(nullable(text)),
|
|
7752
|
-
phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
|
|
7753
|
-
/** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
|
|
7754
|
-
chats: optional(array(strictObject({
|
|
7755
|
-
...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
|
|
7756
|
-
/** Their messages stored; a floor unless `complete`. */
|
|
7757
|
-
their_messages: optional(count),
|
|
7758
|
-
first_at: optional(nullable(time)),
|
|
7759
|
-
last_at: optional(nullable(time)),
|
|
7760
|
-
/** The store holds the whole chat, so the count is the real one. */
|
|
7761
|
-
complete: optional(boolean())
|
|
7762
|
-
}))),
|
|
7763
|
-
/** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
|
|
7764
|
-
...partial(strictObject(profileFields)).entries,
|
|
7765
|
-
/** `contacts show --with-notes`: the owner's private notes about them. */
|
|
7766
|
-
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
7754
|
+
member: nullable(boolean()),
|
|
7755
|
+
approval_needed: optional(boolean())
|
|
7767
7756
|
});
|
|
7768
|
-
|
|
7769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
7770
|
-
var WEIGHTS = {
|
|
7771
|
-
bot: 3,
|
|
7772
|
-
scam: 3,
|
|
7773
|
-
fake: 3,
|
|
7774
|
-
deleted: 1,
|
|
7775
|
-
no_photo: 1,
|
|
7776
|
-
no_username: 1,
|
|
7777
|
-
odd_name: 1,
|
|
7778
|
-
never_wrote: 1,
|
|
7779
|
-
link_first: 2,
|
|
7780
|
-
burst_join: 1,
|
|
7781
|
-
mass_invited: 1,
|
|
7782
|
-
new_account: 2,
|
|
7783
|
-
no_bio: 1,
|
|
7784
|
-
same_text: 2,
|
|
7785
|
-
photo_recent: 1,
|
|
7786
|
-
cas_banned: 3,
|
|
7787
|
-
lols_banned: 3,
|
|
7788
|
-
lols_scammer: 3
|
|
7789
|
-
};
|
|
7790
|
-
var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
7791
|
-
var DIGITS = /\d{5,}/;
|
|
7792
|
-
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
7793
|
-
|
|
7794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
7795
|
-
var linkedIdentity = strictObject({
|
|
7796
|
-
provider: text,
|
|
7757
|
+
var chatSender = strictObject({
|
|
7797
7758
|
id,
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
|
|
7803
|
-
method: text,
|
|
7804
|
-
linked_by: text,
|
|
7805
|
-
linked_at: time
|
|
7759
|
+
title: text,
|
|
7760
|
+
kind: picklist(["self", "channel", "group"]),
|
|
7761
|
+
premium_required: boolean(),
|
|
7762
|
+
default: boolean()
|
|
7806
7763
|
});
|
|
7807
|
-
var
|
|
7808
|
-
var
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
project_id: nullable(count)
|
|
7764
|
+
var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
|
|
7765
|
+
var chatMembersFetch = strictObject({
|
|
7766
|
+
chat_id: id,
|
|
7767
|
+
joined: array(id),
|
|
7768
|
+
gone: array(id),
|
|
7769
|
+
changed: array(id),
|
|
7770
|
+
read: count,
|
|
7771
|
+
participants: nullable(count),
|
|
7772
|
+
complete: boolean(),
|
|
7773
|
+
more: boolean(),
|
|
7774
|
+
tracked: boolean()
|
|
7819
7775
|
});
|
|
7820
|
-
var
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
|
|
7831
|
-
})),
|
|
7832
|
-
unknown: array(botReason),
|
|
7833
|
-
checked_at: time
|
|
7776
|
+
var chatMembersChange = union([
|
|
7777
|
+
strictObject({ ...operated, added: array(id), not_added: array(id) }),
|
|
7778
|
+
strictObject({ ...operated, removed: array(id) })
|
|
7779
|
+
]);
|
|
7780
|
+
var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
|
|
7781
|
+
var chatInviteChange = strictObject({
|
|
7782
|
+
...operated,
|
|
7783
|
+
...omit(inviteLink, ["pending_count", "joined_count"]).entries,
|
|
7784
|
+
pending: optional(count),
|
|
7785
|
+
joined: optional(count)
|
|
7834
7786
|
});
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
attachments: array(attachment),
|
|
7844
|
-
outgoing: nullable(boolean())
|
|
7787
|
+
var chatRequestChange = union([
|
|
7788
|
+
strictObject({ ...operated, person_id: id, accepted: boolean(), already: boolean() }),
|
|
7789
|
+
strictObject({ chat_id: id, accepted: boolean(), counted: count, operation_id: optional(id) })
|
|
7790
|
+
]);
|
|
7791
|
+
var chatAdminChange = strictObject({
|
|
7792
|
+
...operated,
|
|
7793
|
+
person_id: id,
|
|
7794
|
+
rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
|
|
7845
7795
|
});
|
|
7846
|
-
var
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
chat_title: optional(nullable(text)),
|
|
7855
|
-
sender_id: nullable(id),
|
|
7856
|
-
sender_name: nullable(text),
|
|
7857
|
-
sender_username: optional(text),
|
|
7858
|
-
sender_is_chat: optional(boolean()),
|
|
7859
|
-
sender_is_me: boolean(),
|
|
7860
|
-
mentions: optional(array(id)),
|
|
7861
|
-
/** When it was sent. */
|
|
7862
|
-
timestamp: time,
|
|
7863
|
-
edited_at: nullable(time),
|
|
7864
|
-
text,
|
|
7865
|
-
/** What a voice message says, once heard. */
|
|
7866
|
-
transcript: optional(text),
|
|
7867
|
-
/** In a window of messages around one, the one asked for. */
|
|
7868
|
-
anchor: optional(boolean()),
|
|
7869
|
-
/** A stretch of the text, transcript, file name or file text around what a search matched. */
|
|
7870
|
-
excerpt: optional(text),
|
|
7871
|
-
/** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
|
|
7872
|
-
matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
|
|
7873
|
-
score: optional(number()),
|
|
7874
|
-
/**
|
|
7875
|
-
* `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
|
|
7876
|
-
* listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
|
|
7877
|
-
*/
|
|
7878
|
-
match: optional(picklist(["words", "beginnings", "corrected"])),
|
|
7879
|
-
corrections: optional(array(strictObject({ from: text, to: array(text) }))),
|
|
7880
|
-
/** Where a search found it: the local archive, the messenger's server, or both. */
|
|
7881
|
-
found_in: optional(picklist(["archive", "server", "both"])),
|
|
7882
|
-
/** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
|
|
7883
|
-
discovery: optional(strictObject({
|
|
7884
|
-
coverage: number(),
|
|
7885
|
-
matched_terms: array(text),
|
|
7886
|
-
missing_terms: array(text),
|
|
7887
|
-
parent: optional(reference),
|
|
7888
|
-
/** Present when meaning was searched too: which of the two lists found it. */
|
|
7889
|
-
found_by: optional(array(picklist(["words", "meaning"]))),
|
|
7890
|
-
/** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
|
|
7891
|
-
reranker_score: optional(number())
|
|
7892
|
-
})),
|
|
7893
|
-
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
7894
|
-
context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
|
|
7895
|
-
/**
|
|
7896
|
-
* A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
|
|
7897
|
-
* one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
|
|
7898
|
-
*/
|
|
7899
|
-
follow_ups: optional(array(strictObject({
|
|
7900
|
-
ref: reference,
|
|
7901
|
-
chat_title: nullable(text),
|
|
7902
|
-
timestamp: time,
|
|
7903
|
-
sender_name: nullable(text),
|
|
7904
|
-
excerpt: text
|
|
7905
|
-
}))),
|
|
7906
|
-
outgoing: nullable(boolean()),
|
|
7907
|
-
attachments: array(attachment),
|
|
7908
|
-
reply_to: nullable(quoted),
|
|
7909
|
-
/** The id a reply answers, also when the provider sent no copy of that message. */
|
|
7910
|
-
reply_to_id: optional(id),
|
|
7911
|
-
forwarded_from: nullable(quoted),
|
|
7912
|
-
thread_id: optional(id),
|
|
7913
|
-
thread_root_id: optional(id),
|
|
7914
|
-
reactions: optional(nullable(strictObject({
|
|
7915
|
-
counts: array(strictObject({ reaction: text, count })),
|
|
7916
|
-
mine: nullable(text),
|
|
7917
|
-
total: count
|
|
7918
|
-
}))),
|
|
7919
|
-
scheduled_for: optional(time),
|
|
7920
|
-
/** The owner starred it; only where the messenger has stars, and only when set. */
|
|
7921
|
-
starred: optional(literal(true)),
|
|
7922
|
-
/** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
|
|
7923
|
-
delivery: optional(picklist(["delivered", "read"])),
|
|
7924
|
-
email: optional(strictObject({
|
|
7925
|
-
subject: nullable(text),
|
|
7926
|
-
from: nullable(mailPerson),
|
|
7927
|
-
to: array(mailPerson),
|
|
7928
|
-
cc: array(mailPerson),
|
|
7929
|
-
bcc: array(mailPerson),
|
|
7930
|
-
/** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
|
|
7931
|
-
reply_addresses: array(mailPerson),
|
|
7932
|
-
labels: array(text),
|
|
7933
|
-
/** The thread as a `chat:` reference. */
|
|
7934
|
-
thread: reference,
|
|
7935
|
-
read: nullable(boolean()),
|
|
7936
|
-
flagged: nullable(boolean()),
|
|
7937
|
-
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
7938
|
-
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
7939
|
-
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
7940
|
-
bulk: optional(boolean()),
|
|
7941
|
-
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
7942
|
-
list_id: optional(nullable(text)),
|
|
7943
|
-
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
7944
|
-
rule_id: optional(nullable(number())),
|
|
7945
|
-
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
7946
|
-
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
7947
|
-
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
7948
|
-
new_sender: optional(boolean()),
|
|
7949
|
-
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
7950
|
-
sender_identities: optional(number())
|
|
7951
|
-
})),
|
|
7952
|
-
provider_metadata: providerMetadata
|
|
7796
|
+
var chatFolderChange = strictObject({
|
|
7797
|
+
operation_id: id,
|
|
7798
|
+
folder: omit(folder, ["chats", "pinned_chats", "excluded_chats"])
|
|
7799
|
+
});
|
|
7800
|
+
var chatFolderRemoval = strictObject({ operation_id: id, folder_id: id });
|
|
7801
|
+
var chatFolderOrder = strictObject({
|
|
7802
|
+
operation_id: id,
|
|
7803
|
+
folders: array(strictObject({ id, title: text }))
|
|
7953
7804
|
});
|
|
7954
7805
|
|
|
7955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7956
|
-
var
|
|
7957
|
-
var
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
|
|
7807
|
+
var operated2 = { operation_id: id, chat_id: id };
|
|
7808
|
+
var chatRemoval = strictObject(operated2);
|
|
7809
|
+
var chatMuting = strictObject({
|
|
7810
|
+
...operated2,
|
|
7811
|
+
muted_until: nullable(union([time, literal("forever")]))
|
|
7812
|
+
});
|
|
7813
|
+
var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
7814
|
+
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
7815
|
+
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
7816
|
+
|
|
7817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
|
|
7818
|
+
var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
|
|
7819
|
+
var chatEvent = strictObject({
|
|
7961
7820
|
chat_id: id,
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7821
|
+
time,
|
|
7822
|
+
/** `join`, `leave`, `add`, `remove`, `create`, `title`, `pin`, `profile`; a messenger may pass others through. */
|
|
7823
|
+
type: text,
|
|
7824
|
+
/** The service message that says so, where there is one. */
|
|
7825
|
+
message_id: optional(id),
|
|
7826
|
+
by: optional(who),
|
|
7827
|
+
people: array(who),
|
|
7828
|
+
/** `create` and `title` carry the chat's title. */
|
|
7829
|
+
title: optional(text),
|
|
7830
|
+
/** `profile`: the name and username seen before. */
|
|
7831
|
+
before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
|
|
7969
7832
|
});
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7833
|
+
|
|
7834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
|
|
7835
|
+
var chatMetadata = strictObject({
|
|
7973
7836
|
chat_id: id,
|
|
7974
7837
|
title: nullable(text),
|
|
7975
|
-
|
|
7976
|
-
|
|
7838
|
+
username: nullable(text),
|
|
7839
|
+
description: nullable(text),
|
|
7840
|
+
fetched_at: time
|
|
7977
7841
|
});
|
|
7978
|
-
var
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
all_day: boolean(),
|
|
7984
|
-
location: nullable(text),
|
|
7985
|
-
status: nullable(text)
|
|
7842
|
+
var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
|
|
7843
|
+
var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
|
|
7844
|
+
var chatMetadataRefresh = strictObject({
|
|
7845
|
+
chats: array(union([chatMetadata, failedChatMetadata])),
|
|
7846
|
+
has_more: boolean()
|
|
7986
7847
|
});
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
|
|
7998
|
-
mentions: array(contextMessage),
|
|
7999
|
-
/** Calendar events they are invited to, one occurrence per series. */
|
|
8000
|
-
events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
|
|
8001
|
-
limits: strictObject({ messages: count, bytes: count }),
|
|
8002
|
-
complete: boolean(),
|
|
8003
|
-
not_read: array(strictObject({
|
|
8004
|
-
provider: text,
|
|
8005
|
-
account: id,
|
|
8006
|
-
chat_id: id,
|
|
7848
|
+
|
|
7849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
|
|
7850
|
+
var action = picklist(["report", "delete", "remove"]);
|
|
7851
|
+
var level = picklist(["deny", "readonly", "ask", "allow"]);
|
|
7852
|
+
var chatRules = strictObject({
|
|
7853
|
+
chat_id: id,
|
|
7854
|
+
title: nullable(text),
|
|
7855
|
+
file: text,
|
|
7856
|
+
saved: boolean(),
|
|
7857
|
+
rules: strictObject({
|
|
8007
7858
|
title: nullable(text),
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
})
|
|
8019
|
-
var counterObservation = strictObject({
|
|
8020
|
-
value: number(),
|
|
8021
|
-
observed_at: time,
|
|
8022
|
-
source: picklist(["remote_fetch", "remote_update"]),
|
|
8023
|
-
reactions: optional(message.entries.reactions.wrapped.wrapped)
|
|
7859
|
+
trusted: array(id),
|
|
7860
|
+
blocked: array(id),
|
|
7861
|
+
blocked_names: array(text),
|
|
7862
|
+
links: action,
|
|
7863
|
+
invites: action,
|
|
7864
|
+
forwards: action,
|
|
7865
|
+
blocked_people: action,
|
|
7866
|
+
flood: strictObject({ messages: count, minutes: count, action }),
|
|
7867
|
+
new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
|
|
7868
|
+
consent: strictObject({ delete: level, remove: level })
|
|
7869
|
+
})
|
|
8024
7870
|
});
|
|
8025
|
-
var
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
"
|
|
8029
|
-
"
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
"
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
"edited_at",
|
|
8039
|
-
"text",
|
|
8040
|
-
"outgoing",
|
|
8041
|
-
"attachments",
|
|
8042
|
-
"reply_to",
|
|
8043
|
-
"reply_to_id",
|
|
8044
|
-
"forwarded_from",
|
|
8045
|
-
"thread_id",
|
|
8046
|
-
"thread_root_id",
|
|
8047
|
-
"scheduled_for",
|
|
8048
|
-
"provider_metadata",
|
|
8049
|
-
"delivery"
|
|
8050
|
-
]).entries,
|
|
8051
|
-
reactions: nullable(message.entries.reactions.wrapped.wrapped),
|
|
8052
|
-
starred: optional(boolean()),
|
|
8053
|
-
email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
|
|
8054
|
-
counter_observations: optional(partial(strictObject({
|
|
8055
|
-
views: counterObservation,
|
|
8056
|
-
reactions: counterObservation,
|
|
8057
|
-
comments: counterObservation
|
|
8058
|
-
}))),
|
|
8059
|
-
...shortMessage.entries,
|
|
8060
|
-
locator: reference
|
|
7871
|
+
var chatModeration = strictObject({
|
|
7872
|
+
chat_id: id,
|
|
7873
|
+
rows: array(strictObject({
|
|
7874
|
+
kind: picklist(["message", "member"]),
|
|
7875
|
+
rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
|
|
7876
|
+
person_id: id,
|
|
7877
|
+
person_name: nullable(text),
|
|
7878
|
+
message_id: optional(id),
|
|
7879
|
+
action,
|
|
7880
|
+
outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
|
|
7881
|
+
reason: optional(text),
|
|
7882
|
+
command: optional(text)
|
|
7883
|
+
}))
|
|
8061
7884
|
});
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
7885
|
+
|
|
7886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
|
|
7887
|
+
var optionalCount = optional(count);
|
|
7888
|
+
var minutes = nullable(number());
|
|
7889
|
+
var chatStats = strictObject({
|
|
7890
|
+
chat: reference,
|
|
7891
|
+
since: time,
|
|
7892
|
+
until: time,
|
|
7893
|
+
/** The store holds the chat whole and the messenger read every join and leave; otherwise lower bounds. */
|
|
7894
|
+
complete: boolean(),
|
|
7895
|
+
completeness: strictObject({
|
|
7896
|
+
state: picklist(["complete", "partial", "unknown"]),
|
|
7897
|
+
up_to_date: nullable(boolean()),
|
|
7898
|
+
gaps: boolean(),
|
|
7899
|
+
reaches_start: boolean(),
|
|
7900
|
+
fetched_at: nullable(time)
|
|
7901
|
+
}),
|
|
7902
|
+
messages: count,
|
|
7903
|
+
senders: count,
|
|
7904
|
+
replies: count,
|
|
7905
|
+
threads: count,
|
|
7906
|
+
reactions: count,
|
|
7907
|
+
views: optionalCount,
|
|
7908
|
+
forwards: optionalCount,
|
|
7909
|
+
comments: optionalCount,
|
|
7910
|
+
top_posts: array(strictObject({
|
|
7911
|
+
ref: reference,
|
|
7912
|
+
timestamp: time,
|
|
7913
|
+
reactions: count,
|
|
7914
|
+
views: optionalCount,
|
|
7915
|
+
forwards: optionalCount,
|
|
7916
|
+
comments: optionalCount
|
|
7917
|
+
})),
|
|
7918
|
+
questions: strictObject({
|
|
7919
|
+
asked: count,
|
|
7920
|
+
answered: count,
|
|
7921
|
+
median_minutes_to_answer: minutes,
|
|
7922
|
+
answered_by: picklist(["owner", "owner-and-admins"])
|
|
7923
|
+
}),
|
|
7924
|
+
member_counts: optional(array(strictObject({ day: text, participants: nullable(count), listed: count, complete: boolean() }))),
|
|
7925
|
+
/** Absent where joins and leaves were not asked, or not recorded for the chat yet (then `missing` says so). */
|
|
7926
|
+
members: optional(strictObject({
|
|
7927
|
+
joined: count,
|
|
7928
|
+
left: count,
|
|
7929
|
+
net: number(),
|
|
7930
|
+
wrote: count,
|
|
7931
|
+
median_minutes_to_first_message: minutes,
|
|
7932
|
+
/** The messenger stopped reading its history before `since`: the counts are lower bounds. */
|
|
8068
7933
|
more: boolean()
|
|
8069
7934
|
})),
|
|
8070
|
-
|
|
7935
|
+
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
8071
7936
|
});
|
|
8072
|
-
var
|
|
8073
|
-
var
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
7937
|
+
var ms = nullable(pipe(number(), minValue(0)));
|
|
7938
|
+
var taskStats = strictObject({
|
|
7939
|
+
/** Open tasks across every row. */
|
|
7940
|
+
open: count,
|
|
7941
|
+
created: count,
|
|
7942
|
+
closed: count,
|
|
7943
|
+
median_close_ms: ms,
|
|
7944
|
+
mean_open_age_ms: ms,
|
|
7945
|
+
rows: array(strictObject({
|
|
7946
|
+
/** Rows of `--by chat` only. */
|
|
7947
|
+
chat: optional(reference),
|
|
7948
|
+
/** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
|
|
7949
|
+
key: text,
|
|
7950
|
+
name: nullable(text),
|
|
7951
|
+
open: count,
|
|
7952
|
+
created: count,
|
|
7953
|
+
closed: count,
|
|
7954
|
+
oldest_open_at: nullable(time),
|
|
7955
|
+
median_close_ms: ms,
|
|
7956
|
+
mean_open_age_ms: ms
|
|
7957
|
+
}))
|
|
8077
7958
|
});
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
text,
|
|
8089
|
-
|
|
7959
|
+
|
|
7960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
|
|
7961
|
+
var memberCount = strictObject({
|
|
7962
|
+
day: pipe(text, isoDate()),
|
|
7963
|
+
participants: nullable(count),
|
|
7964
|
+
listed: count,
|
|
7965
|
+
complete: boolean()
|
|
7966
|
+
});
|
|
7967
|
+
var trackedChat = strictObject({
|
|
7968
|
+
chat_id: id,
|
|
7969
|
+
title: nullable(text),
|
|
7970
|
+
tracked_at: time,
|
|
7971
|
+
last_count: nullable(memberCount)
|
|
8090
7972
|
});
|
|
8091
|
-
var
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8150
|
-
|
|
8151
|
-
|
|
8152
|
-
|
|
7973
|
+
var trackedChatHistory = strictObject({
|
|
7974
|
+
chat_id: id,
|
|
7975
|
+
tracked_at: nullable(time),
|
|
7976
|
+
counts: array(memberCount)
|
|
7977
|
+
});
|
|
7978
|
+
var chatTracking = strictObject({
|
|
7979
|
+
chat_id: id,
|
|
7980
|
+
tracked: boolean()
|
|
7981
|
+
});
|
|
7982
|
+
|
|
7983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
|
|
7984
|
+
var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
7985
|
+
var contactSync = strictObject({ added: count, changed: count, known: count });
|
|
7986
|
+
var profileFields = {
|
|
7987
|
+
usernames: array(text),
|
|
7988
|
+
birthday: optional(nullable(text)),
|
|
7989
|
+
phone: optional(nullable(text)),
|
|
7990
|
+
flags: partial(strictObject({
|
|
7991
|
+
bot: boolean(),
|
|
7992
|
+
verified: boolean(),
|
|
7993
|
+
premium: boolean(),
|
|
7994
|
+
scam: boolean(),
|
|
7995
|
+
fake: boolean(),
|
|
7996
|
+
restricted: boolean(),
|
|
7997
|
+
deleted: boolean(),
|
|
7998
|
+
support: boolean()
|
|
7999
|
+
})),
|
|
8000
|
+
seen: optional(text),
|
|
8001
|
+
contact: optional(boolean()),
|
|
8002
|
+
mutual_contact: optional(boolean()),
|
|
8003
|
+
common_chats_count: optional(nullable(count)),
|
|
8004
|
+
registered: optional(nullable(strictObject({
|
|
8005
|
+
at: text,
|
|
8006
|
+
source: picklist(["telegram", "max", "estimate"]),
|
|
8007
|
+
precision: picklist(["day", "month"])
|
|
8008
|
+
}))),
|
|
8009
|
+
has_photo: optional(boolean()),
|
|
8010
|
+
/** Earlier names and usernames, oldest first; the current ones are not repeated. */
|
|
8011
|
+
aliases: array(strictObject({
|
|
8012
|
+
name: optional(text),
|
|
8013
|
+
username: optional(text),
|
|
8014
|
+
link: optional(text),
|
|
8015
|
+
first_seen_at: time,
|
|
8016
|
+
last_seen_at: time,
|
|
8017
|
+
source: picklist(["profile", "messages"])
|
|
8018
|
+
}))
|
|
8019
|
+
};
|
|
8020
|
+
|
|
8021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact.js
|
|
8022
|
+
var contact = strictObject({
|
|
8023
|
+
ref: reference,
|
|
8024
|
+
id,
|
|
8025
|
+
name: nullable(text),
|
|
8026
|
+
username: nullable(text),
|
|
8027
|
+
alias: optional(nullable(text)),
|
|
8028
|
+
display_name: optional(nullable(text)),
|
|
8029
|
+
/** Whatever they wrote about themselves. */
|
|
8030
|
+
description: nullable(text),
|
|
8031
|
+
/** The newest message in a one-to-one chat with them. */
|
|
8032
|
+
last_messaged_at: nullable(time),
|
|
8033
|
+
/** For a source that knows it, such as a Zoom contact. */
|
|
8034
|
+
email: optional(nullable(text)),
|
|
8035
|
+
phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
|
|
8036
|
+
/** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
|
|
8037
|
+
chats: optional(array(strictObject({
|
|
8038
|
+
...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
|
|
8039
|
+
/** Their messages stored; a floor unless `complete`. */
|
|
8040
|
+
their_messages: optional(count),
|
|
8041
|
+
first_at: optional(nullable(time)),
|
|
8042
|
+
last_at: optional(nullable(time)),
|
|
8043
|
+
/** The store holds the whole chat, so the count is the real one. */
|
|
8044
|
+
complete: optional(boolean())
|
|
8045
|
+
}))),
|
|
8046
|
+
/** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
|
|
8047
|
+
...partial(strictObject(profileFields)).entries,
|
|
8048
|
+
/** `contacts show --with-notes`: the owner's private notes about them. */
|
|
8049
|
+
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
8153
8050
|
});
|
|
8154
8051
|
|
|
8155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
|
|
8156
8053
|
var contactNote = strictObject({
|
|
8157
8054
|
id,
|
|
8158
8055
|
/** The contact, as a `contact:` reference. */
|
|
@@ -8164,13 +8061,13 @@ var contactNote = strictObject({
|
|
|
8164
8061
|
updated_at: time
|
|
8165
8062
|
});
|
|
8166
8063
|
|
|
8167
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
|
|
8168
8065
|
var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8169
8066
|
var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
|
|
8170
8067
|
var contactStateChange = strictObject({ operation_id: id, person_id: id });
|
|
8171
8068
|
var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
|
|
8172
8069
|
|
|
8173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/conversation.js
|
|
8174
8071
|
var conversation = strictObject({
|
|
8175
8072
|
id,
|
|
8176
8073
|
chat: reference,
|
|
@@ -8185,7 +8082,7 @@ var conversation = strictObject({
|
|
|
8185
8082
|
rules_version: count
|
|
8186
8083
|
});
|
|
8187
8084
|
|
|
8188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
|
|
8189
8086
|
var conversationBuild = strictObject({
|
|
8190
8087
|
chat: id,
|
|
8191
8088
|
messages: count,
|
|
@@ -8210,7 +8107,7 @@ var catchUpPreparation = strictObject({
|
|
|
8210
8107
|
prepared: optional(conversationPreparation)
|
|
8211
8108
|
});
|
|
8212
8109
|
|
|
8213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
|
|
8214
8111
|
var conversationDetails = union([
|
|
8215
8112
|
strictObject({ ...conversation.entries, messages: array(message) }),
|
|
8216
8113
|
message
|
|
@@ -8300,7 +8197,7 @@ var conversationHit = strictObject({
|
|
|
8300
8197
|
stale: boolean()
|
|
8301
8198
|
});
|
|
8302
8199
|
|
|
8303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/counters.js
|
|
8304
8201
|
var counters = strictObject({
|
|
8305
8202
|
cutoff: time,
|
|
8306
8203
|
max_age_ms: milliseconds,
|
|
@@ -8330,97 +8227,7 @@ var counterRefresh = strictObject({
|
|
|
8330
8227
|
complete: optional(boolean())
|
|
8331
8228
|
});
|
|
8332
8229
|
|
|
8333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8334
|
-
var nullableText = nullable(text);
|
|
8335
|
-
var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
|
|
8336
|
-
var outcome = picklist(["open", "won", "lost"]);
|
|
8337
|
-
var crmAccount = nullable(strictObject({ provider: text, account: text }));
|
|
8338
|
-
var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
8339
|
-
var deal = strictObject({
|
|
8340
|
-
id,
|
|
8341
|
-
ref: reference,
|
|
8342
|
-
kind: picklist(["deal", "lead"]),
|
|
8343
|
-
title: text,
|
|
8344
|
-
/** One line with the stage, amount and status. */
|
|
8345
|
-
summary: text,
|
|
8346
|
-
pipeline: reference,
|
|
8347
|
-
pipeline_name: text,
|
|
8348
|
-
stage: text,
|
|
8349
|
-
status: outcome,
|
|
8350
|
-
organization: nullable(party),
|
|
8351
|
-
currency: nullableText,
|
|
8352
|
-
amount: nullableText,
|
|
8353
|
-
close_date: day2,
|
|
8354
|
-
closed_date: day2,
|
|
8355
|
-
closed_reason: nullableText,
|
|
8356
|
-
rank: nullable(number()),
|
|
8357
|
-
/** A lead's deal, once it became one. */
|
|
8358
|
-
deal: nullable(reference),
|
|
8359
|
-
/** The CRM account it is a copy from; `null` for the owner's own. */
|
|
8360
|
-
account: crmAccount,
|
|
8361
|
-
external_id: nullableText,
|
|
8362
|
-
/** A CRM copy's assignee, the identity `<account>/user/<id>`. */
|
|
8363
|
-
assignee: nullableText,
|
|
8364
|
-
/** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
|
|
8365
|
-
provider_metadata: record(string(), strictObject({
|
|
8366
|
-
label: nullable(string()),
|
|
8367
|
-
value: unknown(),
|
|
8368
|
-
option_id: optional(union([string(), array(string())]))
|
|
8369
|
-
})),
|
|
8370
|
-
people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
|
|
8371
|
-
author: strictObject({
|
|
8372
|
-
type: picklist(["person", "bot"]),
|
|
8373
|
-
id,
|
|
8374
|
-
name: nullableText,
|
|
8375
|
-
kind: nullable(picklist(["agent", "rule"]))
|
|
8376
|
-
}),
|
|
8377
|
-
model: nullableText,
|
|
8378
|
-
source: text,
|
|
8379
|
-
reason: nullableText,
|
|
8380
|
-
evidence: array(reference),
|
|
8381
|
-
project: nullable(reference),
|
|
8382
|
-
project_name: nullableText,
|
|
8383
|
-
created_at: time,
|
|
8384
|
-
updated_at: time,
|
|
8385
|
-
untrusted
|
|
8386
|
-
});
|
|
8387
|
-
var lead = deal;
|
|
8388
|
-
var pipelineStage = strictObject({
|
|
8389
|
-
name: text,
|
|
8390
|
-
position: count,
|
|
8391
|
-
outcome,
|
|
8392
|
-
external_id: nullableText,
|
|
8393
|
-
/** Open deals or leads in it now. */
|
|
8394
|
-
open: count,
|
|
8395
|
-
/** With a funnel: rows that got this far, and the share of them that reached the next stage. */
|
|
8396
|
-
reached: optional(count),
|
|
8397
|
-
conversion: optional(nullable(number())),
|
|
8398
|
-
/** With a funnel: rows standing in it now, and their sum per currency, never converted. */
|
|
8399
|
-
items: optional(count),
|
|
8400
|
-
amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
|
|
8401
|
-
});
|
|
8402
|
-
var pipeline = strictObject({
|
|
8403
|
-
id,
|
|
8404
|
-
ref: reference,
|
|
8405
|
-
name: text,
|
|
8406
|
-
kind: picklist(["deal", "lead"]),
|
|
8407
|
-
account: crmAccount,
|
|
8408
|
-
external_id: nullableText,
|
|
8409
|
-
stages: array(pipelineStage),
|
|
8410
|
-
created_at: time,
|
|
8411
|
-
totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
|
|
8412
|
-
since: optional(day2),
|
|
8413
|
-
untrusted
|
|
8414
|
-
});
|
|
8415
|
-
var stage = strictObject({
|
|
8416
|
-
...pipelineStage.entries,
|
|
8417
|
-
pipeline: reference,
|
|
8418
|
-
pipeline_name: text,
|
|
8419
|
-
kind: picklist(["deal", "lead"]),
|
|
8420
|
-
untrusted
|
|
8421
|
-
});
|
|
8422
|
-
|
|
8423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.614.0_@wirecat+cli-base@0.80.7_commander@15.0.0_esbuild@0.28.2_type_af5f2db22f61976c09fb28de9c7dc33e/node_modules/@wirecat/cli-core/dist/entities/document.js
|
|
8230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/document.js
|
|
8424
8231
|
var document = strictObject({
|
|
8425
8232
|
ref: reference,
|
|
8426
8233
|
id,
|
|
@@ -8435,7 +8242,7 @@ var document = strictObject({
|
|
|
8435
8242
|
owners: optional(array(text))
|
|
8436
8243
|
});
|
|
8437
8244
|
|
|
8438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/document-link.js
|
|
8439
8246
|
var documentLink = strictObject({
|
|
8440
8247
|
ref: reference,
|
|
8441
8248
|
url: text,
|
|
@@ -8446,7 +8253,7 @@ var documentLink = strictObject({
|
|
|
8446
8253
|
sender: strictObject({ id: nullable(id), name: nullable(text) })
|
|
8447
8254
|
});
|
|
8448
8255
|
|
|
8449
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/evidence.js
|
|
8450
8257
|
var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
|
|
8451
8258
|
var contribution = strictObject({
|
|
8452
8259
|
message: evidenceMessage,
|
|
@@ -8476,7 +8283,7 @@ var retentionStay = strictObject({
|
|
|
8476
8283
|
});
|
|
8477
8284
|
var evidence = union([contribution, retentionStay]);
|
|
8478
8285
|
|
|
8479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/fact.js
|
|
8480
8287
|
var fact = strictObject({
|
|
8481
8288
|
ref: reference,
|
|
8482
8289
|
id,
|
|
@@ -8502,11 +8309,12 @@ var fact = strictObject({
|
|
|
8502
8309
|
evidence: array(reference),
|
|
8503
8310
|
/** With `--sources`: each piece of evidence read back. */
|
|
8504
8311
|
sources: optional(array(evidenceSource)),
|
|
8312
|
+
source_review: optional(sourceReview),
|
|
8505
8313
|
created_at: time,
|
|
8506
8314
|
updated_at: time
|
|
8507
8315
|
});
|
|
8508
8316
|
|
|
8509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/hit.js
|
|
8510
8318
|
var hit = strictObject({
|
|
8511
8319
|
kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
|
|
8512
8320
|
ref: reference,
|
|
@@ -8527,8 +8335,8 @@ var hit = strictObject({
|
|
|
8527
8335
|
found_by: optional(array(picklist(["title", "words", "meaning"]))),
|
|
8528
8336
|
/** How far into the meeting the passage is. */
|
|
8529
8337
|
offset_ms: optional(nullable(count)),
|
|
8530
|
-
/** A meeting
|
|
8531
|
-
scope: optional(picklist(["transcript", "chat", "summary"])),
|
|
8338
|
+
/** A meeting hit's place: its title, transcript, chat or summary. */
|
|
8339
|
+
scope: optional(picklist(["title", "transcript", "chat", "summary"])),
|
|
8532
8340
|
/** A meeting transcript hit's cue, which `meetings passage` opens with the lines around it. */
|
|
8533
8341
|
cue_ref: optional(reference),
|
|
8534
8342
|
/** A meeting transcript hit's transcript language (`ru`, `en`…), `null` when unknown. */
|
|
@@ -8536,6 +8344,10 @@ var hit = strictObject({
|
|
|
8536
8344
|
/** A meeting transcript hit's line, from 1, of `lines_total` lines in its transcript. */
|
|
8537
8345
|
line: optional(pipe(count, minValue(1))),
|
|
8538
8346
|
lines_total: optional(count),
|
|
8347
|
+
/** `corrected`: a meeting hit found only through a spelling speech recognition may have garbled. */
|
|
8348
|
+
match: optional(picklist(["corrected"])),
|
|
8349
|
+
/** For a `corrected` hit, the stored words each such query word matched. */
|
|
8350
|
+
corrections: optional(array(strictObject({ from: text, to: array(text) }))),
|
|
8539
8351
|
/** A meeting passage's stored line, so two passages of one meeting stay apart; `search meetings` gives the same. */
|
|
8540
8352
|
id: optional(pipe(string(), minLength(1))),
|
|
8541
8353
|
/** A business hit's: `proposed` waits for the owner; a product or a wallet has no review and is `confirmed`. */
|
|
@@ -8548,7 +8360,7 @@ var hit = strictObject({
|
|
|
8548
8360
|
untrusted
|
|
8549
8361
|
});
|
|
8550
8362
|
|
|
8551
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/identity.js
|
|
8552
8364
|
var identity = strictObject({
|
|
8553
8365
|
ref: reference,
|
|
8554
8366
|
provider: text,
|
|
@@ -8557,11 +8369,14 @@ var identity = strictObject({
|
|
|
8557
8369
|
id,
|
|
8558
8370
|
name: nullable(text),
|
|
8559
8371
|
username: nullable(text),
|
|
8372
|
+
/** The number or address the source gave for them, when it gave one. */
|
|
8373
|
+
phone: optional(nullable(text)),
|
|
8374
|
+
email: optional(nullable(text)),
|
|
8560
8375
|
/** The `person:` they are linked to, when one is. */
|
|
8561
8376
|
person: optional(nullable(reference))
|
|
8562
8377
|
});
|
|
8563
8378
|
|
|
8564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
|
|
8565
8380
|
var imageEmbedding = strictObject({
|
|
8566
8381
|
model: text,
|
|
8567
8382
|
embedded: count,
|
|
@@ -8570,13 +8385,13 @@ var imageEmbedding = strictObject({
|
|
|
8570
8385
|
more: boolean()
|
|
8571
8386
|
});
|
|
8572
8387
|
|
|
8573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
8574
8389
|
import { spawn } from "node:child_process";
|
|
8575
|
-
import { randomBytes
|
|
8576
|
-
import { closeSync, existsSync as
|
|
8390
|
+
import { randomBytes } from "node:crypto";
|
|
8391
|
+
import { closeSync, existsSync as existsSync6, mkdirSync as mkdirSync2, openSync, readdirSync as readdirSync3, readFileSync as readFileSync4, realpathSync, rmSync as rmSync2 } from "node:fs";
|
|
8577
8392
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
8578
8393
|
|
|
8579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
|
|
8580
8395
|
var progressOf = /* @__PURE__ */ __name((input) => {
|
|
8581
8396
|
const total = input.total ?? null;
|
|
8582
8397
|
const updated = input.updatedAt ?? null;
|
|
@@ -8592,7 +8407,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
|
|
|
8592
8407
|
};
|
|
8593
8408
|
}, "progressOf");
|
|
8594
8409
|
|
|
8595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/runs/record-log.js
|
|
8596
8411
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
8597
8412
|
const run = currentRun();
|
|
8598
8413
|
const trace = traceId ?? run.traceId;
|
|
@@ -8606,7 +8421,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
|
|
|
8606
8421
|
}));
|
|
8607
8422
|
}, "recordLogFor");
|
|
8608
8423
|
|
|
8609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
8610
8425
|
var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
|
|
8611
8426
|
var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
8612
8427
|
const out = openSync(log, "a", 384);
|
|
@@ -8625,15 +8440,15 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
|
8625
8440
|
var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
|
|
8626
8441
|
var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
|
|
8627
8442
|
var saveJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
8628
|
-
|
|
8443
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
8629
8444
|
writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
|
|
8630
8445
|
`, 384);
|
|
8631
8446
|
}, "saveJob");
|
|
8632
8447
|
var readJob = /* @__PURE__ */ __name((dir, id6) => {
|
|
8633
|
-
if (!/^[\w-]+$/.test(id6) || !
|
|
8448
|
+
if (!/^[\w-]+$/.test(id6) || !existsSync6(jobPath(dir, id6)))
|
|
8634
8449
|
return void 0;
|
|
8635
8450
|
try {
|
|
8636
|
-
return JSON.parse(
|
|
8451
|
+
return JSON.parse(readFileSync4(jobPath(dir, id6), "utf8"));
|
|
8637
8452
|
} catch {
|
|
8638
8453
|
return void 0;
|
|
8639
8454
|
}
|
|
@@ -8670,12 +8485,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
|
|
|
8670
8485
|
saveJob(dir, { ...job2, ...change });
|
|
8671
8486
|
}, "updateJob");
|
|
8672
8487
|
var removeJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
8673
|
-
|
|
8674
|
-
|
|
8488
|
+
rmSync2(jobPath(dir, job2.id), { force: true });
|
|
8489
|
+
rmSync2(recordsPath(dir, job2.id), { force: true });
|
|
8675
8490
|
if (dirname2(job2.log) === dir)
|
|
8676
|
-
|
|
8491
|
+
rmSync2(job2.log, { force: true });
|
|
8677
8492
|
}, "removeJob");
|
|
8678
|
-
var listJobs = /* @__PURE__ */ __name((dir) =>
|
|
8493
|
+
var listJobs = /* @__PURE__ */ __name((dir) => existsSync6(dir) ? readdirSync3(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
|
|
8679
8494
|
var jobDetails = /* @__PURE__ */ __name((job2) => ({
|
|
8680
8495
|
job: job2.id,
|
|
8681
8496
|
profile: job2.profile,
|
|
@@ -8739,8 +8554,8 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8739
8554
|
if (running)
|
|
8740
8555
|
throw new CliError("validation_error", `job ${running.id} already works on this chat; inspect store jobs show first`);
|
|
8741
8556
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
8742
|
-
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${
|
|
8743
|
-
|
|
8557
|
+
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
|
|
8558
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
8744
8559
|
const log = join5(dir, `${id6}.log`);
|
|
8745
8560
|
const job2 = {
|
|
8746
8561
|
id: id6,
|
|
@@ -8761,7 +8576,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8761
8576
|
return { job: id6, pid, chat: input.chat, log };
|
|
8762
8577
|
}, "startArchiveJob");
|
|
8763
8578
|
|
|
8764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/job.js
|
|
8765
8580
|
var problem = strictObject({ code: text, message: text });
|
|
8766
8581
|
var job = strictObject({
|
|
8767
8582
|
id,
|
|
@@ -8784,7 +8599,7 @@ var job = strictObject({
|
|
|
8784
8599
|
error: optional(problem)
|
|
8785
8600
|
});
|
|
8786
8601
|
|
|
8787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/join-request.js
|
|
8788
8603
|
var joinRequest = strictObject({
|
|
8789
8604
|
person_id: id,
|
|
8790
8605
|
name: nullable(text),
|
|
@@ -8795,7 +8610,7 @@ var joinRequest = strictObject({
|
|
|
8795
8610
|
about: optional(text)
|
|
8796
8611
|
});
|
|
8797
8612
|
|
|
8798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/list-results.js
|
|
8799
8614
|
var botProfile = strictObject({
|
|
8800
8615
|
name: text,
|
|
8801
8616
|
token: text,
|
|
@@ -8826,6 +8641,8 @@ var scheduledJob = strictObject({
|
|
|
8826
8641
|
name: text,
|
|
8827
8642
|
kind: picklist(["command", "agent"]),
|
|
8828
8643
|
when: text,
|
|
8644
|
+
/** Kept without its timer: `schedule run` runs it, `schedule resume` puts it back on its timer. */
|
|
8645
|
+
paused: optional(literal(true)),
|
|
8829
8646
|
/** When a finished run shows a desktop notice: `always`, `failures` or `never`; the default is shown, not left out. */
|
|
8830
8647
|
notify: optional(picklist(["always", "failures", "never"])),
|
|
8831
8648
|
/** Where a run's result is sent after it: `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`. */
|
|
@@ -8840,11 +8657,13 @@ var scheduledJob = strictObject({
|
|
|
8840
8657
|
failing_since: optional(time),
|
|
8841
8658
|
failures: optional(number()),
|
|
8842
8659
|
cost_usd: optional(number()),
|
|
8843
|
-
|
|
8660
|
+
input_hash: optional(text),
|
|
8661
|
+
/** The last time a run did not start, and why: the day's cost cap, too little new mail, or the same input. */
|
|
8844
8662
|
skipped: optional(strictObject({
|
|
8845
8663
|
at: time,
|
|
8846
8664
|
why: text,
|
|
8847
|
-
/** A dotted id for `why`, so a client can translate it: `cost.day-cap`, `mail.none-new`, `mail.below-threshold
|
|
8665
|
+
/** A dotted id for `why`, so a client can translate it: `cost.day-cap`, `mail.none-new`, `mail.below-threshold`,
|
|
8666
|
+
* `mail.same-input`. */
|
|
8848
8667
|
reason: optional(pipe(text, regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/)))
|
|
8849
8668
|
})),
|
|
8850
8669
|
/** How the run's result went along each route; `reason` a dotted id, `error` the sending CLI's code and reason id. */
|
|
@@ -8888,7 +8707,7 @@ var stickerInventory = strictObject({
|
|
|
8888
8707
|
url: optional(nullable(text))
|
|
8889
8708
|
});
|
|
8890
8709
|
|
|
8891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
|
|
8892
8711
|
var pollVote = strictObject({
|
|
8893
8712
|
person_id: id,
|
|
8894
8713
|
name: nullable(text),
|
|
@@ -8898,7 +8717,7 @@ var pollVote = strictObject({
|
|
|
8898
8717
|
voted_at: time
|
|
8899
8718
|
});
|
|
8900
8719
|
|
|
8901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/listener.js
|
|
8902
8721
|
var reactions = unwrap(unwrap(message.entries.reactions));
|
|
8903
8722
|
var observation = strictObject({
|
|
8904
8723
|
value: pipe(number(), minValue(0)),
|
|
@@ -8940,7 +8759,7 @@ var serveSummary = strictObject({
|
|
|
8940
8759
|
tasks: optional(strictObject({ added: count, closed: count, review: count }))
|
|
8941
8760
|
});
|
|
8942
8761
|
|
|
8943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
|
|
8944
8763
|
var mailCounts = strictObject({
|
|
8945
8764
|
by: picklist(["day", "week", "sender"]),
|
|
8946
8765
|
received: count,
|
|
@@ -8955,7 +8774,7 @@ var mailCounts = strictObject({
|
|
|
8955
8774
|
}))
|
|
8956
8775
|
});
|
|
8957
8776
|
|
|
8958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
|
|
8959
8778
|
var evidence2 = strictObject({ reference, fingerprint: text });
|
|
8960
8779
|
var base = { id, evidence: array(evidence2) };
|
|
8961
8780
|
var finding = variant("kind", [
|
|
@@ -9099,7 +8918,7 @@ var mailFindings = strictObject({
|
|
|
9099
8918
|
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
|
|
9100
8919
|
});
|
|
9101
8920
|
|
|
9102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
|
|
9103
8922
|
var mediaArchive = strictObject({
|
|
9104
8923
|
directory: text,
|
|
9105
8924
|
chats: count,
|
|
@@ -9131,7 +8950,7 @@ var mediaArchiveTimer = union([
|
|
|
9131
8950
|
strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
|
|
9132
8951
|
]);
|
|
9133
8952
|
|
|
9134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
|
|
9135
8954
|
var preparationId = pipe(string(), minLength(1));
|
|
9136
8955
|
var preparationCount = pipe(number(), integer(), minValue(0));
|
|
9137
8956
|
var preparationTime = nullable(isoTime);
|
|
@@ -9223,7 +9042,7 @@ var preparationMeeting = strictObject({
|
|
|
9223
9042
|
updated_at: isoTime
|
|
9224
9043
|
});
|
|
9225
9044
|
|
|
9226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
|
|
9227
9046
|
var meetingEvidence = preparationEvidence;
|
|
9228
9047
|
var meetingPersonContext = strictObject({
|
|
9229
9048
|
person: strictObject({ uid: string(), name: nullable(string()) }),
|
|
@@ -9245,7 +9064,7 @@ var meetingPersonContext = strictObject({
|
|
|
9245
9064
|
})
|
|
9246
9065
|
});
|
|
9247
9066
|
|
|
9248
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
|
|
9249
9068
|
var evidence3 = strictObject({ reference, fingerprint: text });
|
|
9250
9069
|
var base2 = { id, project: reference, evidence: array(evidence3) };
|
|
9251
9070
|
var finding2 = variant("kind", [
|
|
@@ -9283,7 +9102,7 @@ var meetingFindings = strictObject({
|
|
|
9283
9102
|
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
|
|
9284
9103
|
});
|
|
9285
9104
|
|
|
9286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
|
|
9287
9106
|
var communicationCoverage = strictObject({
|
|
9288
9107
|
read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
|
|
9289
9108
|
query: string(),
|
|
@@ -9328,7 +9147,7 @@ var preparationCommunications = strictObject({
|
|
|
9328
9147
|
}))
|
|
9329
9148
|
});
|
|
9330
9149
|
|
|
9331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
|
|
9332
9151
|
var meetingPreparation = strictObject({
|
|
9333
9152
|
communications: optional(preparationCommunications),
|
|
9334
9153
|
schema_version: literal(1),
|
|
@@ -9441,7 +9260,7 @@ var meetingPreparation = strictObject({
|
|
|
9441
9260
|
})
|
|
9442
9261
|
});
|
|
9443
9262
|
|
|
9444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
|
|
9445
9264
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
9446
9265
|
var id3 = pipe(string(), minLength(1));
|
|
9447
9266
|
var text3 = string();
|
|
@@ -9505,7 +9324,7 @@ var meetingProjectCandidates = strictObject({
|
|
|
9505
9324
|
})
|
|
9506
9325
|
});
|
|
9507
9326
|
|
|
9508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
|
|
9509
9328
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
9510
9329
|
var id4 = pipe(string(), minLength(1), maxLength(1e3));
|
|
9511
9330
|
var meetingSeriesInventory = strictObject({
|
|
@@ -9535,7 +9354,7 @@ var meetingSeriesInventory = strictObject({
|
|
|
9535
9354
|
})
|
|
9536
9355
|
});
|
|
9537
9356
|
|
|
9538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
|
|
9539
9358
|
var text4 = string();
|
|
9540
9359
|
var id5 = pipe(number(), integer(), minValue(1));
|
|
9541
9360
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -9552,7 +9371,7 @@ var meetingTaskProposal = strictObject({
|
|
|
9552
9371
|
persistence: literal("proposal-only")
|
|
9553
9372
|
});
|
|
9554
9373
|
|
|
9555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/memory.js
|
|
9556
9375
|
var memory = strictObject({
|
|
9557
9376
|
ref: reference,
|
|
9558
9377
|
id,
|
|
@@ -9575,13 +9394,14 @@ var memory = strictObject({
|
|
|
9575
9394
|
/** With `--sources`: each piece of evidence read back. */
|
|
9576
9395
|
sources: optional(array(evidenceSource)),
|
|
9577
9396
|
last_verified_at: nullable(time),
|
|
9397
|
+
source_review: optional(sourceReview),
|
|
9578
9398
|
created_at: time,
|
|
9579
9399
|
updated_at: time
|
|
9580
9400
|
});
|
|
9581
9401
|
|
|
9582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/mention.js
|
|
9583
9403
|
var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
9584
|
-
var status = picklist(["found", "linked", "dismissed"]);
|
|
9404
|
+
var status = picklist(["found", "linked", "proposed", "dismissed"]);
|
|
9585
9405
|
var mention = strictObject({
|
|
9586
9406
|
id: count,
|
|
9587
9407
|
kind,
|
|
@@ -9611,7 +9431,8 @@ var mentionDecision = strictObject({
|
|
|
9611
9431
|
value: text,
|
|
9612
9432
|
status,
|
|
9613
9433
|
target: nullable(reference),
|
|
9614
|
-
mentions: count
|
|
9434
|
+
mentions: count,
|
|
9435
|
+
proposal: optional(text)
|
|
9615
9436
|
});
|
|
9616
9437
|
var mentionRebuild = strictObject({
|
|
9617
9438
|
messages: count,
|
|
@@ -9622,13 +9443,13 @@ var mentionRebuild = strictObject({
|
|
|
9622
9443
|
mentions: count
|
|
9623
9444
|
});
|
|
9624
9445
|
|
|
9625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-change.js
|
|
9626
9447
|
var operated3 = { operation_id: id, chat_id: id };
|
|
9627
9448
|
var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
|
|
9628
9449
|
var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
|
|
9629
9450
|
var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
|
|
9630
9451
|
|
|
9631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-read.js
|
|
9632
9453
|
var messageTranscript = strictObject({
|
|
9633
9454
|
message_id: id,
|
|
9634
9455
|
text,
|
|
@@ -9686,7 +9507,7 @@ var evidencePacket = strictObject({
|
|
|
9686
9507
|
}))
|
|
9687
9508
|
});
|
|
9688
9509
|
|
|
9689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-context.js
|
|
9690
9511
|
var messageThread = strictObject({
|
|
9691
9512
|
ref: reference,
|
|
9692
9513
|
chat: id,
|
|
@@ -9703,7 +9524,7 @@ var messageThread = strictObject({
|
|
|
9703
9524
|
});
|
|
9704
9525
|
var messageContext = union([message, messageThread]);
|
|
9705
9526
|
|
|
9706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
|
|
9707
9528
|
var messageCounts = strictObject({
|
|
9708
9529
|
by: picklist(["chat", "sender", "day", "hour"]),
|
|
9709
9530
|
total: count,
|
|
@@ -9716,7 +9537,7 @@ var messageCounts = strictObject({
|
|
|
9716
9537
|
}))
|
|
9717
9538
|
});
|
|
9718
9539
|
|
|
9719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-link.js
|
|
9720
9541
|
var messageLink = strictObject({
|
|
9721
9542
|
ref: reference,
|
|
9722
9543
|
url: nullable(text),
|
|
@@ -9733,7 +9554,7 @@ var messageLink = strictObject({
|
|
|
9733
9554
|
})))
|
|
9734
9555
|
});
|
|
9735
9556
|
|
|
9736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
|
|
9737
9558
|
var savedMessageFile = strictObject({
|
|
9738
9559
|
kind: text,
|
|
9739
9560
|
path: text,
|
|
@@ -9813,14 +9634,14 @@ var messageSyncAll = strictObject({
|
|
|
9813
9634
|
issue: optional(actionableError),
|
|
9814
9635
|
limited: optional(historyLimited)
|
|
9815
9636
|
})),
|
|
9816
|
-
/** How many chats the history limits left unread (big groups) or read only to the window's start. */
|
|
9817
|
-
limited: optional(strictObject({ group_too_large: count, older_than_window: count })),
|
|
9637
|
+
/** How many chats the history limits left unread (big groups) or read only to the window's start; muted, unread. */
|
|
9638
|
+
limited: optional(strictObject({ group_too_large: count, older_than_window: count, muted: optional(count) })),
|
|
9818
9639
|
tasks
|
|
9819
9640
|
});
|
|
9820
9641
|
var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
|
|
9821
9642
|
var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
|
|
9822
9643
|
|
|
9823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/message-write.js
|
|
9824
9645
|
var messageWrite = strictObject({
|
|
9825
9646
|
operation_id: id,
|
|
9826
9647
|
message,
|
|
@@ -9835,7 +9656,7 @@ var draftWrite = strictObject({
|
|
|
9835
9656
|
});
|
|
9836
9657
|
var messageSend = union([messageWrite, draftWrite]);
|
|
9837
9658
|
|
|
9838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/model.js
|
|
9839
9660
|
var model2 = strictObject({
|
|
9840
9661
|
id,
|
|
9841
9662
|
kind: picklist(["audio", "text", "image", "reranker"]),
|
|
@@ -9843,7 +9664,7 @@ var model2 = strictObject({
|
|
|
9843
9664
|
/** Which languages it reads, in words. */
|
|
9844
9665
|
languages: text,
|
|
9845
9666
|
licence: optional(text),
|
|
9846
|
-
/** A text model's licence
|
|
9667
|
+
/** A text model's licence page, for a model under conditions of its own (`NOTICE` beside its files says the same). */
|
|
9847
9668
|
terms: optional(text),
|
|
9848
9669
|
/** A text model's size next to the others: small is fastest, large reads best. */
|
|
9849
9670
|
size: optional(picklist(["small", "medium", "large"])),
|
|
@@ -9870,7 +9691,7 @@ var chosenModel = strictObject({
|
|
|
9870
9691
|
estimate_seconds: nullable(count)
|
|
9871
9692
|
});
|
|
9872
9693
|
|
|
9873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/model-key.js
|
|
9874
9695
|
var source = picklist(["environment", "keyring", "file"]);
|
|
9875
9696
|
var modelKey = strictObject({
|
|
9876
9697
|
provider: text,
|
|
@@ -9880,7 +9701,7 @@ var modelKey = strictObject({
|
|
|
9880
9701
|
var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
|
|
9881
9702
|
var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
|
|
9882
9703
|
|
|
9883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
|
|
9884
9705
|
var versus = strictObject({ current: number(), previous: number() });
|
|
9885
9706
|
var person = { person_ref: reference, name: nullable(text) };
|
|
9886
9707
|
var graph = strictObject({
|
|
@@ -9914,14 +9735,14 @@ var officialStats = strictObject({
|
|
|
9914
9735
|
graphs: record(string(), union([graph, strictObject({ error: text })]))
|
|
9915
9736
|
});
|
|
9916
9737
|
|
|
9917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/person.js
|
|
9918
9739
|
var person2 = strictObject({
|
|
9919
9740
|
ref: reference,
|
|
9920
9741
|
name: nullable(text),
|
|
9921
9742
|
identities: optional(array(identity))
|
|
9922
9743
|
});
|
|
9923
9744
|
|
|
9924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9745
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/poll.js
|
|
9925
9746
|
var poll = strictObject({
|
|
9926
9747
|
chat_id: id,
|
|
9927
9748
|
message_id: id,
|
|
@@ -9937,11 +9758,11 @@ var poll = strictObject({
|
|
|
9937
9758
|
});
|
|
9938
9759
|
var pollChange = strictObject({ operation_id: id, poll });
|
|
9939
9760
|
|
|
9940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
|
|
9941
9762
|
var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
|
|
9942
9763
|
var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
|
|
9943
9764
|
|
|
9944
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/ranking.js
|
|
9945
9766
|
var figures = record(string(), number());
|
|
9946
9767
|
var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
|
|
9947
9768
|
var rankingRow = strictObject({
|
|
@@ -9988,7 +9809,7 @@ var ranking = strictObject({
|
|
|
9988
9809
|
rows: array(rankingRow)
|
|
9989
9810
|
});
|
|
9990
9811
|
|
|
9991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/reaction.js
|
|
9992
9813
|
var reaction = strictObject({
|
|
9993
9814
|
person: strictObject({ id, name: nullable(text), username: nullable(text) }),
|
|
9994
9815
|
/** The emoji, or `custom:<id>` for a custom one. */
|
|
@@ -9996,7 +9817,7 @@ var reaction = strictObject({
|
|
|
9996
9817
|
reacted_at: time
|
|
9997
9818
|
});
|
|
9998
9819
|
|
|
9999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
|
|
10000
9821
|
var reactionChange = strictObject({
|
|
10001
9822
|
operation_id: id,
|
|
10002
9823
|
chat_id: id,
|
|
@@ -10004,7 +9825,7 @@ var reactionChange = strictObject({
|
|
|
10004
9825
|
reaction: nullable(text)
|
|
10005
9826
|
});
|
|
10006
9827
|
|
|
10007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/recipient.js
|
|
10008
9829
|
var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
|
|
10009
9830
|
var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
|
|
10010
9831
|
var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
|
|
@@ -10015,7 +9836,7 @@ var recipientChange = strictObject({
|
|
|
10015
9836
|
...partial(recipientOff).entries
|
|
10016
9837
|
});
|
|
10017
9838
|
|
|
10018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
|
|
10019
9840
|
var events = array(record(string(), unknown()));
|
|
10020
9841
|
var recordedRun = strictObject({
|
|
10021
9842
|
run_id: id,
|
|
@@ -10087,7 +9908,7 @@ var runHit = strictObject({
|
|
|
10087
9908
|
});
|
|
10088
9909
|
var runLocation = strictObject({ path: text });
|
|
10089
9910
|
|
|
10090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/relationship.js
|
|
10091
9912
|
var relationship = strictObject({
|
|
10092
9913
|
id,
|
|
10093
9914
|
from: reference,
|
|
@@ -10107,10 +9928,14 @@ var relationship = strictObject({
|
|
|
10107
9928
|
position: nullable(text),
|
|
10108
9929
|
starts_at: nullable(time),
|
|
10109
9930
|
ends_at: nullable(time),
|
|
9931
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
9932
|
+
account: optional(text),
|
|
9933
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
9934
|
+
derived: optional(text),
|
|
10110
9935
|
created_at: time
|
|
10111
9936
|
});
|
|
10112
9937
|
|
|
10113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
|
|
10114
9939
|
var milliseconds2 = nullable(pipe(number(), minValue(0)));
|
|
10115
9940
|
var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
|
|
10116
9941
|
var responseTimes = strictObject({
|
|
@@ -10127,7 +9952,7 @@ var waitingChats = strictObject({
|
|
|
10127
9952
|
by_kind: strictObject({ private: count, group: count })
|
|
10128
9953
|
});
|
|
10129
9954
|
|
|
10130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/retention.js
|
|
10131
9956
|
var retentionCohort = strictObject({
|
|
10132
9957
|
/** The first day of the joining day or week. */
|
|
10133
9958
|
cohort: text,
|
|
@@ -10175,7 +10000,7 @@ var retention = strictObject({
|
|
|
10175
10000
|
rows: array(retentionCohort)
|
|
10176
10001
|
});
|
|
10177
10002
|
|
|
10178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
|
|
10179
10004
|
var savedSearch = strictObject({
|
|
10180
10005
|
id,
|
|
10181
10006
|
/** `null` for a run in the history. */
|
|
@@ -10192,7 +10017,7 @@ var savedSearch = strictObject({
|
|
|
10192
10017
|
});
|
|
10193
10018
|
var searchHistoryClear = strictObject({ cleared: count });
|
|
10194
10019
|
|
|
10195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
|
|
10196
10021
|
var sendAttempt = strictObject({
|
|
10197
10022
|
at: time,
|
|
10198
10023
|
profile: text,
|
|
@@ -10220,7 +10045,7 @@ var sendAttempt = strictObject({
|
|
|
10220
10045
|
error_code: optional(text)
|
|
10221
10046
|
});
|
|
10222
10047
|
|
|
10223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
|
|
10224
10049
|
var absent = strictObject({ path: text, exists: literal(false) });
|
|
10225
10050
|
var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
|
|
10226
10051
|
var infoSchema = strictObject({
|
|
@@ -10441,7 +10266,7 @@ var storeRepair = union([
|
|
|
10441
10266
|
]);
|
|
10442
10267
|
var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
|
|
10443
10268
|
|
|
10444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/store-records.js
|
|
10445
10270
|
var range = strictObject({ from: number(), to: number() });
|
|
10446
10271
|
var storeChatStatus = strictObject({
|
|
10447
10272
|
chat_id: id,
|
|
@@ -10539,7 +10364,7 @@ var storeJobRetry = union([
|
|
|
10539
10364
|
]);
|
|
10540
10365
|
var storeJobClear = strictObject({ cleared: array(id) });
|
|
10541
10366
|
|
|
10542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/store-table.js
|
|
10543
10368
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
10544
10369
|
var storeTable = strictObject({
|
|
10545
10370
|
name: text,
|
|
@@ -10548,7 +10373,7 @@ var storeTable = strictObject({
|
|
|
10548
10373
|
bytes: optional(nullable(count))
|
|
10549
10374
|
});
|
|
10550
10375
|
|
|
10551
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
|
|
10552
10377
|
var tagTarget = variant("type", [
|
|
10553
10378
|
strictObject({ type: literal("chat"), chat_id: id }),
|
|
10554
10379
|
strictObject({ type: literal("contact"), person_id: id }),
|
|
@@ -10579,7 +10404,7 @@ var automaticTags = strictObject({
|
|
|
10579
10404
|
dry_run: boolean()
|
|
10580
10405
|
});
|
|
10581
10406
|
|
|
10582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/tagging.js
|
|
10583
10408
|
var tagging = strictObject({
|
|
10584
10409
|
tag: text,
|
|
10585
10410
|
type: picklist(TAG_TYPES),
|
|
@@ -10592,7 +10417,7 @@ var tagging = strictObject({
|
|
|
10592
10417
|
created_at: time
|
|
10593
10418
|
});
|
|
10594
10419
|
|
|
10595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
|
|
10596
10421
|
var side = strictObject({ ref: reference, key: text, title: text, status: text });
|
|
10597
10422
|
var taskPair = strictObject({
|
|
10598
10423
|
task: nullable(side),
|
|
@@ -10615,7 +10440,7 @@ var taskPair = strictObject({
|
|
|
10615
10440
|
created_at: time
|
|
10616
10441
|
});
|
|
10617
10442
|
|
|
10618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/task-results.js
|
|
10619
10444
|
var nullableTime = nullable(time);
|
|
10620
10445
|
var link = strictObject({
|
|
10621
10446
|
id,
|
|
@@ -10789,7 +10614,19 @@ var taskReview = strictObject({
|
|
|
10789
10614
|
untrusted
|
|
10790
10615
|
});
|
|
10791
10616
|
|
|
10792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/template.js
|
|
10618
|
+
var template = strictObject({
|
|
10619
|
+
key: text,
|
|
10620
|
+
channel: picklist(["telegram", "email", "text"]),
|
|
10621
|
+
language: text,
|
|
10622
|
+
about: text,
|
|
10623
|
+
renders: boolean(),
|
|
10624
|
+
source: picklist(["stored", "inherited", "default"]),
|
|
10625
|
+
updated_at: nullable(time),
|
|
10626
|
+
updated_by: nullable(text)
|
|
10627
|
+
});
|
|
10628
|
+
|
|
10629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/topic.js
|
|
10793
10630
|
var topic = strictObject({
|
|
10794
10631
|
id,
|
|
10795
10632
|
title: text,
|
|
@@ -10803,7 +10640,7 @@ var topic = strictObject({
|
|
|
10803
10640
|
untrusted
|
|
10804
10641
|
});
|
|
10805
10642
|
|
|
10806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/entities/index.js
|
|
10807
10644
|
var ENTITIES = {
|
|
10808
10645
|
sync_progress: progress,
|
|
10809
10646
|
deal,
|
|
@@ -10875,6 +10712,10 @@ var ENTITIES = {
|
|
|
10875
10712
|
identity,
|
|
10876
10713
|
contact_context: contactContext,
|
|
10877
10714
|
contact_preparation: contactPreparation,
|
|
10715
|
+
person_context: personContext,
|
|
10716
|
+
organization_context: organizationContext,
|
|
10717
|
+
deal_context: dealContext,
|
|
10718
|
+
"deal_context.brief": dealBrief,
|
|
10878
10719
|
contact_activity: contactActivity,
|
|
10879
10720
|
contact_check: contactCheck,
|
|
10880
10721
|
linked_person: linkedPerson,
|
|
@@ -11084,14 +10925,15 @@ var ENTITIES = {
|
|
|
11084
10925
|
tracked_chat: trackedChat,
|
|
11085
10926
|
tracked_chat_history: trackedChatHistory,
|
|
11086
10927
|
chat_tracking: chatTracking,
|
|
11087
|
-
task_stats: taskStats
|
|
10928
|
+
task_stats: taskStats,
|
|
10929
|
+
template
|
|
11088
10930
|
};
|
|
11089
10931
|
var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.entries(ENTITIES).map(([name, schema2]) => {
|
|
11090
|
-
const { $schema:
|
|
10932
|
+
const { $schema: _2, ...definition } = jsonSchemaOf(schema2);
|
|
11091
10933
|
return [name, definition];
|
|
11092
10934
|
})), "entityDefinitions");
|
|
11093
10935
|
|
|
11094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
|
|
11095
10937
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
11096
10938
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
|
|
11097
10939
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -11125,7 +10967,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
|
|
|
11125
10967
|
return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
|
|
11126
10968
|
}, "answerRow");
|
|
11127
10969
|
|
|
11128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/images/picture/models.js
|
|
11129
10971
|
import { join as join6 } from "node:path";
|
|
11130
10972
|
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
11131
10973
|
var IMAGE_MODELS = [
|
|
@@ -11179,7 +11021,7 @@ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedM
|
|
|
11179
11021
|
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
|
|
11180
11022
|
var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
|
|
11181
11023
|
|
|
11182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/steps.js
|
|
11183
11025
|
var STEPS2 = defineSteps([
|
|
11184
11026
|
...STEPS,
|
|
11185
11027
|
{
|
|
@@ -11398,12 +11240,6 @@ var STEPS2 = defineSteps([
|
|
|
11398
11240
|
command: "store recover",
|
|
11399
11241
|
args: [],
|
|
11400
11242
|
why: "the store file is damaged; this says what is lost and the commands that recover it"
|
|
11401
|
-
},
|
|
11402
|
-
{
|
|
11403
|
-
id: "search.meetings",
|
|
11404
|
-
command: "*",
|
|
11405
|
-
args: [{ name: "max_meetings", required: true }],
|
|
11406
|
-
why: "stopped after {scanned} meetings; more may match"
|
|
11407
11243
|
}
|
|
11408
11244
|
]);
|
|
11409
11245
|
var nextStep = /* @__PURE__ */ __name((id6, input) => {
|
|
@@ -11466,7 +11302,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
|
|
|
11466
11302
|
].join(" ");
|
|
11467
11303
|
}, "stepLine");
|
|
11468
11304
|
|
|
11469
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
|
|
11470
11306
|
var where = [{ field: "ref" }];
|
|
11471
11307
|
var who2 = { field: ["who.owner", "who.name"], tag: "you" };
|
|
11472
11308
|
var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
|
|
@@ -11558,7 +11394,7 @@ var STATUS_ROWS = {
|
|
|
11558
11394
|
"status.failed": { columns: [{ field: "signal" }], text: ["why"] }
|
|
11559
11395
|
};
|
|
11560
11396
|
|
|
11561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/compact.js
|
|
11562
11398
|
var TEXT_CHARS = 400;
|
|
11563
11399
|
var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
|
|
11564
11400
|
var messageRow = {
|
|
@@ -11800,8 +11636,8 @@ var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
|
|
|
11800
11636
|
const dates = rows2.map(({ cells }) => cells[index]?.date);
|
|
11801
11637
|
if (dates.some((one) => one === void 0))
|
|
11802
11638
|
return -1;
|
|
11803
|
-
const
|
|
11804
|
-
return ordered(
|
|
11639
|
+
const days = dates;
|
|
11640
|
+
return ordered(days) && new Set(days).size * 3 <= days.length ? index : -1;
|
|
11805
11641
|
}, "dayColumn");
|
|
11806
11642
|
var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
11807
11643
|
const dates = [];
|
|
@@ -11817,7 +11653,7 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
|
11817
11653
|
const firstColumn = shape.columns[0];
|
|
11818
11654
|
const refs = rows2.map(({ item }) => item && firstColumn ? firstSet(item, firstColumn.field) : void 0);
|
|
11819
11655
|
const prefix = sharedPrefix(refs.map((ref) => typeof ref === "string" ? ref : void 0));
|
|
11820
|
-
const hoisted = rows2.length < 2 ? [] : shape.columns.map((
|
|
11656
|
+
const hoisted = rows2.length < 2 ? [] : shape.columns.map((_2, index) => index > 0 && sameEverywhere(rows2, index));
|
|
11821
11657
|
const named2 = hoisted.flatMap((hoist, index) => {
|
|
11822
11658
|
const column = shape.columns[index];
|
|
11823
11659
|
const item = rows2[0]?.item;
|
|
@@ -11924,11 +11760,11 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
|
|
|
11924
11760
|
return lines.concat(footerOf(body)).join("\n");
|
|
11925
11761
|
}, "compactText");
|
|
11926
11762
|
|
|
11927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
|
|
11928
11764
|
var SOFT_OUTPUT_BYTES = 256 * 1024;
|
|
11929
11765
|
var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
|
|
11930
11766
|
var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
|
|
11931
|
-
var
|
|
11767
|
+
var snake2 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
11932
11768
|
var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
|
|
11933
11769
|
var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
11934
11770
|
const root = rootOf2(command);
|
|
@@ -11941,8 +11777,8 @@ var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
|
11941
11777
|
const word = Array.isArray(value) ? value.join(" ") : value;
|
|
11942
11778
|
return word === void 0 || word === "" ? [] : [[argument.name(), word]];
|
|
11943
11779
|
});
|
|
11944
|
-
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [
|
|
11945
|
-
const global = CARRIED.filter((key) => typed(root, key)).map((key) => [
|
|
11780
|
+
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake2(key), command.getOptionValue(key)]);
|
|
11781
|
+
const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake2(key), root.getOptionValue(key)]);
|
|
11946
11782
|
return Object.fromEntries([...positional, ...own, ...global]);
|
|
11947
11783
|
}, "typedArgs");
|
|
11948
11784
|
var declaresRow = /* @__PURE__ */ __name((command) => {
|
|
@@ -11982,7 +11818,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
|
|
|
11982
11818
|
return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
|
|
11983
11819
|
}, "largeAnswerSteps");
|
|
11984
11820
|
|
|
11985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
|
|
11986
11822
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
11987
11823
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
11988
11824
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -11996,7 +11832,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
11996
11832
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
11997
11833
|
}, "strip");
|
|
11998
11834
|
|
|
11999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@wirecat+cli-base@0.93.0_commander@15.0.0_esbuild@0.28.2_type_4dc2b7e09a64a37f199c7e635efe1b87/node_modules/@wirecat/cli-core/dist/cli/envelope.js
|
|
12000
11836
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
12001
11837
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
12002
11838
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -12039,7 +11875,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
|
|
|
12039
11875
|
};
|
|
12040
11876
|
return body;
|
|
12041
11877
|
}, "itemOf");
|
|
12042
|
-
var
|
|
11878
|
+
var snake3 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12043
11879
|
var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
12044
11880
|
const kept = new Set(verbatim);
|
|
12045
11881
|
const convert = /* @__PURE__ */ __name((value) => {
|
|
@@ -12050,7 +11886,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
|
12050
11886
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
|
|
12051
11887
|
if (inner === void 0)
|
|
12052
11888
|
return [];
|
|
12053
|
-
const name =
|
|
11889
|
+
const name = snake3(key);
|
|
12054
11890
|
return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
|
|
12055
11891
|
}));
|
|
12056
11892
|
}, "convert");
|
|
@@ -12156,30 +11992,15 @@ export {
|
|
|
12156
11992
|
mailHolderVariable,
|
|
12157
11993
|
MESSENGER_CHANGE_REFUSAL,
|
|
12158
11994
|
readOnlyRefusal,
|
|
12159
|
-
logAttributes,
|
|
12160
|
-
fromLogAttributes,
|
|
12161
|
-
LOG_ATTRIBUTES,
|
|
12162
|
-
runsDirFor,
|
|
12163
|
-
runtime,
|
|
12164
|
-
newRunId,
|
|
12165
|
-
listRuns,
|
|
12166
|
-
findRun,
|
|
12167
|
-
readEvents,
|
|
12168
|
-
currentRun,
|
|
12169
|
-
inRun,
|
|
12170
|
-
runEvent,
|
|
12171
|
-
typedCommand,
|
|
12172
|
-
useAsProcessRun,
|
|
12173
|
-
processRun,
|
|
12174
|
-
enclosingTraceId,
|
|
12175
|
-
traceOf,
|
|
12176
|
-
childTrace,
|
|
12177
|
-
withAttempt,
|
|
12178
|
-
currentAttempt,
|
|
12179
11995
|
recordLogFor,
|
|
12180
11996
|
parseDuration,
|
|
11997
|
+
WEIGHTS,
|
|
11998
|
+
LINK,
|
|
11999
|
+
oddName,
|
|
12181
12000
|
member,
|
|
12182
12001
|
chat,
|
|
12002
|
+
attachment,
|
|
12003
|
+
message,
|
|
12183
12004
|
botProfile,
|
|
12184
12005
|
botSeenChat,
|
|
12185
12006
|
botAdmin,
|
|
@@ -12205,8 +12026,6 @@ export {
|
|
|
12205
12026
|
stateOf,
|
|
12206
12027
|
startArchiveJob,
|
|
12207
12028
|
job,
|
|
12208
|
-
attachment,
|
|
12209
|
-
message,
|
|
12210
12029
|
annotate,
|
|
12211
12030
|
metaOf,
|
|
12212
12031
|
annotateOption,
|
|
@@ -12227,6 +12046,9 @@ export {
|
|
|
12227
12046
|
recorded,
|
|
12228
12047
|
startRecording,
|
|
12229
12048
|
wasSettled,
|
|
12049
|
+
inCommandServerRequest,
|
|
12050
|
+
commandServerRequest,
|
|
12051
|
+
exitCodeSet,
|
|
12230
12052
|
sentIds,
|
|
12231
12053
|
currentOperation,
|
|
12232
12054
|
guardedWrite,
|
|
@@ -12251,6 +12073,7 @@ export {
|
|
|
12251
12073
|
rootOf,
|
|
12252
12074
|
sampleCommand,
|
|
12253
12075
|
DEFAULT_TEXT_MODEL,
|
|
12076
|
+
PREVIOUS_DEFAULT_TEXT_MODEL,
|
|
12254
12077
|
CustomTextModelShape,
|
|
12255
12078
|
readTextModelsSection,
|
|
12256
12079
|
writeTextModelsSection,
|
|
@@ -12307,6 +12130,7 @@ export {
|
|
|
12307
12130
|
isLogin,
|
|
12308
12131
|
destroysNothing,
|
|
12309
12132
|
proposesOnly,
|
|
12133
|
+
narrowsUnderLock,
|
|
12310
12134
|
admittedUnderLock,
|
|
12311
12135
|
changesStore,
|
|
12312
12136
|
readsOverMcpAt,
|
|
@@ -12330,9 +12154,6 @@ export {
|
|
|
12330
12154
|
inviteLink,
|
|
12331
12155
|
chatEvent,
|
|
12332
12156
|
contact,
|
|
12333
|
-
WEIGHTS,
|
|
12334
|
-
LINK,
|
|
12335
|
-
oddName,
|
|
12336
12157
|
contactNote,
|
|
12337
12158
|
conversation,
|
|
12338
12159
|
documentLink,
|
|
@@ -12349,6 +12170,7 @@ export {
|
|
|
12349
12170
|
sendAttempt,
|
|
12350
12171
|
storeTable,
|
|
12351
12172
|
tagging,
|
|
12173
|
+
template,
|
|
12352
12174
|
topic,
|
|
12353
12175
|
ENTITIES,
|
|
12354
12176
|
entityDefinitions,
|